vizmatic 0.1.11 → 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/README.md +16 -0
- package/dist/cli.js +7 -7
- package/package.json +1 -1
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>
|
|
@@ -57,6 +58,21 @@ Optional edge build from GitHub:
|
|
|
57
58
|
pnpm add github:bvolpato/vizmatic react
|
|
58
59
|
```
|
|
59
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
|
+
|
|
60
76
|
Create a frame:
|
|
61
77
|
|
|
62
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/package.json
CHANGED