@misoto22/design 0.7.0 → 0.9.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 (398) 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/ColorPicker.md +75 -0
  28. package/dist/agent/Combobox.md +29 -3
  29. package/dist/agent/Command.md +25 -2
  30. package/dist/agent/ComposedChart.md +26 -2
  31. package/dist/agent/ContextMenu.md +37 -4
  32. package/dist/agent/DataflowFigure.md +22 -1
  33. package/dist/agent/DatePicker.md +34 -6
  34. package/dist/agent/DescriptionList.md +68 -0
  35. package/dist/agent/Diagram.md +27 -3
  36. package/dist/agent/DiagramCanvas.md +24 -1
  37. package/dist/agent/DiagramExportMenu.md +29 -3
  38. package/dist/agent/DiagramInspector.md +23 -1
  39. package/dist/agent/DiagramLegend.md +22 -1
  40. package/dist/agent/DiagramMinimap.md +24 -4
  41. package/dist/agent/DiagramToolbar.md +23 -1
  42. package/dist/agent/Dialog.md +26 -3
  43. package/dist/agent/DropdownMenu.md +45 -6
  44. package/dist/agent/EmptyState.md +26 -1
  45. package/dist/agent/ErrorState.md +27 -2
  46. package/dist/agent/Facet.md +25 -1
  47. package/dist/agent/Field.md +45 -4
  48. package/dist/agent/FigureBand.md +24 -1
  49. package/dist/agent/FloatingIconButton.md +23 -1
  50. package/dist/agent/FunnelChart.md +23 -1
  51. package/dist/agent/Heading.md +64 -0
  52. package/dist/agent/Heatmap.md +25 -1
  53. package/dist/agent/Histogram.md +26 -2
  54. package/dist/agent/Input.md +22 -1
  55. package/dist/agent/Kbd.md +19 -1
  56. package/dist/agent/LifecycleFigure.md +22 -1
  57. package/dist/agent/LineChart.md +26 -2
  58. package/dist/agent/LinkArrow.md +20 -1
  59. package/dist/agent/Markdown.md +68 -0
  60. package/dist/agent/NativeSelect.md +23 -2
  61. package/dist/agent/NavItem.md +21 -1
  62. package/dist/agent/NumberField.md +72 -0
  63. package/dist/agent/Pagination.md +28 -2
  64. package/dist/agent/PieChart.md +26 -2
  65. package/dist/agent/Popover.md +23 -1
  66. package/dist/agent/Progress.md +27 -3
  67. package/dist/agent/RadarChart.md +26 -2
  68. package/dist/agent/RadialChart.md +26 -3
  69. package/dist/agent/RadioGroup.md +23 -2
  70. package/dist/agent/SankeyChart.md +25 -2
  71. package/dist/agent/ScatterChart.md +27 -2
  72. package/dist/agent/ScrollArea.md +24 -3
  73. package/dist/agent/SearchableMenu.md +23 -1
  74. package/dist/agent/Select.md +29 -3
  75. package/dist/agent/Separator.md +28 -4
  76. package/dist/agent/SequenceFigure.md +23 -1
  77. package/dist/agent/Sheet.md +25 -2
  78. package/dist/agent/Sidebar.md +193 -0
  79. package/dist/agent/Skeleton.md +24 -2
  80. package/dist/agent/Slider.md +31 -4
  81. package/dist/agent/Sparkline.md +23 -1
  82. package/dist/agent/Spinner.md +24 -2
  83. package/dist/agent/StatusDot.md +20 -1
  84. package/dist/agent/StatusPill.md +28 -2
  85. package/dist/agent/Steps.md +24 -1
  86. package/dist/agent/Switch.md +21 -1
  87. package/dist/agent/Table.md +28 -3
  88. package/dist/agent/Tabs.md +24 -2
  89. package/dist/agent/Tag.md +40 -9
  90. package/dist/agent/Text.md +65 -0
  91. package/dist/agent/Textarea.md +20 -1
  92. package/dist/agent/Timestamp.md +64 -0
  93. package/dist/agent/Toast.md +26 -2
  94. package/dist/agent/ToggleGroup.md +24 -2
  95. package/dist/agent/Toolbar.md +71 -0
  96. package/dist/agent/Tooltip.md +23 -1
  97. package/dist/agent/TreemapChart.md +24 -1
  98. package/dist/agent/WaterfallChart.md +24 -1
  99. package/dist/agent/WorkflowFigure.md +24 -2
  100. package/dist/agent/catalog.json +5915 -699
  101. package/dist/agent/index.md +20 -8
  102. package/dist/article.css +16 -4
  103. package/dist/charts/AreaChart/AreaChart.d.ts +9 -2
  104. package/dist/charts/AreaChart/AreaChart.js +12 -13
  105. package/dist/charts/AreaChart/AreaChart.js.map +1 -1
  106. package/dist/charts/BarChart/BarChart.d.ts +14 -3
  107. package/dist/charts/BarChart/BarChart.js +20 -12
  108. package/dist/charts/BarChart/BarChart.js.map +1 -1
  109. package/dist/charts/BarList/BarList.d.ts +9 -1
  110. package/dist/charts/BarList/BarList.js +9 -1
  111. package/dist/charts/BarList/BarList.js.map +1 -1
  112. package/dist/charts/BigNumber/BigNumber.d.ts +19 -3
  113. package/dist/charts/BigNumber/BigNumber.js +25 -5
  114. package/dist/charts/BigNumber/BigNumber.js.map +1 -1
  115. package/dist/charts/BoxPlot/BoxPlot.js +4 -2
  116. package/dist/charts/BoxPlot/BoxPlot.js.map +1 -1
  117. package/dist/charts/BulletChart/BulletChart.js +44 -9
  118. package/dist/charts/BulletChart/BulletChart.js.map +1 -1
  119. package/dist/charts/ComposedChart/ComposedChart.d.ts +9 -2
  120. package/dist/charts/ComposedChart/ComposedChart.js +10 -10
  121. package/dist/charts/ComposedChart/ComposedChart.js.map +1 -1
  122. package/dist/charts/FunnelChart/FunnelChart.d.ts +7 -2
  123. package/dist/charts/FunnelChart/FunnelChart.js +6 -16
  124. package/dist/charts/FunnelChart/FunnelChart.js.map +1 -1
  125. package/dist/charts/Heatmap/Heatmap.d.ts +17 -3
  126. package/dist/charts/Heatmap/Heatmap.js +20 -11
  127. package/dist/charts/Heatmap/Heatmap.js.map +1 -1
  128. package/dist/charts/Histogram/Histogram.d.ts +24 -1
  129. package/dist/charts/Histogram/Histogram.js +43 -11
  130. package/dist/charts/Histogram/Histogram.js.map +1 -1
  131. package/dist/charts/LineChart/LineChart.d.ts +9 -2
  132. package/dist/charts/LineChart/LineChart.js +11 -12
  133. package/dist/charts/LineChart/LineChart.js.map +1 -1
  134. package/dist/charts/PieChart/PieChart.d.ts +15 -3
  135. package/dist/charts/PieChart/PieChart.js +14 -6
  136. package/dist/charts/PieChart/PieChart.js.map +1 -1
  137. package/dist/charts/RadarChart/RadarChart.d.ts +15 -3
  138. package/dist/charts/RadarChart/RadarChart.js +15 -11
  139. package/dist/charts/RadarChart/RadarChart.js.map +1 -1
  140. package/dist/charts/RadialChart/RadialChart.d.ts +22 -4
  141. package/dist/charts/RadialChart/RadialChart.js +28 -6
  142. package/dist/charts/RadialChart/RadialChart.js.map +1 -1
  143. package/dist/charts/SankeyChart/SankeyChart.d.ts +16 -4
  144. package/dist/charts/SankeyChart/SankeyChart.js +14 -6
  145. package/dist/charts/SankeyChart/SankeyChart.js.map +1 -1
  146. package/dist/charts/ScatterChart/ScatterChart.d.ts +24 -3
  147. package/dist/charts/ScatterChart/ScatterChart.js +21 -15
  148. package/dist/charts/ScatterChart/ScatterChart.js.map +1 -1
  149. package/dist/charts/Sparkline/Sparkline.js +5 -3
  150. package/dist/charts/Sparkline/Sparkline.js.map +1 -1
  151. package/dist/charts/TreemapChart/TreemapChart.d.ts +7 -2
  152. package/dist/charts/TreemapChart/TreemapChart.js +20 -11
  153. package/dist/charts/TreemapChart/TreemapChart.js.map +1 -1
  154. package/dist/charts/WaterfallChart/WaterfallChart.js +4 -2
  155. package/dist/charts/WaterfallChart/WaterfallChart.js.map +1 -1
  156. package/dist/charts/lib/export.d.ts +1 -0
  157. package/dist/charts/lib/figure.d.ts +21 -1
  158. package/dist/charts/lib/figure.js +5 -2
  159. package/dist/charts/lib/figure.js.map +1 -1
  160. package/dist/charts/lib/scale.d.ts +23 -0
  161. package/dist/charts/lib/scale.js +13 -0
  162. package/dist/charts/lib/scale.js.map +1 -0
  163. package/dist/charts/lib/selection.d.ts +20 -0
  164. package/dist/charts/lib/selection.js +18 -0
  165. package/dist/charts/lib/selection.js.map +1 -0
  166. package/dist/charts/lib/toolbar.d.ts +1 -0
  167. package/dist/components/Accordion/Accordion.js +8 -1
  168. package/dist/components/Accordion/Accordion.js.map +1 -1
  169. package/dist/components/AppShell/AppShell.d.ts +6 -0
  170. package/dist/components/AppShell/AppShell.js +34 -4
  171. package/dist/components/AppShell/AppShell.js.map +1 -1
  172. package/dist/components/Article/Article.d.ts +11 -4
  173. package/dist/components/Article/Article.js +13 -0
  174. package/dist/components/Article/Article.js.map +1 -1
  175. package/dist/components/AspectRatio/AspectRatio.d.ts +46 -0
  176. package/dist/components/AspectRatio/AspectRatio.js +33 -0
  177. package/dist/components/AspectRatio/AspectRatio.js.map +1 -0
  178. package/dist/components/Avatar/Avatar.d.ts +12 -3
  179. package/dist/components/Avatar/Avatar.js +6 -1
  180. package/dist/components/Avatar/Avatar.js.map +1 -1
  181. package/dist/components/Breadcrumb/Breadcrumb.d.ts +6 -0
  182. package/dist/components/Breadcrumb/Breadcrumb.js +15 -0
  183. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
  184. package/dist/components/Button/Button.js +14 -0
  185. package/dist/components/Button/Button.js.map +1 -1
  186. package/dist/components/Calendar/Calendar.d.ts +29 -3
  187. package/dist/components/Calendar/Calendar.js +60 -12
  188. package/dist/components/Calendar/Calendar.js.map +1 -1
  189. package/dist/components/Card/Card.d.ts +6 -0
  190. package/dist/components/Card/Card.js +1 -1
  191. package/dist/components/Card/Card.js.map +1 -1
  192. package/dist/components/Checkbox/Checkbox.d.ts +5 -2
  193. package/dist/components/Checkbox/Checkbox.js +12 -2
  194. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  195. package/dist/components/Code/Code.d.ts +30 -0
  196. package/dist/components/Code/Code.js +21 -0
  197. package/dist/components/Code/Code.js.map +1 -0
  198. package/dist/components/CodeBlock/CodeBlock.d.ts +141 -0
  199. package/dist/components/CodeBlock/CodeBlock.js +123 -0
  200. package/dist/components/CodeBlock/CodeBlock.js.map +1 -0
  201. package/dist/components/Collapsible/Collapsible.js +10 -2
  202. package/dist/components/Collapsible/Collapsible.js.map +1 -1
  203. package/dist/components/ColorPicker/ColorPicker.d.ts +67 -0
  204. package/dist/components/ColorPicker/ColorPicker.js +334 -0
  205. package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
  206. package/dist/components/Combobox/Combobox.d.ts +15 -1
  207. package/dist/components/Combobox/Combobox.js +25 -5
  208. package/dist/components/Combobox/Combobox.js.map +1 -1
  209. package/dist/components/Command/Command.d.ts +4 -2
  210. package/dist/components/Command/Command.js +14 -2
  211. package/dist/components/Command/Command.js.map +1 -1
  212. package/dist/components/ContextMenu/ContextMenu.d.ts +30 -5
  213. package/dist/components/ContextMenu/ContextMenu.js +33 -3
  214. package/dist/components/ContextMenu/ContextMenu.js.map +1 -1
  215. package/dist/components/DatePicker/DatePicker.d.ts +36 -4
  216. package/dist/components/DatePicker/DatePicker.js +55 -12
  217. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  218. package/dist/components/DescriptionList/DescriptionList.d.ts +73 -0
  219. package/dist/components/DescriptionList/DescriptionList.js +35 -0
  220. package/dist/components/DescriptionList/DescriptionList.js.map +1 -0
  221. package/dist/components/Diagram/Diagram.d.ts +8 -3
  222. package/dist/components/Diagram/Diagram.js +82 -10
  223. package/dist/components/Diagram/Diagram.js.map +1 -1
  224. package/dist/components/Dialog/Dialog.d.ts +18 -3
  225. package/dist/components/Dialog/Dialog.js +21 -3
  226. package/dist/components/Dialog/Dialog.js.map +1 -1
  227. package/dist/components/DropdownMenu/DropdownMenu.d.ts +49 -11
  228. package/dist/components/DropdownMenu/DropdownMenu.js +33 -3
  229. package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -1
  230. package/dist/components/EmptyState/EmptyState.d.ts +25 -1
  231. package/dist/components/EmptyState/EmptyState.js +3 -1
  232. package/dist/components/EmptyState/EmptyState.js.map +1 -1
  233. package/dist/components/ErrorState/ErrorState.d.ts +22 -1
  234. package/dist/components/ErrorState/ErrorState.js +12 -3
  235. package/dist/components/ErrorState/ErrorState.js.map +1 -1
  236. package/dist/components/Field/Field.d.ts +70 -3
  237. package/dist/components/Field/Field.js +53 -12
  238. package/dist/components/Field/Field.js.map +1 -1
  239. package/dist/components/Field/field-control.d.ts +31 -0
  240. package/dist/components/Field/field-control.js +12 -0
  241. package/dist/components/Field/field-control.js.map +1 -0
  242. package/dist/components/FloatingIconButton/FloatingIconButton.js +2 -0
  243. package/dist/components/FloatingIconButton/FloatingIconButton.js.map +1 -1
  244. package/dist/components/Heading/Heading.d.ts +62 -0
  245. package/dist/components/Heading/Heading.js +44 -0
  246. package/dist/components/Heading/Heading.js.map +1 -0
  247. package/dist/components/Markdown/Markdown.d.ts +139 -0
  248. package/dist/components/Markdown/Markdown.js +135 -0
  249. package/dist/components/Markdown/Markdown.js.map +1 -0
  250. package/dist/components/Markdown/inline.d.ts +29 -0
  251. package/dist/components/Markdown/inline.js +74 -0
  252. package/dist/components/Markdown/inline.js.map +1 -0
  253. package/dist/components/Markdown/nodes.d.ts +65 -0
  254. package/dist/components/Markdown/nodes.js +1 -0
  255. package/dist/components/Markdown/nodes.js.map +1 -0
  256. package/dist/components/Markdown/parse.d.ts +24 -0
  257. package/dist/components/Markdown/parse.js +110 -0
  258. package/dist/components/Markdown/parse.js.map +1 -0
  259. package/dist/components/Markdown/slug.d.ts +15 -0
  260. package/dist/components/Markdown/slug.js +7 -0
  261. package/dist/components/Markdown/slug.js.map +1 -0
  262. package/dist/components/NativeSelect/NativeSelect.d.ts +6 -0
  263. package/dist/components/NativeSelect/NativeSelect.js +2 -3
  264. package/dist/components/NativeSelect/NativeSelect.js.map +1 -1
  265. package/dist/components/NavItem/NavItem.js +1 -1
  266. package/dist/components/NavItem/NavItem.js.map +1 -1
  267. package/dist/components/NumberField/NumberField.d.ts +69 -0
  268. package/dist/components/NumberField/NumberField.js +162 -0
  269. package/dist/components/NumberField/NumberField.js.map +1 -0
  270. package/dist/components/Pagination/Pagination.d.ts +24 -1
  271. package/dist/components/Pagination/Pagination.js +6 -3
  272. package/dist/components/Pagination/Pagination.js.map +1 -1
  273. package/dist/components/Popover/Popover.js +1 -1
  274. package/dist/components/Popover/Popover.js.map +1 -1
  275. package/dist/components/Progress/Progress.d.ts +17 -5
  276. package/dist/components/Progress/Progress.js +18 -6
  277. package/dist/components/Progress/Progress.js.map +1 -1
  278. package/dist/components/RadioGroup/RadioGroup.d.ts +6 -0
  279. package/dist/components/RadioGroup/RadioGroup.js +11 -1
  280. package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
  281. package/dist/components/ScrollArea/ScrollArea.d.ts +15 -0
  282. package/dist/components/ScrollArea/ScrollArea.js +2 -2
  283. package/dist/components/ScrollArea/ScrollArea.js.map +1 -1
  284. package/dist/components/SearchableMenu/SearchableMenu.d.ts +11 -2
  285. package/dist/components/SearchableMenu/SearchableMenu.js +24 -2
  286. package/dist/components/SearchableMenu/SearchableMenu.js.map +1 -1
  287. package/dist/components/Select/Select.d.ts +18 -2
  288. package/dist/components/Select/Select.js +21 -4
  289. package/dist/components/Select/Select.js.map +1 -1
  290. package/dist/components/Separator/Separator.d.ts +21 -3
  291. package/dist/components/Separator/Separator.js +9 -1
  292. package/dist/components/Separator/Separator.js.map +1 -1
  293. package/dist/components/Sheet/Sheet.d.ts +3 -0
  294. package/dist/components/Sheet/Sheet.js +12 -3
  295. package/dist/components/Sheet/Sheet.js.map +1 -1
  296. package/dist/components/Sidebar/Sidebar.d.ts +349 -0
  297. package/dist/components/Sidebar/Sidebar.js +455 -0
  298. package/dist/components/Sidebar/Sidebar.js.map +1 -0
  299. package/dist/components/Skeleton/Skeleton.d.ts +8 -1
  300. package/dist/components/Skeleton/Skeleton.js +1 -1
  301. package/dist/components/Skeleton/Skeleton.js.map +1 -1
  302. package/dist/components/Slider/Slider.d.ts +42 -3
  303. package/dist/components/Slider/Slider.js +121 -30
  304. package/dist/components/Slider/Slider.js.map +1 -1
  305. package/dist/components/Spinner/Spinner.d.ts +8 -0
  306. package/dist/components/Spinner/Spinner.js +3 -2
  307. package/dist/components/Spinner/Spinner.js.map +1 -1
  308. package/dist/components/StatusPill/StatusPill.d.ts +5 -0
  309. package/dist/components/StatusPill/StatusPill.js +6 -0
  310. package/dist/components/StatusPill/StatusPill.js.map +1 -1
  311. package/dist/components/Table/Table.d.ts +20 -0
  312. package/dist/components/Table/Table.js +3 -1
  313. package/dist/components/Table/Table.js.map +1 -1
  314. package/dist/components/Tabs/Tabs.js +7 -1
  315. package/dist/components/Tabs/Tabs.js.map +1 -1
  316. package/dist/components/Tag/Tag.d.ts +68 -9
  317. package/dist/components/Tag/Tag.js +50 -10
  318. package/dist/components/Tag/Tag.js.map +1 -1
  319. package/dist/components/Text/Text.d.ts +62 -0
  320. package/dist/components/Text/Text.js +30 -0
  321. package/dist/components/Text/Text.js.map +1 -0
  322. package/dist/components/Timestamp/Timestamp.d.ts +59 -0
  323. package/dist/components/Timestamp/Timestamp.js +56 -0
  324. package/dist/components/Timestamp/Timestamp.js.map +1 -0
  325. package/dist/components/Toast/Toast.d.ts +9 -1
  326. package/dist/components/Toast/Toast.js +27 -4
  327. package/dist/components/Toast/Toast.js.map +1 -1
  328. package/dist/components/ToggleGroup/ToggleGroup.d.ts +6 -1
  329. package/dist/components/ToggleGroup/ToggleGroup.js +11 -1
  330. package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -1
  331. package/dist/components/Toolbar/Toolbar.d.ts +55 -0
  332. package/dist/components/Toolbar/Toolbar.js +43 -0
  333. package/dist/components/Toolbar/Toolbar.js.map +1 -0
  334. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.d.ts +6 -0
  335. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js +48 -8
  336. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js.map +1 -1
  337. package/dist/diagrams/DataflowFigure/DataflowFigure.js +21 -2
  338. package/dist/diagrams/DataflowFigure/DataflowFigure.js.map +1 -1
  339. package/dist/diagrams/DiagramCanvas/DiagramCanvas.d.ts +14 -0
  340. package/dist/diagrams/DiagramCanvas/DiagramCanvas.js +14 -7
  341. package/dist/diagrams/DiagramCanvas/DiagramCanvas.js.map +1 -1
  342. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.d.ts +38 -4
  343. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js +14 -16
  344. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js.map +1 -1
  345. package/dist/diagrams/DiagramInspector/DiagramInspector.js +2 -2
  346. package/dist/diagrams/DiagramInspector/DiagramInspector.js.map +1 -1
  347. package/dist/diagrams/DiagramMinimap/DiagramMinimap.d.ts +23 -7
  348. package/dist/diagrams/DiagramMinimap/DiagramMinimap.js +45 -18
  349. package/dist/diagrams/DiagramMinimap/DiagramMinimap.js.map +1 -1
  350. package/dist/diagrams/LifecycleFigure/LifecycleFigure.js +44 -12
  351. package/dist/diagrams/LifecycleFigure/LifecycleFigure.js.map +1 -1
  352. package/dist/diagrams/SequenceFigure/SequenceFigure.js +35 -5
  353. package/dist/diagrams/SequenceFigure/SequenceFigure.js.map +1 -1
  354. package/dist/diagrams/WorkflowFigure/WorkflowFigure.d.ts +3 -1
  355. package/dist/diagrams/WorkflowFigure/WorkflowFigure.js +76 -28
  356. package/dist/diagrams/WorkflowFigure/WorkflowFigure.js.map +1 -1
  357. package/dist/diagrams/index.d.ts +1 -0
  358. package/dist/diagrams/index.js +10 -0
  359. package/dist/diagrams/index.js.map +1 -1
  360. package/dist/diagrams/lib/dev.d.ts +61 -0
  361. package/dist/diagrams/lib/dev.js +96 -0
  362. package/dist/diagrams/lib/dev.js.map +1 -0
  363. package/dist/diagrams/lib/frame.d.ts +48 -7
  364. package/dist/diagrams/lib/frame.js +17 -2
  365. package/dist/diagrams/lib/frame.js.map +1 -1
  366. package/dist/diagrams/lib/route.d.ts +22 -1
  367. package/dist/diagrams/lib/route.js +24 -1
  368. package/dist/diagrams/lib/route.js.map +1 -1
  369. package/dist/diagrams/lib/wires.js +9 -5
  370. package/dist/diagrams/lib/wires.js.map +1 -1
  371. package/dist/diagrams/spec.d.ts +64 -12
  372. package/dist/index.d.ts +19 -4
  373. package/dist/index.js +12 -0
  374. package/dist/index.js.map +1 -1
  375. package/dist/keyframes.css +57 -3
  376. package/dist/lib/color.d.ts +80 -0
  377. package/dist/lib/color.js +189 -0
  378. package/dist/lib/color.js.map +1 -0
  379. package/dist/lib/numeric.d.ts +35 -0
  380. package/dist/lib/numeric.js +29 -0
  381. package/dist/lib/numeric.js.map +1 -0
  382. package/dist/lib/overlay-container.d.ts +14 -4
  383. package/dist/lib/overlay-container.js.map +1 -1
  384. package/dist/lib/warn.d.ts +73 -0
  385. package/dist/lib/warn.js +38 -0
  386. package/dist/lib/warn.js.map +1 -0
  387. package/dist/semantic.css +17 -6
  388. package/dist/styles.css +1 -1
  389. package/dist/themes.css +8 -0
  390. package/dist/tokens.css +86 -5
  391. package/dist/tokens.d.ts +4 -1
  392. package/dist/tokens.js +56 -36
  393. package/dist/tokens.json +56 -36
  394. package/llms.txt +35 -0
  395. package/package.json +5 -2
  396. package/skills/misoto22-design/evals/evals.json +84 -0
  397. package/skills/misoto22-design/rules/a11y.md +55 -3
  398. package/skills/misoto22-design/rules/forms.md +8 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/diagrams/lib/wires.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { EdgeBase, Side, Variant } from '../spec'\nimport type { Box } from './geometry'\nimport { edgeClasses, EdgeLabel, edgeMarker, edgeStroke } from './marks'\nimport { routeEdge, spreadPorts, type PortUse } from './route'\n\n/** One line to draw, once its two boxes are known. */\nexport interface Wire {\n edge: EdgeBase & { variant?: Variant | 'return'; classification?: string; note?: string }\n from: Box\n to: Box\n /** Overrides the variant's own stroke weight — a main path drawn heavier. */\n weight?: number\n /** An open arrowhead rather than a filled one. */\n open?: boolean\n /**\n * Whether this line's `via` / `channelX` / `channelY` mean anything here.\n *\n * A waypoint is an ABSOLUTE coordinate in whatever space the author's nodes\n * were placed in. When a specification pins its nodes with `pos`, that space\n * is this renderer's space too and the waypoints land exactly where they were\n * meant to. When the nodes are placed from a lane and a column, this renderer\n * chose the coordinates — so the author's waypoints refer to a grid that does\n * not exist here, and following them drags lines across unrelated nodes.\n *\n * So the rule is per line and not per figure: honour the waypoints when both\n * of a line's endpoints were placed absolutely, and route automatically\n * otherwise. Defaults to false, which is the safe half.\n */\n keepWaypoints?: boolean\n}\n\n/**\n * Every line in a figure, routed together.\n *\n * Together rather than one at a time, because port spreading is a property of a\n * FACE and not of a line: how far off centre a given arrow sits depends on how\n * many others land on the same face, which no single line can know. Routing\n * them independently is what produces three arrowheads stacked on one point.\n *\n * Lines that pin their own geometry — `via`, a channel, an explicit side — opt\n * out of the spread. An author who placed a line has already answered the\n * question the spread exists to answer, and moving it afterwards makes the\n * control useless.\n *\n * Returns the paths and the labels separately because ORDER IS THE MASK: a\n * label's plate has to be painted over every line in the figure, not merely\n * over its own. Interleaving them puts the third line on top of the first\n * line's label.\n */\nexport function renderWires(\n wires: Wire[],\n uid: string,\n): { paths: ReactNode; labels: ReactNode } {\n const uses: PortUse[] = []\n\n wires.forEach((wire, index) => {\n const { edge } = wire\n const pinned =\n wire.keepWaypoints === true &&\n Boolean(edge.via?.length || edge.channelX !== undefined || edge.channelY !== undefined)\n if (pinned) return\n if (edge.fromSide) uses.push({ face: `${edge.from}:${edge.fromSide}`, ref: `${index}:from` })\n if (edge.toSide) uses.push({ face: `${edge.to}:${edge.toSide}`, ref: `${index}:to` })\n if (!edge.fromSide) uses.push({ face: `${edge.from}:auto`, ref: `${index}:from` })\n if (!edge.toSide) uses.push({ face: `${edge.to}:auto`, ref: `${index}:to` })\n })\n\n const offsets = spreadPorts(uses)\n\n const routed = wires.map((wire, index) => {\n const { edge } = wire\n const keep = wire.keepWaypoints === true\n return {\n wire,\n index,\n route: routeEdge({\n from: wire.from,\n to: wire.to,\n fromSide: edge.fromSide as Side | undefined,\n toSide: edge.toSide as Side | undefined,\n mode: edge.route,\n via: keep ? edge.via : undefined,\n channelX: keep ? edge.channelX : undefined,\n channelY: keep ? edge.channelY : undefined,\n fromOffset: offsets.get(`${index}:from`),\n toOffset: offsets.get(`${index}:to`),\n }),\n }\n })\n\n return {\n paths: (\n <g data-diagram-wires=\"\">\n {routed.map(({ wire, index, route }) => (\n <path\n key={wire.edge.id ?? index}\n d={route.d}\n fill=\"none\"\n data-edge={wire.edge.id}\n markerEnd={`url(#${uid}-${wire.open ? 'arrow-open' : edgeMarker(wire.edge.variant)})`}\n className={edgeClasses(wire.edge.variant)}\n {...edgeStroke(wire.edge.variant, wire.weight)}\n />\n ))}\n </g>\n ),\n labels: (\n <g data-diagram-wire-labels=\"\">\n {routed.map(({ wire, index, route }) =>\n wire.edge.label ? (\n /* `labelDx` / `labelDy` / `labelAt` are deliberately NOT applied.\n They are collision repairs authored against archify's router,\n measured in the positions THAT router produced — and this one\n does not produce the same collisions, so honouring them moves\n labels off clear ground and onto the nodes they were nudged away\n from. Dropping the nudge and keeping the wording is the reading\n that preserves the meaning; the field stays in the type so a\n specification carrying it still typechecks. */\n <EdgeLabel\n key={wire.edge.id ?? index}\n x={route.label.x}\n y={route.label.y}\n axis={route.label.axis}\n text={wire.edge.label}\n chip={wire.edge.classification}\n note={wire.edge.note}\n />\n ) : null,\n )}\n </g>\n ),\n }\n}\n\n/** Resolves an edge's endpoints against a box index, dropping any that dangle. */\nexport function wiresFor<E extends EdgeBase>(\n edges: E[] | undefined,\n boxes: Map<string, Box>,\n decorate?: (edge: E) => Partial<Wire>,\n): Wire[] {\n if (!edges) return []\n const out: Wire[] = []\n for (const edge of edges) {\n const from = boxes.get(edge.from)\n const to = boxes.get(edge.to)\n // A relationship naming a node that is not in the figure is a specification\n // error, and drawing it from nowhere to nowhere would hide that. Dropping\n // it leaves the summary list which iterates the same array as the place\n // the mistake shows up as a line pointing at an id no node claims.\n if (!from || !to) continue\n out.push({ edge, from, to, ...decorate?.(edge) })\n }\n return out\n}\n"],"mappings":"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","names":[]}
1
+ {"version":3,"sources":["../../../src/diagrams/lib/wires.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { EdgeBase, Side, Variant } from '../spec'\nimport type { Box } from './geometry'\nimport { edgeClasses, EdgeLabel, edgeMarker, edgeStroke } from './marks'\nimport { resolveSides, routeEdge, spreadPorts, type PortUse } from './route'\n\n/** One line to draw, once its two boxes are known. */\nexport interface Wire {\n edge: EdgeBase & { variant?: Variant | 'return'; classification?: string; note?: string }\n from: Box\n to: Box\n /** Overrides the variant's own stroke weight — a main path drawn heavier. */\n weight?: number\n /** An open arrowhead rather than a filled one. */\n open?: boolean\n /**\n * Whether this line's `via` / `channelX` / `channelY` mean anything here.\n *\n * A waypoint is an ABSOLUTE coordinate in whatever space the author's nodes\n * were placed in. When a specification pins its nodes with `pos`, that space\n * is this renderer's space too and the waypoints land exactly where they were\n * meant to. When the nodes are placed from a lane and a column, this renderer\n * chose the coordinates — so the author's waypoints refer to a grid that does\n * not exist here, and following them drags lines across unrelated nodes.\n *\n * So the rule is per line and not per figure: honour the waypoints when both\n * of a line's endpoints were placed absolutely, and route automatically\n * otherwise. Defaults to false, which is the safe half.\n */\n keepWaypoints?: boolean\n}\n\n/**\n * Every line in a figure, routed together.\n *\n * Together rather than one at a time, because port spreading is a property of a\n * FACE and not of a line: how far off centre a given arrow sits depends on how\n * many others land on the same face, which no single line can know. Routing\n * them independently is what produces three arrowheads stacked on one point.\n *\n * Lines that pin their own geometry — `via`, a channel, an explicit side — opt\n * out of the spread. An author who placed a line has already answered the\n * question the spread exists to answer, and moving it afterwards makes the\n * control useless.\n *\n * Returns the paths and the labels separately because ORDER IS THE MASK: a\n * label's plate has to be painted over every line in the figure, not merely\n * over its own. Interleaving them puts the third line on top of the first\n * line's label.\n */\nexport function renderWires(\n wires: Wire[],\n uid: string,\n): { paths: ReactNode; labels: ReactNode } {\n const uses: PortUse[] = []\n\n wires.forEach((wire, index) => {\n const { edge } = wire\n const pinned =\n wire.keepWaypoints === true &&\n Boolean(edge.via?.length || edge.channelX !== undefined || edge.channelY !== undefined)\n if (pinned) return\n // The face this line will REALLY use, not the word \"auto\". Keyed on the\n // word, every auto-routed line leaving one node counted as sharing a face\n // with every other — so a node with one line going right and one going down\n // had both nudged off centre to make room for each other on a face neither\n // of them was on, and every one of those lines then arrived at a few units\n // out of true and drew a dogleg to cover the difference.\n const [fromSide, toSide] = resolveSides(\n wire.from,\n wire.to,\n edge.fromSide as Side | undefined,\n edge.toSide as Side | undefined,\n )\n uses.push({ face: `${edge.from}:${fromSide}`, ref: `${index}:from` })\n uses.push({ face: `${edge.to}:${toSide}`, ref: `${index}:to` })\n })\n\n const offsets = spreadPorts(uses)\n\n const routed = wires.map((wire, index) => {\n const { edge } = wire\n const keep = wire.keepWaypoints === true\n return {\n wire,\n index,\n route: routeEdge({\n from: wire.from,\n to: wire.to,\n fromSide: edge.fromSide as Side | undefined,\n toSide: edge.toSide as Side | undefined,\n mode: edge.route,\n via: keep ? edge.via : undefined,\n channelX: keep ? edge.channelX : undefined,\n channelY: keep ? edge.channelY : undefined,\n fromOffset: offsets.get(`${index}:from`),\n toOffset: offsets.get(`${index}:to`),\n }),\n }\n })\n\n return {\n paths: (\n <g data-diagram-wires=\"\">\n {routed.map(({ wire, index, route }) => (\n <path\n key={wire.edge.id ?? index}\n d={route.d}\n fill=\"none\"\n data-edge={wire.edge.id}\n markerEnd={`url(#${uid}-${wire.open ? 'arrow-open' : edgeMarker(wire.edge.variant)})`}\n className={edgeClasses(wire.edge.variant)}\n {...edgeStroke(wire.edge.variant, wire.weight)}\n />\n ))}\n </g>\n ),\n labels: (\n <g data-diagram-wire-labels=\"\">\n {routed.map(({ wire, index, route }) =>\n wire.edge.label ? (\n /* `labelDx` / `labelDy` / `labelAt` are deliberately NOT applied.\n They are collision repairs authored against archify's router,\n measured in the positions THAT router produced — and this one\n does not produce the same collisions, so honouring them moves\n labels off clear ground and onto the nodes they were nudged away\n from. Dropping the nudge and keeping the wording is the reading\n that preserves the meaning; the field stays in the type so a\n specification carrying it still typechecks. */\n <EdgeLabel\n key={wire.edge.id ?? index}\n x={route.label.x}\n y={route.label.y}\n axis={route.label.axis}\n text={wire.edge.label}\n chip={wire.edge.classification}\n note={wire.edge.note}\n />\n ) : null,\n )}\n </g>\n ),\n }\n}\n\n/** Resolves an edge's endpoints against a box index, dropping any that dangle. */\nexport function wiresFor<E extends EdgeBase>(\n edges: E[] | undefined,\n boxes: Map<string, Box>,\n decorate?: (edge: E) => Partial<Wire>,\n): Wire[] {\n if (!edges) return []\n const out: Wire[] = []\n for (const edge of edges) {\n const from = boxes.get(edge.from)\n const to = boxes.get(edge.to)\n // A relationship naming a node that is not in the figure is a specification\n // error, and drawing it from nowhere to nowhere would hide that. The\n // figures filter the same edges through `liveEdges` before they get here,\n // so the drop is announced once in development and the summary list agrees\n // with the picture; this guard is what makes that agreement structural\n // rather than a convention every renderer has to remember.\n if (!from || !to) continue\n out.push({ edge, from, to, ...decorate?.(edge) })\n }\n return out\n}\n"],"mappings":"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","names":[]}
@@ -12,10 +12,11 @@
12
12
  * WHAT IS DELIBERATELY NOT HERE: archify's routing micro-controls. `via`,
13
13
  * `channelX`, `channelY`, `labelAt`, `labelSegment` and `bias` exist there to
14
14
  * let an author nudge a line after a validator complains about a collision.
15
- * They are accepted below and honoured where they are cheap, because dropping a
16
- * field silently turns a valid specification into a different diagram but
17
- * they are hints, not a contract, and a figure that needs many of them is a
18
- * figure that wants fewer edges.
15
+ * They are accepted below so a specification carrying them still typechecks,
16
+ * and each one says on its own field whether it is applied: `via` and the two
17
+ * channels are, but only between two nodes placed with `pos`; the three label
18
+ * nudges never are. They are hints, not a contract, and a figure that needs
19
+ * many of them is a figure that wants fewer edges.
19
20
  *
20
21
  * Every position in every type is EXPLICIT — a row and a column, a lane and a
21
22
  * step, a participant and a y. Nothing below is solved for. That is what makes
@@ -95,6 +96,22 @@ interface DiagramMeta {
95
96
  visible?: boolean;
96
97
  }>;
97
98
  };
