satori 0.0.41 → 0.0.43
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 +3 -3
- package/dist/index.cjs +9 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/dist/index.wasm.cjs +9 -9
- package/dist/index.wasm.cjs.map +1 -1
- package/dist/index.wasm.js +9 -9
- package/dist/index.wasm.js.map +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -24,6 +24,7 @@ const svg = await satori(
|
|
|
24
24
|
fonts: [
|
|
25
25
|
{
|
|
26
26
|
name: 'Roboto',
|
|
27
|
+
// Use `fs` (Node.js only) or `fetch` to read the font as Buffer/ArrayBuffer and provide `data` here.
|
|
27
28
|
data: robotoArrayBuffer,
|
|
28
29
|
weight: 400,
|
|
29
30
|
style: 'normal',
|
|
@@ -48,8 +49,7 @@ Under the hood, it handles layout calculation, font, typography and more, to gen
|
|
|
48
49
|
### JSX
|
|
49
50
|
|
|
50
51
|
Satori only accepts JSX elements that are pure and stateless. You can use a subset of HTML
|
|
51
|
-
elements (see section below), or custom React components, but React APIs such as `useState`
|
|
52
|
-
`useEffect` are not supported.
|
|
52
|
+
elements (see section below), or custom React components, but React APIs such as `useState`, `useEffect`, `dangerouslySetInnerHTML` are not supported.
|
|
53
53
|
|
|
54
54
|
#### Use without JSX
|
|
55
55
|
|
|
@@ -184,7 +184,7 @@ Satori uses the same Flexbox [layout engine](https://yogalayout.com) as React Na
|
|
|
184
184
|
<tr><td><code>textShadow</code></td><td>Support single shadow</td></tr>
|
|
185
185
|
<tr><td><code>lineHeight</code></td><td>Supported</td></tr>
|
|
186
186
|
<tr><td><code>letterSpacing</code></td><td>Supported</td></tr>
|
|
187
|
-
<tr><td><code>whiteSpace</code></td><td><code>normal</code>, <code>pre</code>, <code>pre-wrap</code>, <code>nowrap</code>, defaults to <code>normal</code></td></tr>
|
|
187
|
+
<tr><td><code>whiteSpace</code></td><td><code>normal</code>, <code>pre</code>, <code>pre-wrap</code>, <code>pre-line</code>, <code>nowrap</code>, defaults to <code>normal</code></td></tr>
|
|
188
188
|
<tr><td><code>wordBreak</code></td><td><code>normal</code>, <code>break-all</code>, <code>break-word</code>, <code>keep-all</code>, defaults to <code>normal</code></td></tr>
|
|
189
189
|
|
|
190
190
|
<tr><td rowspan="7">Background</td></tr>
|