@katlux/toolkit 0.1.0-beta.84 → 0.1.1-alpha.89
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/README.md +9 -4
- package/bin/add-ai-reference.mjs +85 -0
- package/dist/compiled/composables/usePresetComponent.mjs +17 -6
- package/dist/module.cjs +38 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +38 -0
- package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
- package/dist/runtime/components/KContextMenu/KContextMenu.global.d.vue.ts +1 -1
- package/dist/runtime/components/KContextMenu/KContextMenu.global.vue.d.ts +1 -1
- package/dist/runtime/components/KDatatable/KDataIterator.global.d.vue.ts +1 -1
- package/dist/runtime/components/KDatatable/KDataIterator.global.vue.d.ts +1 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +2 -2
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +2 -2
- package/dist/runtime/components/KTreeView/KTreeView.global.d.vue.ts +3 -3
- package/dist/runtime/components/KTreeView/KTreeView.global.vue.d.ts +3 -3
- package/dist/runtime/composables/usePresetComponent.js +17 -6
- package/dist/runtime/presets/default/components/KCombobox/KComboboxList.vue +7 -0
- package/dist/runtime/presets/default/components/KDropdown/KDropdown.vue +7 -2
- package/dist/runtime/presets/default/components/KTreePicker/KTreePicker.vue +5 -1
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -9,15 +9,15 @@ Katlux is built to be a zero-configuration UI toolkit for Nuxt 3. You only need
|
|
|
9
9
|
### Option 1: Automatic Installation (Recommended)
|
|
10
10
|
Use the Nuxt CLI to automatically install the preset and add it to your `nuxt.config.ts` in one atomic step:
|
|
11
11
|
```bash
|
|
12
|
-
npx nuxi module add @katlux/preset-modern
|
|
12
|
+
npx nuxi module add @katlux/preset-modern@alpha
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
### Option 2: Manual Installation
|
|
16
16
|
1. Install the preset package via your favorite package manager:
|
|
17
17
|
```bash
|
|
18
|
-
npm install @katlux/preset-modern
|
|
18
|
+
npm install @katlux/preset-modern@alpha
|
|
19
19
|
```
|
|
20
|
-
*(This automatically installs `@katlux/toolkit` and data providers under the hood)*
|
|
20
|
+
*(This automatically installs `@katlux/toolkit@alpha` and data providers under the hood)*
|
|
21
21
|
|
|
22
22
|
2. Add the module to your `nuxt.config.ts`:
|
|
23
23
|
```ts
|
|
@@ -33,11 +33,16 @@ That's it! Katlux will now automatically:
|
|
|
33
33
|
- Inject necessary SCSS variables
|
|
34
34
|
- Configure TypeScript properly so your IDE understands the components
|
|
35
35
|
|
|
36
|
+
## Developer Guide
|
|
37
|
+
|
|
38
|
+
For full documentation and repository access:
|
|
39
|
+
- **Developer Guide & Repository**: [https://github.com/katlux-ui/KatluxShowcase](https://github.com/katlux-ui/KatluxShowcase)
|
|
40
|
+
|
|
36
41
|
## Attributions
|
|
37
42
|
|
|
38
43
|
This project includes SVG icons from [Lucide](https://lucide.dev/), which are licensed under the ISC License. See the `NOTICE` file for more details.
|
|
39
44
|
|
|
40
|
-
## Trademark Policy
|
|
45
|
+
## License & Trademark Policy
|
|
41
46
|
|
|
42
47
|
The code in this repository is completely free and open-source under the Apache 2.0 License.
|
|
43
48
|
However, **Katlux™** and the Katlux logo are unregistered trademarks of the Katlux project.
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* katlux-add-ref
|
|
4
|
+
* Downloads the Katlux AI Reference Guide from the official showcase and installs
|
|
5
|
+
* it into the current project at .agents/skills/KATLUX_AI_REFERENCE.md.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* npx @katlux/toolkit katlux-add-ref
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import { existsSync, mkdirSync, writeFileSync } from 'fs'
|
|
12
|
+
import { resolve, join } from 'path'
|
|
13
|
+
|
|
14
|
+
// Official showcase endpoint — always serves the latest reference guide.
|
|
15
|
+
// ⚠️ Update this URL to your actual deployed showcase domain before publishing.
|
|
16
|
+
const REFERENCE_URL = 'https://alpha.katlux.dev/ai-reference.md'
|
|
17
|
+
|
|
18
|
+
// Target: project root / .agents/skills/KATLUX_AI_REFERENCE.md
|
|
19
|
+
const targetDir = resolve(process.cwd(), '.agents', 'skills')
|
|
20
|
+
const targetFile = join(targetDir, 'KATLUX_AI_REFERENCE.md')
|
|
21
|
+
|
|
22
|
+
const RESET = '\x1b[0m'
|
|
23
|
+
const GREEN = '\x1b[32m'
|
|
24
|
+
const CYAN = '\x1b[36m'
|
|
25
|
+
const YELLOW = '\x1b[33m'
|
|
26
|
+
const RED = '\x1b[31m'
|
|
27
|
+
const BOLD = '\x1b[1m'
|
|
28
|
+
const DIM = '\x1b[2m'
|
|
29
|
+
|
|
30
|
+
function log(color, prefix, message) {
|
|
31
|
+
console.log(`${color}${BOLD}${prefix}${RESET} ${message}`)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// ── Fetch the reference file ────────────────────────────────────────────────
|
|
35
|
+
console.log()
|
|
36
|
+
log(CYAN, '[katlux-add-ref]', `Fetching reference guide from showcase...`)
|
|
37
|
+
console.log(` ${DIM}${REFERENCE_URL}${RESET}`)
|
|
38
|
+
console.log()
|
|
39
|
+
|
|
40
|
+
let content
|
|
41
|
+
try {
|
|
42
|
+
const response = await fetch(REFERENCE_URL)
|
|
43
|
+
if (!response.ok) {
|
|
44
|
+
log(RED, '[katlux-add-ref] ✖', `Server responded with ${response.status} ${response.statusText}`)
|
|
45
|
+
console.log(`\n Make sure the Katlux Showcase is reachable:\n ${REFERENCE_URL}`)
|
|
46
|
+
process.exit(1)
|
|
47
|
+
}
|
|
48
|
+
content = await response.text()
|
|
49
|
+
} catch (err) {
|
|
50
|
+
log(RED, '[katlux-add-ref] ✖', `Network error — could not reach the showcase:`)
|
|
51
|
+
console.log(` ${err.message}`)
|
|
52
|
+
console.log(`\n Check your internet connection and try again.`)
|
|
53
|
+
process.exit(1)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// ── Create target directory if needed ──────────────────────────────────────
|
|
57
|
+
const isUpdate = existsSync(targetFile)
|
|
58
|
+
if (!existsSync(targetDir)) {
|
|
59
|
+
mkdirSync(targetDir, { recursive: true })
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// ── Write the file ──────────────────────────────────────────────────────────
|
|
63
|
+
try {
|
|
64
|
+
writeFileSync(targetFile, content, 'utf-8')
|
|
65
|
+
} catch (err) {
|
|
66
|
+
log(RED, '[katlux-add-ref] ✖', `Failed to write the reference file:`)
|
|
67
|
+
console.log(` ${err.message}`)
|
|
68
|
+
process.exit(1)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// ── Success output ──────────────────────────────────────────────────────────
|
|
72
|
+
if (isUpdate) {
|
|
73
|
+
log(GREEN, '[katlux-add-ref] ✔', `Reference guide updated successfully!`)
|
|
74
|
+
} else {
|
|
75
|
+
log(GREEN, '[katlux-add-ref] ✔', `Reference guide installed successfully!`)
|
|
76
|
+
}
|
|
77
|
+
console.log()
|
|
78
|
+
console.log(` ${CYAN}Location:${RESET} ${targetFile}`)
|
|
79
|
+
console.log()
|
|
80
|
+
console.log(` ${YELLOW}Tip:${RESET} If you use an AI assistant (Cursor, Copilot, Antigravity, etc.),`)
|
|
81
|
+
console.log(` point it to this file so it understands the full Katlux component API.`)
|
|
82
|
+
console.log()
|
|
83
|
+
console.log(` Re-run this command any time to get the latest version:`)
|
|
84
|
+
console.log(` ${CYAN}npx @katlux/toolkit katlux-add-ref${RESET}`)
|
|
85
|
+
console.log()
|
|
@@ -23,13 +23,24 @@ export function usePresetComponent(componentBaseName, defaultComponent) {
|
|
|
23
23
|
if (!loader) {
|
|
24
24
|
const internalLoaders = import.meta.glob([
|
|
25
25
|
"../presets/**/*.vue",
|
|
26
|
-
"../../runtime/presets/**/*.vue"
|
|
26
|
+
"../../runtime/presets/**/*.vue",
|
|
27
|
+
"~/presets/**/*.vue",
|
|
28
|
+
"@/presets/**/*.vue"
|
|
27
29
|
]);
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const candidateKeys = [
|
|
31
|
+
`../presets/${presetName}/components/${componentBaseName}/${componentBaseName}.vue`,
|
|
32
|
+
`../../runtime/presets/${presetName}/components/${componentBaseName}/${componentBaseName}.vue`,
|
|
33
|
+
`/app/presets/${presetName}/components/${componentBaseName}/${componentBaseName}.vue`,
|
|
34
|
+
`/presets/${presetName}/components/${componentBaseName}/${componentBaseName}.vue`
|
|
35
|
+
];
|
|
36
|
+
for (const [key, importFn] of Object.entries(internalLoaders)) {
|
|
37
|
+
for (const candidate of candidateKeys) {
|
|
38
|
+
if (key.endsWith(candidate)) {
|
|
39
|
+
loader = importFn;
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (loader) break;
|
|
33
44
|
}
|
|
34
45
|
}
|
|
35
46
|
if (loader) {
|
package/dist/module.cjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const kit = require('@nuxt/kit');
|
|
4
4
|
const node_fs = require('node:fs');
|
|
5
|
+
const node_module = require('node:module');
|
|
5
6
|
|
|
6
7
|
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
7
8
|
const module$1 = kit.defineNuxtModule({
|
|
@@ -72,6 +73,43 @@ const module$1 = kit.defineNuxtModule({
|
|
|
72
73
|
kit.addPlugin(resolve("./runtime/plugins/registerDirectives"));
|
|
73
74
|
kit.addPlugin(resolve("./runtime/plugins/PresetPlugin"));
|
|
74
75
|
nuxt.options.alias["#toolkit"] = resolve("./runtime");
|
|
76
|
+
const userSrcDir = nuxt.options.srcDir || nuxt.options.rootDir;
|
|
77
|
+
const possiblePresetsDirs = [
|
|
78
|
+
resolve(userSrcDir, "presets"),
|
|
79
|
+
resolve(nuxt.options.rootDir, "presets")
|
|
80
|
+
];
|
|
81
|
+
let foundPresetsDir = null;
|
|
82
|
+
for (const pDir of possiblePresetsDirs) {
|
|
83
|
+
if (node_fs.existsSync(pDir)) {
|
|
84
|
+
foundPresetsDir = pDir;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (foundPresetsDir) {
|
|
89
|
+
const fs = node_module.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('module.cjs', document.baseURI).href)))("fs");
|
|
90
|
+
try {
|
|
91
|
+
const presets = fs.readdirSync(foundPresetsDir, { withFileTypes: true });
|
|
92
|
+
for (const presetItem of presets) {
|
|
93
|
+
if (presetItem.isDirectory()) {
|
|
94
|
+
const presetName = presetItem.name;
|
|
95
|
+
const cssCandidates = [
|
|
96
|
+
resolve(foundPresetsDir, presetName, "assets/css-variables.css"),
|
|
97
|
+
resolve(foundPresetsDir, presetName, "assets/css-variables.scss"),
|
|
98
|
+
resolve(foundPresetsDir, presetName, "assets/scss/index.scss"),
|
|
99
|
+
resolve(foundPresetsDir, presetName, "assets/scss/index.css")
|
|
100
|
+
];
|
|
101
|
+
for (const candidate of cssCandidates) {
|
|
102
|
+
if (node_fs.existsSync(candidate) && !nuxt.options.css.includes(candidate)) {
|
|
103
|
+
nuxt.options.css.push(candidate);
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
} catch (e) {
|
|
110
|
+
console.warn("[Katlux] Failed to auto-scan user presets directory:", e);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
75
113
|
nuxt.hook("prepare:types", (options2) => {
|
|
76
114
|
options2.tsConfig.compilerOptions = options2.tsConfig.compilerOptions || {};
|
|
77
115
|
options2.tsConfig.compilerOptions.allowArbitraryExtensions = true;
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { defineNuxtModule, createResolver, addComponentsDir, addImportsDir, addPlugin } from '@nuxt/kit';
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
3
4
|
|
|
4
5
|
const module$1 = defineNuxtModule({
|
|
5
6
|
meta: {
|
|
@@ -69,6 +70,43 @@ const module$1 = defineNuxtModule({
|
|
|
69
70
|
addPlugin(resolve("./runtime/plugins/registerDirectives"));
|
|
70
71
|
addPlugin(resolve("./runtime/plugins/PresetPlugin"));
|
|
71
72
|
nuxt.options.alias["#toolkit"] = resolve("./runtime");
|
|
73
|
+
const userSrcDir = nuxt.options.srcDir || nuxt.options.rootDir;
|
|
74
|
+
const possiblePresetsDirs = [
|
|
75
|
+
resolve(userSrcDir, "presets"),
|
|
76
|
+
resolve(nuxt.options.rootDir, "presets")
|
|
77
|
+
];
|
|
78
|
+
let foundPresetsDir = null;
|
|
79
|
+
for (const pDir of possiblePresetsDirs) {
|
|
80
|
+
if (existsSync(pDir)) {
|
|
81
|
+
foundPresetsDir = pDir;
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
if (foundPresetsDir) {
|
|
86
|
+
const fs = createRequire(import.meta.url)("fs");
|
|
87
|
+
try {
|
|
88
|
+
const presets = fs.readdirSync(foundPresetsDir, { withFileTypes: true });
|
|
89
|
+
for (const presetItem of presets) {
|
|
90
|
+
if (presetItem.isDirectory()) {
|
|
91
|
+
const presetName = presetItem.name;
|
|
92
|
+
const cssCandidates = [
|
|
93
|
+
resolve(foundPresetsDir, presetName, "assets/css-variables.css"),
|
|
94
|
+
resolve(foundPresetsDir, presetName, "assets/css-variables.scss"),
|
|
95
|
+
resolve(foundPresetsDir, presetName, "assets/scss/index.scss"),
|
|
96
|
+
resolve(foundPresetsDir, presetName, "assets/scss/index.css")
|
|
97
|
+
];
|
|
98
|
+
for (const candidate of cssCandidates) {
|
|
99
|
+
if (existsSync(candidate) && !nuxt.options.css.includes(candidate)) {
|
|
100
|
+
nuxt.options.css.push(candidate);
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
} catch (e) {
|
|
107
|
+
console.warn("[Katlux] Failed to auto-scan user presets directory:", e);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
72
110
|
nuxt.hook("prepare:types", (options2) => {
|
|
73
111
|
options2.tsConfig.compilerOptions = options2.tsConfig.compilerOptions || {};
|
|
74
112
|
options2.tsConfig.compilerOptions.allowArbitraryExtensions = true;
|
|
@@ -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" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | "
|
|
26
|
+
buttonClasses: import("vue").ComputedRef<("info" | "default" | "small" | "primary" | "danger" | "success" | "warning" | "light" | "dark" | "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
|
-
x: number;
|
|
50
49
|
teleportTo: string;
|
|
50
|
+
x: number;
|
|
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
|
-
x: number;
|
|
50
49
|
teleportTo: string;
|
|
50
|
+
x: number;
|
|
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
|
-
search: string;
|
|
15
14
|
bulkActions: IKDatatableAction[];
|
|
15
|
+
search: string;
|
|
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
|
-
search: string;
|
|
15
14
|
bulkActions: IKDatatableAction[];
|
|
15
|
+
search: string;
|
|
16
16
|
loading: boolean;
|
|
17
17
|
visibleFields: Array<string> | null;
|
|
18
18
|
rowActions: IKDatatableAction[];
|
|
@@ -165,8 +165,6 @@ 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;
|
|
170
168
|
disabled: boolean;
|
|
171
169
|
loading: boolean;
|
|
172
170
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
@@ -181,6 +179,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
181
179
|
multiSelect: boolean;
|
|
182
180
|
valueField: string;
|
|
183
181
|
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,8 +165,6 @@ 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;
|
|
170
168
|
disabled: boolean;
|
|
171
169
|
loading: boolean;
|
|
172
170
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
@@ -181,6 +179,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
181
179
|
multiSelect: boolean;
|
|
182
180
|
valueField: string;
|
|
183
181
|
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;
|
|
87
84
|
bulkActions: import("@katlux/providers").IKDatatableAction[];
|
|
88
85
|
rowActions: import("@katlux/providers").IKDatatableAction[];
|
|
89
86
|
cellSlots: Record<string, any>;
|
|
90
87
|
headerSlots: Record<string, any>;
|
|
91
88
|
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;
|
|
87
84
|
bulkActions: import("@katlux/providers").IKDatatableAction[];
|
|
88
85
|
rowActions: import("@katlux/providers").IKDatatableAction[];
|
|
89
86
|
cellSlots: Record<string, any>;
|
|
90
87
|
headerSlots: Record<string, any>;
|
|
91
88
|
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;
|
|
@@ -23,13 +23,24 @@ export function usePresetComponent(componentBaseName, defaultComponent) {
|
|
|
23
23
|
if (!loader) {
|
|
24
24
|
const internalLoaders = import.meta.glob([
|
|
25
25
|
"../presets/**/*.vue",
|
|
26
|
-
"../../runtime/presets/**/*.vue"
|
|
26
|
+
"../../runtime/presets/**/*.vue",
|
|
27
|
+
"~/presets/**/*.vue",
|
|
28
|
+
"@/presets/**/*.vue"
|
|
27
29
|
]);
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
const candidateKeys = [
|
|
31
|
+
`../presets/${presetName}/components/${componentBaseName}/${componentBaseName}.vue`,
|
|
32
|
+
`../../runtime/presets/${presetName}/components/${componentBaseName}/${componentBaseName}.vue`,
|
|
33
|
+
`/app/presets/${presetName}/components/${componentBaseName}/${componentBaseName}.vue`,
|
|
34
|
+
`/presets/${presetName}/components/${componentBaseName}/${componentBaseName}.vue`
|
|
35
|
+
];
|
|
36
|
+
for (const [key, importFn] of Object.entries(internalLoaders)) {
|
|
37
|
+
for (const candidate of candidateKeys) {
|
|
38
|
+
if (key.endsWith(candidate)) {
|
|
39
|
+
loader = importFn;
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
if (loader) break;
|
|
33
44
|
}
|
|
34
45
|
}
|
|
35
46
|
if (loader) {
|
|
@@ -43,9 +43,16 @@ const searchtextModel = computed({
|
|
|
43
43
|
.KCombobox__options {
|
|
44
44
|
&-content {
|
|
45
45
|
margin: -var(--grid-gap);
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
min-height: 0;
|
|
49
|
+
flex: 1;
|
|
50
|
+
overflow: hidden;
|
|
46
51
|
}
|
|
47
52
|
&-list {
|
|
48
53
|
overflow-y: auto;
|
|
54
|
+
flex: 1;
|
|
55
|
+
min-height: 0;
|
|
49
56
|
&-item {
|
|
50
57
|
cursor: pointer;
|
|
51
58
|
height: 40px;
|
|
@@ -86,7 +86,9 @@ const dialogStyle = computed(() => {
|
|
|
86
86
|
// Applied to the KPanel content so the dropdown list can scroll inside
|
|
87
87
|
const contentStyle = computed(() => ({
|
|
88
88
|
maxHeight: `${props.dropdownRect.maxHeight}px`,
|
|
89
|
-
|
|
89
|
+
overflow: 'hidden',
|
|
90
|
+
display: 'flex',
|
|
91
|
+
flexDirection: 'column',
|
|
90
92
|
}))
|
|
91
93
|
</script>
|
|
92
94
|
|
|
@@ -102,9 +104,12 @@ const contentStyle = computed(() => ({
|
|
|
102
104
|
:deep {
|
|
103
105
|
.KPanel--content {
|
|
104
106
|
padding: var(--component-gap);
|
|
105
|
-
overflow-y: auto;
|
|
106
107
|
background-color: var(--panel-bg-default);
|
|
107
108
|
color: var(--font-color-primary);
|
|
109
|
+
display: flex;
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
min-height: 0;
|
|
112
|
+
flex: 1;
|
|
108
113
|
}
|
|
109
114
|
}
|
|
110
115
|
}
|
|
@@ -106,7 +106,11 @@ function onTreeSelect(node: any) {
|
|
|
106
106
|
<style lang="scss" scoped>
|
|
107
107
|
.KTreePicker__tree-container {
|
|
108
108
|
padding: 10px;
|
|
109
|
-
|
|
109
|
+
margin: -var(--grid-gap);
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-direction: column;
|
|
112
|
+
flex: 1;
|
|
113
|
+
min-height: 0;
|
|
110
114
|
overflow-y: auto;
|
|
111
115
|
min-width: 250px;
|
|
112
116
|
background-color: var(--panel-bg-default);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@katlux/toolkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1-alpha.89",
|
|
4
4
|
"description": "Core UI toolkit and utilities for the Katlux ecosystem",
|
|
5
5
|
"author": "Katlux",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
10
|
"main": "./dist/module.mjs",
|
|
11
|
+
"bin": {
|
|
12
|
+
"katlux-add-ref": "./bin/add-ai-reference.mjs"
|
|
13
|
+
},
|
|
11
14
|
"scripts": {
|
|
12
15
|
"build": "nuxt-module-build build && unbuild && mkdir -p dist/runtime && cp -r src/runtime/presets dist/runtime/",
|
|
13
16
|
"dev": "nuxt-module-build build --stub",
|
|
@@ -41,6 +44,7 @@
|
|
|
41
44
|
"sass": "^1.80.0"
|
|
42
45
|
},
|
|
43
46
|
"files": [
|
|
44
|
-
"dist"
|
|
47
|
+
"dist",
|
|
48
|
+
"bin"
|
|
45
49
|
]
|
|
46
50
|
}
|