@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
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The five diagram specifications, and the vocabulary they share.
|
|
3
|
+
*
|
|
4
|
+
* These types mirror the JSON schemas published by
|
|
5
|
+
* [archify](https://github.com/tt-a1i/archify) — `architecture`, `workflow`,
|
|
6
|
+
* `sequence`, `dataflow` and `lifecycle` — so a specification authored for that
|
|
7
|
+
* tool renders here without a translation step. That compatibility is the whole
|
|
8
|
+
* point of copying somebody else's field names: an agent that already knows how
|
|
9
|
+
* to write `{ "diagram_type": "architecture", "components": [...] }` can hand
|
|
10
|
+
* the same object to a React component and get the system's own look back.
|
|
11
|
+
*
|
|
12
|
+
* WHAT IS DELIBERATELY NOT HERE: archify's routing micro-controls. `via`,
|
|
13
|
+
* `channelX`, `channelY`, `labelAt`, `labelSegment` and `bias` exist there to
|
|
14
|
+
* let an author nudge a line after a validator complains about a collision.
|
|
15
|
+
* They are accepted below so a specification carrying them still typechecks,
|
|
16
|
+
* and each one says on its own field whether it is applied: `via` and the two
|
|
17
|
+
* channels are, but only between two nodes placed with `pos`; the three label
|
|
18
|
+
* nudges never are. They are hints, not a contract, and a figure that needs
|
|
19
|
+
* many of them is a figure that wants fewer edges.
|
|
20
|
+
*
|
|
21
|
+
* Every position in every type is EXPLICIT — a row and a column, a lane and a
|
|
22
|
+
* step, a participant and a y. Nothing below is solved for. That is what makes
|
|
23
|
+
* these figures server-renderable: layout is arithmetic on numbers the
|
|
24
|
+
* specification already carries, not a simulation that has to settle.
|
|
25
|
+
*/
|
|
26
|
+
/** A point in the figure's own user-unit space. */
|
|
27
|
+
type Point = [x: number, y: number];
|
|
28
|
+
/** Which face of a box a line leaves from or arrives at. */
|
|
29
|
+
type Side = 'left' | 'right' | 'top' | 'bottom';
|
|
30
|
+
/**
|
|
31
|
+
* What a node IS, across every diagram type that has nodes.
|
|
32
|
+
*
|
|
33
|
+
* Seven kinds, and in a monochrome system none of them is a colour. Each is
|
|
34
|
+
* drawn as a distinct sigil in the node's leading corner — a cylinder for a
|
|
35
|
+
* database, a shield for a security boundary, rails and ticks for a queue — so
|
|
36
|
+
* the kind survives a greyscale print, a colour-blind reader, and the system's
|
|
37
|
+
* own rule that the only chroma left is bound to state.
|
|
38
|
+
*/
|
|
39
|
+
type NodeKind = 'frontend' | 'backend' | 'database' | 'cloud' | 'security' | 'messagebus' | 'external';
|
|
40
|
+
/**
|
|
41
|
+
* How much a relationship or a node is being insisted upon.
|
|
42
|
+
*
|
|
43
|
+
* `emphasis` reverses the plate; `security` dashes the frame and doubles the
|
|
44
|
+
* rule; `dashed` is the quiet one — an optional path, an asynchronous hop.
|
|
45
|
+
*/
|
|
46
|
+
type Variant = 'default' | 'emphasis' | 'security' | 'dashed';
|
|
47
|
+
/** How a line gets from one box to another. */
|
|
48
|
+
type RouteMode = 'auto' | 'straight' | 'orthogonal-h' | 'orthogonal-v';
|
|
49
|
+
/** Whether the key beside the figure names every kind, only the used ones, or none. */
|
|
50
|
+
type LegendMode = 'auto' | 'all' | 'hidden';
|
|
51
|
+
/**
|
|
52
|
+
* One curated stop in a guided reading of the figure.
|
|
53
|
+
*
|
|
54
|
+
* At most five, which is archify's cap and a good one: a sixth chapter is a
|
|
55
|
+
* second diagram wearing the first one's clothes.
|
|
56
|
+
*/
|
|
57
|
+
interface DiagramView {
|
|
58
|
+
id: string;
|
|
59
|
+
label: string;
|
|
60
|
+
/** Node ids this chapter lights. */
|
|
61
|
+
focus: string[];
|
|
62
|
+
note?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* A conclusion card printed under the figure.
|
|
66
|
+
*
|
|
67
|
+
* `dot` names a hue in archify's palette. Here it selects a MARK — a filled
|
|
68
|
+
* square, a ring, a bar — rather than a colour, so seven cards in a row are
|
|
69
|
+
* still seven distinguishable cards on paper-white.
|
|
70
|
+
*/
|
|
71
|
+
interface DiagramCard {
|
|
72
|
+
dot: 'cyan' | 'emerald' | 'violet' | 'amber' | 'rose' | 'orange' | 'slate';
|
|
73
|
+
title: string;
|
|
74
|
+
items: string[];
|
|
75
|
+
}
|
|
76
|
+
/** What every specification says about itself. */
|
|
77
|
+
interface DiagramMeta {
|
|
78
|
+
title: string;
|
|
79
|
+
subtitle?: string;
|
|
80
|
+
/**
|
|
81
|
+
* The extent the author's own renderer came out at.
|
|
82
|
+
*
|
|
83
|
+
* Accepted so a specification carrying it still typechecks, and deliberately
|
|
84
|
+
* NOT applied. It describes archify's layout — a different grid, different
|
|
85
|
+
* column widths, a different plate height — so on any figure placed from
|
|
86
|
+
* lanes and columns it is simply the wrong rectangle: too small and it crops
|
|
87
|
+
* the last participants off the edge, too large and it hangs a band of dead
|
|
88
|
+
* paper under the diagram. The extent here is computed from the marks
|
|
89
|
+
* actually drawn, which is the only number that can be right.
|
|
90
|
+
*/
|
|
91
|
+
viewBox?: [number, number] | [number, number, number, number];
|
|
92
|
+
legend?: {
|
|
93
|
+
mode?: LegendMode;
|
|
94
|
+
entries?: Record<string, {
|
|
95
|
+
label?: string;
|
|
96
|
+
visible?: boolean;
|
|
97
|
+
}>;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* A guided reading, and no renderer here reads it.
|
|
101
|
+
*
|
|
102
|
+
* Accepted for the same reason `viewBox` is — an archify document carrying
|
|
103
|
+
* chapters still typechecks — and not applied for a different one: chapters
|
|
104
|
+
* are a CONTROL, not a layout. Lighting one means changing what is lit while
|
|
105
|
+
* a reader walks through them, and a figure that owned that state would be a
|
|
106
|
+
* figure with a hidden step counter, a second source of truth about what is
|
|
107
|
+
* selected, and no way for the page's own next/previous buttons to agree
|
|
108
|
+
* with it.
|
|
109
|
+
*
|
|
110
|
+
* So the chapters stay the caller's: hold the index, hand the chapter's
|
|
111
|
+
* `focus` ids to `activeIds`, and the figure dims everything else and
|
|
112
|
+
* announces how many are lit. That is the whole of what a renderer could
|
|
113
|
+
* have done, in a place a page can also put a heading and a caption.
|
|
114
|
+
*/
|
|
115
|
+
views?: DiagramView[];
|
|
116
|
+
}
|
|
117
|
+
/** Where a node's facts came from, when the figure was built against real code. */
|
|
118
|
+
interface SourceRef {
|
|
119
|
+
path: string;
|
|
120
|
+
line?: number;
|
|
121
|
+
end_line?: number;
|
|
122
|
+
label?: string;
|
|
123
|
+
}
|
|
124
|
+
/** The fields every drawn box carries, whatever the diagram type calls it. */
|
|
125
|
+
interface NodeBase {
|
|
126
|
+
id: string;
|
|
127
|
+
label: string;
|
|
128
|
+
/** One short line under the label — what it is, a step back. */
|
|
129
|
+
sublabel?: string;
|
|
130
|
+
/** A mono chip on the box: a version, a region, a protocol. */
|
|
131
|
+
tag?: string;
|
|
132
|
+
/** How wide and tall this box is, when the type's default does not suit it. */
|
|
133
|
+
width?: number;
|
|
134
|
+
height?: number;
|
|
135
|
+
}
|
|
136
|
+
/** The fields every drawn line carries. */
|
|
137
|
+
interface EdgeBase {
|
|
138
|
+
id?: string;
|
|
139
|
+
from: string;
|
|
140
|
+
to: string;
|
|
141
|
+
label?: string;
|
|
142
|
+
variant?: Variant;
|
|
143
|
+
fromSide?: Side;
|
|
144
|
+
toSide?: Side;
|
|
145
|
+
route?: RouteMode | string;
|
|
146
|
+
/**
|
|
147
|
+
* Waypoints the line is dragged through, in order.
|
|
148
|
+
*
|
|
149
|
+
* Honoured only when BOTH endpoints were placed with `pos` — see
|
|
150
|
+
* `Wire.keepWaypoints`. A waypoint is a coordinate in the space the author's
|
|
151
|
+
* nodes were placed in, and on a lane-and-column grid that space is one this
|
|
152
|
+
* renderer chose, not one the author saw.
|
|
153
|
+
*/
|
|
154
|
+
via?: Point[];
|
|
155
|
+
/**
|
|
156
|
+
* Where the label goes, and where it is nudged to — accepted, never applied.
|
|
157
|
+
*
|
|
158
|
+
* These three are collision repairs authored against archify's router and
|
|
159
|
+
* measured in the positions THAT router produced. This one does not produce
|
|
160
|
+
* the same collisions, so honouring them moves labels off clear ground and
|
|
161
|
+
* onto the nodes they were nudged away from. Dropping the nudge and keeping
|
|
162
|
+
* the wording is the reading that preserves the meaning; the fields stay so
|
|
163
|
+
* a specification carrying them still typechecks.
|
|
164
|
+
*/
|
|
165
|
+
labelAt?: Point;
|
|
166
|
+
labelDx?: number;
|
|
167
|
+
labelDy?: number;
|
|
168
|
+
/** Forces an orthogonal run through a fixed coordinate. */
|
|
169
|
+
channelX?: number;
|
|
170
|
+
channelY?: number;
|
|
171
|
+
/** Stroke weight, in user units. */
|
|
172
|
+
width?: number;
|
|
173
|
+
}
|
|
174
|
+
interface ArchitectureComponent extends NodeBase {
|
|
175
|
+
type: NodeKind;
|
|
176
|
+
/**
|
|
177
|
+
* Grid placement. Ignored when `pos` is given.
|
|
178
|
+
*
|
|
179
|
+
* Declaring NEITHER is also a placement: the component takes the next free
|
|
180
|
+
* cell in declaration order, wrapping at `layout.cols`. A missing one of the
|
|
181
|
+
* two still reads as 0, so `{ col: 2 }` is row 0, column 2.
|
|
182
|
+
*/
|
|
183
|
+
row?: number;
|
|
184
|
+
col?: number;
|
|
185
|
+
/** Absolute placement, in user units, overriding the grid. */
|
|
186
|
+
pos?: Point;
|
|
187
|
+
/**
|
|
188
|
+
* `[width, height]`, which is how archify's architecture schema spells it.
|
|
189
|
+
*
|
|
190
|
+
* Accepted alongside the `width` / `height` pair every other diagram type
|
|
191
|
+
* uses, and it wins when both are given. Two spellings for one fact is not a
|
|
192
|
+
* design — it is the cost of reading somebody else's file format without
|
|
193
|
+
* making its authors edit their files.
|
|
194
|
+
*/
|
|
195
|
+
size?: [number, number];
|
|
196
|
+
sources?: SourceRef[];
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* A frame drawn around several components.
|
|
200
|
+
*
|
|
201
|
+
* `region` is a deployment boundary — an availability zone, a VPC, a cluster.
|
|
202
|
+
* `security-group` is a trust boundary, and is drawn dashed for that reason: a
|
|
203
|
+
* reader should be able to see which line is about where a thing runs and which
|
|
204
|
+
* is about what may reach it, without reading either label.
|
|
205
|
+
*/
|
|
206
|
+
interface ArchitectureBoundary {
|
|
207
|
+
kind: 'region' | 'security-group';
|
|
208
|
+
label: string;
|
|
209
|
+
/** Component ids this frame encloses. */
|
|
210
|
+
wraps: string[];
|
|
211
|
+
/** Clear space between the frame and the boxes it holds. */
|
|
212
|
+
pad?: number;
|
|
213
|
+
}
|
|
214
|
+
interface ArchitectureSpec {
|
|
215
|
+
diagram_type?: 'architecture';
|
|
216
|
+
meta: DiagramMeta;
|
|
217
|
+
layout?: {
|
|
218
|
+
origin?: Point;
|
|
219
|
+
/** How many columns the flow wraps at, for components with no row or col. */
|
|
220
|
+
cols?: number;
|
|
221
|
+
gapX?: number;
|
|
222
|
+
gapY?: number;
|
|
223
|
+
/** A cell's width, which is also the width of the plates drawn in it. */
|
|
224
|
+
cellW?: number;
|
|
225
|
+
cellH?: number;
|
|
226
|
+
};
|
|
227
|
+
components: ArchitectureComponent[];
|
|
228
|
+
boundaries?: ArchitectureBoundary[];
|
|
229
|
+
connections?: EdgeBase[];
|
|
230
|
+
cards?: DiagramCard[];
|
|
231
|
+
}
|
|
232
|
+
/** A horizontal band: who or what performs the steps in it. */
|
|
233
|
+
interface WorkflowLane {
|
|
234
|
+
id: string;
|
|
235
|
+
label: string;
|
|
236
|
+
/** `exception` bands hold the failure path and are drawn on a washed ground. */
|
|
237
|
+
variant?: 'normal' | 'exception';
|
|
238
|
+
}
|
|
239
|
+
/** A vertical band across every lane: a stage of the process. */
|
|
240
|
+
interface WorkflowPhase {
|
|
241
|
+
id: string;
|
|
242
|
+
label: string;
|
|
243
|
+
/** The columns this phase claims. The header rule is drawn across them. */
|
|
244
|
+
fromCol: number;
|
|
245
|
+
toCol: number;
|
|
246
|
+
/** `security` and `dashed` dash the phase's rule; `emphasis` thickens it. */
|
|
247
|
+
variant?: Variant;
|
|
248
|
+
}
|
|
249
|
+
/** A frame around a run of columns inside ONE lane. */
|
|
250
|
+
interface WorkflowGroup extends WorkflowPhase {
|
|
251
|
+
lane: string;
|
|
252
|
+
}
|
|
253
|
+
interface WorkflowNode extends NodeBase {
|
|
254
|
+
lane: string;
|
|
255
|
+
col: number;
|
|
256
|
+
type?: NodeKind;
|
|
257
|
+
/** Nudges this box off its row's centre line, for a branch that needs room. */
|
|
258
|
+
yOffset?: number;
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* What a line MEANS in a process, which is not the same question as how it is
|
|
262
|
+
* drawn.
|
|
263
|
+
*
|
|
264
|
+
* `main` is the path the reader should be able to follow without thinking;
|
|
265
|
+
* `branch` leaves it and comes back; `async` does not block; `return` goes
|
|
266
|
+
* backwards; `error` leaves for the exception lane.
|
|
267
|
+
*
|
|
268
|
+
* Three of them reach the drawing on their own: `async` and `error` take the
|
|
269
|
+
* quiet dashed line, and `return` takes an open arrowhead. `main` and `branch`
|
|
270
|
+
* do not, because `mainPath` already draws that distinction as weight. An
|
|
271
|
+
* explicit `variant` overrides any of it.
|
|
272
|
+
*/
|
|
273
|
+
type WorkflowEdgeRole = 'main' | 'branch' | 'async' | 'return' | 'error';
|
|
274
|
+
interface WorkflowEdge extends EdgeBase {
|
|
275
|
+
role?: WorkflowEdgeRole;
|
|
276
|
+
}
|
|
277
|
+
interface WorkflowSpec {
|
|
278
|
+
diagram_type?: 'workflow';
|
|
279
|
+
schema_version?: 1 | 2;
|
|
280
|
+
meta: DiagramMeta;
|
|
281
|
+
lanes: WorkflowLane[];
|
|
282
|
+
phases?: WorkflowPhase[];
|
|
283
|
+
groups?: WorkflowGroup[];
|
|
284
|
+
nodes: WorkflowNode[];
|
|
285
|
+
edges?: WorkflowEdge[];
|
|
286
|
+
/** Node ids on the path a reader should follow first. Drawn heavier. */
|
|
287
|
+
mainPath?: string[];
|
|
288
|
+
cards?: DiagramCard[];
|
|
289
|
+
}
|
|
290
|
+
interface SequenceParticipant extends NodeBase {
|
|
291
|
+
type?: NodeKind;
|
|
292
|
+
}
|
|
293
|
+
/** A labelled horizontal band across the whole figure: a phase of the exchange. */
|
|
294
|
+
interface SequenceSegment {
|
|
295
|
+
from: number;
|
|
296
|
+
to: number;
|
|
297
|
+
label: string;
|
|
298
|
+
}
|
|
299
|
+
interface SequenceMessage {
|
|
300
|
+
id?: string;
|
|
301
|
+
from: string;
|
|
302
|
+
to: string;
|
|
303
|
+
/** Where this message sits on the vertical time axis, in user units. */
|
|
304
|
+
y: number;
|
|
305
|
+
label?: string;
|
|
306
|
+
/** `return` is drawn dashed with an open head — a reply, not a call. */
|
|
307
|
+
variant?: Variant | 'return';
|
|
308
|
+
note?: string;
|
|
309
|
+
}
|
|
310
|
+
/** A bar on a lifeline: this participant is busy for this span of the axis. */
|
|
311
|
+
interface SequenceActivation {
|
|
312
|
+
participant: string;
|
|
313
|
+
from: number;
|
|
314
|
+
to: number;
|
|
315
|
+
type?: NodeKind;
|
|
316
|
+
}
|
|
317
|
+
interface SequenceSpec {
|
|
318
|
+
diagram_type?: 'sequence';
|
|
319
|
+
meta: DiagramMeta & {
|
|
320
|
+
/**
|
|
321
|
+
* `fixed` gives every participant a 148-unit column; `spread` gives every
|
|
322
|
+
* participant the width the WIDEST label needs.
|
|
323
|
+
*
|
|
324
|
+
* Both are uniform — a sequence diagram with columns of different widths
|
|
325
|
+
* reads as a diagram where the wide participant matters more — so `spread`
|
|
326
|
+
* widens the whole figure rather than dividing it. Reach for it when a
|
|
327
|
+
* meaningful participant label does not fit a fixed column. Shortening the
|
|
328
|
+
* label to make it fit is the wrong repair: the label is the data.
|
|
329
|
+
*/
|
|
330
|
+
column_fit?: 'fixed' | 'spread';
|
|
331
|
+
};
|
|
332
|
+
participants: SequenceParticipant[];
|
|
333
|
+
segments?: SequenceSegment[];
|
|
334
|
+
messages: SequenceMessage[];
|
|
335
|
+
activations?: SequenceActivation[];
|
|
336
|
+
cards?: DiagramCard[];
|
|
337
|
+
}
|
|
338
|
+
/** A column header: a stage of the pipeline. */
|
|
339
|
+
interface DataflowStage {
|
|
340
|
+
label: string;
|
|
341
|
+
}
|
|
342
|
+
interface DataflowNode extends NodeBase {
|
|
343
|
+
type: NodeKind;
|
|
344
|
+
/** Index into `stages`. */
|
|
345
|
+
stage: number;
|
|
346
|
+
row: number;
|
|
347
|
+
yOffset?: number;
|
|
348
|
+
}
|
|
349
|
+
interface DataflowEdge extends EdgeBase {
|
|
350
|
+
/**
|
|
351
|
+
* What is travelling, in governance terms — `PII`, `aggregated`, `hashed`.
|
|
352
|
+
*
|
|
353
|
+
* Printed as a mono chip on the line rather than folded into the label,
|
|
354
|
+
* because a data-flow diagram is very often read for exactly this and for
|
|
355
|
+
* nothing else.
|
|
356
|
+
*/
|
|
357
|
+
classification?: string;
|
|
358
|
+
}
|
|
359
|
+
interface DataflowSpec {
|
|
360
|
+
diagram_type?: 'dataflow';
|
|
361
|
+
meta: DiagramMeta;
|
|
362
|
+
stages: DataflowStage[];
|
|
363
|
+
nodes: DataflowNode[];
|
|
364
|
+
flows?: DataflowEdge[];
|
|
365
|
+
cards?: DiagramCard[];
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* What a state IS, and here the system's one licence for colour applies.
|
|
369
|
+
*
|
|
370
|
+
* `success` and `failure` are bound to `--ok` and `--danger` — the two tokens
|
|
371
|
+
* this design system reserves for state and refuses to spend on brand. Every
|
|
372
|
+
* other kind is carried by shape: a start is a filled cap, a decision is a
|
|
373
|
+
* diamond, a wait is dashed, an external is a plate with a cut corner.
|
|
374
|
+
*/
|
|
375
|
+
type LifecycleStateKind = 'start' | 'active' | 'waiting' | 'decision' | 'success' | 'failure' | 'neutral' | 'external';
|
|
376
|
+
interface LifecycleLane {
|
|
377
|
+
id: string;
|
|
378
|
+
label: string;
|
|
379
|
+
}
|
|
380
|
+
interface LifecycleState extends NodeBase {
|
|
381
|
+
type: LifecycleStateKind;
|
|
382
|
+
/** A step number printed in the corner — `01`, `02a`. */
|
|
383
|
+
step?: string;
|
|
384
|
+
/** Which lane holds it. Defaults to the first, which is the main rail. */
|
|
385
|
+
lane?: string;
|
|
386
|
+
col: number;
|
|
387
|
+
/** Nudges this state off its lane's centre line, for a state that needs room. */
|
|
388
|
+
yOffset?: number;
|
|
389
|
+
}
|
|
390
|
+
interface LifecycleTransition extends EdgeBase {
|
|
391
|
+
/** A second line under the label: the condition, the timeout, the retry count. */
|
|
392
|
+
note?: string;
|
|
393
|
+
}
|
|
394
|
+
interface LifecycleSpec {
|
|
395
|
+
diagram_type?: 'lifecycle';
|
|
396
|
+
meta: DiagramMeta;
|
|
397
|
+
lanes?: LifecycleLane[];
|
|
398
|
+
states: LifecycleState[];
|
|
399
|
+
transitions?: LifecycleTransition[];
|
|
400
|
+
cards?: DiagramCard[];
|
|
401
|
+
}
|
|
402
|
+
/** Any of the five, for a call site that dispatches on `diagram_type`. */
|
|
403
|
+
type DiagramSpecAny = ArchitectureSpec | WorkflowSpec | SequenceSpec | DataflowSpec | LifecycleSpec;
|
|
404
|
+
|
|
405
|
+
export type { ArchitectureBoundary, ArchitectureComponent, ArchitectureSpec, DataflowEdge, DataflowNode, DataflowSpec, DataflowStage, DiagramCard, DiagramMeta, DiagramSpecAny, DiagramView, EdgeBase, LegendMode, LifecycleLane, LifecycleSpec, LifecycleState, LifecycleStateKind, LifecycleTransition, NodeBase, NodeKind, Point, RouteMode, SequenceActivation, SequenceMessage, SequenceParticipant, SequenceSegment, SequenceSpec, Side, SourceRef, Variant, WorkflowEdge, WorkflowEdgeRole, WorkflowGroup, WorkflowLane, WorkflowNode, WorkflowPhase, WorkflowSpec };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,11 @@ export { CONTROL_BASE, CONTROL_BORDER, isInvalid } from './lib/control.js';
|
|
|
5
5
|
export { IndicatorStyle, useSelectionIndicator } from './lib/useSelectionIndicator.js';
|
|
6
6
|
export { Button, ButtonProps, ButtonSize, ButtonVariant } from './components/Button/Button.js';
|
|
7
7
|
export { FloatingIconButton, FloatingIconButtonProps } from './components/FloatingIconButton/FloatingIconButton.js';
|
|
8
|
+
export { Text, TextElement, TextProps, TextSize, TextTone } from './components/Text/Text.js';
|
|
9
|
+
export { Heading, HeadingLevel, HeadingProps, HeadingSize } from './components/Heading/Heading.js';
|
|
10
|
+
export { Code, CodeProps } from './components/Code/Code.js';
|
|
11
|
+
export { CodeBlock, CodeBlockProps } from './components/CodeBlock/CodeBlock.js';
|
|
12
|
+
export { Markdown, MarkdownProps } from './components/Markdown/Markdown.js';
|
|
8
13
|
export { Badge, BadgeProps, BadgeTone } from './components/Badge/Badge.js';
|
|
9
14
|
export { Tag, TagProps } from './components/Tag/Tag.js';
|
|
10
15
|
export { Kbd, KbdProps } from './components/Kbd/Kbd.js';
|
|
@@ -13,6 +18,7 @@ export { StatusDot, StatusDotProps, StatusTone } from './components/StatusDot/St
|
|
|
13
18
|
export { StatusPill, StatusPillProps } from './components/StatusPill/StatusPill.js';
|
|
14
19
|
export { EXTERNAL_LINK_ARROW, LinkArrow, LinkArrowProps } from './components/LinkArrow/LinkArrow.js';
|
|
15
20
|
export { Separator, SeparatorProps } from './components/Separator/Separator.js';
|
|
21
|
+
export { Timestamp, TimestampFormat, TimestampProps } from './components/Timestamp/Timestamp.js';
|
|
16
22
|
export { Figure, FigureBand, FigureBandProps } from './components/FigureBand/FigureBand.js';
|
|
17
23
|
export { Spinner, SpinnerProps } from './components/Spinner/Spinner.js';
|
|
18
24
|
export { Skeleton, SkeletonBlock, SkeletonCircle, SkeletonLine, SkeletonPage, SkeletonPageProps, SkeletonProps, SkeletonText, SkeletonTextProps } from './components/Skeleton/Skeleton.js';
|
|
@@ -21,7 +27,7 @@ export { Alert, AlertProps, AlertTone } from './components/Alert/Alert.js';
|
|
|
21
27
|
export { EmptyState, EmptyStateProps } from './components/EmptyState/EmptyState.js';
|
|
22
28
|
export { ERROR_ACTION_CLASS, ErrorState, ErrorStateProps } from './components/ErrorState/ErrorState.js';
|
|
23
29
|
export { Toaster } from './components/Toast/Toast.js';
|
|
24
|
-
export { Field, FieldProps } from './components/Field/Field.js';
|
|
30
|
+
export { Field, FieldLayout, FieldProps } from './components/Field/Field.js';
|
|
25
31
|
export { Combobox, ComboboxOption, ComboboxProps } from './components/Combobox/Combobox.js';
|
|
26
32
|
export { DATE_PRESETS, DatePicker, DatePickerProps, DatePreset, DateRangePicker, DateRangePickerProps, RANGE_PRESETS } from './components/DatePicker/DatePicker.js';
|
|
27
33
|
export { Slider, SliderProps } from './components/Slider/Slider.js';
|
|
@@ -34,11 +40,11 @@ export { Checkbox, CheckboxProps } from './components/Checkbox/Checkbox.js';
|
|
|
34
40
|
export { RadioGroup, RadioGroupItem, RadioGroupItemProps, RadioGroupProps } from './components/RadioGroup/RadioGroup.js';
|
|
35
41
|
export { Switch, SwitchProps } from './components/Switch/Switch.js';
|
|
36
42
|
export { Dialog, DialogClose, DialogContent, DialogContentProps, DialogTrigger } from './components/Dialog/Dialog.js';
|
|
37
|
-
export { DropdownMenu, DropdownMenuContent, DropdownMenuContentProps, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from './components/DropdownMenu/DropdownMenu.js';
|
|
43
|
+
export { DropdownMenu, DropdownMenuContent, DropdownMenuContentProps, DropdownMenuGroup, DropdownMenuGroupProps, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from './components/DropdownMenu/DropdownMenu.js';
|
|
38
44
|
export { Tooltip, TooltipProps, TooltipProvider } from './components/Tooltip/Tooltip.js';
|
|
39
45
|
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverContentProps, PopoverTrigger } from './components/Popover/Popover.js';
|
|
40
46
|
export { Sheet, SheetClose, SheetContent, SheetContentProps, SheetSide, SheetTrigger } from './components/Sheet/Sheet.js';
|
|
41
|
-
export { ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuItemProps, ContextMenuLabel, ContextMenuSeparator, ContextMenuTrigger } from './components/ContextMenu/ContextMenu.js';
|
|
47
|
+
export { ContextMenu, ContextMenuContent, ContextMenuGroup, ContextMenuGroupProps, ContextMenuItem, ContextMenuItemProps, ContextMenuLabel, ContextMenuSeparator, ContextMenuTrigger } from './components/ContextMenu/ContextMenu.js';
|
|
42
48
|
export { Command, CommandDialog, CommandDialogProps, CommandEmpty, CommandFooter, CommandGroup, CommandHint, CommandHintProps, CommandInput, CommandItem, CommandItemProps, CommandList, CommandSeparator } from './components/Command/Command.js';
|
|
43
49
|
export { MenuAction, SearchableMenu, SearchableMenuProps } from './components/SearchableMenu/SearchableMenu.js';
|
|
44
50
|
export { Tabs, TabsContent, TabsList, TabsTrigger } from './components/Tabs/Tabs.js';
|
|
@@ -49,13 +55,19 @@ export { Pagination, PaginationProps, paginationRange } from './components/Pagin
|
|
|
49
55
|
export { NavItem, NavItemProps } from './components/NavItem/NavItem.js';
|
|
50
56
|
export { Card, CardBody, CardFooter, CardHeader, CardProps, CardTitle } from './components/Card/Card.js';
|
|
51
57
|
export { SortDirection, TBody, TD, TDProps, TH, THProps, THead, TR, Table, TableAlign, TableBorders, TableProps } from './components/Table/Table.js';
|
|
52
|
-
export {
|
|
58
|
+
export { DescriptionList, DescriptionListItem, DescriptionListLayout, DescriptionListProps } from './components/DescriptionList/DescriptionList.js';
|
|
59
|
+
export { Toolbar, ToolbarAlign, ToolbarPosition, ToolbarProps } from './components/Toolbar/Toolbar.js';
|
|
60
|
+
export { AspectRatio, AspectRatioProps } from './components/AspectRatio/AspectRatio.js';
|
|
61
|
+
export { Calendar, CalendarLabels, CalendarProps } from './components/Calendar/Calendar.js';
|
|
53
62
|
export { ScrollArea, ScrollAreaProps } from './components/ScrollArea/ScrollArea.js';
|
|
54
63
|
export { AppShell, AppShellProps } from './components/AppShell/AppShell.js';
|
|
55
64
|
export { Article, ArticleProps } from './components/Article/Article.js';
|
|
56
65
|
export { Diagram, DiagramEdge, DiagramNode, DiagramProps, DiagramSpec } from './components/Diagram/Diagram.js';
|
|
57
66
|
export { Step, Steps, StepsProps } from './components/Steps/Steps.js';
|
|
58
67
|
export { DateRange } from 'react-day-picker';
|
|
68
|
+
export { MarkdownHeadingLevel, MarkdownInline, MarkdownNode } from './components/Markdown/nodes.js';
|
|
69
|
+
export { parseMarkdown } from './components/Markdown/parse.js';
|
|
70
|
+
export { slugify } from './components/Markdown/slug.js';
|
|
59
71
|
export { toast } from 'sonner';
|
|
60
72
|
import 'react';
|
|
61
73
|
import 'clsx';
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,11 @@ import { CONTROL_BASE, CONTROL_BORDER, isInvalid } from "./lib/control.js";
|
|
|
5
5
|
import { useSelectionIndicator } from "./lib/useSelectionIndicator.js";
|
|
6
6
|
export * from "./components/Button/Button.js";
|
|
7
7
|
export * from "./components/FloatingIconButton/FloatingIconButton.js";
|
|
8
|
+
export * from "./components/Text/Text.js";
|
|
9
|
+
export * from "./components/Heading/Heading.js";
|
|
10
|
+
export * from "./components/Code/Code.js";
|
|
11
|
+
export * from "./components/CodeBlock/CodeBlock.js";
|
|
12
|
+
export * from "./components/Markdown/Markdown.js";
|
|
8
13
|
export * from "./components/Badge/Badge.js";
|
|
9
14
|
export * from "./components/Tag/Tag.js";
|
|
10
15
|
export * from "./components/Kbd/Kbd.js";
|
|
@@ -13,6 +18,7 @@ export * from "./components/StatusDot/StatusDot.js";
|
|
|
13
18
|
export * from "./components/StatusPill/StatusPill.js";
|
|
14
19
|
export * from "./components/LinkArrow/LinkArrow.js";
|
|
15
20
|
export * from "./components/Separator/Separator.js";
|
|
21
|
+
export * from "./components/Timestamp/Timestamp.js";
|
|
16
22
|
export * from "./components/FigureBand/FigureBand.js";
|
|
17
23
|
export * from "./components/Spinner/Spinner.js";
|
|
18
24
|
export * from "./components/Skeleton/Skeleton.js";
|
|
@@ -49,6 +55,9 @@ export * from "./components/Pagination/Pagination.js";
|
|
|
49
55
|
export * from "./components/NavItem/NavItem.js";
|
|
50
56
|
export * from "./components/Card/Card.js";
|
|
51
57
|
export * from "./components/Table/Table.js";
|
|
58
|
+
export * from "./components/DescriptionList/DescriptionList.js";
|
|
59
|
+
export * from "./components/Toolbar/Toolbar.js";
|
|
60
|
+
export * from "./components/AspectRatio/AspectRatio.js";
|
|
52
61
|
export * from "./components/Calendar/Calendar.js";
|
|
53
62
|
export * from "./components/ScrollArea/ScrollArea.js";
|
|
54
63
|
export * from "./components/AppShell/AppShell.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @misoto22/design — public entry.\n *\n * Components export from here; the look ships separately as CSS:\n *\n * import '@misoto22/design/styles.css' // compiled Tailwind + tokens + fonts\n *\n * or, for an app that already compiles Tailwind itself, the portable layers on\n * their own:\n *\n * import '@misoto22/design/tokens.css' // primitives\n * import '@misoto22/design/semantic.css' // roles\n * import '@misoto22/design/keyframes.css' // motion\n *\n * Everything below is a consumer contract. Adding an export is cheap; changing\n * or removing one is a breaking change (DESIGN-API-001).\n */\n\n// ─── Utilities ───\nexport * from './lib/overlay-container'\n\n// ─── Tokens ───\nexport { BRAND } from './tokens/brand'\nexport type { BrandColor } from './tokens/brand'\n\n// ─── Utilities ───\nexport { cn } from './lib/cn'\nexport { CONTROL_BASE, CONTROL_BORDER, isInvalid } from './lib/control'\nexport { useSelectionIndicator } from './lib/useSelectionIndicator'\nexport type { IndicatorStyle } from './lib/useSelectionIndicator'\n\n// ─── Actions ───\nexport * from './components/Button/Button'\nexport * from './components/FloatingIconButton/FloatingIconButton'\n\n// ─── Display ───\nexport * from './components/Badge/Badge'\nexport * from './components/Tag/Tag'\nexport * from './components/Kbd/Kbd'\nexport * from './components/Avatar/Avatar'\nexport * from './components/StatusDot/StatusDot'\nexport * from './components/StatusPill/StatusPill'\nexport * from './components/LinkArrow/LinkArrow'\nexport * from './components/Separator/Separator'\nexport * from './components/FigureBand/FigureBand'\n\n// ─── Feedback ───\nexport * from './components/Spinner/Spinner'\nexport * from './components/Skeleton/Skeleton'\nexport * from './components/Progress/Progress'\nexport * from './components/Alert/Alert'\nexport * from './components/EmptyState/EmptyState'\nexport * from './components/ErrorState/ErrorState'\nexport * from './components/Toast/Toast'\n\n// ─── Forms ───\nexport * from './components/Field/Field'\nexport * from './components/Combobox/Combobox'\nexport * from './components/DatePicker/DatePicker'\nexport * from './components/Slider/Slider'\nexport * from './components/ToggleGroup/ToggleGroup'\nexport * from './components/Input/Input'\nexport * from './components/Textarea/Textarea'\nexport * from './components/Select/Select'\nexport * from './components/NativeSelect/NativeSelect'\nexport * from './components/Checkbox/Checkbox'\nexport * from './components/RadioGroup/RadioGroup'\nexport * from './components/Switch/Switch'\n\n// ─── Overlays ───\nexport * from './components/Dialog/Dialog'\nexport * from './components/DropdownMenu/DropdownMenu'\nexport * from './components/Tooltip/Tooltip'\nexport * from './components/Popover/Popover'\nexport * from './components/Sheet/Sheet'\nexport * from './components/ContextMenu/ContextMenu'\nexport * from './components/Command/Command'\nexport * from './components/SearchableMenu/SearchableMenu'\n\n// ─── Navigation ───\nexport * from './components/Tabs/Tabs'\nexport * from './components/Accordion/Accordion'\nexport * from './components/Collapsible/Collapsible'\nexport * from './components/Breadcrumb/Breadcrumb'\nexport * from './components/Pagination/Pagination'\nexport * from './components/NavItem/NavItem'\n\n// ─── Surfaces / layout ───\nexport * from './components/Card/Card'\nexport * from './components/Table/Table'\nexport * from './components/Calendar/Calendar'\nexport * from './components/ScrollArea/ScrollArea'\nexport * from './components/AppShell/AppShell'\nexport * from './components/Article/Article'\nexport * from './components/Diagram/Diagram'\nexport * from './components/Steps/Steps'\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * @misoto22/design — public entry.\n *\n * Components export from here; the look ships separately as CSS:\n *\n * import '@misoto22/design/styles.css' // compiled Tailwind + tokens + fonts\n *\n * or, for an app that already compiles Tailwind itself, the portable layers on\n * their own:\n *\n * import '@misoto22/design/tokens.css' // primitives, plus data-mode and data-density\n * import '@misoto22/design/semantic.css' // roles\n * import '@misoto22/design/themes.css' // the other six theming axes\n * import '@misoto22/design/keyframes.css' // motion\n *\n * All four, or the theming attributes are attributes that do nothing: every\n * axis but `data-mode` and `data-density` is declared only in `themes.css`, and\n * an app that skips it writes `data-radius=\"sharp\"` and gets no error, no\n * warning and no corner.\n *\n * Everything below is a consumer contract. Adding an export is cheap; changing\n * or removing one is a breaking change (DESIGN-API-001).\n */\n\n// ─── Utilities ───\nexport * from './lib/overlay-container'\n\n// ─── Tokens ───\nexport { BRAND } from './tokens/brand'\nexport type { BrandColor } from './tokens/brand'\n\n// ─── Utilities ───\nexport { cn } from './lib/cn'\nexport { CONTROL_BASE, CONTROL_BORDER, isInvalid } from './lib/control'\nexport { useSelectionIndicator } from './lib/useSelectionIndicator'\nexport type { IndicatorStyle } from './lib/useSelectionIndicator'\n\n// ─── Actions ───\nexport * from './components/Button/Button'\nexport * from './components/FloatingIconButton/FloatingIconButton'\n\n// ─── Display ───\nexport * from './components/Text/Text'\nexport * from './components/Heading/Heading'\nexport * from './components/Code/Code'\nexport * from './components/CodeBlock/CodeBlock'\nexport * from './components/Markdown/Markdown'\nexport * from './components/Badge/Badge'\nexport * from './components/Tag/Tag'\nexport * from './components/Kbd/Kbd'\nexport * from './components/Avatar/Avatar'\nexport * from './components/StatusDot/StatusDot'\nexport * from './components/StatusPill/StatusPill'\nexport * from './components/LinkArrow/LinkArrow'\nexport * from './components/Separator/Separator'\nexport * from './components/Timestamp/Timestamp'\nexport * from './components/FigureBand/FigureBand'\n\n// ─── Feedback ───\nexport * from './components/Spinner/Spinner'\nexport * from './components/Skeleton/Skeleton'\nexport * from './components/Progress/Progress'\nexport * from './components/Alert/Alert'\nexport * from './components/EmptyState/EmptyState'\nexport * from './components/ErrorState/ErrorState'\nexport * from './components/Toast/Toast'\n\n// ─── Forms ───\nexport * from './components/Field/Field'\nexport * from './components/Combobox/Combobox'\nexport * from './components/DatePicker/DatePicker'\nexport * from './components/Slider/Slider'\nexport * from './components/ToggleGroup/ToggleGroup'\nexport * from './components/Input/Input'\nexport * from './components/Textarea/Textarea'\nexport * from './components/Select/Select'\nexport * from './components/NativeSelect/NativeSelect'\nexport * from './components/Checkbox/Checkbox'\nexport * from './components/RadioGroup/RadioGroup'\nexport * from './components/Switch/Switch'\n\n// ─── Overlays ───\nexport * from './components/Dialog/Dialog'\nexport * from './components/DropdownMenu/DropdownMenu'\nexport * from './components/Tooltip/Tooltip'\nexport * from './components/Popover/Popover'\nexport * from './components/Sheet/Sheet'\nexport * from './components/ContextMenu/ContextMenu'\nexport * from './components/Command/Command'\nexport * from './components/SearchableMenu/SearchableMenu'\n\n// ─── Navigation ───\nexport * from './components/Tabs/Tabs'\nexport * from './components/Accordion/Accordion'\nexport * from './components/Collapsible/Collapsible'\nexport * from './components/Breadcrumb/Breadcrumb'\nexport * from './components/Pagination/Pagination'\nexport * from './components/NavItem/NavItem'\n\n// ─── Surfaces / layout ───\nexport * from './components/Card/Card'\nexport * from './components/Table/Table'\nexport * from './components/DescriptionList/DescriptionList'\nexport * from './components/Toolbar/Toolbar'\nexport * from './components/AspectRatio/AspectRatio'\nexport * from './components/Calendar/Calendar'\nexport * from './components/ScrollArea/ScrollArea'\nexport * from './components/AppShell/AppShell'\nexport * from './components/Article/Article'\nexport * from './components/Diagram/Diagram'\nexport * from './components/Steps/Steps'\n"],"mappings":"AAyBA,cAAc;AAGd,SAAS,aAAa;AAItB,SAAS,UAAU;AACnB,SAAS,cAAc,gBAAgB,iBAAiB;AACxD,SAAS,6BAA6B;AAItC,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;","names":[]}
|
package/dist/keyframes.css
CHANGED
|
@@ -202,10 +202,64 @@
|
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
204
|
|
|
205
|
-
/*
|
|
206
|
-
|
|
205
|
+
/* ─── Reduced motion ───
|
|
206
|
+
Two rules, and the argument behind them matters more than the CSS does.
|
|
207
|
+
|
|
208
|
+
This began as one opt-in rule: a surface that animated carried
|
|
209
|
+
`data-m22-animated`, and that attribute was what got cancelled. It was
|
|
210
|
+
forgotten four times — Accordion's panel, CollapsibleSection's panel,
|
|
211
|
+
SheetContent's slide, AppShell's drawer — by four authors across four
|
|
212
|
+
components. A mechanism four people independently fail to remember is not
|
|
213
|
+
being failed by its authors; it is failing them. The other half of the old
|
|
214
|
+
selector, `[class*='m22-anim']`, matched nothing whatsoever: Tailwind emits
|
|
215
|
+
`animate-[m22-collapsible-down_…]`, which contains no `m22-anim`, so half
|
|
216
|
+
the kill switch had never once fired and nothing anywhere said so.
|
|
217
|
+
|
|
218
|
+
So the GUARANTEE is now the universal rule below, deliberately the well-worn
|
|
219
|
+
one. It cannot be forgotten because there is nothing to remember: a new
|
|
220
|
+
component is covered before its author has heard of this file. It also
|
|
221
|
+
reaches `transition-duration`, which the old rule never did — and a panel
|
|
222
|
+
that slides is usually written as a transition, not a keyframe, which is how
|
|
223
|
+
two of the four escaped.
|
|
224
|
+
|
|
225
|
+
The cost, stated plainly: this is a `*` rule in a stylesheet consumers
|
|
226
|
+
import, so it reaches their components too. That is intended. It fires only
|
|
227
|
+
when the reader has asked their operating system for less motion, and this
|
|
228
|
+
package already asserts base styles on `*` (see index.css). A caller with
|
|
229
|
+
motion they consider essential can still keep it — `!important` on `*` is
|
|
230
|
+
the weakest `!important` there is, so any class-level
|
|
231
|
+
`animation-duration: … !important` outranks it. What changes is the default:
|
|
232
|
+
keeping motion under this preference becomes something you write down and
|
|
233
|
+
defend, instead of something you get by forgetting. That inversion is the
|
|
234
|
+
whole point of the change.
|
|
235
|
+
|
|
236
|
+
0.01ms rather than `none`, because JavaScript listens. Radix unmounts a
|
|
237
|
+
closing panel on `animationend`; consumer code may await `transitionend`. A
|
|
238
|
+
near-zero duration still fires both, where `none` fires neither. It is the
|
|
239
|
+
reset's least obvious detail and the reason it is written this way wherever
|
|
240
|
+
it appears.
|
|
241
|
+
|
|
242
|
+
`[data-m22-animated]` stays, and is no longer load-bearing. It is a
|
|
243
|
+
component asserting that its motion is decorative, and it goes further than
|
|
244
|
+
the floor above by removing the animation outright rather than running an
|
|
245
|
+
instant frame of it. Read it as documentation with teeth. Do NOT read it as
|
|
246
|
+
the thing that makes reduced motion work — believing that was the mistake
|
|
247
|
+
this replaced. `src/__tests__/reduced-motion.test.tsx` holds both ends: it
|
|
248
|
+
fails if this block stops being universal, if it stops naming transitions,
|
|
249
|
+
if it grows another selector that matches nothing, or if a component reaches
|
|
250
|
+
for a keyframe here without making the assertion. */
|
|
207
251
|
@media (prefers-reduced-motion: reduce) {
|
|
208
|
-
|
|
252
|
+
*,
|
|
253
|
+
::before,
|
|
254
|
+
::after {
|
|
255
|
+
animation-delay: 0ms !important;
|
|
256
|
+
animation-duration: 0.01ms !important;
|
|
257
|
+
animation-iteration-count: 1 !important;
|
|
258
|
+
transition-delay: 0ms !important;
|
|
259
|
+
transition-duration: 0.01ms !important;
|
|
260
|
+
scroll-behavior: auto !important;
|
|
261
|
+
}
|
|
262
|
+
|
|
209
263
|
[data-m22-animated] {
|
|
210
264
|
animation: none !important;
|
|
211
265
|
}
|
|
@@ -7,8 +7,8 @@ interface OverlayContainerProps {
|
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Redirects every overlay in the subtree — popover, select, menu, tooltip
|
|
11
|
-
* a given element instead of `document.body`.
|
|
10
|
+
* Redirects every overlay in the subtree — popover, select, menu, tooltip,
|
|
11
|
+
* dialog, sheet — into a given element instead of `document.body`.
|
|
12
12
|
*
|
|
13
13
|
* Two problems, one cause. An overlay portalled to the body is positioned
|
|
14
14
|
* against the VIEWPORT, so inside a bounded frame (a documentation example, a
|
|
@@ -20,7 +20,11 @@ interface OverlayContainerProps {
|
|
|
20
20
|
* inherits what the frame declares, and collides with the frame's edges.
|
|
21
21
|
*
|
|
22
22
|
* The container must be positioned (`relative` is enough) for the panel to be
|
|
23
|
-
* placed against it rather than against the nearest positioned ancestor.
|
|
23
|
+
* placed against it rather than against the nearest positioned ancestor. The
|
|
24
|
+
* modal surfaces need it for a second reason: they place themselves with
|
|
25
|
+
* `position: fixed`, which resolves against the VIEWPORT whatever element they
|
|
26
|
+
* are portalled into, so a named container switches them to `absolute` — and
|
|
27
|
+
* an unpositioned container would then hand them the wrong box.
|
|
24
28
|
*
|
|
25
29
|
* @example
|
|
26
30
|
* const [frame, setFrame] = useState<HTMLElement | null>(null)
|
|
@@ -31,7 +35,13 @@ interface OverlayContainerProps {
|
|
|
31
35
|
declare function OverlayContainer({ container, children }: OverlayContainerProps): react.JSX.Element;
|
|
32
36
|
/**
|
|
33
37
|
* The element overlays in this subtree should render into, or `null` for the
|
|
34
|
-
* document body.
|
|
38
|
+
* document body.
|
|
39
|
+
*
|
|
40
|
+
* Every portal in the library reads this. That sentence was false for a
|
|
41
|
+
* release: `Dialog` and `Sheet` rendered the Radix portal with no container and
|
|
42
|
+
* never called this hook, and their props derive from `Content`, which has no
|
|
43
|
+
* `container` — so a caller could not pass one either, and every modal example
|
|
44
|
+
* on the documentation site escaped the preview card it was drawn in.
|
|
35
45
|
*/
|
|
36
46
|
declare function useOverlayContainer(): HTMLElement | null;
|
|
37
47
|
|