@katlux/toolkit 0.1.1-alpha.130 → 0.1.1-alpha.132

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.
Files changed (40) hide show
  1. package/bin/add-ai-reference.mjs +51 -45
  2. package/dist/compiled/composables/locales.mjs +48 -24
  3. package/dist/module.cjs +122 -0
  4. package/dist/module.d.cts +6 -1
  5. package/dist/module.d.mts +6 -1
  6. package/dist/module.json +1 -1
  7. package/dist/module.mjs +123 -1
  8. package/dist/runtime/components/KButton/KButton.global.d.vue.ts +1 -1
  9. package/dist/runtime/components/KButton/KButton.global.vue.d.ts +1 -1
  10. package/dist/runtime/components/KButton/KButton.logic.d.ts +1 -1
  11. package/dist/runtime/components/KGantt/KGantt.global.d.vue.ts +8 -0
  12. package/dist/runtime/components/KGantt/KGantt.global.vue +15 -1
  13. package/dist/runtime/components/KGantt/KGantt.global.vue.d.ts +8 -0
  14. package/dist/runtime/components/{MultiTabs/MultiTabs.global.d.vue.ts → KMultiTabs/KMultiTabs.global.d.vue.ts} +5 -5
  15. package/dist/runtime/components/{MultiTabs/MultiTabs.global.vue → KMultiTabs/KMultiTabs.global.vue} +5 -5
  16. package/dist/runtime/components/{MultiTabs/MultiTabs.global.vue.d.ts → KMultiTabs/KMultiTabs.global.vue.d.ts} +5 -5
  17. package/dist/runtime/components/KMultiTabs/KMultiTabs.logic.d.ts +34 -0
  18. package/dist/runtime/components/{MultiTabs/MultiTabs.logic.js → KMultiTabs/KMultiTabs.logic.js} +4 -2
  19. package/dist/runtime/components/KTooltip/KTooltip.global.d.vue.ts +1 -1
  20. package/dist/runtime/components/KTooltip/KTooltip.global.vue.d.ts +1 -1
  21. package/dist/runtime/composables/locales.js +48 -24
  22. package/dist/runtime/presets/default/components/KDatatable/KDatatable.vue +0 -4
  23. package/dist/runtime/presets/default/components/KGantt/KGantt.d.vue.ts +20 -0
  24. package/dist/runtime/presets/default/components/KGantt/KGantt.vue +39 -4
  25. package/dist/runtime/presets/default/components/KGantt/KGantt.vue.d.ts +20 -0
  26. package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.d.vue.ts +60 -0
  27. package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue +26 -3
  28. package/dist/runtime/presets/default/components/KGantt/KGanttTimeline.vue.d.ts +60 -0
  29. package/dist/runtime/presets/default/components/{MultiTabs/MultiTabs.d.vue.ts → KMultiTabs/KMultiTabs.d.vue.ts} +3 -2
  30. package/dist/runtime/presets/default/components/{MultiTabs/MultiTabs.vue → KMultiTabs/KMultiTabs.vue} +19 -14
  31. package/dist/runtime/presets/default/components/{MultiTabs/MultiTabs.vue.d.ts → KMultiTabs/KMultiTabs.vue.d.ts} +3 -2
  32. package/dist/skills/KATLUX_INDEX.md +1 -0
  33. package/dist/skills/katlux-components/SKILL.md +1 -1
  34. package/dist/skills/katlux-components/components/KGantt.md +59 -0
  35. package/dist/skills/katlux-components/components/KMultiTabs.md +20 -0
  36. package/dist/skills/katlux-config/SKILL.md +7 -7
  37. package/dist/types.d.mts +2 -6
  38. package/package.json +3 -3
  39. package/dist/runtime/components/MultiTabs/MultiTabs.logic.d.ts +0 -25
  40. package/dist/skills/katlux-components/components/MultiTabs.md +0 -20
