@docmentis/udoc-viewer 0.7.11 → 0.7.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.
Files changed (49) hide show
  1. package/dist/package.json +1 -1
  2. package/dist/src/UDocClient.d.ts +13 -0
  3. package/dist/src/UDocClient.d.ts.map +1 -1
  4. package/dist/src/UDocClient.js +1 -1
  5. package/dist/src/UDocClient.js.map +1 -1
  6. package/dist/src/UDocViewer.d.ts.map +1 -1
  7. package/dist/src/UDocViewer.js +3 -1
  8. package/dist/src/UDocViewer.js.map +1 -1
  9. package/dist/src/ui/viewer/animation-presets.d.ts +37 -0
  10. package/dist/src/ui/viewer/animation-presets.d.ts.map +1 -0
  11. package/dist/src/ui/viewer/animation-presets.js +123 -0
  12. package/dist/src/ui/viewer/animation-presets.js.map +1 -0
  13. package/dist/src/ui/viewer/animation.d.ts +162 -0
  14. package/dist/src/ui/viewer/animation.d.ts.map +1 -0
  15. package/dist/src/ui/viewer/animation.js +506 -0
  16. package/dist/src/ui/viewer/animation.js.map +1 -0
  17. package/dist/src/ui/viewer/components/Spread.d.ts +6 -0
  18. package/dist/src/ui/viewer/components/Spread.d.ts.map +1 -1
  19. package/dist/src/ui/viewer/components/Spread.js +41 -0
  20. package/dist/src/ui/viewer/components/Spread.js.map +1 -1
  21. package/dist/src/ui/viewer/components/Toolbar.d.ts.map +1 -1
  22. package/dist/src/ui/viewer/components/Toolbar.js +4 -0
  23. package/dist/src/ui/viewer/components/Toolbar.js.map +1 -1
  24. package/dist/src/ui/viewer/components/Viewport.d.ts.map +1 -1
  25. package/dist/src/ui/viewer/components/Viewport.js +113 -3
  26. package/dist/src/ui/viewer/components/Viewport.js.map +1 -1
  27. package/dist/src/ui/viewer/effects.d.ts.map +1 -1
  28. package/dist/src/ui/viewer/effects.js +116 -12
  29. package/dist/src/ui/viewer/effects.js.map +1 -1
  30. package/dist/src/ui/viewer/state.d.ts +2 -0
  31. package/dist/src/ui/viewer/state.d.ts.map +1 -1
  32. package/dist/src/ui/viewer/state.js +1 -0
  33. package/dist/src/ui/viewer/state.js.map +1 -1
  34. package/dist/src/wasm/udoc.d.ts +150 -3
  35. package/dist/src/wasm/udoc.js +84 -12
  36. package/dist/src/wasm/udoc_bg.wasm +0 -0
  37. package/dist/src/wasm/udoc_bg.wasm.d.ts +5 -3
  38. package/dist/src/worker/WorkerClient.d.ts +18 -2
  39. package/dist/src/worker/WorkerClient.d.ts.map +1 -1
  40. package/dist/src/worker/WorkerClient.js +27 -0
  41. package/dist/src/worker/WorkerClient.js.map +1 -1
  42. package/dist/src/worker/index.d.ts +1 -1
  43. package/dist/src/worker/index.d.ts.map +1 -1
  44. package/dist/src/worker/worker-inline.js +1 -1
  45. package/dist/src/worker/worker.d.ts +28 -2
  46. package/dist/src/worker/worker.d.ts.map +1 -1
  47. package/dist/src/worker/worker.js +103 -10
  48. package/dist/src/worker/worker.js.map +1 -1
  49. package/package.json +1 -1
@@ -54,6 +54,63 @@ export interface JsRect {
54
54
  height: number;
55
55
  }
56
56
 
