@misoto22/design 0.7.0 → 0.8.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 (369) hide show
  1. package/AGENTS.md +87 -0
  2. package/CLAUDE.md +1 -0
  3. package/README.md +50 -5
  4. package/bin/misoto22-design.mjs +59 -13
  5. package/dist/agent/Accordion.md +24 -1
  6. package/dist/agent/Alert.md +23 -1
  7. package/dist/agent/AppShell.md +30 -2
  8. package/dist/agent/ArchitectureFigure.md +25 -2
  9. package/dist/agent/AreaChart.md +27 -2
  10. package/dist/agent/Article.md +26 -3
  11. package/dist/agent/AspectRatio.md +57 -0
  12. package/dist/agent/Avatar.md +25 -5
  13. package/dist/agent/Badge.md +22 -1
  14. package/dist/agent/BarChart.md +29 -2
  15. package/dist/agent/BarList.md +27 -1
  16. package/dist/agent/BigNumber.md +26 -2
  17. package/dist/agent/BoxPlot.md +24 -1
  18. package/dist/agent/Breadcrumb.md +24 -2
  19. package/dist/agent/BulletChart.md +23 -1
  20. package/dist/agent/Button.md +25 -1
  21. package/dist/agent/Calendar.md +37 -3
  22. package/dist/agent/Card.md +24 -2
  23. package/dist/agent/Checkbox.md +23 -2
  24. package/dist/agent/Code.md +50 -0
  25. package/dist/agent/CodeBlock.md +74 -0
  26. package/dist/agent/Collapsible.md +22 -1
  27. package/dist/agent/Combobox.md +29 -3
  28. package/dist/agent/Command.md +25 -2
  29. package/dist/agent/ComposedChart.md +26 -2
  30. package/dist/agent/ContextMenu.md +37 -4
  31. package/dist/agent/DataflowFigure.md +22 -1
  32. package/dist/agent/DatePicker.md +34 -6
  33. package/dist/agent/DescriptionList.md +68 -0
  34. package/dist/agent/Diagram.md +27 -3
  35. package/dist/agent/DiagramCanvas.md +24 -1
  36. package/dist/agent/DiagramExportMenu.md +29 -3
  37. package/dist/agent/DiagramInspector.md +23 -1
  38. package/dist/agent/DiagramLegend.md +22 -1
  39. package/dist/agent/DiagramMinimap.md +24 -4
  40. package/dist/agent/DiagramToolbar.md +23 -1
  41. package/dist/agent/Dialog.md +26 -3
  42. package/dist/agent/DropdownMenu.md +45 -6
  43. package/dist/agent/EmptyState.md +26 -1
  44. package/dist/agent/ErrorState.md +27 -2
  45. package/dist/agent/Facet.md +25 -1
  46. package/dist/agent/Field.md +45 -4
  47. package/dist/agent/FigureBand.md +24 -1
  48. package/dist/agent/FloatingIconButton.md +23 -1
  49. package/dist/agent/FunnelChart.md +23 -1
  50. package/dist/agent/Heading.md +64 -0
  51. package/dist/agent/Heatmap.md +25 -1
  52. package/dist/agent/Histogram.md +26 -2
  53. package/dist/agent/Input.md +22 -1
  54. package/dist/agent/Kbd.md +19 -1
  55. package/dist/agent/LifecycleFigure.md +22 -1
  56. package/dist/agent/LineChart.md +26 -2
  57. package/dist/agent/LinkArrow.md +20 -1
  58. package/dist/agent/Markdown.md +68 -0
  59. package/dist/agent/NativeSelect.md +23 -2
  60. package/dist/agent/NavItem.md +21 -1
  61. package/dist/agent/Pagination.md +28 -2
  62. package/dist/agent/PieChart.md +26 -2
  63. package/dist/agent/Popover.md +23 -1
  64. package/dist/agent/Progress.md +27 -3
  65. package/dist/agent/RadarChart.md +26 -2
  66. package/dist/agent/RadialChart.md +26 -3
  67. package/dist/agent/RadioGroup.md +23 -2
  68. package/dist/agent/SankeyChart.md +25 -2
  69. package/dist/agent/ScatterChart.md +27 -2
  70. package/dist/agent/ScrollArea.md +24 -3
  71. package/dist/agent/SearchableMenu.md +23 -1
  72. package/dist/agent/Select.md +29 -3
  73. package/dist/agent/Separator.md +28 -4
  74. package/dist/agent/SequenceFigure.md +23 -1
  75. package/dist/agent/Sheet.md +25 -2
  76. package/dist/agent/Skeleton.md +24 -2
  77. package/dist/agent/Slider.md +27 -4
  78. package/dist/agent/Sparkline.md +23 -1
  79. package/dist/agent/Spinner.md +24 -2
  80. package/dist/agent/StatusDot.md +20 -1
  81. package/dist/agent/StatusPill.md +28 -2
  82. package/dist/agent/Steps.md +24 -1
  83. package/dist/agent/Switch.md +21 -1
  84. package/dist/agent/Table.md +26 -3
  85. package/dist/agent/Tabs.md +24 -2
  86. package/dist/agent/Tag.md +40 -9
  87. package/dist/agent/Text.md +65 -0
  88. package/dist/agent/Textarea.md +20 -1
  89. package/dist/agent/Timestamp.md +64 -0
  90. package/dist/agent/Toast.md +26 -2
  91. package/dist/agent/ToggleGroup.md +24 -2
  92. package/dist/agent/Toolbar.md +71 -0
  93. package/dist/agent/Tooltip.md +23 -1
  94. package/dist/agent/TreemapChart.md +24 -1
  95. package/dist/agent/WaterfallChart.md +24 -1
  96. package/dist/agent/WorkflowFigure.md +24 -2
  97. package/dist/agent/catalog.json +5602 -745
  98. package/dist/agent/index.md +13 -4
  99. package/dist/article.css +16 -4
  100. package/dist/charts/AreaChart/AreaChart.d.ts +9 -2
  101. package/dist/charts/AreaChart/AreaChart.js +12 -13
  102. package/dist/charts/AreaChart/AreaChart.js.map +1 -1
  103. package/dist/charts/BarChart/BarChart.d.ts +14 -3
  104. package/dist/charts/BarChart/BarChart.js +20 -12
  105. package/dist/charts/BarChart/BarChart.js.map +1 -1
  106. package/dist/charts/BarList/BarList.d.ts +9 -1
  107. package/dist/charts/BarList/BarList.js +9 -1
  108. package/dist/charts/BarList/BarList.js.map +1 -1
  109. package/dist/charts/BigNumber/BigNumber.d.ts +19 -3
  110. package/dist/charts/BigNumber/BigNumber.js +25 -5
  111. package/dist/charts/BigNumber/BigNumber.js.map +1 -1
  112. package/dist/charts/BoxPlot/BoxPlot.js +4 -2
  113. package/dist/charts/BoxPlot/BoxPlot.js.map +1 -1
  114. package/dist/charts/BulletChart/BulletChart.js +28 -7
  115. package/dist/charts/BulletChart/BulletChart.js.map +1 -1
  116. package/dist/charts/ComposedChart/ComposedChart.d.ts +9 -2
  117. package/dist/charts/ComposedChart/ComposedChart.js +10 -10
  118. package/dist/charts/ComposedChart/ComposedChart.js.map +1 -1
  119. package/dist/charts/FunnelChart/FunnelChart.d.ts +7 -2
  120. package/dist/charts/FunnelChart/FunnelChart.js +6 -16
  121. package/dist/charts/FunnelChart/FunnelChart.js.map +1 -1
  122. package/dist/charts/Heatmap/Heatmap.d.ts +17 -3
  123. package/dist/charts/Heatmap/Heatmap.js +20 -11
  124. package/dist/charts/Heatmap/Heatmap.js.map +1 -1
  125. package/dist/charts/Histogram/Histogram.d.ts +24 -1
  126. package/dist/charts/Histogram/Histogram.js +43 -11
  127. package/dist/charts/Histogram/Histogram.js.map +1 -1
  128. package/dist/charts/LineChart/LineChart.d.ts +9 -2
  129. package/dist/charts/LineChart/LineChart.js +11 -12
  130. package/dist/charts/LineChart/LineChart.js.map +1 -1
  131. package/dist/charts/PieChart/PieChart.d.ts +15 -3
  132. package/dist/charts/PieChart/PieChart.js +14 -6
  133. package/dist/charts/PieChart/PieChart.js.map +1 -1
  134. package/dist/charts/RadarChart/RadarChart.d.ts +15 -3
  135. package/dist/charts/RadarChart/RadarChart.js +11 -9
  136. package/dist/charts/RadarChart/RadarChart.js.map +1 -1
  137. package/dist/charts/RadialChart/RadialChart.d.ts +22 -4
  138. package/dist/charts/RadialChart/RadialChart.js +28 -6
  139. package/dist/charts/RadialChart/RadialChart.js.map +1 -1
  140. package/dist/charts/SankeyChart/SankeyChart.d.ts +16 -4
  141. package/dist/charts/SankeyChart/SankeyChart.js +14 -6
  142. package/dist/charts/SankeyChart/SankeyChart.js.map +1 -1
  143. package/dist/charts/ScatterChart/ScatterChart.d.ts +24 -3
  144. package/dist/charts/ScatterChart/ScatterChart.js +21 -15
  145. package/dist/charts/ScatterChart/ScatterChart.js.map +1 -1
  146. package/dist/charts/Sparkline/Sparkline.js +5 -3
  147. package/dist/charts/Sparkline/Sparkline.js.map +1 -1
  148. package/dist/charts/TreemapChart/TreemapChart.d.ts +7 -2
  149. package/dist/charts/TreemapChart/TreemapChart.js +20 -11
  150. package/dist/charts/TreemapChart/TreemapChart.js.map +1 -1
  151. package/dist/charts/WaterfallChart/WaterfallChart.js +4 -2
  152. package/dist/charts/WaterfallChart/WaterfallChart.js.map +1 -1
  153. package/dist/charts/lib/export.d.ts +1 -0
  154. package/dist/charts/lib/figure.d.ts +21 -1
  155. package/dist/charts/lib/figure.js +5 -2
  156. package/dist/charts/lib/figure.js.map +1 -1
  157. package/dist/charts/lib/scale.d.ts +23 -0
  158. package/dist/charts/lib/scale.js +13 -0
  159. package/dist/charts/lib/scale.js.map +1 -0
  160. package/dist/charts/lib/selection.d.ts +20 -0
  161. package/dist/charts/lib/selection.js +18 -0
  162. package/dist/charts/lib/selection.js.map +1 -0
  163. package/dist/charts/lib/toolbar.d.ts +1 -0
  164. package/dist/components/Accordion/Accordion.js +8 -1
  165. package/dist/components/Accordion/Accordion.js.map +1 -1
  166. package/dist/components/AppShell/AppShell.d.ts +6 -0
  167. package/dist/components/AppShell/AppShell.js +34 -4
  168. package/dist/components/AppShell/AppShell.js.map +1 -1
  169. package/dist/components/Article/Article.d.ts +11 -4
  170. package/dist/components/Article/Article.js +13 -0
  171. package/dist/components/Article/Article.js.map +1 -1
  172. package/dist/components/AspectRatio/AspectRatio.d.ts +46 -0
  173. package/dist/components/AspectRatio/AspectRatio.js +33 -0
  174. package/dist/components/AspectRatio/AspectRatio.js.map +1 -0
  175. package/dist/components/Avatar/Avatar.d.ts +12 -3
  176. package/dist/components/Avatar/Avatar.js +6 -1
  177. package/dist/components/Avatar/Avatar.js.map +1 -1
  178. package/dist/components/Breadcrumb/Breadcrumb.d.ts +6 -0
  179. package/dist/components/Breadcrumb/Breadcrumb.js +15 -0
  180. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
  181. package/dist/components/Button/Button.js +14 -0
  182. package/dist/components/Button/Button.js.map +1 -1
  183. package/dist/components/Calendar/Calendar.d.ts +29 -3
  184. package/dist/components/Calendar/Calendar.js +60 -12
  185. package/dist/components/Calendar/Calendar.js.map +1 -1
  186. package/dist/components/Card/Card.d.ts +6 -0
  187. package/dist/components/Card/Card.js +1 -1
  188. package/dist/components/Card/Card.js.map +1 -1
  189. package/dist/components/Checkbox/Checkbox.d.ts +5 -2
  190. package/dist/components/Checkbox/Checkbox.js +12 -2
  191. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  192. package/dist/components/Code/Code.d.ts +30 -0
  193. package/dist/components/Code/Code.js +21 -0
  194. package/dist/components/Code/Code.js.map +1 -0
  195. package/dist/components/CodeBlock/CodeBlock.d.ts +141 -0
  196. package/dist/components/CodeBlock/CodeBlock.js +123 -0
  197. package/dist/components/CodeBlock/CodeBlock.js.map +1 -0
  198. package/dist/components/Collapsible/Collapsible.js +10 -2
  199. package/dist/components/Collapsible/Collapsible.js.map +1 -1
  200. package/dist/components/Combobox/Combobox.d.ts +15 -1
  201. package/dist/components/Combobox/Combobox.js +25 -5
  202. package/dist/components/Combobox/Combobox.js.map +1 -1
  203. package/dist/components/Command/Command.d.ts +4 -2
  204. package/dist/components/Command/Command.js +13 -1
  205. package/dist/components/Command/Command.js.map +1 -1
  206. package/dist/components/ContextMenu/ContextMenu.d.ts +30 -5
  207. package/dist/components/ContextMenu/ContextMenu.js +32 -2
  208. package/dist/components/ContextMenu/ContextMenu.js.map +1 -1
  209. package/dist/components/DatePicker/DatePicker.d.ts +36 -4
  210. package/dist/components/DatePicker/DatePicker.js +55 -12
  211. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  212. package/dist/components/DescriptionList/DescriptionList.d.ts +73 -0
  213. package/dist/components/DescriptionList/DescriptionList.js +35 -0
  214. package/dist/components/DescriptionList/DescriptionList.js.map +1 -0
  215. package/dist/components/Diagram/Diagram.d.ts +8 -3
  216. package/dist/components/Diagram/Diagram.js +82 -10
  217. package/dist/components/Diagram/Diagram.js.map +1 -1
  218. package/dist/components/Dialog/Dialog.d.ts +18 -3
  219. package/dist/components/Dialog/Dialog.js +20 -2
  220. package/dist/components/Dialog/Dialog.js.map +1 -1
  221. package/dist/components/DropdownMenu/DropdownMenu.d.ts +49 -11
  222. package/dist/components/DropdownMenu/DropdownMenu.js +32 -2
  223. package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -1
  224. package/dist/components/EmptyState/EmptyState.d.ts +25 -1
  225. package/dist/components/EmptyState/EmptyState.js +3 -1
  226. package/dist/components/EmptyState/EmptyState.js.map +1 -1
  227. package/dist/components/ErrorState/ErrorState.d.ts +22 -1
  228. package/dist/components/ErrorState/ErrorState.js +11 -2
  229. package/dist/components/ErrorState/ErrorState.js.map +1 -1
  230. package/dist/components/Field/Field.d.ts +70 -3
  231. package/dist/components/Field/Field.js +53 -12
  232. package/dist/components/Field/Field.js.map +1 -1
  233. package/dist/components/Field/field-control.d.ts +31 -0
  234. package/dist/components/Field/field-control.js +12 -0
  235. package/dist/components/Field/field-control.js.map +1 -0
  236. package/dist/components/FloatingIconButton/FloatingIconButton.js +2 -0
  237. package/dist/components/FloatingIconButton/FloatingIconButton.js.map +1 -1
  238. package/dist/components/Heading/Heading.d.ts +62 -0
  239. package/dist/components/Heading/Heading.js +44 -0
  240. package/dist/components/Heading/Heading.js.map +1 -0
  241. package/dist/components/Markdown/Markdown.d.ts +139 -0
  242. package/dist/components/Markdown/Markdown.js +135 -0
  243. package/dist/components/Markdown/Markdown.js.map +1 -0
  244. package/dist/components/Markdown/inline.d.ts +29 -0
  245. package/dist/components/Markdown/inline.js +74 -0
  246. package/dist/components/Markdown/inline.js.map +1 -0
  247. package/dist/components/Markdown/nodes.d.ts +65 -0
  248. package/dist/components/Markdown/nodes.js +1 -0
  249. package/dist/components/Markdown/nodes.js.map +1 -0
  250. package/dist/components/Markdown/parse.d.ts +24 -0
  251. package/dist/components/Markdown/parse.js +110 -0
  252. package/dist/components/Markdown/parse.js.map +1 -0
  253. package/dist/components/Markdown/slug.d.ts +15 -0
  254. package/dist/components/Markdown/slug.js +7 -0
  255. package/dist/components/Markdown/slug.js.map +1 -0
  256. package/dist/components/NativeSelect/NativeSelect.d.ts +6 -0
  257. package/dist/components/NativeSelect/NativeSelect.js +2 -3
  258. package/dist/components/NativeSelect/NativeSelect.js.map +1 -1
  259. package/dist/components/Pagination/Pagination.d.ts +24 -1
  260. package/dist/components/Pagination/Pagination.js +6 -3
  261. package/dist/components/Pagination/Pagination.js.map +1 -1
  262. package/dist/components/Progress/Progress.d.ts +17 -5
  263. package/dist/components/Progress/Progress.js +18 -6
  264. package/dist/components/Progress/Progress.js.map +1 -1
  265. package/dist/components/RadioGroup/RadioGroup.d.ts +6 -0
  266. package/dist/components/RadioGroup/RadioGroup.js +11 -1
  267. package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
  268. package/dist/components/ScrollArea/ScrollArea.d.ts +15 -0
  269. package/dist/components/ScrollArea/ScrollArea.js +2 -2
  270. package/dist/components/ScrollArea/ScrollArea.js.map +1 -1
  271. package/dist/components/SearchableMenu/SearchableMenu.d.ts +11 -2
  272. package/dist/components/SearchableMenu/SearchableMenu.js +24 -2
  273. package/dist/components/SearchableMenu/SearchableMenu.js.map +1 -1
  274. package/dist/components/Select/Select.d.ts +18 -2
  275. package/dist/components/Select/Select.js +20 -3
  276. package/dist/components/Select/Select.js.map +1 -1
  277. package/dist/components/Separator/Separator.d.ts +21 -3
  278. package/dist/components/Separator/Separator.js +9 -1
  279. package/dist/components/Separator/Separator.js.map +1 -1
  280. package/dist/components/Sheet/Sheet.d.ts +3 -0
  281. package/dist/components/Sheet/Sheet.js +11 -2
  282. package/dist/components/Sheet/Sheet.js.map +1 -1
  283. package/dist/components/Skeleton/Skeleton.d.ts +8 -1
  284. package/dist/components/Skeleton/Skeleton.js +1 -1
  285. package/dist/components/Skeleton/Skeleton.js.map +1 -1
  286. package/dist/components/Slider/Slider.d.ts +21 -3
  287. package/dist/components/Slider/Slider.js +54 -27
  288. package/dist/components/Slider/Slider.js.map +1 -1
  289. package/dist/components/Spinner/Spinner.d.ts +8 -0
  290. package/dist/components/Spinner/Spinner.js +3 -2
  291. package/dist/components/Spinner/Spinner.js.map +1 -1
  292. package/dist/components/StatusPill/StatusPill.d.ts +5 -0
  293. package/dist/components/StatusPill/StatusPill.js +6 -0
  294. package/dist/components/StatusPill/StatusPill.js.map +1 -1
  295. package/dist/components/Table/Table.d.ts +6 -0
  296. package/dist/components/Table/Table.js +3 -1
  297. package/dist/components/Table/Table.js.map +1 -1
  298. package/dist/components/Tag/Tag.d.ts +68 -9
  299. package/dist/components/Tag/Tag.js +50 -10
  300. package/dist/components/Tag/Tag.js.map +1 -1
  301. package/dist/components/Text/Text.d.ts +62 -0
  302. package/dist/components/Text/Text.js +30 -0
  303. package/dist/components/Text/Text.js.map +1 -0
  304. package/dist/components/Timestamp/Timestamp.d.ts +59 -0
  305. package/dist/components/Timestamp/Timestamp.js +56 -0
  306. package/dist/components/Timestamp/Timestamp.js.map +1 -0
  307. package/dist/components/Toast/Toast.d.ts +9 -1
  308. package/dist/components/Toast/Toast.js +27 -4
  309. package/dist/components/Toast/Toast.js.map +1 -1
  310. package/dist/components/ToggleGroup/ToggleGroup.d.ts +6 -1
  311. package/dist/components/ToggleGroup/ToggleGroup.js +11 -1
  312. package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -1
  313. package/dist/components/Toolbar/Toolbar.d.ts +55 -0
  314. package/dist/components/Toolbar/Toolbar.js +43 -0
  315. package/dist/components/Toolbar/Toolbar.js.map +1 -0
  316. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.d.ts +6 -0
  317. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js +48 -8
  318. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js.map +1 -1
  319. package/dist/diagrams/DataflowFigure/DataflowFigure.js +21 -2
  320. package/dist/diagrams/DataflowFigure/DataflowFigure.js.map +1 -1
  321. package/dist/diagrams/DiagramCanvas/DiagramCanvas.d.ts +14 -0
  322. package/dist/diagrams/DiagramCanvas/DiagramCanvas.js +14 -7
  323. package/dist/diagrams/DiagramCanvas/DiagramCanvas.js.map +1 -1
  324. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.d.ts +38 -4
  325. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js +14 -16
  326. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js.map +1 -1
  327. package/dist/diagrams/DiagramInspector/DiagramInspector.js +2 -2
  328. package/dist/diagrams/DiagramInspector/DiagramInspector.js.map +1 -1
  329. package/dist/diagrams/DiagramMinimap/DiagramMinimap.d.ts +23 -7
  330. package/dist/diagrams/DiagramMinimap/DiagramMinimap.js +45 -18
  331. package/dist/diagrams/DiagramMinimap/DiagramMinimap.js.map +1 -1
  332. package/dist/diagrams/LifecycleFigure/LifecycleFigure.js +44 -12
  333. package/dist/diagrams/LifecycleFigure/LifecycleFigure.js.map +1 -1
  334. package/dist/diagrams/SequenceFigure/SequenceFigure.js +35 -5
  335. package/dist/diagrams/SequenceFigure/SequenceFigure.js.map +1 -1
  336. package/dist/diagrams/WorkflowFigure/WorkflowFigure.d.ts +3 -1
  337. package/dist/diagrams/WorkflowFigure/WorkflowFigure.js +76 -28
  338. package/dist/diagrams/WorkflowFigure/WorkflowFigure.js.map +1 -1
  339. package/dist/diagrams/index.d.ts +1 -0
  340. package/dist/diagrams/index.js +10 -0
  341. package/dist/diagrams/index.js.map +1 -1
  342. package/dist/diagrams/lib/dev.d.ts +61 -0
  343. package/dist/diagrams/lib/dev.js +96 -0
  344. package/dist/diagrams/lib/dev.js.map +1 -0
  345. package/dist/diagrams/lib/frame.d.ts +48 -7
  346. package/dist/diagrams/lib/frame.js +17 -2
  347. package/dist/diagrams/lib/frame.js.map +1 -1
  348. package/dist/diagrams/lib/wires.js.map +1 -1
  349. package/dist/diagrams/spec.d.ts +64 -12
  350. package/dist/index.d.ts +16 -4
  351. package/dist/index.js +9 -0
  352. package/dist/index.js.map +1 -1
  353. package/dist/keyframes.css +57 -3
  354. package/dist/lib/overlay-container.d.ts +14 -4
  355. package/dist/lib/overlay-container.js.map +1 -1
  356. package/dist/lib/warn.d.ts +73 -0
  357. package/dist/lib/warn.js +38 -0
  358. package/dist/lib/warn.js.map +1 -0
  359. package/dist/semantic.css +17 -6
  360. package/dist/styles.css +1 -1
  361. package/dist/tokens.css +20 -2
  362. package/dist/tokens.d.ts +1 -1
  363. package/dist/tokens.js +39 -36
  364. package/dist/tokens.json +39 -36
  365. package/llms.txt +35 -0
  366. package/package.json +5 -2
  367. package/skills/misoto22-design/evals/evals.json +84 -0
  368. package/skills/misoto22-design/rules/a11y.md +55 -3
  369. package/skills/misoto22-design/rules/forms.md +5 -0
