takumi-js 2.0.0-beta.1 → 2.0.0-beta.10

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.
@@ -0,0 +1,5 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ //#region src/backend/node.ts
3
+ const loadBackend = () => import("@takumi-rs/core");
4
+ //#endregion
5
+ exports.loadBackend = loadBackend;
@@ -0,0 +1,6 @@
1
+ import { t as LoadBackend } from "../types-BQoM2g3W.cjs";
2
+
3
+ //#region src/backend/node.d.ts
4
+ declare const loadBackend: LoadBackend;
5
+ //#endregion
6
+ export { loadBackend };
@@ -0,0 +1,6 @@
1
+ import { t as LoadBackend } from "../types-BQoM2g3W.mjs";
2
+
3
+ //#region src/backend/node.d.ts
4
+ declare const loadBackend: LoadBackend;
5
+ //#endregion
6
+ export { loadBackend };
@@ -0,0 +1,4 @@
1
+ //#region src/backend/node.ts
2
+ const loadBackend = () => import("@takumi-rs/core");
3
+ //#endregion
4
+ export { loadBackend };
@@ -0,0 +1,25 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_rolldown_runtime = require("../rolldown-runtime-D6vf50IK.cjs");
3
+ let _takumi_rs_wasm_auto = require("@takumi-rs/wasm/auto");
4
+ _takumi_rs_wasm_auto = require_rolldown_runtime.__toESM(_takumi_rs_wasm_auto, 1);
5
+ let _takumi_rs_wasm = require("@takumi-rs/wasm");
6
+ _takumi_rs_wasm = require_rolldown_runtime.__toESM(_takumi_rs_wasm, 1);
7
+ //#region src/backend/wasm-init.ts
8
+ /**
9
+ * Initializes the WASM bindings, preferring a caller-supplied `module` and
10
+ * falling back to the per-bundler binary picked by the import condition.
11
+ * `@takumi-rs/wasm` guards against double init, so a binary already loaded by
12
+ * `@takumi-rs/wasm/auto` (e.g. on Deno) makes this a no-op.
13
+ */
14
+ async function initWasm(fallback, module) {
15
+ const source = module ?? fallback;
16
+ const resolved = typeof source === "function" ? await source() : await source;
17
+ const input = resolved !== null && typeof resolved === "object" && "default" in resolved ? resolved.default : resolved;
18
+ await _takumi_rs_wasm.default(input ? { module_or_path: input } : void 0);
19
+ return _takumi_rs_wasm;
20
+ }
21
+ //#endregion
22
+ //#region src/backend/wasm.ts
23
+ const loadBackend = (module) => initWasm(_takumi_rs_wasm_auto.default, module);
24
+ //#endregion
25
+ exports.loadBackend = loadBackend;
@@ -0,0 +1,6 @@
1
+ import { t as LoadBackend } from "../types-BQoM2g3W.cjs";
2
+
3
+ //#region src/backend/wasm.d.ts
4
+ declare const loadBackend: LoadBackend;
5
+ //#endregion
6
+ export { loadBackend };
@@ -0,0 +1,6 @@
1
+ import { t as LoadBackend } from "../types-BQoM2g3W.mjs";
2
+
3
+ //#region src/backend/wasm.d.ts
4
+ declare const loadBackend: LoadBackend;
5
+ //#endregion
6
+ export { loadBackend };
@@ -0,0 +1,21 @@
1
+ import autoModule from "@takumi-rs/wasm/auto";
2
+ import * as wasm from "@takumi-rs/wasm";
3
+ //#region src/backend/wasm-init.ts
4
+ /**
5
+ * Initializes the WASM bindings, preferring a caller-supplied `module` and
6
+ * falling back to the per-bundler binary picked by the import condition.
7
+ * `@takumi-rs/wasm` guards against double init, so a binary already loaded by
8
+ * `@takumi-rs/wasm/auto` (e.g. on Deno) makes this a no-op.
9
+ */
10
+ async function initWasm(fallback, module) {
11
+ const source = module ?? fallback;
12
+ const resolved = typeof source === "function" ? await source() : await source;
13
+ const input = resolved !== null && typeof resolved === "object" && "default" in resolved ? resolved.default : resolved;
14
+ await wasm.default(input ? { module_or_path: input } : void 0);
15
+ return wasm;
16
+ }
17
+ //#endregion
18
+ //#region src/backend/wasm.ts
19
+ const loadBackend = (module) => initWasm(autoModule, module);
20
+ //#endregion
21
+ export { loadBackend };
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_render = require("./render-BWrJI7_9.cjs");
2
+ const require_render = require("./render-GPRZBAX-.cjs");
3
3
  exports.render = require_render.render;
