@misoto22/folio 0.0.0 → 0.17.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 (721) 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/Workbench.md +142 -0
  122. package/dist/agent/WorkflowFigure.md +51 -0
  123. package/dist/agent/catalog.json +8055 -0
  124. package/dist/agent/index.md +185 -0
  125. package/dist/article.css +407 -0
  126. package/dist/charts/AreaChart/AreaChart.d.ts +198 -0
  127. package/dist/charts/AreaChart/AreaChart.js +479 -0
  128. package/dist/charts/AreaChart/AreaChart.js.map +1 -0
  129. package/dist/charts/BarChart/BarChart.d.ts +190 -0
  130. package/dist/charts/BarChart/BarChart.js +599 -0
  131. package/dist/charts/BarChart/BarChart.js.map +1 -0
  132. package/dist/charts/BarList/BarList.d.ts +65 -0
  133. package/dist/charts/BarList/BarList.js +79 -0
  134. package/dist/charts/BarList/BarList.js.map +1 -0
  135. package/dist/charts/BigNumber/BigNumber.d.ts +72 -0
  136. package/dist/charts/BigNumber/BigNumber.js +51 -0
  137. package/dist/charts/BigNumber/BigNumber.js.map +1 -0
  138. package/dist/charts/BoxPlot/BoxPlot.d.ts +177 -0
  139. package/dist/charts/BoxPlot/BoxPlot.js +497 -0
  140. package/dist/charts/BoxPlot/BoxPlot.js.map +1 -0
  141. package/dist/charts/BulletChart/BulletChart.d.ts +100 -0
  142. package/dist/charts/BulletChart/BulletChart.js +197 -0
  143. package/dist/charts/BulletChart/BulletChart.js.map +1 -0
  144. package/dist/charts/CalendarHeatmap/CalendarHeatmap.d.ts +106 -0
  145. package/dist/charts/CalendarHeatmap/CalendarHeatmap.js +103 -0
  146. package/dist/charts/CalendarHeatmap/CalendarHeatmap.js.map +1 -0
  147. package/dist/charts/ComposedChart/ComposedChart.d.ts +178 -0
  148. package/dist/charts/ComposedChart/ComposedChart.js +667 -0
  149. package/dist/charts/ComposedChart/ComposedChart.js.map +1 -0
  150. package/dist/charts/Facet/Facet.d.ts +240 -0
  151. package/dist/charts/Facet/Facet.js +133 -0
  152. package/dist/charts/Facet/Facet.js.map +1 -0
  153. package/dist/charts/Facet/panels.d.ts +187 -0
  154. package/dist/charts/Facet/panels.js +203 -0
  155. package/dist/charts/Facet/panels.js.map +1 -0
  156. package/dist/charts/FunnelChart/FunnelChart.d.ts +106 -0
  157. package/dist/charts/FunnelChart/FunnelChart.js +137 -0
  158. package/dist/charts/FunnelChart/FunnelChart.js.map +1 -0
  159. package/dist/charts/Heatmap/Heatmap.d.ts +101 -0
  160. package/dist/charts/Heatmap/Heatmap.js +125 -0
  161. package/dist/charts/Heatmap/Heatmap.js.map +1 -0
  162. package/dist/charts/Histogram/Histogram.d.ts +188 -0
  163. package/dist/charts/Histogram/Histogram.js +382 -0
  164. package/dist/charts/Histogram/Histogram.js.map +1 -0
  165. package/dist/charts/LineChart/LineChart.d.ts +174 -0
  166. package/dist/charts/LineChart/LineChart.js +485 -0
  167. package/dist/charts/LineChart/LineChart.js.map +1 -0
  168. package/dist/charts/PieChart/PieChart.d.ts +140 -0
  169. package/dist/charts/PieChart/PieChart.js +317 -0
  170. package/dist/charts/PieChart/PieChart.js.map +1 -0
  171. package/dist/charts/RadarChart/RadarChart.d.ts +135 -0
  172. package/dist/charts/RadarChart/RadarChart.js +303 -0
  173. package/dist/charts/RadarChart/RadarChart.js.map +1 -0
  174. package/dist/charts/RadialChart/RadialChart.d.ts +142 -0
  175. package/dist/charts/RadialChart/RadialChart.js +279 -0
  176. package/dist/charts/RadialChart/RadialChart.js.map +1 -0
  177. package/dist/charts/SankeyChart/SankeyChart.d.ts +149 -0
  178. package/dist/charts/SankeyChart/SankeyChart.js +509 -0
  179. package/dist/charts/SankeyChart/SankeyChart.js.map +1 -0
  180. package/dist/charts/ScatterChart/ScatterChart.d.ts +149 -0
  181. package/dist/charts/ScatterChart/ScatterChart.js +275 -0
  182. package/dist/charts/ScatterChart/ScatterChart.js.map +1 -0
  183. package/dist/charts/Sparkline/Sparkline.d.ts +53 -0
  184. package/dist/charts/Sparkline/Sparkline.js +95 -0
  185. package/dist/charts/Sparkline/Sparkline.js.map +1 -0
  186. package/dist/charts/TreemapChart/TreemapChart.d.ts +98 -0
  187. package/dist/charts/TreemapChart/TreemapChart.js +127 -0
  188. package/dist/charts/TreemapChart/TreemapChart.js.map +1 -0
  189. package/dist/charts/WaterfallChart/WaterfallChart.d.ts +164 -0
  190. package/dist/charts/WaterfallChart/WaterfallChart.js +321 -0
  191. package/dist/charts/WaterfallChart/WaterfallChart.js.map +1 -0
  192. package/dist/charts/index.d.ts +43 -0
  193. package/dist/charts/index.js +130 -0
  194. package/dist/charts/index.js.map +1 -0
  195. package/dist/charts/lib/annotations.d.ts +103 -0
  196. package/dist/charts/lib/annotations.js +99 -0
  197. package/dist/charts/lib/annotations.js.map +1 -0
  198. package/dist/charts/lib/axis.d.ts +18 -0
  199. package/dist/charts/lib/axis.js +21 -0
  200. package/dist/charts/lib/axis.js.map +1 -0
  201. package/dist/charts/lib/background.d.ts +33 -0
  202. package/dist/charts/lib/background.js +173 -0
  203. package/dist/charts/lib/background.js.map +1 -0
  204. package/dist/charts/lib/brush.d.ts +94 -0
  205. package/dist/charts/lib/brush.js +535 -0
  206. package/dist/charts/lib/brush.js.map +1 -0
  207. package/dist/charts/lib/chart.d.ts +94 -0
  208. package/dist/charts/lib/chart.js +149 -0
  209. package/dist/charts/lib/chart.js.map +1 -0
  210. package/dist/charts/lib/dot.d.ts +29 -0
  211. package/dist/charts/lib/dot.js +78 -0
  212. package/dist/charts/lib/dot.js.map +1 -0
  213. package/dist/charts/lib/empty.d.ts +31 -0
  214. package/dist/charts/lib/empty.js +24 -0
  215. package/dist/charts/lib/empty.js.map +1 -0
  216. package/dist/charts/lib/export.d.ts +94 -0
  217. package/dist/charts/lib/export.js +62 -0
  218. package/dist/charts/lib/export.js.map +1 -0
  219. package/dist/charts/lib/figure.d.ts +81 -0
  220. package/dist/charts/lib/figure.js +62 -0
  221. package/dist/charts/lib/figure.js.map +1 -0
  222. package/dist/charts/lib/format.d.ts +46 -0
  223. package/dist/charts/lib/format.js +56 -0
  224. package/dist/charts/lib/format.js.map +1 -0
  225. package/dist/charts/lib/legend.d.ts +45 -0
  226. package/dist/charts/lib/legend.js +117 -0
  227. package/dist/charts/lib/legend.js.map +1 -0
  228. package/dist/charts/lib/loading.d.ts +48 -0
  229. package/dist/charts/lib/loading.js +105 -0
  230. package/dist/charts/lib/loading.js.map +1 -0
  231. package/dist/charts/lib/paint.d.ts +154 -0
  232. package/dist/charts/lib/paint.js +551 -0
  233. package/dist/charts/lib/paint.js.map +1 -0
  234. package/dist/charts/lib/scale.d.ts +23 -0
  235. package/dist/charts/lib/scale.js +13 -0
  236. package/dist/charts/lib/scale.js.map +1 -0
  237. package/dist/charts/lib/selection.d.ts +20 -0
  238. package/dist/charts/lib/selection.js +18 -0
  239. package/dist/charts/lib/selection.js.map +1 -0
  240. package/dist/charts/lib/sonify-control.d.ts +163 -0
  241. package/dist/charts/lib/sonify-control.js +172 -0
  242. package/dist/charts/lib/sonify-control.js.map +1 -0
  243. package/dist/charts/lib/sonify.d.ts +248 -0
  244. package/dist/charts/lib/sonify.js +262 -0
  245. package/dist/charts/lib/sonify.js.map +1 -0
  246. package/dist/charts/lib/toolbar.d.ts +144 -0
  247. package/dist/charts/lib/toolbar.js +156 -0
  248. package/dist/charts/lib/toolbar.js.map +1 -0
  249. package/dist/charts/lib/tooltip.d.ts +59 -0
  250. package/dist/charts/lib/tooltip.js +135 -0
  251. package/dist/charts/lib/tooltip.js.map +1 -0
  252. package/dist/charts/lib/values.d.ts +56 -0
  253. package/dist/charts/lib/values.js +71 -0
  254. package/dist/charts/lib/values.js.map +1 -0
  255. package/dist/charts/lib/zoom.d.ts +139 -0
  256. package/dist/charts/lib/zoom.js +314 -0
  257. package/dist/charts/lib/zoom.js.map +1 -0
  258. package/dist/components/Accordion/Accordion.d.ts +34 -0
  259. package/dist/components/Accordion/Accordion.js +43 -0
  260. package/dist/components/Accordion/Accordion.js.map +1 -0
  261. package/dist/components/Alert/Alert.d.ts +32 -0
  262. package/dist/components/Alert/Alert.js +49 -0
  263. package/dist/components/Alert/Alert.js.map +1 -0
  264. package/dist/components/AppShell/AppShell.d.ts +58 -0
  265. package/dist/components/AppShell/AppShell.js +126 -0
  266. package/dist/components/AppShell/AppShell.js.map +1 -0
  267. package/dist/components/Article/Article.d.ts +58 -0
  268. package/dist/components/Article/Article.js +34 -0
  269. package/dist/components/Article/Article.js.map +1 -0
  270. package/dist/components/AspectRatio/AspectRatio.d.ts +46 -0
  271. package/dist/components/AspectRatio/AspectRatio.js +33 -0
  272. package/dist/components/AspectRatio/AspectRatio.js.map +1 -0
  273. package/dist/components/Avatar/Avatar.d.ts +38 -0
  274. package/dist/components/Avatar/Avatar.js +44 -0
  275. package/dist/components/Avatar/Avatar.js.map +1 -0
  276. package/dist/components/Badge/Badge.d.ts +30 -0
  277. package/dist/components/Badge/Badge.js +29 -0
  278. package/dist/components/Badge/Badge.js.map +1 -0
  279. package/dist/components/Breadcrumb/Breadcrumb.d.ts +37 -0
  280. package/dist/components/Breadcrumb/Breadcrumb.js +46 -0
  281. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -0
  282. package/dist/components/Button/Button.d.ts +70 -0
  283. package/dist/components/Button/Button.js +95 -0
  284. package/dist/components/Button/Button.js.map +1 -0
  285. package/dist/components/Calendar/Calendar.d.ts +54 -0
  286. package/dist/components/Calendar/Calendar.js +369 -0
  287. package/dist/components/Calendar/Calendar.js.map +1 -0
  288. package/dist/components/Card/Card.d.ts +55 -0
  289. package/dist/components/Card/Card.js +64 -0
  290. package/dist/components/Card/Card.js.map +1 -0
  291. package/dist/components/Checkbox/Checkbox.d.ts +26 -0
  292. package/dist/components/Checkbox/Checkbox.js +34 -0
  293. package/dist/components/Checkbox/Checkbox.js.map +1 -0
  294. package/dist/components/Code/Code.d.ts +30 -0
  295. package/dist/components/Code/Code.js +21 -0
  296. package/dist/components/Code/Code.js.map +1 -0
  297. package/dist/components/CodeBlock/CodeBlock.d.ts +145 -0
  298. package/dist/components/CodeBlock/CodeBlock.js +114 -0
  299. package/dist/components/CodeBlock/CodeBlock.js.map +1 -0
  300. package/dist/components/Collapsible/Collapsible.d.ts +45 -0
  301. package/dist/components/Collapsible/Collapsible.js +60 -0
  302. package/dist/components/Collapsible/Collapsible.js.map +1 -0
  303. package/dist/components/ColorPicker/ColorPicker.d.ts +67 -0
  304. package/dist/components/ColorPicker/ColorPicker.js +334 -0
  305. package/dist/components/ColorPicker/ColorPicker.js.map +1 -0
  306. package/dist/components/Combobox/Combobox.d.ts +77 -0
  307. package/dist/components/Combobox/Combobox.js +170 -0
  308. package/dist/components/Combobox/Combobox.js.map +1 -0
  309. package/dist/components/Command/Command.d.ts +125 -0
  310. package/dist/components/Command/Command.js +204 -0
  311. package/dist/components/Command/Command.js.map +1 -0
  312. package/dist/components/ContextMenu/ContextMenu.d.ts +63 -0
  313. package/dist/components/ContextMenu/ContextMenu.js +109 -0
  314. package/dist/components/ContextMenu/ContextMenu.js.map +1 -0
  315. package/dist/components/DatePicker/DatePicker.d.ts +130 -0
  316. package/dist/components/DatePicker/DatePicker.js +257 -0
  317. package/dist/components/DatePicker/DatePicker.js.map +1 -0
  318. package/dist/components/DescriptionList/DescriptionList.d.ts +73 -0
  319. package/dist/components/DescriptionList/DescriptionList.js +35 -0
  320. package/dist/components/DescriptionList/DescriptionList.js.map +1 -0
  321. package/dist/components/Diagram/Diagram.d.ts +86 -0
  322. package/dist/components/Diagram/Diagram.js +211 -0
  323. package/dist/components/Diagram/Diagram.js.map +1 -0
  324. package/dist/components/Dialog/Dialog.d.ts +63 -0
  325. package/dist/components/Dialog/Dialog.js +90 -0
  326. package/dist/components/Dialog/Dialog.js.map +1 -0
  327. package/dist/components/DropdownMenu/DropdownMenu.d.ts +87 -0
  328. package/dist/components/DropdownMenu/DropdownMenu.js +120 -0
  329. package/dist/components/DropdownMenu/DropdownMenu.js.map +1 -0
  330. package/dist/components/EmptyState/EmptyState.d.ts +55 -0
  331. package/dist/components/EmptyState/EmptyState.js +32 -0
  332. package/dist/components/EmptyState/EmptyState.js.map +1 -0
  333. package/dist/components/ErrorState/ErrorState.d.ts +55 -0
  334. package/dist/components/ErrorState/ErrorState.js +41 -0
  335. package/dist/components/ErrorState/ErrorState.js.map +1 -0
  336. package/dist/components/Field/Field.d.ts +111 -0
  337. package/dist/components/Field/Field.js +95 -0
  338. package/dist/components/Field/Field.js.map +1 -0
  339. package/dist/components/Field/field-control.d.ts +31 -0
  340. package/dist/components/Field/field-control.js +12 -0
  341. package/dist/components/Field/field-control.js.map +1 -0
  342. package/dist/components/FigureBand/FigureBand.d.ts +31 -0
  343. package/dist/components/FigureBand/FigureBand.js +51 -0
  344. package/dist/components/FigureBand/FigureBand.js.map +1 -0
  345. package/dist/components/FloatingIconButton/FloatingIconButton.d.ts +29 -0
  346. package/dist/components/FloatingIconButton/FloatingIconButton.js +34 -0
  347. package/dist/components/FloatingIconButton/FloatingIconButton.js.map +1 -0
  348. package/dist/components/Heading/Heading.d.ts +62 -0
  349. package/dist/components/Heading/Heading.js +44 -0
  350. package/dist/components/Heading/Heading.js.map +1 -0
  351. package/dist/components/Input/Input.d.ts +22 -0
  352. package/dist/components/Input/Input.js +21 -0
  353. package/dist/components/Input/Input.js.map +1 -0
  354. package/dist/components/Kbd/Kbd.d.ts +27 -0
  355. package/dist/components/Kbd/Kbd.js +21 -0
  356. package/dist/components/Kbd/Kbd.js.map +1 -0
  357. package/dist/components/LinkArrow/LinkArrow.d.ts +24 -0
  358. package/dist/components/LinkArrow/LinkArrow.js +24 -0
  359. package/dist/components/LinkArrow/LinkArrow.js.map +1 -0
  360. package/dist/components/Markdown/Markdown.d.ts +139 -0
  361. package/dist/components/Markdown/Markdown.js +135 -0
  362. package/dist/components/Markdown/Markdown.js.map +1 -0
  363. package/dist/components/Markdown/inline.d.ts +29 -0
  364. package/dist/components/Markdown/inline.js +74 -0
  365. package/dist/components/Markdown/inline.js.map +1 -0
  366. package/dist/components/Markdown/nodes.d.ts +65 -0
  367. package/dist/components/Markdown/nodes.js +1 -0
  368. package/dist/components/Markdown/nodes.js.map +1 -0
  369. package/dist/components/Markdown/parse.d.ts +24 -0
  370. package/dist/components/Markdown/parse.js +110 -0
  371. package/dist/components/Markdown/parse.js.map +1 -0
  372. package/dist/components/Markdown/slug.d.ts +15 -0
  373. package/dist/components/Markdown/slug.js +7 -0
  374. package/dist/components/Markdown/slug.js.map +1 -0
  375. package/dist/components/Metric/Metric.d.ts +61 -0
  376. package/dist/components/Metric/Metric.js +51 -0
  377. package/dist/components/Metric/Metric.js.map +1 -0
  378. package/dist/components/NativeSelect/NativeSelect.d.ts +33 -0
  379. package/dist/components/NativeSelect/NativeSelect.js +44 -0
  380. package/dist/components/NativeSelect/NativeSelect.js.map +1 -0
  381. package/dist/components/NavItem/NavItem.d.ts +39 -0
  382. package/dist/components/NavItem/NavItem.js +31 -0
  383. package/dist/components/NavItem/NavItem.js.map +1 -0
  384. package/dist/components/NumberField/NumberField.d.ts +69 -0
  385. package/dist/components/NumberField/NumberField.js +162 -0
  386. package/dist/components/NumberField/NumberField.js.map +1 -0
  387. package/dist/components/PageHeader/PageHeader.d.ts +92 -0
  388. package/dist/components/PageHeader/PageHeader.js +37 -0
  389. package/dist/components/PageHeader/PageHeader.js.map +1 -0
  390. package/dist/components/Pagination/Pagination.d.ts +67 -0
  391. package/dist/components/Pagination/Pagination.js +112 -0
  392. package/dist/components/Pagination/Pagination.js.map +1 -0
  393. package/dist/components/Popover/Popover.d.ts +39 -0
  394. package/dist/components/Popover/Popover.js +57 -0
  395. package/dist/components/Popover/Popover.js.map +1 -0
  396. package/dist/components/Progress/Progress.d.ts +43 -0
  397. package/dist/components/Progress/Progress.js +57 -0
  398. package/dist/components/Progress/Progress.js.map +1 -0
  399. package/dist/components/RadioGroup/RadioGroup.d.ts +49 -0
  400. package/dist/components/RadioGroup/RadioGroup.js +53 -0
  401. package/dist/components/RadioGroup/RadioGroup.js.map +1 -0
  402. package/dist/components/ScrollArea/ScrollArea.d.ts +46 -0
  403. package/dist/components/ScrollArea/ScrollArea.js +54 -0
  404. package/dist/components/ScrollArea/ScrollArea.js.map +1 -0
  405. package/dist/components/SearchableMenu/SearchableMenu.d.ts +68 -0
  406. package/dist/components/SearchableMenu/SearchableMenu.js +101 -0
  407. package/dist/components/SearchableMenu/SearchableMenu.js.map +1 -0
  408. package/dist/components/Select/Select.d.ts +87 -0
  409. package/dist/components/Select/Select.js +130 -0
  410. package/dist/components/Select/Select.js.map +1 -0
  411. package/dist/components/Separator/Separator.d.ts +48 -0
  412. package/dist/components/Separator/Separator.js +43 -0
  413. package/dist/components/Separator/Separator.js.map +1 -0
  414. package/dist/components/Sheet/Sheet.d.ts +43 -0
  415. package/dist/components/Sheet/Sheet.js +79 -0
  416. package/dist/components/Sheet/Sheet.js.map +1 -0
  417. package/dist/components/Sidebar/Sidebar.d.ts +357 -0
  418. package/dist/components/Sidebar/Sidebar.js +447 -0
  419. package/dist/components/Sidebar/Sidebar.js.map +1 -0
  420. package/dist/components/Skeleton/Skeleton.d.ts +70 -0
  421. package/dist/components/Skeleton/Skeleton.js +44 -0
  422. package/dist/components/Skeleton/Skeleton.js.map +1 -0
  423. package/dist/components/Slider/Slider.d.ts +74 -0
  424. package/dist/components/Slider/Slider.js +143 -0
  425. package/dist/components/Slider/Slider.js.map +1 -0
  426. package/dist/components/Spinner/Spinner.d.ts +58 -0
  427. package/dist/components/Spinner/Spinner.js +49 -0
  428. package/dist/components/Spinner/Spinner.js.map +1 -0
  429. package/dist/components/StatusDot/StatusDot.d.ts +29 -0
  430. package/dist/components/StatusDot/StatusDot.js +44 -0
  431. package/dist/components/StatusDot/StatusDot.js.map +1 -0
  432. package/dist/components/StatusPill/StatusPill.d.ts +30 -0
  433. package/dist/components/StatusPill/StatusPill.js +37 -0
  434. package/dist/components/StatusPill/StatusPill.js.map +1 -0
  435. package/dist/components/Steps/Steps.d.ts +65 -0
  436. package/dist/components/Steps/Steps.js +25 -0
  437. package/dist/components/Steps/Steps.js.map +1 -0
  438. package/dist/components/Switch/Switch.d.ts +23 -0
  439. package/dist/components/Switch/Switch.js +23 -0
  440. package/dist/components/Switch/Switch.js.map +1 -0
  441. package/dist/components/Table/Table.d.ts +116 -0
  442. package/dist/components/Table/Table.js +137 -0
  443. package/dist/components/Table/Table.js.map +1 -0
  444. package/dist/components/Tabs/Tabs.d.ts +37 -0
  445. package/dist/components/Tabs/Tabs.js +205 -0
  446. package/dist/components/Tabs/Tabs.js.map +1 -0
  447. package/dist/components/Tag/Tag.d.ts +87 -0
  448. package/dist/components/Tag/Tag.js +62 -0
  449. package/dist/components/Tag/Tag.js.map +1 -0
  450. package/dist/components/Text/Text.d.ts +62 -0
  451. package/dist/components/Text/Text.js +30 -0
  452. package/dist/components/Text/Text.js.map +1 -0
  453. package/dist/components/Textarea/Textarea.d.ts +20 -0
  454. package/dist/components/Textarea/Textarea.js +32 -0
  455. package/dist/components/Textarea/Textarea.js.map +1 -0
  456. package/dist/components/Timestamp/Timestamp.d.ts +59 -0
  457. package/dist/components/Timestamp/Timestamp.js +56 -0
  458. package/dist/components/Timestamp/Timestamp.js.map +1 -0
  459. package/dist/components/Toast/Toast.d.ts +32 -0
  460. package/dist/components/Toast/Toast.js +64 -0
  461. package/dist/components/Toast/Toast.js.map +1 -0
  462. package/dist/components/ToggleGroup/ToggleGroup.d.ts +46 -0
  463. package/dist/components/ToggleGroup/ToggleGroup.js +88 -0
  464. package/dist/components/ToggleGroup/ToggleGroup.js.map +1 -0
  465. package/dist/components/Toolbar/Toolbar.d.ts +55 -0
  466. package/dist/components/Toolbar/Toolbar.js +43 -0
  467. package/dist/components/Toolbar/Toolbar.js.map +1 -0
  468. package/dist/components/Tooltip/Tooltip.d.ts +43 -0
  469. package/dist/components/Tooltip/Tooltip.js +40 -0
  470. package/dist/components/Tooltip/Tooltip.js.map +1 -0
  471. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.d.ts +55 -0
  472. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js +175 -0
  473. package/dist/diagrams/ArchitectureFigure/ArchitectureFigure.js.map +1 -0
  474. package/dist/diagrams/DataflowFigure/DataflowFigure.d.ts +28 -0
  475. package/dist/diagrams/DataflowFigure/DataflowFigure.js +148 -0
  476. package/dist/diagrams/DataflowFigure/DataflowFigure.js.map +1 -0
  477. package/dist/diagrams/DiagramCanvas/DiagramCanvas.d.ts +78 -0
  478. package/dist/diagrams/DiagramCanvas/DiagramCanvas.js +229 -0
  479. package/dist/diagrams/DiagramCanvas/DiagramCanvas.js.map +1 -0
  480. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.d.ts +106 -0
  481. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js +123 -0
  482. package/dist/diagrams/DiagramExportMenu/DiagramExportMenu.js.map +1 -0
  483. package/dist/diagrams/DiagramInspector/DiagramInspector.d.ts +70 -0
  484. package/dist/diagrams/DiagramInspector/DiagramInspector.js +94 -0
  485. package/dist/diagrams/DiagramInspector/DiagramInspector.js.map +1 -0
  486. package/dist/diagrams/DiagramLegend/DiagramLegend.d.ts +42 -0
  487. package/dist/diagrams/DiagramLegend/DiagramLegend.js +35 -0
  488. package/dist/diagrams/DiagramLegend/DiagramLegend.js.map +1 -0
  489. package/dist/diagrams/DiagramMinimap/DiagramMinimap.d.ts +77 -0
  490. package/dist/diagrams/DiagramMinimap/DiagramMinimap.js +106 -0
  491. package/dist/diagrams/DiagramMinimap/DiagramMinimap.js.map +1 -0
  492. package/dist/diagrams/DiagramToolbar/DiagramToolbar.d.ts +48 -0
  493. package/dist/diagrams/DiagramToolbar/DiagramToolbar.js +53 -0
  494. package/dist/diagrams/DiagramToolbar/DiagramToolbar.js.map +1 -0
  495. package/dist/diagrams/LifecycleFigure/LifecycleFigure.d.ts +31 -0
  496. package/dist/diagrams/LifecycleFigure/LifecycleFigure.js +234 -0
  497. package/dist/diagrams/LifecycleFigure/LifecycleFigure.js.map +1 -0
  498. package/dist/diagrams/SequenceFigure/SequenceFigure.d.ts +38 -0
  499. package/dist/diagrams/SequenceFigure/SequenceFigure.js +261 -0
  500. package/dist/diagrams/SequenceFigure/SequenceFigure.js.map +1 -0
  501. package/dist/diagrams/WorkflowFigure/WorkflowFigure.d.ts +36 -0
  502. package/dist/diagrams/WorkflowFigure/WorkflowFigure.js +259 -0
  503. package/dist/diagrams/WorkflowFigure/WorkflowFigure.js.map +1 -0
  504. package/dist/diagrams/index.d.ts +17 -0
  505. package/dist/diagrams/index.js +29 -0
  506. package/dist/diagrams/index.js.map +1 -0
  507. package/dist/diagrams/lib/dev.d.ts +61 -0
  508. package/dist/diagrams/lib/dev.js +96 -0
  509. package/dist/diagrams/lib/dev.js.map +1 -0
  510. package/dist/diagrams/lib/frame.d.ts +138 -0
  511. package/dist/diagrams/lib/frame.js +131 -0
  512. package/dist/diagrams/lib/frame.js.map +1 -0
  513. package/dist/diagrams/lib/geometry.d.ts +114 -0
  514. package/dist/diagrams/lib/geometry.js +113 -0
  515. package/dist/diagrams/lib/geometry.js.map +1 -0
  516. package/dist/diagrams/lib/legend.d.ts +32 -0
  517. package/dist/diagrams/lib/legend.js +84 -0
  518. package/dist/diagrams/lib/legend.js.map +1 -0
  519. package/dist/diagrams/lib/marks.d.ts +207 -0
  520. package/dist/diagrams/lib/marks.js +480 -0
  521. package/dist/diagrams/lib/marks.js.map +1 -0
  522. package/dist/diagrams/lib/route.d.ts +106 -0
  523. package/dist/diagrams/lib/route.js +201 -0
  524. package/dist/diagrams/lib/route.js.map +1 -0
  525. package/dist/diagrams/lib/wires.d.ts +59 -0
  526. package/dist/diagrams/lib/wires.js +94 -0
  527. package/dist/diagrams/lib/wires.js.map +1 -0
  528. package/dist/diagrams/spec.d.ts +405 -0
  529. package/dist/diagrams/spec.js +1 -0
  530. package/dist/diagrams/spec.js.map +1 -0
  531. package/dist/fonts/hanken-grotesk-300.woff2 +0 -0
  532. package/dist/fonts/hanken-grotesk-400.woff2 +0 -0
  533. package/dist/fonts/hanken-grotesk-500.woff2 +0 -0
  534. package/dist/fonts/hanken-grotesk-600.woff2 +0 -0
  535. package/dist/fonts/hanken-grotesk-700.woff2 +0 -0
  536. package/dist/fonts/ibm-plex-mono-400.woff2 +0 -0
  537. package/dist/fonts/ibm-plex-mono-500.woff2 +0 -0
  538. package/dist/fonts/ibm-plex-mono-600.woff2 +0 -0
  539. package/dist/fonts/newsreader-300.woff2 +0 -0
  540. package/dist/fonts/newsreader-400.woff2 +0 -0
  541. package/dist/fonts/newsreader-500.woff2 +0 -0
  542. package/dist/fonts/newsreader-600.woff2 +0 -0
  543. package/dist/fonts.css +96 -0
  544. package/dist/index.d.ts +97 -0
  545. package/dist/index.js +80 -0
  546. package/dist/index.js.map +1 -0
  547. package/dist/keyframes.css +300 -0
  548. package/dist/lib/cn.d.ts +21 -0
  549. package/dist/lib/cn.js +9 -0
  550. package/dist/lib/cn.js.map +1 -0
  551. package/dist/lib/color.d.ts +80 -0
  552. package/dist/lib/color.js +189 -0
  553. package/dist/lib/color.js.map +1 -0
  554. package/dist/lib/control.d.ts +32 -0
  555. package/dist/lib/control.js +14 -0
  556. package/dist/lib/control.js.map +1 -0
  557. package/dist/lib/index.d.ts +4 -0
  558. package/dist/lib/index.js +11 -0
  559. package/dist/lib/index.js.map +1 -0
  560. package/dist/lib/numeric.d.ts +35 -0
  561. package/dist/lib/numeric.js +29 -0
  562. package/dist/lib/numeric.js.map +1 -0
  563. package/dist/lib/overlay-container.d.ts +48 -0
  564. package/dist/lib/overlay-container.js +15 -0
  565. package/dist/lib/overlay-container.js.map +1 -0
  566. package/dist/lib/slot-content.d.ts +8 -0
  567. package/dist/lib/slot-content.js +17 -0
  568. package/dist/lib/slot-content.js.map +1 -0
  569. package/dist/lib/step-rail.d.ts +45 -0
  570. package/dist/lib/step-rail.js +47 -0
  571. package/dist/lib/step-rail.js.map +1 -0
  572. package/dist/lib/svg-export.d.ts +138 -0
  573. package/dist/lib/svg-export.js +198 -0
  574. package/dist/lib/svg-export.js.map +1 -0
  575. package/dist/lib/useClipboardCopy.d.ts +30 -0
  576. package/dist/lib/useClipboardCopy.js +37 -0
  577. package/dist/lib/useClipboardCopy.js.map +1 -0
  578. package/dist/lib/useSelectionIndicator.d.ts +29 -0
  579. package/dist/lib/useSelectionIndicator.js +49 -0
  580. package/dist/lib/useSelectionIndicator.js.map +1 -0
  581. package/dist/lib/warn.d.ts +73 -0
  582. package/dist/lib/warn.js +38 -0
  583. package/dist/lib/warn.js.map +1 -0
  584. package/dist/semantic.css +200 -0
  585. package/dist/styles.css +98 -0
  586. package/dist/themes.css +607 -0
  587. package/dist/tokens/brand.d.ts +47 -0
  588. package/dist/tokens/brand.js +38 -0
  589. package/dist/tokens/brand.js.map +1 -0
  590. package/dist/tokens.css +666 -0
  591. package/dist/tokens.d.ts +205 -0
  592. package/dist/tokens.js +1056 -0
  593. package/dist/tokens.json +1055 -0
  594. package/dist/website/Actions/Actions.d.ts +34 -0
  595. package/dist/website/Actions/Actions.js +29 -0
  596. package/dist/website/Actions/Actions.js.map +1 -0
  597. package/dist/website/Collection/Collection.d.ts +128 -0
  598. package/dist/website/Collection/Collection.js +162 -0
  599. package/dist/website/Collection/Collection.js.map +1 -0
  600. package/dist/website/Contact/Contact.d.ts +87 -0
  601. package/dist/website/Contact/Contact.js +94 -0
  602. package/dist/website/Contact/Contact.js.map +1 -0
  603. package/dist/website/Content/CodePanel.d.ts +27 -0
  604. package/dist/website/Content/CodePanel.js +30 -0
  605. package/dist/website/Content/CodePanel.js.map +1 -0
  606. package/dist/website/Content/Content.d.ts +29 -0
  607. package/dist/website/Content/Content.js +38 -0
  608. package/dist/website/Content/Content.js.map +1 -0
  609. package/dist/website/Conversation/Conversation.d.ts +193 -0
  610. package/dist/website/Conversation/Conversation.js +252 -0
  611. package/dist/website/Conversation/Conversation.js.map +1 -0
  612. package/dist/website/Evidence/Evidence.d.ts +116 -0
  613. package/dist/website/Evidence/Evidence.js +142 -0
  614. package/dist/website/Evidence/Evidence.js.map +1 -0
  615. package/dist/website/Media/Media.d.ts +173 -0
  616. package/dist/website/Media/Media.js +225 -0
  617. package/dist/website/Media/Media.js.map +1 -0
  618. package/dist/website/Media/MediaLightbox.d.ts +18 -0
  619. package/dist/website/Media/MediaLightbox.js +38 -0
  620. package/dist/website/Media/MediaLightbox.js.map +1 -0
  621. package/dist/website/Metrics/Metrics.d.ts +74 -0
  622. package/dist/website/Metrics/Metrics.js +96 -0
  623. package/dist/website/Metrics/Metrics.js.map +1 -0
  624. package/dist/website/Music/Music.d.ts +60 -0
  625. package/dist/website/Music/Music.js +80 -0
  626. package/dist/website/Music/Music.js.map +1 -0
  627. package/dist/website/Portfolio/FrameLayout.d.ts +9 -0
  628. package/dist/website/Portfolio/FrameLayout.js +42 -0
  629. package/dist/website/Portfolio/FrameLayout.js.map +1 -0
  630. package/dist/website/Portfolio/Portfolio.d.ts +49 -0
  631. package/dist/website/Portfolio/Portfolio.js +66 -0
  632. package/dist/website/Portfolio/Portfolio.js.map +1 -0
  633. package/dist/website/Portfolio/QuestionCard.d.ts +22 -0
  634. package/dist/website/Portfolio/QuestionCard.js +33 -0
  635. package/dist/website/Portfolio/QuestionCard.js.map +1 -0
  636. package/dist/website/PortfolioIndex/PortfolioIndex.d.ts +21 -0
  637. package/dist/website/PortfolioIndex/PortfolioIndex.js +31 -0
  638. package/dist/website/PortfolioIndex/PortfolioIndex.js.map +1 -0
  639. package/dist/website/Reading/Reading.d.ts +203 -0
  640. package/dist/website/Reading/Reading.js +357 -0
  641. package/dist/website/Reading/Reading.js.map +1 -0
  642. package/dist/website/Recovery/Recovery.d.ts +39 -0
  643. package/dist/website/Recovery/Recovery.js +96 -0
  644. package/dist/website/Recovery/Recovery.js.map +1 -0
  645. package/dist/website/SearchPalette/SearchPalette.d.ts +59 -0
  646. package/dist/website/SearchPalette/SearchPalette.js +120 -0
  647. package/dist/website/SearchPalette/SearchPalette.js.map +1 -0
  648. package/dist/website/SiteNavigation/SiteNavigation.d.ts +46 -0
  649. package/dist/website/SiteNavigation/SiteNavigation.js +101 -0
  650. package/dist/website/SiteNavigation/SiteNavigation.js.map +1 -0
  651. package/dist/website/SiteShell/SiteShell.d.ts +45 -0
  652. package/dist/website/SiteShell/SiteShell.js +46 -0
  653. package/dist/website/SiteShell/SiteShell.js.map +1 -0
  654. package/dist/website/Timeline/Timeline.d.ts +80 -0
  655. package/dist/website/Timeline/Timeline.js +99 -0
  656. package/dist/website/Timeline/Timeline.js.map +1 -0
  657. package/dist/website/Workbench/Chronology.d.ts +32 -0
  658. package/dist/website/Workbench/Chronology.js +32 -0
  659. package/dist/website/Workbench/Chronology.js.map +1 -0
  660. package/dist/website/Workbench/ContactRow.d.ts +13 -0
  661. package/dist/website/Workbench/ContactRow.js +11 -0
  662. package/dist/website/Workbench/ContactRow.js.map +1 -0
  663. package/dist/website/Workbench/PhotoMosaic.d.ts +13 -0
  664. package/dist/website/Workbench/PhotoMosaic.js +15 -0
  665. package/dist/website/Workbench/PhotoMosaic.js.map +1 -0
  666. package/dist/website/Workbench/Reveal.d.ts +19 -0
  667. package/dist/website/Workbench/Reveal.js +29 -0
  668. package/dist/website/Workbench/Reveal.js.map +1 -0
  669. package/dist/website/Workbench/ToolStrip.d.ts +18 -0
  670. package/dist/website/Workbench/ToolStrip.js +15 -0
  671. package/dist/website/Workbench/ToolStrip.js.map +1 -0
  672. package/dist/website/Workbench/Workbench.d.ts +23 -0
  673. package/dist/website/Workbench/Workbench.js +22 -0
  674. package/dist/website/Workbench/Workbench.js.map +1 -0
  675. package/dist/website/Workbench/WorkbenchCard.d.ts +29 -0
  676. package/dist/website/Workbench/WorkbenchCard.js +21 -0
  677. package/dist/website/Workbench/WorkbenchCard.js.map +1 -0
  678. package/dist/website/Workbench/WorkbenchEntries.d.ts +22 -0
  679. package/dist/website/Workbench/WorkbenchEntries.js +24 -0
  680. package/dist/website/Workbench/WorkbenchEntries.js.map +1 -0
  681. package/dist/website/Workbench/WorkbenchFigure.d.ts +20 -0
  682. package/dist/website/Workbench/WorkbenchFigure.js +15 -0
  683. package/dist/website/Workbench/WorkbenchFigure.js.map +1 -0
  684. package/dist/website/Workbench/WorkbenchHero.d.ts +24 -0
  685. package/dist/website/Workbench/WorkbenchHero.js +24 -0
  686. package/dist/website/Workbench/WorkbenchHero.js.map +1 -0
  687. package/dist/website/Workbench/theme.d.ts +22 -0
  688. package/dist/website/Workbench/theme.js +12 -0
  689. package/dist/website/Workbench/theme.js.map +1 -0
  690. package/dist/website/index.d.ts +38 -0
  691. package/dist/website/index.js +32 -0
  692. package/dist/website/index.js.map +1 -0
  693. package/dist/website-actions.css +6 -0
  694. package/dist/website-base.css +46 -0
  695. package/dist/website-collection.css +89 -0
  696. package/dist/website-contact.css +29 -0
  697. package/dist/website-content.css +20 -0
  698. package/dist/website-controls.css +91 -0
  699. package/dist/website-conversation.css +115 -0
  700. package/dist/website-evidence.css +56 -0
  701. package/dist/website-media.css +227 -0
  702. package/dist/website-metrics.css +15 -0
  703. package/dist/website-music.css +27 -0
  704. package/dist/website-portfolio.css +94 -0
  705. package/dist/website-reading.css +159 -0
  706. package/dist/website-recovery.css +28 -0
  707. package/dist/website-search.css +26 -0
  708. package/dist/website-shell.css +89 -0
  709. package/dist/website-timeline.css +43 -0
  710. package/dist/website-workbench.css +162 -0
  711. package/dist/website.css +26 -0
  712. package/llms.txt +35 -0
  713. package/package.json +163 -5
  714. package/skills/folio-design/SKILL.md +228 -0
  715. package/skills/folio-design/evals/claims.json +95 -0
  716. package/skills/folio-design/evals/evals.json +84 -0
  717. package/skills/folio-design/rules/a11y.md +167 -0
  718. package/skills/folio-design/rules/composition.md +108 -0
  719. package/skills/folio-design/rules/forms.md +135 -0
  720. package/skills/folio-design/rules/naming.md +155 -0
  721. package/skills/folio-design/rules/tokens.md +135 -0
