takumi-js 2.0.1 → 2.0.2

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,5 +1,4 @@
1
- import { t as LoadBackend } from "../types-BQoM2g3W.cjs";
2
-
1
+ import { t as LoadBackend } from "../types-BRKMNBAj.cjs";
3
2
  //#region src/backend/node.d.ts
4
3
  declare const loadBackend: LoadBackend;
5
4
  //#endregion
@@ -1,5 +1,4 @@
1
- import { t as LoadBackend } from "../types-BQoM2g3W.mjs";
2
-
1
+ import { t as LoadBackend } from "../types-BRKMNBAj.mjs";
3
2
  //#region src/backend/node.d.ts
4
3
  declare const loadBackend: LoadBackend;
5
4
  //#endregion
@@ -1,5 +1,4 @@
1
- import { t as LoadBackend } from "../types-BQoM2g3W.cjs";
2
-
1
+ import { t as LoadBackend } from "../types-BRKMNBAj.cjs";
3
2
  //#region src/backend/wasm.d.ts
4
3
  declare const loadBackend: LoadBackend;
5
4
  //#endregion
@@ -1,5 +1,4 @@
1
- import { t as LoadBackend } from "../types-BQoM2g3W.mjs";
2
-
1
+ import { t as LoadBackend } from "../types-BRKMNBAj.mjs";
3
2
  //#region src/backend/wasm.d.ts
4
3
  declare const loadBackend: LoadBackend;
5
4
  //#endregion
package/dist/index.d.cts CHANGED
@@ -1,7 +1,6 @@
1
- import { a as RenderOptions, c as renderAnimation, i as RenderInput, l as renderSvg, n as ImagesInput, o as RenderSvgOptions, r as RenderAnimationOptions, s as render, t as AnimationScene } from "./render-Dl2tI2sa.cjs";
1
+ import { a as RenderOptions, c as renderAnimation, i as RenderInput, l as renderSvg, n as ImagesInput, o as RenderSvgOptions, r as RenderAnimationOptions, s as render, t as AnimationScene } from "./render-sRfulirT.cjs";
2
2
  import { AnimationOutputFormat, DitheringAlgorithm, Font, FontDetails, FontLoader, ImageSource, Keyframes, KeyframesMap, KeyframesRuleList, MeasuredNode, MeasuredTextRun, OutputFormat } from "@takumi-rs/core";
3
3
  import { ContainerNode, FetchOptions, ImageNode, Node, NodeAttributes, NodeMetadata, ReactElementLike, TextNode } from "@takumi-rs/helpers";
4
-
5
4
  //#region src/index.d.ts
