@paged-media/canvas-wasm 0.70.0 → 0.70.1

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/canvas-wasm",
3
- "version": "0.70.0",
3
+ "version": "0.70.1",
4
4
  "type": "module",
5
5
  "main": "paged_canvas_wasm.js",
6
6
  "types": "paged_canvas_wasm.d.ts",
@@ -3168,6 +3168,16 @@ export class CanvasWorker {
3168
3168
  * serialised as a JS array.
3169
3169
  */
3170
3170
  pageInfo(index: number): Array<any> | undefined;
3171
+ /**
3172
+ * The engine's work counters (`paged_compose::perf`) since the
3173
+ * worker started: font bytes hashed, images decoded by the build
3174
+ * and materialised into page scenes, page scenes built, grow
3175
+ * passes, story emits. A harness reads it before and after an
3176
+ * action to see how much work that action did — the same counts
3177
+ * core's `perf_budgets` tests assert natively, plus the scene
3178
+ * counts that exist only on this target.
3179
+ */
3180
+ perfCounters(): object;
3171
3181
  /**
3172
3182
  * v66 — a frame's placed image as `{ uri, width, height, encoded }`
3173
3183
  * with `encoded` a `Uint8Array`, or `undefined` when there is none
@@ -3322,6 +3332,7 @@ export interface InitOutput {
3322
3332
  readonly canvasworker_new: () => number;
3323
3333
  readonly canvasworker_pageCount: (a: number) => number;
3324
3334
  readonly canvasworker_pageInfo: (a: number, b: number) => any;
3335
+ readonly canvasworker_perfCounters: (a: number) => any;
3325
3336
  readonly canvasworker_placedAssetBytesDirect: (a: number, b: number, c: number) => any;
3326
3337
  readonly canvasworker_presentFrame: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
3327
3338
  readonly canvasworker_protocolVersion: (a: number) => number;
@@ -211,6 +211,20 @@ export class CanvasWorker {
211
211
  const ret = wasm.canvasworker_pageInfo(this.__wbg_ptr, index);
212
212
  return ret;
213
213
  }
214
+ /**
215
+ * The engine's work counters (`paged_compose::perf`) since the
216
+ * worker started: font bytes hashed, images decoded by the build
217
+ * and materialised into page scenes, page scenes built, grow
218
+ * passes, story emits. A harness reads it before and after an
219
+ * action to see how much work that action did — the same counts
220
+ * core's `perf_budgets` tests assert natively, plus the scene
221
+ * counts that exist only on this target.
222
+ * @returns {object}
223
+ */
224
+ perfCounters() {
225
+ const ret = wasm.canvasworker_perfCounters(this.__wbg_ptr);
226
+ return ret;
227
+ }
214
228
  /**
215
229
  * v66 — a frame's placed image as `{ uri, width, height, encoded }`
216
230
  * with `encoded` a `Uint8Array`, or `undefined` when there is none
@@ -1641,12 +1655,12 @@ function __wbg_get_imports() {
1641
1655
  arg0.writeTexture(arg1, getArrayU8FromWasm0(arg2, arg3), arg4, arg5);
1642
1656
  }, arguments); },
1643
1657
  __wbindgen_generic_0000000000000001: function(arg0, arg1) {
1644
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 5151, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1658
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 5171, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
1645
1659
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h90756ddb99d2201d);
1646
1660
  return ret;
1647
1661
  },
1648
1662
  __wbindgen_generic_0000000000000002: function(arg0, arg1) {
1649
- // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 6397, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1663
+ // Cast intrinsic for `Closure(Closure { owned: true, function: Function { arguments: [Externref], shim_idx: 6428, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
1650
1664
  const ret = makeMutClosure(arg0, arg1, wasm_bindgen__convert__closures_____invoke__h78ff2cea7266d1aa);
1651
1665
  return ret;
1652
1666
  },
Binary file