package/AGENTS.md ADDED
@@ -0,0 +1,87 @@
1
+ # @misoto22/design — for agents
2
+
3
+ Pointers, not content. Everything below is generated from the source in this
4
+ same tarball, so nothing here can describe a version that is not installed.
5
+
6
+ ## You have installed this package
7
+
8
+ You are probably reading this because you searched `node_modules` for a filename
9
+ you recognise. The three commands are what you came for:
10
+
11
+ ```bash
12
+ npx misoto22-design docs Button # one component, in full
13
+ npx misoto22-design docs --installed # this version, and every component in it
14
+ npx misoto22-design init --agents-md # install the skill into this project
15
+ ```
16
+
17
+ `docs` resolves parts and types as well as components, so `docs CardBody`,
18
+ `docs TH` and `docs ButtonVariant` all land on the right file. When an import
19
+ fails, ask it about the identifier you tried.
20
+
21
+ Read `skills/misoto22-design/SKILL.md` in this package before writing components
22
+ against it. The names diverge from shadcn/ui in several places, and colour is
23
+ never written as a raw class; the skill leads with both.
24
+
25
+ `init` writes it to `.agents/skills/` — the path Codex, Cursor, Copilot, Gemini
26
+ CLI, OpenCode, Cline, Zed and Warp share — and to `.claude/skills/` when the
27
+ project already has one. For anything else, `npx skills add
28
+ Misoto22/misoto22-design` finds this skill with no configuration.
29
+
30
+ Some misuse fails silently, so the components say so in development:
31
+ `FIELD_CONTROL_NOT_LABELLABLE` when a wrapper takes the label instead of the
32
+ control, `BUTTON_ICON_ONLY_UNNAMED` when an icon-only button has no accessible
33
+ name, `REQUIRED_NAME_BLANK` when a required name is an empty string. Each prints
34
+ the field and an imperative fix, once per problem, and none reaches a production
35
+ bundle.
36
+
37
+ Nineteen codes in all. Eight on the primitives —
38
+ `ARTICLE_HTML_AND_CHILDREN`, `BREADCRUMB_CRUMB_NOT_LINKED`,
39
+ `BUTTON_ICON_ONLY_UNNAMED`, `DIALOG_TITLE_MISSING`,
40
+ `FIELD_CONTROL_NOT_LABELLABLE`, `FIELD_CONTROL_NOT_WIRED`,
41
+ `REQUIRED_NAME_BLANK`, `SEARCHABLE_MENU_LABEL_UNREADABLE`. Five on `Diagram`,
42
+ which checks the spec it was handed because a figure that ignores an edge still
43
+ renders beautifully — `DIAGRAM_ACCENT_ON_CONTAINER`, `DIAGRAM_DIRECTION_ON_LEAF`,
44
+ `DIAGRAM_DUPLICATE_ID`, `DIAGRAM_EDGE_NOT_ADJACENT`,
45
+ `DIAGRAM_EDGE_UNKNOWN_NODE`. And six on the figures in
46
+ `@misoto22/design/diagrams` — `DIAGRAM_CELL_COLLISION`, `DIAGRAM_EDGE_DANGLING`,
47
+ `DIAGRAM_LANE_UNKNOWN`, `DIAGRAM_REF_UNKNOWN`, `DIAGRAM_SPEC_MUTATED`,
48
+ `DIAGRAM_STAGE_OUT_OF_RANGE`. `skills/misoto22-design/rules/a11y.md` tables what
49
+ each one fires on; `src/lib/warn.ts` is where they are printed.
50
+
51
+ Three entry points, and importing from the wrong one throws rather than renders
52
+ blank. Each `docs` file names its own on the `Import:` line.
53
+
54
+ | Specifier | What ships from it |
55
+ | --- | --- |
56
+ | `@misoto22/design` | The primitives |
57
+ | `@misoto22/design/charts` | Charts — needs the `recharts` and `motion` peers |
58
+ | `@misoto22/design/diagrams` | Figures with routed edges |
59
+
60
+ ## You are working ON this package, in its repository
61
+
62
+ The repository root `AGENTS.md` still applies in full — this file is additive,
63
+ not a replacement, and the Harness rules there (`HAR-*`, `DESIGN-*`) govern this
64
+ directory as much as any other. Read it first.
65
+
66
+ What is specific to here:
67
+
68
+ - **`dist/` is generated.** `dist/agent/**` included — it is written by
69
+ `scripts/emit-agent.mjs` at build time. Edit the source, then rebuild.
70
+ - **`agent/catalog.mjs` is the one hand-written description** of what each
71
+ component IS: its group, summary, when to reach for it, accessibility
72
+ promises and keyboard contract. Everything mechanical is parsed out of
73
+ `src/**` by `scripts/extract-props.mjs`. `src/__tests__/catalog.test.ts`
74
+ fails when the two disagree.
75
+ - **The skill is tested.** `src/__tests__/skill.test.ts` asserts every claim in
76
+ `skills/` against the extracted source, in both directions — an identifier the
77
+ rules tell an agent to write must exist, and one they say to avoid must not.
78
+ Renaming an export without updating the rules fails the build, on purpose.
79
+ - **Gates:** `pnpm lint && pnpm typecheck && pnpm test && pnpm build`, from the
80
+ repository root.
81
+
82
+ ## On the web
83
+
84
+ `https://ui.misoto22.com` — and `/llms.txt`, `/llms-full.txt`, and
85
+ `/components/<slug>/llms.txt` for the same content without the CSS. Prefer the
86
+ CLI above when the package is installed: it is version-locked and needs no
87
+ network.
package/CLAUDE.md ADDED
@@ -0,0 +1 @@
1
+ @AGENTS.md
package/README.md CHANGED
@@ -20,16 +20,24 @@ import { Button, Field, Input } from '@misoto22/design'
20
20
  import '@misoto22/design/styles.css'