@@ -53,7 +53,7 @@ function copyDirRecursive(src, dest) {
53
53
  const destPath = join(dest, entry.name)
54
54
  if (entry.isDirectory()) {
55
55
  count += copyDirRecursive(srcPath, destPath)
56
- } else if (entry.name.endsWith('.md') && entry.name !== 'KATLUX_AI_REFERENCE.md') {
56
+ } else if (entry.name.endsWith('.md')) {
57
57
  writeFileSync(destPath, readFileSync(srcPath, 'utf-8'), 'utf-8')
58
58
  count++
59
59
  }
@@ -78,59 +78,65 @@ if (!existsSync(rulesDir)) mkdirSync(rulesDir, { recursive: true })
78
78
  let installedFilesCount = 0
79
79
  let bundleInstalled = false
80
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}`)
83
- try {
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++
81
+ // Check if user explicitly asked for remote fetch
82
+ const forceRemote = process.argv.includes('--remote') || process.env.KATLUX_FORCE_REMOTE === 'true'
83
+
84
+ // ── 1. Priority: Local packaged skills (strictly version-matched to installed @katlux/toolkit, offline, instant) ──
85
+ if (hasPackagedSkills && !forceRemote) {
86
+ process.stdout.write(` ${DIM}Installing version-matched skills from @katlux/toolkit package...${RESET}`)
87
+ installedFilesCount = copyDirRecursive(packagedSkillsDir, skillsDir)
88
+ process.stdout.write(` ${GREEN}✔ (${installedFilesCount} files)${RESET}\n`)
89
+ bundleInstalled = true
90
+ }
91
+
92
+ // ── 2. Fallback / Forced Remote: Fetch remote skills bundle from showcase ──
93
+ if (!bundleInstalled) {
94
+ process.stdout.write(` ${DIM}Fetching skills bundle from ${BASE_URL}/bundle...${RESET}`)
95
+ try {
96
+ const res = await fetch(`${BASE_URL}/bundle`)
97
+ if (res.ok) {
98
+ const bundle = await res.json()
99
+ if (bundle.files && typeof bundle.files === 'object') {
100
+ for (const [relPath, content] of Object.entries(bundle.files)) {
101
+ const destPath = join(skillsDir, relPath)
102
+ const fileDir = dirname(destPath)
103
+ if (!existsSync(fileDir)) mkdirSync(fileDir, { recursive: true })
104
+ writeFileSync(destPath, content, 'utf-8')
105
+ installedFilesCount++
106
+ }
107
+ process.stdout.write(` ${GREEN}✔ (${installedFilesCount} files)${RESET}\n`)
108
+ bundleInstalled = true
94
109
  }
95
- process.stdout.write(` ${GREEN}✔ (${installedFilesCount} files)${RESET}\n`)
96
- bundleInstalled = true
110
+ } else {
111
+ process.stdout.write(` ${YELLOW}HTTP ${res.status}${RESET}\n`)
97
112
  }
98
- } else {
99
- process.stdout.write(` ${YELLOW}HTTP ${res.status}${RESET}\n`)
113
+ } catch {
114
+ process.stdout.write(` ${YELLOW}remote unavailable${RESET}\n`)
100
115
  }
101
- } catch {
102
- process.stdout.write(` ${YELLOW}remote unavailable${RESET}\n`)
103
116
  }
104
117
 
105
- // ── 2. Fallback: Local packaged skills (works 100% offline or when remote bundle is unreachable) ──
118
+ // ── 3. Fallback: Legacy individual HTTP fetch ────────────────────────────
106
119
  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}...`)
120
+ log(YELLOW, ' fallback', `Fetching individual skills from ${BASE_URL}...`)
121
+ try {
122
+ const indexContent = await fetchText(BASE_URL).catch(() => fetchText(`${BASE_URL}/index`))
123
+ writeFileSync(join(skillsDir, 'KATLUX_INDEX.md'), indexContent, 'utf-8')
124
+ installedFilesCount++
125
+ } catch (err) {
126
+ log(RED, '[katlux-add-ref] ✖', `Failed to fetch index: ${err.message}`)
127
+ process.exit(1)
128
+ }
129
+
130
+ const SKILLS = ['katlux-config', 'katlux-components', 'katlux-providers', 'katlux-presets', 'katlux-tokens']
131
+ for (const skill of SKILLS) {
114
132
  try {
115
- const indexContent = await fetchText(BASE_URL).catch(() => fetchText(`${BASE_URL}/index`))
116
- writeFileSync(join(skillsDir, 'KATLUX_INDEX.md'), indexContent, 'utf-8')
133
+ const content = await fetchText(`${BASE_URL}/${skill}`)
134
+ const skillDir = join(skillsDir, skill)
135
+ if (!existsSync(skillDir)) mkdirSync(skillDir, { recursive: true })
136
+ writeFileSync(join(skillDir, 'SKILL.md'), content, 'utf-8')
117
137
  installedFilesCount++
118
138
  } catch (err) {
119
- log(RED, '[katlux-add-ref] ✖', `Failed to fetch index: ${err.message}`)
120
- process.exit(1)
121
- }
122
-
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
- }
139
+ log(RED, '[katlux-add-ref] ✖', `Failed to fetch ${skill}: ${err.message}`)
134
140
  }
