vizmatic 0.1.4 → 0.1.6
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 +10 -2
- package/README.md +57 -74
- package/dist/cli.js +4994 -38
- package/docs/PROMPT.md +10 -2
- package/docs/assets/examples/sources.json +1 -1
- package/examples/README.md +21 -0
- package/package.json +6 -4
package/docs/PROMPT.md
CHANGED
|
@@ -2,10 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Use Vizmatic to create polished, theme-aware diagrams, figures, dashboards, presentation frames, and animated GIFs from structured React scene primitives.
|
|
4
4
|
|
|
5
|
-
## Install
|
|
5
|
+
## Install Or Run
|
|
6
6
|
|
|
7
7
|
Use the package manager already present in the project.
|
|
8
8
|
|
|
9
|
+
For one-off renders, use the binary without changing `package.json`:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm dlx vizmatic ./frame.tsx --out ./dist/frames --theme dark,light
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Install when the project needs scripts, editor types, or direct renderer APIs:
|
|
16
|
+
|
|
9
17
|
```bash
|
|
10
18
|
pnpm add vizmatic react
|
|
11
19
|
```
|
|
@@ -106,7 +114,7 @@ export default frame.default
|
|
|
106
114
|
Render it:
|
|
107
115
|
|
|
108
116
|
```bash
|
|
109
|
-
pnpm exec vizmatic
|
|
117
|
+
pnpm exec vizmatic frames --out public/vizmatic --theme dark,light --watermark "Your Product" --watermark-image ./logo.svg --watermark-position top-right
|
|
110
118
|
```
|
|
111
119
|
|
|
112
120
|
Frame modules can also export a watermark element when code-owned branding is clearer than CLI flags:
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
},
|
|
72
72
|
{
|
|
73
73
|
"name": "rag-graph",
|
|
74
|
-
"title": "
|
|
74
|
+
"title": "RAG Graph",
|
|
75
75
|
"source": "examples/rag-graph.tsx",
|
|
76
76
|
"code": "import React from 'react'\nimport { defineIllustration, GraphDiagram, Scene } from 'vizmatic'\n\nexport const width = 1040\nexport const height = 560\n\nconst frame = defineIllustration((c) =>\n <Scene c={c} title=\"RAG control graph\" subtitle=\"retrieval is a graph, not a linear prompt append\" align=\"center\">\n <GraphDiagram\n c={c}\n width={820}\n height={390}\n nodeWidth={150}\n nodes={[\n { id: 'query', label: 'Query', detail: 'user intent', x: 0.08, y: 0.52, tone: 'blue' },\n { id: 'rewrite', label: 'Rewrite', detail: 'search form', x: 0.30, y: 0.25, tone: 'purple' },\n { id: 'retrieve', label: 'Retrieve', detail: 'top-k docs', x: 0.52, y: 0.25, tone: 'cyan' },\n { id: 'rerank', label: 'Rerank', detail: 'cross-encoder', x: 0.74, y: 0.25, tone: 'warm' },\n { id: 'answer', label: 'Answer', detail: 'grounded draft', x: 0.92, y: 0.52, tone: 'green' },\n { id: 'verify', label: 'Verify', detail: 'citations', x: 0.52, y: 0.78, tone: 'critical' },\n ]}\n edges={[\n { from: 'query', to: 'rewrite', label: 'normalize', tone: 'blue' },\n { from: 'rewrite', to: 'retrieve', label: 'search', tone: 'purple' },\n { from: 'retrieve', to: 'rerank', label: 'rank', tone: 'cyan' },\n { from: 'rerank', to: 'answer', label: 'context', tone: 'green' },\n { from: 'answer', to: 'verify', label: 'claims', tone: 'critical' },\n { from: 'verify', to: 'retrieve', label: 'retry', dashed: true, tone: 'warm' },\n { from: 'query', to: 'answer', label: 'direct?', muted: true },\n ]}\n />\n </Scene>\n)\n\nexport const create = frame.create\nexport default frame.default\n",
|
|
77
77
|
"html": {
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Vizmatic Examples
|
|
2
|
+
|
|
3
|
+
Generated by `pnpm render:examples`. Edit the `.tsx` sources, then rerun render command to refresh previews.
|
|
4
|
+
|
|
5
|
+
Rendered assets live in [`../docs/assets/examples`](../docs/assets/examples).
|
|
6
|
+
|
|
7
|
+
| Example | Dark | Light |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| [Agent Pipeline](agent-pipeline.tsx) | <img src="../docs/assets/examples/agent-pipeline_dark.png" alt="Agent Pipeline dark render" width="360" /> | <img src="../docs/assets/examples/agent-pipeline_light.png" alt="Agent Pipeline light render" width="360" /> |
|
|
10
|
+
| [Animated Pipeline](animated-pipeline.tsx) | <img src="../docs/assets/examples/animated-pipeline_dark.gif" alt="Animated Pipeline dark render" width="360" /> | <img src="../docs/assets/examples/animated-pipeline_light.gif" alt="Animated Pipeline light render" width="360" /> |
|
|
11
|
+
| [Attention Head](attention-head.tsx) | <img src="../docs/assets/examples/attention-head_dark.png" alt="Attention Head dark render" width="360" /> | <img src="../docs/assets/examples/attention-head_light.png" alt="Attention Head light render" width="360" /> |
|
|
12
|
+
| [Embedding Map](embedding-map.tsx) | <img src="../docs/assets/examples/embedding-map_dark.png" alt="Embedding Map dark render" width="360" /> | <img src="../docs/assets/examples/embedding-map_light.png" alt="Embedding Map light render" width="360" /> |
|
|
13
|
+
| [Eval Dashboard](eval-dashboard.tsx) | <img src="../docs/assets/examples/eval-dashboard_dark.png" alt="Eval Dashboard dark render" width="360" /> | <img src="../docs/assets/examples/eval-dashboard_light.png" alt="Eval Dashboard light render" width="360" /> |
|
|
14
|
+
| [Model Router](model-router.tsx) | <img src="../docs/assets/examples/model-router_dark.png" alt="Model Router dark render" width="360" /> | <img src="../docs/assets/examples/model-router_light.png" alt="Model Router light render" width="360" /> |
|
|
15
|
+
| [Presentation Frame](presentation-frame.tsx) | <img src="../docs/assets/examples/presentation-frame_dark.png" alt="Presentation Frame dark render" width="360" /> | <img src="../docs/assets/examples/presentation-frame_light.png" alt="Presentation Frame light render" width="360" /> |
|
|
16
|
+
| [RAG Graph](rag-graph.tsx) | <img src="../docs/assets/examples/rag-graph_dark.png" alt="RAG Graph dark render" width="360" /> | <img src="../docs/assets/examples/rag-graph_light.png" alt="RAG Graph light render" width="360" /> |
|
|
17
|
+
| [Release Card](release-card.tsx) | <img src="../docs/assets/examples/release-card_dark.png" alt="Release Card dark render" width="360" /> | <img src="../docs/assets/examples/release-card_light.png" alt="Release Card light render" width="360" /> |
|
|
18
|
+
| [Research Landscape](research-landscape.tsx) | <img src="../docs/assets/examples/research-landscape_dark.png" alt="Research Landscape dark render" width="360" /> | <img src="../docs/assets/examples/research-landscape_light.png" alt="Research Landscape light render" width="360" /> |
|
|
19
|
+
| [Spec Anatomy](spec-anatomy.tsx) | <img src="../docs/assets/examples/spec-anatomy_dark.png" alt="Spec Anatomy dark render" width="360" /> | <img src="../docs/assets/examples/spec-anatomy_light.png" alt="Spec Anatomy light render" width="360" /> |
|
|
20
|
+
| [Theme System](theme-system.tsx) | <img src="../docs/assets/examples/theme-system_dark.png" alt="Theme System dark render" width="360" /> | <img src="../docs/assets/examples/theme-system_light.png" alt="Theme System light render" width="360" /> |
|
|
21
|
+
| [Token Matrix](token-matrix.tsx) | <img src="../docs/assets/examples/token-matrix_dark.png" alt="Token Matrix dark render" width="360" /> | <img src="../docs/assets/examples/token-matrix_light.png" alt="Token Matrix light render" width="360" /> |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vizmatic",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Theme-aware visual primitives and render pipeline for AI-generated diagrams, figures, and presentation frames.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "tsup src/index.ts --format esm,cjs --dts --target node20 --clean --external react && tsup src/cli.ts --format esm --dts --target node20 --external react",
|
|
58
58
|
"prepare": "pnpm build",
|
|
59
|
+
"lint": "pnpm typecheck",
|
|
59
60
|
"typecheck": "tsc --noEmit",
|
|
60
61
|
"test": "vitest run",
|
|
61
62
|
"render:examples": "pnpm build && tsx scripts/render-examples.ts && pnpm site:build",
|
|
@@ -63,12 +64,14 @@
|
|
|
63
64
|
"docs:check": "tsx scripts/check-docs.ts",
|
|
64
65
|
"site:serve": "node scripts/serve-docs.mjs docs 4173",
|
|
65
66
|
"security:audit": "pnpm audit --audit-level low",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
67
|
+
"deps:check": "pnpm security:audit && npm pack --dry-run",
|
|
68
|
+
"verify": "pnpm lint && pnpm test && pnpm render:examples && pnpm docs:check && pnpm deps:check",
|
|
69
|
+
"prepublishOnly": "pnpm test && pnpm render:examples && pnpm deps:check"
|
|
68
70
|
},
|
|
69
71
|
"dependencies": {
|
|
70
72
|
"@resvg/resvg-js": "^2.6.2",
|
|
71
73
|
"gifenc": "^1.0.3",
|
|
74
|
+
"react": "^19.1.0",
|
|
72
75
|
"satori": "^0.26.0",
|
|
73
76
|
"tsx": "^4.20.4"
|
|
74
77
|
},
|
|
@@ -78,7 +81,6 @@
|
|
|
78
81
|
"devDependencies": {
|
|
79
82
|
"@types/node": "^26.0.1",
|
|
80
83
|
"@types/react": "^19.1.8",
|
|
81
|
-
"react": "^19.1.0",
|
|
82
84
|
"shiki": "^4.3.0",
|
|
83
85
|
"tsup": "^8.5.0",
|
|
84
86
|
"typescript": "^6.0.3",
|