@paged-media/idml-viewer 0.48.0 → 0.61.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/idml-viewer",
3
- "version": "0.48.0",
3
+ "version": "0.61.0",
4
4
  "description": "Standalone IDML viewer for the browser — camera, pages, input and events over the @paged-media/sdk WebGPU ViewerSession.",
5
5
  "license": "MPL-2.0 OR LicenseRef-PMEL",
6
6
  "repository": {
@@ -23,6 +23,18 @@ export type SceneBlendMode = "multiply" | "screen" | "overlay" | "darken" | "lig
23
23
  */
24
24
  export type SceneGradient = { type: "linear"; x0: number; y0: number; x1: number; y1: number; stops: SceneGradientStop[] } | { type: "radial"; cx: number; cy: number; radius: number; stops: SceneGradientStop[] } | { type: "sweep"; cx: number; cy: number; start_angle: number; stops: SceneGradientStop[] };
25
25
 
26
+ /**
27
+ * A plugin-submitted pixel layer: a set of independently-positioned RGBA8
28
+ * tiles to composite INSIDE a frame during an interactive gesture. All
29
+ * coordinates are frame-content points (the same space as
30
+ * [`SceneLayer`]); core applies the frame transform + content-box clip at
31
+ * compose time. Ephemeral — re-streamed per drag, never a document
32
+ * mutation.
33
+ */
34
+ export interface PixelLayer {
35
+ tiles: PixelTile[];
36
+ }
37
+
26
38
  /**
27
39
  * A plugin-submitted vector layer in frame-content coordinates. Keyed
28
40
  * (on the wire) by the host element id of the frame it renders into.
@@ -83,6 +95,23 @@ export interface PagesLayout {
83
95
  pages: PageRect[];
84
96
  }
85
97
 
98
+ /**
99
+ * One RGBA8 tile of a [`PixelLayer`]. `rgba` is tightly packed
100
+ * (`width*height*4`, row-major); the tile is placed at the `(x, y)`
101
+ * frame-content point with display size `(w, h)` points. A malformed tile
102
+ * (length ≠ `width*height*4`, or a zero-area buffer/dest) lowers to
103
+ * nothing, never a panic — identical to the `SceneItem::Image` contract.
104
+ */
105
+ export interface PixelTile {
106
+ rgba: number[];
107
+ width: number;
108
+ height: number;
109
+ x: number;
110
+ y: number;
111
+ w: number;
112
+ h: number;
113
+ }
114
+
86
115
  /**
87
116
  * One colour stop in a [`SceneGradient`]. `offset` is `0.0..=1.0` along
88
117
  * the gradient axis; the colour is sRGB (linearised at lowering).
package/wasm/paged_sdk.js CHANGED
@@ -1348,12 +1348,12 @@ function __wbg_get_imports() {
1348
1348
  arg0.writeTexture(arg1, getArrayU8FromWasm0(arg2, arg3), arg4, arg5);
1349
1349
  }, arguments); },
1350
1350
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
1351
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1719, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1351
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1720, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1352
1352
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h0cde11723d429dba);
1353
1353
  return ret;
1354
1354
  },
1355
1355
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
1356
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 235, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1356
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 285, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1357
1357
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h9534aa66f81a191a);
1358
1358
  return ret;
1359
1359
  },
Binary file