alpha2 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -5
- package/THIRD_PARTY_NOTICES.md +191 -1
- package/dist/apply-edit.d.ts +124 -0
- package/dist/apply-edit.js +15 -0
- package/dist/assets.d.ts +12 -0
- package/dist/audio-layout.js +6 -3
- package/dist/audio-worklet-processor.js +27 -33
- package/dist/audio.d.ts +5 -4
- package/dist/audio.js +8 -6
- package/dist/compose.d.ts +105 -0
- package/dist/compose.js +63 -0
- package/dist/decoder-fallback.d.ts +3 -2
- package/dist/decoder-fallback.js +11 -3
- package/dist/decoder-stall.d.ts +15 -0
- package/dist/decoder-stall.js +52 -0
- package/dist/edit-data.d.ts +24 -0
- package/dist/edit-data.js +224 -0
- package/dist/edit-keys.d.ts +16 -0
- package/dist/edit-keys.js +233 -0
- package/dist/edit.d.ts +41 -8
- package/dist/edit.js +123 -30
- package/dist/export-failure.d.ts +10 -2
- package/dist/export-failure.js +55 -4
- package/dist/export-retry.d.ts +6 -1
- package/dist/export-retry.js +12 -1
- package/dist/exporter.d.ts +11 -7
- package/dist/exporter.js +10 -9
- package/dist/extensions.d.ts +86 -28
- package/dist/extensions.js +204 -61
- package/dist/extract.d.ts +65 -0
- package/dist/extract.js +291 -0
- package/dist/extractor.d.ts +151 -0
- package/dist/extractor.js +141 -0
- package/dist/float32.d.ts +2 -0
- package/dist/float32.js +10 -0
- package/dist/frame-intake.d.ts +5 -0
- package/dist/frame-intake.js +10 -3
- package/dist/generated/builtin-effects.d.ts +3 -0
- package/dist/generated/builtin-effects.js +1804 -0
- package/dist/generated/project-schema.d.ts +696 -41
- package/dist/generated/project-schema.js +67 -0
- package/dist/generated/project-shape.js +986 -383
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/json-text.js +14 -2
- package/dist/layout-values.js +7 -1
- package/dist/layout.d.ts +12 -4
- package/dist/media.d.ts +44 -11
- package/dist/media.js +256 -67
- package/dist/mediabunny.d.ts +32 -12
- package/dist/mediabunny.js +276 -90
- package/dist/player.d.ts +9 -3
- package/dist/player.js +114 -18
- package/dist/plugins.d.ts +62 -0
- package/dist/plugins.js +506 -0
- package/dist/project-data.d.ts +56 -0
- package/dist/project-data.js +765 -0
- package/dist/project.d.ts +36 -1
- package/dist/project.js +515 -42
- package/dist/robustness.d.ts +6 -33
- package/dist/robustness.js +2 -63
- package/dist/sha256.d.ts +3 -2
- package/dist/sha256.js +14 -6
- package/dist/wasm-module.d.ts +37 -0
- package/dist/wasm-module.js +47 -0
- package/dist/worker-error.d.ts +3 -2
- package/dist/worker-error.js +3 -1
- package/dist/worker.d.ts +13 -3
- package/dist/worker.js +36 -9
- package/package.json +36 -2
- package/wasm/alpha2_compose.d.ts +92 -0
- package/wasm/alpha2_compose.js +445 -0
- package/wasm/alpha2_compose_bg.wasm +0 -0
- package/wasm/alpha2_compose_bg.wasm.d.ts +17 -0
- package/wasm/alpha2_extensions.d.ts +4 -4
- package/wasm/alpha2_extensions.js +16 -4
- package/wasm/alpha2_extensions_bg.wasm +0 -0
- package/wasm/alpha2_extensions_pdf.d.ts +227 -0
- package/wasm/alpha2_extensions_pdf.js +841 -0
- package/wasm/alpha2_extensions_pdf_bg.wasm +0 -0
- package/wasm/alpha2_extensions_pdf_bg.wasm.d.ts +38 -0
- package/wasm/alpha2_wasm.d.ts +151 -18
- package/wasm/alpha2_wasm.js +403 -59
- package/wasm/alpha2_wasm_bg.wasm +0 -0
- package/wasm/alpha2_wasm_bg.wasm.d.ts +21 -6
- package/wasm/rust-crate-licenses.md +493 -54
- package/wasm/snippets/alpha2-wasm-1b02e9f302d283ba/inline3.js +7 -0
- /package/wasm/snippets/{alpha2-wasm-a21734ffde826659/inline1.js → alpha2-wasm-1b02e9f302d283ba/inline0.js} +0 -0
- /package/wasm/snippets/{alpha2-wasm-a21734ffde826659/inline2.js → alpha2-wasm-1b02e9f302d283ba/inline1.js} +0 -0
- /package/wasm/snippets/{alpha2-wasm-a21734ffde826659/inline3.js → alpha2-wasm-1b02e9f302d283ba/inline2.js} +0 -0
- /package/wasm/snippets/{alpha2-wasm-a21734ffde826659/inline0.js → alpha2-wasm-1b02e9f302d283ba/inline4.js} +0 -0
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
/* @ts-self-types="./alpha2_compose.d.ts" */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A template bound to its data, or a spec with its template nodes expanded, as JSON.
|
|
5
|
+
* `options` is `{"theme"?, "templates"?}`.
|
|
6
|
+
*
|
|
7
|
+
* # Errors
|
|
8
|
+
* Rejects a template, data or options that do not bind, naming where.
|
|
9
|
+
* @param {string} document
|
|
10
|
+
* @param {string} data
|
|
11
|
+
* @param {string} options
|
|
12
|
+
* @returns {string}
|
|
13
|
+
*/
|
|
14
|
+
export function composeBind(document, data, options) {
|
|
15
|
+
let deferred5_0;
|
|
16
|
+
let deferred5_1;
|
|
17
|
+
try {
|
|
18
|
+
const ptr0 = passStringToWasm0(document, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
19
|
+
const len0 = WASM_VECTOR_LEN;
|
|
20
|
+
const ptr1 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
21
|
+
const len1 = WASM_VECTOR_LEN;
|
|
22
|
+
const ptr2 = passStringToWasm0(options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
23
|
+
const len2 = WASM_VECTOR_LEN;
|
|
24
|
+
const ret = wasm.composeBind(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
25
|
+
var ptr4 = ret[0];
|
|
26
|
+
var len4 = ret[1];
|
|
27
|
+
if (ret[3]) {
|
|
28
|
+
ptr4 = 0; len4 = 0;
|
|
29
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
30
|
+
}
|
|
31
|
+
deferred5_0 = ptr4;
|
|
32
|
+
deferred5_1 = len4;
|
|
33
|
+
return getStringFromWasm0(ptr4, len4);
|
|
34
|
+
} finally {
|
|
35
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* A compose spec compiled with facts about its files and font files, as JSON
|
|
41
|
+
* `{"project", "assets", "loudness", "warnings"}`.
|
|
42
|
+
*
|
|
43
|
+
* # Errors
|
|
44
|
+
* Rejects a spec or facts that do not compile, naming where.
|
|
45
|
+
* @param {string} spec
|
|
46
|
+
* @param {string} facts
|
|
47
|
+
* @param {Uint8Array[]} fonts
|
|
48
|
+
* @returns {string}
|
|
49
|
+
*/
|
|
50
|
+
export function composeCompile(spec, facts, fonts) {
|
|
51
|
+
let deferred5_0;
|
|
52
|
+
let deferred5_1;
|
|
53
|
+
try {
|
|
54
|
+
const ptr0 = passStringToWasm0(spec, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
55
|
+
const len0 = WASM_VECTOR_LEN;
|
|
56
|
+
const ptr1 = passStringToWasm0(facts, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
57
|
+
const len1 = WASM_VECTOR_LEN;
|
|
58
|
+
const ptr2 = passArrayJsValueToWasm0(fonts, wasm.__wbindgen_malloc);
|
|
59
|
+
const len2 = WASM_VECTOR_LEN;
|
|
60
|
+
const ret = wasm.composeCompile(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
61
|
+
var ptr4 = ret[0];
|
|
62
|
+
var len4 = ret[1];
|
|
63
|
+
if (ret[3]) {
|
|
64
|
+
ptr4 = 0; len4 = 0;
|
|
65
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
66
|
+
}
|
|
67
|
+
deferred5_0 = ptr4;
|
|
68
|
+
deferred5_1 = len4;
|
|
69
|
+
return getStringFromWasm0(ptr4, len4);
|
|
70
|
+
} finally {
|
|
71
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* A template's data as a JSON Schema.
|
|
77
|
+
*
|
|
78
|
+
* # Errors
|
|
79
|
+
* Rejects a template that does not parse.
|
|
80
|
+
* @param {string} template
|
|
81
|
+
* @returns {string}
|
|
82
|
+
*/
|
|
83
|
+
export function composeDataSchema(template) {
|
|
84
|
+
let deferred3_0;
|
|
85
|
+
let deferred3_1;
|
|
86
|
+
try {
|
|
87
|
+
const ptr0 = passStringToWasm0(template, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
88
|
+
const len0 = WASM_VECTOR_LEN;
|
|
89
|
+
const ret = wasm.composeDataSchema(ptr0, len0);
|
|
90
|
+
var ptr2 = ret[0];
|
|
91
|
+
var len2 = ret[1];
|
|
92
|
+
if (ret[3]) {
|
|
93
|
+
ptr2 = 0; len2 = 0;
|
|
94
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
95
|
+
}
|
|
96
|
+
deferred3_0 = ptr2;
|
|
97
|
+
deferred3_1 = len2;
|
|
98
|
+
return getStringFromWasm0(ptr2, len2);
|
|
99
|
+
} finally {
|
|
100
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* A template's problems as a JSON list of `{path, code, message, severity}`; `data` may be
|
|
106
|
+
* empty for none.
|
|
107
|
+
*
|
|
108
|
+
* # Errors
|
|
109
|
+
* Rejects text that is not JSON.
|
|
110
|
+
* @param {string} template
|
|
111
|
+
* @param {string} data
|
|
112
|
+
* @param {string} options
|
|
113
|
+
* @returns {string}
|
|
114
|
+
*/
|
|
115
|
+
export function composeLint(template, data, options) {
|
|
116
|
+
let deferred5_0;
|
|
117
|
+
let deferred5_1;
|
|
118
|
+
try {
|
|
119
|
+
const ptr0 = passStringToWasm0(template, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
120
|
+
const len0 = WASM_VECTOR_LEN;
|
|
121
|
+
const ptr1 = passStringToWasm0(data, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
122
|
+
const len1 = WASM_VECTOR_LEN;
|
|
123
|
+
const ptr2 = passStringToWasm0(options, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
124
|
+
const len2 = WASM_VECTOR_LEN;
|
|
125
|
+
const ret = wasm.composeLint(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
126
|
+
var ptr4 = ret[0];
|
|
127
|
+
var len4 = ret[1];
|
|
128
|
+
if (ret[3]) {
|
|
129
|
+
ptr4 = 0; len4 = 0;
|
|
130
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
131
|
+
}
|
|
132
|
+
deferred5_0 = ptr4;
|
|
133
|
+
deferred5_1 = len4;
|
|
134
|
+
return getStringFromWasm0(ptr4, len4);
|
|
135
|
+
} finally {
|
|
136
|
+
wasm.__wbindgen_free(deferred5_0, deferred5_1, 1);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* The files a compose spec names, as JSON `{"media": [{path, kind}], "texts": [path]}`.
|
|
142
|
+
*
|
|
143
|
+
* # Errors
|
|
144
|
+
* Rejects a spec that does not parse, naming where.
|
|
145
|
+
* @param {string} spec
|
|
146
|
+
* @returns {string}
|
|
147
|
+
*/
|
|
148
|
+
export function composeRequirements(spec) {
|
|
149
|
+
let deferred3_0;
|
|
150
|
+
let deferred3_1;
|
|
151
|
+
try {
|
|
152
|
+
const ptr0 = passStringToWasm0(spec, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
153
|
+
const len0 = WASM_VECTOR_LEN;
|
|
154
|
+
const ret = wasm.composeRequirements(ptr0, len0);
|
|
155
|
+
var ptr2 = ret[0];
|
|
156
|
+
var len2 = ret[1];
|
|
157
|
+
if (ret[3]) {
|
|
158
|
+
ptr2 = 0; len2 = 0;
|
|
159
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
160
|
+
}
|
|
161
|
+
deferred3_0 = ptr2;
|
|
162
|
+
deferred3_1 = len2;
|
|
163
|
+
return getStringFromWasm0(ptr2, len2);
|
|
164
|
+
} finally {
|
|
165
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* The 1st-party `alpha2/` templates, as a JSON list.
|
|
171
|
+
* @returns {string}
|
|
172
|
+
*/
|
|
173
|
+
export function composeTemplates() {
|
|
174
|
+
let deferred1_0;
|
|
175
|
+
let deferred1_1;
|
|
176
|
+
try {
|
|
177
|
+
const ret = wasm.composeTemplates();
|
|
178
|
+
deferred1_0 = ret[0];
|
|
179
|
+
deferred1_1 = ret[1];
|
|
180
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
181
|
+
} finally {
|
|
182
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
function __wbg_get_imports() {
|
|
186
|
+
const import0 = {
|
|
187
|
+
__proto__: null,
|
|
188
|
+
__wbg___wbindgen_throw_5d9e815e6fdf150f: function(arg0, arg1) {
|
|
189
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
190
|
+
},
|
|
191
|
+
__wbg_length_31bdaf014f5fbde2: function(arg0) {
|
|
192
|
+
const ret = arg0.length;
|
|
193
|
+
return ret;
|
|
194
|
+
},
|
|
195
|
+
__wbg_new_a32a1ab6c6655abe: function(arg0, arg1) {
|
|
196
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
197
|
+
return ret;
|
|
198
|
+
},
|
|
199
|
+
__wbg_prototypesetcall_ae9f5e7459250748: function(arg0, arg1, arg2) {
|
|
200
|
+
Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);
|
|
201
|
+
},
|
|
202
|
+
__wbg_set_a377297433dfea63: function() { return handleError(function (arg0, arg1, arg2) {
|
|
203
|
+
const ret = Reflect.set(arg0, arg1, arg2);
|
|
204
|
+
return ret;
|
|
205
|
+
}, arguments); },
|
|
206
|
+
__wbindgen_generic_0000000000000001: function(arg0, arg1) {
|
|
207
|
+
// Cast intrinsic for `Ref(String) -> Externref`.
|
|
208
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
209
|
+
return ret;
|
|
210
|
+
},
|
|
211
|
+
__wbindgen_init_externref_table: function() {
|
|
212
|
+
const table = wasm.__wbindgen_externrefs;
|
|
213
|
+
const offset = table.grow(4);
|
|
214
|
+
table.set(0, undefined);
|
|
215
|
+
table.set(offset + 0, undefined);
|
|
216
|
+
table.set(offset + 1, null);
|
|
217
|
+
table.set(offset + 2, true);
|
|
218
|
+
table.set(offset + 3, false);
|
|
219
|
+
},
|
|
220
|
+
};
|
|
221
|
+
return {
|
|
222
|
+
__proto__: null,
|
|
223
|
+
"./alpha2_compose_bg.js": import0,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function addToExternrefTable0(obj) {
|
|
228
|
+
const idx = wasm.__externref_table_alloc();
|
|
229
|
+
wasm.__wbindgen_externrefs.set(idx, obj);
|
|
230
|
+
return idx;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
234
|
+
ptr = ptr >>> 0;
|
|
235
|
+
return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
let cachedDataViewMemory0 = null;
|
|
239
|
+
function getDataViewMemory0() {
|
|
240
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
|
|
241
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
242
|
+
}
|
|
243
|
+
return cachedDataViewMemory0;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
function getStringFromWasm0(ptr, len) {
|
|
247
|
+
return decodeText(ptr >>> 0, len);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
let cachedUint8ArrayMemory0 = null;
|
|
251
|
+
function getUint8ArrayMemory0() {
|
|
252
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
253
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
254
|
+
}
|
|
255
|
+
return cachedUint8ArrayMemory0;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function handleError(f, args) {
|
|
259
|
+
try {
|
|
260
|
+
return f.apply(this, args);
|
|
261
|
+
} catch (e) {
|
|
262
|
+
const idx = addToExternrefTable0(e);
|
|
263
|
+
wasm.__wbindgen_exn_store(idx);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
268
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
269
|
+
for (let i = 0; i < array.length; i++) {
|
|
270
|
+
const add = addToExternrefTable0(array[i]);
|
|
271
|
+
getDataViewMemory0().setUint32(ptr + 4 * i, add, true);
|
|
272
|
+
}
|
|
273
|
+
WASM_VECTOR_LEN = array.length;
|
|
274
|
+
return ptr;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
function passStringToWasm0(arg, malloc, realloc) {
|
|
278
|
+
if (realloc === undefined) {
|
|
279
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
280
|
+
const ptr = malloc(buf.length, 1) >>> 0;
|
|
281
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
282
|
+
WASM_VECTOR_LEN = buf.length;
|
|
283
|
+
return ptr;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
let len = arg.length;
|
|
287
|
+
let ptr = malloc(len, 1) >>> 0;
|
|
288
|
+
|
|
289
|
+
const mem = getUint8ArrayMemory0();
|
|
290
|
+
|
|
291
|
+
let offset = 0;
|
|
292
|
+
|
|
293
|
+
for (; offset < len; offset++) {
|
|
294
|
+
const code = arg.charCodeAt(offset);
|
|
295
|
+
if (code > 0x7F) break;
|
|
296
|
+
mem[ptr + offset] = code;
|
|
297
|
+
}
|
|
298
|
+
if (offset !== len) {
|
|
299
|
+
if (offset !== 0) {
|
|
300
|
+
arg = arg.slice(offset);
|
|
301
|
+
}
|
|
302
|
+
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
303
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
304
|
+
const ret = cachedTextEncoder.encodeInto(arg, view);
|
|
305
|
+
|
|
306
|
+
offset += ret.written;
|
|
307
|
+
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
WASM_VECTOR_LEN = offset;
|
|
311
|
+
return ptr;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
function takeFromExternrefTable0(idx) {
|
|
315
|
+
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
316
|
+
wasm.__externref_table_dealloc(idx);
|
|
317
|
+
return value;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
321
|
+
cachedTextDecoder.decode();
|
|
322
|
+
const MAX_SAFARI_DECODE_BYTES = 2146435072;
|
|
323
|
+
let numBytesDecoded = 0;
|
|
324
|
+
function decodeText(ptr, len) {
|
|
325
|
+
numBytesDecoded += len;
|
|
326
|
+
if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {
|
|
327
|
+
cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
328
|
+
cachedTextDecoder.decode();
|
|
329
|
+
numBytesDecoded = len;
|
|
330
|
+
}
|
|
331
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
const cachedTextEncoder = new TextEncoder();
|
|
335
|
+
|
|
336
|
+
if (!('encodeInto' in cachedTextEncoder)) {
|
|
337
|
+
cachedTextEncoder.encodeInto = function (arg, view) {
|
|
338
|
+
const buf = cachedTextEncoder.encode(arg);
|
|
339
|
+
view.set(buf);
|
|
340
|
+
return {
|
|
341
|
+
read: arg.length,
|
|
342
|
+
written: buf.length
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
let WASM_VECTOR_LEN = 0;
|
|
348
|
+
|
|
349
|
+
let wasmModule, wasmInstance, wasm;
|
|
350
|
+
function __wbg_finalize_init(instance, module) {
|
|
351
|
+
wasmInstance = instance;
|
|
352
|
+
wasm = instance.exports;
|
|
353
|
+
wasmModule = module;
|
|
354
|
+
cachedDataViewMemory0 = null;
|
|
355
|
+
cachedUint8ArrayMemory0 = null;
|
|
356
|
+
wasm.__wbindgen_start();
|
|
357
|
+
return wasm;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
async function __wbg_load(module, imports) {
|
|
361
|
+
if (typeof Response === 'function' && module instanceof Response) {
|
|
362
|
+
if (!module.ok) {
|
|
363
|
+
throw new Error(`failed to fetch Wasm: ${module.status} ${module.statusText} fetching '${module.url}'`);
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
if (typeof WebAssembly.instantiateStreaming === 'function') {
|
|
367
|
+
try {
|
|
368
|
+
return await WebAssembly.instantiateStreaming(module, imports);
|
|
369
|
+
} catch (e) {
|
|
370
|
+
const validResponse = expectedResponseType(module.type);
|
|
371
|
+
|
|
372
|
+
if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {
|
|
373
|
+
console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
|
|
374
|
+
|
|
375
|
+
} else { throw e; }
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
const bytes = await module.arrayBuffer();
|
|
380
|
+
return await WebAssembly.instantiate(bytes, imports);
|
|
381
|
+
} else {
|
|
382
|
+
const instance = await WebAssembly.instantiate(module, imports);
|
|
383
|
+
|
|
384
|
+
if (instance instanceof WebAssembly.Instance) {
|
|
385
|
+
return { instance, module };
|
|
386
|
+
} else {
|
|
387
|
+
return instance;
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
function expectedResponseType(type) {
|
|
392
|
+
switch (type) {
|
|
393
|
+
case 'basic': case 'cors': case 'default': return true;
|
|
394
|
+
}
|
|
395
|
+
return false;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
function initSync(module) {
|
|
400
|
+
if (wasm !== undefined) return wasm;
|
|
401
|
+
|
|
402
|
+
|
|
403
|
+
if (module !== undefined) {
|
|
404
|
+
if (Object.getPrototypeOf(module) === Object.prototype) {
|
|
405
|
+
({module} = module)
|
|
406
|
+
} else {
|
|
407
|
+
console.warn('using deprecated parameters for `initSync()`; pass a single object instead')
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
const imports = __wbg_get_imports();
|
|
412
|
+
if (!(module instanceof WebAssembly.Module)) {
|
|
413
|
+
module = new WebAssembly.Module(module);
|
|
414
|
+
}
|
|
415
|
+
const instance = new WebAssembly.Instance(module, imports);
|
|
416
|
+
return __wbg_finalize_init(instance, module);
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
async function __wbg_init(module_or_path) {
|
|
420
|
+
if (wasm !== undefined) return wasm;
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
if (module_or_path !== undefined) {
|
|
424
|
+
if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
|
|
425
|
+
({module_or_path} = module_or_path)
|
|
426
|
+
} else {
|
|
427
|
+
console.warn('using deprecated parameters for the initialization function; pass a single object instead')
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
if (module_or_path === undefined) {
|
|
432
|
+
module_or_path = new URL('alpha2_compose_bg.wasm', import.meta.url);
|
|
433
|
+
}
|
|
434
|
+
const imports = __wbg_get_imports();
|
|
435
|
+
|
|
436
|
+
if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {
|
|
437
|
+
module_or_path = fetch(module_or_path);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
const { instance, module } = await __wbg_load(await module_or_path, imports);
|
|
441
|
+
|
|
442
|
+
return __wbg_finalize_init(instance, module);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
export { initSync, __wbg_init as default };
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
export const memory: WebAssembly.Memory;
|
|
4
|
+
export const composeBind: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
5
|
+
export const composeCompile: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
6
|
+
export const composeDataSchema: (a: number, b: number) => [number, number, number, number];
|
|
7
|
+
export const composeLint: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number, number];
|
|
8
|
+
export const composeRequirements: (a: number, b: number) => [number, number, number, number];
|
|
9
|
+
export const composeTemplates: () => [number, number];
|
|
10
|
+
export const __wbindgen_exn_store: (a: number) => void;
|
|
11
|
+
export const __externref_table_alloc: () => number;
|
|
12
|
+
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
13
|
+
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
14
|
+
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
15
|
+
export const __externref_table_dealloc: (a: number) => void;
|
|
16
|
+
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
17
|
+
export const __wbindgen_start: () => void;
|
|
@@ -32,8 +32,8 @@ export class ExtensionRegistry {
|
|
|
32
32
|
*/
|
|
33
33
|
openNeeds(provider: string): string;
|
|
34
34
|
/**
|
|
35
|
-
* Opens a provider source (JSON) with its bytes (none for an image sequence) and
|
|
36
|
-
* handle.
|
|
35
|
+
* Opens a provider source (JSON) with its bytes (none for an image sequence or LaTeX) and
|
|
36
|
+
* returns a handle.
|
|
37
37
|
*
|
|
38
38
|
* # Errors
|
|
39
39
|
* If the source cannot be opened.
|
|
@@ -131,8 +131,7 @@ export class RenderedFrame {
|
|
|
131
131
|
*/
|
|
132
132
|
readonly endTicks: bigint | undefined;
|
|
133
133
|
/**
|
|
134
|
-
* Premultiplied linear-light RGBA half-float bits
|
|
135
|
-
* another precision.
|
|
134
|
+
* Premultiplied linear-light RGBA half-float bits (BT.709, rows packed), empty for RGBA8.
|
|
136
135
|
*/
|
|
137
136
|
readonly halfPixels: Uint16Array;
|
|
138
137
|
/**
|
|
@@ -225,3 +224,4 @@ export function initSync(module: { module: SyncInitInput } | SyncInitInput): Ini
|
|
|
225
224
|
* @returns {Promise<InitOutput>}
|
|
226
225
|
*/
|
|
227
226
|
export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;
|
|
227
|
+
export function __wbg_reset_state_async(): Promise<void>;
|
|
@@ -108,8 +108,8 @@ export class ExtensionRegistry {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
|
-
* Opens a provider source (JSON) with its bytes (none for an image sequence) and
|
|
112
|
-
* handle.
|
|
111
|
+
* Opens a provider source (JSON) with its bytes (none for an image sequence or LaTeX) and
|
|
112
|
+
* returns a handle.
|
|
113
113
|
*
|
|
114
114
|
* # Errors
|
|
115
115
|
* If the source cannot be opened.
|
|
@@ -446,8 +446,7 @@ export class RenderedFrame {
|
|
|
446
446
|
return ret[0] === 0 ? undefined : ret[1];
|
|
447
447
|
}
|
|
448
448
|
/**
|
|
449
|
-
* Premultiplied linear-light RGBA half-float bits
|
|
450
|
-
* another precision.
|
|
449
|
+
* Premultiplied linear-light RGBA half-float bits (BT.709, rows packed), empty for RGBA8.
|
|
451
450
|
* @returns {Uint16Array}
|
|
452
451
|
*/
|
|
453
452
|
get halfPixels() {
|
|
@@ -827,3 +826,16 @@ async function __wbg_init(module_or_path) {
|
|
|
827
826
|
}
|
|
828
827
|
|
|
829
828
|
export { initSync, __wbg_init as default };
|
|
829
|
+
|
|
830
|
+
export async function __wbg_reset_state_async () {
|
|
831
|
+
const instance = await WebAssembly.instantiate(wasmModule, __wbg_get_imports());
|
|
832
|
+
__wbg_instance_id++;
|
|
833
|
+
cachedUint16ArrayMemory0 = null;
|
|
834
|
+
cachedUint8ArrayMemory0 = null;
|
|
835
|
+
if (typeof numBytesDecoded !== 'undefined') numBytesDecoded = 0;
|
|
836
|
+
if (typeof WASM_VECTOR_LEN !== 'undefined') WASM_VECTOR_LEN = 0;
|
|
837
|
+
__wbg_reinit_scheduled = false;
|
|
838
|
+
wasmInstance = instance;
|
|
839
|
+
wasm = wasmInstance.exports;
|
|
840
|
+
wasm.__wbindgen_start();
|
|
841
|
+
}
|
|
Binary file
|