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.
- package/README.md +5 -4
- package/THIRD_PARTY_NOTICES.md +4 -0
- package/dist/abort.d.ts +12 -0
- package/dist/abort.js +48 -0
- package/dist/active-clock.d.ts +35 -0
- package/dist/active-clock.js +99 -0
- package/dist/assets.d.ts +51 -22
- package/dist/assets.js +8 -12
- package/dist/audio-layout.d.ts +52 -74
- package/dist/audio-layout.js +114 -148
- package/dist/audio-timeline.d.ts +89 -117
- package/dist/audio-timeline.js +102 -118
- package/dist/audio-worker.d.ts +12 -21
- package/dist/audio-worker.js +8 -13
- package/dist/audio-worklet-processor.js +45 -58
- package/dist/audio-worklet.d.ts +45 -76
- package/dist/audio-worklet.js +44 -79
- package/dist/audio.d.ts +15 -23
- package/dist/audio.js +9 -13
- package/dist/builder.d.ts +45 -63
- package/dist/builder.js +49 -45
- package/dist/capabilities.d.ts +99 -16
- package/dist/capabilities.js +2 -2
- package/dist/captions.d.ts +45 -22
- package/dist/captions.js +60 -15
- package/dist/chroma-siting.d.ts +24 -41
- package/dist/chroma-siting.js +38 -71
- package/dist/containers.d.ts +41 -30
- package/dist/containers.js +59 -27
- package/dist/decoder-fallback.d.ts +13 -0
- package/dist/decoder-fallback.js +38 -0
- package/dist/decoder-order.d.ts +24 -39
- package/dist/decoder-order.js +28 -42
- package/dist/edit.d.ts +77 -154
- package/dist/edit.js +98 -180
- package/dist/effects.d.ts +125 -176
- package/dist/effects.js +7 -9
- package/dist/export-destination.d.ts +25 -41
- package/dist/export-destination.js +20 -32
- package/dist/export-failure.d.ts +34 -59
- package/dist/export-failure.js +54 -48
- package/dist/export-metrics.d.ts +116 -0
- package/dist/export-metrics.js +74 -0
- package/dist/export-retry.d.ts +46 -29
- package/dist/export-retry.js +86 -51
- package/dist/exporter.d.ts +67 -116
- package/dist/exporter.js +133 -133
- package/dist/extensions.d.ts +69 -115
- package/dist/extensions.js +55 -82
- package/dist/frame-intake.d.ts +92 -0
- package/dist/frame-intake.js +114 -0
- package/dist/frame-supply.d.ts +96 -162
- package/dist/frame-supply.js +181 -171
- package/dist/frames.d.ts +23 -0
- package/dist/frames.js +34 -0
- package/dist/generated/project-schema.d.ts +712 -485
- package/dist/generated/project-schema.js +55 -2
- package/dist/generated/project-shape.js +276 -16
- package/dist/geometry.d.ts +28 -34
- package/dist/geometry.js +18 -23
- package/dist/gpu-recovery.d.ts +92 -0
- package/dist/gpu-recovery.js +135 -0
- package/dist/hdr-frames.d.ts +82 -67
- package/dist/hdr-frames.js +112 -49
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/json-text.d.ts +13 -23
- package/dist/json-text.js +10 -20
- package/dist/layout-values.d.ts +14 -22
- package/dist/layout-values.js +18 -21
- package/dist/layout.d.ts +48 -63
- package/dist/layout.js +37 -37
- package/dist/loudness.d.ts +27 -32
- package/dist/loudness.js +19 -23
- package/dist/media.d.ts +85 -237
- package/dist/media.js +133 -287
- package/dist/mediabunny.d.ts +178 -246
- package/dist/mediabunny.js +781 -583
- package/dist/paint.d.ts +23 -0
- package/dist/paint.js +37 -0
- package/dist/physical-frames.d.ts +5 -17
- package/dist/physical-frames.js +4 -11
- package/dist/player.d.ts +56 -47
- package/dist/player.js +155 -40
- package/dist/presented-frames.d.ts +2 -7
- package/dist/presented-frames.js +3 -8
- package/dist/project.d.ts +74 -118
- package/dist/project.js +384 -445
- package/dist/rate-control.d.ts +9 -23
- package/dist/rate-control.js +7 -18
- package/dist/renderer-choice.d.ts +41 -0
- package/dist/renderer-choice.js +82 -0
- package/dist/repacked-bytes.d.ts +0 -2
- package/dist/repacked-bytes.js +2 -5
- package/dist/robustness.d.ts +25 -37
- package/dist/robustness.js +71 -54
- package/dist/sha256.d.ts +5 -13
- package/dist/sha256.js +9 -24
- package/dist/text.d.ts +97 -71
- package/dist/text.js +33 -70
- package/dist/video-frames.d.ts +7 -25
- package/dist/video-frames.js +12 -29
- package/dist/waveform.d.ts +5 -11
- package/dist/waveform.js +4 -9
- package/dist/worker-error.d.ts +5 -20
- package/dist/worker-error.js +8 -25
- package/dist/worker.d.ts +82 -95
- package/dist/worker.js +235 -143
- package/package.json +26 -2
- package/wasm/alpha2_audio_worklet.wasm +0 -0
- package/wasm/alpha2_extensions.d.ts +26 -47
- package/wasm/alpha2_extensions.js +26 -47
- package/wasm/alpha2_extensions_bg.wasm +0 -0
- package/wasm/alpha2_wasm.d.ts +501 -587
- package/wasm/alpha2_wasm.js +661 -616
- package/wasm/alpha2_wasm_bg.wasm +0 -0
- package/wasm/alpha2_wasm_bg.wasm.d.ts +22 -12
- package/wasm/rust-crate-licenses.md +2 -2
- package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-070d94113471ef0a}/inline1.js +1 -0
- package/wasm/snippets/alpha2-wasm-070d94113471ef0a/inline2.js +82 -0
- package/wasm/snippets/alpha2-wasm-c62e60c964e88a52/inline2.js +0 -52
- /package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-070d94113471ef0a}/inline0.js +0 -0
- /package/wasm/snippets/{alpha2-wasm-c62e60c964e88a52 → alpha2-wasm-070d94113471ef0a}/inline3.js +0 -0
package/dist/extensions.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { LinearPrimaries, ProviderSource } from "./generated/project-schema.js";
|
|
2
|
-
/** A format a provider reads. */
|
|
3
2
|
export type ExtensionFormat = "svg" | "gif" | "apng" | "webp" | "png_sequence" | "lottie" | "dot_lottie" | "exr" | "exr_sequence";
|
|
4
|
-
/**
|
|
3
|
+
/** Frame timing in source ticks. */
|
|
5
4
|
export type ExtensionTiming = {
|
|
6
5
|
readonly kind: "static";
|
|
7
6
|
} | {
|
|
@@ -15,7 +14,7 @@ export type ExtensionTiming = {
|
|
|
15
14
|
};
|
|
16
15
|
readonly frames: number;
|
|
17
16
|
};
|
|
18
|
-
/**
|
|
17
|
+
/** A provider notice worth showing the user. */
|
|
19
18
|
export type ExtensionDiagnostic = {
|
|
20
19
|
readonly kind: "normalized_delay";
|
|
21
20
|
readonly frame: number;
|
|
@@ -24,44 +23,35 @@ export type ExtensionDiagnostic = {
|
|
|
24
23
|
readonly kind: "missing_font";
|
|
25
24
|
readonly families: string;
|
|
26
25
|
}
|
|
27
|
-
/**
|
|
28
|
-
* An image the document names is not registered, or declares a size larger than a provider opens;
|
|
29
|
-
* it is not drawn.
|
|
30
|
-
*/
|
|
26
|
+
/** A referenced image is not registered or is too large; it is not drawn. */
|
|
31
27
|
| {
|
|
32
28
|
readonly kind: "missing_image";
|
|
33
29
|
readonly href: string;
|
|
34
30
|
} | {
|
|
35
31
|
readonly kind: "unsupported_feature";
|
|
36
32
|
readonly feature: string;
|
|
37
|
-
/**
|
|
33
|
+
/** JSON pointer to the first occurrence. */
|
|
38
34
|
readonly path: string;
|
|
39
35
|
readonly count: number;
|
|
40
36
|
}
|
|
41
|
-
/**
|
|
42
|
-
* An image the document names is registered but cannot be drawn (a format an SVG image is not
|
|
43
|
-
* drawn from, or an SVG that does not parse), and why; it is not drawn.
|
|
44
|
-
*/
|
|
37
|
+
/** A referenced image is registered but cannot be drawn; it is not drawn. */
|
|
45
38
|
| {
|
|
46
39
|
readonly kind: "unreadable_image";
|
|
47
40
|
readonly href: string;
|
|
48
41
|
readonly reason: string;
|
|
49
42
|
}
|
|
50
|
-
/**
|
|
43
|
+
/** A package item that does not open; other items remain usable. */
|
|
51
44
|
| {
|
|
52
45
|
readonly kind: "unreadable_item";
|
|
53
46
|
readonly item: string;
|
|
54
47
|
readonly reason: string;
|
|
55
48
|
}
|
|
56
|
-
/**
|
|
49
|
+
/** Non-finite samples, shown as 0. */
|
|
57
50
|
| {
|
|
58
51
|
readonly kind: "non_finite_samples";
|
|
59
52
|
readonly count: number;
|
|
60
53
|
}
|
|
61
|
-
/**
|
|
62
|
-
* 32-bit float samples beyond the half-float range, each shown as the largest half float of its
|
|
63
|
-
* sign.
|
|
64
|
-
*/
|
|
54
|
+
/** 32-bit float samples beyond half-float range, clamped to the largest half float. */
|
|
65
55
|
| {
|
|
66
56
|
readonly kind: "out_of_half_range";
|
|
67
57
|
readonly count: number;
|
|
@@ -70,49 +60,41 @@ export type ExtensionDiagnostic = {
|
|
|
70
60
|
| {
|
|
71
61
|
readonly kind: "reduced_precision";
|
|
72
62
|
};
|
|
73
|
-
/**
|
|
63
|
+
/** Color of linear-light media and where it came from. */
|
|
74
64
|
export interface ExtensionLinearColor {
|
|
75
|
-
/**
|
|
65
|
+
/** Named primaries matching the chromaticities, if any. */
|
|
76
66
|
readonly primaries: LinearPrimaries | null;
|
|
77
|
-
/** Red, green, blue
|
|
67
|
+
/** Red, green, blue and white as CIE 1931 `[x, y]`. */
|
|
78
68
|
readonly chromaticities: readonly (readonly [number, number])[];
|
|
79
|
-
/**
|
|
80
|
-
* The file declares it, the format defines it when the file does not say, or the project
|
|
81
|
-
* overrides it.
|
|
82
|
-
*/
|
|
83
69
|
readonly origin: "file" | "format_default" | "project";
|
|
84
70
|
}
|
|
85
|
-
/** What probing a file finds. */
|
|
86
71
|
export interface ExtensionReport {
|
|
87
72
|
readonly format: ExtensionFormat;
|
|
88
73
|
readonly width: number;
|
|
89
74
|
readonly height: number;
|
|
90
75
|
readonly timing: ExtensionTiming;
|
|
91
|
-
/**
|
|
76
|
+
/** Requested play count, `0` for forever; an import hint. */
|
|
92
77
|
readonly loop_count: number | null;
|
|
93
|
-
/**
|
|
78
|
+
/** Items in a package, such as a dotLottie's animations. */
|
|
94
79
|
readonly items: readonly string[];
|
|
95
80
|
/**
|
|
96
|
-
* The
|
|
97
|
-
*
|
|
98
|
-
* file of one item.
|
|
81
|
+
* The package item described: the opened one, or for a probe the first that opens. `null` for
|
|
82
|
+
* single-item files.
|
|
99
83
|
*/
|
|
100
84
|
readonly item: string | null;
|
|
101
|
-
/** For linear-light media (OpenEXR)
|
|
85
|
+
/** For linear-light media (OpenEXR); `null` for sRGB media. */
|
|
102
86
|
readonly color: ExtensionLinearColor | null;
|
|
103
87
|
readonly diagnostics: readonly ExtensionDiagnostic[];
|
|
104
88
|
}
|
|
105
|
-
/**
|
|
89
|
+
/** A rendered frame at its own size. */
|
|
106
90
|
export type ExtensionFrame = {
|
|
107
91
|
readonly width: number;
|
|
108
92
|
readonly height: number;
|
|
109
|
-
/** Which of the source's frames it is. */
|
|
110
93
|
readonly index: number;
|
|
111
|
-
/** The first source tick it shows at. */
|
|
112
94
|
readonly startTicks: number;
|
|
113
|
-
/**
|
|
95
|
+
/** Exclusive end; absent for the last frame. */
|
|
114
96
|
readonly endTicks?: number;
|
|
115
|
-
/**
|
|
97
|
+
/** Diagnostics specific to this frame. */
|
|
116
98
|
readonly diagnostics: readonly ExtensionDiagnostic[];
|
|
117
99
|
} & ({
|
|
118
100
|
readonly precision: "rgba8";
|
|
@@ -121,21 +103,17 @@ export type ExtensionFrame = {
|
|
|
121
103
|
} | {
|
|
122
104
|
readonly precision: "linear_f16";
|
|
123
105
|
/**
|
|
124
|
-
* Premultiplied linear-light RGBA half
|
|
125
|
-
*
|
|
106
|
+
* Premultiplied linear-light RGBA half-float bits in BT.709 primaries, rows packed. Values
|
|
107
|
+
* outside 0 to 1 are kept.
|
|
126
108
|
*/
|
|
127
109
|
readonly pixels: Uint16Array;
|
|
128
110
|
});
|
|
129
|
-
/** The generated wasm module's surface. */
|
|
130
111
|
interface ExtensionModule {
|
|
131
112
|
default(input?: {
|
|
132
113
|
module_or_path: string | URL;
|
|
133
114
|
}): Promise<unknown>;
|
|
134
115
|
ExtensionRegistry: new () => WasmExtensionRegistry;
|
|
135
|
-
/**
|
|
136
|
-
* Replaces the module's instance with a new one of the same compiled module: built with
|
|
137
|
-
* `--experimental-reset-state-function`.
|
|
138
|
-
*/
|
|
116
|
+
/** Requires building with `--experimental-reset-state-function`. */
|
|
139
117
|
__wbg_reset_state(): void;
|
|
140
118
|
}
|
|
141
119
|
interface WasmRenderedFrame {
|
|
@@ -171,51 +149,45 @@ interface WasmExtensionRegistry {
|
|
|
171
149
|
free(): void;
|
|
172
150
|
}
|
|
173
151
|
/**
|
|
174
|
-
* The provider module
|
|
175
|
-
*
|
|
176
|
-
* calls work; the source the call was for, if any, stays failed.
|
|
152
|
+
* The provider module aborted during this call (a panic or failed allocation). The module has been
|
|
153
|
+
* restarted so later calls work, but the source involved stays failed.
|
|
177
154
|
*/
|
|
178
155
|
export declare class ExtensionModuleError extends Error {
|
|
179
156
|
readonly name = "ExtensionModuleError";
|
|
180
157
|
}
|
|
181
158
|
/**
|
|
182
|
-
* The source was opened before the provider module restarted
|
|
183
|
-
*
|
|
184
|
-
* reads.
|
|
159
|
+
* The source was opened before the provider module restarted. Re-register its resources and open
|
|
160
|
+
* it again.
|
|
185
161
|
*/
|
|
186
162
|
export declare class StaleExtensionSourceError extends Error {
|
|
187
163
|
readonly name = "StaleExtensionSourceError";
|
|
188
164
|
constructor();
|
|
189
165
|
}
|
|
190
|
-
/** Reads a resource
|
|
166
|
+
/** Reads a resource by locator, such as an image sequence frame. */
|
|
191
167
|
export type ResourceReader = (locator: string) => Promise<Uint8Array>;
|
|
192
|
-
/** What an {@link ExtensionSource} calls the module through. */
|
|
193
168
|
interface ExtensionCalls {
|
|
194
169
|
call<T>(call: (wasm: WasmExtensionRegistry) => T): T;
|
|
195
170
|
generation(): number;
|
|
196
171
|
}
|
|
197
172
|
/**
|
|
198
|
-
* The provider module. Load it with {@link loadExtensions}
|
|
199
|
-
* opens.
|
|
173
|
+
* The provider module, shared by every source on the page. Load it with {@link loadExtensions}.
|
|
200
174
|
*
|
|
201
|
-
* Providers parse untrusted files
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
* StaleExtensionSourceError} until it is opened again, with its resources registered again; the one
|
|
206
|
-
* whose call aborted the module stays failed.
|
|
175
|
+
* Providers parse untrusted files, and a panic aborts the wasm instance. The call that aborted it
|
|
176
|
+
* throws {@link ExtensionModuleError} and the module restarts with its fonts re-registered, but
|
|
177
|
+
* sources and resources are lost. Older sources throw {@link StaleExtensionSourceError} until
|
|
178
|
+
* reopened.
|
|
207
179
|
*/
|
|
208
180
|
export declare class Extensions {
|
|
209
181
|
#private;
|
|
210
182
|
/** Use {@link loadExtensions}. */
|
|
211
183
|
constructor(module: ExtensionModule);
|
|
212
|
-
/**
|
|
184
|
+
/** Built-in providers, in priority order. */
|
|
213
185
|
get providers(): readonly string[];
|
|
214
|
-
/** Whether the module
|
|
186
|
+
/** Whether the module can open this provider source. */
|
|
215
187
|
supports(provider: ProviderSource): boolean;
|
|
216
188
|
/**
|
|
217
|
-
*
|
|
218
|
-
*
|
|
189
|
+
* Probes `bytes` with the first provider that claims them, or returns `null` so the host's own
|
|
190
|
+
* decoders can read them.
|
|
219
191
|
*
|
|
220
192
|
* @throws When a provider claims the bytes and cannot read them.
|
|
221
193
|
*/
|
|
@@ -224,30 +196,23 @@ export declare class Extensions {
|
|
|
224
196
|
readonly report: ExtensionReport;
|
|
225
197
|
} | null;
|
|
226
198
|
/**
|
|
227
|
-
* Registers bytes under a locator
|
|
228
|
-
* until released; {@link withResources}
|
|
229
|
-
* restart forgets them (see {@link Extensions}).
|
|
199
|
+
* Registers bytes under a locator, such as an image sequence frame or an image an SVG references.
|
|
200
|
+
* They stay until released or a module restart; {@link withResources} scopes them to one call.
|
|
230
201
|
*/
|
|
231
202
|
registerResource(locator: string, bytes: Uint8Array): void;
|
|
232
|
-
/** Forgets the bytes registered under a locator. */
|
|
233
203
|
releaseResource(locator: string): void;
|
|
234
|
-
/**
|
|
204
|
+
/** Total registered resource bytes. */
|
|
235
205
|
get resourceBytes(): number;
|
|
236
|
-
/**
|
|
237
|
-
* The resources opening a project's provider source reads, by locator: an image sequence's first
|
|
238
|
-
* frame.
|
|
239
|
-
*/
|
|
206
|
+
/** Locators of resources opening this source reads, such as an image sequence's first frame. */
|
|
240
207
|
openNeeds(provider: ProviderSource): readonly string[];
|
|
241
208
|
/**
|
|
242
|
-
* Runs `call` with the resources `needs` names registered
|
|
243
|
-
* `read`, registered just before `call
|
|
244
|
-
* sequence
|
|
245
|
-
* stays registered after.
|
|
209
|
+
* Runs `call` with the resources `needs` names registered only for its duration. Each is
|
|
210
|
+
* fetched with `read`, registered just before `call`, and released afterwards, so an image
|
|
211
|
+
* sequence enters the module one frame at a time.
|
|
246
212
|
*
|
|
247
|
-
* `needs` is
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
* call too: a page registers a resource one way or the other.
|
|
213
|
+
* `needs` is re-evaluated after the reads, in the same task as `call`, so concurrent calls cannot
|
|
214
|
+
* interfere. Locators previously registered with {@link registerResource} are also released, so
|
|
215
|
+
* use one mechanism or the other.
|
|
251
216
|
*
|
|
252
217
|
* @example
|
|
253
218
|
* const source = await extensions.withResources(
|
|
@@ -263,81 +228,70 @@ export declare class Extensions {
|
|
|
263
228
|
*/
|
|
264
229
|
withResources<T>(read: ResourceReader, needs: () => readonly string[], call: () => T): Promise<T>;
|
|
265
230
|
/**
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
* open in the same task to open with them. Setting the same fonts again (the same arrays, in the
|
|
269
|
-
* same order) copies nothing into the module. They are kept, to be registered again if the module
|
|
270
|
-
* restarts.
|
|
231
|
+
* Replaces the fonts SVG text draws with, in fallback order. Sources read fonts when they open,
|
|
232
|
+
* so existing sources keep their old fonts. Passing the same arrays again is a no-op.
|
|
271
233
|
*
|
|
272
|
-
*
|
|
273
|
-
* should give the same stack so both draw the same glyphs.
|
|
234
|
+
* Use the same font stack as the native host's caption fonts to get identical glyphs.
|
|
274
235
|
*/
|
|
275
236
|
setFonts(fonts: readonly Uint8Array[]): void;
|
|
276
237
|
/**
|
|
277
|
-
* Opens a
|
|
278
|
-
*
|
|
238
|
+
* Opens a provider source. Image sequences take no bytes; their frames are registered resources
|
|
239
|
+
* (see {@link openNeeds} and {@link withResources}).
|
|
279
240
|
*
|
|
280
241
|
* @throws When the source cannot be opened.
|
|
281
242
|
*/
|
|
282
243
|
open(provider: ProviderSource, bytes?: Uint8Array): ExtensionSource;
|
|
283
244
|
}
|
|
284
|
-
/** An opened source
|
|
245
|
+
/** An opened source that renders frames by source tick. */
|
|
285
246
|
export declare class ExtensionSource {
|
|
286
247
|
#private;
|
|
287
|
-
/** What the source holds, as read when it opened. */
|
|
288
248
|
readonly report: ExtensionReport;
|
|
289
249
|
/** Use {@link Extensions.open}. */
|
|
290
250
|
constructor(calls: ExtensionCalls, handle: number);
|
|
291
251
|
/**
|
|
292
|
-
*
|
|
293
|
-
*
|
|
252
|
+
* Renders the frame at a source tick. Vector sources are rasterized to fit `fit` preserving
|
|
253
|
+
* aspect; raster sources render at their own size.
|
|
294
254
|
*
|
|
295
255
|
* @throws {StaleExtensionSourceError} When the module restarted since the source was opened.
|
|
296
|
-
* @throws {ExtensionModuleError} When this source's render
|
|
297
|
-
*
|
|
256
|
+
* @throws {ExtensionModuleError} When this source's render aborted the module, then and on every
|
|
257
|
+
* later render.
|
|
298
258
|
*/
|
|
299
259
|
render(timeTicks: bigint, fit: {
|
|
300
260
|
readonly width: number;
|
|
301
261
|
readonly height: number;
|
|
302
262
|
}): ExtensionFrame;
|
|
303
263
|
/**
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
* or a stale or released one.
|
|
264
|
+
* Locators of resources rendering at a source tick still needs. Empty for stale or released
|
|
265
|
+
* sources.
|
|
307
266
|
*/
|
|
308
267
|
needs(timeTicks: bigint): readonly string[];
|
|
309
268
|
/**
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
* sources hold counts this and releases a source to free it. 0 for a stale or released source.
|
|
269
|
+
* Module memory the source holds between renders (decoded frames, last output, file bytes). 0 for
|
|
270
|
+
* stale or released sources.
|
|
313
271
|
*/
|
|
314
272
|
get residentBytes(): number;
|
|
315
273
|
/**
|
|
316
|
-
*
|
|
317
|
-
*
|
|
274
|
+
* The part of {@link residentBytes} shared with readers from {@link reader}; count it once. 0 for
|
|
275
|
+
* stale or released sources.
|
|
318
276
|
*/
|
|
319
277
|
get sharedBytes(): number;
|
|
320
278
|
/**
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
*
|
|
324
|
-
* of them. Readers stay valid after the source they were made from is released. `null` for a
|
|
325
|
-
* source that draws any time as cheaply (one source serves every reader), or one whose render
|
|
326
|
-
* stopped the module.
|
|
279
|
+
* Creates an independently positioned reader that shares this source's decoded data, so distant
|
|
280
|
+
* readers do not force each other back to the first frame. Readers outlive the source. `null`
|
|
281
|
+
* when random access is already cheap, or when this source aborted the module.
|
|
327
282
|
*
|
|
328
283
|
* @throws {StaleExtensionSourceError} When the module restarted since the source was opened.
|
|
329
284
|
*/
|
|
330
285
|
reader(): ExtensionSource | null;
|
|
331
286
|
/**
|
|
332
|
-
* Frees the source
|
|
333
|
-
*
|
|
287
|
+
* Frees the source. Idempotent; later renders throw. Throws {@link ExtensionModuleError} if the
|
|
288
|
+
* release itself aborts the module.
|
|
334
289
|
*/
|
|
335
290
|
release(): void;
|
|
336
291
|
}
|
|
337
292
|
/**
|
|
338
|
-
* Loads the provider module once per page. `wasmUrl`
|
|
339
|
-
*
|
|
340
|
-
* (the fetch, the instantiation) is not kept: the next call tries again.
|
|
293
|
+
* Loads the provider module once per page. `wasmUrl` locates `alpha2_extensions_bg.wasm` when a
|
|
294
|
+
* bundler moved it. A failed load is not cached.
|
|
341
295
|
*/
|
|
342
296
|
export declare function loadExtensions(wasmUrl?: string | URL): Promise<Extensions>;
|
|
343
297
|
export {};
|