banhaten 0.4.0 → 0.6.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 (214) hide show
  1. package/CHANGELOG.md +78 -1
  2. package/CONTRIBUTING.md +6 -4
  3. package/README.md +4 -2
  4. package/docs/design-spacing.md +13 -0
  5. package/docs/design-system/README.md +2 -0
  6. package/docs/design-system/appearances/default.md +1 -1
  7. package/docs/design-system/appearances/rounded.md +1 -1
  8. package/docs/design-system/appearances/sharp.md +1 -1
  9. package/docs/design-system/component-showcase-consistency-report.md +5 -5
  10. package/docs/design-system/components/README.md +15 -0
  11. package/docs/design-system/components/accordion.md +1 -1
  12. package/docs/design-system/components/activity-feed.md +1 -1
  13. package/docs/design-system/components/activity-heatmap.md +1 -1
  14. package/docs/design-system/components/agent-input.md +85 -0
  15. package/docs/design-system/components/alert-dialog.md +1 -1
  16. package/docs/design-system/components/alert.md +10 -4
  17. package/docs/design-system/components/app-header.md +97 -0
  18. package/docs/design-system/components/approval-card.md +134 -0
  19. package/docs/design-system/components/attribute.md +14 -2
  20. package/docs/design-system/components/avatar.md +1 -1
  21. package/docs/design-system/components/badge.md +1 -1
  22. package/docs/design-system/components/banner.md +1 -1
  23. package/docs/design-system/components/breadcrumbs.md +8 -3
  24. package/docs/design-system/components/button-group.md +1 -1
  25. package/docs/design-system/components/button.md +8 -5
  26. package/docs/design-system/components/card.md +15 -1
  27. package/docs/design-system/components/catalog-components.md +1 -1
  28. package/docs/design-system/components/chart.md +95 -24
  29. package/docs/design-system/components/checkbox.md +1 -1
  30. package/docs/design-system/components/collapsible.md +20 -6
  31. package/docs/design-system/components/command.md +1 -1
  32. package/docs/design-system/components/context-menu.md +1 -1
  33. package/docs/design-system/components/date-picker.md +1 -1
  34. package/docs/design-system/components/file-upload.md +1 -1
  35. package/docs/design-system/components/hover-card.md +1 -1
  36. package/docs/design-system/components/inline-citations.md +93 -0
  37. package/docs/design-system/components/input-group.md +1 -1
  38. package/docs/design-system/components/input.md +59 -3
  39. package/docs/design-system/components/item.md +1 -1
  40. package/docs/design-system/components/kbd.md +6 -4
  41. package/docs/design-system/components/menu.md +35 -4
  42. package/docs/design-system/components/menubar.md +1 -1
  43. package/docs/design-system/components/modal.md +2 -2
  44. package/docs/design-system/components/native-select.md +1 -1
  45. package/docs/design-system/components/navigation-menu.md +1 -1
  46. package/docs/design-system/components/onboarding-step-list-item.md +1 -1
  47. package/docs/design-system/components/page-header.md +58 -17
  48. package/docs/design-system/components/pagination.md +2 -2
  49. package/docs/design-system/components/popover.md +1 -1
  50. package/docs/design-system/components/progress-slider.md +1 -1
  51. package/docs/design-system/components/radio-card.md +1 -1
  52. package/docs/design-system/components/radio-group.md +1 -1
  53. package/docs/design-system/components/resizable.md +1 -1
  54. package/docs/design-system/components/rolling-count.md +61 -0
  55. package/docs/design-system/components/scroll-area.md +1 -1
  56. package/docs/design-system/components/select.md +12 -2
  57. package/docs/design-system/components/sheet.md +1 -1
  58. package/docs/design-system/components/shimmer-text.md +67 -0
  59. package/docs/design-system/components/sidebar.md +75 -8
  60. package/docs/design-system/components/skeleton.md +2 -2
  61. package/docs/design-system/components/slideout.md +1 -1
  62. package/docs/design-system/components/slider.md +2 -2
  63. package/docs/design-system/components/social-button.md +2 -2
  64. package/docs/design-system/components/streaming-text.md +82 -0
  65. package/docs/design-system/components/table.md +103 -21
  66. package/docs/design-system/components/tabs.md +25 -6
  67. package/docs/design-system/components/tag.md +1 -1
  68. package/docs/design-system/components/task-list.md +95 -0
  69. package/docs/design-system/components/textarea.md +1 -1
  70. package/docs/design-system/components/thinking-reasoning.md +72 -0
  71. package/docs/design-system/components/thinking-state.md +67 -0
  72. package/docs/design-system/components/timeline.md +1 -1
  73. package/docs/design-system/components/toast.md +1 -1
  74. package/docs/design-system/components/toggle.md +2 -2
  75. package/docs/design-system/components/toolbar.md +11 -6
  76. package/docs/design-system/components/tooltip.md +6 -4
  77. package/docs/design-system/density-and-elevation.md +16 -16
  78. package/docs/design-system/design-system-test-missing-items.md +8 -8
  79. package/docs/design-system/installation.md +2 -0
  80. package/docs/design-system/tabs.md +2 -1
  81. package/docs/design-system/template-gap-audit.md +32 -0
  82. package/docs/design-system/templates.md +59 -0
  83. package/docs/design-system/token-governance.md +15 -2
  84. package/package.json +2 -2
  85. package/registry/components/accordion.tsx +2 -2
  86. package/registry/components/agent-input-parts.tsx +552 -0
  87. package/registry/components/agent-input-state.ts +156 -0
  88. package/registry/components/agent-input.css +307 -0
  89. package/registry/components/agent-input.tsx +382 -0
  90. package/registry/components/alert-dialog.tsx +2 -2
  91. package/registry/components/alert.tsx +23 -7
  92. package/registry/components/app-header.tsx +151 -0
  93. package/registry/components/approval-card.css +409 -0
  94. package/registry/components/approval-card.tsx +401 -0
  95. package/registry/components/approval-frame.tsx +108 -0
  96. package/registry/components/approval-questions.tsx +559 -0
  97. package/registry/components/attribute.tsx +48 -13
  98. package/registry/components/autocomplete.tsx +15 -68
  99. package/registry/components/avatar.tsx +2 -2
  100. package/registry/components/badge.tsx +8 -7
  101. package/registry/components/button-group.tsx +2 -2
  102. package/registry/components/button.tsx +19 -14
  103. package/registry/components/card.tsx +18 -5
  104. package/registry/components/chart-block-data.ts +177 -0
  105. package/registry/components/chart-block.css +171 -0
  106. package/registry/components/chart-block.tsx +260 -0
  107. package/registry/components/chart-interactions.ts +123 -0
  108. package/registry/components/chart-options.cartesian.ts +162 -0
  109. package/registry/components/chart-options.paint.ts +99 -0
  110. package/registry/components/chart-options.parts.ts +72 -0
  111. package/registry/components/chart-options.radial.ts +109 -0
  112. package/registry/components/chart-options.ts +44 -0
  113. package/registry/components/chart-options.types.ts +67 -0
  114. package/registry/components/chart.tsx +1 -1
  115. package/registry/components/checkbox.tsx +6 -6
  116. package/registry/components/collapsible.tsx +43 -3
  117. package/registry/components/command.tsx +1 -1
  118. package/registry/components/context-menu.tsx +1 -1
  119. package/registry/components/data-chart.tsx +40 -0
  120. package/registry/components/date-picker.tsx +9 -9
  121. package/registry/components/echart-theme.ts +246 -0
  122. package/registry/components/echart.css +49 -0
  123. package/registry/components/echart.tsx +178 -0
  124. package/registry/components/expanded/Breadcrumbs.tsx +5 -1
  125. package/registry/components/expanded/PageHeader.tsx +67 -24
  126. package/registry/components/expanded/Table.tsx +60 -22
  127. package/registry/components/expanded/activityFeed.css +2 -2
  128. package/registry/components/expanded/activityHeatmap.css +1 -1
  129. package/registry/components/expanded/banner.css +2 -2
  130. package/registry/components/expanded/breadcrumbs.css +19 -2
  131. package/registry/components/expanded/catalogComponentsShowcase.css +1 -1
  132. package/registry/components/expanded/fileUpload.css +7 -7
  133. package/registry/components/expanded/onboardingStepListItem.css +2 -2
  134. package/registry/components/expanded/pageHeader.css +38 -44
  135. package/registry/components/expanded/slideout.css +4 -4
  136. package/registry/components/expanded/table.css +58 -9
  137. package/registry/components/expanded/timeline.css +1 -1
  138. package/registry/components/hover-card.tsx +1 -1
  139. package/registry/components/inline-citations.css +126 -0
  140. package/registry/components/inline-citations.tsx +292 -0
  141. package/registry/components/input-group.tsx +4 -4
  142. package/registry/components/input.tsx +150 -137
  143. package/registry/components/item.tsx +1 -1
  144. package/registry/components/kbd.tsx +3 -2
  145. package/registry/components/menu.tsx +117 -12
  146. package/registry/components/menubar.tsx +2 -2
  147. package/registry/components/modal.tsx +3 -3
  148. package/registry/components/native-select.tsx +4 -4
  149. package/registry/components/navigation-menu.tsx +2 -2
  150. package/registry/components/pagination.tsx +4 -4
  151. package/registry/components/popover.tsx +3 -3
  152. package/registry/components/progress-slider.tsx +1 -1
  153. package/registry/components/radio-card.tsx +7 -7
  154. package/registry/components/radio-group.tsx +2 -2
  155. package/registry/components/resizable.tsx +2 -2
  156. package/registry/components/rolling-count.css +37 -0
  157. package/registry/components/rolling-count.tsx +110 -0
  158. package/registry/components/scroll-area.tsx +1 -1
  159. package/registry/components/select.tsx +15 -10
  160. package/registry/components/sheet.tsx +2 -2
  161. package/registry/components/shimmer-text.css +69 -0
  162. package/registry/components/shimmer-text.tsx +43 -0
  163. package/registry/components/sidebar.tsx +528 -223
  164. package/registry/components/skeleton.tsx +1 -1
  165. package/registry/components/slider.tsx +2 -2
  166. package/registry/components/social-button.tsx +1 -1
  167. package/registry/components/streaming-text.css +45 -0
  168. package/registry/components/streaming-text.tsx +165 -0
  169. package/registry/components/table-elements.tsx +164 -5
  170. package/registry/components/tabs.css +32 -4
  171. package/registry/components/tabs.tsx +5 -1
  172. package/registry/components/tag.tsx +1 -1
  173. package/registry/components/task-list.css +328 -0
  174. package/registry/components/task-list.tsx +429 -0
  175. package/registry/components/textarea.tsx +4 -4
  176. package/registry/components/thinking-reasoning.css +178 -0
  177. package/registry/components/thinking-reasoning.tsx +253 -0
  178. package/registry/components/thinking-state.css +8 -0
  179. package/registry/components/thinking-state.tsx +46 -0
  180. package/registry/components/toast.tsx +1 -1
  181. package/registry/components/toggle.tsx +2 -2
  182. package/registry/components/toolbar.tsx +6 -6
  183. package/registry/components/tooltip.tsx +6 -4
  184. package/registry/examples/agent-input-demo.tsx +90 -0
  185. package/registry/examples/app-header-demo.tsx +40 -0
  186. package/registry/examples/approval-card-demo.tsx +83 -0
  187. package/registry/examples/button-demo.tsx +3 -0
  188. package/registry/examples/chart-block-demo.tsx +5 -0
  189. package/registry/examples/chart-demo.tsx +6 -21
  190. package/registry/examples/collection-filter-bar-demo.tsx +1 -1
  191. package/registry/examples/control-density-contract-demo.tsx +5 -1
  192. package/registry/examples/inline-citations-demo.tsx +31 -0
  193. package/registry/examples/input-actions-demo.tsx +36 -0
  194. package/registry/examples/menu-demo.tsx +1 -1
  195. package/registry/examples/popover-demo.tsx +1 -0
  196. package/registry/examples/rolling-count-demo.tsx +39 -0
  197. package/registry/examples/shimmer-text-demo.tsx +20 -0
  198. package/registry/examples/streaming-text-demo.tsx +28 -0
  199. package/registry/examples/task-list-demo.tsx +74 -0
  200. package/registry/examples/thinking-reasoning-demo.tsx +74 -0
  201. package/registry/examples/thinking-state-demo.tsx +13 -0
  202. package/registry/guidance/charts.LICENSE.txt +24 -0
  203. package/registry/hooks/use-controllable-state.ts +33 -0
  204. package/registry/hooks/use-listbox-navigation.ts +73 -0
  205. package/registry/hooks/use-motion-end.ts +55 -0
  206. package/registry/hooks/use-reduced-motion.ts +28 -0
  207. package/registry/index.json +1808 -190
  208. package/registry/styles/globals.css +992 -1088
  209. package/registry.json +385 -10
  210. package/schema/registry.schema.json +5 -1
  211. package/schema/tokens.schema.json +8 -4
  212. package/src/cli/file-transaction.js +15 -8
  213. package/src/cli/index.js +22 -29
  214. package/tokens/banhaten.tokens.json +490 -192
