@paged-media/introspect-wasm 0.39.0 → 0.42.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paged-media/introspect-wasm",
3
- "version": "0.39.0",
3
+ "version": "0.42.0",
4
4
  "type": "module",
5
5
  "main": "paged_introspect_wasm.js",
6
6
  "types": "paged_introspect_wasm.d.ts",
@@ -13,6 +13,34 @@ export interface SceneLayer {
13
13
  items: SceneItem[];
14
14
  }
15
15
 
16
+ /**
17
+ * A single-line text run in frame-content coordinates (C-1.1).
18
+ */
19
+ export interface SceneTextItem {
20
+ /**
21
+ * Baseline origin x in frame-content points.
22
+ */
23
+ x: number;
24
+ /**
25
+ * Baseline origin y in frame-content points (the text baseline).
26
+ */
27
+ y: number;
28
+ /**
29
+ * The run\'s text (single line — newlines are not laid out).
30
+ */
31
+ text: string;
32
+ /**
33
+ * Point size.
34
+ */
35
+ size: number;
36
+ paint: ScenePaint;
37
+ /**
38
+ * Reserved face hints (v1 renders in the document default font).
39
+ */
40
+ family?: string;
41
+ style?: string;
42
+ }
43
+
16
44
  /**
17
45
  * A solid paint in **sRGB** (0..=1 per channel; alpha is linear). Core
18
46
  * converts to the display list\'s linear-light [`Color`] so plugin
@@ -123,7 +151,7 @@ export interface InvalidationHint {
123
151
  /**
124
152
  * One drawable in a [`SceneLayer`]. Coordinates are frame-content points.
125
153
  */
126
- export type SceneItem = { kind: "fillPath"; path: ScenePathSeg[]; paint: ScenePaint } | { kind: "strokePath"; path: ScenePathSeg[]; paint: ScenePaint; width: number };
154
+ export type SceneItem = { kind: "fillPath"; path: ScenePathSeg[]; paint: ScenePaint } | { kind: "strokePath"; path: ScenePathSeg[]; paint: ScenePaint; width: number } | ({ kind: "text" } & SceneTextItem) | { kind: "image"; rgba: number[]; width: number; height: number; x: number; y: number; w: number; h: number };
127
155
 
128
156
  /**
129
157
  * One stop of a gradient on the wire. Mirrors `GradientStopRef`.
Binary file