@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_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,10 +670,12 @@ 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`
|
|
627
|
-
* or `background
|
|
677
|
+
* or `background`, or a pagination artifact that says what it is: `header` (attached to the
|
|
678
|
+
* top edge), `footer` (the bottom) or `watermark`.
|
|
628
679
|
*
|
|
629
680
|
* # Errors
|
|
630
681
|
* `invalid-argument` for another kind.
|
|
@@ -633,7 +684,8 @@ export class WasmPageBuilder {
|
|
|
633
684
|
beginArtifact(kind) {
|
|
634
685
|
const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
635
686
|
const len0 = WASM_VECTOR_LEN;
|
|
636
|
-
|
|
687
|
+
let ret;
|
|
688
|
+
ret = wasm.wasmpagebuilder_beginArtifact(this.__wbg_ptr, ptr0, len0);
|
|
637
689
|
if (ret[1]) {
|
|
638
690
|
throw takeFromExternrefTable0(ret[0]);
|
|
639
691
|
}
|
|
@@ -670,7 +722,8 @@ export class WasmPageBuilder {
|
|
|
670
722
|
var len5 = WASM_VECTOR_LEN;
|
|
671
723
|
var ptr6 = isLikeNone(scope) ? 0 : passStringToWasm0(scope, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
672
724
|
var len6 = WASM_VECTOR_LEN;
|
|
673
|
-
|
|
725
|
+
let ret;
|
|
726
|
+
ret = wasm.wasmpagebuilder_beginTag(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, ptr4, len4, ptr5, len5, ptr6, len6);
|
|
674
727
|
if (ret[1]) {
|
|
675
728
|
throw takeFromExternrefTable0(ret[0]);
|
|
676
729
|
}
|
|
@@ -685,7 +738,8 @@ export class WasmPageBuilder {
|
|
|
685
738
|
blendMode(mode) {
|
|
686
739
|
const ptr0 = passStringToWasm0(mode, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
687
740
|
const len0 = WASM_VECTOR_LEN;
|
|
688
|
-
|
|
741
|
+
let ret;
|
|
742
|
+
ret = wasm.wasmpagebuilder_blendMode(this.__wbg_ptr, ptr0, len0);
|
|
689
743
|
if (ret[1]) {
|
|
690
744
|
throw takeFromExternrefTable0(ret[0]);
|
|
691
745
|
}
|
|
@@ -703,7 +757,8 @@ export class WasmPageBuilder {
|
|
|
703
757
|
const len0 = WASM_VECTOR_LEN;
|
|
704
758
|
const ptr1 = passStringToWasm0(rule, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
705
759
|
const len1 = WASM_VECTOR_LEN;
|
|
706
|
-
|
|
760
|
+
let ret;
|
|
761
|
+
ret = wasm.wasmpagebuilder_clipPath(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
707
762
|
if (ret[1]) {
|
|
708
763
|
throw takeFromExternrefTable0(ret[0]);
|
|
709
764
|
}
|
|
@@ -715,7 +770,8 @@ export class WasmPageBuilder {
|
|
|
715
770
|
* `builder-finished`.
|
|
716
771
|
*/
|
|
717
772
|
endTag() {
|
|
718
|
-
|
|
773
|
+
let ret;
|
|
774
|
+
ret = wasm.wasmpagebuilder_endTag(this.__wbg_ptr);
|
|
719
775
|
if (ret[1]) {
|
|
720
776
|
throw takeFromExternrefTable0(ret[0]);
|
|
721
777
|
}
|
|
@@ -730,7 +786,8 @@ export class WasmPageBuilder {
|
|
|
730
786
|
fillColorHex(hex) {
|
|
731
787
|
const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
732
788
|
const len0 = WASM_VECTOR_LEN;
|
|
733
|
-
|
|
789
|
+
let ret;
|
|
790
|
+
ret = wasm.wasmpagebuilder_fillColorHex(this.__wbg_ptr, ptr0, len0);
|
|
734
791
|
if (ret[1]) {
|
|
735
792
|
throw takeFromExternrefTable0(ret[0]);
|
|
736
793
|
}
|
|
@@ -745,7 +802,8 @@ export class WasmPageBuilder {
|
|
|
745
802
|
fillColor(components) {
|
|
746
803
|
const ptr0 = passArrayF64ToWasm0(components, wasm.__wbindgen_malloc);
|
|
747
804
|
const len0 = WASM_VECTOR_LEN;
|
|
748
|
-
|
|
805
|
+
let ret;
|
|
806
|
+
ret = wasm.wasmpagebuilder_fillColor(this.__wbg_ptr, ptr0, len0);
|
|
749
807
|
if (ret[1]) {
|
|
750
808
|
throw takeFromExternrefTable0(ret[0]);
|
|
751
809
|
}
|
|
@@ -763,7 +821,8 @@ export class WasmPageBuilder {
|
|
|
763
821
|
const len0 = WASM_VECTOR_LEN;
|
|
764
822
|
const ptr1 = passStringToWasm0(rule, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
765
823
|
const len1 = WASM_VECTOR_LEN;
|
|
766
|
-
|
|
824
|
+
let ret;
|
|
825
|
+
ret = wasm.wasmpagebuilder_fillPath(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
767
826
|
if (ret[1]) {
|
|
768
827
|
throw takeFromExternrefTable0(ret[0]);
|
|
769
828
|
}
|
|
@@ -781,7 +840,8 @@ export class WasmPageBuilder {
|
|
|
781
840
|
const len0 = WASM_VECTOR_LEN;
|
|
782
841
|
const ptr1 = passStringToWasm0(rule, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
783
842
|
const len1 = WASM_VECTOR_LEN;
|
|
784
|
-
|
|
843
|
+
let ret;
|
|
844
|
+
ret = wasm.wasmpagebuilder_fillStrokePath(this.__wbg_ptr, ptr0, len0, ptr1, len1);
|
|
785
845
|
if (ret[1]) {
|
|
786
846
|
throw takeFromExternrefTable0(ret[0]);
|
|
787
847
|
}
|
|
@@ -800,7 +860,8 @@ export class WasmPageBuilder {
|
|
|
800
860
|
let deferred2_0;
|
|
801
861
|
let deferred2_1;
|
|
802
862
|
try {
|
|
803
|
-
|
|
863
|
+
let ret;
|
|
864
|
+
ret = wasm.wasmpagebuilder_finish(this.__wbg_ptr);
|
|
804
865
|
var ptr1 = ret[0];
|
|
805
866
|
var len1 = ret[1];
|
|
806
867
|
if (ret[3]) {
|
|
@@ -827,7 +888,8 @@ export class WasmPageBuilder {
|
|
|
827
888
|
*/
|
|
828
889
|
image(image, x, y, width, height) {
|
|
829
890
|
_assertClass(image, WasmImage);
|
|
830
|
-
|
|
891
|
+
let ret;
|
|
892
|
+
ret = wasm.wasmpagebuilder_image(this.__wbg_ptr, image.__wbg_ptr, x, y, width, height);
|
|
831
893
|
if (ret[1]) {
|
|
832
894
|
throw takeFromExternrefTable0(ret[0]);
|
|
833
895
|
}
|
|
@@ -847,7 +909,8 @@ export class WasmPageBuilder {
|
|
|
847
909
|
link(x, y, width, height, target, contents) {
|
|
848
910
|
var ptr0 = isLikeNone(contents) ? 0 : passStringToWasm0(contents, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
849
911
|
var len0 = WASM_VECTOR_LEN;
|
|
850
|
-
|
|
912
|
+
let ret;
|
|
913
|
+
ret = wasm.wasmpagebuilder_link(this.__wbg_ptr, x, y, width, height, target, ptr0, len0);
|
|
851
914
|
if (ret[1]) {
|
|
852
915
|
throw takeFromExternrefTable0(ret[0]);
|
|
853
916
|
}
|
|
@@ -861,7 +924,8 @@ export class WasmPageBuilder {
|
|
|
861
924
|
* @param {number} stroke
|
|
862
925
|
*/
|
|
863
926
|
opacity(fill, stroke) {
|
|
864
|
-
|
|
927
|
+
let ret;
|
|
928
|
+
ret = wasm.wasmpagebuilder_opacity(this.__wbg_ptr, fill, stroke);
|
|
865
929
|
if (ret[1]) {
|
|
866
930
|
throw takeFromExternrefTable0(ret[0]);
|
|
867
931
|
}
|
|
@@ -873,7 +937,8 @@ export class WasmPageBuilder {
|
|
|
873
937
|
* `builder-finished`.
|
|
874
938
|
*/
|
|
875
939
|
restore() {
|
|
876
|
-
|
|
940
|
+
let ret;
|
|
941
|
+
ret = wasm.wasmpagebuilder_restore(this.__wbg_ptr);
|
|
877
942
|
if (ret[1]) {
|
|
878
943
|
throw takeFromExternrefTable0(ret[0]);
|
|
879
944
|
}
|
|
@@ -886,7 +951,8 @@ export class WasmPageBuilder {
|
|
|
886
951
|
* @param {number} degrees
|
|
887
952
|
*/
|
|
888
953
|
rotate(degrees) {
|
|
889
|
-
|
|
954
|
+
let ret;
|
|
955
|
+
ret = wasm.wasmpagebuilder_rotate(this.__wbg_ptr, degrees);
|
|
890
956
|
if (ret[1]) {
|
|
891
957
|
throw takeFromExternrefTable0(ret[0]);
|
|
892
958
|
}
|
|
@@ -898,7 +964,8 @@ export class WasmPageBuilder {
|
|
|
898
964
|
* `builder-finished` after [`WasmPageBuilder::finish`] (so does every drawing method).
|
|
899
965
|
*/
|
|
900
966
|
save() {
|
|
901
|
-
|
|
967
|
+
let ret;
|
|
968
|
+
ret = wasm.wasmpagebuilder_save(this.__wbg_ptr);
|
|
902
969
|
if (ret[1]) {
|
|
903
970
|
throw takeFromExternrefTable0(ret[0]);
|
|
904
971
|
}
|
|
@@ -918,7 +985,8 @@ export class WasmPageBuilder {
|
|
|
918
985
|
setBox(kind, x, y, width, height) {
|
|
919
986
|
const ptr0 = passStringToWasm0(kind, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
920
987
|
const len0 = WASM_VECTOR_LEN;
|
|
921
|
-
|
|
988
|
+
let ret;
|
|
989
|
+
ret = wasm.wasmpagebuilder_setBox(this.__wbg_ptr, ptr0, len0, x, y, width, height);
|
|
922
990
|
if (ret[1]) {
|
|
923
991
|
throw takeFromExternrefTable0(ret[0]);
|
|
924
992
|
}
|
|
@@ -933,7 +1001,8 @@ export class WasmPageBuilder {
|
|
|
933
1001
|
strokeColorHex(hex) {
|
|
934
1002
|
const ptr0 = passStringToWasm0(hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
935
1003
|
const len0 = WASM_VECTOR_LEN;
|
|
936
|
-
|
|
1004
|
+
let ret;
|
|
1005
|
+
ret = wasm.wasmpagebuilder_strokeColorHex(this.__wbg_ptr, ptr0, len0);
|
|
937
1006
|
if (ret[1]) {
|
|
938
1007
|
throw takeFromExternrefTable0(ret[0]);
|
|
939
1008
|
}
|
|
@@ -948,7 +1017,8 @@ export class WasmPageBuilder {
|
|
|
948
1017
|
strokeColor(components) {
|
|
949
1018
|
const ptr0 = passArrayF64ToWasm0(components, wasm.__wbindgen_malloc);
|
|
950
1019
|
const len0 = WASM_VECTOR_LEN;
|
|
951
|
-
|
|
1020
|
+
let ret;
|
|
1021
|
+
ret = wasm.wasmpagebuilder_strokeColor(this.__wbg_ptr, ptr0, len0);
|
|
952
1022
|
if (ret[1]) {
|
|
953
1023
|
throw takeFromExternrefTable0(ret[0]);
|
|
954
1024
|
}
|
|
@@ -963,7 +1033,8 @@ export class WasmPageBuilder {
|
|
|
963
1033
|
strokePath(path) {
|
|
964
1034
|
const ptr0 = passArrayF64ToWasm0(path, wasm.__wbindgen_malloc);
|
|
965
1035
|
const len0 = WASM_VECTOR_LEN;
|
|
966
|
-
|
|
1036
|
+
let ret;
|
|
1037
|
+
ret = wasm.wasmpagebuilder_strokePath(this.__wbg_ptr, ptr0, len0);
|
|
967
1038
|
if (ret[1]) {
|
|
968
1039
|
throw takeFromExternrefTable0(ret[0]);
|
|
969
1040
|
}
|
|
@@ -988,7 +1059,8 @@ export class WasmPageBuilder {
|
|
|
988
1059
|
const len1 = WASM_VECTOR_LEN;
|
|
989
1060
|
const ptr2 = passArrayF64ToWasm0(dash, wasm.__wbindgen_malloc);
|
|
990
1061
|
const len2 = WASM_VECTOR_LEN;
|
|
991
|
-
|
|
1062
|
+
let ret;
|
|
1063
|
+
ret = wasm.wasmpagebuilder_strokeStyle(this.__wbg_ptr, width, ptr0, len0, ptr1, len1, miterLimit, ptr2, len2, dashPhase);
|
|
992
1064
|
if (ret[1]) {
|
|
993
1065
|
throw takeFromExternrefTable0(ret[0]);
|
|
994
1066
|
}
|
|
@@ -1003,7 +1075,8 @@ export class WasmPageBuilder {
|
|
|
1003
1075
|
transform(m) {
|
|
1004
1076
|
const ptr0 = passArrayF64ToWasm0(m, wasm.__wbindgen_malloc);
|
|
1005
1077
|
const len0 = WASM_VECTOR_LEN;
|
|
1006
|
-
|
|
1078
|
+
let ret;
|
|
1079
|
+
ret = wasm.wasmpagebuilder_transform(this.__wbg_ptr, ptr0, len0);
|
|
1007
1080
|
if (ret[1]) {
|
|
1008
1081
|
throw takeFromExternrefTable0(ret[0]);
|
|
1009
1082
|
}
|
|
@@ -1026,7 +1099,9 @@ export class WasmSaveJob {
|
|
|
1026
1099
|
static __wrap(ptr) {
|
|
1027
1100
|
const obj = Object.create(WasmSaveJob.prototype);
|
|
1028
1101
|
obj.__wbg_ptr = ptr;
|
|
1029
|
-
|
|
1102
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
1103
|
+
|
|
1104
|
+
WasmSaveJobFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
1030
1105
|
return obj;
|
|
1031
1106
|
}
|
|
1032
1107
|
__destroy_into_raw() {
|
|
@@ -1038,6 +1113,7 @@ export class WasmSaveJob {
|
|
|
1038
1113
|
free() {
|
|
1039
1114
|
const ptr = this.__destroy_into_raw();
|
|
1040
1115
|
wasm.__wbg_wasmsavejob_free(ptr, 0);
|
|
1116
|
+
|
|
1041
1117
|
}
|
|
1042
1118
|
/**
|
|
1043
1119
|
* Stops the job: its next step fails with `cancelled`.
|
|
@@ -1050,12 +1126,14 @@ export class WasmSaveJob {
|
|
|
1050
1126
|
* `{ state: "done", bytes, report }`.
|
|
1051
1127
|
*
|
|
1052
1128
|
* # Errors
|
|
1053
|
-
* `cancelled`, `document-changed`, `job-finished`,
|
|
1129
|
+
* `cancelled`, `document-changed`, `job-finished`, `disposed` when the document is freed,
|
|
1130
|
+
* or the save's own errors.
|
|
1054
1131
|
* @param {number} budget
|
|
1055
1132
|
* @returns {({ state: "progress" } & ProgressJs) | { state: "done"; bytes: Uint8Array<ArrayBuffer>; report: SaveReportJs }}
|
|
1056
1133
|
*/
|
|
1057
1134
|
step(budget) {
|
|
1058
|
-
|
|
1135
|
+
let ret;
|
|
1136
|
+
ret = wasm.wasmsavejob_step(this.__wbg_ptr, budget);
|
|
1059
1137
|
if (ret[2]) {
|
|
1060
1138
|
throw takeFromExternrefTable0(ret[1]);
|
|
1061
1139
|
}
|
|
@@ -1078,6 +1156,7 @@ export class WasmSparseSource {
|
|
|
1078
1156
|
free() {
|
|
1079
1157
|
const ptr = this.__destroy_into_raw();
|
|
1080
1158
|
wasm.__wbg_wasmsparsesource_free(ptr, 0);
|
|
1159
|
+
|
|
1081
1160
|
}
|
|
1082
1161
|
/**
|
|
1083
1162
|
* An empty source of `size` bytes holding at most `budget` bytes (no limit when omitted).
|
|
@@ -1088,12 +1167,14 @@ export class WasmSparseSource {
|
|
|
1088
1167
|
* @param {number | null} [budget]
|
|
1089
1168
|
*/
|
|
1090
1169
|
constructor(size, budget) {
|
|
1091
|
-
|
|
1170
|
+
let ret;
|
|
1171
|
+
ret = wasm.wasmsparsesource_new(size, !isLikeNone(budget), isLikeNone(budget) ? 0 : budget);
|
|
1092
1172
|
if (ret[2]) {
|
|
1093
1173
|
throw takeFromExternrefTable0(ret[1]);
|
|
1094
1174
|
}
|
|
1095
1175
|
this.__wbg_ptr = ret[0];
|
|
1096
|
-
|
|
1176
|
+
Object.defineProperty(this, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
1177
|
+
WasmSparseSourceFinalization.register(this, { ptr: ret[0], instance: __wbg_instance_id }, this);
|
|
1097
1178
|
return this;
|
|
1098
1179
|
}
|
|
1099
1180
|
/**
|
|
@@ -1101,7 +1182,8 @@ export class WasmSparseSource {
|
|
|
1101
1182
|
* @returns {number}
|
|
1102
1183
|
*/
|
|
1103
1184
|
get size() {
|
|
1104
|
-
|
|
1185
|
+
let ret;
|
|
1186
|
+
ret = wasm.wasmsparsesource_size(this.__wbg_ptr);
|
|
1105
1187
|
return ret;
|
|
1106
1188
|
}
|
|
1107
1189
|
/**
|
|
@@ -1115,7 +1197,8 @@ export class WasmSparseSource {
|
|
|
1115
1197
|
supply(offset, bytes) {
|
|
1116
1198
|
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
1117
1199
|
const len0 = WASM_VECTOR_LEN;
|
|
1118
|
-
|
|
1200
|
+
let ret;
|
|
1201
|
+
ret = wasm.wasmsparsesource_supply(this.__wbg_ptr, offset, ptr0, len0);
|
|
1119
1202
|
if (ret[1]) {
|
|
1120
1203
|
throw takeFromExternrefTable0(ret[0]);
|
|
1121
1204
|
}
|
|
@@ -1136,7 +1219,8 @@ export class WasmSparseSource {
|
|
|
1136
1219
|
toFetch(asked, block, readahead) {
|
|
1137
1220
|
const ptr0 = passArrayF64ToWasm0(asked, wasm.__wbindgen_malloc);
|
|
1138
1221
|
const len0 = WASM_VECTOR_LEN;
|
|
1139
|
-
|
|
1222
|
+
let ret;
|
|
1223
|
+
ret = wasm.wasmsparsesource_toFetch(this.__wbg_ptr, ptr0, len0, block, readahead);
|
|
1140
1224
|
if (ret[2]) {
|
|
1141
1225
|
throw takeFromExternrefTable0(ret[1]);
|
|
1142
1226
|
}
|
|
@@ -1152,7 +1236,9 @@ export class WasmWarningCursor {
|
|
|
1152
1236
|
static __wrap(ptr) {
|
|
1153
1237
|
const obj = Object.create(WasmWarningCursor.prototype);
|
|
1154
1238
|
obj.__wbg_ptr = ptr;
|
|
1155
|
-
|
|
1239
|
+
Object.defineProperty(obj, '__wbg_inst', { value: __wbg_instance_id, writable: true });
|
|
1240
|
+
|
|
1241
|
+
WasmWarningCursorFinalization.register(obj, { ptr, instance: __wbg_instance_id }, obj);
|
|
1156
1242
|
return obj;
|
|
1157
1243
|
}
|
|
1158
1244
|
__destroy_into_raw() {
|
|
@@ -1164,6 +1250,7 @@ export class WasmWarningCursor {
|
|
|
1164
1250
|
free() {
|
|
1165
1251
|
const ptr = this.__destroy_into_raw();
|
|
1166
1252
|
wasm.__wbg_wasmwarningcursor_free(ptr, 0);
|
|
1253
|
+
|
|
1167
1254
|
}
|
|
1168
1255
|
/**
|
|
1169
1256
|
* Up to `max` more warnings, each as the ADR 0026 §1 object; empty at the end.
|
|
@@ -1171,7 +1258,8 @@ export class WasmWarningCursor {
|
|
|
1171
1258
|
* @returns {Diagnostic[]}
|
|
1172
1259
|
*/
|
|
1173
1260
|
nextBatch(max) {
|
|
1174
|
-
|
|
1261
|
+
let ret;
|
|
1262
|
+
ret = wasm.wasmwarningcursor_nextBatch(this.__wbg_ptr, max);
|
|
1175
1263
|
return ret;
|
|
1176
1264
|
}
|
|
1177
1265
|
/**
|
|
@@ -1179,18 +1267,44 @@ export class WasmWarningCursor {
|
|
|
1179
1267
|
* @returns {number}
|
|
1180
1268
|
*/
|
|
1181
1269
|
remaining() {
|
|
1182
|
-
|
|
1270
|
+
let ret;
|
|
1271
|
+
ret = wasm.wasmwarningcursor_remaining(this.__wbg_ptr);
|
|
1183
1272
|
return ret >>> 0;
|
|
1184
1273
|
}
|
|
1185
1274
|
}
|
|
1186
1275
|
if (Symbol.dispose) WasmWarningCursor.prototype[Symbol.dispose] = WasmWarningCursor.prototype.free;
|
|
1187
1276
|
|
|
1277
|
+
export function __wbg_reset_state () {
|
|
1278
|
+
__wbg_instance_id++;
|
|
1279
|
+
cachedDataViewMemory0 = null;
|
|
1280
|
+
cachedFloat64ArrayMemory0 = null;
|
|
1281
|
+
cachedUint8ArrayMemory0 = null;
|
|
1282
|
+
if (typeof numBytesDecoded !== 'undefined') numBytesDecoded = 0;
|
|
1283
|
+
if (typeof WASM_VECTOR_LEN !== 'undefined') WASM_VECTOR_LEN = 0;
|
|
1284
|
+
__wbg_reinit_scheduled = false;
|
|
1285
|
+
wasmInstance = new WebAssembly.Instance(wasmModule, __wbg_get_imports());
|
|
1286
|
+
wasm = wasmInstance.exports;
|
|
1287
|
+
wasm.__wbindgen_start();
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* Whether the most recent allocation failed: after a trap, `true` means the module ran out of
|
|
1292
|
+
* memory.
|
|
1293
|
+
* @returns {boolean}
|
|
1294
|
+
*/
|
|
1295
|
+
export function allocationFailed() {
|
|
1296
|
+
let ret;
|
|
1297
|
+
ret = wasm.allocationFailed();
|
|
1298
|
+
return ret !== 0;
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1188
1301
|
/**
|
|
1189
1302
|
* Whether this module is the text module (fonts, `text`, `textBox`).
|
|
1190
1303
|
* @returns {boolean}
|
|
1191
1304
|
*/
|
|
1192
1305
|
export function hasText() {
|
|
1193
|
-
|
|
1306
|
+
let ret;
|
|
1307
|
+
ret = wasm.hasText();
|
|
1194
1308
|
return ret !== 0;
|
|
1195
1309
|
}
|
|
1196
1310
|
|
|
@@ -1202,7 +1316,8 @@ export function version() {
|
|
|
1202
1316
|
let deferred1_0;
|
|
1203
1317
|
let deferred1_1;
|
|
1204
1318
|
try {
|
|
1205
|
-
|
|
1319
|
+
let ret;
|
|
1320
|
+
ret = wasm.version();
|
|
1206
1321
|
deferred1_0 = ret[0];
|
|
1207
1322
|
deferred1_1 = ret[1];
|
|
1208
1323
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -1293,30 +1408,55 @@ function __wbg_get_imports() {
|
|
|
1293
1408
|
};
|
|
1294
1409
|
}
|
|
1295
1410
|
|
|
1411
|
+
function __wbg_call_guard() {
|
|
1412
|
+
if (__wbg_reinit_scheduled) {
|
|
1413
|
+
__wbg_reset_state();
|
|
1414
|
+
return;
|
|
1415
|
+
}
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
|
|
1419
|
+
let __wbg_instance_id = 0;
|
|
1296
1420
|
const WasmBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1297
1421
|
? { register: () => {}, unregister: () => {} }
|
|
1298
|
-
: new FinalizationRegistry(
|
|
1422
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1423
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmbuilder_free(ptr, 1);
|
|
1424
|
+
});
|
|
1299
1425
|
const WasmDocumentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1300
1426
|
? { register: () => {}, unregister: () => {} }
|
|
1301
|
-
: new FinalizationRegistry(
|
|
1427
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1428
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmdocument_free(ptr, 1);
|
|
1429
|
+
});
|
|
1302
1430
|
const WasmImageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1303
1431
|
? { register: () => {}, unregister: () => {} }
|
|
1304
|
-
: new FinalizationRegistry(
|
|
1432
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1433
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmimage_free(ptr, 1);
|
|
1434
|
+
});
|
|
1305
1435
|
const WasmPageFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1306
1436
|
? { register: () => {}, unregister: () => {} }
|
|
1307
|
-
: new FinalizationRegistry(
|
|
1437
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1438
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmpage_free(ptr, 1);
|
|
1439
|
+
});
|
|
1308
1440
|
const WasmPageBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1309
1441
|
? { register: () => {}, unregister: () => {} }
|
|
1310
|
-
: new FinalizationRegistry(
|
|
1442
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1443
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmpagebuilder_free(ptr, 1);
|
|
1444
|
+
});
|
|
1311
1445
|
const WasmSaveJobFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1312
1446
|
? { register: () => {}, unregister: () => {} }
|
|
1313
|
-
: new FinalizationRegistry(
|
|
1447
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1448
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmsavejob_free(ptr, 1);
|
|
1449
|
+
});
|
|
1314
1450
|
const WasmSparseSourceFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1315
1451
|
? { register: () => {}, unregister: () => {} }
|
|
1316
|
-
: new FinalizationRegistry(
|
|
1452
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1453
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmsparsesource_free(ptr, 1);
|
|
1454
|
+
});
|
|
1317
1455
|
const WasmWarningCursorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1318
1456
|
? { register: () => {}, unregister: () => {} }
|
|
1319
|
-
: new FinalizationRegistry(
|
|
1457
|
+
: new FinalizationRegistry(({ ptr, instance }) => {
|
|
1458
|
+
if (instance === __wbg_instance_id) wasm.__wbg_wasmwarningcursor_free(ptr, 1);
|
|
1459
|
+
});
|
|
1320
1460
|
|
|
1321
1461
|
function addToExternrefTable0(obj) {
|
|
1322
1462
|
const idx = wasm.__externref_table_alloc();
|
|
@@ -1442,6 +1582,8 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
1442
1582
|
return ptr;
|
|
1443
1583
|
}
|
|
1444
1584
|
|
|
1585
|
+
let __wbg_reinit_scheduled = false;
|
|
1586
|
+
|
|
1445
1587
|
function takeFromExternrefTable0(idx) {
|
|
1446
1588
|
const value = wasm.__wbindgen_externrefs.get(idx);
|
|
1447
1589
|
wasm.__externref_table_dealloc(idx);
|