package/registry.json CHANGED
@@ -27,6 +27,26 @@
27
27
  "type": "registry:hook",
28
28
  "target": "@hooks/use-direction.ts"
29
29
  },
30
+ {
31
+ "path": "registry/hooks/use-controllable-state.ts",
32
+ "type": "registry:hook",
33
+ "target": "@hooks/use-controllable-state.ts"
34
+ },
35
+ {
36
+ "path": "registry/hooks/use-listbox-navigation.ts",
37
+ "type": "registry:hook",
38
+ "target": "@hooks/use-listbox-navigation.ts"
39
+ },
40
+ {
41
+ "path": "registry/hooks/use-motion-end.ts",
42
+ "type": "registry:hook",
43
+ "target": "@hooks/use-motion-end.ts"
44
+ },
45
+ {
46
+ "path": "registry/hooks/use-reduced-motion.ts",
47
+ "type": "registry:hook",
48
+ "target": "@hooks/use-reduced-motion.ts"
49
+ },
30
50
  {
31
51
  "path": "registry/guidance/USAGE.md",
32
52
  "type": "registry:file",
@@ -224,19 +244,98 @@
224
244
  "name": "chart",
225
245
  "type": "registry:component",
226
246
  "title": "Chart",
227
- "description": "Recharts wrapper with Banhaten chart color tokens, responsive container, tooltip content, legend content, and config-driven color variables.",
247
+ "description": "Eight token-driven ECharts families and 18 ready-made chart blocks, with responsive SVG rendering, theme-aware typography, tooltips, legends, brushes, and compatible Recharts wrappers.",
228
248
  "author": "Ahmad Galal",
229
249
  "registryDependencies": [
230
- "base"
250
+ "base",
251
+ "button",
252
+ "progress"
231
253
  ],
232
254
  "dependencies": [
233
- "recharts@^3.9.2"
255
+ "recharts@^3.9.2",
256
+ "echarts@^6.1.0",
257
+ "lucide-react@^1.17.0"
234
258
  ],
235
259
  "files": [
236
260
  {
237
261
  "path": "registry/components/chart.tsx",
238
262
  "type": "registry:component",
239
263
  "target": "@ui/chart.tsx"
264
+ },
265
+ {
266
+ "path": "registry/guidance/charts.LICENSE.txt",
267
+ "type": "registry:file",
268
+ "target": "@ui/charts.LICENSE.txt"
269
+ },
270
+ {
271
+ "path": "registry/components/chart-block-data.ts",
272
+ "type": "registry:component",
273
+ "target": "@ui/chart-block-data.ts"
274
+ },
275
+ {
276
+ "path": "registry/components/chart-block.css",
277
+ "type": "registry:style",
278
+ "target": "@ui/chart-block.css"
279
+ },
280
+ {
281
+ "path": "registry/components/chart-block.tsx",
282
+ "type": "registry:component",
283
+ "target": "@ui/chart-block.tsx"
284
+ },
285
+ {
286
+ "path": "registry/components/chart-interactions.ts",
287
+ "type": "registry:component",
288
+ "target": "@ui/chart-interactions.ts"
289
+ },
290
+ {
291
+ "path": "registry/components/chart-options.cartesian.ts",
292
+ "type": "registry:component",
293
+ "target": "@ui/chart-options.cartesian.ts"
294
+ },
295
+ {
296
+ "path": "registry/components/chart-options.paint.ts",
297
+ "type": "registry:component",
298
+ "target": "@ui/chart-options.paint.ts"
299
+ },
300
+ {
301
+ "path": "registry/components/chart-options.parts.ts",
302
+ "type": "registry:component",
303
+ "target": "@ui/chart-options.parts.ts"
304
+ },
305
+ {
306
+ "path": "registry/components/chart-options.radial.ts",
307
+ "type": "registry:component",
308
+ "target": "@ui/chart-options.radial.ts"
309
+ },
310
+ {
311
+ "path": "registry/components/chart-options.ts",
312
+ "type": "registry:component",
313
+ "target": "@ui/chart-options.ts"
314
+ },
315
+ {
316
+ "path": "registry/components/chart-options.types.ts",
317
+ "type": "registry:component",
318
+ "target": "@ui/chart-options.types.ts"
319
+ },
320
+ {
321
+ "path": "registry/components/data-chart.tsx",
322
+ "type": "registry:component",
323
+ "target": "@ui/data-chart.tsx"
324
+ },
325
+ {
326
+ "path": "registry/components/echart-theme.ts",
327
+ "type": "registry:component",
328
+ "target": "@ui/echart-theme.ts"
329
+ },
330
+ {
331
+ "path": "registry/components/echart.css",
332
+ "type": "registry:style",
333
+ "target": "@ui/echart.css"
334
+ },
335
+ {
336
+ "path": "registry/components/echart.tsx",
337
+ "type": "registry:component",
338
+ "target": "@ui/echart.tsx"
240
339
  }
241
340
  ]
242
341
  },