57
+ /**
58
+ * A single effect applied to one target.
59
+ */
60
+ export interface JsAnimationEffect {
61
+ /**
62
+ * The shape whose layers this effect animates.
63
+ */
64
+ shapeKey: number;
65
+ /**
66
+ * What part of the shape the effect covers.
67
+ */
68
+ target: JsAnimationTarget;
69
+ class: JsEffectClass;
70
+ /**
71
+ * What the effect\'s behaviors do, as described by the file itself.
72
+ * Prefer this over the preset ids, which are an opaque catalog.
73
+ */
74
+ behavior?: JsEffectBehavior;
75
+ /**
76
+ * PowerPoint preset id, for the viewer\'s effect catalog.
77
+ */
78
+ presetId?: number;
79
+ /**
80
+ * PowerPoint preset subtype, usually a direction or variant.
81
+ */
82
+ presetSubtype?: number;
83
+ /**
84
+ * Start offset from the beginning of the step, in milliseconds.
85
+ */
86
+ startMs: number;
87
+ durationMs: number;
88
+ /**
89
+ * Iterations to play, or `null` to repeat until the step is left.
90
+ */
91
+ repeatCount: number | undefined;
92
+ /**
93
+ * Fraction of the duration spent easing in, 0–1.
94
+ */
95
+ accelerate: number;
96
+ /**
97
+ * Fraction of the duration spent easing out, 0–1.
98
+ */
99
+ decelerate: number;
100
+ autoReverse: boolean;
101
+ }
102
+
103
+ /**
104
+ * A slide\'s build sequence: one entry in `steps` per click.
105
+ */
106
+ export interface JsSlideAnimation {
107
+ steps: JsAnimationStep[];
108
+ /**
109
+ * Time-tree constructs recognized but not represented, for diagnostics.
110
+ */
111
+ skipped: string[];
112
+ }
113
+
57
114
  /**
58
115
  * Annotation for JavaScript serialization.
59
116
  */
@@ -104,6 +161,22 @@ export interface JsDestination {
104
161
  display: JsDestinationDisplay;
105
162
  }
106
163
 
164
+ /**
165
+ * Effect category, which determines the target\'s resting state.
166
+ */
167
+ export type JsEffectClass = "entrance" | "exit" | "emphasis" | "motionPath" | "verb" | "mediaCall";
168
+
169
+ /**
170
+ * Everything one click sets in motion.
171
+ */
172
+ export interface JsAnimationStep {
173
+ effects: JsAnimationEffect[];
174
+ /**
175
+ * How long the whole step runs, in milliseconds.
176
+ */
177
+ durationMs: number;
178
+ }
179
+
107
180
  /**
108
181
  * Extracted font info for JavaScript.
109
182
  */