4
4
  exports.renderAnimation = require_render.renderAnimation;
5
5
  exports.renderSvg = require_render.renderSvg;
package/dist/index.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import { a as RenderSvgOptions, c as renderSvg, i as RenderOptions, n as RenderAnimationScene, o as render, r as RenderInput, s as renderAnimation, t as RenderAnimationOptions } from "./render-DJjKHz2l.cjs";
2
- import { ContainerNode, FetchResourcesOptions, ImageNode, Node, NodeAttributes, NodeMetadata, ReactElementLike, TextNode } from "@takumi-rs/helpers";
1
+ import { a as RenderSvgOptions, c as renderSvg, i as RenderOptions, n as RenderAnimationScene, o as render, r as RenderInput, s as renderAnimation, t as RenderAnimationOptions } from "./render-DxBxuMVh.cjs";
3
2
  import { AnimationFrameSource, AnimationOutputFormat, AnimationSceneSource, DitheringAlgorithm, EncodeFramesOptions, Font, FontDetails, FontLoader, ImageSource, Keyframes, KeyframesMap, KeyframesRuleList, MeasuredNode, MeasuredTextRun, OutputFormat } from "@takumi-rs/core";
3
+ import { ContainerNode, FetchResourcesOptions, ImageNode, Node, NodeAttributes, NodeMetadata, ReactElementLike, TextNode } from "@takumi-rs/helpers";
4
4
 
5
5
  //#region src/index.d.ts
6
6
  declare module "react" {
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as renderAnimation, r as renderSvg, t as render } from "./render-1w0Pei0G.mjs";
1
+ import { n as renderAnimation, r as renderSvg, t as render } from "./render-ao3x_9Bt.mjs";
2
2
  export { render, renderAnimation, renderSvg };
@@ -1,8 +1,8 @@
1
+ import * as napi from "@takumi-rs/core";
2
+ import * as wasm from "@takumi-rs/wasm";
1
3
  import { EmojiType } from "@takumi-rs/helpers/emoji";
2
4
  import { FetchResourcesOptions, Node, ReactElementLike } from "@takumi-rs/helpers";
3
5
  import { FromJsxOptions } from "@takumi-rs/helpers/jsx";
4
- import * as napi from "@takumi-rs/core";
5
- import * as wasm from "@takumi-rs/wasm";
6
6
  import { ReactNode } from "react";
7
7
 
8
8
  //#region src/render.d.ts
@@ -1,80 +1,23 @@
1
1
  let _takumi_rs_helpers_emoji = require("@takumi-rs/helpers/emoji");
2
2
  let _takumi_rs_helpers = require("@takumi-rs/helpers");
3
3
  let _takumi_rs_helpers_jsx = require("@takumi-rs/helpers/jsx");
4
+ let _backend = require("#backend");
4
5
  let _takumi_rs_helpers_html = require("@takumi-rs/helpers/html");
5
6
  //#region src/import.ts
6
7
  let importPromise = null;
8
+ /**
9
+ * Resolves the rendering backend once and caches it. With no `module`, the
10
+ * `#backend` import conditions pick it (napi on Node/Bun, WASM elsewhere). An
11
+ * explicit `module` is a WASM binary, so it forces WASM — the escape hatch for a
12
+ * Node target that can't load the native addon. A failed load clears the cache.
13
+ */
7
14
  function getImports(module) {
8
- importPromise ??= getImportsImpl(module);
15
+ importPromise ??= (module === void 0 ? (0, _backend.loadBackend)() : Promise.resolve().then(() => require("./backend/wasm.cjs")).then((wasm) => wasm.loadBackend(module))).catch((error) => {
16
+ importPromise = null;
17
+ throw error;
18
+ });
9
19
  return importPromise;
10
20
  }