@@ -336,7 +435,8 @@
336
435
  "dependencies": [
337
436
  "@radix-ui/react-dropdown-menu@^2.1.17",
338
437
  "@radix-ui/react-slot@^1.2.3",
339
- "class-variance-authority@^0.7.1"
438
+ "class-variance-authority@^0.7.1",
439
+ "lucide-react@^1.17.0"
340
440
  ],
341
441
  "files": [
342
442
  {
@@ -548,7 +648,7 @@
548
648
  "name": "collapsible",
549
649
  "type": "registry:component",
550
650
  "title": "Collapsible",
551
- "description": "Radix Collapsible wrapper for disclosure sections with tokenized trigger, icon rotation, and content slots.",
651
+ "description": "Radix Collapsible wrapper for disclosure sections with tokenized trigger, icon rotation, content slots, and an unstyled animated panel.",
552
652
  "author": "Ahmad Galal",
553
653
  "registryDependencies": [
554
654
  "base"
@@ -656,7 +756,7 @@
656
756
  "name": "toolbar",
657
757
  "type": "registry:component",
658
758
  "title": "Toolbar",
659
- "description": "Figma Filter Toolbar primitive with eight filter/action styles, search fields, select triggers, icon actions, chips, selected-count badges, desktop/mobile wrapping, and RTL-safe composition.",
759
+ "description": "Figma Filter Toolbar layout primitive with native Tab-order group semantics, eight filter/action styles, search fields, select triggers, icon actions, chips, selected-count badges, desktop/mobile wrapping, and RTL-safe composition.",
660
760
  "author": "Ahmad Galal",
661
761
  "registryDependencies": [
662
762
  "base",
@@ -701,7 +801,7 @@
701
801
  "name": "input",
702
802
  "type": "registry:component",
703
803
  "title": "Input",
704
- "description": "Tokenized input field with semantic control density, labels, helper and error text, explicit icons, shared keyboard shortcuts, add-ons, tags, default and soft styles, and RTL states.",
804
+ "description": "Tokenized input field with native quantity stepping, action-button contracts, semantic control density, labels, helper and error text, icons, shortcuts, add-ons, tags, default and soft styles, and RTL states.",
705
805
  "author": "Ahmad Galal",
706
806
  "registryDependencies": [
707
807
  "base",
@@ -925,7 +1025,7 @@
925
1025
  "name": "sidebar",
926
1026
  "type": "registry:component",
927
1027
  "title": "Sidebar",
928
- "description": "Figma-aligned application sidebar with 280px expanded and 48px collapsed shells, brand and workspace headers, search and actions, default/avatar/nested/tree menu variants, badges, group actions, user footers, controlled state, tooltips, logical placement, and RTL mirroring.",
1028
+ "description": "Figma-aligned application sidebar with a tokenized 900px minimum height, staged motion between 280px expanded and 48px collapsed shells, brand and workspace headers, search and actions, default/avatar/nested/tree menu variants, badges, group actions, user footers with hover identity previews, controlled state, tooltips, logical placement, and RTL mirroring.",
929
1029
  "author": "Ahmad Galal",
930
1030
  "registryDependencies": [
931
1031
  "base",
@@ -943,6 +1043,26 @@
943
1043
  }
944
1044
  ]
945
1045
  },
1046
+ {
1047
+ "name": "app-header",
1048
+ "type": "registry:component",
1049
+ "title": "App Header",
1050
+ "description": "Workspace bar above page content with a flexible location region, a search landmark, and flush icon or text actions that keep their design footprint while exposing 40px pointer targets.",
1051
+ "author": "Ahmad Galal",
1052
+ "registryDependencies": [
1053
+ "base"
1054
+ ],
1055
+ "dependencies": [
1056
+ "@radix-ui/react-slot@^1.2.3"
1057
+ ],
1058
+ "files": [
1059
+ {
1060
+ "path": "registry/components/app-header.tsx",
1061
+ "type": "registry:component",
1062
+ "target": "@ui/app-header.tsx"
1063
+ }
1064
+ ]
1065
+ },
946
1066
  {
947
1067
  "name": "navigation-menu",
948
1068
  "type": "registry:component",
@@ -1348,7 +1468,7 @@
1348
1468
  "name": "breadcrumbs",
1349
1469
  "type": "registry:block",
1350
1470
  "title": "Breadcrumbs",
1351
- "description": "Expanded breadcrumbs navigation with default, raised, icon, overflow, separator, and RTL variants.",
1471
+ "description": "Expanded breadcrumbs navigation with default, raised, icon, overflow, separator, small, and RTL variants.",
1352
1472
  "author": "Ahmad Galal",
1353
1473
  "registryDependencies": [
1354
1474
  "base"
@@ -1415,6 +1535,7 @@
1415
1535
  "toolbar"
1416
1536
  ],
1417
1537
  "dependencies": [
1538
+ "@radix-ui/react-slot@^1.2.3",
1418
1539
  "lucide-react@^1.17.0"
1419
1540
  ],
1420
1541
  "files": [
@@ -1490,7 +1611,7 @@
1490
1611
  "name": "page-header",
1491
1612
  "type": "registry:block",
1492
1613
  "title": "Page Header",
1493
- "description": "Expanded page header composition with breadcrumbs, metadata, description copy, action groups, responsive layout, and optional local tabs.",
1614
+ "description": "Expanded page header composition with breadcrumbs, metadata, description copy, action groups, responsive layout, and content-safe scrollable local tabs.",
1494
1615
  "author": "Ahmad Galal",
1495
1616
  "registryDependencies": [
1496
1617
  "base",
@@ -1615,6 +1736,260 @@
1615
1736
  "target": "@ui/expanded/Timeline.tsx"
1616
1737
  }
1617
1738
  ]
1739
+ },
1740
+ {
1741
+ "name": "shimmer-text",
1742
+ "type": "registry:component",
1743
+ "title": "Shimmer Text",
1744
+ "description": "Text with a soft brightness valley sweeping through it in reading direction, for labels of work in progress such as syncing, reading, or thinking.",
1745
+ "author": "Ahmad Galal",
1746
+ "registryDependencies": [
1747
+ "base"
1748
+ ],
1749
+ "dependencies": [],
1750
+ "files": [
1751
+ {
1752
+ "path": "registry/components/shimmer-text.css",
1753
+ "type": "registry:style",
1754
+ "target": "@ui/shimmer-text.css"
1755
+ },
1756
+ {
1757
+ "path": "registry/components/shimmer-text.tsx",
1758
+ "type": "registry:component",
1759
+ "target": "@ui/shimmer-text.tsx"
1760
+ }
1761
+ ]
1762
+ },
1763
+ {
1764
+ "name": "thinking-state",
1765
+ "type": "registry:component",
1766
+ "title": "Thinking State",
1767
+ "description": "Minimal shimmering status label that signals an agent is working before its first token arrives.",
1768
+ "author": "Ahmad Galal",
1769
+ "registryDependencies": [
1770
+ "base",
1771
+ "shimmer-text"
1772
+ ],
1773
+ "dependencies": [],
1774
+ "files": [
1775
+ {
1776
+ "path": "registry/components/thinking-state.css",
1777
+ "type": "registry:style",
1778
+ "target": "@ui/thinking-state.css"
1779
+ },
1780
+ {
1781
+ "path": "registry/components/thinking-state.tsx",
1782
+ "type": "registry:component",
1783
+ "target": "@ui/thinking-state.tsx"
1784
+ }
1785
+ ]
1786
+ },
1787
+ {
1788
+ "name": "thinking-reasoning",
1789
+ "type": "registry:component",
1790
+ "title": "Thinking Reasoning",
1791
+ "description": "Animated, collapsible reasoning block: a shimmering label reveals sentences as they arrive, auto-scrolls behind soft fades, then folds into a Thought for Ns summary that unfolds on demand.",
1792
+ "author": "Ahmad Galal",
1793
+ "registryDependencies": [
1794
+ "base",
1795
+ "collapsible",
1796
+ "shimmer-text"
1797
+ ],
1798
+ "dependencies": [
1799
+ "lucide-react@^1.17.0"
1800
+ ],
1801
+ "files": [
1802
+ {
1803
+ "path": "registry/components/thinking-reasoning.css",
1804
+ "type": "registry:style",
1805
+ "target": "@ui/thinking-reasoning.css"
1806
+ },
1807
+ {
1808
+ "path": "registry/components/thinking-reasoning.tsx",
1809
+ "type": "registry:component",
1810
+ "target": "@ui/thinking-reasoning.tsx"
1811
+ }
1812
+ ]
1813
+ },
1814
+ {
1815
+ "name": "streaming-text",
1816
+ "type": "registry:component",
1817
+ "title": "Streaming Text",
1818
+ "description": "Token-by-token text with a slim caret that stays solid while streaming and blinks once the response is complete, plus a useTypewriter hook that reveals a finished text locally.",
1819
+ "author": "Ahmad Galal",
1820
+ "registryDependencies": [
1821
+ "base"
1822
+ ],
1823
+ "dependencies": [],
1824
+ "files": [
1825
+ {
1826
+ "path": "registry/components/streaming-text.css",
1827
+ "type": "registry:style",
1828
+ "target": "@ui/streaming-text.css"
1829
+ },
1830
+ {
1831
+ "path": "registry/components/streaming-text.tsx",
1832
+ "type": "registry:component",
1833
+ "target": "@ui/streaming-text.tsx"
1834
+ }
1835
+ ]
1836
+ },
1837
+ {
1838
+ "name": "inline-citations",
1839
+ "type": "registry:component",
1840
+ "title": "Inline Citations",
1841
+ "description": "Prose composed with superscript citation marks that link to numbered sources and reveal the reference name on hover, plus a compact source list with host and external-link affordance.",
1842
+ "author": "Ahmad Galal",
1843
+ "registryDependencies": [
1844
+ "base",
1845
+ "tooltip"
1846
+ ],
1847
+ "dependencies": [
1848
+ "lucide-react@^1.17.0"
1849
+ ],
1850
+ "files": [
1851
+ {
1852
+ "path": "registry/components/inline-citations.css",
1853
+ "type": "registry:style",
1854
+ "target": "@ui/inline-citations.css"
1855
+ },
1856
+ {
1857
+ "path": "registry/components/inline-citations.tsx",
1858
+ "type": "registry:component",
1859
+ "target": "@ui/inline-citations.tsx"
1860
+ }
1861
+ ]
1862
+ },
1863
+ {
1864
+ "name": "rolling-count",
1865
+ "type": "registry:component",
1866
+ "title": "Rolling Count",
1867
+ "description": "Tabular figures that roll each changed character into place like an odometer while assistive technology reads the plain value.",
1868
+ "author": "Ahmad Galal",
1869
+ "registryDependencies": [
1870
+ "base"
1871
+ ],
1872
+ "dependencies": [],
1873
+ "files": [
1874
+ {
1875
+ "path": "registry/components/rolling-count.css",
1876
+ "type": "registry:style",
1877
+ "target": "@ui/rolling-count.css"
1878
+ },
1879
+ {
1880
+ "path": "registry/components/rolling-count.tsx",
1881
+ "type": "registry:component",
1882
+ "target": "@ui/rolling-count.tsx"
1883
+ }
1884
+ ]
1885
+ },
1886
+ {
1887
+ "name": "task-list",
1888
+ "type": "registry:component",
1889
+ "title": "Task List",
1890
+ "description": "Collapsible agent progress tracker with pending, active, and done rows, a header icon that moves from list to pie to check, and rolling counters, plus parts that compose static and folded lists.",
1891
+ "author": "Ahmad Galal",
1892
+ "registryDependencies": [
1893
+ "base",
1894
+ "collapsible",
1895
+ "rolling-count",
1896
+ "shimmer-text"
1897
+ ],
1898
+ "dependencies": [
1899
+ "lucide-react@^1.17.0"
1900
+ ],
1901
+ "files": [
1902
+ {
1903
+ "path": "registry/components/task-list.css",
1904
+ "type": "registry:style",
1905
+ "target": "@ui/task-list.css"
1906
+ },
1907
+ {
1908
+ "path": "registry/components/task-list.tsx",
1909
+ "type": "registry:component",
1910
+ "target": "@ui/task-list.tsx"
1911
+ }
1912
+ ]
1913
+ },
1914
+ {
1915
+ "name": "agent-input",
1916
+ "type": "registry:component",
1917
+ "title": "Agent Input",
1918
+ "description": "Composable AI prompt field with an auto-growing editor, slash-command skill palette, skill and attachment chips, an add menu for files, skills, and models, prompt enhancement with a sweeping ring, and a send action.",
1919
+ "author": "Ahmad Galal",
1920
+ "registryDependencies": [
1921
+ "base",
1922
+ "button",
1923
+ "menu",
1924
+ "shimmer-text",
1925
+ "spinner",
1926
+ "tag"
1927
+ ],
1928
+ "dependencies": [
1929
+ "lucide-react@^1.17.0"
1930
+ ],
1931
+ "files": [
1932
+ {
1933
+ "path": "registry/components/agent-input.css",
1934
+ "type": "registry:style",
1935
+ "target": "@ui/agent-input.css"
1936
+ },
1937
+ {
1938
+ "path": "registry/components/agent-input.tsx",
1939
+ "type": "registry:component",
1940
+ "target": "@ui/agent-input.tsx"
1941
+ },
1942
+ {
1943
+ "path": "registry/components/agent-input-parts.tsx",
1944
+ "type": "registry:component",
1945
+ "target": "@ui/agent-input-parts.tsx"
1946
+ },
1947
+ {
1948
+ "path": "registry/components/agent-input-state.ts",
1949
+ "type": "registry:component",
1950
+ "target": "@ui/agent-input-state.ts"
1951
+ }
1952
+ ]
1953
+ },
1954
+ {
1955
+ "name": "approval-card",
1956
+ "type": "registry:component",
1957
+ "title": "Approval Card",
1958
+ "description": "Human-in-the-loop decision cards that pause the agent: ApprovalQuestions for up to a few questions, ApprovalCommand to approve a shell command, and ApprovalPlan to green-light a short plan with an optional auto-approve countdown, all built on the ApprovalFrame shell for custom decisions.",
1959
+ "author": "Ahmad Galal",
1960
+ "registryDependencies": [
1961
+ "base",
1962
+ "button",
1963
+ "kbd",
1964
+ "rolling-count",
1965
+ "task-list",
1966
+ "tooltip"
1967
+ ],
1968
+ "dependencies": [
1969
+ "lucide-react@^1.17.0"
1970
+ ],
1971
+ "files": [
1972
+ {
1973
+ "path": "registry/components/approval-card.css",
1974
+ "type": "registry:style",
1975
+ "target": "@ui/approval-card.css"
1976
+ },
1977
+ {
1978
+ "path": "registry/components/approval-card.tsx",
1979
+ "type": "registry:component",
1980
+ "target": "@ui/approval-card.tsx"
1981
+ },
1982
+ {
1983
+ "path": "registry/components/approval-frame.tsx",
1984
+ "type": "registry:component",
1985
+ "target": "@ui/approval-frame.tsx"
1986
+ },
1987
+ {
1988
+ "path": "registry/components/approval-questions.tsx",
1989
+ "type": "registry:component",
1990
+ "target": "@ui/approval-questions.tsx"
1991
+ }
1992
+ ]
1618
1993
  }
1619
1994
  ]
1620
1995
  }
@@ -183,7 +183,11 @@
183
183
  "additionalProperties": false,
184
184
  "properties": {
185
185
  "source": { "type": "string", "minLength": 1 },
186
- "target": { "type": "string", "minLength": 1 }
186
+ "target": { "type": "string", "minLength": 1 },
187
+ "internal": {
188
+ "type": "boolean",
189
+ "description": "Installed and compiled with the component, but its exports are not part of the supported import contract. A public module of the same component imports it."
190
+ }
187
191
  }
188
192
  }