@@ -198,6 +271,38 @@ export interface JsMarkupMetadata {
198
271
  */
199
272
  export type JsCompositions = JsPick[][];
200
273
 
274
+ /**
275
+ * One layer of a page, rasterized on its own so it can be animated.
276
+ *
277
+ * Layers arrive back-to-front; drawing them in order at `(x, y)` over a
278
+ * transparent surface reproduces the full page.
279
+ */
280
+ export interface JsAnimationLayer {
281
+ /**
282
+ * The animated shape this layer belongs to, absent for static content.
283
+ * Layers sharing a key must be animated together.
284
+ */
285
+ shapeKey?: number;
286
+ /**
287
+ * Left edge of the cropped raster within the page, in device pixels.
288
+ */
289
+ x: number;
290
+ /**
291
+ * Top edge of the cropped raster within the page, in device pixels.
292
+ */
293
+ y: number;
294
+ width: number;
295
+ height: number;
296
+ /**
297
+ * Premultiplied RGBA pixels, `width * height * 4` bytes long.
298
+ *
299
+ * Serialized as bytes rather than a plain `Vec`, so this crosses into JS
300
+ * as a `Uint8Array` whose buffer the worker can transfer. A layer raster
301
+ * is megabytes; a number array would be ruinous.
302
+ */
303
+ rgba: Uint8Array;
304
+ }
305
+
201
306
  /**
202
307
  * Outline item for JavaScript serialization.
203
308
  */
@@ -402,9 +507,27 @@ export interface JsVisibilityGroup {
402
507
  locked: boolean;
403
508
  }
404
509
 
510
+ /**
511
+ * What an effect\'s behaviors do (discriminated union tagged by `type`).
512
+ */
513
+ export type JsEffectBehavior = { type: "instant" } | { type: "filter"; name: string; option: string | undefined } | { type: "move" } | { type: "scale" } | { type: "rotate" } | { type: "color" };
514
+
515
+ /**
516
+ * What part of a shape an effect covers (discriminated union tagged by `type`).
517
+ */
518
+ export type JsAnimationTarget = { type: "shape" } | { type: "background" } | { type: "paragraphs"; start: number; end: number };
519
+
405
520
  export interface JsLayoutFrame {
406
521
  transform: JsTransform;
407
522
  parcel?: JsLayoutParcel;
523
+ /**
524
+ * Source shape that produced this frame (PPTX `cNvPr/@id`).
525
+ *
526
+ * Lets the viewer line up a frame\'s text layout with the animation
527
+ * layer for the same shape, which is how paragraph builds find the
528
+ * band to clip.
529
+ */
530
+ shapeKey?: number;
408
531
  }
409
532
 
410
533
  export interface JsLayoutGlyph {
@@ -982,6 +1105,19 @@ export class Wasm {
982
1105
  * or if rendering fails.
983
1106
  */
984
1107
  render_page_gpu(id: string, page_index: number, width: number, height: number): Promise<Uint8Array>;
1108
+ /**
1109
+ * Render a page as separate animation layers, back-to-front.
1110
+ *
1111
+ * Each animated shape gets its own layer and each run of static frames
1112
+ * between them gets another, so drawing the layers in order reproduces
1113
+ * the page exactly while leaving each animated shape independently
1114
+ * transformable. Rasters are cropped to their content; `x` and `y` give
1115
+ * the offset within the page.
1116
+ *
1117
+ * Returns `undefined` when the page has no animations — render it with
1118
+ * `render_page_to_rgba` instead.
1119
+ */
1120
+ render_page_layers(id: string, page_index: number, width: number, height: number): JsAnimationLayer[] | undefined;
985
1121
  /**
986
1122
  * Render a page to PNG bytes.
987
1123
  *
@@ -1043,6 +1179,15 @@ export class Wasm {
1043
1179
  * * `distinct_id` - Anonymous UUID for per-user tracking (persisted in localStorage)
1044
1180
  */
1045
1181
  setup_telemetry(distinct_id: string): void;
1182
+ /**
1183
+ * Get the build sequence of a page (PPTX slide animations).
1184
+ *
1185
+ * Returns `undefined` for pages without animations, which is every page
1186
+ * of a PDF, DOCX or XLSX and most PPTX slides. Loading is lazy — unlike
1187
+ * transitions on `page_info`, this triggers a full page load, so call it
1188
+ * only for the page being displayed.
1189
+ */
1190
+ slide_animation(id: string, page_index: number): JsSlideAnimation | undefined;
1046
1191
  /**
1047
1192
  * Get viewer preferences embedded in the document.
1048
1193
  *
@@ -1127,15 +1272,17 @@ export interface InitOutput {
1127
1272
  readonly wasm_registerFonts: (a: number, b: number, c: number, d: number) => void;
1128
1273
  readonly wasm_remove_document: (a: number, b: number, c: number) => number;
1129
1274
  readonly wasm_render_page_gpu: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
1275
+ readonly wasm_render_page_layers: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1130
1276
  readonly wasm_render_page_to_png: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1131
1277
  readonly wasm_render_page_to_rgba: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1132
1278
  readonly wasm_set_license: (a: number, b: number, c: number) => number;
1133
1279
  readonly wasm_set_visibility_group_visible: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
1134
1280
  readonly wasm_setup_telemetry: (a: number, b: number, c: number) => void;
1281
+ readonly wasm_slide_animation: (a: number, b: number, c: number, d: number, e: number) => void;
1135
1282
  readonly wasm_viewer_preferences: (a: number, b: number, c: number, d: number) => void;
1136
- readonly __wasm_bindgen_func_elem_22923: (a: number, b: number, c: number, d: number) => void;
1137
- readonly __wasm_bindgen_func_elem_22925: (a: number, b: number, c: number, d: number) => void;
1138
- readonly __wasm_bindgen_func_elem_3585: (a: number, b: number, c: number) => void;
1283
+ readonly __wasm_bindgen_func_elem_34631: (a: number, b: number, c: number, d: number) => void;
1284
+ readonly __wasm_bindgen_func_elem_34633: (a: number, b: number, c: number, d: number) => void;
1285
+ readonly __wasm_bindgen_func_elem_3662: (a: number, b: number, c: number) => void;
1139
1286
  readonly __wbindgen_export: (a: number, b: number) => number;
1140
1287
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
1141
1288
  readonly __wbindgen_export3: (a: number) => void;
@@ -984,6 +984,46 @@ export class Wasm {
984
984
  const ret = wasm.wasm_render_page_gpu(this.__wbg_ptr, ptr0, len0, page_index, width, height);
985
985
  return takeObject(ret);
986
986
  }
987
+ /**
988
+ * Render a page as separate animation layers, back-to-front.
989
+ *
990
+ * Each animated shape gets its own layer and each run of static frames
991
+ * between them gets another, so drawing the layers in order reproduces
992
+ * the page exactly while leaving each animated shape independently
993
+ * transformable. Rasters are cropped to their content; `x` and `y` give
994
+ * the offset within the page.
995
+ *
996
+ * Returns `undefined` when the page has no animations — render it with
997
+ * `render_page_to_rgba` instead.
998
+ * @param {string} id
999
+ * @param {number} page_index
1000
+ * @param {number} width
1001
+ * @param {number} height
1002
+ * @returns {JsAnimationLayer[] | undefined}
1003
+ */
1004
+ render_page_layers(id, page_index, width, height) {
1005
+ try {
1006
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1007
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1008
+ const len0 = WASM_VECTOR_LEN;
1009
+ wasm.wasm_render_page_layers(retptr, this.__wbg_ptr, ptr0, len0, page_index, width, height);
1010
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1011
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1012
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1013
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
1014
+ if (r3) {
1015
+ throw takeObject(r2);
1016
+ }
1017
+ let v2;
1018
+ if (r0 !== 0) {
1019
+ v2 = getArrayJsValueFromWasm0(r0, r1).slice();
1020
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
1021
+ }
1022
+ return v2;
1023
+ } finally {
1024
+ wasm.__wbindgen_add_to_stack_pointer(16);
1025
+ }
1026
+ }
987
1027
  /**
988
1028
  * Render a page to PNG bytes.
989
1029
  *
@@ -1127,6 +1167,34 @@ export class Wasm {
1127
1167
  const len0 = WASM_VECTOR_LEN;
1128
1168
  wasm.wasm_setup_telemetry(this.__wbg_ptr, ptr0, len0);
1129
1169
  }
1170
+ /**
1171
+ * Get the build sequence of a page (PPTX slide animations).
1172
+ *
1173
+ * Returns `undefined` for pages without animations, which is every page
1174
+ * of a PDF, DOCX or XLSX and most PPTX slides. Loading is lazy — unlike
1175
+ * transitions on `page_info`, this triggers a full page load, so call it
1176
+ * only for the page being displayed.
1177
+ * @param {string} id
1178
+ * @param {number} page_index
1179
+ * @returns {JsSlideAnimation | undefined}
1180
+ */
1181
+ slide_animation(id, page_index) {
1182
+ try {
1183
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1184
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1185
+ const len0 = WASM_VECTOR_LEN;
1186
+ wasm.wasm_slide_animation(retptr, this.__wbg_ptr, ptr0, len0, page_index);
1187
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1188
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1189
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
1190
+ if (r2) {
1191
+ throw takeObject(r1);
1192
+ }
1193
+ return takeObject(r0);
1194
+ } finally {
1195
+ wasm.__wbindgen_add_to_stack_pointer(16);
1196
+ }
1197
+ }
1130
1198
  /**
1131
1199
  * Get viewer preferences embedded in the document.
1132
1200
  *
@@ -1426,6 +1494,10 @@ function __wbg_get_imports() {
1426
1494
  const ret = getObject(arg0).finish(getObject(arg1));
1427
1495
  return addHeapObject(ret);
1428
1496
  },
1497
+ __wbg_from_d300fe49deab18f5: function(arg0) {
1498
+ const ret = Array.from(getObject(arg0));
1499
+ return addHeapObject(ret);
1500
+ },
1429
1501
  __wbg_getDate_3d2f964145b3449d: function(arg0) {
1430
1502
  const ret = getObject(arg0).getDate();
1431
1503
  return ret;
@@ -1607,7 +1679,7 @@ function __wbg_get_imports() {
1607
1679
  const a = state0.a;
1608
1680
  state0.a = 0;
1609
1681
  try {
1610
- return __wasm_bindgen_func_elem_22925(a, state0.b, arg0, arg1);
1682
+ return __wasm_bindgen_func_elem_34633(a, state0.b, arg0, arg1);
1611
1683
  } finally {
1612
1684
  state0.a = a;
1613
1685
  }
@@ -1641,7 +1713,7 @@ function __wbg_get_imports() {
1641
1713
  const a = state0.a;
1642
1714
  state0.a = 0;
1643
1715
  try {
1644
- return __wasm_bindgen_func_elem_22925(a, state0.b, arg0, arg1);
1716
+ return __wasm_bindgen_func_elem_34633(a, state0.b, arg0, arg1);
1645
1717
  } finally {
1646
1718
  state0.a = a;
1647
1719
  }
@@ -2100,13 +2172,13 @@ function __wbg_get_imports() {
2100
2172
  getObject(arg0).writeTexture(getObject(arg1), getObject(arg2), getObject(arg3), getObject(arg4));
2101
2173
  }, arguments); },
2102
2174
  __wbindgen_cast_0000000000000001: function(arg0, arg1) {
2103
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 1884, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2104
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_22923);
2175
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 259, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2176
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3662);
2105
2177
  return addHeapObject(ret);
2106
2178
  },
2107
2179
  __wbindgen_cast_0000000000000002: function(arg0, arg1) {
2108
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 259, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
2109
- const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_3585);
2180
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 3052, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
2181
+ const ret = makeMutClosure(arg0, arg1, __wasm_bindgen_func_elem_34631);
2110
2182
  return addHeapObject(ret);
2111
2183
  },
2112
2184
  __wbindgen_cast_0000000000000003: function(arg0) {
@@ -2155,14 +2227,14 @@ function __wbg_get_imports() {
2155
2227
  };
2156
2228
  }
2157
2229
 
2158
- function __wasm_bindgen_func_elem_3585(arg0, arg1, arg2) {
2159
- wasm.__wasm_bindgen_func_elem_3585(arg0, arg1, addHeapObject(arg2));
2230
+ function __wasm_bindgen_func_elem_3662(arg0, arg1, arg2) {
2231
+ wasm.__wasm_bindgen_func_elem_3662(arg0, arg1, addHeapObject(arg2));
2160
2232
  }
2161
2233
 
2162
- function __wasm_bindgen_func_elem_22923(arg0, arg1, arg2) {
2234
+ function __wasm_bindgen_func_elem_34631(arg0, arg1, arg2) {
2163
2235
  try {
2164
2236
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2165
- wasm.__wasm_bindgen_func_elem_22923(retptr, arg0, arg1, addHeapObject(arg2));
2237
+ wasm.__wasm_bindgen_func_elem_34631(retptr, arg0, arg1, addHeapObject(arg2));
2166
2238
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
2167
2239
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
2168
2240
  if (r1) {
@@ -2173,8 +2245,8 @@ function __wasm_bindgen_func_elem_22923(arg0, arg1, arg2) {
2173
2245
  }
2174
2246
  }
2175
2247
 
2176
- function __wasm_bindgen_func_elem_22925(arg0, arg1, arg2, arg3) {
2177
- wasm.__wasm_bindgen_func_elem_22925(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
2248
+ function __wasm_bindgen_func_elem_34633(arg0, arg1, arg2, arg3) {
2249
+ wasm.__wasm_bindgen_func_elem_34633(arg0, arg1, addHeapObject(arg2), addHeapObject(arg3));
2178
2250
  }
2179
2251
 
2180
2252
 
Binary file
@@ -39,15 +39,17 @@ export const wasm_pdf_split_by_outline: (a: number, b: number, c: number, d: num
39
39
  export const wasm_registerFonts: (a: number, b: number, c: number, d: number) => void;
40
40
  export const wasm_remove_document: (a: number, b: number, c: number) => number;
41
41
  export const wasm_render_page_gpu: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
42
+ export const wasm_render_page_layers: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
42
43
  export const wasm_render_page_to_png: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
43
44
  export const wasm_render_page_to_rgba: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
44
45
  export const wasm_set_license: (a: number, b: number, c: number) => number;
45
46
  export const wasm_set_visibility_group_visible: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
46
47
  export const wasm_setup_telemetry: (a: number, b: number, c: number) => void;
48
+ export const wasm_slide_animation: (a: number, b: number, c: number, d: number, e: number) => void;
47
49
  export const wasm_viewer_preferences: (a: number, b: number, c: number, d: number) => void;
48
- export const __wasm_bindgen_func_elem_22923: (a: number, b: number, c: number, d: number) => void;
49
- export const __wasm_bindgen_func_elem_22925: (a: number, b: number, c: number, d: number) => void;
50
- export const __wasm_bindgen_func_elem_3585: (a: number, b: number, c: number) => void;
50
+ export const __wasm_bindgen_func_elem_34631: (a: number, b: number, c: number, d: number) => void;
51
+ export const __wasm_bindgen_func_elem_34633: (a: number, b: number, c: number, d: number) => void;
52
+ export const __wasm_bindgen_func_elem_3662: (a: number, b: number, c: number) => void;
51
53
  export const __wbindgen_export: (a: number, b: number) => number;
52
54
  export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
53
55
  export const __wbindgen_export3: (a: number) => void;
@@ -5,12 +5,13 @@
5
5
  * Also handles render queue, cache, and priority management.
6
6
  * This is an internal API - use UDocClient for the public SDK.
7
7
  */
8
- import type { Annotation, AnnotationsByPage, Composition, ComposePick, ExtractedFont, ExtractedImage, FontEntry, FontUsageEntry, LayoutPage, LicenseResult, OutlineItem, PageGroup, PageGroupLayout, PageTransition, OutlineSection, SplitByOutlineResult, VisibilityGroup } from "./worker.js";
9
- import type { JsOrientation as Orientation, JsSideDirection as SideDirection, JsCornerDirection as CornerDirection, JsEightDirection as EightDirection, JsInOutDirection as InOutDirection, JsTransitionEffect as TransitionEffect, JsFontSource as FontSource, JsResolvedFontInfo as ResolvedFontInfo, JsLayoutFrame as LayoutFrame, JsLayoutParcel as LayoutParcel, JsLayoutLine as LayoutLine, JsLayoutRun as LayoutRun, JsLayoutRunList as LayoutRunList, JsLayoutRunContent as LayoutRunContent, JsLayoutLineContent as LayoutLineContent, JsLayoutTable as LayoutTable, JsLayoutTableRow as LayoutTableRow, JsLayoutTableCell as LayoutTableCell, JsLayoutTableColumn as LayoutTableColumn, JsLayoutGrid as LayoutGrid, JsLayoutGridRow as LayoutGridRow, JsLayoutGridCell as LayoutGridCell, JsLayoutGridColumn as LayoutGridColumn, JsLayoutGlyph as LayoutGlyph, JsTransform as Transform } from "../wasm/udoc.js";
8
+ import type { Annotation, AnnotationsByPage, Composition, ComposePick, ExtractedFont, ExtractedImage, FontEntry, FontUsageEntry, LayoutPage, LicenseResult, OutlineItem, PageGroup, PageGroupLayout, PageTransition, OutlineSection, SplitByOutlineResult, VisibilityGroup, SlideAnimation, AnimationLayer } from "./worker.js";
9
+ import type { JsOrientation as Orientation, JsSideDirection as SideDirection, JsCornerDirection as CornerDirection, JsEightDirection as EightDirection, JsInOutDirection as InOutDirection, JsTransitionEffect as TransitionEffect, JsFontSource as FontSource, JsResolvedFontInfo as ResolvedFontInfo, JsLayoutFrame as LayoutFrame, JsLayoutParcel as LayoutParcel, JsLayoutLine as LayoutLine, JsLayoutRun as LayoutRun, JsLayoutRunList as LayoutRunList, JsLayoutRunContent as LayoutRunContent, JsLayoutLineContent as LayoutLineContent, JsLayoutTable as LayoutTable, JsLayoutTableRow as LayoutTableRow, JsLayoutTableCell as LayoutTableCell, JsLayoutTableColumn as LayoutTableColumn, JsLayoutGrid as LayoutGrid, JsLayoutGridRow as LayoutGridRow, JsLayoutGridCell as LayoutGridCell, JsLayoutGridColumn as LayoutGridColumn, JsLayoutGlyph as LayoutGlyph, JsTransform as Transform, JsAnimationStep as AnimationStep, JsAnimationEffect as AnimationEffect, JsAnimationTarget as AnimationTarget, JsEffectClass as EffectClass } from "../wasm/udoc.js";
10
10
  export type { Annotation, AnnotationsByPage, Composition, ComposePick, ExtractedFont, ExtractedImage, FontEntry, OutlineItem, OutlineSection, PageGroup, PageGroupLayout, SplitByOutlineResult, VisibilityGroup, };
11
11
  export type { LicenseResult };
12
12
  export type { Orientation, SideDirection, CornerDirection, EightDirection, InOutDirection, TransitionEffect, PageTransition, };
13
13
  export type { FontSource, ResolvedFontInfo, FontUsageEntry };
14
+ export type { SlideAnimation, AnimationLayer, AnimationStep, AnimationEffect, AnimationTarget, EffectClass };
14
15
  export type { LayoutPage, LayoutFrame, LayoutParcel, LayoutLine, LayoutRun, LayoutRunList, LayoutRunContent, LayoutLineContent, LayoutTable, LayoutTableRow, LayoutTableCell, LayoutTableColumn, LayoutGrid, LayoutGridRow, LayoutGridCell, LayoutGridColumn, LayoutGlyph, Transform, };
15
16
  /**
16
17
  * Font information extracted from raw font binary data.
@@ -225,6 +226,21 @@ export declare class WorkerClient {
225
226
  * Routed through the unified work queue so renders take priority.
226
227
  */
227
228
  getLayoutPage(documentId: string, pageIndex: number): Promise<LayoutPage>;
229
+ /**
230
+ * Get the build sequence of a slide, or `undefined` if it has none.
231
+ *
232
+ * Sent directly rather than through the work queue: the timeline is small
233
+ * metadata and the viewer needs it before it can decide whether the page
234
+ * even requires layered rendering.
235
+ */
236
+ getSlideAnimation(documentId: string, pageIndex: number): Promise<SlideAnimation | undefined>;
237
+ /**
238
+ * Render a page as independently animatable layers, back-to-front.
239
+ *
240
+ * Returns `undefined` when the page has no animations, in which case the
241
+ * caller should fall back to a normal full-page render.
242
+ */
243
+ renderPageLayers(documentId: string, pageIndex: number, width: number, height: number): Promise<AnimationLayer[] | undefined>;
228
244
  /**
229
245
  * Request annotations via the unified work queue.
230
246
  * Lower priority than renders — waits for pending renders to complete first.
@@ -1 +1 @@
1
- {"version":3,"file":"WorkerClient.d.ts","sourceRoot":"","sources":["../../../src/worker/WorkerClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACR,UAAU,EACV,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,aAAa,EACb,cAAc,EACd,SAAS,EACT,cAAc,EACd,UAAU,EACV,aAAa,EACb,WAAW,EACX,SAAS,EACT,eAAe,EACf,cAAc,EACd,cAAc,EACd,oBAAoB,EACpB,eAAe,EAGlB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EACR,aAAa,IAAI,WAAW,EAC5B,eAAe,IAAI,aAAa,EAChC,iBAAiB,IAAI,eAAe,EACpC,gBAAgB,IAAI,cAAc,EAClC,gBAAgB,IAAI,cAAc,EAClC,kBAAkB,IAAI,gBAAgB,EACtC,YAAY,IAAI,UAAU,EAC1B,kBAAkB,IAAI,gBAAgB,EACtC,aAAa,IAAI,WAAW,EAC5B,cAAc,IAAI,YAAY,EAC9B,YAAY,IAAI,UAAU,EAC1B,WAAW,IAAI,SAAS,EACxB,eAAe,IAAI,aAAa,EAChC,kBAAkB,IAAI,gBAAgB,EACtC,mBAAmB,IAAI,iBAAiB,EACxC,aAAa,IAAI,WAAW,EAC5B,gBAAgB,IAAI,cAAc,EAClC,iBAAiB,IAAI,eAAe,EACpC,mBAAmB,IAAI,iBAAiB,EACxC,YAAY,IAAI,UAAU,EAC1B,eAA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EAAE,MAAM,GAAG,IAAI;IAMpE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,eAAe,CAAK;IAE5C;;;;OAIG;IACH,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAkCnG;;;OAGG;IACG,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IA4C5D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,WAAW,CAAK;IAExC;;;;;;;;;OASG;IACH,OAAO,CAAC,SAAS;IA2DjB;;OAEG;IACH,sBAAsB,IAAI,IAAI;IA0B9B,OAAO,CAAC,gBAAgB;YA+CV,QAAQ;YA2DR,YAAY;YAoBZ,MAAM;IAoBpB,OAAO,CAAC,gBAAgB;IAuBxB,OAAO,CAAC,QAAQ;IAsBhB;;OAEG;IACH,SAAS,IAAI,IAAI;IASjB,OAAO,CAAC,IAAI;IAQZ,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,WAAW;CAGtB"}
@@ -391,6 +391,33 @@ export class WorkerClient {
391
391
  async getLayoutPage(documentId, pageIndex) {
392
392
  return this.requestText(documentId, pageIndex);
393
393
  }
394
+ /**
395
+ * Get the build sequence of a slide, or `undefined` if it has none.
396
+ *
397
+ * Sent directly rather than through the work queue: the timeline is small
398
+ * metadata and the viewer needs it before it can decide whether the page
399
+ * even requires layered rendering.
400
+ */
401
+ async getSlideAnimation(documentId, pageIndex) {
402
+ const response = (await this.send({ type: "getSlideAnimation", documentId, pageIndex }));
403
+ return response.animation;
404
+ }
405
+ /**
406
+ * Render a page as independently animatable layers, back-to-front.
407
+ *
408
+ * Returns `undefined` when the page has no animations, in which case the
409
+ * caller should fall back to a normal full-page render.
410
+ */
411
+ async renderPageLayers(documentId, pageIndex, width, height) {
412
+ const response = (await this.send({
413
+ type: "renderPageLayers",
414
+ documentId,
415
+ pageIndex,
416
+ width,
417
+ height,
418
+ }));
419
+ return response.layers;
420
+ }
394
421
  /**
395
422
  * Request annotations via the unified work queue.
396
423
  * Lower priority than renders — waits for pending renders to complete first.