@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,259 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useId, useMemo } from "react";
|
|
4
|
+
import { liveEdges, useSpecIdentity, warnUnknownLane } from "../lib/dev.js";
|
|
5
|
+
import { DiagramFrame } from "../lib/frame.js";
|
|
6
|
+
import { inflate, round, textWidth, TYPE, union, wrapText } from "../lib/geometry.js";
|
|
7
|
+
import { resolveLegend, variantLegend } from "../lib/legend.js";
|
|
8
|
+
import { BandFrame, NodePlate, PLATE, plateHeight } from "../lib/marks.js";
|
|
9
|
+
import { renderWires, wiresFor } from "../lib/wires.js";
|
|
10
|
+
const VARIANTS = ["default", "emphasis", "security", "dashed"];
|
|
11
|
+
const ROLE_VARIANT = {
|
|
12
|
+
async: "dashed",
|
|
13
|
+
error: "dashed"
|
|
14
|
+
};
|
|
15
|
+
const variantOf = (edge) => edge.variant ?? (edge.role ? ROLE_VARIANT[edge.role] : void 0);
|
|
16
|
+
const GRID = {
|
|
17
|
+
/** The gutter the lane names live in. */
|
|
18
|
+
railW: 118,
|
|
19
|
+
originY: 74,
|
|
20
|
+
colW: 168,
|
|
21
|
+
gapX: 58,
|
|
22
|
+
laneH: 92,
|
|
23
|
+
laneGap: 40
|
|
24
|
+
};
|
|
25
|
+
function WorkflowFigure({
|
|
26
|
+
spec,
|
|
27
|
+
className,
|
|
28
|
+
legend = "auto",
|
|
29
|
+
cards = true,
|
|
30
|
+
heading = true,
|
|
31
|
+
activeIds,
|
|
32
|
+
onSelectNode
|
|
33
|
+
}) {
|
|
34
|
+
const uid = useId().replace(/:/g, "");
|
|
35
|
+
useSpecIdentity(spec, "WorkflowFigure");
|
|
36
|
+
const model = useMemo(
|
|
37
|
+
() => buildModel(spec, uid, activeIds, onSelectNode),
|
|
38
|
+
[spec, uid, activeIds, onSelectNode]
|
|
39
|
+
);
|
|
40
|
+
return /* @__PURE__ */ jsx(
|
|
41
|
+
DiagramFrame,
|
|
42
|
+
{
|
|
43
|
+
meta: spec.meta,
|
|
44
|
+
model,
|
|
45
|
+
cards: spec.cards,
|
|
46
|
+
showCards: cards,
|
|
47
|
+
heading,
|
|
48
|
+
legend,
|
|
49
|
+
className,
|
|
50
|
+
activeIds,
|
|
51
|
+
onSelectNode
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
const colX = (col) => GRID.railW + col * (GRID.colW + GRID.gapX);
|
|
56
|
+
const spanBox = (fromCol, toCol, y, h) => ({
|
|
57
|
+
x: colX(fromCol),
|
|
58
|
+
y,
|
|
59
|
+
w: colX(toCol) + GRID.colW - colX(fromCol),
|
|
60
|
+
h
|
|
61
|
+
});
|
|
62
|
+
function buildModel(spec, uid, activeIds, onSelectNode) {
|
|
63
|
+
const laneIndex = new Map(spec.lanes.map((lane, index) => [lane.id, index]));
|
|
64
|
+
const laneY = (index) => GRID.originY + index * (GRID.laneH + GRID.laneGap);
|
|
65
|
+
const laneOf = (id, owner) => {
|
|
66
|
+
const index = laneIndex.get(id);
|
|
67
|
+
if (index !== void 0) return index;
|
|
68
|
+
warnUnknownLane("WorkflowFigure", owner, id);
|
|
69
|
+
return 0;
|
|
70
|
+
};
|
|
71
|
+
const boxes = /* @__PURE__ */ new Map();
|
|
72
|
+
const placed = spec.nodes.map((node) => {
|
|
73
|
+
const w = node.width ?? GRID.colW;
|
|
74
|
+
const lines = wrapText(node.label, TYPE.label, w - PLATE.padX * 2, 2);
|
|
75
|
+
const h = plateHeight(lines.length, Boolean(node.sublabel), true, node.height ?? 0);
|
|
76
|
+
const index = laneOf(node.lane, node.id);
|
|
77
|
+
const box = {
|
|
78
|
+
x: colX(node.col),
|
|
79
|
+
y: laneY(index) + (GRID.laneH - h) / 2 + (node.yOffset ?? 0),
|
|
80
|
+
w,
|
|
81
|
+
h
|
|
82
|
+
};
|
|
83
|
+
boxes.set(node.id, box);
|
|
84
|
+
return { node, box, lane: index };
|
|
85
|
+
});
|
|
86
|
+
const mainPairs = /* @__PURE__ */ new Set();
|
|
87
|
+
for (let index = 0; index < (spec.mainPath?.length ?? 0) - 1; index += 1) {
|
|
88
|
+
mainPairs.add(`${spec.mainPath[index]}\u2192${spec.mainPath[index + 1]}`);
|
|
89
|
+
}
|
|
90
|
+
const edges = liveEdges("WorkflowFigure", spec.edges, (id) => boxes.has(id));
|
|
91
|
+
const wires = wiresFor(edges, boxes, (edge) => {
|
|
92
|
+
const onMain = mainPairs.has(`${edge.from}\u2192${edge.to}`);
|
|
93
|
+
const variant = variantOf(edge);
|
|
94
|
+
return {
|
|
95
|
+
edge: variant === edge.variant ? edge : { ...edge, variant },
|
|
96
|
+
weight: onMain ? 2.1 : void 0,
|
|
97
|
+
open: edge.role === "return"
|
|
98
|
+
};
|
|
99
|
+
});
|
|
100
|
+
const { paths, labels } = renderWires(wires, uid);
|
|
101
|
+
const laneBoxes = spec.lanes.map((lane, index) => {
|
|
102
|
+
const inside = placed.filter((entry) => entry.lane === index).map((entry) => entry.box);
|
|
103
|
+
const span2 = union(inside);
|
|
104
|
+
const left2 = span2 ? span2.x - 14 : GRID.railW - 14;
|
|
105
|
+
return {
|
|
106
|
+
lane,
|
|
107
|
+
index,
|
|
108
|
+
box: {
|
|
109
|
+
x: left2,
|
|
110
|
+
y: laneY(index) - 8,
|
|
111
|
+
w: (span2 ? span2.x + span2.w + 14 : colX(0) + GRID.colW) - left2,
|
|
112
|
+
h: GRID.laneH + 16
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
});
|
|
116
|
+
const drawn = [...boxes.values(), ...laneBoxes.map((entry) => entry.box)];
|
|
117
|
+
const headerY = GRID.originY - 30;
|
|
118
|
+
const railTextW = Math.max(0, ...spec.lanes.map((lane) => textWidth(lane.label, 9)));
|
|
119
|
+
const raw = union(drawn) ?? { x: 0, y: 0, w: 600, h: 300 };
|
|
120
|
+
const left = Math.min(raw.x, GRID.railW - 26 - railTextW);
|
|
121
|
+
const top = Math.min(raw.y, headerY - 14);
|
|
122
|
+
const extent = inflate(
|
|
123
|
+
{ x: left, y: top, w: raw.x + raw.w - left, h: raw.y + raw.h - top },
|
|
124
|
+
24
|
|
125
|
+
);
|
|
126
|
+
const active = activeIds && activeIds.length > 0 ? new Set(activeIds) : null;
|
|
127
|
+
const artwork = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
128
|
+
(spec.phases ?? []).map((phase) => {
|
|
129
|
+
const span2 = spanBox(phase.fromCol, Math.max(phase.fromCol, phase.toCol), headerY + 8, 0);
|
|
130
|
+
const dashed = phase.variant === "security" || phase.variant === "dashed";
|
|
131
|
+
return /* @__PURE__ */ jsxs("g", { "data-phase": phase.id, "aria-hidden": "true", children: [
|
|
132
|
+
/* @__PURE__ */ jsx(
|
|
133
|
+
"path",
|
|
134
|
+
{
|
|
135
|
+
d: `M ${round(span2.x)} ${round(span2.y)} H ${round(span2.x + span2.w)}`,
|
|
136
|
+
className: phase.variant === "emphasis" ? "stroke-(--diagram-rule-hard)" : "stroke-(--diagram-rule)",
|
|
137
|
+
strokeWidth: phase.variant === "emphasis" ? 1.6 : 1,
|
|
138
|
+
strokeDasharray: dashed ? "7 4" : void 0
|
|
139
|
+
}
|
|
140
|
+
),
|
|
141
|
+
/* @__PURE__ */ jsx(
|
|
142
|
+
"text",
|
|
143
|
+
{
|
|
144
|
+
x: round(span2.x),
|
|
145
|
+
y: round(headerY),
|
|
146
|
+
className: "fill-(--diagram-ink-3) font-mono [font-size:9px] [letter-spacing:0.14em] uppercase",
|
|
147
|
+
children: phase.label
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
] }, phase.id);
|
|
151
|
+
}),
|
|
152
|
+
laneBoxes.map(({ lane, box }) => /* @__PURE__ */ jsxs("g", { "aria-hidden": "true", children: [
|
|
153
|
+
lane.variant === "exception" && /* @__PURE__ */ jsx(
|
|
154
|
+
"rect",
|
|
155
|
+
{
|
|
156
|
+
x: round(box.x),
|
|
157
|
+
y: round(box.y),
|
|
158
|
+
width: round(box.w),
|
|
159
|
+
height: round(box.h),
|
|
160
|
+
rx: 10,
|
|
161
|
+
className: "fill-(--diagram-band) [rx:var(--radius-lg)] [ry:var(--radius-lg)]"
|
|
162
|
+
}
|
|
163
|
+
),
|
|
164
|
+
/* @__PURE__ */ jsx(
|
|
165
|
+
"text",
|
|
166
|
+
{
|
|
167
|
+
x: round(GRID.railW - 26),
|
|
168
|
+
y: round(box.y + box.h / 2 + 3),
|
|
169
|
+
textAnchor: "end",
|
|
170
|
+
className: "fill-(--diagram-ink-3) font-mono [font-size:9px] [letter-spacing:0.14em] uppercase",
|
|
171
|
+
children: lane.label
|
|
172
|
+
}
|
|
173
|
+
)
|
|
174
|
+
] }, lane.id)),
|
|
175
|
+
(spec.groups ?? []).map((group) => {
|
|
176
|
+
const index = laneOf(group.lane, group.id);
|
|
177
|
+
return /* @__PURE__ */ jsx(
|
|
178
|
+
BandFrame,
|
|
179
|
+
{
|
|
180
|
+
box: spanBox(group.fromCol, group.toCol, laneY(index) - 2, GRID.laneH + 4),
|
|
181
|
+
label: group.label,
|
|
182
|
+
dashed: group.variant === "security"
|
|
183
|
+
},
|
|
184
|
+
group.id
|
|
185
|
+
);
|
|
186
|
+
}),
|
|
187
|
+
paths,
|
|
188
|
+
placed.map(({ node, box }) => /* @__PURE__ */ jsx(
|
|
189
|
+
NodePlate,
|
|
190
|
+
{
|
|
191
|
+
nodeId: node.id,
|
|
192
|
+
box,
|
|
193
|
+
label: node.label,
|
|
194
|
+
sublabel: node.sublabel,
|
|
195
|
+
tag: node.tag,
|
|
196
|
+
kind: node.type,
|
|
197
|
+
active: active?.has(node.id),
|
|
198
|
+
dimmed: active ? !active.has(node.id) : false,
|
|
199
|
+
onSelect: onSelectNode ? () => onSelectNode(node.id) : void 0
|
|
200
|
+
},
|
|
201
|
+
node.id
|
|
202
|
+
)),
|
|
203
|
+
labels
|
|
204
|
+
] });
|
|
205
|
+
const used = [...new Set(edges.map((edge) => variantOf(edge) ?? "default"))];
|
|
206
|
+
const bands = spec.lanes.map((lane, index) => ({
|
|
207
|
+
kind: lane.variant === "exception" ? "Exception lane" : "Lane",
|
|
208
|
+
label: lane.label,
|
|
209
|
+
ids: placed.filter((entry) => entry.lane === index).sort((a, b) => a.node.col - b.node.col).map((entry) => entry.node.id)
|
|
210
|
+
}));
|
|
211
|
+
return {
|
|
212
|
+
extent,
|
|
213
|
+
artwork,
|
|
214
|
+
nodes: spec.nodes.map((node) => ({
|
|
215
|
+
id: node.id,
|
|
216
|
+
label: node.label,
|
|
217
|
+
sublabel: node.sublabel,
|
|
218
|
+
kind: node.type
|
|
219
|
+
})),
|
|
220
|
+
edges: edges.map((edge) => ({
|
|
221
|
+
from: edge.from,
|
|
222
|
+
to: edge.to,
|
|
223
|
+
label: edge.label
|
|
224
|
+
})),
|
|
225
|
+
bands,
|
|
226
|
+
// A phase and a group both cut ACROSS the lanes, so neither can be the
|
|
227
|
+
// list's structure without publishing a node twice. They are sentences.
|
|
228
|
+
notes: [
|
|
229
|
+
...(spec.phases ?? []).map(
|
|
230
|
+
(phase) => span("Phase", phase.label, phase.fromCol, phase.toCol, spec.nodes, "")
|
|
231
|
+
),
|
|
232
|
+
...(spec.groups ?? []).map(
|
|
233
|
+
(group) => span(
|
|
234
|
+
"Group",
|
|
235
|
+
group.label,
|
|
236
|
+
group.fromCol,
|
|
237
|
+
group.toCol,
|
|
238
|
+
spec.nodes.filter((node) => node.lane === group.lane),
|
|
239
|
+
` in lane ${spec.lanes[laneIndex.get(group.lane) ?? 0]?.label ?? group.lane}`
|
|
240
|
+
)
|
|
241
|
+
)
|
|
242
|
+
],
|
|
243
|
+
legend: variantLegend(
|
|
244
|
+
resolveLegend(used, spec.meta.legend?.mode, VARIANTS, spec.meta.legend?.entries),
|
|
245
|
+
spec.meta.legend?.entries
|
|
246
|
+
)
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
function span(kind, label, fromCol, toCol, nodes, where) {
|
|
250
|
+
const inside = nodes.filter((node) => node.col >= fromCol && node.col <= toCol);
|
|
251
|
+
const held = inside.length > 0 ? `: ${inside.map((node) => node.label).join(", ")}` : "";
|
|
252
|
+
return `${kind} ${label} covers columns ${fromCol} to ${toCol}${where}${held}.`;
|
|
253
|
+
}
|
|
254
|
+
var WorkflowFigure_default = WorkflowFigure;
|
|
255
|
+
export {
|
|
256
|
+
WorkflowFigure,
|
|
257
|
+
WorkflowFigure_default as default
|
|
258
|
+
};
|
|
259
|
+
//# sourceMappingURL=WorkflowFigure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/diagrams/WorkflowFigure/WorkflowFigure.tsx"],"sourcesContent":["'use client'\n\nimport { useId, useMemo } from 'react'\nimport { liveEdges, useSpecIdentity, warnUnknownLane } from '../lib/dev'\nimport { DiagramFrame, type FigureBand, type FigureChrome, type FigureModel } from '../lib/frame'\nimport { inflate, round, textWidth, TYPE, union, wrapText, type Box } from '../lib/geometry'\nimport { resolveLegend, variantLegend } from '../lib/legend'\nimport { BandFrame, NodePlate, PLATE, plateHeight } from '../lib/marks'\nimport { renderWires, wiresFor, type Wire } from '../lib/wires'\nimport type { Variant, WorkflowEdge, WorkflowEdgeRole, WorkflowSpec } from '../spec'\n\nconst VARIANTS: (Variant | 'return')[] = ['default', 'emphasis', 'security', 'dashed']\n\n/**\n * What a ROLE does to the line, where the author did not say it with a variant.\n *\n * `role` is about meaning and `variant` is about drawing, and for three of the\n * five roles the two answers coincide: an asynchronous hop and a path to the\n * exception lane are both the quiet line this system already has. `main` and\n * `branch` are deliberately absent — a main edge is heavier because `mainPath`\n * lists it, and a branch is simply an edge that is not on it, so both are\n * already carried by weight rather than by a second dash pattern.\n *\n * An explicit `variant` always wins: the author drew it on purpose.\n */\nconst ROLE_VARIANT: Partial<Record<WorkflowEdgeRole, Variant>> = {\n async: 'dashed',\n error: 'dashed',\n}\n\n/** How a line is drawn, once its role has had its say. */\nconst variantOf = (edge: WorkflowEdge): Variant | undefined =>\n edge.variant ?? (edge.role ? ROLE_VARIANT[edge.role] : undefined)\n\nconst GRID = {\n /** The gutter the lane names live in. */\n railW: 118,\n originY: 74,\n colW: 168,\n gapX: 58,\n laneH: 92,\n laneGap: 40,\n}\n\nexport interface WorkflowFigureProps extends FigureChrome {\n spec: WorkflowSpec\n}\n\n/**\n * A process: who does what, in what order, and where it can go wrong.\n *\n * Three structures stacked on one grid, and they are three because they answer\n * three different questions a reader brings to a runbook.\n *\n * **Lanes** are rows and answer WHO. A lane marked `exception` is the one band\n * that gets a wash rather than a rule, and it earns the exception to the\n * frames-are-rules law because nothing routes across it — it IS the ground for\n * the failure path, not a frame drawn over the happy one.\n *\n * **Phases** are columns across every lane and answer WHEN. Printed as captions\n * on one header rule, because a phase is an axis label. **Groups** are frames\n * inside a single lane and answer WHAT BELONGS TOGETHER — a planning loop, an\n * evidence path.\n *\n * THE MAIN PATH IS HEAVIER, and that is the whole hierarchy. `mainPath` lists\n * the node ids a reader should be able to follow without thinking. Every edge\n * between two consecutive ids on it is drawn at the emphasis weight whatever\n * its own variant says, which is the one thing that turns fourteen boxes and\n * nineteen arrows into a diagram with a subject. An `error` role goes the other\n * way — dashed and soft — so the exception path recedes without disappearing,\n * and so does `async`. `branch` adds no stroke of its own: a branch is an edge\n * the main path does not list, and that is already the difference on the page.\n */\nexport function WorkflowFigure({\n spec,\n className,\n legend = 'auto',\n cards = true,\n heading = true,\n activeIds,\n onSelectNode,\n}: WorkflowFigureProps) {\n const uid = useId().replace(/:/g, '')\n useSpecIdentity(spec, 'WorkflowFigure')\n const model = useMemo(\n () => buildModel(spec, uid, activeIds, onSelectNode),\n [spec, uid, activeIds, onSelectNode],\n )\n\n return (\n <DiagramFrame\n meta={spec.meta}\n model={model}\n cards={spec.cards}\n showCards={cards}\n heading={heading}\n legend={legend}\n className={className}\n activeIds={activeIds}\n onSelectNode={onSelectNode}\n />\n )\n}\n\n/** The x of a column's left edge, and of the whole span from `from` to `to`. */\nconst colX = (col: number) => GRID.railW + col * (GRID.colW + GRID.gapX)\nconst spanBox = (fromCol: number, toCol: number, y: number, h: number): Box => ({\n x: colX(fromCol),\n y,\n w: colX(toCol) + GRID.colW - colX(fromCol),\n h,\n})\n\nfunction buildModel(\n spec: WorkflowSpec,\n uid: string,\n activeIds: string[] | undefined,\n onSelectNode: ((id: string) => void) | undefined,\n): FigureModel {\n const laneIndex = new Map(spec.lanes.map((lane, index) => [lane.id, index]))\n const laneY = (index: number) => GRID.originY + index * (GRID.laneH + GRID.laneGap)\n\n // A lane id nothing declares still resolves to a row — there is nowhere else\n // to put the box — so the only thing that separates \"I meant lane 0\" from\n // \"the renderer gave up\" is being told.\n const laneOf = (id: string, owner: string) => {\n const index = laneIndex.get(id)\n if (index !== undefined) return index\n warnUnknownLane('WorkflowFigure', owner, id)\n return 0\n }\n\n const boxes = new Map<string, Box>()\n const placed = spec.nodes.map((node) => {\n const w = node.width ?? GRID.colW\n const lines = wrapText(node.label, TYPE.label, w - PLATE.padX * 2, 2)\n const h = plateHeight(lines.length, Boolean(node.sublabel), true, node.height ?? 0)\n const index = laneOf(node.lane, node.id)\n\n const box: Box = {\n x: colX(node.col),\n y: laneY(index) + (GRID.laneH - h) / 2 + (node.yOffset ?? 0),\n w,\n h,\n }\n boxes.set(node.id, box)\n return { node, box, lane: index }\n })\n\n // Consecutive pairs on the main path, so the edge between them can be drawn\n // at the weight that says \"follow this one\".\n const mainPairs = new Set<string>()\n for (let index = 0; index < (spec.mainPath?.length ?? 0) - 1; index += 1) {\n mainPairs.add(`${spec.mainPath![index]}→${spec.mainPath![index + 1]}`)\n }\n\n const edges = liveEdges('WorkflowFigure', spec.edges, (id) => boxes.has(id))\n const wires = wiresFor(edges, boxes, (edge: WorkflowEdge): Partial<Wire> => {\n const onMain = mainPairs.has(`${edge.from}→${edge.to}`)\n const variant = variantOf(edge)\n return {\n edge: variant === edge.variant ? edge : { ...edge, variant },\n weight: onMain ? 2.1 : undefined,\n open: edge.role === 'return',\n }\n })\n const { paths, labels } = renderWires(wires, uid)\n\n // A lane's band spans what the lane actually holds. Starting it at the rail\n // instead ran the exception wash under the label gutter, which made the\n // gutter look like part of the band rather than like the axis it is.\n const laneBoxes = spec.lanes.map((lane, index) => {\n const inside = placed.filter((entry) => entry.lane === index).map((entry) => entry.box)\n const span = union(inside)\n const left = span ? span.x - 14 : GRID.railW - 14\n return {\n lane,\n index,\n box: {\n x: left,\n y: laneY(index) - 8,\n w: (span ? span.x + span.w + 14 : colX(0) + GRID.colW) - left,\n h: GRID.laneH + 16,\n } as Box,\n }\n })\n\n const drawn = [...boxes.values(), ...laneBoxes.map((entry) => entry.box)]\n const headerY = GRID.originY - 30\n\n // The frame has to hold what is printed OUTSIDE the boxes too: the lane names\n // in the gutter and the phase captions above the header rule. Sizing the\n // extent from the boxes alone clipped both — and a clipped axis label is the\n // one kind of overflow a reader reads as a broken renderer rather than as a\n // long word.\n const railTextW = Math.max(0, ...spec.lanes.map((lane) => textWidth(lane.label, 9)))\n const raw = union(drawn) ?? { x: 0, y: 0, w: 600, h: 300 }\n const left = Math.min(raw.x, GRID.railW - 26 - railTextW)\n const top = Math.min(raw.y, headerY - 14)\n const extent = inflate(\n { x: left, y: top, w: raw.x + raw.w - left, h: raw.y + raw.h - top },\n 24,\n )\n const active = activeIds && activeIds.length > 0 ? new Set(activeIds) : null\n\n const artwork = (\n <>\n {/* Phases: one rule per phase, drawn across the columns that phase\n claims. A single rule spanning the figure made `toCol` a field the\n type accepted and the picture could not show — two phases starting in\n the same column printed their captions on top of each other, and a\n phase's extent was not a thing a reader could see. */}\n {(spec.phases ?? []).map((phase) => {\n const span = spanBox(phase.fromCol, Math.max(phase.fromCol, phase.toCol), headerY + 8, 0)\n const dashed = phase.variant === 'security' || phase.variant === 'dashed'\n return (\n <g key={phase.id} data-phase={phase.id} aria-hidden=\"true\">\n <path\n d={`M ${round(span.x)} ${round(span.y)} H ${round(span.x + span.w)}`}\n className={\n phase.variant === 'emphasis'\n ? 'stroke-(--diagram-rule-hard)'\n : 'stroke-(--diagram-rule)'\n }\n strokeWidth={phase.variant === 'emphasis' ? 1.6 : 1}\n strokeDasharray={dashed ? '7 4' : undefined}\n />\n <text\n x={round(span.x)}\n y={round(headerY)}\n className=\"fill-(--diagram-ink-3) font-mono [font-size:9px] [letter-spacing:0.14em] uppercase\"\n >\n {phase.label}\n </text>\n </g>\n )\n })}\n\n {/* Lanes. The exception band is the one wash in the system's diagrams. */}\n {laneBoxes.map(({ lane, box }) => (\n <g key={lane.id} aria-hidden=\"true\">\n {lane.variant === 'exception' && (\n <rect\n x={round(box.x)}\n y={round(box.y)}\n width={round(box.w)}\n height={round(box.h)}\n rx={10}\n className=\"fill-(--diagram-band) [rx:var(--radius-lg)] [ry:var(--radius-lg)]\"\n />\n )}\n <text\n x={round(GRID.railW - 26)}\n y={round(box.y + box.h / 2 + 3)}\n textAnchor=\"end\"\n className=\"fill-(--diagram-ink-3) font-mono [font-size:9px] [letter-spacing:0.14em] uppercase\"\n >\n {lane.label}\n </text>\n </g>\n ))}\n\n {/* Groups: a frame inside one lane. */}\n {(spec.groups ?? []).map((group) => {\n const index = laneOf(group.lane, group.id)\n return (\n <BandFrame\n key={group.id}\n box={spanBox(group.fromCol, group.toCol, laneY(index) - 2, GRID.laneH + 4)}\n label={group.label}\n dashed={group.variant === 'security'}\n />\n )\n })}\n\n {paths}\n\n {placed.map(({ node, box }) => (\n <NodePlate\n key={node.id}\n nodeId={node.id}\n box={box}\n label={node.label}\n sublabel={node.sublabel}\n tag={node.tag}\n kind={node.type}\n active={active?.has(node.id)}\n dimmed={active ? !active.has(node.id) : false}\n onSelect={onSelectNode ? () => onSelectNode(node.id) : undefined}\n />\n ))}\n\n {labels}\n </>\n )\n\n const used = [...new Set(edges.map((edge) => variantOf(edge) ?? 'default'))]\n\n // The lanes ARE the list's structure, not a phrase repeated on every row.\n // WHO does a step is half of where the step sits, and it was drawn only in a\n // gutter inside artwork a screen reader is told to skip.\n const bands: FigureBand[] = spec.lanes.map((lane, index) => ({\n kind: lane.variant === 'exception' ? 'Exception lane' : 'Lane',\n label: lane.label,\n ids: placed\n .filter((entry) => entry.lane === index)\n .sort((a, b) => a.node.col - b.node.col)\n .map((entry) => entry.node.id),\n }))\n\n return {\n extent,\n artwork,\n nodes: spec.nodes.map((node) => ({\n id: node.id,\n label: node.label,\n sublabel: node.sublabel,\n kind: node.type,\n })),\n edges: edges.map((edge) => ({\n from: edge.from,\n to: edge.to,\n label: edge.label,\n })),\n bands,\n // A phase and a group both cut ACROSS the lanes, so neither can be the\n // list's structure without publishing a node twice. They are sentences.\n notes: [\n ...(spec.phases ?? []).map((phase) =>\n span('Phase', phase.label, phase.fromCol, phase.toCol, spec.nodes, ''),\n ),\n ...(spec.groups ?? []).map((group) =>\n span(\n 'Group',\n group.label,\n group.fromCol,\n group.toCol,\n spec.nodes.filter((node) => node.lane === group.lane),\n ` in lane ${spec.lanes[laneIndex.get(group.lane) ?? 0]?.label ?? group.lane}`,\n ),\n ),\n ],\n legend: variantLegend(\n resolveLegend(used, spec.meta.legend?.mode, VARIANTS, spec.meta.legend?.entries),\n spec.meta.legend?.entries,\n ),\n }\n}\n\n/** One phase or group, written out: what it covers, and what is inside it. */\nfunction span(\n kind: string,\n label: string,\n fromCol: number,\n toCol: number,\n nodes: { col: number; label: string }[],\n where: string,\n): string {\n const inside = nodes.filter((node) => node.col >= fromCol && node.col <= toCol)\n const held = inside.length > 0 ? `: ${inside.map((node) => node.label).join(', ')}` : ''\n return `${kind} ${label} covers columns ${fromCol} to ${toCol}${where}${held}.`\n}\n\nexport default WorkflowFigure\n"],"mappings":";AA0FI,SAoHA,UApHA,KA8HM,YA9HN;AAxFJ,SAAS,OAAO,eAAe;AAC/B,SAAS,WAAW,iBAAiB,uBAAuB;AAC5D,SAAS,oBAA0E;AACnF,SAAS,SAAS,OAAO,WAAW,MAAM,OAAO,gBAA0B;AAC3E,SAAS,eAAe,qBAAqB;AAC7C,SAAS,WAAW,WAAW,OAAO,mBAAmB;AACzD,SAAS,aAAa,gBAA2B;AAGjD,MAAM,WAAmC,CAAC,WAAW,YAAY,YAAY,QAAQ;AAcrF,MAAM,eAA2D;AAAA,EAC/D,OAAO;AAAA,EACP,OAAO;AACT;AAGA,MAAM,YAAY,CAAC,SACjB,KAAK,YAAY,KAAK,OAAO,aAAa,KAAK,IAAI,IAAI;AAEzD,MAAM,OAAO;AAAA;AAAA,EAEX,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,MAAM;AAAA,EACN,OAAO;AAAA,EACP,SAAS;AACX;AA+BO,SAAS,eAAe;AAAA,EAC7B;AAAA,EACA;AAAA,EACA,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV;AAAA,EACA;AACF,GAAwB;AACtB,QAAM,MAAM,MAAM,EAAE,QAAQ,MAAM,EAAE;AACpC,kBAAgB,MAAM,gBAAgB;AACtC,QAAM,QAAQ;AAAA,IACZ,MAAM,WAAW,MAAM,KAAK,WAAW,YAAY;AAAA,IACnD,CAAC,MAAM,KAAK,WAAW,YAAY;AAAA,EACrC;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,KAAK;AAAA,MACX;AAAA,MACA,OAAO,KAAK;AAAA,MACZ,WAAW;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,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AAAA,UACA,MAAM;AAAA,UACN,MAAM;AAAA,UACN,MAAM;AAAA,UACN,KAAK,MAAM,OAAO,CAAC,SAAS,KAAK,SAAS,MAAM,IAAI;AAAA,UACpD,YAAY,KAAK,MAAM,UAAU,IAAI,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,MAAM,IAAI;AAAA,QAC7E;AAAA,MACF;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,MACN,cAAc,MAAM,KAAK,KAAK,QAAQ,MAAM,UAAU,KAAK,KAAK,QAAQ,OAAO;AAAA,MAC/E,KAAK,KAAK,QAAQ;AAAA,IACpB;AAAA,EACF;AACF;AAGA,SAAS,KACP,MACA,OACA,SACA,OACA,OACA,OACQ;AACR,QAAM,SAAS,MAAM,OAAO,CAAC,SAAS,KAAK,OAAO,WAAW,KAAK,OAAO,KAAK;AAC9E,QAAM,OAAO,OAAO,SAAS,IAAI,KAAK,OAAO,IAAI,CAAC,SAAS,KAAK,KAAK,EAAE,KAAK,IAAI,CAAC,KAAK;AACtF,SAAO,GAAG,IAAI,IAAI,KAAK,mBAAmB,OAAO,OAAO,KAAK,GAAG,KAAK,GAAG,IAAI;AAC9E;AAEA,IAAO,yBAAQ;","names":["span","left"]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { 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 } from './spec.js';
|
|
2
|
+
export { ArchitectureFigure, ArchitectureFigureProps } from './ArchitectureFigure/ArchitectureFigure.js';
|
|
3
|
+
export { WorkflowFigure, WorkflowFigureProps } from './WorkflowFigure/WorkflowFigure.js';
|
|
4
|
+
export { SequenceFigure, SequenceFigureProps } from './SequenceFigure/SequenceFigure.js';
|
|
5
|
+
export { DataflowFigure, DataflowFigureProps } from './DataflowFigure/DataflowFigure.js';
|
|
6
|
+
export { LifecycleFigure, LifecycleFigureProps } from './LifecycleFigure/LifecycleFigure.js';
|
|
7
|
+
export { CanvasView, DiagramCanvas, DiagramCanvasHandle, DiagramCanvasProps } from './DiagramCanvas/DiagramCanvas.js';
|
|
8
|
+
export { DiagramToolbar, DiagramToolbarGroup, DiagramToolbarProps } from './DiagramToolbar/DiagramToolbar.js';
|
|
9
|
+
export { DiagramExportMenu, DiagramExportMenuProps, ExportFormat, ExportResult, exportFigure } from './DiagramExportMenu/DiagramExportMenu.js';
|
|
10
|
+
export { DiagramInspector, DiagramInspectorProps, InspectorFact, InspectorLink } from './DiagramInspector/DiagramInspector.js';
|
|
11
|
+
export { DiagramMinimap, DiagramMinimapProps } from './DiagramMinimap/DiagramMinimap.js';
|
|
12
|
+
export { DiagramLegend, DiagramLegendEntry, DiagramLegendProps } from './DiagramLegend/DiagramLegend.js';
|
|
13
|
+
export { RasterFormat, RasterOptions, SerializeOptions, downloadBlob, exportFilename, rasterize, serializeSvg } from '../lib/svg-export.js';
|
|
14
|
+
export { LegendEntry, kindLegend, resolveLegend, stateLegend, variantLegend } from './lib/legend.js';
|
|
15
|
+
export { FigureChrome } from './lib/frame.js';
|
|
16
|
+
import 'react';
|
|
17
|
+
import './lib/geometry.js';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from "./ArchitectureFigure/ArchitectureFigure.js";
|
|
2
|
+
export * from "./WorkflowFigure/WorkflowFigure.js";
|
|
3
|
+
export * from "./SequenceFigure/SequenceFigure.js";
|
|
4
|
+
export * from "./DataflowFigure/DataflowFigure.js";
|
|
5
|
+
export * from "./LifecycleFigure/LifecycleFigure.js";
|
|
6
|
+
export * from "./DiagramCanvas/DiagramCanvas.js";
|
|
7
|
+
export * from "./DiagramToolbar/DiagramToolbar.js";
|
|
8
|
+
export * from "./DiagramExportMenu/DiagramExportMenu.js";
|
|
9
|
+
export * from "./DiagramInspector/DiagramInspector.js";
|
|
10
|
+
export * from "./DiagramMinimap/DiagramMinimap.js";
|
|
11
|
+
export * from "./DiagramLegend/DiagramLegend.js";
|
|
12
|
+
import {
|
|
13
|
+
downloadBlob,
|
|
14
|
+
exportFilename,
|
|
15
|
+
rasterize,
|
|
16
|
+
serializeSvg
|
|
17
|
+
} from "../lib/svg-export.js";
|
|
18
|
+
import { kindLegend, resolveLegend, stateLegend, variantLegend } from "./lib/legend.js";
|
|
19
|
+
export {
|
|
20
|
+
downloadBlob,
|
|
21
|
+
exportFilename,
|
|
22
|
+
kindLegend,
|
|
23
|
+
rasterize,
|
|
24
|
+
resolveLegend,
|
|
25
|
+
serializeSvg,
|
|
26
|
+
stateLegend,
|
|
27
|
+
variantLegend
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/diagrams/index.ts"],"sourcesContent":["/**\n * @misoto22/design/diagrams — the public entry.\n *\n * Five renderers for the five diagram shapes software actually needs, plus the\n * chrome a reader explores one with. They ship from their own entry point\n * rather than from the package root for one reason: a page that renders a Badge\n * should not be paying for a routing engine. Nothing under `src/components`\n * imports anything here, so the main barrel stays the size it was.\n *\n * The specification types mirror\n * [archify](https://github.com/tt-a1i/archify)'s published JSON schemas, so a\n * document authored for that tool renders here with no translation step — in\n * this system's own monochrome terms rather than in archify's palette.\n *\n * The look ships with the rest of the package:\n *\n * import '@misoto22/design/styles.css'\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// ─── Specifications ───\nexport type {\n ArchitectureBoundary,\n ArchitectureComponent,\n ArchitectureSpec,\n DataflowEdge,\n DataflowNode,\n DataflowSpec,\n DataflowStage,\n DiagramCard,\n DiagramMeta,\n DiagramSpecAny,\n DiagramView,\n EdgeBase,\n LegendMode,\n LifecycleLane,\n LifecycleSpec,\n LifecycleState,\n LifecycleStateKind,\n LifecycleTransition,\n NodeBase,\n NodeKind,\n Point,\n RouteMode,\n SequenceActivation,\n SequenceMessage,\n SequenceParticipant,\n SequenceSegment,\n SequenceSpec,\n Side,\n SourceRef,\n Variant,\n WorkflowEdge,\n WorkflowEdgeRole,\n WorkflowGroup,\n WorkflowLane,\n WorkflowNode,\n WorkflowPhase,\n WorkflowSpec,\n} from './spec'\n\n// ─── Figures ───\nexport * from './ArchitectureFigure/ArchitectureFigure'\nexport * from './WorkflowFigure/WorkflowFigure'\nexport * from './SequenceFigure/SequenceFigure'\nexport * from './DataflowFigure/DataflowFigure'\nexport * from './LifecycleFigure/LifecycleFigure'\n\n// ─── Chrome ───\nexport * from './DiagramCanvas/DiagramCanvas'\nexport * from './DiagramToolbar/DiagramToolbar'\nexport * from './DiagramExportMenu/DiagramExportMenu'\nexport * from './DiagramInspector/DiagramInspector'\nexport * from './DiagramMinimap/DiagramMinimap'\nexport * from './DiagramLegend/DiagramLegend'\n\n// ─── Taking a figure off the page ───\n/**\n * The export pipeline the menu runs, for a caller who needs a different one.\n *\n * `DiagramExportMenu` is five decisions already made — a plate behind the\n * artwork, 2× raster, a 1200 × 630 share card — and a caller who wants any of\n * them differently had nothing to build on: the serialiser is where the hard\n * half lives (resolving `var(--ink)` against the live element, so the file is\n * not an invisible rectangle), and it was private.\n */\nexport {\n downloadBlob,\n exportFilename,\n rasterize,\n serializeSvg,\n} from '../lib/svg-export'\nexport type { RasterFormat, RasterOptions, SerializeOptions } from '../lib/svg-export'\n\n// ─── Building a key ───\nexport { kindLegend, resolveLegend, stateLegend, variantLegend } from './lib/legend'\nexport type { LegendEntry } from './lib/legend'\n\n// ─── Shared chrome types ───\nexport type { FigureChrome } from './lib/frame'\n"],"mappings":"AAgEA,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAGd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AAYd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAIP,SAAS,YAAY,eAAe,aAAa,qBAAqB;","names":[]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The ways a diagram specification can typecheck and draw something else.
|
|
3
|
+
*
|
|
4
|
+
* A figure has no runtime validator and should not grow one: the specification
|
|
5
|
+
* is a plain object, the layout is arithmetic on numbers it already carries,
|
|
6
|
+
* and a schema check would be a second copy of the types. What it needs instead
|
|
7
|
+
* is the same thing the components have — a word at the moment the arithmetic
|
|
8
|
+
* is asked to do something the author cannot have meant.
|
|
9
|
+
*
|
|
10
|
+
* Every case here shares one shape: the renderer CAN produce a picture, so
|
|
11
|
+
* nothing throws, and the picture is not the one the specification describes.
|
|
12
|
+
* A lane id nothing declares resolves to lane 0 and the step is drawn in the
|
|
13
|
+
* wrong band; a stage past the last heading is drawn past the last heading; a
|
|
14
|
+
* message to a participant that does not exist is drawn nowhere at all. Each of
|
|
15
|
+
* those used to be silent, and silence is the one outcome ruled out: an author
|
|
16
|
+
* who cannot see the difference between "I placed this" and "the renderer gave
|
|
17
|
+
* up" has no way to find the mistake except by knowing what the picture should
|
|
18
|
+
* have looked like.
|
|
19
|
+
*
|
|
20
|
+
* All of it goes through `lib/warn`, so it is dev-only, printed once per
|
|
21
|
+
* problem, and dropped from a production bundle by the consumer's own bundler.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Says so when a figure is handed the same object it was handed last time, with
|
|
25
|
+
* different contents inside it.
|
|
26
|
+
*
|
|
27
|
+
* Every figure memoises its model on the specification's IDENTITY, which is the
|
|
28
|
+
* only key that costs nothing to compare — and which a `spec.components.push()`
|
|
29
|
+
* does not change. The figure then goes on drawing the picture it was first
|
|
30
|
+
* given, through any number of re-renders, with no error and no clue.
|
|
31
|
+
*
|
|
32
|
+
* The fingerprint is only computed in development, and only ever compared with
|
|
33
|
+
* the previous render's: it is a diagnostic, not the memo key. Making it the
|
|
34
|
+
* memo key would put a `JSON.stringify` of the whole specification in front of
|
|
35
|
+
* every production render, which is a far worse trade than asking the author to
|
|
36
|
+
* build a new object.
|
|
37
|
+
*/
|
|
38
|
+
declare function useSpecIdentity(spec: unknown, component: string): void;
|
|
39
|
+
/** Says so when a node names a lane the specification never declared. */
|
|
40
|
+
declare function warnUnknownLane(component: string, nodeId: string, lane: string): void;
|
|
41
|
+
/** Says so when a data-flow node sits past the last stage heading. */
|
|
42
|
+
declare function warnStageOutOfRange(component: string, nodeId: string, stage: number, stages: number): void;
|
|
43
|
+
/** Says so when two boxes were placed on exactly the same coordinate. */
|
|
44
|
+
declare function warnCollision(component: string, ids: string[]): void;
|
|
45
|
+
/**
|
|
46
|
+
* The edges whose two ends exist, with a word about the ones that do not.
|
|
47
|
+
*
|
|
48
|
+
* Routing already drops a line it cannot place — there is no box to draw it
|
|
49
|
+
* between — and the summary list used to iterate the specification instead, so
|
|
50
|
+
* the picture and its text equivalent disagreed: one showed nothing, the other
|
|
51
|
+
* reported a relationship to an id no node claims. Both halves now read this,
|
|
52
|
+
* which is what makes them agree by construction rather than by inspection.
|
|
53
|
+
*/
|
|
54
|
+
declare function liveEdges<E extends {
|
|
55
|
+
from: string;
|
|
56
|
+
to: string;
|
|
57
|
+
}>(component: string, edges: E[] | undefined, known: (id: string) => boolean): E[];
|
|
58
|
+
/** Says so when anything else in the spec points at an id nothing declares. */
|
|
59
|
+
declare function warnUnknownRef(component: string, field: string, id: string, effect: string): void;
|
|
60
|
+
|
|
61
|
+
export { liveEdges, useSpecIdentity, warnCollision, warnStageOutOfRange, warnUnknownLane, warnUnknownRef };
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRef } from "react";
|
|
3
|
+
import { DEV, warn } from "../../lib/warn.js";
|
|
4
|
+
function useSpecIdentity(spec, component) {
|
|
5
|
+
const last = useRef(null);
|
|
6
|
+
if (!DEV) return;
|
|
7
|
+
const print = fingerprint(spec);
|
|
8
|
+
const previous = last.current;
|
|
9
|
+
last.current = { spec, print };
|
|
10
|
+
if (previous && previous.spec === spec && previous.print !== print) {
|
|
11
|
+
warn({
|
|
12
|
+
code: "DIAGRAM_SPEC_MUTATED",
|
|
13
|
+
problem: `${component} was given the same spec object with different contents. The model is memoised on the object's identity, so the figure is still drawing what that object held on the first render.`,
|
|
14
|
+
field: `${component}.spec`,
|
|
15
|
+
fix: "Build a new spec object for the change \u2014 { ...spec, nodes: [...] } \u2014 rather than mutating the one already passed.",
|
|
16
|
+
component
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function fingerprint(value) {
|
|
21
|
+
try {
|
|
22
|
+
return JSON.stringify(value) ?? "";
|
|
23
|
+
} catch {
|
|
24
|
+
return "";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function warnUnknownLane(component, nodeId, lane) {
|
|
28
|
+
if (!DEV) return;
|
|
29
|
+
warn({
|
|
30
|
+
code: "DIAGRAM_LANE_UNKNOWN",
|
|
31
|
+
problem: `${component} was given the lane "${lane}" on "${nodeId}", which no lane in the specification declares. It falls back to the first lane, so the node is drawn in the right column and the wrong band.`,
|
|
32
|
+
field: `${component}.nodes[${nodeId}].lane`,
|
|
33
|
+
fix: `Use one of the ids in spec.lanes, or add a lane whose id is "${lane}".`,
|
|
34
|
+
component
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function warnStageOutOfRange(component, nodeId, stage, stages) {
|
|
38
|
+
if (!DEV) return;
|
|
39
|
+
warn({
|
|
40
|
+
code: "DIAGRAM_STAGE_OUT_OF_RANGE",
|
|
41
|
+
problem: `${component} was given stage ${stage} on "${nodeId}" against ${stages} declared stages. A node's x is computed from its own index, so it is drawn past the last heading \u2014 in a column the axis does not label.`,
|
|
42
|
+
field: `${component}.nodes[${nodeId}].stage`,
|
|
43
|
+
fix: `Use a stage between 0 and ${Math.max(0, stages - 1)}, or declare the stages the pipeline actually has.`,
|
|
44
|
+
component
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function warnCollision(component, ids) {
|
|
48
|
+
if (!DEV) return;
|
|
49
|
+
warn({
|
|
50
|
+
code: "DIAGRAM_CELL_COLLISION",
|
|
51
|
+
problem: `${component} placed ${ids.map((id) => `"${id}"`).join(" and ")} at the same coordinate, so one plate is drawn on top of the other. Both are still in the summary list, so the mistake exists only in the picture.`,
|
|
52
|
+
field: `${component}.components[${ids[0]}]`,
|
|
53
|
+
fix: "Give each of them its own row and col, or its own pos.",
|
|
54
|
+
component
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
function liveEdges(component, edges, known) {
|
|
58
|
+
if (!edges) return [];
|
|
59
|
+
const out = [];
|
|
60
|
+
for (const edge of edges) {
|
|
61
|
+
const missing = [edge.from, edge.to].filter((id) => !known(id));
|
|
62
|
+
if (missing.length === 0) {
|
|
63
|
+
out.push(edge);
|
|
64
|
+
continue;
|
|
65
|
+
}
|
|
66
|
+
if (DEV) {
|
|
67
|
+
warn({
|
|
68
|
+
code: "DIAGRAM_EDGE_DANGLING",
|
|
69
|
+
problem: `${component} was given a relationship ${edge.from} \u2192 ${edge.to}, and ${missing.map((id) => `"${id}"`).join(" and ")} is not a node the specification declares. There is nothing to draw it between, so it is left out of the picture and out of the summary.`,
|
|
70
|
+
field: `${component}.edges[${edge.from}\u2192${edge.to}]`,
|
|
71
|
+
fix: "Correct the id, or add the node it names.",
|
|
72
|
+
component
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return out;
|
|
77
|
+
}
|
|
78
|
+
function warnUnknownRef(component, field, id, effect) {
|
|
79
|
+
if (!DEV) return;
|
|
80
|
+
warn({
|
|
81
|
+
code: "DIAGRAM_REF_UNKNOWN",
|
|
82
|
+
problem: `${component} was given "${id}" in ${field}, which no node in the specification declares, so ${effect}.`,
|
|
83
|
+
field: `${component}.${field}`,
|
|
84
|
+
fix: "Correct the id, or add the node it names.",
|
|
85
|
+
component
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
liveEdges,
|
|
90
|
+
useSpecIdentity,
|
|
91
|
+
warnCollision,
|
|
92
|
+
warnStageOutOfRange,
|
|
93
|
+
warnUnknownLane,
|
|
94
|
+
warnUnknownRef
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=dev.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/diagrams/lib/dev.ts"],"sourcesContent":["'use client'\n\nimport { useRef } from 'react'\nimport { DEV, warn } from '../../lib/warn'\n\n/**\n * The ways a diagram specification can typecheck and draw something else.\n *\n * A figure has no runtime validator and should not grow one: the specification\n * is a plain object, the layout is arithmetic on numbers it already carries,\n * and a schema check would be a second copy of the types. What it needs instead\n * is the same thing the components have — a word at the moment the arithmetic\n * is asked to do something the author cannot have meant.\n *\n * Every case here shares one shape: the renderer CAN produce a picture, so\n * nothing throws, and the picture is not the one the specification describes.\n * A lane id nothing declares resolves to lane 0 and the step is drawn in the\n * wrong band; a stage past the last heading is drawn past the last heading; a\n * message to a participant that does not exist is drawn nowhere at all. Each of\n * those used to be silent, and silence is the one outcome ruled out: an author\n * who cannot see the difference between \"I placed this\" and \"the renderer gave\n * up\" has no way to find the mistake except by knowing what the picture should\n * have looked like.\n *\n * All of it goes through `lib/warn`, so it is dev-only, printed once per\n * problem, and dropped from a production bundle by the consumer's own bundler.\n */\n\n/**\n * Says so when a figure is handed the same object it was handed last time, with\n * different contents inside it.\n *\n * Every figure memoises its model on the specification's IDENTITY, which is the\n * only key that costs nothing to compare — and which a `spec.components.push()`\n * does not change. The figure then goes on drawing the picture it was first\n * given, through any number of re-renders, with no error and no clue.\n *\n * The fingerprint is only computed in development, and only ever compared with\n * the previous render's: it is a diagnostic, not the memo key. Making it the\n * memo key would put a `JSON.stringify` of the whole specification in front of\n * every production render, which is a far worse trade than asking the author to\n * build a new object.\n */\nexport function useSpecIdentity(spec: unknown, component: string): void {\n const last = useRef<{ spec: unknown; print: string } | null>(null)\n if (!DEV) return\n\n const print = fingerprint(spec)\n const previous = last.current\n last.current = { spec, print }\n\n if (previous && previous.spec === spec && previous.print !== print) {\n warn({\n code: 'DIAGRAM_SPEC_MUTATED',\n problem: `${component} was given the same spec object with different contents. The model is memoised on the object's identity, so the figure is still drawing what that object held on the first render.`,\n field: `${component}.spec`,\n fix: 'Build a new spec object for the change — { ...spec, nodes: [...] } — rather than mutating the one already passed.',\n component,\n })\n }\n}\n\nfunction fingerprint(value: unknown): string {\n try {\n return JSON.stringify(value) ?? ''\n } catch {\n // A spec that cannot be serialised cannot be fingerprinted either. It is\n // not this function's job to complain about that.\n return ''\n }\n}\n\n/** Says so when a node names a lane the specification never declared. */\nexport function warnUnknownLane(component: string, nodeId: string, lane: string): void {\n if (!DEV) return\n warn({\n code: 'DIAGRAM_LANE_UNKNOWN',\n problem: `${component} was given the lane \"${lane}\" on \"${nodeId}\", which no lane in the specification declares. It falls back to the first lane, so the node is drawn in the right column and the wrong band.`,\n field: `${component}.nodes[${nodeId}].lane`,\n fix: `Use one of the ids in spec.lanes, or add a lane whose id is \"${lane}\".`,\n component,\n })\n}\n\n/** Says so when a data-flow node sits past the last stage heading. */\nexport function warnStageOutOfRange(\n component: string,\n nodeId: string,\n stage: number,\n stages: number,\n): void {\n if (!DEV) return\n warn({\n code: 'DIAGRAM_STAGE_OUT_OF_RANGE',\n problem: `${component} was given stage ${stage} on \"${nodeId}\" against ${stages} declared stages. A node's x is computed from its own index, so it is drawn past the last heading — in a column the axis does not label.`,\n field: `${component}.nodes[${nodeId}].stage`,\n fix: `Use a stage between 0 and ${Math.max(0, stages - 1)}, or declare the stages the pipeline actually has.`,\n component,\n })\n}\n\n/** Says so when two boxes were placed on exactly the same coordinate. */\nexport function warnCollision(component: string, ids: string[]): void {\n if (!DEV) return\n warn({\n code: 'DIAGRAM_CELL_COLLISION',\n problem: `${component} placed ${ids.map((id) => `\"${id}\"`).join(' and ')} at the same coordinate, so one plate is drawn on top of the other. Both are still in the summary list, so the mistake exists only in the picture.`,\n field: `${component}.components[${ids[0]}]`,\n fix: 'Give each of them its own row and col, or its own pos.',\n component,\n })\n}\n\n/**\n * The edges whose two ends exist, with a word about the ones that do not.\n *\n * Routing already drops a line it cannot place — there is no box to draw it\n * between — and the summary list used to iterate the specification instead, so\n * the picture and its text equivalent disagreed: one showed nothing, the other\n * reported a relationship to an id no node claims. Both halves now read this,\n * which is what makes them agree by construction rather than by inspection.\n */\nexport function liveEdges<E extends { from: string; to: string }>(\n component: string,\n edges: E[] | undefined,\n known: (id: string) => boolean,\n): E[] {\n if (!edges) return []\n const out: E[] = []\n for (const edge of edges) {\n const missing = [edge.from, edge.to].filter((id) => !known(id))\n if (missing.length === 0) {\n out.push(edge)\n continue\n }\n if (DEV) {\n warn({\n code: 'DIAGRAM_EDGE_DANGLING',\n problem: `${component} was given a relationship ${edge.from} → ${edge.to}, and ${missing.map((id) => `\"${id}\"`).join(' and ')} is not a node the specification declares. There is nothing to draw it between, so it is left out of the picture and out of the summary.`,\n field: `${component}.edges[${edge.from}→${edge.to}]`,\n fix: 'Correct the id, or add the node it names.',\n component,\n })\n }\n }\n return out\n}\n\n/** Says so when anything else in the spec points at an id nothing declares. */\nexport function warnUnknownRef(\n component: string,\n field: string,\n id: string,\n effect: string,\n): void {\n if (!DEV) return\n warn({\n code: 'DIAGRAM_REF_UNKNOWN',\n problem: `${component} was given \"${id}\" in ${field}, which no node in the specification declares, so ${effect}.`,\n field: `${component}.${field}`,\n fix: 'Correct the id, or add the node it names.',\n component,\n })\n}\n"],"mappings":";AAEA,SAAS,cAAc;AACvB,SAAS,KAAK,YAAY;AAwCnB,SAAS,gBAAgB,MAAe,WAAyB;AACtE,QAAM,OAAO,OAAgD,IAAI;AACjE,MAAI,CAAC,IAAK;AAEV,QAAM,QAA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