@kungal/ui-nuxt 1.12.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/nuxt.config.ts +7 -68
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
1
1
|
# @kungal/ui-nuxt
|
|
2
2
|
|
|
3
|
+
## 1.13.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9cd2af8: feat: single source of truth for component registration + `KunUIResolver`
|
|
8
|
+
|
|
9
|
+
Kills the class of bug where a newly-added component is registered for plain Vue
|
|
10
|
+
but forgotten elsewhere (the recent `Failed to resolve component: KunReaction`).
|
|
11
|
+
|
|
12
|
+
- **One source** — `KUN_COMPONENT_NAMES` (exported from `@kungal/ui-vue`). The
|
|
13
|
+
plain-Vue plugin types its registry as `Record<KunComponentName, …>`, so a
|
|
14
|
+
missing/extra entry is a **compile error**, not a silent runtime failure. The
|
|
15
|
+
Nuxt layer's auto-import list and the docs meta now derive from this list
|
|
16
|
+
instead of hand-maintaining their own copies — they can no longer drift.
|
|
17
|
+
- **`KunUIResolver`** (new, from `@kungal/ui-vue`) for `unplugin-vue-components`,
|
|
18
|
+
matching Element Plus / PrimeVue: Vite apps get on-demand, tree-shaken
|
|
19
|
+
auto-import of every KunUI component with zero registration and zero list —
|
|
20
|
+
new components work automatically.
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import Components from "unplugin-vue-components/vite";
|
|
24
|
+
import { KunUIResolver } from "@kungal/ui-vue";
|
|
25
|
+
// plugins: [Components({ resolvers: [KunUIResolver()] })]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
No change to existing usage (`app.use(KunUI)`, the Nuxt layer auto-import).
|
|
29
|
+
|
|
30
|
+
- Updated dependencies [9cd2af8]
|
|
31
|
+
- @kungal/ui-vue@1.13.0
|
|
32
|
+
- @kungal/ui-tokens@1.13.0
|
|
33
|
+
|
|
34
|
+
## 1.12.1
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- e7505ae: fix(nuxt): register KunReaction for auto-import
|
|
39
|
+
|
|
40
|
+
`KunReaction` (added in 1.11.0) was wired into the plain-Vue plugin and the docs
|
|
41
|
+
but not into the Nuxt layer's `KUN_COMPONENTS` auto-import list, so downstream
|
|
42
|
+
Nuxt templates hit `[Vue warn]: Failed to resolve component: KunReaction`. Added
|
|
43
|
+
it to the list. No other component was affected — the rest are in sync.
|
|
44
|
+
|
|
45
|
+
- @kungal/ui-tokens@1.12.1
|
|
46
|
+
- @kungal/ui-vue@1.12.1
|
|
47
|
+
|
|
3
48
|
## 1.12.0
|
|
4
49
|
|
|
5
50
|
### Patch Changes
|
package/nuxt.config.ts
CHANGED
|
@@ -1,77 +1,16 @@
|
|
|
1
1
|
import { defineNuxtModule, addComponent, addImports } from '@nuxt/kit'
|
|
2
|
+
import { KUN_COMPONENT_NAMES } from '@kungal/ui-vue'
|
|
2
3
|
|
|
3
4
|
// The components live in the framework-agnostic-friendly @kungal/ui-vue
|
|
4
5
|
// package (already compiled). Rather than re-authoring SFCs in this layer,
|
|
5
6
|
// register each named export as a Nuxt auto-import so downstream templates
|
|
6
7
|
// can use `<KunButton>` etc. with no import — and Nuxt generates the
|
|
7
8
|
// component types, so the tags stay type-checked in consumer templates.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
'KunAvatar',
|
|
14
|
-
'KunAvatarGroup',
|
|
15
|
-
'KunBadge',
|
|
16
|
-
'KunBrand',
|
|
17
|
-
'KunButton',
|
|
18
|
-
'KunCard',
|
|
19
|
-
'KunCarousel',
|
|
20
|
-
'KunCarouselItem',
|
|
21
|
-
'KunCheckBox',
|
|
22
|
-
'KunChip',
|
|
23
|
-
'KunContent',
|
|
24
|
-
'KunContextMenu',
|
|
25
|
-
'KunCopy',
|
|
26
|
-
'KunDatePicker',
|
|
27
|
-
'KunDivider',
|
|
28
|
-
'KunDrawer',
|
|
29
|
-
'KunDropdown',
|
|
30
|
-
'KunFadeCard',
|
|
31
|
-
'KunFileInput',
|
|
32
|
-
'KunHeader',
|
|
33
|
-
'KunIcon',
|
|
34
|
-
'KunImage',
|
|
35
|
-
'KunImageNative',
|
|
36
|
-
'KunInfo',
|
|
37
|
-
'KunInput',
|
|
38
|
-
'KunLightbox',
|
|
39
|
-
'KunLightboxGallery',
|
|
40
|
-
'KunLightboxGalleryItem',
|
|
41
|
-
'KunLink',
|
|
42
|
-
'KunLoading',
|
|
43
|
-
'KunLoli',
|
|
44
|
-
'KunLoliProvider',
|
|
45
|
-
'KunMarkdown',
|
|
46
|
-
'KunMessageProvider',
|
|
47
|
-
'KunModal',
|
|
48
|
-
'KunNull',
|
|
49
|
-
'KunNumberInput',
|
|
50
|
-
'KunPagination',
|
|
51
|
-
'KunPinInput',
|
|
52
|
-
'KunPopover',
|
|
53
|
-
'KunProgress',
|
|
54
|
-
'KunRadioGroup',
|
|
55
|
-
'KunRating',
|
|
56
|
-
'KunRipple',
|
|
57
|
-
'KunScrollShadow',
|
|
58
|
-
'KunSelect',
|
|
59
|
-
'KunSkeleton',
|
|
60
|
-
'KunSlider',
|
|
61
|
-
'KunSteps',
|
|
62
|
-
'KunSwitch',
|
|
63
|
-
'KunTab',
|
|
64
|
-
'KunTabPanel',
|
|
65
|
-
'KunTabPanels',
|
|
66
|
-
'KunTagInput',
|
|
67
|
-
'KunText',
|
|
68
|
-
'KunTextarea',
|
|
69
|
-
'KunTimeline',
|
|
70
|
-
'KunTimelineItem',
|
|
71
|
-
'KunTooltip',
|
|
72
|
-
'KunUpload',
|
|
73
|
-
'KunUserChip',
|
|
74
|
-
]
|
|
9
|
+
//
|
|
10
|
+
// The list is NOT duplicated here: it's the `KUN_COMPONENT_NAMES` single source
|
|
11
|
+
// from @kungal/ui-vue (the same one the library types its global registry
|
|
12
|
+
// against), so a new component is auto-registered for Nuxt with zero changes
|
|
13
|
+
// in this layer — and the two lists can never drift out of sync.
|
|
75
14
|
|
|
76
15
|
// Composables auto-imported for DX parity with the original Nuxt-native lib
|
|
77
16
|
// (so `useKunMessage(...)` etc. work with no import in any component).
|
|
@@ -101,7 +40,7 @@ export default defineNuxtConfig({
|
|
|
101
40
|
defineNuxtModule({
|
|
102
41
|
meta: { name: 'kun-ui-components' },
|
|
103
42
|
setup() {
|
|
104
|
-
for (const name of
|
|
43
|
+
for (const name of KUN_COMPONENT_NAMES) {
|
|
105
44
|
addComponent({ name, export: name, filePath: '@kungal/ui-vue' })
|
|
106
45
|
}
|
|
107
46
|
for (const name of KUN_COMPOSABLES) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kungal/ui-nuxt",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "KunUI Nuxt Layer — wraps @kungal/ui-vue, auto-imports the components, and injects NuxtLink + @nuxt/icon so existing Nuxt apps keep their exact DX.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"keywords": [
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"@nuxt/icon": "^2.2.3",
|
|
35
35
|
"@nuxt/image": "^2.0.0",
|
|
36
36
|
"@nuxt/kit": "^4.4.7",
|
|
37
|
-
"@kungal/ui-
|
|
38
|
-
"@kungal/ui-
|
|
37
|
+
"@kungal/ui-tokens": "1.13.0",
|
|
38
|
+
"@kungal/ui-vue": "1.13.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"nuxt": "^4.0.0",
|