Skip to content

Commit

Permalink
build(ui): improve dts generation (#462)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexzhang1030 authored Jun 21, 2024
1 parent 4df82ca commit 9bf2ac5
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/applet/src/components/state/StateFieldEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { computed, ref, toRaw } from 'vue'
import { VueButton, VueDropdown, VueDropdownButton, VueIcon, vTooltip } from '@vue/devtools-ui'
import { DevToolsV6PluginAPIHookKeys, getRaw } from '@vue/devtools-kit'
import type { CustomInspectorState, DevToolsV6PluginAPIHookPayloads } from '@vue/devtools-kit'
import type { ButtonProps } from '@vue/devtools-ui/dist/types/src/components/Button'
import { rpc } from '@vue/devtools-core'
import { useClipboard } from '@vueuse/core'
import type { ButtonProps } from '@vue/devtools-ui'
import { useStateEditorContext } from '~/composables/state-editor'
import type { EditorAddNewPropType, EditorInputValidType } from '~/composables/state-editor'
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
"license": "MIT",
"exports": {
".": {
"types": "./dist/types/src/index.d.ts",
"types": "./dist/types/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./style.css": "./dist/style.css",
"./theme": {
"types": "./dist/types/theme/index.d.ts",
"types": "./dist/types/theme.d.ts",
"import": "./dist/theme.js",
"require": "./dist/theme.cjs"
}
},
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/types/src/index.d.ts",
"types": "./dist/types/index.d.ts",
"files": [
"dist"
],
Expand Down
20 changes: 20 additions & 0 deletions packages/ui/src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,23 @@ export {
Notification as VueNotification,
Tooltip as VueTooltip,
}

export type * from './Button.vue'
export type * from './Badge.vue'
export type * from './LoadingIndicator.vue'
export type * from './Icon.vue'
export type * from './DarkToggle.vue'
export type * from './Card.vue'
export type * from './Dialog.vue'
export type * from './Input.vue'
export type * from './FormField.vue'
export type * from './Dropdown.vue'
export type * from './DropdownButton.vue'
export type * from './Confirm.vue'
export type * from './Select.vue'
export type * from './Switch.vue'
export type * from './Checkbox.vue'
export type * from './Drawer.vue'
export type * from './Overlay.vue'
export type * from './Notification.vue'
export type * from './Tooltip.vue'
2 changes: 1 addition & 1 deletion packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"jsx": "preserve",
"lib": ["esnext", "DOM"],
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "Bundler",
"resolveJsonModule": true,
"strict": true,
"strictNullChecks": true,
Expand Down
1 change: 1 addition & 0 deletions packages/ui/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default defineConfig({
vue(),
unocss(),
dts({
rollupTypes: true,
cleanVueFileName: true,
include: ['src', 'theme'],
outDir: 'dist/types',
Expand Down

0 comments on commit 9bf2ac5

Please sign in to comment.