Skip to content

Commit cb25902

Browse files
committed
fix(module)!: properly export composables from module
Resolves #5370
1 parent 9c46985 commit cb25902

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

package.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,14 @@
2929
},
3030
"./runtime/*": "./dist/runtime/*",
3131
"./components/*": "./dist/runtime/components/*",
32-
"./composables/*": "./dist/runtime/composables/*",
32+
"./composables": {
33+
"types": "./dist/runtime/composables/index.d.ts",
34+
"import": "./dist/runtime/composables/index.js"
35+
},
36+
"./composables/*": {
37+
"types": "./dist/runtime/composables/*.d.ts",
38+
"import": "./dist/runtime/composables/*.js"
39+
},
3340
"./utils": {
3441
"types": "./dist/runtime/utils/index.d.ts",
3542
"import": "./dist/runtime/utils/index.js"
@@ -63,8 +70,11 @@
6370
"components/*": [
6471
"./dist/runtime/components/*"
6572
],
73+
"composables": [
74+
"./dist/runtime/composables/index.d.ts"
75+
],
6676
"composables/*": [
67-
"./dist/runtime/composables/*"
77+
"./dist/runtime/composables/*.d.ts"
6878
],
6979
"utils": [
7080
"./dist/runtime/utils/index.d.ts"

playgrounds/nuxt/app/pages/components/kbd.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script setup lang="ts">
22
import theme from '#build/ui/kbd'
3-
import { kbdKeysMap } from '@nuxt/ui/composables/useKbd.js'
3+
import { kbdKeysMap } from '@nuxt/ui/composables/useKbd'
44
55
const sizes = Object.keys(theme.variants.size)
66
const variants = Object.keys(theme.variants.variant)

playgrounds/nuxt/app/pages/components/shortcuts.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import type { ShortcutsConfig } from '@nuxt/ui/composables/defineShortcuts.js'
2+
import type { ShortcutsConfig } from '@nuxt/ui/composables/defineShortcuts'
33
44
const logs = ref<string[]>([])
55
const shortcutsState = ref({

src/runtime/composables/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export * from './defineLocale'
2+
export * from './defineShortcuts'
3+
export * from './useFileUpload'
4+
export * from './useKbd'
5+
export * from './useOverlay'
6+
export * from './useResizable'
7+
export * from './useScrollspy'
8+
export * from './useToast'

0 commit comments

Comments
 (0)