@kungal/ui-nuxt 1.12.1 → 1.14.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 CHANGED
@@ -1,5 +1,44 @@
1
1
  # @kungal/ui-nuxt
2
2
 
3
+ ## 1.14.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [cf7f212]
8
+ - @kungal/ui-vue@1.14.0
9
+ - @kungal/ui-tokens@1.14.0
10
+
11
+ ## 1.13.0
12
+
13
+ ### Patch Changes
14
+
15
+ - 9cd2af8: feat: single source of truth for component registration + `KunUIResolver`
16
+
17
+ Kills the class of bug where a newly-added component is registered for plain Vue
18
+ but forgotten elsewhere (the recent `Failed to resolve component: KunReaction`).
19
+
20
+ - **One source** — `KUN_COMPONENT_NAMES` (exported from `@kungal/ui-vue`). The
21
+ plain-Vue plugin types its registry as `Record<KunComponentName, …>`, so a
22
+ missing/extra entry is a **compile error**, not a silent runtime failure. The
23
+ Nuxt layer's auto-import list and the docs meta now derive from this list
24
+ instead of hand-maintaining their own copies — they can no longer drift.
25
+ - **`KunUIResolver`** (new, from `@kungal/ui-vue`) for `unplugin-vue-components`,
26
+ matching Element Plus / PrimeVue: Vite apps get on-demand, tree-shaken
27
+ auto-import of every KunUI component with zero registration and zero list —
28
+ new components work automatically.
29
+
30
+ ```ts
31
+ import Components from "unplugin-vue-components/vite";
32
+ import { KunUIResolver } from "@kungal/ui-vue";
33
+ // plugins: [Components({ resolvers: [KunUIResolver()] })]
34
+ ```
35
+
36
+ No change to existing usage (`app.use(KunUI)`, the Nuxt layer auto-import).
37
+
38
+ - Updated dependencies [9cd2af8]
39
+ - @kungal/ui-vue@1.13.0
40
+ - @kungal/ui-tokens@1.13.0
41
+
3
42
  ## 1.12.1
4
43
 
5
44
  ### Patch Changes
package/nuxt.config.ts CHANGED
@@ -1,78 +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
- const KUN_COMPONENTS = [
9
- 'KunAccordion',
10
- 'KunAccordionItem',
11
- 'KunAlertProvider',
12
- 'KunAutocomplete',
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
- 'KunReaction',
57
- 'KunRipple',
58
- 'KunScrollShadow',
59
- 'KunSelect',
60
- 'KunSkeleton',
61
- 'KunSlider',
62
- 'KunSteps',
63
- 'KunSwitch',
64
- 'KunTab',
65
- 'KunTabPanel',
66
- 'KunTabPanels',
67
- 'KunTagInput',
68
- 'KunText',
69
- 'KunTextarea',
70
- 'KunTimeline',
71
- 'KunTimelineItem',
72
- 'KunTooltip',
73
- 'KunUpload',
74
- 'KunUserChip',
75
- ]
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.
76
14
 
77
15
  // Composables auto-imported for DX parity with the original Nuxt-native lib
78
16
  // (so `useKunMessage(...)` etc. work with no import in any component).
@@ -102,7 +40,7 @@ export default defineNuxtConfig({
102
40
  defineNuxtModule({
103
41
  meta: { name: 'kun-ui-components' },
104
42
  setup() {
105
- for (const name of KUN_COMPONENTS) {
43
+ for (const name of KUN_COMPONENT_NAMES) {
106
44
  addComponent({ name, export: name, filePath: '@kungal/ui-vue' })
107
45
  }
108
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.12.1",
3
+ "version": "1.14.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-vue": "1.12.1",
38
- "@kungal/ui-tokens": "1.12.1"
37
+ "@kungal/ui-tokens": "1.14.0",
38
+ "@kungal/ui-vue": "1.14.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "nuxt": "^4.0.0",