vizmatic 0.1.15 → 0.1.16
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 +2 -2
- package/README.md +3 -1
- package/docs/PROMPT.md +2 -2
- package/docs/assets/examples/sources.json +3 -3
- package/docs/assets/examples/transparent-badge_dark.png +0 -0
- package/docs/assets/examples/transparent-badge_light.png +0 -0
- package/examples/transparent-badge.tsx +4 -4
- package/package.json +1 -1
package/PROMPT.md
CHANGED
|
@@ -121,7 +121,7 @@ Or set it in the frame:
|
|
|
121
121
|
|
|
122
122
|
If a direct CLI frame omits `width` or `height`, Vizmatic starts at `960x540` and grows omitted axes when overflow is detected. Explicit dimensions stay strict and should be used when exact output size matters.
|
|
123
123
|
|
|
124
|
-
For direct CLI frames, skip imports, `defineIllustration`, and `c` props by default. The CLI injects Vizmatic primitives and theme colors. Reference `c` only when you need explicit theme tokens such as `background={c.bg}`. Use the full module form when you need custom dependencies, direct renderer APIs, advanced reusable JSX helpers, or animation exports.
|
|
124
|
+
For direct CLI frames, skip imports, `defineIllustration`, and `c` props by default. The CLI injects Vizmatic primitives and theme colors. Reference `c` only when you need explicit theme tokens such as `background={c.bg}`. `Scene` title/subtitle are optional; omit both for visual-only figures, badges, inline blog diagrams, or frames where surrounding copy already supplies the title. Use the full module form when you need custom dependencies, direct renderer APIs, advanced reusable JSX helpers, or animation exports.
|
|
125
125
|
|
|
126
126
|
Frame modules can also export a watermark element when code-owned branding is clearer than CLI flags:
|
|
127
127
|
|
|
@@ -231,7 +231,7 @@ Frame helpers:
|
|
|
231
231
|
|
|
232
232
|
- `defineIllustration(build, defaultTheme?)`: `build: (c: ThemeColors) => ReactElement`, `defaultTheme?: ThemeMode = "dark"`. Returns `{ create(theme), default }`.
|
|
233
233
|
- `Canvas`: `children?`, `c`, `padding?: number = 40`, `justify?: "center" | "flex-start" | "space-between" | "space-around" = "center"`, `background?: string`. Default root background is alpha-transparent during PNG/SVG rendering.
|
|
234
|
-
- `Scene`: `c`, `children`, `title?`, `subtitle?`, `padding?: number = 40`, `gap?: number = 24`, `justify?: Canvas.justify = "flex-start"`, `align?: FlexAlign = "stretch"`, `contentWidth?: number | string = "100%"`, `background?`, `contentStyle?: React.CSSProperties`. Use `background={c.bg}` for an opaque theme frame.
|
|
234
|
+
- `Scene`: `c`, `children`, `title?`, `subtitle?`, `padding?: number = 40`, `gap?: number = 24`, `justify?: Canvas.justify = "flex-start"`, `align?: FlexAlign = "stretch"`, `contentWidth?: number | string = "100%"`, `background?`, `contentStyle?: React.CSSProperties`. Title/subtitle are optional and the title bar is omitted when no title is provided. Use `background={c.bg}` for an opaque theme frame.
|
|
235
235
|
- `TitleBar`: `title`, `subtitle?`, `c`.
|
|
236
236
|
|
|
237
237
|
Layout primitives:
|
package/README.md
CHANGED
|
@@ -153,6 +153,8 @@ height = 560;
|
|
|
153
153
|
</Scene>
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
+
`Scene` title and subtitle are optional. Omit both for visual-only figures, badges, inline blog diagrams, or frames where surrounding copy already supplies the title.
|
|
157
|
+
|
|
156
158
|
Render it:
|
|
157
159
|
|
|
158
160
|
```bash
|
|
@@ -464,7 +466,7 @@ Vizmatic exports a fairly complete visual kit. Common cases should use these pri
|
|
|
464
466
|
|---|---|
|
|
465
467
|
| `defineIllustration` | Wraps a theme-aware frame builder and exports `create(theme)` plus a default element. |
|
|
466
468
|
| `Canvas` | Low-level full-frame root with alpha-transparent default background, optional background fill, padding, and vertical alignment. |
|
|
467
|
-
| `Scene` | Standard frame wrapper with title
|
|
469
|
+
| `Scene` | Standard frame wrapper with optional title/subtitle, content column, and theme-aware typography. |
|
|
468
470
|
| `TitleBar` | Shared title/subtitle block used by `Scene`. |
|
|
469
471
|
| `Row` / `Column` | Flex layout primitives with gap, alignment, wrapping, width, and height props. |
|
|
470
472
|
| `Stack` | Layered vertical stack for repeated cards, tokens, or processing layers. |
|
package/docs/PROMPT.md
CHANGED
|
@@ -121,7 +121,7 @@ Or set it in the frame:
|
|
|
121
121
|
|
|
122
122
|
If a direct CLI frame omits `width` or `height`, Vizmatic starts at `960x540` and grows omitted axes when overflow is detected. Explicit dimensions stay strict and should be used when exact output size matters.
|
|
123
123
|
|
|
124
|
-
For direct CLI frames, skip imports, `defineIllustration`, and `c` props by default. The CLI injects Vizmatic primitives and theme colors. Reference `c` only when you need explicit theme tokens such as `background={c.bg}`. Use the full module form when you need custom dependencies, direct renderer APIs, advanced reusable JSX helpers, or animation exports.
|
|
124
|
+
For direct CLI frames, skip imports, `defineIllustration`, and `c` props by default. The CLI injects Vizmatic primitives and theme colors. Reference `c` only when you need explicit theme tokens such as `background={c.bg}`. `Scene` title/subtitle are optional; omit both for visual-only figures, badges, inline blog diagrams, or frames where surrounding copy already supplies the title. Use the full module form when you need custom dependencies, direct renderer APIs, advanced reusable JSX helpers, or animation exports.
|
|
125
125
|
|
|
126
126
|
Frame modules can also export a watermark element when code-owned branding is clearer than CLI flags:
|
|
127
127
|
|
|
@@ -231,7 +231,7 @@ Frame helpers:
|
|
|
231
231
|
|
|
232
232
|
- `defineIllustration(build, defaultTheme?)`: `build: (c: ThemeColors) => ReactElement`, `defaultTheme?: ThemeMode = "dark"`. Returns `{ create(theme), default }`.
|
|
233
233
|
- `Canvas`: `children?`, `c`, `padding?: number = 40`, `justify?: "center" | "flex-start" | "space-between" | "space-around" = "center"`, `background?: string`. Default root background is alpha-transparent during PNG/SVG rendering.
|
|
234
|
-
- `Scene`: `c`, `children`, `title?`, `subtitle?`, `padding?: number = 40`, `gap?: number = 24`, `justify?: Canvas.justify = "flex-start"`, `align?: FlexAlign = "stretch"`, `contentWidth?: number | string = "100%"`, `background?`, `contentStyle?: React.CSSProperties`. Use `background={c.bg}` for an opaque theme frame.
|
|
234
|
+
- `Scene`: `c`, `children`, `title?`, `subtitle?`, `padding?: number = 40`, `gap?: number = 24`, `justify?: Canvas.justify = "flex-start"`, `align?: FlexAlign = "stretch"`, `contentWidth?: number | string = "100%"`, `background?`, `contentStyle?: React.CSSProperties`. Title/subtitle are optional and the title bar is omitted when no title is provided. Use `background={c.bg}` for an opaque theme frame.
|
|
235
235
|
- `TitleBar`: `title`, `subtitle?`, `c`.
|
|
236
236
|
|
|
237
237
|
Layout primitives:
|
|
@@ -143,10 +143,10 @@
|
|
|
143
143
|
"name": "transparent-badge",
|
|
144
144
|
"title": "Transparent Badge",
|
|
145
145
|
"source": "examples/transparent-badge.tsx",
|
|
146
|
-
"code": "width = 760;\nheight = 420;\n\n<Scene
|
|
146
|
+
"code": "width = 760;\nheight = 420;\n\n<Scene align=\"center\" contentWidth={620}>\n <Row gap={16} width=\"100%\" justify=\"center\">\n <MetricCard label=\"Alpha\" value=\"default\" detail=\"no canvas fill\" tone=\"cyan\" width={210} />\n <StepCard title=\"Titleless\" subtitle=\"visual-only scene\" tone=\"green\" width={210} />\n </Row>\n <CalloutCard\n title=\"No title bar required\"\n detail=\"Omit Scene title/subtitle for badges, inline figures, or visuals that should stand on their own.\"\n tone=\"purple\"\n width={560}\n />\n</Scene>\n",
|
|
147
147
|
"html": {
|
|
148
|
-
"dark": "<pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">width </span><span style=\"color:#F97583\">=</span><span style=\"color:#79B8FF\"> 760</span><span style=\"color:#E1E4E8\">;</span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">height </span><span style=\"color:#F97583\">=</span><span style=\"color:#79B8FF\"> 420</span><span style=\"color:#E1E4E8\">;</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\"><</span><span style=\"color:#79B8FF\">Scene</span><span style=\"color:#B392F0\">
|
|
149
|
-
"light": "<pre class=\"shiki github-light\" style=\"background-color:#fff;color:#24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#24292E\">width </span><span style=\"color:#D73A49\">=</span><span style=\"color:#005CC5\"> 760</span><span style=\"color:#24292E\">;</span></span>\n<span class=\"line\"><span style=\"color:#24292E\">height </span><span style=\"color:#D73A49\">=</span><span style=\"color:#005CC5\"> 420</span><span style=\"color:#24292E\">;</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#24292E\"><</span><span style=\"color:#005CC5\">Scene</span><span style=\"color:#6F42C1\">
|
|
148
|
+
"dark": "<pre class=\"shiki github-dark\" style=\"background-color:#24292e;color:#e1e4e8\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#E1E4E8\">width </span><span style=\"color:#F97583\">=</span><span style=\"color:#79B8FF\"> 760</span><span style=\"color:#E1E4E8\">;</span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\">height </span><span style=\"color:#F97583\">=</span><span style=\"color:#79B8FF\"> 420</span><span style=\"color:#E1E4E8\">;</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\"><</span><span style=\"color:#79B8FF\">Scene</span><span style=\"color:#B392F0\"> align</span><span style=\"color:#F97583\">=</span><span style=\"color:#9ECBFF\">\"center\"</span><span style=\"color:#B392F0\"> contentWidth</span><span style=\"color:#F97583\">=</span><span style=\"color:#E1E4E8\">{</span><span style=\"color:#79B8FF\">620</span><span style=\"color:#E1E4E8\">}></span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\"> <</span><span style=\"color:#79B8FF\">Row</span><span style=\"color:#B392F0\"> gap</span><span style=\"color:#F97583\">=</span><span style=\"color:#E1E4E8\">{</span><span style=\"color:#79B8FF\">16</span><span style=\"color:#E1E4E8\">} </span><span style=\"color:#B392F0\">width</span><span style=\"color:#F97583\">=</span><span style=\"color:#9ECBFF\">\"100%\"</span><span style=\"color:#B392F0\"> justify</span><span style=\"color:#F97583\">=</span><span style=\"color:#9ECBFF\">\"center\"</span><span style=\"color:#E1E4E8\">></span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\"> <</span><span style=\"color:#79B8FF\">MetricCard</span><span style=\"color:#B392F0\"> label</span><span style=\"color:#F97583\">=</span><span style=\"color:#9ECBFF\">\"Alpha\"</span><span style=\"color:#B392F0\"> value</span><span style=\"color:#F97583\">=</span><span style=\"color:#9ECBFF\">\"default\"</span><span style=\"color:#B392F0\"> detail</span><span style=\"color:#F97583\">=</span><span style=\"color:#9ECBFF\">\"no canvas fill\"</span><span style=\"color:#B392F0\"> tone</span><span style=\"color:#F97583\">=</span><span style=\"color:#9ECBFF\">\"cyan\"</span><span style=\"color:#B392F0\"> width</span><span style=\"color:#F97583\">=</span><span style=\"color:#E1E4E8\">{</span><span style=\"color:#79B8FF\">210</span><span style=\"color:#E1E4E8\">} /></span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\"> <</span><span style=\"color:#79B8FF\">StepCard</span><span style=\"color:#B392F0\"> title</span><span style=\"color:#F97583\">=</span><span style=\"color:#9ECBFF\">\"Titleless\"</span><span style=\"color:#B392F0\"> subtitle</span><span style=\"color:#F97583\">=</span><span style=\"color:#9ECBFF\">\"visual-only scene\"</span><span style=\"color:#B392F0\"> tone</span><span style=\"color:#F97583\">=</span><span style=\"color:#9ECBFF\">\"green\"</span><span style=\"color:#B392F0\"> width</span><span style=\"color:#F97583\">=</span><span style=\"color:#E1E4E8\">{</span><span style=\"color:#79B8FF\">210</span><span style=\"color:#E1E4E8\">} /></span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\"> </</span><span style=\"color:#79B8FF\">Row</span><span style=\"color:#E1E4E8\">></span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\"> <</span><span style=\"color:#79B8FF\">CalloutCard</span></span>\n<span class=\"line\"><span style=\"color:#B392F0\"> title</span><span style=\"color:#F97583\">=</span><span style=\"color:#9ECBFF\">\"No title bar required\"</span></span>\n<span class=\"line\"><span style=\"color:#B392F0\"> detail</span><span style=\"color:#F97583\">=</span><span style=\"color:#9ECBFF\">\"Omit Scene title/subtitle for badges, inline figures, or visuals that should stand on their own.\"</span></span>\n<span class=\"line\"><span style=\"color:#B392F0\"> tone</span><span style=\"color:#F97583\">=</span><span style=\"color:#9ECBFF\">\"purple\"</span></span>\n<span class=\"line\"><span style=\"color:#B392F0\"> width</span><span style=\"color:#F97583\">=</span><span style=\"color:#E1E4E8\">{</span><span style=\"color:#79B8FF\">560</span><span style=\"color:#E1E4E8\">}</span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\"> /></span></span>\n<span class=\"line\"><span style=\"color:#E1E4E8\"></</span><span style=\"color:#79B8FF\">Scene</span><span style=\"color:#E1E4E8\">></span></span>\n<span class=\"line\"></span></code></pre>",
|
|
149
|
+
"light": "<pre class=\"shiki github-light\" style=\"background-color:#fff;color:#24292e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color:#24292E\">width </span><span style=\"color:#D73A49\">=</span><span style=\"color:#005CC5\"> 760</span><span style=\"color:#24292E\">;</span></span>\n<span class=\"line\"><span style=\"color:#24292E\">height </span><span style=\"color:#D73A49\">=</span><span style=\"color:#005CC5\"> 420</span><span style=\"color:#24292E\">;</span></span>\n<span class=\"line\"></span>\n<span class=\"line\"><span style=\"color:#24292E\"><</span><span style=\"color:#005CC5\">Scene</span><span style=\"color:#6F42C1\"> align</span><span style=\"color:#D73A49\">=</span><span style=\"color:#032F62\">\"center\"</span><span style=\"color:#6F42C1\"> contentWidth</span><span style=\"color:#D73A49\">=</span><span style=\"color:#24292E\">{</span><span style=\"color:#005CC5\">620</span><span style=\"color:#24292E\">}></span></span>\n<span class=\"line\"><span style=\"color:#24292E\"> <</span><span style=\"color:#005CC5\">Row</span><span style=\"color:#6F42C1\"> gap</span><span style=\"color:#D73A49\">=</span><span style=\"color:#24292E\">{</span><span style=\"color:#005CC5\">16</span><span style=\"color:#24292E\">} </span><span style=\"color:#6F42C1\">width</span><span style=\"color:#D73A49\">=</span><span style=\"color:#032F62\">\"100%\"</span><span style=\"color:#6F42C1\"> justify</span><span style=\"color:#D73A49\">=</span><span style=\"color:#032F62\">\"center\"</span><span style=\"color:#24292E\">></span></span>\n<span class=\"line\"><span style=\"color:#24292E\"> <</span><span style=\"color:#005CC5\">MetricCard</span><span style=\"color:#6F42C1\"> label</span><span style=\"color:#D73A49\">=</span><span style=\"color:#032F62\">\"Alpha\"</span><span style=\"color:#6F42C1\"> value</span><span style=\"color:#D73A49\">=</span><span style=\"color:#032F62\">\"default\"</span><span style=\"color:#6F42C1\"> detail</span><span style=\"color:#D73A49\">=</span><span style=\"color:#032F62\">\"no canvas fill\"</span><span style=\"color:#6F42C1\"> tone</span><span style=\"color:#D73A49\">=</span><span style=\"color:#032F62\">\"cyan\"</span><span style=\"color:#6F42C1\"> width</span><span style=\"color:#D73A49\">=</span><span style=\"color:#24292E\">{</span><span style=\"color:#005CC5\">210</span><span style=\"color:#24292E\">} /></span></span>\n<span class=\"line\"><span style=\"color:#24292E\"> <</span><span style=\"color:#005CC5\">StepCard</span><span style=\"color:#6F42C1\"> title</span><span style=\"color:#D73A49\">=</span><span style=\"color:#032F62\">\"Titleless\"</span><span style=\"color:#6F42C1\"> subtitle</span><span style=\"color:#D73A49\">=</span><span style=\"color:#032F62\">\"visual-only scene\"</span><span style=\"color:#6F42C1\"> tone</span><span style=\"color:#D73A49\">=</span><span style=\"color:#032F62\">\"green\"</span><span style=\"color:#6F42C1\"> width</span><span style=\"color:#D73A49\">=</span><span style=\"color:#24292E\">{</span><span style=\"color:#005CC5\">210</span><span style=\"color:#24292E\">} /></span></span>\n<span class=\"line\"><span style=\"color:#24292E\"> </</span><span style=\"color:#005CC5\">Row</span><span style=\"color:#24292E\">></span></span>\n<span class=\"line\"><span style=\"color:#24292E\"> <</span><span style=\"color:#005CC5\">CalloutCard</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1\"> title</span><span style=\"color:#D73A49\">=</span><span style=\"color:#032F62\">\"No title bar required\"</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1\"> detail</span><span style=\"color:#D73A49\">=</span><span style=\"color:#032F62\">\"Omit Scene title/subtitle for badges, inline figures, or visuals that should stand on their own.\"</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1\"> tone</span><span style=\"color:#D73A49\">=</span><span style=\"color:#032F62\">\"purple\"</span></span>\n<span class=\"line\"><span style=\"color:#6F42C1\"> width</span><span style=\"color:#D73A49\">=</span><span style=\"color:#24292E\">{</span><span style=\"color:#005CC5\">560</span><span style=\"color:#24292E\">}</span></span>\n<span class=\"line\"><span style=\"color:#24292E\"> /></span></span>\n<span class=\"line\"><span style=\"color:#24292E\"></</span><span style=\"color:#005CC5\">Scene</span><span style=\"color:#24292E\">></span></span>\n<span class=\"line\"></span></code></pre>"
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
]
|
|
Binary file
|
|
Binary file
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
width = 760;
|
|
2
2
|
height = 420;
|
|
3
3
|
|
|
4
|
-
<Scene
|
|
4
|
+
<Scene align="center" contentWidth={620}>
|
|
5
5
|
<Row gap={16} width="100%" justify="center">
|
|
6
6
|
<MetricCard label="Alpha" value="default" detail="no canvas fill" tone="cyan" width={210} />
|
|
7
|
-
<StepCard title="
|
|
7
|
+
<StepCard title="Titleless" subtitle="visual-only scene" tone="green" width={210} />
|
|
8
8
|
</Row>
|
|
9
9
|
<CalloutCard
|
|
10
|
-
title="No
|
|
11
|
-
detail="
|
|
10
|
+
title="No title bar required"
|
|
11
|
+
detail="Omit Scene title/subtitle for badges, inline figures, or visuals that should stand on their own."
|
|
12
12
|
tone="purple"
|
|
13
13
|
width={560}
|
|
14
14
|
/>
|
package/package.json
CHANGED