alpha2 0.4.6 → 0.5.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.
Files changed (123) hide show
  1. package/README.md +5 -4
  2. package/THIRD_PARTY_NOTICES.md +4 -0
  3. package/dist/abort.d.ts +12 -0
  4. package/dist/abort.js +48 -0
  5. package/dist/active-clock.d.ts +35 -0
  6. package/dist/active-clock.js +99 -0
  7. package/dist/assets.d.ts +51 -22
  8. package/dist/assets.js +8 -12
  9. package/dist/audio-layout.d.ts +52 -74
  10. package/dist/audio-layout.js +114 -148
  11. package/dist/audio-timeline.d.ts +89 -117
  12. package/dist/audio-timeline.js +102 -118
  13. package/dist/audio-worker.d.ts +12 -21
  14. package/dist/audio-worker.js +8 -13
  15. package/dist/audio-worklet-processor.js +45 -58
  16. package/dist/audio-worklet.d.ts +45 -76
  17. package/dist/audio-worklet.js +44 -79
  18. package/dist/audio.d.ts +15 -23
  19. package/dist/audio.js +9 -13
  20. package/dist/builder.d.ts +45 -63
  21. package/dist/builder.js +49 -45
  22. package/dist/capabilities.d.ts +99 -16
  23. package/dist/capabilities.js +2 -2
  24. package/dist/captions.d.ts +45 -22
  25. package/dist/captions.js +60 -15
  26. package/dist/chroma-siting.d.ts +24 -41
  27. package/dist/chroma-siting.js +38 -71
  28. package/dist/containers.d.ts +41 -30
  29. package/dist/containers.js +59 -27
  30. package/dist/decoder-fallback.d.ts +13 -0
  31. package/dist/decoder-fallback.js +38 -0
  32. package/dist/decoder-order.d.ts +24 -39
  33. package/dist/decoder-order.js +28 -42
  34. package/dist/edit.d.ts +77 -154
  35. package/dist/edit.js +98 -180
  36. package/dist/effects.d.ts +125 -176
  37. package/dist/effects.js +7 -9
  38. package/dist/export-destination.d.ts +25 -41
  39. package/dist/export-destination.js +20 -32
  40. package/dist/export-failure.d.ts +34 -59
  41. package/dist/export-failure.js +54 -48
  42. package/dist/export-metrics.d.ts +116 -0
  43. package/dist/export-metrics.js +74 -0
  44. package/dist/export-retry.d.ts +46 -29
  45. package/dist/export-retry.js +86 -51
  46. package/dist/exporter.d.ts +67 -116
  47. package/dist/exporter.js +133 -133
  48. package/dist/extensions.d.ts +69 -115
  49. package/dist/extensions.js +55 -82
  50. package/dist/frame-intake.d.ts +92 -0
  51. package/dist/frame-intake.js +114 -0
  52. package/dist/frame-supply.d.ts +96 -162
  53. package/dist/frame-supply.js +181 -171
  54. package/dist/frames.d.ts +23 -0
  55. package/dist/frames.js +34 -0
  56. package/dist/generated/project-schema.d.ts +712 -485
  57. package/dist/generated/project-schema.js +55 -2
  58. package/dist/generated/project-shape.js +276 -16
  59. package/dist/geometry.d.ts +28 -34
  60. package/dist/geometry.js +18 -23
  61. package/dist/gpu-recovery.d.ts +92 -0
  62. package/dist/gpu-recovery.js +135 -0
  63. package/dist/hdr-frames.d.ts +82 -67
  64. package/dist/hdr-frames.js +112 -49
  65. package/dist/index.d.ts +6 -0
  66. package/dist/index.js +6 -0
  67. package/dist/json-text.d.ts +13 -23
  68. package/dist/json-text.js +10 -20
  69. package/dist/layout-values.d.ts +14 -22
  70. package/dist/layout-values.js +18 -21
  71. package/dist/layout.d.ts +48 -63
  72. package/dist/layout.js +37 -37
  73. package/dist/loudness.d.ts +27 -32
  74. package/dist/loudness.js +19 -23
  75. package/dist/media.d.ts +85 -237
  76. package/dist/media.js +133 -287
  77. package/dist/mediabunny.d.ts +178 -246
  78. package/dist/mediabunny.js +781 -583
  79. package/dist/paint.d.ts +23 -0
  80. package/dist/paint.js +37 -0
  81. package/dist/physical-frames.d.ts +5 -17
  82. package/dist/physical-frames.js +4 -11
  83. package/dist/player.d.ts +56 -47
  84. package/dist/player.js +155 -40
  85. package/dist/presented-frames.d.ts +2 -7
  86. package/dist/presented-frames.js +3 -8
  87. package/dist/project.d.ts +74 -118
  88. package/dist/project.js +384 -445
  89. package/dist/rate-control.d.ts +9 -23
  90. package/dist/rate-control.js +7 -18
  91. package/dist/renderer-choice.d.ts +41 -0
  92. package/dist/renderer-choice.js +82 -0
  93. package/dist/repacked-bytes.d.ts +0 -2
  94. package/dist/repacked-bytes.js +2 -5
  95. package/dist/robustness.d.ts +25 -37
  96. package/dist/robustness.js +71 -54
  97. package/dist/sha256.d.ts +5 -13
  98. package/dist/sha256.js +9 -24
  99. package/dist/text.d.ts +97 -71
  100. package/dist/text.js +33 -70
  101. package/dist/video-frames.d.ts +7 -25
  102. package/dist/video-frames.js +12 -29
  103. package/dist/waveform.d.ts +5 -11
  104. package/dist/waveform.js +4 -9
  105. package/dist/worker-error.d.ts +5 -20
  106. package/dist/worker-error.js +8 -25
  107. package/dist/worker.d.ts +82 -95
  108. package/dist/worker.js +235 -143
  109. package/package.json +26 -2
  110. package/wasm/alpha2_audio_worklet.wasm +0 -0
  111. package/wasm/alpha2_extensions.d.ts +26 -47
  112. package/wasm/alpha2_extensions.js +26 -47
  113. package/wasm/alpha2_extensions_bg.wasm +0 -0
  114. package/wasm/alpha2_wasm.d.ts +501 -587
  115. package/wasm/alpha2_wasm.js +661 -616
  116. package/wasm/alpha2_wasm_bg.wasm +0 -0
  117. package/wasm/alpha2_wasm_bg.wasm.d.ts +22 -12
  118. package/wasm/rust-crate-licenses.md +2 -2
  119. package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-070d94113471ef0a}/inline1.js +1 -0
  120. package/wasm/snippets/alpha2-wasm-070d94113471ef0a/inline2.js +82 -0
  121. package/wasm/snippets/alpha2-wasm-c62e60c964e88a52/inline2.js +0 -52
  122. /package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-070d94113471ef0a}/inline0.js +0 -0
  123. /package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-070d94113471ef0a}/inline3.js +0 -0
@@ -2,8 +2,8 @@
2
2
  /* eslint-disable */
3
3
 
4
4
  /**
5
- * Converts one source's audio to the project rate. Positions are sample
6
- * indexes: of the source at its own rate, of the output at the project's.
5
+ * Converts one source's audio to the project rate. Positions are sample indexes: the source's
6
+ * at its own rate, the output's at the project rate.
7
7
  */