99
+ /**
100
+ * A guided reading, and no renderer here reads it.
101
+ *
102
+ * Accepted for the same reason `viewBox` is — an archify document carrying
103
+ * chapters still typechecks — and not applied for a different one: chapters
104
+ * are a CONTROL, not a layout. Lighting one means changing what is lit while
105
+ * a reader walks through them, and a figure that owned that state would be a
106
+ * figure with a hidden step counter, a second source of truth about what is
107
+ * selected, and no way for the page's own next/previous buttons to agree
108
+ * with it.
109
+ *
110
+ * So the chapters stay the caller's: hold the index, hand the chapter's
111
+ * `focus` ids to `activeIds`, and the figure dims everything else and
112
+ * announces how many are lit. That is the whole of what a renderer could
113
+ * have done, in a place a page can also put a heading and a caption.
114
+ */
98
115
  views?: DiagramView[];
99
116
  }
100
117
  /** Where a node's facts came from, when the figure was built against real code. */
@@ -126,9 +143,25 @@ interface EdgeBase {
126
143
  fromSide?: Side;
127
144
  toSide?: Side;
128
145
  route?: RouteMode | string;
129
- /** Waypoints the line is dragged through, in order. */
146
+ /**
147
+ * Waypoints the line is dragged through, in order.
148
+ *
149
+ * Honoured only when BOTH endpoints were placed with `pos` — see
150
+ * `Wire.keepWaypoints`. A waypoint is a coordinate in the space the author's
151
+ * nodes were placed in, and on a lane-and-column grid that space is one this
152
+ * renderer chose, not one the author saw.
153
+ */
130
154
  via?: Point[];
131
- /** Pins the label rather than letting the router place it. */
155
+ /**
156
+ * Where the label goes, and where it is nudged to — accepted, never applied.
157
+ *
158
+ * These three are collision repairs authored against archify's router and
159
+ * measured in the positions THAT router produced. This one does not produce
160
+ * the same collisions, so honouring them moves labels off clear ground and
161
+ * onto the nodes they were nudged away from. Dropping the nudge and keeping
162
+ * the wording is the reading that preserves the meaning; the fields stay so
163
+ * a specification carrying them still typechecks.
164
+ */
132
165
  labelAt?: Point;
133
166
  labelDx?: number;
134
167
  labelDy?: number;
@@ -140,7 +173,13 @@ interface EdgeBase {
140
173
  }
141
174
  interface ArchitectureComponent extends NodeBase {
142
175
  type: NodeKind;
143
- /** Grid placement. Ignored when `pos` is given. */
176
+ /**
177
+ * Grid placement. Ignored when `pos` is given.
178
+ *
179
+ * Declaring NEITHER is also a placement: the component takes the next free
180
+ * cell in declaration order, wrapping at `layout.cols`. A missing one of the
181
+ * two still reads as 0, so `{ col: 2 }` is row 0, column 2.
182
+ */
144
183
  row?: number;
145
184
  col?: number;
146
185
  /** Absolute placement, in user units, overriding the grid. */
@@ -177,9 +216,11 @@ interface ArchitectureSpec {
177
216
  meta: DiagramMeta;
178
217
  layout?: {
179
218
  origin?: Point;
219
+ /** How many columns the flow wraps at, for components with no row or col. */
180
220
  cols?: number;
181
221
  gapX?: number;
182
222
  gapY?: number;
223
+ /** A cell's width, which is also the width of the plates drawn in it. */
183
224
  cellW?: number;
184
225
  cellH?: number;
185
226
  };
@@ -199,8 +240,10 @@ interface WorkflowLane {
199
240
  interface WorkflowPhase {
200
241
  id: string;
201
242
  label: string;
243
+ /** The columns this phase claims. The header rule is drawn across them. */
202
244
  fromCol: number;
203
245
  toCol: number;
246
+ /** `security` and `dashed` dash the phase's rule; `emphasis` thickens it. */
204
247
  variant?: Variant;
205
248
  }
206
249
  /** A frame around a run of columns inside ONE lane. */
@@ -221,6 +264,11 @@ interface WorkflowNode extends NodeBase {
221
264
  * `main` is the path the reader should be able to follow without thinking;
222
265
  * `branch` leaves it and comes back; `async` does not block; `return` goes
223
266
  * backwards; `error` leaves for the exception lane.
267
+ *
268
+ * Three of them reach the drawing on their own: `async` and `error` take the
269
+ * quiet dashed line, and `return` takes an open arrowhead. `main` and `branch`
270
+ * do not, because `mainPath` already draws that distinction as weight. An
271
+ * explicit `variant` overrides any of it.
224
272
  */
225
273
  type WorkflowEdgeRole = 'main' | 'branch' | 'async' | 'return' | 'error';
226
274
  interface WorkflowEdge extends EdgeBase {
@@ -270,12 +318,14 @@ interface SequenceSpec {
270
318
  diagram_type?: 'sequence';
271
319
  meta: DiagramMeta & {
272
320
  /**
273
- * `fixed` gives every participant the same column width; `spread` divides
274
- * the figure evenly instead.
321
+ * `fixed` gives every participant a 148-unit column; `spread` gives every
322
+ * participant the width the WIDEST label needs.
275
323
  *
276
- * Reach for `spread` when a fixed layout would leave a wide empty margin,
277
- * or when a meaningful participant label does not fit. Shortening the label
278
- * to make it fit is the wrong repair the label is the data.
324
+ * Both are uniform a sequence diagram with columns of different widths
325
+ * reads as a diagram where the wide participant matters more so `spread`
326
+ * widens the whole figure rather than dividing it. Reach for it when a
327
+ * meaningful participant label does not fit a fixed column. Shortening the
328
+ * label to make it fit is the wrong repair: the label is the data.
279
329
  */
280
330
  column_fit?: 'fixed' | 'spread';
281
331
  };
@@ -331,8 +381,10 @@ interface LifecycleState extends NodeBase {
331
381
  type: LifecycleStateKind;
332
382
  /** A step number printed in the corner — `01`, `02a`. */
333
383
  step?: string;
384
+ /** Which lane holds it. Defaults to the first, which is the main rail. */
334
385
  lane?: string;
335
386
  col: number;
387
+ /** Nudges this state off its lane's centre line, for a state that needs room. */
336
388
  yOffset?: number;
337
389
  }
338
390
  interface LifecycleTransition extends EdgeBase {
package/dist/index.d.ts CHANGED
@@ -5,6 +5,11 @@ export { CONTROL_BASE, CONTROL_BORDER, isInvalid } from './lib/control.js';
5
5
  export { IndicatorStyle, useSelectionIndicator } from './lib/useSelectionIndicator.js';
6
6
  export { Button, ButtonProps, ButtonSize, ButtonVariant } from './components/Button/Button.js';
7
7
  export { FloatingIconButton, FloatingIconButtonProps } from './components/FloatingIconButton/FloatingIconButton.js';
8
+ export { Text, TextElement, TextProps, TextSize, TextTone } from './components/Text/Text.js';
9
+ export { Heading, HeadingLevel, HeadingProps, HeadingSize } from './components/Heading/Heading.js';
10
+ export { Code, CodeProps } from './components/Code/Code.js';
11
+ export { CodeBlock, CodeBlockProps } from './components/CodeBlock/CodeBlock.js';
12
+ export { Markdown, MarkdownProps } from './components/Markdown/Markdown.js';
8
13
  export { Badge, BadgeProps, BadgeTone } from './components/Badge/Badge.js';
9
14
  export { Tag, TagProps } from './components/Tag/Tag.js';
10
15
  export { Kbd, KbdProps } from './components/Kbd/Kbd.js';
@@ -13,6 +18,7 @@ export { StatusDot, StatusDotProps, StatusTone } from './components/StatusDot/St
13
18
  export { StatusPill, StatusPillProps } from './components/StatusPill/StatusPill.js';
14
19
  export { EXTERNAL_LINK_ARROW, LinkArrow, LinkArrowProps } from './components/LinkArrow/LinkArrow.js';
15
20
  export { Separator, SeparatorProps } from './components/Separator/Separator.js';
21
+ export { Timestamp, TimestampFormat, TimestampProps } from './components/Timestamp/Timestamp.js';
16
22
  export { Figure, FigureBand, FigureBandProps } from './components/FigureBand/FigureBand.js';
17
23
  export { Spinner, SpinnerProps } from './components/Spinner/Spinner.js';
18
24
  export { Skeleton, SkeletonBlock, SkeletonCircle, SkeletonLine, SkeletonPage, SkeletonPageProps, SkeletonProps, SkeletonText, SkeletonTextProps } from './components/Skeleton/Skeleton.js';
@@ -21,9 +27,11 @@ export { Alert, AlertProps, AlertTone } from './components/Alert/Alert.js';
21
27
  export { EmptyState, EmptyStateProps } from './components/EmptyState/EmptyState.js';
22
28
  export { ERROR_ACTION_CLASS, ErrorState, ErrorStateProps } from './components/ErrorState/ErrorState.js';
23
29
  export { Toaster } from './components/Toast/Toast.js';
24
- export { Field, FieldProps } from './components/Field/Field.js';
30
+ export { Field, FieldLayout, FieldProps } from './components/Field/Field.js';
31
+ export { ColorPicker, ColorPickerProps } from './components/ColorPicker/ColorPicker.js';
25
32
  export { Combobox, ComboboxOption, ComboboxProps } from './components/Combobox/Combobox.js';
26
33
  export { DATE_PRESETS, DatePicker, DatePickerProps, DatePreset, DateRangePicker, DateRangePickerProps, RANGE_PRESETS } from './components/DatePicker/DatePicker.js';
34
+ export { NumberField, NumberFieldProps } from './components/NumberField/NumberField.js';
27
35
  export { Slider, SliderProps } from './components/Slider/Slider.js';
28
36
  export { ToggleGroup, ToggleGroupItem, ToggleGroupItemProps, ToggleGroupProps } from './components/ToggleGroup/ToggleGroup.js';
29
37
  export { Input, InputProps } from './components/Input/Input.js';
@@ -34,11 +42,11 @@ export { Checkbox, CheckboxProps } from './components/Checkbox/Checkbox.js';
34
42
  export { RadioGroup, RadioGroupItem, RadioGroupItemProps, RadioGroupProps } from './components/RadioGroup/RadioGroup.js';
35
43
  export { Switch, SwitchProps } from './components/Switch/Switch.js';
36
44
  export { Dialog, DialogClose, DialogContent, DialogContentProps, DialogTrigger } from './components/Dialog/Dialog.js';
37
- export { DropdownMenu, DropdownMenuContent, DropdownMenuContentProps, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from './components/DropdownMenu/DropdownMenu.js';
45
+ export { DropdownMenu, DropdownMenuContent, DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuGroupProps, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from './components/DropdownMenu/DropdownMenu.js';
38
46
  export { Tooltip, TooltipProps, TooltipProvider } from './components/Tooltip/Tooltip.js';
39
47
  export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverContentProps, PopoverTrigger } from './components/Popover/Popover.js';
40
48
  export { Sheet, SheetClose, SheetContent, SheetContentProps, SheetSide, SheetTrigger } from './components/Sheet/Sheet.js';
41
- export { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuItemProps, ContextMenuLabel, ContextMenuSeparator, ContextMenuTrigger } from './components/ContextMenu/ContextMenu.js';
49
+ export { ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuGroupProps, ContextMenuItem, ContextMenuItemProps, ContextMenuLabel, ContextMenuSeparator, ContextMenuTrigger } from './components/ContextMenu/ContextMenu.js';
42
50
  export { Command, CommandDialog, CommandDialogProps, CommandEmpty, CommandFooter, CommandGroup, CommandHint, CommandHintProps, CommandInput, CommandItem, CommandItemProps, CommandList, CommandSeparator } from './components/Command/Command.js';
43
51
  export { MenuAction, SearchableMenu, SearchableMenuProps } from './components/SearchableMenu/SearchableMenu.js';
44
52
  export { Tabs, TabsContent, TabsList, TabsTrigger } from './components/Tabs/Tabs.js';
@@ -47,15 +55,22 @@ export { Collapsible, CollapsibleContent, CollapsibleSection, CollapsibleSection
47
55
  export { Breadcrumb, BreadcrumbProps, Crumb } from './components/Breadcrumb/Breadcrumb.js';
48
56
  export { Pagination, PaginationProps, paginationRange } from './components/Pagination/Pagination.js';
49
57
  export { NavItem, NavItemProps } from './components/NavItem/NavItem.js';
58
+ export { Sidebar, SidebarBranch, SidebarBranchProps, SidebarBreakpoint, SidebarCollapsible, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupProps, SidebarHeader, SidebarInset, SidebarItem, SidebarItemProps, SidebarProps, SidebarProvider, SidebarProviderProps, SidebarSeparator, SidebarSide, SidebarTrigger, SidebarTriggerProps, SidebarVariant, useSidebar } from './components/Sidebar/Sidebar.js';
50
59
  export { Card, CardBody, CardFooter, CardHeader, CardProps, CardTitle } from './components/Card/Card.js';
51
60
  export { SortDirection, TBody, TD, TDProps, TH, THProps, THead, TR, Table, TableAlign, TableBorders, TableProps } from './components/Table/Table.js';
52
- export { Calendar, CalendarProps } from './components/Calendar/Calendar.js';
61
+ export { DescriptionList, DescriptionListItem, DescriptionListLayout, DescriptionListProps } from './components/DescriptionList/DescriptionList.js';
62
+ export { Toolbar, ToolbarAlign, ToolbarPosition, ToolbarProps } from './components/Toolbar/Toolbar.js';
63
+ export { AspectRatio, AspectRatioProps } from './components/AspectRatio/AspectRatio.js';
64
+ export { Calendar, CalendarLabels, CalendarProps } from './components/Calendar/Calendar.js';
53
65
  export { ScrollArea, ScrollAreaProps } from './components/ScrollArea/ScrollArea.js';
54
66
  export { AppShell, AppShellProps } from './components/AppShell/AppShell.js';
55
67
  export { Article, ArticleProps } from './components/Article/Article.js';
56
68
  export { Diagram, DiagramEdge, DiagramNode, DiagramProps, DiagramSpec } from './components/Diagram/Diagram.js';
57
69
  export { Step, Steps, StepsProps } from './components/Steps/Steps.js';
58
70
  export { DateRange } from 'react-day-picker';
71
+ export { MarkdownHeadingLevel, MarkdownInline, MarkdownNode } from './components/Markdown/nodes.js';
72
+ export { parseMarkdown } from './components/Markdown/parse.js';
73
+ export { slugify } from './components/Markdown/slug.js';
59
74
  export { toast } from 'sonner';
60
75
  import 'react';
61
76
  import 'clsx';
package/dist/index.js CHANGED
@@ -5,6 +5,11 @@ import { CONTROL_BASE, CONTROL_BORDER, isInvalid } from "./lib/control.js";
5
5
  import { useSelectionIndicator } from "./lib/useSelectionIndicator.js";
6
6
  export * from "./components/Button/Button.js";
7
7
  export * from "./components/FloatingIconButton/FloatingIconButton.js";
8
+ export * from "./components/Text/Text.js";
9
+ export * from "./components/Heading/Heading.js";
10
+ export * from "./components/Code/Code.js";
11
+ export * from "./components/CodeBlock/CodeBlock.js";
12
+ export * from "./components/Markdown/Markdown.js";
8
13
  export * from "./components/Badge/Badge.js";
9
14
  export * from "./components/Tag/Tag.js";
10
15
  export * from "./components/Kbd/Kbd.js";
@@ -13,6 +18,7 @@ export * from "./components/StatusDot/StatusDot.js";
13
18
  export * from "./components/StatusPill/StatusPill.js";
14
19
  export * from "./components/LinkArrow/LinkArrow.js";
15
20
  export * from "./components/Separator/Separator.js";
21
+ export * from "./components/Timestamp/Timestamp.js";
16
22
  export * from "./components/FigureBand/FigureBand.js";
17
23
  export * from "./components/Spinner/Spinner.js";
18
24
  export * from "./components/Skeleton/Skeleton.js";
@@ -22,8 +28,10 @@ export * from "./components/EmptyState/EmptyState.js";
22
28
  export * from "./components/ErrorState/ErrorState.js";
23
29
  export * from "./components/Toast/Toast.js";
24
30
  export * from "./components/Field/Field.js";
31
+ export * from "./components/ColorPicker/ColorPicker.js";
25
32
  export * from "./components/Combobox/Combobox.js";
26
33
  export * from "./components/DatePicker/DatePicker.js";
34
+ export * from "./components/NumberField/NumberField.js";
27
35
  export * from "./components/Slider/Slider.js";
28
36
  export * from "./components/ToggleGroup/ToggleGroup.js";
29
37
  export * from "./components/Input/Input.js";
@@ -47,8 +55,12 @@ export * from "./components/Collapsible/Collapsible.js";
47
55
  export * from "./components/Breadcrumb/Breadcrumb.js";
48
56
  export * from "./components/Pagination/Pagination.js";
49
57
  export * from "./components/NavItem/NavItem.js";
58
+ export * from "./components/Sidebar/Sidebar.js";
50
59
  export * from "./components/Card/Card.js";
51
60
  export * from "./components/Table/Table.js";
61
+ export * from "./components/DescriptionList/DescriptionList.js";
62
+ export * from "./components/Toolbar/Toolbar.js";
63
+ export * from "./components/AspectRatio/AspectRatio.js";
52
64
  export * from "./components/Calendar/Calendar.js";
53
65
  export * from "./components/ScrollArea/ScrollArea.js";
54
66
  export * from "./components/AppShell/AppShell.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @misoto22/design — public entry.\n *\n * Components export from here; the look ships separately as CSS:\n *\n * import '@misoto22/design/styles.css' // compiled Tailwind + tokens + fonts\n *\n * or, for an app that already compiles Tailwind itself, the portable layers on\n * their own:\n *\n * import '@misoto22/design/tokens.css' // primitives\n * import '@misoto22/design/semantic.css' // roles\n * import '@misoto22/design/keyframes.css' // motion\n *\n * Everything below is a consumer contract. Adding an export is cheap; changing\n * or removing one is a breaking change (DESIGN-API-001).\n */\n\n// ─── Utilities ───\nexport * from './lib/overlay-container'\n\n// ─── Tokens ───\nexport { BRAND } from './tokens/brand'\nexport type { BrandColor } from './tokens/brand'\n\n// ─── Utilities ───\nexport { cn } from './lib/cn'\nexport { CONTROL_BASE, CONTROL_BORDER, isInvalid } from './lib/control'\nexport { useSelectionIndicator } from './lib/useSelectionIndicator'\nexport type { IndicatorStyle } from './lib/useSelectionIndicator'\n\n// ─── Actions ───\nexport * from './components/Button/Button'\nexport * from './components/FloatingIconButton/FloatingIconButton'\n\n// ─── Display ───\nexport * from './components/Badge/Badge'\nexport * from './components/Tag/Tag'\nexport * from './components/Kbd/Kbd'\nexport * from './components/Avatar/Avatar'\nexport * from './components/StatusDot/StatusDot'\nexport * from './components/StatusPill/StatusPill'\nexport * from './components/LinkArrow/LinkArrow'\nexport * from './components/Separator/Separator'\nexport * from './components/FigureBand/FigureBand'\n\n// ─── Feedback ───\nexport * from './components/Spinner/Spinner'\nexport * from './components/Skeleton/Skeleton'\nexport * from './components/Progress/Progress'\nexport * from './components/Alert/Alert'\nexport * from './components/EmptyState/EmptyState'\nexport * from './components/ErrorState/ErrorState'\nexport * from './components/Toast/Toast'\n\n// ─── Forms ───\nexport * from './components/Field/Field'\nexport * from './components/Combobox/Combobox'\nexport * from './components/DatePicker/DatePicker'\nexport * from './components/Slider/Slider'\nexport * from './components/ToggleGroup/ToggleGroup'\nexport * from './components/Input/Input'\nexport * from './components/Textarea/Textarea'\nexport * from './components/Select/Select'\nexport * from './components/NativeSelect/NativeSelect'\nexport * from './components/Checkbox/Checkbox'\nexport * from './components/RadioGroup/RadioGroup'\nexport * from './components/Switch/Switch'\n\n// ─── Overlays ───\nexport * from './components/Dialog/Dialog'\nexport * from './components/DropdownMenu/DropdownMenu'\nexport * from './components/Tooltip/Tooltip'\nexport * from './components/Popover/Popover'\nexport * from './components/Sheet/Sheet'\nexport * from './components/ContextMenu/ContextMenu'\nexport * from './components/Command/Command'\nexport * from './components/SearchableMenu/SearchableMenu'\n\n// ─── Navigation ───\nexport * from './components/Tabs/Tabs'\nexport * from './components/Accordion/Accordion'\nexport * from './components/Collapsible/Collapsible'\nexport * from './components/Breadcrumb/Breadcrumb'\nexport * from './components/Pagination/Pagination'\nexport * from './components/NavItem/NavItem'\n\n// ─── Surfaces / layout ───\nexport * from './components/Card/Card'\nexport * from './components/Table/Table'\nexport * from './components/Calendar/Calendar'\nexport * from './components/ScrollArea/ScrollArea'\nexport * from './components/AppShell/AppShell'\nexport * from './components/Article/Article'\nexport * from './components/Diagram/Diagram'\nexport * from './components/Steps/Steps'\n"],"mappings":"AAmBA,cAAc;AAGd,SAAS,aAAa;AAItB,SAAS,UAAU;AACnB,SAAS,cAAc,gBAAgB,iBAAiB;AACxD,SAAS,6BAA6B;AAItC,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @misoto22/design — public entry.\n *\n * Components export from here; the look ships separately as CSS:\n *\n * import '@misoto22/design/styles.css' // compiled Tailwind + tokens + fonts\n *\n * or, for an app that already compiles Tailwind itself, the portable layers on\n * their own:\n *\n * import '@misoto22/design/tokens.css' // primitives, plus data-mode and data-density\n * import '@misoto22/design/semantic.css' // roles\n * import '@misoto22/design/themes.css' // the other six theming axes\n * import '@misoto22/design/keyframes.css' // motion\n *\n * All four, or the theming attributes are attributes that do nothing: every\n * axis but `data-mode` and `data-density` is declared only in `themes.css`, and\n * an app that skips it writes `data-radius=\"sharp\"` and gets no error, no\n * warning and no corner.\n *\n * Everything below is a consumer contract. Adding an export is cheap; changing\n * or removing one is a breaking change (DESIGN-API-001).\n */\n\n// ─── Utilities ───\nexport * from './lib/overlay-container'\n\n// ─── Tokens ───\nexport { BRAND } from './tokens/brand'\nexport type { BrandColor } from './tokens/brand'\n\n// ─── Utilities ───\nexport { cn } from './lib/cn'\nexport { CONTROL_BASE, CONTROL_BORDER, isInvalid } from './lib/control'\nexport { useSelectionIndicator } from './lib/useSelectionIndicator'\nexport type { IndicatorStyle } from './lib/useSelectionIndicator'\n\n// ─── Actions ───\nexport * from './components/Button/Button'\nexport * from './components/FloatingIconButton/FloatingIconButton'\n\n// ─── Display ───\nexport * from './components/Text/Text'\nexport * from './components/Heading/Heading'\nexport * from './components/Code/Code'\nexport * from './components/CodeBlock/CodeBlock'\nexport * from './components/Markdown/Markdown'\nexport * from './components/Badge/Badge'\nexport * from './components/Tag/Tag'\nexport * from './components/Kbd/Kbd'\nexport * from './components/Avatar/Avatar'\nexport * from './components/StatusDot/StatusDot'\nexport * from './components/StatusPill/StatusPill'\nexport * from './components/LinkArrow/LinkArrow'\nexport * from './components/Separator/Separator'\nexport * from './components/Timestamp/Timestamp'\nexport * from './components/FigureBand/FigureBand'\n\n// ─── Feedback ───\nexport * from './components/Spinner/Spinner'\nexport * from './components/Skeleton/Skeleton'\nexport * from './components/Progress/Progress'\nexport * from './components/Alert/Alert'\nexport * from './components/EmptyState/EmptyState'\nexport * from './components/ErrorState/ErrorState'\nexport * from './components/Toast/Toast'\n\n// ─── Forms ───\nexport * from './components/Field/Field'\nexport * from './components/ColorPicker/ColorPicker'\nexport * from './components/Combobox/Combobox'\nexport * from './components/DatePicker/DatePicker'\nexport * from './components/NumberField/NumberField'\nexport * from './components/Slider/Slider'\nexport * from './components/ToggleGroup/ToggleGroup'\nexport * from './components/Input/Input'\nexport * from './components/Textarea/Textarea'\nexport * from './components/Select/Select'\nexport * from './components/NativeSelect/NativeSelect'\nexport * from './components/Checkbox/Checkbox'\nexport * from './components/RadioGroup/RadioGroup'\nexport * from './components/Switch/Switch'\n\n// ─── Overlays ───\nexport * from './components/Dialog/Dialog'\nexport * from './components/DropdownMenu/DropdownMenu'\nexport * from './components/Tooltip/Tooltip'\nexport * from './components/Popover/Popover'\nexport * from './components/Sheet/Sheet'\nexport * from './components/ContextMenu/ContextMenu'\nexport * from './components/Command/Command'\nexport * from './components/SearchableMenu/SearchableMenu'\n\n// ─── Navigation ───\nexport * from './components/Tabs/Tabs'\nexport * from './components/Accordion/Accordion'\nexport * from './components/Collapsible/Collapsible'\nexport * from './components/Breadcrumb/Breadcrumb'\nexport * from './components/Pagination/Pagination'\nexport * from './components/NavItem/NavItem'\nexport * from './components/Sidebar/Sidebar'\n\n// ─── Surfaces / layout ───\nexport * from './components/Card/Card'\nexport * from './components/Table/Table'\nexport * from './components/DescriptionList/DescriptionList'\nexport * from './components/Toolbar/Toolbar'\nexport * from './components/AspectRatio/AspectRatio'\nexport * from './components/Calendar/Calendar'\nexport * from './components/ScrollArea/ScrollArea'\nexport * from './components/AppShell/AppShell'\nexport * from './components/Article/Article'\nexport * from './components/Diagram/Diagram'\nexport * from './components/Steps/Steps'\n"],"mappings":"AAyBA,cAAc;AAGd,SAAS,aAAa;AAItB,SAAS,UAAU;AACnB,SAAS,cAAc,gBAAgB,iBAAiB;AACxD,SAAS,6BAA6B;AAItC,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
@@ -202,10 +202,64 @@
202
202
  }
203
203
  }
204
204
 
205
- /* One place, not per-component. A user who has asked for less motion gets the
206
- end state immediately rather than a faster version of the same move. */
205
+ /* ─── Reduced motion ───
206
+ Two rules, and the argument behind them matters more than the CSS does.
207
+
208
+ This began as one opt-in rule: a surface that animated carried
209
+ `data-m22-animated`, and that attribute was what got cancelled. It was
210
+ forgotten four times — Accordion's panel, CollapsibleSection's panel,
211
+ SheetContent's slide, AppShell's drawer — by four authors across four
212
+ components. A mechanism four people independently fail to remember is not
213
+ being failed by its authors; it is failing them. The other half of the old
214
+ selector, `[class*='m22-anim']`, matched nothing whatsoever: Tailwind emits
215
+ `animate-[m22-collapsible-down_…]`, which contains no `m22-anim`, so half
216
+ the kill switch had never once fired and nothing anywhere said so.
217
+
218
+ So the GUARANTEE is now the universal rule below, deliberately the well-worn
219
+ one. It cannot be forgotten because there is nothing to remember: a new
220
+ component is covered before its author has heard of this file. It also
221
+ reaches `transition-duration`, which the old rule never did — and a panel
222
+ that slides is usually written as a transition, not a keyframe, which is how
223
+ two of the four escaped.
224
+
225
+ The cost, stated plainly: this is a `*` rule in a stylesheet consumers
226
+ import, so it reaches their components too. That is intended. It fires only
227
+ when the reader has asked their operating system for less motion, and this
228
+ package already asserts base styles on `*` (see index.css). A caller with
229
+ motion they consider essential can still keep it — `!important` on `*` is
230
+ the weakest `!important` there is, so any class-level
231
+ `animation-duration: … !important` outranks it. What changes is the default:
232
+ keeping motion under this preference becomes something you write down and
233
+ defend, instead of something you get by forgetting. That inversion is the
234
+ whole point of the change.
235
+
236
+ 0.01ms rather than `none`, because JavaScript listens. Radix unmounts a
237
+ closing panel on `animationend`; consumer code may await `transitionend`. A
238
+ near-zero duration still fires both, where `none` fires neither. It is the
239
+ reset's least obvious detail and the reason it is written this way wherever
240
+ it appears.
241
+
242
+ `[data-m22-animated]` stays, and is no longer load-bearing. It is a
243
+ component asserting that its motion is decorative, and it goes further than
244
+ the floor above by removing the animation outright rather than running an
245
+ instant frame of it. Read it as documentation with teeth. Do NOT read it as
246
+ the thing that makes reduced motion work — believing that was the mistake
247
+ this replaced. `src/__tests__/reduced-motion.test.tsx` holds both ends: it
248
+ fails if this block stops being universal, if it stops naming transitions,
249
+ if it grows another selector that matches nothing, or if a component reaches
250
+ for a keyframe here without making the assertion. */
207
251
  @media (prefers-reduced-motion: reduce) {
208
- [class*='m22-anim'],
252
+ *,
253
+ ::before,
254
+ ::after {
255
+ animation-delay: 0ms !important;
256
+ animation-duration: 0.01ms !important;
257
+ animation-iteration-count: 1 !important;
258
+ transition-delay: 0ms !important;
259
+ transition-duration: 0.01ms !important;
260
+ scroll-behavior: auto !important;
261
+ }
262
+
209
263
  [data-m22-animated] {
210
264
  animation: none !important;
211
265
  }
@@ -0,0 +1,80 @@
1
+ /**
2
+ * CSS colour maths, with no dependency and no DOM.
3
+ *
4
+ * Adapted from DialKit (https://github.com/joshpuckett/dialkit), MIT licensed:
5
+ *
6
+ * Copyright (c) 2026 Josh Puckett
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a
9
+ * copy of this software and associated documentation files (the "Software"),
10
+ * to deal in the Software without restriction, including without limitation
11
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
12
+ * and/or sell copies of the Software, and to permit persons to whom the
13
+ * Software is furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in
16
+ * all copies or substantial portions of the Software.
17
+ *
18
+ * The working space is OKLCH, and that is the substantive choice here rather
19
+ * than an implementation detail. A picker built on HSV hands a reader two
20
+ * colours at the same "lightness" where one of them is visibly darker, because
21
+ * HSV's lightness is a property of the numbers rather than of the eye. Every
22
+ * decision in `ColorPicker` — where the handle sits, what the hue strip looks
23
+ * like at this lightness, which colours are reachable at all — depends on a
24
+ * space that is perceptually uniform, and OKLCH is the one CSS ships.
25
+ *
26
+ * The matrices are the CSS Color 4 reference implementation's, D65.
27
+ * https://www.w3.org/TR/css-color-4/#color-conversion-code
28
+ */
29
+ /** A colour in OKLCH: lightness 0–1, chroma, hue in degrees, alpha 0–1. */
30
+ interface Color {
31
+ l: number;
32
+ c: number;
33
+ h: number;
34
+ a: number;
35
+ }
36
+ /** The notations this module reads and writes. */
37
+ type ColorFormat = 'hex' | 'oklch' | 'p3';
38
+ /** The two RGB gamuts a colour can be fitted to. */
39
+ type ColorSpace = 'srgb' | 'p3';
40
+ type Triple = [number, number, number];
41
+ declare const clamp: (n: number, min?: number, max?: number) => number;
42
+ declare const wrapHue: (h: number) => number;
43
+ /** Gamma-encoded RGB in 0–1 to OKLCH. */
44
+ declare function rgbToColor(rgb: Triple, a?: number, space?: ColorSpace): Color;
45
+ /** OKLCH to gamma-encoded RGB in 0–1. May fall outside it — see `fitGamut`. */
46
+ declare function colorToRgb(color: Color, space?: ColorSpace): Triple;
47
+ declare function inGamut(color: Color, space?: ColorSpace): boolean;
48
+ /**
49
+ * Brings a colour inside a gamut by giving up CHROMA, and nothing else.
50
+ *
51
+ * The naive fix is to clip each channel at 0 and 1, which changes the hue and
52
+ * the lightness together — a vivid blue clipped that way comes back purple and
53
+ * darker. Bisecting on chroma keeps both, so what a reader loses is only the
54
+ * saturation the display could never have shown them.
55
+ */
56
+ declare function fitGamut(color: Color, space?: ColorSpace): Color;
57
+ /** The most chroma a gamut holds at this lightness and hue — the plane's edge. */
58
+ declare function maxChroma(l: number, h: number, space?: ColorSpace): number;
59
+ /** Which notation a string is written in. Anything unrecognised reads as hex. */
60
+ declare function colorFormat(value: string): ColorFormat;
61
+ /**
62
+ * A colour as a CSS string.
63
+ *
64
+ * Hex and Display P3 are bounded output spaces, so the colour is fitted on the
65
+ * way out; OKLCH is not, and writing an out-of-gamut OKLCH is legitimate — the
66
+ * browser fits it to whatever the display actually has.
67
+ */
68
+ declare function formatColor(color: Color, format: ColorFormat): string;
69
+ /**
70
+ * An absolute CSS colour as OKLCH, or `null` when the string is not one.
71
+ *
72
+ * Hex, `rgb()`, `hsl()`, `oklch()` and `color(display-p3 …)`, in both the
73
+ * comma and the space syntax. Named colours are deliberately absent: resolving
74
+ * them needs a table of a hundred and forty-eight entries or a DOM, and a
75
+ * picker that accepts "rebeccapurple" but not "papayawhip" is worse than one
76
+ * that accepts neither.
77
+ */
78
+ declare function parseColor(value: string): Color | null;
79
+
80
+ export { type Color, type ColorFormat, type ColorSpace, clamp, colorFormat, colorToRgb, fitGamut, formatColor, inGamut, maxChroma, parseColor, rgbToColor, wrapHue };