189
193
  }
@@ -47,7 +47,7 @@
47
47
  },
48
48
  "cssContract": {
49
49
  "type": "object",
50
- "required": ["semanticPrefix", "fontFamily", "fontFamilies", "defaultTheme", "defaultNeutralTheme", "defaultRadius", "shadcnAliases", "shadowTokens"],
50
+ "required": ["semanticPrefix", "fontFamily", "fontFamilies", "defaultTheme", "defaultNeutralTheme", "defaultRadius", "shadcnAliases", "elevationTokens"],
51
51
  "additionalProperties": false,
52
52
  "properties": {
53
53
  "semanticPrefix": { "type": "string", "minLength": 1 },
@@ -65,11 +65,11 @@
65
65
  "defaultTheme": { "type": "string", "minLength": 1 },
66
66
  "defaultNeutralTheme": { "type": "string", "minLength": 1 },
67
67
  "defaultRadius": { "type": "string", "minLength": 1 },
68
- "shadowTokens": { "type": "string" },
68
+ "elevationTokens": { "type": "string" },
69
69
  "shadcnAliases": {
70
70
  "type": "object",
71
71
  "minProperties": 1,
72
- "additionalProperties": { "type": "string", "pattern": "^--" }
72
+ "additionalProperties": { "$ref": "#/$defs/cssVariableName" }
73
73
  }
74
74
  }
75
75
  },
