takumi-js 1.6.0 → 1.7.0
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/index.cjs +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +1 -1
- package/dist/{render-DlT6ZuED.cjs → render-B9hqbnWb.cjs} +3 -1
- package/dist/{render-hDUMSdfA.mjs → render-DM24DsDc.mjs} +3 -0
- package/dist/response.cjs +1 -1
- package/dist/response.d.cts +1 -1
- package/dist/response.d.mts +1 -1
- package/dist/response.mjs +1 -1
- package/dist/wasm.cjs +0 -1
- package/package.json +6 -6
- /package/dist/{render-8qtfnpqJ.d.cts → render-OnOdK-Cc.d.cts} +0 -0
- /package/dist/{render-tDjGNf6b.d.mts → render-OnOdK-Cc.d.mts} +0 -0
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as RenderOptions, r as render } from "./render-
|
|
1
|
+
import { n as RenderOptions, r as render } from "./render-OnOdK-Cc.cjs";
|
|
2
2
|
import { ContainerNode, FetchResourcesOptions, ImageNode, Node, NodeAttributes, NodeMetadata, ReactElementLike, TextNode } from "@takumi-rs/helpers";
|
|
3
|
-
import { AnimationFrameSource, AnimationOutputFormat, AnimationSceneSource, ConstructRendererOptions, DitheringAlgorithm, EncodeFramesOptions, Font, FontDetails, ImageSource, Keyframes, KeyframesMap, KeyframesRuleList, MeasuredNode, MeasuredTextRun, OutputFormat, RenderAnimationOptions } from "@takumi-rs/core";
|
|
3
|
+
import { AnimationFrameSource, AnimationOutputFormat, AnimationSceneSource, ConstructRendererOptions, DitheringAlgorithm, EncodeFramesOptions, Font, FontDetails, FontLoader, FontLoaderSync, ImageSource, ImageSourceLoader, ImageSourceLoaderSync, Keyframes, KeyframesMap, KeyframesRuleList, MeasuredNode, MeasuredTextRun, OutputFormat, RenderAnimationOptions } from "@takumi-rs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
6
|
declare module "react" {
|
|
@@ -9,4 +9,4 @@ declare module "react" {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
|
-
export { type AnimationFrameSource, type AnimationOutputFormat, type AnimationSceneSource, type ConstructRendererOptions, type ContainerNode, type DitheringAlgorithm, type EncodeFramesOptions, type FetchResourcesOptions, type Font, type FontDetails, type ImageNode, type ImageSource, type Keyframes, type KeyframesMap, type KeyframesRuleList, type MeasuredNode, type MeasuredTextRun, type Node, type NodeAttributes, type NodeMetadata, type OutputFormat, type ReactElementLike, type RenderAnimationOptions, type RenderOptions, type TextNode, render };
|
|
12
|
+
export { type AnimationFrameSource, type AnimationOutputFormat, type AnimationSceneSource, type ConstructRendererOptions, type ContainerNode, type DitheringAlgorithm, type EncodeFramesOptions, type FetchResourcesOptions, type Font, type FontDetails, type FontLoader, type FontLoaderSync, type ImageNode, type ImageSource, type ImageSourceLoader, type ImageSourceLoaderSync, type Keyframes, type KeyframesMap, type KeyframesRuleList, type MeasuredNode, type MeasuredTextRun, type Node, type NodeAttributes, type NodeMetadata, type OutputFormat, type ReactElementLike, type RenderAnimationOptions, type RenderOptions, type TextNode, render };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { n as RenderOptions, r as render } from "./render-
|
|
1
|
+
import { n as RenderOptions, r as render } from "./render-OnOdK-Cc.mjs";
|
|
2
2
|
import { ContainerNode, FetchResourcesOptions, ImageNode, Node, NodeAttributes, NodeMetadata, ReactElementLike, TextNode } from "@takumi-rs/helpers";
|
|
3
|
-
import { AnimationFrameSource, AnimationOutputFormat, AnimationSceneSource, ConstructRendererOptions, DitheringAlgorithm, EncodeFramesOptions, Font, FontDetails, ImageSource, Keyframes, KeyframesMap, KeyframesRuleList, MeasuredNode, MeasuredTextRun, OutputFormat, RenderAnimationOptions } from "@takumi-rs/core";
|
|
3
|
+
import { AnimationFrameSource, AnimationOutputFormat, AnimationSceneSource, ConstructRendererOptions, DitheringAlgorithm, EncodeFramesOptions, Font, FontDetails, FontLoader, FontLoaderSync, ImageSource, ImageSourceLoader, ImageSourceLoaderSync, Keyframes, KeyframesMap, KeyframesRuleList, MeasuredNode, MeasuredTextRun, OutputFormat, RenderAnimationOptions } from "@takumi-rs/core";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
6
|
declare module "react" {
|
|
@@ -9,4 +9,4 @@ declare module "react" {
|
|
|
9
9
|
}
|
|
10
10
|
}
|
|
11
11
|
//#endregion
|
|
12
|
-
export { type AnimationFrameSource, type AnimationOutputFormat, type AnimationSceneSource, type ConstructRendererOptions, type ContainerNode, type DitheringAlgorithm, type EncodeFramesOptions, type FetchResourcesOptions, type Font, type FontDetails, type ImageNode, type ImageSource, type Keyframes, type KeyframesMap, type KeyframesRuleList, type MeasuredNode, type MeasuredTextRun, type Node, type NodeAttributes, type NodeMetadata, type OutputFormat, type ReactElementLike, type RenderAnimationOptions, type RenderOptions, type TextNode, render };
|
|
12
|
+
export { type AnimationFrameSource, type AnimationOutputFormat, type AnimationSceneSource, type ConstructRendererOptions, type ContainerNode, type DitheringAlgorithm, type EncodeFramesOptions, type FetchResourcesOptions, type Font, type FontDetails, type FontLoader, type FontLoaderSync, type ImageNode, type ImageSource, type ImageSourceLoader, type ImageSourceLoaderSync, type Keyframes, type KeyframesMap, type KeyframesRuleList, type MeasuredNode, type MeasuredTextRun, type Node, type NodeAttributes, type NodeMetadata, type OutputFormat, type ReactElementLike, type RenderAnimationOptions, type RenderOptions, type TextNode, render };
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as render } from "./render-
|
|
1
|
+
import { t as render } from "./render-DM24DsDc.mjs";
|
|
2
2
|
export { render };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
require("./wasm.cjs");
|
|
2
1
|
let _takumi_rs_helpers_emoji = require("@takumi-rs/helpers/emoji");
|
|
3
2
|
let _takumi_rs_helpers = require("@takumi-rs/helpers");
|
|
4
3
|
let _takumi_rs_helpers_jsx = require("@takumi-rs/helpers/jsx");
|
|
@@ -76,6 +75,7 @@ function shouldSkipCoreImport() {
|
|
|
76
75
|
if (typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers") return true;
|
|
77
76
|
if ("WebSocketPair" in globalThis) return true;
|
|
78
77
|
if ("EdgeRuntime" in globalThis) return true;
|
|
78
|
+
if ("Deno" in globalThis) return true;
|
|
79
79
|
const maybeWorkerGlobalScope = globalThis.WorkerGlobalScope;
|
|
80
80
|
if (maybeWorkerGlobalScope !== void 0 && maybeWorkerGlobalScope.prototype.isPrototypeOf(globalThis)) return true;
|
|
81
81
|
return false;
|
|
@@ -119,6 +119,7 @@ async function transformElement(element, options) {
|
|
|
119
119
|
* @returns A promise that resolves to the rendered image data (Buffer/Uint8Array).
|
|
120
120
|
*/
|
|
121
121
|
async function render(element, options) {
|
|
122
|
+
options?.signal?.throwIfAborted();
|
|
122
123
|
const imports = await getImports(options && "module" in options ? options.module : void 0);
|
|
123
124
|
const isExternalRenderer = options && "renderer" in options;
|
|
124
125
|
const renderer = isExternalRenderer ? options.renderer : globalRenderer ??= new imports.Renderer({ loadDefaultFonts: options?.loadDefaultFonts });
|
|
@@ -132,6 +133,7 @@ async function render(element, options) {
|
|
|
132
133
|
fetchedResources,
|
|
133
134
|
stylesheets: [...options?.stylesheets ?? [], ...stylesheets]
|
|
134
135
|
};
|
|
136
|
+
options?.signal?.throwIfAborted();
|
|
135
137
|
return renderer.render(node, renderOptions, options?.signal);
|
|
136
138
|
}
|
|
137
139
|
//#endregion
|
|
@@ -75,6 +75,7 @@ function shouldSkipCoreImport() {
|
|
|
75
75
|
if (typeof navigator !== "undefined" && navigator.userAgent === "Cloudflare-Workers") return true;
|
|
76
76
|
if ("WebSocketPair" in globalThis) return true;
|
|
77
77
|
if ("EdgeRuntime" in globalThis) return true;
|
|
78
|
+
if ("Deno" in globalThis) return true;
|
|
78
79
|
const maybeWorkerGlobalScope = globalThis.WorkerGlobalScope;
|
|
79
80
|
if (maybeWorkerGlobalScope !== void 0 && maybeWorkerGlobalScope.prototype.isPrototypeOf(globalThis)) return true;
|
|
80
81
|
return false;
|
|
@@ -118,6 +119,7 @@ async function transformElement(element, options) {
|
|
|
118
119
|
* @returns A promise that resolves to the rendered image data (Buffer/Uint8Array).
|
|
119
120
|
*/
|
|
120
121
|
async function render(element, options) {
|
|
122
|
+
options?.signal?.throwIfAborted();
|
|
121
123
|
const imports = await getImports(options && "module" in options ? options.module : void 0);
|
|
122
124
|
const isExternalRenderer = options && "renderer" in options;
|
|
123
125
|
const renderer = isExternalRenderer ? options.renderer : globalRenderer ??= new imports.Renderer({ loadDefaultFonts: options?.loadDefaultFonts });
|
|
@@ -131,6 +133,7 @@ async function render(element, options) {
|
|
|
131
133
|
fetchedResources,
|
|
132
134
|
stylesheets: [...options?.stylesheets ?? [], ...stylesheets]
|
|
133
135
|
};
|
|
136
|
+
options?.signal?.throwIfAborted();
|
|
134
137
|
return renderer.render(node, renderOptions, options?.signal);
|
|
135
138
|
}
|
|
136
139
|
//#endregion
|
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-
|
|
5
|
+
const require_render = require("./render-B9hqbnWb.cjs");
|
|
6
6
|
//#region src/response/index.ts
|
|
7
7
|
function mergeOptions(defaultOptions, options) {
|
|
8
8
|
if (!defaultOptions) return options;
|
package/dist/response.d.cts
CHANGED
package/dist/response.d.mts
CHANGED
package/dist/response.mjs
CHANGED
package/dist/wasm.cjs
CHANGED
|
@@ -28,7 +28,6 @@ let _takumi_rs_wasm_auto = require("@takumi-rs/wasm/auto");
|
|
|
28
28
|
_takumi_rs_wasm_auto = __toESM(_takumi_rs_wasm_auto, 1);
|
|
29
29
|
let _takumi_rs_wasm = require("@takumi-rs/wasm");
|
|
30
30
|
_takumi_rs_wasm = __toESM(_takumi_rs_wasm, 1);
|
|
31
|
-
exports.__toESM = __toESM;
|
|
32
31
|
Object.defineProperty(exports, "default", {
|
|
33
32
|
enumerable: true,
|
|
34
33
|
get: function() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "takumi-js",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "All-in-one Takumi package for Node.js and WebAssembly runtimes.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -96,14 +96,14 @@
|
|
|
96
96
|
"test:bundlers": "bun test tests/bundlers.test.ts"
|
|
97
97
|
},
|
|
98
98
|
"dependencies": {
|
|
99
|
-
"@takumi-rs/core": "1.
|
|
100
|
-
"@takumi-rs/helpers": "1.
|
|
101
|
-
"@takumi-rs/wasm": "1.
|
|
99
|
+
"@takumi-rs/core": "1.7.0",
|
|
100
|
+
"@takumi-rs/helpers": "1.7.0",
|
|
101
|
+
"@takumi-rs/wasm": "1.7.0"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
104
|
"@types/bun": "catalog:",
|
|
105
|
-
"@types/react": "^19.2.
|
|
106
|
-
"react": "^19.2.
|
|
105
|
+
"@types/react": "^19.2.16",
|
|
106
|
+
"react": "^19.2.7",
|
|
107
107
|
"tsdown": "catalog:",
|
|
108
108
|
"unrun": "catalog:"
|
|
109
109
|
}
|
|
File without changes
|
|
File without changes
|