vizmatic 0.1.42 → 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/PROMPT.md +23 -4
- package/README.md +108 -2
- package/ROADMAP.md +10 -8
- package/assets/THIRD_PARTY_LICENSES.md +12 -0
- package/assets/licenses/Apache-2.0.txt +176 -0
- package/assets/licenses/harfbuzzjs-LICENSE.txt +22 -0
- package/dist/cli.js +28 -11214
- package/dist/index.cjs +2862 -262
- package/dist/index.d.cts +237 -10
- package/dist/index.d.ts +237 -10
- package/dist/index.js +2788 -191
- package/examples/README.md +4 -0
- package/examples/orthogonal-routing.tsx +25 -0
- package/examples/pareto-bar-chart.tsx +44 -0
- package/examples/pie-chart.tsx +46 -0
- package/examples/website-workflow.tsx +38 -0
- package/package.json +18 -13
package/dist/index.d.cts
CHANGED
|
@@ -74,8 +74,8 @@ type ToneName = 'blue' | 'purple' | 'green' | 'warm' | 'cyan' | 'pink' | 'red' |
|
|
|
74
74
|
declare const toneGradients: Record<ToneName, string>;
|
|
75
75
|
declare function getToneGradient(tone: ToneName): string;
|
|
76
76
|
declare function getToneColor(tone: ToneName, c: ThemeColors): string;
|
|
77
|
-
/** Get a tone variant that remains readable
|
|
78
|
-
declare function getReadableToneColor(tone: ToneName, c: ThemeColors, background?: string): string;
|
|
77
|
+
/** Get a tone variant that remains readable against the background over its backdrop. */
|
|
78
|
+
declare function getReadableToneColor(tone: ToneName, c: ThemeColors, background?: string, backdrop?: string): string;
|
|
79
79
|
/** Low-chroma fills for diagrams. The engineering preset uses opaque pastels. */
|
|
80
80
|
declare function getToneFill(tone: ToneName, c: ThemeColors): string;
|
|
81
81
|
declare const typography: {
|
|
@@ -207,8 +207,8 @@ type ColorName = 'primary' | 'secondary' | 'positive' | 'warning' | 'critical' |
|
|
|
207
207
|
declare function getColor(name: ColorName, c?: ThemeColors): string;
|
|
208
208
|
/** Get a semantic color variant that remains readable as text in either theme. */
|
|
209
209
|
declare function getReadableColor(name: ColorName, c: ThemeColors): string;
|
|
210
|
-
/** Choose readable foreground text
|
|
211
|
-
declare function getReadableTextColor(background: string, c: ThemeColors): string;
|
|
210
|
+
/** Choose readable foreground text, compositing translucent backgrounds over their backdrop. */
|
|
211
|
+
declare function getReadableTextColor(background: string, c: ThemeColors, backdrop?: string): string;
|
|
212
212
|
/**
|
|
213
213
|
* Get a gradient by semantic name.
|
|
214
214
|
* Gradients are the same for both themes (they sit on top of content
|
|
@@ -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[];
|
|
@@ -831,6 +834,8 @@ interface GraphDiagramNode {
|
|
|
831
834
|
id: string;
|
|
832
835
|
label: React.ReactNode;
|
|
833
836
|
detail?: React.ReactNode;
|
|
837
|
+
href?: string;
|
|
838
|
+
title?: string;
|
|
834
839
|
x?: number;
|
|
835
840
|
y?: number;
|
|
836
841
|
tone?: ToneName;
|
|
@@ -840,6 +845,13 @@ interface GraphDiagramNode {
|
|
|
840
845
|
group?: string;
|
|
841
846
|
icon?: IconName | DiagramIconDefinition | React.ReactElement;
|
|
842
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;
|
|
843
855
|
}
|
|
844
856
|
interface DiagramIconRenderProps {
|
|
845
857
|
c: ThemeColors;
|
|
@@ -865,6 +877,7 @@ type GraphDiagramEdgeKind = 'sync' | 'async' | 'event' | 'data' | 'dependency' |
|
|
|
865
877
|
type GraphDiagramEdgeStyle = 'solid' | 'dashed' | 'dotted';
|
|
866
878
|
type GraphDiagramEdgeArrow = 'forward' | 'backward' | 'both' | 'none';
|
|
867
879
|
interface GraphDiagramEdge {
|
|
880
|
+
id?: string;
|
|
868
881
|
from: string;
|
|
869
882
|
to: string;
|
|
870
883
|
tone?: ToneName;
|
|
@@ -874,6 +887,12 @@ interface GraphDiagramEdge {
|
|
|
874
887
|
kind?: GraphDiagramEdgeKind;
|
|
875
888
|
style?: GraphDiagramEdgeStyle;
|
|
876
889
|
arrow?: GraphDiagramEdgeArrow;
|
|
890
|
+
href?: string;
|
|
891
|
+
title?: string;
|
|
892
|
+
fromPort?: string;
|
|
893
|
+
toPort?: string;
|
|
894
|
+
fromSide?: GraphPortSide;
|
|
895
|
+
toSide?: GraphPortSide;
|
|
877
896
|
}
|
|
878
897
|
interface GraphDiagramProps {
|
|
879
898
|
nodes: GraphDiagramNode[];
|
|
@@ -893,11 +912,18 @@ interface GraphDiagramProps {
|
|
|
893
912
|
nodeGap?: number;
|
|
894
913
|
rankGap?: number;
|
|
895
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;
|
|
896
919
|
sizing?: 'content' | 'fixed';
|
|
897
920
|
iconSize?: number;
|
|
921
|
+
id?: string;
|
|
898
922
|
ariaLabel?: string;
|
|
923
|
+
title?: string;
|
|
924
|
+
description?: string;
|
|
899
925
|
}
|
|
900
|
-
declare function GraphDiagram({ nodes, edges, groups, c, width, height, nodeWidth, nodeHeight, labelFontSize, detailFontSize, arrowSize, padding, layout: requestedLayout, direction, nodeGap, rankGap, edgeGap, sizing, iconSize, ariaLabel, }: 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;
|
|
901
927
|
interface TreeNodeSpec {
|
|
902
928
|
label: React.ReactNode;
|
|
903
929
|
id?: string;
|
|
@@ -1055,6 +1081,8 @@ interface DataflowNode {
|
|
|
1055
1081
|
id: string;
|
|
1056
1082
|
label: React.ReactNode;
|
|
1057
1083
|
detail?: React.ReactNode;
|
|
1084
|
+
href?: string;
|
|
1085
|
+
title?: string;
|
|
1058
1086
|
kind: DataflowNodeKind;
|
|
1059
1087
|
schema?: DataflowSchema;
|
|
1060
1088
|
tone?: ToneName;
|
|
@@ -1065,9 +1093,12 @@ interface DataflowNode {
|
|
|
1065
1093
|
height?: number;
|
|
1066
1094
|
}
|
|
1067
1095
|
interface DataflowEdge {
|
|
1096
|
+
id?: string;
|
|
1068
1097
|
from: string;
|
|
1069
1098
|
to: string;
|
|
1070
1099
|
label?: string;
|
|
1100
|
+
href?: string;
|
|
1101
|
+
title?: string;
|
|
1071
1102
|
schema?: DataflowSchema;
|
|
1072
1103
|
mode?: DataflowEdgeMode;
|
|
1073
1104
|
tone?: ToneName;
|
|
@@ -1086,6 +1117,9 @@ interface DataflowSpec {
|
|
|
1086
1117
|
edges: DataflowEdge[];
|
|
1087
1118
|
boundaries?: DataflowBoundary[];
|
|
1088
1119
|
ariaLabel?: string;
|
|
1120
|
+
id?: string;
|
|
1121
|
+
title?: string;
|
|
1122
|
+
description?: string;
|
|
1089
1123
|
}
|
|
1090
1124
|
interface DataflowDiagramProps extends DataflowSpec {
|
|
1091
1125
|
c: ThemeColors;
|
|
@@ -1101,11 +1135,13 @@ interface DataflowDiagramProps extends DataflowSpec {
|
|
|
1101
1135
|
nodeGap?: number;
|
|
1102
1136
|
rankGap?: number;
|
|
1103
1137
|
edgeGap?: number;
|
|
1138
|
+
routing?: GraphDiagramProps['routing'];
|
|
1139
|
+
routingClearance?: GraphDiagramProps['routingClearance'];
|
|
1104
1140
|
sizing?: GraphDiagramProps['sizing'];
|
|
1105
1141
|
iconSize?: number;
|
|
1106
1142
|
}
|
|
1107
1143
|
/** Render typed dataflow nodes and edges through the existing GraphDiagram. */
|
|
1108
|
-
declare function DataflowDiagram({ c, nodes, edges, boundaries, ariaLabel, 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;
|
|
1109
1145
|
|
|
1110
1146
|
/** Deployment boundary kinds understood by {@link DeploymentDiagram}. */
|
|
1111
1147
|
type DeploymentBoundaryKind = 'region' | 'zone' | 'vpc' | 'subnet' | 'namespace' | 'host' | 'cluster' | 'trust';
|
|
@@ -1120,6 +1156,8 @@ interface DeploymentPort {
|
|
|
1120
1156
|
protocol?: string;
|
|
1121
1157
|
label?: string;
|
|
1122
1158
|
direction?: DeploymentPortDirection;
|
|
1159
|
+
side?: GraphPortSide;
|
|
1160
|
+
offset?: number;
|
|
1123
1161
|
}
|
|
1124
1162
|
type DeploymentPortInput = DeploymentPort | string | number;
|
|
1125
1163
|
/** A nested infrastructure or trust boundary. */
|
|
@@ -1133,7 +1171,7 @@ interface DeploymentBoundary {
|
|
|
1133
1171
|
muted?: boolean;
|
|
1134
1172
|
}
|
|
1135
1173
|
/** A typed service, workload, host, or external endpoint. */
|
|
1136
|
-
interface DeploymentNode extends Omit<GraphDiagramNode, 'label' | 'detail' | 'group' | 'icon'> {
|
|
1174
|
+
interface DeploymentNode extends Omit<GraphDiagramNode, 'label' | 'detail' | 'group' | 'icon' | 'ports'> {
|
|
1137
1175
|
id: string;
|
|
1138
1176
|
label: React.ReactNode;
|
|
1139
1177
|
detail?: React.ReactNode;
|
|
@@ -1144,7 +1182,7 @@ interface DeploymentNode extends Omit<GraphDiagramNode, 'label' | 'detail' | 'gr
|
|
|
1144
1182
|
}
|
|
1145
1183
|
type DeploymentConnectionKind = 'ingress' | 'egress' | 'internal' | 'cross-boundary';
|
|
1146
1184
|
/** A typed network relationship between two deployment nodes. */
|
|
1147
|
-
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'> {
|
|
1148
1186
|
id?: string;
|
|
1149
1187
|
from: string;
|
|
1150
1188
|
to: string;
|
|
@@ -1415,7 +1453,7 @@ interface ChartFrameProps {
|
|
|
1415
1453
|
padding?: number;
|
|
1416
1454
|
}
|
|
1417
1455
|
declare function createPlotArea(width: number, height: number, margin: ChartMargins): PlotArea;
|
|
1418
|
-
declare function ChartFrame(
|
|
1456
|
+
declare function ChartFrame(props: ChartFrameProps): React.ReactElement;
|
|
1419
1457
|
interface DonutChartSegment {
|
|
1420
1458
|
label: string;
|
|
1421
1459
|
value: number;
|
|
@@ -1437,6 +1475,21 @@ interface DonutChartProps {
|
|
|
1437
1475
|
showLegend?: boolean;
|
|
1438
1476
|
footer?: string;
|
|
1439
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;
|
|
1440
1493
|
declare function DonutChart({ segments, c, title, subtitle, width, height, size, thickness, format, centerLabel, centerValue, showLegend, footer, }: DonutChartProps): React.ReactElement;
|
|
1441
1494
|
interface BarChartDatum {
|
|
1442
1495
|
label: string;
|
|
@@ -1476,6 +1529,20 @@ interface BarChartProps {
|
|
|
1476
1529
|
footer?: string;
|
|
1477
1530
|
}
|
|
1478
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;
|
|
1479
1546
|
interface LineChartSeries {
|
|
1480
1547
|
name: string;
|
|
1481
1548
|
points: number[];
|
|
@@ -1656,6 +1723,26 @@ interface LegendProps {
|
|
|
1656
1723
|
}
|
|
1657
1724
|
declare function Legend({ items, c, title }: LegendProps): React.ReactElement;
|
|
1658
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
|
+
|
|
1659
1746
|
/**
|
|
1660
1747
|
* Vizmatic — Brand
|
|
1661
1748
|
*
|
|
@@ -1987,4 +2074,144 @@ declare function renderAnimatedGifWithOutput(scenes: AnimatedScene[], options: A
|
|
|
1987
2074
|
declare function renderAnimationGif<S extends object>(animation: DefinedAnimation<S>, options: AnimationOptions): Promise<void>;
|
|
1988
2075
|
declare function renderAnimationGifWithOutput<S extends object>(animation: DefinedAnimation<S>, options: AnimationOptions): Promise<AnimationOutput>;
|
|
1989
2076
|
|
|
1990
|
-
|
|
2077
|
+
type GraphImportSource = 'mermaid' | 'd2';
|
|
2078
|
+
type GraphImportDirection = 'LR' | 'RL' | 'TB' | 'BT';
|
|
2079
|
+
type GraphImportDiagnosticCode = 'import.empty' | 'import.lossy_semantics' | 'import.parse_error' | 'import.unsupported_semantics' | 'import.unsupported_syntax';
|
|
2080
|
+
interface GraphImportDiagnostic {
|
|
2081
|
+
code: GraphImportDiagnosticCode;
|
|
2082
|
+
severity: 'error' | 'warning';
|
|
2083
|
+
message: string;
|
|
2084
|
+
line: number;
|
|
2085
|
+
column: number;
|
|
2086
|
+
excerpt: string;
|
|
2087
|
+
}
|
|
2088
|
+
interface GraphImportGraph {
|
|
2089
|
+
nodes: GraphDiagramNode[];
|
|
2090
|
+
edges: GraphDiagramEdge[];
|
|
2091
|
+
groups: GraphDiagramGroup[];
|
|
2092
|
+
direction: GraphImportDirection;
|
|
2093
|
+
}
|
|
2094
|
+
/**
|
|
2095
|
+
* A parse result is renderable only when `ok` is true and `graph` is present.
|
|
2096
|
+
* Warnings describe explicit, accepted losses; errors omit the graph so callers
|
|
2097
|
+
* cannot accidentally render a partial interpretation.
|
|
2098
|
+
*/
|
|
2099
|
+
interface GraphImportResult {
|
|
2100
|
+
source: GraphImportSource;
|
|
2101
|
+
ok: boolean;
|
|
2102
|
+
graph?: GraphImportGraph;
|
|
2103
|
+
diagnostics: GraphImportDiagnostic[];
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
/**
|
|
2107
|
+
* Import the conservative Mermaid flowchart subset documented in docs/import.md.
|
|
2108
|
+
* Unsupported constructs produce errors and suppress `graph`; accepted shape
|
|
2109
|
+
* reductions produce warnings that callers can show before rendering.
|
|
2110
|
+
*/
|
|
2111
|
+
declare function importMermaidGraph(source: string): GraphImportResult;
|
|
2112
|
+
|
|
2113
|
+
/**
|
|
2114
|
+
* Import a safe subset of D2 text diagrams. The accepted syntax and explicit
|
|
2115
|
+
* reductions are documented in docs/import.md; unsupported blocks and fields
|
|
2116
|
+
* suppress `graph` rather than returning a partial diagram.
|
|
2117
|
+
*/
|
|
2118
|
+
declare function importD2Graph(source: string): GraphImportResult;
|
|
2119
|
+
|
|
2120
|
+
type DiagnosticSeverity = 'error' | 'warning' | 'info';
|
|
2121
|
+
/** Stable identifiers emitted by the visual checker. Add codes without changing existing meanings. */
|
|
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"];
|
|
2123
|
+
type CheckDiagnosticCode = typeof CHECK_DIAGNOSTIC_CODES[number];
|
|
2124
|
+
interface CheckDiagnosticLocation {
|
|
2125
|
+
/** React element path for diagnostics collected before layout. */
|
|
2126
|
+
path?: string;
|
|
2127
|
+
/** Rendered logical-pixel bounds when layout data is available. */
|
|
2128
|
+
x?: number;
|
|
2129
|
+
y?: number;
|
|
2130
|
+
width?: number;
|
|
2131
|
+
height?: number;
|
|
2132
|
+
}
|
|
2133
|
+
interface CheckDiagnostic {
|
|
2134
|
+
code: CheckDiagnosticCode;
|
|
2135
|
+
severity: DiagnosticSeverity;
|
|
2136
|
+
message: string;
|
|
2137
|
+
theme?: ThemeMode;
|
|
2138
|
+
elementId?: string;
|
|
2139
|
+
relatedElementIds?: string[];
|
|
2140
|
+
location?: CheckDiagnosticLocation;
|
|
2141
|
+
edges?: Array<'top' | 'right' | 'bottom' | 'left'>;
|
|
2142
|
+
suggestion?: string;
|
|
2143
|
+
suggestedDimensions?: {
|
|
2144
|
+
width: number;
|
|
2145
|
+
height: number;
|
|
2146
|
+
};
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
interface CheckAutoSizeAxes {
|
|
2150
|
+
width: boolean;
|
|
2151
|
+
height: boolean;
|
|
2152
|
+
}
|
|
2153
|
+
type CheckAutoSize = boolean | Partial<CheckAutoSizeAxes>;
|
|
2154
|
+
type CheckFrameShape = {
|
|
2155
|
+
source?: string;
|
|
2156
|
+
width?: number;
|
|
2157
|
+
height?: number;
|
|
2158
|
+
autoSize?: CheckAutoSize;
|
|
2159
|
+
};
|
|
2160
|
+
/** A frame can be a fixed React scene or a factory that creates a themed scene. */
|
|
2161
|
+
type CheckFrameInput = CheckFrameShape & ({
|
|
2162
|
+
scene: ReactNode;
|
|
2163
|
+
create?: never;
|
|
2164
|
+
} | {
|
|
2165
|
+
create: (theme: ThemeMode) => ReactNode;
|
|
2166
|
+
scene?: never;
|
|
2167
|
+
});
|
|
2168
|
+
type CheckFailurePolicy = DiagnosticSeverity | 'never';
|
|
2169
|
+
interface CheckOptions {
|
|
2170
|
+
/** Themes to check. Defaults to both Vizmatic themes. */
|
|
2171
|
+
themes?: readonly ThemeMode[];
|
|
2172
|
+
/** Background passed to Vizmatic primitives and the renderer. Defaults to transparent. */
|
|
2173
|
+
background?: RenderBackground;
|
|
2174
|
+
/** Minimum severity that makes the report fail. Defaults to errors only. */
|
|
2175
|
+
failOn?: CheckFailurePolicy;
|
|
2176
|
+
}
|
|
2177
|
+
interface CheckThemeReport {
|
|
2178
|
+
theme: ThemeMode;
|
|
2179
|
+
ok: boolean;
|
|
2180
|
+
dimensions: {
|
|
2181
|
+
input: {
|
|
2182
|
+
width: number;
|
|
2183
|
+
height: number;
|
|
2184
|
+
};
|
|
2185
|
+
resolved?: {
|
|
2186
|
+
width: number;
|
|
2187
|
+
height: number;
|
|
2188
|
+
};
|
|
2189
|
+
output?: {
|
|
2190
|
+
width: number;
|
|
2191
|
+
height: number;
|
|
2192
|
+
};
|
|
2193
|
+
};
|
|
2194
|
+
diagnostics: CheckDiagnostic[];
|
|
2195
|
+
}
|
|
2196
|
+
interface CheckDiagnosticCounts {
|
|
2197
|
+
errors: number;
|
|
2198
|
+
warnings: number;
|
|
2199
|
+
info: number;
|
|
2200
|
+
}
|
|
2201
|
+
interface CheckFrameReport {
|
|
2202
|
+
schemaVersion: 1;
|
|
2203
|
+
source?: string;
|
|
2204
|
+
ok: boolean;
|
|
2205
|
+
/** True when each requested theme completed rendering, regardless of failOn. */
|
|
2206
|
+
rendered: boolean;
|
|
2207
|
+
autoSize: CheckAutoSizeAxes;
|
|
2208
|
+
themes: CheckThemeReport[];
|
|
2209
|
+
summary: CheckDiagnosticCounts;
|
|
2210
|
+
}
|
|
2211
|
+
/**
|
|
2212
|
+
* Check a React scene or themed frame by rendering each requested theme and
|
|
2213
|
+
* returning structured diagnostics. This function does not write an artifact.
|
|
2214
|
+
*/
|
|
2215
|
+
declare function checkFrame(input: CheckFrameInput, options?: CheckOptions): Promise<CheckFrameReport>;
|
|
2216
|
+
|
|
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 };
|