takumi-js 2.0.0-beta.12 → 2.0.0-beta.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,25 +1,9 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_rolldown_runtime = require("../rolldown-runtime-D6vf50IK.cjs");
2
+ const require_rolldown_runtime = require("../rolldown-runtime-DakpK96I.cjs");
3
+ const require_wasm_init = require("../wasm-init-H65IoN11.cjs");
3
4
  let _takumi_rs_wasm_auto = require("@takumi-rs/wasm/auto");
4
5
  _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
6
  //#region src/backend/wasm.ts
23
- const loadBackend = (module) => initWasm(_takumi_rs_wasm_auto.default, module);
7
+ const loadBackend = (module) => require_wasm_init.initWasm(module, _takumi_rs_wasm_auto.default);
24
8
  //#endregion
25
9
  exports.loadBackend = loadBackend;
@@ -1,21 +1,6 @@
1
+ import { t as initWasm } from "../wasm-init-DzwbPAKW.mjs";
1
2
  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
3
  //#region src/backend/wasm.ts
19
- const loadBackend = (module) => initWasm(autoModule, module);
4
+ const loadBackend = (module) => initWasm(module, autoModule);
20
5
  //#endregion
21
6
  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-GPRZBAX-.cjs");
2
+ const require_render = require("./render-CZkYPSA-.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.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as renderAnimation, r as renderSvg, t as render } from "./render-ao3x_9Bt.mjs";
1
+ import { n as renderAnimation, r as renderSvg, t as render } from "./render-CHKDLJu_.mjs";
2
2
  export { render, renderAnimation, renderSvg };
@@ -12,7 +12,7 @@ let importPromise = null;
12
12
  * Node target that can't load the native addon. A failed load clears the cache.
13
13
  */
14
14
  function getImports(module) {
15
- importPromise ??= (module === void 0 ? loadBackend() : import("./backend/wasm.mjs").then((wasm) => wasm.loadBackend(module))).catch((error) => {
15
+ importPromise ??= (module === void 0 ? loadBackend() : import("./wasm-init-DzwbPAKW.mjs").then((n) => n.n).then(({ initWasm }) => initWasm(module))).catch((error) => {
16
16
  importPromise = null;
17
17
  throw error;
18
18
  });
@@ -12,7 +12,7 @@ let importPromise = null;
12
12
  * Node target that can't load the native addon. A failed load clears the cache.
13
13
  */
14
14
  function getImports(module) {
15
- importPromise ??= (module === void 0 ? (0, _backend.loadBackend)() : Promise.resolve().then(() => require("./backend/wasm.cjs")).then((wasm) => wasm.loadBackend(module))).catch((error) => {
15
+ importPromise ??= (module === void 0 ? (0, _backend.loadBackend)() : Promise.resolve().then(() => require("./wasm-init-H65IoN11.cjs")).then((n) => n.wasm_init_exports).then(({ initWasm }) => initWasm(module))).catch((error) => {
16
16
  importPromise = null;
17
17
  throw error;
18
18
  });
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-GPRZBAX-.cjs");
5
+ const require_render = require("./render-CZkYPSA-.cjs");
6
6
  //#region src/response/index.ts
7
7
  const contentTypeMap = {
8
8
  png: "image/png",
package/dist/response.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as render } from "./render-ao3x_9Bt.mjs";
1
+ import { t as render } from "./render-CHKDLJu_.mjs";
2
2
  //#region src/response/index.ts
3
3
  const contentTypeMap = {
4
4
  png: "image/png",
@@ -5,6 +5,15 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __exportAll = (all, no_symbols) => {
9
+ let target = {};
10
+ for (var name in all) __defProp(target, name, {
11
+ get: all[name],
12
+ enumerable: true
13
+ });
14
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
15
+ return target;
16
+ };
8
17
  var __copyProps = (to, from, except, desc) => {
9
18
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
19
  key = keys[i];
@@ -20,6 +29,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
20
29
  enumerable: true
21
30
  }) : target, mod));
22
31
  //#endregion
32
+ Object.defineProperty(exports, "__exportAll", {
33
+ enumerable: true,
34
+ get: function() {
35
+ return __exportAll;
36
+ }
37
+ });
23
38
  Object.defineProperty(exports, "__toESM", {
24
39
  enumerable: true,
25
40
  get: function() {
@@ -0,0 +1,30 @@
1
+ import * as wasm from "@takumi-rs/wasm";
2
+ //#region \0rolldown/runtime.js
3
+ var __defProp = Object.defineProperty;
4
+ var __exportAll = (all, no_symbols) => {
5
+ let target = {};
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: true
9
+ });
10
+ if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
11
+ return target;
12
+ };
13
+ //#endregion
14
+ //#region src/backend/wasm-init.ts
15
+ var wasm_init_exports = /* @__PURE__ */ __exportAll({ initWasm: () => initWasm });
16
+ /**
17
+ * Initializes the WASM bindings, preferring a caller-supplied `module` and
18
+ * falling back to the per-bundler binary picked by the import condition.
19
+ * `@takumi-rs/wasm` guards against double init, so a binary already loaded by
20
+ * `@takumi-rs/wasm/auto` (e.g. on Deno) makes this a no-op.
21
+ */
22
+ async function initWasm(module, fallback) {
23
+ const source = module ?? fallback;
24
+ const resolved = typeof source === "function" ? await source() : await source;
25
+ const input = resolved !== null && typeof resolved === "object" && "default" in resolved ? resolved.default : resolved;
26
+ await wasm.default(input ? { module_or_path: input } : void 0);
27
+ return wasm;
28
+ }
29
+ //#endregion
30
+ export { wasm_init_exports as n, initWasm as t };
@@ -0,0 +1,31 @@
1
+ const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
2
+ let _takumi_rs_wasm = require("@takumi-rs/wasm");
3
+ _takumi_rs_wasm = require_rolldown_runtime.__toESM(_takumi_rs_wasm, 1);
4
+ //#region src/backend/wasm-init.ts
5
+ var wasm_init_exports = /* @__PURE__ */ require_rolldown_runtime.__exportAll({ initWasm: () => initWasm });
6
+ /**
7
+ * Initializes the WASM bindings, preferring a caller-supplied `module` and
8
+ * falling back to the per-bundler binary picked by the import condition.
9
+ * `@takumi-rs/wasm` guards against double init, so a binary already loaded by
10
+ * `@takumi-rs/wasm/auto` (e.g. on Deno) makes this a no-op.
11
+ */
12
+ async function initWasm(module, fallback) {
13
+ const source = module ?? fallback;
14
+ const resolved = typeof source === "function" ? await source() : await source;
15
+ const input = resolved !== null && typeof resolved === "object" && "default" in resolved ? resolved.default : resolved;
16
+ await _takumi_rs_wasm.default(input ? { module_or_path: input } : void 0);
17
+ return _takumi_rs_wasm;
18
+ }
19
+ //#endregion
20
+ Object.defineProperty(exports, "initWasm", {
21
+ enumerable: true,
22
+ get: function() {
23
+ return initWasm;
24
+ }
25
+ });
26
+ Object.defineProperty(exports, "wasm_init_exports", {
27
+ enumerable: true,
28
+ get: function() {
29
+ return wasm_init_exports;
30
+ }
31
+ });
package/dist/wasm.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_rolldown_runtime = require("./rolldown-runtime-D6vf50IK.cjs");
5
+ const require_rolldown_runtime = require("./rolldown-runtime-DakpK96I.cjs");
6
6
  let _takumi_rs_wasm_auto = require("@takumi-rs/wasm/auto");
7
7
  _takumi_rs_wasm_auto = require_rolldown_runtime.__toESM(_takumi_rs_wasm_auto, 1);
8
8
  let _takumi_rs_wasm = require("@takumi-rs/wasm");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "takumi-js",
3
- "version": "2.0.0-beta.12",
3
+ "version": "2.0.0-beta.13",
4
4
  "description": "All-in-one Takumi package for Node.js and WebAssembly runtimes.",
5
5
  "keywords": [
6
6
  "css",
@@ -202,9 +202,9 @@
202
202
  "publish-lint": "attw --pack . && publint --strict ."
203
203
  },
204
204
  "dependencies": {
205
- "@takumi-rs/core": "2.0.0-beta.12",
206
- "@takumi-rs/helpers": "2.0.0-beta.12",
207
- "@takumi-rs/wasm": "2.0.0-beta.12"
205
+ "@takumi-rs/core": "2.0.0-beta.13",
206
+ "@takumi-rs/helpers": "2.0.0-beta.13",
207
+ "@takumi-rs/wasm": "2.0.0-beta.13"
208
208
  },
209
209
  "devDependencies": {
210
210
  "@types/bun": "^1.3.14",