vizmatic 0.1.30 → 0.1.32
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 -0
- package/README.md +23 -52
- package/dist/cli.js +652 -33
- package/dist/index.cjs +28 -9
- package/dist/index.d.cts +86 -80
- package/dist/index.d.ts +86 -80
- package/dist/index.js +27 -9
- package/package.json +5 -1
package/PROMPT.md
CHANGED
|
@@ -31,6 +31,14 @@ Render dark and light assets:
|
|
|
31
31
|
vizmatic ./frame.tsx --out ./dist/frames --theme dark,light
|
|
32
32
|
```
|
|
33
33
|
|
|
34
|
+
Validate the scene with structured diagnostics before publishing:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
vizmatic check ./frame.tsx --theme dark,light --json
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Fix errors before rendering final assets. Warnings identify concerns such as low text contrast or asset fallbacks; overflow errors include affected edges and suggested dimensions.
|
|
41
|
+
|
|
34
42
|
## Project installation
|
|
35
43
|
|
|
36
44
|
Use the package manager already present in the project.
|
|
@@ -449,6 +457,7 @@ height = 560;
|
|
|
449
457
|
- Use `width`, `minWidth`, `height`, `minHeight`, `gap`, and `padding` props to stabilize layout.
|
|
450
458
|
- Keep text short. Use `TextLabel`, `Panel`, `StepCard`, `MetricCard`, `DataTable`, and `Grid` for wrapping-safe labels.
|
|
451
459
|
- Render both dark and light when shipping reusable assets: `--theme dark,light`.
|
|
460
|
+
- Run `vizmatic check <frame> --theme dark,light --json` before final render and fix every error.
|
|
452
461
|
- Use GIF only when motion explains state change. Keep scenes short, export `createScenes(theme)`, and keep a static `create(theme)` fallback.
|
|
453
462
|
- If render fails with `Canvas overflow detected`, the frame has strict dimensions. Increase canvas dimensions, reduce content density, or remove strict sizing for CLI auto-fit. Do not ignore the error.
|
|
454
463
|
- Verify generated PNGs/GIFs exist and are non-empty. Open at least one rendered image before finalizing.
|
|
@@ -526,4 +535,5 @@ After creating a Vizmatic visual, report:
|
|
|
526
535
|
- render command used
|
|
527
536
|
- output image paths, including GIF paths when generated
|
|
528
537
|
- whether dark/light variants rendered
|
|
538
|
+
- whether structured validation passed
|
|
529
539
|
- any overflow or layout fixes made
|
package/README.md
CHANGED
|
@@ -20,9 +20,10 @@
|
|
|
20
20
|
|
|
21
21
|
<p align="center">
|
|
22
22
|
<a href="https://bvolpato.github.io/vizmatic/">Website</a> ·
|
|
23
|
+
<a href="https://bvolpato.github.io/vizmatic/#playground">Playground</a> ·
|
|
23
24
|
<a href="examples">Examples</a> ·
|
|
24
25
|
<a href="PROMPT.md">Agent Prompt</a> ·
|
|
25
|
-
<a href="#agent-
|
|
26
|
+
<a href="#agent-skill">Agent Skill</a> ·
|
|
26
27
|
<a href="#quick-start">Quick Start</a> ·
|
|
27
28
|
<a href="#why-vizmatic">Why Vizmatic</a> ·
|
|
28
29
|
<a href="#api">API</a>
|
|
@@ -60,6 +61,12 @@ Render it directly:
|
|
|
60
61
|
vizmatic ./frame.tsx --out ./dist/frames --theme dark,light
|
|
61
62
|
```
|
|
62
63
|
|
|
64
|
+
Validate both themes before publishing. `--json` returns structured errors, warnings, overflow edges, and suggested dimensions for agents and CI:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
vizmatic check ./frame.tsx --theme dark,light --json
|
|
68
|
+
```
|
|
69
|
+
|
|
63
70
|
PNG and SVG renders use an alpha-transparent canvas by default. Add `--background theme` when the output needs the actual dark/light theme fill:
|
|
64
71
|
|
|
65
72
|
```bash
|
|
@@ -82,75 +89,39 @@ Optional edge build from GitHub:
|
|
|
82
89
|
pnpm add github:bvolpato/vizmatic react
|
|
83
90
|
```
|
|
84
91
|
|
|
85
|
-
## Agent
|
|
92
|
+
## Agent skill
|
|
86
93
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
Vizmatic ships as a Codex plugin with a bundled `$vizmatic` skill. Add this repository as a marketplace, then install the plugin:
|
|
94
|
+
Install the portable Vizmatic skill globally. The installer detects Codex, Claude Code, Cursor, OpenCode, and other compatible agents:
|
|
90
95
|
|
|
91
96
|
```bash
|
|
92
|
-
|
|
93
|
-
codex plugin add vizmatic@vizmatic
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Example prompts:
|
|
97
|
-
|
|
98
|
-
```text
|
|
99
|
-
Use $vizmatic to create a theme-aware architecture diagram and render dark/light PNG files.
|
|
100
|
-
Use $vizmatic to turn this release workflow into an animated GIF for docs.
|
|
97
|
+
npx skills add bvolpato/vizmatic --skill vizmatic -g -y
|
|
101
98
|
```
|
|
102
99
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
Claude Code can import Vizmatic as a plugin marketplace directly from this repository:
|
|
100
|
+
Target specific agents when more than one is installed:
|
|
106
101
|
|
|
107
102
|
```bash
|
|
108
|
-
|
|
109
|
-
claude plugin install vizmatic@vizmatic --scope user
|
|
103
|
+
npx skills add bvolpato/vizmatic --skill vizmatic -g -a codex -a claude-code -a cursor -a opencode -y
|
|
110
104
|
```
|
|
111
105
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
### Cursor
|
|
115
|
-
|
|
116
|
-
Cursor can import skills from GitHub repositories through Remote Rule:
|
|
117
|
-
|
|
118
|
-
1. Open **Customize** in the sidebar.
|
|
119
|
-
2. Go to **Rules** and click **Add Rule**.
|
|
120
|
-
3. Select **Remote Rule (Github)**.
|
|
121
|
-
4. Enter `https://github.com/bvolpato/vizmatic`.
|
|
122
|
-
|
|
123
|
-
The repo exposes the portable skill at `.agents/skills/vizmatic`, which Cursor discovers as a project skill. Manual install also works:
|
|
106
|
+
Example prompts:
|
|
124
107
|
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
cp -R .agents/skills/vizmatic ~/.cursor/skills/vizmatic
|
|
108
|
+
```text
|
|
109
|
+
Use the Vizmatic skill to create a theme-aware architecture diagram and render dark/light PNG files.
|
|
110
|
+
Use the Vizmatic skill to turn this release workflow into an animated GIF for docs.
|
|
129
111
|
```
|
|
130
112
|
|
|
131
|
-
|
|
113
|
+
The skill source lives at [`.agents/skills/vizmatic`](.agents/skills/vizmatic). Preview it before installation with `npx skills add bvolpato/vizmatic --list`.
|
|
132
114
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
The GitHub-importable skill lives at `.agents/skills/vizmatic`. Copy that folder into the agent-specific skills directory:
|
|
115
|
+
Native Codex and Claude Code plugin marketplaces remain available:
|
|
136
116
|
|
|
137
117
|
```bash
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
mkdir -p ~/.config/opencode/skills
|
|
144
|
-
rm -rf ~/.config/opencode/skills/vizmatic
|
|
145
|
-
cp -R "$tmp/vizmatic/.agents/skills/vizmatic" ~/.config/opencode/skills/vizmatic
|
|
118
|
+
codex plugin marketplace add bvolpato/vizmatic --ref main
|
|
119
|
+
codex plugin add vizmatic@vizmatic
|
|
146
120
|
```
|
|
147
121
|
|
|
148
|
-
For a shared Cursor/OpenCode global location, use `~/.agents/skills` instead:
|
|
149
|
-
|
|
150
122
|
```bash
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
cp -R "$tmp/vizmatic/.agents/skills/vizmatic" ~/.agents/skills/vizmatic
|
|
123
|
+
claude plugin marketplace add bvolpato/vizmatic
|
|
124
|
+
claude plugin install vizmatic@vizmatic --scope user
|
|
154
125
|
```
|
|
155
126
|
|
|
156
127
|
## Rendering options
|