@takumi-rs/core 2.0.0-rc.2 → 2.0.0-rc.4

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/dist/export.cjs CHANGED
@@ -59,7 +59,7 @@ function requireNative() {
59
59
  try {
60
60
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-android-arm64/core.android-arm64.node");
61
61
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-android-arm64/package.json").version;
62
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
62
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
63
63
  return binding;
64
64
  } catch (e) {
65
65
  loadErrors.push(e);
@@ -73,7 +73,7 @@ function requireNative() {
73
73
  try {
74
74
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-android-arm-eabi/core.android-arm-eabi.node");
75
75
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-android-arm-eabi/package.json").version;
76
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
76
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
77
77
  return binding;
78
78
  } catch (e) {
79
79
  loadErrors.push(e);
@@ -88,7 +88,7 @@ function requireNative() {
88
88
  try {
89
89
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-x64-gnu/core.win32-x64-gnu.node");
90
90
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-x64-gnu/package.json").version;
91
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
91
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
92
92
  return binding;
93
93
  } catch (e) {
94
94
  loadErrors.push(e);
@@ -102,7 +102,7 @@ function requireNative() {
102
102
  try {
103
103
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-x64-msvc/core.win32-x64-msvc.node");
104
104
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-x64-msvc/package.json").version;
105
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
105
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
106
106
  return binding;
107
107
  } catch (e) {
108
108
  loadErrors.push(e);
@@ -117,7 +117,7 @@ function requireNative() {
117
117
  try {
118
118
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-ia32-msvc/core.win32-ia32-msvc.node");
119
119
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-ia32-msvc/package.json").version;
120
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
120
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
121
121
  return binding;
122
122
  } catch (e) {
123
123
  loadErrors.push(e);
@@ -131,7 +131,7 @@ function requireNative() {
131
131
  try {
132
132
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-arm64-msvc/core.win32-arm64-msvc.node");
133
133
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-win32-arm64-msvc/package.json").version;
134
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
134
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
135
135
  return binding;
136
136
  } catch (e) {
137
137
  loadErrors.push(e);
@@ -146,7 +146,7 @@ function requireNative() {
146
146
  try {
147
147
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-darwin-universal/core.darwin-universal.node");
148
148
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-darwin-universal/package.json").version;
149
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
149
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
150
150
  return binding;
151
151
  } catch (e) {
152
152
  loadErrors.push(e);
@@ -160,7 +160,7 @@ function requireNative() {
160
160
  try {
161
161
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-darwin-x64/core.darwin-x64.node");
162
162
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-darwin-x64/package.json").version;
163
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
163
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
164
164
  return binding;
165
165
  } catch (e) {
166
166
  loadErrors.push(e);
@@ -174,7 +174,7 @@ function requireNative() {
174
174
  try {
175
175
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-darwin-arm64/core.darwin-arm64.node");
176
176
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-darwin-arm64/package.json").version;
177
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
177
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
178
178
  return binding;
179
179
  } catch (e) {
180
180
  loadErrors.push(e);
@@ -189,7 +189,7 @@ function requireNative() {
189
189
  try {
190
190
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-freebsd-x64/core.freebsd-x64.node");
191
191
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-freebsd-x64/package.json").version;
192
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
192
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
193
193
  return binding;
194
194
  } catch (e) {
195
195
  loadErrors.push(e);
@@ -203,7 +203,7 @@ function requireNative() {
203
203
  try {
204
204
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-freebsd-arm64/core.freebsd-arm64.node");
205
205
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-freebsd-arm64/package.json").version;
206
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
206
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
207
207
  return binding;
208
208
  } catch (e) {
209
209
  loadErrors.push(e);
@@ -218,7 +218,7 @@ function requireNative() {
218
218
  try {
219
219
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-x64-musl/core.linux-x64-musl.node");
220
220
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-x64-musl/package.json").version;
221
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
221
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
222
222
  return binding;
223
223
  } catch (e) {
224
224
  loadErrors.push(e);
@@ -232,7 +232,7 @@ function requireNative() {
232
232
  try {
233
233
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-x64-gnu/core.linux-x64-gnu.node");
234
234
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-x64-gnu/package.json").version;
235
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
235
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
236
236
  return binding;
237
237
  } catch (e) {
238
238
  loadErrors.push(e);
@@ -247,7 +247,7 @@ function requireNative() {
247
247
  try {
248
248
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm64-musl/core.linux-arm64-musl.node");
249
249
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm64-musl/package.json").version;
250
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
250
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
251
251
  return binding;
252
252
  } catch (e) {
253
253
  loadErrors.push(e);
@@ -261,7 +261,7 @@ function requireNative() {
261
261
  try {
262
262
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm64-gnu/core.linux-arm64-gnu.node");
263
263
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm64-gnu/package.json").version;
264
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
264
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
265
265
  return binding;
266
266
  } catch (e) {
267
267
  loadErrors.push(e);
@@ -276,7 +276,7 @@ function requireNative() {
276
276
  try {
277
277
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm-musleabihf/core.linux-arm-musleabihf.node");
278
278
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm-musleabihf/package.json").version;
279
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
279
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
280
280
  return binding;
281
281
  } catch (e) {
282
282
  loadErrors.push(e);
@@ -290,7 +290,7 @@ function requireNative() {
290
290
  try {
291
291
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm-gnueabihf/core.linux-arm-gnueabihf.node");
292
292
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm-gnueabihf/package.json").version;
293
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
293
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
294
294
  return binding;
295
295
  } catch (e) {
296
296
  loadErrors.push(e);
@@ -305,7 +305,7 @@ function requireNative() {
305
305
  try {
306
306
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-loong64-musl/core.linux-loong64-musl.node");
307
307
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-loong64-musl/package.json").version;
308
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
308
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
309
309
  return binding;
310
310
  } catch (e) {
311
311
  loadErrors.push(e);
@@ -319,7 +319,7 @@ function requireNative() {
319
319
  try {
320
320
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-loong64-gnu/core.linux-loong64-gnu.node");
321
321
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-loong64-gnu/package.json").version;
322
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
322
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
323
323
  return binding;
324
324
  } catch (e) {
325
325
  loadErrors.push(e);
@@ -334,7 +334,7 @@ function requireNative() {
334
334
  try {
335
335
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-riscv64-musl/core.linux-riscv64-musl.node");
336
336
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-riscv64-musl/package.json").version;
337
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
337
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
338
338
  return binding;
339
339
  } catch (e) {
340
340
  loadErrors.push(e);
@@ -348,7 +348,7 @@ function requireNative() {
348
348
  try {
349
349
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-riscv64-gnu/core.linux-riscv64-gnu.node");
350
350
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-riscv64-gnu/package.json").version;
351
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
351
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
352
352
  return binding;
353
353
  } catch (e) {
354
354
  loadErrors.push(e);
@@ -363,7 +363,7 @@ function requireNative() {
363
363
  try {
364
364
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-ppc64-gnu/core.linux-ppc64-gnu.node");
365
365
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-ppc64-gnu/package.json").version;
366
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
366
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
367
367
  return binding;
368
368
  } catch (e) {
369
369
  loadErrors.push(e);
@@ -377,7 +377,7 @@ function requireNative() {
377
377
  try {
378
378
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-s390x-gnu/core.linux-s390x-gnu.node");
379
379
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-linux-s390x-gnu/package.json").version;
380
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
380
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
381
381
  return binding;
382
382
  } catch (e) {
383
383
  loadErrors.push(e);
@@ -392,7 +392,7 @@ function requireNative() {
392
392
  try {
393
393
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-arm64/core.openharmony-arm64.node");
394
394
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-arm64/package.json").version;
395
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
395
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
396
396
  return binding;
397
397
  } catch (e) {
398
398
  loadErrors.push(e);
@@ -406,7 +406,7 @@ function requireNative() {
406
406
  try {
407
407
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-x64/core.openharmony-x64.node");
408
408
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-x64/package.json").version;
409
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
409
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
410
410
  return binding;
411
411
  } catch (e) {
412
412
  loadErrors.push(e);
@@ -420,7 +420,7 @@ function requireNative() {
420
420
  try {
421
421
  const binding = require$1(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-arm/core.openharmony-arm.node");
422
422
  const bindingPackageVersion = require$1(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-arm/package.json").version;
423
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
423
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
424
424
  return binding;
425
425
  } catch (e) {
426
426
  loadErrors.push(e);
@@ -470,12 +470,13 @@ const { Renderer: Renderer$1, AnimationOutputFormat, DitheringAlgorithm, ImageCa
470
470
  //#endregion
471
471
  //#region src/export.ts
472
472
  async function resolveImageLoaders(images) {
473
+ const { sources = [], cache } = Array.isArray(images) ? { sources: images } : images;
473
474
  const bySrc = /* @__PURE__ */ new Map();
474
- for (const image of images) bySrc.set(image.src, image);
475
- return Promise.all([...bySrc.values()].map(async ({ src, data, cache }) => ({
475
+ for (const image of sources) bySrc.set(image.src, image);
476
+ return Promise.all([...bySrc.values()].map(async ({ src, data, cache: own }) => ({
476
477
  src,
477
478
  data: typeof data === "function" ? await data() : data,
478
- cache
479
+ cache: own ?? cache
479
480
  })));
480
481
  }
481
482
  var Renderer = class {
@@ -508,11 +509,10 @@ var Renderer = class {
508
509
  };
509
510
  }
510
511
  async render(node, options) {
511
- const { fonts, fontFamilies, signal, images, subset, ...rest } = options ?? {};
512
- const resolved = await this.resolveResources((0, _takumi_rs_helpers.pickFonts)({
512
+ const { fonts, fontFamilies, signal, images, ...rest } = options ?? {};
513
+ const resolved = await this.resolveResources(fonts && (0, _takumi_rs_helpers.subsetFonts)({
513
514
  fonts,
514
- source: node,
515
- subset
515
+ source: node
516
516
  }), images, fontFamilies);
517
517
  return this.inner.render(node, {
518
518
  ...rest,
@@ -520,11 +520,10 @@ var Renderer = class {
520
520
  }, signal);
521
521
  }
522
522
  async renderSvg(node, options) {
523
- const { fonts, fontFamilies, signal, images, subset, ...rest } = options ?? {};
524
- const resolved = await this.resolveResources((0, _takumi_rs_helpers.pickFonts)({
523
+ const { fonts, fontFamilies, signal, images, ...rest } = options ?? {};
524
+ const resolved = await this.resolveResources(fonts && (0, _takumi_rs_helpers.subsetFonts)({
525
525
  fonts,
526
- source: node,
527
- subset
526
+ source: node
528
527
  }), images, fontFamilies);
529
528
  return this.inner.renderSvg(node, {
530
529
  ...rest,
@@ -532,11 +531,10 @@ var Renderer = class {
532
531
  }, signal);
533
532
  }
534
533
  async measure(node, options) {
535
- const { fonts, fontFamilies, signal, images, subset, ...rest } = options ?? {};
536
- const resolved = await this.resolveResources((0, _takumi_rs_helpers.pickFonts)({
534
+ const { fonts, fontFamilies, signal, images, ...rest } = options ?? {};
535
+ const resolved = await this.resolveResources(fonts && (0, _takumi_rs_helpers.subsetFonts)({
537
536
  fonts,
538
- source: node,
539
- subset
537
+ source: node
540
538
  }), images, fontFamilies);
541
539
  return this.inner.measure(node, {
542
540
  ...rest,
@@ -544,12 +542,11 @@ var Renderer = class {
544
542
  }, signal);
545
543
  }
546
544
  async renderAnimation(options) {
547
- const { fonts, fontFamilies, signal, images, subset, ...rest } = options;
545
+ const { fonts, fontFamilies, signal, images, ...rest } = options;
548
546
  const nodes = options.scenes.map((scene) => scene.node);
549
- const resolved = await this.resolveResources((0, _takumi_rs_helpers.pickFonts)({
547
+ const resolved = await this.resolveResources(fonts && (0, _takumi_rs_helpers.subsetFonts)({
550
548
  fonts,
551
- source: nodes,
552
- subset
549
+ source: nodes
553
550
  }), images, fontFamilies);
554
551
  return this.inner.renderAnimation({
555
552
  ...rest,
@@ -595,4 +592,3 @@ function isBuffer(data) {
595
592
  }
596
593
  //#endregion
597
594
  exports.Renderer = Renderer;
598
- exports.extractResourceUrls = _takumi_rs_helpers.extractResourceUrls;
package/dist/export.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { ContainerNode, ImageNode, Node, NodeMetadata, TextNode, extractResourceUrls } from "@takumi-rs/helpers";
1
+ import { ContainerNode, ImageNode, Node, NodeMetadata, TextNode } from "@takumi-rs/helpers";
2
2
  import { Properties } from "csstype";
3
3
 
4
4
  //#region index.d.ts
@@ -40,7 +40,7 @@ type Keyframes = KeyframesMap | KeyframesRuleList;
40
40
  /** Output format for animated images. */
41
41
  type AnimationOutputFormat = /** Animated WebP format. */'webp' | /** Animated PNG format. */'apng' | /** Animated GIF format. */'gif';
42
42
  /** Represents a single scene in a sequential animation timeline. */
43
- interface AnimationSceneSource {
43
+ interface AnimationScene {
44
44
  /** The node tree to render for this scene. */
45
45
  node: Node;
46
46
  /** The duration of this scene in milliseconds. */
@@ -107,7 +107,7 @@ interface RegisteredFamily {
107
107
  /** Options for rendering a sequential scene animation. */
108
108
  interface RenderAnimationOptions$1 {
109
109
  /** The scenes to render sequentially. */
110
- scenes: Array<AnimationSceneSource>;
110
+ scenes: Array<AnimationScene>;
111
111
  /** Whether to draw debug borders around layout elements. */
112
112
  drawDebugBorder?: boolean;
113
113
  /** The width of each frame in pixels. */
@@ -232,6 +232,11 @@ type ImageLoaderData = ImageSource["data"];
232
232
  type ImageLoader = Omit<ImageSource, "data"> & {
233
233
  data: ImageLoaderData | (() => ImageLoaderData | Promise<ImageLoaderData>);
234
234
  };
235
+ /** Images for a render: pre-fetched entries, or a group with a decode-cache default. */
236
+ type ImagesInput = ImageLoader[] | {
237
+ /** Pre-fetched entries, same as the array form. */sources?: ImageLoader[]; /** Decode-cache default for every image this render; a source's own `cache` wins. */
238
+ cache?: NonNullable<ImageLoader["cache"]>;
239
+ };
235
240
  /**
236
241
  * Output format. Format-specific options live on the variant that supports them,
237
242
  * so `quality` cannot be paired with PNG/ICO/raw, and `lossless` is WebP-only.
@@ -255,8 +260,7 @@ type OutputFormatOptions = {
255
260
  type RenderOptions = Omit<RenderOptions$1, "images" | "format" | "quality" | "lossless"> & OutputFormatOptions & {
256
261
  fonts?: FontLoader[];
257
262
  signal?: AbortSignal;
258
- images?: ImageLoader[]; /** Register only the `fonts` subsets the content renders. @default true */
259
- subset?: boolean;
263
+ images?: ImagesInput;
260
264
  };
261
265
  /**
262
266
  * Animation output format. `quality` and `lossless` are WebP-only; for WebP,
@@ -275,14 +279,12 @@ type AnimationOutputFormatOptions = {
275
279
  type RenderAnimationOptions = Omit<RenderAnimationOptions$1, "images" | "format" | "quality" | "lossless"> & AnimationOutputFormatOptions & {
276
280
  fonts?: FontLoader[];
277
281
  signal?: AbortSignal;
278
- images?: ImageLoader[]; /** Register only the `fonts` subsets the content renders. @default true */
279
- subset?: boolean;
282
+ images?: ImagesInput;
280
283
  };
281
284
  type SvgRenderOptions = Omit<SvgRenderOptions$1, "images"> & {
282
285
  fonts?: FontLoader[];
283
286
  signal?: AbortSignal;
284
- images?: ImageLoader[]; /** Register only the `fonts` subsets the content renders. @default true */
285
- subset?: boolean;
287
+ images?: ImagesInput;
286
288
  };
287
289
  declare class Renderer {
288
290
  private fontsByKey;
@@ -302,4 +304,4 @@ declare class Renderer {
302
304
  registerFont(font: FontLoader): Promise<any>;
303
305
  }
304
306
  //#endregion
305
- export { type AnimationOutputFormat, AnimationOutputFormatOptions, type AnimationSceneSource, type ByteBuf, type ContainerNode, type DitheringAlgorithm, type Font, type FontDetails, FontLoader, type ImageCacheMode, ImageLoader, type ImageNode, type ImageSource, type Keyframes, type KeyframesMap, type KeyframesRuleList, type MeasuredNode, type MeasuredTextRun, type Node, type NodeMetadata, type OutputFormat, OutputFormatOptions, type RegisteredFace, type RegisteredFamily, RenderAnimationOptions, RenderOptions, Renderer, SvgRenderOptions, type TextNode, extractResourceUrls };
307
+ export { type AnimationOutputFormat, AnimationOutputFormatOptions, type AnimationScene, type ByteBuf, type ContainerNode, type DitheringAlgorithm, type Font, type FontDetails, FontLoader, type ImageCacheMode, ImageLoader, type ImageNode, type ImageSource, ImagesInput, type Keyframes, type KeyframesMap, type KeyframesRuleList, type MeasuredNode, type MeasuredTextRun, type Node, type NodeMetadata, type OutputFormat, OutputFormatOptions, type RegisteredFace, type RegisteredFamily, RenderAnimationOptions, RenderOptions, Renderer, SvgRenderOptions, type TextNode };
package/dist/export.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { ContainerNode, ImageNode, Node, NodeMetadata, TextNode, extractResourceUrls } from "@takumi-rs/helpers";
1
+ import { ContainerNode, ImageNode, Node, NodeMetadata, TextNode } from "@takumi-rs/helpers";
2
2
  import { Properties } from "csstype";
3
3
 
4
4
  //#region index.d.ts
@@ -40,7 +40,7 @@ type Keyframes = KeyframesMap | KeyframesRuleList;
40
40
  /** Output format for animated images. */
41
41
  type AnimationOutputFormat = /** Animated WebP format. */'webp' | /** Animated PNG format. */'apng' | /** Animated GIF format. */'gif';
42
42
  /** Represents a single scene in a sequential animation timeline. */
43
- interface AnimationSceneSource {
43
+ interface AnimationScene {
44
44
  /** The node tree to render for this scene. */
45
45
  node: Node;
46
46
  /** The duration of this scene in milliseconds. */
@@ -107,7 +107,7 @@ interface RegisteredFamily {
107
107
  /** Options for rendering a sequential scene animation. */
108
108
  interface RenderAnimationOptions$1 {
109
109
  /** The scenes to render sequentially. */
110
- scenes: Array<AnimationSceneSource>;
110
+ scenes: Array<AnimationScene>;
111
111
  /** Whether to draw debug borders around layout elements. */
112
112
  drawDebugBorder?: boolean;
113
113
  /** The width of each frame in pixels. */
@@ -232,6 +232,11 @@ type ImageLoaderData = ImageSource["data"];
232
232
  type ImageLoader = Omit<ImageSource, "data"> & {
233
233
  data: ImageLoaderData | (() => ImageLoaderData | Promise<ImageLoaderData>);
234
234
  };
235
+ /** Images for a render: pre-fetched entries, or a group with a decode-cache default. */
236
+ type ImagesInput = ImageLoader[] | {
237
+ /** Pre-fetched entries, same as the array form. */sources?: ImageLoader[]; /** Decode-cache default for every image this render; a source's own `cache` wins. */
238
+ cache?: NonNullable<ImageLoader["cache"]>;
239
+ };
235
240
  /**
236
241
  * Output format. Format-specific options live on the variant that supports them,
237
242
  * so `quality` cannot be paired with PNG/ICO/raw, and `lossless` is WebP-only.
@@ -255,8 +260,7 @@ type OutputFormatOptions = {
255
260
  type RenderOptions = Omit<RenderOptions$1, "images" | "format" | "quality" | "lossless"> & OutputFormatOptions & {
256
261
  fonts?: FontLoader[];
257
262
  signal?: AbortSignal;
258
- images?: ImageLoader[]; /** Register only the `fonts` subsets the content renders. @default true */
259
- subset?: boolean;
263
+ images?: ImagesInput;
260
264
  };
261
265
  /**
262
266
  * Animation output format. `quality` and `lossless` are WebP-only; for WebP,
@@ -275,14 +279,12 @@ type AnimationOutputFormatOptions = {
275
279
  type RenderAnimationOptions = Omit<RenderAnimationOptions$1, "images" | "format" | "quality" | "lossless"> & AnimationOutputFormatOptions & {
276
280
  fonts?: FontLoader[];
277
281
  signal?: AbortSignal;
278
- images?: ImageLoader[]; /** Register only the `fonts` subsets the content renders. @default true */
279
- subset?: boolean;
282
+ images?: ImagesInput;
280
283
  };
281
284
  type SvgRenderOptions = Omit<SvgRenderOptions$1, "images"> & {
282
285
  fonts?: FontLoader[];
283
286
  signal?: AbortSignal;
284
- images?: ImageLoader[]; /** Register only the `fonts` subsets the content renders. @default true */
285
- subset?: boolean;
287
+ images?: ImagesInput;
286
288
  };
287
289
  declare class Renderer {
288
290
  private fontsByKey;
@@ -302,4 +304,4 @@ declare class Renderer {
302
304
  registerFont(font: FontLoader): Promise<any>;
303
305
  }
304
306
  //#endregion
305
- export { type AnimationOutputFormat, AnimationOutputFormatOptions, type AnimationSceneSource, type ByteBuf, type ContainerNode, type DitheringAlgorithm, type Font, type FontDetails, FontLoader, type ImageCacheMode, ImageLoader, type ImageNode, type ImageSource, type Keyframes, type KeyframesMap, type KeyframesRuleList, type MeasuredNode, type MeasuredTextRun, type Node, type NodeMetadata, type OutputFormat, OutputFormatOptions, type RegisteredFace, type RegisteredFamily, RenderAnimationOptions, RenderOptions, Renderer, SvgRenderOptions, type TextNode, extractResourceUrls };
307
+ export { type AnimationOutputFormat, AnimationOutputFormatOptions, type AnimationScene, type ByteBuf, type ContainerNode, type DitheringAlgorithm, type Font, type FontDetails, FontLoader, type ImageCacheMode, ImageLoader, type ImageNode, type ImageSource, ImagesInput, type Keyframes, type KeyframesMap, type KeyframesRuleList, type MeasuredNode, type MeasuredTextRun, type Node, type NodeMetadata, type OutputFormat, OutputFormatOptions, type RegisteredFace, type RegisteredFamily, RenderAnimationOptions, RenderOptions, Renderer, SvgRenderOptions, type TextNode };
package/dist/export.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { createRequire } from "module";
2
- import { extractResourceUrls, fontFromUrl, pickFonts } from "@takumi-rs/helpers";
2
+ import { fontFromUrl, subsetFonts } from "@takumi-rs/helpers";
3
3
  //#region index.js
4
4
  const require = createRequire(import.meta.url);
5
5
  const { readFileSync } = require(/* turbopackOptional: true */ "fs");
@@ -57,7 +57,7 @@ function requireNative() {
57
57
  try {
58
58
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-android-arm64/core.android-arm64.node");
59
59
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-android-arm64/package.json").version;
60
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
60
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
61
61
  return binding;
62
62
  } catch (e) {
63
63
  loadErrors.push(e);
@@ -71,7 +71,7 @@ function requireNative() {
71
71
  try {
72
72
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-android-arm-eabi/core.android-arm-eabi.node");
73
73
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-android-arm-eabi/package.json").version;
74
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
74
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
75
75
  return binding;
76
76
  } catch (e) {
77
77
  loadErrors.push(e);
@@ -86,7 +86,7 @@ function requireNative() {
86
86
  try {
87
87
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-win32-x64-gnu/core.win32-x64-gnu.node");
88
88
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-win32-x64-gnu/package.json").version;
89
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
89
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
90
90
  return binding;
91
91
  } catch (e) {
92
92
  loadErrors.push(e);
@@ -100,7 +100,7 @@ function requireNative() {
100
100
  try {
101
101
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-win32-x64-msvc/core.win32-x64-msvc.node");
102
102
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-win32-x64-msvc/package.json").version;
103
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
103
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
104
104
  return binding;
105
105
  } catch (e) {
106
106
  loadErrors.push(e);
@@ -115,7 +115,7 @@ function requireNative() {
115
115
  try {
116
116
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-win32-ia32-msvc/core.win32-ia32-msvc.node");
117
117
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-win32-ia32-msvc/package.json").version;
118
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
118
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
119
119
  return binding;
120
120
  } catch (e) {
121
121
  loadErrors.push(e);
@@ -129,7 +129,7 @@ function requireNative() {
129
129
  try {
130
130
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-win32-arm64-msvc/core.win32-arm64-msvc.node");
131
131
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-win32-arm64-msvc/package.json").version;
132
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
132
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
133
133
  return binding;
134
134
  } catch (e) {
135
135
  loadErrors.push(e);
@@ -144,7 +144,7 @@ function requireNative() {
144
144
  try {
145
145
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-darwin-universal/core.darwin-universal.node");
146
146
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-darwin-universal/package.json").version;
147
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
147
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
148
148
  return binding;
149
149
  } catch (e) {
150
150
  loadErrors.push(e);
@@ -158,7 +158,7 @@ function requireNative() {
158
158
  try {
159
159
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-darwin-x64/core.darwin-x64.node");
160
160
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-darwin-x64/package.json").version;
161
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
161
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
162
162
  return binding;
163
163
  } catch (e) {
164
164
  loadErrors.push(e);
@@ -172,7 +172,7 @@ function requireNative() {
172
172
  try {
173
173
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-darwin-arm64/core.darwin-arm64.node");
174
174
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-darwin-arm64/package.json").version;
175
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
175
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
176
176
  return binding;
177
177
  } catch (e) {
178
178
  loadErrors.push(e);
@@ -187,7 +187,7 @@ function requireNative() {
187
187
  try {
188
188
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-freebsd-x64/core.freebsd-x64.node");
189
189
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-freebsd-x64/package.json").version;
190
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
190
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
191
191
  return binding;
192
192
  } catch (e) {
193
193
  loadErrors.push(e);
@@ -201,7 +201,7 @@ function requireNative() {
201
201
  try {
202
202
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-freebsd-arm64/core.freebsd-arm64.node");
203
203
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-freebsd-arm64/package.json").version;
204
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
204
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
205
205
  return binding;
206
206
  } catch (e) {
207
207
  loadErrors.push(e);
@@ -216,7 +216,7 @@ function requireNative() {
216
216
  try {
217
217
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-x64-musl/core.linux-x64-musl.node");
218
218
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-x64-musl/package.json").version;
219
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
219
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
220
220
  return binding;
221
221
  } catch (e) {
222
222
  loadErrors.push(e);
@@ -230,7 +230,7 @@ function requireNative() {
230
230
  try {
231
231
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-x64-gnu/core.linux-x64-gnu.node");
232
232
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-x64-gnu/package.json").version;
233
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
233
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
234
234
  return binding;
235
235
  } catch (e) {
236
236
  loadErrors.push(e);
@@ -245,7 +245,7 @@ function requireNative() {
245
245
  try {
246
246
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm64-musl/core.linux-arm64-musl.node");
247
247
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm64-musl/package.json").version;
248
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
248
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
249
249
  return binding;
250
250
  } catch (e) {
251
251
  loadErrors.push(e);
@@ -259,7 +259,7 @@ function requireNative() {
259
259
  try {
260
260
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm64-gnu/core.linux-arm64-gnu.node");
261
261
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm64-gnu/package.json").version;
262
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
262
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
263
263
  return binding;
264
264
  } catch (e) {
265
265
  loadErrors.push(e);
@@ -274,7 +274,7 @@ function requireNative() {
274
274
  try {
275
275
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm-musleabihf/core.linux-arm-musleabihf.node");
276
276
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm-musleabihf/package.json").version;
277
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
277
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
278
278
  return binding;
279
279
  } catch (e) {
280
280
  loadErrors.push(e);
@@ -288,7 +288,7 @@ function requireNative() {
288
288
  try {
289
289
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm-gnueabihf/core.linux-arm-gnueabihf.node");
290
290
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-arm-gnueabihf/package.json").version;
291
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
291
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
292
292
  return binding;
293
293
  } catch (e) {
294
294
  loadErrors.push(e);
@@ -303,7 +303,7 @@ function requireNative() {
303
303
  try {
304
304
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-loong64-musl/core.linux-loong64-musl.node");
305
305
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-loong64-musl/package.json").version;
306
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
306
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
307
307
  return binding;
308
308
  } catch (e) {
309
309
  loadErrors.push(e);
@@ -317,7 +317,7 @@ function requireNative() {
317
317
  try {
318
318
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-loong64-gnu/core.linux-loong64-gnu.node");
319
319
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-loong64-gnu/package.json").version;
320
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
320
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
321
321
  return binding;
322
322
  } catch (e) {
323
323
  loadErrors.push(e);
@@ -332,7 +332,7 @@ function requireNative() {
332
332
  try {
333
333
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-riscv64-musl/core.linux-riscv64-musl.node");
334
334
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-riscv64-musl/package.json").version;
335
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
335
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
336
336
  return binding;
337
337
  } catch (e) {
338
338
  loadErrors.push(e);
@@ -346,7 +346,7 @@ function requireNative() {
346
346
  try {
347
347
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-riscv64-gnu/core.linux-riscv64-gnu.node");
348
348
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-riscv64-gnu/package.json").version;
349
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
349
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
350
350
  return binding;
351
351
  } catch (e) {
352
352
  loadErrors.push(e);
@@ -361,7 +361,7 @@ function requireNative() {
361
361
  try {
362
362
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-ppc64-gnu/core.linux-ppc64-gnu.node");
363
363
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-ppc64-gnu/package.json").version;
364
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
364
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
365
365
  return binding;
366
366
  } catch (e) {
367
367
  loadErrors.push(e);
@@ -375,7 +375,7 @@ function requireNative() {
375
375
  try {
376
376
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-s390x-gnu/core.linux-s390x-gnu.node");
377
377
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-linux-s390x-gnu/package.json").version;
378
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
378
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
379
379
  return binding;
380
380
  } catch (e) {
381
381
  loadErrors.push(e);
@@ -390,7 +390,7 @@ function requireNative() {
390
390
  try {
391
391
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-arm64/core.openharmony-arm64.node");
392
392
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-arm64/package.json").version;
393
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
393
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
394
394
  return binding;
395
395
  } catch (e) {
396
396
  loadErrors.push(e);
@@ -404,7 +404,7 @@ function requireNative() {
404
404
  try {
405
405
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-x64/core.openharmony-x64.node");
406
406
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-x64/package.json").version;
407
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
407
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
408
408
  return binding;
409
409
  } catch (e) {
410
410
  loadErrors.push(e);
@@ -418,7 +418,7 @@ function requireNative() {
418
418
  try {
419
419
  const binding = require(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-arm/core.openharmony-arm.node");
420
420
  const bindingPackageVersion = require(/* turbopackOptional: true */ "@takumi-rs/core-openharmony-arm/package.json").version;
421
- if (bindingPackageVersion !== "2.0.0-rc.2" && 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.2 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
421
+ if (bindingPackageVersion !== "2.0.0-rc.4" && 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.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`);
422
422
  return binding;
423
423
  } catch (e) {
424
424
  loadErrors.push(e);
@@ -468,12 +468,13 @@ const { Renderer: Renderer$1, AnimationOutputFormat, DitheringAlgorithm, ImageCa
468
468
  //#endregion
469
469
  //#region src/export.ts
470
470
  async function resolveImageLoaders(images) {
471
+ const { sources = [], cache } = Array.isArray(images) ? { sources: images } : images;
471
472
  const bySrc = /* @__PURE__ */ new Map();
472
- for (const image of images) bySrc.set(image.src, image);
473
- return Promise.all([...bySrc.values()].map(async ({ src, data, cache }) => ({
473
+ for (const image of sources) bySrc.set(image.src, image);
474
+ return Promise.all([...bySrc.values()].map(async ({ src, data, cache: own }) => ({
474
475
  src,
475
476
  data: typeof data === "function" ? await data() : data,
476
- cache
477
+ cache: own ?? cache
477
478
  })));
478
479
  }
479
480
  var Renderer = class {
@@ -506,11 +507,10 @@ var Renderer = class {
506
507
  };
507
508
  }
508
509
  async render(node, options) {
509
- const { fonts, fontFamilies, signal, images, subset, ...rest } = options ?? {};
510
- const resolved = await this.resolveResources(pickFonts({
510
+ const { fonts, fontFamilies, signal, images, ...rest } = options ?? {};
511
+ const resolved = await this.resolveResources(fonts && subsetFonts({
511
512
  fonts,
512
- source: node,
513
- subset
513
+ source: node
514
514
  }), images, fontFamilies);
515
515
  return this.inner.render(node, {
516
516
  ...rest,
@@ -518,11 +518,10 @@ var Renderer = class {
518
518
  }, signal);
519
519
  }
520
520
  async renderSvg(node, options) {
521
- const { fonts, fontFamilies, signal, images, subset, ...rest } = options ?? {};
522
- const resolved = await this.resolveResources(pickFonts({
521
+ const { fonts, fontFamilies, signal, images, ...rest } = options ?? {};
522
+ const resolved = await this.resolveResources(fonts && subsetFonts({
523
523
  fonts,
524
- source: node,
525
- subset
524
+ source: node
526
525
  }), images, fontFamilies);
527
526
  return this.inner.renderSvg(node, {
528
527
  ...rest,
@@ -530,11 +529,10 @@ var Renderer = class {
530
529
  }, signal);
531
530
  }
532
531
  async measure(node, options) {
533
- const { fonts, fontFamilies, signal, images, subset, ...rest } = options ?? {};
534
- const resolved = await this.resolveResources(pickFonts({
532
+ const { fonts, fontFamilies, signal, images, ...rest } = options ?? {};
533
+ const resolved = await this.resolveResources(fonts && subsetFonts({
535
534
  fonts,
536
- source: node,
537
- subset
535
+ source: node
538
536
  }), images, fontFamilies);
539
537
  return this.inner.measure(node, {
540
538
  ...rest,
@@ -542,12 +540,11 @@ var Renderer = class {
542
540
  }, signal);
543
541
  }
544
542
  async renderAnimation(options) {
545
- const { fonts, fontFamilies, signal, images, subset, ...rest } = options;
543
+ const { fonts, fontFamilies, signal, images, ...rest } = options;
546
544
  const nodes = options.scenes.map((scene) => scene.node);
547
- const resolved = await this.resolveResources(pickFonts({
545
+ const resolved = await this.resolveResources(fonts && subsetFonts({
548
546
  fonts,
549
- source: nodes,
550
- subset
547
+ source: nodes
551
548
  }), images, fontFamilies);
552
549
  return this.inner.renderAnimation({
553
550
  ...rest,
@@ -592,4 +589,4 @@ function isBuffer(data) {
592
589
  return data instanceof Uint8Array || data instanceof ArrayBuffer || typeof Buffer !== "undefined" && Buffer.isBuffer(data);
593
590
  }
594
591
  //#endregion
595
- export { Renderer, extractResourceUrls };
592
+ export { Renderer };
package/index.d.ts CHANGED
@@ -68,7 +68,7 @@ export type AnimationOutputFormat = /** Animated WebP format. */
68
68
  'gif';
69
69
 
70
70
  /** Represents a single scene in a sequential animation timeline. */
71
- export interface AnimationSceneSource {
71
+ export interface AnimationScene {
72
72
  /** The node tree to render for this scene. */
73
73
  node: Node
74
74
  /** The duration of this scene in milliseconds. */
@@ -158,7 +158,7 @@ export interface RegisteredFamily {
158
158
  /** Options for rendering a sequential scene animation. */
159
159
  export interface RenderAnimationOptions {
160
160
  /** The scenes to render sequentially. */
161
- scenes: Array<AnimationSceneSource>
161
+ scenes: Array<AnimationScene>
162
162
  /** Whether to draw debug borders around layout elements. */
163
163
  drawDebugBorder?: boolean
164
164
  /** The width of each frame in pixels. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@takumi-rs/core",
3
- "version": "2.0.0-rc.2",
3
+ "version": "2.0.0-rc.4",
4
4
  "description": "Native Node.js bindings for the Takumi Rust image rendering engine.",
5
5
  "keywords": [
6
6
  "css",
@@ -102,13 +102,13 @@
102
102
  "node": ">=18"
103
103
  },
104
104
  "optionalDependencies": {
105
- "@takumi-rs/core-darwin-x64": "2.0.0-rc.2",
106
- "@takumi-rs/core-darwin-arm64": "2.0.0-rc.2",
107
- "@takumi-rs/core-linux-arm64-gnu": "2.0.0-rc.2",
108
- "@takumi-rs/core-linux-arm64-musl": "2.0.0-rc.2",
109
- "@takumi-rs/core-win32-arm64-msvc": "2.0.0-rc.2",
110
- "@takumi-rs/core-linux-x64-gnu": "2.0.0-rc.2",
111
- "@takumi-rs/core-linux-x64-musl": "2.0.0-rc.2",
112
- "@takumi-rs/core-win32-x64-msvc": "2.0.0-rc.2"
105
+ "@takumi-rs/core-darwin-x64": "2.0.0-rc.4",
106
+ "@takumi-rs/core-darwin-arm64": "2.0.0-rc.4",
107
+ "@takumi-rs/core-linux-arm64-gnu": "2.0.0-rc.4",
108
+ "@takumi-rs/core-linux-arm64-musl": "2.0.0-rc.4",
109
+ "@takumi-rs/core-win32-arm64-msvc": "2.0.0-rc.4",
110
+ "@takumi-rs/core-linux-x64-gnu": "2.0.0-rc.4",
111
+ "@takumi-rs/core-linux-x64-musl": "2.0.0-rc.4",
112
+ "@takumi-rs/core-win32-x64-msvc": "2.0.0-rc.4"
113
113
  }
114
114
  }