6
5
  declare module "react" {
7
6
  interface DOMAttributes<T> {
package/dist/index.d.mts CHANGED
@@ -1,7 +1,6 @@
1
- import { a as RenderOptions, c as renderAnimation, i as RenderInput, l as renderSvg, n as ImagesInput, o as RenderSvgOptions, r as RenderAnimationOptions, s as render, t as AnimationScene } from "./render-ZztpvN2e.mjs";
1
+ import { a as RenderOptions, c as renderAnimation, i as RenderInput, l as renderSvg, n as ImagesInput, o as RenderSvgOptions, r as RenderAnimationOptions, s as render, t as AnimationScene } from "./render-Cb_LVX55.mjs";
2
2
  import { ContainerNode, FetchOptions, ImageNode, Node, NodeAttributes, NodeMetadata, ReactElementLike, TextNode } from "@takumi-rs/helpers";
3
3
  import { AnimationOutputFormat, DitheringAlgorithm, Font, FontDetails, FontLoader, ImageSource, Keyframes, KeyframesMap, KeyframesRuleList, MeasuredNode, MeasuredTextRun, OutputFormat } from "@takumi-rs/core";
4
-
5
4
  //#region src/index.d.ts
6
5
  declare module "react" {
7
6
  interface DOMAttributes<T> {
@@ -1,10 +1,9 @@
1
- import * as napi from "@takumi-rs/core";
2
- import * as wasm from "@takumi-rs/wasm";
3
1
  import { EmojiType } from "@takumi-rs/helpers/emoji";
4
2
  import { FetchOptions, ImageFetchCache, Node, ReactElementLike } from "@takumi-rs/helpers";
5
3
  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
-
8
7
  //#region src/render.d.ts
9
8
  type Renderer = napi.Renderer | wasm.Renderer;
10
9
  type ImageLoader = napi.ImageLoader | wasm.ImageLoader;
@@ -13,8 +12,11 @@ type ImageLoader = napi.ImageLoader | wasm.ImageLoader;
13
12
  * (and emoji glyphs) are fetched and cached.
14
13
  */
15
14
  type ImagesInput = ImageLoader[] | (FetchOptions & {
16
- /** Pre-fetched entries, same as the array form. */sources?: ImageLoader[]; /** Single-flight byte cache shared across renders. */
17
- fetchCache?: ImageFetchCache; /** Decode-cache default for every image this render; a source's own `cache` wins. */
15
+ /** Pre-fetched entries, same as the array form. */
16
+ sources?: ImageLoader[];
17
+ /** Single-flight byte cache shared across renders. */
18
+ fetchCache?: ImageFetchCache;
19
+ /** Decode-cache default for every image this render; a source's own `cache` wins. */
18
20
  cache?: NonNullable<ImageLoader["cache"]>;
19
21
  });
20
22
  /** The managed-renderer plumbing shared by every entry point. */
@@ -55,10 +57,12 @@ type RenderOptions = Managed<InnerRenderOptions>;
55
57
  type RenderSvgOptions = Managed<InnerSvgRenderOptions>;
56
58
  /** A single animation scene whose content is any renderable input. */
57
59
  type AnimationScene = Omit<napi.AnimationScene, "node"> & {
58
- /** The content to render for this scene: JSX, an HTML string, or a node tree. */node: RenderInput;
60
+ /** The content to render for this scene: JSX, an HTML string, or a node tree. */
61
+ node: RenderInput;
59
62
  };
60
63
  type RenderAnimationOptions = Managed<DistributiveOmit<InnerRenderAnimationOptions, "scenes"> & {
61
- /** The scenes to render sequentially. */scenes: AnimationScene[];
64
+ /** The scenes to render sequentially. */
65
+ scenes: AnimationScene[];
62
66
  }>;
63
67
  type RenderInput = ReactNode | ReactElementLike | Node | string;
64
68
  /**
@@ -1,10 +1,9 @@
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 { FetchOptions, ImageFetchCache, 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
-
8
7
  //#region src/render.d.ts
9
8
  type Renderer = napi.Renderer | wasm.Renderer;
10
9
  type ImageLoader = napi.ImageLoader | wasm.ImageLoader;
@@ -13,8 +12,11 @@ type ImageLoader = napi.ImageLoader | wasm.ImageLoader;
13
12
  * (and emoji glyphs) are fetched and cached.
14
13
  */
15
14
  type ImagesInput = ImageLoader[] | (FetchOptions & {
16
- /** Pre-fetched entries, same as the array form. */sources?: ImageLoader[]; /** Single-flight byte cache shared across renders. */
17
- fetchCache?: ImageFetchCache; /** Decode-cache default for every image this render; a source's own `cache` wins. */
15
+ /** Pre-fetched entries, same as the array form. */
16
+ sources?: ImageLoader[];
17
+ /** Single-flight byte cache shared across renders. */
18
+ fetchCache?: ImageFetchCache;
19
+ /** Decode-cache default for every image this render; a source's own `cache` wins. */
18
20
  cache?: NonNullable<ImageLoader["cache"]>;
19
21
  });
20
22
  /** The managed-renderer plumbing shared by every entry point. */
@@ -55,10 +57,12 @@ type RenderOptions = Managed<InnerRenderOptions>;
55
57
  type RenderSvgOptions = Managed<InnerSvgRenderOptions>;
56
58
  /** A single animation scene whose content is any renderable input. */
57
59
  type AnimationScene = Omit<napi.AnimationScene, "node"> & {
58
- /** The content to render for this scene: JSX, an HTML string, or a node tree. */node: RenderInput;
60
+ /** The content to render for this scene: JSX, an HTML string, or a node tree. */
61
+ node: RenderInput;
59
62
  };
60
63
  type RenderAnimationOptions = Managed<DistributiveOmit<InnerRenderAnimationOptions, "scenes"> & {
61
- /** The scenes to render sequentially. */scenes: AnimationScene[];
64
+ /** The scenes to render sequentially. */
65
+ scenes: AnimationScene[];
62
66
  }>;
63
67
  type RenderInput = ReactNode | ReactElementLike | Node | string;
64
68
  /**
@@ -1,5 +1,4 @@
1
- import { a as RenderOptions, i as RenderInput } from "./render-Dl2tI2sa.cjs";
2
-
1
+ import { a as RenderOptions, i as RenderInput } from "./render-sRfulirT.cjs";
3
2
  //#region src/response/index.d.ts
4
3
  type ImageResponseResult = Response & {
5
4
  readonly ready: Promise<void>;
@@ -1,5 +1,4 @@
1
- import { a as RenderOptions, i as RenderInput } from "./render-ZztpvN2e.mjs";
2
-
1
+ import { a as RenderOptions, i as RenderInput } from "./render-Cb_LVX55.mjs";
3
2
  //#region src/response/index.d.ts
4
3
  type ImageResponseResult = Response & {
5
4
  readonly ready: Promise<void>;
@@ -1,6 +1,5 @@
1
1
  import * as napi from "@takumi-rs/core";
2
2
  import * as wasm from "@takumi-rs/wasm";
3
-
4
3
  //#region src/backend/types.d.ts
5
4
  /** The bindings namespace, whichever backend the import conditions selected. */
6
5
  type Backend = typeof napi | typeof wasm;
@@ -1,6 +1,5 @@
1
1
  import * as napi from "@takumi-rs/core";
2
2
  import * as wasm from "@takumi-rs/wasm";
3
-
4
3
  //#region src/backend/types.d.ts
5
4
  /** The bindings namespace, whichever backend the import conditions selected. */
6
5
  type Backend = typeof napi | typeof wasm;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "takumi-js",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "All-in-one Takumi package for Node.js and WebAssembly runtimes.",
5
5
  "keywords": [
6
6
  "css",
@@ -202,15 +202,15 @@
202
202
  "publish-lint": "attw --pack . && publint --strict ."
203
203
  },
204
204
  "dependencies": {
205
- "@takumi-rs/core": "2.0.1",
206
- "@takumi-rs/helpers": "2.0.1",
207
- "@takumi-rs/wasm": "2.0.1"
205
+ "@takumi-rs/core": "2.0.2",
206
+ "@takumi-rs/helpers": "2.0.2",
207
+ "@takumi-rs/wasm": "2.0.2"
208
208
  },
209
209
  "devDependencies": {
210
210
  "@types/bun": "^1.3.14",
211
211
  "@types/react": "^19.2.17",
212
212
  "react": "^19.2.7",
213
- "tsdown": "^0.22.3",
213
+ "tsdown": "^0.22.4",
214
214
  "unrun": "^0.3.1"
215
215
  },
216
216
  "engines": {