@katlux/toolkit 0.1.1-alpha.89 → 0.1.1-alpha.91

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/dist/module.cjs CHANGED
@@ -109,6 +109,36 @@ const module$1 = kit.defineNuxtModule({
109
109
  } catch (e) {
110
110
  console.warn("[Katlux] Failed to auto-scan user presets directory:", e);
111
111
  }
112
+ kit.addPluginTemplate({
113
+ filename: "katlux-user-presets-plugin.mjs",
114
+ getContents() {
115
+ return `
116
+ import { defineNuxtPlugin } from '#app'
117
+ import { registerPresetComponents } from '#imports'
118
+
119
+ export default defineNuxtPlugin(() => {
120
+ const userPresetLoaders = import.meta.glob([
121
+ '~/presets/**/components/*/*.vue',
122
+ '~/app/presets/**/components/*/*.vue'
123
+ ])
124
+
125
+ const loadersByPreset = {}
126
+ for (const [path, loader] of Object.entries(userPresetLoaders)) {
127
+ const match = path.match(/presets\\/([^/]+)\\/components\\/([^/]+)\\/([^/]+)\\.vue$/)
128
+ if (match) {
129
+ const [, presetName, componentDir, componentFile] = match
130
+ if (!loadersByPreset[presetName]) loadersByPreset[presetName] = {}
131
+ loadersByPreset[presetName][\`./components/\${componentDir}/\${componentFile}.vue\`] = loader
132
+ }
133
+ }
134
+
135
+ for (const [presetName, loaders] of Object.entries(loadersByPreset)) {
136
+ registerPresetComponents(presetName, loaders)
137
+ }
138
+ })
139
+ `;
140
+ }
141
+ });
112
142
  }