11
- async function getImportsImpl(module) {
12
- if (module) return initializeWasm(module);
13
- if (shouldSkipCoreImport()) return initializeWasm(importWasmBindings());
14
- try {
15
- return await import("@takumi-rs/core");
16
- } catch (error) {
17
- if (isNodeEnvironment()) throw new Error("Failed to load @takumi-rs/core in Node.js runtime. Takumi requires the native napi-rs module in Node environments.", { cause: error });
18
- console.warn("Unable to import @takumi-rs/core. Falling back to auto-detection of WASM bindings.", { cause: error });
19
- }
20
- return initializeWasm(importWasmBindings());
21
- }
22
- async function initializeWasm(module) {
23
- const wasm = await import(
24
- /* @vite-ignore */
25
- "@takumi-rs/wasm"
26
- );
27
- const resolvedModule = typeof module === "function" ? await module() : await module;
28
- const wasmModule = resolvedModule !== void 0 && typeof resolvedModule === "object" && "default" in resolvedModule ? resolvedModule.default : resolvedModule;
29
- try {
30
- await wasm.default(wasmModule ? { module_or_path: wasmModule } : void 0);
31
- return wasm;
32
- } catch (error) {
33
- throw new Error("Couldn't automatically resolve Takumi native bindings. Please specify the module option with the WASM module.", { cause: error });
34
- }
35
- }
36
- function hackFakeProcessForBrowser() {
37
- const before = globalThis.process;
38
- globalThis.process ??= {};
39
- globalThis.process.env ??= {};
40
- return before;
41
- }
42
- async function importWasmBindings() {
43
- const beforeProcess = hackFakeProcessForBrowser();
44
- const nextPath = "@takumi-rs/wasm/next";
45
- if (process.env.NEXT_RUNTIME) {
46
- globalThis.process = beforeProcess;
47
- return import(
48
- /* @vite-ignore */
49
- nextPath
50
- );
51
- }
52
- globalThis.process = beforeProcess;
53
- return import(
54
- /* turbopackIgnore: true */
55
- /* webpackIgnore: true */
56
- "@takumi-rs/wasm/auto"
57
- );
58
- }
59
- function shouldSkipCoreImport() {
60
- const beforeProcess = hackFakeProcessForBrowser();
61
- if (process.env.NEXT_RUNTIME === "edge") {
62
- globalThis.process = beforeProcess;
63
- return true;
64
- }
65
- globalThis.process = beforeProcess;
66
- if (typeof window !== "undefined") return true;
67
- if (typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers") return true;
68
- if ("WebSocketPair" in globalThis) return true;
69
- if ("EdgeRuntime" in globalThis) return true;
70
- if ("Deno" in globalThis) return true;
71
- const maybeWorkerGlobalScope = globalThis.WorkerGlobalScope;
72
- if (maybeWorkerGlobalScope !== void 0 && maybeWorkerGlobalScope.prototype.isPrototypeOf(globalThis)) return true;
73
- return false;
74
- }
75
- function isNodeEnvironment() {
76
- return typeof process !== "undefined" && typeof process.versions === "object" && process.versions !== null && typeof process.versions.node === "string";
77
- }
78
21
  //#endregion
79
22
  //#region src/render.ts
80
23
  let globalRenderer;
@@ -1,80 +1,23 @@
1
1
  import { extractEmojis } from "@takumi-rs/helpers/emoji";
2
2
  import { extractResourceUrls, fetchResources } from "@takumi-rs/helpers";
3
3
  import { fromJsx } from "@takumi-rs/helpers/jsx";
4
+ import { loadBackend } from "#backend";
4
5
  import { fromHtml } from "@takumi-rs/helpers/html";
5
6
  //#region src/import.ts
6
7
  let importPromise = null;
8
+ /**
9
+ * Resolves the rendering backend once and caches it. With no `module`, the
10
+ * `#backend` import conditions pick it (napi on Node/Bun, WASM elsewhere). An
11
+ * explicit `module` is a WASM binary, so it forces WASM — the escape hatch for a
12
+ * Node target that can't load the native addon. A failed load clears the cache.
13
+ */
7
14
  function getImports(module) {
8
- importPromise ??= getImportsImpl(module);
15
+ importPromise ??= (module === void 0 ? loadBackend() : import("./backend/wasm.mjs").then((wasm) => wasm.loadBackend(module))).catch((error) => {
16
+ importPromise = null;
17
+ throw error;
18
+ });
9
19
  return importPromise;
10
20
  }
11
- async function getImportsImpl(module) {
12
- if (module) return initializeWasm(module);
13
- if (shouldSkipCoreImport()) return initializeWasm(importWasmBindings());
14
- try {
15
- return await import("@takumi-rs/core");
16
- } catch (error) {
17
- if (isNodeEnvironment()) throw new Error("Failed to load @takumi-rs/core in Node.js runtime. Takumi requires the native napi-rs module in Node environments.", { cause: error });
18
- console.warn("Unable to import @takumi-rs/core. Falling back to auto-detection of WASM bindings.", { cause: error });
19
- }
20
- return initializeWasm(importWasmBindings());
21
- }
22
- async function initializeWasm(module) {
23
- const wasm = await import(
24
- /* @vite-ignore */
25
- "@takumi-rs/wasm"
26
- );
27
- const resolvedModule = typeof module === "function" ? await module() : await module;
28
- const wasmModule = resolvedModule !== void 0 && typeof resolvedModule === "object" && "default" in resolvedModule ? resolvedModule.default : resolvedModule;
29
- try {
30
- await wasm.default(wasmModule ? { module_or_path: wasmModule } : void 0);
31
- return wasm;
32
- } catch (error) {
33
- throw new Error("Couldn't automatically resolve Takumi native bindings. Please specify the module option with the WASM module.", { cause: error });
34
- }
35
- }
36
- function hackFakeProcessForBrowser() {
37
- const before = globalThis.process;
38
- globalThis.process ??= {};
39
- globalThis.process.env ??= {};
40
- return before;
41
- }
42
- async function importWasmBindings() {
43
- const beforeProcess = hackFakeProcessForBrowser();
44
- const nextPath = "@takumi-rs/wasm/next";
45
- if (process.env.NEXT_RUNTIME) {
46
- globalThis.process = beforeProcess;
47
- return import(
48
- /* @vite-ignore */
49
- nextPath
50
- );
51
- }
52
- globalThis.process = beforeProcess;
53
- return import(
54
- /* turbopackIgnore: true */
55
- /* webpackIgnore: true */
56
- "@takumi-rs/wasm/auto"
57
- );
58
- }
59
- function shouldSkipCoreImport() {
60
- const beforeProcess = hackFakeProcessForBrowser();
61
- if (process.env.NEXT_RUNTIME === "edge") {
62
- globalThis.process = beforeProcess;
63
- return true;
64
- }
65
- globalThis.process = beforeProcess;
66
- if (typeof window !== "undefined") return true;
67
- if (typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers") return true;
68
- if ("WebSocketPair" in globalThis) return true;
69
- if ("EdgeRuntime" in globalThis) return true;
70
- if ("Deno" in globalThis) return true;
71
- const maybeWorkerGlobalScope = globalThis.WorkerGlobalScope;
72
- if (maybeWorkerGlobalScope !== void 0 && maybeWorkerGlobalScope.prototype.isPrototypeOf(globalThis)) return true;
73
- return false;
74
- }
75
- function isNodeEnvironment() {
76
- return typeof process !== "undefined" && typeof process.versions === "object" && process.versions !== null && typeof process.versions.node === "string";
77
- }
78
21
  //#endregion
79
22
  //#region src/render.ts
80
23
  let globalRenderer;
package/dist/response.cjs CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_render = require("./render-BWrJI7_9.cjs");
5
+ const require_render = require("./render-GPRZBAX-.cjs");
6
6
  //#region src/response/index.ts
7
7
  const contentTypeMap = {
8
8
  png: "image/png",
@@ -1,4 +1,4 @@
1
- import { i as RenderOptions, r as RenderInput } from "./render-DJjKHz2l.cjs";
1
+ import { i as RenderOptions, r as RenderInput } from "./render-DxBxuMVh.cjs";
2
2
 
3
3
  //#region src/response/index.d.ts
4
4
  type ImageResponseResult = Response & {
package/dist/response.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as render } from "./render-1w0Pei0G.mjs";
1
+ import { t as render } from "./render-ao3x_9Bt.mjs";
2
2
  //#region src/response/index.ts
3
3
  const contentTypeMap = {
4
4
  png: "image/png",
@@ -0,0 +1,28 @@
1
+ //#region \0rolldown/runtime.js
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+ //#endregion
23
+ Object.defineProperty(exports, "__toESM", {
24
+ enumerable: true,
25
+ get: function() {
26
+ return __toESM;
27
+ }
28
+ });
@@ -0,0 +1,17 @@
1
+ import * as napi from "@takumi-rs/core";
2
+ import * as wasm from "@takumi-rs/wasm";
3
+
4
+ //#region src/backend/types.d.ts
5
+ /** The bindings namespace, whichever backend the import conditions selected. */
6
+ type Backend = typeof napi | typeof wasm;
7
+ /** A WASM binary, or something that resolves to one, for manual initialization. */
8
+ type BackendModule = wasm.InitInput | {
9
+ default: wasm.InitInput;
10
+ } | Promise<wasm.InitInput | {
11
+ default: wasm.InitInput;
12
+ }> | (() => Promise<wasm.InitInput | {
13
+ default: wasm.InitInput;
14
+ }>);
15
+ type LoadBackend = (module?: BackendModule) => Promise<Backend>;
16
+ //#endregion
17
+ export { LoadBackend as t };
@@ -0,0 +1,17 @@
1
+ import * as napi from "@takumi-rs/core";
2
+ import * as wasm from "@takumi-rs/wasm";
3
+
4
+ //#region src/backend/types.d.ts
5
+ /** The bindings namespace, whichever backend the import conditions selected. */
6
+ type Backend = typeof napi | typeof wasm;
7
+ /** A WASM binary, or something that resolves to one, for manual initialization. */
8
+ type BackendModule = wasm.InitInput | {
9
+ default: wasm.InitInput;
10
+ } | Promise<wasm.InitInput | {
11
+ default: wasm.InitInput;
12
+ }> | (() => Promise<wasm.InitInput | {
13
+ default: wasm.InitInput;
14
+ }>);
15
+ type LoadBackend = (module?: BackendModule) => Promise<Backend>;
16
+ //#endregion
17
+ export { LoadBackend as t };
package/dist/wasm.cjs CHANGED
@@ -2,32 +2,11 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- //#region \0rolldown/runtime.js
6
- var __create = Object.create;
7
- var __defProp = Object.defineProperty;
8
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
9
- var __getOwnPropNames = Object.getOwnPropertyNames;
10
- var __getProtoOf = Object.getPrototypeOf;
11
- var __hasOwnProp = Object.prototype.hasOwnProperty;
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
14
- key = keys[i];
15
- if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: ((k) => from[k]).bind(null, key),
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
21
- };
22
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
23
- value: mod,
24
- enumerable: true
25
- }) : target, mod));
26
- //#endregion
5
+ const require_rolldown_runtime = require("./rolldown-runtime-D6vf50IK.cjs");
27
6
  let _takumi_rs_wasm_auto = require("@takumi-rs/wasm/auto");
