Skip to content

Commit 3f1e71e

Browse files
authored
prepare v0.11.0 (#175)
* prepare v0.11.0 * release instructions
1 parent 553c803 commit 3f1e71e

File tree

10 files changed

+751
-2
lines changed

10 files changed

+751
-2
lines changed

.changeset/config.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"@json-render/redux",
1616
"@json-render/jotai",
1717
"@json-render/vue",
18-
"@json-render/xstate"
18+
"@json-render/xstate",
19+
"@json-render/image"
1920
]
2021
],
2122
"linked": [],

.changeset/v0-11-release.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
"@json-render/core": minor
3+
"@json-render/image": minor
4+
---
5+
6+
Image renderer: generate SVG and PNG from JSON specs.
7+
8+
### New: `@json-render/image` Package
9+
10+
Server-side image renderer powered by Satori. Turns the same `{ root, elements }` spec format into SVG or PNG output for OG images, social cards, and banners.
11+
12+
- `renderToSvg(spec, options)` — render spec to SVG string
13+
- `renderToPng(spec, options)` — render spec to PNG buffer (requires `@resvg/resvg-js`)
14+
- 9 standard components: Frame, Box, Row, Column, Heading, Text, Image, Divider, Spacer
15+
- `standardComponentDefinitions` catalog for AI prompt generation
16+
- Server-safe import path: `@json-render/image/server`
17+
- Sub-path exports: `/render`, `/catalog`, `/server`

AGENTS.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,41 @@ Do **not** add `--port` flags -- portless handles port assignment automatically.
7373
- Skills in `skills/*/SKILL.md` (if the package has a corresponding skill)
7474
- `AGENTS.md` (if workflow or conventions change)
7575

76+
## Releases
77+
78+
This monorepo uses [Changesets](https://github.com/changesets/changesets) for versioning and publishing.
79+
80+
### Fixed version group
81+
82+
All public `@json-render/*` packages are in a **fixed** group (see `.changeset/config.json`). A changeset that bumps any one of them bumps all of them to the same version. You only need to list the packages that actually changed in the changeset front matter — the fixed group handles the rest.
83+
84+
### Preparing a release
85+
86+
When asked to prepare a release (e.g. "prepare v0.12.0"):
87+
88+
1. **Create a changeset file** at `.changeset/v0-<N>-release.md` following the existing pattern:
89+
- YAML front matter listing changed packages with bump type (`minor` for feature releases, `patch` for bug-fix-only releases)
90+
- A one-line summary, then `### New:` / `### Improved:` / `### Fixed:` sections describing each change
91+
- Always list `@json-render/core` plus any packages with actual code changes
92+
2. **Do NOT bump versions** in `package.json` files — CI runs `pnpm ci:version` (which calls `changeset version`) to do that automatically
93+
3. **Do NOT manually write `CHANGELOG.md`** entries — `changeset version` generates them from the changeset file
94+
4. **Add new packages to the fixed group** in `.changeset/config.json` if they should be versioned together with the rest
95+
5. **Fill documentation gaps** — every public package should have:
96+
- A row in the root `README.md` packages table
97+
- A renderer section in the root `README.md` (if it's a renderer)
98+
- An API reference page at `apps/web/app/(main)/docs/api/<name>/page.mdx`
99+
- An entry in `apps/web/lib/page-titles.ts` and `apps/web/lib/docs-navigation.ts`
100+
- An entry in the docs-chat system prompt (`apps/web/app/api/docs-chat/route.ts`)
101+
- A skill at `skills/json-render-<name>/SKILL.md`
102+
- A `packages/<name>/README.md`
103+
6. **Run `pnpm type-check`** after all changes to verify nothing is broken
104+
105+
### CI scripts
106+
107+
- `pnpm changeset` — interactively create a new changeset
108+
- `pnpm ci:version` — run `changeset version` + lockfile update (CI only)
109+
- `pnpm ci:publish` — build all packages and publish to npm (CI only)
110+
76111
<!-- opensrc:start -->
77112

78113
## Source Code Reference

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ function Dashboard({ spec }) {
118118
| `@json-render/react-native` | React Native renderer with standard mobile components |
119119
| `@json-render/remotion` | Remotion video renderer, timeline schema |
120120
| `@json-render/react-pdf` | React PDF renderer for generating PDF documents from specs |
121+
| `@json-render/image` | Image renderer for SVG/PNG output (OG images, social cards) via Satori |
121122
| `@json-render/redux` | Redux / Redux Toolkit adapter for `StateStore` |
122123
| `@json-render/zustand` | Zustand adapter for `StateStore` |
123124
| `@json-render/jotai` | Jotai adapter for `StateStore` |
@@ -287,6 +288,35 @@ const spec = {
287288
const buffer = await renderToBuffer(spec);
288289
```
289290

291+
### Image (SVG/PNG)
292+
293+
```typescript
294+
import { renderToPng } from "@json-render/image/render";
295+
296+
const spec = {
297+
root: "frame",
298+
elements: {
299+
frame: {
300+
type: "Frame",
301+
props: { width: 1200, height: 630, backgroundColor: "#1a1a2e" },
302+
children: ["heading"],
303+
},
304+
heading: {
305+
type: "Heading",
306+
props: { text: "Hello World", level: "h1", color: "#ffffff" },
307+
children: [],
308+
},
309+
},
310+
};
311+
312+
// Render to PNG (requires @resvg/resvg-js)
313+
const png = await renderToPng(spec, { fonts });
314+
315+
// Or render to SVG string
316+
import { renderToSvg } from "@json-render/image/render";
317+
const svg = await renderToSvg(spec, { fonts });
318+
```
319+
290320
## Features
291321

292322
### Streaming (SpecStream)

0 commit comments

Comments
 (0)