@katlux/toolkit 0.1.1-alpha.129 → 0.1.1-alpha.130
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/bin/add-ai-reference.mjs +85 -46
- package/dist/module.json +1 -1
- package/dist/runtime/components/KButton/KButton.global.d.vue.ts +2 -2
- package/dist/runtime/components/KButton/KButton.global.vue.d.ts +2 -2
- package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
- package/dist/runtime/components/KCheckbox/KCheckbox.global.d.vue.ts +1 -1
- package/dist/runtime/components/KCheckbox/KCheckbox.global.vue.d.ts +1 -1
- package/dist/runtime/components/KCombobox/KCombobox.global.d.vue.ts +1 -1
- package/dist/runtime/components/KCombobox/KCombobox.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/KHourPicker/KHourPicker.global.d.vue.ts +1 -1
- package/dist/runtime/components/KHourPicker/KHourPicker.global.vue.d.ts +1 -1
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.d.vue.ts +1 -1
- package/dist/runtime/components/KRangeSlider/KRangeSlider.global.vue.d.ts +1 -1
- package/dist/runtime/components/KSlider/KSlider.global.d.vue.ts +1 -1
- package/dist/runtime/components/KSlider/KSlider.global.vue.d.ts +1 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.global.d.vue.ts +1 -1
- package/dist/runtime/components/KTreePicker/KTreePicker.global.vue.d.ts +1 -1
- package/dist/skills/KATLUX_INDEX.md +40 -0
- package/dist/skills/katlux-components/SKILL.md +106 -0
- package/dist/skills/katlux-components/components/KAccordion.md +27 -0
- package/dist/skills/katlux-components/components/KAlert.md +22 -0
- package/dist/skills/katlux-components/components/KAreaChart.md +19 -0
- package/dist/skills/katlux-components/components/KBarChart.md +20 -0
- package/dist/skills/katlux-components/components/KBulkActions.md +19 -0
- package/dist/skills/katlux-components/components/KButton.md +12 -0
- package/dist/skills/katlux-components/components/KCalendar.md +17 -0
- package/dist/skills/katlux-components/components/KCheckbox.md +15 -0
- package/dist/skills/katlux-components/components/KCombobox.md +41 -0
- package/dist/skills/katlux-components/components/KCompositeInput.md +67 -0
- package/dist/skills/katlux-components/components/KContextMenu.md +20 -0
- package/dist/skills/katlux-components/components/KDataIterator.md +35 -0
- package/dist/skills/katlux-components/components/KDatatable.md +55 -0
- package/dist/skills/katlux-components/components/KDatePicker.md +26 -0
- package/dist/skills/katlux-components/components/KDropdown.md +18 -0
- package/dist/skills/katlux-components/components/KGantt.md +28 -0
- package/dist/skills/katlux-components/components/KGrid.md +17 -0
- package/dist/skills/katlux-components/components/KHeatMap.md +32 -0
- package/dist/skills/katlux-components/components/KHourSelect.md +11 -0
- package/dist/skills/katlux-components/components/KIcon.md +5 -0
- package/dist/skills/katlux-components/components/KLayout.md +34 -0
- package/dist/skills/katlux-components/components/KLineChart.md +18 -0
- package/dist/skills/katlux-components/components/KLoader.md +7 -0
- package/dist/skills/katlux-components/components/KMaskTextbox.md +12 -0
- package/dist/skills/katlux-components/components/KModal.md +22 -0
- package/dist/skills/katlux-components/components/KPagination.md +22 -0
- package/dist/skills/katlux-components/components/KPanel.md +18 -0
- package/dist/skills/katlux-components/components/KPieChart.md +14 -0
- package/dist/skills/katlux-components/components/KProductList.md +42 -0
- package/dist/skills/katlux-components/components/KScatterChart.md +20 -0
- package/dist/skills/katlux-components/components/KSlider.md +28 -0
- package/dist/skills/katlux-components/components/KTabs.md +31 -0
- package/dist/skills/katlux-components/components/KTextbox.md +15 -0
- package/dist/skills/katlux-components/components/KToast.md +14 -0
- package/dist/skills/katlux-components/components/KTooltip.md +13 -0
- package/dist/skills/katlux-components/components/KTree.md +45 -0
- package/dist/skills/katlux-components/components/KTreePicker.md +35 -0
- package/dist/skills/katlux-components/components/KTreeView.md +30 -0
- package/dist/skills/katlux-components/components/MultiTabs.md +20 -0
- package/dist/skills/katlux-components/components/calendar-customization.md +6 -0
- package/dist/skills/katlux-components/components/datatable-customization.md +14 -0
- package/dist/skills/katlux-components/components/directives.md +11 -0
- package/dist/skills/katlux-components/components/form-validation.md +125 -0
- package/dist/skills/katlux-components/components/tree-customization.md +9 -0
- package/dist/skills/katlux-components/components/useToast.md +27 -0
- package/dist/skills/katlux-components/components/validation-directives.md +6 -0
- package/dist/skills/katlux-config/SKILL.md +156 -0
- package/dist/skills/katlux-presets/SKILL.md +356 -0
- package/dist/skills/katlux-providers/SKILL.md +64 -0
- package/dist/skills/katlux-providers/providers/ADataProvider.md +59 -0
- package/dist/skills/katlux-providers/providers/CAPIFlatClientDataProvider.md +28 -0
- package/dist/skills/katlux-providers/providers/CAPIFlatServerDataProvider.md +20 -0
- package/dist/skills/katlux-providers/providers/CFlatClientDataProvider.md +11 -0
- package/dist/skills/katlux-providers/providers/CFlatServerDataProvider.md +58 -0
- package/dist/skills/katlux-providers/providers/CTreeClientDataProvider.md +14 -0
- package/dist/skills/katlux-providers/providers/CTreeServerDataProvider.md +5 -0
- package/dist/skills/katlux-providers/providers/KatluxIndexedDB.md +10 -0
- package/dist/skills/katlux-providers/providers/RequestProvider.md +49 -0
- package/dist/skills/katlux-providers/providers/RequestQueue.md +52 -0
- package/dist/skills/katlux-providers/providers/api-protocol.md +40 -0
- package/dist/skills/katlux-providers/providers/caching.md +170 -0
- package/dist/skills/katlux-providers/providers/composables.md +107 -0
- package/dist/skills/katlux-providers/providers/encryption.md +151 -0
- package/dist/skills/katlux-providers/providers/react-integration.md +45 -0
- package/dist/skills/katlux-providers/providers/testing-isolation.md +6 -0
- package/dist/skills/katlux-providers/providers/types.md +27 -0
- package/dist/skills/katlux-providers/providers/useDataProvider.md +51 -0
- package/dist/skills/katlux-tokens/SKILL.md +133 -0
- package/package.json +2 -2
package/bin/add-ai-reference.mjs
CHANGED
|
@@ -5,29 +5,26 @@
|
|
|
5
5
|
* into the current project. Safe to re-run at any time to update to the latest.
|
|
6
6
|
*
|
|
7
7
|
* What it does:
|
|
8
|
-
* 1.
|
|
9
|
-
* 2.
|
|
8
|
+
* 1. Installs .agents/skills/KATLUX_INDEX.md (always overwritten, auto-maintained)
|
|
9
|
+
* 2. Installs .agents/skills/katlux-[skill]/SKILL.md and all atomic specs under components/ & providers/
|
|
10
10
|
* 3. Scaffolds AGENTS.md (created once, never overwritten)
|
|
11
11
|
* 4. Scaffolds .agents/rules/rules.md (created once, never overwritten)
|
|
12
|
+
* 5. Auto-configures MCP server for Antigravity, Cursor, and VS Code
|
|
12
13
|
*
|
|
13
14
|
* Usage:
|
|
14
15
|
* npx @katlux/toolkit katlux-add-ref
|
|
15
16
|
*/
|
|
16
17
|
|
|
17
|
-
import { existsSync, mkdirSync, writeFileSync, readFileSync } from 'fs'
|
|
18
|
-
import { resolve, join } from 'path'
|
|
18
|
+
import { existsSync, mkdirSync, writeFileSync, readFileSync, readdirSync } from 'fs'
|
|
19
|
+
import { resolve, join, dirname } from 'path'
|
|
20
|
+
import { fileURLToPath } from 'url'
|
|
19
21
|
|
|
20
|
-
const
|
|
22
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
23
|
+
const BASE_URL = process.env.KATLUX_REF_URL || 'https://katlux.dev/ai-reference'
|
|
21
24
|
|
|
22
|
-
//
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
'katlux-config',
|
|
26
|
-
'katlux-components',
|
|
27
|
-
'katlux-providers',
|
|
28
|
-
'katlux-presets',
|
|
29
|
-
'katlux-tokens',
|
|
30
|
-
]
|
|
25
|
+
// Local packaged skills directory inside @katlux/toolkit
|
|
26
|
+
const packagedSkillsDir = resolve(__dirname, '../dist/skills')
|
|
27
|
+
const hasPackagedSkills = existsSync(join(packagedSkillsDir, 'KATLUX_INDEX.md'))
|
|
31
28
|
|
|
32
29
|
const RESET = '\x1b[0m'
|
|
33
30
|
const GREEN = '\x1b[32m'
|
|
@@ -47,10 +44,26 @@ async function fetchText(url) {
|
|
|
47
44
|
return response.text()
|
|
48
45
|
}
|
|
49
46
|
|
|
47
|
+
function copyDirRecursive(src, dest) {
|
|
48
|
+
if (!existsSync(dest)) mkdirSync(dest, { recursive: true })
|
|
49
|
+
const entries = readdirSync(src, { withFileTypes: true })
|
|
50
|
+
let count = 0
|
|
51
|
+
for (const entry of entries) {
|
|
52
|
+
const srcPath = join(src, entry.name)
|
|
53
|
+
const destPath = join(dest, entry.name)
|
|
54
|
+
if (entry.isDirectory()) {
|
|
55
|
+
count += copyDirRecursive(srcPath, destPath)
|
|
56
|
+
} else if (entry.name.endsWith('.md') && entry.name !== 'KATLUX_AI_REFERENCE.md') {
|
|
57
|
+
writeFileSync(destPath, readFileSync(srcPath, 'utf-8'), 'utf-8')
|
|
58
|
+
count++
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return count
|
|
62
|
+
}
|
|
63
|
+
|
|
50
64
|
// ── Start ────────────────────────────────────────────────────────────────────
|
|
51
65
|
console.log()
|
|
52
|
-
log(CYAN, '[katlux-add-ref]', `
|
|
53
|
-
console.log(` ${DIM}${BASE_URL}${RESET}`)
|
|
66
|
+
log(CYAN, '[katlux-add-ref]', `Installing Katlux AI skill files...`)
|
|
54
67
|
console.log()
|
|
55
68
|
|
|
56
69
|
const projectRoot = process.cwd()
|
|
@@ -62,39 +75,63 @@ const rulesDir = resolve(agentsDir, 'rules')
|
|
|
62
75
|
if (!existsSync(skillsDir)) mkdirSync(skillsDir, { recursive: true })
|
|
63
76
|
if (!existsSync(rulesDir)) mkdirSync(rulesDir, { recursive: true })
|
|
64
77
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
78
|
+
let installedFilesCount = 0
|
|
79
|
+
let bundleInstalled = false
|
|
80
|
+
|
|
81
|
+
// ── 1. Fetch remote skills bundle (all skills + atomic specs in 1 fast roundtrip) ──
|
|
82
|
+
process.stdout.write(` ${DIM}Fetching skills bundle from ${BASE_URL}/bundle...${RESET}`)
|
|
68
83
|
try {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
84
|
+
const res = await fetch(`${BASE_URL}/bundle`)
|
|
85
|
+
if (res.ok) {
|
|
86
|
+
const bundle = await res.json()
|
|
87
|
+
if (bundle.files && typeof bundle.files === 'object') {
|
|
88
|
+
for (const [relPath, content] of Object.entries(bundle.files)) {
|
|
89
|
+
const destPath = join(skillsDir, relPath)
|
|
90
|
+
const fileDir = dirname(destPath)
|
|
91
|
+
if (!existsSync(fileDir)) mkdirSync(fileDir, { recursive: true })
|
|
92
|
+
writeFileSync(destPath, content, 'utf-8')
|
|
93
|
+
installedFilesCount++
|
|
94
|
+
}
|
|
95
|
+
process.stdout.write(` ${GREEN}✔ (${installedFilesCount} files)${RESET}\n`)
|
|
96
|
+
bundleInstalled = true
|
|
97
|
+
}
|
|
98
|
+
} else {
|
|
99
|
+
process.stdout.write(` ${YELLOW}HTTP ${res.status}${RESET}\n`)
|
|
100
|
+
}
|
|
101
|
+
} catch {
|
|
102
|
+
process.stdout.write(` ${YELLOW}remote unavailable${RESET}\n`)
|
|
77
103
|
}
|
|
78
104
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
105
|
+
// ── 2. Fallback: Local packaged skills (works 100% offline or when remote bundle is unreachable) ──
|
|
106
|
+
if (!bundleInstalled) {
|
|
107
|
+
if (hasPackagedSkills) {
|
|
108
|
+
log(CYAN, ' local', `Installing bundled skills from @katlux/toolkit package...`)
|
|
109
|
+
installedFilesCount = copyDirRecursive(packagedSkillsDir, skillsDir)
|
|
110
|
+
log(GREEN, ' written', `${installedFilesCount} skill files installed from local toolkit`)
|
|
111
|
+
} else {
|
|
112
|
+
// ── 3. Fallback: Legacy individual HTTP fetch ────────────────────────────
|
|
113
|
+
log(YELLOW, ' fallback', `Fetching individual skills from ${BASE_URL}...`)
|
|
114
|
+
try {
|
|
115
|
+
const indexContent = await fetchText(BASE_URL).catch(() => fetchText(`${BASE_URL}/index`))
|
|
116
|
+
writeFileSync(join(skillsDir, 'KATLUX_INDEX.md'), indexContent, 'utf-8')
|
|
117
|
+
installedFilesCount++
|
|
118
|
+
} catch (err) {
|
|
119
|
+
log(RED, '[katlux-add-ref] ✖', `Failed to fetch index: ${err.message}`)
|
|
120
|
+
process.exit(1)
|
|
121
|
+
}
|
|
82
122
|
|
|
83
|
-
|
|
84
|
-
for (const skill of SKILLS) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
log(RED, '[katlux-add-ref] ✖', `Failed to fetch ${skill}:`)
|
|
96
|
-
console.log(` ${err.message}`)
|
|
97
|
-
process.exit(1)
|
|
123
|
+
const SKILLS = ['katlux-config', 'katlux-components', 'katlux-providers', 'katlux-presets', 'katlux-tokens']
|
|
124
|
+
for (const skill of SKILLS) {
|
|
125
|
+
try {
|
|
126
|
+
const content = await fetchText(`${BASE_URL}/${skill}`)
|
|
127
|
+
const skillDir = join(skillsDir, skill)
|
|
128
|
+
if (!existsSync(skillDir)) mkdirSync(skillDir, { recursive: true })
|
|
129
|
+
writeFileSync(join(skillDir, 'SKILL.md'), content, 'utf-8')
|
|
130
|
+
installedFilesCount++
|
|
131
|
+
} catch (err) {
|
|
132
|
+
log(RED, '[katlux-add-ref] ✖', `Failed to fetch ${skill}: ${err.message}`)
|
|
133
|
+
}
|
|
134
|
+
}
|
|
98
135
|
}
|
|
99
136
|
}
|
|
100
137
|
|
|
@@ -184,9 +221,11 @@ if (existsSync(vscodeDir)) {
|
|
|
184
221
|
|
|
185
222
|
// ── Done ─────────────────────────────────────────────────────────────────────
|
|
186
223
|
console.log()
|
|
187
|
-
log(GREEN, '[katlux-add-ref] ✔', `Done! ${
|
|
224
|
+
log(GREEN, '[katlux-add-ref] ✔', `Done! ${installedFilesCount} skill files (including atomic components & providers) + index installed and MCP server configured.`)
|
|
188
225
|
console.log()
|
|
189
226
|
console.log(` ${CYAN}Skills:${RESET} .agents/skills/katlux-*/SKILL.md`)
|
|
227
|
+
console.log(` ${CYAN}Components:${RESET} .agents/skills/katlux-components/components/*.md (46 atomic specs)`)
|
|
228
|
+
console.log(` ${CYAN}Providers:${RESET} .agents/skills/katlux-providers/providers/*.md (18 atomic specs)`)
|
|
190
229
|
console.log(` ${CYAN}Index:${RESET} .agents/skills/KATLUX_INDEX.md ${DIM}(auto-updated each run)${RESET}`)
|
|
191
230
|
console.log(` ${CYAN}MCP:${RESET} @katlux/mcp server ready on stdio`)
|
|
192
231
|
console.log()
|
package/dist/module.json
CHANGED
|
@@ -55,11 +55,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
55
55
|
onClick?: (() => any) | undefined;
|
|
56
56
|
}>, {
|
|
57
57
|
size: "small" | "large" | "medium" | undefined;
|
|
58
|
-
type: "default" | "
|
|
58
|
+
type: "default" | "primary" | "danger" | "success" | "warning" | "info" | "light" | "dark" | undefined;
|
|
59
|
+
iconOnly: boolean;
|
|
59
60
|
disabled: boolean;
|
|
60
61
|
href: string;
|
|
61
62
|
loading: boolean;
|
|
62
|
-
iconOnly: boolean;
|
|
63
63
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
64
64
|
declare const _default: typeof __VLS_export;
|
|
65
65
|
export default _default;
|
|
@@ -55,11 +55,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
55
55
|
onClick?: (() => any) | undefined;
|
|
56
56
|
}>, {
|
|
57
57
|
size: "small" | "large" | "medium" | undefined;
|
|
58
|
-
type: "default" | "
|
|
58
|
+
type: "default" | "primary" | "danger" | "success" | "warning" | "info" | "light" | "dark" | undefined;
|
|
59
|
+
iconOnly: boolean;
|
|
59
60
|
disabled: boolean;
|
|
60
61
|
href: string;
|
|
61
62
|
loading: boolean;
|
|
62
|
-
iconOnly: boolean;
|
|
63
63
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
64
64
|
declare const _default: typeof __VLS_export;
|
|
65
65
|
export default _default;
|
|
@@ -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<("small" | "default" | "
|
|
26
|
+
buttonClasses: import("vue").ComputedRef<("small" | "default" | "primary" | "danger" | "success" | "warning" | "info" | "light" | "dark" | "large" | "medium" | {
|
|
27
27
|
disabled: boolean | undefined;
|
|
28
28
|
'icon-only': boolean | undefined;
|
|
29
29
|
})[]>;
|
|
@@ -75,8 +75,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
75
75
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
76
76
|
"onUpdate:indeterminate"?: ((value: boolean) => any) | undefined;
|
|
77
77
|
}>, {
|
|
78
|
-
disabled: boolean;
|
|
79
78
|
label: string;
|
|
79
|
+
disabled: boolean;
|
|
80
80
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
81
81
|
validationText: string;
|
|
82
82
|
idKey: string;
|
|
@@ -75,8 +75,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
75
75
|
onBlur?: ((event: FocusEvent) => any) | undefined;
|
|
76
76
|
"onUpdate:indeterminate"?: ((value: boolean) => any) | undefined;
|
|
77
77
|
}>, {
|
|
78
|
-
disabled: boolean;
|
|
79
78
|
label: string;
|
|
79
|
+
disabled: boolean;
|
|
80
80
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
81
81
|
validationText: string;
|
|
82
82
|
idKey: string;
|
|
@@ -223,8 +223,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
223
223
|
}) => any) | undefined;
|
|
224
224
|
}>, {
|
|
225
225
|
modelValue: any;
|
|
226
|
-
disabled: boolean;
|
|
227
226
|
label: string;
|
|
227
|
+
disabled: boolean;
|
|
228
228
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
229
229
|
validationText: string;
|
|
230
230
|
searchbox: boolean;
|
|
@@ -223,8 +223,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
223
223
|
}) => any) | undefined;
|
|
224
224
|
}>, {
|
|
225
225
|
modelValue: any;
|
|
226
|
-
disabled: boolean;
|
|
227
226
|
label: string;
|
|
227
|
+
disabled: boolean;
|
|
228
228
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
229
229
|
validationText: string;
|
|
230
230
|
searchbox: boolean;
|
|
@@ -40,10 +40,10 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
|
|
|
40
40
|
"onSearch-change"?: ((value: string) => any) | undefined;
|
|
41
41
|
}>, {
|
|
42
42
|
search: string;
|
|
43
|
-
loading: boolean;
|
|
44
43
|
selectedRows: any[];
|
|
45
44
|
bulkActions: IKDatatableAction[];
|
|
46
45
|
selectAll: boolean;
|
|
46
|
+
loading: boolean;
|
|
47
47
|
currentPage: number;
|
|
48
48
|
pageSize: number;
|
|
49
49
|
virtualScroll: boolean;
|
|
@@ -40,10 +40,10 @@ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {},
|
|
|
40
40
|
"onSearch-change"?: ((value: string) => any) | undefined;
|
|
41
41
|
}>, {
|
|
42
42
|
search: string;
|
|
43
|
-
loading: boolean;
|
|
44
43
|
selectedRows: any[];
|
|
45
44
|
bulkActions: IKDatatableAction[];
|
|
46
45
|
selectAll: boolean;
|
|
46
|
+
loading: boolean;
|
|
47
47
|
currentPage: number;
|
|
48
48
|
pageSize: number;
|
|
49
49
|
virtualScroll: boolean;
|
|
@@ -108,8 +108,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
108
108
|
}>, {
|
|
109
109
|
modelValue: string;
|
|
110
110
|
isOpen: boolean;
|
|
111
|
-
disabled: boolean;
|
|
112
111
|
label: string;
|
|
112
|
+
disabled: boolean;
|
|
113
113
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
114
114
|
validationText: string;
|
|
115
115
|
placeholder: string;
|
|
@@ -108,8 +108,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
108
108
|
}>, {
|
|
109
109
|
modelValue: string;
|
|
110
110
|
isOpen: boolean;
|
|
111
|
-
disabled: boolean;
|
|
112
111
|
label: string;
|
|
112
|
+
disabled: boolean;
|
|
113
113
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
114
114
|
validationText: string;
|
|
115
115
|
placeholder: string;
|
|
@@ -74,8 +74,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
74
74
|
"onUpdate:maxValue"?: ((value: number | undefined) => any) | undefined;
|
|
75
75
|
}>, {
|
|
76
76
|
modelValue: number[] | [number, number];
|
|
77
|
-
disabled: boolean;
|
|
78
77
|
label: string;
|
|
78
|
+
disabled: boolean;
|
|
79
79
|
step: number;
|
|
80
80
|
min: number;
|
|
81
81
|
max: number;
|
|
@@ -74,8 +74,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
74
74
|
"onUpdate:maxValue"?: ((value: number | undefined) => any) | undefined;
|
|
75
75
|
}>, {
|
|
76
76
|
modelValue: number[] | [number, number];
|
|
77
|
-
disabled: boolean;
|
|
78
77
|
label: string;
|
|
78
|
+
disabled: boolean;
|
|
79
79
|
step: number;
|
|
80
80
|
min: number;
|
|
81
81
|
max: number;
|
|
@@ -64,8 +64,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
64
64
|
"onUpdate:value"?: ((value: number | undefined) => any) | undefined;
|
|
65
65
|
}>, {
|
|
66
66
|
modelValue: number;
|
|
67
|
-
disabled: boolean;
|
|
68
67
|
label: string;
|
|
68
|
+
disabled: boolean;
|
|
69
69
|
value: number;
|
|
70
70
|
step: number;
|
|
71
71
|
min: number;
|
|
@@ -64,8 +64,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
64
64
|
"onUpdate:value"?: ((value: number | undefined) => any) | undefined;
|
|
65
65
|
}>, {
|
|
66
66
|
modelValue: number;
|
|
67
|
-
disabled: boolean;
|
|
68
67
|
label: string;
|
|
68
|
+
disabled: boolean;
|
|
69
69
|
value: number;
|
|
70
70
|
step: number;
|
|
71
71
|
min: number;
|
|
@@ -232,9 +232,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
232
232
|
"onNode-toggle"?: ((nodeId: string | number) => any) | undefined;
|
|
233
233
|
}>, {
|
|
234
234
|
modelValue: any;
|
|
235
|
+
label: string;
|
|
235
236
|
disabled: boolean;
|
|
236
237
|
loading: boolean;
|
|
237
|
-
label: string;
|
|
238
238
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
239
239
|
validationText: string;
|
|
240
240
|
idKey: string;
|
|
@@ -232,9 +232,9 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
232
232
|
"onNode-toggle"?: ((nodeId: string | number) => any) | undefined;
|
|
233
233
|
}>, {
|
|
234
234
|
modelValue: any;
|
|
235
|
+
label: string;
|
|
235
236
|
disabled: boolean;
|
|
236
237
|
loading: boolean;
|
|
237
|
-
label: string;
|
|
238
238
|
validation: "error" | "success" | "warning" | null | undefined;
|
|
239
239
|
validationText: string;
|
|
240
240
|
idKey: string;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Katlux Toolkit: Skills Index
|
|
2
|
+
|
|
3
|
+
> [!NOTE]
|
|
4
|
+
> This file is **auto-generated** by `npx @katlux/toolkit katlux-add-ref`.
|
|
5
|
+
> Do not edit manually — re-run the command to update.
|
|
6
|
+
|
|
7
|
+
## Katlux MCP Server (Recommended for AI Agents)
|
|
8
|
+
|
|
9
|
+
When the **Katlux MCP Server** (`katlux` / `@katlux/mcp`) is configured in your agent environment, **always call MCP tools first** instead of loading full `SKILL.md` reference files. MCP tools return exact, atomic schemas on demand, saving up to ~93% context tokens and preventing hallucinations.
|
|
10
|
+
|
|
11
|
+
| MCP Tool | Purpose & Usage | Token Advantage |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| `katlux_get_component` | Exact API schema (props, slots, events, examples) for any component. Supports optional `filter: "keyword"` to return only matching props/events | ~100-300 tokens vs 28k in `katlux-components` |
|
|
14
|
+
| `katlux_lookup_prop` | Ultra-compact atomic lookup for a single prop, event, or slot on a component (e.g. `component: 'KDatatable', prop: 'selectAllScope'`) | **~40 tokens** (ideal for micro-edits & single property checks) |
|
|
15
|
+
| `katlux_list_components` | Discover components filtered by category (`form`, `data`, `layout`, `navigation`, `feedback`, `charts`, `ecommerce`) or search query | ~150 tokens vs reading entire docs |
|
|
16
|
+
| `katlux_get_provider` | Data provider architecture, constructor options, caching, encryption, and recipes for `ADataProvider`, `CFlatClientDataProvider`, `CAPIFlatServerDataProvider` | ~400 tokens vs 15k in `katlux-providers` |
|
|
17
|
+
| `katlux_list_icons` | Fuzzy search available SVG icons for `KIcon` and `icon` props | ~100 tokens vs guessing icon names |
|
|
18
|
+
| `katlux_get_tokens` | CSS design tokens by category (`color`, `surface`, `border`, `typography`, `button`, `input`, `table`, `other`) | ~300 tokens vs 6k in `katlux-tokens` |
|
|
19
|
+
| `katlux_scaffold` | Boilerplate code generator for common patterns (`datatable-page`, `form-with-validation`, `tree-explorer`, `chart-dashboard`) | Clean boilerplate with zero prompt bloat |
|
|
20
|
+
| `katlux_validate_code` | Self-correction linter checking Pug/Vue code against component APIs, providers, and token rules | Catches errors before user sees them |
|
|
21
|
+
| `katlux_create_preset` | Scaffolds a new visual theme preset with directory structure and CSS token overrides | Automates theming setup |
|
|
22
|
+
|
|
23
|
+
## Available Skills (Fallback & Deep Architectural Context)
|
|
24
|
+
|
|
25
|
+
If the Katlux MCP server is unavailable in the environment, or when deep architectural narratives, end-to-end design patterns, or framework config guidelines are needed, load only the specific skill relevant to your task:
|
|
26
|
+
|
|
27
|
+
| Skill | Description | When to Use |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| [katlux-config](katlux-config/SKILL.md) | Project setup, `nuxt.config.ts`, `app.config.ts`, packages, dev workflow | Setting up the project, installing packages, monorepo commands |
|
|
30
|
+
| [katlux-components](katlux-components/SKILL.md) | All UI component APIs (props, slots, events, examples) | Fallback when MCP is inactive or reviewing all components |
|
|
31
|
+
| [katlux-providers](katlux-providers/SKILL.md) | Data management, `ADataProvider`, all provider classes, composables, caching, encryption, API protocol | Deep data flow architecture, custom provider subclassing |
|
|
32
|
+
| [katlux-presets](katlux-presets/SKILL.md) | Preset system, creating custom presets, runtime switching, KLayout slot forwarding | Advanced visual theming, layout slot cascades |
|
|
33
|
+
| [katlux-tokens](katlux-tokens/SKILL.md) | CSS custom properties and design tokens reference | Complete token tables and design variable rules |
|
|
34
|
+
|
|
35
|
+
## How to Work Efficiently
|
|
36
|
+
|
|
37
|
+
1. **MCP Tools First**: Query `katlux_get_component` or `katlux_get_provider` to verify prop types, slots, and events before writing or editing code.
|
|
38
|
+
2. **Icon & Token Lookup**: Use `katlux_list_icons` to verify icon names and `katlux_get_tokens` for theme variables instead of guessing or hardcoding styles.
|
|
39
|
+
3. **Self-Validation**: Run `katlux_validate_code` on newly generated Pug/Vue templates to self-correct issues before delivering code.
|
|
40
|
+
4. **Atomic Skills**: Component and Provider skills are divided into atomic, per-component and per-provider markdown files under `components/` and `providers/`. Read only the specific atomic spec required for your task to preserve tokens.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: katlux-components
|
|
3
|
+
description: Complete Katlux UI component API index. Links to atomic component documentation files with full props, slots, events, and usage examples. Use this index to locate components and read only the atomic specification needed.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Katlux Component Library Master Index
|
|
7
|
+
|
|
8
|
+
> **Atomic Architecture**: Each component has its own dedicated, lightweight specification file under [`components/`](components/). To minimize token consumption and avoid context bloat, read **only** the atomic component spec file required for your task.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. Layout & Structure
|
|
13
|
+
|
|
14
|
+
| Component | Description | Key Features | Spec Link |
|
|
15
|
+
| :--- | :--- | :--- | :--- |
|
|
16
|
+
| `KLayout` | Root responsive application shell | Dynamic header, sidebar, footer, brand bar, and page slots | [KLayout.md](components/KLayout.md) |
|
|
17
|
+
| `KGrid` | Flexbox/CSS grid layout container | Responsive columns, alignment, gaps, wrapping | [KGrid.md](components/KGrid.md) |
|
|
18
|
+
| `KPanel` | Bordered card/surface container | Header, body, footer, collapsibility, elevation | [KPanel.md](components/KPanel.md) |
|
|
19
|
+
| `KAccordion` | Collapsible accordion sections | Single or multi-expand modes, animated transitions | [KAccordion.md](components/KAccordion.md) |
|
|
20
|
+
| `KTabs` / `KTabItem` | WAI-ARIA tab navigation bar | Keyboard navigation, active indicator, customizable tab headers | [KTabs.md](components/KTabs.md) |
|
|
21
|
+
| `MultiTabs` | Multi-pane split screen workspace | Dynamic vertical panes, tab grouping, pane closure | [MultiTabs.md](components/MultiTabs.md) |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. Form & Input Components
|
|
26
|
+
|
|
27
|
+
| Component | Description | Key Features | Spec Link |
|
|
28
|
+
| :--- | :--- | :--- | :--- |
|
|
29
|
+
| `KButton` | Interactive action button | Variants (`primary`, `secondary`, `danger`), loading spinner, icon slot | [KButton.md](components/KButton.md) |
|
|
30
|
+
| `KTextbox` / `KTextarea` | Text and multiline input fields | Two-way binding, clear button, icon prefixes/suffixes, validation states | [KTextbox.md](components/KTextbox.md) |
|
|
31
|
+
| `KCheckbox` / `KRadiobox` | Boolean and radio selection controls | Indeterminate state, custom labels, group binding | [KCheckbox.md](components/KCheckbox.md) |
|
|
32
|
+
| `KSlider` | Numeric range and value sliders | Single and dual-handle range mode, step increments | [KSlider.md](components/KSlider.md) |
|
|
33
|
+
| `KMaskTextbox` | Formatted input with character masks | Phone numbers, credit cards, dates, custom regex masks | [KMaskTextbox.md](components/KMaskTextbox.md) |
|
|
34
|
+
| `KCombobox` | Searchable autocomplete select | Virtual scrolling for 10k items, single/multi-select, tags | [KCombobox.md](components/KCombobox.md) |
|
|
35
|
+
| `KCompositeInput` | Coupled dropdown + text input | Currency + amount, country code + phone, unit + quantity | [KCompositeInput.md](components/KCompositeInput.md) |
|
|
36
|
+
| `KDropdown` | Floating action menu | Trigger element, item list, icons, keyboard navigation | [KDropdown.md](components/KDropdown.md) |
|
|
37
|
+
| `KDatePicker` | Interactive calendar picker | Single date, date-time, marked/defined days | [KDatePicker.md](components/KDatePicker.md) |
|
|
38
|
+
| `KHourSelect` | Time and hour selection dropdown | 12/24-hour formats, minute intervals | [KHourSelect.md](components/KHourSelect.md) |
|
|
39
|
+
|
|
40
|
+
### Validation & Customization References
|
|
41
|
+
- [Form Validation Architecture](components/form-validation.md): Universal validation props, semantic error states (`--danger-500`), and rules.
|
|
42
|
+
- [Calendar Customization](components/calendar-customization.md): `markedDays` and `definedDays` architecture for `KCalendar` and `KDatePicker`.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 3. Data Display & Tables
|
|
47
|
+
|
|
48
|
+
| Component | Description | Key Features | Spec Link |
|
|
49
|
+
| :--- | :--- | :--- | :--- |
|
|
50
|
+
| `KDatatable` | Enterprise data table | Headless DataProvider binding, multi-page selection, virtual scroll, sorting, filtering, bulk actions | [KDatatable.md](components/KDatatable.md) |
|
|
51
|
+
| `KCalendar` | Full-month calendar view | Marked dates, defined range restrictions, cell slots, day click events | [KCalendar.md](components/KCalendar.md) |
|
|
52
|
+
| `KGantt` | Project schedule / Gantt chart | Timeline bars, virtual scrolling, dependency rendering, zoom levels | [KGantt.md](components/KGantt.md) |
|
|
53
|
+
| `KPagination` | Standalone pagination controller | Two-way sync with DataProviders, page jump, size selector | [KPagination.md](components/KPagination.md) |
|
|
54
|
+
| `KDataIterator` | Headless data repeater / card grid | Slot-based item rendering with DataProvider pagination/sorting | [KDataIterator.md](components/KDataIterator.md) |
|
|
55
|
+
| `KTreeView` | Hierarchical tree navigation | Recursive node display, selection, expand/collapse | [KTreeView.md](components/KTreeView.md) |
|
|
56
|
+
| `KTree` | High-performance enterprise tree | Deep virtualization (50k nodes), multi-select, drag-drop | [KTree.md](components/KTree.md) |
|
|
57
|
+
| `KTreePicker` | Dropdown tree picker | Hierarchical category selection in input popover | [KTreePicker.md](components/KTreePicker.md) |
|
|
58
|
+
| `KContextMenu` | Right-click contextual menu | Mouse position tracking, keyboard dismiss, submenus | [KContextMenu.md](components/KContextMenu.md) |
|
|
59
|
+
|
|
60
|
+
### Display Customization Guides
|
|
61
|
+
- [Datatable Cell Customization](components/datatable-customization.md): Scoped cell slots (`#cell-[field]`), header slots, row actions.
|
|
62
|
+
- [Tree Item Customization](components/tree-customization.md): Custom node renderers and expansion toggles.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 4. Feedback, Overlays & Utilities
|
|
67
|
+
|
|
68
|
+
| Component | Description | Key Features | Spec Link |
|
|
69
|
+
| :--- | :--- | :--- | :--- |
|
|
70
|
+
| `KModal` | Centered dialog overlay | Two-way `v-model` visibility, header/footer slots, backdrop dismissal | [KModal.md](components/KModal.md) |
|
|
71
|
+
| `KLoader` | Loading spinners & progress | Configurable size, preset color tokens | [KLoader.md](components/KLoader.md) |
|
|
72
|
+
| `KTooltip` | Hover/focus floating tooltip | Placement options, arrow pointer, delay | [KTooltip.md](components/KTooltip.md) |
|
|
73
|
+
| `KAlert` | Inline notification banner | Severity types (`info`, `success`, `warning`, `danger`), dismissible | [KAlert.md](components/KAlert.md) |
|
|
74
|
+
| `KToast` / `useToast()` | Global toast notification queue | Auto-dismiss TTL, programmatic trigger, queue management | [KToast.md](components/KToast.md) / [useToast.md](components/useToast.md) |
|
|
75
|
+
| `KIcon` | Inline SVG icon renderer | Preset SVG catalog lookup by name, size/color tokens | [KIcon.md](components/KIcon.md) |
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## 5. E-Commerce & Action Blocks
|
|
80
|
+
|
|
81
|
+
| Component | Description | Key Features | Spec Link |
|
|
82
|
+
| :--- | :--- | :--- | :--- |
|
|
83
|
+
| `KBulkActions` | Batch operation floating toolbar | Selection count, action buttons, dropdown actions, responsive mobile sheet | [KBulkActions.md](components/KBulkActions.md) |
|
|
84
|
+
| `KProductList` | Product catalog grid / list | Cart additions, pricing formatters, responsive layout | [KProductList.md](components/KProductList.md) |
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 6. Visual Chart Blocks
|
|
89
|
+
|
|
90
|
+
| Component | Description | Key Features | Spec Link |
|
|
91
|
+
| :--- | :--- | :--- | :--- |
|
|
92
|
+
| `KLineChart` | SVG line & curve chart | Multi-series, tooltips, responsive SVG viewBox | [KLineChart.md](components/KLineChart.md) |
|
|
93
|
+
| `KAreaChart` | Gradient filled area chart | Stacked or overlay area fills, interactive hover | [KAreaChart.md](components/KAreaChart.md) |
|
|
94
|
+
| `KBarChart` | Column / bar chart | Vertical/horizontal bars, grouped series | [KBarChart.md](components/KBarChart.md) |
|
|
95
|
+
| `KPieChart` | Donut / pie chart | Segment percentages, legend, center text | [KPieChart.md](components/KPieChart.md) |
|
|
96
|
+
| `KScatterChart` | 2D coordinate plot | Point clusters, custom coordinate scaling | [KScatterChart.md](components/KScatterChart.md) |
|
|
97
|
+
| `KHeatMap` | Activity & matrix heatmap | Color intensity scaling, day-of-week matrices | [KHeatMap.md](components/KHeatMap.md) |
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## 7. Directives & Semantic Classes
|
|
102
|
+
|
|
103
|
+
| Topic | Description | Link |
|
|
104
|
+
| :--- | :--- | :--- |
|
|
105
|
+
| `v-click-outside` | Vue directive to detect clicks outside an element | [directives.md](components/directives.md) |
|
|
106
|
+
| Validation Classes | Semantic form classes (`.is-invalid`, `.is-valid`, error text) | [validation-directives.md](components/validation-directives.md) |
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
### `KAccordion` / `KAccordionItem`
|
|
2
|
+
- **Purpose**: Collapsible content sections with two-way data binding (`v-model`) support.
|
|
3
|
+
- **KAccordion Props**:
|
|
4
|
+
| Prop | Type | Default | Description |
|
|
5
|
+
| --- | --- | --- | --- |
|
|
6
|
+
| `v-model` / `modelValue` | `string \| string[] \| number \| number[]` | `undefined` | ID or array of IDs of active open panel(s) with two-way binding |
|
|
7
|
+
| `multiOpen` | `boolean` | `false` | Allow multiple items open simultaneously |
|
|
8
|
+
- **KAccordion Events**:
|
|
9
|
+
| Event | Payload | Description |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| `@update:modelValue` | `(value: string \| string[] \| number \| number[])` | Emitted when open panel ID(s) change |
|
|
12
|
+
| `@change` | `(value: string \| string[] \| number \| number[])` | Emitted when open panel ID(s) change |
|
|
13
|
+
- **KAccordionItem Props**:
|
|
14
|
+
| Prop | Type | Default | Description |
|
|
15
|
+
| --- | --- | --- | --- |
|
|
16
|
+
| `id` | `string \| number` | auto index | Identifier matching `v-model` |
|
|
17
|
+
| `title` | `string` | **Required** | Header text |
|
|
18
|
+
| `isOpen` | `boolean` | `false` | Initial expansion state (uncontrolled mode) |
|
|
19
|
+
- **Slots**: `default` (Content inside the item).
|
|
20
|
+
- **Example Usage (Pug)**:
|
|
21
|
+
```pug
|
|
22
|
+
KAccordion(v-model="activeSection")
|
|
23
|
+
KAccordionItem(id="general" title="General Settings")
|
|
24
|
+
p Settings content
|
|
25
|
+
KAccordionItem(id="security" title="Security")
|
|
26
|
+
p Security content
|
|
27
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
### `KAlert`
|
|
2
|
+
- **Purpose**: Informational and feedback banner component supporting 4 semantic states, two-way visibility binding (`v-model`), and dismissible controls.
|
|
3
|
+
- **Props**:
|
|
4
|
+
| Prop | Type | Default | Description |
|
|
5
|
+
| --- | --- | --- | --- |
|
|
6
|
+
| `v-model` / `modelValue` | `boolean` | `true` | Controls alert visibility with two-way data binding |
|
|
7
|
+
| `type` | `'info' \| 'success' \| 'warning' \| 'danger'` | `'info'` | Semantic color variant and default icon |
|
|
8
|
+
| `title` | `string` | `undefined` | Optional title header |
|
|
9
|
+
| `dismissible` | `boolean` | `false` | When true, renders a dismiss button |
|
|
10
|
+
| `icon` | `string` | `undefined` | Custom icon name overriding default type icon |
|
|
11
|
+
| `hideIcon` | `boolean` | `false` | When true, suppresses leading icon |
|
|
12
|
+
- **Events**:
|
|
13
|
+
| Event | Payload | Description |
|
|
14
|
+
| --- | --- | --- |
|
|
15
|
+
| `@update:modelValue` | `(value: boolean)` | Emitted when alert visibility changes (e.g. dismissed) |
|
|
16
|
+
| `@dismiss` | `()` | Emitted after the dismiss button is clicked |
|
|
17
|
+
- **Slots**: `default` (alert body content).
|
|
18
|
+
- **Example**:
|
|
19
|
+
```pug
|
|
20
|
+
KAlert(v-model="showAlert" type="warning" title="Warning" :dismissible="true" @dismiss="onAlertDismiss")
|
|
21
|
+
span Your session is about to expire.
|
|
22
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
### `KAreaChart`
|
|
2
|
+
- **Purpose**: Area chart component displaying volume/trends beneath lines with support for stacked and unstacked modes.
|
|
3
|
+
- **Props**:
|
|
4
|
+
| Prop | Type | Default | Description |
|
|
5
|
+
| --- | --- | --- | --- |
|
|
6
|
+
| `dataProvider` | `ADataProvider \| any[]` | `undefined` | Data provider or raw data array |
|
|
7
|
+
| `xField` | `string` | `'x'` | Key for horizontal X-axis values |
|
|
8
|
+
| `yField` | `string` | `'y'` | Key for vertical Y-axis values |
|
|
9
|
+
| `seriesField` | `string` | `undefined` | Key for multi-series grouping |
|
|
10
|
+
| `stacked` | `boolean` | `false` | When true, stacks series areas cumulatively |
|
|
11
|
+
| `animated` | `boolean` | `true` | Enables path entrance animations |
|
|
12
|
+
| `zoomable` | `boolean` | `true` | Enables interactive zooming |
|
|
13
|
+
| `wheelNavigation` | `boolean` | `true` | Enables mouse-wheel zoom & pan |
|
|
14
|
+
| `maxZoom` | `number` | `10` | Maximum zoom magnification factor |
|
|
15
|
+
| `colors` | `string[]` | `undefined` | Color palette array |
|
|
16
|
+
| `backgroundColor` | `string` | `undefined` | Canvas background |
|
|
17
|
+
| `showLegend` | `boolean` | `true` | Displays legend |
|
|
18
|
+
| `xAxisTitle` | `string` | `undefined` | Label displayed on X axis |
|
|
19
|
+
| `yAxisTitle` | `string` | `undefined` | Label displayed on Y axis |
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
### `KBarChart`
|
|
2
|
+
- **Purpose**: Versatile bar chart supporting simple, clustered, stacked, vertical, and horizontal orientations.
|
|
3
|
+
- **Props**:
|
|
4
|
+
| Prop | Type | Default | Description |
|
|
5
|
+
| --- | --- | --- | --- |
|
|
6
|
+
| `dataProvider` | `ADataProvider \| any[]` | `undefined` | Data source |
|
|
7
|
+
| `categoryField` | `string` | `'category'` | Key for categorical axis labels |
|
|
8
|
+
| `valueField` | `string` | `'value'` | Key for numeric bar lengths |
|
|
9
|
+
| `groupField` | `string` | `undefined` | Key for clustering or stacking subgroups |
|
|
10
|
+
| `orientation` | `'vertical' \| 'horizontal'` | `'vertical'` | Bar orientation direction |
|
|
11
|
+
| `mode` | `'simple' \| 'clustered' \| 'stacked'` | `'simple'` | Grouping display mode |
|
|
12
|
+
| `animated` | `boolean` | `true` | Bar height growth animation |
|
|
13
|
+
| `zoomable` | `boolean` | `true` | Interactive zoom support |
|
|
14
|
+
| `wheelNavigation` | `boolean` | `true` | Wheel zoom/pan support |
|
|
15
|
+
| `maxZoom` | `number` | `10` | Max zoom factor |
|
|
16
|
+
| `colors` | `string[]` | `undefined` | Color palette array |
|
|
17
|
+
| `backgroundColor` | `string` | `undefined` | Canvas background |
|
|
18
|
+
| `showLegend` | `boolean` | `true` | Displays legend |
|
|
19
|
+
| `xAxisTitle` | `string` | `undefined` | Label on X axis |
|
|
20
|
+
| `yAxisTitle` | `string` | `undefined` | Label on Y axis |
|