chore(project): refactor types dir
This commit is contained in:
@@ -30,9 +30,6 @@
|
||||
"types": "./src/index.ts",
|
||||
"development": "./src/index.ts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"./global": {
|
||||
"types": "./global.d.ts"
|
||||
}
|
||||
},
|
||||
"publishConfig": {
|
||||
|
@@ -1,6 +1,5 @@
|
||||
export * from './access';
|
||||
export * from './menu-record';
|
||||
export * from './preference';
|
||||
export * from './tabs';
|
||||
export * from './tools';
|
||||
export * from './ui';
|
||||
export type * from './access';
|
||||
export type * from './menu-record';
|
||||
export type * from './preference';
|
||||
export type * from './tabs';
|
||||
export type * from './tools';
|
||||
|
@@ -50,7 +50,7 @@
|
||||
"@vueuse/core": "^10.9.0",
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "2.1.1",
|
||||
"radix-vue": "^1.8.0",
|
||||
"radix-vue": "^1.8.1",
|
||||
"tailwind-merge": "^2.3.0",
|
||||
"vue": "^3.4.27",
|
||||
"vue-sonner": "^1.1.2"
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { VbenIcon } from '@vben-core/shadcn-ui';
|
||||
import { VbenIcon } from '../icon';
|
||||
|
||||
import type { IBreadcrumb } from './interface';
|
||||
|
||||
|
@@ -1,6 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { IcRoundKeyboardArrowDown } from '@vben-core/iconify';
|
||||
import { VbenIcon } from '@vben-core/shadcn-ui';
|
||||
|
||||
import {
|
||||
Breadcrumb,
|
||||
@@ -17,6 +16,8 @@ import {
|
||||
DropdownMenuTrigger,
|
||||
} from '#/components/ui/dropdown-menu';
|
||||
|
||||
import { VbenIcon } from '../';
|
||||
|
||||
import type { IBreadcrumb } from './interface';
|
||||
|
||||
interface Props {
|
||||
|
@@ -57,6 +57,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/qrcode": "^1.5.5",
|
||||
"@vben-core/typings": "workspace:*"
|
||||
"@vben/types": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { AuthPageLayout } from '@vben/types';
|
||||
import type { VbenDropdownMenuItem } from '@vben-core/shadcn-ui';
|
||||
import type { AuthPageLayout } from '@vben-core/typings';
|
||||
|
||||
import { MdiDockBottom, MdiDockLeft, MdiDockRight } from '@vben-core/iconify';
|
||||
import { VbenDropdownRadioMenu, VbenIconButton } from '@vben-core/shadcn-ui';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { MenuRecordRaw } from '@vben-core/typings';
|
||||
import type { MenuRecordRaw } from '@vben/types';
|
||||
|
||||
import {
|
||||
IcRoundArrowDownward,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { MenuRecordRaw } from '@vben-core/typings';
|
||||
import type { MenuRecordRaw } from '@vben/types';
|
||||
|
||||
import { IcRoundClose, IcRoundSearchOff } from '@vben-core/iconify';
|
||||
import { ScrollArea, VbenIcon } from '@vben-core/shadcn-ui';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { SupportLocale } from '@vben-core/typings';
|
||||
import type { SupportLocale } from '@vben/types';
|
||||
|
||||
import { IcBaselineLanguage } from '@vben-core/iconify';
|
||||
import { VbenDropdownRadioMenu, VbenIconButton } from '@vben-core/shadcn-ui';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { SelectListItem } from '@vben-core/typings';
|
||||
import type { SelectListItem } from '@vben/types';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import { staticPreference } from '@vben/preference';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { SelectListItem } from '@vben-core/typings';
|
||||
import type { SelectListItem } from '@vben/types';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { SelectListItem } from '@vben-core/typings';
|
||||
import type { SelectListItem } from '@vben/types';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { LayoutHeaderMode, SelectListItem } from '@vben-core/typings';
|
||||
import type { LayoutHeaderMode, SelectListItem } from '@vben/types';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { LayoutType } from '@vben-core/typings';
|
||||
import type { LayoutType } from '@vben/types';
|
||||
|
||||
import { MdiQuestionMarkCircleOutline } from '@vben-core/iconify';
|
||||
import { VbenTooltip } from '@vben-core/shadcn-ui';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { SelectListItem } from '@vben-core/typings';
|
||||
import type { SelectListItem } from '@vben/types';
|
||||
|
||||
import { MdiQuestionMarkCircleOutline } from '@vben-core/iconify';
|
||||
import {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import type { SelectListItem } from '@vben-core/typings';
|
||||
import type { SelectListItem } from '@vben/types';
|
||||
|
||||
import { ToggleGroup, ToggleGroupItem } from '@vben-core/shadcn-ui';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import type { PreferenceKeys, SupportLocale } from '@vben-core/typings';
|
||||
import type { PreferenceKeys, SupportLocale } from '@vben/types';
|
||||
|
||||
import { loadLocaleMessages } from '@vben/locales';
|
||||
import {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import type { LayoutHeaderMode, LayoutType } from '@vben/types';
|
||||
import type { SegmentedItem } from '@vben-core/shadcn-ui';
|
||||
import type { LayoutHeaderMode, LayoutType } from '@vben-core/typings';
|
||||
|
||||
import { IcRoundFolderCopy, IcRoundRestartAlt } from '@vben-core/iconify';
|
||||
import {
|
||||
|
@@ -12,11 +12,11 @@ import {
|
||||
VbenAvatar,
|
||||
VbenIcon,
|
||||
} from '@vben-core/shadcn-ui';
|
||||
import { AnyFunction } from '@vben-core/typings';
|
||||
|
||||
import type { Component } from 'vue';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import { AnyFunction } from '@vben/types';
|
||||
import { ref } from 'vue';
|
||||
|
||||
interface Props {
|
||||
|
@@ -26,7 +26,6 @@
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@vben-core/iconify": "workspace:*",
|
||||
"vue": "^3.4.27"
|
||||
"@vben-core/iconify": "workspace:*"
|
||||
}
|
||||
}
|
||||
|
7
packages/types/build.config.ts
Normal file
7
packages/types/build.config.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { defineBuildConfig } from 'unbuild';
|
||||
|
||||
export default defineBuildConfig({
|
||||
clean: true,
|
||||
declaration: true,
|
||||
entries: ['src/index'],
|
||||
});
|
51
packages/types/package.json
Normal file
51
packages/types/package.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "@vben/types",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/vbenjs/vue-vben-admin",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/vbenjs/vue-vben-admin.git",
|
||||
"directory": "packages/types"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/vbenjs/vue-vben-admin/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "pnpm unbuild",
|
||||
"stub": "pnpm build --stub"
|
||||
},
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"main": "./dist/index.mjs",
|
||||
"module": "./dist/index.mjs",
|
||||
"types": "./dist/index.d.ts",
|
||||
"imports": {
|
||||
"#*": "./src/*"
|
||||
},
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./src/index.ts",
|
||||
"development": "./src/index.ts",
|
||||
"default": "./dist/index.mjs"
|
||||
},
|
||||
"./global": {
|
||||
"types": "./global.d.ts"
|
||||
}
|
||||
},
|
||||
"publishConfig": {
|
||||
"exports": {
|
||||
".": {
|
||||
"types": "./dist/index.d.ts",
|
||||
"default": "./dist/index.mjs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@vben-core/typings": "workspace:*",
|
||||
"vue": "^3.4.27",
|
||||
"vue-router": "^4.3.2"
|
||||
}
|
||||
}
|
2
packages/types/src/index.ts
Normal file
2
packages/types/src/index.ts
Normal file
@@ -0,0 +1,2 @@
|
||||
export type * from './ui';
|
||||
export type * from '@vben-core/typings';
|
5
packages/types/tsconfig.json
Normal file
5
packages/types/tsconfig.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/tsconfig",
|
||||
"extends": "@vben/tsconfig/library.json",
|
||||
"include": ["src"]
|
||||
}
|
Reference in New Issue
Block a user