135
141
  }
136
142
  }
@@ -25,7 +25,8 @@ export const en = {
25
25
  "Alert": "Alert",
26
26
  "Today": "Today",
27
27
  "Clear": "Clear",
28
- "No data found": "No data found"
28
+ "No data found": "No data found",
29
+ "No tabs open": "No tabs open"
29
30
  };
30
31
  export const es = {
31
32
  "Dismiss": "Descartar",
@@ -54,7 +55,8 @@ export const es = {
54
55
  "Alert": "Alerta",
55
56
  "Today": "Hoy",
56
57
  "Clear": "Limpiar",
57
- "No data found": "No se encontraron datos"
58
+ "No data found": "No se encontraron datos",
59
+ "No tabs open": "No hay pesta\xF1as abiertas"
58
60
  };
59
61
  export const fr = {
60
62
  "Dismiss": "Fermer",
@@ -83,7 +85,8 @@ export const fr = {
83
85
  "Alert": "Alerte",
84
86
  "Today": "Aujourd'hui",
85
87
  "Clear": "Effacer",
86
- "No data found": "Aucune donn\xE9e trouv\xE9e"
88
+ "No data found": "Aucune donn\xE9e trouv\xE9e",
89
+ "No tabs open": "Aucun onglet ouvert"
87
90
  };
88
91
  export const de = {
89
92
  "Dismiss": "Schlie\xDFen",
@@ -112,7 +115,8 @@ export const de = {
112
115
  "Alert": "Warnung",
113
116
  "Today": "Heute",
114
117
  "Clear": "L\xF6schen",
115
- "No data found": "Keine Daten gefunden"
118
+ "No data found": "Keine Daten gefunden",
119
+ "No tabs open": "Keine Tabs ge\xF6ffnet"
116
120
  };
117
121
  export const pt = {
118
122
  "Dismiss": "Dispensar",
@@ -141,7 +145,8 @@ export const pt = {
141
145
  "Alert": "Alerta",
142
146
  "Today": "Hoje",
143
147
  "Clear": "Limpar",
144
- "No data found": "Nenhum dado encontrado"
148
+ "No data found": "Nenhum dado encontrado",
149
+ "No tabs open": "Nenhuma aba aberta"
145
150
  };
146
151
  export const it = {
147
152
  "Dismiss": "Chiudi",
@@ -170,7 +175,8 @@ export const it = {
170
175
  "Alert": "Avviso",
171
176
  "Today": "Oggi",
172
177
  "Clear": "Cancella",
173
- "No data found": "Nessun dato trovato"
178
+ "No data found": "Nessun dato trovato",
179
+ "No tabs open": "Nessuna scheda aperta"
174
180
  };
175
181
  export const nl = {
176
182
  "Dismiss": "Sluiten",
@@ -199,7 +205,8 @@ export const nl = {
199
205
  "Alert": "Waarschuwing",
200
206
  "Today": "Vandaag",
201
207
  "Clear": "Wissen",
202
- "No data found": "Geen gegevens gevonden"
208
+ "No data found": "Geen gegevens gevonden",
209
+ "No tabs open": "Geen tabbladen geopend"
203
210
  };
204
211
  export const pl = {
205
212
  "Dismiss": "Zamknij",
@@ -228,7 +235,8 @@ export const pl = {
228
235
  "Alert": "Ostrze\u017Cenie",
229
236
  "Today": "Dzisiaj",
230
237
  "Clear": "Wyczy\u015B\u0107",
231
- "No data found": "Nie znaleziono danych"
238
+ "No data found": "Nie znaleziono danych",
239
+ "No tabs open": "Brak otwartych kart"
232
240
  };
233
241
  export const ru = {
234
242
  "Dismiss": "\u0417\u0430\u043A\u0440\u044B\u0442\u044C",
@@ -257,7 +265,8 @@ export const ru = {
257
265
  "Alert": "\u041F\u0440\u0435\u0434\u0443\u043F\u0440\u0435\u0436\u0434\u0435\u043D\u0438\u0435",
258
266
  "Today": "\u0421\u0435\u0433\u043E\u0434\u043D\u044F",
259
267
  "Clear": "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u044C",
260
- "No data found": "\u0414\u0430\u043D\u043D\u044B\u0435 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B"
268
+ "No data found": "\u0414\u0430\u043D\u043D\u044B\u0435 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u044B",
269
+ "No tabs open": "\u041D\u0435\u0442 \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0445 \u0432\u043A\u043B\u0430\u0434\u043E\u043A"
261
270
  };
262
271
  export const uk = {
263
272
  "Dismiss": "\u0417\u0430\u043A\u0440\u0438\u0442\u0438",
@@ -286,7 +295,8 @@ export const uk = {
286
295
  "Alert": "\u041F\u043E\u043F\u0435\u0440\u0435\u0434\u0436\u0435\u043D\u043D\u044F",
287
296
  "Today": "\u0421\u044C\u043E\u0433\u043E\u0434\u043D\u0456",
288
297
  "Clear": "\u041E\u0447\u0438\u0441\u0442\u0438\u0442\u0438",
289
- "No data found": "\u0414\u0430\u043D\u0456 \u043D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E"
298
+ "No data found": "\u0414\u0430\u043D\u0456 \u043D\u0435 \u0437\u043D\u0430\u0439\u0434\u0435\u043D\u043E",
299
+ "No tabs open": "\u041D\u0435\u043C\u0430\u0454 \u0432\u0456\u0434\u043A\u0440\u0438\u0442\u0438\u0445 \u0432\u043A\u043B\u0430\u0434\u043E\u043A"
290
300
  };
291
301
  export const zh = {
292
302
  "Dismiss": "\u5173\u95ED",
@@ -315,7 +325,8 @@ export const zh = {
315
325
  "Alert": "\u8B66\u544A",
316
326
  "Today": "\u4ECA\u5929",
317
327
  "Clear": "\u6E05\u9664",
318
- "No data found": "\u672A\u627E\u5230\u6570\u636E"
328
+ "No data found": "\u672A\u627E\u5230\u6570\u636E",
329
+ "No tabs open": "\u6CA1\u6709\u6253\u5F00\u7684\u6807\u7B7E\u9875"
319
330
  };
320
331
  export const ja = {
321
332
  "Dismiss": "\u9589\u3058\u308B",
@@ -344,7 +355,8 @@ export const ja = {
344
355
  "Alert": "\u8B66\u544A",
345
356
  "Today": "\u4ECA\u65E5",
346
357
  "Clear": "\u30AF\u30EA\u30A2",
347
- "No data found": "\u30C7\u30FC\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093"
358
+ "No data found": "\u30C7\u30FC\u30BF\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093",
359
+ "No tabs open": "\u958B\u3044\u3066\u3044\u308B\u30BF\u30D6\u306F\u3042\u308A\u307E\u305B\u3093"
348
360
  };
349
361
  export const ko = {
350
362
  "Dismiss": "\uB2EB\uAE30",
@@ -373,7 +385,8 @@ export const ko = {
373
385
  "Alert": "\uC54C\uB9BC",
374
386
  "Today": "\uC624\uB298",
375
387
  "Clear": "\uC9C0\uC6B0\uAE30",
376
- "No data found": "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4"
388
+ "No data found": "\uB370\uC774\uD130\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4",
389
+ "No tabs open": "\uC5F4\uB9B0 \uD0ED\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"
377
390
  };
378
391
  export const hi = {
379
392
  "Dismiss": "\u0916\u093E\u0930\u093F\u091C \u0915\u0930\u0947\u0902",
@@ -402,7 +415,8 @@ export const hi = {
402
415
  "Alert": "\u091A\u0947\u0924\u093E\u0935\u0928\u0940",
403
416
  "Today": "\u0906\u091C",
404
417
  "Clear": "\u0938\u093E\u092B\u093C \u0915\u0930\u0947\u0902",
405
- "No data found": "\u0915\u094B\u0908 \u0921\u0947\u091F\u093E \u0928\u0939\u0940\u0902 \u092E\u093F\u0932\u093E"
418
+ "No data found": "\u0915\u094B\u0908 \u0921\u0947\u091F\u093E \u0928\u0939\u0940\u0902 \u092E\u093F\u0932\u093E",
419
+ "No tabs open": "\u0915\u094B\u0908 \u091F\u0948\u092C \u0916\u0941\u0932\u093E \u0928\u0939\u0940\u0902 \u0939\u0948"
406
420
  };
407
421
  export const bn = {
408
422
  "Dismiss": "\u09AC\u09BE\u09A4\u09BF\u09B2 \u0995\u09B0\u09C1\u09A8",
@@ -431,7 +445,8 @@ export const bn = {
431
445
  "Alert": "\u09B8\u09A4\u09B0\u09CD\u0995\u09A4\u09BE",
432
446
  "Today": "\u0986\u099C",
433
447
  "Clear": "\u09AE\u09C1\u099B\u09C1\u09A8",
434
- "No data found": "\u0995\u09CB\u09A8 \u09A4\u09A5\u09CD\u09AF \u09AA\u09BE\u0993\u09AF\u09BC\u09BE \u09AF\u09BE\u09AF\u09BC\u09A8\u09BF"
448
+ "No data found": "\u0995\u09CB\u09A8 \u09A4\u09A5\u09CD\u09AF \u09AA\u09BE\u0993\u09AF\u09BC\u09BE \u09AF\u09BE\u09AF\u09BC\u09A8\u09BF",
449
+ "No tabs open": "\u0995\u09CB\u09A8\u09CB \u099F\u09CD\u09AF\u09BE\u09AC \u0996\u09CB\u09B2\u09BE \u09A8\u09C7\u0987"
435
450
  };
436
451
  export const id = {
437
452
  "Dismiss": "Tutup",
@@ -460,7 +475,8 @@ export const id = {
460
475
  "Alert": "Peringatan",
461
476
  "Today": "Hari ini",
462
477
  "Clear": "Hapus",
463
- "No data found": "Data tidak ditemukan"
478
+ "No data found": "Data tidak ditemukan",
479
+ "No tabs open": "Tidak ada tab terbuka"
464
480
  };
465
481
  export const vi = {
466
482
  "Dismiss": "B\u1ECF qua",
@@ -489,7 +505,8 @@ export const vi = {
489
505
  "Alert": "C\u1EA3nh b\xE1o",
490
506
  "Today": "H\xF4m nay",
491
507
  "Clear": "X\xF3a",
492
- "No data found": "Kh\xF4ng t\xECm th\u1EA5y d\u1EEF li\u1EC7u"
508
+ "No data found": "Kh\xF4ng t\xECm th\u1EA5y d\u1EEF li\u1EC7u",
509
+ "No tabs open": "Kh\xF4ng c\xF3 tab n\xE0o \u0111ang m\u1EDF"
493
510
  };
494
511
  export const th = {
495
512
  "Dismiss": "\u0E22\u0E01\u0E40\u0E25\u0E34\u0E01",
@@ -518,7 +535,8 @@ export const th = {
518
535
  "Alert": "\u0E41\u0E08\u0E49\u0E07\u0E40\u0E15\u0E37\u0E2D\u0E19",
519
536
  "Today": "\u0E27\u0E31\u0E19\u0E19\u0E35\u0E49",
520
537
  "Clear": "\u0E25\u0E49\u0E32\u0E07",
521
- "No data found": "\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25"
538
+ "No data found": "\u0E44\u0E21\u0E48\u0E1E\u0E1A\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25",
539
+ "No tabs open": "\u0E44\u0E21\u0E48\u0E21\u0E35\u0E41\u0E17\u0E47\u0E1A\u0E17\u0E35\u0E48\u0E40\u0E1B\u0E34\u0E14\u0E2D\u0E22\u0E39\u0E48"
522
540
  };
523
541
  export const sv = {
524
542
  "Dismiss": "St\xE4ng",
@@ -547,7 +565,8 @@ export const sv = {
547
565
  "Alert": "Varning",
548
566
  "Today": "Idag",
549
567
  "Clear": "Rensa",
550
- "No data found": "Inga data hittades"
568
+ "No data found": "Inga data hittades",
569
+ "No tabs open": "Inga flikar \xF6ppna"
551
570
  };
552
571
  export const da = {
553
572
  "Dismiss": "Luk",
@@ -576,7 +595,8 @@ export const da = {
576
595
  "Alert": "Advarsel",
577
596
  "Today": "I dag",
578
597
  "Clear": "Ryd",
579
- "No data found": "Ingen data fundet"
598
+ "No data found": "Ingen data fundet",
599
+ "No tabs open": "Ingen \xE5bne faner"
580
600
  };
581
601
  export const fi = {
582
602
  "Dismiss": "Sulje",
@@ -605,7 +625,8 @@ export const fi = {
605
625
  "Alert": "Varoitus",
606
626
  "Today": "T\xE4n\xE4\xE4n",
607
627
  "Clear": "Tyhjenn\xE4",
608
- "No data found": "Tietoja ei l\xF6ytynyt"
628
+ "No data found": "Tietoja ei l\xF6ytynyt",
629
+ "No tabs open": "Ei avoimia v\xE4lilehti\xE4"
609
630
  };
610
631
  export const cs = {
611
632
  "Dismiss": "Zav\u0159\xEDt",
@@ -634,7 +655,8 @@ export const cs = {
634
655
  "Alert": "Upozorn\u011Bn\xED",
635
656
  "Today": "Dnes",
636
657
  "Clear": "Vymazat",
637
- "No data found": "Nenalezena \u017E\xE1dn\xE1 data"
658
+ "No data found": "Nenalezena \u017E\xE1dn\xE1 data",
659
+ "No tabs open": "\u017D\xE1dn\xE9 otev\u0159en\xE9 karty"
638
660
  };
639
661
  export const el = {
640
662
  "Dismiss": "\u039A\u03BB\u03B5\u03AF\u03C3\u03B9\u03BC\u03BF",
@@ -663,7 +685,8 @@ export const el = {
663
685
  "Alert": "\u0395\u03B9\u03B4\u03BF\u03C0\u03BF\u03AF\u03B7\u03C3\u03B7",
664
686
  "Today": "\u03A3\u03AE\u03BC\u03B5\u03C1\u03B1",
665
687
  "Clear": "\u039A\u03B1\u03B8\u03B1\u03C1\u03B9\u03C3\u03BC\u03CC\u03C2",
666
- "No data found": "\u0394\u03B5\u03BD \u03B2\u03C1\u03AD\u03B8\u03B7\u03BA\u03B1\u03BD \u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03B1"
688
+ "No data found": "\u0394\u03B5\u03BD \u03B2\u03C1\u03AD\u03B8\u03B7\u03BA\u03B1\u03BD \u03B4\u03B5\u03B4\u03BF\u03BC\u03AD\u03BD\u03B1",
689
+ "No tabs open": "\u0394\u03B5\u03BD \u03C5\u03C0\u03AC\u03C1\u03C7\u03BF\u03C5\u03BD \u03B1\u03BD\u03BF\u03B9\u03C7\u03C4\u03AD\u03C2 \u03BA\u03B1\u03C1\u03C4\u03AD\u03BB\u03B5\u03C2"
667
690
  };
668
691
  export const tr = {
669
692
  "Dismiss": "Kapat",
@@ -692,7 +715,8 @@ export const tr = {
692
715
  "Alert": "Uyar\u0131",
693
716
  "Today": "Bug\xFCn",
694
717
  "Clear": "Temizle",
695
- "No data found": "Veri bulunamad\u0131"
718
+ "No data found": "Veri bulunamad\u0131",
719
+ "No tabs open": "A\xE7\u0131k sekme yok"
696
720
  };
697
721
  export const builtInLocales = {
698
722
  en,
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_path = require('node:path');
5
6
  const node_module = require('node:module');
6
7
 
7
8
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
@@ -10,6 +11,9 @@ const module$1 = kit.defineNuxtModule({
10
11
  name: "@katlux/toolkit",
11
12
  configKey: "katluxToolkit"
12
13
  },
14
+ defaults: {
15
+ autoAiReference: true
16
+ },
13
17
  async setup(options, nuxt) {
14
18
  const { resolve } = kit.createResolver((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('module.cjs', document.baseURI).href)));
15
19
  const runtimePath = resolve("./runtime");
@@ -119,7 +123,125 @@ export default defineNuxtPlugin(() => {
119
123
  options2.tsConfig.compilerOptions = options2.tsConfig.compilerOptions || {};
120
124
  options2.tsConfig.compilerOptions.allowArbitraryExtensions = true;
121
125
  });
126
+ if (nuxt.options.dev && options.autoAiReference !== false) {
127
+ try {
128
+ const isMonorepo = node_fs.existsSync(resolve(nuxt.options.rootDir, "packages/katlux-toolkit")) || node_fs.existsSync(resolve(nuxt.options.rootDir, "../../packages/katlux-toolkit"));
129
+ if (!isMonorepo) {
130
+ syncAiReference(nuxt.options.rootDir, resolve);
131
+ }
132
+ } catch (e) {
133
+ console.warn("[Katlux] Failed to auto-sync AI skills:", e);
134
+ }
135
+ }
122
136
  }
123
137
  });
138
+ function syncAiReference(rootDir, resolve) {
139
+ const possibleSkillsDirs = [
140
+ resolve("./skills"),
141
+ resolve("../dist/skills"),
142
+ resolve("../../.agents/skills")
143
+ ];
144
+ let packagedSkillsDir = null;
145
+ for (const dir of possibleSkillsDirs) {
146
+ if (node_fs.existsSync(node_path.join(dir, "KATLUX_INDEX.md"))) {
147
+ packagedSkillsDir = dir;
148
+ break;
149
+ }
150
+ }
151
+ if (!packagedSkillsDir) return;
152
+ let packageVersion = "0.0.0";
153
+ try {
154
+ const pkgPath = resolve("../package.json");
155
+ if (node_fs.existsSync(pkgPath)) {
156
+ packageVersion = JSON.parse(node_fs.readFileSync(pkgPath, "utf-8")).version || "0.0.0";
157
+ }
158
+ } catch {
159
+ }
160
+ const agentsDir = resolve(rootDir, ".agents");
161
+ const skillsDir = resolve(agentsDir, "skills");
162
+ const rulesDir = resolve(agentsDir, "rules");
163
+ const versionFile = resolve(skillsDir, ".katlux-version");
164
+ if (node_fs.existsSync(versionFile) && node_fs.existsSync(resolve(skillsDir, "KATLUX_INDEX.md"))) {
165
+ try {
166
+ const recordedVersion = node_fs.readFileSync(versionFile, "utf-8").trim();
167
+ if (recordedVersion === packageVersion) {
168
+ return;
169
+ }
170
+ } catch {
171
+ }
172
+ }
173
+ if (!node_fs.existsSync(skillsDir)) node_fs.mkdirSync(skillsDir, { recursive: true });
174
+ if (!node_fs.existsSync(rulesDir)) node_fs.mkdirSync(rulesDir, { recursive: true });
175
+ function copyDirRecursive(src, dest) {
176
+ if (!node_fs.existsSync(dest)) node_fs.mkdirSync(dest, { recursive: true });
177
+ const entries = node_fs.readdirSync(src, { withFileTypes: true });
178
+ let count = 0;
179
+ for (const entry of entries) {
180
+ const srcPath = node_path.join(src, entry.name);
181
+ const destPath = node_path.join(dest, entry.name);
182
+ if (entry.isDirectory()) {
183
+ count += copyDirRecursive(srcPath, destPath);
184
+ } else if (entry.name.endsWith(".md")) {
185
+ node_fs.writeFileSync(destPath, node_fs.readFileSync(srcPath, "utf-8"), "utf-8");
186
+ count++;
187
+ }
188
+ }
189
+ return count;
190
+ }
191
+ const copied = copyDirRecursive(packagedSkillsDir, skillsDir);
192
+ node_fs.writeFileSync(versionFile, packageVersion, "utf-8");
193
+ const agentsMdPath = resolve(rootDir, "AGENTS.md");
194
+ if (!node_fs.existsSync(agentsMdPath)) {
195
+ node_fs.writeFileSync(agentsMdPath, `# Agent Context and Guidelines
196
+
197
+ This file serves as the main entry point for AI agents to understand the workspace structure and guidelines.
198
+
199
+ - [Project Rules](.agents/rules/rules.md)
200
+ - [Katlux Skills Index](.agents/skills/KATLUX_INDEX.md)
201
+ `, "utf-8");
202
+ }
203
+ const rulesMdPath = resolve(rulesDir, "rules.md");
204
+ if (!node_fs.existsSync(rulesMdPath)) {
205
+ node_fs.writeFileSync(rulesMdPath, `# Agent Rules
206
+
207
+ ## Project-Specific Rules
208
+
209
+ <!-- Add your own project rules here. -->
210
+ <!-- Example: always use the "users" Pinia store for auth state. -->
211
+
212
+ ## Katlux Code Standards
213
+
214
+ 1. **Template**: Always use **Pug** (\`lang="pug"\`). Use **Tabs** for indentation.
215
+ 2. **Styling**: Use CSS variables (e.g. \`var(--primary-500)\`, \`var(--border-radius-md)\`). Never hardcode colors or sizes.
216
+ 3. **Preset Selectors**: Scope CSS rules under \`[data-preset~="preset-name"]\`. Avoid \`!important\`.
217
+ 4. **Imports**: Use workspace aliases (e.g. \`#toolkit/composables/...\`). Avoid deep relative imports.
218
+ 5. **i18n**: Use \`t('...')\` for all user-facing strings and ARIA labels.
219
+ `, "utf-8");
220
+ }
221
+ const KATLUX_MCP_SERVER = { command: "npx", args: ["-y", "@katlux/mcp"] };
222
+ function updateMcpConfig(filePath) {
223
+ let config = {};
224
+ if (node_fs.existsSync(filePath)) {
225
+ try {
226
+ config = JSON.parse(node_fs.readFileSync(filePath, "utf-8"));
227
+ } catch {
228
+ config = {};
229
+ }
230
+ }
231
+ if (!config.mcpServers) config.mcpServers = {};
232
+ config.mcpServers.katlux = KATLUX_MCP_SERVER;
233
+ node_fs.writeFileSync(filePath, JSON.stringify(config, null, 2), "utf-8");
234
+ }
235
+ updateMcpConfig(resolve(agentsDir, "mcp_config.json"));
236
+ const cursorDir = resolve(rootDir, ".cursor");
237
+ if (node_fs.existsSync(cursorDir)) {
238
+ updateMcpConfig(resolve(cursorDir, "mcp.json"));
239
+ }
240
+ const vscodeDir = resolve(rootDir, ".vscode");
241
+ if (node_fs.existsSync(vscodeDir)) {
242
+ updateMcpConfig(resolve(vscodeDir, "mcp.json"));
243
+ }
244
+ console.log(`[Katlux] Auto-synced ${copied} AI skills and MCP server configuration to .agents/`);
245
+ }
124
246
 
125
247
  module.exports = module$1;
package/dist/module.d.cts CHANGED
@@ -1,5 +1,10 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
- declare const _default: _nuxt_schema.NuxtModule<_nuxt_schema.ModuleOptions, _nuxt_schema.ModuleOptions, false>;
3
+ interface ModuleOptions {
4
+ autoAiReference?: boolean;
5
+ [key: string]: any;
6
+ }
7
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
4
8
 
5
9
  export = _default;
10
+ export type { ModuleOptions };
package/dist/module.d.mts CHANGED
@@ -1,5 +1,10 @@
1
1
  import * as _nuxt_schema from '@nuxt/schema';
2
2
 
3
- declare const _default: _nuxt_schema.NuxtModule<_nuxt_schema.ModuleOptions, _nuxt_schema.ModuleOptions, false>;
3
+ interface ModuleOptions {
4
+ autoAiReference?: boolean;
5
+ [key: string]: any;
6
+ }
7
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
4
8
 
5
9
  export { _default as default };
10
+ export type { ModuleOptions };
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.130",
4
+ "version": "0.1.1-alpha.132",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"