@eluan/core 0.6.0 → 0.7.0

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 (302) hide show
  1. package/README.md +14 -8
  2. package/bin/eluan.mjs +75 -0
  3. package/bin/lib/check.mjs +271 -0
  4. package/bin/lib/skill.mjs +123 -0
  5. package/dist/{action-popover-DrHKPGqw.cjs → action-popover-Bt7U0g8y.cjs} +1 -1
  6. package/dist/{action-popover-NkXDAHJT.js → action-popover-jEeycwXM.js} +2 -2
  7. package/dist/action-popover.cjs +1 -1
  8. package/dist/action-popover.js +1 -1
  9. package/dist/{avatar-kDEa0rjF.js → avatar-C1LUOzjw.js} +1 -1
  10. package/dist/{avatar-B-t3ctR4.cjs → avatar-SwIO4oyt.cjs} +1 -1
  11. package/dist/avatar.cjs +1 -1
  12. package/dist/avatar.js +1 -1
  13. package/dist/badge-BLInSFM-.cjs +1 -0
  14. package/dist/{badge-BLZ8V-KC.js → badge-Bj7i1Xf5.js} +12 -10
  15. package/dist/badge.cjs +1 -1
  16. package/dist/badge.js +1 -1
  17. package/dist/{banner-DzSp5WfQ.js → banner-BqEziMp4.js} +3 -4
  18. package/dist/{banner-CNdwDPqA.cjs → banner-C8OECYHz.cjs} +1 -1
  19. package/dist/banner.cjs +1 -1
  20. package/dist/banner.js +1 -1
  21. package/dist/{breadcrumb-BuxXkm6O.cjs → breadcrumb-BGH_YhOZ.cjs} +1 -1
  22. package/dist/{breadcrumb-C6qj-tDx.js → breadcrumb-BVXSOA4Z.js} +2 -2
  23. package/dist/breadcrumb.cjs +1 -1
  24. package/dist/breadcrumb.js +1 -1
  25. package/dist/button-BUHQOcAo.cjs +1 -0
  26. package/dist/{button-DNSNShUc.js → button-fCYiYUPE.js} +52 -45
  27. package/dist/button.cjs +1 -1
  28. package/dist/button.js +1 -1
  29. package/dist/{calendar-DS5821-k.cjs → calendar-2s_jGUBa.cjs} +10 -10
  30. package/dist/{calendar-BA2tSwZD.js → calendar-BN9BkjO_.js} +18 -18
  31. package/dist/calendar.cjs +1 -1
  32. package/dist/calendar.js +1 -1
  33. package/dist/card-CfSvhkGH.js +81 -0
  34. package/dist/card-DlP39QSZ.cjs +1 -0
  35. package/dist/card.cjs +1 -1
  36. package/dist/card.js +1 -1
  37. package/dist/{carousel-Bb7jpzep.js → carousel-BO6KUdP8.js} +1 -1
  38. package/dist/{carousel-4AERgboz.cjs → carousel-dypuabh8.cjs} +1 -1
  39. package/dist/carousel.cjs +1 -1
  40. package/dist/carousel.js +1 -1
  41. package/dist/{code-block-C9u140Ob.js → code-block-CAXUOKNI.js} +10 -10
  42. package/dist/{code-block-_dFw7Su1.cjs → code-block-Co8uGXiG.cjs} +2 -2
  43. package/dist/code-block.cjs +1 -1
  44. package/dist/code-block.js +1 -1
  45. package/dist/command-C50Jkuv7.js +132 -0
  46. package/dist/command-DqNgPVsf.cjs +9 -0
  47. package/dist/command.cjs +1 -1
  48. package/dist/command.js +1 -1
  49. package/dist/components/card.d.ts +7 -2
  50. package/dist/components/input.d.ts +1 -1
  51. package/dist/components/table.d.ts +8 -4
  52. package/dist/components/typography.d.ts +2 -2
  53. package/dist/{context-menu-Bd6m1RYU.js → context-menu-CTyczUjx.js} +34 -34
  54. package/dist/context-menu-oQ6xMN6t.cjs +1 -0
  55. package/dist/context-menu.cjs +1 -1
  56. package/dist/context-menu.js +1 -1
  57. package/dist/{credit-card-input-DppPJBne.cjs → credit-card-input-C6oNQBAl.cjs} +1 -1
  58. package/dist/{credit-card-input-9VPlzvDm.js → credit-card-input-aYftFdRo.js} +1 -1
  59. package/dist/credit-card-input.cjs +1 -1
  60. package/dist/credit-card-input.js +1 -1
  61. package/dist/{date-picker-M5hLx_1s.js → date-picker-DK-G61Nn.js} +3 -3
  62. package/dist/{date-picker-hE7cDg2B.cjs → date-picker-D_aU_P3A.cjs} +1 -1
  63. package/dist/date-picker.cjs +1 -1
  64. package/dist/date-picker.js +1 -1
  65. package/dist/{datetime-picker-BeRUPJ7s.cjs → datetime-picker-897BvwxW.cjs} +1 -1
  66. package/dist/{datetime-picker-CIqBZYMH.js → datetime-picker-CECtSobs.js} +4 -4
  67. package/dist/datetime-picker.cjs +1 -1
  68. package/dist/datetime-picker.js +1 -1
  69. package/dist/decimal-input-B7IHYVXP.cjs +1 -0
  70. package/dist/decimal-input-ohejnbQg.js +177 -0
  71. package/dist/decimal-input.cjs +1 -1
  72. package/dist/decimal-input.js +1 -1
  73. package/dist/dialog-DIGW7qln.cjs +1 -0
  74. package/dist/{dialog-Bsfviqvy.js → dialog-DVhnZFqE.js} +23 -23
  75. package/dist/dialog.cjs +1 -1
  76. package/dist/dialog.js +1 -1
  77. package/dist/dropdown-menu-BV2rX_ow.cjs +1 -0
  78. package/dist/dropdown-menu-C6NPtU9J.js +115 -0
  79. package/dist/dropdown-menu.cjs +1 -1
  80. package/dist/dropdown-menu.js +1 -1
  81. package/dist/{email-input-DIiY9Q3S.js → email-input-CRd87a_c.js} +1 -1
  82. package/dist/{email-input-CehmtNUq.cjs → email-input-Dvj1xSzJ.cjs} +1 -1
  83. package/dist/email-input.cjs +1 -1
  84. package/dist/email-input.js +1 -1
  85. package/dist/{fieldset-5V8wx-KE.js → fieldset-BxINrO_H.js} +6 -6
  86. package/dist/fieldset-C6cahGeV.cjs +1 -0
  87. package/dist/fieldset.cjs +1 -1
  88. package/dist/fieldset.js +1 -1
  89. package/dist/file-input-BzYcnore.cjs +1 -0
  90. package/dist/{file-input-B_aBgxmT.js → file-input-Ch16hNA1.js} +55 -55
  91. package/dist/file-input.cjs +1 -1
  92. package/dist/file-input.js +1 -1
  93. package/dist/{footer-fovIsy-0.cjs → footer-B-fRLhqP.cjs} +1 -1
  94. package/dist/{footer-jWaFq3qk.js → footer-BiiV6-ZD.js} +1 -1
  95. package/dist/footer.cjs +1 -1
  96. package/dist/footer.js +1 -1
  97. package/dist/header-CvhqGcuo.cjs +1 -0
  98. package/dist/{header-Dnf8AnIx.js → header-DwvyTpRi.js} +22 -22
  99. package/dist/header.cjs +1 -1
  100. package/dist/header.js +1 -1
  101. package/dist/hover-card-BQpzaazK.js +21 -0
  102. package/dist/{hover-card-C5KsTSZR.cjs → hover-card-V5A1HzEu.cjs} +1 -1
  103. package/dist/hover-card.cjs +1 -1
  104. package/dist/hover-card.js +1 -1
  105. package/dist/index.cjs +8 -8
  106. package/dist/index.js +490 -484
  107. package/dist/input-Dtr0tlf7.cjs +1 -0
  108. package/dist/{input-CPb9yVU5.js → input-Zs45H33i.js} +32 -29
  109. package/dist/input-otp-D-T32R3O.cjs +1 -0
  110. package/dist/input-otp-DwdX6VlR.js +95 -0
  111. package/dist/input-otp.cjs +1 -1
  112. package/dist/input-otp.js +1 -1
  113. package/dist/input.cjs +1 -1
  114. package/dist/input.js +1 -1
  115. package/dist/{menubar-F1_bhmku.js → menubar-CodcV4b7.js} +28 -28
  116. package/dist/menubar-bOYi1jKo.cjs +1 -0
  117. package/dist/menubar.cjs +1 -1
  118. package/dist/menubar.js +1 -1
  119. package/dist/{multi-select-CVxkWW29.js → multi-select-ChfbxrG3.js} +27 -27
  120. package/dist/multi-select-D573XqUT.cjs +1 -0
  121. package/dist/multi-select.cjs +1 -1
  122. package/dist/multi-select.js +1 -1
  123. package/dist/navigation-drawer-C7YYtBXz.js +198 -0
  124. package/dist/navigation-drawer-Cu2q1NMn.cjs +1 -0
  125. package/dist/navigation-drawer.cjs +1 -1
  126. package/dist/navigation-drawer.js +1 -1
  127. package/dist/{navigation-menu-BjA-PdMY.js → navigation-menu-BEp603xA.js} +16 -16
  128. package/dist/{navigation-menu-BtpLfxHN.cjs → navigation-menu-tw5cD7mL.cjs} +2 -2
  129. package/dist/navigation-menu.cjs +1 -1
  130. package/dist/navigation-menu.js +1 -1
  131. package/dist/number-input-C1RS-p2C.js +66 -0
  132. package/dist/number-input-N3-IvxZT.cjs +1 -0
  133. package/dist/number-input.cjs +1 -1
  134. package/dist/number-input.js +1 -1
  135. package/dist/{pagination-yKmFlFMR.cjs → pagination-C6e9oVes.cjs} +1 -1
  136. package/dist/{pagination-D2tjMpVU.js → pagination-XlaE-Plb.js} +31 -31
  137. package/dist/pagination.cjs +1 -1
  138. package/dist/pagination.js +1 -1
  139. package/dist/{password-input-ljwdGCO6.js → password-input-CR6FT6Rh.js} +2 -2
  140. package/dist/{password-input-CmHubHuU.cjs → password-input-CZ19HPZd.cjs} +1 -1
  141. package/dist/password-input.cjs +1 -1
  142. package/dist/password-input.js +1 -1
  143. package/dist/{phone-input-B8VksCer.cjs → phone-input-BZhkLmI6.cjs} +1 -1
  144. package/dist/{phone-input-qTL6K8rT.js → phone-input-CT9W87M7.js} +2 -2
  145. package/dist/phone-input.cjs +1 -1
  146. package/dist/phone-input.js +1 -1
  147. package/dist/popover-CE0n5BQv.cjs +1 -0
  148. package/dist/popover-CguR4kP7.js +70 -0
  149. package/dist/popover.cjs +1 -1
  150. package/dist/popover.js +1 -1
  151. package/dist/{progress-ChFf9bIq.js → progress-BpUNvswZ.js} +8 -7
  152. package/dist/progress-DSy_jRee.cjs +1 -0
  153. package/dist/progress.cjs +1 -1
  154. package/dist/progress.js +1 -1
  155. package/dist/providers/create-theme.d.ts +1 -1
  156. package/dist/providers/eluan-provider.d.ts +8 -6
  157. package/dist/{rich-text-DImwK9hN.js → rich-text-CuAa5WkV.js} +21 -21
  158. package/dist/{rich-text-DzHLeG7W.cjs → rich-text-p7H-0qE7.cjs} +2 -2
  159. package/dist/rich-text.cjs +1 -1
  160. package/dist/rich-text.js +1 -1
  161. package/dist/{search-input-Dgr9kT1a.js → search-input-CxKLBmii.js} +53 -53
  162. package/dist/{search-input-BKTjebg7.cjs → search-input-XmoL2YjY.cjs} +1 -1
  163. package/dist/search-input.cjs +1 -1
  164. package/dist/search-input.js +1 -1
  165. package/dist/select-BCDam7PR.cjs +1 -0
  166. package/dist/select-QgjG43ye.js +119 -0
  167. package/dist/select.cjs +1 -1
  168. package/dist/select.js +1 -1
  169. package/dist/sheet-BxNmBMti.cjs +1 -0
  170. package/dist/{sheet-uiyHNKEw.js → sheet-D0hVuH9a.js} +2 -2
  171. package/dist/sheet.cjs +1 -1
  172. package/dist/sheet.js +1 -1
  173. package/dist/slider-Cv7uIp4z.js +16 -0
  174. package/dist/slider-Dci7KGjg.cjs +1 -0
  175. package/dist/slider.cjs +1 -1
  176. package/dist/slider.js +1 -1
  177. package/dist/styles.css +260 -120
  178. package/dist/switch-DQ4R-gjR.cjs +1 -0
  179. package/dist/switch-WaESqUuN.js +9 -0
  180. package/dist/switch.cjs +1 -1
  181. package/dist/switch.js +1 -1
  182. package/dist/table-YKEWGYnI.js +149 -0
  183. package/dist/table-zbkgP43L.cjs +1 -0
  184. package/dist/table.cjs +1 -1
  185. package/dist/table.js +1 -1
  186. package/dist/{tabs-TV4_2wi1.js → tabs-BwNIi7Dl.js} +7 -7
  187. package/dist/tabs-DItFd2o9.cjs +1 -0
  188. package/dist/tabs.cjs +1 -1
  189. package/dist/tabs.js +1 -1
  190. package/dist/textarea-BWAPWDRt.js +8 -0
  191. package/dist/textarea-CniUTipL.cjs +1 -0
  192. package/dist/textarea.cjs +1 -1
  193. package/dist/textarea.js +1 -1
  194. package/dist/time-input-CeJVQKWO.js +195 -0
  195. package/dist/time-input-eVFFYo10.cjs +1 -0
  196. package/dist/time-input.cjs +1 -1
  197. package/dist/time-input.js +1 -1
  198. package/dist/{toast-BK0ulAzi.cjs → toast-84RpQJtn.cjs} +1 -1
  199. package/dist/{toast-hI3pdZ2X.js → toast-BGKaAZwf.js} +1 -1
  200. package/dist/toast.cjs +1 -1
  201. package/dist/toast.js +1 -1
  202. package/dist/{toggle-Bx3q15Pu.js → toggle-CxHqX2-V.js} +10 -10
  203. package/dist/toggle-DrJJAflI.cjs +1 -0
  204. package/dist/toggle-group-DvoxSJMq.cjs +1 -0
  205. package/dist/{toggle-group-LaZmOMx_.js → toggle-group-k-kiBnEe.js} +17 -17
  206. package/dist/toggle-group.cjs +1 -1
  207. package/dist/toggle-group.js +1 -1
  208. package/dist/toggle.cjs +1 -1
  209. package/dist/toggle.js +1 -1
  210. package/dist/{tooltip-DZqn4wKl.js → tooltip-1Biy6A0m.js} +3 -3
  211. package/dist/{tooltip-faf1dIXp.cjs → tooltip-DIerl2vz.cjs} +1 -1
  212. package/dist/tooltip.cjs +1 -1
  213. package/dist/tooltip.js +1 -1
  214. package/dist/{tree-view-DRmm6oL6.js → tree-view-Bswh2RGr.js} +38 -38
  215. package/dist/tree-view-DDX9QjzF.cjs +1 -0
  216. package/dist/tree-view.cjs +1 -1
  217. package/dist/tree-view.js +1 -1
  218. package/package.json +6 -2
  219. package/skills/eluan/DESIGN.md +171 -169
  220. package/skills/eluan/SKILL.md +47 -11
  221. package/skills/eluan/components/banner.md +2 -2
  222. package/skills/eluan/components/breadcrumb.md +1 -1
  223. package/skills/eluan/components/card.md +9 -8
  224. package/skills/eluan/components/code-block.md +1 -1
  225. package/skills/eluan/components/context-menu.md +1 -1
  226. package/skills/eluan/components/drawer.md +1 -1
  227. package/skills/eluan/components/dropdown-menu.md +1 -1
  228. package/skills/eluan/components/grid.md +4 -4
  229. package/skills/eluan/components/header.md +4 -4
  230. package/skills/eluan/components/input.md +2 -2
  231. package/skills/eluan/components/menubar.md +2 -2
  232. package/skills/eluan/components/navigation-drawer.md +8 -8
  233. package/skills/eluan/components/navigation-menu.md +1 -1
  234. package/skills/eluan/components/row.md +2 -2
  235. package/skills/eluan/components/segmented-control.md +1 -1
  236. package/skills/eluan/components/separator.md +2 -2
  237. package/skills/eluan/components/skeleton.md +1 -1
  238. package/skills/eluan/components/slider.md +1 -1
  239. package/skills/eluan/components/stack.md +1 -1
  240. package/skills/eluan/components/stepper.md +3 -3
  241. package/skills/eluan/components/table.md +7 -7
  242. package/skills/eluan/components/tabs.md +1 -1
  243. package/skills/eluan/components/toast.md +2 -2
  244. package/skills/eluan/components/typography.md +12 -9
  245. package/skills/eluan/foundations/colour.md +99 -94
  246. package/skills/eluan/foundations/elevation.md +44 -15
  247. package/skills/eluan/foundations/iconography.md +4 -4
  248. package/skills/eluan/foundations/look.md +135 -0
  249. package/skills/eluan/foundations/radius.md +32 -20
  250. package/skills/eluan/foundations/spacing.md +19 -19
  251. package/skills/eluan/foundations/theming.md +48 -33
  252. package/skills/eluan/foundations/typography.md +49 -43
  253. package/skills/eluan/patterns/app-shell.md +222 -0
  254. package/skills/eluan/patterns/dashboard.md +249 -0
  255. package/skills/eluan/patterns/empty-states.md +20 -26
  256. package/skills/eluan/patterns/navigation.md +5 -4
  257. package/skills/eluan/patterns/page-layout.md +104 -20
  258. package/dist/badge-D1A0Tc79.cjs +0 -1
  259. package/dist/button--_WI-fM6.cjs +0 -1
  260. package/dist/card-BNdR5aDa.cjs +0 -1
  261. package/dist/card-BSgN7WSe.js +0 -70
  262. package/dist/command-D02vvta9.cjs +0 -9
  263. package/dist/command-sUMAxm8S.js +0 -132
  264. package/dist/context-menu-1WehRCpR.cjs +0 -1
  265. package/dist/decimal-input-Bg2BPKIr.js +0 -177
  266. package/dist/decimal-input-CkTEjo2J.cjs +0 -1
  267. package/dist/dialog-DRAoumvB.cjs +0 -1
  268. package/dist/dropdown-menu-_h_fqgvS.cjs +0 -1
  269. package/dist/dropdown-menu-p0NkOoTP.js +0 -115
  270. package/dist/fieldset-C3aAINhi.cjs +0 -1
  271. package/dist/file-input-D62FEnKg.cjs +0 -1
  272. package/dist/header-DzItWqW4.cjs +0 -1
  273. package/dist/hover-card-C_FCzE41.js +0 -21
  274. package/dist/input-BcjL2oxv.cjs +0 -1
  275. package/dist/input-otp-BhJ3ERrY.cjs +0 -1
  276. package/dist/input-otp-CTvJztkH.js +0 -95
  277. package/dist/menubar-CKWQEl7c.cjs +0 -1
  278. package/dist/multi-select-DBFINH3F.cjs +0 -1
  279. package/dist/navigation-drawer-BCBFtLEq.cjs +0 -1
  280. package/dist/navigation-drawer-BMyHXhhX.js +0 -198
  281. package/dist/number-input-Cm9YPBOX.js +0 -66
  282. package/dist/number-input-Dr9MbuRV.cjs +0 -1
  283. package/dist/popover-DPc4rRsR.js +0 -70
  284. package/dist/popover-Db6VOysz.cjs +0 -1
  285. package/dist/progress-BpdmBGaX.cjs +0 -1
  286. package/dist/select-Cdh991T-.cjs +0 -1
  287. package/dist/select-Dp5AJ6I-.js +0 -119
  288. package/dist/sheet-CkXjinUG.cjs +0 -1
  289. package/dist/slider-BQmbh0Nl.js +0 -16
  290. package/dist/slider-DK2yk-YK.cjs +0 -1
  291. package/dist/switch-C2OPCq5Z.cjs +0 -1
  292. package/dist/switch-CXBWUZcq.js +0 -9
  293. package/dist/table-DopzfXYj.js +0 -101
  294. package/dist/table-xNu_KUaU.cjs +0 -1
  295. package/dist/tabs-D8p6Tr5i.cjs +0 -1
  296. package/dist/textarea-BnpQmE74.cjs +0 -1
  297. package/dist/textarea-CJRmnazN.js +0 -8
  298. package/dist/time-input-A603mEFQ.js +0 -195
  299. package/dist/time-input-qxljhdEb.cjs +0 -1
  300. package/dist/toggle-Z3t4jPdv.cjs +0 -1
  301. package/dist/toggle-group-BZIW4wJp.cjs +0 -1
  302. package/dist/tree-view-DVQyRQDg.cjs +0 -1
