@docvyu/sdk 0.0.6 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +47 -32
  2. package/dist/cdn/docvyu.js +2268 -120
  3. package/dist/cdn/docvyu.min.js +1 -1
  4. package/dist/cjs/DocvyuEditor-BOTw6i4d.js +1 -0
  5. package/dist/cjs/index.js +1 -1
  6. package/dist/cjs/react/index.js +1 -1
  7. package/dist/esm/DocvyuEditor-CDLqMpaq.js +1 -0
  8. package/dist/esm/index.js +1 -1
  9. package/dist/esm/react/index.js +1 -1
  10. package/dist/types/app/DocvyuApp.d.ts +187 -0
  11. package/dist/types/app/index.d.ts +0 -2
  12. package/dist/types/core/DocvyuEditor.d.ts +402 -57
  13. package/dist/types/core/index.d.ts +1 -1
  14. package/dist/types/i18n/types.d.ts +128 -0
  15. package/dist/wasm/docvyu_core.d.ts +8 -182
  16. package/dist/wasm/docvyu_core.js +1 -1
  17. package/dist/wasm/docvyu_core_bg.wasm +0 -0
  18. package/dist/wasm/docvyu_core_bg.wasm.d.ts +0 -56
  19. package/package.json +2 -2
  20. package/wasm/docvyu_core.d.ts +8 -182
  21. package/wasm/docvyu_core.js +1297 -200
  22. package/wasm/docvyu_core_bg.wasm +0 -0
  23. package/wasm/docvyu_core_bg.wasm.d.ts +0 -56
  24. package/dist/cjs/DocvyuEditor-CwMF2qhs.js +0 -1
  25. package/dist/esm/DocvyuEditor-CCAFPhSl.js +0 -1
  26. package/dist/types/app/DocvyuApp.test.d.ts +0 -1
  27. package/dist/types/app/styles.d.ts +0 -10
  28. package/dist/types/app/template.d.ts +0 -9
  29. package/dist/types/core/DocvyuEditor.test.d.ts +0 -4
  30. package/dist/types/i18n/I18nManager.test.d.ts +0 -4
  31. package/dist/types/license/LicenseManager.test.d.ts +0 -4
  32. package/dist/wasm/docuweave_core.d.ts +0 -207
  33. package/dist/wasm/docuweave_core.js +0 -988
  34. package/dist/wasm/docuweave_core_bg.wasm +0 -0
  35. package/dist/wasm/docuweave_core_bg.wasm.d.ts +0 -59
@@ -7,7 +7,7 @@ heap.push(undefined, null, true, false);
7
7
  function getObject(idx) { return heap[idx]; }
8
8
 
