@carbonid1/design-system 5.7.7 → 5.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Kbd/Kbd.js CHANGED
@@ -20,6 +20,8 @@ const resolveKey = (key) => {
20
20
  const lower = key.toLowerCase();
21
21
  if (lower === 'mod')
22
22
  return MOD_SYMBOLS[getModKey()] ?? 'Ctrl';
23
+ if (lower === 'ctrl')
24
+ return getModKey() === 'Cmd' ? '⌃' : 'Ctrl';
23
25
  return KEY_SYMBOLS[lower] ?? key;
24
26
  };
25
27
  const kbdVariants = cva('inline-flex items-center justify-center rounded-sm border font-mono leading-none select-none', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbonid1/design-system",
3
- "version": "5.7.7",
3
+ "version": "5.7.9",
4
4
  "description": "Shared React UI primitives + design tokens (themes, postcss config)",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { mkdir, rm, symlink } from 'node:fs/promises'
2
+ import { lstat, mkdir, rm, symlink } from 'node:fs/promises'
3
3
  import { dirname, join, resolve } from 'node:path'
4
4
  import { fileURLToPath } from 'node:url'
5
5
 
@@ -15,13 +15,37 @@ if (
15
15
  }
16
16
 
17
17
  const consumerRoot = process.env.INIT_CWD || process.cwd()
18
- const skillDest = join(consumerRoot, '.claude', 'skills', 'design-system')
18
+ const skillDestinations = [
19
+ join(consumerRoot, '.claude', 'skills', 'design-system'),
20
+ join(consumerRoot, '.agents', 'skills', 'design-system'),
21
+ ]
22
+
23
+ async function removeExistingSkillLink(skillDest) {
24
+ try {
25
+ const stat = await lstat(skillDest)
26
+ if (!stat.isSymbolicLink()) {
27
+ console.warn(`[@carbonid1/design-system] skipped existing non-symlink skill: ${skillDest}`)
28
+ return false
29
+ }
30
+ } catch (err) {
31
+ if (err.code !== 'ENOENT') {
32
+ throw err
33
+ }
34
+ }
19
35
 
20
- try {
21
- await mkdir(dirname(skillDest), { recursive: true })
22
36
  await rm(skillDest, { recursive: true, force: true })
23
- await symlink(SKILL_SRC, skillDest, 'dir')
24
- console.log(`[@carbonid1/design-system] linked skill → ${skillDest}`)
25
- } catch (err) {
26
- console.warn(`[@carbonid1/design-system] could not link skill: ${err.message}`)
37
+ return true
38
+ }
39
+
40
+ for (const skillDest of skillDestinations) {
41
+ try {
42
+ await mkdir(dirname(skillDest), { recursive: true })
43
+ if (!(await removeExistingSkillLink(skillDest))) {
44
+ continue
45
+ }
46
+ await symlink(SKILL_SRC, skillDest, 'dir')
47
+ console.log(`[@carbonid1/design-system] linked skill → ${skillDest}`)
48
+ } catch (err) {
49
+ console.warn(`[@carbonid1/design-system] could not link skill: ${err.message}`)
50
+ }
27
51
  }