vizmatic 0.1.10 → 0.1.12
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 +11 -5
- package/README.md +25 -3
- package/dist/cli.js +7 -7
- package/docs/PROMPT.md +11 -5
- package/package.json +1 -1
package/PROMPT.md
CHANGED
|
@@ -6,13 +6,19 @@ Use Vizmatic to create polished, theme-aware diagrams, figures, dashboards, pres
|
|
|
6
6
|
|
|
7
7
|
Use the package manager already present in the project.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Install the CLI once:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
pnpm
|
|
12
|
+
pnpm add -g vizmatic
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Then render any frame directly:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
vizmatic ./frame.tsx --out ./dist/frames --theme dark,light
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Install in the project when the project needs scripts, editor types, or direct renderer APIs:
|
|
16
22
|
|
|
17
23
|
```bash
|
|
18
24
|
pnpm add vizmatic react
|
|
@@ -96,7 +102,7 @@ height = 560;
|
|
|
96
102
|
Render it:
|
|
97
103
|
|
|
98
104
|
```bash
|
|
99
|
-
|
|
105
|
+
vizmatic frames --out public/vizmatic --theme dark,light --watermark "Your Product" --watermark-image ./logo.svg --watermark-position top-right
|
|
100
106
|
```
|
|
101
107
|
|
|
102
108
|
For direct CLI frames, skip imports, `defineIllustration`, and `c` props by default. The CLI injects Vizmatic primitives and theme colors. Use the full module form when you need custom dependencies, direct renderer APIs, advanced reusable JSX helpers, or animation exports.
|
|
@@ -127,7 +133,7 @@ export const watermark = (
|
|
|
127
133
|
Render animated frames with `createScenes(theme)`:
|
|
128
134
|
|
|
129
135
|
```bash
|
|
130
|
-
|
|
136
|
+
vizmatic gif frames/animated-pipeline.tsx --out public/vizmatic --theme dark,light --watermark "Your Product" --watermark-image ./logo.svg --watermark-position top-right --scale 1
|
|
131
137
|
```
|
|
132
138
|
|
|
133
139
|
## Create an animated frame
|
package/README.md
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
<a href="https://bvolpato.github.io/vizmatic/">Website</a> ·
|
|
23
23
|
<a href="examples">Examples</a> ·
|
|
24
24
|
<a href="PROMPT.md">Agent Prompt</a> ·
|
|
25
|
+
<a href="#codex-skill">Codex Skill</a> ·
|
|
25
26
|
<a href="#quick-start">Quick Start</a> ·
|
|
26
27
|
<a href="#why-vizmatic">Why Vizmatic</a> ·
|
|
27
28
|
<a href="#api">API</a>
|
|
@@ -31,15 +32,21 @@
|
|
|
31
32
|
|
|
32
33
|
## Quick Start
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
Install the CLI once:
|
|
35
36
|
|
|
36
37
|
```bash
|
|
37
|
-
pnpm
|
|
38
|
+
pnpm add -g vizmatic
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Then render any frame directly:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
vizmatic ./frame.tsx --out ./dist/frames --theme dark,light
|
|
38
45
|
```
|
|
39
46
|
|
|
40
47
|
Bare CLI frames auto-import Vizmatic primitives and inject theme colors. Use normal imports when a frame needs helpers, data loading, custom dependencies, or direct renderer APIs.
|
|
41
48
|
|
|
42
|
-
Install it when you want
|
|
49
|
+
Install it in the project when you want scripts, editor types, or direct renderer APIs:
|
|
43
50
|
|
|
44
51
|
```bash
|
|
45
52
|
pnpm add vizmatic react
|
|
@@ -51,6 +58,21 @@ Optional edge build from GitHub:
|
|
|
51
58
|
pnpm add github:bvolpato/vizmatic react
|
|
52
59
|
```
|
|
53
60
|
|
|
61
|
+
## Codex Skill
|
|
62
|
+
|
|
63
|
+
Vizmatic also ships as a Codex plugin with a bundled `$vizmatic` skill. Add this repo as a marketplace, install the Vizmatic plugin from Codex, then ask for visual assets directly:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
codex plugin marketplace add bvolpato/vizmatic --ref main
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Example prompts:
|
|
70
|
+
|
|
71
|
+
```text
|
|
72
|
+
Use $vizmatic to create a theme-aware architecture diagram and render dark/light PNG files.
|
|
73
|
+
Use $vizmatic to turn this release workflow into an animated GIF for docs.
|
|
74
|
+
```
|
|
75
|
+
|
|
54
76
|
Create a frame:
|
|
55
77
|
|
|
56
78
|
```tsx
|
package/dist/cli.js
CHANGED
|
@@ -5377,7 +5377,7 @@ function usageText() {
|
|
|
5377
5377
|
|
|
5378
5378
|
Examples:
|
|
5379
5379
|
vizmatic examples/attention-head.tsx --out dist/frames --theme dark,light
|
|
5380
|
-
|
|
5380
|
+
vizmatic ./frame.tsx --out ./dist/frames --theme dark
|
|
5381
5381
|
vizmatic render examples --out docs/assets/examples --theme dark --watermark Vizmatic
|
|
5382
5382
|
vizmatic render frames/attention.tsx --out dist/frames --theme dark,light
|
|
5383
5383
|
vizmatic gif examples/animated-pipeline.tsx --out docs/assets/examples --theme dark --watermark Vizmatic`;
|
|
@@ -5494,11 +5494,15 @@ function findRootJsxStart(source) {
|
|
|
5494
5494
|
function bareFrameAlias(name) {
|
|
5495
5495
|
return `__Vizmatic_${name}`;
|
|
5496
5496
|
}
|
|
5497
|
+
function escapeRegExp(value) {
|
|
5498
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5499
|
+
}
|
|
5497
5500
|
function bareFrameExportsForSource(source) {
|
|
5498
5501
|
return BARE_FRAME_EXPORTS.filter((name) => {
|
|
5499
5502
|
if (name === "getThemeColors") return true;
|
|
5500
|
-
|
|
5501
|
-
return new RegExp(
|
|
5503
|
+
const escapedName = escapeRegExp(name);
|
|
5504
|
+
if (/^[A-Z]/.test(name)) return new RegExp(`<\\/?${escapedName}(?:\\s|>|/)`).test(source);
|
|
5505
|
+
return new RegExp(`\\b${escapedName}\\b`).test(source);
|
|
5502
5506
|
});
|
|
5503
5507
|
}
|
|
5504
5508
|
function buildAutoImportStatement(names) {
|
|
@@ -5734,10 +5738,6 @@ async function importFrame(filePath) {
|
|
|
5734
5738
|
try {
|
|
5735
5739
|
return await tsImport(url, import.meta.url);
|
|
5736
5740
|
} catch (tsxError) {
|
|
5737
|
-
if (!isBareFrame) {
|
|
5738
|
-
const bareFrame = await importBareFrame(filePath, source);
|
|
5739
|
-
if (bareFrame) return bareFrame;
|
|
5740
|
-
}
|
|
5741
5741
|
throw tsxError;
|
|
5742
5742
|
}
|
|
5743
5743
|
}
|
package/docs/PROMPT.md
CHANGED
|
@@ -6,13 +6,19 @@ Use Vizmatic to create polished, theme-aware diagrams, figures, dashboards, pres
|
|
|
6
6
|
|
|
7
7
|
Use the package manager already present in the project.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Install the CLI once:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
pnpm
|
|
12
|
+
pnpm add -g vizmatic
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
Then render any frame directly:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
vizmatic ./frame.tsx --out ./dist/frames --theme dark,light
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Install in the project when the project needs scripts, editor types, or direct renderer APIs:
|
|
16
22
|
|
|
17
23
|
```bash
|
|
18
24
|
pnpm add vizmatic react
|
|
@@ -96,7 +102,7 @@ height = 560;
|
|
|
96
102
|
Render it:
|
|
97
103
|
|
|
98
104
|
```bash
|
|
99
|
-
|
|
105
|
+
vizmatic frames --out public/vizmatic --theme dark,light --watermark "Your Product" --watermark-image ./logo.svg --watermark-position top-right
|
|
100
106
|
```
|
|
101
107
|
|
|
102
108
|
For direct CLI frames, skip imports, `defineIllustration`, and `c` props by default. The CLI injects Vizmatic primitives and theme colors. Use the full module form when you need custom dependencies, direct renderer APIs, advanced reusable JSX helpers, or animation exports.
|
|
@@ -127,7 +133,7 @@ export const watermark = (
|
|
|
127
133
|
Render animated frames with `createScenes(theme)`:
|
|
128
134
|
|
|
129
135
|
```bash
|
|
130
|
-
|
|
136
|
+
vizmatic gif frames/animated-pipeline.tsx --out public/vizmatic --theme dark,light --watermark "Your Product" --watermark-image ./logo.svg --watermark-position top-right --scale 1
|
|
131
137
|
```
|
|
132
138
|
|
|
133
139
|
## Create an animated frame
|
package/package.json
CHANGED