@laminapdf/wasm 0.2.0-alpha.2 → 0.2.0-alpha.4
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/dist/lamina_pdf_base.d.ts +16 -4
- package/dist/lamina_pdf_base.js +227 -85
- package/dist/lamina_pdf_base.wasm +0 -0
- package/dist/lamina_pdf_extract.d.ts +416 -10
- package/dist/lamina_pdf_extract.js +421 -90
- package/dist/lamina_pdf_extract.wasm +0 -0
- package/dist/lamina_pdf_render_hayro.wasm +0 -0
- package/dist/lamina_pdf_text.d.ts +429 -11
- package/dist/lamina_pdf_text.js +442 -99
- package/dist/lamina_pdf_text.wasm +0 -0
- package/package.json +1 -1
package/dist/lamina_pdf_text.js
CHANGED
|
@@ -14,6 +14,7 @@ export class WasmBuilder {
|
|
|
14
14
|
free() {
|
|
15
15
|
const ptr = this.__destroy_into_raw();
|
|
16
16
|
wasm.__wbg_wasmbuilder_free(ptr, 0);
|
|
17
|
+
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
19
20
|
* Attaches a file (`/EmbeddedFiles`, the catalog's `/AF`): `name`, its bytes and its MIME
|
|
@@ -33,7 +34,8 @@ export class WasmBuilder {
|
|
|
33
34
|
const len1 = WASM_VECTOR_LEN;
|
|
34
35
|
const ptr2 = passStringToWasm0(mime, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
35
36
|
const len2 = WASM_VECTOR_LEN;
|
|
36
|
-
|
|
37
|
+
let ret;
|
|
38
|
+
ret = wasm.wasmbuilder_attach(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, options);
|
|
37
39
|
if (ret[1]) {
|
|
38
40
|
throw takeFromExternrefTable0(ret[0]);
|
|
39
41
|
}
|
|
@@ -50,7 +52,8 @@ export class WasmBuilder {
|
|
|
50
52
|
destination(name, index, fit) {
|
|
51
53
|
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
52
54
|
const len0 = WASM_VECTOR_LEN;
|
|
53
|
-
|
|
55
|
+
let ret;
|
|
56
|
+
ret = wasm.wasmbuilder_destination(this.__wbg_ptr, ptr0, len0, index, fit);
|
|
54
57
|
if (ret[1]) {
|
|
55
58
|
throw takeFromExternrefTable0(ret[0]);
|
|
56
59
|
}
|
|
@@ -65,7 +68,8 @@ export class WasmBuilder {
|
|
|
65
68
|
* @returns {WasmDocument}
|
|
66
69
|
*/
|
|
67
70
|
finish() {
|
|
68
|
-
|
|
71
|
+
let ret;
|
|
72
|
+
ret = wasm.wasmbuilder_finish(this.__wbg_ptr);
|
|
69
73
|
if (ret[2]) {
|
|
70
74
|
throw takeFromExternrefTable0(ret[1]);
|
|
71
75
|
}
|
|
@@ -83,7 +87,8 @@ export class WasmBuilder {
|
|
|
83
87
|
fontBytes(bytes) {
|
|
84
88
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
85
89
|
const len0 = WASM_VECTOR_LEN;
|
|
86
|
-
|
|
90
|
+
let ret;
|
|
91
|
+
ret = wasm.wasmbuilder_fontBytes(this.__wbg_ptr, ptr0, len0);
|
|
87
92
|
if (ret[2]) {
|
|
88
93
|
throw takeFromExternrefTable0(ret[1]);
|
|
89
94
|
}
|
|
@@ -99,7 +104,8 @@ export class WasmBuilder {
|
|
|
99
104
|
lang(lang) {
|
|
100
105
|
const ptr0 = passStringToWasm0(lang, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
101
106
|
const len0 = WASM_VECTOR_LEN;
|
|
102
|
-
|
|
107
|
+
let ret;
|
|
108
|
+
ret = wasm.wasmbuilder_lang(this.__wbg_ptr, ptr0, len0);
|
|
103
109
|
if (ret[1]) {
|
|
104
110
|
throw takeFromExternrefTable0(ret[0]);
|
|
105
111
|
}
|
|
@@ -112,7 +118,8 @@ export class WasmBuilder {
|
|
|
112
118
|
* @param {MetadataInit} metadata
|
|
113
119
|
*/
|
|
114
120
|
metadata(metadata) {
|
|
115
|
-
|
|
121
|
+
let ret;
|
|
122
|
+
ret = wasm.wasmbuilder_metadata(this.__wbg_ptr, metadata);
|
|
116
123
|
if (ret[1]) {
|
|
117
124
|
throw takeFromExternrefTable0(ret[0]);
|
|
118
125
|
}
|
|
@@ -125,12 +132,14 @@ export class WasmBuilder {
|
|
|
125
132
|
* @param {BuildOptionsInit | undefined} options
|
|
126
133
|
*/
|
|
127
134
|
constructor(options) {
|
|
128
|
-
|
|
135
|
+
let ret;
|
|
136
|
+
ret = wasm.wasmbuilder_new(options);
|
|
129
137
|
if (ret[2]) {
|
|
130
138
|
throw takeFromExternrefTable0(ret[1]);
|
|
131
139
|
}
|
|
132
140
|
this.__wbg_ptr = ret[0];
|
|
133
|
-
|
|
141
|
+
Object.defineProperty(this, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
142
|
+
WasmBuilderFinalization.register(this, { ptr: ret[0], instance: __wbg_instance_id }, this);
|
|
134
143
|
return this;
|
|
135
144
|
}
|
|
136
145
|
/**
|
|
@@ -142,7 +151,8 @@ export class WasmBuilder {
|
|
|
142
151
|
* @returns {string[]}
|
|
143
152
|
*/
|
|
144
153
|
outline(entries) {
|
|
145
|
-
|
|
154
|
+
let ret;
|
|
155
|
+
ret = wasm.wasmbuilder_outline(this.__wbg_ptr, entries);
|
|
146
156
|
if (ret[2]) {
|
|
147
157
|
throw takeFromExternrefTable0(ret[1]);
|
|
148
158
|
}
|
|
@@ -156,7 +166,8 @@ export class WasmBuilder {
|
|
|
156
166
|
* @param {PageLabelInit[]} ranges
|
|
157
167
|
*/
|
|
158
168
|
pageLabels(ranges) {
|
|
159
|
-
|
|
169
|
+
let ret;
|
|
170
|
+
ret = wasm.wasmbuilder_pageLabels(this.__wbg_ptr, ranges);
|
|
160
171
|
if (ret[1]) {
|
|
161
172
|
throw takeFromExternrefTable0(ret[0]);
|
|
162
173
|
}
|
|
@@ -168,7 +179,8 @@ export class WasmBuilder {
|
|
|
168
179
|
* @returns {WasmPageBuilder}
|
|
169
180
|
*/
|
|
170
181
|
page(width, height) {
|
|
171
|
-
|
|
182
|
+
let ret;
|
|
183
|
+
ret = wasm.wasmbuilder_page(this.__wbg_ptr, width, height);
|
|
172
184
|
return WasmPageBuilder.__wrap(ret);
|
|
173
185
|
}
|
|
174
186
|
/**
|
|
@@ -183,7 +195,8 @@ export class WasmBuilder {
|
|
|
183
195
|
standardFont(name) {
|
|
184
196
|
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
185
197
|
const len0 = WASM_VECTOR_LEN;
|
|
186
|
-
|
|
198
|
+
let ret;
|
|
199
|
+
ret = wasm.wasmbuilder_standardFont(this.__wbg_ptr, ptr0, len0);
|
|
187
200
|
if (ret[2]) {
|
|
188
201
|
throw takeFromExternrefTable0(ret[1]);
|
|
189
202
|
}
|
|
@@ -197,7 +210,8 @@ export class WasmBuilder {
|
|
|
197
210
|
* @param {ViewerPreferencesInit} prefs
|
|
198
211
|
*/
|
|
199
212
|
viewerPreferences(prefs) {
|
|
200
|
-
|
|
213
|
+
let ret;
|
|
214
|
+
ret = wasm.wasmbuilder_viewerPreferences(this.__wbg_ptr, prefs);
|
|
201
215
|
if (ret[1]) {
|
|
202
216
|
throw takeFromExternrefTable0(ret[0]);
|
|
203
217
|
}
|
|
@@ -213,7 +227,9 @@ export class WasmDocument {
|
|
|
213
227
|
static __wrap(ptr) {
|
|
214
228
|
const obj = Object.create(WasmDocument.prototype);
|
|
215
229
|
obj.__wbg_ptr = ptr;
|
|
216
|
-
|
|
230
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
231
|
+
|
|
232
|
+
WasmDocumentFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
217
233
|
return obj;
|
|
218
234
|
}
|
|
219
235
|
__destroy_into_raw() {
|
|
@@ -225,6 +241,7 @@ export class WasmDocument {
|
|
|
225
241
|
free() {
|
|
226
242
|
const ptr = this.__destroy_into_raw();
|
|
227
243
|
wasm.__wbg_wasmdocument_free(ptr, 0);
|
|
244
|
+
|
|
228
245
|
}
|
|
229
246
|
/**
|
|
230
247
|
* Applies an op log (`{ "v": 1, "ops": [ … ] }`) as one transaction.
|
|
@@ -237,7 +254,8 @@ export class WasmDocument {
|
|
|
237
254
|
applyLog(json) {
|
|
238
255
|
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
239
256
|
const len0 = WASM_VECTOR_LEN;
|
|
240
|
-
|
|
257
|
+
let ret;
|
|
258
|
+
ret = wasm.wasmdocument_applyLog(this.__wbg_ptr, ptr0, len0);
|
|
241
259
|
if (ret[2]) {
|
|
242
260
|
throw takeFromExternrefTable0(ret[1]);
|
|
243
261
|
}
|
|
@@ -253,18 +271,68 @@ export class WasmDocument {
|
|
|
253
271
|
* @returns {EditedJs}
|
|
254
272
|
*/
|
|
255
273
|
apply(ops) {
|
|
256
|
-
|
|
274
|
+
let ret;
|
|
275
|
+
ret = wasm.wasmdocument_apply(this.__wbg_ptr, ops);
|
|
257
276
|
if (ret[2]) {
|
|
258
277
|
throw takeFromExternrefTable0(ret[1]);
|
|
259
278
|
}
|
|
260
279
|
return takeFromExternrefTable0(ret[0]);
|
|
261
280
|
}
|
|
281
|
+
/**
|
|
282
|
+
* An extraction stepped a page at a time, whose models the host runs: each step returns
|
|
283
|
+
* its progress, with the result it waits for under `request` (render that page at `dpi`,
|
|
284
|
+
* run the model, hand the result to `provide`), and once every page is done, the output in
|
|
285
|
+
* `options.format` (the extract and text modules).
|
|
286
|
+
*
|
|
287
|
+
* # Errors
|
|
288
|
+
* As `extract`, for the options and the pages asked for.
|
|
289
|
+
* @param {ExtractInit} options
|
|
290
|
+
* @returns {WasmExtractJob}
|
|
291
|
+
*/
|
|
292
|
+
extractJob(options) {
|
|
293
|
+
let ret;
|
|
294
|
+
ret = wasm.wasmdocument_extractJob(this.__wbg_ptr, options);
|
|
295
|
+
if (ret[2]) {
|
|
296
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
297
|
+
}
|
|
298
|
+
return WasmExtractJob.__wrap(ret[0]);
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* The document's text for retrieval and LLMs, as one string: Markdown, plain text, the
|
|
302
|
+
* `laminapdf.extract/1` JSON, or the chunks as a JSON array (the extract and text modules).
|
|
303
|
+
*
|
|
304
|
+
* # Errors
|
|
305
|
+
* `page-index-out-of-range` for a page in `pages` past the end; `data-pending` and the
|
|
306
|
+
* reading errors; `unknown-option` / `invalid-argument` for bad options.
|
|
307
|
+
* @param {ExtractInit} options
|
|
308
|
+
* @returns {string}
|
|
309
|
+
*/
|
|
310
|
+
extract(options) {
|
|
311
|
+
let deferred2_0;
|
|
312
|
+
let deferred2_1;
|
|
313
|
+
try {
|
|
314
|
+
let ret;
|
|
315
|
+
ret = wasm.wasmdocument_extract(this.__wbg_ptr, options);
|
|
316
|
+
var ptr1 = ret[0];
|
|
317
|
+
var len1 = ret[1];
|
|
318
|
+
if (ret[3]) {
|
|
319
|
+
ptr1 = 0; len1 = 0;
|
|
320
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
321
|
+
}
|
|
322
|
+
deferred2_0 = ptr1;
|
|
323
|
+
deferred2_1 = len1;
|
|
324
|
+
return getStringFromWasm0(ptr1, len1);
|
|
325
|
+
} finally {
|
|
326
|
+
wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
262
329
|
/**
|
|
263
330
|
* Whether there are changes no save has written yet.
|
|
264
331
|
* @returns {boolean}
|
|
265
332
|
*/
|
|
266
333
|
hasUnsavedChanges() {
|
|
267
|
-
|
|
334
|
+
let ret;
|
|
335
|
+
ret = wasm.wasmdocument_hasUnsavedChanges(this.__wbg_ptr);
|
|
268
336
|
return ret !== 0;
|
|
269
337
|
}
|
|
270
338
|
/**
|
|
@@ -275,7 +343,42 @@ export class WasmDocument {
|
|
|
275
343
|
* @returns {DocumentInfoJs}
|
|
276
344
|
*/
|
|
277
345
|
info() {
|
|
278
|
-
|
|
346
|
+
let ret;
|
|
347
|
+
ret = wasm.wasmdocument_info(this.__wbg_ptr);
|
|
348
|
+
if (ret[2]) {
|
|
349
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
350
|
+
}
|
|
351
|
+
return takeFromExternrefTable0(ret[0]);
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Whether the document says it is tagged (`/MarkInfo /Marked true`; the extract and text modules).
|
|
355
|
+
*
|
|
356
|
+
* # Errors
|
|
357
|
+
* Reading errors.
|
|
358
|
+
* @returns {boolean}
|
|
359
|
+
*/
|
|
360
|
+
isTagged() {
|
|
361
|
+
let ret;
|
|
362
|
+
ret = wasm.wasmdocument_isTagged(this.__wbg_ptr);
|
|
363
|
+
if (ret[2]) {
|
|
364
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
365
|
+
}
|
|
366
|
+
return ret[0] !== 0;
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* The named destination `name`, or `undefined` when the document has none by that name or
|
|
370
|
+
* it names no page here (the extract and text modules).
|
|
371
|
+
*
|
|
372
|
+
* # Errors
|
|
373
|
+
* `data-pending` and the reading errors.
|
|
374
|
+
* @param {string} name
|
|
375
|
+
* @returns {TargetJs | undefined}
|
|
376
|
+
*/
|
|
377
|
+
namedDestination(name) {
|
|
378
|
+
const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
379
|
+
const len0 = WASM_VECTOR_LEN;
|
|
380
|
+
let ret;
|
|
381
|
+
ret = wasm.wasmdocument_namedDestination(this.__wbg_ptr, ptr0, len0);
|
|
279
382
|
if (ret[2]) {
|
|
280
383
|
throw takeFromExternrefTable0(ret[1]);
|
|
281
384
|
}
|
|
@@ -294,7 +397,8 @@ export class WasmDocument {
|
|
|
294
397
|
static openBytes(bytes, options) {
|
|
295
398
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
296
399
|
const len0 = WASM_VECTOR_LEN;
|
|
297
|
-
|
|
400
|
+
let ret;
|
|
401
|
+
ret = wasm.wasmdocument_openBytes(ptr0, len0, options);
|
|
298
402
|
if (ret[2]) {
|
|
299
403
|
throw takeFromExternrefTable0(ret[1]);
|
|
300
404
|
}
|
|
@@ -313,12 +417,29 @@ export class WasmDocument {
|
|
|
313
417
|
*/
|
|
314
418
|
static openSource(source, options) {
|
|
315
419
|
_assertClass(source, WasmSparseSource);
|
|
316
|
-
|
|
420
|
+
let ret;
|
|
421
|
+
ret = wasm.wasmdocument_openSource(source.__wbg_ptr, options);
|
|
317
422
|
if (ret[2]) {
|
|
318
423
|
throw takeFromExternrefTable0(ret[1]);
|
|
319
424
|
}
|
|
320
425
|
return WasmDocument.__wrap(ret[0]);
|
|
321
426
|
}
|
|
427
|
+
/**
|
|
428
|
+
* The outline's top-level items, each with its children; empty without an outline (the
|
|
429
|
+
* extract and text modules).
|
|
430
|
+
*
|
|
431
|
+
* # Errors
|
|
432
|
+
* `data-pending` and the reading errors.
|
|
433
|
+
* @returns {OutlineNodeJs[]}
|
|
434
|
+
*/
|
|
435
|
+
outline() {
|
|
436
|
+
let ret;
|
|
437
|
+
ret = wasm.wasmdocument_outline(this.__wbg_ptr);
|
|
438
|
+
if (ret[2]) {
|
|
439
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
440
|
+
}
|
|
441
|
+
return takeFromExternrefTable0(ret[0]);
|
|
442
|
+
}
|
|
322
443
|
/**
|
|
323
444
|
* A handle on the page with `id` (`p12.0`).
|
|
324
445
|
*
|
|
@@ -330,7 +451,8 @@ export class WasmDocument {
|
|
|
330
451
|
pageById(id) {
|
|
331
452
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
332
453
|
const len0 = WASM_VECTOR_LEN;
|
|
333
|
-
|
|
454
|
+
let ret;
|
|
455
|
+
ret = wasm.wasmdocument_pageById(this.__wbg_ptr, ptr0, len0);
|
|
334
456
|
if (ret[2]) {
|
|
335
457
|
throw takeFromExternrefTable0(ret[1]);
|
|
336
458
|
}
|
|
@@ -344,7 +466,8 @@ export class WasmDocument {
|
|
|
344
466
|
* @returns {number}
|
|
345
467
|
*/
|
|
346
468
|
pageCount() {
|
|
347
|
-
|
|
469
|
+
let ret;
|
|
470
|
+
ret = wasm.wasmdocument_pageCount(this.__wbg_ptr);
|
|
348
471
|
if (ret[2]) {
|
|
349
472
|
throw takeFromExternrefTable0(ret[1]);
|
|
350
473
|
}
|
|
@@ -359,7 +482,8 @@ export class WasmDocument {
|
|
|
359
482
|
* @returns {PageInfoJs}
|
|
360
483
|
*/
|
|
361
484
|
pageInfo(index) {
|
|
362
|
-
|
|
485
|
+
let ret;
|
|
486
|
+
ret = wasm.wasmdocument_pageInfo(this.__wbg_ptr, index);
|
|
363
487
|
if (ret[2]) {
|
|
364
488
|
throw takeFromExternrefTable0(ret[1]);
|
|
365
489
|
}
|
|
@@ -373,7 +497,8 @@ export class WasmDocument {
|
|
|
373
497
|
* @returns {PageInfoJs[]}
|
|
374
498
|
*/
|
|
375
499
|
pageInfos() {
|
|
376
|
-
|
|
500
|
+
let ret;
|
|
501
|
+
ret = wasm.wasmdocument_pageInfos(this.__wbg_ptr);
|
|
377
502
|
if (ret[2]) {
|
|
378
503
|
throw takeFromExternrefTable0(ret[1]);
|
|
379
504
|
}
|
|
@@ -388,7 +513,8 @@ export class WasmDocument {
|
|
|
388
513
|
* @returns {WasmPage}
|
|
389
514
|
*/
|
|
390
515
|
page(index) {
|
|
391
|
-
|
|
516
|
+
let ret;
|
|
517
|
+
ret = wasm.wasmdocument_page(this.__wbg_ptr, index);
|
|
392
518
|
if (ret[2]) {
|
|
393
519
|
throw takeFromExternrefTable0(ret[1]);
|
|
394
520
|
}
|
|
@@ -404,7 +530,8 @@ export class WasmDocument {
|
|
|
404
530
|
rebase(bytes) {
|
|
405
531
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
406
532
|
const len0 = WASM_VECTOR_LEN;
|
|
407
|
-
|
|
533
|
+
let ret;
|
|
534
|
+
ret = wasm.wasmdocument_rebase(this.__wbg_ptr, ptr0, len0);
|
|
408
535
|
if (ret[1]) {
|
|
409
536
|
throw takeFromExternrefTable0(ret[0]);
|
|
410
537
|
}
|
|
@@ -417,7 +544,8 @@ export class WasmDocument {
|
|
|
417
544
|
* @returns {UndoOutcomeJs | undefined}
|
|
418
545
|
*/
|
|
419
546
|
redo() {
|
|
420
|
-
|
|
547
|
+
let ret;
|
|
548
|
+
ret = wasm.wasmdocument_redo(this.__wbg_ptr);
|
|
421
549
|
if (ret[2]) {
|
|
422
550
|
throw takeFromExternrefTable0(ret[1]);
|
|
423
551
|
}
|
|
@@ -432,7 +560,8 @@ export class WasmDocument {
|
|
|
432
560
|
* @returns {WasmSaveJob}
|
|
433
561
|
*/
|
|
434
562
|
saveJob(options) {
|
|
435
|
-
|
|
563
|
+
let ret;
|
|
564
|
+
ret = wasm.wasmdocument_saveJob(this.__wbg_ptr, options);
|
|
436
565
|
if (ret[2]) {
|
|
437
566
|
throw takeFromExternrefTable0(ret[1]);
|
|
438
567
|
}
|
|
@@ -447,7 +576,24 @@ export class WasmDocument {
|
|
|
447
576
|
* @returns {{ bytes: Uint8Array<ArrayBuffer>; report: SaveReportJs }}
|
|
448
577
|
*/
|
|
449
578
|
save(options) {
|
|
450
|
-
|
|
579
|
+
let ret;
|
|
580
|
+
ret = wasm.wasmdocument_save(this.__wbg_ptr, options);
|
|
581
|
+
if (ret[2]) {
|
|
582
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
583
|
+
}
|
|
584
|
+
return takeFromExternrefTable0(ret[0]);
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* The structure tree's top-level elements in reading order, or `undefined` without one (the
|
|
588
|
+
* extract and text modules, beside `WasmPage.text`, whose runs it links by MCID).
|
|
589
|
+
*
|
|
590
|
+
* # Errors
|
|
591
|
+
* Reading errors.
|
|
592
|
+
* @returns {StructureNodeJs[] | undefined}
|
|
593
|
+
*/
|
|
594
|
+
structureTree() {
|
|
595
|
+
let ret;
|
|
596
|
+
ret = wasm.wasmdocument_structureTree(this.__wbg_ptr);
|
|
451
597
|
if (ret[2]) {
|
|
452
598
|
throw takeFromExternrefTable0(ret[1]);
|
|
453
599
|
}
|
|
@@ -461,7 +607,8 @@ export class WasmDocument {
|
|
|
461
607
|
* @returns {UndoOutcomeJs | undefined}
|
|
462
608
|
*/
|
|
463
609
|
undo() {
|
|
464
|
-
|
|
610
|
+
let ret;
|
|
611
|
+
ret = wasm.wasmdocument_undo(this.__wbg_ptr);
|
|
465
612
|
if (ret[2]) {
|
|
466
613
|
throw takeFromExternrefTable0(ret[1]);
|
|
467
614
|
}
|
|
@@ -472,12 +619,80 @@ export class WasmDocument {
|
|
|
472
619
|
* @returns {WasmWarningCursor}
|
|
473
620
|
*/
|
|
474
621
|
warnings() {
|
|
475
|
-
|
|
622
|
+
let ret;
|
|
623
|
+
ret = wasm.wasmdocument_warnings(this.__wbg_ptr);
|
|
476
624
|
return WasmWarningCursor.__wrap(ret);
|
|
477
625
|
}
|
|
478
626
|
}
|
|
479
627
|
if (Symbol.dispose) WasmDocument.prototype[Symbol.dispose] = WasmDocument.prototype.free;
|
|
480
628
|
|
|
629
|
+
/**
|
|
630
|
+
* An extraction in progress, from `WasmDocument.extractJob`; it holds its document weakly.
|
|
631
|
+
*/
|
|
632
|
+
export class WasmExtractJob {
|
|
633
|
+
static __wrap(ptr) {
|
|
634
|
+
const obj = Object.create(WasmExtractJob.prototype);
|
|
635
|
+
obj.__wbg_ptr = ptr;
|
|
636
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
637
|
+
|
|
638
|
+
WasmExtractJobFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
639
|
+
return obj;
|
|
640
|
+
}
|
|
641
|
+
__destroy_into_raw() {
|
|
642
|
+
const ptr = this.__wbg_ptr;
|
|
643
|
+
this.__wbg_ptr = 0;
|
|
644
|
+
WasmExtractJobFinalization.unregister(this);
|
|
645
|
+
return ptr;
|
|
646
|
+
}
|
|
647
|
+
free() {
|
|
648
|
+
const ptr = this.__destroy_into_raw();
|
|
649
|
+
wasm.__wbg_wasmextractjob_free(ptr, 0);
|
|
650
|
+
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Stops the job: its next step fails with `cancelled`.
|
|
654
|
+
*/
|
|
655
|
+
cancel() {
|
|
656
|
+
wasm.wasmextractjob_cancel(this.__wbg_ptr);
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Hands the job the result of its open request: `{ kind: "layout", regions }` or
|
|
660
|
+
* `{ kind: "ocr", words }`, boxes as `[x, y, width, height]` in top-left points.
|
|
661
|
+
*
|
|
662
|
+
* # Errors
|
|
663
|
+
* `model-result-unexpected` when nothing was asked for or `result` is the other kind;
|
|
664
|
+
* `invalid-argument` / `unknown-option` for a malformed result.
|
|
665
|
+
* @param {ModelResultInit} result
|
|
666
|
+
*/
|
|
667
|
+
provide(result) {
|
|
668
|
+
let ret;
|
|
669
|
+
ret = wasm.wasmextractjob_provide(this.__wbg_ptr, result);
|
|
670
|
+
if (ret[1]) {
|
|
671
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Extracts up to `budget` pages: `{ state: "progress", done, total, phase, request? }` or
|
|
676
|
+
* `{ state: "done", output }`, the output in the job's format. While `request` is set, a
|
|
677
|
+
* step does nothing until `provide` answers it.
|
|
678
|
+
*
|
|
679
|
+
* # Errors
|
|
680
|
+
* `cancelled`, `document-changed`, `job-finished`, `disposed` when the document is freed,
|
|
681
|
+
* and the reading errors.
|
|
682
|
+
* @param {number} budget
|
|
683
|
+
* @returns {({ state: "progress" } & ExtractProgressJs) | { state: "done"; output: string }}
|
|
684
|
+
*/
|
|
685
|
+
step(budget) {
|
|
686
|
+
let ret;
|
|
687
|
+
ret = wasm.wasmextractjob_step(this.__wbg_ptr, budget);
|
|
688
|
+
if (ret[2]) {
|
|
689
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
690
|
+
}
|
|
691
|
+
return takeFromExternrefTable0(ret[0]);
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
if (Symbol.dispose) WasmExtractJob.prototype[Symbol.dispose] = WasmExtractJob.prototype.free;
|
|
695
|
+
|
|
481
696
|
/**
|
|
482
697
|
* A font registered with a [`WasmBuilder`].
|
|
483
698
|
*/
|
|
@@ -485,7 +700,9 @@ export class WasmFont {
|
|
|
485
700
|
static __wrap(ptr) {
|
|
486
701
|
const obj = Object.create(WasmFont.prototype);
|
|
487
702
|
obj.__wbg_ptr = ptr;
|
|
488
|
-
|
|
703
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
704
|
+
|
|
705
|
+
WasmFontFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
489
706
|
return obj;
|
|
490
707
|
}
|
|
491
708
|
__destroy_into_raw() {
|
|
@@ -497,6 +714,7 @@ export class WasmFont {
|
|
|
497
714
|
free() {
|
|
498
715
|
const ptr = this.__destroy_into_raw();
|
|
499
716
|
wasm.__wbg_wasmfont_free(ptr, 0);
|
|
717
|
+
|
|
500
718
|
}
|
|
501
719
|
/**
|
|
502
720
|
* The family name.
|
|
@@ -506,7 +724,8 @@ export class WasmFont {
|
|
|
506
724
|
let deferred1_0;
|
|
507
725
|
let deferred1_1;
|
|
508
726
|
try {
|
|
509
|
-
|
|
727
|
+
let ret;
|
|
728
|
+
ret = wasm.wasmfont_family(this.__wbg_ptr);
|
|
510
729
|
deferred1_0 = ret[0];
|
|
511
730
|
deferred1_1 = ret[1];
|
|
512
731
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -519,7 +738,8 @@ export class WasmFont {
|
|
|
519
738
|
* @returns {boolean}
|
|
520
739
|
*/
|
|
521
740
|
get isStandard() {
|
|
522
|
-
|
|
741
|
+
let ret;
|
|
742
|
+
ret = wasm.wasmfont_isStandard(this.__wbg_ptr);
|
|
523
743
|
return ret !== 0;
|
|
524
744
|
}
|
|
525
745
|
/**
|
|
@@ -530,7 +750,8 @@ export class WasmFont {
|
|
|
530
750
|
let deferred1_0;
|
|
531
751
|
let deferred1_1;
|
|
532
752
|
try {
|
|
533
|
-
|
|
753
|
+
let ret;
|
|
754
|
+
ret = wasm.wasmfont_postscriptName(this.__wbg_ptr);
|
|
534
755
|
deferred1_0 = ret[0];
|
|
535
756
|
deferred1_1 = ret[1];
|
|
536
757
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -548,7 +769,9 @@ export class WasmImage {
|
|
|
548
769
|
static __wrap(ptr) {
|
|
549
770
|
const obj = Object.create(WasmImage.prototype);
|
|
550
771
|
obj.__wbg_ptr = ptr;
|
|
551
|
-
|
|
772
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
773
|
+
|
|
774
|
+
WasmImageFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
552
775
|
return obj;
|
|
553
776
|
}
|
|
554
777
|
__destroy_into_raw() {
|
|
@@ -560,13 +783,15 @@ export class WasmImage {
|
|
|
560
783
|
free() {
|
|
561
784
|
const ptr = this.__destroy_into_raw();
|
|
562
785
|
wasm.__wbg_wasmimage_free(ptr, 0);
|
|
786
|
+
|
|
563
787
|
}
|
|
564
788
|
/**
|
|
565
789
|
* Height in pixels.
|
|
566
790
|
* @returns {number}
|
|
567
791
|
*/
|
|
568
792
|
get height() {
|
|
569
|
-
|
|
793
|
+
let ret;
|
|
794
|
+
ret = wasm.wasmimage_height(this.__wbg_ptr);
|
|
570
795
|
return ret >>> 0;
|
|
571
796
|
}
|
|
572
797
|
/**
|
|
@@ -580,7 +805,8 @@ export class WasmImage {
|
|
|
580
805
|
static jpeg(bytes) {
|
|
581
806
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
582
807
|
const len0 = WASM_VECTOR_LEN;
|
|
583
|
-
|
|
808
|
+
let ret;
|
|
809
|
+
ret = wasm.wasmimage_jpeg(ptr0, len0);
|
|
584
810
|
if (ret[2]) {
|
|
585
811
|
throw takeFromExternrefTable0(ret[1]);
|
|
586
812
|
}
|
|
@@ -597,7 +823,8 @@ export class WasmImage {
|
|
|
597
823
|
static png(bytes) {
|
|
598
824
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
599
825
|
const len0 = WASM_VECTOR_LEN;
|
|
600
|
-
|
|
826
|
+
let ret;
|
|
827
|
+
ret = wasm.wasmimage_png(ptr0, len0);
|
|
601
828
|
if (ret[2]) {
|
|
602
829
|
throw takeFromExternrefTable0(ret[1]);
|
|
603
830
|
}
|
|
@@ -616,7 +843,8 @@ export class WasmImage {
|
|
|
616
843
|
static rgba(width, height, rgba) {
|
|
617
844
|
const ptr0 = passArray8ToWasm0(rgba, wasm.__wbindgen_malloc);
|
|
618
845
|
const len0 = WASM_VECTOR_LEN;
|
|
619
|
-
|
|
846
|
+
let ret;
|
|
847
|
+
ret = wasm.wasmimage_rgba(width, height, ptr0, len0);
|
|
620
848
|
if (ret[2]) {
|
|
621
849
|
throw takeFromExternrefTable0(ret[1]);
|
|
622
850
|
}
|
|
@@ -627,7 +855,8 @@ export class WasmImage {
|
|
|
627
855
|
* @returns {number}
|
|
628
856
|
*/
|
|
629
857
|
get width() {
|
|
630
|
-
|
|
858
|
+
let ret;
|
|
859
|
+
ret = wasm.wasmimage_width(this.__wbg_ptr);
|
|
631
860
|
return ret >>> 0;
|
|
632
861
|
}
|
|
633
862
|
}
|
|
@@ -640,7 +869,9 @@ export class WasmPage {
|
|
|
640
869
|
static __wrap(ptr) {
|
|
641
870
|
const obj = Object.create(WasmPage.prototype);
|
|
642
871
|
obj.__wbg_ptr = ptr;
|
|
643
|
-
|
|
872
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
873
|
+
|
|
874
|
+
WasmPageFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
644
875
|
return obj;
|
|
645
876
|
}
|
|
646
877
|
__destroy_into_raw() {
|
|
@@ -652,6 +883,7 @@ export class WasmPage {
|
|
|
652
883
|
free() {
|
|
653
884
|
const ptr = this.__destroy_into_raw();
|
|
654
885
|
wasm.__wbg_wasmpage_free(ptr, 0);
|
|
886
|
+
|
|
655
887
|
}
|
|
656
888
|
/**
|
|
657
889
|
* The page's stable ID (`p12.0`).
|
|
@@ -661,7 +893,8 @@ export class WasmPage {
|
|
|
661
893
|
let deferred1_0;
|
|
662
894
|
let deferred1_1;
|
|
663
895
|
try {
|
|
664
|
-
|
|
896
|
+
let ret;
|
|
897
|
+
ret = wasm.wasmpage_id(this.__wbg_ptr);
|
|
665
898
|
deferred1_0 = ret[0];
|
|
666
899
|
deferred1_1 = ret[1];
|
|
667
900
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -673,11 +906,13 @@ export class WasmPage {
|
|
|
673
906
|
* The page's current 0-based index.
|
|
674
907
|
*
|
|
675
908
|
* # Errors
|
|
676
|
-
* `unknown-page` when the page is gone; reading
|
|
909
|
+
* `unknown-page` when the page is gone; `disposed` when its document is freed; reading
|
|
910
|
+
* errors.
|
|
677
911
|
* @returns {number}
|
|
678
912
|
*/
|
|
679
913
|
index() {
|
|
680
|
-
|
|
914
|
+
let ret;
|
|
915
|
+
ret = wasm.wasmpage_index(this.__wbg_ptr);
|
|
681
916
|
if (ret[2]) {
|
|
682
917
|
throw takeFromExternrefTable0(ret[1]);
|
|
683
918
|
}
|
|
@@ -691,24 +926,26 @@ export class WasmPage {
|
|
|
691
926
|
* @returns {PageInfoJs}
|
|
692
927
|
*/
|
|
693
928
|
info() {
|
|
694
|
-
|
|
929
|
+
let ret;
|
|
930
|
+
ret = wasm.wasmpage_info(this.__wbg_ptr);
|
|
695
931
|
if (ret[2]) {
|
|
696
932
|
throw takeFromExternrefTable0(ret[1]);
|
|
697
933
|
}
|
|
698
934
|
return takeFromExternrefTable0(ret[0]);
|
|
699
935
|
}
|
|
700
936
|
/**
|
|
701
|
-
* The page's text: lines, runs, glyph quads and glyph text (
|
|
702
|
-
* modules).
|
|
937
|
+
* The page's text: lines, runs, glyph quads and glyph text (the extract and text modules).
|
|
703
938
|
*
|
|
704
939
|
* # Errors
|
|
705
|
-
* `unknown-page` when the page is gone; `
|
|
706
|
-
* `unknown-option` / `invalid-argument` for bad
|
|
940
|
+
* `unknown-page` when the page is gone; `disposed` when its document is freed;
|
|
941
|
+
* `data-pending` and the reading errors; `unknown-option` / `invalid-argument` for bad
|
|
942
|
+
* options.
|
|
707
943
|
* @param {TextOptionsInit | undefined} options
|
|
708
944
|
* @returns {PageTextJs}
|
|
709
945
|
*/
|
|
710
946
|
text(options) {
|
|
711
|
-
|
|
947
|
+
let ret;
|
|
948
|
+
ret = wasm.wasmpage_text(this.__wbg_ptr, options);
|
|
712
949
|
if (ret[2]) {
|
|
713
950
|
throw takeFromExternrefTable0(ret[1]);
|
|
714
951
|
}
|
|
@@ -725,7 +962,9 @@ export class WasmPageBuilder {
|
|
|
725
962
|
static __wrap(ptr) {
|
|
726
963
|
const obj = Object.create(WasmPageBuilder.prototype);
|
|
727
964
|
obj.__wbg_ptr = ptr;
|
|
728
|
-
|
|
965
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
966
|
+
|
|
967
|
+
WasmPageBuilderFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
729
968
|
return obj;
|
|
730
969
|
}
|
|
731
970
|
__destroy_into_raw() {
|
|
@@ -737,10 +976,12 @@ export class WasmPageBuilder {
|
|
|
737
976
|
free() {
|
|
738
977
|
const ptr = this.__destroy_into_raw();
|
|
739
978
|
wasm.__wbg_wasmpagebuilder_free(ptr, 0);
|
|
979
|
+
|
|
740
980
|
}
|
|
741
981
|
/**
|
|
742
982
|
* Opens an artifact until the matching `endTag`: `kind` is `layout`, `page`, `pagination`
|
|
743
|
-
* or `background
|
|
983
|
+
* or `background`, or a pagination artifact that says what it is: `header` (attached to the
|
|
984
|
+
* top edge), `footer` (the bottom) or `watermark`.
|
|
744
985
|
*
|
|
745
986
|
* # Errors
|
|
746
987
|
* `invalid-argument` for another kind.
|
|
@@ -749,7 +990,8 @@ export class WasmPageBuilder {
|
|
|
749
990
|
beginArtifact(kind) {
|
|
750
991
|
const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
751
992
|
const len0 = WASM_VECTOR_LEN;
|
|
752
|
-
|
|
993
|
+
let ret;
|
|
994
|
+
ret = wasm.wasmpagebuilder_beginArtifact(this.__wbg_ptr, ptr0, len0);
|
|
753
995
|
if (ret[1]) {
|
|
754
996
|
throw takeFromExternrefTable0(ret[0]);
|
|
755
997
|
}
|
|
@@ -786,7 +1028,8 @@ export class WasmPageBuilder {
|
|
|
786
1028
|
var len5 = WASM_VECTOR_LEN;
|
|
787
1029
|
var ptr6 = isLikeNone(scope) ? 0 : passStringToWasm0(scope, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
788
1030
|
var len6 = WASM_VECTOR_LEN;
|
|
789
|
-
|
|
1031
|
+
let ret;
|
|
1032
|
+
ret = wasm.wasmpagebuilder_beginTag(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6);
|
|
790
1033
|
if (ret[1]) {
|
|
791
1034
|
throw takeFromExternrefTable0(ret[0]);
|
|
792
1035
|
}
|
|
@@ -801,7 +1044,8 @@ export class WasmPageBuilder {
|
|
|
801
1044
|
blendMode(mode) {
|
|
802
1045
|
const ptr0 = passStringToWasm0(mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
803
1046
|
const len0 = WASM_VECTOR_LEN;
|
|
804
|
-
|
|
1047
|
+
let ret;
|
|
1048
|
+
ret = wasm.wasmpagebuilder_blendMode(this.__wbg_ptr, ptr0, len0);
|
|
805
1049
|
if (ret[1]) {
|
|
806
1050
|
throw takeFromExternrefTable0(ret[0]);
|
|
807
1051
|
}
|
|
@@ -819,7 +1063,8 @@ export class WasmPageBuilder {
|
|
|
819
1063
|
const len0 = WASM_VECTOR_LEN;
|
|
820
1064
|
const ptr1 = passStringToWasm0(rule, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
821
1065
|
const len1 = WASM_VECTOR_LEN;
|
|
822
|
-
|
|
1066
|
+
let ret;
|
|
1067
|
+
ret = wasm.wasmpagebuilder_clipPath(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
823
1068
|
if (ret[1]) {
|
|
824
1069
|
throw takeFromExternrefTable0(ret[0]);
|
|
825
1070
|
}
|
|
@@ -831,7 +1076,8 @@ export class WasmPageBuilder {
|
|
|
831
1076
|
* `builder-finished`.
|
|
832
1077
|
*/
|
|
833
1078
|
endTag() {
|
|
834
|
-
|
|
1079
|
+
let ret;
|
|
1080
|
+
ret = wasm.wasmpagebuilder_endTag(this.__wbg_ptr);
|
|
835
1081
|
if (ret[1]) {
|
|
836
1082
|
throw takeFromExternrefTable0(ret[0]);
|
|
837
1083
|
}
|
|
@@ -846,7 +1092,8 @@ export class WasmPageBuilder {
|
|
|
846
1092
|
fillColorHex(hex) {
|
|
847
1093
|
const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
848
1094
|
const len0 = WASM_VECTOR_LEN;
|
|
849
|
-
|
|
1095
|
+
let ret;
|
|
1096
|
+
ret = wasm.wasmpagebuilder_fillColorHex(this.__wbg_ptr, ptr0, len0);
|
|
850
1097
|
if (ret[1]) {
|
|
851
1098
|
throw takeFromExternrefTable0(ret[0]);
|
|
852
1099
|
}
|
|
@@ -861,7 +1108,8 @@ export class WasmPageBuilder {
|
|
|
861
1108
|
fillColor(components) {
|
|
862
1109
|
const ptr0 = passArrayF64ToWasm0(components, wasm.__wbindgen_malloc);
|
|
863
1110
|
const len0 = WASM_VECTOR_LEN;
|
|
864
|
-
|
|
1111
|
+
let ret;
|
|
1112
|
+
ret = wasm.wasmpagebuilder_fillColor(this.__wbg_ptr, ptr0, len0);
|
|
865
1113
|
if (ret[1]) {
|
|
866
1114
|
throw takeFromExternrefTable0(ret[0]);
|
|
867
1115
|
}
|
|
@@ -879,7 +1127,8 @@ export class WasmPageBuilder {
|
|
|
879
1127
|
const len0 = WASM_VECTOR_LEN;
|
|
880
1128
|
const ptr1 = passStringToWasm0(rule, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
881
1129
|
const len1 = WASM_VECTOR_LEN;
|
|
882
|
-
|
|
1130
|
+
let ret;
|
|
1131
|
+
ret = wasm.wasmpagebuilder_fillPath(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
883
1132
|
if (ret[1]) {
|
|
884
1133
|
throw takeFromExternrefTable0(ret[0]);
|
|
885
1134
|
}
|
|
@@ -897,7 +1146,8 @@ export class WasmPageBuilder {
|
|
|
897
1146
|
const len0 = WASM_VECTOR_LEN;
|
|
898
1147
|
const ptr1 = passStringToWasm0(rule, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
899
1148
|
const len1 = WASM_VECTOR_LEN;
|
|
900
|
-
|
|
1149
|
+
let ret;
|
|
1150
|
+
ret = wasm.wasmpagebuilder_fillStrokePath(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
901
1151
|
if (ret[1]) {
|
|
902
1152
|
throw takeFromExternrefTable0(ret[0]);
|
|
903
1153
|
}
|
|
@@ -916,7 +1166,8 @@ export class WasmPageBuilder {
|
|
|
916
1166
|
let deferred2_0;
|
|
917
1167
|
let deferred2_1;
|
|
918
1168
|
try {
|
|
919
|
-
|
|
1169
|
+
let ret;
|
|
1170
|
+
ret = wasm.wasmpagebuilder_finish(this.__wbg_ptr);
|
|
920
1171
|
var ptr1 = ret[0];
|
|
921
1172
|
var len1 = ret[1];
|
|
922
1173
|
if (ret[3]) {
|
|
@@ -943,7 +1194,8 @@ export class WasmPageBuilder {
|
|
|
943
1194
|
*/
|
|
944
1195
|
image(image, x, y, width, height) {
|
|
945
1196
|
_assertClass(image, WasmImage);
|
|
946
|
-
|
|
1197
|
+
let ret;
|
|
1198
|
+
ret = wasm.wasmpagebuilder_image(this.__wbg_ptr, image.__wbg_ptr, x, y, width, height);
|
|
947
1199
|
if (ret[1]) {
|
|
948
1200
|
throw takeFromExternrefTable0(ret[0]);
|
|
949
1201
|
}
|
|
@@ -963,7 +1215,8 @@ export class WasmPageBuilder {
|
|
|
963
1215
|
link(x, y, width, height, target, contents) {
|
|
964
1216
|
var ptr0 = isLikeNone(contents) ? 0 : passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
965
1217
|
var len0 = WASM_VECTOR_LEN;
|
|
966
|
-
|
|
1218
|
+
let ret;
|
|
1219
|
+
ret = wasm.wasmpagebuilder_link(this.__wbg_ptr, x, y, width, height, target, ptr0, len0);
|
|
967
1220
|
if (ret[1]) {
|
|
968
1221
|
throw takeFromExternrefTable0(ret[0]);
|
|
969
1222
|
}
|
|
@@ -977,7 +1230,8 @@ export class WasmPageBuilder {
|
|
|
977
1230
|
* @param {number} stroke
|
|
978
1231
|
*/
|
|
979
1232
|
opacity(fill, stroke) {
|
|
980
|
-
|
|
1233
|
+
let ret;
|
|
1234
|
+
ret = wasm.wasmpagebuilder_opacity(this.__wbg_ptr, fill, stroke);
|
|
981
1235
|
if (ret[1]) {
|
|
982
1236
|
throw takeFromExternrefTable0(ret[0]);
|
|
983
1237
|
}
|
|
@@ -989,7 +1243,8 @@ export class WasmPageBuilder {
|
|
|
989
1243
|
* `builder-finished`.
|
|
990
1244
|
*/
|
|
991
1245
|
restore() {
|
|
992
|
-
|
|
1246
|
+
let ret;
|
|
1247
|
+
ret = wasm.wasmpagebuilder_restore(this.__wbg_ptr);
|
|
993
1248
|
if (ret[1]) {
|
|
994
1249
|
throw takeFromExternrefTable0(ret[0]);
|
|
995
1250
|
}
|
|
@@ -1002,7 +1257,8 @@ export class WasmPageBuilder {
|
|
|
1002
1257
|
* @param {number} degrees
|
|
1003
1258
|
*/
|
|
1004
1259
|
rotate(degrees) {
|
|
1005
|
-
|
|
1260
|
+
let ret;
|
|
1261
|
+
ret = wasm.wasmpagebuilder_rotate(this.__wbg_ptr, degrees);
|
|
1006
1262
|
if (ret[1]) {
|
|
1007
1263
|
throw takeFromExternrefTable0(ret[0]);
|
|
1008
1264
|
}
|
|
@@ -1014,7 +1270,8 @@ export class WasmPageBuilder {
|
|
|
1014
1270
|
* `builder-finished` after [`WasmPageBuilder::finish`] (so does every drawing method).
|
|
1015
1271
|
*/
|
|
1016
1272
|
save() {
|
|
1017
|
-
|
|
1273
|
+
let ret;
|
|
1274
|
+
ret = wasm.wasmpagebuilder_save(this.__wbg_ptr);
|
|
1018
1275
|
if (ret[1]) {
|
|
1019
1276
|
throw takeFromExternrefTable0(ret[0]);
|
|
1020
1277
|
}
|
|
@@ -1034,7 +1291,8 @@ export class WasmPageBuilder {
|
|
|
1034
1291
|
setBox(kind, x, y, width, height) {
|
|
1035
1292
|
const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1036
1293
|
const len0 = WASM_VECTOR_LEN;
|
|
1037
|
-
|
|
1294
|
+
let ret;
|
|
1295
|
+
ret = wasm.wasmpagebuilder_setBox(this.__wbg_ptr, ptr0, len0, x, y, width, height);
|
|
1038
1296
|
if (ret[1]) {
|
|
1039
1297
|
throw takeFromExternrefTable0(ret[0]);
|
|
1040
1298
|
}
|
|
@@ -1049,7 +1307,8 @@ export class WasmPageBuilder {
|
|
|
1049
1307
|
strokeColorHex(hex) {
|
|
1050
1308
|
const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1051
1309
|
const len0 = WASM_VECTOR_LEN;
|
|
1052
|
-
|
|
1310
|
+
let ret;
|
|
1311
|
+
ret = wasm.wasmpagebuilder_strokeColorHex(this.__wbg_ptr, ptr0, len0);
|
|
1053
1312
|
if (ret[1]) {
|
|
1054
1313
|
throw takeFromExternrefTable0(ret[0]);
|
|
1055
1314
|
}
|
|
@@ -1064,7 +1323,8 @@ export class WasmPageBuilder {
|
|
|
1064
1323
|
strokeColor(components) {
|
|
1065
1324
|
const ptr0 = passArrayF64ToWasm0(components, wasm.__wbindgen_malloc);
|
|
1066
1325
|
const len0 = WASM_VECTOR_LEN;
|
|
1067
|
-
|
|
1326
|
+
let ret;
|
|
1327
|
+
ret = wasm.wasmpagebuilder_strokeColor(this.__wbg_ptr, ptr0, len0);
|
|
1068
1328
|
if (ret[1]) {
|
|
1069
1329
|
throw takeFromExternrefTable0(ret[0]);
|
|
1070
1330
|
}
|
|
@@ -1079,7 +1339,8 @@ export class WasmPageBuilder {
|
|
|
1079
1339
|
strokePath(path) {
|
|
1080
1340
|
const ptr0 = passArrayF64ToWasm0(path, wasm.__wbindgen_malloc);
|
|
1081
1341
|
const len0 = WASM_VECTOR_LEN;
|
|
1082
|
-
|
|
1342
|
+
let ret;
|
|
1343
|
+
ret = wasm.wasmpagebuilder_strokePath(this.__wbg_ptr, ptr0, len0);
|
|
1083
1344
|
if (ret[1]) {
|
|
1084
1345
|
throw takeFromExternrefTable0(ret[0]);
|
|
1085
1346
|
}
|
|
@@ -1104,7 +1365,8 @@ export class WasmPageBuilder {
|
|
|
1104
1365
|
const len1 = WASM_VECTOR_LEN;
|
|
1105
1366
|
const ptr2 = passArrayF64ToWasm0(dash, wasm.__wbindgen_malloc);
|
|
1106
1367
|
const len2 = WASM_VECTOR_LEN;
|
|
1107
|
-
|
|
1368
|
+
let ret;
|
|
1369
|
+
ret = wasm.wasmpagebuilder_strokeStyle(this.__wbg_ptr, width, ptr0, len0, ptr1, len1, miterLimit, ptr2, len2, dashPhase);
|
|
1108
1370
|
if (ret[1]) {
|
|
1109
1371
|
throw takeFromExternrefTable0(ret[0]);
|
|
1110
1372
|
}
|
|
@@ -1129,7 +1391,8 @@ export class WasmPageBuilder {
|
|
|
1129
1391
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1130
1392
|
const len0 = WASM_VECTOR_LEN;
|
|
1131
1393
|
_assertClass(font, WasmFont);
|
|
1132
|
-
|
|
1394
|
+
let ret;
|
|
1395
|
+
ret = wasm.wasmpagebuilder_textBox(this.__wbg_ptr, ptr0, len0, font.__wbg_ptr, size, x, y, width, height, options);
|
|
1133
1396
|
if (ret[2]) {
|
|
1134
1397
|
throw takeFromExternrefTable0(ret[1]);
|
|
1135
1398
|
}
|
|
@@ -1154,7 +1417,8 @@ export class WasmPageBuilder {
|
|
|
1154
1417
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1155
1418
|
const len0 = WASM_VECTOR_LEN;
|
|
1156
1419
|
_assertClass(font, WasmFont);
|
|
1157
|
-
|
|
1420
|
+
let ret;
|
|
1421
|
+
ret = wasm.wasmpagebuilder_text(this.__wbg_ptr, ptr0, len0, font.__wbg_ptr, size, x, y, options);
|
|
1158
1422
|
if (ret[2]) {
|
|
1159
1423
|
throw takeFromExternrefTable0(ret[1]);
|
|
1160
1424
|
}
|
|
@@ -1170,7 +1434,8 @@ export class WasmPageBuilder {
|
|
|
1170
1434
|
transform(m) {
|
|
1171
1435
|
const ptr0 = passArrayF64ToWasm0(m, wasm.__wbindgen_malloc);
|
|
1172
1436
|
const len0 = WASM_VECTOR_LEN;
|
|
1173
|
-
|
|
1437
|
+
let ret;
|
|
1438
|
+
ret = wasm.wasmpagebuilder_transform(this.__wbg_ptr, ptr0, len0);
|
|
1174
1439
|
if (ret[1]) {
|
|
1175
1440
|
throw takeFromExternrefTable0(ret[0]);
|
|
1176
1441
|
}
|
|
@@ -1193,7 +1458,9 @@ export class WasmSaveJob {
|
|
|
1193
1458
|
static __wrap(ptr) {
|
|
1194
1459
|
const obj = Object.create(WasmSaveJob.prototype);
|
|
1195
1460
|
obj.__wbg_ptr = ptr;
|
|
1196
|
-
|
|
1461
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
1462
|
+
|
|
1463
|
+
WasmSaveJobFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
1197
1464
|
return obj;
|
|
1198
1465
|
}
|
|
1199
1466
|
__destroy_into_raw() {
|
|
@@ -1205,6 +1472,7 @@ export class WasmSaveJob {
|
|
|
1205
1472
|
free() {
|
|
1206
1473
|
const ptr = this.__destroy_into_raw();
|
|
1207
1474
|
wasm.__wbg_wasmsavejob_free(ptr, 0);
|
|
1475
|
+
|
|
1208
1476
|
}
|
|
1209
1477
|
/**
|
|
1210
1478
|
* Stops the job: its next step fails with `cancelled`.
|
|
@@ -1217,12 +1485,14 @@ export class WasmSaveJob {
|
|
|
1217
1485
|
* `{ state: "done", bytes, report }`.
|
|
1218
1486
|
*
|
|
1219
1487
|
* # Errors
|
|
1220
|
-
* `cancelled`, `document-changed`, `job-finished`,
|
|
1488
|
+
* `cancelled`, `document-changed`, `job-finished`, `disposed` when the document is freed,
|
|
1489
|
+
* or the save's own errors.
|
|
1221
1490
|
* @param {number} budget
|
|
1222
1491
|
* @returns {({ state: "progress" } & ProgressJs) | { state: "done"; bytes: Uint8Array<ArrayBuffer>; report: SaveReportJs }}
|
|
1223
1492
|
*/
|
|
1224
1493
|
step(budget) {
|
|
1225
|
-
|
|
1494
|
+
let ret;
|
|
1495
|
+
ret = wasm.wasmsavejob_step(this.__wbg_ptr, budget);
|
|
1226
1496
|
if (ret[2]) {
|
|
1227
1497
|
throw takeFromExternrefTable0(ret[1]);
|
|
1228
1498
|
}
|
|
@@ -1245,6 +1515,7 @@ export class WasmSparseSource {
|
|
|
1245
1515
|
free() {
|
|
1246
1516
|
const ptr = this.__destroy_into_raw();
|
|
1247
1517
|
wasm.__wbg_wasmsparsesource_free(ptr, 0);
|
|
1518
|
+
|
|
1248
1519
|
}
|
|
1249
1520
|
/**
|
|
1250
1521
|
* An empty source of `size` bytes holding at most `budget` bytes (no limit when omitted).
|
|
@@ -1255,12 +1526,14 @@ export class WasmSparseSource {
|
|
|
1255
1526
|
* @param {number | null} [budget]
|
|
1256
1527
|
*/
|
|
1257
1528
|
constructor(size, budget) {
|
|
1258
|
-
|
|
1529
|
+
let ret;
|
|
1530
|
+
ret = wasm.wasmsparsesource_new(size, !isLikeNone(budget), isLikeNone(budget) ? 0 : budget);
|
|
1259
1531
|
if (ret[2]) {
|
|
1260
1532
|
throw takeFromExternrefTable0(ret[1]);
|
|
1261
1533
|
}
|
|
1262
1534
|
this.__wbg_ptr = ret[0];
|
|
1263
|
-
|
|
1535
|
+
Object.defineProperty(this, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
1536
|
+
WasmSparseSourceFinalization.register(this, { ptr: ret[0], instance: __wbg_instance_id }, this);
|
|
1264
1537
|
return this;
|
|
1265
1538
|
}
|
|
1266
1539
|
/**
|
|
@@ -1268,7 +1541,8 @@ export class WasmSparseSource {
|
|
|
1268
1541
|
* @returns {number}
|
|
1269
1542
|
*/
|
|
1270
1543
|
get size() {
|
|
1271
|
-
|
|
1544
|
+
let ret;
|
|
1545
|
+
ret = wasm.wasmsparsesource_size(this.__wbg_ptr);
|
|
1272
1546
|
return ret;
|
|
1273
1547
|
}
|
|
1274
1548
|
/**
|
|
@@ -1282,7 +1556,8 @@ export class WasmSparseSource {
|
|
|
1282
1556
|
supply(offset, bytes) {
|
|
1283
1557
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1284
1558
|
const len0 = WASM_VECTOR_LEN;
|
|
1285
|
-
|
|
1559
|
+
let ret;
|
|
1560
|
+
ret = wasm.wasmsparsesource_supply(this.__wbg_ptr, offset, ptr0, len0);
|
|
1286
1561
|
if (ret[1]) {
|
|
1287
1562
|
throw takeFromExternrefTable0(ret[0]);
|
|
1288
1563
|
}
|
|
@@ -1303,7 +1578,8 @@ export class WasmSparseSource {
|
|
|
1303
1578
|
toFetch(asked, block, readahead) {
|
|
1304
1579
|
const ptr0 = passArrayF64ToWasm0(asked, wasm.__wbindgen_malloc);
|
|
1305
1580
|
const len0 = WASM_VECTOR_LEN;
|
|
1306
|
-
|
|
1581
|
+
let ret;
|
|
1582
|
+
ret = wasm.wasmsparsesource_toFetch(this.__wbg_ptr, ptr0, len0, block, readahead);
|
|
1307
1583
|
if (ret[2]) {
|
|
1308
1584
|
throw takeFromExternrefTable0(ret[1]);
|
|
1309
1585
|
}
|
|
@@ -1319,7 +1595,9 @@ export class WasmWarningCursor {
|
|
|
1319
1595
|
static __wrap(ptr) {
|
|
1320
1596
|
const obj = Object.create(WasmWarningCursor.prototype);
|
|
1321
1597
|
obj.__wbg_ptr = ptr;
|
|
1322
|
-
|
|
1598
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
1599
|
+
|
|
1600
|
+
WasmWarningCursorFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
1323
1601
|
return obj;
|
|
1324
1602
|
}
|
|
1325
1603
|
__destroy_into_raw() {
|
|
@@ -1331,6 +1609,7 @@ export class WasmWarningCursor {
|
|
|
1331
1609
|
free() {
|
|
1332
1610
|
const ptr = this.__destroy_into_raw();
|
|
1333
1611
|
wasm.__wbg_wasmwarningcursor_free(ptr, 0);
|
|
1612
|
+
|
|
1334
1613
|
}
|
|
1335
1614
|
/**
|
|
1336
1615
|
* Up to `max` more warnings, each as the ADR 0026 §1 object; empty at the end.
|
|
@@ -1338,7 +1617,8 @@ export class WasmWarningCursor {
|
|
|
1338
1617
|
* @returns {Diagnostic[]}
|
|
1339
1618
|
*/
|
|
1340
1619
|
nextBatch(max) {
|
|
1341
|
-
|
|
1620
|
+
let ret;
|
|
1621
|
+
ret = wasm.wasmwarningcursor_nextBatch(this.__wbg_ptr, max);
|
|
1342
1622
|
return ret;
|
|
1343
1623
|
}
|
|
1344
1624
|
/**
|
|
@@ -1346,18 +1626,46 @@ export class WasmWarningCursor {
|
|
|
1346
1626
|
* @returns {number}
|
|
1347
1627
|
*/
|
|
1348
1628
|
remaining() {
|
|
1349
|
-
|
|
1629
|
+
let ret;
|
|
1630
|
+
ret = wasm.wasmwarningcursor_remaining(this.__wbg_ptr);
|
|
1350
1631
|
return ret >>> 0;
|
|
1351
1632
|
}
|
|
1352
1633
|
}
|
|
1353
1634
|
if (Symbol.dispose) WasmWarningCursor.prototype[Symbol.dispose] = WasmWarningCursor.prototype.free;
|
|
1354
1635
|
|
|
1636
|
+
export function __wbg_reset_state () {
|
|
1637
|
+
__wbg_instance_id++;
|
|
1638
|
+
cachedDataViewMemory0 = null;
|
|
1639
|
+
cachedFloat32ArrayMemory0 = null;
|
|
1640
|
+
cachedFloat64ArrayMemory0 = null;
|
|
1641
|
+
cachedUint32ArrayMemory0 = null;
|
|
1642
|
+
cachedUint8ArrayMemory0 = null;
|
|
1643
|
+
if (typeof numBytesDecoded !== 'undefined') numBytesDecoded = 0;
|
|
1644
|
+
if (typeof WASM_VECTOR_LEN !== 'undefined') WASM_VECTOR_LEN = 0;
|
|
1645
|
+
__wbg_reinit_scheduled = false;
|
|
1646
|
+
wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
|
|
1647
|
+
wasm = wasmInstance.exports;
|
|
1648
|
+
wasm.__wbindgen_start();
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
/**
|
|
1652
|
+
* Whether the most recent allocation failed: after a trap, `true` means the module ran out of
|
|
1653
|
+
* memory.
|
|
1654
|
+
* @returns {boolean}
|
|
1655
|
+
*/
|
|
1656
|
+
export function allocationFailed() {
|
|
1657
|
+
let ret;
|
|
1658
|
+
ret = wasm.allocationFailed();
|
|
1659
|
+
return ret !== 0;
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1355
1662
|
/**
|
|
1356
1663
|
* Whether this module is the text module (fonts, `text`, `textBox`).
|
|
1357
1664
|
* @returns {boolean}
|
|
1358
1665
|
*/
|
|
1359
1666
|
export function hasText() {
|
|
1360
|
-
|
|
1667
|
+
let ret;
|
|
1668
|
+
ret = wasm.hasText();
|
|
1361
1669
|
return ret !== 0;
|
|
1362
1670
|
}
|
|
1363
1671
|
|
|
@@ -1369,7 +1677,8 @@ export function version() {
|
|
|
1369
1677
|
let deferred1_0;
|
|
1370
1678
|
let deferred1_1;
|
|
1371
1679
|
try {
|
|
1372
|
-
|
|
1680
|
+
let ret;
|
|
1681
|
+
ret = wasm.version();
|
|
1373
1682
|
deferred1_0 = ret[0];
|
|
1374
1683
|
deferred1_1 = ret[1];
|
|
1375
1684
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -1473,33 +1782,65 @@ function __wbg_get_imports() {
|
|
|
1473
1782
|
};
|
|
1474
1783
|
}
|
|
1475
1784
|
|
|
1785
|
+
function __wbg_call_guard() {
|
|
1786
|
+
if (__wbg_reinit_scheduled) {
|
|
1787
|
+
__wbg_reset_state();
|
|
1788
|
+
return;
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
|
|
1793
|
+
let __wbg_instance_id = 0;
|
|
1476
1794
|
const WasmBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1477
1795
|
? { register: () => {}, unregister: () => {} }
|
|
1478
|
-
: new FinalizationRegistry(
|
|
1796
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1797
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmbuilder_free(ptr, 1);
|
|
1798
|
+
});
|
|
1479
1799
|
const WasmDocumentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1480
1800
|
? { register: () => {}, unregister: () => {} }
|
|
1481
|
-
: new FinalizationRegistry(
|
|
1801
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1802
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmdocument_free(ptr, 1);
|
|
1803
|
+
});
|
|
1804
|
+
const WasmExtractJobFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1805
|
+
? { register: () => {}, unregister: () => {} }
|
|
1806
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1807
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmextractjob_free(ptr, 1);
|
|
1808
|
+
});
|
|
1482
1809
|
const WasmFontFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1483
1810
|
? { register: () => {}, unregister: () => {} }
|
|
1484
|
-
: new FinalizationRegistry(
|
|
1811
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1812
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmfont_free(ptr, 1);
|
|
1813
|
+
});
|
|
1485
1814
|
const WasmImageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1486
1815
|
? { register: () => {}, unregister: () => {} }
|
|
1487
|
-
: new FinalizationRegistry(
|
|
1816
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1817
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmimage_free(ptr, 1);
|
|
1818
|
+
});
|
|
1488
1819
|
const WasmPageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1489
1820
|
? { register: () => {}, unregister: () => {} }
|
|
1490
|
-
: new FinalizationRegistry(
|
|
1821
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1822
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmpage_free(ptr, 1);
|
|
1823
|
+
});
|
|
1491
1824
|
const WasmPageBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1492
1825
|
? { register: () => {}, unregister: () => {} }
|
|
1493
|
-
: new FinalizationRegistry(
|
|
1826
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1827
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmpagebuilder_free(ptr, 1);
|
|
1828
|
+
});
|
|
1494
1829
|
const WasmSaveJobFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1495
1830
|
? { register: () => {}, unregister: () => {} }
|
|
1496
|
-
: new FinalizationRegistry(
|
|
1831
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1832
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmsavejob_free(ptr, 1);
|
|
1833
|
+
});
|
|
1497
1834
|
const WasmSparseSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1498
1835
|
? { register: () => {}, unregister: () => {} }
|
|
1499
|
-
: new FinalizationRegistry(
|
|
1836
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1837
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmsparsesource_free(ptr, 1);
|
|
1838
|
+
});
|
|
1500
1839
|
const WasmWarningCursorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1501
1840
|
? { register: () => {}, unregister: () => {} }
|
|
1502
|
-
: new FinalizationRegistry(
|
|
1841
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1842
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmwarningcursor_free(ptr, 1);
|
|
1843
|
+
});
|
|
1503
1844
|
|
|
1504
1845
|
function addToExternrefTable0(obj) {
|
|
1505
1846
|
const idx = wasm.__externref_table_alloc();
|
|
@@ -1651,6 +1992,8 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
1651
1992
|
return ptr;
|
|
1652
1993
|
}
|
|
1653
1994
|
|
|
1995
|
+
let __wbg_reinit_scheduled = false;
|
|
1996
|
+
|
|
1654
1997
|
function takeFromExternrefTable0(idx) {
|
|
1655
1998
|
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1656
1999
|
wasm.__externref_table_dealloc(idx);
|