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.
@@ -31,7 +31,10 @@ Rendered assets live on the [Vizmatic gallery](https://bvolpato.github.io/vizmat
31
31
  | [NCCL All To All](nccl-all-to-all.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-to-all_dark.gif" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-to-all_light.gif" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/nccl-all-to-all_light.gif" alt="NCCL All To All preview" width="720" /></picture> |
32
32
  | [NCCL Broadcast](nccl-broadcast.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/nccl-broadcast_dark.gif" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/nccl-broadcast_light.gif" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/nccl-broadcast_light.gif" alt="NCCL Broadcast preview" width="720" /></picture> |
33
33
  | [NCCL Reduce Scatter](nccl-reduce-scatter.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/nccl-reduce-scatter_dark.gif" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/nccl-reduce-scatter_light.gif" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/nccl-reduce-scatter_light.gif" alt="NCCL Reduce Scatter preview" width="720" /></picture> |
34
+ | [Orthogonal Routing](orthogonal-routing.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/orthogonal-routing_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/orthogonal-routing_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/orthogonal-routing_light.png" alt="Orthogonal Routing preview" width="720" /></picture> |
35
+ | [Pareto Bar Chart](pareto-bar-chart.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/pareto-bar-chart_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/pareto-bar-chart_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/pareto-bar-chart_light.png" alt="Pareto Bar Chart preview" width="720" /></picture> |
34
36
  | [Pareto Frontier](pareto-frontier.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/pareto-frontier_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/pareto-frontier_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/pareto-frontier_light.png" alt="Pareto Frontier preview" width="720" /></picture> |
37
+ | [Pie Chart](pie-chart.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/pie-chart_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/pie-chart_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/pie-chart_light.png" alt="Pie Chart preview" width="720" /></picture> |
35
38
  | [Presentation Frame](presentation-frame.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/presentation-frame_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/presentation-frame_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/presentation-frame_light.png" alt="Presentation Frame preview" width="720" /></picture> |
36
39
  | [RAG Graph](rag-graph.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/rag-graph_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/rag-graph_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/rag-graph_light.png" alt="RAG Graph preview" width="720" /></picture> |
37
40
  | [Release Card](release-card.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/release-card_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/release-card_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/release-card_light.png" alt="Release Card preview" width="720" /></picture> |
@@ -43,3 +46,4 @@ Rendered assets live on the [Vizmatic gallery](https://bvolpato.github.io/vizmat
43
46
  | [Token Matrix](token-matrix.tsx) | <picture><source media="(prefers-color-scheme: dark)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/token-matrix_dark.png" /><source media="(prefers-color-scheme: light)" srcset="https://bvolpato.github.io/vizmatic/assets/examples/token-matrix_light.png" /><img src="https://bvolpato.github.io/vizmatic/assets/examples/token-matrix_light.png" alt="Token Matrix preview" width="720" /></picture> |
44
47
  | [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> |
45
48
  | [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
+ | [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> |
@@ -0,0 +1,25 @@
1
+ width = 1040;
2
+ height = 560;
3
+
4
+ <Scene title="Routes that respect the architecture" subtitle="named ports, separated traffic, and obstacle-aware connectors" align="center">
5
+ <GraphDiagram
6
+ ariaLabel="Two network routes bypass a central security appliance, with a retry loop on storage"
7
+ width={960}
8
+ height={380}
9
+ nodeWidth={150}
10
+ nodeHeight={80}
11
+ routing="orthogonal"
12
+ routingClearance={18}
13
+ edgeGap={24}
14
+ nodes={[
15
+ { id: 'gateway', label: 'Gateway', detail: 'separate channels', x: 0.12, y: 0.52, tone: 'blue', icon: 'gateway', ports: [{ id: 'read', side: 'right', offset: 0.25 }, { id: 'write', side: 'right', offset: 0.75 }] },
16
+ { id: 'security', label: 'Security', detail: 'reserved footprint', x: 0.50, y: 0.52, width: 190, height: 150, tone: 'purple', icon: 'firewall' },
17
+ { id: 'storage', label: 'Storage', detail: 'read / write API', x: 0.87, y: 0.52, tone: 'green', icon: 'database', ports: [{ id: 'read', side: 'left', offset: 0.25 }, { id: 'write', side: 'left', offset: 0.75 }, { id: 'retry', side: 'right' }, { id: 'resume', side: 'top' }] },
18
+ ]}
19
+ edges={[
20
+ { from: 'gateway', to: 'storage', fromPort: 'read', toPort: 'read', label: 'reads', tone: 'blue' },
21
+ { from: 'gateway', to: 'storage', fromPort: 'write', toPort: 'write', label: 'writes', tone: 'green' },
22
+ { from: 'storage', to: 'storage', fromPort: 'retry', toPort: 'resume', label: 'retry', style: 'dashed', tone: 'warm' },
23
+ ]}
24
+ />
25
+ </Scene>
@@ -0,0 +1,44 @@
1
+ import {
2
+ ParetoBarChart,
3
+ Scene,
4
+ getThemeColors,
5
+ type ThemeMode,
6
+ } from 'vizmatic'
7
+
8
+ export const width = 1040
9
+ export const height = 570
10
+
11
+ const tickets = [
12
+ { label: 'Setup', value: 42, color: 'primary' },
13
+ { label: 'Authentication', value: 28, color: 'secondary' },
14
+ { label: 'Slow responses', value: 18, color: 'warning' },
15
+ { label: 'Other', value: 12, color: 'neutral' },
16
+ ]
17
+
18
+ export function create(theme: ThemeMode = 'dark') {
19
+ const c = getThemeColors(theme)
20
+
21
+ return (
22
+ <Scene
23
+ c={c}
24
+ title="Focus on the few causes behind most tickets"
25
+ subtitle="Bars sort categories by count; the line tracks cumulative share"
26
+ background={c.bg}
27
+ padding={22}
28
+ gap={14}
29
+ align="center"
30
+ >
31
+ <ParetoBarChart
32
+ c={c}
33
+ width={920}
34
+ height={320}
35
+ title="Support tickets by root cause"
36
+ subtitle="The first two categories account for 70% of reports"
37
+ data={tickets}
38
+ footer="Sample: 100 tickets from the past seven days"
39
+ />
40
+ </Scene>
41
+ )
42
+ }
43
+
44
+ export default create('dark')
@@ -0,0 +1,46 @@
1
+ import {
2
+ PieChart,
3
+ Scene,
4
+ getThemeColors,
5
+ type ThemeMode,
6
+ } from 'vizmatic'
7
+
8
+ export const width = 1040
9
+ export const height = 570
10
+
11
+ const tickets = [
12
+ { label: 'Setup', value: 42, color: 'primary' },
13
+ { label: 'Authentication', value: 28, color: 'secondary' },
14
+ { label: 'Slow responses', value: 18, color: 'warning' },
15
+ { label: 'Other', value: 12, color: 'neutral' },
16
+ ]
17
+
18
+ export function create(theme: ThemeMode = 'dark') {
19
+ const c = getThemeColors(theme)
20
+
21
+ return (
22
+ <Scene
23
+ c={c}
24
+ title="See where the support load comes from"
25
+ subtitle="A pie chart shows each category as a share of all reported tickets"
26
+ background={c.bg}
27
+ padding={22}
28
+ gap={14}
29
+ align="center"
30
+ >
31
+ <PieChart
32
+ c={c}
33
+ width={920}
34
+ height={310}
35
+ size={220}
36
+ title="Support tickets by root cause"
37
+ subtitle="42 of 100 reports are setup questions"
38
+ format="integer"
39
+ segments={tickets}
40
+ footer="Sample: 100 tickets from the past seven days"
41
+ />
42
+ </Scene>
43
+ )
44
+ }
45
+
46
+ export default create('dark')
@@ -0,0 +1,38 @@
1
+ import { getThemeColors, GraphDiagram, Row, BadgePill, Scene, type ThemeMode } from 'vizmatic'
2
+
3
+ export const width = 720
4
+ export const height = 380
5
+
6
+ export function create(theme: ThemeMode = 'dark') {
7
+ const c = getThemeColors(theme)
8
+ return (
9
+ <Scene c={c} title="An idea becomes a visual" background={c.bg} padding={28} gap={24}>
10
+ <GraphDiagram
11
+ c={c}
12
+ width={664}
13
+ height={200}
14
+ nodeWidth={130}
15
+ nodeHeight={74}
16
+ labelFontSize={19}
17
+ detailFontSize={13}
18
+ nodes={[
19
+ { id: 'idea', label: 'Idea', detail: 'you or your agent', x: 0.11, y: 0.5, tone: 'blue' },
20
+ { id: 'scene', label: 'Scene', detail: 'editable TSX', x: 0.37, y: 0.5, tone: 'purple' },
21
+ { id: 'check', label: 'Check', detail: 'layout + contrast', x: 0.63, y: 0.5, tone: 'cyan' },
22
+ { id: 'export', label: 'Export', detail: 'ready to share', x: 0.89, y: 0.5, tone: 'green' },
23
+ ]}
24
+ edges={[
25
+ { from: 'idea', to: 'scene', tone: 'blue' },
26
+ { from: 'scene', to: 'check', tone: 'purple' },
27
+ { from: 'check', to: 'export', tone: 'cyan' },
28
+ ]}
29
+ />
30
+ <Row gap={12} justify="center">
31
+ <BadgePill c={c} text="Dark + light" tone="purple" />
32
+ <BadgePill c={c} text="PNG / SVG / GIF" tone="green" />
33
+ </Row>
34
+ </Scene>
35
+ )
36
+ }
37
+
38
+ export default create('dark')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vizmatic",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
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",
@@ -63,7 +63,7 @@
63
63
  "vizmatic": "dist/cli.js"
64
64
  },
65
65
  "scripts": {
66
- "build": "tsup src/index.ts --format esm --dts --target node20 --clean --external react && tsup src/index.ts --format cjs --dts --target node20 --external react --define.import.meta.url undefined && tsup src/cli.ts --format esm --dts --target node20 --external react",
66
+ "build": "tsup src/index.ts --format esm --dts --target node20 --clean --external react && tsup src/index.ts --format cjs --dts --target node20 --external react --define.import.meta.url undefined && tsup src/cli.ts --format esm --dts --target node20 --external react --minify-whitespace",
67
67
  "assets:emoji": "node scripts/build-emoji-bundle.mjs",
68
68
  "assets:check": "node scripts/build-emoji-bundle.mjs --check",
69
69
  "prepare": "pnpm build",
@@ -74,7 +74,9 @@
74
74
  "benchmark:quality": "pnpm build && tsx scripts/benchmark-quality.ts && pnpm site:build",
75
75
  "check:examples": "tsx scripts/check-examples.ts",
76
76
  "playground:build": "tsx scripts/build-playground.ts",
77
+ "check:playground": "node scripts/check-playground.mjs",
77
78
  "site:build": "tsx scripts/build-site.ts",
79
+ "site:fonts": "uv run scripts/build-site-fonts.py",
78
80
  "docs:check": "tsx scripts/check-docs.ts",
79
81
  "workflows:check": "github-actionlint .github/workflows/*.yml",
80
82
  "site:serve": "node scripts/serve-docs.mjs docs 4173",
@@ -90,7 +92,7 @@
90
92
  "gifenc": "^1.0.3",
91
93
  "parse-css-color": "0.2.1",
92
94
  "react": "^19.2.8",
93
- "satori": "^0.33.4",
95
+ "satori": "^0.35.0",
94
96
  "tsx": "^4.23.12"
95
97
  },
96
98
  "peerDependencies": {
@@ -98,16 +100,17 @@
98
100
  },
99
101
  "devDependencies": {
100
102
  "@resvg/resvg-wasm": "2.6.2",
101
- "@types/node": "^26.6.1",
103
+ "@types/node": "^26.6.4",
102
104
  "@types/react": "^19.2.18",
103
105
  "esbuild": "0.28.2",
104
106
  "github-actionlint": "1.7.12",
105
107
  "harfbuzzjs": "0.10.0",
106
- "publint": "0.3.24",
107
- "shiki": "^4.4.3",
108
+ "playwright": "1.63.0",
109
+ "publint": "0.3.25",
110
+ "shiki": "^4.5.0",
108
111
  "sucrase": "3.35.1",
109
112
  "tsup": "^8.5.1",
110
113
  "typescript": ">=6.0.3 <7",
111
- "vitest": "^5.0.1"
114
+ "vitest": "^5.0.3"
112
115
  }
113
116
  }