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
@@ -0,0 +1,289 @@
1
+ # A2UI Examples
2
+
3
+ ## ⚠️ Text Prop Usage
4
+
5
+ **IMPORTANT**: Not all components support `text: { literalString }`. Check which prop to use:
6
+
7
+ | Component | ✅ Correct Prop | ❌ Don't Use |
8
+ | -------------------------------------------------- | ------------------------- | ------------ |
9
+ | `text`, `button`, `badge`, `chip`, `label`, `link` | `text: { literalString }` | - |
10
+ | `slat` | `label`, `secondaryLabel` | `text` |
11
+ | `alert` | `title`, `description` | `text` |
12
+ | `input` | `label`, `placeholder` | `text` |
13
+
14
+ ---
15
+
16
+ ## Example 1: Login Card
17
+
18
+ **User Request**: "A login card with email and password fields, and a submit button."
19
+
20
+ ```json
21
+ {
22
+ "surfaceId": "login",
23
+ "components": [
24
+ {
25
+ "id": "root",
26
+ "component": {
27
+ "card": {
28
+ "className": "p-6 w-full",
29
+ "style": { "maxWidth": "24rem" },
30
+ "child": "content"
31
+ }
32
+ }
33
+ },
34
+ {
35
+ "id": "content",
36
+ "component": {
37
+ "stack": {
38
+ "gap": 4,
39
+ "children": {
40
+ "explicitList": ["title", "email", "password", "submit"]
41
+ }
42
+ }
43
+ }
44
+ },
45
+ {
46
+ "id": "title",
47
+ "component": {
48
+ "text": { "variant": "h3", "text": { "literalString": "Login" } }
49
+ }
50
+ },
51
+ {
52
+ "id": "email",
53
+ "component": {
54
+ "input": { "label": "Email", "placeholder": "you@example.com" }
55
+ }
56
+ },
57
+ {
58
+ "id": "password",
59
+ "component": {
60
+ "input": { "label": "Password", "type": "password" }
61
+ }
62
+ },
63
+ {
64
+ "id": "submit",
65
+ "component": {
66
+ "button": {
67
+ "variant": "primary",
68
+ "className": "w-full",
69
+ "text": { "literalString": "Sign In" }
70
+ }
71
+ }
72
+ }
73
+ ]
74
+ }
75
+ ```
76
+
77
+ ## Example 2: Dashboard with Slats and Alerts
78
+
79
+ **User Request**: "Dashboard stats using slat components and a warning alert."
80
+
81
+ ```json
82
+ {
83
+ "surfaceId": "dashboard",
84
+ "components": [
85
+ {
86
+ "id": "root",
87
+ "component": {
88
+ "stack": {
89
+ "gap": 4,
90
+ "children": { "explicitList": ["stats-grid", "warning"] }
91
+ }
92
+ }
93
+ },
94
+ {
95
+ "id": "stats-grid",
96
+ "component": {
97
+ "grid": {
98
+ "columns": 3,
99
+ "gap": 4,
100
+ "children": {
101
+ "explicitList": ["users-slat", "revenue-slat", "growth-slat"]
102
+ }
103
+ }
104
+ }
105
+ },
106
+ {
107
+ "id": "users-slat",
108
+ "component": {
109
+ "slat": {
110
+ "label": "Total Users",
111
+ "secondaryLabel": "1,234"
112
+ }
113
+ }
114
+ },
115
+ {
116
+ "id": "revenue-slat",
117
+ "component": {
118
+ "slat": {
119
+ "label": "Revenue",
120
+ "secondaryLabel": "$45.2k"
121
+ }
122
+ }
123
+ },
124
+ {
125
+ "id": "growth-slat",
126
+ "component": {
127
+ "slat": {
128
+ "variant": "success",
129
+ "label": "Growth",
130
+ "secondaryLabel": "+12%"
131
+ }
132
+ }
133
+ },
134
+ {
135
+ "id": "warning",
136
+ "component": {
137
+ "alert": {
138
+ "variant": "warning",
139
+ "title": "Maintenance Scheduled",
140
+ "description": "System will be down for maintenance at 2:00 AM UTC."
141
+ }
142
+ }
143
+ }
144
+ ]
145
+ }
146
+ ```
147
+
148
+ ## Example 3: Data Binding
149
+
150
+ **User Request**: "A user greeting that displays the user's name from data."
151
+
152
+ ```json
153
+ {
154
+ "surfaceId": "greeting",
155
+ "components": [
156
+ {
157
+ "id": "root",
158
+ "component": {
159
+ "card": {
160
+ "className": "p-6",
161
+ "children": { "explicitList": ["welcome", "name"] }
162
+ }
163
+ }
164
+ },
165
+ {
166
+ "id": "welcome",
167
+ "component": {
168
+ "text": {
169
+ "variant": "small",
170
+ "className": "text-muted",
171
+ "text": { "literalString": "Welcome back," }
172
+ }
173
+ }
174
+ },
175
+ {
176
+ "id": "name",
177
+ "component": {
178
+ "text": {
179
+ "variant": "h2",
180
+ "text": { "path": "/user/name" }
181
+ }
182
+ }
183
+ }
184
+ ]
185
+ }
186
+ ```
187
+
188
+ **Data Model:**
189
+
190
+ ```json
191
+ {
192
+ "user": { "name": "Alice Chen" }
193
+ }
194
+ ```
195
+
196
+ ## Example 4: Navigation with Tabs
197
+
198
+ **User Request**: "A tabbed interface with Overview and Settings tabs."
199
+
200
+ ```json
201
+ {
202
+ "surfaceId": "tabbed-ui",
203
+ "components": [
204
+ {
205
+ "id": "root",
206
+ "component": {
207
+ "tabs": {
208
+ "defaultValue": "overview",
209
+ "children": { "explicitList": ["tab-list", "tab-body"] }
210
+ }
211
+ }
212
+ },
213
+ {
214
+ "id": "tab-list",
215
+ "component": {
216
+ "tabs-list": {
217
+ "children": { "explicitList": ["tab-overview", "tab-settings"] }
218
+ }
219
+ }
220
+ },
221
+ {
222
+ "id": "tab-overview",
223
+ "component": {
224
+ "tabs-trigger": {
225
+ "value": "overview",
226
+ "text": { "literalString": "Overview" }
227
+ }
228
+ }
229
+ },
230
+ {
231
+ "id": "tab-settings",
232
+ "component": {
233
+ "tabs-trigger": {
234
+ "value": "settings",
235
+ "text": { "literalString": "Settings" }
236
+ }
237
+ }
238
+ },
239
+ {
240
+ "id": "tab-body",
241
+ "component": {
242
+ "tabs-body": {
243
+ "children": {
244
+ "explicitList": ["content-overview", "content-settings"]
245
+ }
246
+ }
247
+ }
248
+ },
249
+ {
250
+ "id": "content-overview",
251
+ "component": {
252
+ "tabs-content": { "value": "overview", "child": "overview-text" }
253
+ }
254
+ },
255
+ {
256
+ "id": "overview-text",
257
+ "component": {
258
+ "text": { "text": { "literalString": "This is the overview content." } }
259
+ }
260
+ },
261
+ {
262
+ "id": "content-settings",
263
+ "component": {
264
+ "tabs-content": { "value": "settings", "child": "settings-text" }
265
+ }
266
+ },
267
+ {
268
+ "id": "settings-text",
269
+ "component": {
270
+ "text": { "text": { "literalString": "This is the settings content." } }
271
+ }
272
+ }
273
+ ]
274
+ }
275
+ ```
276
+
277
+ ---
278
+
279
+ ## Quick Reference
280
+
281
+ **Supports `text` prop (→ children):**
282
+ `text`, `label`, `button`, `badge`, `chip`, `link`, `tabs-trigger`, `breadcrumb-item`
283
+
284
+ **Use specific props instead:**
285
+
286
+ - `slat` → `label` + `secondaryLabel`
287
+ - `alert` → `title` + `description`
288
+ - `input` → `label` + `placeholder`
289
+ - `avatar` → `fallback`
@@ -0,0 +1,49 @@
1
+ # A2UI Principles
2
+
3
+ ## 1. Aesthetic
4
+
5
+ - **Borders**: All interactive elements (cards, buttons, inputs) already have borders built-in. Do not add `border` classes manually.
6
+ - **Shadows**: Use `shadow-hard` for a brutalist look if you are creating a custom container, but prefer using `<Card>` which handles this for you.
7
+ - **Radius**: Default radius is `4px`. Avoid `rounded-full` unless creating a badge or avatar.
8
+
9
+ ## 2. Layout & Spacing
10
+
11
+ - **Do NOT** use `margin` or `padding` on individual items to space them out.
12
+ - **DO** use `Stack` (vertical) or `Flex` (horizontal) with the `gap` prop.
13
+ - `gap={1}` = 4px
14
+ - `gap={4}` = 16px (Standard)
15
+ - `gap={6}` = 24px (Section separation)
16
+ - Use `Grid` for complex 2D layouts. `columns` prop accepts numbers (`3`) or CSS strings (`"1fr 2fr"`).
17
+
18
+ ## 3. Typography
19
+
20
+ - Use the `<Text>` component for all text.
21
+ - **Variants**:
22
+ - `h1`-`h3`: Page/Section titles (Bold, Uppercase)
23
+ - `body`: Default text
24
+ - `small`: Metadata/Labels (Muted)
25
+ - Do not use `<h1>` tags inside HTML strings.
26
+
27
+ ## 4. Colors & Variables
28
+
29
+ - Use CSS variables for all custom styling.
30
+ - **Primary**: `var(--primary)` (Brand color)
31
+ - **Backgrounds**: `var(--card-bg)`, `var(--background)`
32
+ - **Text**: `var(--foreground)`, `var(--muted-foreground)`
33
+ - **Status**: `var(--success)`, `var(--error)`, `var(--warning)`
34
+
35
+ ## 5. Components
36
+
37
+ - **Inputs**: Always provide a `label`.
38
+ - **Buttons**: Use `variant="ghost"` for secondary/tertiary actions to reduce visual noise.
39
+ - **Charts**: Use the `style` prop to set explicit height (e.g., `{ height: 400 }`).
40
+
41
+ ## 6. Utilities
42
+
43
+ - **WE ARE NOT A TAILWIND SYSTEM**. Do not use generic Tailwind classes (e.g., `max-w-sm`, `bg-red-500`, `rounded-lg`).
44
+ - **ONLY** use the specific utility classes defined in the Doom system:
45
+ - Spacing: `p-0` to `p-10`, `m-0` to `m-10` (4px increments)
46
+ - Sizing: `w-full`, `h-full`, `h-screen`
47
+ - Flex: `flex`, `flex-col`, `items-center`, `justify-between`
48
+ - Typography: `text-{size}`, `text-{color}`, `uppercase`, `text-center`, `text-left`, `text-right`
49
+ - For specific visuals not covered by utilities, use the `style` prop.
@@ -0,0 +1,191 @@
1
+ # A2UI Protocol Reference
2
+
3
+ ## Message Schema
4
+
5
+ A2UI uses a flat adjacency list format where components reference children by ID.
6
+
7
+ ### Component Structure
8
+
9
+ ```json
10
+ {
11
+ "surfaceId": "main",
12
+ "components": [
13
+ {
14
+ "id": "unique-id",
15
+ "component": {
16
+ "component-type": {
17
+ "propName": "value",
18
+ "text": { "literalString": "Static text" },
19
+ "children": { "explicitList": ["child-id-1", "child-id-2"] }
20
+ }
21
+ }
22
+ }
23
+ ]
24
+ }
25
+ ```
26
+
27
+ ### Value Types
28
+
29
+ | Type | Format | Example |
30
+ | ----------------- | ---------------------------- | -------------------------------- |
31
+ | Literal String | `{ "literalString": "..." }` | `{ "literalString": "Hello" }` |
32
+ | Data Binding | `{ "path": "/..." }` | `{ "path": "/user/name" }` |
33
+ | Single Child | `"child-id"` | `"header-component"` |
34
+ | Multiple Children | `{ "explicitList": [...] }` | `{ "explicitList": ["a", "b"] }` |
35
+
36
+ ---
37
+
38
+ ## Text Content: IMPORTANT
39
+
40
+ **Not all components use `text` prop.** Only components marked with ✅ below support `text: { literalString }` or `text: { path }`:
41
+
42
+ | Supports `text` prop | Component | Text Prop |
43
+ | :------------------: | ----------------- | ------------------------------ |
44
+ | ✅ | `label` | `text` |
45
+ | ✅ | `text` | `text` → maps to children |
46
+ | ✅ | `button` | `text` → maps to children |
47
+ | ✅ | `badge` | `text` → maps to children |
48
+ | ✅ | `chip` | `text` → maps to children |
49
+ | ✅ | `link` | `text` → maps to children |
50
+ | ✅ | `tabs-trigger` | `text` → maps to children |
51
+ | ✅ | `breadcrumb-item` | `text` → maps to children |
52
+ | ❌ | `slat` | Use `label` + `secondaryLabel` |
53
+ | ❌ | `alert` | Use `title` + `description` |
54
+ | ❌ | `input` | Use `label` + `placeholder` |
55
+ | ❌ | `avatar` | Use `fallback` for initials |
56
+
57
+ ### Common Mistakes
58
+
59
+ ```json
60
+ // ❌ WRONG - slat doesn't support text prop
61
+ { "slat": { "label": "Trips", "text": { "literalString": "4" } } }
62
+
63
+ // ✅ CORRECT - use secondaryLabel
64
+ { "slat": { "label": "Trips", "secondaryLabel": "4" } }
65
+
66
+ // ❌ WRONG - alert doesn't support text prop
67
+ { "alert": { "variant": "warning", "text": { "literalString": "Warning message" } } }
68
+
69
+ // ✅ CORRECT - use title and description
70
+ { "alert": { "variant": "warning", "title": "Warning", "description": "Message details" } }
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Component Reference
76
+
77
+ ### Primitives
78
+
79
+ | Type | Key Props | Notes |
80
+ | ---------- | ------------------------------------ | ------------------------------ |
81
+ | `label` | `text` ✅ | Simple text label |
82
+ | `text` | `variant`, `text` ✅ | Typography: h1-h6/body/small |
83
+ | `button` | `variant`, `text` ✅ | primary/secondary/ghost/danger |
84
+ | `badge` | `variant`, `text` ✅ | Status indicator |
85
+ | `chip` | `variant`, `text` ✅ | Tag element |
86
+ | `avatar` | `src`, `fallback`, `size` | User avatar |
87
+ | `alert` | `title` ⚠️, `description`, `variant` | title is REQUIRED |
88
+ | `card` | `className`, `child`/`children` | Container |
89
+ | `input` | `label`, `placeholder`, `value` | Text field |
90
+ | `textarea` | `label`, `placeholder`, `rows` | Multi-line |
91
+ | `checkbox` | `label`, `checked` | Checkbox |
92
+ | `switch` | `label`, `checked` | Toggle |
93
+ | `link` | `href`, `text` ✅ | Hyperlink |
94
+ | `spinner` | `size` | Loading indicator |
95
+
96
+ ### Layout
97
+
98
+ | Type | Key Props |
99
+ | ----------- | -------------------------------------------------- |
100
+ | `flex` | `direction`, `gap`, `align`, `justify`, `children` |
101
+ | `stack` | `gap`, `children` |
102
+ | `grid` | `columns`, `gap`, `children` |
103
+ | `container` | `size`, `children` |
104
+ | `box` | `className`, `children` |
105
+
106
+ ### Data Display
107
+
108
+ | Type | Key Props | Notes |
109
+ | ---------------- | --------------------------------------- | ------------------------------- |
110
+ | `slat` | `label` ⚠️, `secondaryLabel`, `variant` | label is REQUIRED, NO text prop |
111
+ | `table` | `data`, `columns` | Each column needs `accessorKey` |
112
+ | `chart` | `type`, `data`, `xKey`, `yKey` | line/area/bar |
113
+ | `accordion` | `type`, `defaultValue`, `children` | single/multiple |
114
+ | `accordion-item` | `value`, `trigger`, `children` | |
115
+ | `image` | `src`, `alt` | |
116
+
117
+ ### Navigation
118
+
119
+ | Type | Key Props |
120
+ | ----------------- | --------------------------- |
121
+ | `tabs` | `defaultValue`, `children` |
122
+ | `tabs-list` | `children` |
123
+ | `tabs-trigger` | `value`, `text` ✅ |
124
+ | `tabs-body` | `children` |
125
+ | `tabs-content` | `value`, `child`/`children` |
126
+ | `breadcrumbs` | `children` |
127
+ | `breadcrumb-item` | `href`, `text` ✅ |
128
+
129
+ ### Feedback
130
+
131
+ | Type | Key Props |
132
+ | -------------- | ------------------ |
133
+ | `progress-bar` | `value`, `variant` |
134
+ | `skeleton` | `width`, `height` |
135
+
136
+ ### Actions
137
+
138
+ | Type | Key Props |
139
+ | -------------- | ---------- |
140
+ | `action-row` | `children` |
141
+ | `split-button` | `options` |
142
+
143
+ ---
144
+
145
+ ## Complete Example
146
+
147
+ ```json
148
+ {
149
+ "surfaceId": "demo",
150
+ "components": [
151
+ {
152
+ "id": "root",
153
+ "component": {
154
+ "card": {
155
+ "className": "p-6",
156
+ "children": { "explicitList": ["header", "stats", "warning"] }
157
+ }
158
+ }
159
+ },
160
+ {
161
+ "id": "header",
162
+ "component": {
163
+ "text": {
164
+ "variant": "h2",
165
+ "text": { "literalString": "Dashboard" }
166
+ }
167
+ }
168
+ },
169
+ {
170
+ "id": "stats",
171
+ "component": {
172
+ "slat": {
173
+ "label": "Active Users",
174
+ "secondaryLabel": "1,234",
175
+ "variant": "success"
176
+ }
177
+ }
178
+ },
179
+ {
180
+ "id": "warning",
181
+ "component": {
182
+ "alert": {
183
+ "variant": "warning",
184
+ "title": "Maintenance Scheduled",
185
+ "description": "System will be down at 2:00 AM UTC."
186
+ }
187
+ }
188
+ }
189
+ ]
190
+ }
191
+ ```
@@ -0,0 +1,46 @@
1
+ # A2UI
2
+
3
+ The `A2UI` component renders a UI tree from a declarative JSON structure, enabling AI agents and external sources to generate Doom Design System interfaces dynamically.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { A2UI } from "doom-design-system";
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ Pass the JSON tree to the `data` prop. The JSON must adhere to the [A2UI Protocol Schema](a2ui-protocol.md).
14
+
15
+ ```tsx
16
+ const data = {
17
+ type: "card",
18
+ props: { className: "p-6" },
19
+ children: [
20
+ {
21
+ type: "button",
22
+ props: { variant: "primary" },
23
+ children: ["Rendered from JSON"],
24
+ },
25
+ ],
26
+ };
27
+
28
+ return <A2UI data={data} />;
29
+ ```
30
+
31
+ ## Props
32
+
33
+ | Prop | Type | Description |
34
+ | ------ | ---------- | -------------------------------------------- |
35
+ | `data` | `A2UINode` | The JSON tree root node to render. Required. |
36
+
37
+ ## Types
38
+
39
+ ```tsx
40
+ interface A2UINode {
41
+ id?: string;
42
+ type: string;
43
+ props?: Record<string, unknown>;
44
+ children?: (A2UINode | string)[];
45
+ }
46
+ ```