28
- _takumi_rs_wasm_auto = __toESM(_takumi_rs_wasm_auto, 1);
7
+ _takumi_rs_wasm_auto = require_rolldown_runtime.__toESM(_takumi_rs_wasm_auto, 1);
29
8
  let _takumi_rs_wasm = require("@takumi-rs/wasm");
30
- _takumi_rs_wasm = __toESM(_takumi_rs_wasm, 1);
9
+ _takumi_rs_wasm = require_rolldown_runtime.__toESM(_takumi_rs_wasm, 1);
31
10
  Object.defineProperty(exports, "default", {
32
11
  enumerable: true,
33
12
  get: function() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "takumi-js",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.10",
4
4
  "description": "All-in-one Takumi package for Node.js and WebAssembly runtimes.",
5
5
  "keywords": [
6
6
  "css",
@@ -35,6 +35,80 @@
35
35
  "main": "./dist/index.cjs",
36
36
  "module": "./dist/index.mjs",
37
37
  "types": "./dist/index.d.mts",
38
+ "imports": {
39
+ "#backend": {
40
+ "workerd": {
41
+ "import": {
42
+ "types": "./dist/backend/wasm.d.mts",
43
+ "default": "./dist/backend/wasm.mjs"
44
+ },
45
+ "require": {
46
+ "types": "./dist/backend/wasm.d.cts",
47
+ "default": "./dist/backend/wasm.cjs"
48
+ }
49
+ },
50
+ "worker": {
51
+ "import": {
52
+ "types": "./dist/backend/wasm.d.mts",
53
+ "default": "./dist/backend/wasm.mjs"
54
+ },
55
+ "require": {
56
+ "types": "./dist/backend/wasm.d.cts",
57
+ "default": "./dist/backend/wasm.cjs"
58
+ }
59
+ },
60
+ "deno": {
61
+ "import": {
62
+ "types": "./dist/backend/wasm.d.mts",
63
+ "default": "./dist/backend/wasm.mjs"
64
+ },
65
+ "require": {
66
+ "types": "./dist/backend/wasm.d.cts",
67
+ "default": "./dist/backend/wasm.cjs"
68
+ }
69
+ },
70
+ "browser": {
71
+ "import": {
72
+ "types": "./dist/backend/wasm.d.mts",
73
+ "default": "./dist/backend/wasm.mjs"
74
+ },
75
+ "require": {
76
+ "types": "./dist/backend/wasm.d.cts",
77
+ "default": "./dist/backend/wasm.cjs"
78
+ }
79
+ },
80
+ "bun": {
81
+ "import": {
82
+ "types": "./dist/backend/node.d.mts",
83
+ "default": "./dist/backend/node.mjs"
84
+ },
85
+ "require": {
86
+ "types": "./dist/backend/node.d.cts",
87
+ "default": "./dist/backend/node.cjs"
88
+ }
89
+ },
90
+ "node": {
91
+ "import": {
92
+ "types": "./dist/backend/node.d.mts",
93
+ "default": "./dist/backend/node.mjs"
94
+ },
95
+ "require": {
96
+ "types": "./dist/backend/node.d.cts",
97
+ "default": "./dist/backend/node.cjs"
98
+ }
99
+ },
100
+ "default": {
101
+ "import": {
102
+ "types": "./dist/backend/wasm.d.mts",
103
+ "default": "./dist/backend/wasm.mjs"
104
+ },
105
+ "require": {
106
+ "types": "./dist/backend/wasm.d.cts",
107
+ "default": "./dist/backend/wasm.cjs"
108
+ }
109
+ }
110
+ }
111
+ },
38
112
  "exports": {
39
113
  ".": {
40
114
  "import": {
@@ -122,22 +196,24 @@
122
196
  "provenance": true
123
197
  },
124
198
  "scripts": {
125
- "prepublishOnly": "jq '.dependencies[\"@takumi-rs/core\"] = .version | .dependencies[\"@takumi-rs/helpers\"] = .version | .dependencies[\"@takumi-rs/wasm\"] = .version' package.json > tmp.json && mv tmp.json package.json",
126
199
  "build": "tsdown",
127
200
  "test": "bun test",
128
201
  "test:bundlers": "bun test tests/bundlers.test.ts",
129
202
  "publish-lint": "attw --pack . && publint --strict ."
130
203
  },
131
204
  "dependencies": {
132
- "@takumi-rs/core": "2.0.0-beta.1",
133
- "@takumi-rs/helpers": "2.0.0-beta.1",
134
- "@takumi-rs/wasm": "2.0.0-beta.1"
205
+ "@takumi-rs/core": "2.0.0-beta.10",
206
+ "@takumi-rs/helpers": "2.0.0-beta.10",
207
+ "@takumi-rs/wasm": "2.0.0-beta.10"
135
208
  },
136
209
  "devDependencies": {
137
- "@types/bun": "catalog:",
210
+ "@types/bun": "^1.3.14",
138
211
  "@types/react": "^19.2.17",
139
212
  "react": "^19.2.7",
140
- "tsdown": "catalog:",
141
- "unrun": "catalog:"
213
+ "tsdown": "^0.22.3",
214
+ "unrun": "^0.3.1"
215
+ },
216
+ "engines": {
217
+ "node": ">=18"
142
218
  }
143
219
  }