Skip to content

Commit 9bf2ac5

Browse files
build(ui): improve dts generation (#462)
1 parent 4df82ca commit 9bf2ac5

File tree

5 files changed

+26
-5
lines changed

5 files changed

+26
-5
lines changed

packages/applet/src/components/state/StateFieldEditor.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import { computed, ref, toRaw } from 'vue'
33
import { VueButton, VueDropdown, VueDropdownButton, VueIcon, vTooltip } from '@vue/devtools-ui'
44
import { DevToolsV6PluginAPIHookKeys, getRaw } from '@vue/devtools-kit'
55
import type { CustomInspectorState, DevToolsV6PluginAPIHookPayloads } from '@vue/devtools-kit'
6-
import type { ButtonProps } from '@vue/devtools-ui/dist/types/src/components/Button'
76
import { rpc } from '@vue/devtools-core'
87
import { useClipboard } from '@vueuse/core'
8+
import type { ButtonProps } from '@vue/devtools-ui'
99
import { useStateEditorContext } from '~/composables/state-editor'
1010
import type { EditorAddNewPropType, EditorInputValidType } from '~/composables/state-editor'
1111

packages/ui/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,20 @@
66
"license": "MIT",
77
"exports": {
88
".": {
9-
"types": "./dist/types/src/index.d.ts",
9+
"types": "./dist/types/index.d.ts",
1010
"import": "./dist/index.js",
1111
"require": "./dist/index.cjs"
1212
},
1313
"./style.css": "./dist/style.css",
1414
"./theme": {
15-
"types": "./dist/types/theme/index.d.ts",
15+
"types": "./dist/types/theme.d.ts",
1616
"import": "./dist/theme.js",
1717
"require": "./dist/theme.cjs"
1818
}
1919
},
2020
"main": "./dist/index.cjs",
2121
"module": "./dist/index.js",
22-
"types": "./dist/types/src/index.d.ts",
22+
"types": "./dist/types/index.d.ts",
2323
"files": [
2424
"dist"
2525
],

packages/ui/src/components/index.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,23 @@ export {
3939
Notification as VueNotification,
4040
Tooltip as VueTooltip,
4141
}
42+
43+
export type * from './Button.vue'
44+
export type * from './Badge.vue'
45+
export type * from './LoadingIndicator.vue'
46+
export type * from './Icon.vue'
47+
export type * from './DarkToggle.vue'
48+
export type * from './Card.vue'
49+
export type * from './Dialog.vue'
50+
export type * from './Input.vue'
51+
export type * from './FormField.vue'
52+
export type * from './Dropdown.vue'
53+
export type * from './DropdownButton.vue'
54+
export type * from './Confirm.vue'
55+
export type * from './Select.vue'
56+
export type * from './Switch.vue'
57+
export type * from './Checkbox.vue'
58+
export type * from './Drawer.vue'
59+
export type * from './Overlay.vue'
60+
export type * from './Notification.vue'
61+
export type * from './Tooltip.vue'

packages/ui/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"jsx": "preserve",
55
"lib": ["esnext", "DOM"],
66
"module": "esnext",
7-
"moduleResolution": "node",
7+
"moduleResolution": "Bundler",
88
"resolveJsonModule": true,
99
"strict": true,
1010
"strictNullChecks": true,

packages/ui/vite.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export default defineConfig({
1212
vue(),
1313
unocss(),
1414
dts({
15+
rollupTypes: true,
1516
cleanVueFileName: true,
1617
include: ['src', 'theme'],
1718
outDir: 'dist/types',

0 commit comments

Comments
 (0)