package/README.md CHANGED
@@ -24,7 +24,7 @@ import { Button, EluanProvider } from "@eluan/core"
24
24
 
25
25
  export default function App() {
26
26
  return (
27
- <EluanProvider defaultTheme="minimal">
27
+ <EluanProvider defaultTheme="eluan">
28
28
  <Button>Hello</Button>
29
29
  </EluanProvider>
30
30
  )
@@ -41,6 +41,8 @@ import { Button } from "@eluan/core/button"
41
41
 
42
42
  See the [theming guide](https://github.com/vasfio/eluan/blob/main/docs/theming.md) for `EluanProvider` setup, `useEluanTheme()`, and how to define a custom theme via `createTheme()`.
43
43
 
44
+ `eluan` is the only built-in theme and the default: concrete greys with blaze orange as the accent. A custom theme changes colour and fonts only. The look (flat cards on a paper ground, raised capsule controls, one lit primary button, recessed fields) is the same in every theme.
45
+
44
46
  The provider drives five independent axes — `theme`, `mode`, `spacing`, `curves`, and `typeset` — and re-exports the token helpers so you don't need a second import:
45
47
 
46
48
  ```tsx
@@ -49,6 +51,8 @@ import { useEluanTheme, typeset, resolveTypesetSize } from "@eluan/core"
49
51
  const { mode, setMode, typeset: pin, setTypeset } = useEluanTheme()
50
52
  ```
51
53
 
54
+ The defaults are `defaultTheme="eluan"`, `defaultSpacing="standard"`, `defaultCurves="sweeping"` and `defaultTypeset="auto"`; the mode follows the OS until you set one. `spacing` changes spacing and control sizes, not text size. `curves` rounds surfaces (cards, tables, dialogs); controls are always capsules. `typeset` is `"auto"` (fluid), `"app"` (a whole-pixel scale for app screens) or `"small"` / `"medium"` / `"large"` (one column of the fluid scale).
55
+
52
56
  ## Typography
53
57
 
54
58
  Type sizes come from a fluid 10-step scale that resizes with the viewport. `Typography` applies a step's size, line height, and letter spacing together:
@@ -61,7 +65,7 @@ import { Typography } from "@eluan/core"
61
65
  <Typography variant="caption" tone="muted">Footnote</Typography>
62
66
  ```
63
67
 
64
- See [the typeset axis](https://github.com/vasfio/eluan/blob/main/docs/theming.md#the-typeset-axis) for the step table and the `data-typeset` pinning attribute.
68
+ See [the typeset axis](https://github.com/vasfio/eluan/blob/main/docs/theming.md#the-typeset-axis) for the step table and the `data-typeset` pinning attribute, including `app`, the whole-pixel scale for app screens.
65
69
 
66
70
  ## Layout
67
71
 
@@ -72,7 +76,7 @@ import { Button, Grid, Row, Stack, Typography } from "@eluan/core"
72
76
 
73
77
  <Stack as="main" gap="2xl" pad="xl">
74
78
  <Row justify="between">
75
- <Typography variant="title" as="h1">Dashboard</Typography>
79
+ <Typography variant="title" size="xl" as="h1">Dashboard</Typography>
76
80
  <Button>New project</Button>
77
81
  </Row>
78
82
  <Grid cols={{ base: 1, m: 2, l: 4 }} gap="lg">{cards}</Grid>
@@ -83,16 +87,18 @@ The same primitives hold a child's size (`shrink={false}`), fill a height (`heig
83
87
 
84
88
  ## Using Eluan with agents
85
89
 
86
- The package ships an agent skill in `skills/eluan`: guidance that tells coding agents which component to use for a task, the rules each one follows, and which tokens to use. Install it for Claude Code:
90
+ `@eluan/core` ships an agent skill: guidance that tells coding agents which component to use for a task, how to lay out an app screen or a content page, the rules each component follows, and which tokens to use. Install it into your project:
87
91
 
88
92
  ```bash
89
- cp -r node_modules/@eluan/core/skills/eluan .claude/skills/eluan
93
+ npx @eluan/core skill install # add --app for an app of dashboards, tables and settings
90
94
  ```
91
95
 
92
- For other agents, add one line to `AGENTS.md` (or `CLAUDE.md`):
96
+ That copies the skill to `.claude/skills/eluan` and adds a short block to `CLAUDE.md` (and to `AGENTS.md` if you keep one) telling agents to read it before they touch interface code. Commit both: a skill that only sits in `node_modules` is never read. Run the command again after upgrading `@eluan/core`; `npx @eluan/core skill status` says whether the installed copy is current.
93
97
 
94
- ```md
95
- Before writing UI, read `.claude/skills/eluan/SKILL.md` and follow it.
98
+ Check interface code against the rules a pattern match can prove (raw values, `className` on Eluan components, arithmetic on tokens, hand-sized icons, and with `--app` the app-screen type ramp):
99
+
100
+ ```bash
101
+ npx @eluan/core check src
96
102
  ```
97
103
 
98
104
  ## What's included
package/bin/eluan.mjs ADDED
@@ -0,0 +1,75 @@
1
+ #!/usr/bin/env node
2
+ // The `eluan` command, for apps that depend on @eluan/core. Run it through the
3
+ // package name, `npx @eluan/core …`, so npx can only ever resolve this package.
4
+ //
5
+ // npx @eluan/core skill install [--app] put the agent skill in .claude/skills/eluan
6
+ // npx @eluan/core skill status is the installed skill current?
7
+ // npx @eluan/core check [--app] [paths] check source against the skill's mechanical rules
8
+
9
+ import { existsSync } from "node:fs";
10
+ import { relative } from "node:path";
11
+ import { checkPaths } from "./lib/check.mjs";
12
+ import { installSkill, skillStatus, SKILL_DIR } from "./lib/skill.mjs";
13
+
14
+ const HELP = `Usage:
15
+ npx @eluan/core skill install [--app]
16
+ Copy the agent skill into ${SKILL_DIR} and point CLAUDE.md at it.
17
+ Pass --app for an app of app screens (dashboards, tables, settings).
18
+ npx @eluan/core skill status Report whether the installed skill matches the installed @eluan/core.
19
+ npx @eluan/core check [--app] [paths]
20
+ Check .tsx, .ts and .css files (default: src) against the skill's
21
+ mechanical rules. --app also checks the app-screen type ramp; it is
22
+ on by default once the skill was installed with --app.
23
+ `;
24
+
25
+ const args = process.argv.slice(2);
26
+ const flags = new Set(args.filter((arg) => arg.startsWith("--")));
27
+ const positional = args.filter((arg) => !arg.startsWith("--"));
28
+ const project = process.cwd();
29
+
30
+ function fail(message) {
31
+ console.error(message);
32
+ process.exit(1);
33
+ }
34
+
35
+ try {
36
+ if (positional[0] === "skill" && positional[1] === "install") {
37
+ const result = installSkill(project, { app: flags.has("--app") });
38
+ console.log(`Installed the Eluan skill from @eluan/core ${result.version}: ${result.files} files in ${result.dest}`);
39
+ for (const file of result.pointers) console.log(`Updated ${file}`);
40
+ console.log("Commit both, so every agent session in this project starts with them.");
41
+ } else if (positional[0] === "skill" && positional[1] === "status") {
42
+ const status = skillStatus(project);
43
+ if (status.state === "missing") fail(`No Eluan skill in ${SKILL_DIR}. Run: npx @eluan/core skill install`);
44
+ if (status.state === "stale") {
45
+ fail(
46
+ `The Eluan skill in ${SKILL_DIR} (from ${status.installedVersion ?? "an unknown version"}) doesn't match @eluan/core ${status.packageVersion}. Run: npx @eluan/core skill install${status.app ? " --app" : ""}`,
47
+ );
48
+ }
49
+ console.log(`The Eluan skill in ${SKILL_DIR} matches @eluan/core ${status.packageVersion}.`);
50
+ } else if (positional[0] === "check") {
51
+ const paths = positional.slice(1);
52
+ if (paths.length === 0) paths.push("src");
53
+ for (const path of paths) if (!existsSync(path)) fail(`Nothing at ${path}`);
54
+ let app = flags.has("--app");
55
+ if (!app) {
56
+ try {
57
+ app = skillStatus(project).app === true;
58
+ } catch {
59
+ // No skill to read the setting from; check without the app rules.
60
+ }
61
+ }
62
+ const { files, findings } = checkPaths(paths, { app });
63
+ for (const finding of findings) {
64
+ console.log(`${relative(project, finding.file) || finding.file}:${finding.line} ${finding.rule} ${finding.message}`);
65
+ }
66
+ const summary = `${files} file(s) checked, ${findings.length} finding(s)`;
67
+ if (findings.length) fail(`\n${summary}`);
68
+ console.log(summary);
69
+ } else {
70
+ console.log(HELP);
71
+ if (positional.length && positional[0] !== "help") process.exit(1);
72
+ }
73
+ } catch (error) {
74
+ fail(error instanceof Error ? error.message : String(error));
75
+ }
@@ -0,0 +1,271 @@
1
+ // `eluan check`: the mechanical rules from the agent skill, run on an app's
2
+ // source. It reads .tsx/.jsx/.ts files and stylesheets and reports the things
3
+ // a rule states outright and a pattern match can prove: raw values, className
4
+ // on Eluan components, arithmetic on tokens, primitive tokens, Radix imports,
5
+ // hand-sized icons and, with `app: true`, content-page type on app screens.
6
+ //
7
+ // It can't judge whether a screen looks right. The skill's "Before you finish"
8
+ // list covers that.
9
+ //
10
+ // A finding is skipped when its line, or the line above, carries a comment
11
+ // with `eluan-ignore:` and a reason.
12
+
13
+ import { readFileSync, readdirSync, statSync, existsSync } from "node:fs";
14
+ import { join, extname } from "node:path";
15
+
16
+ const SOURCE_EXT = new Set([".tsx", ".jsx", ".ts", ".js", ".mjs"]);
17
+ const STYLE_EXT = new Set([".css"]);
18
+ const SKIP_DIRS = new Set(["node_modules", "dist", "build", ".next", ".wrangler", "coverage", ".git"]);
19
+
20
+ const COLOUR = /#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})\b|\b(?:rgba?|hsla?|oklch|oklab|lab|lch)\(/;
21
+ const HEX_ONLY = /^#(?:[0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/;
22
+ const COLOUR_FN = /\b(?:rgba?|hsla?|oklch|oklab|lab|lch)\(/;
23
+ const LENGTH = /(?<![\w.-])-?(?:\d+\.?\d*|\.\d+)(px|rem|em)\b/g;
24
+ const PRIMITIVE = /var\(\s*(--(?:color-|spacing-space-|backgrounds-|foregrounds-)[a-z0-9-]*)/g;
25
+ const SCALE_TOKEN = /var\(\s*--(?:spacing|size|font-size|line-height|curves)-/;
26
+ const STYLE_NUMBER =
27
+ /\b(margin\w*|padding\w*|gap|rowGap|columnGap|(?:min|max)?[wW]idth|(?:min|max)?[hH]eight|top|right|bottom|left|inset\w*|fontSize|borderRadius)\s*:\s*(-?\d+(?:\.\d+)?)\b/g;
28
+ const CONTENT_ONLY_VARIANTS = new Set(["display", "lead"]);
29
+ const SIZED_VARIANTS = new Set(["title", "heading", "subheading"]);
30
+
31
+ const lineOf = (text, index) => {
32
+ let line = 1;
33
+ for (let i = 0; i < index; i++) if (text.charCodeAt(i) === 10) line++;
34
+ return line;
35
+ };
36
+
37
+ /** Names a file imports from a package: local name → imported name. */
38
+ function importsFrom(text, source) {
39
+ const names = new Map();
40
+ const re = new RegExp(`import\\s+(?:type\\s+)?([^;]*?)\\s+from\\s+["']${source}["']`, "g");
41
+ for (const match of text.matchAll(re)) {
42
+ const braces = match[1].match(/\{([\s\S]*)\}/);
43
+ if (!braces) continue;
44
+ for (const part of braces[1].split(",")) {
45
+ const [imported, local] = part.trim().replace(/^type\s+/, "").split(/\s+as\s+/);
46
+ if (imported) names.set((local ?? imported).trim(), imported.trim());
47
+ }
48
+ }
49
+ return names;
50
+ }
51
+
52
+ /**
53
+ * Every JSX opening tag whose name starts with a capital: its name, where it
54
+ * starts, and its attributes with nested braces blanked, so a `className`
55
+ * inside a callback isn't mistaken for a prop of the tag.
56
+ */
57
+ function openingTags(text) {
58
+ const tags = [];
59
+ const re = /<([A-Z][A-Za-z0-9]*(?:\.[A-Za-z0-9]+)*)(?=[\s/>])/g;
60
+ for (const match of text.matchAll(re)) {
61
+ let i = match.index + match[0].length;
62
+ let depth = 0;
63
+ let quote = null;
64
+ let flat = "";
65
+ let raw = "";
66
+ for (; i < text.length; i++) {
67
+ const ch = text[i];
68
+ raw += ch;
69
+ if (quote) {
70
+ if (ch === "\\") {
71
+ raw += text[++i] ?? "";
72
+ flat += depth === 0 ? " " : "";
73
+ continue;
74
+ }
75
+ if (ch === quote) quote = null;
76
+ flat += depth === 0 ? ch : " ";
77
+ continue;
78
+ }
79
+ if (ch === '"' || ch === "'" || ch === "`") {
80
+ quote = ch;
81
+ flat += depth === 0 ? ch : " ";
82
+ } else if (ch === "{") {
83
+ depth++;
84
+ flat += depth === 1 ? "{" : " ";
85
+ } else if (ch === "}") {
86
+ depth--;
87
+ flat += depth === 0 ? "}" : " ";
88
+ } else if (ch === ">" && depth === 0) {
89
+ break;
90
+ } else {
91
+ flat += depth === 0 ? ch : " ";
92
+ }
93
+ }
94
+ // A generic such as useState<Foo>( or Array<Foo> never reaches a sane end.
95
+ if (raw.length > 4000) continue;
96
+ tags.push({ name: match[1], index: match.index, attrs: flat, raw });
97
+ }
98
+ return tags;
99
+ }
100
+
101
+ /** The contents of each `style={{ … }}` attribute, with its start index. */
102
+ function styleObjects(text) {
103
+ const blocks = [];
104
+ for (const match of text.matchAll(/\bstyle=\{\{/g)) {
105
+ let depth = 2;
106
+ let i = match.index + match[0].length;
107
+ const start = i;
108
+ for (; i < text.length && depth > 0; i++) {
109
+ if (text[i] === "{") depth++;
110
+ else if (text[i] === "}") depth--;
111
+ }
112
+ blocks.push({ index: start, body: text.slice(start, i) });
113
+ }
114
+ return blocks;
115
+ }
116
+
117
+ /** Each `calc( … )` with its balanced contents. */
118
+ function calcs(text) {
119
+ const found = [];
120
+ for (const match of text.matchAll(/\bcalc\(/g)) {
121
+ let depth = 1;
122
+ let i = match.index + match[0].length;
123
+ for (; i < text.length && depth > 0; i++) {
124
+ if (text[i] === "(") depth++;
125
+ else if (text[i] === ")") depth--;
126
+ }
127
+ found.push({ index: match.index, body: text.slice(match.index, i) });
128
+ }
129
+ return found;
130
+ }
131
+
132
+ function tokenFindings(text, add) {
133
+ for (const { index, body } of calcs(text)) {
134
+ if (SCALE_TOKEN.test(body) && /[*/]/.test(body.replace(/var\([^)]*\)/g, ""))) {
135
+ add(index, "token-calc", `${body.replace(/\s+/g, " ")} multiplies or divides a scale token. Pick the nearest step, or use AspectRatio or Grid cols for a size no step covers.`);
136
+ }
137
+ }
138
+ for (const match of text.matchAll(PRIMITIVE)) {
139
+ add(match.index, "primitive-token", `${match[1]} is a primitive or mode-layer token. Use the semantic layer (--container-*, --interactive-*, --action-*, --spacing-*, --size-*).`);
140
+ }
141
+ }
142
+
143
+ function checkScript(text, options, add) {
144
+ const eluan = importsFrom(text, "@eluan/core");
145
+ const lucide = importsFrom(text, "lucide-react");
146
+
147
+ for (const match of text.matchAll(/from\s+["'](@radix-ui\/[^"']+)["']/g)) {
148
+ add(match.index, "radix-import", `Import from @eluan/core, not ${match[1]}. Eluan wraps or re-exports the Radix parts it uses.`);
149
+ }
150
+
151
+ for (const tag of openingTags(text)) {
152
+ const root = tag.name.split(".")[0];
153
+ if (eluan.has(root)) {
154
+ for (const prop of ["className", "style"]) {
155
+ if (new RegExp(`\\b${prop}=`).test(tag.attrs)) {
156
+ add(tag.index, "no-classname", `<${tag.name}> takes no ${prop}. Lay out with Stack, Row, Grid and Box, or put it on a wrapper element you own.`);
157
+ }
158
+ }
159
+ if (options.app && eluan.get(root) === "Typography") {
160
+ const variant = tag.attrs.match(/\bvariant="([a-z]+)"/)?.[1];
161
+ const sized = /\bsize=/.test(tag.attrs);
162
+ if (variant && CONTENT_ONLY_VARIANTS.has(variant)) {
163
+ add(tag.index, "app-type-ramp", `variant="${variant}" is a content-page style. On an app screen use the app ramp in patterns/page-layout.md.`);
164
+ } else if (variant && SIZED_VARIANTS.has(variant) && !sized) {
165
+ add(tag.index, "app-type-ramp", `variant="${variant}" needs a size on an app screen (title xl, heading lg, subheading base). See patterns/page-layout.md.`);
166
+ }
167
+ }
168
+ }
169
+ if (lucide.has(root) && /\bsize=/.test(tag.attrs)) {
170
+ add(tag.index, "icon-size", `Size <${tag.name}> with <Icon size="…"> or a component's icon slot, not Lucide's size prop.`);
171
+ }
172
+ }
173
+
174
+ for (const { index, body } of styleObjects(text)) {
175
+ for (const match of body.matchAll(STYLE_NUMBER)) {
176
+ if (Number(match[2]) === 0) continue;
177
+ add(index + match.index, "raw-length", `${match[1]}: ${match[2]} is a raw pixel value. Use a --spacing-* or --size-* token, or a layout primitive's gap or pad.`);
178
+ }
179
+ }
180
+
181
+ for (const match of text.matchAll(/(["'`])((?:\\.|(?!\1)[^\\\n])*)\1/g)) {
182
+ const value = match[2];
183
+ if (!value || value.includes("${")) continue;
184
+ if (HEX_ONLY.test(value) || COLOUR_FN.test(value)) {
185
+ add(match.index, "raw-colour", `"${value}" is a raw colour. Use a semantic colour token.`);
186
+ continue;
187
+ }
188
+ if (/\b(?:min|max)-(?:width|height)\s*:/.test(value)) continue; // a media query
189
+ for (const length of value.matchAll(LENGTH)) {
190
+ if (/^-?0(?:\.0+)?(?:px|rem|em)$/.test(length[0])) continue;
191
+ if (length[0] === "1px") continue; // a hairline border has no token
192
+ add(match.index, "raw-length", `"${value}" has a raw length (${length[0]}). Use a --spacing-*, --size-* or --font-size-* token.`);
193
+ break;
194
+ }
195
+ }
196
+
197
+ tokenFindings(text, add);
198
+ }
199
+
200
+ function checkStyles(text, add) {
201
+ const clean = text.replace(/\/\*[\s\S]*?\*\//g, (comment) => comment.replace(/[^\n]/g, " "));
202
+ let offset = 0;
203
+ for (const line of clean.split("\n")) {
204
+ const start = offset;
205
+ offset += line.length + 1;
206
+ if (/^\s*@(?:media|container|import|supports|layer)\b/.test(line)) continue;
207
+ const declaration = line.match(/^\s*([a-zA-Z-]+)\s*:\s*(.+?);?\s*$/);
208
+ if (!declaration) continue;
209
+ const [, prop, value] = declaration;
210
+ if (/^(?:box-shadow|transition|animation)(?:-|$)/.test(prop) && !/^(?:none|inherit|unset|initial)\b/.test(value)) {
211
+ add(start, "no-shadow-motion", `${prop} has no Eluan token yet. Use a component's own props (Card elevation), not your own shadows or motion.`);
212
+ continue;
213
+ }
214
+ if (prop.startsWith("--") && !/var\(/.test(value) && COLOUR.test(value)) {
215
+ add(start, "raw-colour", `${prop} is set to a raw colour. Point it at a semantic token, or change the theme.`);
216
+ continue;
217
+ }
218
+ if (!prop.startsWith("--") && COLOUR.test(value)) {
219
+ add(start, "raw-colour", `${prop}: ${value} has a raw colour. Use a semantic colour token.`);
220
+ }
221
+ const hairline = /^(?:border|outline)/.test(prop);
222
+ for (const length of value.matchAll(LENGTH)) {
223
+ if (/^-?0(?:\.0+)?(?:px|rem|em)$/.test(length[0])) continue;
224
+ if (hairline && length[0] === "1px") continue;
225
+ add(start, "raw-length", `${prop}: ${value} has a raw length (${length[0]}). Use a --spacing-*, --size-*, --curves-* or --font-size-* token.`);
226
+ break;
227
+ }
228
+ }
229
+ tokenFindings(clean, add);
230
+ }
231
+
232
+ /** Checks one file's text. Returns `{ file, line, rule, message }` findings. */
233
+ export function checkSource(file, text, options = {}) {
234
+ const findings = [];
235
+ const lines = text.split("\n");
236
+ const seen = new Set();
237
+ const add = (index, rule, message) => {
238
+ const line = lineOf(text, index);
239
+ const ignored = [lines[line - 1], lines[line - 2]].some((l) => l && /eluan-ignore:\s*\S/.test(l));
240
+ const key = `${line}:${rule}:${message}`;
241
+ if (ignored || seen.has(key)) return;
242
+ seen.add(key);
243
+ findings.push({ file, line, rule, message });
244
+ };
245
+ const ext = extname(file);
246
+ if (STYLE_EXT.has(ext)) checkStyles(text, add);
247
+ else if (SOURCE_EXT.has(ext)) checkScript(text, options, add);
248
+ return findings.sort((a, b) => a.line - b.line);
249
+ }
250
+
251
+ function walk(path, out) {
252
+ if (!existsSync(path)) return;
253
+ const stat = statSync(path);
254
+ if (stat.isDirectory()) {
255
+ for (const entry of readdirSync(path)) {
256
+ if (SKIP_DIRS.has(entry) || entry.startsWith(".")) continue;
257
+ walk(join(path, entry), out);
258
+ }
259
+ } else if ((SOURCE_EXT.has(extname(path)) || STYLE_EXT.has(extname(path))) && !path.endsWith(".d.ts")) {
260
+ out.push(path);
261
+ }
262
+ }
263
+
264
+ /** Checks every source file and stylesheet under the given paths. */
265
+ export function checkPaths(paths, options = {}) {
266
+ const files = [];
267
+ for (const path of paths) walk(path, files);
268
+ const findings = [];
269
+ for (const file of files) findings.push(...checkSource(file, readFileSync(file, "utf8"), options));
270
+ return { files: files.length, findings };
271
+ }
@@ -0,0 +1,123 @@
1
+ // `eluan skill`: puts the agent skill that ships in @eluan/core where coding
2
+ // agents look for it, and tells them to read it.
3
+ //
4
+ // install copies skills/eluan into <project>/.claude/skills/eluan and writes a
5
+ // marked block into CLAUDE.md (and AGENTS.md when the project has one).
6
+ // status says whether the installed copy matches the installed package.
7
+
8
+ import { createHash } from "node:crypto";
9
+ import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
10
+ import { dirname, join, relative } from "node:path";
11
+ import { fileURLToPath } from "node:url";
12
+
13
+ const PACKAGE = join(dirname(fileURLToPath(import.meta.url)), "../..");
14
+ const SHIP = ["SKILL.md", "DESIGN.md", "foundations", "components", "patterns", "styles"];
15
+ const STAMP = ".installed.json";
16
+ const START = "<!-- eluan:start -->";
17
+ const END = "<!-- eluan:end -->";
18
+
19
+ export const SKILL_DIR = join(".claude", "skills", "eluan");
20
+
21
+ /** The packed skill inside the published package, or the source in this repo. */
22
+ function skillSource() {
23
+ for (const candidate of [join(PACKAGE, "skills/eluan"), join(PACKAGE, "../../skills/eluan")]) {
24
+ if (existsSync(join(candidate, "SKILL.md"))) return candidate;
25
+ }
26
+ throw new Error("This copy of @eluan/core carries no agent skill (skills/eluan is missing).");
27
+ }
28
+
29
+ const packageVersion = () => JSON.parse(readFileSync(join(PACKAGE, "package.json"), "utf8")).version;
30
+
31
+ /** Path → text of every file that ships, with maintainers' REVIEW notes removed. */
32
+ function readSkill(root) {
33
+ const files = new Map();
34
+ const visit = (rel) => {
35
+ const path = join(root, rel);
36
+ if (!existsSync(path)) return;
37
+ if (statSync(path).isDirectory()) {
38
+ for (const entry of readdirSync(path).sort()) if (!entry.startsWith(".")) visit(join(rel, entry));
39
+ return;
40
+ }
41
+ let text = readFileSync(path, "utf8");
42
+ if (rel.endsWith(".md")) {
43
+ text = text.replace(/[ \t]*<!-- REVIEW[\s\S]*?-->/g, "").replace(/\n{3,}/g, "\n\n");
44
+ }
45
+ files.set(rel.split("\\").join("/"), text);
46
+ };
47
+ for (const entry of SHIP) visit(entry);
48
+ return files;
49
+ }
50
+
51
+ function digest(files) {
52
+ const hash = createHash("sha256");
53
+ for (const [rel, text] of [...files].sort(([a], [b]) => (a < b ? -1 : 1))) hash.update(`${rel}\n${text}\n`);
54
+ return hash.digest("hex").slice(0, 16);
55
+ }
56
+
57
+ function pointer(app) {
58
+ const check = app ? "npx @eluan/core check --app" : "npx @eluan/core check";
59
+ return `${START}
60
+ ## Eluan
61
+
62
+ This project's interface is built with the Eluan design system. Before you write, change or review any interface code, read \`.claude/skills/eluan/SKILL.md\` and follow it. That holds when you add to screens that already exist: read the skill first, then reuse the app's shared pieces rather than copying a screen.
63
+
64
+ When the interface work is done, run \`${check}\` and fix what it reports, then render the screen and go through "Before you finish" in the skill.
65
+
66
+ \`npx @eluan/core skill install\` writes this block and \`.claude/skills/eluan\`. Run it again after upgrading \`@eluan/core\`; don't edit either by hand.
67
+ ${END}`;
68
+ }
69
+
70
+ function writePointer(path, block) {
71
+ const current = existsSync(path) ? readFileSync(path, "utf8") : "";
72
+ const start = current.indexOf(START);
73
+ const end = current.indexOf(END);
74
+ let next;
75
+ if (start !== -1 && end > start) next = current.slice(0, start) + block + current.slice(end + END.length);
76
+ else next = current.trim() ? `${current.replace(/\s+$/, "")}\n\n${block}\n` : `${block}\n`;
77
+ if (next === current) return false;
78
+ writeFileSync(path, next);
79
+ return true;
80
+ }
81
+
82
+ /** Installs the skill into a project. Returns what it wrote. */
83
+ export function installSkill(project, { app = false } = {}) {
84
+ const files = readSkill(skillSource());
85
+ const dest = join(project, SKILL_DIR);
86
+ rmSync(dest, { recursive: true, force: true });
87
+ for (const [rel, text] of files) {
88
+ const to = join(dest, rel);
89
+ mkdirSync(dirname(to), { recursive: true });
90
+ writeFileSync(to, text);
91
+ }
92
+ const stamp = { package: "@eluan/core", version: packageVersion(), digest: digest(files), app };
93
+ writeFileSync(join(dest, STAMP), `${JSON.stringify(stamp, null, 2)}\n`);
94
+
95
+ const block = pointer(app);
96
+ const pointers = [];
97
+ const claude = join(project, "CLAUDE.md");
98
+ const agents = join(project, "AGENTS.md");
99
+ // CLAUDE.md always; AGENTS.md only where the project already keeps one.
100
+ if (writePointer(claude, block)) pointers.push(relative(project, claude));
101
+ if (existsSync(agents) && writePointer(agents, block)) pointers.push(relative(project, agents));
102
+ return { dest: SKILL_DIR, files: files.size, version: stamp.version, pointers };
103
+ }
104
+
105
+ /** `current`, `stale` (differs from the installed package) or `missing`. */
106
+ export function skillStatus(project) {
107
+ const dest = join(project, SKILL_DIR);
108
+ if (!existsSync(join(dest, "SKILL.md"))) return { state: "missing" };
109
+ const installed = digest(readSkill(dest));
110
+ const shipped = digest(readSkill(skillSource()));
111
+ let stamp = {};
112
+ try {
113
+ stamp = JSON.parse(readFileSync(join(dest, STAMP), "utf8"));
114
+ } catch {
115
+ // No stamp: copied by hand, or by an older release.
116
+ }
117
+ return {
118
+ state: installed === shipped ? "current" : "stale",
119
+ installedVersion: stamp.version ?? null,
120
+ packageVersion: packageVersion(),
121
+ app: stamp.app === true,
122
+ };
123
+ }
@@ -1 +1 @@
1
- "use client";"use strict";const t=require("react/jsx-runtime"),u=require("react"),p=require("lucide-react"),i=require("./dropdown-menu-_h_fqgvS.cjs"),x=require("./button--_WI-fM6.cjs");function f(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const c=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(r,o,c.get?c:{enumerable:!0,get:()=>n[o]})}}return r.default=n,Object.freeze(r)}const s=f(u),a=s.forwardRef(({items:n,align:r="end",side:o="bottom","aria-label":c="Open actions menu"},l)=>t.jsxs(i.DropdownMenu,{children:[t.jsx(i.DropdownMenuTrigger,{asChild:!0,children:t.jsx(x.Button,{ref:l,variant:"ghost",size:"icon","aria-label":c,children:t.jsx(p.MoreHorizontal,{"aria-hidden":"true",className:"xkive58 x1vfp87d"})})}),t.jsx(i.DropdownMenuContent,{align:r,side:o,children:n.map((e,d)=>t.jsxs(i.DropdownMenuItem,{onClick:e.onClick,disabled:e.disabled,tone:e.destructive?"destructive":"default",children:[e.icon&&t.jsx("span",{className:"x6s0dn4 x78zum5 x2lah0s xkive58 x1vfp87d",children:s.isValidElement(e.icon)?s.cloneElement(e.icon,{width:"100%",height:"100%"}):e.icon}),e.label]},d))})]}));a.displayName="ActionPopover";exports.ActionPopover=a;
1
+ "use client";"use strict";const t=require("react/jsx-runtime"),u=require("react"),p=require("lucide-react"),i=require("./dropdown-menu-BV2rX_ow.cjs"),x=require("./button-BUHQOcAo.cjs");function f(n){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(n){for(const o in n)if(o!=="default"){const c=Object.getOwnPropertyDescriptor(n,o);Object.defineProperty(r,o,c.get?c:{enumerable:!0,get:()=>n[o]})}}return r.default=n,Object.freeze(r)}const s=f(u),a=s.forwardRef(({items:n,align:r="end",side:o="bottom","aria-label":c="Open actions menu"},l)=>t.jsxs(i.DropdownMenu,{children:[t.jsx(i.DropdownMenuTrigger,{asChild:!0,children:t.jsx(x.Button,{ref:l,variant:"ghost",size:"icon","aria-label":c,children:t.jsx(p.MoreHorizontal,{"aria-hidden":"true",className:"xkive58 x1vfp87d"})})}),t.jsx(i.DropdownMenuContent,{align:r,side:o,children:n.map((e,d)=>t.jsxs(i.DropdownMenuItem,{onClick:e.onClick,disabled:e.disabled,tone:e.destructive?"destructive":"default",children:[e.icon&&t.jsx("span",{className:"x6s0dn4 x78zum5 x2lah0s xkive58 x1vfp87d",children:s.isValidElement(e.icon)?s.cloneElement(e.icon,{width:"100%",height:"100%"}):e.icon}),e.label]},d))})]}));a.displayName="ActionPopover";exports.ActionPopover=a;
@@ -2,8 +2,8 @@
2
2
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
3
3
  import * as n from "react";
4
4
  import { MoreHorizontal as c } from "lucide-react";
5
- import { D as p, n as u, b as h, d as m } from "./dropdown-menu-p0NkOoTP.js";
6
- import { B as f } from "./button-DNSNShUc.js";
5
+ import { D as p, n as u, b as h, d as m } from "./dropdown-menu-C6NPtU9J.js";
6
+ import { B as f } from "./button-fCYiYUPE.js";
7
7
  const x = n.forwardRef(({
8
8
  items: a,
9
9
  align: i = "end",
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./action-popover-DrHKPGqw.cjs");exports.ActionPopover=e.ActionPopover;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./action-popover-Bt7U0g8y.cjs");exports.ActionPopover=e.ActionPopover;
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { A as r } from "./action-popover-NkXDAHJT.js";
2
+ import { A as r } from "./action-popover-jEeycwXM.js";
3
3
  export {
4
4
  r as ActionPopover
5
5
  };
@@ -3,7 +3,7 @@ import { jsx as e } from "react/jsx-runtime";
3
3
  import * as r from "react";
4
4
  import * as o from "@radix-ui/react-avatar";
5
5
  import * as i from "@stylexjs/stylex";
6
- import { B as d } from "./badge-BLZ8V-KC.js";
6
+ import { B as d } from "./badge-Bj7i1Xf5.js";
7
7
  const f = r.forwardRef((a, s) => /* @__PURE__ */ e(o.Root, { ref: s, ...a, className: "xvowokw x78zum5 x2lah0s x1h5pcsu xb3r6kr x1n2onr6 xyp5bzy" }));
8
8
  f.displayName = o.Root.displayName;
9
9
  const g = r.forwardRef((a, s) => /* @__PURE__ */ e(o.Image, { ref: s, ...a, className: "x1y5e3q9 x5yr21d xh8yej3" }));
@@ -1 +1 @@
1
- "use client";"use strict";const r=require("react/jsx-runtime"),y=require("react"),b=require("@radix-ui/react-avatar"),$=require("@stylexjs/stylex"),h=require("./badge-D1A0Tc79.cjs");function c(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(s,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return s.default=t,Object.freeze(s)}const u=c(y),o=c(b),x=c($),l=u.forwardRef((t,s)=>r.jsx(o.Root,{ref:s,...t,className:"xvowokw x78zum5 x2lah0s x1h5pcsu xb3r6kr x1n2onr6 xyp5bzy"}));l.displayName=o.Root.displayName;const d=u.forwardRef((t,s)=>r.jsx(o.Image,{ref:s,...t,className:"x1y5e3q9 x5yr21d xh8yej3"}));d.displayName=o.Image.displayName;const g=u.forwardRef((t,s)=>r.jsx(o.Fallback,{ref:s,...t,className:"x6s0dn4 x1cqd74s xvowokw xwa5xuj x78zum5 x51wmvv xk50ysn x5yr21d xl56j7k xh8yej3"}));g.displayName=o.Fallback.displayName;const m=u.forwardRef(({position:t="top-right",count:s,max:e=99,...i},p)=>{const n=s!==void 0&&s>0,v=n?s>e?`${e}+`:`${s}`:void 0;return r.jsx("span",{ref:p,...i,...x.props(a.badge,A[t]),children:r.jsx(h.Badge,{variant:"destructive",size:n?"default":"microdot",children:v})})});m.displayName="AvatarBadge";const f=({status:t,position:s="bottom-right"})=>r.jsx("span",{...x.props(a.status,w[t],j[s]),"aria-label":t});f.displayName="AvatarStatus";const k=u.forwardRef((t,s)=>r.jsx("div",{ref:s,...t,className:"x3nfvp2 x1n2onr6"}));k.displayName="AvatarWithStatus";const a={badge:{k1xSpc:"x3nfvp2",kVAEAm:"x10l6tqk",kY2c9j:"x1vjfegm",$$css:!0},badgeTopRight:{k87sOh:"x13vifvy",kCIrl2:"x3m8u43",k3aq6I:"xd97ich",$$css:!0},badgeBottomRight:{krVfgx:"x1ey2m1c",kCIrl2:"x3m8u43",k3aq6I:"x4b9nf6",$$css:!0},badgeTopLeft:{k87sOh:"x13vifvy",kbCHJM:"xu96u03",k3aq6I:"xvase19",$$css:!0},badgeBottomLeft:{krVfgx:"x1ey2m1c",kbCHJM:"xu96u03",k3aq6I:"x1dtoipb",$$css:!0},status:{kaIpWk:"xvowokw",kGVxlE:"xvsa30g",kZKoxP:"xsxoud2",kVAEAm:"x10l6tqk",kzqmXN:"xjnwsfm",$$css:!0},statusTop:{k87sOh:"x13vifvy",$$css:!0},statusBottom:{krVfgx:"x1ey2m1c",$$css:!0},statusRight:{kCIrl2:"x3m8u43",$$css:!0},statusLeft:{kbCHJM:"xu96u03",$$css:!0},statusOnline:{kWkggS:"x8rh9ze",$$css:!0},statusOffline:{kWkggS:"x1cqd74s",$$css:!0},statusBusy:{kWkggS:"x3nj2cr",$$css:!0},statusAway:{kWkggS:"xy8psvg",$$css:!0}},A={"top-right":a.badgeTopRight,"bottom-right":a.badgeBottomRight,"top-left":a.badgeTopLeft,"bottom-left":a.badgeBottomLeft},j={"top-right":[a.statusTop,a.statusRight],"bottom-right":[a.statusBottom,a.statusRight],"top-left":[a.statusTop,a.statusLeft],"bottom-left":[a.statusBottom,a.statusLeft]},w={online:a.statusOnline,offline:a.statusOffline,busy:a.statusBusy,away:a.statusAway};exports.Avatar=l;exports.AvatarBadge=m;exports.AvatarFallback=g;exports.AvatarImage=d;exports.AvatarStatus=f;exports.AvatarWithStatus=k;
1
+ "use client";"use strict";const r=require("react/jsx-runtime"),y=require("react"),b=require("@radix-ui/react-avatar"),$=require("@stylexjs/stylex"),h=require("./badge-BLInSFM-.cjs");function c(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(s,e,i.get?i:{enumerable:!0,get:()=>t[e]})}}return s.default=t,Object.freeze(s)}const u=c(y),o=c(b),x=c($),l=u.forwardRef((t,s)=>r.jsx(o.Root,{ref:s,...t,className:"xvowokw x78zum5 x2lah0s x1h5pcsu xb3r6kr x1n2onr6 xyp5bzy"}));l.displayName=o.Root.displayName;const d=u.forwardRef((t,s)=>r.jsx(o.Image,{ref:s,...t,className:"x1y5e3q9 x5yr21d xh8yej3"}));d.displayName=o.Image.displayName;const g=u.forwardRef((t,s)=>r.jsx(o.Fallback,{ref:s,...t,className:"x6s0dn4 x1cqd74s xvowokw xwa5xuj x78zum5 x51wmvv xk50ysn x5yr21d xl56j7k xh8yej3"}));g.displayName=o.Fallback.displayName;const m=u.forwardRef(({position:t="top-right",count:s,max:e=99,...i},p)=>{const n=s!==void 0&&s>0,v=n?s>e?`${e}+`:`${s}`:void 0;return r.jsx("span",{ref:p,...i,...x.props(a.badge,A[t]),children:r.jsx(h.Badge,{variant:"destructive",size:n?"default":"microdot",children:v})})});m.displayName="AvatarBadge";const f=({status:t,position:s="bottom-right"})=>r.jsx("span",{...x.props(a.status,w[t],j[s]),"aria-label":t});f.displayName="AvatarStatus";const k=u.forwardRef((t,s)=>r.jsx("div",{ref:s,...t,className:"x3nfvp2 x1n2onr6"}));k.displayName="AvatarWithStatus";const a={badge:{k1xSpc:"x3nfvp2",kVAEAm:"x10l6tqk",kY2c9j:"x1vjfegm",$$css:!0},badgeTopRight:{k87sOh:"x13vifvy",kCIrl2:"x3m8u43",k3aq6I:"xd97ich",$$css:!0},badgeBottomRight:{krVfgx:"x1ey2m1c",kCIrl2:"x3m8u43",k3aq6I:"x4b9nf6",$$css:!0},badgeTopLeft:{k87sOh:"x13vifvy",kbCHJM:"xu96u03",k3aq6I:"xvase19",$$css:!0},badgeBottomLeft:{krVfgx:"x1ey2m1c",kbCHJM:"xu96u03",k3aq6I:"x1dtoipb",$$css:!0},status:{kaIpWk:"xvowokw",kGVxlE:"xvsa30g",kZKoxP:"xsxoud2",kVAEAm:"x10l6tqk",kzqmXN:"xjnwsfm",$$css:!0},statusTop:{k87sOh:"x13vifvy",$$css:!0},statusBottom:{krVfgx:"x1ey2m1c",$$css:!0},statusRight:{kCIrl2:"x3m8u43",$$css:!0},statusLeft:{kbCHJM:"xu96u03",$$css:!0},statusOnline:{kWkggS:"x8rh9ze",$$css:!0},statusOffline:{kWkggS:"x1cqd74s",$$css:!0},statusBusy:{kWkggS:"x3nj2cr",$$css:!0},statusAway:{kWkggS:"xy8psvg",$$css:!0}},A={"top-right":a.badgeTopRight,"bottom-right":a.badgeBottomRight,"top-left":a.badgeTopLeft,"bottom-left":a.badgeBottomLeft},j={"top-right":[a.statusTop,a.statusRight],"bottom-right":[a.statusBottom,a.statusRight],"top-left":[a.statusTop,a.statusLeft],"bottom-left":[a.statusBottom,a.statusLeft]},w={online:a.statusOnline,offline:a.statusOffline,busy:a.statusBusy,away:a.statusAway};exports.Avatar=l;exports.AvatarBadge=m;exports.AvatarFallback=g;exports.AvatarImage=d;exports.AvatarStatus=f;exports.AvatarWithStatus=k;
package/dist/avatar.cjs CHANGED
@@ -1 +1 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./avatar-B-t3ctR4.cjs");exports.Avatar=a.Avatar;exports.AvatarBadge=a.AvatarBadge;exports.AvatarFallback=a.AvatarFallback;exports.AvatarImage=a.AvatarImage;exports.AvatarStatus=a.AvatarStatus;exports.AvatarWithStatus=a.AvatarWithStatus;
1
+ "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./avatar-SwIO4oyt.cjs");exports.Avatar=a.Avatar;exports.AvatarBadge=a.AvatarBadge;exports.AvatarFallback=a.AvatarFallback;exports.AvatarImage=a.AvatarImage;exports.AvatarStatus=a.AvatarStatus;exports.AvatarWithStatus=a.AvatarWithStatus;
package/dist/avatar.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { A as s, a as r, b as A, c as e, d as v, e as c } from "./avatar-kDEa0rjF.js";
2
+ import { A as s, a as r, b as A, c as e, d as v, e as c } from "./avatar-C1LUOzjw.js";
3
3
  export {
4
4
  s as Avatar,
5
5
  r as AvatarBadge,
@@ -0,0 +1 @@
1
+ "use client";"use strict";const u=require("react/jsx-runtime"),n=require("@stylexjs/stylex"),o=require("lucide-react");function c(a){const x=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const e in a)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(a,e);Object.defineProperty(x,e,r.get?r:{enumerable:!0,get:()=>a[e]})}}return x.default=a,Object.freeze(x)}const l=c(n),t={root:{kGNEyG:"x6s0dn4",ksu8eU:"x1y0btm7",kMzoRj:"xmkeg23",k1xSpc:"x3nfvp2",k63SB2:"xk50ysn",kIyJzY:"xx6bhzk",k1ekBW:"x1oy24xj",kAMwcw:"xwwtwea",kaRX1h:"xhlp2gg",kZs9gx:"xue4uem",kiEn40:"x13iak60",k7shQP:"x9v5kkp",kPJHz1:"x4xl6zf",$$css:!0},variantDefault:{kWkggS:"x16e9imx",kVAM5u:"x9r1u3d",kMwMTN:"xiqjl67",$$css:!0},variantSecondary:{kWkggS:"xxajf5l",kVAM5u:"x9r1u3d",kMwMTN:"xwa5xuj",$$css:!0},variantDestructive:{kWkggS:"x186czme",kVAM5u:"x9r1u3d",kMwMTN:"x2lv0vp",$$css:!0},variantOutline:{kWkggS:"xjbqb8w",kVAM5u:"x10cbhzu",kMwMTN:"xwa5xuj",$$css:!0},variantPositive:{kWkggS:"xb41lrr",kVAM5u:"x9r1u3d",kMwMTN:"x31tm2b",$$css:!0},variantCaution:{kWkggS:"xmo15d4",kVAM5u:"x9r1u3d",kMwMTN:"xbonnel",$$css:!0},variantInformative:{kWkggS:"x1jyr6fd",kVAM5u:"x9r1u3d",kMwMTN:"xy06lox",$$css:!0},variantImportant:{kWkggS:"x112gqpl",kVAM5u:"x9r1u3d",kMwMTN:"xjz4iwm",$$css:!0},sizeDefault:{kaIpWk:"x1c6t507",kGuDYH:"x51wmvv",kOIVth:"x10ci2pi",kb6lSQ:"x5eemij",kLWn49:"x1ea4c1g",k8WAf4:"x14aypoh",kg3NbH:"x1wu0y3b",$$css:!0},sizeMicrodot:{kaIpWk:"xvowokw",kMzoRj:"xc342km",kGVxlE:"xvsa30g",kZKoxP:"x11su2f7",kmVPX3:"x1717udv",kzqmXN:"xdo0s9d",$$css:!0}},d={default:t.variantDefault,secondary:t.variantSecondary,destructive:t.variantDestructive,outline:t.variantOutline,positive:t.variantPositive,caution:t.variantCaution,informative:t.variantInformative,important:t.variantImportant},v={default:t.sizeDefault,microdot:t.sizeMicrodot};function g({variant:a="default",size:x="default",onRemove:e,removable:r,children:i,...k}){return u.jsxs("span",{...k,...l.props(t.root,d[a],v[x]),children:[x!=="microdot"&&i,x!=="microdot"&&(r||e)&&u.jsx("button",{type:"button",onClick:s=>{s.stopPropagation(),e==null||e()},"aria-label":"Remove",className:"xjbqb8w xc342km x1c6t507 x1heor9g x1ypdohk x1tp9seo x146viv x197sbye x1717udv xx6bhzk x19991ni xwwtwea x1o7uuvo xhlp2gg x25t5g8 xue4uem x13iak60 x9v5kkp x4xl6zf",children:u.jsx(o.X,{"aria-hidden":"true",className:"xwvkxvr xosxg9m"})})]})}exports.Badge=g;