@misoto22/folio 0.0.0 → 0.16.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 (686) hide show
  1. package/AGENTS.md +88 -0
  2. package/CLAUDE.md +1 -0
  3. package/LICENSE +21 -0
  4. package/README.md +208 -2
  5. package/bin/folio-design.mjs +277 -0
  6. package/bin/migrate-legacy.mjs +81 -0
  7. package/dist/agent/Accordion.md +65 -0
  8. package/dist/agent/Actions.md +49 -0
  9. package/dist/agent/Alert.md +65 -0
  10. package/dist/agent/AppShell.md +69 -0
  11. package/dist/agent/ArchitectureFigure.md +72 -0
  12. package/dist/agent/AreaChart.md +94 -0
  13. package/dist/agent/Article.md +65 -0
  14. package/dist/agent/AspectRatio.md +58 -0
  15. package/dist/agent/Avatar.md +53 -0
  16. package/dist/agent/Badge.md +62 -0
  17. package/dist/agent/BarChart.md +93 -0
  18. package/dist/agent/BarList.md +67 -0
  19. package/dist/agent/BigNumber.md +70 -0
  20. package/dist/agent/BoxPlot.md +82 -0
  21. package/dist/agent/Breadcrumb.md +55 -0
  22. package/dist/agent/BulletChart.md +71 -0
  23. package/dist/agent/Button.md +81 -0
  24. package/dist/agent/Calendar.md +77 -0
  25. package/dist/agent/CalendarHeatmap.md +75 -0
  26. package/dist/agent/Card.md +72 -0
  27. package/dist/agent/Checkbox.md +57 -0
  28. package/dist/agent/Code.md +51 -0
  29. package/dist/agent/CodeBlock.md +77 -0
  30. package/dist/agent/Collapsible.md +68 -0
  31. package/dist/agent/Collection.md +169 -0
  32. package/dist/agent/ColorPicker.md +76 -0
  33. package/dist/agent/Combobox.md +77 -0
  34. package/dist/agent/Command.md +122 -0
  35. package/dist/agent/ComposedChart.md +82 -0
  36. package/dist/agent/Contact.md +90 -0
  37. package/dist/agent/Content.md +70 -0
  38. package/dist/agent/ContextMenu.md +93 -0
  39. package/dist/agent/Conversation.md +247 -0
  40. package/dist/agent/DataflowFigure.md +49 -0
  41. package/dist/agent/DatePicker.md +104 -0
  42. package/dist/agent/DescriptionList.md +69 -0
  43. package/dist/agent/Diagram.md +71 -0
  44. package/dist/agent/DiagramCanvas.md +71 -0
  45. package/dist/agent/DiagramExportMenu.md +65 -0
  46. package/dist/agent/DiagramInspector.md +73 -0
  47. package/dist/agent/DiagramLegend.md +56 -0
  48. package/dist/agent/DiagramMinimap.md +69 -0
  49. package/dist/agent/DiagramToolbar.md +70 -0
  50. package/dist/agent/Dialog.md +76 -0
  51. package/dist/agent/DropdownMenu.md +110 -0
  52. package/dist/agent/EmptyState.md +63 -0
  53. package/dist/agent/ErrorState.md +67 -0
  54. package/dist/agent/Evidence.md +165 -0
  55. package/dist/agent/Facet.md +107 -0
  56. package/dist/agent/Field.md +79 -0
  57. package/dist/agent/FigureBand.md +49 -0
  58. package/dist/agent/FloatingIconButton.md +61 -0
  59. package/dist/agent/FunnelChart.md +75 -0
  60. package/dist/agent/Heading.md +65 -0
  61. package/dist/agent/Heatmap.md +78 -0
  62. package/dist/agent/Histogram.md +88 -0
  63. package/dist/agent/Input.md +52 -0
  64. package/dist/agent/Kbd.md +48 -0
  65. package/dist/agent/LifecycleFigure.md +50 -0
  66. package/dist/agent/LineChart.md +85 -0
  67. package/dist/agent/LinkArrow.md +49 -0
  68. package/dist/agent/Markdown.md +69 -0
  69. package/dist/agent/Media.md +261 -0
  70. package/dist/agent/Metric.md +70 -0
  71. package/dist/agent/Metrics.md +114 -0
  72. package/dist/agent/Music.md +86 -0
  73. package/dist/agent/NativeSelect.md +62 -0
  74. package/dist/agent/NavItem.md +56 -0
  75. package/dist/agent/NumberField.md +73 -0
  76. package/dist/agent/PageHeader.md +69 -0
  77. package/dist/agent/Pagination.md +70 -0
  78. package/dist/agent/PieChart.md +80 -0
  79. package/dist/agent/Popover.md +80 -0
  80. package/dist/agent/Portfolio.md +93 -0
  81. package/dist/agent/PortfolioIndex.md +34 -0
  82. package/dist/agent/Progress.md +58 -0
  83. package/dist/agent/RadarChart.md +79 -0
  84. package/dist/agent/RadialChart.md +81 -0
  85. package/dist/agent/RadioGroup.md +66 -0
  86. package/dist/agent/Reading.md +233 -0
  87. package/dist/agent/Recovery.md +72 -0
  88. package/dist/agent/SankeyChart.md +85 -0
  89. package/dist/agent/ScatterChart.md +80 -0
  90. package/dist/agent/ScrollArea.md +62 -0
  91. package/dist/agent/SearchPalette.md +51 -0
  92. package/dist/agent/SearchableMenu.md +69 -0
  93. package/dist/agent/Select.md +102 -0
  94. package/dist/agent/Separator.md +60 -0
  95. package/dist/agent/SequenceFigure.md +51 -0
  96. package/dist/agent/Sheet.md +82 -0
  97. package/dist/agent/Sidebar.md +194 -0
  98. package/dist/agent/SiteNavigation.md +62 -0
  99. package/dist/agent/SiteShell.md +67 -0
  100. package/dist/agent/Skeleton.md +96 -0
  101. package/dist/agent/Slider.md +67 -0
  102. package/dist/agent/Sparkline.md +68 -0
  103. package/dist/agent/Spinner.md +62 -0
  104. package/dist/agent/StatusDot.md +56 -0
  105. package/dist/agent/StatusPill.md +55 -0
  106. package/dist/agent/Steps.md +68 -0
  107. package/dist/agent/Switch.md +50 -0
  108. package/dist/agent/Table.md +111 -0
  109. package/dist/agent/Tabs.md +71 -0
  110. package/dist/agent/Tag.md +67 -0
  111. package/dist/agent/Text.md +66 -0
  112. package/dist/agent/Textarea.md +46 -0
  113. package/dist/agent/Timeline.md +114 -0
  114. package/dist/agent/Timestamp.md +65 -0
  115. package/dist/agent/Toast.md +51 -0
  116. package/dist/agent/ToggleGroup.md +67 -0
  117. package/dist/agent/Toolbar.md +72 -0
  118. package/dist/agent/Tooltip.md +74 -0
  119. package/dist/agent/TreemapChart.md +76 -0
  120. package/dist/agent/WaterfallChart.md +86 -0
  121. package/dist/agent/WorkflowFigure.md +51 -0
  122. package/dist/agent/catalog.json +8006 -0
  123. package/dist/agent/index.md +182 -0
  124. package/dist/article.css +407 -0
  125. package/dist/charts/AreaChart/AreaChart.d.ts +198 -0
  126. package/dist/charts/AreaChart/AreaChart.js +479 -0
  127. package/dist/charts/AreaChart/AreaChart.js.map +1 -0
  128. package/dist/charts/BarChart/BarChart.d.ts +190 -0
  129. package/dist/charts/BarChart/BarChart.js +599 -0
  130. package/dist/charts/BarChart/BarChart.js.map +1 -0
  131. package/dist/charts/BarList/BarList.d.ts +65 -0
  132. package/dist/charts/BarList/BarList.js +79 -0
  133. package/dist/charts/BarList/BarList.js.map +1 -0
  134. package/dist/charts/BigNumber/BigNumber.d.ts +72 -0
  135. package/dist/charts/BigNumber/BigNumber.js +51 -0
  136. package/dist/charts/BigNumber/BigNumber.js.map +1 -0
  137. package/dist/charts/BoxPlot/BoxPlot.d.ts +177 -0
  138. package/dist/charts/BoxPlot/BoxPlot.js +497 -0
  139. package/dist/charts/BoxPlot/BoxPlot.js.map +1 -0
  140. package/dist/charts/BulletChart/BulletChart.d.ts +100 -0
  141. package/dist/charts/BulletChart/BulletChart.js +197 -0
  142. package/dist/charts/BulletChart/BulletChart.js.map +1 -0
  143. package/dist/charts/CalendarHeatmap/CalendarHeatmap.d.ts +106 -0
  144. package/dist/charts/CalendarHeatmap/CalendarHeatmap.js +103 -0
  145. package/dist/charts/CalendarHeatmap/CalendarHeatmap.js.map +1 -0
  146. package/dist/charts/ComposedChart/ComposedChart.d.ts +178 -0
  147. package/dist/charts/ComposedChart/ComposedChart.js +667 -0
  148. package/dist/charts/ComposedChart/ComposedChart.js.map +1 -0
  149. package/dist/charts/Facet/Facet.d.ts +240 -0
  150. package/dist/charts/Facet/Facet.js +133 -0
  151. package/dist/charts/Facet/Facet.js.map +1 -0
  152. package/dist/charts/Facet/panels.d.ts +187 -0
  153. package/dist/charts/Facet/panels.js +203 -0
  154. package/dist/charts/Facet/panels.js.map +1 -0
  155. package/dist/charts/FunnelChart/FunnelChart.d.ts +106 -0
  156. package/dist/charts/FunnelChart/FunnelChart.js +137 -0
  157. package/dist/charts/FunnelChart/FunnelChart.js.map +1 -0
  158. package/dist/charts/Heatmap/Heatmap.d.ts +101 -0
  159. package/dist/charts/Heatmap/Heatmap.js +125 -0
  160. package/dist/charts/Heatmap/Heatmap.js.map +1 -0
  161. package/dist/charts/Histogram/Histogram.d.ts +188 -0
  162. package/dist/charts/Histogram/Histogram.js +382 -0
  163. package/dist/charts/Histogram/Histogram.js.map +1 -0
  164. package/dist/charts/LineChart/LineChart.d.ts +174 -0
  165. package/dist/charts/LineChart/LineChart.js +485 -0
  166. package/dist/charts/LineChart/LineChart.js.map +1 -0
  167. package/dist/charts/PieChart/PieChart.d.ts +140 -0
  168. package/dist/charts/PieChart/PieChart.js +317 -0
  169. package/dist/charts/PieChart/PieChart.js.map +1 -0
  170. package/dist/charts/RadarChart/RadarChart.d.ts +135 -0
  171. package/dist/charts/RadarChart/RadarChart.js +303 -0
  172. package/dist/charts/RadarChart/RadarChart.js.map +1 -0
  173. package/dist/charts/RadialChart/RadialChart.d.ts +142 -0
  174. package/dist/charts/RadialChart/RadialChart.js +279 -0
  175. package/dist/charts/RadialChart/RadialChart.js.map +1 -0
  176. package/dist/charts/SankeyChart/SankeyChart.d.ts +149 -0
  177. package/dist/charts/SankeyChart/SankeyChart.js +509 -0
  178. package/dist/charts/SankeyChart/SankeyChart.js.map +1 -0
  179. package/dist/charts/ScatterChart/ScatterChart.d.ts +149 -0
  180. package/dist/charts/ScatterChart/ScatterChart.js +275 -0
  181. package/dist/charts/ScatterChart/ScatterChart.js.map +1 -0
  182. package/dist/charts/Sparkline/Sparkline.d.ts +53 -0
  183. package/dist/charts/Sparkline/Sparkline.js +95 -0
  184. package/dist/charts/Sparkline/Sparkline.js.map +1 -0
  185. package/dist/charts/TreemapChart/TreemapChart.d.ts +98 -0
  186. package/dist/charts/TreemapChart/TreemapChart.js +127 -0
  187. package/dist/charts/TreemapChart/TreemapChart.js.map +1 -0
  188. package/dist/charts/WaterfallChart/WaterfallChart.d.ts +164 -0
  189. package/dist/charts/WaterfallChart/WaterfallChart.js +321 -0
  190. package/dist/charts/WaterfallChart/WaterfallChart.js.map +1 -0
  191. package/dist/charts/index.d.ts +43 -0
  192. package/dist/charts/index.js +130 -0
  193. package/dist/charts/index.js.map +1 -0
  194. package/dist/charts/lib/annotations.d.ts +103 -0
  195. package/dist/charts/lib/annotations.js +99 -0
  196. package/dist/charts/lib/annotations.js.map +1 -0
  197. package/dist/charts/lib/axis.d.ts +18 -0
  198. package/dist/charts/lib/axis.js +21 -0
  199. package/dist/charts/lib/axis.js.map +1 -0
  200. package/dist/charts/lib/background.d.ts +33 -0
  201. package/dist/charts/lib/background.js +173 -0
  202. package/dist/charts/lib/background.js.map +1 -0
  203. package/dist/charts/lib/brush.d.ts +94 -0
  204. package/dist/charts/lib/brush.js +535 -0
  205. package/dist/charts/lib/brush.js.map +1 -0
  206. package/dist/charts/lib/chart.d.ts +94 -0
  207. package/dist/charts/lib/chart.js +149 -0
  208. package/dist/charts/lib/chart.js.map +1 -0
  209. package/dist/charts/lib/dot.d.ts +29 -0
  210. package/dist/charts/lib/dot.js +78 -0
  211. package/dist/charts/lib/dot.js.map +1 -0
  212. package/dist/charts/lib/empty.d.ts +31 -0
  213. package/dist/charts/lib/empty.js +24 -0
  214. package/dist/charts/lib/empty.js.map +1 -0
  215. package/dist/charts/lib/export.d.ts +94 -0
  216. package/dist/charts/lib/export.js +62 -0
  217. package/dist/charts/lib/export.js.map +1 -0
  218. package/dist/charts/lib/figure.d.ts +81 -0
  219. package/dist/charts/lib/figure.js +62 -0
  220. package/dist/charts/lib/figure.js.map +1 -0
  221. package/dist/charts/lib/format.d.ts +46 -0
  222. package/dist/charts/lib/format.js +56 -0
  223. package/dist/charts/lib/format.js.map +1 -0
  224. package/dist/charts/lib/legend.d.ts +45 -0
  225. package/dist/charts/lib/legend.js +117 -0
  226. package/dist/charts/lib/legend.js.map +1 -0
  227. package/dist/charts/lib/loading.d.ts +48 -0
  228. package/dist/charts/lib/loading.js +105 -0
  229. package/dist/charts/lib/loading.js.map +1 -0
  230. package/dist/charts/lib/paint.d.ts +154 -0
  231. package/dist/charts/lib/paint.js +551 -0
  232. package/dist/charts/lib/paint.js.map +1 -0
  233. package/dist/charts/lib/scale.d.ts +23 -0
  234. package/dist/charts/lib/scale.js +13 -0
  235. package/dist/charts/lib/scale.js.map +1 -0
  236. package/dist/charts/lib/selection.d.ts +20 -0
  237. package/dist/charts/lib/selection.js +18 -0
  238. package/dist/charts/lib/selection.js.map +1 -0
  239. package/dist/charts/lib/sonify-control.d.ts +163 -0
  240. package/dist/charts/lib/sonify-control.js +172 -0
  241. package/dist/charts/lib/sonify-control.js.map +1 -0
  242. package/dist/charts/lib/sonify.d.ts +248 -0
  243. package/dist/charts/lib/sonify.js +262 -0
  244. package/dist/charts/lib/sonify.js.map +1 -0
  245. package/dist/charts/lib/toolbar.d.ts +144 -0
  246. package/dist/charts/lib/toolbar.js +156 -0
  247. package/dist/charts/lib/toolbar.js.map +1 -0
  248. package/dist/charts/lib/tooltip.d.ts +59 -0
  249. package/dist/charts/lib/tooltip.js +135 -0
  250. package/dist/charts/lib/tooltip.js.map +1 -0
  251. package/dist/charts/lib/values.d.ts +56 -0
  252. package/dist/charts/lib/values.js +71 -0
  253. package/dist/charts/lib/values.js.map +1 -0
  254. package/dist/charts/lib/zoom.d.ts +139 -0
  255. package/dist/charts/lib/zoom.js +314 -0
  256. package/dist/charts/lib/zoom.js.map +1 -0
  257. package/dist/components/Accordion/Accordion.d.ts +34 -0
  258. package/dist/components/Accordion/Accordion.js +43 -0
  259. package/dist/components/Accordion/Accordion.js.map +1 -0
  260. package/dist/components/Alert/Alert.d.ts +32 -0
  261. package/dist/components/Alert/Alert.js +49 -0
  262. package/dist/components/Alert/Alert.js.map +1 -0
  263. package/dist/components/AppShell/AppShell.d.ts +58 -0
  264. package/dist/components/AppShell/AppShell.js +126 -0
  265. package/dist/components/AppShell/AppShell.js.map +1 -0
  266. package/dist/components/Article/Article.d.ts +58 -0
  267. package/dist/components/Article/Article.js +34 -0
  268. package/dist/components/Article/Article.js.map +1 -0
  269. package/dist/components/AspectRatio/AspectRatio.d.ts +46 -0
  270. package/dist/components/AspectRatio/AspectRatio.js +33 -0
  271. package/dist/components/AspectRatio/AspectRatio.js.map +1 -0
  272. package/dist/components/Avatar/Avatar.d.ts +38 -0
  273. package/dist/components/Avatar/Avatar.js +44 -0
  274. package/dist/components/Avatar/Avatar.js.map +1 -0
  275. package/dist/components/Badge/Badge.d.ts +30 -0
  276. package/dist/components/Badge/Badge.js +29 -0
  277. package/dist/components/Badge/Badge.js.map +1 -0
  278. package/dist/components/Breadcrumb/Breadcrumb.d.ts +37 -0
  279. package/dist/components/Breadcrumb/Breadcrumb.js +46 -0
  280. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
  281. package/dist/components/Button/Button.d.ts +70 -0
  282. package/dist/components/Button/Button.js +95 -0
  283. package/dist/components/Button/Button.js.map +1 -0
  284. package/dist/components/Calendar/Calendar.d.ts +54 -0
  285. package/dist/components/Calendar/Calendar.js +369 -0
  286. package/dist/components/Calendar/Calendar.js.map +1 -0
  287. package/dist/components/Card/Card.d.ts +55 -0
  288. package/dist/components/Card/Card.js +64 -0
  289. package/dist/components/Card/Card.js.map +1 -0
  290. package/dist/components/Checkbox/Checkbox.d.ts +26 -0
  291. package/dist/components/Checkbox/Checkbox.js +34 -0
  292. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  293. package/dist/components/Code/Code.d.ts +30 -0
  294. package/dist/components/Code/Code.js +21 -0
  295. package/dist/components/Code/Code.js.map +1 -0
  296. package/dist/components/CodeBlock/CodeBlock.d.ts +145 -0
  297. package/dist/components/CodeBlock/CodeBlock.js +114 -0
  298. package/dist/components/CodeBlock/CodeBlock.js.map +1 -0
  299. package/dist/components/Collapsible/Collapsible.d.ts +45 -0
  300. package/dist/components/Collapsible/Collapsible.js +60 -0
  301. package/dist/components/Collapsible/Collapsible.js.map +1 -0
  302. package/dist/components/ColorPicker/ColorPicker.d.ts +67 -0
  303. package/dist/components/ColorPicker/ColorPicker.js +334 -0
  304. package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
  305. package/dist/components/Combobox/Combobox.d.ts +77 -0
  306. package/dist/components/Combobox/Combobox.js +170 -0
  307. package/dist/components/Combobox/Combobox.js.map +1 -0
  308. package/dist/components/Command/Command.d.ts +125 -0
  309. package/dist/components/Command/Command.js +204 -0
  310. package/dist/components/Command/Command.js.map +1 -0
  311. package/dist/components/ContextMenu/ContextMenu.d.ts +63 -0
  312. package/dist/components/ContextMenu/ContextMenu.js +109 -0
  313. package/dist/components/ContextMenu/ContextMenu.js.map +1 -0
  314. package/dist/components/DatePicker/DatePicker.d.ts +130 -0
  315. package/dist/components/DatePicker/DatePicker.js +257 -0
  316. package/dist/components/DatePicker/DatePicker.js.map +1 -0
  317. package/dist/components/DescriptionList/DescriptionList.d.ts +73 -0
  318. package/dist/components/DescriptionList/DescriptionList.js +35 -0
  319. package/dist/components/DescriptionList/DescriptionList.js.map +1 -0
  320. package/dist/components/Diagram/Diagram.d.ts +86 -0
  321. package/dist/components/Diagram/Diagram.js +211 -0
  322. package/dist/components/Diagram/Diagram.js.map +1 -0
  323. package/dist/components/Dialog/Dialog.d.ts +63 -0
  324. package/dist/components/Dialog/Dialog.js +90 -0
  325. package/dist/components/Dialog/Dialog.js.map +1 -0
  326. package/dist/components/DropdownMenu/DropdownMenu.d.ts +87 -0
  327. package/dist/components/DropdownMenu/DropdownMenu.js +120 -0
  328. package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -0
  329. package/dist/components/EmptyState/EmptyState.d.ts +55 -0
  330. package/dist/components/EmptyState/EmptyState.js +32 -0
  331. package/dist/components/EmptyState/EmptyState.js.map +1 -0
  332. package/dist/components/ErrorState/ErrorState.d.ts +55 -0
  333. package/dist/components/ErrorState/ErrorState.js +41 -0
  334. package/dist/components/ErrorState/ErrorState.js.map +1 -0
  335. package/dist/components/Field/Field.d.ts +111 -0
  336. package/dist/components/Field/Field.js +95 -0
  337. package/dist/components/Field/Field.js.map +1 -0
  338. package/dist/components/Field/field-control.d.ts +31 -0
  339. package/dist/components/Field/field-control.js +12 -0
  340. package/dist/components/Field/field-control.js.map +1 -0
  341. package/dist/components/FigureBand/FigureBand.d.ts +31 -0
  342. package/dist/components/FigureBand/FigureBand.js +51 -0
  343. package/dist/components/FigureBand/FigureBand.js.map +1 -0
  344. package/dist/components/FloatingIconButton/FloatingIconButton.d.ts +29 -0
  345. package/dist/components/FloatingIconButton/FloatingIconButton.js +34 -0
  346. package/dist/components/FloatingIconButton/FloatingIconButton.js.map +1 -0
  347. package/dist/components/Heading/Heading.d.ts +62 -0
  348. package/dist/components/Heading/Heading.js +44 -0
  349. package/dist/components/Heading/Heading.js.map +1 -0
  350. package/dist/components/Input/Input.d.ts +22 -0
  351. package/dist/components/Input/Input.js +21 -0
  352. package/dist/components/Input/Input.js.map +1 -0
  353. package/dist/components/Kbd/Kbd.d.ts +27 -0
  354. package/dist/components/Kbd/Kbd.js +21 -0
  355. package/dist/components/Kbd/Kbd.js.map +1 -0
  356. package/dist/components/LinkArrow/LinkArrow.d.ts +24 -0
  357. package/dist/components/LinkArrow/LinkArrow.js +24 -0
  358. package/dist/components/LinkArrow/LinkArrow.js.map +1 -0
  359. package/dist/components/Markdown/Markdown.d.ts +139 -0
  360. package/dist/components/Markdown/Markdown.js +135 -0
  361. package/dist/components/Markdown/Markdown.js.map +1 -0
  362. package/dist/components/Markdown/inline.d.ts +29 -0
  363. package/dist/components/Markdown/inline.js +74 -0
  364. package/dist/components/Markdown/inline.js.map +1 -0
  365. package/dist/components/Markdown/nodes.d.ts +65 -0
  366. package/dist/components/Markdown/nodes.js +1 -0
  367. package/dist/components/Markdown/nodes.js.map +1 -0
  368. package/dist/components/Markdown/parse.d.ts +24 -0
  369. package/dist/components/Markdown/parse.js +110 -0
  370. package/dist/components/Markdown/parse.js.map +1 -0
  371. package/dist/components/Markdown/slug.d.ts +15 -0
  372. package/dist/components/Markdown/slug.js +7 -0
  373. package/dist/components/Markdown/slug.js.map +1 -0
  374. package/dist/components/Metric/Metric.d.ts +61 -0
  375. package/dist/components/Metric/Metric.js +51 -0
  376. package/dist/components/Metric/Metric.js.map +1 -0
  377. package/dist/components/NativeSelect/NativeSelect.d.ts +33 -0
  378. package/dist/components/NativeSelect/NativeSelect.js +44 -0
  379. package/dist/components/NativeSelect/NativeSelect.js.map +1 -0
  380. package/dist/components/NavItem/NavItem.d.ts +39 -0
  381. package/dist/components/NavItem/NavItem.js +31 -0
  382. package/dist/components/NavItem/NavItem.js.map +1 -0
  383. package/dist/components/NumberField/NumberField.d.ts +69 -0
  384. package/dist/components/NumberField/NumberField.js +162 -0
  385. package/dist/components/NumberField/NumberField.js.map +1 -0
  386. package/dist/components/PageHeader/PageHeader.d.ts +92 -0
  387. package/dist/components/PageHeader/PageHeader.js +37 -0
  388. package/dist/components/PageHeader/PageHeader.js.map +1 -0
  389. package/dist/components/Pagination/Pagination.d.ts +67 -0
  390. package/dist/components/Pagination/Pagination.js +112 -0
  391. package/dist/components/Pagination/Pagination.js.map +1 -0
  392. package/dist/components/Popover/Popover.d.ts +39 -0
  393. package/dist/components/Popover/Popover.js +57 -0
  394. package/dist/components/Popover/Popover.js.map +1 -0
  395. package/dist/components/Progress/Progress.d.ts +43 -0
  396. package/dist/components/Progress/Progress.js +57 -0
  397. package/dist/components/Progress/Progress.js.map +1 -0
  398. package/dist/components/RadioGroup/RadioGroup.d.ts +49 -0
  399. package/dist/components/RadioGroup/RadioGroup.js +53 -0
  400. package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
  401. package/dist/components/ScrollArea/ScrollArea.d.ts +46 -0
  402. package/dist/components/ScrollArea/ScrollArea.js +54 -0
  403. package/dist/components/ScrollArea/ScrollArea.js.map +1 -0
  404. package/dist/components/SearchableMenu/SearchableMenu.d.ts +68 -0
  405. package/dist/components/SearchableMenu/SearchableMenu.js +101 -0
  406. package/dist/components/SearchableMenu/SearchableMenu.js.map +1 -0
  407. package/dist/components/Select/Select.d.ts +87 -0
  408. package/dist/components/Select/Select.js +130 -0
  409. package/dist/components/Select/Select.js.map +1 -0
  410. package/dist/components/Separator/Separator.d.ts +48 -0
  411. package/dist/components/Separator/Separator.js +43 -0
  412. package/dist/components/Separator/Separator.js.map +1 -0
  413. package/dist/components/Sheet/Sheet.d.ts +43 -0
  414. package/dist/components/Sheet/Sheet.js +79 -0
  415. package/dist/components/Sheet/Sheet.js.map +1 -0
  416. package/dist/components/Sidebar/Sidebar.d.ts +357 -0
  417. package/dist/components/Sidebar/Sidebar.js +447 -0
  418. package/dist/components/Sidebar/Sidebar.js.map +1 -0
  419. package/dist/components/Skeleton/Skeleton.d.ts +70 -0
  420. package/dist/components/Skeleton/Skeleton.js +44 -0
  421. package/dist/components/Skeleton/Skeleton.js.map +1 -0
  422. package/dist/components/Slider/Slider.d.ts +74 -0
  423. package/dist/components/Slider/Slider.js +143 -0
  424. package/dist/components/Slider/Slider.js.map +1 -0
  425. package/dist/components/Spinner/Spinner.d.ts +58 -0
  426. package/dist/components/Spinner/Spinner.js +49 -0
  427. package/dist/components/Spinner/Spinner.js.map +1 -0
  428. package/dist/components/StatusDot/StatusDot.d.ts +29 -0
  429. package/dist/components/StatusDot/StatusDot.js +44 -0
  430. package/dist/components/StatusDot/StatusDot.js.map +1 -0
  431. package/dist/components/StatusPill/StatusPill.d.ts +30 -0
  432. package/dist/components/StatusPill/StatusPill.js +37 -0
  433. package/dist/components/StatusPill/StatusPill.js.map +1 -0
  434. package/dist/components/Steps/Steps.d.ts +65 -0
  435. package/dist/components/Steps/Steps.js +25 -0
  436. package/dist/components/Steps/Steps.js.map +1 -0
  437. package/dist/components/Switch/Switch.d.ts +23 -0
  438. package/dist/components/Switch/Switch.js +23 -0
  439. package/dist/components/Switch/Switch.js.map +1 -0
  440. package/dist/components/Table/Table.d.ts +116 -0
  441. package/dist/components/Table/Table.js +137 -0
  442. package/dist/components/Table/Table.js.map +1 -0
  443. package/dist/components/Tabs/Tabs.d.ts +37 -0
  444. package/dist/components/Tabs/Tabs.js +205 -0
  445. package/dist/components/Tabs/Tabs.js.map +1 -0
  446. package/dist/components/Tag/Tag.d.ts +87 -0
  447. package/dist/components/Tag/Tag.js +62 -0
  448. package/dist/components/Tag/Tag.js.map +1 -0
  449. package/dist/components/Text/Text.d.ts +62 -0
  450. package/dist/components/Text/Text.js +30 -0
  451. package/dist/components/Text/Text.js.map +1 -0
  452. package/dist/components/Textarea/Textarea.d.ts +20 -0
  453. package/dist/components/Textarea/Textarea.js +32 -0
  454. package/dist/components/Textarea/Textarea.js.map +1 -0
  455. package/dist/components/Timestamp/Timestamp.d.ts +59 -0
  456. package/dist/components/Timestamp/Timestamp.js +56 -0
  457. package/dist/components/Timestamp/Timestamp.js.map +1 -0
  458. package/dist/components/Toast/Toast.d.ts +32 -0
  459. package/dist/components/Toast/Toast.js +64 -0
  460. package/dist/components/Toast/Toast.js.map +1 -0
  461. package/dist/components/ToggleGroup/ToggleGroup.d.ts +46 -0
  462. package/dist/components/ToggleGroup/ToggleGroup.js +88 -0
  463. package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -0
  464. package/dist/components/Toolbar/Toolbar.d.ts +55 -0
  465. package/dist/components/Toolbar/Toolbar.js +43 -0
  466. package/dist/components/Toolbar/Toolbar.js.map +1 -0
  467. package/dist/components/Tooltip/Tooltip.d.ts +43 -0
  468. package/dist/components/Tooltip/Tooltip.js +40 -0
  469. package/dist/components/Tooltip/Tooltip.js.map +1 -0
  470. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.d.ts +55 -0
  471. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js +175 -0
  472. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js.map +1 -0
  473. package/dist/diagrams/DataflowFigure/DataflowFigure.d.ts +28 -0
  474. package/dist/diagrams/DataflowFigure/DataflowFigure.js +148 -0
  475. package/dist/diagrams/DataflowFigure/DataflowFigure.js.map +1 -0
  476. package/dist/diagrams/DiagramCanvas/DiagramCanvas.d.ts +78 -0
  477. package/dist/diagrams/DiagramCanvas/DiagramCanvas.js +229 -0
  478. package/dist/diagrams/DiagramCanvas/DiagramCanvas.js.map +1 -0
  479. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.d.ts +106 -0
  480. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js +123 -0
  481. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js.map +1 -0
  482. package/dist/diagrams/DiagramInspector/DiagramInspector.d.ts +70 -0
  483. package/dist/diagrams/DiagramInspector/DiagramInspector.js +94 -0
  484. package/dist/diagrams/DiagramInspector/DiagramInspector.js.map +1 -0
  485. package/dist/diagrams/DiagramLegend/DiagramLegend.d.ts +42 -0
  486. package/dist/diagrams/DiagramLegend/DiagramLegend.js +35 -0
  487. package/dist/diagrams/DiagramLegend/DiagramLegend.js.map +1 -0
  488. package/dist/diagrams/DiagramMinimap/DiagramMinimap.d.ts +77 -0
  489. package/dist/diagrams/DiagramMinimap/DiagramMinimap.js +106 -0
  490. package/dist/diagrams/DiagramMinimap/DiagramMinimap.js.map +1 -0
  491. package/dist/diagrams/DiagramToolbar/DiagramToolbar.d.ts +48 -0
  492. package/dist/diagrams/DiagramToolbar/DiagramToolbar.js +53 -0
  493. package/dist/diagrams/DiagramToolbar/DiagramToolbar.js.map +1 -0
  494. package/dist/diagrams/LifecycleFigure/LifecycleFigure.d.ts +31 -0
  495. package/dist/diagrams/LifecycleFigure/LifecycleFigure.js +234 -0
  496. package/dist/diagrams/LifecycleFigure/LifecycleFigure.js.map +1 -0
  497. package/dist/diagrams/SequenceFigure/SequenceFigure.d.ts +38 -0
  498. package/dist/diagrams/SequenceFigure/SequenceFigure.js +261 -0
  499. package/dist/diagrams/SequenceFigure/SequenceFigure.js.map +1 -0
  500. package/dist/diagrams/WorkflowFigure/WorkflowFigure.d.ts +36 -0
  501. package/dist/diagrams/WorkflowFigure/WorkflowFigure.js +259 -0
  502. package/dist/diagrams/WorkflowFigure/WorkflowFigure.js.map +1 -0
  503. package/dist/diagrams/index.d.ts +17 -0
  504. package/dist/diagrams/index.js +29 -0
  505. package/dist/diagrams/index.js.map +1 -0
  506. package/dist/diagrams/lib/dev.d.ts +61 -0
  507. package/dist/diagrams/lib/dev.js +96 -0
  508. package/dist/diagrams/lib/dev.js.map +1 -0
  509. package/dist/diagrams/lib/frame.d.ts +138 -0
  510. package/dist/diagrams/lib/frame.js +131 -0
  511. package/dist/diagrams/lib/frame.js.map +1 -0
  512. package/dist/diagrams/lib/geometry.d.ts +114 -0
  513. package/dist/diagrams/lib/geometry.js +113 -0
  514. package/dist/diagrams/lib/geometry.js.map +1 -0
  515. package/dist/diagrams/lib/legend.d.ts +32 -0
  516. package/dist/diagrams/lib/legend.js +84 -0
  517. package/dist/diagrams/lib/legend.js.map +1 -0
  518. package/dist/diagrams/lib/marks.d.ts +207 -0
  519. package/dist/diagrams/lib/marks.js +480 -0
  520. package/dist/diagrams/lib/marks.js.map +1 -0
  521. package/dist/diagrams/lib/route.d.ts +106 -0
  522. package/dist/diagrams/lib/route.js +201 -0
  523. package/dist/diagrams/lib/route.js.map +1 -0
  524. package/dist/diagrams/lib/wires.d.ts +59 -0
  525. package/dist/diagrams/lib/wires.js +94 -0
  526. package/dist/diagrams/lib/wires.js.map +1 -0
  527. package/dist/diagrams/spec.d.ts +405 -0
  528. package/dist/diagrams/spec.js +1 -0
  529. package/dist/diagrams/spec.js.map +1 -0
  530. package/dist/fonts/hanken-grotesk-300.woff2 +0 -0
  531. package/dist/fonts/hanken-grotesk-400.woff2 +0 -0
  532. package/dist/fonts/hanken-grotesk-500.woff2 +0 -0
  533. package/dist/fonts/hanken-grotesk-600.woff2 +0 -0
  534. package/dist/fonts/hanken-grotesk-700.woff2 +0 -0
  535. package/dist/fonts/ibm-plex-mono-400.woff2 +0 -0
  536. package/dist/fonts/ibm-plex-mono-500.woff2 +0 -0
  537. package/dist/fonts/ibm-plex-mono-600.woff2 +0 -0
  538. package/dist/fonts/newsreader-300.woff2 +0 -0
  539. package/dist/fonts/newsreader-400.woff2 +0 -0
  540. package/dist/fonts/newsreader-500.woff2 +0 -0
  541. package/dist/fonts/newsreader-600.woff2 +0 -0
  542. package/dist/fonts.css +96 -0
  543. package/dist/index.d.ts +97 -0
  544. package/dist/index.js +80 -0
  545. package/dist/index.js.map +1 -0
  546. package/dist/keyframes.css +300 -0
  547. package/dist/lib/cn.d.ts +21 -0
  548. package/dist/lib/cn.js +9 -0
  549. package/dist/lib/cn.js.map +1 -0
  550. package/dist/lib/color.d.ts +80 -0
  551. package/dist/lib/color.js +189 -0
  552. package/dist/lib/color.js.map +1 -0
  553. package/dist/lib/control.d.ts +32 -0
  554. package/dist/lib/control.js +14 -0
  555. package/dist/lib/control.js.map +1 -0
  556. package/dist/lib/index.d.ts +4 -0
  557. package/dist/lib/index.js +11 -0
  558. package/dist/lib/index.js.map +1 -0
  559. package/dist/lib/numeric.d.ts +35 -0
  560. package/dist/lib/numeric.js +29 -0
  561. package/dist/lib/numeric.js.map +1 -0
  562. package/dist/lib/overlay-container.d.ts +48 -0
  563. package/dist/lib/overlay-container.js +15 -0
  564. package/dist/lib/overlay-container.js.map +1 -0
  565. package/dist/lib/slot-content.d.ts +8 -0
  566. package/dist/lib/slot-content.js +17 -0
  567. package/dist/lib/slot-content.js.map +1 -0
  568. package/dist/lib/step-rail.d.ts +45 -0
  569. package/dist/lib/step-rail.js +47 -0
  570. package/dist/lib/step-rail.js.map +1 -0
  571. package/dist/lib/svg-export.d.ts +138 -0
  572. package/dist/lib/svg-export.js +198 -0
  573. package/dist/lib/svg-export.js.map +1 -0
  574. package/dist/lib/useClipboardCopy.d.ts +30 -0
  575. package/dist/lib/useClipboardCopy.js +37 -0
  576. package/dist/lib/useClipboardCopy.js.map +1 -0
  577. package/dist/lib/useSelectionIndicator.d.ts +29 -0
  578. package/dist/lib/useSelectionIndicator.js +49 -0
  579. package/dist/lib/useSelectionIndicator.js.map +1 -0
  580. package/dist/lib/warn.d.ts +73 -0
  581. package/dist/lib/warn.js +38 -0
  582. package/dist/lib/warn.js.map +1 -0
  583. package/dist/semantic.css +193 -0
  584. package/dist/styles.css +98 -0
  585. package/dist/themes.css +514 -0
  586. package/dist/tokens/brand.d.ts +47 -0
  587. package/dist/tokens/brand.js +38 -0
  588. package/dist/tokens/brand.js.map +1 -0
  589. package/dist/tokens.css +652 -0
  590. package/dist/tokens.d.ts +198 -0
  591. package/dist/tokens.js +1020 -0
  592. package/dist/tokens.json +1019 -0
  593. package/dist/website/Actions/Actions.d.ts +34 -0
  594. package/dist/website/Actions/Actions.js +29 -0
  595. package/dist/website/Actions/Actions.js.map +1 -0
  596. package/dist/website/Collection/Collection.d.ts +128 -0
  597. package/dist/website/Collection/Collection.js +162 -0
  598. package/dist/website/Collection/Collection.js.map +1 -0
  599. package/dist/website/Contact/Contact.d.ts +87 -0
  600. package/dist/website/Contact/Contact.js +94 -0
  601. package/dist/website/Contact/Contact.js.map +1 -0
  602. package/dist/website/Content/CodePanel.d.ts +27 -0
  603. package/dist/website/Content/CodePanel.js +30 -0
  604. package/dist/website/Content/CodePanel.js.map +1 -0
  605. package/dist/website/Content/Content.d.ts +29 -0
  606. package/dist/website/Content/Content.js +38 -0
  607. package/dist/website/Content/Content.js.map +1 -0
  608. package/dist/website/Conversation/Conversation.d.ts +193 -0
  609. package/dist/website/Conversation/Conversation.js +252 -0
  610. package/dist/website/Conversation/Conversation.js.map +1 -0
  611. package/dist/website/Evidence/Evidence.d.ts +116 -0
  612. package/dist/website/Evidence/Evidence.js +142 -0
  613. package/dist/website/Evidence/Evidence.js.map +1 -0
  614. package/dist/website/Media/Media.d.ts +173 -0
  615. package/dist/website/Media/Media.js +225 -0
  616. package/dist/website/Media/Media.js.map +1 -0
  617. package/dist/website/Media/MediaLightbox.d.ts +18 -0
  618. package/dist/website/Media/MediaLightbox.js +38 -0
  619. package/dist/website/Media/MediaLightbox.js.map +1 -0
  620. package/dist/website/Metrics/Metrics.d.ts +74 -0
  621. package/dist/website/Metrics/Metrics.js +96 -0
  622. package/dist/website/Metrics/Metrics.js.map +1 -0
  623. package/dist/website/Music/Music.d.ts +60 -0
  624. package/dist/website/Music/Music.js +80 -0
  625. package/dist/website/Music/Music.js.map +1 -0
  626. package/dist/website/Portfolio/FrameLayout.d.ts +9 -0
  627. package/dist/website/Portfolio/FrameLayout.js +42 -0
  628. package/dist/website/Portfolio/FrameLayout.js.map +1 -0
  629. package/dist/website/Portfolio/Portfolio.d.ts +49 -0
  630. package/dist/website/Portfolio/Portfolio.js +66 -0
  631. package/dist/website/Portfolio/Portfolio.js.map +1 -0
  632. package/dist/website/Portfolio/QuestionCard.d.ts +22 -0
  633. package/dist/website/Portfolio/QuestionCard.js +33 -0
  634. package/dist/website/Portfolio/QuestionCard.js.map +1 -0
  635. package/dist/website/PortfolioIndex/PortfolioIndex.d.ts +21 -0
  636. package/dist/website/PortfolioIndex/PortfolioIndex.js +31 -0
  637. package/dist/website/PortfolioIndex/PortfolioIndex.js.map +1 -0
  638. package/dist/website/Reading/Reading.d.ts +203 -0
  639. package/dist/website/Reading/Reading.js +357 -0
  640. package/dist/website/Reading/Reading.js.map +1 -0
  641. package/dist/website/Recovery/Recovery.d.ts +39 -0
  642. package/dist/website/Recovery/Recovery.js +96 -0
  643. package/dist/website/Recovery/Recovery.js.map +1 -0
  644. package/dist/website/SearchPalette/SearchPalette.d.ts +59 -0
  645. package/dist/website/SearchPalette/SearchPalette.js +120 -0
  646. package/dist/website/SearchPalette/SearchPalette.js.map +1 -0
  647. package/dist/website/SiteNavigation/SiteNavigation.d.ts +46 -0
  648. package/dist/website/SiteNavigation/SiteNavigation.js +101 -0
  649. package/dist/website/SiteNavigation/SiteNavigation.js.map +1 -0
  650. package/dist/website/SiteShell/SiteShell.d.ts +45 -0
  651. package/dist/website/SiteShell/SiteShell.js +46 -0
  652. package/dist/website/SiteShell/SiteShell.js.map +1 -0
  653. package/dist/website/Timeline/Timeline.d.ts +80 -0
  654. package/dist/website/Timeline/Timeline.js +99 -0
  655. package/dist/website/Timeline/Timeline.js.map +1 -0
  656. package/dist/website/index.d.ts +27 -0
  657. package/dist/website/index.js +21 -0
  658. package/dist/website/index.js.map +1 -0
  659. package/dist/website-actions.css +6 -0
  660. package/dist/website-base.css +46 -0
  661. package/dist/website-collection.css +89 -0
  662. package/dist/website-contact.css +29 -0
  663. package/dist/website-content.css +17 -0
  664. package/dist/website-controls.css +91 -0
  665. package/dist/website-conversation.css +115 -0
  666. package/dist/website-evidence.css +56 -0
  667. package/dist/website-media.css +227 -0
  668. package/dist/website-metrics.css +15 -0
  669. package/dist/website-music.css +27 -0
  670. package/dist/website-portfolio.css +94 -0
  671. package/dist/website-reading.css +159 -0
  672. package/dist/website-recovery.css +28 -0
  673. package/dist/website-search.css +26 -0
  674. package/dist/website-shell.css +89 -0
  675. package/dist/website-timeline.css +43 -0
  676. package/dist/website.css +25 -0
  677. package/llms.txt +35 -0
  678. package/package.json +163 -5
  679. package/skills/folio-design/SKILL.md +228 -0
  680. package/skills/folio-design/evals/claims.json +95 -0
  681. package/skills/folio-design/evals/evals.json +84 -0
  682. package/skills/folio-design/rules/a11y.md +167 -0
  683. package/skills/folio-design/rules/composition.md +108 -0
  684. package/skills/folio-design/rules/forms.md +135 -0
  685. package/skills/folio-design/rules/naming.md +155 -0
  686. package/skills/folio-design/rules/tokens.md +133 -0