113
143
  nuxt.hook("prepare:types", (options2) => {
114
144
  options2.tsConfig.compilerOptions = options2.tsConfig.compilerOptions || {};
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
3
  "configKey": "katluxToolkit",
4
- "version": "0.1.1-alpha.89",
4
+ "version": "0.1.1-alpha.91",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
package/dist/module.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineNuxtModule, createResolver, addComponentsDir, addImportsDir, addPlugin } from '@nuxt/kit';
1
+ import { defineNuxtModule, createResolver, addComponentsDir, addImportsDir, addPlugin, addPluginTemplate } from '@nuxt/kit';
2
2
  import { existsSync } from 'node:fs';
3
3
  import { createRequire } from 'node:module';
4
4
 
@@ -106,6 +106,36 @@ const module$1 = defineNuxtModule({
106
106
  } catch (e) {
107
107
  console.warn("[Katlux] Failed to auto-scan user presets directory:", e);
108
108
  }
109
+ addPluginTemplate({
110
+ filename: "katlux-user-presets-plugin.mjs",
111
+ getContents() {
112
+ return `
113
+ import { defineNuxtPlugin } from '#app'
114
+ import { registerPresetComponents } from '#imports'
115
+
116
+ export default defineNuxtPlugin(() => {
117
+ const userPresetLoaders = import.meta.glob([
118
+ '~/presets/**/components/*/*.vue',
119
+ '~/app/presets/**/components/*/*.vue'
120
+ ])
121
+
122
+ const loadersByPreset = {}
123
+ for (const [path, loader] of Object.entries(userPresetLoaders)) {
124
+ const match = path.match(/presets\\/([^/]+)\\/components\\/([^/]+)\\/([^/]+)\\.vue$/)
125
+ if (match) {
126
+ const [, presetName, componentDir, componentFile] = match
127
+ if (!loadersByPreset[presetName]) loadersByPreset[presetName] = {}
128
+ loadersByPreset[presetName][\`./components/\${componentDir}/\${componentFile}.vue\`] = loader
129
+ }
130
+ }
131
+
132
+ for (const [presetName, loaders] of Object.entries(loadersByPreset)) {
133
+ registerPresetComponents(presetName, loaders)
134
+ }
135
+ })
136
+ `;
137
+ }
138
+ });
109
139
  }
110
140
  nuxt.hook("prepare:types", (options2) => {
111
141
  options2.tsConfig.compilerOptions = options2.tsConfig.compilerOptions || {};
@@ -23,7 +23,7 @@ export interface KButtonEmits {
23
23
  export declare function useKButtonLogic(props: KButtonProps, emit: KButtonEmits): {
24
24
  isLink: import("vue").ComputedRef<boolean>;
25
25
  isDisabled: import("vue").ComputedRef<boolean | undefined>;
26
- buttonClasses: import("vue").ComputedRef<("info" | "default" | "small" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | "large" | "medium" | {
26
+ buttonClasses: import("vue").ComputedRef<("info" | "default" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | "small" | "large" | "medium" | {
27
27
  disabled: boolean | undefined;
28
28
  'icon-only': boolean | undefined;
29
29
  })[]>;
@@ -46,8 +46,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
46
46
  "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
47
47
  }>, {
48
48
  isOpen: boolean;
49
- teleportTo: string;
50
49
  x: number;
50
+ teleportTo: string;
51
51
  y: number;
52
52
  target: string | HTMLElement;
53
53
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -46,8 +46,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
46
46
  "onUpdate:isOpen"?: ((value: boolean) => any) | undefined;
47
47
  }>, {
48
48
  isOpen: boolean;
49
- teleportTo: string;
50
49
  x: number;
50
+ teleportTo: string;
51
51
  y: number;
52
52
  target: string | HTMLElement;
53
53
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -11,8 +11,8 @@ interface Props {
11
11
  page?: number;
12
12
  }
13
13
  declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
14
- bulkActions: IKDatatableAction[];
15
14
  search: string;
15
+ bulkActions: IKDatatableAction[];
16
16
  loading: boolean;
17
17
  visibleFields: Array<string> | null;
18
18
  rowActions: IKDatatableAction[];
@@ -11,8 +11,8 @@ interface Props {
11
11
  page?: number;
12
12
  }
13
13
  declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
14
- bulkActions: IKDatatableAction[];
15
14
  search: string;
15
+ bulkActions: IKDatatableAction[];
16
16
  loading: boolean;
17
17
  visibleFields: Array<string> | null;
18
18
  rowActions: IKDatatableAction[];
@@ -165,6 +165,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
165
165
  "onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
166
166
  }>, {
167
167
  label: string;
168
+ parentKey: string;
169
+ idKey: string;
168
170
  disabled: boolean;
169
171
  loading: boolean;
170
172
  validation: "error" | "success" | "warning" | null | undefined;
@@ -179,8 +181,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
179
181
  multiSelect: boolean;
180
182
  valueField: string;
181
183
  iconField: string;
182
- idKey: string;
183
- parentKey: string;
184
184
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
185
185
  declare const _default: typeof __VLS_export;
186
186
  export default _default;
@@ -165,6 +165,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
165
165
  "onUpdate:isOptionsOpen"?: ((value: boolean) => any) | undefined;
166
166
  }>, {
167
167
  label: string;
168
+ parentKey: string;
169
+ idKey: string;
168
170
  disabled: boolean;
169
171
  loading: boolean;
170
172
  validation: "error" | "success" | "warning" | null | undefined;
@@ -179,8 +181,6 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
179
181
  multiSelect: boolean;
180
182
  valueField: string;
181
183
  iconField: string;
182
- idKey: string;
183
- parentKey: string;
184
184
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
185
185
  declare const _default: typeof __VLS_export;
186
186
  export default _default;
@@ -81,14 +81,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
81
81
  default: () => {};
82
82
  };
83
83
  }>> & Readonly<{}>, {
84
+ parentKey: string;
85
+ idKey: string;
86
+ expandedByDefault: boolean;
84
87
  bulkActions: import("@katlux/providers").IKDatatableAction[];
85
88
  rowActions: import("@katlux/providers").IKDatatableAction[];
86
89
  cellSlots: Record<string, any>;
87
90
  headerSlots: Record<string, any>;
88
91
  treeColumnIndex: number;
89
- idKey: string;
90
- parentKey: string;
91
- expandedByDefault: boolean;
92
92
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
93
93
  declare const _default: typeof __VLS_export;
94
94
  export default _default;
@@ -81,14 +81,14 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
81
81
  default: () => {};
82
82
  };
83
83
  }>> & Readonly<{}>, {
84
+ parentKey: string;
85
+ idKey: string;
86
+ expandedByDefault: boolean;
84
87
  bulkActions: import("@katlux/providers").IKDatatableAction[];
85
88
  rowActions: import("@katlux/providers").IKDatatableAction[];
86
89
  cellSlots: Record<string, any>;
87
90
  headerSlots: Record<string, any>;
88
91
  treeColumnIndex: number;
89
- idKey: string;
90
- parentKey: string;
91
- expandedByDefault: boolean;
92
92
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
93
93
  declare const _default: typeof __VLS_export;
94
94
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
- "version": "0.1.1-alpha.89",
3
+ "version": "0.1.1-alpha.91",
4
4
  "description": "Core UI toolkit and utilities for the Katlux ecosystem",
5
5
  "author": "Katlux",
6
6
  "license": "Apache-2.0",