21
21
  ```
22
22
 
23
- `styles.css` is the whole compiled sheet — tokens, roles, motion and the
24
- vendored faces. An app that compiles its own Tailwind can take the portable
23
+ `styles.css` is the whole compiled sheet — tokens, roles, themes, motion and
24
+ the vendored faces. An app that compiles its own Tailwind can take the portable
25
25
  layers instead:
26
26
 
27
27
  ```tsx
28
- import '@misoto22/design/tokens.css' // primitives
28
+ import '@misoto22/design/tokens.css' // primitives, plus data-mode and data-density
29
29
  import '@misoto22/design/semantic.css' // roles
30
+ import '@misoto22/design/themes.css' // the other six theming axes
30
31
  import '@misoto22/design/keyframes.css' // motion
31
32
  ```
32
33
 
34
+ All four, or the theming table below is a table of attributes that do nothing.
35
+ `data-mode` and `data-density` are declared in `tokens.css`; every other axis
36
+ lives only in `themes.css`, and an app that skips it writes `data-radius="sharp"`
37
+ and gets no error, no warning, and no corner. Two more layers are opt-in rather
38
+ than missing: `@misoto22/design/fonts.css` carries the vendored faces, and
39
+ `@misoto22/design/article.css` styles long-form prose.
40
+
33
41
  Diagrams ship from their own specifier, so a page that renders a `Badge` does
34
42
  not pay for a routing engine:
35
43
 
@@ -44,7 +52,7 @@ authored for that tool renders here with no translation step.
44
52
 
45
53
  ## Theming
46
54
 
47
- Seven independent axes, each an attribute, each working on **any** element
55
+ Eight independent axes, each an attribute, each working on **any** element
48
56
  rather than only on the root. An unset axis is the default.
49
57
 
50
58
  | Attribute | Values |
@@ -56,6 +64,7 @@ rather than only on the root. An unset axis is the default.
56
64
  | `data-type` | `grotesk` `bookish` |
57
65
  | `data-motion` | `still` `snappy` |
58
66
  | `data-density` | `compact` |
67
+ | `data-chart-palette` | `chroma` |
59
68
 
60
69
  ```tsx
