takumi-js 2.6.0 → 2.6.2
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 +10 -2
- package/package.json +11 -6
package/README.md
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
# takumi-js
|
|
5
5
|
|
|
6
|
-
**Render JSX
|
|
6
|
+
**Render OG images from JSX, HTML, and CSS. No headless browser.**
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Render PNG, WebP, SVG, or animations. The package provides an `ImageResponse` API compatible with `next/og`.
|
|
9
9
|
|
|
10
10
|
[Documentation](https://takumi.kane.tw/docs/) · [Playground](https://takumi.kane.tw/playground)
|
|
11
11
|
|
|
@@ -35,6 +35,14 @@ const image = await render(
|
|
|
35
35
|
await writeFile("./output.png", image);
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
## Coming from something else
|
|
39
|
+
|
|
40
|
+
| You are using | What changes |
|
|
41
|
+
| :------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
42
|
+
| `satori` | Replace `satori()` with `renderSvg()`, or call `render()` for encoded image bytes. [Compare the renderers](https://takumi.kane.tw/docs/comparison-to-satori). |
|
|
43
|
+
| `next/og` | Swap the `ImageResponse` import. Existing Satori-compatible templates keep their explicit Flexbox styles. [Read the migration guide](https://takumi.kane.tw/docs/comparison-to-satori#migrate-from-nextog). |
|
|
44
|
+
| Puppeteer for screenshots | Pass a JSX or HTML tree to `render()`. Scripts do not run, and Takumi supports less CSS than Chrome. |
|
|
45
|
+
|
|
38
46
|
## Runtime detection
|
|
39
47
|
|
|
40
48
|
`takumi-js` selects the backend for the runtime:
|
package/package.json
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "takumi-js",
|
|
3
|
-
"version": "2.6.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.6.2",
|
|
4
|
+
"description": "Render OG images from JSX, HTML, and CSS. No headless browser.",
|
|
5
5
|
"keywords": [
|
|
6
|
+
"animated-webp",
|
|
6
7
|
"css",
|
|
8
|
+
"html-to-image",
|
|
7
9
|
"image",
|
|
10
|
+
"image-generation",
|
|
8
11
|
"jsx",
|
|
9
12
|
"next-og",
|
|
10
13
|
"og-image",
|
|
14
|
+
"open-graph",
|
|
11
15
|
"react",
|
|
12
|
-
"
|
|
16
|
+
"svg",
|
|
17
|
+
"tailwind",
|
|
13
18
|
"wasm"
|
|
14
19
|
],
|
|
15
20
|
"homepage": "https://takumi.kane.tw/docs/",
|
|
@@ -212,9 +217,9 @@
|
|
|
212
217
|
"publish-lint": "attw --pack . && publint --strict ."
|
|
213
218
|
},
|
|
214
219
|
"dependencies": {
|
|
215
|
-
"@takumi-rs/core": "2.6.
|
|
216
|
-
"@takumi-rs/helpers": "2.6.
|
|
217
|
-
"@takumi-rs/wasm": "2.6.
|
|
220
|
+
"@takumi-rs/core": "2.6.2",
|
|
221
|
+
"@takumi-rs/helpers": "2.6.2",
|
|
222
|
+
"@takumi-rs/wasm": "2.6.2"
|
|
218
223
|
},
|
|
219
224
|
"devDependencies": {
|
|
220
225
|
"@types/bun": "^1.3.14",
|