vizmatic 0.2.0 → 0.3.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/dist/index.d.cts CHANGED
@@ -808,6 +808,9 @@ interface FlowProps {
808
808
  }
809
809
  declare function Flow({ stages, c, direction, gap, connectorLength, connectorTone, align, math, }: FlowProps): React.ReactElement;
810
810
 
811
+ type GraphRouting = 'dagre' | 'straight' | 'orthogonal';
812
+ type GraphPortSide = 'top' | 'right' | 'bottom' | 'left';
813
+
811
814
  interface LayeredNetworkLayer {
812
815
  title: string;
813
816
  nodes: string[];
@@ -842,6 +845,13 @@ interface GraphDiagramNode {
842
845
  group?: string;
843
846
  icon?: IconName | DiagramIconDefinition | React.ReactElement;
844
847
  iconSize?: number;
848
+ ports?: GraphDiagramPort[];
849
+ }
850
+ /** A fixed geometric connector anchor on a node boundary. Offset runs left to right or top to bottom. */
851
+ interface GraphDiagramPort {
852
+ id: string;
853
+ side: GraphPortSide;
854
+ offset?: number;
845
855
  }
846
856
  interface DiagramIconRenderProps {
847
857
  c: ThemeColors;
@@ -879,6 +889,10 @@ interface GraphDiagramEdge {
879
889
  arrow?: GraphDiagramEdgeArrow;
880
890
  href?: string;
881
891
  title?: string;
892
+ fromPort?: string;
893
+ toPort?: string;
894
+ fromSide?: GraphPortSide;
895
+ toSide?: GraphPortSide;
882
896
  }
883
897
  interface GraphDiagramProps {
884
898
  nodes: GraphDiagramNode[];
@@ -898,6 +912,10 @@ interface GraphDiagramProps {
898
912
  nodeGap?: number;
899
913
  rankGap?: number;
900
914
  edgeGap?: number;
915
+ /** Dagre retains existing routes. Orthogonal routes avoid node boxes and group headers. */
916
+ routing?: GraphRouting;
917
+ /** Minimum node clearance in logical pixels for orthogonal routing. */
918
+ routingClearance?: number;
901
919
  sizing?: 'content' | 'fixed';
902
920
  iconSize?: number;
903
921
  id?: string;
@@ -905,7 +923,7 @@ interface GraphDiagramProps {
905
923
  title?: string;
906
924
  description?: string;
907
925
  }
908
- declare function GraphDiagram({ nodes, edges, groups, c, width, height, nodeWidth, nodeHeight, labelFontSize, detailFontSize, arrowSize, padding, layout: requestedLayout, direction, nodeGap, rankGap, edgeGap, sizing, iconSize, id, ariaLabel, title, description, }: GraphDiagramProps): React.ReactElement;
926
+ declare function GraphDiagram({ nodes, edges, groups, c, width, height, nodeWidth, nodeHeight, labelFontSize, detailFontSize, arrowSize, padding, layout: requestedLayout, direction, nodeGap, rankGap, edgeGap, routing, routingClearance, sizing, iconSize, id, ariaLabel, title, description, }: GraphDiagramProps): React.ReactElement;
909
927
  interface TreeNodeSpec {
910
928
  label: React.ReactNode;
911
929
  id?: string;
@@ -1117,11 +1135,13 @@ interface DataflowDiagramProps extends DataflowSpec {
1117
1135
  nodeGap?: number;
1118
1136
  rankGap?: number;
1119
1137
  edgeGap?: number;
1138
+ routing?: GraphDiagramProps['routing'];
1139
+ routingClearance?: GraphDiagramProps['routingClearance'];
1120
1140
  sizing?: GraphDiagramProps['sizing'];
1121
1141
  iconSize?: number;
1122
1142
  }
1123
1143
  /** Render typed dataflow nodes and edges through the existing GraphDiagram. */
1124
- declare function DataflowDiagram({ c, nodes, edges, boundaries, ariaLabel, id, title, description, width, height, nodeWidth, nodeHeight, labelFontSize, detailFontSize, arrowSize, padding, direction, nodeGap, rankGap, edgeGap, sizing, iconSize, }: DataflowDiagramProps): React.ReactElement;
1144
+ declare function DataflowDiagram({ c, nodes, edges, boundaries, ariaLabel, id, title, description, width, height, nodeWidth, nodeHeight, labelFontSize, detailFontSize, arrowSize, padding, direction, nodeGap, rankGap, edgeGap, routing, routingClearance, sizing, iconSize, }: DataflowDiagramProps): React.ReactElement;
1125
1145
 
1126
1146
  /** Deployment boundary kinds understood by {@link DeploymentDiagram}. */
1127
1147
  type DeploymentBoundaryKind = 'region' | 'zone' | 'vpc' | 'subnet' | 'namespace' | 'host' | 'cluster' | 'trust';
@@ -1136,6 +1156,8 @@ interface DeploymentPort {
1136
1156
  protocol?: string;
1137
1157
  label?: string;
1138
1158
  direction?: DeploymentPortDirection;
1159
+ side?: GraphPortSide;
1160
+ offset?: number;
1139
1161
  }
1140
1162
  type DeploymentPortInput = DeploymentPort | string | number;
1141
1163
  /** A nested infrastructure or trust boundary. */
@@ -1149,7 +1171,7 @@ interface DeploymentBoundary {
1149
1171
  muted?: boolean;
1150
1172
  }
1151
1173
  /** A typed service, workload, host, or external endpoint. */
1152
- interface DeploymentNode extends Omit<GraphDiagramNode, 'label' | 'detail' | 'group' | 'icon'> {
1174
+ interface DeploymentNode extends Omit<GraphDiagramNode, 'label' | 'detail' | 'group' | 'icon' | 'ports'> {
1153
1175
  id: string;
1154
1176
  label: React.ReactNode;
1155
1177
  detail?: React.ReactNode;
@@ -1160,7 +1182,7 @@ interface DeploymentNode extends Omit<GraphDiagramNode, 'label' | 'detail' | 'gr
1160
1182
  }
1161
1183
  type DeploymentConnectionKind = 'ingress' | 'egress' | 'internal' | 'cross-boundary';
1162
1184
  /** A typed network relationship between two deployment nodes. */
1163
- interface DeploymentConnection extends Omit<GraphDiagramEdge, 'from' | 'to' | 'label' | 'kind' | 'style' | 'arrow'> {
1185
+ interface DeploymentConnection extends Omit<GraphDiagramEdge, 'from' | 'to' | 'label' | 'kind' | 'style' | 'arrow' | 'fromPort' | 'toPort'> {
1164
1186
  id?: string;
1165
1187
  from: string;
1166
1188
  to: string;
@@ -1431,7 +1453,7 @@ interface ChartFrameProps {
1431
1453
  padding?: number;
1432
1454
  }
1433
1455
  declare function createPlotArea(width: number, height: number, margin: ChartMargins): PlotArea;
1434
- declare function ChartFrame({ children, c, title, subtitle, legend, footer, width, height, padding, }: ChartFrameProps): React.ReactElement;
1456
+ declare function ChartFrame(props: ChartFrameProps): React.ReactElement;
1435
1457
  interface DonutChartSegment {
1436
1458
  label: string;
1437
1459
  value: number;
@@ -1453,6 +1475,21 @@ interface DonutChartProps {
1453
1475
  showLegend?: boolean;
1454
1476
  footer?: string;
1455
1477
  }
1478
+ /** Pie chart values must be finite, non-negative counts. Zero-valued slices are omitted. */
1479
+ interface PieChartProps {
1480
+ segments: DonutChartSegment[];
1481
+ c: ThemeColors;
1482
+ title?: string;
1483
+ subtitle?: string;
1484
+ width?: number;
1485
+ height?: number;
1486
+ size?: number;
1487
+ format?: ChartValueFormat;
1488
+ showLegend?: boolean;
1489
+ footer?: string;
1490
+ }
1491
+ /** A categorical part-to-whole chart with a full circular radius. */
1492
+ declare function PieChart({ segments, c, title, subtitle, width, height, size, format, showLegend, footer, }: PieChartProps): React.ReactElement;
1456
1493
  declare function DonutChart({ segments, c, title, subtitle, width, height, size, thickness, format, centerLabel, centerValue, showLegend, footer, }: DonutChartProps): React.ReactElement;
1457
1494
  interface BarChartDatum {
1458
1495
  label: string;
@@ -1492,6 +1529,20 @@ interface BarChartProps {
1492
1529
  footer?: string;
1493
1530
  }
1494
1531
  declare function BarChart({ data, c, title, subtitle, width, height, min, max, format, showGrid, showValues, yAxisLabel, footer, }: BarChartProps): React.ReactElement;
1532
+ interface ParetoBarChartProps {
1533
+ data: BarChartDatum[];
1534
+ c: ThemeColors;
1535
+ title?: string;
1536
+ subtitle?: string;
1537
+ width?: number;
1538
+ height?: number;
1539
+ format?: ChartValueFormat;
1540
+ showGrid?: boolean;
1541
+ showValues?: boolean;
1542
+ footer?: string;
1543
+ }
1544
+ /** A classic Pareto chart: stable descending bars with a cumulative percentage line. */
1545
+ declare function ParetoBarChart({ data, c, title, subtitle, width, height, format, showGrid, showValues, footer, }: ParetoBarChartProps): React.ReactElement;
1495
1546
  interface LineChartSeries {
1496
1547
  name: string;
1497
1548
  points: number[];
@@ -1672,6 +1723,26 @@ interface LegendProps {
1672
1723
  }
1673
1724
  declare function Legend({ items, c, title }: LegendProps): React.ReactElement;
1674
1725
 
1726
+ declare const CANVAS_ITEM_COMPONENT: unique symbol;
1727
+ interface BoardProps {
1728
+ children?: React.ReactNode;
1729
+ c: ThemeColors;
1730
+ width?: number;
1731
+ height?: number;
1732
+ background?: string;
1733
+ }
1734
+ interface CanvasItemProps {
1735
+ children?: React.ReactNode;
1736
+ x: number;
1737
+ y: number;
1738
+ width?: number;
1739
+ height?: number;
1740
+ }
1741
+ /** A fixed canvas for freely positioned, composable visuals. */
1742
+ declare function Board({ children, c, width, height, background }: BoardProps): React.ReactElement;
1743
+ /** Positions an item in Board coordinates and supplies its size to the child. */
1744
+ declare function CanvasItem({ children, x, y, width, height }: CanvasItemProps): React.ReactElement;
1745
+
1675
1746
  /**
1676
1747
  * Vizmatic — Brand
1677
1748
  *
@@ -2048,7 +2119,7 @@ declare function importD2Graph(source: string): GraphImportResult;
2048
2119
 
2049
2120
  type DiagnosticSeverity = 'error' | 'warning' | 'info';
2050
2121
  /** Stable identifiers emitted by the visual checker. Add codes without changing existing meanings. */
2051
- declare const CHECK_DIAGNOSTIC_CODES: readonly ["accessibility.low_contrast", "api.unsupported_prop", "asset.warning", "frame.load_error", "frame.unknown_preset", "layout.auto_size", "layout.connector_congestion", "layout.overflow", "layout.text_overlap", "layout.whitespace_imbalance", "readability.small_text", "render.error", "render.warning", "style.unsupported"];
2122
+ declare const CHECK_DIAGNOSTIC_CODES: readonly ["accessibility.low_contrast", "api.unsupported_prop", "asset.warning", "frame.load_error", "frame.unknown_preset", "layout.auto_size", "layout.connector_congestion", "layout.connector_unroutable", "layout.overflow", "layout.text_overlap", "layout.whitespace_imbalance", "readability.small_text", "render.error", "render.warning", "style.unsupported"];
2052
2123
  type CheckDiagnosticCode = typeof CHECK_DIAGNOSTIC_CODES[number];
2053
2124
  interface CheckDiagnosticLocation {
2054
2125
  /** React element path for diagnostics collected before layout. */
@@ -2143,4 +2214,4 @@ interface CheckFrameReport {
2143
2214
  */
2144
2215
  declare function checkFrame(input: CheckFrameInput, options?: CheckOptions): Promise<CheckFrameReport>;
2145
2216
 
2146
- export { type AnimatedScene, type AnimationCadenceAnalysis, type AnimationDefinition, type AnimationEasing, type AnimationEasingName, type AnimationFrameContext, type AnimationHoldStep, type AnimationInterpolator, type AnimationKeyframeStep, type AnimationOptions, type AnimationOutput, type AnimationOverflowContext, type AnimationParallelStep, type AnimationParallelTracks, type AnimationPropertyStep, type AnimationTimelineStep, type AnimationTweenStep, Arrow, ArrowMarkerDef, AxisPlot, type AxisPlotPath, type AxisPlotPoint, type AxisPlotVector, Badge, BadgePill, BarChart, type BarChartDatum, Box, CHECK_DIAGNOSTIC_CODES, CalloutCard, Canvas, CanvasOverflowError, Card, ChartFrame, type ChartLegendItem, type ChartMargins, type ChartValueFormat, type CheckAutoSize, type CheckAutoSizeAxes, type CheckDiagnostic, type CheckDiagnosticCode, type CheckDiagnosticCounts, type CheckDiagnosticLocation, type CheckFailurePolicy, type CheckFrameInput, type CheckFrameReport, type CheckOptions, type CheckThemeReport, CodeBlock, type CodeLineSpec, type ColorName, Column, Comparison, type ComparisonSideSpec, Connector, type CropMode, type CropRegion, DashedLine, DataTable, type DataflowBoundary, DataflowDiagram, type DataflowDiagramProps, type DataflowEdge, type DataflowEdgeMode, type DataflowNode, type DataflowNodeKind, type DataflowSchema, type DataflowSchemaDefinition, type DataflowSchemaField, type DefinedAnimation, type DeploymentBoundary, type DeploymentBoundaryKind, type DeploymentConnection, type DeploymentConnectionKind, DeploymentDiagram, type DeploymentDiagramProps, type DeploymentNode, type DeploymentNodeKind, type DeploymentPort, type DeploymentPortDirection, type DeploymentPortInput, DetailList, type DiagnosticSeverity, type DiagramIconDefinition, type DiagramIconRenderProps, DonutChart, type DonutChartSegment, DotPoint, EquationCard, Flow, FlowArrow, type FlowStageSpec, GradientChip, GraphDiagram, type GraphDiagramEdge, type GraphDiagramEdgeArrow, type GraphDiagramEdgeKind, type GraphDiagramEdgeStyle, type GraphDiagramGroup, type GraphDiagramNode, type GraphDiagramProps, type GraphImportDiagnostic, type GraphImportDiagnosticCode, type GraphImportDirection, type GraphImportGraph, type GraphImportResult, type GraphImportSource, Grid, type GridCell, Heatmap, Icon, type IconName, type IconProps, type IllustrationBuilder, type IntervalDatum, IntervalPlot, KeyValueList, type KeyValueRow, LayeredNetwork, type LayeredNetworkLayer, Legend, type LegendItem, LineChart, type LineChartSeries, MathText, Matrix, MetricCard, MiniBarChart, type MiniBarDatum, type OverflowResult, Panel, ParetoChart, type ParetoChartProps, type ParetoObjective, type ParetoXScale, Pipeline, type PipelineStage, type PlotArea, ProgressList, ProgressRow, type ProgressRowSpec, QuadrantChart, type QuadrantChartProps, type QuadrantRegion, type RenderBackground, type RenderOptions, type RenderOutput, Row, type SampleAnimationOptions, type SampledAnimationFrame, ScatterPlot, type ScatterPoint, Scene, type SequenceActivation, SequenceDiagram, type SequenceDiagramProps, type SequenceFragment, type SequenceFragmentBranch, type SequenceFragmentKind, type SequenceItem, type SequenceMessage, type SequenceMessageKind, type SequenceNote, type SequenceParticipant, type SequenceParticipantKind, Stack, StackedBar, type StackedBarSegment, type StatusKind, StatusList, StatusRow, type StatusRowSpec, StepCard, SvgFrame, SvgMathText, SvgPoint, type TensorDimension, type TensorShape, type TensorShapeObject, TextLabel, type ThemeColors, type ThemeMode, type ThemePreset, Tile, TileGrid, type TileSpec, TiledMatrix, type TiledMatrixRegion, Timeline, type TimelineEventSpec, TitleBar, type ToneName, ToneStrip, type TransformerBlock, type TransformerBlockKind, type TransformerRoute, type TransformerRouteKind, TransformerTopology, type TransformerTopologyProps, type TransitionType, TreeDiagram, type TreeNodeSpec, ValuePill, VectorArrow, VectorSegment, Watermark, type WatermarkElementProps, type WatermarkImageOptions, type WatermarkInput, type WatermarkOptions, type WatermarkPosition, WindowFrame, analyzeAnimationCadence, canvas, checkFrame, colors, createPlotArea, cropPixels, defineAnimation, defineDiagramIcon, defineIconRegistry, defineIllustration, detectBackgroundColor, detectContentBounds, detectOverflow, formatMathText, formatTensorShape, getColor, getFonts, getGradient, getReadableColor, getReadableTextColor, getReadableToneColor, getStyles, getThemeColors, getToneColor, getToneFill, getToneGradient, gradients, heatColor, hold, importD2Graph, importMermaidGraph, keyframe, loadAdditionalAsset, normalizeWatermark, parallel, renderAnimatedGif, renderAnimatedGifWithOutput, renderAnimationGif, renderAnimationGifWithOutput, renderToBuffer, renderToPng, renderToPngWithOutput, renderToSvg, sampleAnimation, sampleAnimationFrames, styles, toneGradients, tween, typography, wrapWithBrand, wrapWithWatermark };
2217
+ export { type AnimatedScene, type AnimationCadenceAnalysis, type AnimationDefinition, type AnimationEasing, type AnimationEasingName, type AnimationFrameContext, type AnimationHoldStep, type AnimationInterpolator, type AnimationKeyframeStep, type AnimationOptions, type AnimationOutput, type AnimationOverflowContext, type AnimationParallelStep, type AnimationParallelTracks, type AnimationPropertyStep, type AnimationTimelineStep, type AnimationTweenStep, Arrow, ArrowMarkerDef, AxisPlot, type AxisPlotPath, type AxisPlotPoint, type AxisPlotVector, Badge, BadgePill, BarChart, type BarChartDatum, Board, type BoardProps, Box, CANVAS_ITEM_COMPONENT, CHECK_DIAGNOSTIC_CODES, CalloutCard, Canvas, CanvasItem, type CanvasItemProps, CanvasOverflowError, Card, ChartFrame, type ChartLegendItem, type ChartMargins, type ChartValueFormat, type CheckAutoSize, type CheckAutoSizeAxes, type CheckDiagnostic, type CheckDiagnosticCode, type CheckDiagnosticCounts, type CheckDiagnosticLocation, type CheckFailurePolicy, type CheckFrameInput, type CheckFrameReport, type CheckOptions, type CheckThemeReport, CodeBlock, type CodeLineSpec, type ColorName, Column, Comparison, type ComparisonSideSpec, Connector, type CropMode, type CropRegion, DashedLine, DataTable, type DataflowBoundary, DataflowDiagram, type DataflowDiagramProps, type DataflowEdge, type DataflowEdgeMode, type DataflowNode, type DataflowNodeKind, type DataflowSchema, type DataflowSchemaDefinition, type DataflowSchemaField, type DefinedAnimation, type DeploymentBoundary, type DeploymentBoundaryKind, type DeploymentConnection, type DeploymentConnectionKind, DeploymentDiagram, type DeploymentDiagramProps, type DeploymentNode, type DeploymentNodeKind, type DeploymentPort, type DeploymentPortDirection, type DeploymentPortInput, DetailList, type DiagnosticSeverity, type DiagramIconDefinition, type DiagramIconRenderProps, DonutChart, type DonutChartSegment, DotPoint, EquationCard, Flow, FlowArrow, type FlowStageSpec, GradientChip, GraphDiagram, type GraphDiagramEdge, type GraphDiagramEdgeArrow, type GraphDiagramEdgeKind, type GraphDiagramEdgeStyle, type GraphDiagramGroup, type GraphDiagramNode, type GraphDiagramPort, type GraphDiagramProps, type GraphImportDiagnostic, type GraphImportDiagnosticCode, type GraphImportDirection, type GraphImportGraph, type GraphImportResult, type GraphImportSource, type GraphPortSide, type GraphRouting, Grid, type GridCell, Heatmap, Icon, type IconName, type IconProps, type IllustrationBuilder, type IntervalDatum, IntervalPlot, KeyValueList, type KeyValueRow, LayeredNetwork, type LayeredNetworkLayer, Legend, type LegendItem, LineChart, type LineChartSeries, MathText, Matrix, MetricCard, MiniBarChart, type MiniBarDatum, type OverflowResult, Panel, ParetoBarChart, type ParetoBarChartProps, ParetoChart, type ParetoChartProps, type ParetoObjective, type ParetoXScale, PieChart, type PieChartProps, Pipeline, type PipelineStage, type PlotArea, ProgressList, ProgressRow, type ProgressRowSpec, QuadrantChart, type QuadrantChartProps, type QuadrantRegion, type RenderBackground, type RenderOptions, type RenderOutput, Row, type SampleAnimationOptions, type SampledAnimationFrame, ScatterPlot, type ScatterPoint, Scene, type SequenceActivation, SequenceDiagram, type SequenceDiagramProps, type SequenceFragment, type SequenceFragmentBranch, type SequenceFragmentKind, type SequenceItem, type SequenceMessage, type SequenceMessageKind, type SequenceNote, type SequenceParticipant, type SequenceParticipantKind, Stack, StackedBar, type StackedBarSegment, type StatusKind, StatusList, StatusRow, type StatusRowSpec, StepCard, SvgFrame, SvgMathText, SvgPoint, type TensorDimension, type TensorShape, type TensorShapeObject, TextLabel, type ThemeColors, type ThemeMode, type ThemePreset, Tile, TileGrid, type TileSpec, TiledMatrix, type TiledMatrixRegion, Timeline, type TimelineEventSpec, TitleBar, type ToneName, ToneStrip, type TransformerBlock, type TransformerBlockKind, type TransformerRoute, type TransformerRouteKind, TransformerTopology, type TransformerTopologyProps, type TransitionType, TreeDiagram, type TreeNodeSpec, ValuePill, VectorArrow, VectorSegment, Watermark, type WatermarkElementProps, type WatermarkImageOptions, type WatermarkInput, type WatermarkOptions, type WatermarkPosition, WindowFrame, analyzeAnimationCadence, canvas, checkFrame, colors, createPlotArea, cropPixels, defineAnimation, defineDiagramIcon, defineIconRegistry, defineIllustration, detectBackgroundColor, detectContentBounds, detectOverflow, formatMathText, formatTensorShape, getColor, getFonts, getGradient, getReadableColor, getReadableTextColor, getReadableToneColor, getStyles, getThemeColors, getToneColor, getToneFill, getToneGradient, gradients, heatColor, hold, importD2Graph, importMermaidGraph, keyframe, loadAdditionalAsset, normalizeWatermark, parallel, renderAnimatedGif, renderAnimatedGifWithOutput, renderAnimationGif, renderAnimationGifWithOutput, renderToBuffer, renderToPng, renderToPngWithOutput, renderToSvg, sampleAnimation, sampleAnimationFrames, styles, toneGradients, tween, typography, wrapWithBrand, wrapWithWatermark };
package/dist/index.d.ts CHANGED
@@ -808,6 +808,9 @@ interface FlowProps {
808
808
  }
809
809
  declare function Flow({ stages, c, direction, gap, connectorLength, connectorTone, align, math, }: FlowProps): React.ReactElement;
810
810
 
811
+ type GraphRouting = 'dagre' | 'straight' | 'orthogonal';
812
+ type GraphPortSide = 'top' | 'right' | 'bottom' | 'left';
813
+
811
814
  interface LayeredNetworkLayer {
812
815
  title: string;
813
816
  nodes: string[];
@@ -842,6 +845,13 @@ interface GraphDiagramNode {
842
845
  group?: string;
843
846
  icon?: IconName | DiagramIconDefinition | React.ReactElement;
844
847
  iconSize?: number;
848
+ ports?: GraphDiagramPort[];
849
+ }
850
+ /** A fixed geometric connector anchor on a node boundary. Offset runs left to right or top to bottom. */
851
+ interface GraphDiagramPort {
852
+ id: string;
853
+ side: GraphPortSide;
854
+ offset?: number;
845
855
  }
846
856
  interface DiagramIconRenderProps {
847
857
  c: ThemeColors;
@@ -879,6 +889,10 @@ interface GraphDiagramEdge {
879
889
  arrow?: GraphDiagramEdgeArrow;
880
890
  href?: string;
881
891
  title?: string;
892
+ fromPort?: string;
893
+ toPort?: string;
894
+ fromSide?: GraphPortSide;
895
+ toSide?: GraphPortSide;
882
896
  }
883
897
  interface GraphDiagramProps {
884
898
  nodes: GraphDiagramNode[];
@@ -898,6 +912,10 @@ interface GraphDiagramProps {
898
912
  nodeGap?: number;
899
913
  rankGap?: number;
900
914
  edgeGap?: number;
915
+ /** Dagre retains existing routes. Orthogonal routes avoid node boxes and group headers. */
916
+ routing?: GraphRouting;
917
+ /** Minimum node clearance in logical pixels for orthogonal routing. */
918
+ routingClearance?: number;
901
919
  sizing?: 'content' | 'fixed';
902
920
  iconSize?: number;
903
921
  id?: string;
@@ -905,7 +923,7 @@ interface GraphDiagramProps {
905
923
  title?: string;
906
924
  description?: string;
907
925
  }
908
- declare function GraphDiagram({ nodes, edges, groups, c, width, height, nodeWidth, nodeHeight, labelFontSize, detailFontSize, arrowSize, padding, layout: requestedLayout, direction, nodeGap, rankGap, edgeGap, sizing, iconSize, id, ariaLabel, title, description, }: GraphDiagramProps): React.ReactElement;
926
+ declare function GraphDiagram({ nodes, edges, groups, c, width, height, nodeWidth, nodeHeight, labelFontSize, detailFontSize, arrowSize, padding, layout: requestedLayout, direction, nodeGap, rankGap, edgeGap, routing, routingClearance, sizing, iconSize, id, ariaLabel, title, description, }: GraphDiagramProps): React.ReactElement;
909
927
  interface TreeNodeSpec {
910
928
  label: React.ReactNode;
911
929
  id?: string;
@@ -1117,11 +1135,13 @@ interface DataflowDiagramProps extends DataflowSpec {
1117
1135
  nodeGap?: number;
1118
1136
  rankGap?: number;
1119
1137
  edgeGap?: number;
1138
+ routing?: GraphDiagramProps['routing'];
1139
+ routingClearance?: GraphDiagramProps['routingClearance'];
1120
1140
  sizing?: GraphDiagramProps['sizing'];
1121
1141
  iconSize?: number;
1122
1142
  }
1123
1143
  /** Render typed dataflow nodes and edges through the existing GraphDiagram. */
1124
- declare function DataflowDiagram({ c, nodes, edges, boundaries, ariaLabel, id, title, description, width, height, nodeWidth, nodeHeight, labelFontSize, detailFontSize, arrowSize, padding, direction, nodeGap, rankGap, edgeGap, sizing, iconSize, }: DataflowDiagramProps): React.ReactElement;
1144
+ declare function DataflowDiagram({ c, nodes, edges, boundaries, ariaLabel, id, title, description, width, height, nodeWidth, nodeHeight, labelFontSize, detailFontSize, arrowSize, padding, direction, nodeGap, rankGap, edgeGap, routing, routingClearance, sizing, iconSize, }: DataflowDiagramProps): React.ReactElement;
1125
1145
 
1126
1146
  /** Deployment boundary kinds understood by {@link DeploymentDiagram}. */
1127
1147
  type DeploymentBoundaryKind = 'region' | 'zone' | 'vpc' | 'subnet' | 'namespace' | 'host' | 'cluster' | 'trust';
@@ -1136,6 +1156,8 @@ interface DeploymentPort {
1136
1156
  protocol?: string;
1137
1157
  label?: string;
1138
1158
  direction?: DeploymentPortDirection;
1159
+ side?: GraphPortSide;
1160
+ offset?: number;
1139
1161
  }
1140
1162
  type DeploymentPortInput = DeploymentPort | string | number;
1141
1163
  /** A nested infrastructure or trust boundary. */
@@ -1149,7 +1171,7 @@ interface DeploymentBoundary {
1149
1171
  muted?: boolean;
1150
1172
  }
1151
1173
  /** A typed service, workload, host, or external endpoint. */
1152
- interface DeploymentNode extends Omit<GraphDiagramNode, 'label' | 'detail' | 'group' | 'icon'> {
1174
+ interface DeploymentNode extends Omit<GraphDiagramNode, 'label' | 'detail' | 'group' | 'icon' | 'ports'> {
1153
1175
  id: string;
1154
1176
  label: React.ReactNode;
1155
1177
  detail?: React.ReactNode;
@@ -1160,7 +1182,7 @@ interface DeploymentNode extends Omit<GraphDiagramNode, 'label' | 'detail' | 'gr
1160
1182
  }
1161
1183
  type DeploymentConnectionKind = 'ingress' | 'egress' | 'internal' | 'cross-boundary';
1162
1184
  /** A typed network relationship between two deployment nodes. */
1163
- interface DeploymentConnection extends Omit<GraphDiagramEdge, 'from' | 'to' | 'label' | 'kind' | 'style' | 'arrow'> {
1185
+ interface DeploymentConnection extends Omit<GraphDiagramEdge, 'from' | 'to' | 'label' | 'kind' | 'style' | 'arrow' | 'fromPort' | 'toPort'> {
1164
1186
  id?: string;
1165
1187
  from: string;
1166
1188
  to: string;
@@ -1431,7 +1453,7 @@ interface ChartFrameProps {
1431
1453
  padding?: number;
1432
1454
  }
1433
1455
  declare function createPlotArea(width: number, height: number, margin: ChartMargins): PlotArea;
1434
- declare function ChartFrame({ children, c, title, subtitle, legend, footer, width, height, padding, }: ChartFrameProps): React.ReactElement;
1456
+ declare function ChartFrame(props: ChartFrameProps): React.ReactElement;
1435
1457
  interface DonutChartSegment {
1436
1458
  label: string;
1437
1459
  value: number;
@@ -1453,6 +1475,21 @@ interface DonutChartProps {
1453
1475
  showLegend?: boolean;
1454
1476
  footer?: string;
1455
1477
  }
1478
+ /** Pie chart values must be finite, non-negative counts. Zero-valued slices are omitted. */
1479
+ interface PieChartProps {
1480
+ segments: DonutChartSegment[];
1481
+ c: ThemeColors;
1482
+ title?: string;
1483
+ subtitle?: string;
1484
+ width?: number;
1485
+ height?: number;
1486
+ size?: number;
1487
+ format?: ChartValueFormat;
1488
+ showLegend?: boolean;
1489
+ footer?: string;
1490
+ }
1491
+ /** A categorical part-to-whole chart with a full circular radius. */
1492
+ declare function PieChart({ segments, c, title, subtitle, width, height, size, format, showLegend, footer, }: PieChartProps): React.ReactElement;
1456
1493
  declare function DonutChart({ segments, c, title, subtitle, width, height, size, thickness, format, centerLabel, centerValue, showLegend, footer, }: DonutChartProps): React.ReactElement;
1457
1494
  interface BarChartDatum {
1458
1495
  label: string;
@@ -1492,6 +1529,20 @@ interface BarChartProps {
1492
1529
  footer?: string;
1493
1530
  }
1494
1531
  declare function BarChart({ data, c, title, subtitle, width, height, min, max, format, showGrid, showValues, yAxisLabel, footer, }: BarChartProps): React.ReactElement;
1532
+ interface ParetoBarChartProps {
1533
+ data: BarChartDatum[];
1534
+ c: ThemeColors;
1535
+ title?: string;
1536
+ subtitle?: string;
1537
+ width?: number;
1538
+ height?: number;
1539
+ format?: ChartValueFormat;
1540
+ showGrid?: boolean;
1541
+ showValues?: boolean;
1542
+ footer?: string;
1543
+ }
1544
+ /** A classic Pareto chart: stable descending bars with a cumulative percentage line. */
1545
+ declare function ParetoBarChart({ data, c, title, subtitle, width, height, format, showGrid, showValues, footer, }: ParetoBarChartProps): React.ReactElement;
1495
1546
  interface LineChartSeries {
1496
1547
  name: string;
1497
1548
  points: number[];
@@ -1672,6 +1723,26 @@ interface LegendProps {
1672
1723
  }
1673
1724
  declare function Legend({ items, c, title }: LegendProps): React.ReactElement;
1674
1725
 
1726
+ declare const CANVAS_ITEM_COMPONENT: unique symbol;
1727
+ interface BoardProps {
1728
+ children?: React.ReactNode;
1729
+ c: ThemeColors;
1730
+ width?: number;
1731
+ height?: number;
1732
+ background?: string;
1733
+ }
1734
+ interface CanvasItemProps {
1735
+ children?: React.ReactNode;
1736
+ x: number;
1737
+ y: number;
1738
+ width?: number;
1739
+ height?: number;
1740
+ }
1741
+ /** A fixed canvas for freely positioned, composable visuals. */
1742
+ declare function Board({ children, c, width, height, background }: BoardProps): React.ReactElement;
1743
+ /** Positions an item in Board coordinates and supplies its size to the child. */
1744
+ declare function CanvasItem({ children, x, y, width, height }: CanvasItemProps): React.ReactElement;
1745
+
1675
1746
  /**
1676
1747
  * Vizmatic — Brand
1677
1748
  *
@@ -2048,7 +2119,7 @@ declare function importD2Graph(source: string): GraphImportResult;
2048
2119
 
2049
2120
  type DiagnosticSeverity = 'error' | 'warning' | 'info';
2050
2121
  /** Stable identifiers emitted by the visual checker. Add codes without changing existing meanings. */
2051
- declare const CHECK_DIAGNOSTIC_CODES: readonly ["accessibility.low_contrast", "api.unsupported_prop", "asset.warning", "frame.load_error", "frame.unknown_preset", "layout.auto_size", "layout.connector_congestion", "layout.overflow", "layout.text_overlap", "layout.whitespace_imbalance", "readability.small_text", "render.error", "render.warning", "style.unsupported"];
2122
+ declare const CHECK_DIAGNOSTIC_CODES: readonly ["accessibility.low_contrast", "api.unsupported_prop", "asset.warning", "frame.load_error", "frame.unknown_preset", "layout.auto_size", "layout.connector_congestion", "layout.connector_unroutable", "layout.overflow", "layout.text_overlap", "layout.whitespace_imbalance", "readability.small_text", "render.error", "render.warning", "style.unsupported"];
2052
2123
  type CheckDiagnosticCode = typeof CHECK_DIAGNOSTIC_CODES[number];
2053
2124
  interface CheckDiagnosticLocation {
2054
2125
  /** React element path for diagnostics collected before layout. */
@@ -2143,4 +2214,4 @@ interface CheckFrameReport {
2143
2214
  */
2144
2215
  declare function checkFrame(input: CheckFrameInput, options?: CheckOptions): Promise<CheckFrameReport>;
2145
2216
 
2146
- export { type AnimatedScene, type AnimationCadenceAnalysis, type AnimationDefinition, type AnimationEasing, type AnimationEasingName, type AnimationFrameContext, type AnimationHoldStep, type AnimationInterpolator, type AnimationKeyframeStep, type AnimationOptions, type AnimationOutput, type AnimationOverflowContext, type AnimationParallelStep, type AnimationParallelTracks, type AnimationPropertyStep, type AnimationTimelineStep, type AnimationTweenStep, Arrow, ArrowMarkerDef, AxisPlot, type AxisPlotPath, type AxisPlotPoint, type AxisPlotVector, Badge, BadgePill, BarChart, type BarChartDatum, Box, CHECK_DIAGNOSTIC_CODES, CalloutCard, Canvas, CanvasOverflowError, Card, ChartFrame, type ChartLegendItem, type ChartMargins, type ChartValueFormat, type CheckAutoSize, type CheckAutoSizeAxes, type CheckDiagnostic, type CheckDiagnosticCode, type CheckDiagnosticCounts, type CheckDiagnosticLocation, type CheckFailurePolicy, type CheckFrameInput, type CheckFrameReport, type CheckOptions, type CheckThemeReport, CodeBlock, type CodeLineSpec, type ColorName, Column, Comparison, type ComparisonSideSpec, Connector, type CropMode, type CropRegion, DashedLine, DataTable, type DataflowBoundary, DataflowDiagram, type DataflowDiagramProps, type DataflowEdge, type DataflowEdgeMode, type DataflowNode, type DataflowNodeKind, type DataflowSchema, type DataflowSchemaDefinition, type DataflowSchemaField, type DefinedAnimation, type DeploymentBoundary, type DeploymentBoundaryKind, type DeploymentConnection, type DeploymentConnectionKind, DeploymentDiagram, type DeploymentDiagramProps, type DeploymentNode, type DeploymentNodeKind, type DeploymentPort, type DeploymentPortDirection, type DeploymentPortInput, DetailList, type DiagnosticSeverity, type DiagramIconDefinition, type DiagramIconRenderProps, DonutChart, type DonutChartSegment, DotPoint, EquationCard, Flow, FlowArrow, type FlowStageSpec, GradientChip, GraphDiagram, type GraphDiagramEdge, type GraphDiagramEdgeArrow, type GraphDiagramEdgeKind, type GraphDiagramEdgeStyle, type GraphDiagramGroup, type GraphDiagramNode, type GraphDiagramProps, type GraphImportDiagnostic, type GraphImportDiagnosticCode, type GraphImportDirection, type GraphImportGraph, type GraphImportResult, type GraphImportSource, Grid, type GridCell, Heatmap, Icon, type IconName, type IconProps, type IllustrationBuilder, type IntervalDatum, IntervalPlot, KeyValueList, type KeyValueRow, LayeredNetwork, type LayeredNetworkLayer, Legend, type LegendItem, LineChart, type LineChartSeries, MathText, Matrix, MetricCard, MiniBarChart, type MiniBarDatum, type OverflowResult, Panel, ParetoChart, type ParetoChartProps, type ParetoObjective, type ParetoXScale, Pipeline, type PipelineStage, type PlotArea, ProgressList, ProgressRow, type ProgressRowSpec, QuadrantChart, type QuadrantChartProps, type QuadrantRegion, type RenderBackground, type RenderOptions, type RenderOutput, Row, type SampleAnimationOptions, type SampledAnimationFrame, ScatterPlot, type ScatterPoint, Scene, type SequenceActivation, SequenceDiagram, type SequenceDiagramProps, type SequenceFragment, type SequenceFragmentBranch, type SequenceFragmentKind, type SequenceItem, type SequenceMessage, type SequenceMessageKind, type SequenceNote, type SequenceParticipant, type SequenceParticipantKind, Stack, StackedBar, type StackedBarSegment, type StatusKind, StatusList, StatusRow, type StatusRowSpec, StepCard, SvgFrame, SvgMathText, SvgPoint, type TensorDimension, type TensorShape, type TensorShapeObject, TextLabel, type ThemeColors, type ThemeMode, type ThemePreset, Tile, TileGrid, type TileSpec, TiledMatrix, type TiledMatrixRegion, Timeline, type TimelineEventSpec, TitleBar, type ToneName, ToneStrip, type TransformerBlock, type TransformerBlockKind, type TransformerRoute, type TransformerRouteKind, TransformerTopology, type TransformerTopologyProps, type TransitionType, TreeDiagram, type TreeNodeSpec, ValuePill, VectorArrow, VectorSegment, Watermark, type WatermarkElementProps, type WatermarkImageOptions, type WatermarkInput, type WatermarkOptions, type WatermarkPosition, WindowFrame, analyzeAnimationCadence, canvas, checkFrame, colors, createPlotArea, cropPixels, defineAnimation, defineDiagramIcon, defineIconRegistry, defineIllustration, detectBackgroundColor, detectContentBounds, detectOverflow, formatMathText, formatTensorShape, getColor, getFonts, getGradient, getReadableColor, getReadableTextColor, getReadableToneColor, getStyles, getThemeColors, getToneColor, getToneFill, getToneGradient, gradients, heatColor, hold, importD2Graph, importMermaidGraph, keyframe, loadAdditionalAsset, normalizeWatermark, parallel, renderAnimatedGif, renderAnimatedGifWithOutput, renderAnimationGif, renderAnimationGifWithOutput, renderToBuffer, renderToPng, renderToPngWithOutput, renderToSvg, sampleAnimation, sampleAnimationFrames, styles, toneGradients, tween, typography, wrapWithBrand, wrapWithWatermark };
2217
+ export { type AnimatedScene, type AnimationCadenceAnalysis, type AnimationDefinition, type AnimationEasing, type AnimationEasingName, type AnimationFrameContext, type AnimationHoldStep, type AnimationInterpolator, type AnimationKeyframeStep, type AnimationOptions, type AnimationOutput, type AnimationOverflowContext, type AnimationParallelStep, type AnimationParallelTracks, type AnimationPropertyStep, type AnimationTimelineStep, type AnimationTweenStep, Arrow, ArrowMarkerDef, AxisPlot, type AxisPlotPath, type AxisPlotPoint, type AxisPlotVector, Badge, BadgePill, BarChart, type BarChartDatum, Board, type BoardProps, Box, CANVAS_ITEM_COMPONENT, CHECK_DIAGNOSTIC_CODES, CalloutCard, Canvas, CanvasItem, type CanvasItemProps, CanvasOverflowError, Card, ChartFrame, type ChartLegendItem, type ChartMargins, type ChartValueFormat, type CheckAutoSize, type CheckAutoSizeAxes, type CheckDiagnostic, type CheckDiagnosticCode, type CheckDiagnosticCounts, type CheckDiagnosticLocation, type CheckFailurePolicy, type CheckFrameInput, type CheckFrameReport, type CheckOptions, type CheckThemeReport, CodeBlock, type CodeLineSpec, type ColorName, Column, Comparison, type ComparisonSideSpec, Connector, type CropMode, type CropRegion, DashedLine, DataTable, type DataflowBoundary, DataflowDiagram, type DataflowDiagramProps, type DataflowEdge, type DataflowEdgeMode, type DataflowNode, type DataflowNodeKind, type DataflowSchema, type DataflowSchemaDefinition, type DataflowSchemaField, type DefinedAnimation, type DeploymentBoundary, type DeploymentBoundaryKind, type DeploymentConnection, type DeploymentConnectionKind, DeploymentDiagram, type DeploymentDiagramProps, type DeploymentNode, type DeploymentNodeKind, type DeploymentPort, type DeploymentPortDirection, type DeploymentPortInput, DetailList, type DiagnosticSeverity, type DiagramIconDefinition, type DiagramIconRenderProps, DonutChart, type DonutChartSegment, DotPoint, EquationCard, Flow, FlowArrow, type FlowStageSpec, GradientChip, GraphDiagram, type GraphDiagramEdge, type GraphDiagramEdgeArrow, type GraphDiagramEdgeKind, type GraphDiagramEdgeStyle, type GraphDiagramGroup, type GraphDiagramNode, type GraphDiagramPort, type GraphDiagramProps, type GraphImportDiagnostic, type GraphImportDiagnosticCode, type GraphImportDirection, type GraphImportGraph, type GraphImportResult, type GraphImportSource, type GraphPortSide, type GraphRouting, Grid, type GridCell, Heatmap, Icon, type IconName, type IconProps, type IllustrationBuilder, type IntervalDatum, IntervalPlot, KeyValueList, type KeyValueRow, LayeredNetwork, type LayeredNetworkLayer, Legend, type LegendItem, LineChart, type LineChartSeries, MathText, Matrix, MetricCard, MiniBarChart, type MiniBarDatum, type OverflowResult, Panel, ParetoBarChart, type ParetoBarChartProps, ParetoChart, type ParetoChartProps, type ParetoObjective, type ParetoXScale, PieChart, type PieChartProps, Pipeline, type PipelineStage, type PlotArea, ProgressList, ProgressRow, type ProgressRowSpec, QuadrantChart, type QuadrantChartProps, type QuadrantRegion, type RenderBackground, type RenderOptions, type RenderOutput, Row, type SampleAnimationOptions, type SampledAnimationFrame, ScatterPlot, type ScatterPoint, Scene, type SequenceActivation, SequenceDiagram, type SequenceDiagramProps, type SequenceFragment, type SequenceFragmentBranch, type SequenceFragmentKind, type SequenceItem, type SequenceMessage, type SequenceMessageKind, type SequenceNote, type SequenceParticipant, type SequenceParticipantKind, Stack, StackedBar, type StackedBarSegment, type StatusKind, StatusList, StatusRow, type StatusRowSpec, StepCard, SvgFrame, SvgMathText, SvgPoint, type TensorDimension, type TensorShape, type TensorShapeObject, TextLabel, type ThemeColors, type ThemeMode, type ThemePreset, Tile, TileGrid, type TileSpec, TiledMatrix, type TiledMatrixRegion, Timeline, type TimelineEventSpec, TitleBar, type ToneName, ToneStrip, type TransformerBlock, type TransformerBlockKind, type TransformerRoute, type TransformerRouteKind, TransformerTopology, type TransformerTopologyProps, type TransitionType, TreeDiagram, type TreeNodeSpec, ValuePill, VectorArrow, VectorSegment, Watermark, type WatermarkElementProps, type WatermarkImageOptions, type WatermarkInput, type WatermarkOptions, type WatermarkPosition, WindowFrame, analyzeAnimationCadence, canvas, checkFrame, colors, createPlotArea, cropPixels, defineAnimation, defineDiagramIcon, defineIconRegistry, defineIllustration, detectBackgroundColor, detectContentBounds, detectOverflow, formatMathText, formatTensorShape, getColor, getFonts, getGradient, getReadableColor, getReadableTextColor, getReadableToneColor, getStyles, getThemeColors, getToneColor, getToneFill, getToneGradient, gradients, heatColor, hold, importD2Graph, importMermaidGraph, keyframe, loadAdditionalAsset, normalizeWatermark, parallel, renderAnimatedGif, renderAnimatedGifWithOutput, renderAnimationGif, renderAnimationGifWithOutput, renderToBuffer, renderToPng, renderToPngWithOutput, renderToSvg, sampleAnimation, sampleAnimationFrames, styles, toneGradients, tween, typography, wrapWithBrand, wrapWithWatermark };