61
70
  <section data-surface="warm" data-radius="sharp">…</section>
@@ -100,12 +109,26 @@ conventions without being told each time:
100
109
  npx misoto22-design init --agents-md
101
110
  ```
102
111
 
103
- That writes `.claude/skills/misoto22-design/` and points your `AGENTS.md` at it.
112
+ That writes the skill to `.agents/skills/` the path Codex, Cursor, GitHub
113
+ Copilot, Gemini CLI, OpenCode, Cline, Zed and Warp all read — and to
114
+ `.claude/skills/` as well when the project already has a `.claude/`. Use
115
+ `--agent agents` or `--agent claude` to pick one. For any other agent,
116
+ [`skills`](https://github.com/vercel-labs/skills) covers around seventy of them
117
+ and finds this one without any configuration:
118
+
119
+ ```bash
120
+ npx skills add Misoto22/misoto22-design
121
+ ```
122
+
104
123
  The skill is progressive: its name and description are about 110 tokens and are
105
124
  all that sits in a session until something actually touches this package. The
106
125
  body is around 2,200, and the five rule files load one at a time, only when the
107
126
  work reaches them.
108
127
 
128
+ An agent that explores `node_modules` by filename rather than by command finds
129
+ `AGENTS.md`, `CLAUDE.md` and `llms.txt` at the package root. They are pointers
130
+ to the above and nothing else, so they cannot go stale between releases.
131
+
109
132
  The names diverge from shadcn/ui in a handful of places that a model writing
110
133
  from habit gets wrong — `CardBody` not `CardContent`, `THead`/`TBody`/`TR`/`TH`/`TD`
111
134
  not `TableHeader`/…, and `title` as a prop on `DialogContent` rather than a
@@ -117,6 +140,28 @@ On the web, the same content is at
117
140
  [`/llms-full.txt`](https://ui.misoto22.com/llms-full.txt) (everything inline),
118
141
  and `/components/<slug>/llms.txt` (one component).
119
142
 
143
+ ### It tells you when you get it wrong
144
+
145
+ Some ways of misusing a component fail silently — a `Field` whose child is a
146
+ wrapper wires the label onto the box, an icon-only `Button` with no accessible
147
+ name renders perfectly and is invisible to a screen reader. Development warns on
148
+ those where it happens, with a stable code, the offending field and an
149
+ imperative fix:
150
+
151
+ ```
152
+ [@misoto22/design] FIELD_CONTROL_NOT_LABELLABLE
153
+ Field's child is a <div>, which cannot take a label — so the id,
154
+ aria-describedby, aria-required and aria-invalid were applied to it rather
155
+ than to a control.
156
+ field: children
157
+ fix: Put the control itself directly inside Field, with no wrapper. For a
158
+ row of controls, give each its own Field and lay them out around it.
159
+ docs: npx misoto22-design docs Field
160
+ ```
161
+
162
+ Every call site is behind `process.env.NODE_ENV`, so none of it reaches a
163
+ production bundle.
164
+
120
165
  ## Accessibility
121
166
 
122
167
  Every component is tested against `axe-core` best-practice rules, keyboard
@@ -31,9 +31,10 @@ const USAGE = `@misoto22/design ${version}
31
31
  misoto22-design docs --list Every component, one line each.
