@katlux/toolkit 0.1.0-alpha.85 → 0.1.0-alpha.86
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 -0
- package/dist/module.json +1 -1
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.d.vue.ts +1 -1
- package/dist/runtime/components/KCompositeInput/KCompositeInput.global.vue.d.ts +1 -1
- package/dist/runtime/components/KTooltip/KTooltip.global.d.vue.ts +1 -1
- package/dist/runtime/components/KTooltip/KTooltip.global.vue.d.ts +1 -1
- package/package.json +6 -2
|
@@ -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()
|
package/dist/module.json
CHANGED
|
@@ -198,11 +198,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
198
198
|
placeholder: string;
|
|
199
199
|
teleportTo: string;
|
|
200
200
|
valueField: string;
|
|
201
|
-
mask: string;
|
|
202
201
|
inputType: "number" | "text" | "url" | "search" | "password" | "email" | "tel" | undefined;
|
|
203
202
|
selectionValue: string | number | Record<string, any> | unknown[];
|
|
204
203
|
inputValue: string | number | Record<string, any> | unknown[];
|
|
205
204
|
selectionSide: import("./KCompositeInput.logic.js").SelectionSide;
|
|
205
|
+
mask: string;
|
|
206
206
|
inputPlaceholder: string;
|
|
207
207
|
showClear: boolean;
|
|
208
208
|
inputConfigField: string;
|
|
@@ -198,11 +198,11 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
198
198
|
placeholder: string;
|
|
199
199
|
teleportTo: string;
|
|
200
200
|
valueField: string;
|
|
201
|
-
mask: string;
|
|
202
201
|
inputType: "number" | "text" | "url" | "search" | "password" | "email" | "tel" | undefined;
|
|
203
202
|
selectionValue: string | number | Record<string, any> | unknown[];
|
|
204
203
|
inputValue: string | number | Record<string, any> | unknown[];
|
|
205
204
|
selectionSide: import("./KCompositeInput.logic.js").SelectionSide;
|
|
205
|
+
mask: string;
|
|
206
206
|
inputPlaceholder: string;
|
|
207
207
|
showClear: boolean;
|
|
208
208
|
inputConfigField: string;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
27
27
|
}>> & Readonly<{}>, {
|
|
28
28
|
text: string;
|
|
29
29
|
disabled: boolean;
|
|
30
|
-
position: "
|
|
30
|
+
position: "left" | "right" | "top" | "bottom";
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
32
32
|
declare const _default: typeof __VLS_export;
|
|
33
33
|
export default _default;
|
|
@@ -27,7 +27,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
27
27
|
}>> & Readonly<{}>, {
|
|
28
28
|
text: string;
|
|
29
29
|
disabled: boolean;
|
|
30
|
-
position: "
|
|
30
|
+
position: "left" | "right" | "top" | "bottom";
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
32
32
|
declare const _default: typeof __VLS_export;
|
|
33
33
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@katlux/toolkit",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.86",
|
|
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
|
}
|