@@ -142,10 +142,14 @@
142
142
  }
143
143
  ]
144
144
  },
145
+ "cssVariableName": {
146
+ "type": "string",
147
+ "pattern": "^--(?:bh|elevation)-[a-z0-9-]+$"
148
+ },
145
149
  "cssVariableMap": {
146
150
  "type": "object",
147
151
  "minProperties": 1,
148
- "propertyNames": { "pattern": "^--(?:bh|shadow)-[a-z0-9-]+$" },
152
+ "propertyNames": { "$ref": "#/$defs/cssVariableName" },
149
153
  "additionalProperties": { "$ref": "#/$defs/cssVariableToken" }
150
154
  },
151
155
  "cssVariableToken": {
@@ -148,15 +148,18 @@ async function restoreFileSnapshot(targetPath, snapshot) {
148
148
  }
149
149
 
150
150
  export async function writeFile(targetPath, content, options) {
151
- const alreadyExists = await exists(targetPath)
151
+ if (!activeFileTransaction) {
152
+ throw new Error(`refusing non-transactional write to ${targetPath}`)
153
+ }
154
+
155
+ const current = await readFileForUpdate(targetPath)
156
+ const alreadyExists = current !== null
152
157
  const isBinary = Buffer.isBuffer(content)
153
158
  const contentBuffer = isBinary ? content : Buffer.from(content, "utf8")
154
- const current = alreadyExists ? await fs.readFile(targetPath) : null
155
159
  const isEqual = current?.equals(contentBuffer) || false
156
160
  if (options.expectedCurrent !== undefined) {
157
161
  const expectedCurrent = toExpectedBuffer(options.expectedCurrent)
158
162
  assertExpectedCurrent(targetPath, current, expectedCurrent)
159
- registerPrecondition(targetPath, expectedCurrent)
160
163
  }
161
164
 
162
165
  if (options.dryRun) {
@@ -170,10 +173,6 @@ export async function writeFile(targetPath, content, options) {
170
173
  return "kept"
171
174
  }
172
175
 
173
- if (!activeFileTransaction) {
174
- throw new Error(`refusing non-transactional write to ${targetPath}`)
175
- }
176
-
177
176
  const existingPlan = activeFileTransaction.writes.get(targetPath)
178
177
  if (existingPlan && !existingPlan.content.equals(contentBuffer)) {
179
178
  throw new Error(`conflicting planned writes for ${targetPath}`)
@@ -186,6 +185,14 @@ export async function writeFile(targetPath, content, options) {
186
185
  return alreadyExists ? "updated" : "wrote"
187
186
  }
188
187
 
188
+ // Pin the bytes (or absence) used for ownership checks and read/modify/write
189
+ // planning. Later reads and writes must agree with this first observation.
190
+ export async function readFileForUpdate(targetPath) {
191
+ const current = await readFileContent(targetPath)
192
+ registerPrecondition(targetPath, current)
193
+ return current
194
+ }
195
+
189
196
  export async function assertFileUnchanged(targetPath, expectedCurrent) {
190
197
  if (!activeFileTransaction) {
191
198
  throw new Error(`refusing non-transactional precondition for ${targetPath}`)
@@ -207,7 +214,7 @@ function registerPrecondition(targetPath, expectedCurrent) {
207
214
  assertExpectedCurrent(targetPath, existing, expectedCurrent)
208
215
  return
209
216
  }
210
- activeFileTransaction.preconditions.set(targetPath, expectedCurrent)
217
+ activeFileTransaction.preconditions.set(targetPath, toExpectedBuffer(expectedCurrent))
211
218
  }
212
219
 
213
220
  function assertExpectedCurrent(targetPath, current, expected) {