@laminapdf/wasm 0.2.0-alpha.2 → 0.2.0-alpha.3
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 +13 -2
- package/dist/lamina_pdf_base.js +225 -84
- package/dist/lamina_pdf_base.wasm +0 -0
- package/dist/lamina_pdf_extract.d.ts +120 -8
- package/dist/lamina_pdf_extract.js +262 -89
- package/dist/lamina_pdf_extract.wasm +0 -0
- package/dist/lamina_pdf_render_hayro.wasm +0 -0
- package/dist/lamina_pdf_text.d.ts +120 -8
- package/dist/lamina_pdf_text.js +283 -98
- package/dist/lamina_pdf_text.wasm +0 -0
- package/package.json +1 -1
package/dist/lamina_pdf_base.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
|
}
|
|
@@ -81,7 +85,8 @@ export class WasmBuilder {
|
|
|
81
85
|
lang(lang) {
|
|
82
86
|
const ptr0 = passStringToWasm0(lang, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
83
87
|
const len0 = WASM_VECTOR_LEN;
|
|
84
|
-
|
|
88
|
+
let ret;
|
|
89
|
+
ret = wasm.wasmbuilder_lang(this.__wbg_ptr, ptr0, len0);
|
|
85
90
|
if (ret[1]) {
|
|
86
91
|
throw takeFromExternrefTable0(ret[0]);
|
|
87
92
|
}
|
|
@@ -94,7 +99,8 @@ export class WasmBuilder {
|
|
|
94
99
|
* @param {MetadataInit} metadata
|
|
95
100
|
*/
|
|
96
101
|
metadata(metadata) {
|
|
97
|
-
|
|
102
|
+
let ret;
|
|
103
|
+
ret = wasm.wasmbuilder_metadata(this.__wbg_ptr, metadata);
|
|
98
104
|
if (ret[1]) {
|
|
99
105
|
throw takeFromExternrefTable0(ret[0]);
|
|
100
106
|
}
|
|
@@ -107,12 +113,14 @@ export class WasmBuilder {
|
|
|
107
113
|
* @param {BuildOptionsInit | undefined} options
|
|
108
114
|
*/
|
|
109
115
|
constructor(options) {
|
|
110
|
-
|
|
116
|
+
let ret;
|
|
117
|
+
ret = wasm.wasmbuilder_new(options);
|
|
111
118
|
if (ret[2]) {
|
|
112
119
|
throw takeFromExternrefTable0(ret[1]);
|
|
113
120
|
}
|
|
114
121
|
this.__wbg_ptr = ret[0];
|
|
115
|
-
|
|
122
|
+
Object.defineProperty(this, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
123
|
+
WasmBuilderFinalization.register(this, { ptr: ret[0], instance: __wbg_instance_id }, this);
|
|
116
124
|
return this;
|
|
117
125
|
}
|
|
118
126
|
/**
|
|
@@ -124,7 +132,8 @@ export class WasmBuilder {
|
|
|
124
132
|
* @returns {string[]}
|
|
125
133
|
*/
|
|
126
134
|
outline(entries) {
|
|
127
|
-
|
|
135
|
+
let ret;
|
|
136
|
+
ret = wasm.wasmbuilder_outline(this.__wbg_ptr, entries);
|
|
128
137
|
if (ret[2]) {
|
|
129
138
|
throw takeFromExternrefTable0(ret[1]);
|
|
130
139
|
}
|
|
@@ -138,7 +147,8 @@ export class WasmBuilder {
|
|
|
138
147
|
* @param {PageLabelInit[]} ranges
|
|
139
148
|
*/
|
|
140
149
|
pageLabels(ranges) {
|
|
141
|
-
|
|
150
|
+
let ret;
|
|
151
|
+
ret = wasm.wasmbuilder_pageLabels(this.__wbg_ptr, ranges);
|
|
142
152
|
if (ret[1]) {
|
|
143
153
|
throw takeFromExternrefTable0(ret[0]);
|
|
144
154
|
}
|
|
@@ -150,7 +160,8 @@ export class WasmBuilder {
|
|
|
150
160
|
* @returns {WasmPageBuilder}
|
|
151
161
|
*/
|
|
152
162
|
page(width, height) {
|
|
153
|
-
|
|
163
|
+
let ret;
|
|
164
|
+
ret = wasm.wasmbuilder_page(this.__wbg_ptr, width, height);
|
|
154
165
|
return WasmPageBuilder.__wrap(ret);
|
|
155
166
|
}
|
|
156
167
|
/**
|
|
@@ -161,7 +172,8 @@ export class WasmBuilder {
|
|
|
161
172
|
* @param {ViewerPreferencesInit} prefs
|
|
162
173
|
*/
|
|
163
174
|
viewerPreferences(prefs) {
|
|
164
|
-
|
|
175
|
+
let ret;
|
|
176
|
+
ret = wasm.wasmbuilder_viewerPreferences(this.__wbg_ptr, prefs);
|
|
165
177
|
if (ret[1]) {
|
|
166
178
|
throw takeFromExternrefTable0(ret[0]);
|
|
167
179
|
}
|
|
@@ -177,7 +189,9 @@ export class WasmDocument {
|
|
|
177
189
|
static __wrap(ptr) {
|
|
178
190
|
const obj = Object.create(WasmDocument.prototype);
|
|
179
191
|
obj.__wbg_ptr = ptr;
|
|
180
|
-
|
|
192
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
193
|
+
|
|
194
|
+
WasmDocumentFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
181
195
|
return obj;
|
|
182
196
|
}
|
|
183
197
|
__destroy_into_raw() {
|
|
@@ -189,6 +203,7 @@ export class WasmDocument {
|
|
|
189
203
|
free() {
|
|
190
204
|
const ptr = this.__destroy_into_raw();
|
|
191
205
|
wasm.__wbg_wasmdocument_free(ptr, 0);
|
|
206
|
+
|
|
192
207
|
}
|
|
193
208
|
/**
|
|
194
209
|
* Applies an op log (`{ "v": 1, "ops": [ … ] }`) as one transaction.
|
|
@@ -201,7 +216,8 @@ export class WasmDocument {
|
|
|
201
216
|
applyLog(json) {
|
|
202
217
|
const ptr0 = passStringToWasm0(json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
203
218
|
const len0 = WASM_VECTOR_LEN;
|
|
204
|
-
|
|
219
|
+
let ret;
|
|
220
|
+
ret = wasm.wasmdocument_applyLog(this.__wbg_ptr, ptr0, len0);
|
|
205
221
|
if (ret[2]) {
|
|
206
222
|
throw takeFromExternrefTable0(ret[1]);
|
|
207
223
|
}
|
|
@@ -217,7 +233,8 @@ export class WasmDocument {
|
|
|
217
233
|
* @returns {EditedJs}
|
|
218
234
|
*/
|
|
219
235
|
apply(ops) {
|
|
220
|
-
|
|
236
|
+
let ret;
|
|
237
|
+
ret = wasm.wasmdocument_apply(this.__wbg_ptr, ops);
|
|
221
238
|
if (ret[2]) {
|
|
222
239
|
throw takeFromExternrefTable0(ret[1]);
|
|
223
240
|
}
|
|
@@ -228,7 +245,8 @@ export class WasmDocument {
|
|
|
228
245
|
* @returns {boolean}
|
|
229
246
|
*/
|
|
230
247
|
hasUnsavedChanges() {
|
|
231
|
-
|
|
248
|
+
let ret;
|
|
249
|
+
ret = wasm.wasmdocument_hasUnsavedChanges(this.__wbg_ptr);
|
|
232
250
|
return ret !== 0;
|
|
233
251
|
}
|
|
234
252
|
/**
|
|
@@ -239,7 +257,8 @@ export class WasmDocument {
|
|
|
239
257
|
* @returns {DocumentInfoJs}
|
|
240
258
|
*/
|
|
241
259
|
info() {
|
|
242
|
-
|
|
260
|
+
let ret;
|
|
261
|
+
ret = wasm.wasmdocument_info(this.__wbg_ptr);
|
|
243
262
|
if (ret[2]) {
|
|
244
263
|
throw takeFromExternrefTable0(ret[1]);
|
|
245
264
|
}
|
|
@@ -258,7 +277,8 @@ export class WasmDocument {
|
|
|
258
277
|
static openBytes(bytes, options) {
|
|
259
278
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
260
279
|
const len0 = WASM_VECTOR_LEN;
|
|
261
|
-
|
|
280
|
+
let ret;
|
|
281
|
+
ret = wasm.wasmdocument_openBytes(ptr0, len0, options);
|
|
262
282
|
if (ret[2]) {
|
|
263
283
|
throw takeFromExternrefTable0(ret[1]);
|
|
264
284
|
}
|
|
@@ -277,7 +297,8 @@ export class WasmDocument {
|
|
|
277
297
|
*/
|
|
278
298
|
static openSource(source, options) {
|
|
279
299
|
_assertClass(source, WasmSparseSource);
|
|
280
|
-
|
|
300
|
+
let ret;
|
|
301
|
+
ret = wasm.wasmdocument_openSource(source.__wbg_ptr, options);
|
|
281
302
|
if (ret[2]) {
|
|
282
303
|
throw takeFromExternrefTable0(ret[1]);
|
|
283
304
|
}
|
|
@@ -294,7 +315,8 @@ export class WasmDocument {
|
|
|
294
315
|
pageById(id) {
|
|
295
316
|
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
296
317
|
const len0 = WASM_VECTOR_LEN;
|
|
297
|
-
|
|
318
|
+
let ret;
|
|
319
|
+
ret = wasm.wasmdocument_pageById(this.__wbg_ptr, ptr0, len0);
|
|
298
320
|
if (ret[2]) {
|
|
299
321
|
throw takeFromExternrefTable0(ret[1]);
|
|
300
322
|
}
|
|
@@ -308,7 +330,8 @@ export class WasmDocument {
|
|
|
308
330
|
* @returns {number}
|
|
309
331
|
*/
|
|
310
332
|
pageCount() {
|
|
311
|
-
|
|
333
|
+
let ret;
|
|
334
|
+
ret = wasm.wasmdocument_pageCount(this.__wbg_ptr);
|
|
312
335
|
if (ret[2]) {
|
|
313
336
|
throw takeFromExternrefTable0(ret[1]);
|
|
314
337
|
}
|
|
@@ -323,7 +346,8 @@ export class WasmDocument {
|
|
|
323
346
|
* @returns {PageInfoJs}
|
|
324
347
|
*/
|
|
325
348
|
pageInfo(index) {
|
|
326
|
-
|
|
349
|
+
let ret;
|
|
350
|
+
ret = wasm.wasmdocument_pageInfo(this.__wbg_ptr, index);
|
|
327
351
|
if (ret[2]) {
|
|
328
352
|
throw takeFromExternrefTable0(ret[1]);
|
|
329
353
|
}
|
|
@@ -337,7 +361,8 @@ export class WasmDocument {
|
|
|
337
361
|
* @returns {PageInfoJs[]}
|
|
338
362
|
*/
|
|
339
363
|
pageInfos() {
|
|
340
|
-
|
|
364
|
+
let ret;
|
|
365
|
+
ret = wasm.wasmdocument_pageInfos(this.__wbg_ptr);
|
|
341
366
|
if (ret[2]) {
|
|
342
367
|
throw takeFromExternrefTable0(ret[1]);
|
|
343
368
|
}
|
|
@@ -352,7 +377,8 @@ export class WasmDocument {
|
|
|
352
377
|
* @returns {WasmPage}
|
|
353
378
|
*/
|
|
354
379
|
page(index) {
|
|
355
|
-
|
|
380
|
+
let ret;
|
|
381
|
+
ret = wasm.wasmdocument_page(this.__wbg_ptr, index);
|
|
356
382
|
if (ret[2]) {
|
|
357
383
|
throw takeFromExternrefTable0(ret[1]);
|
|
358
384
|
}
|
|
@@ -368,7 +394,8 @@ export class WasmDocument {
|
|
|
368
394
|
rebase(bytes) {
|
|
369
395
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
370
396
|
const len0 = WASM_VECTOR_LEN;
|
|
371
|
-
|
|
397
|
+
let ret;
|
|
398
|
+
ret = wasm.wasmdocument_rebase(this.__wbg_ptr, ptr0, len0);
|
|
372
399
|
if (ret[1]) {
|
|
373
400
|
throw takeFromExternrefTable0(ret[0]);
|
|
374
401
|
}
|
|
@@ -381,7 +408,8 @@ export class WasmDocument {
|
|
|
381
408
|
* @returns {UndoOutcomeJs | undefined}
|
|
382
409
|
*/
|
|
383
410
|
redo() {
|
|
384
|
-
|
|
411
|
+
let ret;
|
|
412
|
+
ret = wasm.wasmdocument_redo(this.__wbg_ptr);
|
|
385
413
|
if (ret[2]) {
|
|
386
414
|
throw takeFromExternrefTable0(ret[1]);
|
|
387
415
|
}
|
|
@@ -396,7 +424,8 @@ export class WasmDocument {
|
|
|
396
424
|
* @returns {WasmSaveJob}
|
|
397
425
|
*/
|
|
398
426
|
saveJob(options) {
|
|
399
|
-
|
|
427
|
+
let ret;
|
|
428
|
+
ret = wasm.wasmdocument_saveJob(this.__wbg_ptr, options);
|
|
400
429
|
if (ret[2]) {
|
|
401
430
|
throw takeFromExternrefTable0(ret[1]);
|
|
402
431
|
}
|
|
@@ -411,7 +440,8 @@ export class WasmDocument {
|
|
|
411
440
|
* @returns {{ bytes: Uint8Array<ArrayBuffer>; report: SaveReportJs }}
|
|
412
441
|
*/
|
|
413
442
|
save(options) {
|
|
414
|
-
|
|
443
|
+
let ret;
|
|
444
|
+
ret = wasm.wasmdocument_save(this.__wbg_ptr, options);
|
|
415
445
|
if (ret[2]) {
|
|
416
446
|
throw takeFromExternrefTable0(ret[1]);
|
|
417
447
|
}
|
|
@@ -425,7 +455,8 @@ export class WasmDocument {
|
|
|
425
455
|
* @returns {UndoOutcomeJs | undefined}
|
|
426
456
|
*/
|
|
427
457
|
undo() {
|
|
428
|
-
|
|
458
|
+
let ret;
|
|
459
|
+
ret = wasm.wasmdocument_undo(this.__wbg_ptr);
|
|
429
460
|
if (ret[2]) {
|
|
430
461
|
throw takeFromExternrefTable0(ret[1]);
|
|
431
462
|
}
|
|
@@ -436,7 +467,8 @@ export class WasmDocument {
|
|
|
436
467
|
* @returns {WasmWarningCursor}
|
|
437
468
|
*/
|
|
438
469
|
warnings() {
|
|
439
|
-
|
|
470
|
+
let ret;
|
|
471
|
+
ret = wasm.wasmdocument_warnings(this.__wbg_ptr);
|
|
440
472
|
return WasmWarningCursor.__wrap(ret);
|
|
441
473
|
}
|
|
442
474
|
}
|
|
@@ -449,7 +481,9 @@ export class WasmImage {
|
|
|
449
481
|
static __wrap(ptr) {
|
|
450
482
|
const obj = Object.create(WasmImage.prototype);
|
|
451
483
|
obj.__wbg_ptr = ptr;
|
|
452
|
-
|
|
484
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
485
|
+
|
|
486
|
+
WasmImageFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
453
487
|
return obj;
|
|
454
488
|
}
|
|
455
489
|
__destroy_into_raw() {
|
|
@@ -461,13 +495,15 @@ export class WasmImage {
|
|
|
461
495
|
free() {
|
|
462
496
|
const ptr = this.__destroy_into_raw();
|
|
463
497
|
wasm.__wbg_wasmimage_free(ptr, 0);
|
|
498
|
+
|
|
464
499
|
}
|
|
465
500
|
/**
|
|
466
501
|
* Height in pixels.
|
|
467
502
|
* @returns {number}
|
|
468
503
|
*/
|
|
469
504
|
get height() {
|
|
470
|
-
|
|
505
|
+
let ret;
|
|
506
|
+
ret = wasm.wasmimage_height(this.__wbg_ptr);
|
|
471
507
|
return ret >>> 0;
|
|
472
508
|
}
|
|
473
509
|
/**
|
|
@@ -481,7 +517,8 @@ export class WasmImage {
|
|
|
481
517
|
static jpeg(bytes) {
|
|
482
518
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
483
519
|
const len0 = WASM_VECTOR_LEN;
|
|
484
|
-
|
|
520
|
+
let ret;
|
|
521
|
+
ret = wasm.wasmimage_jpeg(ptr0, len0);
|
|
485
522
|
if (ret[2]) {
|
|
486
523
|
throw takeFromExternrefTable0(ret[1]);
|
|
487
524
|
}
|
|
@@ -498,7 +535,8 @@ export class WasmImage {
|
|
|
498
535
|
static png(bytes) {
|
|
499
536
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
500
537
|
const len0 = WASM_VECTOR_LEN;
|
|
501
|
-
|
|
538
|
+
let ret;
|
|
539
|
+
ret = wasm.wasmimage_png(ptr0, len0);
|
|
502
540
|
if (ret[2]) {
|
|
503
541
|
throw takeFromExternrefTable0(ret[1]);
|
|
504
542
|
}
|
|
@@ -517,7 +555,8 @@ export class WasmImage {
|
|
|
517
555
|
static rgba(width, height, rgba) {
|
|
518
556
|
const ptr0 = passArray8ToWasm0(rgba, wasm.__wbindgen_malloc);
|
|
519
557
|
const len0 = WASM_VECTOR_LEN;
|
|
520
|
-
|
|
558
|
+
let ret;
|
|
559
|
+
ret = wasm.wasmimage_rgba(width, height, ptr0, len0);
|
|
521
560
|
if (ret[2]) {
|
|
522
561
|
throw takeFromExternrefTable0(ret[1]);
|
|
523
562
|
}
|
|
@@ -528,7 +567,8 @@ export class WasmImage {
|
|
|
528
567
|
* @returns {number}
|
|
529
568
|
*/
|
|
530
569
|
get width() {
|
|
531
|
-
|
|
570
|
+
let ret;
|
|
571
|
+
ret = wasm.wasmimage_width(this.__wbg_ptr);
|
|
532
572
|
return ret >>> 0;
|
|
533
573
|
}
|
|
534
574
|
}
|
|
@@ -541,7 +581,9 @@ export class WasmPage {
|
|
|
541
581
|
static __wrap(ptr) {
|
|
542
582
|
const obj = Object.create(WasmPage.prototype);
|
|
543
583
|
obj.__wbg_ptr = ptr;
|
|
544
|
-
|
|
584
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
585
|
+
|
|
586
|
+
WasmPageFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
545
587
|
return obj;
|
|
546
588
|
}
|
|
547
589
|
__destroy_into_raw() {
|
|
@@ -553,6 +595,7 @@ export class WasmPage {
|
|
|
553
595
|
free() {
|
|
554
596
|
const ptr = this.__destroy_into_raw();
|
|
555
597
|
wasm.__wbg_wasmpage_free(ptr, 0);
|
|
598
|
+
|
|
556
599
|
}
|
|
557
600
|
/**
|
|
558
601
|
* The page's stable ID (`p12.0`).
|
|
@@ -562,7 +605,8 @@ export class WasmPage {
|
|
|
562
605
|
let deferred1_0;
|
|
563
606
|
let deferred1_1;
|
|
564
607
|
try {
|
|
565
|
-
|
|
608
|
+
let ret;
|
|
609
|
+
ret = wasm.wasmpage_id(this.__wbg_ptr);
|
|
566
610
|
deferred1_0 = ret[0];
|
|
567
611
|
deferred1_1 = ret[1];
|
|
568
612
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -574,11 +618,13 @@ export class WasmPage {
|
|
|
574
618
|
* The page's current 0-based index.
|
|
575
619
|
*
|
|
576
620
|
* # Errors
|
|
577
|
-
* `unknown-page` when the page is gone; reading
|
|
621
|
+
* `unknown-page` when the page is gone; `disposed` when its document is freed; reading
|
|
622
|
+
* errors.
|
|
578
623
|
* @returns {number}
|
|
579
624
|
*/
|
|
580
625
|
index() {
|
|
581
|
-
|
|
626
|
+
let ret;
|
|
627
|
+
ret = wasm.wasmpage_index(this.__wbg_ptr);
|
|
582
628
|
if (ret[2]) {
|
|
583
629
|
throw takeFromExternrefTable0(ret[1]);
|
|
584
630
|
}
|
|
@@ -592,7 +638,8 @@ export class WasmPage {
|
|
|
592
638
|
* @returns {PageInfoJs}
|
|
593
639
|
*/
|
|
594
640
|
info() {
|
|
595
|
-
|
|
641
|
+
let ret;
|
|
642
|
+
ret = wasm.wasmpage_info(this.__wbg_ptr);
|
|
596
643
|
if (ret[2]) {
|
|
597
644
|
throw takeFromExternrefTable0(ret[1]);
|
|
598
645
|
}
|
|
@@ -609,7 +656,9 @@ export class WasmPageBuilder {
|
|
|
609
656
|
static __wrap(ptr) {
|
|
610
657
|
const obj = Object.create(WasmPageBuilder.prototype);
|
|
611
658
|
obj.__wbg_ptr = ptr;
|
|
612
|
-
|
|
659
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
660
|
+
|
|
661
|
+
WasmPageBuilderFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
613
662
|
return obj;
|
|
614
663
|
}
|
|
615
664
|
__destroy_into_raw() {
|
|
@@ -621,6 +670,7 @@ export class WasmPageBuilder {
|
|
|
621
670
|
free() {
|
|
622
671
|
const ptr = this.__destroy_into_raw();
|
|
623
672
|
wasm.__wbg_wasmpagebuilder_free(ptr, 0);
|
|
673
|
+
|
|
624
674
|
}
|
|
625
675
|
/**
|
|
626
676
|
* Opens an artifact until the matching `endTag`: `kind` is `layout`, `page`, `pagination`
|
|
@@ -633,7 +683,8 @@ export class WasmPageBuilder {
|
|
|
633
683
|
beginArtifact(kind) {
|
|
634
684
|
const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
635
685
|
const len0 = WASM_VECTOR_LEN;
|
|
636
|
-
|
|
686
|
+
let ret;
|
|
687
|
+
ret = wasm.wasmpagebuilder_beginArtifact(this.__wbg_ptr, ptr0, len0);
|
|
637
688
|
if (ret[1]) {
|
|
638
689
|
throw takeFromExternrefTable0(ret[0]);
|
|
639
690
|
}
|
|
@@ -670,7 +721,8 @@ export class WasmPageBuilder {
|
|
|
670
721
|
var len5 = WASM_VECTOR_LEN;
|
|
671
722
|
var ptr6 = isLikeNone(scope) ? 0 : passStringToWasm0(scope, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
672
723
|
var len6 = WASM_VECTOR_LEN;
|
|
673
|
-
|
|
724
|
+
let ret;
|
|
725
|
+
ret = wasm.wasmpagebuilder_beginTag(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6);
|
|
674
726
|
if (ret[1]) {
|
|
675
727
|
throw takeFromExternrefTable0(ret[0]);
|
|
676
728
|
}
|
|
@@ -685,7 +737,8 @@ export class WasmPageBuilder {
|
|
|
685
737
|
blendMode(mode) {
|
|
686
738
|
const ptr0 = passStringToWasm0(mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
687
739
|
const len0 = WASM_VECTOR_LEN;
|
|
688
|
-
|
|
740
|
+
let ret;
|
|
741
|
+
ret = wasm.wasmpagebuilder_blendMode(this.__wbg_ptr, ptr0, len0);
|
|
689
742
|
if (ret[1]) {
|
|
690
743
|
throw takeFromExternrefTable0(ret[0]);
|
|
691
744
|
}
|
|
@@ -703,7 +756,8 @@ export class WasmPageBuilder {
|
|
|
703
756
|
const len0 = WASM_VECTOR_LEN;
|
|
704
757
|
const ptr1 = passStringToWasm0(rule, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
705
758
|
const len1 = WASM_VECTOR_LEN;
|
|
706
|
-
|
|
759
|
+
let ret;
|
|
760
|
+
ret = wasm.wasmpagebuilder_clipPath(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
707
761
|
if (ret[1]) {
|
|
708
762
|
throw takeFromExternrefTable0(ret[0]);
|
|
709
763
|
}
|
|
@@ -715,7 +769,8 @@ export class WasmPageBuilder {
|
|
|
715
769
|
* `builder-finished`.
|
|
716
770
|
*/
|
|
717
771
|
endTag() {
|
|
718
|
-
|
|
772
|
+
let ret;
|
|
773
|
+
ret = wasm.wasmpagebuilder_endTag(this.__wbg_ptr);
|
|
719
774
|
if (ret[1]) {
|
|
720
775
|
throw takeFromExternrefTable0(ret[0]);
|
|
721
776
|
}
|
|
@@ -730,7 +785,8 @@ export class WasmPageBuilder {
|
|
|
730
785
|
fillColorHex(hex) {
|
|
731
786
|
const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
732
787
|
const len0 = WASM_VECTOR_LEN;
|
|
733
|
-
|
|
788
|
+
let ret;
|
|
789
|
+
ret = wasm.wasmpagebuilder_fillColorHex(this.__wbg_ptr, ptr0, len0);
|
|
734
790
|
if (ret[1]) {
|
|
735
791
|
throw takeFromExternrefTable0(ret[0]);
|
|
736
792
|
}
|
|
@@ -745,7 +801,8 @@ export class WasmPageBuilder {
|
|
|
745
801
|
fillColor(components) {
|
|
746
802
|
const ptr0 = passArrayF64ToWasm0(components, wasm.__wbindgen_malloc);
|
|
747
803
|
const len0 = WASM_VECTOR_LEN;
|
|
748
|
-
|
|
804
|
+
let ret;
|
|
805
|
+
ret = wasm.wasmpagebuilder_fillColor(this.__wbg_ptr, ptr0, len0);
|
|
749
806
|
if (ret[1]) {
|
|
750
807
|
throw takeFromExternrefTable0(ret[0]);
|
|
751
808
|
}
|
|
@@ -763,7 +820,8 @@ export class WasmPageBuilder {
|
|
|
763
820
|
const len0 = WASM_VECTOR_LEN;
|
|
764
821
|
const ptr1 = passStringToWasm0(rule, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
765
822
|
const len1 = WASM_VECTOR_LEN;
|
|
766
|
-
|
|
823
|
+
let ret;
|
|
824
|
+
ret = wasm.wasmpagebuilder_fillPath(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
767
825
|
if (ret[1]) {
|
|
768
826
|
throw takeFromExternrefTable0(ret[0]);
|
|
769
827
|
}
|
|
@@ -781,7 +839,8 @@ export class WasmPageBuilder {
|
|
|
781
839
|
const len0 = WASM_VECTOR_LEN;
|
|
782
840
|
const ptr1 = passStringToWasm0(rule, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
783
841
|
const len1 = WASM_VECTOR_LEN;
|
|
784
|
-
|
|
842
|
+
let ret;
|
|
843
|
+
ret = wasm.wasmpagebuilder_fillStrokePath(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
785
844
|
if (ret[1]) {
|
|
786
845
|
throw takeFromExternrefTable0(ret[0]);
|
|
787
846
|
}
|
|
@@ -800,7 +859,8 @@ export class WasmPageBuilder {
|
|
|
800
859
|
let deferred2_0;
|
|
801
860
|
let deferred2_1;
|
|
802
861
|
try {
|
|
803
|
-
|
|
862
|
+
let ret;
|
|
863
|
+
ret = wasm.wasmpagebuilder_finish(this.__wbg_ptr);
|
|
804
864
|
var ptr1 = ret[0];
|
|
805
865
|
var len1 = ret[1];
|
|
806
866
|
if (ret[3]) {
|
|
@@ -827,7 +887,8 @@ export class WasmPageBuilder {
|
|
|
827
887
|
*/
|
|
828
888
|
image(image, x, y, width, height) {
|
|
829
889
|
_assertClass(image, WasmImage);
|
|
830
|
-
|
|
890
|
+
let ret;
|
|
891
|
+
ret = wasm.wasmpagebuilder_image(this.__wbg_ptr, image.__wbg_ptr, x, y, width, height);
|
|
831
892
|
if (ret[1]) {
|
|
832
893
|
throw takeFromExternrefTable0(ret[0]);
|
|
833
894
|
}
|
|
@@ -847,7 +908,8 @@ export class WasmPageBuilder {
|
|
|
847
908
|
link(x, y, width, height, target, contents) {
|
|
848
909
|
var ptr0 = isLikeNone(contents) ? 0 : passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
849
910
|
var len0 = WASM_VECTOR_LEN;
|
|
850
|
-
|
|
911
|
+
let ret;
|
|
912
|
+
ret = wasm.wasmpagebuilder_link(this.__wbg_ptr, x, y, width, height, target, ptr0, len0);
|
|
851
913
|
if (ret[1]) {
|
|
852
914
|
throw takeFromExternrefTable0(ret[0]);
|
|
853
915
|
}
|
|
@@ -861,7 +923,8 @@ export class WasmPageBuilder {
|
|
|
861
923
|
* @param {number} stroke
|
|
862
924
|
*/
|
|
863
925
|
opacity(fill, stroke) {
|
|
864
|
-
|
|
926
|
+
let ret;
|
|
927
|
+
ret = wasm.wasmpagebuilder_opacity(this.__wbg_ptr, fill, stroke);
|
|
865
928
|
if (ret[1]) {
|
|
866
929
|
throw takeFromExternrefTable0(ret[0]);
|
|
867
930
|
}
|
|
@@ -873,7 +936,8 @@ export class WasmPageBuilder {
|
|
|
873
936
|
* `builder-finished`.
|
|
874
937
|
*/
|
|
875
938
|
restore() {
|
|
876
|
-
|
|
939
|
+
let ret;
|
|
940
|
+
ret = wasm.wasmpagebuilder_restore(this.__wbg_ptr);
|
|
877
941
|
if (ret[1]) {
|
|
878
942
|
throw takeFromExternrefTable0(ret[0]);
|
|
879
943
|
}
|
|
@@ -886,7 +950,8 @@ export class WasmPageBuilder {
|
|
|
886
950
|
* @param {number} degrees
|
|
887
951
|
*/
|
|
888
952
|
rotate(degrees) {
|
|
889
|
-
|
|
953
|
+
let ret;
|
|
954
|
+
ret = wasm.wasmpagebuilder_rotate(this.__wbg_ptr, degrees);
|
|
890
955
|
if (ret[1]) {
|
|
891
956
|
throw takeFromExternrefTable0(ret[0]);
|
|
892
957
|
}
|
|
@@ -898,7 +963,8 @@ export class WasmPageBuilder {
|
|
|
898
963
|
* `builder-finished` after [`WasmPageBuilder::finish`] (so does every drawing method).
|
|
899
964
|
*/
|
|
900
965
|
save() {
|
|
901
|
-
|
|
966
|
+
let ret;
|
|
967
|
+
ret = wasm.wasmpagebuilder_save(this.__wbg_ptr);
|
|
902
968
|
if (ret[1]) {
|
|
903
969
|
throw takeFromExternrefTable0(ret[0]);
|
|
904
970
|
}
|
|
@@ -918,7 +984,8 @@ export class WasmPageBuilder {
|
|
|
918
984
|
setBox(kind, x, y, width, height) {
|
|
919
985
|
const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
920
986
|
const len0 = WASM_VECTOR_LEN;
|
|
921
|
-
|
|
987
|
+
let ret;
|
|
988
|
+
ret = wasm.wasmpagebuilder_setBox(this.__wbg_ptr, ptr0, len0, x, y, width, height);
|
|
922
989
|
if (ret[1]) {
|
|
923
990
|
throw takeFromExternrefTable0(ret[0]);
|
|
924
991
|
}
|
|
@@ -933,7 +1000,8 @@ export class WasmPageBuilder {
|
|
|
933
1000
|
strokeColorHex(hex) {
|
|
934
1001
|
const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
935
1002
|
const len0 = WASM_VECTOR_LEN;
|
|
936
|
-
|
|
1003
|
+
let ret;
|
|
1004
|
+
ret = wasm.wasmpagebuilder_strokeColorHex(this.__wbg_ptr, ptr0, len0);
|
|
937
1005
|
if (ret[1]) {
|
|
938
1006
|
throw takeFromExternrefTable0(ret[0]);
|
|
939
1007
|
}
|
|
@@ -948,7 +1016,8 @@ export class WasmPageBuilder {
|
|
|
948
1016
|
strokeColor(components) {
|
|
949
1017
|
const ptr0 = passArrayF64ToWasm0(components, wasm.__wbindgen_malloc);
|
|
950
1018
|
const len0 = WASM_VECTOR_LEN;
|
|
951
|
-
|
|
1019
|
+
let ret;
|
|
1020
|
+
ret = wasm.wasmpagebuilder_strokeColor(this.__wbg_ptr, ptr0, len0);
|
|
952
1021
|
if (ret[1]) {
|
|
953
1022
|
throw takeFromExternrefTable0(ret[0]);
|
|
954
1023
|
}
|
|
@@ -963,7 +1032,8 @@ export class WasmPageBuilder {
|
|
|
963
1032
|
strokePath(path) {
|
|
964
1033
|
const ptr0 = passArrayF64ToWasm0(path, wasm.__wbindgen_malloc);
|
|
965
1034
|
const len0 = WASM_VECTOR_LEN;
|
|
966
|
-
|
|
1035
|
+
let ret;
|
|
1036
|
+
ret = wasm.wasmpagebuilder_strokePath(this.__wbg_ptr, ptr0, len0);
|
|
967
1037
|
if (ret[1]) {
|
|
968
1038
|
throw takeFromExternrefTable0(ret[0]);
|
|
969
1039
|
}
|
|
@@ -988,7 +1058,8 @@ export class WasmPageBuilder {
|
|
|
988
1058
|
const len1 = WASM_VECTOR_LEN;
|
|
989
1059
|
const ptr2 = passArrayF64ToWasm0(dash, wasm.__wbindgen_malloc);
|
|
990
1060
|
const len2 = WASM_VECTOR_LEN;
|
|
991
|
-
|
|
1061
|
+
let ret;
|
|
1062
|
+
ret = wasm.wasmpagebuilder_strokeStyle(this.__wbg_ptr, width, ptr0, len0, ptr1, len1, miterLimit, ptr2, len2, dashPhase);
|
|
992
1063
|
if (ret[1]) {
|
|
993
1064
|
throw takeFromExternrefTable0(ret[0]);
|
|
994
1065
|
}
|
|
@@ -1003,7 +1074,8 @@ export class WasmPageBuilder {
|
|
|
1003
1074
|
transform(m) {
|
|
1004
1075
|
const ptr0 = passArrayF64ToWasm0(m, wasm.__wbindgen_malloc);
|
|
1005
1076
|
const len0 = WASM_VECTOR_LEN;
|
|
1006
|
-
|
|
1077
|
+
let ret;
|
|
1078
|
+
ret = wasm.wasmpagebuilder_transform(this.__wbg_ptr, ptr0, len0);
|
|
1007
1079
|
if (ret[1]) {
|
|
1008
1080
|
throw takeFromExternrefTable0(ret[0]);
|
|
1009
1081
|
}
|
|
@@ -1026,7 +1098,9 @@ export class WasmSaveJob {
|
|
|
1026
1098
|
static __wrap(ptr) {
|
|
1027
1099
|
const obj = Object.create(WasmSaveJob.prototype);
|
|
1028
1100
|
obj.__wbg_ptr = ptr;
|
|
1029
|
-
|
|
1101
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
1102
|
+
|
|
1103
|
+
WasmSaveJobFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
1030
1104
|
return obj;
|
|
1031
1105
|
}
|
|
1032
1106
|
__destroy_into_raw() {
|
|
@@ -1038,6 +1112,7 @@ export class WasmSaveJob {
|
|
|
1038
1112
|
free() {
|
|
1039
1113
|
const ptr = this.__destroy_into_raw();
|
|
1040
1114
|
wasm.__wbg_wasmsavejob_free(ptr, 0);
|
|
1115
|
+
|
|
1041
1116
|
}
|
|
1042
1117
|
/**
|
|
1043
1118
|
* Stops the job: its next step fails with `cancelled`.
|
|
@@ -1050,12 +1125,14 @@ export class WasmSaveJob {
|
|
|
1050
1125
|
* `{ state: "done", bytes, report }`.
|
|
1051
1126
|
*
|
|
1052
1127
|
* # Errors
|
|
1053
|
-
* `cancelled`, `document-changed`, `job-finished`,
|
|
1128
|
+
* `cancelled`, `document-changed`, `job-finished`, `disposed` when the document is freed,
|
|
1129
|
+
* or the save's own errors.
|
|
1054
1130
|
* @param {number} budget
|
|
1055
1131
|
* @returns {({ state: "progress" } & ProgressJs) | { state: "done"; bytes: Uint8Array<ArrayBuffer>; report: SaveReportJs }}
|
|
1056
1132
|
*/
|
|
1057
1133
|
step(budget) {
|
|
1058
|
-
|
|
1134
|
+
let ret;
|
|
1135
|
+
ret = wasm.wasmsavejob_step(this.__wbg_ptr, budget);
|
|
1059
1136
|
if (ret[2]) {
|
|
1060
1137
|
throw takeFromExternrefTable0(ret[1]);
|
|
1061
1138
|
}
|
|
@@ -1078,6 +1155,7 @@ export class WasmSparseSource {
|
|
|
1078
1155
|
free() {
|
|
1079
1156
|
const ptr = this.__destroy_into_raw();
|
|
1080
1157
|
wasm.__wbg_wasmsparsesource_free(ptr, 0);
|
|
1158
|
+
|
|
1081
1159
|
}
|
|
1082
1160
|
/**
|
|
1083
1161
|
* An empty source of `size` bytes holding at most `budget` bytes (no limit when omitted).
|
|
@@ -1088,12 +1166,14 @@ export class WasmSparseSource {
|
|
|
1088
1166
|
* @param {number | null} [budget]
|
|
1089
1167
|
*/
|
|
1090
1168
|
constructor(size, budget) {
|
|
1091
|
-
|
|
1169
|
+
let ret;
|
|
1170
|
+
ret = wasm.wasmsparsesource_new(size, !isLikeNone(budget), isLikeNone(budget) ? 0 : budget);
|
|
1092
1171
|
if (ret[2]) {
|
|
1093
1172
|
throw takeFromExternrefTable0(ret[1]);
|
|
1094
1173
|
}
|
|
1095
1174
|
this.__wbg_ptr = ret[0];
|
|
1096
|
-
|
|
1175
|
+
Object.defineProperty(this, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
1176
|
+
WasmSparseSourceFinalization.register(this, { ptr: ret[0], instance: __wbg_instance_id }, this);
|
|
1097
1177
|
return this;
|
|
1098
1178
|
}
|
|
1099
1179
|
/**
|
|
@@ -1101,7 +1181,8 @@ export class WasmSparseSource {
|
|
|
1101
1181
|
* @returns {number}
|
|
1102
1182
|
*/
|
|
1103
1183
|
get size() {
|
|
1104
|
-
|
|
1184
|
+
let ret;
|
|
1185
|
+
ret = wasm.wasmsparsesource_size(this.__wbg_ptr);
|
|
1105
1186
|
return ret;
|
|
1106
1187
|
}
|
|
1107
1188
|
/**
|
|
@@ -1115,7 +1196,8 @@ export class WasmSparseSource {
|
|
|
1115
1196
|
supply(offset, bytes) {
|
|
1116
1197
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1117
1198
|
const len0 = WASM_VECTOR_LEN;
|
|
1118
|
-
|
|
1199
|
+
let ret;
|
|
1200
|
+
ret = wasm.wasmsparsesource_supply(this.__wbg_ptr, offset, ptr0, len0);
|
|
1119
1201
|
if (ret[1]) {
|
|
1120
1202
|
throw takeFromExternrefTable0(ret[0]);
|
|
1121
1203
|
}
|
|
@@ -1136,7 +1218,8 @@ export class WasmSparseSource {
|
|
|
1136
1218
|
toFetch(asked, block, readahead) {
|
|
1137
1219
|
const ptr0 = passArrayF64ToWasm0(asked, wasm.__wbindgen_malloc);
|
|
1138
1220
|
const len0 = WASM_VECTOR_LEN;
|
|
1139
|
-
|
|
1221
|
+
let ret;
|
|
1222
|
+
ret = wasm.wasmsparsesource_toFetch(this.__wbg_ptr, ptr0, len0, block, readahead);
|
|
1140
1223
|
if (ret[2]) {
|
|
1141
1224
|
throw takeFromExternrefTable0(ret[1]);
|
|
1142
1225
|
}
|
|
@@ -1152,7 +1235,9 @@ export class WasmWarningCursor {
|
|
|
1152
1235
|
static __wrap(ptr) {
|
|
1153
1236
|
const obj = Object.create(WasmWarningCursor.prototype);
|
|
1154
1237
|
obj.__wbg_ptr = ptr;
|
|
1155
|
-
|
|
1238
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
1239
|
+
|
|
1240
|
+
WasmWarningCursorFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
1156
1241
|
return obj;
|
|
1157
1242
|
}
|
|
1158
1243
|
__destroy_into_raw() {
|
|
@@ -1164,6 +1249,7 @@ export class WasmWarningCursor {
|
|
|
1164
1249
|
free() {
|
|
1165
1250
|
const ptr = this.__destroy_into_raw();
|
|
1166
1251
|
wasm.__wbg_wasmwarningcursor_free(ptr, 0);
|
|
1252
|
+
|
|
1167
1253
|
}
|
|
1168
1254
|
/**
|
|
1169
1255
|
* Up to `max` more warnings, each as the ADR 0026 §1 object; empty at the end.
|
|
@@ -1171,7 +1257,8 @@ export class WasmWarningCursor {
|
|
|
1171
1257
|
* @returns {Diagnostic[]}
|
|
1172
1258
|
*/
|
|
1173
1259
|
nextBatch(max) {
|
|
1174
|
-
|
|
1260
|
+
let ret;
|
|
1261
|
+
ret = wasm.wasmwarningcursor_nextBatch(this.__wbg_ptr, max);
|
|
1175
1262
|
return ret;
|
|
1176
1263
|
}
|
|
1177
1264
|
/**
|
|
@@ -1179,18 +1266,44 @@ export class WasmWarningCursor {
|
|
|
1179
1266
|
* @returns {number}
|
|
1180
1267
|
*/
|
|
1181
1268
|
remaining() {
|
|
1182
|
-
|
|
1269
|
+
let ret;
|
|
1270
|
+
ret = wasm.wasmwarningcursor_remaining(this.__wbg_ptr);
|
|
1183
1271
|
return ret >>> 0;
|
|
1184
1272
|
}
|
|
1185
1273
|
}
|
|
1186
1274
|
if (Symbol.dispose) WasmWarningCursor.prototype[Symbol.dispose] = WasmWarningCursor.prototype.free;
|
|
1187
1275
|
|
|
1276
|
+
export function __wbg_reset_state () {
|
|
1277
|
+
__wbg_instance_id++;
|
|
1278
|
+
cachedDataViewMemory0 = null;
|
|
1279
|
+
cachedFloat64ArrayMemory0 = null;
|
|
1280
|
+
cachedUint8ArrayMemory0 = null;
|
|
1281
|
+
if (typeof numBytesDecoded !== 'undefined') numBytesDecoded = 0;
|
|
1282
|
+
if (typeof WASM_VECTOR_LEN !== 'undefined') WASM_VECTOR_LEN = 0;
|
|
1283
|
+
__wbg_reinit_scheduled = false;
|
|
1284
|
+
wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
|
|
1285
|
+
wasm = wasmInstance.exports;
|
|
1286
|
+
wasm.__wbindgen_start();
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
/**
|
|
1290
|
+
* Whether the most recent allocation failed: after a trap, `true` means the module ran out of
|
|
1291
|
+
* memory.
|
|
1292
|
+
* @returns {boolean}
|
|
1293
|
+
*/
|
|
1294
|
+
export function allocationFailed() {
|
|
1295
|
+
let ret;
|
|
1296
|
+
ret = wasm.allocationFailed();
|
|
1297
|
+
return ret !== 0;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1188
1300
|
/**
|
|
1189
1301
|
* Whether this module is the text module (fonts, `text`, `textBox`).
|
|
1190
1302
|
* @returns {boolean}
|
|
1191
1303
|
*/
|
|
1192
1304
|
export function hasText() {
|
|
1193
|
-
|
|
1305
|
+
let ret;
|
|
1306
|
+
ret = wasm.hasText();
|
|
1194
1307
|
return ret !== 0;
|
|
1195
1308
|
}
|
|
1196
1309
|
|
|
@@ -1202,7 +1315,8 @@ export function version() {
|
|
|
1202
1315
|
let deferred1_0;
|
|
1203
1316
|
let deferred1_1;
|
|
1204
1317
|
try {
|
|
1205
|
-
|
|
1318
|
+
let ret;
|
|
1319
|
+
ret = wasm.version();
|
|
1206
1320
|
deferred1_0 = ret[0];
|
|
1207
1321
|
deferred1_1 = ret[1];
|
|
1208
1322
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -1293,30 +1407,55 @@ function __wbg_get_imports() {
|
|
|
1293
1407
|
};
|
|
1294
1408
|
}
|
|
1295
1409
|
|
|
1410
|
+
function __wbg_call_guard() {
|
|
1411
|
+
if (__wbg_reinit_scheduled) {
|
|
1412
|
+
__wbg_reset_state();
|
|
1413
|
+
return;
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
|
|
1417
|
+
|
|
1418
|
+
let __wbg_instance_id = 0;
|
|
1296
1419
|
const WasmBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1297
1420
|
? { register: () => {}, unregister: () => {} }
|
|
1298
|
-
: new FinalizationRegistry(
|
|
1421
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1422
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmbuilder_free(ptr, 1);
|
|
1423
|
+
});
|
|
1299
1424
|
const WasmDocumentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1300
1425
|
? { register: () => {}, unregister: () => {} }
|
|
1301
|
-
: new FinalizationRegistry(
|
|
1426
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1427
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmdocument_free(ptr, 1);
|
|
1428
|
+
});
|
|
1302
1429
|
const WasmImageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1303
1430
|
? { register: () => {}, unregister: () => {} }
|
|
1304
|
-
: new FinalizationRegistry(
|
|
1431
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1432
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmimage_free(ptr, 1);
|
|
1433
|
+
});
|
|
1305
1434
|
const WasmPageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1306
1435
|
? { register: () => {}, unregister: () => {} }
|
|
1307
|
-
: new FinalizationRegistry(
|
|
1436
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1437
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmpage_free(ptr, 1);
|
|
1438
|
+
});
|
|
1308
1439
|
const WasmPageBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1309
1440
|
? { register: () => {}, unregister: () => {} }
|
|
1310
|
-
: new FinalizationRegistry(
|
|
1441
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1442
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmpagebuilder_free(ptr, 1);
|
|
1443
|
+
});
|
|
1311
1444
|
const WasmSaveJobFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1312
1445
|
? { register: () => {}, unregister: () => {} }
|
|
1313
|
-
: new FinalizationRegistry(
|
|
1446
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1447
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmsavejob_free(ptr, 1);
|
|
1448
|
+
});
|
|
1314
1449
|
const WasmSparseSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1315
1450
|
? { register: () => {}, unregister: () => {} }
|
|
1316
|
-
: new FinalizationRegistry(
|
|
1451
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1452
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmsparsesource_free(ptr, 1);
|
|
1453
|
+
});
|
|
1317
1454
|
const WasmWarningCursorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1318
1455
|
? { register: () => {}, unregister: () => {} }
|
|
1319
|
-
: new FinalizationRegistry(
|
|
1456
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1457
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmwarningcursor_free(ptr, 1);
|
|
1458
|
+
});
|
|
1320
1459
|
|
|
1321
1460
|
function addToExternrefTable0(obj) {
|
|
1322
1461
|
const idx = wasm.__externref_table_alloc();
|
|
@@ -1442,6 +1581,8 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
1442
1581
|
return ptr;
|
|
1443
1582
|
}
|
|
1444
1583
|
|
|
1584
|
+
let __wbg_reinit_scheduled = false;
|
|
1585
|
+
|
|
1445
1586
|
function takeFromExternrefTable0(idx) {
|
|
1446
1587
|
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1447
1588
|
wasm.__externref_table_dealloc(idx);
|