8
8
  export class AudioResampler {
9
9
  free(): void;
@@ -12,13 +12,13 @@ export class AudioResampler {
12
12
  * A converter from `source_rate` to `target_rate`.
13
13
  *
14
14
  * # Errors
15
- * Rejects a rate of zero or above 768 kHz, and a source rate more than
16
- * 8192 times the target rate, whose filter would not fit the table.
15
+ * Rejects a rate of zero or above 768 kHz, and a source rate more than 8192 times the
16
+ * target rate.
17
17
  */
18
18
  constructor(source_rate: number, target_rate: number);
19
19
  /**
20
- * `frames` outputs from `target_start`, from `input`, whose first sample
21
- * is source sample `input_start`. The source is silent outside `input`.
20
+ * `frames` outputs from `target_start`, from `input`, whose first sample is source sample
21
+ * `input_start`. The source is silent outside `input`.
22
22
  *
23
23
  * # Errors
24
24
  * Rejects a position that is not a whole sample index.
@@ -69,8 +69,8 @@ export class ClockStep {
69
69
  }
70
70
 
71
71
  /**
72
- * A runtime effect compiled by [`WebEffectRegistry::compile_effect`],
73
- * waiting for [`WebEffectRegistry::register_compiled_effect`].
72
+ * A runtime effect compiled by a renderer's `compileEffect`, waiting for the same renderer's
73
+ * `registerCompiledEffect`.
74
74
  */
75
75
  export class CompiledEffect {
76
76
  private constructor();
@@ -96,9 +96,8 @@ export class LoudnessMeter {
96
96
  */
97
97
  constructor(sample_rate: number, channels: number);
98
98
  /**
99
- * Adds one block: the channels' samples concatenated, channel after
100
- * channel, all of one length. A NaN or infinite sample measures as
101
- * silence.
99
+ * Adds one block of planar samples, channel after channel, all of one length. NaN or
100
+ * infinite samples measure as silence.
102
101
  *
103
102
  * # Errors
104
103
  * Rejects a block whose length is not a multiple of the channel count.
@@ -132,20 +131,18 @@ export class PlaybackClock {
132
131
  */
133
132
  static audible(policy: string, rate: number): boolean;
134
133
  /**
135
- * A clock starting at `tick` at wall time `now_ms`, playing at `rate`
136
- * under `policy` (`drop_video_keep_audio`, `preserve_every_video_frame`,
137
- * `silent_scrub`, or `offline_exact`).
134
+ * A clock starting at `tick` at wall time `now_ms`, playing at `rate` under `policy`
135
+ * (`drop_video_keep_audio`, `preserve_every_video_frame`, `silent_scrub`, or
136
+ * `offline_exact`).
138
137
  *
139
138
  * # Errors
140
- * Rejects an unknown policy, an invalid frame rate, or a rate or tick
141
- * that is not finite.
139
+ * Rejects an unknown policy, an invalid frame rate, or a non-finite rate or tick.
142
140
  */
143
141
  constructor(policy: string, frame_rate_num: number, frame_rate_den: number, rate: number, tick: number, now_ms: number);
144
142
  /**
145
- * The time to show at wall time `now_ms`. `heard` is the audio output's
146
- * position in ticks while it runs, else `undefined` (a position before
147
- * the clock's start is its start); `presented` says whether the frame
148
- * the clock last asked for has been shown.
143
+ * The time to show at wall time `now_ms`. `heard` is the audio output's position in ticks
144
+ * while it runs, else `undefined` (positions before the clock's start clamp to it);
145
+ * `presented` says whether the frame last asked for has been shown.
149
146
  *
150
147
  * # Errors
151
148
  * Rejects a `heard` that is not an integer tick.
@@ -161,8 +158,13 @@ export class RasterizedText {
161
158
  free(): void;
162
159
  [Symbol.dispose](): void;
163
160
  /**
164
- * Copies out the pixels, tightly packed premultiplied RGBA8 rows,
165
- * and lets go of them; a second call returns an empty array.
161
+ * Copies out the background boxes split off by `splitBackground`, packed like the
162
+ * pixels. Empty when not split, or after `takePixels`.
163
+ */
164
+ takeBackground(): Uint8Array;
165
+ /**
166
+ * Copies out the pixels as tightly packed premultiplied RGBA8 rows and releases them and
167
+ * the background; a second call returns an empty array.
166
168
  */
167
169
  takePixels(): Uint8Array;
168
170
  /**
@@ -172,21 +174,18 @@ export class RasterizedText {
172
174
  }
173
175
 
174
176
  /**
175
- * Measures text generators with caller-supplied fonts, without a GPU:
176
- * where the engine draws each one's text on the canvas. Given the fonts
177
- * a renderer draws with, in the same order, it answers for that
178
- * renderer's frames.
177
+ * Measures where text generators draw on the canvas, without a GPU. Given the same fonts in
178
+ * the same order as a renderer, it answers for that renderer's frames.
179
179
  */
180
180
  export class WasmTextMeasurer {
181
181
  free(): void;
182
182
  [Symbol.dispose](): void;
183
183
  /**
184
- * Appends every face of an OpenType font file to the fallback stack,
185
- * in the file's order: each weight of a collection (`.ttc`), all
186
- * checked before any is added.
184
+ * Appends every face of an OpenType font file (each weight of a `.ttc`) to the fallback
185
+ * stack in file order, all checked before any is added.
187
186
  *
188
187
  * # Errors
189
- * Rejects malformed font bytes, naming no face added.
188
+ * Rejects malformed font bytes; no face is added.
190
189
  */
191
190
  addFontFile(family: string, bytes: Uint8Array): void;
192
191
  /**
@@ -201,41 +200,34 @@ export class WasmTextMeasurer {
201
200
  */
202
201
  clearFonts(): void;
203
202
  /**
204
- * Where each node of the layout generator `generator_json`
205
- * (`{ "type": "layout", "root" }`, as a project holds it) lies on a
206
- * `width` by `height` picture at picture time `time` (ticks), laid
207
- * out with these fonts as a frame lays it out, as JSON `{ nodes }`:
208
- * each node in preorder as `{ at, border, content, overflow,
209
- * lineCount, baselines }`, its boxes `{ left, top, right, bottom }` in
210
- * fractions of the picture, before its clip's transform and node
211
- * visuals. `lineCount` is `null` for a node without text, and
212
- * `baselines` (`{ first, last }`, in fractions of the picture height)
213
- * for a node without text or with empty text. Measure at the size
214
- * the picture is drawn at. The layout's `"<n>px"` lengths are pixels
215
- * of the project canvas, `canvasWidth` by `canvasHeight`: the
216
- * picture's size when they are omitted.
217
- *
218
- * # Errors
219
- * Rejects JSON that is no valid layout generator (on that canvas),
220
- * an empty picture or canvas, a time that is not whole ticks, and a
221
- * measurer without fonts for a layout with text.
203
+ * Where each node of the layout generator `generator_json` (`{ "type": "layout",
204
+ * "root" }`) lies on a `width` by `height` picture at `time` (ticks), as JSON
205
+ * `{ nodes }`.
206
+ *
207
+ * Nodes are in preorder as `{ at, border, content, overflow, lineCount, baselines }`,
208
+ * boxes `{ left, top, right, bottom }` in picture fractions before the clip's transform
209
+ * and node visuals. `lineCount` is `null` for a node without text, and `baselines`
210
+ * (`{ first, last }`, fractions of picture height) also for empty text. `"<n>px"`
211
+ * lengths are project canvas pixels (`canvasWidth` by `canvasHeight`, defaulting to the
212
+ * picture size).
213
+ *
214
+ * # Errors
215
+ * Rejects an invalid layout generator, an empty picture or canvas, a time that is not
216
+ * whole ticks, and a measurer without fonts for a layout with text.
222
217
  */
223
218
  measureLayout(generator_json: string, width: number, height: number, time: number, canvas_width?: number | null, canvas_height?: number | null): string;
224
219
  /**
225
- * Where the text generator `generator_json` (`{ "type": "text",
226
- * "text", "style" }`, as a project holds it) lies on a `width` by
227
- * `height` canvas, as JSON `{ layout, content, ink, lineCount,
228
- * baselines }`: each a `{ left, top, right, bottom }` rectangle in
229
- * fractions of the canvas, as the style's position is, on the picture
230
- * the generator draws before its clip's transform; `ink` is `null`
231
- * when the text draws nothing. `baselines` is `{ first, last }`, the
232
- * first and last lines' alphabetic baselines in fractions of the
233
- * canvas height. Measure at the project's canvas size: text laid out
234
- * at another size can break its lines elsewhere.
220
+ * Where the text generator `generator_json` (`{ "type": "text", "text", "style" }`)
221
+ * lies on a `width` by `height` canvas, as JSON `{ layout, content, ink, lineCount,
222
+ * baselines }`.
223
+ *
224
+ * Rectangles are `{ left, top, right, bottom }` in canvas fractions, before the clip's
225
+ * transform; `ink` is `null` when nothing draws. `baselines` is `{ first, last }`, the
226
+ * first and last alphabetic baselines as fractions of canvas height. Measure at the
227
+ * project canvas size, since another size can break lines elsewhere.
235
228
  *
236
229
  * # Errors
237
- * Rejects JSON that is no valid text generator, an empty canvas, and
238
- * a measurer without fonts.
230
+ * Rejects an invalid text generator, an empty canvas, and a measurer without fonts.
239
231
  */
240
232
  measure(generator_json: string, width: number, height: number): string;
241
233
  /**
@@ -251,12 +243,11 @@ export class WasmTextRasterizer {
251
243
  free(): void;
252
244
  [Symbol.dispose](): void;
253
245
  /**
254
- * Appends every face of an OpenType font file to the fallback stack,
255
- * in the file's order: each weight of a collection (`.ttc`), all
256
- * checked before any is added.
246
+ * Appends every face of an OpenType font file (each weight of a `.ttc`) to the fallback
247
+ * stack in file order, all checked before any is added.
257
248
  *
258
249
  * # Errors
259
- * Rejects malformed font bytes, naming no face added.
250
+ * Rejects malformed font bytes; no face is added.
260
251
  */
261
252
  addFontFile(family: string, bytes: Uint8Array): void;
262
253
  /**
@@ -279,14 +270,12 @@ export class WasmTextRasterizer {
279
270
  */
280
271
  constructor();
281
272
  /**
282
- * Shapes, lays out, and rasterizes one request, or returns the cached
283
- * result of its content version. The cache keeps the default budget
284
- * of results (`alpha2_text::DEFAULT_TEXT_CACHE_BYTES`), dropping the
285
- * least recently used past it.
273
+ * Shapes, lays out, and rasterizes one request, or returns the cached result for its
274
+ * content version. The cache keeps `alpha2_text::DEFAULT_TEXT_CACHE_BYTES` of results,
275
+ * least recently used first out.
286
276
  *
287
277
  * # Errors
288
- * Rejects a malformed or out-of-range request, or a rasterizer
289
- * without fonts.
278
+ * Rejects a malformed or out-of-range request, or a rasterizer without fonts.
290
279
  */
291
280
  rasterize(request_json: string, content_version: bigint): RasterizedText;
292
281
  /**
@@ -296,8 +285,7 @@ export class WasmTextRasterizer {
296
285
  }
297
286
 
298
287
  /**
299
- * Builds a multi-resolution waveform summary from planar samples streamed in
300
- * blocks.
288
+ * Builds a multi-resolution waveform summary from planar samples streamed in blocks.
301
289
  */
302
290
  export class WaveformBuilder {
303
291
  free(): void;
@@ -310,20 +298,19 @@ export class WaveformBuilder {
310
298
  */
311
299
  finish(): WaveformResult;
312
300
  /**
313
- * A builder for `channels` channels, `bucket_samples` samples per finest
314
- * bucket, and `levels` zoom levels, each four times coarser.
301
+ * A builder for `channels` channels, `bucket_samples` samples per finest bucket, and
302
+ * `levels` zoom levels, each four times coarser.
315
303
  *
316
304
  * # Errors
317
305
  * Rejects zero channels, a zero bucket, or 0 or more than 16 levels.
318
306
  */
319
307
  constructor(channels: number, bucket_samples: number, levels: number);
320
308
  /**
321
- * Adds one block: the channels' samples concatenated, channel after
322
- * channel, all of one length.
309
+ * Adds one block of planar samples, channel after channel, all of one length.
323
310
  *
324
311
  * # Errors
325
- * Rejects a block whose length is not a multiple of the channel count,
326
- * or a builder already finished.
312
+ * Rejects a block whose length is not a multiple of the channel count, or a finished
313
+ * builder.
327
314
  */
328
315
  push(planar: Float32Array): void;
329
316
  }
@@ -340,8 +327,8 @@ export class WaveformResult {
340
327
  */
341
328
  bucketSamples(level: number): number;
342
329
  /**
343
- * One channel's buckets at `level` as `[min, max, rms]` triples; empty
344
- * past the last level or channel.
330
+ * One channel's buckets at `level` as `[min, max, rms]` triples; empty past the last level
331
+ * or channel.
345
332
  */
346
333
  buckets(level: number, channel: number): Float32Array;
347
334
  /**
@@ -357,21 +344,20 @@ export class WaveformResult {
357
344
  /**
358
345
  * The browser renderer that draws on the CPU, for a page with no GPU.
359
346
  *
360
- * It answers the calls `WebEffectRegistry` answers for preview, export,
361
- * text and audio, and draws the same pictures as the engine's native CPU
362
- * renderer, byte for byte. Effects registered at run time are refused.
347
+ * It answers the same preview, export, text and audio calls as `WebEffectRegistry` and draws
348
+ * byte-identical pictures to the native CPU renderer. Runtime effects register, and a project
349
+ * that draws one is refused, as the native host does on its CPU renderer.
363
350
  */
364
351
  export class WebCpuRenderer {
365
352
  private constructor();
366
353
  free(): void;
367
354
  [Symbol.dispose](): void;
368
355
  /**
369
- * Appends every face of an OpenType font file to the fallback stack, in
370
- * the file's order: each weight of a collection (`.ttc`), all checked
371
- * before any is added, as the export host registers a file.
356
+ * Appends every face of an OpenType font file (each weight of a `.ttc`) to the fallback
357
+ * stack in file order, all checked before any is added.
372
358
  *
373
359
  * # Errors
374
- * Returns an error for malformed font bytes, with no face added.
360
+ * Returns an error for malformed font bytes; no face is added.
375
361
  */
376
362
  addFontFile(family: string, bytes: Uint8Array): void;
377
363
  /**
@@ -385,8 +371,8 @@ export class WebCpuRenderer {
385
371
  * `WebEffectRegistry.aliasVideoFrame`.
386
372
  *
387
373
  * # Errors
388
- * Refuses an alias that would make the export frame's sources outgrow
389
- * the uploaded-frame budget.
374
+ * Refuses an alias that would push the export frame's sources over the uploaded-frame
375
+ * budget.
390
376
  */
391
377
  aliasVideoFrame(source_id: string, existing_media_time_ticks: bigint, requested_media_time_ticks: bigint): boolean;
392
378
  /**
@@ -421,24 +407,22 @@ export class WebCpuRenderer {
421
407
  * # Errors
422
408
  * Returns an error if the windows cannot be serialized.
423
409
  */
424
- audioRetainedWindows(source_id: string): string;
410
+ audioRetainedWindows(source_id: string, stream?: number | null): string;
425
411
  /**
426
412
  * Project sample rate used by uploads and mixed blocks.
427
413
  */
428
414
  audioSampleRate(): number;
429
415
  /**
430
- * `WebEffectRegistry.beginExportAt`: one exact timeline timestamp at
431
- * export quality, drawn on the CPU, its `readback` already settled.
416
+ * `WebEffectRegistry.beginExportAt`: one exact timeline timestamp at export quality, with
417
+ * `readback` already settled.
432
418
  *
433
419
  * # Errors
434
- * Returns an error without a loaded project, for an unknown codec or an
435
- * odd size, an effect that does not draw on the CPU (`EFFECT_ERROR`),
436
- * or when the frame cannot be drawn.
420
+ * Returns an error without a loaded project, for an unknown codec or odd size, an effect
421
+ * that does not draw on the CPU (`EFFECT_ERROR`), or when the frame cannot be drawn.
437
422
  */
438
- beginExportAt(time_ticks: bigint, codec: string): any;
423
+ beginExportAt(time_ticks: bigint, codec: string, pixels?: string | null): any;
439
424
  /**
440
- * `WebEffectRegistry.beginExportFrame`: its `readback` is already
441
- * settled.
425
+ * `WebEffectRegistry.beginExportFrame`, with `readback` already settled.
442
426
  *
443
427
  * # Errors
444
428
  * As [`Self::export_frame`].
@@ -448,20 +432,17 @@ export class WebCpuRenderer {
448
432
  * `WebEffectRegistry.beginExport`, drawing on the CPU.
449
433
  *
450
434
  * # Errors
451
- * Returns an error without a loaded project, for an empty range, an
452
- * invalid frame rate, or an unknown codec.
435
+ * Returns an error without a loaded project, for an empty range, an invalid frame rate, or
436
+ * an unknown codec.
453
437
  */
454
438
  beginExport(start_ticks: bigint, end_ticks: bigint, rate_num: number, rate_den: number, codec: string): void;
455
439
  /**
456
- * The engine's effect and transition authoring catalog: every built-in
457
- * draws on the CPU.
440
+ * The engine's effect and transition authoring catalog; every built-in draws on the CPU.
458
441
  */
459
442
  builtinCatalog(): string;
460
443
  /**
461
- * What this renderer can do, in the shared capability report's JSON
462
- * with runtime `browser`: its "GPU" is the CPU (backend `cpu`),
463
- * `features` says `renderer.cpu` is available, `renderer.gpu` is not,
464
- * and runtime effects (`effects.runtime`) do not run.
444
+ * The shared capability report JSON with runtime `browser`: backend `cpu`,
445
+ * `renderer.cpu` available, `renderer.gpu` and `effects.runtime` not.
465
446
  *
466
447
  * # Errors
467
448
  * Returns an error if the report cannot be serialized.
@@ -476,7 +457,7 @@ export class WebCpuRenderer {
476
457
  */
477
458
  clearEffectResources(): void;
478
459
  /**
479
- * Does nothing: no runtime effect registers here.
460
+ * Removes every recorded runtime effect.
480
461
  */
481
462
  clearEffects(): void;
482
463
  /**
@@ -488,15 +469,17 @@ export class WebCpuRenderer {
488
469
  */
489
470
  clearFrames(): void;
490
471
  /**
491
- * Refused: a runtime effect is WGSL, which only a GPU runs.
472
+ * Validates one JSON effect definition and resolves to an entry for
473
+ * [`Self::register_compiled_effect`]. No shader is compiled, since this renderer cannot draw
474
+ * runtime effects; a project that draws one is refused when it renders or exports.
492
475
  *
493
476
  * # Errors
494
- * Always rejects with `EFFECT_ERROR`.
477
+ * Throws `EFFECT_ERROR` for a definition the engine refuses.
495
478
  */
496
479
  compileEffect(json: string): Promise<any>;
497
480
  /**
498
- * A JSON snapshot for developer tooling: what the CPU renderer drew,
499
- * its result cache, and the frames it holds.
481
+ * A JSON snapshot for developer tooling: what the CPU renderer drew, its result cache, and
482
+ * the frames it holds.
500
483
  *
501
484
  * # Errors
502
485
  * Returns an error if the snapshot cannot be serialized.
@@ -507,12 +490,11 @@ export class WebCpuRenderer {
507
490
  */
508
491
  endExport(): void;
509
492
  /**
510
- * `WebEffectRegistry.exportFrame`: the next export frame, drawn on the
511
- * CPU before the call returns.
493
+ * `WebEffectRegistry.exportFrame`: the next export frame, drawn before the call returns.
512
494
  *
513
495
  * # Errors
514
- * Returns an error without a running export or a loaded project, or
515
- * when the frame cannot be drawn.
496
+ * Returns an error without a running export or loaded project, or when the frame cannot
497
+ * be drawn.
516
498
  */
517
499
  exportFrame(): Promise<any>;
518
500
  /**
@@ -538,8 +520,8 @@ export class WebCpuRenderer {
538
520
  */
539
521
  holdsImage(source_id: string, generation: bigint): boolean;
540
522
  /**
541
- * Loads and validates a versioned project document, keeping uploads
542
- * as `WebEffectRegistry.loadProject` does, and ends a running export.
523
+ * Loads and validates a versioned project document, keeping uploads as
524
+ * `WebEffectRegistry.loadProject` does, and ends a running export.
543
525
  *
544
526
  * # Errors
545
527
  * Rejects a document the engine refuses.
@@ -550,10 +532,15 @@ export class WebCpuRenderer {
550
532
  */
551
533
  loudnessReport(): string;
552
534
  /**
553
- * Refused, as [`Self::compile_effect`] is.
535
+ * `WebEffectRegistry.projectRuntimeEffects`: the recorded runtime effects the loaded project
536
+ * can draw. Any of them makes rendering and export refuse.
537
+ */
538
+ projectRuntimeEffects(): string[];
539
+ /**
540
+ * Records an effect [`Self::compile_effect`] validated and returns its `id@version`.
554
541
  *
555
542
  * # Errors
556
- * Always throws `EFFECT_ERROR`.
543
+ * Throws `EFFECT_ERROR` for an effect a GPU renderer compiled or one already registered.
557
544
  */
558
545
  registerCompiledEffect(compiled: CompiledEffect): string;
559
546
  /**
@@ -564,7 +551,7 @@ export class WebCpuRenderer {
564
551
  */
565
552
  registerLut3d(id: string, cube: string): void;
566
553
  /**
567
- * Drops one source's retained audio.
554
+ * Drops one source's retained audio, every stream of it.
568
555
  */
569
556
  releaseAudioSource(source_id: string): boolean;
570
557
  /**
@@ -584,10 +571,9 @@ export class WebCpuRenderer {
584
571
  */
585
572
  releaseSourceFrames(source_id: string): boolean;
586
573
  /**
587
- * Draws one project frame at the preview quality and puts it on the
588
- * canvas's 2D context, scaled to the canvas, answering the JSON
589
- * `WebEffectRegistry.renderAt` answers. A frame equal to the one shown
590
- * is neither drawn nor put (`unchanged`).
574
+ * Draws one project frame at preview quality onto the canvas's 2D context, scaled to fit,
575
+ * and returns the JSON `WebEffectRegistry.renderAt` returns. A frame equal to the one
576
+ * shown is skipped (`unchanged`).
591
577
  *
592
578
  * # Errors
593
579
  * Fails without a project, or when the frame cannot be drawn.
@@ -609,8 +595,8 @@ export class WebCpuRenderer {
609
595
  */
610
596
  resetPlayer(): void;
611
597
  /**
612
- * Sizes the canvas to `width` by `height`, which preview frames are
613
- * scaled to fill, and drops the held frame.
598
+ * Sizes the canvas to `width` by `height`, which preview frames are scaled to fill, and
599
+ * drops the held frame.
614
600
  *
615
601
  * # Errors
616
602
  * Fails without a canvas, or for a zero or oversized dimension.
@@ -642,24 +628,22 @@ export class WebCpuRenderer {
642
628
  */
643
629
  setPassTiming(_enabled: boolean): void;
644
630
  /**
645
- * Renders preview frames at `scale` times the project's size from now
646
- * on (0.5 until set).
631
+ * Renders preview frames at `scale` times the project size from now on (default 0.5).
647
632
  *
648
633
  * # Errors
649
634
  * Rejects a scale that is not finite, above 0 and at most 8.
650
635
  */
651
636
  setPreviewScale(scale: number): void;
652
637
  /**
653
- * Lets drawn results occupy up to `bytes` of wasm memory to be found
654
- * again when a frame repeats; zero, the default, turns that off.
638
+ * Lets drawn results use up to `bytes` of wasm memory for reuse when a frame repeats; zero
639
+ * (the default) disables it.
655
640
  *
656
641
  * # Errors
657
642
  * Rejects a negative or non-finite budget.
658
643
  */
659
644
  setResultCacheBudget(bytes: number): void;
660
645
  /**
661
- * Sets the byte budget of uploaded frames (default 256 MiB, wasm
662
- * memory), as `WebEffectRegistry.setUploadedFrameBudget` does.
646
+ * Sets the uploaded-frame byte budget (default 256 MiB of wasm memory).
663
647
  *
664
648
  * # Errors
665
649
  * Rejects a negative or non-finite budget.
@@ -670,8 +654,7 @@ export class WebCpuRenderer {
670
654
  */
671
655
  sourceColorMetadata(source_id: string): string | undefined;
672
656
  /**
673
- * A promise that resolves at once: the CPU renderer's work is done when
674
- * its call returns.
657
+ * Resolves at once, since CPU work is done when its call returns.
675
658
  */
676
659
  submittedWorkDone(): Promise<any>;
677
660
  /**
@@ -687,19 +670,19 @@ export class WebCpuRenderer {
687
670
  */
688
671
  unregisterEffectResource(id: string): boolean;
689
672
  /**
690
- * `false`: no runtime effect registers here.
673
+ * Removes one recorded runtime effect.
691
674
  */
692
- unregisterEffect(_id: string, _version: number): boolean;
675
+ unregisterEffect(id: string, version: number): boolean;
693
676
  /**
694
677
  * `WebEffectRegistry.uploadAudioBlock`.
695
678
  *
696
679
  * # Errors
697
680
  * As `WebEffectRegistry.uploadAudioBlock`.
698
681
  */
699
- uploadAudioBlock(source_id: string, start_sample: bigint, sample_rate: number, layout: any, samples: Float32Array, ends_source?: boolean | null): void;
682
+ uploadAudioBlock(source_id: string, start_sample: bigint, sample_rate: number, layout: any, samples: Float32Array, ends_source?: boolean | null, stream?: number | null): void;
700
683
  /**
701
- * [`Self::upload_presented_video_frame`] for a bitmap made with
702
- * `premultiplyAlpha: "none"`. Always closes `bitmap`.
684
+ * [`Self::upload_presented_video_frame`] for a bitmap made with `premultiplyAlpha: "none"`.
685
+ * Always closes `bitmap`.
703
686
  *
704
687
  * # Errors
705
688
  * As [`Self::upload_presented_video_frame`].
@@ -734,48 +717,43 @@ export class WebCpuRenderer {
734
717
  */
735
718
  uploadPresentedRgbaImage(source_id: string, width: number, height: number, pixels: Uint8Array, premultiplied: boolean, output_width: number, output_height: number): any;
736
719
  /**
737
- * `WebEffectRegistry.uploadPresentedVideoFrame`, the frame read through
738
- * a 2D canvas (the browser's conversion, as WebGL2's is). Always closes
739
- * `frame`; an HDR source's frame is refused (`uploadYuvFrame` takes it).
720
+ * `WebEffectRegistry.uploadPresentedVideoFrame`: the frame read through a 2D canvas (the
721
+ * browser's conversion). Always closes `frame`. HDR sources must use `uploadYuvFrame`.
740
722
  *
741
723
  * # Errors
742
- * Rejects an HDR source's frame, a bad placement, and a frame the
743
- * browser cannot read.
724
+ * Rejects an HDR source's frame, a bad placement, and a frame the browser cannot read.
744
725
  */
745
726
  uploadPresentedVideoFrame(source_id: string, media_time_ticks: bigint, frame: VideoFrame, output_width: number, output_height: number, rotation_degrees: number, mirror: boolean): any;
746
727
  /**
747
- * `WebEffectRegistry.uploadRgbaFrame`: premultiplied RGBA8 kept at its
748
- * own size.
728
+ * `WebEffectRegistry.uploadRgbaFrame`: premultiplied RGBA8 kept at its own size.
749
729
  *
750
730
  * # Errors
751
731
  * Rejects pixels that do not hold the size.
752
732
  */
753
733
  uploadRgbaFrame(source_id: string, media_time_ticks: bigint, width: number, height: number, pixels: Uint8Array): any;
754
734
  /**
755
- * `WebEffectRegistry.uploadRgbaImage`: a still, premultiplied RGBA8 kept
756
- * at its own size.
735
+ * `WebEffectRegistry.uploadRgbaImage`: a premultiplied RGBA8 still kept at its own size.
757
736
  *
758
737
  * # Errors
759
738
  * Rejects pixels that do not hold the size.
760
739
  */
761
740
  uploadRgbaImage(source_id: string, width: number, height: number, pixels: Uint8Array): any;
762
741
  /**
763
- * `WebEffectRegistry.uploadVideoFrame`: the frame read through a 2D
764
- * canvas, fitted to the loaded project. Always closes `frame`.
742
+ * `WebEffectRegistry.uploadVideoFrame`: the frame read through a 2D canvas and fitted to
743
+ * the loaded project. Always closes `frame`.
765
744
  *
766
745
  * # Errors
767
746
  * Rejects an HDR source's frame and a frame the browser cannot read.
768
747
  */
769
748
  uploadVideoFrame(source_id: string, media_time_ticks: bigint, frame: VideoFrame): any;
770
749
  /**
771
- * `WebEffectRegistry.uploadYuvFrame`: a decoded frame's planes, as
772
- * `VideoFrame.copyTo` writes them, kept as they are and converted under
773
- * the project's color pipeline when a frame first draws them.
750
+ * `WebEffectRegistry.uploadYuvFrame`: a decoded frame's planes as `VideoFrame.copyTo`
751
+ * writes them, converted under the project's color pipeline when first drawn.
774
752
  *
775
753
  * # Errors
776
- * Rejects (`INVALID_INPUT`) an unknown format or chroma siting, a layout
777
- * or plane that does not fit the data, a bad size or rotation, and an
778
- * HDR frame when the project's color pipeline refuses HDR sources.
754
+ * Rejects (`INVALID_INPUT`) an unknown format or chroma siting, a layout or plane that does
755
+ * not fit the data, a bad size or rotation, and an HDR frame the project's color pipeline
756
+ * refuses.
779
757
  */
780
758
  uploadYuvFrame(source_id: string, media_time_ticks: bigint, format: string, coded_width: number, coded_height: number, data: Uint8Array, layout: Uint32Array, visible: Uint32Array, display_width: number, display_height: number, color: string, chroma_siting: string, output_width: number, output_height: number, rotation_degrees: number, mirror: boolean): any;
781
759
  /**
@@ -802,8 +780,8 @@ export class WebCpuRenderer {
802
780
  */
803
781
  readonly retiredFrameCount: number;
804
782
  /**
805
- * `true`: decoded `VideoFrame`s are taken, as planes (`uploadYuvFrame`)
806
- * or through a 2D canvas.
783
+ * `true`: decoded `VideoFrame`s are taken as planes (`uploadYuvFrame`) or through a 2D
784
+ * canvas.
807
785
  */
808
786
  readonly supportsExternalVideoFrame: boolean;
809
787
  /**
@@ -815,45 +793,42 @@ export class WebCpuRenderer {
815
793
  */
816
794
  readonly uploadedFrameCount: number;
817
795
  /**
818
- * `"canvas"`: frames passed as `VideoFrame`s are read through a 2D
819
- * canvas.
796
+ * `"canvas"`: `VideoFrame`s are read through a 2D canvas.
820
797
  */
821
798
  readonly videoFrameCopy: string;
822
799
  }
823
800
 
824
801
  /**
825
- * WebGPU-owned runtime effect registry for worker hosts.
802
+ * The browser GPU renderer (WebGPU or WebGL2), with its runtime effect registry.
826
803
  */
827
804
  export class WebEffectRegistry {
828
805
  private constructor();
829
806
  free(): void;
830
807
  [Symbol.dispose](): void;
831
808
  /**
832
- * Appends every face of an OpenType font file to the fallback stack, in
833
- * the file's order: each weight of a collection (`.ttc`), all checked
834
- * before any is added, as the export host registers a file.
809
+ * Appends every face of an OpenType font file (each weight of a `.ttc`) to the fallback
810
+ * stack in file order, all checked before any is added.
835
811
  *
836
812
  * # Errors
837
- * Returns an error for malformed font bytes, with no face added.
813
+ * Returns an error for malformed font bytes; no face is added.
838
814
  */
839
815
  addFontFile(family: string, bytes: Uint8Array): void;
840
816
  /**
841
- * Appends an OpenType font to the fallback stack caption tracks, text
842
- * generators and layouts draw and lay out with. Give it the same font
843
- * files as the export host, and preview text matches exported text pixel
844
- * for pixel.
817
+ * Appends an OpenType font to the fallback stack for captions, text generators and
818
+ * layouts. With the same fonts as the export host, preview text matches exported text
819
+ * pixel for pixel.
845
820
  *
846
821
  * # Errors
847
822
  * Returns an error for malformed font bytes.
848
823
  */
849
824
  addFont(family: string, bytes: Uint8Array, face_index: number): void;
850
825
  /**
851
- * Aliases a new exact source-time request to an already uploaded physical frame.
852
- * Returns `false` when no frame is stored at the existing time.
826
+ * Aliases a new exact source-time request to an already uploaded frame. Returns `false`
827
+ * when no frame is stored at the existing time.
853
828
  *
854
829
  * # Errors
855
- * Refuses with `RESOURCE_LIMIT`, as an upload, an alias that would make
856
- * the export frame's sources outgrow the uploaded-frame budget.
830
+ * Refuses with `RESOURCE_LIMIT` an alias that would push the export frame's sources over
831
+ * the uploaded-frame budget.
857
832
  */
858
833
  aliasVideoFrame(source_id: string, existing_media_time_ticks: bigint, requested_media_time_ticks: bigint): boolean;
859
834
  /**
@@ -861,21 +836,19 @@ export class WebEffectRegistry {
861
836
  */
862
837
  audioChannels(): number;
863
838
  /**
864
- * Sources that the most recent `renderAudio` call could not mix, as a
865
- * JSON array of source IDs.
839
+ * Source IDs the most recent `renderAudio` call could not mix, as a JSON array.
866
840
  */
867
841
  audioMissingSources(): string;
868
842
  /**
869
- * Source intervals a host must decode before mixing a sample range:
870
- * every sample the mix reads, interpolation neighbours included.
871
- *
872
- * They cover read-ahead and, after a seek, the finite state-settling
873
- * history each clip's effect stages replay, as well as the delay lines.
874
- * Tick values are strings so JavaScript preserves the full i64 range.
843
+ * Source intervals a host must decode before mixing a sample range, including
844
+ * interpolation neighbours, read-ahead, delay lines, and after a seek the settling history
845
+ * effect stages replay, as JSON `[{sourceId, stream?, startTicks, endTicks}]`. `stream` is
846
+ * set when clips play another audio stream than the default one (`audio.stream`). Tick values
847
+ * are strings to preserve the full i64 range.
875
848
  */
876
849
  audioNeeds(start_sample: bigint, frames: number): string;
877
850
  /**
878
- * Allocated audio sample bytes, including spare capacity after trimming.
851
+ * Allocated audio sample bytes, including spare capacity.
879
852
  */
880
853
  audioRetainedBytes(): number;
881
854
  /**
@@ -883,83 +856,66 @@ export class WebEffectRegistry {
883
856
  */
884
857
  audioRetainedFrames(): number;
885
858
  /**
886
- * Half-open project-rate sample intervals of one source's retained
887
- * windows, most recently uploaded first, as JSON
888
- * `[{startSample, endSample}]`.
889
- *
890
- * A host decodes only what these do not cover: the store may have
891
- * extended, replaced or dropped a window since the host uploaded it.
859
+ * Half-open project-rate sample intervals of the windows of one source's `stream` (absent for
860
+ * the default one), most recently uploaded first, as JSON `[{startSample, endSample}]`. A host decodes only what these do not
861
+ * cover, since the store may have extended, replaced or dropped windows.
892
862
  */
893
- audioRetainedWindows(source_id: string): string;
863
+ audioRetainedWindows(source_id: string, stream?: number | null): string;
894
864
  /**
895
865
  * Project sample rate used by uploads and mixed blocks.
896
866
  */
897
867
  audioSampleRate(): number;
898
868
  /**
899
- * Starts one exact timeline timestamp offscreen at export quality.
900
- *
901
- * This is the stateless worker-backend counterpart of [`Self::export_frame`].
902
- * Scheduling remains with the typed JavaScript exporter, while pixels are
903
- * still produced by the same full-resolution Rust render path and never by
904
- * capturing the preview canvas.
869
+ * Starts one exact timeline timestamp offscreen at export quality: the stateless
870
+ * counterpart of [`Self::export_frame`] for a JavaScript-scheduled exporter.
905
871
  *
906
- * A rendered result exposes its readback promise separately so the worker
907
- * can submit later frames while earlier mappings remain in flight. The
908
- * frame is packed for `codec`, as [`Self::begin_export`] packs it.
872
+ * The readback promise is exposed separately so later frames can be submitted while
873
+ * earlier mappings are in flight. Frames are packed for `codec` as [`Self::begin_export`]
874
+ * does, in `pixels` (an `FFmpeg` pixel format: `yuva420p` keeps alpha and draws no
875
+ * background, `yuv420p10le` is 10-bit; I420 when absent). Non-I420 layouts are packed into
876
+ * tight planes with the `WebCodecs` `format` (`I420A`, `I420P10`).
909
877
  *
910
878
  * # Errors
911
- * Returns an error without a loaded project, for an unknown codec, or
912
- * when rendering/submission fails.
879
+ * Returns an error without a loaded project, for an unknown codec or pixel format, or when
880
+ * rendering or submission fails.
913
881
  */
914
- beginExportAt(time_ticks: bigint, codec: string): any;
882
+ beginExportAt(time_ticks: bigint, codec: string, pixels?: string | null): any;
915
883
  /**
916
884
  * Starts the next export render and returns before its GPU readback maps.
917
885
  *
918
- * A rendered result contains a `readback` promise. Calling this method
919
- * again while that promise is pending allows two or three independent GPU
920
- * readbacks to remain in flight. Waiting results still do not advance the
921
- * deterministic export cursor.
886
+ * A rendered result carries a `readback` promise; calling again while it is pending keeps
887
+ * two or three readbacks in flight. Waiting results do not advance the cursor.
922
888
  */
923
889
  beginExportFrame(): any;
924
890
  /**
925
- * Renders the next export frame and presents it on this renderer's
926
- * canvas instead of reading it back: the experimental transport where the
927
- * page captures the canvas with `new VideoFrame(canvas)` and hands that to
928
- * its encoder, so no frame is mapped or copied into script.
891
+ * Renders the next export frame and presents it on this renderer's canvas instead of
892
+ * reading it back (experimental): the page captures it with `new VideoFrame(canvas)`.
929
893
  *
930
- * The canvas must be sized to the export (`resizeSurface`) and must only
931
- * serve this export. Capture it before the next call, in the same task:
932
- * the next frame replaces the canvas's drawing buffer. Returns
933
- * `{kind: "rendered", index, timeTicks}`, or the `waiting` and `complete`
934
- * results `beginExportFrame` returns.
894
+ * The canvas must be sized to the export (`resizeSurface`) and serve only this export.
895
+ * Capture it in the same task, before the next call replaces the drawing buffer. Returns
896
+ * `{kind: "rendered", index, timeTicks}`, or the `waiting` and `complete` results of
897
+ * `beginExportFrame`.
935
898
  *
936
899
  * # Errors
937
- * Returns an error without a loaded project, a running export, or a
938
- * canvas, or when rendering or presentation fails.
900
+ * Returns an error without a loaded project, a running export, or a canvas, or when
901
+ * rendering or presentation fails.
939
902
  */
940
903
  beginExportPresent(): any;
941
904
  /**
942
905
  * Starts a deterministic export over a half-open timeline range.
943
906
  *
944
- * Resets the audio renderer, so `renderAudio` for the export does not
945
- * inherit preview's reverb tails, compressor envelopes, or ducking, and
946
- * makes it exact until `endExport` whatever `setAudioContinuity` chose,
947
- * so any jump replays. Until `endExport`, an audio block a source is missing from mixes
948
- * silence and advances nothing (`audioMissingSources` names the
949
- * sources), so rendering it again once they are uploaded continues
950
- * exactly as an uninterrupted export does.
907
+ * Resets the audio renderer so export audio inherits no preview DSP state, and keeps it
908
+ * exact until `endExport`. Until then, an audio block missing a source mixes silence and
909
+ * advances nothing (`audioMissingSources` names them), so re-rendering it after upload
910
+ * continues exactly.
951
911
  *
952
- * Export renders offscreen at [`QualityProfile::export`] and never touches
953
- * the presentation surface, so its output is independent of the canvas,
954
- * its size, and whatever the browser compositor is doing.
955
- *
956
- * The frames are packed for `codec`, an engine codec name (`h264`,
957
- * `hevc`, `vp9`, `av1`): its chroma siting
958
- * ([`alpha2_media::YuvEncoding::export`]).
912
+ * Renders offscreen at [`QualityProfile::export`], independent of the canvas. Frames are
913
+ * packed with the chroma siting of `codec` (`h264`, `hevc`, `vp9`, `av1`;
914
+ * [`alpha2_media::YuvEncoding::export`]).
959
915
  *
960
916
  * # Errors
961
- * Returns an error without a loaded project, for an empty range, an
962
- * invalid frame rate, or an unknown codec.
917
+ * Returns an error without a loaded project, for an empty range, an invalid frame rate, or
918
+ * an unknown codec.
963
919
  */
964
920
  beginExport(start_ticks: bigint, end_ticks: bigint, rate_num: number, rate_den: number, codec: string): void;
965
921
  /**
@@ -967,15 +923,14 @@ export class WebEffectRegistry {
967
923
  */
968
924
  builtinCatalog(): string;
969
925
  /**
970
- * What this renderer can do, as the shared capability report's JSON
971
- * (`alpha2-capabilities`) with runtime `browser`. Decoding, encoding,
972
- * and page features are the page's to add: `decode` and `encode` are
973
- * `null`, and `features` names only the renderer's own: `renderer.gpu`
974
- * (this one), `renderer.cpu` and `effects.runtime`, as the native host
975
- * names them.
926
+ * The shared capability report JSON (`alpha2-capabilities`) with runtime `browser`.
927
+ * `decode` and `encode` are `null` for the page to fill; `features` names only
928
+ * `renderer.gpu`, `renderer.cpu`, `effects.runtime`, and on WebGL2
929
+ * `uploads.webgl2-bitmap` (unavailable where frames upload as CPU pixels).
976
930
  *
977
931
  * # Errors
978
- * Returns an error if the report cannot be serialized.
932
+ * Returns an error if the report cannot be serialized, or on WebGL2 when the upload probe
933
+ * throws.
979
934
  */
980
935
  capabilityReport(): string;
981
936
  /**
@@ -999,45 +954,51 @@ export class WebEffectRegistry {
999
954
  */
1000
955
  clearFrames(): void;
1001
956
  /**
1002
- * Parses one JSON effect definition and compiles it on this binding's
1003
- * device, without rebuilding wasm. The promise resolves to the compiled
1004
- * effect, which [`Self::register_compiled_effect`] then adds; it rejects
1005
- * with the shader's diagnostics.
957
+ * Parses one JSON effect definition and compiles it on this binding's device. The promise
958
+ * resolves to the compiled effect for [`Self::register_compiled_effect`], or rejects with
959
+ * the shader's diagnostics.
1006
960
  *
1007
- * The call returns as soon as the shader and pipeline are created: the
1008
- * wait for the browser's compiler holds nothing of this binding, so it
1009
- * renders, uploads, compiles other effects, and may be freed meanwhile.
961
+ * Returns once the shader and pipeline are created; while the browser compiles, the
962
+ * binding stays fully usable and may be freed.
1010
963
  *
1011
964
  * # Errors
1012
- * Throws `EFFECT_ERROR` for a definition the engine refuses before
1013
- * compiling it.
965
+ * Throws `EFFECT_ERROR` for a definition the engine refuses before compiling.
1014
966
  */
1015
967
  compileEffect(json: string): Promise<any>;
1016
968
  /**
1017
- * Creates the renderer that draws on the CPU, for a browser that offers
1018
- * no WebGPU adapter and no WebGL2 context, or a page that asks for it.
1019
- * It needs no GPU: it presents preview frames on `canvas`'s 2D context
1020
- * (an `OffscreenCanvas` or a page canvas, `undefined` for none) and
1021
- * packs export frames in wasm, single-threaded, drawing what the native
1022
- * CPU renderer draws byte for byte. Runtime WGSL effects are refused.
969
+ * Creates the CPU renderer, for a browser with no WebGPU adapter or WebGL2 context, or on
970
+ * request. It presents preview frames on `canvas`'s 2D context (`OffscreenCanvas`, page
971
+ * canvas, or `undefined` for none) and packs export frames in wasm, single-threaded,
972
+ * byte-identical to the native CPU renderer. Runtime WGSL effects are refused.
1023
973
  *
1024
974
  * # Errors
1025
- * Rejects (`INVALID_INPUT`) a canvas that has no 2D context, such as
1026
- * one that already holds a WebGL or WebGPU context.
975
+ * Rejects (`INVALID_INPUT`) a canvas with no 2D context, such as one already holding a
976
+ * WebGL or WebGPU context.
1027
977
  */
1028
978
  static createCpu(canvas: any): WebCpuRenderer;
1029
979
  /**
1030
- * Creates a worker-owned renderer compatible with an `OffscreenCanvas`.
980
+ * Creates a worker-owned renderer for an `OffscreenCanvas`.
1031
981
  *
1032
- * Passing the surface during adapter selection enables wgpu's WebGL2
1033
- * fallback as well as browser WebGPU.
982
+ * Tries browser WebGPU first, then WebGL2. On WebGPU the device opens before the canvas is
983
+ * bound, so a failure leaves the canvas free for another context kind (such as the CPU
984
+ * renderer's 2D one). `options.softwareAdapter` is `"allow"` (default) or `"refuse"`;
985
+ * refused, a software adapter (WebGPU fallback, `SwiftShader`, llvmpipe, WARP) is skipped
986
+ * and the call rejects before binding the canvas if nothing else is offered.
987
+ *
988
+ * # Errors
989
+ * Rejects `GPU_INIT_FAILED` when no device opens or only a refused software adapter is
990
+ * offered; `GPU_DEVICE_LOST` when the canvas's WebGL context is lost and not restored;
991
+ * `INVALID_INPUT` for a canvas that takes no GPU surface or bad options.
1034
992
  */
1035
- static createForCanvas(canvas: OffscreenCanvas): Promise<WebEffectRegistry>;
993
+ static createForCanvas(canvas: OffscreenCanvas, options?: any | null): Promise<WebEffectRegistry>;
1036
994
  /**
1037
- * Creates a renderer that presents directly to a main-thread HTML canvas.
1038
- * Worker hosts should continue to use `createForCanvas` with an `OffscreenCanvas`.
995
+ * Creates a renderer presenting directly to a main-thread HTML canvas, as
996
+ * [`Self::create_for_canvas`] does for an `OffscreenCanvas`, with the same `options`.
997
+ *
998
+ * # Errors
999
+ * As [`Self::create_for_canvas`].
1039
1000
  */
1040
- static createForHtmlCanvas(canvas: HTMLCanvasElement): Promise<WebEffectRegistry>;
1001
+ static createForHtmlCanvas(canvas: HTMLCanvasElement, options?: any | null): Promise<WebEffectRegistry>;
1041
1002
  /**
1042
1003
  * Acquires a surface-independent WebGPU device.
1043
1004
  */
@@ -1053,82 +1014,61 @@ export class WebEffectRegistry {
1053
1014
  /**
1054
1015
  * Renders the next export frame and resolves with its pixels.
1055
1016
  *
1056
- * The promise resolves to `{ kind: "complete" }`, to
1057
- * `{ kind: "waiting", timeTicks, missingSources, missingFrames }` when the
1058
- * host has not supplied every source (`missingFrames` names the source
1059
- * time each clip needs, as `renderAt` names it), or to
1060
- * `{ kind: "rendered", index, timeTicks,
1061
- * width, height, format: "I420", colorSpace, layout, pixels }`, where
1062
- * `pixels` holds the planes with padded rows at the offsets and strides
1063
- * `layout` gives. Waiting never advances the cursor, so a retry after
1064
- * uploading cannot skip a timestamp.
1017
+ * Resolves to `{ kind: "complete" }`; to `{ kind: "waiting", timeTicks, missingSources,
1018
+ * missingFrames }` when a source is missing (`missingFrames` as `renderAt` reports it); or
1019
+ * to `{ kind: "rendered", index, timeTicks, width, height, format: "I420", colorSpace,
1020
+ * layout, pixels }` with padded planes at `layout`'s offsets and strides. Waiting never
1021
+ * advances the cursor.
1065
1022
  *
1066
1023
  * # Errors
1067
- * Returns an error without a running export or a loaded project. The
1068
- * promise rejects with an error carrying `failure` when the readback
1069
- * times out, the device is lost, or the mapping fails.
1024
+ * Returns an error without a running export or loaded project. The promise rejects with a
1025
+ * `failure` when the readback times out, the device is lost, or the mapping fails.
1070
1026
  */
1071
1027
  exportFrame(): Promise<any>;
1072
1028
  /**
1073
- * Completed and total frame counts for the running export, and the
1074
- * timeline range it covers, as JSON.
1029
+ * Completed and total frame counts for the running export and the range it covers, as
1030
+ * JSON.
1075
1031
  *
1076
- * `effectiveRange` is the requested range widened to the frame grid. Its
1077
- * start is the output's zero, which is where the export's audio starts.
1078
- * `audioWindow` is the project-rate samples the export's audio covers:
1079
- * `startSample` (a decimal string) is the mix position written at the
1080
- * output's zero, and `frames` the sample count. Every host takes its
1081
- * audio from these, never from the request.
1032
+ * `effectiveRange` is the requested range widened to the frame grid; its start is the
1033
+ * output's zero. `audioWindow` is the project-rate samples the export's audio covers:
1034
+ * `startSample` (a decimal string) at the output's zero, and `frames`. Hosts take audio
1035
+ * from these, never from the request.
1082
1036
  *
1083
1037
  * # Errors
1084
- * Returns an error when no export is running, or when the range does
1085
- * not fit in samples.
1038
+ * Returns an error when no export is running or the range does not fit in samples.
1086
1039
  */
1087
1040
  exportProgress(): string;
1088
1041
  /**
1089
- * Exact clip/source/timestamp requests from the same immutable snapshot
1090
- * used by `renderAt`. Hosts must keep separate decoder cursors for distinct
1091
- * clip IDs. Tick values are strings so JavaScript can preserve i64.
1042
+ * Exact clip/source/timestamp requests from the same snapshot `renderAt` uses. Hosts keep
1043
+ * separate decoder cursors per clip ID. Tick values are strings to preserve i64.
1092
1044
  */
1093
1045
  frameNeeds(time_ticks: bigint): string;
1094
1046
  /**
1095
- * Whether the loaded project declares `source_id` an HDR (PQ or HLG)
1096
- * source, whose frames must reach the engine through
1097
- * [`Self::upload_yuv_frame`].
1047
+ * Whether the loaded project declares `source_id` an HDR (PQ or HLG) source, whose frames
1048
+ * must go through [`Self::upload_yuv_frame`].
1098
1049
  */
1099
1050
  hdrSource(source_id: string): boolean;
1100
1051
  /**
1101
- * Whether the still `sourceId` is still the upload `generation` names.
1102
- * The store drops stills on its own (the uploaded-frame budget and a
1103
- * limit on how many it keeps), so a host that skips uploading a still it
1104
- * uploaded before asks here first.
1052
+ * Whether the still `sourceId` is still the upload `generation` names. The store evicts
1053
+ * stills on its own, so a host checks before skipping a re-upload.
1105
1054
  */
1106
1055
  holdsImage(source_id: string, generation: bigint): boolean;
1107
1056
  /**
1108
1057
  * Loads and validates a versioned project document.
1109
1058
  *
1110
- * Replacing a project keeps the audio windows and frames uploaded for
1111
- * every source whose ID and locator are unchanged, so an edit does not
1112
- * mean re-decoding. Frames already prepared for presentation are the
1113
- * picture converted and fitted under the project they were uploaded to:
1114
- * a new canvas size or color pipeline (`settings.color`) invalidates them
1115
- * all, and a source's new declared color (`color_metadata`) its own.
1116
- * Raw uploads and audio remain reusable. Sources that are gone or
1117
- * relocated lose theirs, and all audio goes when the project sample rate
1118
- * changes. Media that changes under an unchanged locator needs a new
1119
- * source ID.
1120
- *
1121
- * Loading ends a running export (`endExport`): an export renders the
1122
- * project it began with, so its next step is refused rather than
1123
- * rendering this one.
1059
+ * Uploaded frames and audio are kept for every source whose ID and locator are unchanged,
1060
+ * so an edit needs no re-decode. Presentation frames are invalidated by a new canvas size
1061
+ * or color pipeline (`settings.color`), or per source by new declared color
1062
+ * (`color_metadata`). All audio is dropped when the project sample rate changes. Media
1063
+ * that changes under an unchanged locator needs a new source ID.
1064
+ *
1065
+ * Loading ends a running export (`endExport`), so its next step is refused.
1124
1066
  */
1125
1067
  loadProject(json: string): void;
1126
1068
  /**
1127
- * The loudness measured since metering started, as JSON (see
1128
- * `LoudnessReport` in `alpha2/loudness`), or `null` while it is off.
1129
- * It states the threshold of the master limiter it measured in front of
1130
- * (`limiterThreshold`, `null` without one), which
1131
- * `planLoudnessNormalization` keeps the normalized mix under.
1069
+ * The loudness measured since metering started as JSON (`LoudnessReport` in
1070
+ * `alpha2/loudness`), or `null` while off. `limiterThreshold` (or `null`) is the master
1071
+ * limiter it measured in front of, which `planLoudnessNormalization` keeps the mix under.
1132
1072
  */
1133
1073
  loudnessReport(): string;
1134
1074
  /**
@@ -1136,12 +1076,17 @@ export class WebEffectRegistry {
1136
1076
  */
1137
1077
  presentUploadedFrame(source_id: string, media_time_ticks: bigint): void;
1138
1078
  /**
1139
- * Adds an effect [`Self::compile_effect`] compiled on this binding and
1140
- * returns its `id@version`. The compiled effect is consumed either way.
1079
+ * The registered runtime effects the loaded project can draw, as `id@version` strings,
1080
+ * sorted; empty without a project. Built-ins are not listed.
1081
+ */
1082
+ projectRuntimeEffects(): string[];
1083
+ /**
1084
+ * Adds an effect [`Self::compile_effect`] compiled on this binding and returns its
1085
+ * `id@version`. The compiled effect is consumed either way.
1141
1086
  *
1142
1087
  * # Errors
1143
- * Throws `EFFECT_ERROR` for an effect compiled by another binding, one
1144
- * registered while it compiled, or a full registry.
1088
+ * Throws `EFFECT_ERROR` for an effect compiled by another binding, one registered while it
1089
+ * compiled, or a full registry.
1145
1090
  */
1146
1091
  registerCompiledEffect(compiled: CompiledEffect): string;
1147
1092
  /**
@@ -1149,12 +1094,12 @@ export class WebEffectRegistry {
1149
1094
  */
1150
1095
  registerLut3d(id: string, cube: string): void;
1151
1096
  /**
1152
- * Drops one source's retained audio.
1097
+ * Drops one source's retained audio, every stream of it.
1153
1098
  */
1154
1099
  releaseAudioSource(source_id: string): boolean;
1155
1100
  /**
1156
- * Releases exactly one uploaded generation without affecting a newer
1157
- * texture stored under the same source and timestamp.
1101
+ * Releases exactly one uploaded generation, leaving any newer texture under the same
1102
+ * source and timestamp.
1158
1103
  */
1159
1104
  releaseFrameGeneration(generation: bigint): boolean;
1160
1105
  /**
@@ -1162,42 +1107,33 @@ export class WebEffectRegistry {
1162
1107
  */
1163
1108
  releaseFrame(source_id: string, media_time_ticks: bigint): boolean;
1164
1109
  /**
1165
- * Gives back the GPU memory the renderer keeps only for reuse (idle
1166
- * pooled textures and buffers, and kept graph results), destroying each
1167
- * so the browser frees it now rather than at garbage collection, and
1168
- * returns the bytes destroyed. Nothing a render or readback still holds
1169
- * is released; later work allocates again what it needs. An export
1170
- * calls it when its byte budget stops it submitting.
1110
+ * Destroys GPU memory kept only for reuse (idle pooled textures and buffers, kept graph
1111
+ * results) so the browser frees it now rather than at garbage collection, and returns the
1112
+ * bytes destroyed. Nothing a render or readback holds is released. An export calls it
1113
+ * when its byte budget stops it submitting.
1171
1114
  */
1172
1115
  releaseIdleMemory(): number;
1173
1116
  /**
1174
- * Releases every uploaded frame and the still of one source, for a host
1175
- * whose media for it changed under the same ID and locator. Generations
1176
- * already retired stay until they are released.
1117
+ * Releases every uploaded frame and the still of one source whose media changed under the
1118
+ * same ID and locator. Retired generations stay until released.
1177
1119
  */
1178
1120
  releaseSourceFrames(source_id: string): boolean;
1179
1121
  /**
1180
1122
  * Evaluates and presents one project frame on the worker-owned canvas.
1181
1123
  *
1182
- * Returns JSON `{ requestedTimeTicks, presentedTimeTicks, missingSources,
1183
- * missingFrames, repeated, unchanged }`: `presentedTimeTicks` is `null`
1184
- * until a frame has been presented, and `missingFrames` names the exact
1185
- * source time each missing source was needed at. `unchanged` says the
1186
- * frame equals the one presented last (see `Player::render_at`): nothing
1187
- * was rendered or presented, and the canvas still shows it.
1124
+ * Returns JSON `{ requestedTimeTicks, presentedTimeTicks, missingSources, missingFrames,
1125
+ * repeated, unchanged }`. `presentedTimeTicks` is `null` until a frame is presented;
1126
+ * `missingFrames` gives the exact source time each missing source was needed at;
1127
+ * `unchanged` means the frame equals the last one, so nothing was rendered or presented.
1188
1128
  */
1189
1129
  renderAt(time_ticks: bigint): string;
1190
1130
  /**
1191
- * Mixes one project audio block of at most `audioMaxBlock` samples per
1192
- * channel and returns its planar samples. A host mixes a longer span as
1193
- * consecutive blocks.
1194
- *
1195
- * Channels are returned end to end. Call `audioStatus` for the sources
1196
- * that were missing from the mix.
1131
+ * Mixes one project audio block of at most `audioMaxBlock` samples per channel and returns
1132
+ * its planar samples, channels end to end. Missing sources are reported by
1133
+ * `audioMissingSources`.
1197
1134
  *
1198
1135
  * # Errors
1199
- * Rejects (`INVALID_INPUT`, not fatal) more than `audioMaxBlock` frames,
1200
- * naming the limit.
1136
+ * Rejects (`INVALID_INPUT`, not fatal) more than `audioMaxBlock` frames.
1201
1137
  */
1202
1138
  renderAudio(start_sample: bigint, frames: number, playing: boolean): Float32Array;
1203
1139
  /**
@@ -1213,112 +1149,97 @@ export class WebEffectRegistry {
1213
1149
  */
1214
1150
  resizeSurface(width: number, height: number): void;
1215
1151
  /**
1216
- * Chooses what `renderAudio` does, outside an export, with a block that
1217
- * does not start where the previous one ended. `"exact"` (the default)
1218
- * resets and replays the settling history before it, so it mixes what a
1219
- * fresh renderer would. `"continue-small-gaps"` is for live preview: a
1220
- * block at most `audioMaxBlock` samples before or after where the last
1221
- * one ended continues from the state that one left, costing one block
1222
- * rather than a replay of up to 30 s, and only a longer jump (or the
1223
- * first block after `resetAudio`) replays. Its mix after such a step is
1224
- * not what a fresh renderer mixes, so loudness measurements and other
1225
- * output that must repeat stay exact. From `beginExport` to `endExport`
1226
- * the renderer is exact whatever is chosen. Choosing another policy than
1227
- * the current one resets the audio, as `resetAudio` does.
1152
+ * Chooses what `renderAudio` does, outside an export, with a block that does not start
1153
+ * where the previous one ended.
1154
+ *
1155
+ * `"exact"` (default) resets and replays the settling history, mixing what a fresh
1156
+ * renderer would. `"continue-small-gaps"` is for live preview: a jump of at most
1157
+ * `audioMaxBlock` samples continues from the previous state instead of replaying up to
1158
+ * 30 s, so its output is not reproducible. Exports are always exact. Changing the policy
1159
+ * resets the audio, as `resetAudio` does.
1228
1160
  *
1229
1161
  * # Errors
1230
1162
  * Rejects any other policy name (`INVALID_INPUT`, not fatal).
1231
1163
  */
1232
1164
  setAudioContinuity(policy: string): void;
1233
1165
  /**
1234
- * Starts (from empty) or stops measuring the loudness of the mix before
1235
- * the master limiter, over the blocks `renderAudio` renders from now on.
1236
- * Starting removes the normalization gain, so it measures the mix as
1237
- * authored; a block a source was missing from is not measured.
1166
+ * Starts (from empty) or stops measuring loudness of the mix before the master limiter,
1167
+ * over subsequent `renderAudio` blocks. Starting removes the normalization gain so the mix
1168
+ * is measured as authored; blocks with a missing source are not measured.
1238
1169
  *
1239
1170
  * # Errors
1240
1171
  * Returns an error without an audio renderer.
1241
1172
  */
1242
1173
  setLoudnessMetering(enabled: boolean): void;
1243
1174
  /**
1244
- * Applies a static gain, in dB, after the master gain and before the
1245
- * limiter; zero removes it, and so does `setLoudnessMetering(true)`. A
1246
- * loudness-normalized export sets the gain `planLoudnessNormalization`
1247
- * returns before rendering its audio; the gain stays until it is set
1248
- * again, so set zero for audio after it that is not normalized.
1175
+ * Applies a static gain in dB after the master gain and before the limiter; zero or
1176
+ * `setLoudnessMetering(true)` removes it. A normalized export sets the gain
1177
+ * `planLoudnessNormalization` returns; it persists until set again.
1249
1178
  *
1250
1179
  * # Errors
1251
- * Returns an error without an audio renderer, or for a gain that is not
1252
- * finite or whose factor a 32-bit float cannot hold (`INVALID_INPUT`).
1180
+ * Returns an error without an audio renderer, or for a gain that is not finite or whose
1181
+ * factor overflows a 32-bit float (`INVALID_INPUT`).
1253
1182
  */
1254
1183
  setNormalizationGainDb(gain_db: number): void;
1255
1184
  /**
1256
- * Enables or disables per-pass GPU/CPU timing collection.
1257
- *
1258
- * Disabled by default: timing reads a clock per pass and allocates GPU
1259
- * timestamp resources, which is profiling cost rather than rendering work.
1260
- * Every other field of `diagnostics()` is always available.
1185
+ * Enables or disables per-pass GPU/CPU timing in `diagnostics()`. Off by default because
1186
+ * it reads a clock per pass and allocates GPU timestamp resources.
1261
1187
  */
1262
1188
  setPassTiming(enabled: boolean): void;
1263
1189
  /**
1264
- * Renders preview frames at `scale` times the project's size from now
1265
- * on (the preview quality profile's resolution scale; 0.5 until set, 1
1266
- * renders at the project's resolution). Drops the held frame, so the
1267
- * next `renderAt` presents. Size the surface to `previewSize` after it.
1190
+ * Renders preview frames at `scale` times the project size from now on (default 0.5).
1191
+ * Drops the held frame so the next `renderAt` presents; resize the surface to
1192
+ * `previewSize` afterwards.
1268
1193
  *
1269
1194
  * # Errors
1270
1195
  * Rejects a scale that is not finite, above 0 and at most 8.
1271
1196
  */
1272
1197
  setPreviewScale(scale: number): void;
1273
1198
  /**
1274
- * Lets rendered results (each clip's finished picture and the frame)
1275
- * occupy up to `bytes` of GPU memory, to be found again when a frame
1276
- * repeats; zero, the default, turns that off. Only results drawn from
1277
- * sources whose upload is reused are found again: a still, or a frame the
1278
- * page uploads once and draws at several times.
1199
+ * Lets rendered results (each clip's finished picture and the frame) use up to `bytes` of
1200
+ * GPU memory for reuse when a frame repeats; zero (the default) disables it. Only results
1201
+ * from reused uploads hit: a still, or a frame uploaded once and drawn at several times.
1279
1202
  *
1280
1203
  * # Errors
1281
1204
  * Rejects a negative or non-finite budget.
1282
1205
  */
1283
1206
  setResultCacheBudget(bytes: number): void;
1284
1207
  /**
1285
- * Sets the cache budget for live, image, and retired generations (default
1286
- * 1 GiB); aliases count once. The oldest generations are released first.
1287
- * A newly uploaded frame larger than this budget is kept alone. While an
1288
- * export frame waits for its sources, the ones it shows are pinned: the
1289
- * budget releases everything else first and never them, and the upload
1290
- * or alias that would make them outgrow it is refused with
1291
- * `RESOURCE_LIMIT` (`failure.stage` `working-set-over-budget`,
1292
- * `failure.requestedBytes` the bytes the frame needs at least), as no
1293
- * refill could make the frame fit. Renderer pools and submitted GPU work
1294
- * have separate lifetime/budget accounting.
1208
+ * Sets the cache budget for live, image, and retired generations (default 1 GiB); aliases
1209
+ * count once and the oldest generations go first. A new frame larger than the budget is
1210
+ * kept alone.
1211
+ *
1212
+ * While an export frame waits for its sources, those it shows are pinned. The budget
1213
+ * evicts everything else first, and an upload or alias that would push them over is
1214
+ * refused with `RESOURCE_LIMIT` (`failure.stage` `working-set-over-budget`,
1215
+ * `failure.requestedBytes` the minimum the frame needs).
1295
1216
  */
1296
1217
  setUploadedFrameBudget(bytes: number): void;
1297
1218
  /**
1298
- * The color metadata the loaded project declares for `source_id`, as
1299
- * JSON, or `undefined` when it declares none.
1219
+ * The color metadata the loaded project declares for `source_id`, as JSON, or `undefined`.
1300
1220
  */
1301
1221
  sourceColorMetadata(source_id: string): string | undefined;
1302
1222
  /**
1303
- * Limits WebGPU preview work to a completed submission before the host
1304
- * starts its next frame. Returning a Promise (rather than an async method)
1305
- * releases the wasm object borrow immediately, allowing edits while waiting.
1306
- * WebGL submits synchronously through wgpu-core and uses its own retention.
1223
+ * Resolves when submitted WebGPU preview work completes, so the host can pace frames. The
1224
+ * returned promise releases the wasm borrow at once, allowing edits while waiting.
1307
1225
  */
1308
1226
  submittedWorkDone(): Promise<any>;
1309
1227
  /**
1310
- * Discards `source_id`'s retained audio that ends before `ticks`, a time
1311
- * on that source's own timeline. Other sources keep theirs; a source
1312
- * that two clips read at different times is trimmed only below what
1313
- * both still need. A host calls it as playback moves on, a few seconds
1314
- * behind the earliest time a mix still reads of the source.
1228
+ * How frames rendered since the last call were split into GPU submissions to stay under
1229
+ * the watchdog budget, as JSON `{ frames, splitFrames, maxPerFrame, maxPredictedMs }` (the
1230
+ * native host's `performance.gpuSubmissions`). Resets the counts.
1231
+ */
1232
+ takeGpuSubmissionStats(): string;
1233
+ /**
1234
+ * Discards `source_id`'s audio that ends before `ticks`, a time on that source's own
1235
+ * timeline. A source two clips read at different times is trimmed only below what both
1236
+ * need. Call it as playback moves on, a few seconds behind the earliest time still mixed.
1315
1237
  */
1316
1238
  trimAudioBefore(source_id: string, ticks: bigint): void;
1317
1239
  /**
1318
- * Releases `source_id`'s timestamped video frames older than
1319
- * `media_time_ticks`, a time on that source's own timeline. Other
1320
- * sources keep theirs; a source that two clips read at different times
1321
- * is trimmed only below what both still need.
1240
+ * Releases `source_id`'s video frames older than `media_time_ticks`, a time on that
1241
+ * source's own timeline. A source two clips read at different times is trimmed only below
1242
+ * what both need.
1322
1243
  */
1323
1244
  trimFramesBefore(source_id: string, media_time_ticks: bigint): void;
1324
1245
  /**
@@ -1332,142 +1253,141 @@ export class WebEffectRegistry {
1332
1253
  /**
1333
1254
  * Uploads project-rate planar audio for one source.
1334
1255
  *
1335
- * `start_sample` is the index of the first sample in the source, at the
1336
- * project rate. `layout` names the speaker each plane feeds: an array of
1337
- * `FFmpeg` channel names in plane order (`["FC", "FL", "FR"]`; `"UNK"`
1338
- * for a plane no speaker names), or a channel count for the count's
1339
- * default layout (`FFmpeg`'s: 3 is 2.1, 4 is 4.0). 1 to 24 planes.
1340
- * `samples` holds each plane end to end; the engine folds them into the
1341
- * project's channels by speaker. An upload replaces the windows it
1342
- * overlaps, which is what a seek needs, and joins the ones of the same
1343
- * speakers it meets at either end into one; any other is a window of
1344
- * its own.
1345
- *
1346
- * The mixer reads a window only where it holds every sample a block
1347
- * needs, so a host decoding past a source's end uploads zeros there, as
1348
- * the supplied decoders do. `ends_source` says instead that this upload
1349
- * runs to the source's end, so past it the source is silent: pass it
1350
- * with a whole decoded source, whose clips may end exactly at its end
1351
- * and read an interpolation sample or two beyond.
1352
- */
1353
- uploadAudioBlock(source_id: string, start_sample: bigint, sample_rate: number, layout: any, samples: Float32Array, ends_source?: boolean | null): void;
1354
- /**
1355
- * [`Self::upload_presented_video_frame`] for a bitmap made of the frame
1356
- * with `createImageBitmap(frame, { premultiplyAlpha: "none" })`, which
1357
- * skips the canvas draw where `videoFrameCopy` is `"bitmap"`. Always
1358
- * closes `bitmap`; a source the project declares HDR is refused.
1256
+ * `start_sample` is the first sample's index in the source at the project rate. `layout`
1257
+ * names each plane's speaker: an array of `FFmpeg` channel names in plane order
1258
+ * (`["FC", "FL", "FR"]`, `"UNK"` for none), or a channel count for `FFmpeg`'s default
1259
+ * layout (3 is 2.1, 4 is 4.0); 1 to 24 planes. `samples` holds the planes end to end. An
1260
+ * upload replaces windows it overlaps and joins same-speaker windows it meets.
1261
+ *
1262
+ * The mixer reads a window only where it holds every sample a block needs, so a host
1263
+ * decoding past a source's end uploads zeros there. Alternatively pass `ends_source` with
1264
+ * an upload that runs to the source's end, so the source is silent after it.
1265
+ *
1266
+ * `stream` is the audio stream an `audioNeeds` entry names (absent for the default one);
1267
+ * each stream of a source is held apart.
1268
+ */
1269
+ uploadAudioBlock(source_id: string, start_sample: bigint, sample_rate: number, layout: any, samples: Float32Array, ends_source?: boolean | null, stream?: number | null): void;
1270
+ /**
1271
+ * [`Self::upload_presented_video_frame`] for a frame the engine should convert from planes
1272
+ * (HDR, or declared color) but the browser decodes only without planes. The browser's
1273
+ * conversion (and tone mapping) imports it, drawn as SDR BT.709.
1274
+ *
1275
+ * The source is then degraded: `renderAt` lists it in `degradedSources`, and any export
1276
+ * frame showing it is refused with `PLANAR_DECODE_UNAVAILABLE`, so browser and native
1277
+ * exports never differ by the browser's conversion. A planar or presented upload of the
1278
+ * source clears this. Always closes `frame`.
1279
+ */
1280
+ uploadDegradedVideoFrame(source_id: string, media_time_ticks: bigint, frame: VideoFrame, output_width: number, output_height: number, rotation_degrees: number, mirror: boolean): any;
1281
+ /**
1282
+ * [`Self::upload_presented_video_frame`] for a bitmap from
1283
+ * `createImageBitmap(frame, { premultiplyAlpha: "none" })`, skipping the canvas draw where
1284
+ * `videoFrameCopy` is `"bitmap"`. Always closes `bitmap`; HDR sources are refused.
1359
1285
  */
1360
1286
  uploadPresentedImageBitmap(source_id: string, media_time_ticks: bigint, bitmap: ImageBitmap, output_width: number, output_height: number, rotation_degrees: number, mirror: boolean): any;
1361
1287
  /**
1362
- * Like [`Self::upload_presented_rgba_frame`], for premultiplied
1363
- * linear-light RGBA half floats (their bits) in BT.709 primaries, as
1364
- * OpenEXR sources arrive: values above `1.0` and below `0.0` are kept
1365
- * as far as the intermediate format holds them.
1288
+ * Like [`Self::upload_presented_rgba_frame`], for premultiplied linear-light RGBA half
1289
+ * floats (as bits) in BT.709 primaries, as `OpenEXR` sources arrive. Values outside
1290
+ * `0.0..=1.0` are kept as far as the intermediate format allows.
1366
1291
  */
1367
1292
  uploadPresentedLinearFrame(source_id: string, media_time_ticks: bigint, width: number, height: number, pixels: Uint16Array, output_width: number, output_height: number): any;
1368
1293
  /**
1369
- * Like [`Self::upload_presented_linear_frame`], for a still shown at
1370
- * every time.
1294
+ * Like [`Self::upload_presented_linear_frame`], for a still shown at every time.
1371
1295
  */
1372
1296
  uploadPresentedLinearImage(source_id: string, width: number, height: number, pixels: Uint16Array, output_width: number, output_height: number): any;
1373
1297
  /**
1374
- * Uploads a frame of RGBA8 pixels at its own size and presents it into
1375
- * the output as the engine presents every source (contained, on the
1376
- * GPU), so a page never scales a source itself. `premultiplied` says
1377
- * whether the color is already multiplied by alpha. Extension
1378
- * providers' frames arrive this way.
1298
+ * Uploads RGBA8 pixels at their own size and presents them into the output as the engine
1299
+ * presents every source (contained, on the GPU), so a page never scales a source itself.
1300
+ * `premultiplied` says whether color is already multiplied by alpha. Extension providers'
1301
+ * frames arrive this way.
1379
1302
  */
1380
1303
  uploadPresentedRgbaFrame(source_id: string, media_time_ticks: bigint, width: number, height: number, pixels: Uint8Array, premultiplied: boolean, output_width: number, output_height: number): any;
1381
1304
  /**
1382
- * Like [`Self::upload_presented_rgba_frame`], for a still shown at every
1383
- * time.
1305
+ * Like [`Self::upload_presented_rgba_frame`], for a still shown at every time.
1384
1306
  */
1385
1307
  uploadPresentedRgbaImage(source_id: string, width: number, height: number, pixels: Uint8Array, premultiplied: boolean, output_width: number, output_height: number): any;
1386
1308
  /**
1387
- * Imports a decoded `VideoFrame` without reading its pixels back to the
1388
- * CPU, then applies contain placement, rotation, filtering, and alpha
1389
- * premultiplication in a GPU presentation pass. The frame is shown
1390
- * mirrored left to right when `mirror` is set, then turned clockwise by
1391
- * `rotation_degrees`: how its stream says it is shown upright.
1309
+ * Imports a decoded `VideoFrame` without a CPU readback, then applies contain placement,
1310
+ * rotation, filtering, and alpha premultiplication in a GPU pass. The frame is mirrored
1311
+ * left to right when `mirror` is set, then turned clockwise by `rotation_degrees`.
1392
1312
  *
1393
- * Browser WebGPU copies the frame into a texture directly, or, where the
1394
- * browser does not take a `VideoFrame` (Firefox), copies it through a
1395
- * reused 2D canvas's bitmap. WebGL2 always uploads that bitmap.
1313
+ * Browser WebGPU copies the frame directly, or through a reused 2D canvas bitmap where the
1314
+ * browser does not take a `VideoFrame` (Firefox). WebGL2 always uploads the bitmap.
1396
1315
  * `videoFrameCopy` says which.
1397
1316
  *
1398
- * Both copies go through the page's own color conversion, so an HDR
1399
- * frame (PQ or HLG, by the color the project declares for the source,
1400
- * else by the frame's `colorSpace`) is refused with `INVALID_INPUT`
1401
- * whatever the project's HDR policy: its planes go to
1402
- * [`Self::upload_yuv_frame`], which converts them as the project says.
1317
+ * Both paths use the page's own color conversion, so an HDR frame (PQ or HLG, by the
1318
+ * project's declared color for the source, else the frame's `colorSpace`) is refused with
1319
+ * `INVALID_INPUT`; send its planes to [`Self::upload_yuv_frame`] instead.
1403
1320
  */
1404
1321
  uploadPresentedVideoFrame(source_id: string, media_time_ticks: bigint, frame: VideoFrame, output_width: number, output_height: number, rotation_degrees: number, mirror: boolean): any;
1405
1322
  /**
1406
- * Uploads tightly packed premultiplied RGBA8 pixels.
1407
- *
1408
- * This compatibility path is used by WebGL2, whose wgpu backend cannot
1409
- * import a browser `VideoFrame` directly.
1323
+ * Uploads tightly packed premultiplied RGBA8 pixels. Used by WebGL2, whose wgpu backend
1324
+ * cannot import a `VideoFrame` directly.
1410
1325
  */
1411
1326
  uploadRgbaFrame(source_id: string, media_time_ticks: bigint, width: number, height: number, pixels: Uint8Array): any;
1412
1327
  /**
1413
- * Uploads one time-independent still image, retained until its generation
1414
- * is released. Video uploads continue to require an exact timestamp.
1328
+ * Uploads one time-independent still image, kept until its generation is released.
1415
1329
  */
1416
1330
  uploadRgbaImage(source_id: string, width: number, height: number, pixels: Uint8Array): any;
1417
1331
  /**
1418
- * Uploads a decoded browser frame as [`Self::upload_presented_video_frame`]
1419
- * does, upright, fitted to the loaded project's size (or kept at the
1420
- * frame's display size when no project is loaded), and stored under
1332
+ * Uploads a decoded browser frame as [`Self::upload_presented_video_frame`] does, upright,
1333
+ * fitted to the loaded project's size (or the frame's display size with no project), under
1421
1334
  * `source_id` at `media_time_ticks`.
1422
1335
  *
1423
- * Ownership of `frame` transfers to this call and it is always closed before
1424
- * returning. An HDR frame is refused, as [`Self::upload_presented_video_frame`]
1425
- * refuses it.
1336
+ * Takes ownership of `frame` and always closes it. HDR frames are refused.
1426
1337
  */
1427
1338
  uploadVideoFrame(source_id: string, media_time_ticks: bigint, frame: VideoFrame): any;
1428
1339
  /**
1429
- * Uploads a decoded frame's planar YCbCr samples, as
1430
- * `VideoFrame.copyTo` writes them, and converts them with the engine's
1431
- * own shader under the loaded project's color pipeline.
1432
- *
1433
- * This is how HDR (PQ or HLG) frames reach the engine: copying a
1434
- * `VideoFrame` into a texture goes through the page's color conversion,
1435
- * which does not carry them. `format` is a `WebCodecs` pixel format:
1436
- * `I420`, `I422`, or `I444` at 8, 10 (`P10`), or 12 bits (`P12`), the
1437
- * same with an alpha plane (`I420A`, `I420AP10`, ...), or `NV12`; samples
1438
- * above eight bits are 16-bit words holding the value in their low bits.
1439
- * `layout` is `[offset, stride]` per plane, `visible` the visible
1440
- * rectangle `[x, y, width, height]`, and `color` the frame's color
1441
- * metadata as project JSON. `chroma_siting` (`left`, `center`,
1442
- * `top-left`, or `unspecified`) is where the stream puts its chroma
1443
- * samples, which `WebCodecs` leaves to the demuxer to know.
1444
- * `display_width` by `display_height` is the size the visible rectangle
1445
- * is shown at before it is turned (a `VideoFrame`'s `displayWidth` and
1446
- * `displayHeight`), which gives the pixel aspect ratio. The frame is
1447
- * shown mirrored left to right when `mirror` is set, then turned
1340
+ * Uploads a decoded frame's planar YCbCr samples as `VideoFrame.copyTo` writes them and
1341
+ * converts them with the engine's shader under the project's color pipeline. This is how
1342
+ * HDR (PQ or HLG) frames reach the engine, since texture copies go through the page's
1343
+ * color conversion.
1344
+ *
1345
+ * `format` is a `WebCodecs` pixel format: `I420`, `I422`, or `I444` at 8, 10 (`P10`), or
1346
+ * 12 bits (`P12`), the same with alpha (`I420A`, `I420AP10`, ...), or `NV12`. Samples
1347
+ * above eight bits are 16-bit words with the value in the low bits. `layout` is
1348
+ * `[offset, stride]` per plane, `visible` is `[x, y, width, height]`, and `color` is the
1349
+ * frame's color metadata as project JSON. `chroma_siting` is `left`, `center`, `top-left`,
1350
+ * or `unspecified` (`WebCodecs` leaves it to the demuxer). `display_width` by
1351
+ * `display_height` is the visible rectangle's display size before rotation, which gives
1352
+ * the pixel aspect ratio. The frame is mirrored when `mirror` is set, then turned
1448
1353
  * clockwise by `rotation_degrees`.
1449
1354
  *
1450
1355
  * # Errors
1451
- * Rejects (`INVALID_INPUT`) an unknown format or chroma siting, a layout
1452
- * or plane that does not fit the data, a bad size or rotation, and an
1453
- * HDR frame when the project's color pipeline refuses HDR sources.
1356
+ * Rejects (`INVALID_INPUT`) an unknown format or chroma siting, a layout or plane that does
1357
+ * not fit the data, a bad size or rotation, and an HDR frame the project's color pipeline
1358
+ * refuses.
1454
1359
  */
1455
1360
  uploadYuvFrame(source_id: string, media_time_ticks: bigint, format: string, coded_width: number, coded_height: number, data: Uint8Array, layout: Uint32Array, visible: Uint32Array, display_width: number, display_height: number, color: string, chroma_siting: string, output_width: number, output_height: number, rotation_degrees: number, mirror: boolean): any;
1361
+ /**
1362
+ * The adapter as the browser names it: wgpu's name (the unmasked WebGL renderer or a
1363
+ * WebGPU adapter's description), else `<vendor> <architecture>`; empty when unnamed.
1364
+ */
1365
+ readonly adapter: string;
1456
1366
  /**
1457
1367
  * The most samples per channel one `renderAudio` call mixes.
1458
1368
  */
1459
1369
  readonly audioMaxBlock: number;
1460
1370
  /**
1461
- * Reports whether the owning worker must recreate this binding: its
1462
- * device or context was lost, or the renderer found the GPU unable to
1463
- * run work (completing it without running it, or making nothing more),
1464
- * after which it refuses every readback. A frame the GPU rejected for an
1465
- * error is not that: it failed alone, and the binding renders on.
1371
+ * The graphics API this renderer draws through: `"webgpu"` or `"webgl2"`.
1372
+ */
1373
+ readonly backend: string;
1374
+ /**
1375
+ * Whether the owning worker must recreate this binding: its device or context was lost,
1376
+ * or the GPU stopped running work, after which every readback is refused. A frame the GPU
1377
+ * rejected with an error is not a loss; the binding renders on.
1466
1378
  */
1467
1379
  readonly deviceLost: boolean;
1468
1380
  /**
1469
- * The loaded project's render size at the preview scale, `[width,
1470
- * height]`: the size `renderAt` renders and the surface should have.
1381
+ * After a loss ([`Self::device_lost`]), what the renderer's submission times say about it,
1382
+ * as JSON `{ hung, gpuMs, watchdogMs, timeTicks, frameIndex, effects, predictedMs }`.
1383
+ * `hung` means the longest recent submission ran at least half the GPU watchdog, so the
1384
+ * loss was most likely this work's and rerunning it would stop the GPU again. `undefined`
1385
+ * before any loss.
1386
+ */
1387
+ readonly lossReport: string | undefined;
1388
+ /**
1389
+ * The loaded project's render size at the preview scale, `[width, height]`: what
1390
+ * `renderAt` renders and the surface should be.
1471
1391
  *
1472
1392
  * # Errors
1473
1393
  * Fails when no project is loaded.
@@ -1482,9 +1402,8 @@ export class WebEffectRegistry {
1482
1402
  */
1483
1403
  readonly retiredFrameCount: number;
1484
1404
  /**
1485
- * Whether decoded `VideoFrame` objects can be imported without CPU copies.
1486
- * Both backends can, directly or through a canvas bitmap: see
1487
- * `uploadPresentedVideoFrame`.
1405
+ * Whether decoded `VideoFrame`s can be imported without CPU copies. Both backends can,
1406
+ * directly or through a canvas bitmap (see `uploadPresentedVideoFrame`).
1488
1407
  */
1489
1408
  readonly supportsExternalVideoFrame: boolean;
1490
1409
  /**
@@ -1496,37 +1415,34 @@ export class WebEffectRegistry {
1496
1415
  */
1497
1416
  readonly uploadedFrameCount: number;
1498
1417
  /**
1499
- * How [`Self::upload_presented_video_frame`] copies a frame: `"direct"`,
1500
- * `"bitmap"` (through a canvas, once WebGPU refused a frame), `"untried"`,
1501
- * or `"canvas"` on WebGL2.
1418
+ * How [`Self::upload_presented_video_frame`] copies a frame: `"direct"`, `"bitmap"` (once
1419
+ * WebGPU refused a frame), `"untried"`, or `"canvas"` on WebGL2.
1502
1420
  */
1503
1421
  readonly videoFrameCopy: string;
1504
1422
  }
1505
1423
 
1506
1424
  /**
1507
- * Checks that `bytes` hold face `face_index` of a font the engine draws
1508
- * captions and SVG text with, as registering it checks it.
1425
+ * Checks that `bytes` hold face `face_index` of a font the engine can draw with, as
1426
+ * registering it would.
1509
1427
  *
1510
1428
  * # Errors
1511
- * Rejects bytes the engine's font parser refuses, with its reason (a WOFF
1512
- * or WOFF2 container named `.ttf`, say).
1429
+ * Rejects bytes the font parser refuses, with its reason (for example a WOFF container named
1430
+ * `.ttf`).
1513
1431
  */
1514
1432
  export function checkFont(bytes: Uint8Array, face_index: number): void;
1515
1433
 
1516
1434
  /**
1517
- * Checks that `cube` is a `.cube` 3D LUT the engine applies, parsed as
1518
- * `registerLut3d` parses it, without a renderer: a host refuses a file when
1519
- * it is imported rather than at every load.
1435
+ * Checks that `cube` is a `.cube` 3D LUT the engine accepts, as `registerLut3d` parses it,
1436
+ * without a renderer, so a host can refuse a file at import time.
1520
1437
  *
1521
1438
  * # Errors
1522
- * Rejects text the engine's parser refuses, with its line and reason (a
1523
- * one-dimensional table, an unsupported directive, a missing sample).
1439
+ * Rejects text the parser refuses, with its line and reason.
1524
1440
  */
1525
1441
  export function checkLut3d(cube: string): void;
1526
1442
 
1527
1443
  /**
1528
- * Returns a color pipeline's identity (JSON `ColorPipeline`), in the form a
1529
- * proxy that bakes the pipeline in records it.
1444
+ * Returns a color pipeline's identity (JSON `ColorPipeline`) as a proxy that bakes it in
1445
+ * records it.
1530
1446
  *
1531
1447
  * # Errors
1532
1448
  * Rejects JSON that is not a color pipeline.
@@ -1534,45 +1450,40 @@ export function checkLut3d(cube: string): void;
1534
1450
  export function colorPipelineFingerprint(pipeline: string): string;
1535
1451
 
1536
1452
  /**
1537
- * Compares a found fingerprint with a recorded one (both JSON
1538
- * `MediaFingerprint`s), as JSON `FingerprintMatch`: `identical`,
1539
- * `consistent`, `mismatch` with its fields, or `unverified`.
1453
+ * Compares a found fingerprint with a recorded one (both JSON `MediaFingerprint`s), returning
1454
+ * a JSON `FingerprintMatch`: `identical`, `consistent`, `mismatch` with its fields, or
1455
+ * `unverified`.
1540
1456
  *
1541
1457
  * # Errors
1542
- * Rejects JSON that is not a fingerprint, or a fingerprint with a part that
1543
- * is not well formed (`MediaFingerprint::malformed_part`), such as a hash
1544
- * in uppercase: that is an input error, not other media.
1458
+ * Rejects JSON that is not a fingerprint, or one with a malformed part (such as an uppercase
1459
+ * hash).
1545
1460
  */
1546
1461
  export function compareFingerprints(recorded: string, found: string): string;
1547
1462
 
1548
1463
  /**
1549
- * Whether `project`'s media, as `catalog` describes it, is ready for
1550
- * `purpose` (`preview`, `preview_proxy`, `thumbnail`, `remote_edit`,
1551
- * `export_original`, or `export_proxy`), as a JSON `ConformReport`.
1464
+ * Whether `project`'s media, as `catalog` describes it, is ready for `purpose` (`preview`,
1465
+ * `preview_proxy`, `thumbnail`, `remote_edit`, `export_original`, or `export_proxy`), as a
1466
+ * JSON `ConformReport`.
1552
1467
  *
1553
1468
  * # Errors
1554
- * Rejects an invalid project, catalog (one whose fingerprints are not well
1555
- * formed among them), or purpose.
1469
+ * Rejects an invalid project, catalog (including malformed fingerprints), or purpose.
1556
1470
  */
1557
1471
  export function conformProject(project: string, catalog: string, purpose: string): string;
1558
1472
 
1559
1473
  /**
1560
- * How many faces the font file `bytes` holds: a font collection's
1561
- * count, else 1. `addFontFile` registers each.
1474
+ * How many faces the font file `bytes` holds: a collection's count, else 1.
1562
1475
  */
1563
1476
  export function fontFaceCount(bytes: Uint8Array): number;
1564
1477
 
1565
1478
  /**
1566
- * Returns the family name a caption style's `font_family` must give to
1567
- * select face `face_index` of the font file `bytes`, read from the font's
1568
- * name table as the engine reads it; `undefined` when the bytes are not a
1569
- * font or the face names no family.
1479
+ * Returns the family name a caption style's `font_family` must use to select face
1480
+ * `face_index` of the font `bytes`, or `undefined` when the bytes are not a font or the face
1481
+ * names no family.
1570
1482
  */
1571
1483
  export function fontFamily(bytes: Uint8Array, face_index: number): string | undefined;
1572
1484
 
1573
1485
  /**
1574
- * The answers of the geometry queries the native tests pin
1575
- * (`tests/golden/geometry_queries.json`), computed by this module.
1486
+ * Answers to the geometry queries the native tests pin (`tests/golden/geometry_queries.json`).
1576
1487
  */
1577
1488
  export function geometryParityAnswers(): string;
1578
1489
 
@@ -1585,8 +1496,7 @@ export function geometryParityAnswers(): string;
1585
1496
  export function hitTest(items_json: string, time: number, width: number, height: number, x: number, y: number): string | undefined;
1586
1497
 
1587
1498
  /**
1588
- * A project's non-fatal diagnostics (`Project::lint`), as a JSON array of
1589
- * issues (`alpha2/project`'s `LintIssue`).
1499
+ * A project's non-fatal diagnostics as a JSON array of `LintIssue`s.
1590
1500
  *
1591
1501
  * # Errors
1592
1502
  * Rejects a document that does not load as a valid project.
@@ -1610,17 +1520,17 @@ export function motionPath(point_json: string, width: number, height: number): s
1610
1520
  export function nearestPoint(path_json: string, width: number, height: number, x: number, y: number): string;
1611
1521
 
1612
1522
  /**
1613
- * Reads a subtitle file (`format` is `srt` or `webvtt`) into caption cues,
1614
- * returned as JSON `{ rows, skipped }`.
1523
+ * Reads a subtitle file (`format` is `srt` or `webvtt`) into caption cues, returned as JSON
1524
+ * `{ rows, skipped, notes }`.
1615
1525
  *
1616
- * `rows` holds one caption track's cues per row, each a project document
1617
- * `CaptionCue`, split so no cue overlaps another in its row and no row holds
1618
- * more cues than a caption track allows. `skipped` counts blocks that were
1619
- * not cues.
1526
+ * `rows` holds one caption track's `CaptionCue`s per row, split so no cues overlap within a
1527
+ * row and no row exceeds a caption track's cue limit. `skipped` counts blocks that were not
1528
+ * cues; `notes` counts markup read but not kept (`extraVoices`, `droppedTimestamps`,
1529
+ * `droppedClasses`, `flattened`).
1620
1530
  *
1621
1531
  * # Errors
1622
- * Rejects an unknown format, a WebVTT file without its header, and cues that
1623
- * need more caption tracks than a project holds.
1532
+ * Rejects an unknown format, a WebVTT file without its header, and cues that need more
1533
+ * caption tracks than a project holds.
1624
1534
  */
1625
1535
  export function parseCaptions(text: string, format: string): string;
1626
1536
 
@@ -1633,34 +1543,28 @@ export function parseCaptions(text: string, format: string): string;
1633
1543
  export function pathLength(path_json: string, width: number, height: number): string;
1634
1544
 
1635
1545
  /**
1636
- * The gain that brings a measured mix (a `loudnessReport` JSON) to
1637
- * `target_lufs` without its true peak passing `ceiling_dbtp`, or its sample
1638
- * peak reaching the master limiter the report states (`limiterThreshold`),
1639
- * as JSON `{ gainDb, integratedLufs, truePeakDbtp, peakLimited,
1546
+ * The gain that brings a measured mix (a `loudnessReport` JSON) to `target_lufs` without its
1547
+ * true peak passing `ceiling_dbtp` or its sample peak reaching the report's
1548
+ * `limiterThreshold`. Returns JSON `{ gainDb, integratedLufs, truePeakDbtp, peakLimited,
1640
1549
  * limiterLimited }`, or `null` for a mix silent below the absolute gate.
1641
1550
  *
1642
1551
  * # Errors
1643
- * Rejects a report that is not a JSON object with its `frames`, or whose
1644
- * `limiterThreshold` is neither a positive number nor `null`.
1552
+ * Rejects a report that is not a JSON object with `frames`, or whose `limiterThreshold` is
1553
+ * neither a positive number nor `null`.
1645
1554
  */
1646
1555
  export function planLoudnessNormalization(report_json: string, target_lufs: number, ceiling_dbtp: number): string;
1647
1556
 
1648
1557
  /**
1649
- * How much later than a source time a decoded frame's timestamp may be and
1650
- * still be the frame shown there, in ticks, for a stream whose timestamps
1651
- * are whole multiples of `num / den` seconds and rounded to `quantum` of
1652
- * those units ([`alpha2_time::presentation_slack`]; zero for a time base
1653
- * not known, `quantum` 0 for no rounding shown): what a host's decoder
1654
- * adapters allow past a requested time before they take the last frame at
1655
- * or before it, as the native host does.
1558
+ * How many ticks after a source time a decoded frame's timestamp may fall and still be the
1559
+ * frame shown there ([`alpha2_time::presentation_slack`]). The stream's timestamps are whole
1560
+ * multiples of `num / den` seconds rounded to `quantum` units (0 for no rounding); an unknown
1561
+ * time base gives zero. Decoder adapters allow this much past a requested time before taking
1562
+ * the last frame at or before it, as the native host does.
1656
1563
  */
1657
1564
  export function presentationSlackTicks(num: bigint, den: bigint, quantum: bigint): bigint;
1658
1565
 
1659
1566
  /**
1660
1567
  * The engine's quality level names, lowest first, as a JSON array.
1661
- *
1662
- * An app builds its quality control from this rather than from a list of its
1663
- * own, so the names a browser offers are the ones the engine resolves.
1664
1568
  */
1665
1569
  export function qualityLevels(): string;
1666
1570
 
@@ -1673,29 +1577,31 @@ export function qualityLevels(): string;
1673
1577
  export function resamplePath(path_json: string, width: number, height: number, counts: Uint32Array): string;
1674
1578
 
1675
1579
  /**
1676
- * Resolves a quality level into a stereo audio bitrate in bits per second.
1677
- *
1678
- * `codec` is `aac` or `opus`. The native host reads the same engine table.
1580
+ * Resolves a quality level into a stereo audio bitrate in bits per second. `codec` is `aac`
1581
+ * or `opus`.
1679
1582
  */
1680
1583
  export function resolveAudioBitrate(codec: string, level: string): number;
1681
1584
 
1682
1585
  /**
1683
- * Resolves a quality level into the rate control every sink encodes with.
1684
- *
1685
- * Returns JSON: `{ "bitrate", "mode", "quantizer" }`. The native host calls
1686
- * the same engine function, so a browser export and a native export at the
1687
- * same level and output receive the same numbers.
1586
+ * Resolves a quality level into the rate control every sink encodes with, as JSON
1587
+ * `{ "bitrate", "mode", "quantizer" }`. The native host calls the same engine function.
1688
1588
  */
1689
1589
  export function resolveRateControl(codec: string, width: number, height: number, frame_rate_num: number, frame_rate_den: number, level: string): string;
1690
1590
 
1691
1591
  /**
1692
- * The unit a stream's first timestamps (in its time base's units) show
1693
- * they are rounded to, 0 for none ([`alpha2_time::rounding_quantum`]).
1592
+ * The unit a stream's first timestamps (in time base units) are rounded to, or 0 for none
1593
+ * ([`alpha2_time::rounding_quantum`]).
1694
1594
  */
1695
1595
  export function roundingQuantum(timestamps: BigInt64Array): bigint;
1696
1596
 
1697
1597
  /**
1698
- * Each item's normalized bounds; see the geometry module.
1598
+ * Replaces the GPU watchdog, in milliseconds, that losses are classified against (zero
1599
+ * restores the default of 2000). A page has no environment, so tests set it here.
1600
+ */
1601
+ export function setGpuWatchdogMs(milliseconds: number): void;
1602
+
1603
+ /**
1604
+ * Each item's normalized bounds as JSON `[{ at, bounds }]`.
1699
1605
  *
1700
1606
  * # Errors
1701
1607
  * Rejects items that are not a valid content tree, or a bad size or time.
@@ -1703,10 +1609,8 @@ export function roundingQuantum(timestamps: BigInt64Array): bigint;
1703
1609
  export function shapeBounds(items_json: string, time: number, width: number, height: number): string;
1704
1610
 
1705
1611
  /**
1706
- * Installs the panic reporter as the module is instantiated.
1707
- *
1708
- * `wasm-bindgen` calls this from the generated initializer, so every entry
1709
- * point is covered without the host opting in.
1612
+ * Installs the panic reporter when the module is instantiated, so every entry point is
1613
+ * covered without the host opting in.
1710
1614
  */
1711
1615
  export function start(): void;
1712
1616
 
@@ -1728,7 +1632,7 @@ export function trimPath(path_json: string, width: number, height: number, start
1728
1632
 
1729
1633
  /**
1730
1634
  * The vector coverage and scene hashes the native tests pin
1731
- * (`tests/golden/vector_coverage.json`), computed by this module.
1635
+ * (`tests/golden/vector_coverage.json`).
1732
1636
  */
1733
1637
  export function vectorParityHashes(): string;
1734
1638
 
@@ -1783,11 +1687,13 @@ export interface InitOutput {
1783
1687
  readonly presentationSlackTicks: (a: bigint, b: bigint, c: bigint) => bigint;
1784
1688
  readonly qualityLevels: () => [number, number];
1785
1689
  readonly rasterizedtext_descriptor: (a: number) => [number, number];
1690
+ readonly rasterizedtext_takeBackground: (a: number) => any;
1786
1691
  readonly rasterizedtext_takePixels: (a: number) => any;
1787
1692
  readonly resamplePath: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
1788
1693
  readonly resolveAudioBitrate: (a: number, b: number, c: number, d: number) => [number, number, number];
1789
1694
  readonly resolveRateControl: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => [number, number, number, number];
1790
1695
  readonly roundingQuantum: (a: number, b: number) => bigint;
1696
+ readonly setGpuWatchdogMs: (a: number) => void;
1791
1697
  readonly shapeBounds: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
1792
1698
  readonly start: () => void;
1793
1699
  readonly toPath: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
@@ -1822,10 +1728,10 @@ export interface InitOutput {
1822
1728
  readonly webcpurenderer_audioNeeds: (a: number, b: bigint, c: number) => [number, number, number, number];
1823
1729
  readonly webcpurenderer_audioRetainedBytes: (a: number) => number;
1824
1730
  readonly webcpurenderer_audioRetainedFrames: (a: number) => number;
1825
- readonly webcpurenderer_audioRetainedWindows: (a: number, b: number, c: number) => [number, number, number, number];
1731
+ readonly webcpurenderer_audioRetainedWindows: (a: number, b: number, c: number, d: number) => [number, number, number, number];
1826
1732
  readonly webcpurenderer_audioSampleRate: (a: number) => number;
1827
1733
  readonly webcpurenderer_beginExport: (a: number, b: bigint, c: bigint, d: number, e: number, f: number, g: number) => [number, number];
1828
- readonly webcpurenderer_beginExportAt: (a: number, b: bigint, c: number, d: number) => [number, number, number];
1734
+ readonly webcpurenderer_beginExportAt: (a: number, b: bigint, c: number, d: number, e: number, f: number) => [number, number, number];
1829
1735
  readonly webcpurenderer_beginExportFrame: (a: number) => [number, number, number];
1830
1736
  readonly webcpurenderer_builtinCatalog: (a: number) => [number, number];
1831
1737
  readonly webcpurenderer_capabilityReport: (a: number) => [number, number, number, number];
@@ -1846,6 +1752,7 @@ export interface InitOutput {
1846
1752
  readonly webcpurenderer_loadProject: (a: number, b: number, c: number) => [number, number];
1847
1753
  readonly webcpurenderer_loudnessReport: (a: number) => [number, number];
1848
1754
  readonly webcpurenderer_previewSize: (a: number) => [number, number, number, number];
1755
+ readonly webcpurenderer_projectRuntimeEffects: (a: number) => [number, number];
1849
1756
  readonly webcpurenderer_registerCompiledEffect: (a: number, b: number) => [number, number, number, number];
1850
1757
  readonly webcpurenderer_registerLut3d: (a: number, b: number, c: number, d: number, e: number) => [number, number];
1851
1758
  readonly webcpurenderer_releaseAudioSource: (a: number, b: number, c: number) => number;
@@ -1874,7 +1781,7 @@ export interface InitOutput {
1874
1781
  readonly webcpurenderer_trimFramesBefore: (a: number, b: number, c: number, d: bigint) => void;
1875
1782
  readonly webcpurenderer_unregisterEffect: (a: number, b: number, c: number, d: number) => number;
1876
1783
  readonly webcpurenderer_unregisterEffectResource: (a: number, b: number, c: number) => number;
1877
- readonly webcpurenderer_uploadAudioBlock: (a: number, b: number, c: number, d: bigint, e: number, f: any, g: any, h: number) => [number, number];
1784
+ readonly webcpurenderer_uploadAudioBlock: (a: number, b: number, c: number, d: bigint, e: number, f: any, g: any, h: number, i: number) => [number, number];
1878
1785
  readonly webcpurenderer_uploadPresentedImageBitmap: (a: number, b: number, c: number, d: bigint, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
1879
1786
  readonly webcpurenderer_uploadPresentedLinearFrame: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
1880
1787
  readonly webcpurenderer_uploadPresentedLinearImage: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
@@ -1888,6 +1795,7 @@ export interface InitOutput {
1888
1795
  readonly webcpurenderer_uploadedFrameBytes: (a: number) => bigint;
1889
1796
  readonly webcpurenderer_uploadedFrameCount: (a: number) => number;
1890
1797
  readonly webcpurenderer_videoFrameCopy: (a: number) => [number, number];
1798
+ readonly webeffectregistry_adapter: (a: number) => [number, number];
1891
1799
  readonly webeffectregistry_addFont: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number];
1892
1800
  readonly webeffectregistry_addFontFile: (a: number, b: number, c: number, d: number, e: number) => [number, number];
1893
1801
  readonly webeffectregistry_aliasVideoFrame: (a: number, b: number, c: number, d: bigint, e: bigint) => [number, number, number];
@@ -1897,10 +1805,11 @@ export interface InitOutput {
1897
1805
  readonly webeffectregistry_audioNeeds: (a: number, b: bigint, c: number) => [number, number, number, number];
1898
1806
  readonly webeffectregistry_audioRetainedBytes: (a: number) => number;
1899
1807
  readonly webeffectregistry_audioRetainedFrames: (a: number) => number;
1900
- readonly webeffectregistry_audioRetainedWindows: (a: number, b: number, c: number) => [number, number, number, number];
1808
+ readonly webeffectregistry_audioRetainedWindows: (a: number, b: number, c: number, d: number) => [number, number, number, number];
1901
1809
  readonly webeffectregistry_audioSampleRate: (a: number) => number;
1810
+ readonly webeffectregistry_backend: (a: number) => [number, number];
1902
1811
  readonly webeffectregistry_beginExport: (a: number, b: bigint, c: bigint, d: number, e: number, f: number, g: number) => [number, number];
1903
- readonly webeffectregistry_beginExportAt: (a: number, b: bigint, c: number, d: number) => [number, number, number];
1812
+ readonly webeffectregistry_beginExportAt: (a: number, b: bigint, c: number, d: number, e: number, f: number) => [number, number, number];
1904
1813
  readonly webeffectregistry_beginExportFrame: (a: number) => [number, number, number];
1905
1814
  readonly webeffectregistry_beginExportPresent: (a: number) => [number, number, number];
1906
1815
  readonly webeffectregistry_builtinCatalog: (a: number) => [number, number];
@@ -1913,8 +1822,8 @@ export interface InitOutput {
1913
1822
  readonly webeffectregistry_compileEffect: (a: number, b: number, c: number) => [number, number, number];
1914
1823
  readonly webeffectregistry_create: () => any;
1915
1824
  readonly webeffectregistry_createCpu: (a: any) => [number, number, number];
1916
- readonly webeffectregistry_createForCanvas: (a: any) => any;
1917
- readonly webeffectregistry_createForHtmlCanvas: (a: any) => any;
1825
+ readonly webeffectregistry_createForCanvas: (a: any, b: number) => any;
1826
+ readonly webeffectregistry_createForHtmlCanvas: (a: any, b: number) => any;
1918
1827
  readonly webeffectregistry_deviceLost: (a: number) => number;
1919
1828
  readonly webeffectregistry_diagnostics: (a: number) => [number, number, number, number];
1920
1829
  readonly webeffectregistry_endExport: (a: number) => void;
@@ -1924,9 +1833,11 @@ export interface InitOutput {
1924
1833
  readonly webeffectregistry_hdrSource: (a: number, b: number, c: number) => number;
1925
1834
  readonly webeffectregistry_holdsImage: (a: number, b: number, c: number, d: bigint) => number;
1926
1835
  readonly webeffectregistry_loadProject: (a: number, b: number, c: number) => [number, number];
1836
+ readonly webeffectregistry_lossReport: (a: number) => [number, number];
1927
1837
  readonly webeffectregistry_loudnessReport: (a: number) => [number, number];
1928
1838
  readonly webeffectregistry_presentUploadedFrame: (a: number, b: number, c: number, d: bigint) => [number, number];
1929
1839
  readonly webeffectregistry_previewSize: (a: number) => [number, number, number, number];
1840
+ readonly webeffectregistry_projectRuntimeEffects: (a: number) => [number, number];
1930
1841
  readonly webeffectregistry_registerCompiledEffect: (a: number, b: number) => [number, number, number, number];
1931
1842
  readonly webeffectregistry_registerLut3d: (a: number, b: number, c: number, d: number, e: number) => [number, number];
1932
1843
  readonly webeffectregistry_releaseAudioSource: (a: number, b: number, c: number) => number;
@@ -1951,11 +1862,13 @@ export interface InitOutput {
1951
1862
  readonly webeffectregistry_sourceColorMetadata: (a: number, b: number, c: number) => [number, number];
1952
1863
  readonly webeffectregistry_submittedWorkDone: (a: number) => any;
1953
1864
  readonly webeffectregistry_supportsExternalVideoFrame: (a: number) => number;
1865
+ readonly webeffectregistry_takeGpuSubmissionStats: (a: number) => [number, number];
1954
1866
  readonly webeffectregistry_trimAudioBefore: (a: number, b: number, c: number, d: bigint) => void;
1955
1867
  readonly webeffectregistry_trimFramesBefore: (a: number, b: number, c: number, d: bigint) => void;
1956
1868
  readonly webeffectregistry_unregisterEffect: (a: number, b: number, c: number, d: number) => number;
1957
1869
  readonly webeffectregistry_unregisterEffectResource: (a: number, b: number, c: number) => number;
1958
- readonly webeffectregistry_uploadAudioBlock: (a: number, b: number, c: number, d: bigint, e: number, f: any, g: any, h: number) => [number, number];
1870
+ readonly webeffectregistry_uploadAudioBlock: (a: number, b: number, c: number, d: bigint, e: number, f: any, g: any, h: number, i: number) => [number, number];
1871
+ readonly webeffectregistry_uploadDegradedVideoFrame: (a: number, b: number, c: number, d: bigint, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
1959
1872
  readonly webeffectregistry_uploadPresentedImageBitmap: (a: number, b: number, c: number, d: bigint, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
1960
1873
  readonly webeffectregistry_uploadPresentedLinearFrame: (a: number, b: number, c: number, d: bigint, e: number, f: number, g: number, h: number, i: number, j: number) => [number, number, number];
1961
1874
  readonly webeffectregistry_uploadPresentedLinearImage: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => [number, number, number];
@@ -1972,12 +1885,12 @@ export interface InitOutput {
1972
1885
  readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___js_sys_dcf218532b47778c___Function_fn_wasm_bindgen_d171202afaeab6f2___JsValue_____wasm_bindgen_d171202afaeab6f2___sys__Undefined___js_sys_dcf218532b47778c___Function_fn_wasm_bindgen_d171202afaeab6f2___JsValue_____wasm_bindgen_d171202afaeab6f2___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void;
1973
1886
  readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___JsValue__core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true_: (a: number, b: number, c: any) => [number, number];
1974
1887
  readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true_: (a: number, b: number, c: any) => [number, number];
1975
- readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__225: (a: number, b: number, c: any) => [number, number];
1976
- readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__228: (a: number, b: number, c: any) => [number, number];
1977
- readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__229: (a: number, b: number, c: any) => [number, number];
1888
+ readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__234: (a: number, b: number, c: any) => [number, number];
1889
+ readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__237: (a: number, b: number, c: any) => [number, number];
1890
+ readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wasm_bindgen_d171202afaeab6f2___sys__JsNullable_wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuError__GpuError___core_608f92abc48d28da___result__Result_____wasm_bindgen_d171202afaeab6f2___JsError___true__238: (a: number, b: number, c: any) => [number, number];
1978
1891
  readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___web_sys_9e2ae0ace5131457___features__gen_Event__Event______true_: (a: number, b: number, c: any) => void;
1979
1892
  readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true_: (a: number, b: number, c: any) => void;
1980
- readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__227: (a: number, b: number, c: any) => void;
1893
+ readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke___wgpu_f46556a90412e4d9___backend__webgpu__webgpu_sys__gen_GpuDeviceLostInfo__GpuDeviceLostInfo______true__236: (a: number, b: number, c: any) => void;
1981
1894
  readonly wasm_bindgen_d171202afaeab6f2___convert__closures_____invoke_______true_: (a: number, b: number) => void;
1982
1895
  readonly __wbindgen_malloc: (a: number, b: number) => number;
1983
1896
  readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
@@ -1987,6 +1900,7 @@ export interface InitOutput {
1987
1900
  readonly __wbindgen_destroy_closure: (a: number, b: number) => void;
1988
1901
  readonly __externref_table_dealloc: (a: number) => void;
1989
1902
  readonly __wbindgen_free: (a: number, b: number, c: number) => void;
1903
+ readonly __externref_drop_slice: (a: number, b: number) => void;
1990
1904
  readonly __wbindgen_start: () => void;
1991
1905
  }
1992
1906