doom-design-system 0.4.17 → 0.5.1

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 (366) hide show
  1. package/.agent/skills/doom/a2ui/a2ui-examples.md +289 -0
  2. package/.agent/skills/doom/a2ui/a2ui-principles.md +49 -0
  3. package/.agent/skills/doom/a2ui/a2ui-protocol.md +191 -0
  4. package/.agent/skills/doom/components/a2ui.md +46 -0
  5. package/.agent/skills/doom/components/chart.md +69 -34
  6. package/.agent/skills/doom/components/copybutton.md +41 -0
  7. package/.agent/skills/doom/components/sidebar.md +92 -0
  8. package/.agent/skills/doom/index.md +1 -0
  9. package/README.md +1 -1
  10. package/dist/components/A2UI/Renderer.d.ts +51 -0
  11. package/dist/components/A2UI/Renderer.js +116 -0
  12. package/dist/components/A2UI/catalog.d.ts +60 -0
  13. package/dist/components/A2UI/catalog.js +1079 -0
  14. package/dist/components/A2UI/index.d.ts +13 -0
  15. package/dist/components/A2UI/index.js +19 -0
  16. package/dist/components/A2UI/mapping.d.ts +2 -0
  17. package/dist/components/A2UI/mapping.js +100 -0
  18. package/dist/components/A2UI/types/components.d.ts +69 -0
  19. package/dist/components/A2UI/types/components.js +8 -0
  20. package/dist/components/A2UI/types/index.d.ts +11 -0
  21. package/dist/components/A2UI/types/index.js +9 -0
  22. package/dist/components/A2UI/types/messages.d.ts +67 -0
  23. package/dist/components/A2UI/types/messages.js +9 -0
  24. package/dist/components/A2UI/types/values.d.ts +78 -0
  25. package/dist/components/A2UI/types/values.js +41 -0
  26. package/dist/components/A2UI/utils/extractComponent.d.ts +27 -0
  27. package/dist/components/A2UI/utils/extractComponent.js +39 -0
  28. package/dist/components/A2UI/utils/index.d.ts +8 -0
  29. package/dist/components/A2UI/utils/index.js +8 -0
  30. package/dist/components/A2UI/utils/resolveTree.d.ts +30 -0
  31. package/dist/components/A2UI/utils/resolveTree.js +126 -0
  32. package/dist/components/A2UI/utils/resolveValue.d.ts +53 -0
  33. package/dist/components/A2UI/utils/resolveValue.js +100 -0
  34. package/dist/components/A2UI/wrappers/ChartWrapper.d.ts +20 -0
  35. package/dist/components/A2UI/wrappers/ChartWrapper.js +27 -0
  36. package/dist/components/A2UI/wrappers/index.d.ts +1 -0
  37. package/dist/components/A2UI/wrappers/index.js +1 -0
  38. package/dist/components/Accordion/Accordion.module.css +8 -8
  39. package/dist/components/ActionRow/ActionRow.js +1 -1
  40. package/dist/components/ActionRow/ActionRow.module.css +3 -3
  41. package/dist/components/Alert/Alert.module.css +4 -4
  42. package/dist/components/Avatar/Avatar.module.css +8 -8
  43. package/dist/components/Badge/Badge.module.css +8 -8
  44. package/dist/components/Breadcrumbs/Breadcrumbs.module.css +3 -3
  45. package/dist/components/Button/Button.module.css +17 -11
  46. package/dist/components/Card/Card.d.ts +17 -2
  47. package/dist/components/Card/Card.js +24 -2
  48. package/dist/components/Card/Card.module.css +35 -3
  49. package/dist/components/Chart/Chart.d.ts +15 -14
  50. package/dist/components/Chart/Chart.js +18 -25
  51. package/dist/components/Chart/Chart.module.css +17 -9
  52. package/dist/components/Chart/behaviors/Cursor.d.ts +38 -0
  53. package/dist/components/Chart/behaviors/Cursor.js +29 -0
  54. package/dist/components/Chart/behaviors/Dim.d.ts +37 -0
  55. package/dist/components/Chart/behaviors/Dim.js +52 -0
  56. package/dist/components/Chart/behaviors/Markers.d.ts +35 -0
  57. package/dist/components/Chart/behaviors/Markers.js +60 -0
  58. package/dist/components/Chart/behaviors/Selection.d.ts +26 -0
  59. package/dist/components/Chart/behaviors/Selection.js +31 -0
  60. package/dist/components/Chart/behaviors/SelectionUpdate.d.ts +29 -0
  61. package/dist/components/Chart/behaviors/SelectionUpdate.js +62 -0
  62. package/dist/components/Chart/behaviors/Tooltip.d.ts +30 -0
  63. package/dist/components/Chart/behaviors/Tooltip.js +27 -0
  64. package/dist/components/Chart/behaviors/index.d.ts +6 -0
  65. package/dist/components/Chart/behaviors/index.js +6 -0
  66. package/dist/components/Chart/context.d.ts +3 -0
  67. package/dist/components/Chart/{ChartContext.js → context.js} +1 -1
  68. package/dist/components/Chart/hooks/useChartBehaviors.d.ts +3 -0
  69. package/dist/components/Chart/hooks/useChartBehaviors.js +85 -0
  70. package/dist/components/Chart/sensors/DataHoverSensor/DataHoverSensor.d.ts +31 -0
  71. package/dist/components/Chart/sensors/DataHoverSensor/DataHoverSensor.js +58 -0
  72. package/dist/components/Chart/sensors/DataHoverSensor/index.d.ts +1 -0
  73. package/dist/components/Chart/sensors/DataHoverSensor/index.js +1 -0
  74. package/dist/components/Chart/sensors/KeyboardSensor.d.ts +8 -0
  75. package/dist/components/Chart/sensors/KeyboardSensor.js +82 -0
  76. package/dist/components/Chart/sensors/SelectionSensor.d.ts +8 -0
  77. package/dist/components/Chart/sensors/SelectionSensor.js +41 -0
  78. package/dist/components/Chart/sensors/SensorManager/SensorManager.d.ts +10 -0
  79. package/dist/components/Chart/sensors/SensorManager/SensorManager.js +86 -0
  80. package/dist/components/Chart/sensors/SensorManager/index.d.ts +1 -0
  81. package/dist/components/Chart/sensors/SensorManager/index.js +1 -0
  82. package/dist/components/Chart/sensors/index.d.ts +4 -0
  83. package/dist/components/Chart/sensors/index.js +4 -0
  84. package/dist/components/Chart/sensors/utils/search.d.ts +15 -0
  85. package/dist/components/Chart/sensors/utils/search.js +40 -0
  86. package/dist/components/Chart/sensors/utils/strategies/BinaryXStrategy/index.d.ts +14 -0
  87. package/dist/components/Chart/sensors/utils/strategies/BinaryXStrategy/index.js +65 -0
  88. package/dist/components/Chart/sensors/utils/strategies/LinearStrategy/index.d.ts +19 -0
  89. package/dist/components/Chart/sensors/utils/strategies/LinearStrategy/index.js +50 -0
  90. package/dist/components/Chart/sensors/utils/strategies/QuadtreeStrategy/index.d.ts +17 -0
  91. package/dist/components/Chart/sensors/utils/strategies/QuadtreeStrategy/index.js +51 -0
  92. package/dist/components/Chart/sensors/utils/strategies/types.d.ts +17 -0
  93. package/dist/components/Chart/state/EventContext.d.ts +18 -0
  94. package/dist/components/Chart/state/EventContext.js +65 -0
  95. package/dist/components/Chart/state/store/chart.store.d.ts +52 -0
  96. package/dist/components/Chart/state/store/chart.store.js +140 -0
  97. package/dist/components/Chart/state/store/createStore.d.ts +12 -0
  98. package/dist/components/Chart/state/store/createStore.js +23 -0
  99. package/dist/components/Chart/state/store/slices/data.slice.d.ts +9 -0
  100. package/dist/components/Chart/state/store/slices/data.slice.js +7 -0
  101. package/dist/components/Chart/state/store/slices/dimensions.slice.d.ts +21 -0
  102. package/dist/components/Chart/state/store/slices/dimensions.slice.js +22 -0
  103. package/dist/components/Chart/state/store/slices/interactions.slice.d.ts +4 -0
  104. package/dist/components/Chart/state/store/slices/interactions.slice.js +3 -0
  105. package/dist/components/Chart/state/store/slices/lifecycle.slice.d.ts +9 -0
  106. package/dist/components/Chart/state/store/slices/lifecycle.slice.js +7 -0
  107. package/dist/components/Chart/state/store/slices/scales.slice.d.ts +8 -0
  108. package/dist/components/Chart/state/store/slices/scales.slice.js +3 -0
  109. package/dist/components/Chart/state/store/slices/series.slice.d.ts +8 -0
  110. package/dist/components/Chart/state/store/slices/series.slice.js +52 -0
  111. package/dist/components/Chart/subcomponents/Axis/Axis.d.ts +1 -0
  112. package/dist/components/Chart/subcomponents/Axis/Axis.js +73 -0
  113. package/dist/components/Chart/subcomponents/Axis/Axis.module.css +34 -0
  114. package/dist/components/Chart/subcomponents/BarSeries/BarSeries.d.ts +13 -0
  115. package/dist/components/Chart/subcomponents/BarSeries/BarSeries.js +95 -0
  116. package/dist/components/Chart/subcomponents/BarSeries/BarSeries.module.css +10 -0
  117. package/dist/components/Chart/subcomponents/Cursor/Cursor.d.ts +15 -0
  118. package/dist/components/Chart/subcomponents/Cursor/Cursor.js +51 -0
  119. package/dist/components/Chart/subcomponents/Cursor/Cursor.module.css +14 -0
  120. package/dist/components/Chart/subcomponents/CustomSeries/CustomSeries.d.ts +4 -0
  121. package/dist/components/Chart/subcomponents/CustomSeries/CustomSeries.js +95 -0
  122. package/dist/components/Chart/subcomponents/CustomSeries/CustomSeries.module.css +4 -0
  123. package/dist/components/Chart/subcomponents/CustomSeries/index.d.ts +1 -0
  124. package/dist/components/Chart/subcomponents/CustomSeries/index.js +1 -0
  125. package/dist/components/Chart/subcomponents/Footer/Footer.d.ts +8 -0
  126. package/dist/components/Chart/{ChartFooter.js → subcomponents/Footer/Footer.js} +4 -4
  127. package/dist/components/Chart/subcomponents/Footer/Footer.module.css +4 -0
  128. package/dist/components/Chart/subcomponents/Footer/index.d.ts +2 -0
  129. package/dist/components/Chart/subcomponents/Footer/index.js +1 -0
  130. package/dist/components/Chart/subcomponents/Grid/Grid.d.ts +1 -0
  131. package/dist/components/Chart/subcomponents/Grid/Grid.js +16 -0
  132. package/dist/components/Chart/subcomponents/Grid/Grid.module.css +12 -0
  133. package/dist/components/Chart/subcomponents/Header/Header.d.ts +9 -0
  134. package/dist/components/Chart/subcomponents/Header/Header.js +13 -0
  135. package/dist/components/Chart/subcomponents/Header/Header.module.css +8 -0
  136. package/dist/components/Chart/subcomponents/Header/index.d.ts +2 -0
  137. package/dist/components/Chart/subcomponents/Header/index.js +1 -0
  138. package/dist/components/Chart/subcomponents/InteractionLayer/InteractionLayer.d.ts +13 -0
  139. package/dist/components/Chart/subcomponents/InteractionLayer/InteractionLayer.js +157 -0
  140. package/dist/components/Chart/{ChartLegend.d.ts → subcomponents/Legend/Legend.d.ts} +3 -3
  141. package/dist/components/Chart/{ChartLegend.js → subcomponents/Legend/Legend.js} +12 -11
  142. package/dist/components/Chart/subcomponents/Legend/Legend.module.css +33 -0
  143. package/dist/components/Chart/subcomponents/Legend/index.d.ts +2 -0
  144. package/dist/components/Chart/subcomponents/Legend/index.js +1 -0
  145. package/dist/components/Chart/subcomponents/LineSeries/LineSeries.d.ts +21 -0
  146. package/dist/components/Chart/subcomponents/LineSeries/LineSeries.js +147 -0
  147. package/dist/components/Chart/subcomponents/LineSeries/LineSeries.module.css +22 -0
  148. package/dist/components/Chart/subcomponents/Plot/Plot.d.ts +7 -0
  149. package/dist/components/Chart/subcomponents/Plot/Plot.js +42 -0
  150. package/dist/components/Chart/subcomponents/Root/Root.d.ts +8 -0
  151. package/dist/components/Chart/subcomponents/Root/Root.js +215 -0
  152. package/dist/components/Chart/subcomponents/Root/Root.module.css +83 -0
  153. package/dist/components/Chart/subcomponents/Root/index.d.ts +2 -0
  154. package/dist/components/Chart/subcomponents/Root/index.js +1 -0
  155. package/dist/components/Chart/subcomponents/ScatterSeries/ScatterSeries.d.ts +14 -0
  156. package/dist/components/Chart/subcomponents/ScatterSeries/ScatterSeries.js +80 -0
  157. package/dist/components/Chart/subcomponents/ScatterSeries/ScatterSeries.module.css +6 -0
  158. package/dist/components/Chart/subcomponents/Series/Series.d.ts +2 -0
  159. package/dist/components/Chart/subcomponents/Series/Series.js +35 -0
  160. package/dist/components/Chart/subcomponents/Series/Series.module.css +129 -0
  161. package/dist/components/Chart/subcomponents/Series/index.d.ts +1 -0
  162. package/dist/components/Chart/subcomponents/Series/index.js +2 -0
  163. package/dist/components/Chart/subcomponents/SeriesPoint/SeriesPoint.d.ts +12 -0
  164. package/dist/components/Chart/subcomponents/SeriesPoint/SeriesPoint.js +34 -0
  165. package/dist/components/Chart/subcomponents/SeriesPoint/SeriesPoint.module.css +9 -0
  166. package/dist/components/Chart/subcomponents/Tooltip/DefaultTooltip.d.ts +1 -0
  167. package/dist/components/Chart/subcomponents/Tooltip/DefaultTooltip.js +12 -0
  168. package/dist/components/Chart/subcomponents/Tooltip/Tooltip.d.ts +10 -0
  169. package/dist/components/Chart/subcomponents/Tooltip/Tooltip.js +98 -0
  170. package/dist/components/Chart/subcomponents/Tooltip/Tooltip.module.css +68 -0
  171. package/dist/components/Chart/subcomponents/Tooltip/types.d.ts +12 -0
  172. package/dist/components/Chart/subcomponents/index.d.ts +11 -0
  173. package/dist/components/Chart/subcomponents/index.js +13 -0
  174. package/dist/components/Chart/tests/chart-test-utils.d.ts +10 -0
  175. package/dist/components/Chart/tests/chart-test-utils.js +43 -0
  176. package/dist/components/Chart/types/accessors.d.ts +9 -0
  177. package/dist/components/Chart/types/accessors.js +12 -0
  178. package/dist/components/Chart/types/common.d.ts +1 -0
  179. package/dist/components/Chart/types/config.d.ts +22 -0
  180. package/dist/components/Chart/types/context.d.ts +77 -0
  181. package/dist/components/Chart/types/context.js +1 -0
  182. package/dist/components/Chart/types/events.d.ts +69 -0
  183. package/dist/components/Chart/types/events.js +1 -0
  184. package/dist/components/Chart/types/index.d.ts +11 -0
  185. package/dist/components/Chart/types/index.js +10 -0
  186. package/dist/components/Chart/types/interaction.d.ts +50 -0
  187. package/dist/components/Chart/types/interaction.js +20 -0
  188. package/dist/components/Chart/types/legend.d.ts +7 -0
  189. package/dist/components/Chart/types/legend.js +4 -0
  190. package/dist/components/Chart/types/props.d.ts +26 -0
  191. package/dist/components/Chart/types/props.js +1 -0
  192. package/dist/components/Chart/types/scales.d.ts +4 -0
  193. package/dist/components/Chart/types/scales.js +1 -0
  194. package/dist/components/Chart/types/selection.d.ts +3 -0
  195. package/dist/components/Chart/types/selection.js +1 -0
  196. package/dist/components/Chart/types/series.d.ts +32 -0
  197. package/dist/components/Chart/types/series.js +1 -0
  198. package/dist/components/Chart/utils/Reposition/Reposition.d.ts +120 -0
  199. package/dist/components/Chart/utils/Reposition/Reposition.js +256 -0
  200. package/dist/components/Chart/utils/Reposition/edgeDetection.d.ts +67 -0
  201. package/dist/components/Chart/utils/Reposition/edgeDetection.js +51 -0
  202. package/dist/components/Chart/utils/Reposition/index.d.ts +7 -0
  203. package/dist/components/Chart/utils/Reposition/index.js +5 -0
  204. package/dist/components/Chart/utils/accessors.d.ts +5 -0
  205. package/dist/components/Chart/utils/accessors.js +9 -0
  206. package/dist/components/Chart/utils/componentDetection.d.ts +20 -0
  207. package/dist/components/Chart/utils/componentDetection.js +47 -0
  208. package/dist/components/Chart/utils/coordinates.d.ts +38 -0
  209. package/dist/components/Chart/utils/coordinates.js +56 -0
  210. package/dist/components/Chart/utils/d3.d.ts +340 -0
  211. package/dist/components/Chart/utils/d3.js +7 -0
  212. package/dist/components/Chart/utils/hooks.d.ts +10 -0
  213. package/dist/components/Chart/utils/hooks.js +29 -0
  214. package/dist/components/Chart/utils/interaction.d.ts +15 -0
  215. package/dist/components/Chart/utils/interaction.js +110 -0
  216. package/dist/components/Chart/utils/path.d.ts +5 -0
  217. package/dist/components/Chart/utils/path.js +41 -0
  218. package/dist/components/Chart/utils/scales.d.ts +17 -0
  219. package/dist/components/Chart/utils/scales.js +41 -0
  220. package/dist/components/Chart/utils/shapes.d.ts +4 -0
  221. package/dist/components/Chart/utils/shapes.js +20 -0
  222. package/dist/components/Checkbox/Checkbox.module.css +8 -8
  223. package/dist/components/Chip/Chip.d.ts +2 -2
  224. package/dist/components/Chip/Chip.js +2 -1
  225. package/dist/components/Chip/Chip.module.css +27 -24
  226. package/dist/components/Combobox/Combobox.js +1 -1
  227. package/dist/components/Combobox/Combobox.module.css +30 -24
  228. package/dist/components/CopyButton/CopyButton.d.ts +12 -0
  229. package/dist/components/CopyButton/CopyButton.js +36 -0
  230. package/dist/components/CopyButton/CopyButton.module.css +91 -0
  231. package/dist/components/CopyButton/index.d.ts +1 -0
  232. package/dist/components/CopyButton/index.js +1 -0
  233. package/dist/components/Drawer/Drawer.d.ts +1 -0
  234. package/dist/components/Drawer/Drawer.js +1 -2
  235. package/dist/components/Drawer/Drawer.module.css +9 -8
  236. package/dist/components/Dropdown/Dropdown.module.css +4 -4
  237. package/dist/components/FileUpload/FileUpload.module.css +21 -21
  238. package/dist/components/Form/Form.module.css +2 -2
  239. package/dist/components/Input/Input.module.css +14 -12
  240. package/dist/components/Label/Label.module.css +2 -2
  241. package/dist/components/Layout/Box.d.ts +41 -0
  242. package/dist/components/Layout/Box.js +99 -0
  243. package/dist/components/Layout/Layout.d.ts +6 -10
  244. package/dist/components/Layout/Layout.js +7 -6
  245. package/dist/components/Layout/Layout.module.css +2 -2
  246. package/dist/components/Link/Link.module.css +5 -5
  247. package/dist/components/Modal/Modal.d.ts +1 -0
  248. package/dist/components/Modal/Modal.js +1 -1
  249. package/dist/components/Modal/Modal.module.css +12 -12
  250. package/dist/components/Page/Page.module.css +4 -3
  251. package/dist/components/Pagination/Pagination.js +1 -1
  252. package/dist/components/Pagination/Pagination.module.css +21 -7
  253. package/dist/components/Popover/Popover.module.css +1 -1
  254. package/dist/components/ProgressBar/ProgressBar.module.css +3 -3
  255. package/dist/components/RadioGroup/RadioGroup.module.css +9 -9
  256. package/dist/components/Select/Select.js +1 -1
  257. package/dist/components/Select/Select.module.css +11 -11
  258. package/dist/components/Sheet/Sheet.d.ts +1 -0
  259. package/dist/components/Sheet/Sheet.js +1 -3
  260. package/dist/components/Sheet/Sheet.module.css +9 -9
  261. package/dist/components/Sidebar/Sidebar.d.ts +27 -0
  262. package/dist/components/Sidebar/Sidebar.js +82 -0
  263. package/dist/components/Sidebar/Sidebar.module.css +84 -0
  264. package/dist/components/Sidebar/context.d.ts +3 -0
  265. package/dist/components/Sidebar/context.js +9 -0
  266. package/dist/components/Sidebar/hooks.d.ts +2 -0
  267. package/dist/components/Sidebar/hooks.js +14 -0
  268. package/dist/components/Sidebar/index.d.ts +1 -0
  269. package/dist/components/Sidebar/index.js +1 -0
  270. package/dist/components/Sidebar/subcomponents/Footer/Footer.d.ts +2 -0
  271. package/dist/components/Sidebar/subcomponents/Footer/Footer.js +6 -0
  272. package/dist/components/Sidebar/subcomponents/Footer/Footer.module.css +6 -0
  273. package/dist/components/Sidebar/subcomponents/Footer/index.d.ts +1 -0
  274. package/dist/components/Sidebar/subcomponents/Footer/index.js +1 -0
  275. package/dist/components/Sidebar/subcomponents/Group/Group.d.ts +2 -0
  276. package/dist/components/Sidebar/subcomponents/Group/Group.js +16 -0
  277. package/dist/components/Sidebar/subcomponents/Group/Group.module.css +86 -0
  278. package/dist/components/Sidebar/subcomponents/Group/index.d.ts +1 -0
  279. package/dist/components/Sidebar/subcomponents/Group/index.js +1 -0
  280. package/dist/components/Sidebar/subcomponents/Header/Header.d.ts +2 -0
  281. package/dist/components/Sidebar/subcomponents/Header/Header.js +6 -0
  282. package/dist/components/Sidebar/subcomponents/Header/Header.module.css +11 -0
  283. package/dist/components/Sidebar/subcomponents/Header/index.d.ts +1 -0
  284. package/dist/components/Sidebar/subcomponents/Header/index.js +1 -0
  285. package/dist/components/Sidebar/subcomponents/Item/Item.d.ts +5 -0
  286. package/dist/components/Sidebar/subcomponents/Item/Item.js +29 -0
  287. package/dist/components/Sidebar/subcomponents/Item/Item.module.css +56 -0
  288. package/dist/components/Sidebar/subcomponents/Item/index.d.ts +1 -0
  289. package/dist/components/Sidebar/subcomponents/Item/index.js +1 -0
  290. package/dist/components/Sidebar/subcomponents/MobileOverlay/MobileOverlay.d.ts +3 -0
  291. package/dist/components/Sidebar/subcomponents/MobileOverlay/MobileOverlay.js +38 -0
  292. package/dist/components/Sidebar/subcomponents/MobileOverlay/MobileOverlay.module.css +39 -0
  293. package/dist/components/Sidebar/subcomponents/MobileOverlay/index.d.ts +1 -0
  294. package/dist/components/Sidebar/subcomponents/MobileOverlay/index.js +1 -0
  295. package/dist/components/Sidebar/subcomponents/MobileTrigger/MobileTrigger.d.ts +2 -0
  296. package/dist/components/Sidebar/subcomponents/MobileTrigger/MobileTrigger.js +10 -0
  297. package/dist/components/Sidebar/subcomponents/MobileTrigger/MobileTrigger.module.css +5 -0
  298. package/dist/components/Sidebar/subcomponents/MobileTrigger/index.d.ts +1 -0
  299. package/dist/components/Sidebar/subcomponents/MobileTrigger/index.js +1 -0
  300. package/dist/components/Sidebar/subcomponents/Nav/Nav.d.ts +5 -0
  301. package/dist/components/Sidebar/subcomponents/Nav/Nav.js +8 -0
  302. package/dist/components/Sidebar/subcomponents/Nav/Nav.module.css +12 -0
  303. package/dist/components/Sidebar/subcomponents/Nav/index.d.ts +1 -0
  304. package/dist/components/Sidebar/subcomponents/Nav/index.js +1 -0
  305. package/dist/components/Sidebar/subcomponents/Rail/Rail.d.ts +2 -0
  306. package/dist/components/Sidebar/subcomponents/Rail/Rail.js +6 -0
  307. package/dist/components/Sidebar/subcomponents/Rail/Rail.module.css +64 -0
  308. package/dist/components/Sidebar/subcomponents/Rail/index.d.ts +1 -0
  309. package/dist/components/Sidebar/subcomponents/Rail/index.js +1 -0
  310. package/dist/components/Sidebar/subcomponents/Section/Section.d.ts +5 -0
  311. package/dist/components/Sidebar/subcomponents/Section/Section.js +23 -0
  312. package/dist/components/Sidebar/subcomponents/Section/Section.module.css +92 -0
  313. package/dist/components/Sidebar/subcomponents/Section/index.d.ts +1 -0
  314. package/dist/components/Sidebar/subcomponents/Section/index.js +1 -0
  315. package/dist/components/Sidebar/subcomponents/index.d.ts +9 -0
  316. package/dist/components/Sidebar/subcomponents/index.js +9 -0
  317. package/dist/components/Sidebar/types.d.ts +82 -0
  318. package/dist/components/Sidebar/types.js +1 -0
  319. package/dist/components/Sidebar/utils.d.ts +8 -0
  320. package/dist/components/Sidebar/utils.js +128 -0
  321. package/dist/components/Skeleton/Skeleton.module.css +4 -4
  322. package/dist/components/Slat/Slat.module.css +6 -6
  323. package/dist/components/Slider/Slider.js +1 -1
  324. package/dist/components/Slider/Slider.module.css +4 -4
  325. package/dist/components/SplitButton/SplitButton.module.css +16 -12
  326. package/dist/components/Switch/Switch.module.css +8 -8
  327. package/dist/components/Table/FilterBuilder/FilterBuilder.module.css +6 -6
  328. package/dist/components/Table/FilterBuilder/FilterConditionRow.module.css +7 -8
  329. package/dist/components/Table/FilterBuilder/FilterGroup.js +3 -6
  330. package/dist/components/Table/FilterBuilder/FilterGroup.module.css +61 -80
  331. package/dist/components/Table/FilterBuilder/FilterSheet.module.css +7 -7
  332. package/dist/components/Table/FilterBuilder/FilterSheetNested.js +2 -1
  333. package/dist/components/Table/Table.d.ts +6 -1
  334. package/dist/components/Table/Table.js +27 -2
  335. package/dist/components/Table/Table.module.css +27 -27
  336. package/dist/components/Table/TableHeaderFilter.module.css +13 -13
  337. package/dist/components/Tabs/Tabs.module.css +11 -26
  338. package/dist/components/Textarea/Textarea.module.css +5 -4
  339. package/dist/components/Toast/Toast.module.css +11 -11
  340. package/dist/index.d.ts +3 -0
  341. package/dist/index.js +3 -0
  342. package/dist/styles/globals.css +119 -2
  343. package/dist/styles/{tokens.d.ts → palettes.d.ts} +0 -60
  344. package/dist/styles/{tokens.js → palettes.js} +3 -74
  345. package/dist/styles/themes/definitions.d.ts +0 -240
  346. package/dist/styles/themes/definitions.js +1 -1
  347. package/dist/tsconfig.build.tsbuildinfo +1 -1
  348. package/package.json +9 -3
  349. package/dist/components/Chart/ChartContext.d.ts +0 -27
  350. package/dist/components/Chart/ChartFooter.d.ts +0 -8
  351. package/dist/components/Chart/ChartHeader.d.ts +0 -9
  352. package/dist/components/Chart/ChartHeader.js +0 -14
  353. package/dist/components/Chart/ChartPlot.d.ts +0 -12
  354. package/dist/components/Chart/ChartPlot.js +0 -223
  355. package/dist/components/Chart/ChartRoot.d.ts +0 -6
  356. package/dist/components/Chart/ChartRoot.js +0 -120
  357. package/dist/components/Chart/renderers.d.ts +0 -50
  358. package/dist/components/Chart/renderers.js +0 -389
  359. package/dist/components/Chart/types.d.ts +0 -86
  360. package/dist/components/Table/FilterBuilder/utils/tree-utils.test.js +0 -167
  361. package/dist/components/Table/utils/arrayFilter.test.js +0 -32
  362. package/dist/components/Table/utils/filterAst.test.js +0 -110
  363. /package/dist/components/Chart/{types.js → sensors/utils/strategies/types.js} +0 -0
  364. /package/dist/components/{Table/FilterBuilder/utils/tree-utils.test.d.ts → Chart/subcomponents/Tooltip/types.js} +0 -0
  365. /package/dist/components/{Table/utils/arrayFilter.test.d.ts → Chart/types/common.js} +0 -0
  366. /package/dist/components/{Table/utils/filterAst.test.d.ts → Chart/types/config.js} +0 -0
