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