@@ -0,0 +1,29 @@
1
+ import * as react from 'react';
2
+ import { ButtonHTMLAttributes, ReactNode } from 'react';
3
+
4
+ interface FloatingIconButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
5
+ /**
6
+ * Which bottom corner the control is pinned to, in READING order —
7
+ * `end` is the right in English and the left in Arabic. Naming the sides
8
+ * `left`/`right` would have hard-coded one script's layout into the API.
9
+ */
10
+ position: 'start' | 'end';
11
+ /** Accessible name — the button has no visible text, so this is its only name. */
12
+ label: string;
13
+ children: ReactNode;
14
+ }
15
+ /**
16
+ * A round action pinned to a screen corner.
17
+ *
18
+ * A translucent paper ground with a backdrop blur rather than a drop shadow —
19
+ * the White Reset has no elevation ramp, so what separates the control from
20
+ * the page under it is the blur and the hairline, not a glow.
21
+ *
22
+ * @example
23
+ * <FloatingIconButton position="right" label="Back to top" onClick={scrollUp}>
24
+ * <ArrowUp size={16} />
25
+ * </FloatingIconButton>
26
+ */
27
+ declare function FloatingIconButton({ position, label, children, className, ...rest }: FloatingIconButtonProps): react.JSX.Element;
28
+
29
+ export { FloatingIconButton, type FloatingIconButtonProps, FloatingIconButton as default };
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { cn } from "../../lib/cn.js";
4
+ import { warnBlankName } from "../../lib/warn.js";
5
+ const POSITION_CLASS = { start: "bottom-20 start-6", end: "bottom-6 end-6" };
6
+ function FloatingIconButton({
7
+ position,
8
+ label,
9
+ children,
10
+ className,
11
+ ...rest
12
+ }) {
13
+ warnBlankName("FloatingIconButton", "label", label, 'the button is announced as "button" and nothing else');
14
+ return /* @__PURE__ */ jsx(
15
+ "button",
16
+ {
17
+ type: "button",
18
+ "aria-label": label,
19
+ className: cn(
20
+ "fixed z-(--z-drawer) flex size-(--control-h-md) items-center justify-center rounded-(--radius-pill) border border-(--rule-2) bg-(--paper)/90 text-(--ink-2) backdrop-blur-sm transition-colors duration-(--duration-fast) hover:border-(--ink) hover:text-(--ink)",
21
+ POSITION_CLASS[position],
22
+ className
23
+ ),
24
+ ...rest,
25
+ children
26
+ }
27
+ );
28
+ }
29
+ var FloatingIconButton_default = FloatingIconButton;
30
+ export {
31
+ FloatingIconButton,
32
+ FloatingIconButton_default as default
33
+ };
34
+ //# sourceMappingURL=FloatingIconButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/FloatingIconButton/FloatingIconButton.tsx"],"sourcesContent":["'use client'\n\nimport type { ButtonHTMLAttributes, ReactNode } from 'react'\nimport { cn } from '../../lib/cn'\nimport { warnBlankName } from '../../lib/warn'\n\nexport interface FloatingIconButtonProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n /**\n * Which bottom corner the control is pinned to, in READING order —\n * `end` is the right in English and the left in Arabic. Naming the sides\n * `left`/`right` would have hard-coded one script's layout into the API.\n */\n position: 'start' | 'end'\n /** Accessible name — the button has no visible text, so this is its only name. */\n label: string\n children: ReactNode\n}\n\n/**\n * Full literal class strings per corner. Tailwind only generates classes it can\n * see verbatim in the source, so the side is never interpolated into a string.\n *\n * The start corner sits higher: browser and OS chrome (a download shelf, a\n * status toast) commonly occupies the corner where reading begins, and the\n * global scroll action keeps the far one.\n */\nconst POSITION_CLASS = { start: 'bottom-20 start-6', end: 'bottom-6 end-6' } as const\n\n/**\n * A round action pinned to a screen corner.\n *\n * A translucent paper ground with a backdrop blur rather than a drop shadow —\n * the White Reset has no elevation ramp, so what separates the control from\n * the page under it is the blur and the hairline, not a glow.\n *\n * @example\n * <FloatingIconButton position=\"right\" label=\"Back to top\" onClick={scrollUp}>\n * <ArrowUp size={16} />\n * </FloatingIconButton>\n */\nexport function FloatingIconButton({\n position,\n label,\n children,\n className,\n ...rest\n}: FloatingIconButtonProps) {\n warnBlankName('FloatingIconButton', 'label', label, 'the button is announced as \"button\" and nothing else')\n return (\n <button\n type=\"button\"\n aria-label={label}\n className={cn(\n 'fixed z-(--z-drawer) flex size-(--control-h-md) items-center justify-center rounded-(--radius-pill) border border-(--rule-2) bg-(--paper)/90 text-(--ink-2) backdrop-blur-sm transition-colors duration-(--duration-fast) hover:border-(--ink) hover:text-(--ink)',\n POSITION_CLASS[position],\n className,\n )}\n {...rest}\n >\n {children}\n </button>\n )\n}\n\nexport default FloatingIconButton\n"],"mappings":";AAkDI;AA/CJ,SAAS,UAAU;AACnB,SAAS,qBAAqB;AAuB9B,MAAM,iBAAiB,EAAE,OAAO,qBAAqB,KAAK,iBAAiB;AAcpE,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAA4B;AAC1B,gBAAc,sBAAsB,SAAS,OAAO,sDAAsD;AAC1G,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAY;AAAA,MACZ,WAAW;AAAA,QACT;AAAA,QACA,eAAe,QAAQ;AAAA,QACvB;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,6BAAQ;","names":[]}
@@ -0,0 +1,62 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
5
+ /**
6
+ * A step on the type ladder, named for the thing it heads.
7
+ *
8
+ * `title` is the top and there is nothing above it — a page has exactly one
9
+ * thing larger than its own records. `label` is not on the size ladder at all:
10
+ * it is the mono kicker, which is what a fifth-level heading should look like,
11
+ * because a serif heading three steps down is indistinguishable from bold body
12
+ * copy.
13
+ */
14
+ type HeadingSize = 'title' | 'lead' | 'heading' | 'sub' | 'item' | 'label';
15
+ interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
16
+ children?: ReactNode;
17
+ /**
18
+ * The element: `1` renders `<h1>`, `6` renders `<h6>`.
19
+ *
20
+ * This is the document outline and nothing else — it is what a screen reader
21
+ * navigates by, so it follows the section the heading opens, never the size
22
+ * it wants to be. A heading two levels down inside an `<h2>` section is an
23
+ * `<h3>` even when the design calls for something enormous.
24
+ */
25
+ level: HeadingLevel;
26
+ /**
27
+ * The size, when the outline and the design genuinely disagree.
28
+ *
29
+ * Defaults from `level` through the ladder above, which is the answer nearly
30
+ * always. Reach for this when a semantically-correct `h3` opens a page and
31
+ * has to look like one — not to squeeze a fourth step between two that are
32
+ * already only 14% apart.
33
+ */
34
+ size?: HeadingSize;
35
+ }
36
+ /**
37
+ * A heading, with its element and its size decided separately.
38
+ *
39
+ * Every heading component that takes one number gets this wrong in one of two
40
+ * directions: either the outline is bent to reach a size (an `<h1>` in the
41
+ * middle of a page because the design wanted big type), or the size is bent to
42
+ * keep the outline (a section title set at 20px because it is the fourth level
43
+ * down). Both are one prop away from being right, so there are two.
44
+ *
45
+ * `level` is the document. `size` is the page. The default binds them through
46
+ * the system's ladder, so writing only `level` is correct — and the moment they
47
+ * come apart, the call site says so.
48
+ *
49
+ * Set in the editorial serif at weight 400, like every heading in the system.
50
+ * It also carries `scroll-margin-top`, so a heading given an `id` and linked
51
+ * from a table of contents comes to rest below the masthead rather than under
52
+ * it.
53
+ *
54
+ * @example
55
+ * <Heading level={1}>The White Reset</Heading>
56
+ * @example
57
+ * // Third level in the outline, page-title sized.
58
+ * <Heading level={3} size="title">Colour</Heading>
59
+ */
60
+ declare function Heading({ children, level, size, className, ...rest }: HeadingProps): react.JSX.Element;
61
+
62
+ export { Heading, type HeadingLevel, type HeadingProps, type HeadingSize, Heading as default };
@@ -0,0 +1,44 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/cn.js";
3
+ const SIZE = {
4
+ title: "text-[length:var(--fs-title)] leading-[1.1] tracking-[-0.02em]",
5
+ lead: "text-[length:var(--fs-lead)] leading-[1.15] tracking-[-0.015em]",
6
+ heading: "text-[length:var(--fs-heading)] leading-[1.2]",
7
+ sub: "text-[length:var(--fs-sub)] leading-[1.25]",
8
+ item: "text-[length:var(--fs-item)] leading-[1.3]",
9
+ // Spelled out rather than reaching for the `eyebrow` utility: it and
10
+ // `font-heading` both set font-family, and a custom utility is invisible to
11
+ // tailwind-merge — so the two would land in the same cascade layer at the
12
+ // same specificity and source order would pick the winner.
13
+ label: "font-(family-name:--label-font) text-[11px] [text-transform:var(--label-case)] leading-[1.6] tracking-[calc(0.2em*var(--label-tracking-scale))] text-(--ink-3-aa)"
14
+ };
15
+ const LADDER = {
16
+ 1: "title",
17
+ 2: "heading",
18
+ 3: "sub",
19
+ 4: "item",
20
+ 5: "label",
21
+ 6: "label"
22
+ };
23
+ function Heading({ children, level, size, className, ...rest }) {
24
+ const Comp = `h${level}`;
25
+ const step = size ?? LADDER[level];
26
+ return /* @__PURE__ */ jsx(
27
+ Comp,
28
+ {
29
+ className: cn(
30
+ "m-0 scroll-mt-[var(--scroll-offset)] font-heading font-normal text-(--ink)",
31
+ SIZE[step],
32
+ className
33
+ ),
34
+ ...rest,
35
+ children
36
+ }
37
+ );
38
+ }
39
+ var Heading_default = Heading;
40
+ export {
41
+ Heading,
42
+ Heading_default as default
43
+ };
44
+ //# sourceMappingURL=Heading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Heading/Heading.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react'\nimport { cn } from '../../lib/cn'\n\nexport type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6\n\n/**\n * A step on the type ladder, named for the thing it heads.\n *\n * `title` is the top and there is nothing above it — a page has exactly one\n * thing larger than its own records. `label` is not on the size ladder at all:\n * it is the mono kicker, which is what a fifth-level heading should look like,\n * because a serif heading three steps down is indistinguishable from bold body\n * copy.\n */\nexport type HeadingSize = 'title' | 'lead' | 'heading' | 'sub' | 'item' | 'label'\n\nconst SIZE: Record<HeadingSize, string> = {\n title: 'text-[length:var(--fs-title)] leading-[1.1] tracking-[-0.02em]',\n lead: 'text-[length:var(--fs-lead)] leading-[1.15] tracking-[-0.015em]',\n heading: 'text-[length:var(--fs-heading)] leading-[1.2]',\n sub: 'text-[length:var(--fs-sub)] leading-[1.25]',\n item: 'text-[length:var(--fs-item)] leading-[1.3]',\n // Spelled out rather than reaching for the `eyebrow` utility: it and\n // `font-heading` both set font-family, and a custom utility is invisible to\n // tailwind-merge — so the two would land in the same cascade layer at the\n // same specificity and source order would pick the winner.\n label: 'font-(family-name:--label-font) text-[11px] [text-transform:var(--label-case)] leading-[1.6] tracking-[calc(0.2em*var(--label-tracking-scale))] text-(--ink-3-aa)',\n}\n\n/**\n * What each level looks like when nobody says otherwise — and the reason this\n * component exists rather than six styled tags.\n *\n * Read the gaps. `1 → title` then `2 → heading` SKIPS `lead`, because the\n * ladder's steps sit close together on purpose: it separates records of the\n * same kind, not a heading from its own sub-heading. `--fs-lead` over\n * `--fs-heading` is a ratio of 1.14 and reads as a rendering accident;\n * `--fs-title` over `--fs-heading` is 1.86 and reads as a hierarchy.\n *\n * So the correct pairing is what a caller gets for free, and stepping off the\n * ladder costs a prop and is visible in review. This is the same map\n * `article.css` applies to rendered Markdown, which is what makes a component\n * page and a post read as one publication.\n */\nconst LADDER: Record<HeadingLevel, HeadingSize> = {\n 1: 'title',\n 2: 'heading',\n 3: 'sub',\n 4: 'item',\n 5: 'label',\n 6: 'label',\n}\n\nexport interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {\n children?: ReactNode\n /**\n * The element: `1` renders `<h1>`, `6` renders `<h6>`.\n *\n * This is the document outline and nothing else — it is what a screen reader\n * navigates by, so it follows the section the heading opens, never the size\n * it wants to be. A heading two levels down inside an `<h2>` section is an\n * `<h3>` even when the design calls for something enormous.\n */\n level: HeadingLevel\n /**\n * The size, when the outline and the design genuinely disagree.\n *\n * Defaults from `level` through the ladder above, which is the answer nearly\n * always. Reach for this when a semantically-correct `h3` opens a page and\n * has to look like one — not to squeeze a fourth step between two that are\n * already only 14% apart.\n */\n size?: HeadingSize\n}\n\n/**\n * A heading, with its element and its size decided separately.\n *\n * Every heading component that takes one number gets this wrong in one of two\n * directions: either the outline is bent to reach a size (an `<h1>` in the\n * middle of a page because the design wanted big type), or the size is bent to\n * keep the outline (a section title set at 20px because it is the fourth level\n * down). Both are one prop away from being right, so there are two.\n *\n * `level` is the document. `size` is the page. The default binds them through\n * the system's ladder, so writing only `level` is correct — and the moment they\n * come apart, the call site says so.\n *\n * Set in the editorial serif at weight 400, like every heading in the system.\n * It also carries `scroll-margin-top`, so a heading given an `id` and linked\n * from a table of contents comes to rest below the masthead rather than under\n * it.\n *\n * @example\n * <Heading level={1}>The White Reset</Heading>\n * @example\n * // Third level in the outline, page-title sized.\n * <Heading level={3} size=\"title\">Colour</Heading>\n */\nexport function Heading({ children, level, size, className, ...rest }: HeadingProps) {\n const Comp = `h${level}` as const\n const step = size ?? LADDER[level]\n\n return (\n <Comp\n className={cn(\n 'm-0 scroll-mt-[var(--scroll-offset)] font-heading font-normal text-(--ink)',\n SIZE[step],\n className,\n )}\n {...rest}\n >\n {children}\n </Comp>\n )\n}\n\nexport default Heading\n"],"mappings":"AAwGI;AAvGJ,SAAS,UAAU;AAenB,MAAM,OAAoC;AAAA,EACxC,OAAO;AAAA,EACP,MAAM;AAAA,EACN,SAAS;AAAA,EACT,KAAK;AAAA,EACL,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA,EAKN,OAAO;AACT;AAiBA,MAAM,SAA4C;AAAA,EAChD,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AACL;AAgDO,SAAS,QAAQ,EAAE,UAAU,OAAO,MAAM,WAAW,GAAG,KAAK,GAAiB;AACnF,QAAM,OAAO,IAAI,KAAK;AACtB,QAAM,OAAO,QAAQ,OAAO,KAAK;AAEjC,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,KAAK,IAAI;AAAA,QACT;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,kBAAQ;","names":[]}
@@ -0,0 +1,22 @@
1
+ import * as react from 'react';
2
+ import { InputHTMLAttributes, Ref } from 'react';
3
+
4
+ interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
5
+ /** Paints the resting border with `--danger` and reflects `aria-invalid`. */
6
+ invalid?: boolean;
7
+ ref?: Ref<HTMLInputElement>;
8
+ }
9
+ /**
10
+ * A single line of text entry.
11
+ *
12
+ * Shares `CONTROL_BASE` with Textarea and Select, so the three cannot drift
13
+ * apart. Pair with `Field` for the label, hint and error — an input with a
14
+ * placeholder and no label is not labelled, because the placeholder disappears
15
+ * the moment anyone types.
16
+ *
17
+ * @example
18
+ * <Field label="Email" htmlFor="email"><Input id="email" type="email" /></Field>
19
+ */
20
+ declare function Input({ invalid, className, ref, 'aria-invalid': ariaInvalid, ...rest }: InputProps): react.JSX.Element;
21
+
22
+ export { Input, type InputProps, Input as default };
@@ -0,0 +1,21 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/cn.js";
3
+ import { CONTROL_BASE, CONTROL_BORDER, isInvalid } from "../../lib/control.js";
4
+ function Input({ invalid, className, ref, "aria-invalid": ariaInvalid, ...rest }) {
5
+ const bad = isInvalid(invalid, ariaInvalid);
6
+ return /* @__PURE__ */ jsx(
7
+ "input",
8
+ {
9
+ ref,
10
+ "aria-invalid": ariaInvalid ?? (invalid ? true : void 0),
11
+ className: cn(CONTROL_BASE, bad ? CONTROL_BORDER.invalid : CONTROL_BORDER.resting, className),
12
+ ...rest
13
+ }
14
+ );
15
+ }
16
+ var Input_default = Input;
17
+ export {
18
+ Input,
19
+ Input_default as default
20
+ };
21
+ //# sourceMappingURL=Input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Input/Input.tsx"],"sourcesContent":["import type { InputHTMLAttributes, Ref } from 'react'\nimport { cn } from '../../lib/cn'\nimport { CONTROL_BASE, CONTROL_BORDER, isInvalid } from '../../lib/control'\n\nexport interface InputProps extends InputHTMLAttributes<HTMLInputElement> {\n /** Paints the resting border with `--danger` and reflects `aria-invalid`. */\n invalid?: boolean\n ref?: Ref<HTMLInputElement>\n}\n\n/**\n * A single line of text entry.\n *\n * Shares `CONTROL_BASE` with Textarea and Select, so the three cannot drift\n * apart. Pair with `Field` for the label, hint and error — an input with a\n * placeholder and no label is not labelled, because the placeholder disappears\n * the moment anyone types.\n *\n * @example\n * <Field label=\"Email\" htmlFor=\"email\"><Input id=\"email\" type=\"email\" /></Field>\n */\nexport function Input({ invalid, className, ref, 'aria-invalid': ariaInvalid, ...rest }: InputProps) {\n const bad = isInvalid(invalid, ariaInvalid)\n return (\n <input\n ref={ref}\n aria-invalid={ariaInvalid ?? (invalid ? true : undefined)}\n className={cn(CONTROL_BASE, bad ? CONTROL_BORDER.invalid : CONTROL_BORDER.resting, className)}\n {...rest}\n />\n )\n}\n\nexport default Input\n"],"mappings":"AAwBI;AAvBJ,SAAS,UAAU;AACnB,SAAS,cAAc,gBAAgB,iBAAiB;AAmBjD,SAAS,MAAM,EAAE,SAAS,WAAW,KAAK,gBAAgB,aAAa,GAAG,KAAK,GAAe;AACnG,QAAM,MAAM,UAAU,SAAS,WAAW;AAC1C,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,gBAAc,gBAAgB,UAAU,OAAO;AAAA,MAC/C,WAAW,GAAG,cAAc,MAAM,eAAe,UAAU,eAAe,SAAS,SAAS;AAAA,MAC3F,GAAG;AAAA;AAAA,EACN;AAEJ;AAEA,IAAO,gBAAQ;","names":[]}
@@ -0,0 +1,27 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+
4
+ interface KbdProps extends HTMLAttributes<HTMLElement> {
5
+ children: ReactNode;
6
+ }
7
+ /**
8
+ * A key on a keyboard, set as one.
9
+ *
10
+ * Renders a `<kbd>`, which is the element that means this — a `<span>` styled
11
+ * to look like a key tells a screen reader nothing. Sized in `em` so it tracks
12
+ * whatever type it sits beside rather than fixing itself at one px value, which
13
+ * is how the same shortcut ended up three different sizes across a page.
14
+ *
15
+ * Every dimension here tracked its context except the leading, which was a
16
+ * literal `1.6` — the body's READING leading, on a chip that is never a
17
+ * paragraph. Inside a control it therefore stood proud of the label beside it
18
+ * and pushed the whole box past its own height token: the masthead's search
19
+ * field measured 39px against a 36px `sm`, and it was this keycap doing it.
20
+ * `--control-lh` is the leading a one-line box gets, and this is one.
21
+ *
22
+ * @example
23
+ * Press <Kbd>⌘</Kbd> <Kbd>K</Kbd> to open the palette.
24
+ */
25
+ declare function Kbd({ children, className, ...rest }: KbdProps): react.JSX.Element;
26
+
27
+ export { Kbd, type KbdProps, Kbd as default };
@@ -0,0 +1,21 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/cn.js";
3
+ function Kbd({ children, className, ...rest }) {
4
+ return /* @__PURE__ */ jsx(
5
+ "kbd",
6
+ {
7
+ className: cn(
8
+ "inline-flex min-w-[1.6em] items-center justify-center rounded-(--radius-sm) border border-(--rule-2) px-[0.4em] py-[0.1em] font-mono text-[0.8em] leading-(--control-lh) text-(--ink-2)",
9
+ className
10
+ ),
11
+ ...rest,
12
+ children
13
+ }
14
+ );
15
+ }
16
+ var Kbd_default = Kbd;
17
+ export {
18
+ Kbd,
19
+ Kbd_default as default
20
+ };
21
+ //# sourceMappingURL=Kbd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Kbd/Kbd.tsx"],"sourcesContent":["import type { HTMLAttributes, ReactNode } from 'react'\nimport { cn } from '../../lib/cn'\n\nexport interface KbdProps extends HTMLAttributes<HTMLElement> {\n children: ReactNode\n}\n\n/**\n * A key on a keyboard, set as one.\n *\n * Renders a `<kbd>`, which is the element that means this — a `<span>` styled\n * to look like a key tells a screen reader nothing. Sized in `em` so it tracks\n * whatever type it sits beside rather than fixing itself at one px value, which\n * is how the same shortcut ended up three different sizes across a page.\n *\n * Every dimension here tracked its context except the leading, which was a\n * literal `1.6` — the body's READING leading, on a chip that is never a\n * paragraph. Inside a control it therefore stood proud of the label beside it\n * and pushed the whole box past its own height token: the masthead's search\n * field measured 39px against a 36px `sm`, and it was this keycap doing it.\n * `--control-lh` is the leading a one-line box gets, and this is one.\n *\n * @example\n * Press <Kbd>⌘</Kbd> <Kbd>K</Kbd> to open the palette.\n */\nexport function Kbd({ children, className, ...rest }: KbdProps) {\n return (\n <kbd\n className={cn(\n 'inline-flex min-w-[1.6em] items-center justify-center rounded-(--radius-sm) border border-(--rule-2) px-[0.4em] py-[0.1em] font-mono text-[0.8em] leading-(--control-lh) text-(--ink-2)',\n className,\n )}\n {...rest}\n >\n {children}\n </kbd>\n )\n}\n\nexport default Kbd\n"],"mappings":"AA2BI;AA1BJ,SAAS,UAAU;AAwBZ,SAAS,IAAI,EAAE,UAAU,WAAW,GAAG,KAAK,GAAa;AAC9D,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,cAAQ;","names":[]}
@@ -0,0 +1,24 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes } from 'react';
3
+
4
+ /** The glyph itself, exported so a non-React surface can use the same mark. */
5
+ declare const EXTERNAL_LINK_ARROW = "\u2197";
6
+ type LinkArrowProps = HTMLAttributes<HTMLSpanElement>;
7
+ /**
8
+ * The mark on a link that leaves the page — outbound, or on to a full index.
9
+ *
10
+ * Call sites used to write a bare `↗` inside the link text, which inherited the
11
+ * link's own size (a 17px arrow beside a 17px word, competing with it) and was
12
+ * read aloud as "north east arrow" because nothing hid it.
13
+ *
14
+ * `inline-block` is load-bearing twice over: it stops an underlined parent
15
+ * drawing its rule through the glyph, and it is what `align` is measured
16
+ * against. Sized in `em`, so it tracks whatever type it sits beside; coloured
17
+ * against paper, so a call site on a reversed plate passes its own colour.
18
+ *
19
+ * @example
20
+ * <a href="https://example.com">Read the paper<LinkArrow /></a>
21
+ */
22
+ declare function LinkArrow({ className, ...rest }: LinkArrowProps): react.JSX.Element;
23
+
24
+ export { EXTERNAL_LINK_ARROW, LinkArrow, type LinkArrowProps, LinkArrow as default };
@@ -0,0 +1,24 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../../lib/cn.js";
3
+ const EXTERNAL_LINK_ARROW = "\u2197";
4
+ function LinkArrow({ className, ...rest }) {
5
+ return /* @__PURE__ */ jsx(
6
+ "span",
7
+ {
8
+ "aria-hidden": "true",
9
+ className: cn(
10
+ "ms-[0.22em] inline-block align-[0.28em] font-mono text-[0.68em] leading-none text-(--ink-3-aa)",
11
+ className
12
+ ),
13
+ ...rest,
14
+ children: EXTERNAL_LINK_ARROW
15
+ }
16
+ );
17
+ }
18
+ var LinkArrow_default = LinkArrow;
19
+ export {
20
+ EXTERNAL_LINK_ARROW,
21
+ LinkArrow,
22
+ LinkArrow_default as default
23
+ };
24
+ //# sourceMappingURL=LinkArrow.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/LinkArrow/LinkArrow.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react'\nimport { cn } from '../../lib/cn'\n\n/** The glyph itself, exported so a non-React surface can use the same mark. */\nexport const EXTERNAL_LINK_ARROW = '↗'\n\nexport type LinkArrowProps = HTMLAttributes<HTMLSpanElement>\n\n/**\n * The mark on a link that leaves the page — outbound, or on to a full index.\n *\n * Call sites used to write a bare `↗` inside the link text, which inherited the\n * link's own size (a 17px arrow beside a 17px word, competing with it) and was\n * read aloud as \"north east arrow\" because nothing hid it.\n *\n * `inline-block` is load-bearing twice over: it stops an underlined parent\n * drawing its rule through the glyph, and it is what `align` is measured\n * against. Sized in `em`, so it tracks whatever type it sits beside; coloured\n * against paper, so a call site on a reversed plate passes its own colour.\n *\n * @example\n * <a href=\"https://example.com\">Read the paper<LinkArrow /></a>\n */\nexport function LinkArrow({ className, ...rest }: LinkArrowProps) {\n return (\n <span\n aria-hidden=\"true\"\n className={cn(\n 'ms-[0.22em] inline-block align-[0.28em] font-mono text-[0.68em] leading-none text-(--ink-3-aa)',\n className,\n )}\n {...rest}\n >\n {EXTERNAL_LINK_ARROW}\n </span>\n )\n}\n\nexport default LinkArrow\n"],"mappings":"AAyBI;AAxBJ,SAAS,UAAU;AAGZ,MAAM,sBAAsB;AAmB5B,SAAS,UAAU,EAAE,WAAW,GAAG,KAAK,GAAmB;AAChE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEH;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,oBAAQ;","names":[]}
@@ -0,0 +1,139 @@
1
+ import * as react from 'react';
2
+ import { MarkdownHeadingLevel, MarkdownNode } from './nodes.js';
3
+ export { MarkdownInline } from './nodes.js';
4
+ export { parseMarkdown } from './parse.js';
5
+ export { slugify } from './slug.js';
6
+
7
+ interface MarkdownProps {
8
+ /** The Markdown source. A string — not nodes, not HTML. */
9
+ children: string;
10
+ /**
11
+ * The level the document's top heading renders at.
12
+ *
13
+ * Markdown is written as a document, so its `#` is an `<h1>`. Dropped into a
14
+ * page that already has one — inside an `<h2>` section, in a card, under a
15
+ * dialog's title — that produces two first-level headings and an outline a
16
+ * screen reader cannot navigate. Set this to the level BELOW the heading the
17
+ * content sits under, and every level in the document shifts with it.
18
+ */
19
+ headingLevelStart?: MarkdownHeadingLevel;
20
+ /**
21
+ * Namespaces the generated heading ids.
22
+ *
23
+ * Two documents on one page both containing "Installation" would otherwise
24
+ * both claim `#installation`, and a fragment link would land on whichever the
25
+ * browser found first.
26
+ */
27
+ idPrefix?: string;
28
+ /**
29
+ * Adds the system's outbound arrow to links that leave for another site.
30
+ *
31
+ * Off by default, and opt-in rather than automatic for two reasons. The mark
32
+ * is an addition to a sentence the component did not write, which is a
33
+ * different kind of act from styling one. And `Markdown` has no idea what
34
+ * origin it is being rendered on, so "leaves for another site" can only mean
35
+ * "carries an `http`/`https` scheme" — an absolute link back to your own
36
+ * domain gets the arrow too. A caller who knows the shape of their content
37
+ * turns it on; one who does not should not have it turned on for them.
38
+ *
39
+ * The `rel` on an outbound link is NOT opt-in and cannot be turned off: it
40
+ * is the security half of the same boundary as the scheme check.
41
+ */
42
+ markExternalLinks?: boolean;
43
+ /**
44
+ * Bring your own parser.
45
+ *
46
+ * Anything that turns the source into `MarkdownNode`s: markdown-it, remark,
47
+ * or a pipeline that already has an AST and only needs mapping. The node
48
+ * shapes are exported alongside the component as `MarkdownNode`,
49
+ * `MarkdownInline` and `MarkdownHeadingLevel`. The built-in parser covers the
50
+ * subset this system styles; this is the seam for tables, footnotes, task
51
+ * lists and everything else.
52
+ */
53
+ parse?: (source: string) => MarkdownNode[];
54
+ }
55
+ /**
56
+ * A Markdown string, rendered as this system's components.
57
+ *
58
+ * The gap it fills is content nobody on this side wrote: a comment, a README, a
59
+ * model's answer, a description out of a database. `Article` cannot take those
60
+ * — it renders HTML through `dangerouslySetInnerHTML` and is documented as
61
+ * trusted-input-only — and until now the alternative was a `<pre>` or a
62
+ * sanitiser bolted onto a styling primitive.
63
+ *
64
+ * IT IS NOT AN `Article`, and the two do not merge. `Markdown` turns a string
65
+ * into nodes; `Article` is the reading column those nodes can sit in. It
66
+ * renders a FRAGMENT rather than a wrapper, which is what makes that nesting
67
+ * work — `Article`'s rhythm is a direct-child combinator, so any element
68
+ * between the two, `display: contents` included, would cost every paragraph
69
+ * its spacing.
70
+ *
71
+ * ── It brings type and colour, and no vertical rhythm ──
72
+ *
73
+ * The nodes carry the system's faces and inks on their own, so one of these
74
+ * looks right in isolation. It is not SPACED in isolation: every node renders
75
+ * `m-0`, and a fragment has no box of its own to put a gap in. Nor does a
76
+ * uniform `gap` on a container reproduce it, because prose spacing is not
77
+ * uniform — `article.css` gives a heading 2.25em above and 0.75em below, which
78
+ * is what sits a heading with the paragraph it introduces rather than midway
79
+ * between two. For anything longer than a sentence — a comment, an answer, a
80
+ * README — put it in `<Article as="div">` and get the real rhythm for the cost
81
+ * of one element.
82
+ *
83
+ * ── A fenced code block brings a client component with it ──
84
+ *
85
+ * The renderer is plain functions and has no state, but a fenced block renders
86
+ * `CodeBlock`, which is `'use client'` and arrives with `useState`,
87
+ * `useEffect` and two icons. That is correct — the copy button is the reason
88
+ * the block exists — but "server-rendered" only holds for content with no code
89
+ * in it, which is worth knowing before this goes into a route that has no
90
+ * client bundle yet.
91
+ *
92
+ * ── Why there is no parser in `dependencies` ──
93
+ *
94
+ * Three options, and the decision is written here because it is the one a
95
+ * reader will want to argue with.
96
+ *
97
+ * 1. BUNDLE A PARSER. markdown-it is the obvious pick, and the documentation
98
+ * site already depends on it — but the site is an app and this is a
99
+ * library, where the dependency list is part of the contract every consumer
100
+ * signs. Measured with the same esbuild pass `check:size` uses, markdown-it
101
+ * is 110.7 kB minified against the 38.9 kB this package had left under its
102
+ * bundle budget. It is not close, and "we will raise the budget" is how a
103
+ * design system becomes the largest thing on a page.
104
+ * 2. TAKE PRE-PARSED HTML, the way `Article` does. Cheapest, and wrong for the
105
+ * case this exists for: HTML from an untrusted author is the input this is
106
+ * supposed to make safe, and it cannot carry `headingLevelStart` or stable
107
+ * heading ids without the component parsing markup back apart to find them.
108
+ * 3. PARSE THE SUBSET WE STYLE, and take a `parse` function for the rest.
109
+ * Chosen. The block grammar is line-based and small (see `parse.ts`), it
110
+ * emits React elements rather than markup — so there is no
111
+ * `dangerouslySetInnerHTML` in this path at all, no sanitiser to configure
112
+ * and no sanitiser to get wrong — and a consumer who needs tables,
113
+ * footnotes or task lists passes `parse` and keeps every other promise the
114
+ * component makes.
115
+ *
116
+ * Headings carry an `id` slugged from their own text and deduplicated within
117
+ * the document, so a table of contents can link to them without the caller
118
+ * post-processing the DOM to find out where they went.
119
+ *
120
+ * A link in the source is validated here, at the boundary: a scheme that is not
121
+ * `http`, `https`, `mailto` or `tel` never becomes a link, and one that leaves
122
+ * for another site carries `rel="noreferrer nofollow"` — so an author the page
123
+ * does not trust cannot spend its ranking or read its URL out of the `Referer`.
124
+ *
125
+ * @example
126
+ * // A comment body or an answer: the reading column is what spaces it.
127
+ * <Article as="div">
128
+ * <Markdown headingLevelStart={3} idPrefix="answer">{answer}</Markdown>
129
+ * </Article>
130
+ * @example
131
+ * // A whole document, in the column it was written for.
132
+ * <Article><Markdown>{readme}</Markdown></Article>
133
+ * @example
134
+ * // Tables and footnotes, via the consumer's own pipeline.
135
+ * <Markdown parse={(source) => toMarkdownNodes(md.parse(source, {}))}>{post}</Markdown>
136
+ */
137
+ declare function Markdown({ children, headingLevelStart, idPrefix, markExternalLinks, parse, }: MarkdownProps): react.JSX.Element;
138
+
139
+ export { Markdown, MarkdownHeadingLevel, MarkdownNode, type MarkdownProps, Markdown as default };
@@ -0,0 +1,135 @@
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Fragment } from "react";
3
+ import { Code } from "../Code/Code.js";
4
+ import { CodeBlock } from "../CodeBlock/CodeBlock.js";
5
+ import { Heading } from "../Heading/Heading.js";
6
+ import { LinkArrow } from "../LinkArrow/LinkArrow.js";
7
+ import { Separator } from "../Separator/Separator.js";
8
+ import { Text } from "../Text/Text.js";
9
+ import { isOutbound } from "./inline.js";
10
+ import { parseMarkdown } from "./parse.js";
11
+ import { slugify } from "./slug.js";
12
+ import { parseMarkdown as parseMarkdown2 } from "./parse.js";
13
+ import { slugify as slugify2 } from "./slug.js";
14
+ function textOf(nodes) {
15
+ return nodes.map((node) => {
16
+ if (node.type === "text" || node.type === "code") return node.value;
17
+ if (node.type === "image") return node.alt;
18
+ return textOf(node.children);
19
+ }).join("");
20
+ }
21
+ function headingId(text, context) {
22
+ const base = slugify(text) || "section";
23
+ const seen = (context.taken.get(base) ?? 0) + 1;
24
+ context.taken.set(base, seen);
25
+ const id = seen === 1 ? base : `${base}-${seen}`;
26
+ return context.idPrefix ? `${context.idPrefix}-${id}` : id;
27
+ }
28
+ function renderInline(node, key, context) {
29
+ switch (node.type) {
30
+ case "text":
31
+ return node.value;
32
+ case "code":
33
+ return /* @__PURE__ */ jsx(Code, { children: node.value }, key);
34
+ case "strong":
35
+ return /* @__PURE__ */ jsx("strong", { className: "font-medium text-(--ink)", children: node.children.map((child, index) => renderInline(child, index, context)) }, key);
36
+ case "emphasis":
37
+ return /* @__PURE__ */ jsx("em", { className: "italic", children: node.children.map((child, index) => renderInline(child, index, context)) }, key);
38
+ case "image":
39
+ return /* @__PURE__ */ jsx(
40
+ "img",
41
+ {
42
+ src: node.src,
43
+ alt: node.alt,
44
+ loading: "lazy",
45
+ className: "h-auto max-w-full rounded-(--radius)"
46
+ },
47
+ key
48
+ );
49
+ case "link": {
50
+ const outbound = isOutbound(node.href);
51
+ return /* @__PURE__ */ jsxs(
52
+ "a",
53
+ {
54
+ href: node.href,
55
+ rel: outbound ? "noreferrer nofollow" : void 0,
56
+ className: "text-(--ink) underline decoration-[var(--rule-2)] underline-offset-4 transition-[text-decoration-color] duration-(--duration-fast) hover:decoration-[var(--ink)]",
57
+ children: [
58
+ node.children.map((child, index) => renderInline(child, index, context)),
59
+ outbound && context.markExternalLinks ? /* @__PURE__ */ jsx(LinkArrow, {}) : null
60
+ ]
61
+ },
62
+ key
63
+ );
64
+ }
65
+ }
66
+ }
67
+ function renderItem(blocks, key, context) {
68
+ const first = blocks[0];
69
+ const only = blocks.length === 1 && first?.type === "paragraph" ? first : void 0;
70
+ return /* @__PURE__ */ jsx("li", { className: "relative", children: only ? only.children.map((child, i) => renderInline(child, i, context)) : blocks.map((block, i) => renderBlock(block, i, context)) }, key);
71
+ }
72
+ function renderBlock(node, key, context) {
73
+ switch (node.type) {
74
+ case "heading": {
75
+ const level = Math.min(6, node.level + context.headingLevelStart - 1);
76
+ return /* @__PURE__ */ jsx(Heading, { level, id: headingId(textOf(node.children), context), children: node.children.map((child, index) => renderInline(child, index, context)) }, key);
77
+ }
78
+ case "paragraph":
79
+ return /* @__PURE__ */ jsx(Text, { children: node.children.map((child, index) => renderInline(child, index, context)) }, key);
80
+ case "code":
81
+ return /* @__PURE__ */ jsx(CodeBlock, { code: node.value, lang: node.lang }, key);
82
+ case "rule":
83
+ return /* @__PURE__ */ jsx(Separator, { weight: "edge", decorative: false }, key);
84
+ case "quote":
85
+ return /* @__PURE__ */ jsx(
86
+ "blockquote",
87
+ {
88
+ className: "m-0 border-s-2 border-(--rule-hard) ps-[1.25em] font-serif text-[length:var(--fs-item)] leading-[1.55] text-(--ink) [&>*+*]:mt-[0.6em]",
89
+ children: node.children.map((child, i) => renderBlock(child, i, context))
90
+ },
91
+ key
92
+ );
93
+ case "list":
94
+ return node.ordered ? /* @__PURE__ */ jsx(
95
+ "ol",
96
+ {
97
+ className: "m-0 list-decimal ps-[1.4em] text-(--ink-2) marker:text-(--ink-3-aa) [&>li+li]:mt-[0.4em]",
98
+ children: node.items.map((item, i) => renderItem(item, i, context))
99
+ },
100
+ key
101
+ ) : (
102
+ // The marker is a hairline dash drawn on `::before`, not a disc: the
103
+ // system's only filled circle is a status dot. `article.css` draws the
104
+ // same dash on the same pseudo-element, so markdown dropped into an
105
+ // Article coincides with the stylesheet rather than doubling it.
106
+ /* @__PURE__ */ jsx(
107
+ "ul",
108
+ {
109
+ className: "m-0 list-none ps-[1.15em] text-(--ink-2) [&>li+li]:mt-[0.4em] [&>li]:before:absolute [&>li]:before:start-[-1.15em] [&>li]:before:top-[0.85em] [&>li]:before:h-px [&>li]:before:w-[0.55em] [&>li]:before:bg-(--rule-2) [&>li]:before:content-['']",
110
+ children: node.items.map((item, i) => renderItem(item, i, context))
111
+ },
112
+ key
113
+ )
114
+ );
115
+ }
116
+ }
117
+ function Markdown({
118
+ children,
119
+ headingLevelStart = 1,
120
+ idPrefix,
121
+ markExternalLinks = false,
122
+ parse = parseMarkdown
123
+ }) {
124
+ const context = { headingLevelStart, idPrefix, markExternalLinks, taken: /* @__PURE__ */ new Map() };
125
+ const nodes = typeof children === "string" ? parse(children) : [];
126
+ return /* @__PURE__ */ jsx(Fragment, { children: nodes.map((node, index) => renderBlock(node, index, context)) });
127
+ }
128
+ var Markdown_default = Markdown;
129
+ export {
130
+ Markdown,
131
+ Markdown_default as default,
132
+ parseMarkdown2 as parseMarkdown,
133
+ slugify2 as slugify
134
+ };
135
+ //# sourceMappingURL=Markdown.js.map