@takumi-rs/core 2.0.0-rc.11 → 2.0.0-rc.13
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 +38 -12
- package/dist/export.cjs +107 -116
- package/dist/export.d.cts +6 -19
- package/dist/export.d.mts +6 -19
- package/dist/export.mjs +108 -117
- package/index.d.ts +2 -3
- package/package.json +10 -11
package/README.md
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://takumi.kane.tw/logo.svg" alt="Takumi" width="64" />
|
|
3
|
+
|
|
1
4
|
# @takumi-rs/core
|
|
2
5
|
|
|
3
|
-
Native Node.js bindings for [Takumi](https://github.com/kane50613/takumi),
|
|
6
|
+
**Native Node.js bindings for [Takumi](https://github.com/kane50613/takumi), a Rust image rendering engine.**
|
|
7
|
+
The high-performance N-API runtime that turns node trees into OG cards, banners, and animations, no headless browser required.
|
|
8
|
+
|
|
9
|
+
[Documentation](https://takumi.kane.tw/docs/) · [Playground](https://takumi.kane.tw/playground)
|
|
4
10
|
|
|
5
|
-
|
|
11
|
+
</div>
|
|
6
12
|
|
|
7
13
|
## Install
|
|
8
14
|
|
|
@@ -10,26 +16,46 @@ This package ships the high-performance N-API runtime used by Takumi on Node.js
|
|
|
10
16
|
npm install @takumi-rs/core
|
|
11
17
|
```
|
|
12
18
|
|
|
13
|
-
##
|
|
19
|
+
## Quick start
|
|
14
20
|
|
|
15
21
|
```ts
|
|
16
22
|
import { Renderer } from "@takumi-rs/core";
|
|
17
23
|
|
|
18
24
|
const renderer = new Renderer();
|
|
25
|
+
|
|
19
26
|
const png = await renderer.render(
|
|
20
27
|
{
|
|
21
|
-
type: "
|
|
22
|
-
|
|
23
|
-
children: [{ type: "Text", value: "Hello from Takumi" }],
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
width: 1200,
|
|
27
|
-
height: 630,
|
|
28
|
+
type: "container",
|
|
29
|
+
children: [{ type: "text", text: "Hello from Takumi" }],
|
|
28
30
|
},
|
|
31
|
+
{ width: 1200, height: 630 },
|
|
29
32
|
);
|
|
30
33
|
```
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
`render` takes a node tree and returns a PNG `Buffer`. Build the tree by hand, or generate it from JSX and HTML with [`@takumi-rs/helpers`](https://npmjs.com/package/@takumi-rs/helpers).
|
|
36
|
+
|
|
37
|
+
## Fonts
|
|
38
|
+
|
|
39
|
+
Pass fonts on the render options, no separate registration step:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import { readFile } from "node:fs/promises";
|
|
43
|
+
|
|
44
|
+
const png = await renderer.render(node, {
|
|
45
|
+
width: 1200,
|
|
46
|
+
height: 630,
|
|
47
|
+
fonts: [await readFile("./Inter.ttf")],
|
|
48
|
+
});
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Renderer
|
|
52
|
+
|
|
53
|
+
| Method | Returns | Description |
|
|
54
|
+
| :----------------------- | :---------------- | :-------------------------------- |
|
|
55
|
+
| `render(node, opts?)` | `Promise<Buffer>` | Raster image (PNG, JPEG, WebP, …) |
|
|
56
|
+
| `renderSvg(node, opts?)` | `Promise<string>` | Vector SVG document |
|
|
57
|
+
| `renderAnimation(opts)` | `Promise<Buffer>` | Animated WebP, APNG, or GIF |
|
|
58
|
+
| `measure(node, opts?)` | `Promise<...>` | Layout without rasterizing |
|
|
33
59
|
|
|
34
60
|
## Documentation
|
|
35
61
|
|
|
@@ -37,7 +63,7 @@ For JSX and HTML conversion helpers, use [`@takumi-rs/helpers`](https://npmjs.co
|
|
|
37
63
|
- API reference: <https://takumi.kane.tw/docs/api-reference>
|
|
38
64
|
- Repository: <https://github.com/kane50613/takumi>
|
|
39
65
|
|
|
40
|
-
|
|
66
|
+
For WebAssembly runtimes (Cloudflare Workers, browsers, edge), use [@takumi-rs/wasm](https://npmjs.com/package/@takumi-rs/wasm).
|
|
41
67
|
|
|
42
68
|
## License
|
|
43
69
|
|
package/dist/export.cjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
let module$1 = require(/* turbopackOptional: true */ "module");
|
|
3
|
-
let _takumi_rs_helpers = require(/* turbopackOptional: true */ "@takumi-rs/helpers");
|
|
4
3
|
let _takumi_rs_helpers_renderer = require(/* turbopackOptional: true */ "@takumi-rs/helpers/renderer");
|
|
5
4
|
//#region index.js
|
|
6
5
|
const require$1 = (0, module$1.createRequire)(require(/* turbopackOptional: true */ "url").pathToFileURL(__filename).href);
|
|
@@ -58,9 +57,8 @@ function requireNative() {
|
|
|
58
57
|
loadErrors.push(e);
|
|
59
58
|
}
|
|
60
59
|
try {
|
|
61
|
-
const binding
|
|
62
|
-
|
|
63
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
60
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-android-arm64', 'core.android-arm64.node', require$1);
|
|
61
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
64
62
|
return binding;
|
|
65
63
|
} catch (e) {
|
|
66
64
|
loadErrors.push(e);
|
|
@@ -72,9 +70,8 @@ function requireNative() {
|
|
|
72
70
|
loadErrors.push(e);
|
|
73
71
|
}
|
|
74
72
|
try {
|
|
75
|
-
const binding
|
|
76
|
-
|
|
77
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
73
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-android-arm-eabi', 'core.android-arm-eabi.node', require$1);
|
|
74
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
78
75
|
return binding;
|
|
79
76
|
} catch (e) {
|
|
80
77
|
loadErrors.push(e);
|
|
@@ -87,9 +84,8 @@ function requireNative() {
|
|
|
87
84
|
loadErrors.push(e);
|
|
88
85
|
}
|
|
89
86
|
try {
|
|
90
|
-
const binding
|
|
91
|
-
|
|
92
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
87
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-win32-x64-gnu', 'core.win32-x64-gnu.node', require$1);
|
|
88
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
93
89
|
return binding;
|
|
94
90
|
} catch (e) {
|
|
95
91
|
loadErrors.push(e);
|
|
@@ -101,9 +97,8 @@ function requireNative() {
|
|
|
101
97
|
loadErrors.push(e);
|
|
102
98
|
}
|
|
103
99
|
try {
|
|
104
|
-
const binding
|
|
105
|
-
|
|
106
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
100
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-win32-x64-msvc', 'core.win32-x64-msvc.node', require$1);
|
|
101
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
107
102
|
return binding;
|
|
108
103
|
} catch (e) {
|
|
109
104
|
loadErrors.push(e);
|
|
@@ -116,9 +111,8 @@ function requireNative() {
|
|
|
116
111
|
loadErrors.push(e);
|
|
117
112
|
}
|
|
118
113
|
try {
|
|
119
|
-
const binding
|
|
120
|
-
|
|
121
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
114
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-win32-ia32-msvc', 'core.win32-ia32-msvc.node', require$1);
|
|
115
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
122
116
|
return binding;
|
|
123
117
|
} catch (e) {
|
|
124
118
|
loadErrors.push(e);
|
|
@@ -130,9 +124,8 @@ function requireNative() {
|
|
|
130
124
|
loadErrors.push(e);
|
|
131
125
|
}
|
|
132
126
|
try {
|
|
133
|
-
const binding
|
|
134
|
-
|
|
135
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
127
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-win32-arm64-msvc', 'core.win32-arm64-msvc.node', require$1);
|
|
128
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
136
129
|
return binding;
|
|
137
130
|
} catch (e) {
|
|
138
131
|
loadErrors.push(e);
|
|
@@ -145,9 +138,8 @@ function requireNative() {
|
|
|
145
138
|
loadErrors.push(e);
|
|
146
139
|
}
|
|
147
140
|
try {
|
|
148
|
-
const binding
|
|
149
|
-
|
|
150
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
141
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-darwin-universal', 'core.darwin-universal.node', require$1);
|
|
142
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
151
143
|
return binding;
|
|
152
144
|
} catch (e) {
|
|
153
145
|
loadErrors.push(e);
|
|
@@ -159,9 +151,8 @@ function requireNative() {
|
|
|
159
151
|
loadErrors.push(e);
|
|
160
152
|
}
|
|
161
153
|
try {
|
|
162
|
-
const binding
|
|
163
|
-
|
|
164
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
154
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-darwin-x64', 'core.darwin-x64.node', require$1);
|
|
155
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
165
156
|
return binding;
|
|
166
157
|
} catch (e) {
|
|
167
158
|
loadErrors.push(e);
|
|
@@ -173,9 +164,8 @@ function requireNative() {
|
|
|
173
164
|
loadErrors.push(e);
|
|
174
165
|
}
|
|
175
166
|
try {
|
|
176
|
-
const binding
|
|
177
|
-
|
|
178
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
167
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-darwin-arm64', 'core.darwin-arm64.node', require$1);
|
|
168
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
179
169
|
return binding;
|
|
180
170
|
} catch (e) {
|
|
181
171
|
loadErrors.push(e);
|
|
@@ -188,9 +178,8 @@ function requireNative() {
|
|
|
188
178
|
loadErrors.push(e);
|
|
189
179
|
}
|
|
190
180
|
try {
|
|
191
|
-
const binding
|
|
192
|
-
|
|
193
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
181
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-freebsd-x64', 'core.freebsd-x64.node', require$1);
|
|
182
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
194
183
|
return binding;
|
|
195
184
|
} catch (e) {
|
|
196
185
|
loadErrors.push(e);
|
|
@@ -202,9 +191,8 @@ function requireNative() {
|
|
|
202
191
|
loadErrors.push(e);
|
|
203
192
|
}
|
|
204
193
|
try {
|
|
205
|
-
const binding
|
|
206
|
-
|
|
207
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
194
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-freebsd-arm64', 'core.freebsd-arm64.node', require$1);
|
|
195
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
208
196
|
return binding;
|
|
209
197
|
} catch (e) {
|
|
210
198
|
loadErrors.push(e);
|
|
@@ -217,9 +205,8 @@ function requireNative() {
|
|
|
217
205
|
loadErrors.push(e);
|
|
218
206
|
}
|
|
219
207
|
try {
|
|
220
|
-
const binding
|
|
221
|
-
|
|
222
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
208
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-x64-musl', 'core.linux-x64-musl.node', require$1);
|
|
209
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
223
210
|
return binding;
|
|
224
211
|
} catch (e) {
|
|
225
212
|
loadErrors.push(e);
|
|
@@ -231,9 +218,8 @@ function requireNative() {
|
|
|
231
218
|
loadErrors.push(e);
|
|
232
219
|
}
|
|
233
220
|
try {
|
|
234
|
-
const binding
|
|
235
|
-
|
|
236
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
221
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-x64-gnu', 'core.linux-x64-gnu.node', require$1);
|
|
222
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
237
223
|
return binding;
|
|
238
224
|
} catch (e) {
|
|
239
225
|
loadErrors.push(e);
|
|
@@ -246,9 +232,8 @@ function requireNative() {
|
|
|
246
232
|
loadErrors.push(e);
|
|
247
233
|
}
|
|
248
234
|
try {
|
|
249
|
-
const binding
|
|
250
|
-
|
|
251
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
235
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-arm64-musl', 'core.linux-arm64-musl.node', require$1);
|
|
236
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
252
237
|
return binding;
|
|
253
238
|
} catch (e) {
|
|
254
239
|
loadErrors.push(e);
|
|
@@ -260,9 +245,8 @@ function requireNative() {
|
|
|
260
245
|
loadErrors.push(e);
|
|
261
246
|
}
|
|
262
247
|
try {
|
|
263
|
-
const binding
|
|
264
|
-
|
|
265
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
248
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-arm64-gnu', 'core.linux-arm64-gnu.node', require$1);
|
|
249
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
266
250
|
return binding;
|
|
267
251
|
} catch (e) {
|
|
268
252
|
loadErrors.push(e);
|
|
@@ -275,9 +259,8 @@ function requireNative() {
|
|
|
275
259
|
loadErrors.push(e);
|
|
276
260
|
}
|
|
277
261
|
try {
|
|
278
|
-
const binding
|
|
279
|
-
|
|
280
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
262
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-arm-musleabihf', 'core.linux-arm-musleabihf.node', require$1);
|
|
263
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
281
264
|
return binding;
|
|
282
265
|
} catch (e) {
|
|
283
266
|
loadErrors.push(e);
|
|
@@ -289,9 +272,8 @@ function requireNative() {
|
|
|
289
272
|
loadErrors.push(e);
|
|
290
273
|
}
|
|
291
274
|
try {
|
|
292
|
-
const binding
|
|
293
|
-
|
|
294
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
275
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-arm-gnueabihf', 'core.linux-arm-gnueabihf.node', require$1);
|
|
276
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
295
277
|
return binding;
|
|
296
278
|
} catch (e) {
|
|
297
279
|
loadErrors.push(e);
|
|
@@ -304,9 +286,8 @@ function requireNative() {
|
|
|
304
286
|
loadErrors.push(e);
|
|
305
287
|
}
|
|
306
288
|
try {
|
|
307
|
-
const binding
|
|
308
|
-
|
|
309
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
289
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-loong64-musl', 'core.linux-loong64-musl.node', require$1);
|
|
290
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
310
291
|
return binding;
|
|
311
292
|
} catch (e) {
|
|
312
293
|
loadErrors.push(e);
|
|
@@ -318,9 +299,8 @@ function requireNative() {
|
|
|
318
299
|
loadErrors.push(e);
|
|
319
300
|
}
|
|
320
301
|
try {
|
|
321
|
-
const binding
|
|
322
|
-
|
|
323
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
302
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-loong64-gnu', 'core.linux-loong64-gnu.node', require$1);
|
|
303
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
324
304
|
return binding;
|
|
325
305
|
} catch (e) {
|
|
326
306
|
loadErrors.push(e);
|
|
@@ -333,9 +313,8 @@ function requireNative() {
|
|
|
333
313
|
loadErrors.push(e);
|
|
334
314
|
}
|
|
335
315
|
try {
|
|
336
|
-
const binding
|
|
337
|
-
|
|
338
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
316
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-riscv64-musl', 'core.linux-riscv64-musl.node', require$1);
|
|
317
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
339
318
|
return binding;
|
|
340
319
|
} catch (e) {
|
|
341
320
|
loadErrors.push(e);
|
|
@@ -347,9 +326,8 @@ function requireNative() {
|
|
|
347
326
|
loadErrors.push(e);
|
|
348
327
|
}
|
|
349
328
|
try {
|
|
350
|
-
const binding
|
|
351
|
-
|
|
352
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
329
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-riscv64-gnu', 'core.linux-riscv64-gnu.node', require$1);
|
|
330
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
353
331
|
return binding;
|
|
354
332
|
} catch (e) {
|
|
355
333
|
loadErrors.push(e);
|
|
@@ -362,9 +340,8 @@ function requireNative() {
|
|
|
362
340
|
loadErrors.push(e);
|
|
363
341
|
}
|
|
364
342
|
try {
|
|
365
|
-
const binding
|
|
366
|
-
|
|
367
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
343
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-ppc64-gnu', 'core.linux-ppc64-gnu.node', require$1);
|
|
344
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
368
345
|
return binding;
|
|
369
346
|
} catch (e) {
|
|
370
347
|
loadErrors.push(e);
|
|
@@ -376,9 +353,8 @@ function requireNative() {
|
|
|
376
353
|
loadErrors.push(e);
|
|
377
354
|
}
|
|
378
355
|
try {
|
|
379
|
-
const binding
|
|
380
|
-
|
|
381
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
356
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-s390x-gnu', 'core.linux-s390x-gnu.node', require$1);
|
|
357
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
382
358
|
return binding;
|
|
383
359
|
} catch (e) {
|
|
384
360
|
loadErrors.push(e);
|
|
@@ -391,9 +367,8 @@ function requireNative() {
|
|
|
391
367
|
loadErrors.push(e);
|
|
392
368
|
}
|
|
393
369
|
try {
|
|
394
|
-
const binding
|
|
395
|
-
|
|
396
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
370
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-openharmony-arm64', 'core.openharmony-arm64.node', require$1);
|
|
371
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
397
372
|
return binding;
|
|
398
373
|
} catch (e) {
|
|
399
374
|
loadErrors.push(e);
|
|
@@ -405,9 +380,8 @@ function requireNative() {
|
|
|
405
380
|
loadErrors.push(e);
|
|
406
381
|
}
|
|
407
382
|
try {
|
|
408
|
-
const binding
|
|
409
|
-
|
|
410
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
383
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-openharmony-x64', 'core.openharmony-x64.node', require$1);
|
|
384
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
411
385
|
return binding;
|
|
412
386
|
} catch (e) {
|
|
413
387
|
loadErrors.push(e);
|
|
@@ -419,9 +393,8 @@ function requireNative() {
|
|
|
419
393
|
loadErrors.push(e);
|
|
420
394
|
}
|
|
421
395
|
try {
|
|
422
|
-
const binding
|
|
423
|
-
|
|
424
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
396
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-openharmony-arm', 'core.openharmony-arm.node', require$1);
|
|
397
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
425
398
|
return binding;
|
|
426
399
|
} catch (e) {
|
|
427
400
|
loadErrors.push(e);
|
|
@@ -441,7 +414,7 @@ if (!nativeBinding || forceWasi) {
|
|
|
441
414
|
if (forceWasi) wasiBindingError = err;
|
|
442
415
|
}
|
|
443
416
|
if (!nativeBinding || forceWasi) try {
|
|
444
|
-
wasiBinding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-wasm32-wasi
|
|
417
|
+
wasiBinding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-wasm32-wasi");
|
|
445
418
|
nativeBinding = wasiBinding;
|
|
446
419
|
} catch (err) {
|
|
447
420
|
if (forceWasi) {
|
|
@@ -474,49 +447,21 @@ var Renderer = class {
|
|
|
474
447
|
inner = new Renderer$1();
|
|
475
448
|
fonts = new _takumi_rs_helpers_renderer.FontRegistry((font) => this.inner.registerFont(font));
|
|
476
449
|
async render(node, options) {
|
|
477
|
-
const {
|
|
478
|
-
|
|
479
|
-
fonts,
|
|
480
|
-
source: node
|
|
481
|
-
}), images, fontFamilies);
|
|
482
|
-
return this.inner.render(node, {
|
|
483
|
-
...rest,
|
|
484
|
-
...resolved
|
|
485
|
-
}, signal);
|
|
450
|
+
const { options: opts, signal } = await (0, _takumi_rs_helpers_renderer.prepareRenderInput)(this.fonts, options ?? {}, node);
|
|
451
|
+
return this.inner.render(node, opts, signal);
|
|
486
452
|
}
|
|
487
453
|
async renderSvg(node, options) {
|
|
488
|
-
const {
|
|
489
|
-
|
|
490
|
-
fonts,
|
|
491
|
-
source: node
|
|
492
|
-
}), images, fontFamilies);
|
|
493
|
-
return this.inner.renderSvg(node, {
|
|
494
|
-
...rest,
|
|
495
|
-
...resolved
|
|
496
|
-
}, signal);
|
|
454
|
+
const { options: opts, signal } = await (0, _takumi_rs_helpers_renderer.prepareRenderInput)(this.fonts, options ?? {}, node);
|
|
455
|
+
return this.inner.renderSvg(node, opts, signal);
|
|
497
456
|
}
|
|
498
457
|
async measure(node, options) {
|
|
499
|
-
const {
|
|
500
|
-
|
|
501
|
-
fonts,
|
|
502
|
-
source: node
|
|
503
|
-
}), images, fontFamilies);
|
|
504
|
-
return this.inner.measure(node, {
|
|
505
|
-
...rest,
|
|
506
|
-
...resolved
|
|
507
|
-
}, signal);
|
|
458
|
+
const { options: opts, signal } = await (0, _takumi_rs_helpers_renderer.prepareRenderInput)(this.fonts, options ?? {}, node);
|
|
459
|
+
return this.inner.measure(node, opts, signal);
|
|
508
460
|
}
|
|
509
461
|
async renderAnimation(options) {
|
|
510
|
-
const { fonts, fontFamilies, signal, images, ...rest } = options;
|
|
511
462
|
const nodes = options.scenes.map((scene) => scene.node);
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
source: nodes
|
|
515
|
-
}), images, fontFamilies);
|
|
516
|
-
return this.inner.renderAnimation({
|
|
517
|
-
...rest,
|
|
518
|
-
...resolved
|
|
519
|
-
}, signal);
|
|
463
|
+
const { options: opts, signal } = await (0, _takumi_rs_helpers_renderer.prepareRenderInput)(this.fonts, options, nodes);
|
|
464
|
+
return this.inner.renderAnimation(opts, signal);
|
|
520
465
|
}
|
|
521
466
|
registerFont(font) {
|
|
522
467
|
return this.fonts.register(font);
|
|
@@ -524,3 +469,49 @@ var Renderer = class {
|
|
|
524
469
|
};
|
|
525
470
|
//#endregion
|
|
526
471
|
exports.Renderer = Renderer;
|
|
472
|
+
|
|
473
|
+
function resolveIsolated(pkgName, binaryName, localRequire) {
|
|
474
|
+
try {
|
|
475
|
+
const fs = localRequire('fs'), path = localRequire('path');
|
|
476
|
+
const dirs = [process.cwd()];
|
|
477
|
+
try { if (typeof __dirname !== 'undefined') dirs.push(__dirname); } catch (e) {}
|
|
478
|
+
const storePrefix = pkgName.replace('/', '+') + '@';
|
|
479
|
+
for (let dir of dirs) {
|
|
480
|
+
while (dir) {
|
|
481
|
+
const nm = path.join(dir, 'node_modules');
|
|
482
|
+
if (fs.existsSync(nm)) {
|
|
483
|
+
const direct = path.join(nm, pkgName, binaryName);
|
|
484
|
+
if (fs.existsSync(direct)) return direct;
|
|
485
|
+
for (const storeName of ['.pnpm', '.bun']) {
|
|
486
|
+
const storeDir = path.join(nm, storeName);
|
|
487
|
+
if (fs.existsSync(storeDir)) {
|
|
488
|
+
for (const f of fs.readdirSync(storeDir)) {
|
|
489
|
+
if (f.startsWith(storePrefix)) {
|
|
490
|
+
const p = path.join(storeDir, f, 'node_modules', pkgName, binaryName);
|
|
491
|
+
if (fs.existsSync(p)) return p;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
const parent = path.dirname(dir);
|
|
498
|
+
if (parent === dir) break;
|
|
499
|
+
dir = parent;
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
} catch (e) {}
|
|
503
|
+
return null;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
function loadNativePackage(pkgName, binaryName, localRequire) {
|
|
507
|
+
try {
|
|
508
|
+
return { binding: localRequire(pkgName + '/' + binaryName), version: localRequire(pkgName + '/package.json').version };
|
|
509
|
+
} catch (e) {
|
|
510
|
+
const resolved = resolveIsolated(pkgName, binaryName, localRequire);
|
|
511
|
+
if (resolved) {
|
|
512
|
+
const path = localRequire('path');
|
|
513
|
+
return { binding: localRequire(resolved), version: localRequire(path.join(path.dirname(resolved), 'package.json')).version };
|
|
514
|
+
}
|
|
515
|
+
throw e;
|
|
516
|
+
}
|
|
517
|
+
}
|
package/dist/export.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ContainerNode, ImageNode, Node, NodeMetadata, TextNode } from "@takumi-rs/helpers";
|
|
2
|
-
import {
|
|
3
|
-
import { AnimationOutputFormatOptions, AnimationOutputFormatOptions as AnimationOutputFormatOptions$1, FontLoader, FontLoader as FontLoader$1, ImageLoader, ImagesInput, ImagesInput as ImagesInput$1, OutputFormatOptions, OutputFormatOptions as OutputFormatOptions$1 } from "@takumi-rs/helpers/renderer";
|
|
2
|
+
import { AnimationOutputFormatOptions, BackendAnimationOptions, BackendRenderOptions, BackendSvgOptions, FontLoader, FontLoader as FontLoader$1, ImageLoader, ImagesInput, OutputFormatOptions } from "@takumi-rs/helpers/renderer";
|
|
4
3
|
|
|
5
4
|
//#region index.d.ts
|
|
6
5
|
type ByteBuf = Uint8Array | ArrayBuffer | Buffer;
|
|
@@ -29,12 +28,12 @@ interface FontDetails {
|
|
|
29
28
|
subsetOf?: string;
|
|
30
29
|
}
|
|
31
30
|
type Font = FontDetails | ByteBuf;
|
|
32
|
-
type KeyframesMap = Record<string, Record<string,
|
|
31
|
+
type KeyframesMap = Record<string, Record<string, CSSStyleDeclaration>>;
|
|
33
32
|
type KeyframesRuleList = {
|
|
34
33
|
name: string;
|
|
35
34
|
keyframes: {
|
|
36
35
|
offsets: number[];
|
|
37
|
-
declarations: Record<string,
|
|
36
|
+
declarations: Record<string, CSSStyleDeclaration>;
|
|
38
37
|
}[];
|
|
39
38
|
}[];
|
|
40
39
|
type Keyframes = KeyframesMap | KeyframesRuleList;
|
|
@@ -219,21 +218,9 @@ interface SvgRenderOptions$1 {
|
|
|
219
218
|
}
|
|
220
219
|
//#endregion
|
|
221
220
|
//#region src/export.d.ts
|
|
222
|
-
type RenderOptions =
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
images?: ImagesInput$1;
|
|
226
|
-
};
|
|
227
|
-
type RenderAnimationOptions = Omit<RenderAnimationOptions$1, "images" | "format" | "quality" | "lossless"> & AnimationOutputFormatOptions$1 & {
|
|
228
|
-
fonts?: FontLoader$1[];
|
|
229
|
-
signal?: AbortSignal;
|
|
230
|
-
images?: ImagesInput$1;
|
|
231
|
-
};
|
|
232
|
-
type SvgRenderOptions = Omit<SvgRenderOptions$1, "images"> & {
|
|
233
|
-
fonts?: FontLoader$1[];
|
|
234
|
-
signal?: AbortSignal;
|
|
235
|
-
images?: ImagesInput$1;
|
|
236
|
-
};
|
|
221
|
+
type RenderOptions = BackendRenderOptions<RenderOptions$1>;
|
|
222
|
+
type RenderAnimationOptions = BackendAnimationOptions<RenderAnimationOptions$1>;
|
|
223
|
+
type SvgRenderOptions = BackendSvgOptions<SvgRenderOptions$1>;
|
|
237
224
|
declare class Renderer {
|
|
238
225
|
private inner;
|
|
239
226
|
private fonts;
|
package/dist/export.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
import { AnimationOutputFormatOptions, BackendAnimationOptions, BackendRenderOptions, BackendSvgOptions, FontLoader, FontLoader as FontLoader$1, ImageLoader, ImagesInput, OutputFormatOptions } from "@takumi-rs/helpers/renderer";
|
|
1
2
|
import { ContainerNode, ImageNode, Node, NodeMetadata, TextNode } from "@takumi-rs/helpers";
|
|
2
|
-
import { AnimationOutputFormatOptions, AnimationOutputFormatOptions as AnimationOutputFormatOptions$1, FontLoader, FontLoader as FontLoader$1, ImageLoader, ImagesInput, ImagesInput as ImagesInput$1, OutputFormatOptions, OutputFormatOptions as OutputFormatOptions$1 } from "@takumi-rs/helpers/renderer";
|
|
3
|
-
import { Properties } from "csstype";
|
|
4
3
|
|
|
5
4
|
//#region index.d.ts
|
|
6
5
|
type ByteBuf = Uint8Array | ArrayBuffer | Buffer;
|
|
@@ -29,12 +28,12 @@ interface FontDetails {
|
|
|
29
28
|
subsetOf?: string;
|
|
30
29
|
}
|
|
31
30
|
type Font = FontDetails | ByteBuf;
|
|
32
|
-
type KeyframesMap = Record<string, Record<string,
|
|
31
|
+
type KeyframesMap = Record<string, Record<string, CSSStyleDeclaration>>;
|
|
33
32
|
type KeyframesRuleList = {
|
|
34
33
|
name: string;
|
|
35
34
|
keyframes: {
|
|
36
35
|
offsets: number[];
|
|
37
|
-
declarations: Record<string,
|
|
36
|
+
declarations: Record<string, CSSStyleDeclaration>;
|
|
38
37
|
}[];
|
|
39
38
|
}[];
|
|
40
39
|
type Keyframes = KeyframesMap | KeyframesRuleList;
|
|
@@ -219,21 +218,9 @@ interface SvgRenderOptions$1 {
|
|
|
219
218
|
}
|
|
220
219
|
//#endregion
|
|
221
220
|
//#region src/export.d.ts
|
|
222
|
-
type RenderOptions =
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
images?: ImagesInput$1;
|
|
226
|
-
};
|
|
227
|
-
type RenderAnimationOptions = Omit<RenderAnimationOptions$1, "images" | "format" | "quality" | "lossless"> & AnimationOutputFormatOptions$1 & {
|
|
228
|
-
fonts?: FontLoader$1[];
|
|
229
|
-
signal?: AbortSignal;
|
|
230
|
-
images?: ImagesInput$1;
|
|
231
|
-
};
|
|
232
|
-
type SvgRenderOptions = Omit<SvgRenderOptions$1, "images"> & {
|
|
233
|
-
fonts?: FontLoader$1[];
|
|
234
|
-
signal?: AbortSignal;
|
|
235
|
-
images?: ImagesInput$1;
|
|
236
|
-
};
|
|
221
|
+
type RenderOptions = BackendRenderOptions<RenderOptions$1>;
|
|
222
|
+
type RenderAnimationOptions = BackendAnimationOptions<RenderAnimationOptions$1>;
|
|
223
|
+
type SvgRenderOptions = BackendSvgOptions<SvgRenderOptions$1>;
|
|
237
224
|
declare class Renderer {
|
|
238
225
|
private inner;
|
|
239
226
|
private fonts;
|
package/dist/export.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "module";
|
|
2
|
-
import {
|
|
3
|
-
import { FontRegistry } from "@takumi-rs/helpers/renderer";
|
|
2
|
+
import { FontRegistry, prepareRenderInput } from "@takumi-rs/helpers/renderer";
|
|
4
3
|
//#region index.js
|
|
5
4
|
const require = createRequire(import.meta.url);
|
|
6
5
|
const { readFileSync } = require(/* turbopackOptional: true */ "fs");
|
|
@@ -56,9 +55,8 @@ function requireNative() {
|
|
|
56
55
|
loadErrors.push(e);
|
|
57
56
|
}
|
|
58
57
|
try {
|
|
59
|
-
const binding
|
|
60
|
-
|
|
61
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
58
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-android-arm64', 'core.android-arm64.node', require);
|
|
59
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
62
60
|
return binding;
|
|
63
61
|
} catch (e) {
|
|
64
62
|
loadErrors.push(e);
|
|
@@ -70,9 +68,8 @@ function requireNative() {
|
|
|
70
68
|
loadErrors.push(e);
|
|
71
69
|
}
|
|
72
70
|
try {
|
|
73
|
-
const binding
|
|
74
|
-
|
|
75
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
71
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-android-arm-eabi', 'core.android-arm-eabi.node', require);
|
|
72
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
76
73
|
return binding;
|
|
77
74
|
} catch (e) {
|
|
78
75
|
loadErrors.push(e);
|
|
@@ -85,9 +82,8 @@ function requireNative() {
|
|
|
85
82
|
loadErrors.push(e);
|
|
86
83
|
}
|
|
87
84
|
try {
|
|
88
|
-
const binding
|
|
89
|
-
|
|
90
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
85
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-win32-x64-gnu', 'core.win32-x64-gnu.node', require);
|
|
86
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
91
87
|
return binding;
|
|
92
88
|
} catch (e) {
|
|
93
89
|
loadErrors.push(e);
|
|
@@ -99,9 +95,8 @@ function requireNative() {
|
|
|
99
95
|
loadErrors.push(e);
|
|
100
96
|
}
|
|
101
97
|
try {
|
|
102
|
-
const binding
|
|
103
|
-
|
|
104
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
98
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-win32-x64-msvc', 'core.win32-x64-msvc.node', require);
|
|
99
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
105
100
|
return binding;
|
|
106
101
|
} catch (e) {
|
|
107
102
|
loadErrors.push(e);
|
|
@@ -114,9 +109,8 @@ function requireNative() {
|
|
|
114
109
|
loadErrors.push(e);
|
|
115
110
|
}
|
|
116
111
|
try {
|
|
117
|
-
const binding
|
|
118
|
-
|
|
119
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
112
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-win32-ia32-msvc', 'core.win32-ia32-msvc.node', require);
|
|
113
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
120
114
|
return binding;
|
|
121
115
|
} catch (e) {
|
|
122
116
|
loadErrors.push(e);
|
|
@@ -128,9 +122,8 @@ function requireNative() {
|
|
|
128
122
|
loadErrors.push(e);
|
|
129
123
|
}
|
|
130
124
|
try {
|
|
131
|
-
const binding
|
|
132
|
-
|
|
133
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
125
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-win32-arm64-msvc', 'core.win32-arm64-msvc.node', require);
|
|
126
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
134
127
|
return binding;
|
|
135
128
|
} catch (e) {
|
|
136
129
|
loadErrors.push(e);
|
|
@@ -143,9 +136,8 @@ function requireNative() {
|
|
|
143
136
|
loadErrors.push(e);
|
|
144
137
|
}
|
|
145
138
|
try {
|
|
146
|
-
const binding
|
|
147
|
-
|
|
148
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
139
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-darwin-universal', 'core.darwin-universal.node', require);
|
|
140
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
149
141
|
return binding;
|
|
150
142
|
} catch (e) {
|
|
151
143
|
loadErrors.push(e);
|
|
@@ -157,9 +149,8 @@ function requireNative() {
|
|
|
157
149
|
loadErrors.push(e);
|
|
158
150
|
}
|
|
159
151
|
try {
|
|
160
|
-
const binding
|
|
161
|
-
|
|
162
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
152
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-darwin-x64', 'core.darwin-x64.node', require);
|
|
153
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
163
154
|
return binding;
|
|
164
155
|
} catch (e) {
|
|
165
156
|
loadErrors.push(e);
|
|
@@ -171,9 +162,8 @@ function requireNative() {
|
|
|
171
162
|
loadErrors.push(e);
|
|
172
163
|
}
|
|
173
164
|
try {
|
|
174
|
-
const binding
|
|
175
|
-
|
|
176
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
165
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-darwin-arm64', 'core.darwin-arm64.node', require);
|
|
166
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
177
167
|
return binding;
|
|
178
168
|
} catch (e) {
|
|
179
169
|
loadErrors.push(e);
|
|
@@ -186,9 +176,8 @@ function requireNative() {
|
|
|
186
176
|
loadErrors.push(e);
|
|
187
177
|
}
|
|
188
178
|
try {
|
|
189
|
-
const binding
|
|
190
|
-
|
|
191
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
179
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-freebsd-x64', 'core.freebsd-x64.node', require);
|
|
180
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
192
181
|
return binding;
|
|
193
182
|
} catch (e) {
|
|
194
183
|
loadErrors.push(e);
|
|
@@ -200,9 +189,8 @@ function requireNative() {
|
|
|
200
189
|
loadErrors.push(e);
|
|
201
190
|
}
|
|
202
191
|
try {
|
|
203
|
-
const binding
|
|
204
|
-
|
|
205
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
192
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-freebsd-arm64', 'core.freebsd-arm64.node', require);
|
|
193
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
206
194
|
return binding;
|
|
207
195
|
} catch (e) {
|
|
208
196
|
loadErrors.push(e);
|
|
@@ -215,9 +203,8 @@ function requireNative() {
|
|
|
215
203
|
loadErrors.push(e);
|
|
216
204
|
}
|
|
217
205
|
try {
|
|
218
|
-
const binding
|
|
219
|
-
|
|
220
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
206
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-x64-musl', 'core.linux-x64-musl.node', require);
|
|
207
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
221
208
|
return binding;
|
|
222
209
|
} catch (e) {
|
|
223
210
|
loadErrors.push(e);
|
|
@@ -229,9 +216,8 @@ function requireNative() {
|
|
|
229
216
|
loadErrors.push(e);
|
|
230
217
|
}
|
|
231
218
|
try {
|
|
232
|
-
const binding
|
|
233
|
-
|
|
234
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
219
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-x64-gnu', 'core.linux-x64-gnu.node', require);
|
|
220
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
235
221
|
return binding;
|
|
236
222
|
} catch (e) {
|
|
237
223
|
loadErrors.push(e);
|
|
@@ -244,9 +230,8 @@ function requireNative() {
|
|
|
244
230
|
loadErrors.push(e);
|
|
245
231
|
}
|
|
246
232
|
try {
|
|
247
|
-
const binding
|
|
248
|
-
|
|
249
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
233
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-arm64-musl', 'core.linux-arm64-musl.node', require);
|
|
234
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
250
235
|
return binding;
|
|
251
236
|
} catch (e) {
|
|
252
237
|
loadErrors.push(e);
|
|
@@ -258,9 +243,8 @@ function requireNative() {
|
|
|
258
243
|
loadErrors.push(e);
|
|
259
244
|
}
|
|
260
245
|
try {
|
|
261
|
-
const binding
|
|
262
|
-
|
|
263
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
246
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-arm64-gnu', 'core.linux-arm64-gnu.node', require);
|
|
247
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
264
248
|
return binding;
|
|
265
249
|
} catch (e) {
|
|
266
250
|
loadErrors.push(e);
|
|
@@ -273,9 +257,8 @@ function requireNative() {
|
|
|
273
257
|
loadErrors.push(e);
|
|
274
258
|
}
|
|
275
259
|
try {
|
|
276
|
-
const binding
|
|
277
|
-
|
|
278
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
260
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-arm-musleabihf', 'core.linux-arm-musleabihf.node', require);
|
|
261
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
279
262
|
return binding;
|
|
280
263
|
} catch (e) {
|
|
281
264
|
loadErrors.push(e);
|
|
@@ -287,9 +270,8 @@ function requireNative() {
|
|
|
287
270
|
loadErrors.push(e);
|
|
288
271
|
}
|
|
289
272
|
try {
|
|
290
|
-
const binding
|
|
291
|
-
|
|
292
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
273
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-arm-gnueabihf', 'core.linux-arm-gnueabihf.node', require);
|
|
274
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
293
275
|
return binding;
|
|
294
276
|
} catch (e) {
|
|
295
277
|
loadErrors.push(e);
|
|
@@ -302,9 +284,8 @@ function requireNative() {
|
|
|
302
284
|
loadErrors.push(e);
|
|
303
285
|
}
|
|
304
286
|
try {
|
|
305
|
-
const binding
|
|
306
|
-
|
|
307
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
287
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-loong64-musl', 'core.linux-loong64-musl.node', require);
|
|
288
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
308
289
|
return binding;
|
|
309
290
|
} catch (e) {
|
|
310
291
|
loadErrors.push(e);
|
|
@@ -316,9 +297,8 @@ function requireNative() {
|
|
|
316
297
|
loadErrors.push(e);
|
|
317
298
|
}
|
|
318
299
|
try {
|
|
319
|
-
const binding
|
|
320
|
-
|
|
321
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
300
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-loong64-gnu', 'core.linux-loong64-gnu.node', require);
|
|
301
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
322
302
|
return binding;
|
|
323
303
|
} catch (e) {
|
|
324
304
|
loadErrors.push(e);
|
|
@@ -331,9 +311,8 @@ function requireNative() {
|
|
|
331
311
|
loadErrors.push(e);
|
|
332
312
|
}
|
|
333
313
|
try {
|
|
334
|
-
const binding
|
|
335
|
-
|
|
336
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
314
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-riscv64-musl', 'core.linux-riscv64-musl.node', require);
|
|
315
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
337
316
|
return binding;
|
|
338
317
|
} catch (e) {
|
|
339
318
|
loadErrors.push(e);
|
|
@@ -345,9 +324,8 @@ function requireNative() {
|
|
|
345
324
|
loadErrors.push(e);
|
|
346
325
|
}
|
|
347
326
|
try {
|
|
348
|
-
const binding
|
|
349
|
-
|
|
350
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
327
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-riscv64-gnu', 'core.linux-riscv64-gnu.node', require);
|
|
328
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
351
329
|
return binding;
|
|
352
330
|
} catch (e) {
|
|
353
331
|
loadErrors.push(e);
|
|
@@ -360,9 +338,8 @@ function requireNative() {
|
|
|
360
338
|
loadErrors.push(e);
|
|
361
339
|
}
|
|
362
340
|
try {
|
|
363
|
-
const binding
|
|
364
|
-
|
|
365
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
341
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-ppc64-gnu', 'core.linux-ppc64-gnu.node', require);
|
|
342
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
366
343
|
return binding;
|
|
367
344
|
} catch (e) {
|
|
368
345
|
loadErrors.push(e);
|
|
@@ -374,9 +351,8 @@ function requireNative() {
|
|
|
374
351
|
loadErrors.push(e);
|
|
375
352
|
}
|
|
376
353
|
try {
|
|
377
|
-
const binding
|
|
378
|
-
|
|
379
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
354
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-linux-s390x-gnu', 'core.linux-s390x-gnu.node', require);
|
|
355
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
380
356
|
return binding;
|
|
381
357
|
} catch (e) {
|
|
382
358
|
loadErrors.push(e);
|
|
@@ -389,9 +365,8 @@ function requireNative() {
|
|
|
389
365
|
loadErrors.push(e);
|
|
390
366
|
}
|
|
391
367
|
try {
|
|
392
|
-
const binding
|
|
393
|
-
|
|
394
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
368
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-openharmony-arm64', 'core.openharmony-arm64.node', require);
|
|
369
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
395
370
|
return binding;
|
|
396
371
|
} catch (e) {
|
|
397
372
|
loadErrors.push(e);
|
|
@@ -403,9 +378,8 @@ function requireNative() {
|
|
|
403
378
|
loadErrors.push(e);
|
|
404
379
|
}
|
|
405
380
|
try {
|
|
406
|
-
const binding
|
|
407
|
-
|
|
408
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
381
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-openharmony-x64', 'core.openharmony-x64.node', require);
|
|
382
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
409
383
|
return binding;
|
|
410
384
|
} catch (e) {
|
|
411
385
|
loadErrors.push(e);
|
|
@@ -417,9 +391,8 @@ function requireNative() {
|
|
|
417
391
|
loadErrors.push(e);
|
|
418
392
|
}
|
|
419
393
|
try {
|
|
420
|
-
const binding
|
|
421
|
-
|
|
422
|
-
if (bindingPackageVersion !== "2.0.0-rc.11" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.11 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
394
|
+
const { binding, version: bindingPackageVersion } = loadNativePackage('@takumi-rs/core-openharmony-arm', 'core.openharmony-arm.node', require);
|
|
395
|
+
if (bindingPackageVersion !== "2.0.0-rc.13" && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== "0") throw new Error(`Native binding package version mismatch, expected 2.0.0-rc.13 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
|
|
423
396
|
return binding;
|
|
424
397
|
} catch (e) {
|
|
425
398
|
loadErrors.push(e);
|
|
@@ -439,7 +412,7 @@ if (!nativeBinding || forceWasi) {
|
|
|
439
412
|
if (forceWasi) wasiBindingError = err;
|
|
440
413
|
}
|
|
441
414
|
if (!nativeBinding || forceWasi) try {
|
|
442
|
-
wasiBinding = require(/* turbopackOptional: true */ "@takumi-rs/core-wasm32-wasi
|
|
415
|
+
wasiBinding = require(/* turbopackOptional: true */ "@takumi-rs/core-wasm32-wasi");
|
|
443
416
|
nativeBinding = wasiBinding;
|
|
444
417
|
} catch (err) {
|
|
445
418
|
if (forceWasi) {
|
|
@@ -472,49 +445,21 @@ var Renderer = class {
|
|
|
472
445
|
inner = new Renderer$1();
|
|
473
446
|
fonts = new FontRegistry((font) => this.inner.registerFont(font));
|
|
474
447
|
async render(node, options) {
|
|
475
|
-
const {
|
|
476
|
-
|
|
477
|
-
fonts,
|
|
478
|
-
source: node
|
|
479
|
-
}), images, fontFamilies);
|
|
480
|
-
return this.inner.render(node, {
|
|
481
|
-
...rest,
|
|
482
|
-
...resolved
|
|
483
|
-
}, signal);
|
|
448
|
+
const { options: opts, signal } = await prepareRenderInput(this.fonts, options ?? {}, node);
|
|
449
|
+
return this.inner.render(node, opts, signal);
|
|
484
450
|
}
|
|
485
451
|
async renderSvg(node, options) {
|
|
486
|
-
const {
|
|
487
|
-
|
|
488
|
-
fonts,
|
|
489
|
-
source: node
|
|
490
|
-
}), images, fontFamilies);
|
|
491
|
-
return this.inner.renderSvg(node, {
|
|
492
|
-
...rest,
|
|
493
|
-
...resolved
|
|
494
|
-
}, signal);
|
|
452
|
+
const { options: opts, signal } = await prepareRenderInput(this.fonts, options ?? {}, node);
|
|
453
|
+
return this.inner.renderSvg(node, opts, signal);
|
|
495
454
|
}
|
|
496
455
|
async measure(node, options) {
|
|
497
|
-
const {
|
|
498
|
-
|
|
499
|
-
fonts,
|
|
500
|
-
source: node
|
|
501
|
-
}), images, fontFamilies);
|
|
502
|
-
return this.inner.measure(node, {
|
|
503
|
-
...rest,
|
|
504
|
-
...resolved
|
|
505
|
-
}, signal);
|
|
456
|
+
const { options: opts, signal } = await prepareRenderInput(this.fonts, options ?? {}, node);
|
|
457
|
+
return this.inner.measure(node, opts, signal);
|
|
506
458
|
}
|
|
507
459
|
async renderAnimation(options) {
|
|
508
|
-
const { fonts, fontFamilies, signal, images, ...rest } = options;
|
|
509
460
|
const nodes = options.scenes.map((scene) => scene.node);
|
|
510
|
-
const
|
|
511
|
-
|
|
512
|
-
source: nodes
|
|
513
|
-
}), images, fontFamilies);
|
|
514
|
-
return this.inner.renderAnimation({
|
|
515
|
-
...rest,
|
|
516
|
-
...resolved
|
|
517
|
-
}, signal);
|
|
461
|
+
const { options: opts, signal } = await prepareRenderInput(this.fonts, options, nodes);
|
|
462
|
+
return this.inner.renderAnimation(opts, signal);
|
|
518
463
|
}
|
|
519
464
|
registerFont(font) {
|
|
520
465
|
return this.fonts.register(font);
|
|
@@ -522,3 +467,49 @@ var Renderer = class {
|
|
|
522
467
|
};
|
|
523
468
|
//#endregion
|
|
524
469
|
export { Renderer };
|
|
470
|
+
|
|
471
|
+
function resolveIsolated(pkgName, binaryName, localRequire) {
|
|
472
|
+
try {
|
|
473
|
+
const fs = localRequire('fs'), path = localRequire('path');
|
|
474
|
+
const dirs = [process.cwd()];
|
|
475
|
+
try { if (import.meta?.url) dirs.push(path.dirname(new URL(import.meta.url).pathname)); } catch (e) {}
|
|
476
|
+
const storePrefix = pkgName.replace('/', '+') + '@';
|
|
477
|
+
for (let dir of dirs) {
|
|
478
|
+
while (dir) {
|
|
479
|
+
const nm = path.join(dir, 'node_modules');
|
|
480
|
+
if (fs.existsSync(nm)) {
|
|
481
|
+
const direct = path.join(nm, pkgName, binaryName);
|
|
482
|
+
if (fs.existsSync(direct)) return direct;
|
|
483
|
+
for (const storeName of ['.pnpm', '.bun']) {
|
|
484
|
+
const storeDir = path.join(nm, storeName);
|
|
485
|
+
if (fs.existsSync(storeDir)) {
|
|
486
|
+
for (const f of fs.readdirSync(storeDir)) {
|
|
487
|
+
if (f.startsWith(storePrefix)) {
|
|
488
|
+
const p = path.join(storeDir, f, 'node_modules', pkgName, binaryName);
|
|
489
|
+
if (fs.existsSync(p)) return p;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
const parent = path.dirname(dir);
|
|
496
|
+
if (parent === dir) break;
|
|
497
|
+
dir = parent;
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
} catch (e) {}
|
|
501
|
+
return null;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
function loadNativePackage(pkgName, binaryName, localRequire) {
|
|
505
|
+
try {
|
|
506
|
+
return { binding: localRequire(pkgName + '/' + binaryName), version: localRequire(pkgName + '/package.json').version };
|
|
507
|
+
} catch (e) {
|
|
508
|
+
const resolved = resolveIsolated(pkgName, binaryName, localRequire);
|
|
509
|
+
if (resolved) {
|
|
510
|
+
const path = localRequire('path');
|
|
511
|
+
return { binding: localRequire(resolved), version: localRequire(path.join(path.dirname(resolved), 'package.json')).version };
|
|
512
|
+
}
|
|
513
|
+
throw e;
|
|
514
|
+
}
|
|
515
|
+
}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Node } from "@takumi-rs/helpers";
|
|
2
|
-
import type { Properties } from "csstype";
|
|
3
2
|
|
|
4
3
|
export type { ContainerNode, ImageNode, NodeMetadata, TextNode } from "@takumi-rs/helpers";
|
|
5
4
|
|
|
@@ -34,12 +33,12 @@ export interface FontDetails {
|
|
|
34
33
|
|
|
35
34
|
export type Font = FontDetails | ByteBuf;
|
|
36
35
|
|
|
37
|
-
export type KeyframesMap = Record<string, Record<string,
|
|
36
|
+
export type KeyframesMap = Record<string, Record<string, CSSStyleDeclaration>>;
|
|
38
37
|
export type KeyframesRuleList = {
|
|
39
38
|
name: string;
|
|
40
39
|
keyframes: {
|
|
41
40
|
offsets: number[];
|
|
42
|
-
declarations: Record<string,
|
|
41
|
+
declarations: Record<string, CSSStyleDeclaration>;
|
|
43
42
|
}[];
|
|
44
43
|
}[];
|
|
45
44
|
export type Keyframes = KeyframesMap | KeyframesRuleList;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@takumi-rs/core",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.13",
|
|
4
4
|
"description": "Native Node.js bindings for the Takumi Rust image rendering engine.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -70,8 +70,7 @@
|
|
|
70
70
|
"publish-lint": "attw --pack . && publint --strict ."
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@takumi-rs/helpers": "2.0.0-rc.
|
|
74
|
-
"csstype": "^3.2.3"
|
|
73
|
+
"@takumi-rs/helpers": "2.0.0-rc.13"
|
|
75
74
|
},
|
|
76
75
|
"devDependencies": {
|
|
77
76
|
"@napi-rs/cli": "3.7.2",
|
|
@@ -102,13 +101,13 @@
|
|
|
102
101
|
"node": ">=18"
|
|
103
102
|
},
|
|
104
103
|
"optionalDependencies": {
|
|
105
|
-
"@takumi-rs/core-darwin-x64": "2.0.0-rc.
|
|
106
|
-
"@takumi-rs/core-darwin-arm64": "2.0.0-rc.
|
|
107
|
-
"@takumi-rs/core-linux-arm64-gnu": "2.0.0-rc.
|
|
108
|
-
"@takumi-rs/core-linux-arm64-musl": "2.0.0-rc.
|
|
109
|
-
"@takumi-rs/core-win32-arm64-msvc": "2.0.0-rc.
|
|
110
|
-
"@takumi-rs/core-linux-x64-gnu": "2.0.0-rc.
|
|
111
|
-
"@takumi-rs/core-linux-x64-musl": "2.0.0-rc.
|
|
112
|
-
"@takumi-rs/core-win32-x64-msvc": "2.0.0-rc.
|
|
104
|
+
"@takumi-rs/core-darwin-x64": "2.0.0-rc.13",
|
|
105
|
+
"@takumi-rs/core-darwin-arm64": "2.0.0-rc.13",
|
|
106
|
+
"@takumi-rs/core-linux-arm64-gnu": "2.0.0-rc.13",
|
|
107
|
+
"@takumi-rs/core-linux-arm64-musl": "2.0.0-rc.13",
|
|
108
|
+
"@takumi-rs/core-win32-arm64-msvc": "2.0.0-rc.13",
|
|
109
|
+
"@takumi-rs/core-linux-x64-gnu": "2.0.0-rc.13",
|
|
110
|
+
"@takumi-rs/core-linux-x64-musl": "2.0.0-rc.13",
|
|
111
|
+
"@takumi-rs/core-win32-x64-msvc": "2.0.0-rc.13"
|
|
113
112
|
}
|
|
114
113
|
}
|