9
9
  function debugString(val) {
10
- // primitive types
10
+
11
11
  const type = typeof val;
12
12
  if (type == 'number' || type == 'boolean' || val == null) {
13
13
  return `${val}`;
@@ -31,7 +31,7 @@ function debugString(val) {
31
31
  return 'Function';
32
32
  }
33
33
  }
34
- // objects
34
+
35
35
  if (Array.isArray(val)) {
36
36
  const length = val.length;
37
37
  let debug = '[';
@@ -44,30 +44,28 @@ function debugString(val) {
44
44
  debug += ']';
45
45
  return debug;
46
46
  }
47
- // Test for built-in
47
+
48
48
  const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
49
49
  let className;
50
50
  if (builtInMatches && builtInMatches.length > 1) {
51
51
  className = builtInMatches[1];
52
52
  } else {
53
- // Failed to match the standard '[object ClassName]'
53
+
54
54
  return toString.call(val);
55
55
  }
56
56
  if (className == 'Object') {
57
- // we're a user defined class or Object
58
- // JSON.stringify avoids problems with cycles, and is generally much
59
- // easier than looping through ownProperties of `val`.
57
+
60
58
  try {
61
59
  return 'Object(' + JSON.stringify(val) + ')';
62
60
  } catch (_) {
63
61
  return 'Object';
64
62
  }
65
63
  }
66
- // errors
64
+
67
65
  if (val instanceof Error) {
68
66
  return `${val.name}: ${val.message}\n${val.stack}`;
69
67
  }
70
- // TODO we could test for more things here, like `Set`s and `Map`s.
68
+
71
69
  return className;
72
70
  }
73
71
 
@@ -187,6 +185,11 @@ function isLikeNone(x) {
187
185
  return x === undefined || x === null;
188
186
  }
189
187
 
188
+ function getArrayU8FromWasm0(ptr, len) {
189
+ ptr = ptr >>> 0;
190
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
191
+ }
192
+
190
193
  function dropObject(idx) {
191
194
  if (idx < 132) return;
192
195
  heap[idx] = heap_next;
@@ -199,21 +202,27 @@ function takeObject(idx) {
199
202
  return ret;
200
203
  }
201
204
 
202
- function getArrayU8FromWasm0(ptr, len) {
203
- ptr = ptr >>> 0;
204
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
205
- }
206
-
207
205
  function passArray8ToWasm0(arg, malloc) {
208
206
  const ptr = malloc(arg.length * 1, 1) >>> 0;
209
207
  getUint8ArrayMemory0().set(arg, ptr / 1);
210
208
  WASM_VECTOR_LEN = arg.length;
211
209
  return ptr;
212
210
  }
213
- /**
214
- * Unit for ruler display
215
- * @enum {0 | 1}
216
- */
211
+
212
+ let cachedInt32ArrayMemory0 = null;
213
+
214
+ function getInt32ArrayMemory0() {
215
+ if (cachedInt32ArrayMemory0 === null || cachedInt32ArrayMemory0.byteLength === 0) {
216
+ cachedInt32ArrayMemory0 = new Int32Array(wasm.memory.buffer);
217
+ }
218
+ return cachedInt32ArrayMemory0;
219
+ }
220
+
221
+ function getArrayI32FromWasm0(ptr, len) {
222
+ ptr = ptr >>> 0;
223
+ return getInt32ArrayMemory0().subarray(ptr / 4, ptr / 4 + len);
224
+ }
225
+
217
226
  export const RulerUnit = Object.freeze({
218
227
  Centimeters: 0, "0": "Centimeters",
219
228
  Inches: 1, "1": "Inches",
@@ -236,27 +245,93 @@ export class Editor {
236
245
  const ptr = this.__destroy_into_raw();
237
246
  wasm.__wbg_editor_free(ptr, 0);
238
247
  }
239
- /**
240
- * @param {boolean} enable
241
- */
248
+
249
+ paste_text(text) {
250
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
251
+ const len0 = WASM_VECTOR_LEN;
252
+ wasm.editor_paste_text(this.__wbg_ptr, ptr0, len0);
253
+ }
254
+
255
+ redo_count() {
256
+ const ret = wasm.editor_redo_count(this.__wbg_ptr);
257
+ return ret >>> 0;
258
+ }
259
+
260
+ select_all() {
261
+ wasm.editor_select_all(this.__wbg_ptr);
262
+ }
263
+
242
264
  set_italic(enable) {
243
265
  wasm.editor_set_italic(this.__wbg_ptr, enable);
244
266
  }
245
- /**
246
- * @param {string} key
247
- */
267
+
268
+ undo_count() {
269
+ const ret = wasm.editor_undo_count(this.__wbg_ptr);
270
+ return ret >>> 0;
271
+ }
272
+
273
+ has_columns() {
274
+ const ret = wasm.editor_has_columns(this.__wbg_ptr);
275
+ return ret !== 0;
276
+ }
277
+
278
+ has_footers() {
279
+ const ret = wasm.editor_has_footers(this.__wbg_ptr);
280
+ return ret !== 0;
281
+ }
282
+
283
+ has_headers() {
284
+ const ret = wasm.editor_has_headers(this.__wbg_ptr);
285
+ return ret !== 0;
286
+ }
287
+
248
288
  on_key_down(key) {
249
289
  const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export, wasm.__wbindgen_export2);
250
290
  const len0 = WASM_VECTOR_LEN;
251
291
  wasm.editor_on_key_down(this.__wbg_ptr, ptr0, len0);
252
292
  }
293
+
294
+ replace_all(replacement) {
295
+ const ptr0 = passStringToWasm0(replacement, wasm.__wbindgen_export, wasm.__wbindgen_export2);
296
+ const len0 = WASM_VECTOR_LEN;
297
+ const ret = wasm.editor_replace_all(this.__wbg_ptr, ptr0, len0);
298
+ return ret >>> 0;
299
+ }
253
300
  select_word() {
254
301
  wasm.editor_select_word(this.__wbg_ptr);
255
302
  }
256
- /**
257
- * Get current page size name (or "custom" if not matching any preset)
258
- * @returns {string}
259
- */
303
+
304
+ clear_search() {
305
+ wasm.editor_clear_search(this.__wbg_ptr);
306
+ }
307
+
308
+ has_bookmark(name) {
309
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
310
+ const len0 = WASM_VECTOR_LEN;
311
+ const ret = wasm.editor_has_bookmark(this.__wbg_ptr, ptr0, len0);
312
+ return ret !== 0;
313
+ }
314
+
315
+ insert_image(data, width, height, name) {
316
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
317
+ const len0 = WASM_VECTOR_LEN;
318
+ const ptr1 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
319
+ const len1 = WASM_VECTOR_LEN;
320
+ wasm.editor_insert_image(this.__wbg_ptr, ptr0, len0, width, height, ptr1, len1);
321
+ }
322
+
323
+ insert_table(rows, cols) {
324
+ wasm.editor_insert_table(this.__wbg_ptr, rows, cols);
325
+ }
326
+
327
+ set_viewport(y, height) {
328
+ wasm.editor_set_viewport(this.__wbg_ptr, y, height);
329
+ }
330
+
331
+ find_previous() {
332
+ wasm.editor_find_previous(this.__wbg_ptr);
333
+ }
334
+
260
335
  get_page_size() {
261
336
  let deferred1_0;
262
337
  let deferred1_1;
@@ -273,24 +348,46 @@ export class Editor {
273
348
  wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
274
349
  }
275
350
  }
276
- /**
277
- * Check if the current paragraph has any numbering
278
- * @returns {boolean}
279
- */
351
+
352
+ get_watermark() {
353
+ const ret = wasm.editor_get_watermark(this.__wbg_ptr);
354
+ return ret !== 0;
355
+ }
356
+
280
357
  has_numbering() {
281
358
  const ret = wasm.editor_has_numbering(this.__wbg_ptr);
282
359
  return ret !== 0;
283
360
  }
284
- /**
285
- * @param {number} click_x
286
- * @param {number} click_y
287
- */
361
+
362
+ insert_footer() {
363
+ wasm.editor_insert_footer(this.__wbg_ptr);
364
+ }
365
+
366
+ insert_header() {
367
+ wasm.editor_insert_header(this.__wbg_ptr);
368
+ }
369
+
370
+ on_ctrl_click(click_x, click_y) {
371
+ let deferred1_0;
372
+ let deferred1_1;
373
+ try {
374
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
375
+ wasm.editor_on_ctrl_click(retptr, this.__wbg_ptr, click_x, click_y);
376
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
377
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
378
+ deferred1_0 = r0;
379
+ deferred1_1 = r1;
380
+ return getStringFromWasm0(r0, r1);
381
+ } finally {
382
+ wasm.__wbindgen_add_to_stack_pointer(16);
383
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
384
+ }
385
+ }
386
+
288
387
  on_mouse_drag(click_x, click_y) {
289
388
  wasm.editor_on_mouse_drag(this.__wbg_ptr, click_x, click_y);
290
389
  }
291
- /**
292
- * @returns {Uint8Array}
293
- */
390
+
294
391
  save_document() {
295
392
  try {
296
393
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -309,91 +406,229 @@ export class Editor {
309
406
  wasm.__wbindgen_add_to_stack_pointer(16);
310
407
  }
311
408
  }
312
- /**
313
- * @param {number} size
314
- */
409
+
315
410
  set_font_size(size) {
316
411
  wasm.editor_set_font_size(this.__wbg_ptr, size);
317
412
  }
318
- /**
319
- * Set page size using predefined sizes
320
- * Sizes: "letter", "legal", "a4", "a5", "b5"
321
- * @param {string} size_name
322
- */
413
+
323
414
  set_page_size(size_name) {
324
415
  const ptr0 = passStringToWasm0(size_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
325
416
  const len0 = WASM_VECTOR_LEN;
326
417
  wasm.editor_set_page_size(this.__wbg_ptr, ptr0, len0);
327
418
  }
328
- /**
329
- * @param {boolean} enable
330
- */
419
+
331
420
  set_underline(enable) {
332
421
  wasm.editor_set_underline(this.__wbg_ptr, enable);
333
422
  }
334
- /**
335
- * Get current ruler unit
336
- * @returns {RulerUnit}
337
- */
423
+
424
+ set_watermark(show) {
425
+ wasm.editor_set_watermark(this.__wbg_ptr, show);
426
+ }
427
+
428
+ end_image_drag() {
429
+ wasm.editor_end_image_drag(this.__wbg_ptr);
430
+ }
431
+
432
+ get_comment_id(index) {
433
+ const ret = wasm.editor_get_comment_id(this.__wbg_ptr, index);
434
+ return ret === 0x100000001 ? undefined : ret;
435
+ }
436
+
437
+ get_list_level() {
438
+ const ret = wasm.editor_get_list_level(this.__wbg_ptr);
439
+ return ret;
440
+ }
441
+
442
+ get_page_count() {
443
+ const ret = wasm.editor_get_page_count(this.__wbg_ptr);
444
+ return ret;
445
+ }
446
+
338
447
  get_ruler_unit() {
339
448
  const ret = wasm.editor_get_ruler_unit(this.__wbg_ptr);
340
449
  return ret;
341
450
  }
342
- /**
343
- * @param {number} click_x
344
- * @param {number} click_y
345
- */
451
+
452
+ insert_comment(author, text) {
453
+ const ptr0 = passStringToWasm0(author, wasm.__wbindgen_export, wasm.__wbindgen_export2);
454
+ const len0 = WASM_VECTOR_LEN;
455
+ const ptr1 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
456
+ const len1 = WASM_VECTOR_LEN;
457
+ wasm.editor_insert_comment(this.__wbg_ptr, ptr0, len0, ptr1, len1);
458
+ }
459
+
346
460
  on_mouse_click(click_x, click_y) {
347
461
  wasm.editor_on_mouse_click(this.__wbg_ptr, click_x, click_y);
348
462
  }
349
- /**
350
- * @param {string} color
351
- */
463
+
352
464
  set_font_color(color) {
353
465
  const ptr0 = passStringToWasm0(color, wasm.__wbindgen_export, wasm.__wbindgen_export2);
354
466
  const len0 = WASM_VECTOR_LEN;
355
467
  wasm.editor_set_font_color(this.__wbg_ptr, ptr0, len0);
356
468
  }
357
- /**
358
- * Set ruler unit (centimeters or inches)
359
- * @param {RulerUnit} unit
360
- */
469
+
361
470
  set_ruler_unit(unit) {
362
471
  wasm.editor_set_ruler_unit(this.__wbg_ptr, unit);
363
472
  }
364
- /**
365
- * Check if the current paragraph has bullet list numbering
366
- * @returns {boolean}
367
- */
473
+
474
+ accept_revision(revision_id) {
475
+ wasm.editor_accept_revision(this.__wbg_ptr, revision_id);
476
+ }
477
+
368
478
  has_bullet_list() {
369
479
  const ret = wasm.editor_has_bullet_list(this.__wbg_ptr);
370
480
  return ret !== 0;
371
481
  }
482
+
483
+ insert_bookmark(name) {
484
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
485
+ const len0 = WASM_VECTOR_LEN;
486
+ wasm.editor_insert_bookmark(this.__wbg_ptr, ptr0, len0);
487
+ }
488
+
489
+ move_image_drag(mouse_x, mouse_y) {
490
+ wasm.editor_move_image_drag(this.__wbg_ptr, mouse_x, mouse_y);
491
+ }
492
+
493
+ reject_revision(revision_id) {
494
+ wasm.editor_reject_revision(this.__wbg_ptr, revision_id);
495
+ }
496
+
497
+ replace_current(replacement) {
498
+ const ptr0 = passStringToWasm0(replacement, wasm.__wbindgen_export, wasm.__wbindgen_export2);
499
+ const len0 = WASM_VECTOR_LEN;
500
+ const ret = wasm.editor_replace_current(this.__wbg_ptr, ptr0, len0);
501
+ return ret >>> 0;
502
+ }
372
503
  reset_font_size() {
373
504
  wasm.editor_reset_font_size(this.__wbg_ptr);
374
505
  }
506
+
507
+ select_bookmark(name) {
508
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
509
+ const len0 = WASM_VECTOR_LEN;
510
+ const ret = wasm.editor_select_bookmark(this.__wbg_ptr, ptr0, len0);
511
+ return ret !== 0;
512
+ }
375
513
  select_document() {
376
514
  wasm.editor_select_document(this.__wbg_ptr);
377
515
  }
378
- /**
379
- * Set bullet list for the current selection or cursor position
380
- * Uses num_id=101 by convention for bullet lists
381
- * @param {boolean} enable
382
- */
516
+
383
517
  set_bullet_list(enable) {
384
518
  wasm.editor_set_bullet_list(this.__wbg_ptr, enable);
385
519
  }
386
- /**
387
- * @param {string} family
388
- */
520
+
389
521
  set_font_family(family) {
390
522
  const ptr0 = passStringToWasm0(family, wasm.__wbindgen_export, wasm.__wbindgen_export2);
391
523
  const len0 = WASM_VECTOR_LEN;
392
524
  wasm.editor_set_font_family(this.__wbg_ptr, ptr0, len0);
393
525
  }
394
- /**
395
- * Remove numbering from the current selection or cursor position
396
- */
526
+
527
+ get_column_count() {
528
+ const ret = wasm.editor_get_column_count(this.__wbg_ptr);
529
+ return ret >>> 0;
530
+ }
531
+
532
+ get_comment_date(index) {
533
+ try {
534
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
535
+ wasm.editor_get_comment_date(retptr, this.__wbg_ptr, index);
536
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
537
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
538
+ let v1;
539
+ if (r0 !== 0) {
540
+ v1 = getStringFromWasm0(r0, r1).slice();
541
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
542
+ }
543
+ return v1;
544
+ } finally {
545
+ wasm.__wbindgen_add_to_stack_pointer(16);
546
+ }
547
+ }
548
+
549
+ get_comment_text(index) {
550
+ try {
551
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
552
+ wasm.editor_get_comment_text(retptr, this.__wbg_ptr, index);
553
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
554
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
555
+ let v1;
556
+ if (r0 !== 0) {
557
+ v1 = getStringFromWasm0(r0, r1).slice();
558
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
559
+ }
560
+ return v1;
561
+ } finally {
562
+ wasm.__wbindgen_add_to_stack_pointer(16);
563
+ }
564
+ }
565
+
566
+ get_current_page() {
567
+ const ret = wasm.editor_get_current_page(this.__wbg_ptr);
568
+ return ret;
569
+ }
570
+
571
+ get_edit_context() {
572
+ let deferred1_0;
573
+ let deferred1_1;
574
+ try {
575
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
576
+ wasm.editor_get_edit_context(retptr, this.__wbg_ptr);
577
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
578
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
579
+ deferred1_0 = r0;
580
+ deferred1_1 = r1;
581
+ return getStringFromWasm0(r0, r1);
582
+ } finally {
583
+ wasm.__wbindgen_add_to_stack_pointer(16);
584
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
585
+ }
586
+ }
587
+
588
+ get_list_formats() {
589
+ let deferred1_0;
590
+ let deferred1_1;
591
+ try {
592
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
593
+ wasm.editor_get_list_formats(retptr, this.__wbg_ptr);
594
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
595
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
596
+ deferred1_0 = r0;
597
+ deferred1_1 = r1;
598
+ return getStringFromWasm0(r0, r1);
599
+ } finally {
600
+ wasm.__wbindgen_add_to_stack_pointer(16);
601
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
602
+ }
603
+ }
604
+
605
+ get_search_query() {
606
+ let deferred1_0;
607
+ let deferred1_1;
608
+ try {
609
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
610
+ wasm.editor_get_search_query(retptr, this.__wbg_ptr);
611
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
612
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
613
+ deferred1_0 = r0;
614
+ deferred1_1 = r1;
615
+ return getStringFromWasm0(r0, r1);
616
+ } finally {
617
+ wasm.__wbindgen_add_to_stack_pointer(16);
618
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
619
+ }
620
+ }
621
+
622
+ has_outline_list() {
623
+ const ret = wasm.editor_has_outline_list(this.__wbg_ptr);
624
+ return ret !== 0;
625
+ }
626
+
627
+ is_search_active() {
628
+ const ret = wasm.editor_is_search_active(this.__wbg_ptr);
629
+ return ret !== 0;
630
+ }
631
+
397
632
  remove_numbering() {
398
633
  wasm.editor_remove_numbering(this.__wbg_ptr);
399
634
  }
@@ -403,92 +638,675 @@ export class Editor {
403
638
  select_paragraph() {
404
639
  wasm.editor_select_paragraph(this.__wbg_ptr);
405
640
  }
406
- /**
407
- * @param {number} left
408
- * @param {number} right
409
- * @param {number} top
410
- * @param {number} bottom
411
- */
641
+
642
+ set_column_count(count) {
643
+ wasm.editor_set_column_count(this.__wbg_ptr, count);
644
+ }
645
+
646
+ set_outline_list(enable) {
647
+ wasm.editor_set_outline_list(this.__wbg_ptr, enable);
648
+ }
649
+
412
650
  set_page_margins(left, right, top, bottom) {
413
651
  wasm.editor_set_page_margins(this.__wbg_ptr, left, right, top, bottom);
414
652
  }
415
- /**
416
- * Check if the current paragraph has numbered list numbering (not bullet)
417
- * @returns {boolean}
418
- */
653
+
654
+ start_image_drag(click_x, click_y) {
655
+ const ret = wasm.editor_start_image_drag(this.__wbg_ptr, click_x, click_y);
656
+ return ret !== 0;
657
+ }
658
+
659
+ generate_toc_json() {
660
+ let deferred1_0;
661
+ let deferred1_1;
662
+ try {
663
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
664
+ wasm.editor_generate_toc_json(retptr, this.__wbg_ptr);
665
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
666
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
667
+ deferred1_0 = r0;
668
+ deferred1_1 = r1;
669
+ return getStringFromWasm0(r0, r1);
670
+ } finally {
671
+ wasm.__wbindgen_add_to_stack_pointer(16);
672
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
673
+ }
674
+ }
675
+
676
+ get_bookmark_text(name) {
677
+ try {
678
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
679
+ const ptr0 = passStringToWasm0(name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
680
+ const len0 = WASM_VECTOR_LEN;
681
+ wasm.editor_get_bookmark_text(retptr, this.__wbg_ptr, ptr0, len0);
682
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
683
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
684
+ let v2;
685
+ if (r0 !== 0) {
686
+ v2 = getStringFromWasm0(r0, r1).slice();
687
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
688
+ }
689
+ return v2;
690
+ } finally {
691
+ wasm.__wbindgen_add_to_stack_pointer(16);
692
+ }
693
+ }
694
+
695
+ get_comment_count() {
696
+ const ret = wasm.editor_get_comment_count(this.__wbg_ptr);
697
+ return ret >>> 0;
698
+ }
699
+
700
+ get_cursor_format() {
701
+ const ret = wasm.editor_get_cursor_format(this.__wbg_ptr);
702
+ return RunFormat.__wrap(ret);
703
+ }
704
+
705
+ get_image_float_x() {
706
+ const ret = wasm.editor_get_image_float_x(this.__wbg_ptr);
707
+ return ret;
708
+ }
709
+
710
+ get_image_float_y() {
711
+ const ret = wasm.editor_get_image_float_y(this.__wbg_ptr);
712
+ return ret;
713
+ }
714
+
715
+ get_selected_text() {
716
+ let deferred1_0;
717
+ let deferred1_1;
718
+ try {
719
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
720
+ wasm.editor_get_selected_text(retptr, this.__wbg_ptr);
721
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
722
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
723
+ deferred1_0 = r0;
724
+ deferred1_1 = r1;
725
+ return getStringFromWasm0(r0, r1);
726
+ } finally {
727
+ wasm.__wbindgen_add_to_stack_pointer(16);
728
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
729
+ }
730
+ }
731
+
419
732
  has_numbered_list() {
420
733
  const ret = wasm.editor_has_numbered_list(this.__wbg_ptr);
421
734
  return ret !== 0;
422
735
  }
736
+
737
+ is_dragging_image() {
738
+ const ret = wasm.editor_is_dragging_image(this.__wbg_ptr);
739
+ return ret !== 0;
740
+ }
741
+
742
+ is_editing_footer() {
743
+ const ret = wasm.editor_is_editing_footer(this.__wbg_ptr);
744
+ return ret !== 0;
745
+ }
746
+
747
+ is_editing_header() {
748
+ const ret = wasm.editor_is_editing_header(this.__wbg_ptr);
749
+ return ret !== 0;
750
+ }
751
+
752
+ is_image_floating() {
753
+ const ret = wasm.editor_is_image_floating(this.__wbg_ptr);
754
+ return ret !== 0;
755
+ }
423
756
  reset_font_family() {
424
757
  wasm.editor_reset_font_family(this.__wbg_ptr);
425
758
  }
426
- /**
427
- * Set numbered list for the current selection or cursor position
428
- * Uses num_id=102 by convention for numbered lists (1.)
429
- * @param {boolean} enable
430
- */
759
+
431
760
  set_numbered_list(enable) {
432
761
  wasm.editor_set_numbered_list(this.__wbg_ptr, enable);
433
762
  }
434
- /**
435
- * Toggle ruler unit between centimeters and inches
436
- */
763
+
764
+ set_strikethrough(enable) {
765
+ wasm.editor_set_strikethrough(this.__wbg_ptr, enable);
766
+ }
767
+
437
768
  toggle_ruler_unit() {
438
769
  wasm.editor_toggle_ruler_unit(this.__wbg_ptr);
439
770
  }
440
- /**
441
- * @param {boolean} visible
442
- */
443
- set_cursor_visible(visible) {
444
- wasm.editor_set_cursor_visible(this.__wbg_ptr, visible);
771
+
772
+ clear_undo_history() {
773
+ wasm.editor_clear_undo_history(this.__wbg_ptr);
774
+ }
775
+
776
+ get_bookmark_count() {
777
+ const ret = wasm.editor_get_bookmark_count(this.__wbg_ptr);
778
+ return ret;
779
+ }
780
+
781
+ get_bookmark_names() {
782
+ let deferred1_0;
783
+ let deferred1_1;
784
+ try {
785
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
786
+ wasm.editor_get_bookmark_names(retptr, this.__wbg_ptr);
787
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
788
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
789
+ deferred1_0 = r0;
790
+ deferred1_1 = r1;
791
+ return getStringFromWasm0(r0, r1);
792
+ } finally {
793
+ wasm.__wbindgen_add_to_stack_pointer(16);
794
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
795
+ }
796
+ }
797
+
798
+ get_bookmarks_json() {
799
+ let deferred1_0;
800
+ let deferred1_1;
801
+ try {
802
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
803
+ wasm.editor_get_bookmarks_json(retptr, this.__wbg_ptr);
804
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
805
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
806
+ deferred1_0 = r0;
807
+ deferred1_1 = r1;
808
+ return getStringFromWasm0(r0, r1);
809
+ } finally {
810
+ wasm.__wbindgen_add_to_stack_pointer(16);
811
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
812
+ }
813
+ }
814
+
815
+ get_clipboard_text() {
816
+ let deferred1_0;
817
+ let deferred1_1;
818
+ try {
819
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
820
+ wasm.editor_get_clipboard_text(retptr, this.__wbg_ptr);
821
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
822
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
823
+ deferred1_0 = r0;
824
+ deferred1_1 = r1;
825
+ return getStringFromWasm0(r0, r1);
826
+ } finally {
827
+ wasm.__wbindgen_add_to_stack_pointer(16);
828
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
829
+ }
830
+ }
831
+
832
+ get_comment_author(index) {
833
+ try {
834
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
835
+ wasm.editor_get_comment_author(retptr, this.__wbg_ptr, index);
836
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
837
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
838
+ let v1;
839
+ if (r0 !== 0) {
840
+ v1 = getStringFromWasm0(r0, r1).slice();
841
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
842
+ }
843
+ return v1;
844
+ } finally {
845
+ wasm.__wbindgen_add_to_stack_pointer(16);
846
+ }
847
+ }
848
+
849
+ get_document_title() {
850
+ try {
851
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
852
+ wasm.editor_get_document_title(retptr, this.__wbg_ptr);
853
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
854
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
855
+ let v1;
856
+ if (r0 !== 0) {
857
+ v1 = getStringFromWasm0(r0, r1).slice();
858
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
859
+ }
860
+ return v1;
861
+ } finally {
862
+ wasm.__wbindgen_add_to_stack_pointer(16);
863
+ }
864
+ }
865
+
866
+ get_revision_count() {
867
+ const ret = wasm.editor_get_revision_count(this.__wbg_ptr);
868
+ return ret >>> 0;
869
+ }
870
+
871
+ get_revisions_json() {
872
+ let deferred1_0;
873
+ let deferred1_1;
874
+ try {
875
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
876
+ wasm.editor_get_revisions_json(retptr, this.__wbg_ptr);
877
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
878
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
879
+ deferred1_0 = r0;
880
+ deferred1_1 = r1;
881
+ return getStringFromWasm0(r0, r1);
882
+ } finally {
883
+ wasm.__wbindgen_add_to_stack_pointer(16);
884
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
885
+ }
886
+ }
887
+
888
+ insert_page_x_of_y() {
889
+ wasm.editor_insert_page_x_of_y(this.__wbg_ptr);
890
+ }
891
+
892
+ is_cursor_on_image() {
893
+ const ret = wasm.editor_is_cursor_on_image(this.__wbg_ptr);
894
+ return ret !== 0;
895
+ }
896
+
897
+ set_clipboard_text(text) {
898
+ const ptr0 = passStringToWasm0(text, wasm.__wbindgen_export, wasm.__wbindgen_export2);
899
+ const len0 = WASM_VECTOR_LEN;
900
+ wasm.editor_set_clipboard_text(this.__wbg_ptr, ptr0, len0);
901
+ }
902
+
903
+ set_cursor_visible(visible) {
904
+ wasm.editor_set_cursor_visible(this.__wbg_ptr, visible);
905
+ }
906
+
907
+ set_document_title(title) {
908
+ const ptr0 = passStringToWasm0(title, wasm.__wbindgen_export, wasm.__wbindgen_export2);
909
+ const len0 = WASM_VECTOR_LEN;
910
+ wasm.editor_set_document_title(this.__wbg_ptr, ptr0, len0);
911
+ }
912
+
913
+ decrease_list_level() {
914
+ wasm.editor_decrease_list_level(this.__wbg_ptr);
915
+ }
916
+
917
+ get_image_wrap_mode() {
918
+ let deferred1_0;
919
+ let deferred1_1;
920
+ try {
921
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
922
+ wasm.editor_get_image_wrap_mode(retptr, this.__wbg_ptr);
923
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
924
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
925
+ deferred1_0 = r0;
926
+ deferred1_1 = r1;
927
+ return getStringFromWasm0(r0, r1);
928
+ } finally {
929
+ wasm.__wbindgen_add_to_stack_pointer(16);
930
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
931
+ }
932
+ }
933
+
934
+ get_toc_entry_count() {
935
+ const ret = wasm.editor_get_toc_entry_count(this.__wbg_ptr);
936
+ return ret;
937
+ }
938
+
939
+ increase_list_level() {
940
+ wasm.editor_increase_list_level(this.__wbg_ptr);
941
+ }
942
+
943
+ set_image_wrap_mode(mode) {
944
+ const ptr0 = passStringToWasm0(mode, wasm.__wbindgen_export, wasm.__wbindgen_export2);
945
+ const len0 = WASM_VECTOR_LEN;
946
+ const ret = wasm.editor_set_image_wrap_mode(this.__wbg_ptr, ptr0, len0);
947
+ return ret !== 0;
948
+ }
949
+
950
+ accept_all_revisions() {
951
+ wasm.editor_accept_all_revisions(this.__wbg_ptr);
952
+ }
953
+
954
+ calculate_word_count() {
955
+ const ret = wasm.editor_calculate_word_count(this.__wbg_ptr);
956
+ return ret;
957
+ }
958
+
959
+ enter_footer_editing() {
960
+ wasm.editor_enter_footer_editing(this.__wbg_ptr);
961
+ }
962
+
963
+ enter_header_editing() {
964
+ wasm.editor_enter_header_editing(this.__wbg_ptr);
965
+ }
966
+
967
+ get_available_styles() {
968
+ let deferred1_0;
969
+ let deferred1_1;
970
+ try {
971
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
972
+ wasm.editor_get_available_styles(retptr, this.__wbg_ptr);
973
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
974
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
975
+ deferred1_0 = r0;
976
+ deferred1_1 = r1;
977
+ return getStringFromWasm0(r0, r1);
978
+ } finally {
979
+ wasm.__wbindgen_add_to_stack_pointer(16);
980
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
981
+ }
982
+ }
983
+
984
+ get_comment_initials(index) {
985
+ try {
986
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
987
+ wasm.editor_get_comment_initials(retptr, this.__wbg_ptr, index);
988
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
989
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
990
+ let v1;
991
+ if (r0 !== 0) {
992
+ v1 = getStringFromWasm0(r0, r1).slice();
993
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
994
+ }
995
+ return v1;
996
+ } finally {
997
+ wasm.__wbindgen_add_to_stack_pointer(16);
998
+ }
999
+ }
1000
+
1001
+ get_document_creator() {
1002
+ try {
1003
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1004
+ wasm.editor_get_document_creator(retptr, this.__wbg_ptr);
1005
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1006
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1007
+ let v1;
1008
+ if (r0 !== 0) {
1009
+ v1 = getStringFromWasm0(r0, r1).slice();
1010
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1011
+ }
1012
+ return v1;
1013
+ } finally {
1014
+ wasm.__wbindgen_add_to_stack_pointer(16);
1015
+ }
1016
+ }
1017
+
1018
+ get_page_orientation() {
1019
+ let deferred1_0;
1020
+ let deferred1_1;
1021
+ try {
1022
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1023
+ wasm.editor_get_page_orientation(retptr, this.__wbg_ptr);
1024
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1025
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1026
+ deferred1_0 = r0;
1027
+ deferred1_1 = r1;
1028
+ return getStringFromWasm0(r0, r1);
1029
+ } finally {
1030
+ wasm.__wbindgen_add_to_stack_pointer(16);
1031
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
1032
+ }
1033
+ }
1034
+
1035
+ insert_section_break(break_type) {
1036
+ const ptr0 = passStringToWasm0(break_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1037
+ const len0 = WASM_VECTOR_LEN;
1038
+ wasm.editor_insert_section_break(this.__wbg_ptr, ptr0, len0);
1039
+ }
1040
+
1041
+ load_docx_and_render(data) {
1042
+ try {
1043
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1044
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
1045
+ const len0 = WASM_VECTOR_LEN;
1046
+ wasm.editor_load_docx_and_render(retptr, this.__wbg_ptr, ptr0, len0);
1047
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1048
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1049
+ if (r1) {
1050
+ throw takeObject(r0);
1051
+ }
1052
+ } finally {
1053
+ wasm.__wbindgen_add_to_stack_pointer(16);
1054
+ }
1055
+ }
1056
+
1057
+ navigate_to_bookmark(bookmark_name) {
1058
+ const ptr0 = passStringToWasm0(bookmark_name, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1059
+ const len0 = WASM_VECTOR_LEN;
1060
+ const ret = wasm.editor_navigate_to_bookmark(this.__wbg_ptr, ptr0, len0);
1061
+ return ret;
1062
+ }
1063
+
1064
+ reject_all_revisions() {
1065
+ wasm.editor_reject_all_revisions(this.__wbg_ptr);
1066
+ }
1067
+
1068
+ set_document_creator(creator) {
1069
+ const ptr0 = passStringToWasm0(creator, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1070
+ const len0 = WASM_VECTOR_LEN;
1071
+ wasm.editor_set_document_creator(this.__wbg_ptr, ptr0, len0);
1072
+ }
1073
+
1074
+ set_page_orientation(orient) {
1075
+ const ptr0 = passStringToWasm0(orient, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1076
+ const len0 = WASM_VECTOR_LEN;
1077
+ wasm.editor_set_page_orientation(this.__wbg_ptr, ptr0, len0);
1078
+ }
1079
+
1080
+ apply_paragraph_style(style_id) {
1081
+ const ptr0 = passStringToWasm0(style_id, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1082
+ const len0 = WASM_VECTOR_LEN;
1083
+ wasm.editor_apply_paragraph_style(this.__wbg_ptr, ptr0, len0);
1084
+ }
1085
+
1086
+ has_clipboard_content() {
1087
+ const ret = wasm.editor_has_clipboard_content(this.__wbg_ptr);
1088
+ return ret !== 0;
1089
+ }
1090
+
1091
+ navigate_to_toc_entry(index) {
1092
+ const ret = wasm.editor_navigate_to_toc_entry(this.__wbg_ptr, index);
1093
+ return ret !== 0;
1094
+ }
1095
+
1096
+ scale_image_at_cursor(scale) {
1097
+ const ret = wasm.editor_scale_image_at_cursor(this.__wbg_ptr, scale);
1098
+ return ret !== 0;
1099
+ }
1100
+
1101
+ selection_style_state() {
1102
+ const ret = wasm.editor_selection_style_state(this.__wbg_ptr);
1103
+ return SelectionStyleState.__wrap(ret);
1104
+ }
1105
+
1106
+ get_comments_at_cursor() {
1107
+ try {
1108
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1109
+ wasm.editor_get_comments_at_cursor(retptr, this.__wbg_ptr);
1110
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1111
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1112
+ var v1 = getArrayI32FromWasm0(r0, r1).slice();
1113
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
1114
+ return v1;
1115
+ } finally {
1116
+ wasm.__wbindgen_add_to_stack_pointer(16);
1117
+ }
1118
+ }
1119
+
1120
+ get_search_match_count() {
1121
+ const ret = wasm.editor_get_search_match_count(this.__wbg_ptr);
1122
+ return ret >>> 0;
1123
+ }
1124
+
1125
+ get_section_break_type() {
1126
+ let deferred1_0;
1127
+ let deferred1_1;
1128
+ try {
1129
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1130
+ wasm.editor_get_section_break_type(retptr, this.__wbg_ptr);
1131
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1132
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1133
+ deferred1_0 = r0;
1134
+ deferred1_1 = r1;
1135
+ return getStringFromWasm0(r0, r1);
1136
+ } finally {
1137
+ wasm.__wbindgen_add_to_stack_pointer(16);
1138
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
1139
+ }
1140
+ }
1141
+
1142
+ remove_paragraph_style() {
1143
+ wasm.editor_remove_paragraph_style(this.__wbg_ptr);
1144
+ }
1145
+
1146
+ resize_image_at_cursor(new_width, new_height) {
1147
+ const ret = wasm.editor_resize_image_at_cursor(this.__wbg_ptr, new_width, new_height);
1148
+ return ret !== 0;
1149
+ }
1150
+
1151
+ get_document_word_count() {
1152
+ const ret = wasm.editor_get_document_word_count(this.__wbg_ptr);
1153
+ return ret === 0x100000001 ? undefined : ret;
1154
+ }
1155
+
1156
+ get_numbering_format_id() {
1157
+ const ret = wasm.editor_get_numbering_format_id(this.__wbg_ptr);
1158
+ return ret === 0x100000001 ? undefined : ret;
1159
+ }
1160
+
1161
+ get_paragraph_positions() {
1162
+ let deferred1_0;
1163
+ let deferred1_1;
1164
+ try {
1165
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1166
+ wasm.editor_get_paragraph_positions(retptr, this.__wbg_ptr);
1167
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1168
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1169
+ deferred1_0 = r0;
1170
+ deferred1_1 = r1;
1171
+ return getStringFromWasm0(r0, r1);
1172
+ } finally {
1173
+ wasm.__wbindgen_add_to_stack_pointer(16);
1174
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
1175
+ }
1176
+ }
1177
+
1178
+ set_paragraph_alignment(alignment) {
1179
+ const ptr0 = passStringToWasm0(alignment, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1180
+ const len0 = WASM_VECTOR_LEN;
1181
+ wasm.editor_set_paragraph_alignment(this.__wbg_ptr, ptr0, len0);
1182
+ }
1183
+
1184
+ get_search_current_index() {
1185
+ const ret = wasm.editor_get_search_current_index(this.__wbg_ptr);
1186
+ return ret >>> 0;
1187
+ }
1188
+
1189
+ insert_page_number_field(field_type) {
1190
+ const ptr0 = passStringToWasm0(field_type, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1191
+ const len0 = WASM_VECTOR_LEN;
1192
+ wasm.editor_insert_page_number_field(this.__wbg_ptr, ptr0, len0);
1193
+ }
1194
+
1195
+ set_image_float_position(x, y) {
1196
+ const ret = wasm.editor_set_image_float_position(this.__wbg_ptr, x, y);
1197
+ return ret !== 0;
1198
+ }
1199
+
1200
+ set_numbered_list_format(format) {
1201
+ const ptr0 = passStringToWasm0(format, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1202
+ const len0 = WASM_VECTOR_LEN;
1203
+ wasm.editor_set_numbered_list_format(this.__wbg_ptr, ptr0, len0);
1204
+ }
1205
+
1206
+ calculate_character_count() {
1207
+ const ret = wasm.editor_calculate_character_count(this.__wbg_ptr);
1208
+ return ret;
1209
+ }
1210
+
1211
+ get_hyperlink_at_position(click_x, click_y) {
1212
+ let deferred1_0;
1213
+ let deferred1_1;
1214
+ try {
1215
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1216
+ wasm.editor_get_hyperlink_at_position(retptr, this.__wbg_ptr, click_x, click_y);
1217
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1218
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1219
+ deferred1_0 = r0;
1220
+ deferred1_1 = r1;
1221
+ return getStringFromWasm0(r0, r1);
1222
+ } finally {
1223
+ wasm.__wbindgen_add_to_stack_pointer(16);
1224
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
1225
+ }
1226
+ }
1227
+
1228
+ get_image_width_at_cursor() {
1229
+ const ret = wasm.editor_get_image_width_at_cursor(this.__wbg_ptr);
1230
+ return ret;
445
1231
  }
446
- /**
447
- * @param {Uint8Array} data
448
- */
449
- load_docx_and_render(data) {
450
- const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export);
451
- const len0 = WASM_VECTOR_LEN;
452
- wasm.editor_load_docx_and_render(this.__wbg_ptr, ptr0, len0);
1232
+
1233
+ exit_header_footer_editing() {
1234
+ wasm.editor_exit_header_footer_editing(this.__wbg_ptr);
453
1235
  }
454
- /**
455
- * @returns {SelectionStyleState}
456
- */
457
- selection_style_state() {
458
- const ret = wasm.editor_selection_style_state(this.__wbg_ptr);
459
- return SelectionStyleState.__wrap(ret);
1236
+
1237
+ get_column_properties_json() {
1238
+ let deferred1_0;
1239
+ let deferred1_1;
1240
+ try {
1241
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1242
+ wasm.editor_get_column_properties_json(retptr, this.__wbg_ptr);
1243
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1244
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1245
+ deferred1_0 = r0;
1246
+ deferred1_1 = r1;
1247
+ return getStringFromWasm0(r0, r1);
1248
+ } finally {
1249
+ wasm.__wbindgen_add_to_stack_pointer(16);
1250
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
1251
+ }
460
1252
  }
461
- /**
462
- * Get the current numbering format ID (101-108 for standard, or mapped from document)
463
- * @returns {number | undefined}
464
- */
465
- get_numbering_format_id() {
466
- const ret = wasm.editor_get_numbering_format_id(this.__wbg_ptr);
467
- return ret === 0x100000001 ? undefined : ret;
1253
+
1254
+ get_image_height_at_cursor() {
1255
+ const ret = wasm.editor_get_image_height_at_cursor(this.__wbg_ptr);
1256
+ return ret;
468
1257
  }
469
- /**
470
- * @param {string} alignment
471
- */
472
- set_paragraph_alignment(alignment) {
473
- const ptr0 = passStringToWasm0(alignment, wasm.__wbindgen_export, wasm.__wbindgen_export2);
474
- const len0 = WASM_VECTOR_LEN;
475
- wasm.editor_set_paragraph_alignment(this.__wbg_ptr, ptr0, len0);
1258
+
1259
+ get_current_paragraph_style() {
1260
+ try {
1261
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1262
+ wasm.editor_get_current_paragraph_style(retptr, this.__wbg_ptr);
1263
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1264
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1265
+ let v1;
1266
+ if (r0 !== 0) {
1267
+ v1 = getStringFromWasm0(r0, r1).slice();
1268
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1269
+ }
1270
+ return v1;
1271
+ } finally {
1272
+ wasm.__wbindgen_add_to_stack_pointer(16);
1273
+ }
476
1274
  }
477
- /**
478
- * Set numbered list with a specific format
479
- * Formats: "decimal" (1.), "decimal-paren" (1)), "decimal-paren-both" ((1)),
480
- * "upper-letter" (A.), "lower-letter" (a.),
481
- * "upper-roman" (I.), "lower-roman" (i.)
482
- * @param {string} format
483
- */
484
- set_numbered_list_format(format) {
485
- const ptr0 = passStringToWasm0(format, wasm.__wbindgen_export, wasm.__wbindgen_export2);
486
- const len0 = WASM_VECTOR_LEN;
487
- wasm.editor_set_numbered_list_format(this.__wbg_ptr, ptr0, len0);
1275
+
1276
+ get_document_properties_json() {
1277
+ let deferred1_0;
1278
+ let deferred1_1;
1279
+ try {
1280
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1281
+ wasm.editor_get_document_properties_json(retptr, this.__wbg_ptr);
1282
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1283
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1284
+ deferred1_0 = r0;
1285
+ deferred1_1 = r1;
1286
+ return getStringFromWasm0(r0, r1);
1287
+ } finally {
1288
+ wasm.__wbindgen_add_to_stack_pointer(16);
1289
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
1290
+ }
1291
+ }
1292
+
1293
+ cut() {
1294
+ let deferred1_0;
1295
+ let deferred1_1;
1296
+ try {
1297
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1298
+ wasm.editor_cut(retptr, this.__wbg_ptr);
1299
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1300
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1301
+ deferred1_0 = r0;
1302
+ deferred1_1 = r1;
1303
+ return getStringFromWasm0(r0, r1);
1304
+ } finally {
1305
+ wasm.__wbindgen_add_to_stack_pointer(16);
1306
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
1307
+ }
488
1308
  }
489
- /**
490
- * @param {string} canvas_id
491
- */
1309
+
492
1310
  constructor(canvas_id) {
493
1311
  try {
494
1312
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -508,42 +1326,192 @@ export class Editor {
508
1326
  wasm.__wbindgen_add_to_stack_pointer(16);
509
1327
  }
510
1328
  }
511
- /**
512
- * Zoom in by 10%
513
- */
1329
+
1330
+ copy() {
1331
+ let deferred1_0;
1332
+ let deferred1_1;
1333
+ try {
1334
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1335
+ wasm.editor_copy(retptr, this.__wbg_ptr);
1336
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1337
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1338
+ deferred1_0 = r0;
1339
+ deferred1_1 = r1;
1340
+ return getStringFromWasm0(r0, r1);
1341
+ } finally {
1342
+ wasm.__wbindgen_add_to_stack_pointer(16);
1343
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
1344
+ }
1345
+ }
1346
+
1347
+ find(query, case_sensitive) {
1348
+ const ptr0 = passStringToWasm0(query, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1349
+ const len0 = WASM_VECTOR_LEN;
1350
+ const ret = wasm.editor_find(this.__wbg_ptr, ptr0, len0, case_sensitive);
1351
+ return ret >>> 0;
1352
+ }
1353
+
1354
+ redo() {
1355
+ const ret = wasm.editor_redo(this.__wbg_ptr);
1356
+ return ret !== 0;
1357
+ }
1358
+
1359
+ undo() {
1360
+ const ret = wasm.editor_undo(this.__wbg_ptr);
1361
+ return ret !== 0;
1362
+ }
1363
+
1364
+ paste() {
1365
+ wasm.editor_paste(this.__wbg_ptr);
1366
+ }
1367
+
1368
+ render() {
1369
+ wasm.editor_render(this.__wbg_ptr);
1370
+ }
1371
+
514
1372
  zoom_in() {
515
1373
  wasm.editor_zoom_in(this.__wbg_ptr);
516
1374
  }
517
- /**
518
- * Get current zoom level (1.0 = 100%)
519
- * @returns {number}
520
- */
1375
+
1376
+ can_redo() {
1377
+ const ret = wasm.editor_can_redo(this.__wbg_ptr);
1378
+ return ret !== 0;
1379
+ }
1380
+
1381
+ can_undo() {
1382
+ const ret = wasm.editor_can_undo(this.__wbg_ptr);
1383
+ return ret !== 0;
1384
+ }
1385
+
521
1386
  get_zoom() {
522
1387
  const ret = wasm.editor_get_zoom(this.__wbg_ptr);
523
1388
  return ret;
524
1389
  }
525
- /**
526
- * @param {boolean} enable
527
- */
1390
+
528
1391
  set_bold(enable) {
529
1392
  wasm.editor_set_bold(this.__wbg_ptr, enable);
530
1393
  }
531
- /**
532
- * Set zoom level (0.25 to 4.0, i.e., 25% to 400%)
533
- * @param {number} zoom
534
- */
1394
+
535
1395
  set_zoom(zoom) {
536
1396
  wasm.editor_set_zoom(this.__wbg_ptr, zoom);
537
1397
  }
538
- /**
539
- * Zoom out by 10%
540
- */
1398
+
541
1399
  zoom_out() {
542
1400
  wasm.editor_zoom_out(this.__wbg_ptr);
543
1401
  }
1402
+
1403
+ find_next() {
1404
+ wasm.editor_find_next(this.__wbg_ptr);
1405
+ }
544
1406
  }
545
1407
  if (Symbol.dispose) Editor.prototype[Symbol.dispose] = Editor.prototype.free;
546
1408
 
1409
+ const RunFormatFinalization = (typeof FinalizationRegistry === 'undefined')
1410
+ ? { register: () => {}, unregister: () => {} }
1411
+ : new FinalizationRegistry(ptr => wasm.__wbg_runformat_free(ptr >>> 0, 1));
1412
+
1413
+ export class RunFormat {
1414
+
1415
+ static __wrap(ptr) {
1416
+ ptr = ptr >>> 0;
1417
+ const obj = Object.create(RunFormat.prototype);
1418
+ obj.__wbg_ptr = ptr;
1419
+ RunFormatFinalization.register(obj, obj.__wbg_ptr, obj);
1420
+ return obj;
1421
+ }
1422
+
1423
+ __destroy_into_raw() {
1424
+ const ptr = this.__wbg_ptr;
1425
+ this.__wbg_ptr = 0;
1426
+ RunFormatFinalization.unregister(this);
1427
+ return ptr;
1428
+ }
1429
+
1430
+ free() {
1431
+ const ptr = this.__destroy_into_raw();
1432
+ wasm.__wbg_runformat_free(ptr, 0);
1433
+ }
1434
+
1435
+ font_color() {
1436
+ try {
1437
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1438
+ wasm.runformat_font_color(retptr, this.__wbg_ptr);
1439
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1440
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1441
+ let v1;
1442
+ if (r0 !== 0) {
1443
+ v1 = getStringFromWasm0(r0, r1).slice();
1444
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1445
+ }
1446
+ return v1;
1447
+ } finally {
1448
+ wasm.__wbindgen_add_to_stack_pointer(16);
1449
+ }
1450
+ }
1451
+
1452
+ font_family() {
1453
+ try {
1454
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1455
+ wasm.runformat_font_family(retptr, this.__wbg_ptr);
1456
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1457
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1458
+ let v1;
1459
+ if (r0 !== 0) {
1460
+ v1 = getStringFromWasm0(r0, r1).slice();
1461
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1462
+ }
1463
+ return v1;
1464
+ } finally {
1465
+ wasm.__wbindgen_add_to_stack_pointer(16);
1466
+ }
1467
+ }
1468
+
1469
+ paragraph_alignment() {
1470
+ try {
1471
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1472
+ wasm.runformat_paragraph_alignment(retptr, this.__wbg_ptr);
1473
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1474
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1475
+ let v1;
1476
+ if (r0 !== 0) {
1477
+ v1 = getStringFromWasm0(r0, r1).slice();
1478
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
1479
+ }
1480
+ return v1;
1481
+ } finally {
1482
+ wasm.__wbindgen_add_to_stack_pointer(16);
1483
+ }
1484
+ }
1485
+
1486
+ bold() {
1487
+ const ret = wasm.runformat_bold(this.__wbg_ptr);
1488
+ return ret !== 0;
1489
+ }
1490
+
1491
+ italic() {
1492
+ const ret = wasm.runformat_italic(this.__wbg_ptr);
1493
+ return ret !== 0;
1494
+ }
1495
+
1496
+ font_size() {
1497
+ try {
1498
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1499
+ wasm.runformat_font_size(retptr, this.__wbg_ptr);
1500
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1501
+ var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
1502
+ return r0 === 0 ? undefined : r2;
1503
+ } finally {
1504
+ wasm.__wbindgen_add_to_stack_pointer(16);
1505
+ }
1506
+ }
1507
+
1508
+ underline() {
1509
+ const ret = wasm.runformat_underline(this.__wbg_ptr);
1510
+ return ret !== 0;
1511
+ }
1512
+ }
1513
+ if (Symbol.dispose) RunFormat.prototype[Symbol.dispose] = RunFormat.prototype.free;
1514
+
547
1515
  const SelectionStyleStateFinalization = (typeof FinalizationRegistry === 'undefined')
548
1516
  ? { register: () => {}, unregister: () => {} }
549
1517
  : new FinalizationRegistry(ptr => wasm.__wbg_selectionstylestate_free(ptr >>> 0, 1));
@@ -569,9 +1537,7 @@ export class SelectionStyleState {
569
1537
  const ptr = this.__destroy_into_raw();
570
1538
  wasm.__wbg_selectionstylestate_free(ptr, 0);
571
1539
  }
572
- /**
573
- * @returns {string | undefined}
574
- */
1540
+
575
1541
  font_color() {
576
1542
  try {
577
1543
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -588,23 +1554,27 @@ export class SelectionStyleState {
588
1554
  wasm.__wbindgen_add_to_stack_pointer(16);
589
1555
  }
590
1556
  }
591
- /**
592
- * @returns {boolean}
593
- */
1557
+
594
1558
  italic_all() {
595
- const ret = wasm.selectionstylestate_italic_all(this.__wbg_ptr);
1559
+ const ret = wasm.runformat_underline(this.__wbg_ptr);
596
1560
  return ret !== 0;
597
1561
  }
598
- /**
599
- * @returns {boolean}
600
- */
1562
+
601
1563
  italic_any() {
602
1564
  const ret = wasm.selectionstylestate_italic_any(this.__wbg_ptr);
603
1565
  return ret !== 0;
604
1566
  }
605
- /**
606
- * @returns {string | undefined}
607
- */
1567
+
1568
+ strike_all() {
1569
+ const ret = wasm.selectionstylestate_strike_all(this.__wbg_ptr);
1570
+ return ret !== 0;
1571
+ }
1572
+
1573
+ strike_any() {
1574
+ const ret = wasm.selectionstylestate_strike_any(this.__wbg_ptr);
1575
+ return ret !== 0;
1576
+ }
1577
+
608
1578
  font_family() {
609
1579
  try {
610
1580
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -621,23 +1591,17 @@ export class SelectionStyleState {
621
1591
  wasm.__wbindgen_add_to_stack_pointer(16);
622
1592
  }
623
1593
  }
624
- /**
625
- * @returns {boolean}
626
- */
1594
+
627
1595
  underline_all() {
628
1596
  const ret = wasm.selectionstylestate_underline_all(this.__wbg_ptr);
629
1597
  return ret !== 0;
630
1598
  }
631
- /**
632
- * @returns {boolean}
633
- */
1599
+
634
1600
  underline_any() {
635
1601
  const ret = wasm.selectionstylestate_underline_any(this.__wbg_ptr);
636
1602
  return ret !== 0;
637
1603
  }
638
- /**
639
- * @returns {string | undefined}
640
- */
1604
+
641
1605
  paragraph_alignment() {
642
1606
  try {
643
1607
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -654,27 +1618,21 @@ export class SelectionStyleState {
654
1618
  wasm.__wbindgen_add_to_stack_pointer(16);
655
1619
  }
656
1620
  }
657
- /**
658
- * @returns {boolean}
659
- */
1621
+
660
1622
  bold_all() {
661
- const ret = wasm.selectionstylestate_bold_all(this.__wbg_ptr);
1623
+ const ret = wasm.runformat_bold(this.__wbg_ptr);
662
1624
  return ret !== 0;
663
1625
  }
664
- /**
665
- * @returns {boolean}
666
- */
1626
+
667
1627
  bold_any() {
668
- const ret = wasm.selectionstylestate_bold_any(this.__wbg_ptr);
1628
+ const ret = wasm.runformat_italic(this.__wbg_ptr);
669
1629
  return ret !== 0;
670
1630
  }
671
- /**
672
- * @returns {number | undefined}
673
- */
1631
+
674
1632
  font_size() {
675
1633
  try {
676
1634
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
677
- wasm.selectionstylestate_font_size(retptr, this.__wbg_ptr);
1635
+ wasm.runformat_font_size(retptr, this.__wbg_ptr);
678
1636
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
679
1637
  var r2 = getDataViewMemory0().getFloat64(retptr + 8 * 1, true);
680
1638
  return r0 === 0 ? undefined : r2;
@@ -740,6 +1698,10 @@ function __wbg_get_imports() {
740
1698
  imports.wbg.__wbg_beginPath_ae4169e263573dcd = function(arg0) {
741
1699
  getObject(arg0).beginPath();
742
1700
  };
1701
+ imports.wbg.__wbg_buffer_ccc4520b36d3ccf4 = function(arg0) {
1702
+ const ret = getObject(arg0).buffer;
1703
+ return addHeapObject(ret);
1704
+ };
743
1705
  imports.wbg.__wbg_call_e762c39fa8ea36bf = function() { return handleError(function (arg0, arg1) {
744
1706
  const ret = getObject(arg0).call(getObject(arg1));
745
1707
  return addHeapObject(ret);
@@ -754,10 +1716,28 @@ function __wbg_get_imports() {
754
1716
  imports.wbg.__wbg_clip_7858b458fb895725 = function(arg0) {
755
1717
  getObject(arg0).clip();
756
1718
  };
1719
+ imports.wbg.__wbg_complete_450e82d9a00190b2 = function(arg0) {
1720
+ const ret = getObject(arg0).complete;
1721
+ return ret;
1722
+ };
1723
+ imports.wbg.__wbg_createElement_964ab674a0176cd8 = function() { return handleError(function (arg0, arg1, arg2) {
1724
+ const ret = getObject(arg0).createElement(getStringFromWasm0(arg1, arg2));
1725
+ return addHeapObject(ret);
1726
+ }, arguments) };
1727
+ imports.wbg.__wbg_createObjectURL_6c6dec873acec30b = function() { return handleError(function (arg0, arg1) {
1728
+ const ret = URL.createObjectURL(getObject(arg1));
1729
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1730
+ const len1 = WASM_VECTOR_LEN;
1731
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1732
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1733
+ }, arguments) };
757
1734
  imports.wbg.__wbg_document_725ae06eb442a6db = function(arg0) {
758
1735
  const ret = getObject(arg0).document;
759
1736
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
760
1737
  };
1738
+ imports.wbg.__wbg_drawImage_fd72d17e2c1a11b2 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5) {
1739
+ getObject(arg0).drawImage(getObject(arg1), arg2, arg3, arg4, arg5);
1740
+ }, arguments) };
761
1741
  imports.wbg.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
762
1742
  let deferred0_0;
763
1743
  let deferred0_1;
@@ -779,10 +1759,30 @@ function __wbg_get_imports() {
779
1759
  const ret = getObject(arg0).getContext(getStringFromWasm0(arg1, arg2));
780
1760
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
781
1761
  }, arguments) };
1762
+ imports.wbg.__wbg_getDate_5a70d2f6a482d99f = function(arg0) {
1763
+ const ret = getObject(arg0).getDate();
1764
+ return ret;
1765
+ };
782
1766
  imports.wbg.__wbg_getElementById_c365dd703c4a88c3 = function(arg0, arg1, arg2) {
783
1767
  const ret = getObject(arg0).getElementById(getStringFromWasm0(arg1, arg2));
784
1768
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
785
1769
  };
1770
+ imports.wbg.__wbg_getFullYear_8240d5a15191feae = function(arg0) {
1771
+ const ret = getObject(arg0).getFullYear();
1772
+ return ret;
1773
+ };
1774
+ imports.wbg.__wbg_getHours_5e476e0b9ebc42d1 = function(arg0) {
1775
+ const ret = getObject(arg0).getHours();
1776
+ return ret;
1777
+ };
1778
+ imports.wbg.__wbg_getMinutes_c95dfb65f1ea8f02 = function(arg0) {
1779
+ const ret = getObject(arg0).getMinutes();
1780
+ return ret;
1781
+ };
1782
+ imports.wbg.__wbg_getMonth_25c1c5a601d72773 = function(arg0) {
1783
+ const ret = getObject(arg0).getMonth();
1784
+ return ret;
1785
+ };
786
1786
  imports.wbg.__wbg_height_119077665279308c = function(arg0) {
787
1787
  const ret = getObject(arg0).height;
788
1788
  return ret;
@@ -807,6 +1807,16 @@ function __wbg_get_imports() {
807
1807
  const ret = result;
808
1808
  return ret;
809
1809
  };
1810
+ imports.wbg.__wbg_instanceof_HtmlImageElement_937b06444db4464a = function(arg0) {
1811
+ let result;
1812
+ try {
1813
+ result = getObject(arg0) instanceof HTMLImageElement;
1814
+ } catch (_) {
1815
+ result = false;
1816
+ }
1817
+ const ret = result;
1818
+ return ret;
1819
+ };
810
1820
  imports.wbg.__wbg_instanceof_Window_4846dbb3de56c84c = function(arg0) {
811
1821
  let result;
812
1822
  try {
@@ -817,6 +1827,10 @@ function __wbg_get_imports() {
817
1827
  const ret = result;
818
1828
  return ret;
819
1829
  };
1830
+ imports.wbg.__wbg_length_69bca3cb64fc8748 = function(arg0) {
1831
+ const ret = getObject(arg0).length;
1832
+ return ret;
1833
+ };
820
1834
  imports.wbg.__wbg_lineTo_1e83b5f2f38f15f9 = function(arg0, arg1, arg2) {
821
1835
  getObject(arg0).lineTo(arg1, arg2);
822
1836
  };
@@ -830,14 +1844,49 @@ function __wbg_get_imports() {
830
1844
  imports.wbg.__wbg_moveTo_8064f6a508217dcd = function(arg0, arg1, arg2) {
831
1845
  getObject(arg0).moveTo(arg1, arg2);
832
1846
  };
1847
+ imports.wbg.__wbg_naturalWidth_d77aaf0a5b9c9331 = function(arg0) {
1848
+ const ret = getObject(arg0).naturalWidth;
1849
+ return ret;
1850
+ };
1851
+ imports.wbg.__wbg_new_0_f9740686d739025c = function() {
1852
+ const ret = new Date();
1853
+ return addHeapObject(ret);
1854
+ };
1855
+ imports.wbg.__wbg_new_1acc0b6eea89d040 = function() {
1856
+ const ret = new Object();
1857
+ return addHeapObject(ret);
1858
+ };
833
1859
  imports.wbg.__wbg_new_8a6f238a6ece86ea = function() {
834
1860
  const ret = new Error();
835
1861
  return addHeapObject(ret);
836
1862
  };
1863
+ imports.wbg.__wbg_new_e17d9f43105b08be = function() {
1864
+ const ret = new Array();
1865
+ return addHeapObject(ret);
1866
+ };
837
1867
  imports.wbg.__wbg_new_no_args_ee98eee5275000a4 = function(arg0, arg1) {
838
1868
  const ret = new Function(getStringFromWasm0(arg0, arg1));
839
1869
  return addHeapObject(ret);
840
1870
  };
1871
+ imports.wbg.__wbg_new_with_buffer_source_sequence_and_options_2c5945009c53b59c = function() { return handleError(function (arg0, arg1) {
1872
+ const ret = new Blob(getObject(arg0), getObject(arg1));
1873
+ return addHeapObject(ret);
1874
+ }, arguments) };
1875
+ imports.wbg.__wbg_new_with_length_01aa0dc35aa13543 = function(arg0) {
1876
+ const ret = new Uint8Array(arg0 >>> 0);
1877
+ return addHeapObject(ret);
1878
+ };
1879
+ imports.wbg.__wbg_of_288d2471f5767a12 = function(arg0, arg1) {
1880
+ const ret = Array.of(getObject(arg0), getObject(arg1));
1881
+ return addHeapObject(ret);
1882
+ };
1883
+ imports.wbg.__wbg_push_df81a39d04db858c = function(arg0, arg1) {
1884
+ const ret = getObject(arg0).push(getObject(arg1));
1885
+ return ret;
1886
+ };
1887
+ imports.wbg.__wbg_quadraticCurveTo_fc736a90d9e7a806 = function(arg0, arg1, arg2, arg3, arg4) {
1888
+ getObject(arg0).quadraticCurveTo(arg1, arg2, arg3, arg4);
1889
+ };
841
1890
  imports.wbg.__wbg_rect_d2677b1857072f26 = function(arg0, arg1, arg2, arg3, arg4) {
842
1891
  getObject(arg0).rect(arg1, arg2, arg3, arg4);
843
1892
  };
@@ -847,27 +1896,67 @@ function __wbg_get_imports() {
847
1896
  imports.wbg.__wbg_restore_9e6a0f2c35799ecd = function(arg0) {
848
1897
  getObject(arg0).restore();
849
1898
  };
1899
+ imports.wbg.__wbg_rotate_bf2fef45677b8c8c = function() { return handleError(function (arg0, arg1) {
1900
+ getObject(arg0).rotate(arg1);
1901
+ }, arguments) };
850
1902
  imports.wbg.__wbg_save_62f4925fcc246f6c = function(arg0) {
851
1903
  getObject(arg0).save();
852
1904
  };
853
1905
  imports.wbg.__wbg_scale_3871a59cbba989ce = function() { return handleError(function (arg0, arg1, arg2) {
854
1906
  getObject(arg0).scale(arg1, arg2);
855
1907
  }, arguments) };
1908
+ imports.wbg.__wbg_setLineDash_6e29ac9fc9f5947f = function() { return handleError(function (arg0, arg1) {
1909
+ getObject(arg0).setLineDash(getObject(arg1));
1910
+ }, arguments) };
1911
+ imports.wbg.__wbg_set_9e6516df7b7d0f19 = function(arg0, arg1, arg2) {
1912
+ getObject(arg0).set(getArrayU8FromWasm0(arg1, arg2));
1913
+ };
1914
+ imports.wbg.__wbg_set_c2abbebe8b9ebee1 = function() { return handleError(function (arg0, arg1, arg2) {
1915
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1916
+ return ret;
1917
+ }, arguments) };
856
1918
  imports.wbg.__wbg_set_fillStyle_c41ec913f9f22a0c = function(arg0, arg1, arg2) {
857
1919
  getObject(arg0).fillStyle = getStringFromWasm0(arg1, arg2);
858
1920
  };
859
1921
  imports.wbg.__wbg_set_font_bd9a29cab7b9db0c = function(arg0, arg1, arg2) {
860
1922
  getObject(arg0).font = getStringFromWasm0(arg1, arg2);
861
1923
  };
1924
+ imports.wbg.__wbg_set_globalAlpha_35c4e27c8e566368 = function(arg0, arg1) {
1925
+ getObject(arg0).globalAlpha = arg1;
1926
+ };
862
1927
  imports.wbg.__wbg_set_height_89110f48f7fd0817 = function(arg0, arg1) {
863
1928
  getObject(arg0).height = arg1 >>> 0;
864
1929
  };
865
1930
  imports.wbg.__wbg_set_lineWidth_4059ac6bb1d807f8 = function(arg0, arg1) {
866
1931
  getObject(arg0).lineWidth = arg1;
867
1932
  };
1933
+ imports.wbg.__wbg_set_shadowBlur_424295160fc5542a = function(arg0, arg1) {
1934
+ getObject(arg0).shadowBlur = arg1;
1935
+ };
1936
+ imports.wbg.__wbg_set_shadowColor_9e56faa631b0ef76 = function(arg0, arg1, arg2) {
1937
+ getObject(arg0).shadowColor = getStringFromWasm0(arg1, arg2);
1938
+ };
1939
+ imports.wbg.__wbg_set_shadowOffsetX_d11ca3cc4d1f799a = function(arg0, arg1) {
1940
+ getObject(arg0).shadowOffsetX = arg1;
1941
+ };
1942
+ imports.wbg.__wbg_set_shadowOffsetY_9e3fd6acca3f31b0 = function(arg0, arg1) {
1943
+ getObject(arg0).shadowOffsetY = arg1;
1944
+ };
1945
+ imports.wbg.__wbg_set_src_d837fb52361d91b5 = function(arg0, arg1, arg2) {
1946
+ getObject(arg0).src = getStringFromWasm0(arg1, arg2);
1947
+ };
868
1948
  imports.wbg.__wbg_set_strokeStyle_475a0c2a522e1c7e = function(arg0, arg1, arg2) {
869
1949
  getObject(arg0).strokeStyle = getStringFromWasm0(arg1, arg2);
870
1950
  };
1951
+ imports.wbg.__wbg_set_textAlign_e2202d9a7471d2d0 = function(arg0, arg1, arg2) {
1952
+ getObject(arg0).textAlign = getStringFromWasm0(arg1, arg2);
1953
+ };
1954
+ imports.wbg.__wbg_set_textBaseline_73dbeaf15e2bb1bf = function(arg0, arg1, arg2) {
1955
+ getObject(arg0).textBaseline = getStringFromWasm0(arg1, arg2);
1956
+ };
1957
+ imports.wbg.__wbg_set_type_63fa4c18251f6545 = function(arg0, arg1, arg2) {
1958
+ getObject(arg0).type = getStringFromWasm0(arg1, arg2);
1959
+ };
871
1960
  imports.wbg.__wbg_set_width_dcc02c61dd01cff6 = function(arg0, arg1) {
872
1961
  getObject(arg0).width = arg1 >>> 0;
873
1962
  };
@@ -897,9 +1986,15 @@ function __wbg_get_imports() {
897
1986
  imports.wbg.__wbg_strokeRect_788876bb2e67b691 = function(arg0, arg1, arg2, arg3, arg4) {
898
1987
  getObject(arg0).strokeRect(arg1, arg2, arg3, arg4);
899
1988
  };
1989
+ imports.wbg.__wbg_strokeText_2f74b69043479d71 = function() { return handleError(function (arg0, arg1, arg2, arg3, arg4) {
1990
+ getObject(arg0).strokeText(getStringFromWasm0(arg1, arg2), arg3, arg4);
1991
+ }, arguments) };
900
1992
  imports.wbg.__wbg_stroke_2d2420886d092225 = function(arg0) {
901
1993
  getObject(arg0).stroke();
902
1994
  };
1995
+ imports.wbg.__wbg_translate_b28f0750dec728fa = function() { return handleError(function (arg0, arg1, arg2) {
1996
+ getObject(arg0).translate(arg1, arg2);
1997
+ }, arguments) };
903
1998
  imports.wbg.__wbg_width_619a651232e6844f = function(arg0) {
904
1999
  const ret = getObject(arg0).width;
905
2000
  return ret;
@@ -909,10 +2004,15 @@ function __wbg_get_imports() {
909
2004
  return ret;
910
2005
  };
911
2006
  imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {
912
- // Cast intrinsic for `Ref(String) -> Externref`.
2007
+
913
2008
  const ret = getStringFromWasm0(arg0, arg1);
914
2009
  return addHeapObject(ret);
915
2010
  };
2011
+ imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {
2012
+
2013
+ const ret = arg0;
2014
+ return addHeapObject(ret);
2015
+ };
916
2016
  imports.wbg.__wbindgen_object_clone_ref = function(arg0) {
917
2017
  const ret = getObject(arg0);
918
2018
  return addHeapObject(ret);
@@ -928,17 +2028,15 @@ function __wbg_finalize_init(instance, module) {
928
2028
  wasm = instance.exports;
929
2029
  __wbg_init.__wbindgen_wasm_module = module;
930
2030
  cachedDataViewMemory0 = null;
2031
+ cachedInt32ArrayMemory0 = null;
931
2032
  cachedUint8ArrayMemory0 = null;
932
2033
 
933
-
934
-
935
2034
  return wasm;
936
2035
  }
937
2036
 
938
2037
  function initSync(module) {
939
2038
  if (wasm !== undefined) return wasm;
940
2039
 
941
-
942
2040
  if (typeof module !== 'undefined') {
943
2041
  if (Object.getPrototypeOf(module) === Object.prototype) {
944
2042
  ({module} = module)
@@ -961,7 +2059,6 @@ function initSync(module) {
961
2059
  async function __wbg_init(module_or_path) {
962
2060
  if (wasm !== undefined) return wasm;
963
2061
 
964
-
965
2062
  if (typeof module_or_path !== 'undefined') {
966
2063
  if (Object.getPrototypeOf(module_or_path) === Object.prototype) {
967
2064
  ({module_or_path} = module_or_path)