chore(project): refactor types dir

This commit is contained in:
vben
2024-05-21 22:14:25 +08:00
parent c31d21be50
commit f6087ce4e8
37 changed files with 141 additions and 65 deletions

View File

@@ -30,9 +30,6 @@
"types": "./src/index.ts",
"development": "./src/index.ts",
"default": "./dist/index.mjs"
},
"./global": {
"types": "./global.d.ts"
}
},
"publishConfig": {

View File

@@ -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';

View File

@@ -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"

View File

@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { VbenIcon } from '@vben-core/shadcn-ui';
import { VbenIcon } from '../icon';
import type { IBreadcrumb } from './interface';

View File

@@ -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 {

View File

@@ -57,6 +57,6 @@
},
"devDependencies": {
"@types/qrcode": "^1.5.5",
"@vben-core/typings": "workspace:*"
"@vben/types": "workspace:*"
}
}

View File

@@ -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';

View File

@@ -1,5 +1,5 @@
<script setup lang="ts">
import type { MenuRecordRaw } from '@vben-core/typings';
import type { MenuRecordRaw } from '@vben/types';
import {
IcRoundArrowDownward,

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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';

View File

@@ -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 {

View File

@@ -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';

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -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 {

View File

@@ -26,7 +26,6 @@
}
},
"dependencies": {
"@vben-core/iconify": "workspace:*",
"vue": "^3.4.27"
"@vben-core/iconify": "workspace:*"
}
}

View File

@@ -0,0 +1,7 @@
import { defineBuildConfig } from 'unbuild';
export default defineBuildConfig({
clean: true,
declaration: true,
entries: ['src/index'],
});

View 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"
}
}

View File

@@ -0,0 +1,2 @@
export type * from './ui';
export type * from '@vben-core/typings';

View File

@@ -0,0 +1,5 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@vben/tsconfig/library.json",
"include": ["src"]
}