vizmatic 0.1.21 → 0.1.23
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 +4 -0
- package/README.md +4 -0
- package/dist/cli.js +776 -0
- package/dist/index.cjs +781 -2
- package/dist/index.d.cts +79 -1
- package/dist/index.d.ts +79 -1
- package/dist/index.js +776 -0
- package/docs/PROMPT.md +4 -0
- package/docs/assets/examples/building-blocks_dark.png +0 -0
- package/docs/assets/examples/building-blocks_light.png +0 -0
- package/docs/assets/examples/manifest.json +8 -0
- package/docs/assets/examples/sources.json +10 -0
- package/examples/README.md +1 -0
- package/examples/building-blocks.tsx +85 -0
- package/examples/vizmatic-bare.d.ts +4 -0
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -318,6 +318,18 @@ interface ToneStripProps {
|
|
|
318
318
|
height?: number;
|
|
319
319
|
}
|
|
320
320
|
declare function ToneStrip({ tone, width, height }: ToneStripProps): React.ReactElement;
|
|
321
|
+
type IconName = 'agent' | 'chart' | 'check' | 'code' | 'database' | 'file' | 'git' | 'globe' | 'image' | 'layers' | 'lock' | 'play' | 'spark' | 'terminal' | 'tool' | 'warning';
|
|
322
|
+
interface IconProps {
|
|
323
|
+
c: ThemeColors;
|
|
324
|
+
name: IconName;
|
|
325
|
+
tone?: ToneName;
|
|
326
|
+
color?: string;
|
|
327
|
+
size?: number;
|
|
328
|
+
strokeWidth?: number;
|
|
329
|
+
label?: string;
|
|
330
|
+
muted?: boolean;
|
|
331
|
+
}
|
|
332
|
+
declare function Icon({ c, name, tone, color, size, strokeWidth, label, muted, }: IconProps): React.ReactElement;
|
|
321
333
|
interface PanelProps {
|
|
322
334
|
title: React.ReactNode;
|
|
323
335
|
c: ThemeColors;
|
|
@@ -783,6 +795,27 @@ interface StatusListProps {
|
|
|
783
795
|
math?: boolean;
|
|
784
796
|
}
|
|
785
797
|
declare function StatusList({ rows, c, gap, boxed, fontSize, width, math, }: StatusListProps): React.ReactElement;
|
|
798
|
+
interface TimelineEventSpec {
|
|
799
|
+
title: React.ReactNode;
|
|
800
|
+
detail?: React.ReactNode;
|
|
801
|
+
time?: React.ReactNode;
|
|
802
|
+
tone?: ToneName;
|
|
803
|
+
status?: StatusKind;
|
|
804
|
+
width?: number | string;
|
|
805
|
+
}
|
|
806
|
+
interface TimelineProps {
|
|
807
|
+
events: TimelineEventSpec[];
|
|
808
|
+
c: ThemeColors;
|
|
809
|
+
title?: React.ReactNode;
|
|
810
|
+
subtitle?: React.ReactNode;
|
|
811
|
+
direction?: 'vertical' | 'horizontal';
|
|
812
|
+
width?: number | string;
|
|
813
|
+
eventWidth?: number | string;
|
|
814
|
+
gap?: number;
|
|
815
|
+
markerSize?: number;
|
|
816
|
+
math?: boolean;
|
|
817
|
+
}
|
|
818
|
+
declare function Timeline({ events, c, title, subtitle, direction, width, eventWidth, gap, markerSize, math, }: TimelineProps): React.ReactElement;
|
|
786
819
|
interface FlowStageSpec {
|
|
787
820
|
title: React.ReactNode;
|
|
788
821
|
subtitle?: React.ReactNode;
|
|
@@ -854,6 +887,29 @@ interface GraphDiagramProps {
|
|
|
854
887
|
padding?: number;
|
|
855
888
|
}
|
|
856
889
|
declare function GraphDiagram({ nodes, edges, c, width, height, nodeWidth, nodeHeight, padding, }: GraphDiagramProps): React.ReactElement;
|
|
890
|
+
interface TreeNodeSpec {
|
|
891
|
+
label: React.ReactNode;
|
|
892
|
+
id?: string;
|
|
893
|
+
detail?: React.ReactNode;
|
|
894
|
+
tone?: ToneName;
|
|
895
|
+
muted?: boolean;
|
|
896
|
+
children?: TreeNodeSpec[];
|
|
897
|
+
}
|
|
898
|
+
interface TreeDiagramProps {
|
|
899
|
+
root: TreeNodeSpec;
|
|
900
|
+
c: ThemeColors;
|
|
901
|
+
title?: React.ReactNode;
|
|
902
|
+
subtitle?: React.ReactNode;
|
|
903
|
+
width?: number;
|
|
904
|
+
height?: number;
|
|
905
|
+
nodeWidth?: number;
|
|
906
|
+
nodeHeight?: number;
|
|
907
|
+
levelGap?: number;
|
|
908
|
+
siblingGap?: number;
|
|
909
|
+
padding?: number;
|
|
910
|
+
math?: boolean;
|
|
911
|
+
}
|
|
912
|
+
declare function TreeDiagram({ root, c, title, subtitle, width, height, nodeWidth, nodeHeight, levelGap, siblingGap, padding, math, }: TreeDiagramProps): React.ReactElement;
|
|
857
913
|
interface CalloutCardProps {
|
|
858
914
|
c: ThemeColors;
|
|
859
915
|
children?: React.ReactNode;
|
|
@@ -1061,6 +1117,28 @@ interface ChartFrameProps {
|
|
|
1061
1117
|
}
|
|
1062
1118
|
declare function createPlotArea(width: number, height: number, margin: ChartMargins): PlotArea;
|
|
1063
1119
|
declare function ChartFrame({ children, c, title, subtitle, legend, footer, width, height, padding, }: ChartFrameProps): React.ReactElement;
|
|
1120
|
+
interface DonutChartSegment {
|
|
1121
|
+
label: string;
|
|
1122
|
+
value: number;
|
|
1123
|
+
color?: ColorName | string;
|
|
1124
|
+
valueLabel?: string;
|
|
1125
|
+
}
|
|
1126
|
+
interface DonutChartProps {
|
|
1127
|
+
segments: DonutChartSegment[];
|
|
1128
|
+
c: ThemeColors;
|
|
1129
|
+
title?: string;
|
|
1130
|
+
subtitle?: string;
|
|
1131
|
+
width?: number;
|
|
1132
|
+
height?: number;
|
|
1133
|
+
size?: number;
|
|
1134
|
+
thickness?: number;
|
|
1135
|
+
format?: ChartValueFormat;
|
|
1136
|
+
centerLabel?: React.ReactNode;
|
|
1137
|
+
centerValue?: React.ReactNode;
|
|
1138
|
+
showLegend?: boolean;
|
|
1139
|
+
footer?: string;
|
|
1140
|
+
}
|
|
1141
|
+
declare function DonutChart({ segments, c, title, subtitle, width, height, size, thickness, format, centerLabel, centerValue, showLegend, footer, }: DonutChartProps): React.ReactElement;
|
|
1064
1142
|
interface BarChartDatum {
|
|
1065
1143
|
label: string;
|
|
1066
1144
|
value: number;
|
|
@@ -1447,4 +1525,4 @@ interface OverflowResult {
|
|
|
1447
1525
|
*/
|
|
1448
1526
|
declare function detectOverflow(pixels: Uint8Array, width: number, height: number, bgColor: string, edgeTolerance?: number, minDensity?: number, alphaThreshold?: number): OverflowResult;
|
|
1449
1527
|
|
|
1450
|
-
export { type AnimatedScene, type AnimationOptions, Arrow, ArrowMarkerDef, AxisPlot, type AxisPlotPath, Badge, BadgePill, BarChart, type BarChartDatum, Box, CalloutCard, Canvas, Card, ChartFrame, type ChartLegendItem, type ChartMargins, type ChartValueFormat, CodeBlock, type CodeLineSpec, type ColorName, Column, Comparison, type ComparisonSideSpec, Connector, type CropMode, type CropRegion, DashedLine, DataTable, DetailList, DotPoint, EquationCard, Flow, FlowArrow, type FlowStageSpec, GradientChip, GraphDiagram, type GraphDiagramEdge, type GraphDiagramNode, Grid, Heatmap, type IllustrationBuilder, type IntervalDatum, IntervalPlot, KeyValueList, type KeyValueRow, LayeredNetwork, type LayeredNetworkLayer, Legend, LineChart, type LineChartSeries, MathText, Matrix, MetricCard, MiniBarChart, type MiniBarDatum, type OverflowResult, Panel, Pipeline, type PlotArea, ProgressList, ProgressRow, type ProgressRowSpec, QuadrantChart, type QuadrantRegion, type RenderBackground, type RenderOptions, type RenderOutput, Row, ScatterPlot, type ScatterPoint, Scene, Stack, StackedBar, type StackedBarSegment, type StatusKind, StatusList, StatusRow, type StatusRowSpec, StepCard, SvgFrame, SvgMathText, SvgPoint, TextLabel, type ThemeColors, type ThemeMode, Tile, TileGrid, type TileSpec, TiledMatrix, type TiledMatrixRegion, TitleBar, type ToneName, ToneStrip, type TransitionType, ValuePill, VectorArrow, VectorSegment, Watermark, type WatermarkElementProps, type WatermarkImageOptions, type WatermarkInput, type WatermarkOptions, type WatermarkPosition, WindowFrame, canvas, colors, createPlotArea, cropPixels, defineIllustration, detectBackgroundColor, detectContentBounds, detectOverflow, formatMathText, getColor, getFonts, getGradient, getStyles, getThemeColors, getToneColor, getToneGradient, gradients, heatColor, loadAdditionalAsset, normalizeWatermark, renderAnimatedGif, renderToBuffer, renderToPng, renderToPngWithOutput, renderToSvg, styles, toneGradients, typography, wrapWithBrand, wrapWithWatermark };
|
|
1528
|
+
export { type AnimatedScene, type AnimationOptions, Arrow, ArrowMarkerDef, AxisPlot, type AxisPlotPath, Badge, BadgePill, BarChart, type BarChartDatum, Box, CalloutCard, Canvas, Card, ChartFrame, type ChartLegendItem, type ChartMargins, type ChartValueFormat, CodeBlock, type CodeLineSpec, type ColorName, Column, Comparison, type ComparisonSideSpec, Connector, type CropMode, type CropRegion, DashedLine, DataTable, DetailList, DonutChart, type DonutChartSegment, DotPoint, EquationCard, Flow, FlowArrow, type FlowStageSpec, GradientChip, GraphDiagram, type GraphDiagramEdge, type GraphDiagramNode, Grid, Heatmap, Icon, type IconName, type IconProps, type IllustrationBuilder, type IntervalDatum, IntervalPlot, KeyValueList, type KeyValueRow, LayeredNetwork, type LayeredNetworkLayer, Legend, LineChart, type LineChartSeries, MathText, Matrix, MetricCard, MiniBarChart, type MiniBarDatum, type OverflowResult, Panel, Pipeline, type PlotArea, ProgressList, ProgressRow, type ProgressRowSpec, QuadrantChart, type QuadrantRegion, type RenderBackground, type RenderOptions, type RenderOutput, Row, ScatterPlot, type ScatterPoint, Scene, Stack, StackedBar, type StackedBarSegment, type StatusKind, StatusList, StatusRow, type StatusRowSpec, StepCard, SvgFrame, SvgMathText, SvgPoint, TextLabel, type ThemeColors, type ThemeMode, Tile, TileGrid, type TileSpec, TiledMatrix, type TiledMatrixRegion, Timeline, type TimelineEventSpec, TitleBar, type ToneName, ToneStrip, type TransitionType, TreeDiagram, type TreeNodeSpec, ValuePill, VectorArrow, VectorSegment, Watermark, type WatermarkElementProps, type WatermarkImageOptions, type WatermarkInput, type WatermarkOptions, type WatermarkPosition, WindowFrame, canvas, colors, createPlotArea, cropPixels, defineIllustration, detectBackgroundColor, detectContentBounds, detectOverflow, formatMathText, getColor, getFonts, getGradient, getStyles, getThemeColors, getToneColor, getToneGradient, gradients, heatColor, loadAdditionalAsset, normalizeWatermark, renderAnimatedGif, renderToBuffer, renderToPng, renderToPngWithOutput, renderToSvg, styles, toneGradients, typography, wrapWithBrand, wrapWithWatermark };
|
package/dist/index.d.ts
CHANGED
|
@@ -318,6 +318,18 @@ interface ToneStripProps {
|
|
|
318
318
|
height?: number;
|
|
319
319
|
}
|
|
320
320
|
declare function ToneStrip({ tone, width, height }: ToneStripProps): React.ReactElement;
|
|
321
|
+
type IconName = 'agent' | 'chart' | 'check' | 'code' | 'database' | 'file' | 'git' | 'globe' | 'image' | 'layers' | 'lock' | 'play' | 'spark' | 'terminal' | 'tool' | 'warning';
|
|
322
|
+
interface IconProps {
|
|
323
|
+
c: ThemeColors;
|
|
324
|
+
name: IconName;
|
|
325
|
+
tone?: ToneName;
|
|
326
|
+
color?: string;
|
|
327
|
+
size?: number;
|
|
328
|
+
strokeWidth?: number;
|
|
329
|
+
label?: string;
|
|
330
|
+
muted?: boolean;
|
|
331
|
+
}
|
|
332
|
+
declare function Icon({ c, name, tone, color, size, strokeWidth, label, muted, }: IconProps): React.ReactElement;
|
|
321
333
|
interface PanelProps {
|
|
322
334
|
title: React.ReactNode;
|
|
323
335
|
c: ThemeColors;
|
|
@@ -783,6 +795,27 @@ interface StatusListProps {
|
|
|
783
795
|
math?: boolean;
|
|
784
796
|
}
|
|
785
797
|
declare function StatusList({ rows, c, gap, boxed, fontSize, width, math, }: StatusListProps): React.ReactElement;
|
|
798
|
+
interface TimelineEventSpec {
|
|
799
|
+
title: React.ReactNode;
|
|
800
|
+
detail?: React.ReactNode;
|
|
801
|
+
time?: React.ReactNode;
|
|
802
|
+
tone?: ToneName;
|
|
803
|
+
status?: StatusKind;
|
|
804
|
+
width?: number | string;
|
|
805
|
+
}
|
|
806
|
+
interface TimelineProps {
|
|
807
|
+
events: TimelineEventSpec[];
|
|
808
|
+
c: ThemeColors;
|
|
809
|
+
title?: React.ReactNode;
|
|
810
|
+
subtitle?: React.ReactNode;
|
|
811
|
+
direction?: 'vertical' | 'horizontal';
|
|
812
|
+
width?: number | string;
|
|
813
|
+
eventWidth?: number | string;
|
|
814
|
+
gap?: number;
|
|
815
|
+
markerSize?: number;
|
|
816
|
+
math?: boolean;
|
|
817
|
+
}
|
|
818
|
+
declare function Timeline({ events, c, title, subtitle, direction, width, eventWidth, gap, markerSize, math, }: TimelineProps): React.ReactElement;
|
|
786
819
|
interface FlowStageSpec {
|
|
787
820
|
title: React.ReactNode;
|
|
788
821
|
subtitle?: React.ReactNode;
|
|
@@ -854,6 +887,29 @@ interface GraphDiagramProps {
|
|
|
854
887
|
padding?: number;
|
|
855
888
|
}
|
|
856
889
|
declare function GraphDiagram({ nodes, edges, c, width, height, nodeWidth, nodeHeight, padding, }: GraphDiagramProps): React.ReactElement;
|
|
890
|
+
interface TreeNodeSpec {
|
|
891
|
+
label: React.ReactNode;
|
|
892
|
+
id?: string;
|
|
893
|
+
detail?: React.ReactNode;
|
|
894
|
+
tone?: ToneName;
|
|
895
|
+
muted?: boolean;
|
|
896
|
+
children?: TreeNodeSpec[];
|
|
897
|
+
}
|
|
898
|
+
interface TreeDiagramProps {
|
|
899
|
+
root: TreeNodeSpec;
|
|
900
|
+
c: ThemeColors;
|
|
901
|
+
title?: React.ReactNode;
|
|
902
|
+
subtitle?: React.ReactNode;
|
|
903
|
+
width?: number;
|
|
904
|
+
height?: number;
|
|
905
|
+
nodeWidth?: number;
|
|
906
|
+
nodeHeight?: number;
|
|
907
|
+
levelGap?: number;
|
|
908
|
+
siblingGap?: number;
|
|
909
|
+
padding?: number;
|
|
910
|
+
math?: boolean;
|
|
911
|
+
}
|
|
912
|
+
declare function TreeDiagram({ root, c, title, subtitle, width, height, nodeWidth, nodeHeight, levelGap, siblingGap, padding, math, }: TreeDiagramProps): React.ReactElement;
|
|
857
913
|
interface CalloutCardProps {
|
|
858
914
|
c: ThemeColors;
|
|
859
915
|
children?: React.ReactNode;
|
|
@@ -1061,6 +1117,28 @@ interface ChartFrameProps {
|
|
|
1061
1117
|
}
|
|
1062
1118
|
declare function createPlotArea(width: number, height: number, margin: ChartMargins): PlotArea;
|
|
1063
1119
|
declare function ChartFrame({ children, c, title, subtitle, legend, footer, width, height, padding, }: ChartFrameProps): React.ReactElement;
|
|
1120
|
+
interface DonutChartSegment {
|
|
1121
|
+
label: string;
|
|
1122
|
+
value: number;
|
|
1123
|
+
color?: ColorName | string;
|
|
1124
|
+
valueLabel?: string;
|
|
1125
|
+
}
|
|
1126
|
+
interface DonutChartProps {
|
|
1127
|
+
segments: DonutChartSegment[];
|
|
1128
|
+
c: ThemeColors;
|
|
1129
|
+
title?: string;
|
|
1130
|
+
subtitle?: string;
|
|
1131
|
+
width?: number;
|
|
1132
|
+
height?: number;
|
|
1133
|
+
size?: number;
|
|
1134
|
+
thickness?: number;
|
|
1135
|
+
format?: ChartValueFormat;
|
|
1136
|
+
centerLabel?: React.ReactNode;
|
|
1137
|
+
centerValue?: React.ReactNode;
|
|
1138
|
+
showLegend?: boolean;
|
|
1139
|
+
footer?: string;
|
|
1140
|
+
}
|
|
1141
|
+
declare function DonutChart({ segments, c, title, subtitle, width, height, size, thickness, format, centerLabel, centerValue, showLegend, footer, }: DonutChartProps): React.ReactElement;
|
|
1064
1142
|
interface BarChartDatum {
|
|
1065
1143
|
label: string;
|
|
1066
1144
|
value: number;
|
|
@@ -1447,4 +1525,4 @@ interface OverflowResult {
|
|
|
1447
1525
|
*/
|
|
1448
1526
|
declare function detectOverflow(pixels: Uint8Array, width: number, height: number, bgColor: string, edgeTolerance?: number, minDensity?: number, alphaThreshold?: number): OverflowResult;
|
|
1449
1527
|
|
|
1450
|
-
export { type AnimatedScene, type AnimationOptions, Arrow, ArrowMarkerDef, AxisPlot, type AxisPlotPath, Badge, BadgePill, BarChart, type BarChartDatum, Box, CalloutCard, Canvas, Card, ChartFrame, type ChartLegendItem, type ChartMargins, type ChartValueFormat, CodeBlock, type CodeLineSpec, type ColorName, Column, Comparison, type ComparisonSideSpec, Connector, type CropMode, type CropRegion, DashedLine, DataTable, DetailList, DotPoint, EquationCard, Flow, FlowArrow, type FlowStageSpec, GradientChip, GraphDiagram, type GraphDiagramEdge, type GraphDiagramNode, Grid, Heatmap, type IllustrationBuilder, type IntervalDatum, IntervalPlot, KeyValueList, type KeyValueRow, LayeredNetwork, type LayeredNetworkLayer, Legend, LineChart, type LineChartSeries, MathText, Matrix, MetricCard, MiniBarChart, type MiniBarDatum, type OverflowResult, Panel, Pipeline, type PlotArea, ProgressList, ProgressRow, type ProgressRowSpec, QuadrantChart, type QuadrantRegion, type RenderBackground, type RenderOptions, type RenderOutput, Row, ScatterPlot, type ScatterPoint, Scene, Stack, StackedBar, type StackedBarSegment, type StatusKind, StatusList, StatusRow, type StatusRowSpec, StepCard, SvgFrame, SvgMathText, SvgPoint, TextLabel, type ThemeColors, type ThemeMode, Tile, TileGrid, type TileSpec, TiledMatrix, type TiledMatrixRegion, TitleBar, type ToneName, ToneStrip, type TransitionType, ValuePill, VectorArrow, VectorSegment, Watermark, type WatermarkElementProps, type WatermarkImageOptions, type WatermarkInput, type WatermarkOptions, type WatermarkPosition, WindowFrame, canvas, colors, createPlotArea, cropPixels, defineIllustration, detectBackgroundColor, detectContentBounds, detectOverflow, formatMathText, getColor, getFonts, getGradient, getStyles, getThemeColors, getToneColor, getToneGradient, gradients, heatColor, loadAdditionalAsset, normalizeWatermark, renderAnimatedGif, renderToBuffer, renderToPng, renderToPngWithOutput, renderToSvg, styles, toneGradients, typography, wrapWithBrand, wrapWithWatermark };
|
|
1528
|
+
export { type AnimatedScene, type AnimationOptions, Arrow, ArrowMarkerDef, AxisPlot, type AxisPlotPath, Badge, BadgePill, BarChart, type BarChartDatum, Box, CalloutCard, Canvas, Card, ChartFrame, type ChartLegendItem, type ChartMargins, type ChartValueFormat, CodeBlock, type CodeLineSpec, type ColorName, Column, Comparison, type ComparisonSideSpec, Connector, type CropMode, type CropRegion, DashedLine, DataTable, DetailList, DonutChart, type DonutChartSegment, DotPoint, EquationCard, Flow, FlowArrow, type FlowStageSpec, GradientChip, GraphDiagram, type GraphDiagramEdge, type GraphDiagramNode, Grid, Heatmap, Icon, type IconName, type IconProps, type IllustrationBuilder, type IntervalDatum, IntervalPlot, KeyValueList, type KeyValueRow, LayeredNetwork, type LayeredNetworkLayer, Legend, LineChart, type LineChartSeries, MathText, Matrix, MetricCard, MiniBarChart, type MiniBarDatum, type OverflowResult, Panel, Pipeline, type PlotArea, ProgressList, ProgressRow, type ProgressRowSpec, QuadrantChart, type QuadrantRegion, type RenderBackground, type RenderOptions, type RenderOutput, Row, ScatterPlot, type ScatterPoint, Scene, Stack, StackedBar, type StackedBarSegment, type StatusKind, StatusList, StatusRow, type StatusRowSpec, StepCard, SvgFrame, SvgMathText, SvgPoint, TextLabel, type ThemeColors, type ThemeMode, Tile, TileGrid, type TileSpec, TiledMatrix, type TiledMatrixRegion, Timeline, type TimelineEventSpec, TitleBar, type ToneName, ToneStrip, type TransitionType, TreeDiagram, type TreeNodeSpec, ValuePill, VectorArrow, VectorSegment, Watermark, type WatermarkElementProps, type WatermarkImageOptions, type WatermarkInput, type WatermarkOptions, type WatermarkPosition, WindowFrame, canvas, colors, createPlotArea, cropPixels, defineIllustration, detectBackgroundColor, detectContentBounds, detectOverflow, formatMathText, getColor, getFonts, getGradient, getStyles, getThemeColors, getToneColor, getToneGradient, gradients, heatColor, loadAdditionalAsset, normalizeWatermark, renderAnimatedGif, renderToBuffer, renderToPng, renderToPngWithOutput, renderToSvg, styles, toneGradients, typography, wrapWithBrand, wrapWithWatermark };
|