vizmatic 0.3.1 → 0.3.2

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.cjs CHANGED
@@ -9228,8 +9228,11 @@ function CanvasItem({ children, x, y, width, height }) {
9228
9228
  if (!Number.isFinite(x) || !Number.isFinite(y)) throw new Error("CanvasItem x and y must be finite numbers.");
9229
9229
  const sizedChildren = import_react14.default.Children.map(children, (child) => {
9230
9230
  if (!import_react14.default.isValidElement(child)) return child;
9231
- const sized = import_react14.default.cloneElement(child, { ...width !== void 0 ? { width } : {}, ...height !== void 0 ? { height } : {} });
9232
- return width !== void 0 && height !== void 0 && isCanvasChart(child.type) ? import_react14.default.createElement(CanvasChartFit, { width, height, __vizmaticTextScope: child.props.__vizmaticTextScope }, sized) : sized;
9231
+ if (width !== void 0 && height !== void 0 && isCanvasChart(child.type)) {
9232
+ const chart = import_react14.default.cloneElement(child, { width: child.props.width ?? width, height: child.props.height ?? height });
9233
+ return import_react14.default.createElement(CanvasChartFit, { width, height, __vizmaticTextScope: child.props.__vizmaticTextScope }, chart);
9234
+ }
9235
+ return import_react14.default.cloneElement(child, { ...width !== void 0 ? { width } : {}, ...height !== void 0 ? { height } : {} });
9233
9236
  });
9234
9237
  return import_react14.default.createElement("div", { style: {
9235
9238
  display: "flex",
package/dist/index.d.cts CHANGED
@@ -1742,7 +1742,7 @@ interface CanvasItemProps {
1742
1742
  }
1743
1743
  /** A fixed canvas for freely positioned, composable visuals. */
1744
1744
  declare function Board({ children, c, width, height, background }: BoardProps): React.ReactElement;
1745
- /** Positions an item in Board coordinates and supplies its size to the child. */
1745
+ /** Positions an item in Board coordinates, sizing its child or fitting a complete chart. */
1746
1746
  declare function CanvasItem({ children, x, y, width, height }: CanvasItemProps): React.ReactElement;
1747
1747
 
1748
1748
  /**
package/dist/index.d.ts CHANGED
@@ -1742,7 +1742,7 @@ interface CanvasItemProps {
1742
1742
  }
1743
1743
  /** A fixed canvas for freely positioned, composable visuals. */
1744
1744
  declare function Board({ children, c, width, height, background }: BoardProps): React.ReactElement;
1745
- /** Positions an item in Board coordinates and supplies its size to the child. */
1745
+ /** Positions an item in Board coordinates, sizing its child or fitting a complete chart. */
1746
1746
  declare function CanvasItem({ children, x, y, width, height }: CanvasItemProps): React.ReactElement;
1747
1747
 
1748
1748
  /**
package/dist/index.js CHANGED
@@ -9069,8 +9069,11 @@ function CanvasItem({ children, x, y, width, height }) {
9069
9069
  if (!Number.isFinite(x) || !Number.isFinite(y)) throw new Error("CanvasItem x and y must be finite numbers.");
9070
9070
  const sizedChildren = React13.Children.map(children, (child) => {
9071
9071
  if (!React13.isValidElement(child)) return child;
9072
- const sized = React13.cloneElement(child, { ...width !== void 0 ? { width } : {}, ...height !== void 0 ? { height } : {} });
9073
- return width !== void 0 && height !== void 0 && isCanvasChart(child.type) ? React13.createElement(CanvasChartFit, { width, height, __vizmaticTextScope: child.props.__vizmaticTextScope }, sized) : sized;
9072
+ if (width !== void 0 && height !== void 0 && isCanvasChart(child.type)) {
9073
+ const chart = React13.cloneElement(child, { width: child.props.width ?? width, height: child.props.height ?? height });
9074
+ return React13.createElement(CanvasChartFit, { width, height, __vizmaticTextScope: child.props.__vizmaticTextScope }, chart);
9075
+ }
9076
+ return React13.cloneElement(child, { ...width !== void 0 ? { width } : {}, ...height !== void 0 ? { height } : {} });
9074
9077
  });
9075
9078
  return React13.createElement("div", { style: {
9076
9079
  display: "flex",
@@ -9,6 +9,7 @@ Rendered assets live on the [Vizmatic gallery](https://bvolpato.github.io/vizmat
9
9
  | [Agent Pipeline](agent-pipeline.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/agent-pipeline_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/agent-pipeline_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/agent-pipeline_light.png" alt="Agent Pipeline preview" width="720" /></picture> |
10
10
  | [Animated Pipeline](animated-pipeline.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/animated-pipeline_dark.gif" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/animated-pipeline_light.gif" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/animated-pipeline_light.gif" alt="Animated Pipeline preview" width="720" /></picture> |
11
11
  | [Attention Head](attention-head.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/attention-head_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/attention-head_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/attention-head_light.png" alt="Attention Head preview" width="720" /></picture> |
12
+ | [Aurora Incident](aurora-incident.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/aurora-incident_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/aurora-incident_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/aurora-incident_light.png" alt="Aurora Incident preview" width="720" /></picture> |
12
13
  | [Building Blocks](building-blocks.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/building-blocks_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/building-blocks_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/building-blocks_light.png" alt="Building Blocks preview" width="720" /></picture> |
13
14
  | [Catalog Charts](catalog-charts.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-charts_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-charts_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/catalog-charts_light.png" alt="Catalog Charts preview" width="720" /></picture> |
14
15
  | [Catalog Content](catalog-content.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-content_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-content_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/catalog-content_light.png" alt="Catalog Content preview" width="720" /></picture> |
@@ -21,10 +22,12 @@ Rendered assets live on the [Vizmatic gallery](https://bvolpato.github.io/vizmat
21
22
  | [Catalog Foundations](catalog-foundations.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-foundations_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-foundations_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/catalog-foundations_light.png" alt="Catalog Foundations preview" width="720" /></picture> |
22
23
  | [Catalog ML](catalog-ml.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-ml_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-ml_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/catalog-ml_light.png" alt="Catalog ML preview" width="720" /></picture> |
23
24
  | [Catalog Sequence](catalog-sequence.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-sequence_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/catalog-sequence_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/catalog-sequence_light.png" alt="Catalog Sequence preview" width="720" /></picture> |
25
+ | [Daybreak Launch](daybreak-launch.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/daybreak-launch_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/daybreak-launch_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/daybreak-launch_light.png" alt="Daybreak Launch preview" width="720" /></picture> |
24
26
  | [Desired Quadrant](desired-quadrant.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/desired-quadrant_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/desired-quadrant_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/desired-quadrant_light.png" alt="Desired Quadrant preview" width="720" /></picture> |
25
27
  | [Embedding Map](embedding-map.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/embedding-map_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/embedding-map_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/embedding-map_light.png" alt="Embedding Map preview" width="720" /></picture> |
26
28
  | [Engineering Flow](engineering-flow.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/engineering-flow_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/engineering-flow_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/engineering-flow_light.png" alt="Engineering Flow preview" width="720" /></picture> |
27
29
  | [Eval Dashboard](eval-dashboard.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/eval-dashboard_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/eval-dashboard_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/eval-dashboard_light.png" alt="Eval Dashboard preview" width="720" /></picture> |
30
+ | [Model Garden](model-garden.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/model-garden_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/model-garden_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/model-garden_light.png" alt="Model Garden preview" width="720" /></picture> |
28
31
  | [Model Router](model-router.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/model-router_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/model-router_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/model-router_light.png" alt="Model Router preview" width="720" /></picture> |
29
32
  | [NCCL All Gather](nccl-all-gather.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-gather_dark.gif" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-gather_light.gif" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-gather_light.gif" alt="NCCL All Gather preview" width="720" /></picture> |
30
33
  | [NCCL All Reduce](nccl-all-reduce.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-reduce_dark.gif" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-reduce_light.gif" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-reduce_light.gif" alt="NCCL All Reduce preview" width="720" /></picture> |
@@ -47,3 +50,4 @@ Rendered assets live on the [Vizmatic gallery](https://bvolpato.github.io/vizmat
47
50
  | [Transparent Badge](transparent-badge.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/transparent-badge_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/transparent-badge_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/transparent-badge_light.png" alt="Transparent Badge preview" width="720" /></picture> |
48
51
  | [Vizmatic Hero](vizmatic-hero.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/vizmatic-hero_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/vizmatic-hero_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/vizmatic-hero_light.png" alt="Vizmatic Hero preview" width="720" /></picture> |
49
52
  | [Website Workflow](website-workflow.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/website-workflow_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/website-workflow_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/website-workflow_light.png" alt="Website Workflow preview" width="720" /></picture> |
53
+ | [Weekend Field Notes](weekend-field-notes.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/weekend-field-notes_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/weekend-field-notes_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/weekend-field-notes_light.png" alt="Weekend Field Notes preview" width="720" /></picture> |
@@ -0,0 +1,108 @@
1
+ width = 1120;
2
+ height = 800;
3
+ background = "theme";
4
+
5
+ <Board c={c} width={1120} height={800}>
6
+ <CanvasItem x={24} y={20} width={1072} height={112}>
7
+ <CalloutCard
8
+ c={c}
9
+ width={1072}
10
+ minHeight={112}
11
+ padding={22}
12
+ align="left"
13
+ tone="purple"
14
+ filled={false}
15
+ title="AURORA / RELIABILITY DRILL 07"
16
+ titleFontSize={12}
17
+ detail="FICTIONAL CHECKOUT INCIDENT · traffic shifts around a degraded queue while recovery unfolds live."
18
+ detailFontSize={17}
19
+ />
20
+ </CanvasItem>
21
+
22
+ <CanvasItem x={24} y={146} width={254} height={86}>
23
+ <MetricCard c={c} width={254} minHeight={86} tone="warm" label="P95 LATENCY" value="428 ms" detail="down from 1.8 s" valueFontSize={25} />
24
+ </CanvasItem>
25
+ <CanvasItem x={296} y={146} width={254} height={86}>
26
+ <MetricCard c={c} width={254} minHeight={86} tone="green" label="CHECKOUT SUCCESS" value="99.93%" detail="recovered above objective" valueFontSize={25} />
27
+ </CanvasItem>
28
+ <CanvasItem x={568} y={146} width={254} height={86}>
29
+ <MetricCard c={c} width={254} minHeight={86} tone="cyan" label="OLDEST QUEUE ITEM" value="18 s" detail="was 94 s at peak" valueFontSize={25} />
30
+ </CanvasItem>
31
+ <CanvasItem x={840} y={146} width={256} height={86}>
32
+ <MetricCard c={c} width={256} minHeight={86} tone="blue" label="TRAFFIC ON HEALTHY POOL" value="100%" detail="zone-b serving checkout" valueFontSize={25} />
33
+ </CanvasItem>
34
+
35
+ <CanvasItem x={24} y={244} width={650} height={260}>
36
+ <Panel
37
+ c={c}
38
+ width={650}
39
+ height={260}
40
+ padding={12}
41
+ gap={6}
42
+ tone="cyan"
43
+ title="LIVE ROUTING / CHECKOUT PLANE"
44
+ subtitle="The degraded worker is isolated; the healthy pool carries the rerouted queue."
45
+ >
46
+ <GraphDiagram
47
+ c={c}
48
+ width={624}
49
+ height={190}
50
+ layout="manual"
51
+ routing="orthogonal"
52
+ routingClearance={8}
53
+ edgeGap={18}
54
+ padding={12}
55
+ nodeWidth={122}
56
+ nodeHeight={58}
57
+ labelFontSize={11}
58
+ detailFontSize={11}
59
+ nodes={[
60
+ { id: 'edge', label: 'Edge gateway', detail: 'checkout API', x: 0.10, y: 0.50, tone: 'blue', icon: 'gateway' },
61
+ { id: 'queue', label: 'Event queue', detail: 'replay paused', x: 0.34, y: 0.50, tone: 'purple', icon: 'queue' },
62
+ { id: 'worker-a', label: 'Zone A pool', detail: 'degraded · 1/3', x: 0.63, y: 0.27, tone: 'critical', icon: 'server' },
63
+ { id: 'worker-b', label: 'Zone B pool', detail: 'healthy · 3/3', x: 0.63, y: 0.73, tone: 'green', icon: 'container' },
64
+ { id: 'orders', label: 'Orders store', detail: 'writes steady', x: 0.91, y: 0.50, tone: 'green', icon: 'database' },
65
+ ]}
66
+ edges={[
67
+ { from: 'edge', to: 'queue', fromSide: 'right', toSide: 'left', tone: 'blue' },
68
+ { from: 'queue', to: 'worker-a', fromSide: 'right', toSide: 'left', tone: 'critical', style: 'dashed' },
69
+ { from: 'queue', to: 'worker-b', fromSide: 'right', toSide: 'left', tone: 'green' },
70
+ { from: 'worker-a', to: 'orders', fromSide: 'right', toSide: 'left', tone: 'warm', style: 'dashed' },
71
+ { from: 'worker-b', to: 'orders', fromSide: 'right', toSide: 'left', tone: 'green' },
72
+ ]}
73
+ />
74
+ </Panel>
75
+ </CanvasItem>
76
+
77
+ <CanvasItem x={700} y={244} width={396} height={260}>
78
+ <Timeline
79
+ c={c}
80
+ width={396}
81
+ direction="vertical"
82
+ gap={7}
83
+ title="DRILL TIMELINE / RESPONSE"
84
+ events={[
85
+ { time: '14:32', title: 'Queue crosses 90 s', detail: 'Retry rate spikes 3×.', tone: 'critical' },
86
+ { time: '14:34', title: 'Replay throttled', detail: 'Protect healthy pool.', tone: 'warm' },
87
+ { time: '14:38', title: 'Fail over to zone B', detail: 'Lag falls steadily.', tone: 'green' },
88
+ ]}
89
+ />
90
+ </CanvasItem>
91
+
92
+ <CanvasItem x={24} y={514} width={1072} height={236}>
93
+ <LineChart
94
+ c={c}
95
+ width={1020}
96
+ height={106}
97
+ title="P95 LATENCY / RECOVERY CURVE"
98
+ subtitle="Lower is better · reroute restored the checkout SLO."
99
+ min={0}
100
+ max={2000}
101
+ format="integer"
102
+ labels={['14:32', '14:33', '14:34', '14:35', '14:36', '14:37', '14:38', '14:39']}
103
+ series={[
104
+ { name: 'p95 latency', points: [1800, 1690, 1320, 980, 710, 540, 428, 428], color: 'positive', area: true },
105
+ ]}
106
+ />
107
+ </CanvasItem>
108
+ </Board>
@@ -0,0 +1,81 @@
1
+ width = 1120;
2
+ height = 800;
3
+ background = "theme";
4
+
5
+ // themeColors = {"primary":"#6d28d9","primaryLight":"#c4b5fd","primaryDark":"#4c1d95","secondary":"#0e7490","secondaryLight":"#22d3ee","secondaryDark":"#155e75","positive":"#15803d","positiveLight":"#4ade80","positiveDark":"#166534","warning":"#c2410c","warningLight":"#fb923c","warningDark":"#9a3412","info":"#0369a1","infoLight":"#38bdf8","infoDark":"#075985","accent":"#be185d","accentLight":"#f9a8d4"}
6
+
7
+ <Board width={1120} height={800}>
8
+ <CanvasItem x={40} y={28} width={208} height={28}>
9
+ <BadgePill text="DAYBREAK / ISSUE 01" tone="purple" filled />
10
+ </CanvasItem>
11
+ <CanvasItem x={40} y={66} width={690} height={46}>
12
+ <TextLabel text="The launch found its people." variant="title" fontSize={31} color={c.textPrimary} />
13
+ </CanvasItem>
14
+ <CanvasItem x={40} y={116} width={690} height={32}>
15
+ <TextLabel text="A first-day field report · all figures are illustrative demo data" variant="body" fontSize={14} color={c.textSecondary} />
16
+ </CanvasItem>
17
+ <CanvasItem x={790} y={28} width={290} height={126}>
18
+ <MetricCard label="THE FIRST 24 HOURS" value="18,402" detail="new readers · +42% over goal" tone="purple" valueFontSize={34} align="left" />
19
+ </CanvasItem>
20
+
21
+ <CanvasItem x={40} y={172} width={248} height={82}>
22
+ <MetricCard label="ACTIVATION" value="64%" detail="opened a second story" tone="green" align="left" />
23
+ </CanvasItem>
24
+ <CanvasItem x={304} y={172} width={248} height={82}>
25
+ <MetricCard label="READ TIME" value="8m 24s" detail="median first session" tone="cyan" align="left" />
26
+ </CanvasItem>
27
+ <CanvasItem x={568} y={172} width={248} height={82}>
28
+ <MetricCard label="PAID TRIALS" value="1,286" detail="started before midnight" tone="warm" align="left" />
29
+ </CanvasItem>
30
+ <CanvasItem x={832} y={172} width={248} height={82}>
31
+ <MetricCard label="REFERRALS" value="2,940" detail="readers brought a friend" tone="pink" align="left" />
32
+ </CanvasItem>
33
+
34
+ <CanvasItem x={40} y={276} width={676} height={472}>
35
+ <LineChart
36
+ width={628}
37
+ height={358}
38
+ title="Momentum peaked at 6 pm"
39
+ subtitle="Hourly readers · mobile and desktop · demo cohort"
40
+ labels={['08', '10', '12', '14', '16', '18', '20', '22']}
41
+ format="compact"
42
+ yAxisLabel="readers"
43
+ series={[
44
+ { name: 'Mobile', points: [460, 720, 940, 1240, 1680, 1980, 1660, 1120], color: 'info', area: true },
45
+ { name: 'Desktop', points: [340, 570, 780, 1110, 1460, 1600, 1200, 900], color: 'accent' },
46
+ ]}
47
+ />
48
+ </CanvasItem>
49
+ <CanvasItem x={740} y={276} width={340} height={218}>
50
+ <DonutChart
51
+ width={306}
52
+ height={218}
53
+ size={132}
54
+ title="A launch list led discovery"
55
+ centerLabel="new readers"
56
+ centerValue="18.4k"
57
+ format="percent"
58
+ segments={[
59
+ { label: 'Launch list', value: 0.38, color: 'primary' },
60
+ { label: 'Search', value: 0.26, color: 'info' },
61
+ { label: 'Community', value: 0.21, color: 'positive' },
62
+ { label: 'Direct', value: 0.15, color: 'warning' },
63
+ ]}
64
+ />
65
+ </CanvasItem>
66
+ <CanvasItem x={740} y={516} width={340} height={222}>
67
+ <ParetoBarChart
68
+ width={306}
69
+ height={158}
70
+ title="Two steps drove most setup questions"
71
+ format="integer"
72
+ showValues={false}
73
+ data={[
74
+ { label: 'Setup', value: 40, color: 'warning' },
75
+ { label: 'Import', value: 28, color: 'critical' },
76
+ { label: 'Invite', value: 19, color: 'info' },
77
+ { label: 'Billing', value: 13, color: 'neutral' },
78
+ ]}
79
+ />
80
+ </CanvasItem>
81
+ </Board>
@@ -0,0 +1,97 @@
1
+ width = 1120;
2
+ height = 760;
3
+ background = "theme";
4
+
5
+ <Board c={c} width={1120} height={760}>
6
+ <CanvasItem x={24} y={20} width={1072} height={104}>
7
+ <CalloutCard
8
+ c={c}
9
+ width={1072}
10
+ minHeight={104}
11
+ padding={20}
12
+ align="left"
13
+ tone="blue"
14
+ filled={false}
15
+ title="MODEL GARDEN / ROUTE BY THE JOB"
16
+ titleFontSize={12}
17
+ detail="ILLUSTRATIVE DATA ONLY · compare the cost, quality, and latency trade-offs before choosing a default."
18
+ detailFontSize={16}
19
+ />
20
+ </CanvasItem>
21
+
22
+ <CanvasItem x={24} y={140} width={668} height={420}>
23
+ <ParetoChart
24
+ c={c}
25
+ width={450}
26
+ height={294}
27
+ title="MODEL OPTIONS / COST × QUALITY FRONTIER"
28
+ subtitle="Synthetic values · lower cost and higher quality are preferred."
29
+ xMin={0}
30
+ xMax={10}
31
+ yMin={50}
32
+ yMax={100}
33
+ xAxisLabel="credits per request · illustrative"
34
+ formatX="decimal"
35
+ formatY="integer"
36
+ frontierColor="positive"
37
+ showGoal={false}
38
+ points={[
39
+ { x: 0.5, y: 64, label: 'Swift', color: 'info', size: 8 },
40
+ { x: 1.2, y: 76, label: 'Sage', color: 'primary', size: 9 },
41
+ { x: 2.7, y: 88, label: 'Orbit', color: 'secondary', size: 9 },
42
+ { x: 5.8, y: 95, label: 'Apex', color: 'warning', size: 9 },
43
+ { x: 8.4, y: 97, label: 'Max', color: 'positive', size: 8 },
44
+ { x: 4.2, y: 81, label: 'Classic', color: 'critical', size: 8 },
45
+ { x: 7.1, y: 91, label: 'Studio', color: 'neutral', size: 8 },
46
+ ]}
47
+ footer="Fictional values for illustration, not model benchmarks."
48
+ />
49
+ </CanvasItem>
50
+
51
+ <CanvasItem x={712} y={140} width={384} height={178}>
52
+ <CalloutCard
53
+ c={c}
54
+ width={384}
55
+ minHeight={178}
56
+ padding={20}
57
+ align="left"
58
+ tone="green"
59
+ filled={false}
60
+ title="THE BALANCED DEFAULT"
61
+ titleFontSize={15}
62
+ detail="Sage covers routine support at 1.2 credits per request, with a fictional quality index of 76. Escalate only when the task needs deeper reasoning."
63
+ detailFontSize={13}
64
+ />
65
+ </CanvasItem>
66
+
67
+ <CanvasItem x={712} y={322} width={384} height={240}>
68
+ <BarChart
69
+ c={c}
70
+ width={350}
71
+ height={128}
72
+ title="SPEED / SECONDS · ILLUSTRATIVE P50"
73
+ subtitle="Lower latency · measure on your own workloads."
74
+ footer="P50 s: Swift 0.42 · Sage 0.68 · Orbit 1.20 · Apex 2.40"
75
+ format="decimal"
76
+ showValues={false}
77
+ min={0}
78
+ max={3}
79
+ data={[
80
+ { label: 'Swift', value: 0.42, color: 'info' },
81
+ { label: 'Sage', value: 0.68, color: 'primary' },
82
+ { label: 'Orbit', value: 1.2, color: 'secondary' },
83
+ { label: 'Apex', value: 2.4, color: 'warning' },
84
+ ]}
85
+ />
86
+ </CanvasItem>
87
+
88
+ <CanvasItem x={24} y={578} width={344} height={134}>
89
+ <CalloutCard c={c} width={344} minHeight={134} padding={16} align="left" tone="cyan" filled={false} title="FAST PATH / SWIFT" titleFontSize={13} detail="Tagging, extraction, and low stakes actions." detailFontSize={13} />
90
+ </CanvasItem>
91
+ <CanvasItem x={388} y={578} width={344} height={134}>
92
+ <CalloutCard c={c} width={344} minHeight={134} padding={16} align="left" tone="purple" filled={false} title="BALANCED / SAGE" titleFontSize={13} detail="Everyday support and dependable summaries." detailFontSize={13} />
93
+ </CanvasItem>
94
+ <CanvasItem x={752} y={578} width={344} height={134}>
95
+ <CalloutCard c={c} width={344} minHeight={134} padding={16} align="left" tone="warm" filled={false} title="DEEP WORK / APEX" titleFontSize={13} detail="Long plans, hard analysis, and careful reviews." detailFontSize={13} />
96
+ </CanvasItem>
97
+ </Board>
@@ -8,9 +8,14 @@ declare global {
8
8
  var width: number
9
9
  var height: number
10
10
  var preset: import('../src').ThemePreset
11
+ var background: string
11
12
 
12
13
  const c: import('../src').ThemeColors
14
+ const BadgePill: AutoTheme<typeof import('../src').BadgePill>
13
15
  const BarChart: AutoTheme<typeof import('../src').BarChart>
16
+ const Board: AutoTheme<typeof import('../src').Board>
17
+ const CanvasItem: AutoTheme<typeof import('../src').CanvasItem>
18
+ const Card: AutoTheme<typeof import('../src').Card>
14
19
  const CalloutCard: AutoTheme<typeof import('../src').CalloutCard>
15
20
  const Column: AutoTheme<typeof import('../src').Column>
16
21
  const DataTable: AutoTheme<typeof import('../src').DataTable>
@@ -28,6 +33,8 @@ declare global {
28
33
  const MetricCard: AutoTheme<typeof import('../src').MetricCard>
29
34
  const MiniBarChart: AutoTheme<typeof import('../src').MiniBarChart>
30
35
  const Panel: AutoTheme<typeof import('../src').Panel>
36
+ const ParetoBarChart: AutoTheme<typeof import('../src').ParetoBarChart>
37
+ const ParetoChart: AutoTheme<typeof import('../src').ParetoChart>
31
38
  const QuadrantChart: AutoTheme<typeof import('../src').QuadrantChart>
32
39
  const Row: AutoTheme<typeof import('../src').Row>
33
40
  const ScatterPlot: AutoTheme<typeof import('../src').ScatterPlot>
@@ -0,0 +1,81 @@
1
+ width = 1120;
2
+ height = 800;
3
+ background = "theme";
4
+
5
+ // themeColors = {"primary":"#9a3412","primaryLight":"#fdba74","primaryDark":"#7c2d12","secondary":"#0f766e","secondaryLight":"#5eead4","secondaryDark":"#134e4a","positive":"#4d7c0f","positiveLight":"#a3e635","positiveDark":"#365314","warning":"#b45309","warningLight":"#fbbf24","warningDark":"#78350f","info":"#0369a1","infoLight":"#38bdf8","infoDark":"#075985","accent":"#be185d","accentLight":"#f9a8d4"}
6
+
7
+ <Board width={1120} height={800}>
8
+ <CanvasItem x={40} y={28} width={226} height={28}>
9
+ <BadgePill text="THE WEEKENDER / FIELD NOTE 04" tone="warm" filled />
10
+ </CanvasItem>
11
+ <CanvasItem x={40} y={66} width={720} height={46}>
12
+ <TextLabel text="Take the long way through Bellweather." variant="title" fontSize={30} color={c.textPrimary} />
13
+ </CanvasItem>
14
+ <CanvasItem x={40} y={116} width={720} height={36}>
15
+ <TextLabel text="A fictional neighborhood walk · invented stops, scores, and timings" variant="body" fontSize={14} color={c.textSecondary} />
16
+ </CanvasItem>
17
+ <CanvasItem x={822} y={28} width={258} height={112}>
18
+ <MetricCard label="READER RATING" value="4.9 / 5" detail="42 min on foot" tone="green" width={258} minHeight={112} valueFontSize={28} align="left" />
19
+ </CanvasItem>
20
+
21
+ <CanvasItem x={40} y={178} width={694} height={320}>
22
+ <Card title="SAFFRON ROW · 1.8 MILES" subtitle="Four gentle stops from the tram to the old market" tone="warm" width={694} height={320} padding={16}>
23
+ <GraphDiagram
24
+ title="Fictional walking route through Saffron Row"
25
+ ariaLabel="Demo walking route from Juniper Cafe through Glasshouse Garden and Paper Moon Books to Old Market"
26
+ width={660}
27
+ height={225}
28
+ nodeWidth={126}
29
+ nodeHeight={76}
30
+ labelFontSize={13}
31
+ detailFontSize={12}
32
+ routing="orthogonal"
33
+ routingClearance={12}
34
+ nodes={[
35
+ { id: 'cafe', label: 'Juniper', detail: 'tram stop', x: 0.12, y: 0.25, tone: 'warm', icon: 'globe' },
36
+ { id: 'garden', label: 'Glasshouse', detail: 'shaded pause', x: 0.37, y: 0.70, tone: 'green', icon: 'bucket' },
37
+ { id: 'books', label: 'Paper Moon', detail: 'quiet shelves', x: 0.63, y: 0.25, tone: 'purple', icon: 'file' },
38
+ { id: 'market', label: 'Old Market', detail: 'citrus bun', x: 0.88, y: 0.70, tone: 'cyan', icon: 'check' },
39
+ ]}
40
+ edges={[
41
+ { from: 'cafe', to: 'garden', tone: 'warm' },
42
+ { from: 'garden', to: 'books', tone: 'green' },
43
+ { from: 'books', to: 'market', tone: 'cyan' },
44
+ ]}
45
+ />
46
+ </Card>
47
+ </CanvasItem>
48
+
49
+ <CanvasItem x={40} y={518} width={694} height={222}>
50
+ <BarChart
51
+ width={660}
52
+ height={158}
53
+ title="Suggested pause, in demo minutes"
54
+ format="integer"
55
+ data={[
56
+ { label: 'Cafe', value: 18, color: 'warning' },
57
+ { label: 'Garden', value: 26, color: 'positive' },
58
+ { label: 'Books', value: 22, color: 'primary' },
59
+ { label: 'Market', value: 14, color: 'info' },
60
+ ]}
61
+ />
62
+ </CanvasItem>
63
+
64
+ <CanvasItem x={762} y={178} width={318} height={88}>
65
+ <StepCard eyebrow="01 · 4.9 / 5" title="Juniper Café" subtitle="Cortado · sesame bun" tone="warm" align="left" width={318} minHeight={88} />
66
+ </CanvasItem>
67
+ <CanvasItem x={762} y={278} width={318} height={88}>
68
+ <StepCard eyebrow="02 · 4.8 / 5" title="Glasshouse Garden" subtitle="Fern shade · quiet benches" tone="green" align="left" width={318} minHeight={88} />
69
+ </CanvasItem>
70
+ <CanvasItem x={762} y={378} width={318} height={88}>
71
+ <StepCard eyebrow="03 · 4.7 / 5" title="Paper Moon Books" subtitle="Used books · window seat" tone="purple" align="left" width={318} minHeight={88} />
72
+ </CanvasItem>
73
+ <CanvasItem x={762} y={478} width={318} height={88}>
74
+ <StepCard eyebrow="04 · 4.6 / 5" title="Old Market Hall" subtitle="Citrus bun · flower stall" tone="cyan" align="left" width={318} minHeight={88} />
75
+ </CanvasItem>
76
+ <CanvasItem x={762} y={584} width={318} height={122}>
77
+ <Card title="Let the route breathe" subtitle="No reservations. No hurry. Every place in this guide is fictional demo content." tone="purple" width={318} height={122} padding={16}>
78
+ <TextLabel text="Start when the rain clears; stay as long as the coffee is warm." variant="tiny" color={c.textSecondary} />
79
+ </Card>
80
+ </CanvasItem>
81
+ </Board>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vizmatic",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Theme-aware visual primitives and a headless renderer for diagrams, figures, and presentation frames.",
5
5
  "type": "module",
6
6
  "license": "MIT",