@@ -8,31 +8,38 @@ import { Chart } from "doom-design-system";
8
8
 
9
9
  ## Props
10
10
 
11
- | Prop | Type | Default | Description |
12
- | --------------- | --------------------------- | -------- | -------------------------- |
13
- | `data` | `T[]` | required | Data array |
14
- | `config` | `ChartConfig` | required | Series configuration |
15
- | `type` | `"line" \| "area" \| "bar"` | | Chart type (shorthand API) |
16
- | `xKey` | `string` | required | X-axis data key |
17
- | `height` | `number` | `300` | Chart height |
18
- | `title` | `string` | — | Chart title |
19
- | `subtitle` | `string` | — | Chart subtitle |
20
- | `withLegend` | `boolean` | | Show legend |
21
- | `render` | `(ctx) => ReactNode` | | Custom render function |
22
- | `renderTooltip` | `(ctx) => ReactNode` | | Custom tooltip |
23
-
24
- ## Config
11
+ | Prop | Type | Default | Description |
12
+ | --------------- | ---------------------------- | ----------- | ----------------------------------- |
13
+ | `data` | `T[]` | required | Data array |
14
+ | `x` | `(d: T) => string \| number` | required | Accessor function for X-axis values |
15
+ | `y` | `(d: T) => number` | required | Accessor function for Y-axis values |
16
+ | `type` | `"line" \| "area" \| "bar"` | | Chart type (shorthand API) |
17
+ | `title` | `string \| ReactNode` | | Chart title |
18
+ | `subtitle` | `string` | — | Chart subtitle |
19
+ | `withLegend` | `boolean` | — | Show legend |
20
+ | `withFrame` | `boolean` | `true` | Render card frame around chart |
21
+ | `variant` | `"default" \| "solid"` | `"default"` | Visual variant |
22
+ | `flat` | `boolean` | `false` | Remove shadow |
23
+ | `d3Config` | `ChartConfig` | — | D3 configuration options |
24
+ | `render` | `(ctx: DrawContext) => void` | — | Custom D3 render function |
25
+ | `renderTooltip` | `(data: T) => ReactNode` | — | Custom tooltip renderer |
26
+ | `onValueChange` | `(data: T \| null) => void` | — | Callback when hovered value changes |
27
+ | `style` | `CSSProperties` | — | Inline styles |
28
+ | `className` | `string` | — | CSS class name |
29
+
30
+ ## D3 Config
25
31
 