32
32
  misoto22-design docs --installed This package's version and what it ships.
33
33
  [--json]
34
- misoto22-design init [--agents-md] Install the agent skill into this project
35
- under .claude/skills/, and optionally
36
- point AGENTS.md at it.
34
+ misoto22-design init Install the agent skill into this project.
35
+ [--agents-md] Also point AGENTS.md at it.
36
+ [--agent <id>] Write only to one agent's directory:
37
+ "agents" (the shared path) or "claude".
37
38
 
38
39
  Docs on the web: https://ui.misoto22.com`
39
40
 
@@ -149,24 +150,69 @@ function docs(args) {
149
150
  const AGENTS_BLOCK = `
150
151
  ## @misoto22/design
151
152
 
152
- UI comes from \`@misoto22/design\`. Read \`.claude/skills/misoto22-design/SKILL.md\`
153
- before writing components against it — the names diverge from shadcn/ui in
154
- several places, and colour is never written as a raw class.
153
+ UI comes from \`@misoto22/design\`. Read \`SKILL.md\` in the installed skill
154
+ directory before writing components against it — the names diverge from
155
+ shadcn/ui in several places, and colour is never written as a raw class.
155
156
 
156
157
  - One component in full: \`npx misoto22-design docs <Component>\`
157
158
  - Everything it ships: \`npx misoto22-design docs --installed\`
158
159
  `
159
160
 
161
+ /**
162
+ * Where a skill goes, for the agents worth covering directly.
163
+ *
164
+ * `.agents/skills/` is the shared path — Codex, Cursor, GitHub Copilot, Gemini
165
+ * CLI, OpenCode, Cline, Zed, Warp, Amp and Replit all read it — and Claude Code
166
+ * is the one common agent with its own. Writing only to `.claude/` handed every
167
+ * other agent nothing, which was the bug.
168
+ *
169
+ * Deliberately two entries rather than the whole ecosystem. `npx skills` tracks
170
+ * around seventy directories and is one command away; a copy of that table kept
171
+ * here would be stale within a release, and this package's own rules are about
172
+ * not keeping copies of things that move.
173
+ */
174
+ const AGENT_DIRS = {
175
+ agents: '.agents/skills',
176
+ claude: '.claude/skills',
177
+ }
178
+
179
+ /**
180
+ * Which directories to write, given the flags and what the project already has.
181
+ *
182
+ * The shared path is unconditional — it is the one an unknown agent is most
183
+ * likely to read. Claude's is added when the project already has a `.claude/`,
184
+ * so a project that does not use it does not grow a directory it will never
185
+ * open.
186
+ */
187
+ function initTargets(args) {
188
+ const wanted = args[args.indexOf('--agent') + 1]
189
+ if (args.includes('--agent')) {
190
+ if (!wanted || !AGENT_DIRS[wanted]) {
191
+ fail(
192
+ `Unknown --agent "${wanted ?? ''}". Known: ${Object.keys(AGENT_DIRS).join(', ')}.\n` +
193
+ 'For any other agent, `npx skills add Misoto22/misoto22-design` covers ~70 of them.',
194
+ )
195
+ }
196
+ return [AGENT_DIRS[wanted]]
197
+ }
198
+
199
+ const targets = [AGENT_DIRS.agents]
200
+ if (existsSync(join(process.cwd(), '.claude'))) targets.push(AGENT_DIRS.claude)
201
+ return targets
202
+ }
203
+
160
204
  function init(args) {
161
- const target = join(process.cwd(), '.claude', 'skills', 'misoto22-design')
162
205
  if (!existsSync(SKILL)) fail('This build has no skills/ directory.')
163
206
 
164
- const existed = existsSync(target)
165
- mkdirSync(dirname(target), { recursive: true })
166
- cpSync(SKILL, target, { recursive: true })
167
- process.stdout.write(
168
- `${existed ? 'Updated' : 'Installed'} the skill at ${resolve(target)}\n`,
169
- )
207
+ const written = []
208
+ for (const dir of initTargets(args)) {
209
+ const target = join(process.cwd(), dir, 'misoto22-design')
210
+ const existed = existsSync(target)
211
+ mkdirSync(dirname(target), { recursive: true })
212
+ cpSync(SKILL, target, { recursive: true })
213
+ written.push(` ${existed ? 'updated' : 'installed'} ${resolve(target)}`)
214
+ }
215
+ process.stdout.write(`${written.join('\n')}\n`)
170
216
 
171
217
  if (!args.includes('--agents-md')) {
172
218
  process.stdout.write('Pass --agents-md to also point AGENTS.md at it.\n')
@@ -4,7 +4,7 @@ Disclosure rows that open in place.
4
4
 
5
5
  - Group: Navigation
6
6
  - Import: `import { Accordion } from '@misoto22/design'`
7
- - Version: 0.7.0
7
+ - Version: 0.8.0
8
8
  - Docs: https://ui.misoto22.com/components/accordion/
9
9
  - Related: tabs
10
10
 
@@ -12,6 +12,29 @@ Disclosure rows that open in place.
12
12
 
13
13
  The marker is a plus, not a chevron: a plus says “this opens”, a chevron says “there is more below”.
14
14
 
15
+ ## Anatomy
16
+
17
+ - **Row** (required) — AccordionItem — one hairline-ruled record, keyed by the value Radix opens and closes it by. The set is the root above it: type="single" with collapsible for an FAQ, type="multiple" for a stack of settings.
18
+ - **Heading** (required) — Radix’s Accordion.Header, which is an <h3> and takes no level prop. Every row therefore adds an h3 to the document outline, wherever the accordion happens to sit.
19
+ - **Trigger** (required) — The full-width button inside that heading: title against the start edge, marker against the end, py-4. It is also what names the open panel.
20
+ - **Marker** (required) — A 16px plus, aria-hidden, rotating 45° into a minus when the row opens. The state it draws is carried for everyone else by aria-expanded on the trigger.
21
+ - **Panel** — Radix’s Content — a role="region" labelled by its trigger, mounted only while open, overflow-hidden so its measured height can animate, with pb-4 pe-8 inside so the text stops short of the marker’s column. It carries data-m22-animated, so the open and close are dropped outright for a reader who asked for less motion.
22
+
23
+ ## Best practices
24
+
25
+ ### Do
26
+
27
+ - Pass collapsible alongside type="single": without it there is no empty value to return to, so the first row the reader opens is a row they can never close again.
28
+ - Key each item by something stable rather than by its position — Radix tracks the open row by value, so re-ordering or filtering the list leaves whatever now sits in that slot standing open.
29
+ - Write the title as the whole question: it is the accessible name of the panel as well as of the trigger, so a row titled “More” opens a region called “More”.
30
+ - Reach for type="multiple" when two rows have to be read against each other — single closes the one the reader was holding in order to open the one they wanted to compare it with.
31
+
32
+ ### Don’t
33
+
34
+ - A closed row’s content is not in the DOM, so an FAQ built out of these is invisible to find-in-page and prints as a list of questions — anything that has to be searchable or printable belongs in the page.
35
+ - The trigger is fixed at h3 by Radix’s header, so an accordion under an <h3> lists its rows as that heading’s siblings and the outline goes flat exactly where it should have nested.
36
+ - The panel is overflow-hidden — that is what lets the open height animate — so anything inside that must escape the row’s box has to portal out of it; a menu that renders in place is cut off at the row’s edge.
37
+
15
38
  ## Keyboard
16
39
 
17
40
  - Tab — Moves between rows.
@@ -4,7 +4,7 @@ A message about the page, in place.
4
4
 
5
5
  - Group: Feedback
6
6
  - Import: `import { Alert } from '@misoto22/design'`
7
- - Version: 0.7.0
7
+ - Version: 0.8.0
8
8
  - Docs: https://ui.misoto22.com/components/alert/
9
9
  - Related: toast, error-state
10
10
 
@@ -12,6 +12,28 @@ A message about the page, in place.
12
12
 
13
13
  Something the reader needs to see and may need to act on. Something they only need to notice is a Toast.
14
14
 
15
+ ## Anatomy
16
+
17
+ - **Region** (required) — The container, carrying the role and the aria-live the tone chooses, plus the tone’s ground. It is not focusable and it is not a landmark, so it exists for the reader who is already there and for the announcement.
18
+ - **Mark** — The tone’s lucide icon at 18px — Info, CheckCircle2, AlertTriangle or XCircle — aria-hidden, so it doubles the colour for sighted readers only. hideIcon removes it.
19
+ - **Title** — title, as a medium-weight paragraph in --ink. A p and not a heading, so it never appears in a screen reader’s heading list.
20
+ - **Body** — children, in --ink-2 at relaxed leading, offset from the title only when there is a title to offset from.
21
+ - **Action** — action, below the body and inside the region — so its label is read out with the message rather than being something the reader has to go looking for.
22
+
23
+ ## Best practices
24
+
25
+ ### Do
26
+
27
+ - Mount the Alert when there is something to say and unmount it when there is not. A region kept permanently in the page announces only when its words change, so a second failed submit carrying the same message is announced to nobody.
28
+ - Move focus after a failed submit — to the Alert or to the field it names. The component announces and then stays put, so a keyboard reader hears the error from wherever they were standing and has no way back to it.
29
+ - Put the retry, the link or the escape in action rather than describing it in the prose. It sits inside the live region, which is the difference between the announcement telling the reader what to do and merely telling them something is wrong.
30
+
31
+ ### Don’t
32
+
33
+ - hideIcon takes away one of the two things that double the colour, and the tinted grounds are 13–16% alpha over paper. With the mark gone the severity is carried by a wash the reader may not resolve at all, so the words have to say it outright.
34
+ - info is the default and the only tone with a border and no tint — --paper-2 inside a --rule-2 hairline, which is a card. An Alert written without tone therefore looks like page furniture rather than like a notice.
35
+ - Do not stack alerts as a running log. Each one is its own live region, so five on a page are five announcements competing for the same speech queue, and a danger among them is assertive enough to cut off the four that explain it.
36
+
15
37
  ## Accessibility
16
38
 
17
39
  - danger is role="alert" and interrupts; the other three are role="status" and wait for a pause.
@@ -4,18 +4,46 @@ Two columns on a desktop, a drawer on a phone.
4
4
 
5
5
  - Group: Surfaces
6
6
  - Import: `import { AppShell } from '@misoto22/design'`
7
- - Version: 0.7.0
7
+ - Version: 0.8.0
8
8
  - Docs: https://ui.misoto22.com/components/app-shell/
9
9
  - Related: nav-item
10
10
 
11
+ ## Anatomy
12
+
13
+ - **Frame** (required) — The root: min-h-svh on --paper, one column on a phone and a 15rem sidebar beside a 1fr content column from md up. It is the grid and nothing else — no padding, no measure.
14
+ - **Sidebar** (required) — An <aside> named by sidebarLabel, 15rem wide. A static grid column on a desktop; on a phone a fixed drawer that slides in from the edge reading STARTS at, so it comes from the right in a right-to-left document.
15
+ - **Brand** — brand, in a 3.5rem row at the top of the sidebar above a hairline — the same height as the topbar, so the two rules meet across the column boundary. Omit it and the nav starts at the top and that line is gone.
16
+ - **Nav** (required) — A <nav> named by navLabel, “Primary” by default, holding the sidebar prop. It is the part that scrolls, with scroll-slim, so a list that outgrows the column moves under a brand that stays put.
17
+ - **Topbar** (required) — A sticky 3.5rem header at --paper/85 with a backdrop blur and a hairline under it, holding the toggle and then topbar. It is rendered whether or not you pass one.
18
+ - **Drawer toggle** — A 44px button, phone-only, swapping Menu for X and carrying aria-expanded plus aria-controls pointing at the sidebar. Its only name is openLabel or closeLabel.
19
+ - **Scrim** — A full-screen <button> named by closeLabel, mounted only while the drawer is open and hidden from md up.
20
+ - **Content well** (required) — contentAs — a <main> by default — centred at --w-page with --page-pad either side and py-8. The measure and the page padding are the shell’s, so a child that adds its own puts a second measure inside the first.
21
+
22
+ ## Best practices
23
+
24
+ ### Do
25
+
26
+ - Pass contentAs="div" for a shell rendered inside another page — a documentation preview, a screenshot harness. A document may hold exactly one main, and the second one leaves assistive tech unable to answer “where is the content”.
27
+ - Name both landmarks when a page could hold two shells: sidebarLabel and navLabel are the only way one complementary is told from another, and the only way a non-English app gets landmark names its readers can read.
28
+ - Translate openLabel and closeLabel with everything else — the toggle holds an icon and no text, so those strings are its entire accessible name on every page of the app.
29
+ - Put the whole sidebar in the sidebar prop and let the nav scroll it: build the column yourself with the brand inside it and a long list carries the brand off the top of the screen with it.
30
+
31
+ ### Don’t
32
+
33
+ - Do not treat the closed drawer as unmounted: below md it is translated off-screen and marked inert, not removed, so everything inside it still renders and still runs its effects — a nav item that measures itself measures a box nobody can see.
34
+ - Do not assume no topbar means no bar: the header renders regardless, so a shell with nothing to put up there still costs 3.5rem and a rule across the page.
35
+ - Do not wrap the children in your own max-width and page padding — the well already applies both, and the content ends up in the middle of the middle.
36
+
11
37
  ## Accessibility
12
38
 
13
39
  - The drawer closes on Escape as well as on the scrim, so a keyboard user is not stranded inside it.
14
40
  - The scrim is a <button>, because a div with an onClick is neither reachable nor announced.
41
+ - Below md the closed drawer carries inert, so its links are out of the tab order and out of the accessibility tree rather than merely off screen. Above md it never is: there the sidebar is the page’s navigation column.
42
+ - Both ways out return focus to the toggle. Focus left inside an inert subtree is focus the browser throws away, and the scrim is worse — it is the focused element and it unmounts.
15
43
 
16
44
  ## AppShell
17
45
 
18
- Two columns on a desktop, one column and a drawer on a phone. The drawer closes on Escape as well as on the scrim, because a drawer that only closes by tapping outside it strands a keyboard user inside a menu they cannot leave. The scrim is a `<button>` for the same reason — a `<div>` with an `onClick` is not reachable by keyboard and not announced as anything.
46
+ Two columns on a desktop, one column and a drawer on a phone. The drawer closes on Escape as well as on the scrim, because a drawer that only closes by tapping outside it strands a keyboard user inside a menu they cannot leave. The scrim is a `<button>` for the same reason — a `<div>` with an `onClick` is not reachable by keyboard and not announced as anything. Below `md` the closed drawer is `inert`. Sliding it off-screen is a visual state and nothing more: without that attribute every link in it stays focusable and stays in the accessibility tree, so Tab from the toggle walks into a menu nobody can see. Closing it also returns focus to the toggle, because the element focus was on is the element that just left.
19
47
 
20
48
  ### Props
21
49
 
@@ -4,7 +4,7 @@ A component map: services, datastores, trust boundaries, and what talks to what.
4
4
 
5
5
  - Group: Diagrams
6
6
  - Import: `import { ArchitectureFigure } from '@misoto22/design/diagrams'`
7
- - Version: 0.7.0
7
+ - Version: 0.8.0
8
8
  - Docs: https://ui.misoto22.com/components/architecture-figure/
9
9
  - Related: dataflow-figure, diagram, diagram-canvas
10
10
 
@@ -12,6 +12,29 @@ A component map: services, datastores, trust boundaries, and what talks to what.
12
12
 
13
13
  Reach for it when the question is "what talks to what". If the question is "in what order", that is a workflow or a sequence; if it is "what is in this arrow", that is a data flow.
14
14
 
15
+ ## Anatomy
16
+
17
+ - **Figure shell** (required) — The frame all five figures sit in — a serif title, the scrolling paper surface, the role="img" svg. What a map hands it is the relationship list: every connection published as "CloudFront → API: HTTPS", which is the sentence this diagram type exists to make.
18
+ - **Grid** (required) — What row and col index into: a 184 × 72 cell with 64 and 76 unit gutters, overridable per figure through spec.layout — where cellW is the pitch AND the width of the plates drawn at it. A component declaring neither row nor col flows into the next free cell, wrapping at layout.cols; pos replaces the grid entirely and puts the box at an absolute coordinate.
19
+ - **Component plate** (required) — One box per component: a sigil and an eyebrow on the top line, the name at reading size, the sublabel in mono under it. The eyebrow prints the component’s own tag when it has one and the kind word otherwise, and the box grows past a declared height rather than printing through its own bottom rule.
20
+ - **Boundary frame** — A labelled rule around the union of the boxes its wraps names, inflated by pad — 28 units by default. Solid for a region, dashed for a security-group, so where a thing runs and what may reach it are two different lines before either label is read.
21
+ - **Connections** — Lines that leave and arrive perpendicular to a face, spread across that face when several share it, each with its wording on a mask that punches the line out from under itself.
22
+ - **Key** — The kinds actually drawn, each shown with the same sigil the plates carry. legend="all" names all seven instead; legend="hidden" prints none.
23
+
24
+ ## Best practices
25
+
26
+ ### Do
27
+
28
+ - Build a new spec object when something changes. The model is memoised on the spec’s identity, so mutating spec.components in place leaves the same reference and the figure goes on drawing the picture it was first given — development prints DIAGRAM_SPEC_MUTATED when it catches that, and a production build prints nothing and still draws the old picture.
29
+ - Place both ends with pos when a connection carries a hand-tuned via, channelX or channelY. Those are honoured only when both endpoints were placed absolutely — on the grid they are coordinates in a space this renderer did not choose, so a route between two row/col components is dropped and re-routed.
30
+ - Drive a guided reading yourself. meta.views typechecks and no renderer reads it — a chapter is a control rather than a layout — so the chapter’s focus ids have to arrive as activeIds, which is what dims everything else and adds the "n highlighted" status line.
31
+ - Leave row and col off the components you have no opinion about. They flow into the next free cell in declaration order, wrapping at layout.cols and stepping around whatever the placed ones claimed — a component declaring neither used to mean row 0, column 0, which is one plate with the rest of them underneath it.
32
+
33
+ ### Don’t
34
+
35
+ - Two components on one cell are still two plates at one coordinate, one drawn over the other: there is no second place to put the second plate. Development prints DIAGRAM_CELL_COLLISION naming both, which is the only signal — the picture is identical either way.
36
+ - A boundary silently shrinks to the components it can find. A wraps id no component declares is skipped, and a boundary whose ids are all missing draws no frame at all — a trust boundary can leave the picture while the specification still claims it.
37
+
15
38
  ## Accessibility
16
39
 
17
40
  - The <svg> is role="img" with a name, so a screen reader announces a picture instead of walking two hundred <text> nodes in drawing order.
@@ -20,7 +43,7 @@ Reach for it when the question is "what talks to what". If the question is "in w
20
43
 
21
44
  ## ArchitectureFigure
22
45
 
23
- A component map: services, datastores, boundaries, and what talks to what. Takes the same JSON an archify `architecture` specification carries — `components`, `boundaries`, `connections` — and draws it in this system's own terms: paper plates on a hairline, one reversed plate for the component the diagram is about, and seven drawn sigils where archify uses seven hues. IT RENDERS ON A SERVER because every position is already in the specification. A component gives a `row` and a `col` into a grid whose cell size is either declared or defaulted, or it gives an absolute `pos` — nothing here is solved for, relaxed, or measured. So the markup is a pure function of the input, it is identical on the server and in the browser, and there is no layout shift on hydration because there is no layout to do. BOUNDARIES ARE DRAWN FIRST, AND DRAWN DIFFERENTLY. A `region` is where something RUNS — a VPC, a zone, a cluster — and is a solid frame. A `security-group` is what may REACH it, and is dashed. That is not decoration: an infrastructure diagram is very often read for exactly one of those two questions, and a reader should be able to tell which line answers which without reading either label.
46
+ A component map: services, datastores, boundaries, and what talks to what. Takes the same JSON an archify `architecture` specification carries — `components`, `boundaries`, `connections` — and draws it in this system's own terms: paper plates on a hairline, one reversed plate for the component the diagram is about, and seven drawn sigils where archify uses seven hues. IT RENDERS ON A SERVER because every position is already in the specification. A component gives a `row` and a `col` into a grid whose cell size is either declared or defaulted, or it gives an absolute `pos` — nothing here is solved for, relaxed, or measured. So the markup is a pure function of the input, it is identical on the server and in the browser, and there is no layout shift on hydration because there is no layout to do. A component that declares NEITHER flows: it takes the next free cell in declaration order, wrapping at `layout.cols`. That is still arithmetic on numbers the specification carries rather than a solver — and the alternative was every unplaced component defaulting to row 0, column 0 and stacking into one plate. BOUNDARIES ARE DRAWN FIRST, AND DRAWN DIFFERENTLY. A `region` is where something RUNS — a VPC, a zone, a cluster — and is a solid frame. A `security-group` is what may REACH it, and is dashed. That is not decoration: an infrastructure diagram is very often read for exactly one of those two questions, and a reader should be able to tell which line answers which without reading either label.
24
47
 
25
48
  ### Props
26
49
 
@@ -4,7 +4,7 @@ A filled series over a continuous axis, where the area means something.
4
4
 
5
5
  - Group: Charts
6
6
  - Import: `import { AreaChart } from '@misoto22/design/charts'`
7
- - Version: 0.7.0
7
+ - Version: 0.8.0
8
8
  - Docs: https://ui.misoto22.com/components/area-chart/
9
9
  - Related: line-chart, bar-chart, composed-chart
10
10
 
@@ -12,6 +12,30 @@ A filled series over a continuous axis, where the area means something.
12
12
 
13
13
  Reading one magnitude over time. Comparing several series against each other is a LineChart — four translucent fills stacked on each other answer neither question.
14
14
 
15
+ ## Anatomy
16
+
17
+ - **Figure frame** (required) — The <figure> ChartFigure draws, named through aria-labelledby rather than left to the figcaption, because deriving a name from a <figcaption> resolves in only some screen readers. The caption holds title and description together and is sr-only until showTitle is set, so a caveat written into description is announced and never printed.
18
+ - **Plot** (required) — ChartContainer: a 16:9 box floored at 13rem and capped at 26rem, and the one place Recharts’ hard-coded #ccc axis and grid strokes are re-pointed at --chart-grid and --chart-axis.
19
+ - **Areas** (required) — <AreaChart.Area>, one per series. Each generates its own id and scopes its gradient, its texture pattern and its reveal mask under it, so six variants share a plot without one overwriting another’s definitions.
20
+ - **Brush strip** — <AreaChart.Brush>, rendered in the container’s footer rather than inside the SVG. Both handles are role="slider" with aria-valuetext naming the row they sit on, so the window is reachable by arrow key.
21
+ - **Toolbar** — <AreaChart.Toolbar>, a role="group" row of at most five 44px icon buttons above the plot. Composing it also switches the plot’s own wheel, drag and keyboard zoom on, and the two drive one window rather than two.
22
+ - **Hidden data table** — An sr-only <table> built from the FULL data rather than the brushed window, so a reader on the table is never shown less than the CSV export holds. hideDataTable removes it, and zero rows render nothing.
23
+
24
+ ## Best practices
25
+
26
+ ### Do
27
+
28
+ - Stack only quantities that genuinely add up. Under stackType="stacked" a band’s HEIGHT is its own value but its POSITION is the sum of everything under it, so stacking four independent rates draws a running total nobody measured.
29
+ - Reach for stackType="expanded" when the reading is share rather than volume: it sets Recharts’ expand offset and <AreaChart.YAxis> swaps in percentTick on its own, so the axis reads 0% to 100% without a formatter at the call site. A tickFormatter of your own still wins — the axis defers to it rather than dropping it, which it used to do without a word.
30
+ - Vary variant before the ramp on a two-area chart. The six fills are the primary encoding in the monochrome default, and under forced colours every --series-* token resolves to CanvasText — at which point the texture is the only thing left separating two areas.
31
+ - Pass xDataKey. It is the rowKey of the hidden table, and without it the table renders no row-header column at all: a screen reader gets a column of numbers with no month beside them.
32
+
33
+ ### Don’t
34
+
35
+ - Four translucent fills over each other is this form’s failure mode — the third area is read through two layers of --chart-fill and its own height stops being recoverable. Several series compared against each other is a LineChart, where nothing occludes anything.
36
+ - connectNulls defaults to false for a reason: turned on, a gap in the data is drawn as a straight segment indistinguishable from a measured flat period. Set it only where the gap is a rendering artefact rather than a missing observation.
37
+ - A single row draws nothing. One point has no segment to fill, dot is false unless <AreaChart.Dot> is composed, and the empty state does not fire because there IS a row — so the axes render over a blank plot.
38
+
15
39
  ## Accessibility
16
40
 
17
41
  - title is required and becomes the figure’s accessible name, printed or not.
@@ -41,7 +65,8 @@ A filled series over a category axis — the shape for a magnitude that is conti
41
65
  - `curveType` — `ChartCurveType` default `'linear'`. The curve every `<AreaChart.Area>` inherits.
42
66
  - `animationType` — `ChartRevealType` default `'forward'`. The intro wipe every `<AreaChart.Area>` inherits.
43
67
  - `stackType` — `AreaStackType` default `'default'`. How several marks combine: side by side, stacked, or normalised to 100%.
44
- - `defaultSelectedDataKey` — `string | null` default `null`. The series lit on first render. Selection dims every other series.
68
+ - `defaultSelectedDataKey` — `string | null` default `null`. The series lit on first render, when the chart keeps its own selection.
69
+ - `selectedDataKey` — `string | null`. The selected series, driven from outside. Give this and the chart follows it; leave it undefined and the chart keeps its own, starting from `defaultSelectedDataKey`.
45
70
  - `onSelectionChange` — `(selectedDataKey: string | null) => void`. Fires when the selection changes, and with null when it is cleared.
46
71
  - `isLoading` — `boolean` default `false`. Swaps the marks for an animated skeleton, keeping the measured height so the page does not jump when the data lands.
47
72
  - `loadingPoints` — `number`. How many points the skeleton draws.
@@ -4,7 +4,7 @@ The long-form reading surface — everything a Markdown pipeline emits, in this
4
4
 
5
5
  - Group: Surfaces
6
6
  - Import: `import { Article } from '@misoto22/design'`
7
- - Version: 0.7.0
7
+ - Version: 0.8.0
8
8
  - Docs: https://ui.misoto22.com/components/article/
9
9
  - Related: diagram, card
10
10
 
@@ -12,15 +12,38 @@ The long-form reading surface — everything a Markdown pipeline emits, in this
12
12
 
13
13
  A post, a changelog entry, a document. Not for interface copy: a paragraph inside a card is a paragraph, and this is a whole reading column with its own rhythm.
14
14
 
15
+ ## Anatomy
16
+
17
+ - **The column** (required) — Whatever as names — article, section or div — tagged data-m22-article, which is what every rule in article.css is scoped to. A 46rem measure and no inline margins of its own, so it sits wherever its parent puts it.
18
+ - **Blocks** (required) — The DIRECT children, and where the rhythm lives: air above every block, more above a heading, none on the first. A block one level deeper is outside that rule and outside its spacing.
19
+ - **Rendered HTML** — html, written with dangerouslySetInnerHTML. Present it and children are not rendered at all — the trust boundary is the pipeline that produced the string, because there is nothing here that will catch a script tag on the way through.
20
+ - **Lead** — p.lead — the standfirst, at --fs-item in full --ink. Marked by the author or the pipeline, never inferred: the stylesheet does not promote whatever happened to come first.
21
+ - **Wide blocks** — figure, table and .m22-wide are the three things allowed out of the measure, because a six-column table and an image with a subject in it are both unreadable at 46rem.
22
+
23
+ ## Best practices
24
+
25
+ ### Do
26
+
27
+ - Centre it yourself. It sets a measure, not a layout — with no auto margins it sits against the start edge of a wide page until a parent centres it.
28
+ - Keep every block a direct child: the rhythm is a child combinator, so a <div> wrapped around a run of paragraphs — even a display:contents one, which removes the box but not the node — costs all of them their spacing.
29
+ - Have the pipeline wrap a wide table in .m22-table-scroll. A table is allowed out of the measure and has nothing of its own to scroll inside, so eight columns push the whole page sideways instead.
30
+ - Sanitise before the string arrives, and mark the boundary where you do it: html is set as innerHTML, so a CMS field that reaches this prop unsanitised is stored XSS with a reading measure.
31
+
32
+ ### Don’t
33
+
34
+ - Do not pass html and children together — html wins and the children are dropped. It says so in development now, but html="" is still html, so a pipeline that rendered nothing takes the children down with it. A post that mixes prose with components is two Articles in order, not one holding both.
35
+ - Do not count on a nested component’s utilities holding inside one: article.css is imported unlayered and beats Tailwind’s @layer utilities whatever the specificity, so any property these rules also set is overridden. A component that must keep one needs an inline style, or a tag the stylesheet does not reach.
36
+ - Do not nest six heading levels: h5 and h6 are set as mono uppercase 11px eyebrows rather than as smaller headings, so a document loses its type hierarchy at exactly the depth that needed one.
37
+
15
38
  ## Accessibility
16
39
 
17
40
  - An <article> by default, so the piece is a landmark a reader can jump to.
18
41
  - Every heading carries scroll-margin, so an anchored link does not park the heading under a fixed masthead.
19
- - The styles are element selectors at low specificity, so a component dropped inside keeps its own.
42
+ - The styles are imported unlayered, so inside an article they beat a component’s layered utilities which is what lets a Markdown paragraph give its margin up to the article’s rhythm.
20
43
 
21
44
  ## Article
22
45
 
23
- The long-form reading surface. Everything a Markdown pipeline can emit — headings, prose, lists, tables, quotations, code, figures, footnotes, MathML — set in this system's type, colour and rules. The styles live in `article.css` rather than in a class string, because the input is not JSX: there is no component to hang a class on when the markup arrived as a string, so the contract has to be the element names themselves. That file is published on its own as `@misoto22/design/article.css`, so a site with its own Markdown pipeline can take the reading surface without taking the components — which is the case this exists for. Three sites hand-rolling a prose stylesheet is three prose stylesheets that drift. Composable either way: pass `html` for a rendered string, or children for real elements. A post that mixes the two — prose with a `Diagram` dropped into the middle — renders its blocks in order and gives each one an `Article`; a component inside keeps its own classes, because every rule in the layer is a bare element selector that a utility outranks.
46
+ The long-form reading surface. Everything a Markdown pipeline can emit — headings, prose, lists, tables, quotations, code, figures, footnotes, MathML — set in this system's type, colour and rules. The styles live in `article.css` rather than in a class string, because the input is not JSX: there is no component to hang a class on when the markup arrived as a string, so the contract has to be the element names themselves. That file is published on its own as `@misoto22/design/article.css`, so a site with its own Markdown pipeline can take the reading surface without taking the components — which is the case this exists for. Three sites hand-rolling a prose stylesheet is three prose stylesheets that drift. Composable either way: pass `html` for a rendered string, or children for real elements — one or the other, never both. `html` wins when both arrive, and says so in development: `html=""` is still `html`, which made losing a page of children a thing that could happen without a word. A post that mixes the two — prose with a `Diagram` dropped into the middle — renders its blocks in order and gives each one an `Article`. Inside one, these rules BEAT a component's utilities: `article.css` is imported unlayered while Tailwind's utilities sit in `@layer utilities`, and an unlayered rule wins over a layered one whatever either one's specificity is. That is the mechanism rather than an accident — it is what lets a `Markdown` paragraph, a `Text` carrying `m-0`, give its margin up to the article's rhythm. A component that has to hold a property inside an article needs an inline style, not a class.
24
47
 
25
48
  ### Props
26
49