@@ -0,0 +1,65 @@
1
+ # Heading
2
+
3
+ A heading whose element and whose size are two decisions.
4
+
5
+ - Kind: component
6
+ - Group: Display
7
+ - Import: `import { Heading } from '@misoto22/folio'`
8
+ - Version: 0.16.0
9
+ - Docs: https://ui.misoto22.com/components/heading/
10
+ - Related: text, article, markdown
11
+
12
+ ## When to reach for it
13
+
14
+ Any heading. level follows the document outline; size follows the design, and defaults from level.
15
+
16
+ ## Anatomy
17
+
18
+ - **Element** (required) — level, 1 to 6, rendered as the matching <h1>–<h6>. This is the document outline — what a screen reader navigates by — so it follows the section the heading opens, never the size it wants to be.
19
+ - **Step** (required) — size, one of title, lead, heading, sub, item and label. Defaults from level through the system ladder, so writing only level is correct.
20
+ - **Anchor offset** (required) — scroll-margin-top: var(--scroll-offset), carried by every heading, so one given an id and linked from a table of contents comes to rest below the masthead instead of under it.
21
+
22
+ ## Best practices
23
+
24
+ ### Do
25
+
26
+ - Write level alone unless the outline and the design genuinely disagree. The default ladder is 1→title, 2→heading, 3→sub, 4→item, 5 and 6→label — the same map article.css applies to rendered Markdown, which is what makes a post and a component page read as one publication.
27
+ - Notice that the default ladder SKIPS lead between levels 1 and 2, and skip a step yourself when you set size by hand: --fs-lead over --fs-heading is a ratio of 1.14 and reads as a rendering accident, where --fs-title over --fs-heading is 1.86 and reads as a hierarchy.
28
+ - Give a heading an id when anything links to it. The component already carries the scroll offset the anchor needs; nothing else on the page does.
29
+
30
+ ### Don’t
31
+
32
+ - Do not raise level to get a bigger heading. Two <h1>s on a page make its outline unnavigable, and size is one prop away.
33
+ - Do not reach past size="title". The ladder ends there because a page has exactly one thing larger than its own records; a bigger heading is className territory and it is the moment the page stopped being in the system.
34
+ - size="label" is the mono kicker at 11px and --ink-3-aa, not a small serif heading — it is what levels 5 and 6 should look like, and setting it on an <h2> makes the section title read as metadata.
35
+
36
+ ## Accessibility
37
+
38
+ - level renders the real heading element, so the outline is navigable rather than merely visible.
39
+ - The two decisions are separate props, which is what lets a semantically-correct h3 look like a page title without bending the outline.
40
+ - Carries scroll-margin-top so an anchored heading is not hidden under a fixed masthead (WCAG 2.4.7 in practice).
41
+
42
+ ## Heading
43
+
44
+ A heading, with its element and its size decided separately. Every heading component that takes one number gets this wrong in one of two directions: either the outline is bent to reach a size (an `<h1>` in the middle of a page because the design wanted big type), or the size is bent to keep the outline (a section title set at 20px because it is the fourth level down). Both are one prop away from being right, so there are two. `level` is the document. `size` is the page. The default binds them through the system's ladder, so writing only `level` is correct — and the moment they come apart, the call site says so. Set in the editorial serif at weight 400, like every heading in the system. It also carries `scroll-margin-top`, so a heading given an `id` and linked from a table of contents comes to rest below the masthead rather than under it.
45
+
46
+ ### Props
47
+
48
+ - `children` — `ReactNode`.
49
+ - `level` (required) — `HeadingLevel`. The element: `1` renders `<h1>`, `6` renders `<h6>`. This is the document outline and nothing else — it is what a screen reader navigates by, so it follows the section the heading opens, never the size it wants to be. A heading two levels down inside an `<h2>` section is an `<h3>` even when the design calls for something enormous.
50
+ - `size` — `HeadingSize`. The size, when the outline and the design genuinely disagree. Defaults from `level` through the ladder above, which is the answer nearly always. Reach for this when a semantically-correct `h3` opens a page and has to look like one — not to squeeze a fourth step between two that are already only 14% apart.
51
+
52
+ Also accepts: `HTMLAttributes<HTMLHeadingElement>`.
53
+
54
+ ## Types
55
+
56
+ - `HeadingLevel` = `1 | 2 | 3 | 4 | 5 | 6`
57
+ - `HeadingSize` = `'title' | 'lead' | 'heading' | 'sub' | 'item' | 'label'`
58
+
59
+ ## Examples
60
+
61
+ ```tsx
62
+ <Heading level={1}>The White Reset</Heading>
63
+ // Third level in the outline, page-title sized.
64
+ <Heading level={3} size="title">Colour</Heading>
65
+ ```
@@ -0,0 +1,78 @@
1
+ # Heatmap
2
+
3
+ A grid of values read by weight.
4
+
5
+ - Kind: component
6
+ - Group: Data
7
+ - Import: `import { Heatmap } from '@misoto22/folio/charts'`
8
+ - Version: 0.16.0
9
+ - Docs: https://ui.misoto22.com/components/heatmap/
10
+ - Related: table, scatter-chart
11
+
12
+ ## When to reach for it
13
+
14
+ A calendar of activity, a confusion matrix, an hour-by-weekday load. The one form a monochrome system renders better than a chromatic one.
15
+
16
+ ## Anatomy
17
+
18
+ - **Figure caption** (required) — title in a figcaption, hidden from sight unless showTitle prints it above the grid with description under it. The same string is also the table’s own sr-only caption, so the grid is named on the way in and again from the table.
19
+ - **Column headers** (required) — One th scope="col" per entry in columns, in the order given, preceded by an sr-only corner cell reading “Row” so the header line has something standing over the row labels.
20
+ - **Row headers** (required) — One th scope="row" per entry in rows — end-aligned mono at --chart-axis, so every cell can be traced back to the pair of labels that names it.
21
+ - **Cell** (required) — A td whose background is a color-mix of --series-1 into --chart-surface at the value’s position in the domain. Continuous rather than stepped, because banding a ramp invents boundaries the data does not have, and 2px of border-spacing between cells is what makes two neighbouring weights countable.
22
+ - **Missing cell** — What a null draws — and what a row and column pair absent from cells draws too: a dashed --rule outline over the page, announcing “no data” instead of a number.
23
+ - **Printed value** — formatValue inside the cell. Visible with showValues, otherwise sr-only and un-hidden again under forced colours, where the wash that WAS the encoding has been remapped away.
24
+
25
+ ## Best practices
26
+
27
+ ### Do
28
+
29
+ - Switch scale to diverging the moment the values cross zero. sequential ramps on POSITION in the domain, so on a grid of changes the deepest fall is the palest cell and the biggest rise the darkest; diverging ramps on distance from the midpoint instead, which is the read a delta actually wants.
30
+ - Pin domain when one cell is an order of magnitude clear of the rest. The derived domain runs from zero — or the lowest value, when that is negative — to the highest, so a single 10,000 among readings of 5 to 40 puts every other cell inside the first half percent of the ramp, and forty distinct numbers render as one dark square on a blank grid.
31
+ - Spell a cell’s row and column exactly as they appear in rows and columns: cells are looked up by that pair, so an unmatched entry draws nothing at all. It no longer counts toward the derived domain either — a typo used to stretch the ramp with a value that appeared nowhere on the grid, pushing every drawn cell into the first fraction of it.
32
+ - Take the contrast trade knowingly when showValues goes on. The wash is capped at 35 percent of the ramp so one ink colour clears 4.5:1 on every cell — the ORDER of the cells survives untouched, the spread between them narrows, and the printed numbers become the thing carrying the detail.
33
+
34
+ ### Don’t
35
+
36
+ - Do not let a pipeline fill gaps with zero before the grid sees them. A null is drawn as a dashed outline and announced as no data, and a zero is drawn as the palest cell on the ramp — so substituting one for the other turns an outage into a quiet hour, and nothing on the grid says which it was.
37
+ - Do not expect a reader to recover a figure from the wash. There is no legend and no step: weight orders the cells and never states one. The forced-colours fallback un-hides the numbers because the background has stopped existing there, which is a rescue for a remapped ground rather than a substitute for showValues on a grid whose exact figures matter.
38
+
39
+ ## Accessibility
40
+
41
+ - A real <table>, not an SVG: the structure a screen reader walks is the structure the eye reads, and every cell announces its own row, column and value.
42
+ - Lightness is the only channel that is unambiguously ordered, which is why the standing advice everywhere else is “one hue, light to dark”. Here there is no hue left to get wrong.
43
+ - A null is drawn as a dashed outline, never as the palest cell — a missing reading is not a zero.
44
+ - Pin domain whenever two grids are compared: on independent domains they look alike and mean different things, which is the one failure a shared legend cannot fix.
45
+
46
+ ## Heatmap
47
+
48
+ A grid of values read by weight — a calendar of activity, a confusion matrix, an hour-by-weekday load. The one form in the set that a monochrome system renders BETTER than a chromatic one. A heatmap needs a scale whose order the eye can read without consulting a legend, and lightness is the only channel that is unambiguously ordered — which is why "one hue, light to dark" is the standing advice everywhere else, and why the rainbow heatmap is a perennial mistake. Here there is no hue left to get wrong. It is built as a real `<table>` rather than as an SVG, so the structure a screen reader walks is the structure the eye reads: a header row, a header column, and a cell that announces its own value. Nothing else in the package can say that, and nothing else needs to — which is also why this one takes no rendering engine at all.
49
+
50
+ ### Props
51
+
52
+ - `title` (required) — `string`. What the grid shows. Required, and it names the table.
53
+ - `showTitle` — `boolean` default `false`. Prints the title above the grid instead of hiding it from sight.
54
+ - `description` — `ReactNode`. A line under the title — the unit, the window, the caveat.
55
+ - `columns` (required) — `string[]`. Column headers, in the order they should appear.
56
+ - `rows` (required) — `string[]`. Row headers, in the order they should appear.
57
+ - `cells` (required) — `HeatmapCell[]`.
58
+ - `scale` — `HeatmapScale` default `'sequential'`.
59
+ - `domain` — `[number, number]`. The domain, as `[min, max]`. Derived from the data when omitted. Pin it whenever two grids are meant to be compared: two heatmaps on independent domains look alike and mean different things, which is the one failure a shared legend cannot fix.
60
+ - `formatValue` — `(value: number, cell: HeatmapCell) => string` default `(value) => value.toLocaleString()`. Formats a value for the cell's announcement and its printed label. The cell is handed over as well, so a grid whose columns are not self-describing can name the reading rather than only the number. A calendar is the case that needs it: two days with the same count are two different readings, and the row and column headers a cell is announced with — "Mon" and a month name over a block of five weeks — do not say which day it was.
61
+ - `showValues` — `boolean` default `false`. Prints the number inside each cell. Only legible on a coarse grid.
62
+ - `className` — `string`.
63
+ - `empty` — `ChartEmptyProps`. What the grid shows when it has no rows or no columns to draw. A heatmap with no headers renders as a caption over nothing, which reads as a grid that failed to load rather than as one with nothing in it.
64
+
65
+ ## Types
66
+
67
+ - `HeatmapScale` = `'sequential' | 'diverging'`
68
+
69
+ ## Examples
70
+
71
+ ```tsx
72
+ <Heatmap
73
+ title="Commits by weekday and hour"
74
+ columns={hours}
75
+ rows={weekdays}
76
+ cells={cells}
77
+ />
78
+ ```
@@ -0,0 +1,88 @@
1
+ # Histogram
2
+
3
+ The shape of one distribution.
4
+
5
+ - Kind: component
6
+ - Group: Charts
7
+ - Import: `import { Histogram } from '@misoto22/folio/charts'`
8
+ - Version: 0.16.0
9
+ - Docs: https://ui.misoto22.com/components/histogram/
10
+ - Related: box-plot, bar-chart
11
+
12
+ ## When to reach for it
13
+
14
+ A single distribution has to be understood — two clusters, a hard floor, a pile-up at a timeout. Several distributions side by side want a BoxPlot.
15
+
16
+ ## Anatomy
17
+
18
+ - **Figure frame** (required) — ChartFigure’s <figure>, with an empty state when no bucket survives binning — which is what zero finite observations produces.
19
+ - **Bars** (required) — <Histogram.Bars>, each drawn from its bucket’s own two edges rather than placed in an equal category slot, which is what lets an uneven bucket be as wide as it really is. radius is 0 by default, unlike BarChart’s: a rounded corner draws a gap between two buckets that touch.
20
+ - **Measured axis** (required) — <Histogram.XAxis>, numeric, running from the first bucket’s lower edge to the last one’s upper edge.
21
+ - **Count axis** — <Histogram.YAxis>. Under mode="frequency" it is a count; under mode="density" it is count over n times width, and the bars then enclose an area of one.
22
+ - **Binning rule** — Not a mark on screen and the most consequential part of the figure: bins takes a bucket count or the explicit edges, and the default is Freedman-Diaconis capped at 200 buckets, falling back to Sturges when the interquartile range is zero. Explicit edges are also a RANGE — an observation outside the first and last has no bucket, and is counted into the tooltip’s share and into a Below or Above row of the table rather than dropped.
23
+ - **Hidden data table** — The sr-only table prints each bucket’s two edges as its row header and its count beside them — the only exact reading a binned chart can offer, since every bar stands for a range rather than for a value. Observations outside explicit edges get their own Below and Above rows, because they have no bar anywhere.
24
+
25
+ ## Best practices
26
+
27
+ ### Do
28
+
29
+ - Name the binning rule on the page. The same numbers cut into eight buckets and into eighty are two different pictures, and a gap between two humps can be created or erased by moving one edge — so look at more than one width before believing a feature.
30
+ - Set mode="density" whenever the buckets are uneven. Under frequency a bucket twice as wide stands twice as tall at the same underlying rate, which is the trap pre-counted buckets from a metrics backend walk straight into.
31
+ - Give values or data, never both. data wins when both arrive, so the values array is then binned by nothing and drawn by nothing, with no warning anywhere.
32
+
33
+ ### Don’t
34
+
35
+ - Do not read the tooltip’s share as a share of the bars. It is a share of the SAMPLE, so a set of buckets summing to 96% is telling you the other 4% fell outside your own edges — which is the one reading a share taken over the drawn buckets could never give, because it always sums to 100.
36
+ - Do not use it to compare several distributions. Two histograms overlaid occlude each other and six side by side do not fit; that is a BoxPlot, which spends a tenth of the ink per distribution.
37
+ - Do not assume the automatic rule kept the resolution you asked for. Freedman-Diaconis divides by the interquartile range, so a tight middle with a long tail asks for tens of thousands of sub-pixel bars — the 200-bucket cap turns that into a coarse histogram rather than a hung tab, and a coarse histogram is a different picture.
38
+ - Do not read a single-value distribution as a shape. Every observation on one number still draws: the edges become that value plus and minus a half, and the result is one honest bar that is not a distribution.
39
+
40
+ ## Accessibility
41
+
42
+ - The shape is a property of the bin width, not only of the data: the same numbers cut into eight buckets and into eighty are two different pictures. The rule that drew it — Freedman–Diaconis by default — is named on the page.
43
+ - The x axis is numeric and every bar is drawn from its own two edges, so an uneven bucket is as wide as it really is rather than flattened into an equal slot.
44
+ - mode="density" corrects the trap uneven buckets create: under frequency a bucket twice as wide stands twice as tall at the same underlying rate.
45
+ - The hidden data table prints each bucket’s two edges and its count, which is the only exact reading a binned chart can offer.
46
+
47
+ ## Histogram
48
+
49
+ The shape of one distribution — where the mass sits, how it leans, whether there is more than one hump in it. The form that answers what a `<BoxPlot>` structurally cannot: two clusters, a hard floor, a pile-up at a timeout value. Reach for the box plot when several distributions have to be compared side by side, and for this one when a single distribution has to be understood. **A histogram's shape is a property of its bin width, not only of its data.** The same numbers cut into eight buckets and into eighty are two different pictures, and a gap between two humps can be created or erased by moving a bin edge. That is not a defect to be fixed, it is what binning IS, and the defence is to say which rule drew the picture — the default here is Freedman–Diaconis — and to look at more than one width before believing a feature. Uneven buckets add a second trap: under `frequency` a bucket twice as wide stands twice as tall at the same underlying rate, which is what `mode="density"` exists to correct. Recharts earns its place here for the axes, the grid and the tooltip, but not for the bars: a bar chart's bars are positioned by CATEGORY and a histogram's are positioned and SIZED by a continuous measurement. So the x axis is numeric and each bar is drawn from its own two edges — which is what lets an uneven bucket be as wide as it really is instead of being flattened into an equal slot beside its neighbours.
50
+
51
+ ### Props
52
+
53
+ - `config` — `ChartConfig` default `DEFAULT_CONFIG`. The single series — its label and its paint. Only the FIRST entry is read; a histogram has one distribution and as many bars as it has buckets.
54
+ - `values` — `number[]`. The raw observations, in any order. Binned for you by `bins`. Give this OR `data`, not both — `data` wins if both arrive.
55
+ - `data` — `HistogramBin[]`. Buckets that were counted somewhere else — by a database, by a sketch, by a metrics backend that only ever ships histograms. Uneven bucket widths are drawn at their real widths, which is the whole reason this takes edges rather than labels. Set `mode="density"` when they are uneven, or the wide buckets will read as tall ones.
56
+ - `bins` — `number | number[]`. How to cut `values` up: a number of equal-width bins, or the explicit edges. Defaults to Freedman–Diaconis (`2 × IQR × n^(-1/3)`), falling back to Sturges when the interquartile range is zero. Explicit edges are a RANGE as well as a set of buckets: an observation outside the first and last edge has no bucket to fall in. It is counted anyway — into the tooltip's share-of-total, and into a "Below" or "Above" row in the table — so a tail your edges cut off is still somewhere a reader can find it.
57
+ - `mode` — `HistogramMode` default `'frequency'`. What the bar heights mean. `frequency` is the count in each bucket and is what a reader assumes. `density` is `count / (n × bin width)`, so the total area is 1 — which is what makes two histograms of different sample sizes comparable, and what makes uneven buckets honest.
58
+ - `title` (required) — `string`. What the chart shows, in a sentence a reader could act on. Required, and announced to a screen reader even when it is not printed.
59
+ - `showTitle` — `boolean`. Prints the title above the plot instead of hiding it from sight.
60
+ - `description` — `ReactNode`. A line under the title — the unit, the window, the caveat.
61
+ - `children` (required) — `ReactNode`. The composed parts — axes, grid, tooltip, and `<Histogram.Bars>`.
62
+ - `className` — `string`. Merged onto the figure, last, so a call site can size or space it.
63
+ - `chartProps` — `ComponentProps<typeof RechartsBarChart>`. Escape hatch onto the raw Recharts chart element.
64
+ - `formatValue` — `(value: number) => string` default `defaultTick`. Formats the measured values — bin edges, ticks, the tooltip's heading.
65
+ - `hideDataTable` — `boolean` default `false`. Drops the hidden table view. Only correct when the page prints the data itself.
66
+ - `empty` — `ChartEmptyProps | false`. What the chart shows when it has nothing to draw. `false` keeps the axes, for a chart whose emptiness is itself the reading.
67
+
68
+ ## Types
69
+
70
+ - `HistogramMode` = `'frequency' | 'density'`
71
+
72
+ ## Examples
73
+
74
+ ```tsx
75
+ <Histogram title="Response times" values={samples} bins={20}>
76
+ <Histogram.Grid />
77
+ <Histogram.XAxis label="ms" />
78
+ <Histogram.YAxis />
79
+ <Histogram.Tooltip />
80
+ <Histogram.Bars />
81
+ </Histogram>
82
+ // Buckets that arrived already counted, with uneven widths.
83
+ <Histogram title="Payload size" data={buckets} mode="density">
84
+ <Histogram.XAxis />
85
+ <Histogram.YAxis />
86
+ <Histogram.Bars />
87
+ </Histogram>
88
+ ```
@@ -0,0 +1,52 @@
1
+ # Input
2
+
3
+ A single line of text entry.
4
+
5
+ - Kind: component
6
+ - Group: Forms
7
+ - Import: `import { Input } from '@misoto22/folio'`
8
+ - Version: 0.16.0
9
+ - Docs: https://ui.misoto22.com/components/input/
10
+ - Related: field, textarea
11
+
12
+ ## Anatomy
13
+
14
+ - **Control box** (required) — The <input>, on the CONTROL_BASE it shares with Textarea and the Select trigger. Its padding is --field-px / --field-py, so a subtree marked data-density="compact" tightens the fields along with the buttons.
15
+ - **Placeholder** — placeholder, in --ink-3-aa inside the box — the same slot the value occupies, which is why it cannot also be the name.
16
+ - **Focus border** — focus:border-(--ink) on the border already there, not an added ring. The box does not gain a pixel on focus, so nothing in the row shifts.
17
+ - **Danger border** — What invalid — or an aria-invalid set by a Field with an error — swaps in. It changes the border colour and nothing else, so the reason has to come from the message below.
18
+
19
+ ## Best practices
20
+
21
+ ### Do
22
+
23
+ - Spell out type and inputMode. An <Input> with no type is type="text", so an email field that never says so gets a phone keyboard with no @ on it and no browser validation at all.
24
+ - Name the field to the browser with autoComplete: a password field without current-password or new-password is one a manager fills with the wrong value and one no browser offers to save.
25
+ - Reach for readOnly rather than disabled when the value is real but not editable — a disabled input is skipped by Tab AND left out of the submitted form data, so the server hears nothing about a field the reader can plainly see.
26
+
27
+ ### Don’t
28
+
29
+ - readOnly is styled by nothing here: CONTROL_BASE dims on :disabled only, so a read-only input is pixel-identical to an editable one and the first thing a reader learns about it is that typing does nothing.
30
+ - type="number" is for quantities, not for digits. A phone number, a card number or a postcode loses its leading zeros, and a scroll wheel over the focused control changes the value without a keystroke.
31
+ - A Tooltip on a disabled input never opens — disabled:pointer-events-none means the control receives no hover — so the explanation for why it is disabled has to live in the Field’s hint instead.
32
+
33
+ ## Accessibility
34
+
35
+ - A placeholder is not a label — it disappears the moment anyone types. Pair with Field.
36
+
37
+ ## Input
38
+
39
+ A single line of text entry. Shares `CONTROL_BASE` with Textarea and Select, so the three cannot drift apart. Pair with `Field` for the label, hint and error — an input with a placeholder and no label is not labelled, because the placeholder disappears the moment anyone types.
40
+
41
+ ### Props
42
+
43
+ - `invalid` — `boolean`. Paints the resting border with `--danger` and reflects `aria-invalid`.
44
+ - `ref` — `Ref<HTMLInputElement>`.
45
+
46
+ Also accepts: `InputHTMLAttributes<HTMLInputElement>`.
47
+
48
+ ## Examples
49
+
50
+ ```tsx
51
+ <Field label="Email" htmlFor="email"><Input id="email" type="email" /></Field>
52
+ ```
@@ -0,0 +1,48 @@
1
+ # Kbd
2
+
3
+ A key on a keyboard, set as one.
4
+
5
+ - Kind: component
6
+ - Group: Display
7
+ - Import: `import { Kbd } from '@misoto22/folio'`
8
+ - Version: 0.16.0
9
+ - Docs: https://ui.misoto22.com/components/kbd/
10
+ - Related: badge
11
+
12
+ ## Anatomy
13
+
14
+ - **Key** (required) — The <kbd>: a --rule-2 hairline on the --radius-sm corner, min-w-[1.6em] so a single character is a cap rather than a sliver, and 0.8em type so the whole cap scales with the copy around it.
15
+ - **Legend** (required) — children, printed verbatim. One key per element — the space between two of them is a real space in the markup, not a separator the component draws.
16
+
17
+ ## Best practices
18
+
19
+ ### Do
20
+
21
+ - Write one Kbd per key. A whole chord in one box — ⌘K — is a single cap with two glyphs in it, and the min-w-[1.6em] that makes one character square just stretches to hold both.
22
+ - Let it take its size from its surroundings: it is set in em, so the same shortcut printed in a heading and in body copy comes out right in both. Pinning it to px is how one shortcut ended up three sizes on one page.
23
+ - Give a glyph-only key an aria-label — ⌘, ⌥ and ⇧ are read out as their Unicode names or skipped entirely, so a Mac shortcut written in symbols alone is a silent instruction.
24
+
25
+ ### Don’t
26
+
27
+ - An outline Badge and a Kbd are near enough identical on screen, so the choice between them is entirely about meaning: <kbd> says the reader presses this, and a badge shaped like a key invites a press nothing answers.
28
+ - Nothing here binds anything. The element is typography, so a key printed for a shortcut no handler listens for is documentation of a feature the page does not have.
29
+
30
+ ## Accessibility
31
+
32
+ - Renders <kbd>, which carries the meaning a styled <span> does not.
33
+
34
+ ## Kbd
35
+
36
+ A key on a keyboard, set as one. Renders a `<kbd>`, which is the element that means this — a `<span>` styled to look like a key tells a screen reader nothing. Sized in `em` so it tracks whatever type it sits beside rather than fixing itself at one px value, which is how the same shortcut ended up three different sizes across a page. Every dimension here tracked its context except the leading, which was a literal `1.6` — the body's READING leading, on a chip that is never a paragraph. Inside a control it therefore stood proud of the label beside it and pushed the whole box past its own height token: the masthead's search field measured 39px against a 36px `sm`, and it was this keycap doing it. `--control-lh` is the leading a one-line box gets, and this is one.
37
+
38
+ ### Props
39
+
40
+ - `children` (required) — `ReactNode`.
41
+
42
+ Also accepts: `HTMLAttributes<HTMLElement>`.
43
+
44
+ ## Examples
45
+
46
+ ```tsx
47
+ Press <Kbd>⌘</Kbd> <Kbd>K</Kbd> to open the palette.
48
+ ```
@@ -0,0 +1,50 @@
1
+ # LifecycleFigure
2
+
3
+ A state machine: what something can be, and what moves it between states.
4
+
5
+ - Kind: component
6
+ - Group: Diagrams
7
+ - Import: `import { LifecycleFigure } from '@misoto22/folio/diagrams'`
8
+ - Version: 0.16.0
9
+ - Docs: https://ui.misoto22.com/components/lifecycle-figure/
10
+ - Related: workflow-figure, steps
11
+
12
+ ## When to reach for it
13
+
14
+ The one figure that spends colour, and it spends exactly the two tokens the system reserves for state. Every other distinction is shape, so a greyscale print keeps six of the eight.
15
+
16
+ ## Anatomy
17
+
18
+ - **Figure shell** (required) — The frame around the picture. What a machine hands it is a transition list with each note folded in after an em dash, so the condition on an arrow — the timeout, the retry count — is in the text copy and not only on the line.
19
+ - **State plate** (required) — One shape per kind: a filled cap for a start, a diamond for a decision, a dashed frame for a wait, a cut corner for an external, and the two washes the system reserves for the terminals. The name is centred, step sits in the leading corner and tag along the bottom edge.
20
+ - **Main rail** — The first lane’s states, sorted by col and joined consecutively at the emphasis weight — one line per neighbouring pair the transitions do not already declare, so a spine written out in full is drawn from the transitions and a spine left implied is drawn anyway. Without it the top row reads as five unconnected boxes, because the spine of a machine is the part nobody writes down.
21
+ - **Transition** — A routed line with its label on a mask and its note in a quieter line beneath. A declared transition between two rail neighbours replaces the implicit one rather than doubling it.
22
+ - **Lane** — A rule with a mono caption above it, drawn only as far as that lane’s own states reach. A lane past the first has its columns shifted along the main rail, which is what keeps a drop out of the spine vertical rather than a dogleg.
23
+
24
+ ## Best practices
25
+
26
+ ### Do
27
+
28
+ - Keep the first lane for the ordered spine and nothing else. Consecutive states there are joined by the implicit rail even when no transition declares the pair, so a state parked in lane 0 for spacing invents an edge the machine does not have. A state whose lane id nothing declares is kept out of that rail and reported as DIAGRAM_LANE_UNKNOWN instead, because a typo should not be able to add an arrow.
29
+ - Count a secondary lane’s columns from the rail. Every col in a lane past the first is shifted two columns along, so col: 0 in the second lane sits under col: 2 in the first — the convention archify’s lifecycle contract already implies, restated here because it is what makes a drop land on the state it came from.
30
+ - Say whether a failure is recoverable with an edge, not with the type. type: "failure" only paints the plate; a retryable error and a terminal one are identical until a reader follows the arrows out, and the one with none is where the run ended.
31
+
32
+ ### Don’t
33
+
34
+ - yOffset moves the plate and moves nothing out of its way. The lane’s rule is drawn from what that lane holds, so a negative nudge drags the rule up with the state and a large positive one drops the plate into the band below — a state needing that much room wants a column of its own rather than a push.
35
+ - The figure claims a state can be left only the ways its arrows say. A cancel that can happen from anywhere and is drawn from nowhere reads as impossible, which is a reading the picture makes and the specification never wrote — draw it, or say in the subtitle that it is not drawn.
36
+
37
+ ## Accessibility
38
+
39
+ - success and failure are the only coloured marks in the package’s diagrams, and each is also a distinct plate shape — colour is never the only carrier.
40
+ - The main rail is drawn between consecutive states in the first lane even when the specification does not list those transitions, because they are the diagram’s spine rather than its exceptions.
41
+
42
+ ## LifecycleFigure
43
+
44
+ A state machine: what something can BE, and what moves it. The one figure here that spends colour, and it spends exactly the two tokens this system reserves for state: `--success` on a terminal success, `--danger` on a terminal failure. Nothing else in the package is allowed those two, and a lifecycle diagram is the case they were reserved for — the whole point of the picture is which end a run came out of. The other six kinds are carried by shape, so a greyscale print loses the two outcomes' hue and keeps every other distinction: a start is a filled cap, a decision is a diamond, a wait is a dashed frame, an external is a plate with a cut corner. A RECOVERABLE FAILURE IS A FAILURE WITH A WAY BACK. `type: "failure"` says how a state is drawn; a transition OUT of it is what says whether the run is over. A retryable error and a terminal one look identical until you follow the arrows, which is correct — the difference between them is a real edge in the machine, not an adjective on a box.
45
+
46
+ ### Props
47
+
48
+ - `spec` (required) — `LifecycleSpec`.
49
+
50
+ Also accepts: `FigureChrome`.
@@ -0,0 +1,85 @@
1
+ # LineChart
2
+
3
+ Several series compared over a continuous axis.
4
+
5
+ - Kind: component
6
+ - Group: Charts
7
+ - Import: `import { LineChart } from '@misoto22/folio/charts'`
8
+ - Version: 0.16.0
9
+ - Docs: https://ui.misoto22.com/components/line-chart/
10
+ - Related: area-chart, composed-chart
11
+
12
+ ## When to reach for it
13
+
14
+ The reader is comparing series against each other. When the area under one line is the point, fill it — that is an AreaChart.
15
+
16
+ ## Anatomy
17
+
18
+ - **Figure frame** (required) — ChartFigure’s <figure> and its sr-only caption. description is announced with the title and printed only under showTitle, which is where a note about a clipped axis belongs.
19
+ - **Lines** (required) — <LineChart.Line>, one per series at a 1.6px stroke. isClickable adds a second, fully transparent 15px line underneath the visible one, because a hairline is not a pointer target.
20
+ - **Point markers** — <LineChart.Dot> and <LineChart.ActiveDot>, both slots and both off by default. The resting dot shares the intro wipe mask so it arrives with its own line; the active dot is never masked, because it exists only on hover, long after the wipe has finished.
21
+ - **Buffer segment** — buffer draws the last leg dashed by measuring the real path with getPointAtLength, so a projection reads as a different kind of fact at any curve type. Fewer than two drawable points and it falls back to a plain curve.
22
+ - **Sonification control** — <LineChart.Sonify>, a real <button> above the plot that plays the visible rows as pitch. Sound never starts from an effect, only from that click, and it reads the brushed window rather than the whole series.
23
+ - **Hidden data table** — The sr-only table of the full data. Recharts’ accessibilityLayer gives a keyboard cursor that announces one point at a time, which is navigation; this is the figures.
24
+
25
+ ## Best practices
26
+
27
+ ### Do
28
+
29
+ - This is the one chart in the family that survives a truncated value axis. A line encodes by SLOPE, so clipping the domain to the data’s own range is often what makes a two percent move visible at all — state the range in description when you do it.
30
+ - Reach for buffer on a period still open rather than dropping it. A part-month plotted solid reads as a crash; plotted as a dashed final leg it reads as what it is, which is incomplete.
31
+ - Compose <LineChart.Dot> when the series is sparse. With dots off — the default — five points are four segments, and the reader cannot tell a measured value from a bend in the interpolation.
32
+
33
+ ### Don’t
34
+
35
+ - A single row draws nothing at all: one point has no segment, dot is false unless composed, and the empty state does not fire because a row exists. Guard the one-row case at the call site.
36
+ - Eight lines in one frame is a hairball, and a 1.6px stroke over an eight-step grey ramp makes it a worse one than a chromatic chart would. Past about five series the answer is Facet, not a ninth ramp slot — SERIES_SLOTS is 8 and there is no ninth.
37
+ - connectNulls turns a gap into a straight segment that looks measured. It costs more here than on an area, because the reader reads the slope of that invented segment as a rate.
38
+
39
+ ## Accessibility
40
+
41
+ - title is required; the rows are also rendered as a visually hidden table.
42
+ - A clickable line gets a 15px transparent line underneath it, because a 1.6px stroke is not a pointer target.
43
+ - buffer draws the last segment dashed by measuring the real path length, so a projection is visibly a different kind of fact at any curve type.
44
+
45
+ ## LineChart
46
+
47
+ Several series compared over a continuous axis — the shape for "which of these is going where". The difference from `<AreaChart>` is what the reader is asked to do: an area says "read the magnitude under this", a line says "compare these against each other". Filling four overlapping series makes the second question unanswerable, which is why a line chart has no fill variant to offer.
48
+
49
+ ### Props
50
+
51
+ - `config` (required) — `TConfig & ValidateKeys<TData, TConfig>`.
52
+ - `data` (required) — `TData[]`. The rows the chart draws. One entry per point, bar or category.
53
+ - `title` (required) — `string`. What the chart shows, in a sentence a reader could act on. Required, and announced to a screen reader even when it is not printed.
54
+ - `showTitle` — `boolean`. Prints the title above the plot instead of hiding it from sight.
55
+ - `description` — `ReactNode`. A line under the title — the unit, the window, the caveat.
56
+ - `children` (required) — `ReactNode`. The composed parts — axes, grid, tooltip, legend, and the marks themselves.
57
+ - `className` — `string`. Merged onto the figure, last, so a call site can size or space it.
58
+ - `chartProps` — `ComponentProps<typeof RechartsLineChart>`. Escape hatch onto the raw Recharts chart element.
59
+ - `curveType` — `ChartCurveType` default `'linear'`. How the line between two points is interpolated. Every mark inherits it unless it says otherwise.
60
+ - `animationType` — `ChartRevealType` default `'forward'`.
61
+ - `defaultSelectedDataKey` — `string | null` default `null`. The series lit on first render, when the chart keeps its own selection.
62
+ - `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`.
63
+ - `onSelectionChange` — `(selectedDataKey: string | null) => void`. Fires when the selection changes, and with null when it is cleared.
64
+ - `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.
65
+ - `loadingPoints` — `number`. How many points the skeleton draws.
66
+ - `xDataKey` — `keyof TData & string`. The row field on the category axis. Needed by the brush and by the table view.
67
+ - `hideDataTable` — `boolean` default `false`. Drops the hidden table view. Only correct when the page prints the data itself.
68
+ - `empty` — `ChartEmptyProps | false`. What the chart shows when it has nothing to draw. Rendered instead of the plot whenever `data` is empty and the chart is not loading — the state a real dashboard reaches within a week, and the one an empty pair of axes is indistinguishable from a failed load. `false` keeps the axes, for a chart whose emptiness is itself the reading.
69
+
70
+ ## Types
71
+
72
+ - `LineStrokeVariant` = `AreaStrokeVariant`
73
+
74
+ ## Examples
75
+
76
+ ```tsx
77
+ <LineChart title="Visitors per month" config={config} data={data}>
78
+ <LineChart.Grid />
79
+ <LineChart.XAxis dataKey="month" />
80
+ <LineChart.Tooltip />
81
+ <LineChart.Line dataKey="desktop">
82
+ <LineChart.Dot variant="border" />
83
+ </LineChart.Line>
84
+ </LineChart>
85
+ ```
@@ -0,0 +1,49 @@
1
+ # LinkArrow
2
+
3
+ The mark on a link that leaves the page.
4
+
5
+ - Kind: component
6
+ - Group: Display
7
+ - Import: `import { LinkArrow } from '@misoto22/folio'`
8
+ - Version: 0.16.0
9
+ - Docs: https://ui.misoto22.com/components/link-arrow/
10
+
11
+ ## Anatomy
12
+
13
+ - **Marker box** (required) — An aria-hidden inline-block <span> carrying the 0.22em of lead-in, the 0.28em baseline lift and --ink-3-aa. inline-block is load-bearing twice over: it stops an underlined parent drawing its rule through the glyph, and it is what the alignment is measured against.
14
+ - **Glyph** (required) — The ↗ itself at 0.68em, so it tracks the type beside it instead of competing with it. Exported as EXTERNAL_LINK_ARROW, so a surface that is not React uses the same character.
15
+
16
+ ## Best practices
17
+
18
+ ### Do
19
+
20
+ - Put it inside the <a>, as the last child. Outside it, it is an arrow pointing at a link the pointer misses by 0.22em.
21
+ - Reach for EXTERNAL_LINK_ARROW when the surface is not React — a Markdown pipeline, an OG image, an email — so the mark stays one character rather than three near-identical arrows across a site.
22
+ - Pass a colour through className on a reversed plate: it is set in --ink-3-aa, which is the AA floor against paper and close to invisible on ink.
23
+
24
+ ### Don’t
25
+
26
+ - The arrow is not the announcement. It is aria-hidden, and target="_blank" is not announced either, so a link that opens a new tab has to say so in its own accessible name — otherwise this glyph is the only warning anyone gets, and only if they can see it.
27
+ - Do not pin it to a px size. 0.68em is what makes one component right in body copy and in a heading; fixed at 11px it is correct in one of them and a speck in the other.
28
+ - Do not put it on every row of an index. It marks a change of destination, so a list where every link leaves the site marks nothing at all and pays 0.22em a row for it.
29
+
30
+ ## Accessibility
31
+
32
+ - aria-hidden, so it is not read as “north east arrow” in the middle of a sentence.
33
+ - Sized in em, so it tracks whatever type it sits beside instead of competing with it.
34
+
35
+ ## EXTERNAL_LINK_ARROW
36
+
37
+ The glyph itself, exported so a non-React surface can use the same mark.
38
+
39
+ ## LinkArrow
40
+
41
+ The mark on a link that leaves the page — outbound, or on to a full index. Call sites used to write a bare `↗` inside the link text, which inherited the link's own size (a 17px arrow beside a 17px word, competing with it) and was read aloud as "north east arrow" because nothing hid it. `inline-block` is load-bearing twice over: it stops an underlined parent drawing its rule through the glyph, and it is what `align` is measured against. Sized in `em`, so it tracks whatever type it sits beside; coloured against paper, so a call site on a reversed plate passes its own colour.
42
+
43
+ Also accepts: `HTMLAttributes<HTMLSpanElement>`.
44
+
45
+ ## Examples
46
+
47
+ ```tsx
48
+ <a href="https://example.com">Read the paper<LinkArrow /></a>
49
+ ```
@@ -0,0 +1,69 @@
1
+ # Markdown
2
+
3
+ A Markdown string, rendered as this system’s components.
4
+
5
+ - Kind: component
6
+ - Group: Display
7
+ - Import: `import { Markdown } from '@misoto22/folio'`
8
+ - Version: 0.16.0
9
+ - Docs: https://ui.misoto22.com/components/markdown/
10
+ - Related: article, code-block, heading, text
11
+
12
+ ## When to reach for it
13
+
14
+ Content nobody on this side wrote — a comment, a README, a model’s answer. Trusted HTML from your own pipeline is an Article.
15
+
16
+ ## Anatomy
17
+
18
+ - **Fragment** (required) — What it renders. There is no wrapper element, because Article’s rhythm is a direct-child combinator — anything between the two, display: contents included, would cost every paragraph its spacing.
19
+ - **Parser** (required) — parseMarkdown by default: ATX headings, paragraphs, fenced code, blockquotes, nested lists, thematic breaks, and inline emphasis, strong, code, links, images and escapes. Raw HTML is dropped rather than rendered, so this path has no dangerouslySetInnerHTML in it at all.
20
+ - **Nodes** (required) — The system’s own components: Heading, Text, Code, CodeBlock and Separator. That is what makes it styled on its own rather than only inside a reading column. One of them is not server-only — a fenced block renders CodeBlock, which is ‘use client’ with useState, useEffect and two icons, so content containing code brings a client component with it.
21
+ - **Heading ids** (required) — Slugged from each heading’s own text, in any script, deduplicated within the document with -2, -3. Exported as slugify, so a table of contents can arrive at the same ids without reading them back off the DOM.
22
+
23
+ ## Best practices
24
+
25
+ ### Do
26
+
27
+ - Set headingLevelStart to the level BELOW the heading the content sits under. Markdown is written as a document, so its # is an <h1>; dropped into a page that already has one, that is two first-level headings and an outline nobody can navigate.
28
+ - Put it inside an Article — <Article as="div"> for a comment or an answer, <Article> for a document. Markdown makes the nodes, Article is the column they sit in and the only thing that spaces them, which is also why Markdown renders no element of its own.
29
+ - Pass idPrefix when two documents share a page. Both would otherwise claim #installation, and a fragment link lands on whichever the browser found first.
30
+ - Bring your own parser through parse for tables, footnotes or task lists. The package ships no parser dependency on purpose: markdown-it measures 110.7 kB minified against the 38.9 kB this package had left under its bundle budget.
31
+
32
+ ### Don’t
33
+
34
+ - Do not hand it HTML. It parses Markdown; a string of tags renders as the text of those tags, which is the safe answer and not the one you wanted — trusted HTML belongs in Article.
35
+ - Do not expect the rhythm without a surface, and do not try to buy it with a gap. Every node renders m-0 into a bare fragment, and prose spacing is not uniform — article.css gives a heading 2.25em above and 0.75em below, which is what sits it with the paragraph it introduces. A uniform gap on a container cannot reproduce that; <Article as="div"> can.
36
+ - Do not assume the full GFM surface. Tables, footnotes, task lists, setext headings, reference links and hard breaks are outside the built-in parser, and asking for one silently gets you a paragraph.
37
+
38
+ ## Accessibility
39
+
40
+ - headingLevelStart shifts the whole document at once, so nested content keeps a valid outline instead of restarting at h1.
41
+ - Every heading gets a stable, script-preserving id, deduplicated in document order, so a table of contents can link into it.
42
+ - A link whose href carries a scheme that is not http, https, mailto or tel renders as plain text — javascript: never becomes a control.
43
+ - A link that leaves for another site carries rel="noreferrer nofollow", so an untrusted author cannot spend the page’s ranking or read its URL out of the Referer. It is not configurable; markExternalLinks adds the visible outbound arrow and is off by default.
44
+ - A malformed or empty string renders nothing rather than throwing, which is the normal case for content a reader wrote.
45
+
46
+ ## Markdown
47
+
48
+ A Markdown string, rendered as this system's components. The gap it fills is content nobody on this side wrote: a comment, a README, a model's answer, a description out of a database. `Article` cannot take those — it renders HTML through `dangerouslySetInnerHTML` and is documented as trusted-input-only — and until now the alternative was a `<pre>` or a sanitiser bolted onto a styling primitive. IT IS NOT AN `Article`, and the two do not merge. `Markdown` turns a string into nodes; `Article` is the reading column those nodes can sit in. It renders a FRAGMENT rather than a wrapper, which is what makes that nesting work — `Article`'s rhythm is a direct-child combinator, so any element between the two, `display: contents` included, would cost every paragraph its spacing. ── It brings type and colour, and no vertical rhythm ── The nodes carry the system's faces and inks on their own, so one of these looks right in isolation. It is not SPACED in isolation: every node renders `m-0`, and a fragment has no box of its own to put a gap in. Nor does a uniform `gap` on a container reproduce it, because prose spacing is not uniform — `article.css` gives a heading 2.25em above and 0.75em below, which is what sits a heading with the paragraph it introduces rather than midway between two. For anything longer than a sentence — a comment, an answer, a README — put it in `<Article as="div">` and get the real rhythm for the cost of one element. ── A fenced code block brings a client component with it ── The renderer is plain functions and has no state, but a fenced block renders `CodeBlock`, which is `'use client'` and arrives with `useState`, `useEffect` and two icons. That is correct — the copy button is the reason the block exists — but "server-rendered" only holds for content with no code in it, which is worth knowing before this goes into a route that has no client bundle yet. ── Why there is no parser in `dependencies` ── Three options, and the decision is written here because it is the one a reader will want to argue with. 1. BUNDLE A PARSER. markdown-it is the obvious pick, and the documentation site already depends on it — but the site is an app and this is a library, where the dependency list is part of the contract every consumer signs. Measured with the same esbuild pass `check:size` uses, markdown-it is 110.7 kB minified against the 38.9 kB this package had left under its bundle budget. It is not close, and "we will raise the budget" is how a design system becomes the largest thing on a page. 2. TAKE PRE-PARSED HTML, the way `Article` does. Cheapest, and wrong for the case this exists for: HTML from an untrusted author is the input this is supposed to make safe, and it cannot carry `headingLevelStart` or stable heading ids without the component parsing markup back apart to find them. 3. PARSE THE SUBSET WE STYLE, and take a `parse` function for the rest. Chosen. The block grammar is line-based and small (see `parse.ts`), it emits React elements rather than markup — so there is no `dangerouslySetInnerHTML` in this path at all, no sanitiser to configure and no sanitiser to get wrong — and a consumer who needs tables, footnotes or task lists passes `parse` and keeps every other promise the component makes. Headings carry an `id` slugged from their own text and deduplicated within the document, so a table of contents can link to them without the caller post-processing the DOM to find out where they went. A link in the source is validated here, at the boundary: a scheme that is not `http`, `https`, `mailto` or `tel` never becomes a link, and one that leaves for another site carries `rel="noreferrer nofollow"` — so an author the page does not trust cannot spend its ranking or read its URL out of the `Referer`.
49
+
50
+ ### Props
51
+
52
+ - `children` (required) — `string`. The Markdown source. A string — not nodes, not HTML.
53
+ - `headingLevelStart` — `MarkdownHeadingLevel` default `1`. The level the document's top heading renders at. Markdown is written as a document, so its `#` is an `<h1>`. Dropped into a page that already has one — inside an `<h2>` section, in a card, under a dialog's title — that produces two first-level headings and an outline a screen reader cannot navigate. Set this to the level BELOW the heading the content sits under, and every level in the document shifts with it.
54
+ - `idPrefix` — `string`. Namespaces the generated heading ids. Two documents on one page both containing "Installation" would otherwise both claim `#installation`, and a fragment link would land on whichever the browser found first.
55
+ - `markExternalLinks` — `boolean` default `false`. Adds the system's outbound arrow to links that leave for another site. Off by default, and opt-in rather than automatic for two reasons. The mark is an addition to a sentence the component did not write, which is a different kind of act from styling one. And `Markdown` has no idea what origin it is being rendered on, so "leaves for another site" can only mean "carries an `http`/`https` scheme" — an absolute link back to your own domain gets the arrow too. A caller who knows the shape of their content turns it on; one who does not should not have it turned on for them. The `rel` on an outbound link is NOT opt-in and cannot be turned off: it is the security half of the same boundary as the scheme check.
56
+ - `parse` — `(source: string) => MarkdownNode[]` default `parseMarkdown`. Bring your own parser. Anything that turns the source into `MarkdownNode`s: markdown-it, remark, or a pipeline that already has an AST and only needs mapping. The node shapes are exported alongside the component as `MarkdownNode`, `MarkdownInline` and `MarkdownHeadingLevel`. The built-in parser covers the subset this system styles; this is the seam for tables, footnotes, task lists and everything else.
57
+
58
+ ## Examples
59
+
60
+ ```tsx
61
+ // A comment body or an answer: the reading column is what spaces it.
62
+ <Article as="div">
63
+ <Markdown headingLevelStart={3} idPrefix="answer">{answer}</Markdown>
64
+ </Article>
65
+ // A whole document, in the column it was written for.
66
+ <Article><Markdown>{readme}</Markdown></Article>
67
+ // Tables and footnotes, via the consumer's own pipeline.
68
+ <Markdown parse={(source) => toMarkdownNodes(md.parse(source, {}))}>{post}</Markdown>
69
+ ```