26
32
  ```tsx
27
- const config = {
28
- revenue: {
29
- label: "Revenue",
30
- color: "var(--primary)",
31
- },
32
- profit: {
33
- label: "Profit",
34
- color: "var(--success)",
35
- },
33
+ const d3Config = {
34
+ margin: { top: 20, right: 20, bottom: 40, left: 50 },
35
+ grid: true,
36
+ withGradient: true,
37
+ showDots: true,
38
+ hideYAxisDomain: true,
39
+ xAxisLabel: "Month",
40
+ yAxisLabel: "Revenue (USD)",
41
+ curve: d3Shape.curveMonotoneX, // requires import from d3-shape
42
+ animate: true,
36
43
  };
37
44
  ```
38
45
 
@@ -41,31 +48,59 @@ const config = {
41
48
  ### Shorthand API
42
49
 
43
50
  ```tsx
51
+ const data = [
52
+ { month: "Jan", revenue: 4500 },
53
+ { month: "Feb", revenue: 5200 },
54
+ { month: "Mar", revenue: 4900 },
55
+ ];
56
+
44
57
  <Chart
45
- type="line"
58
+ type="area"
46
59
  data={data}
47
- config={config}
48
- xKey="month"
60
+ x={(d) => d.month}
61
+ y={(d) => d.revenue}
49
62
  title="Monthly Revenue"
50
63
  withLegend
51
- />
64
+ d3Config={{ grid: true, withGradient: true }}
65
+ />;
52
66
  ```
53
67
 
54
68
  ### Composition API
55
69
 
56
70
  ```tsx
57
- <Chart.Root data={data} config={config} xKey="month">
71
+ <Chart.Root
72
+ data={data}
73
+ x={(d) => d.label}
74
+ y={(d) => d.value}
75
+ d3Config={{ grid: true, showDots: true }}
76
+ >
58
77
  <Chart.Header title="Sales" subtitle="Last 12 months">
59
78
  <Chart.Legend />
60
79
  </Chart.Header>
61
- <Chart.Plot type="area" />
62
- <Chart.Footer>Custom footer</Chart.Footer>
80
+ <Chart.Plot type="area" color="var(--primary)" />
81
+ <Chart.Footer>Custom footer content</Chart.Footer>
63
82
  </Chart.Root>
64
83
  ```
65
84
 
85
+ ### Custom D3 Render
86
+
87
+ ```tsx
88
+ <Chart
89
+ data={pieData}
90
+ x={(d) => d.label}
91
+ y={(d) => d.value}
92
+ d3Config={{ showAxes: false, grid: false }}
93
+ render={(ctx) => {
94
+ // Full D3 access via ctx.g (SVG group)
95
+ // ctx.data, ctx.xScale, ctx.yScale available
96
+ }}
97
+ />
98
+ ```
99
+
66
100
  ## Guidelines
67
101
 
68
- - Use shorthand API for simple charts.
69
- - Use composition API for custom layouts.
70
- - Built on D3.js; supports line, area, and bar charts.
71
- - Supports gradients with `withGradient` prop on Plot.
102
+ - Use shorthand API for simple line/area/bar charts.
103
+ - Use composition API for custom layouts with headers/footers.
104
+ - Use `render` prop for fully custom D3 visualizations (pie, treemap, etc.).
105
+ - Built on D3.js with full access to scales and selections.
106
+ - Supports touch interactions and responsive sizing.
@@ -0,0 +1,41 @@
1
+ # CopyButton Component
2
+
3
+ ## Import
4
+
5
+ ```tsx
6
+ import { CopyButton } from "doom-design-system";
7
+ ```
8
+
9
+ ## Props
10
+
11
+ | Prop | Type | Default | Description |
12
+ | ------------ | -------------- | ------------- | ------------------------ |
13
+ | `value` | `string` | **required** | Text to copy |
14
+ | `variant` | Button variant | `"secondary"` | Visual style |
15
+ | `size` | Button size | `"md"` | Button size |
16
+ | `copiedText` | `string` | `"Copied!"` | Text shown after copy |
17
+ | `resetDelay` | `number` | `2000` | Ms before reset to orig. |
18
+
19
+ Plus all standard `<button>` HTML attributes.
20
+
21
+ ## Usage
22
+
23
+ ```tsx
24
+ <CopyButton value={textToCopy}>Copy</CopyButton>
25
+
26
+ <CopyButton value={code} variant="ghost" size="sm">
27
+ Copy Code
28
+ </CopyButton>
29
+
30
+ <CopyButton copiedText="Done!" value={referenceDoc}>
31
+ Copy Reference
32
+ </CopyButton>
33
+ ```
34
+
35
+ ## Behavior
36
+
37
+ - **Tactile Pop Animation**: Press effect on click, springy scale-in for success state
38
+ - Text changes to `copiedText` (default: "Copied!")
39
+ - Button width preserved (doesn't jump)
40
+ - Auto-resets after `resetDelay` ms (default 2s)
41
+ - Variant stays the same (no jarring color change)
@@ -0,0 +1,92 @@
1
+ # Sidebar Component
2
+
3
+ The Sidebar is a complex navigation component supporting dual-mode (Standard and Rail), collapsible sections, groups, and hover-peek functionality.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { Sidebar } from "doom-design-system";
9
+ ```
10
+
11
+ ## Props
12
+
13
+ ### Sidebar
14
+
15
+ | Prop | Type | Default | Description |
16
+ | ----------------- | ---------------------------------------------- | ------- | ---------------------------------------------------------------- |
17
+ | `withRail` | `boolean` | `false` | Enables the two-column rail navigation. |
18
+ | `collapsed` | `boolean` | `false` | Collapses the main panel (standard) or whole sidebar (rail). |
19
+ | `activeSection` | `string` | — | The ID of the currently active Section. |
20
+ | `activeItem` | `string` | — | The `href` of the currently active Item. |
21
+ | `onNavigate` | `(href: string, e?: React.MouseEvent) => void` | — | Navigation callback. |
22
+ | `onSectionChange` | `(id: string) => void` | — | Callback when the active section changes (useful for Rail mode). |
23
+ | `brandIcon` | `React.ReactNode` | — | Icon displayed at the top of the Sidebar/Rail. |
24
+
25
+ ### Sidebar.Section
26
+
27
+ | Prop | Type | Default | Description |
28
+ | ---------- | ----------------- | ------- | ---------------------------------------------- |
29
+ | `id` | `string` | — | Unique identifier for section switching. |
30
+ | `label` | `string` | — | Descriptive label for the section. |
31
+ | `icon` | `React.ReactNode` | — | Icon for the section (required for Rail mode). |
32
+ | `expanded` | `boolean` | — | Controlled expansion state. |
33
+
34
+ ### Sidebar.Group
35
+
36
+ | Prop | Type | Default | Description |
37
+ | ---------- | ----------------- | ------- | -------------------------------- |
38
+ | `id` | `string` | — | Unique identifier for the group. |
39
+ | `label` | `string` | — | Descriptive label for the group. |
40
+ | `icon` | `React.ReactNode` | — | Optional icon for the group. |
41
+ | `expanded` | `boolean` | — | Controlled expansion state. |
42
+
43
+ ### Sidebar.Item
44
+
45
+ | Prop | Type | Default | Description |
46
+ | --------------- | ----------------- | ------- | ----------------------------------------------- |
47
+ | `href` | `string` | — | Link destination. |
48
+ | `icon` | `React.ReactNode` | — | Optional icon. |
49
+ | `appendContent` | `React.ReactNode` | — | Content (badges, chips) at the end of the item. |
50
+
51
+ ## Usage
52
+
53
+ ### Standard Sidebar
54
+
55
+ ```tsx
56
+ <Sidebar activeItem="/home">
57
+ <Sidebar.Header>App Logo</Sidebar.Header>
58
+ <Sidebar.Nav>
59
+ <Sidebar.Section id="main" label="Main" icon={<Home />}>
60
+ <Sidebar.Item href="/home" icon={<Home />}>
61
+ Dashboard
62
+ </Sidebar.Item>
63
+ <Sidebar.Item href="/inbox">Inbox</Sidebar.Item>
64
+ </Sidebar.Section>
65
+ </Sidebar.Nav>
66
+ </Sidebar>
67
+ ```
68
+
69
+ ### Rail Mode with Groups
70
+
71
+ ```tsx
72
+ <Sidebar withRail activeSection="admin">
73
+ <Sidebar.Nav>
74
+ <Sidebar.Section id="main" label="Main" icon={<Home />}>
75
+ <Sidebar.Item href="/home">Home</Sidebar.Item>
76
+ </Sidebar.Section>
77
+ <Sidebar.Section id="admin" label="Admin" icon={<Settings />}>
78
+ <Sidebar.Group id="users" label="User Management">
79
+ <Sidebar.Item href="/users/list">User List</Sidebar.Item>
80
+ <Sidebar.Item href="/users/permissions">Permissions</Sidebar.Item>
81
+ </Sidebar.Group>
82
+ </Sidebar.Section>
83
+ </Sidebar.Nav>
84
+ </Sidebar>
85
+ ```
86
+
87
+ ## Guidelines
88
+
89
+ - **Rail Icons**: Ensure every `Sidebar.Section` has an `icon` if `withRail` is enabled.
90
+ - **Snappy UI**: The component uses instant transitions for a high-performance feel.
91
+ - **Auto-collapse**: In rail mode, clicking an item auto-collapses to save space.
92
+ - **Accessibility**: Collapsed content is hidden via `display: none` to remove it from keyboard tab order.
@@ -112,6 +112,7 @@ function ThemeSwitcher() {
112
112
  - [breadcrumbs.md](components/breadcrumbs.md) — Navigation hierarchy
113
113
  - [link.md](components/link.md) — Anchor links
114
114
  - [pagination.md](components/pagination.md) — Page navigation
115
+ - [sidebar.md](components/sidebar.md) — Multi-mode side navigation
115
116
  - [tabs.md](components/tabs.md) — Tab navigation
116
117
 
117
118
  ### Forms
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Doom Design System
2
2
 
3
- [![Doom CI](https://github.com/ornelasEduardo/doom/actions/workflows/ci.yml/badge.svg)](https://github.com/ornelasEduardo/doom/actions/workflows/ci.yml)
3
+ [![Doom CI](https://github.com/ornelasEduardo/doom/actions/workflows/main.yml/badge.svg)](https://github.com/ornelasEduardo/doom/actions/workflows/main.yml)
4
4
  [![npm version](https://img.shields.io/npm/v/doom-design-system.svg)](https://www.npmjs.com/package/doom-design-system)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
6
 
@@ -0,0 +1,51 @@
1
+ import React from "react";
2
+ import type { A2UIComponentEntry, SurfaceUpdateMessage } from "./types";
3
+ /**
4
+ * Props for the A2UI Renderer component.
5
+ */
6
+ export interface RendererProps {
7
+ /**
8
+ * A2UI surface update payload or array of component entries.
9
+ *
10
+ * Can be either:
11
+ * - A full `surfaceUpdate` payload with surfaceId and components
12
+ * - Just the components array for simpler usage
13
+ */
14
+ surface: SurfaceUpdateMessage["surfaceUpdate"] | A2UIComponentEntry[];
15
+ /**
16
+ * ID of the root component to render.
17
+ *
18
+ * Required when `surface` is a components array.
19
+ * Optional when `surface` is a full payload (uses the first component if omitted).
20
+ */
21
+ rootId?: string;
22
+ /**
23
+ * Data model for resolving path bindings.
24
+ *
25
+ * When components use `{ path: "/user/name" }` values,
26
+ * they are resolved against this object.
27
+ */
28
+ dataModel?: Record<string, unknown>;
29
+ }
30
+ /**
31
+ * A2UI Renderer Component
32
+ *
33
+ * Renders A2UI component trees following the official message schema.
34
+ * Handles adjacency list resolution, data binding, and component mapping.
35
+ *
36
+ * @see https://a2ui.org/reference/messages/
37
+ *
38
+ * @example
39
+ * ```tsx
40
+ * const surface = {
41
+ * surfaceId: "main",
42
+ * components: [
43
+ * { id: "root", component: { Text: { text: { literalString: "Hello!" } } } }
44
+ * ]
45
+ * };
46
+ *
47
+ * <Renderer surface={surface} rootId="root" />
48
+ * ```
49
+ */
50
+ export declare function Renderer({ surface, rootId, dataModel, }: RendererProps): React.ReactElement | null;
51
+ export type { RendererProps as A2UIProps };
@@ -0,0 +1,116 @@
1
+ "use client";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ import { createElement as _createElement } from "react";
14
+ import { jsx as _jsx } from "react/jsx-runtime";
15
+ import { componentMap } from "./mapping.js";
16
+ import { isA2UITextValue } from "./types/index.js";
17
+ import { resolveTextValue, resolveTree } from "./utils/index.js";
18
+ /**
19
+ * A2UI Renderer Component
20
+ *
21
+ * Renders A2UI component trees following the official message schema.
22
+ * Handles adjacency list resolution, data binding, and component mapping.
23
+ *
24
+ * @see https://a2ui.org/reference/messages/
25
+ *
26
+ * @example
27
+ * ```tsx
28
+ * const surface = {
29
+ * surfaceId: "main",
30
+ * components: [
31
+ * { id: "root", component: { Text: { text: { literalString: "Hello!" } } } }
32
+ * ]
33
+ * };
34
+ *
35
+ * <Renderer surface={surface} rootId="root" />
36
+ * ```
37
+ */
38
+ export function Renderer({ surface, rootId, dataModel = {}, }) {
39
+ var _a;
40
+ // Normalize input to components array
41
+ const components = Array.isArray(surface) ? surface : surface.components;
42
+ if (!components || components.length === 0) {
43
+ return null;
44
+ }
45
+ // Determine root ID
46
+ const effectiveRootId = rootId !== null && rootId !== void 0 ? rootId : (_a = components[0]) === null || _a === void 0 ? void 0 : _a.id;
47
+ if (!effectiveRootId) {
48
+ console.warn("A2UI: No root ID provided and no components available");
49
+ return null;
50
+ }
51
+ // Resolve adjacency list to tree
52
+ const tree = resolveTree(components, effectiveRootId);
53
+ if (!tree) {
54
+ return null;
55
+ }
56
+ // Render the resolved tree
57
+ return _jsx(NodeRenderer, { dataModel: dataModel, node: tree });
58
+ }
59
+ /**
60
+ * Internal component that renders a single resolved node.
61
+ */
62
+ function NodeRenderer({ node, dataModel, }) {
63
+ var _a, _b;
64
+ const { id, type, props, children } = node;
65
+ // Look up component (case-insensitive)
66
+ const Component = (_b = (_a = componentMap[type]) !== null && _a !== void 0 ? _a : componentMap[type.toLowerCase()]) !== null && _b !== void 0 ? _b : null;
67
+ if (!Component) {
68
+ console.warn(`A2UI: Unknown component type "${type}"`);
69
+ return null;
70
+ }
71
+ // Resolve any data-bound props (including text -> children mapping)
72
+ const resolvedProps = resolveProps(props, dataModel);
73
+ // Render tree children (from adjacency list resolution)
74
+ const renderedChildren = children.map((child, index) => {
75
+ var _a;
76
+ if (typeof child === "string") {
77
+ return child;
78
+ }
79
+ return (_jsx(NodeRenderer, { dataModel: dataModel, node: child }, (_a = child.id) !== null && _a !== void 0 ? _a : index));
80
+ });
81
+ // Determine final children:
82
+ // 1. If there are tree children (from adjacency list), use those
83
+ // 2. Otherwise, use resolved children from props (e.g., from text prop)
84
+ const finalChildren = renderedChildren.length > 0 ? renderedChildren : resolvedProps.children;
85
+ // Remove children from props since we're passing it explicitly
86
+ const { children: _ } = resolvedProps, propsWithoutChildren = __rest(resolvedProps, ["children"]);
87
+ return (_createElement(Component, Object.assign({}, propsWithoutChildren, { key: id }), finalChildren));
88
+ }
89
+ /**
90
+ * Resolves data-bound values in props.
91
+ *
92
+ * Walks through props and resolves any A2UI text values
93
+ * (literalString or path references) to their actual values.
94
+ *
95
+ * Also handles A2UI-to-React prop mapping:
96
+ * - `text` prop is mapped to `children` for React components
97
+ */
98
+ function resolveProps(props, dataModel) {
99
+ const resolved = {};
100
+ for (const [key, value] of Object.entries(props)) {
101
+ if (isA2UITextValue(value)) {
102
+ const resolvedValue = resolveTextValue(value, dataModel);
103
+ // Map A2UI 'text' prop to React 'children'
104
+ if (key === "text") {
105
+ resolved.children = resolvedValue;
106
+ }
107
+ else {
108
+ resolved[key] = resolvedValue;
109
+ }
110
+ }
111
+ else {
112
+ resolved[key] = value;
113
+ }
114
+ }
115
+ return resolved;
116
+ }
@@ -0,0 +1,60 @@
1
+ /**
2
+ * A2UI Component Catalog
3
+ *
4
+ * Machine-readable catalog of available components for AI/LLM consumption.
5
+ * This is the single source of truth for component metadata.
6
+ *
7
+ * @see https://a2ui.org/reference/messages/ for catalogId specification
8
+ */
9
+ /**
10
+ * Describes a single component prop
11
+ */
12
+ export interface PropDescriptor {
13
+ /** Prop name */
14
+ name: string;
15
+ /** TypeScript-style type description */
16
+ type: string;
17
+ /** Whether the prop is required */
18
+ required?: boolean;
19
+ /** Human-readable description */
20
+ description: string;
21
+ /** Default value if any */
22
+ default?: string;
23
+ }
24
+ /**
25
+ * Describes a component in the catalog
26
+ */
27
+ export interface ComponentDescriptor {
28
+ /** Component type key (matches mapping.tsx) */
29
+ type: string;
30
+ /** Human-readable name */
31
+ name: string;
32
+ /** Category for grouping */
33
+ category: "primitives" | "layout" | "navigation" | "feedback" | "data-display" | "actions";
34
+ /** Brief description */
35
+ description: string;
36
+ /** Whether this component receives text via the `text` prop (mapped to children) */
37
+ usesTextProp?: boolean;
38
+ /** List of key props */
39
+ props: PropDescriptor[];
40
+ }
41
+ /**
42
+ * The full component catalog
43
+ */
44
+ export declare const componentCatalog: ComponentDescriptor[];
45
+ /**
46
+ * Get component types grouped by category
47
+ */
48
+ export declare function getComponentsByCategory(): Record<string, ComponentDescriptor[]>;
49
+ /**
50
+ * Get a flat list of all component type keys
51
+ */
52
+ export declare function getComponentTypes(): string[];
53
+ /**
54
+ * Look up a component by type
55
+ */
56
+ export declare function getComponent(type: string): ComponentDescriptor | undefined;
57
+ /**
58
+ * Generate JSON catalog for A2UI catalogId endpoint
59
+ */
60
+ export declare function getCatalogJSON(): string;