@vector-im/matrix-wysiwyg 2.39.0 → 2.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/constants.d.ts +2 -0
- package/dist/lib/conversion.d.ts +4 -0
- package/dist/lib/types.d.ts +36 -0
- package/dist/lib/useComposerModel.d.ts +11 -0
- package/dist/lib/useListeners/types.d.ts +27 -0
- package/dist/lib/useTestCases/types.d.ts +5 -0
- package/dist/lib/useWysiwyg.d.ts +26 -0
- package/dist/matrix-wysiwyg.js +814 -990
- package/dist/matrix-wysiwyg.umd.cjs +4 -11
- package/node_modules/@vector-im/matrix-wysiwyg-wasm/package.json +7 -6
- package/node_modules/@vector-im/matrix-wysiwyg-wasm/pkg/wysiwyg.d.ts +56 -55
- package/node_modules/@vector-im/matrix-wysiwyg-wasm/pkg/wysiwyg_bg.cjs +303 -301
- package/node_modules/@vector-im/matrix-wysiwyg-wasm/pkg/wysiwyg_bg.js +303 -301
- package/node_modules/@vector-im/matrix-wysiwyg-wasm/pkg/wysiwyg_bg.wasm +0 -0
- package/node_modules/@vector-im/matrix-wysiwyg-wasm/pkg/wysiwyg_bg.wasm.d.ts +103 -103
- package/package.json +22 -21
- package/dist/index.d.ts +0 -97
|
@@ -120,6 +120,16 @@ function handleError(f, args) {
|
|
|
120
120
|
wasm.__wbindgen_exn_store(idx);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
+
function takeFromExternrefTable0(idx) {
|
|
124
|
+
const value = wasm.__wbindgen_export_1.get(idx);
|
|
125
|
+
wasm.__externref_table_dealloc(idx);
|
|
126
|
+
return value;
|
|
127
|
+
}
|
|
128
|
+
function _assertClass(instance, klass) {
|
|
129
|
+
if (!(instance instanceof klass)) {
|
|
130
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
123
133
|
function start() {
|
|
124
134
|
wasm.start();
|
|
125
135
|
}
|
|
@@ -144,21 +154,11 @@ function new_composer_model_from_html(html, start_utf16_codeunit, end_utf16_code
|
|
|
144
154
|
const ret = wasm.new_composer_model_from_html(ptr0, len0, start_utf16_codeunit, end_utf16_codeunit);
|
|
145
155
|
return ComposerModel.__wrap(ret);
|
|
146
156
|
}
|
|
147
|
-
function
|
|
148
|
-
|
|
149
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
function takeFromExternrefTable0(idx) {
|
|
153
|
-
const value = wasm.__wbindgen_export_1.get(idx);
|
|
154
|
-
wasm.__externref_table_dealloc(idx);
|
|
155
|
-
return value;
|
|
157
|
+
function __wbg_adapter_124(arg0, arg1, arg2, arg3) {
|
|
158
|
+
wasm.closure84_externref_shim(arg0, arg1, arg2, arg3);
|
|
156
159
|
}
|
|
157
|
-
function
|
|
158
|
-
wasm.
|
|
159
|
-
}
|
|
160
|
-
function __wbg_adapter_127(arg0, arg1, arg2, arg3) {
|
|
161
|
-
wasm.closure105_externref_shim(arg0, arg1, arg2, arg3);
|
|
160
|
+
function __wbg_adapter_131(arg0, arg1, arg2, arg3, arg4) {
|
|
161
|
+
wasm.closure78_externref_shim(arg0, arg1, arg2, arg3, arg4);
|
|
162
162
|
}
|
|
163
163
|
|
|
164
164
|
/**
|
|
@@ -237,7 +237,7 @@ const HtmlSource = exports.HtmlSource = Object.freeze({
|
|
|
237
237
|
"2": "UnknownExternal"
|
|
238
238
|
});
|
|
239
239
|
/**
|
|
240
|
-
* @enum {0 | 1 | 2 | 3}
|
|
240
|
+
* @enum {0 | 1 | 2 | 3 | 4}
|
|
241
241
|
*/
|
|
242
242
|
const PatternKeyType = exports.PatternKeyType = Object.freeze({
|
|
243
243
|
At: 0,
|
|
@@ -247,7 +247,9 @@ const PatternKeyType = exports.PatternKeyType = Object.freeze({
|
|
|
247
247
|
Slash: 2,
|
|
248
248
|
"2": "Slash",
|
|
249
249
|
Custom: 3,
|
|
250
|
-
"3": "Custom"
|
|
250
|
+
"3": "Custom",
|
|
251
|
+
Colon: 4,
|
|
252
|
+
"4": "Colon"
|
|
251
253
|
});
|
|
252
254
|
const __wbindgen_enum_SupportedType = ["text/html", "text/xml", "application/xml", "application/xhtml+xml", "image/svg+xml"];
|
|
253
255
|
const ComposerModelFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
@@ -273,118 +275,60 @@ class ComposerModel {
|
|
|
273
275
|
wasm.__wbg_composermodel_free(ptr, 0);
|
|
274
276
|
}
|
|
275
277
|
/**
|
|
276
|
-
* @returns {
|
|
277
|
-
*/
|
|
278
|
-
static new() {
|
|
279
|
-
const ret = wasm.composermodel_new();
|
|
280
|
-
return ComposerModel.__wrap(ret);
|
|
281
|
-
}
|
|
282
|
-
/**
|
|
283
|
-
* @param {string} text
|
|
284
|
-
* @returns {ComposerModel}
|
|
285
|
-
*/
|
|
286
|
-
static from_example_format(text) {
|
|
287
|
-
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
288
|
-
const len0 = WASM_VECTOR_LEN;
|
|
289
|
-
const ret = wasm.composermodel_from_example_format(ptr0, len0);
|
|
290
|
-
return ComposerModel.__wrap(ret);
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* @returns {string}
|
|
278
|
+
* @returns {ComposerUpdate}
|
|
294
279
|
*/
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
try {
|
|
299
|
-
const ret = wasm.composermodel_to_example_format(this.__wbg_ptr);
|
|
300
|
-
deferred1_0 = ret[0];
|
|
301
|
-
deferred1_1 = ret[1];
|
|
302
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
303
|
-
} finally {
|
|
304
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
305
|
-
}
|
|
280
|
+
code_block() {
|
|
281
|
+
const ret = wasm.composermodel_code_block(this.__wbg_ptr);
|
|
282
|
+
return ComposerUpdate.__wrap(ret);
|
|
306
283
|
}
|
|
307
284
|
/**
|
|
308
|
-
* @returns {
|
|
285
|
+
* @returns {ComposerUpdate}
|
|
309
286
|
*/
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
try {
|
|
314
|
-
const ret = wasm.composermodel_get_content_as_html(this.__wbg_ptr);
|
|
315
|
-
deferred1_0 = ret[0];
|
|
316
|
-
deferred1_1 = ret[1];
|
|
317
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
318
|
-
} finally {
|
|
319
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
320
|
-
}
|
|
287
|
+
delete_word() {
|
|
288
|
+
const ret = wasm.composermodel_delete_word(this.__wbg_ptr);
|
|
289
|
+
return ComposerUpdate.__wrap(ret);
|
|
321
290
|
}
|
|
322
291
|
/**
|
|
323
|
-
* @returns {
|
|
292
|
+
* @returns {ComposerUpdate}
|
|
324
293
|
*/
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
try {
|
|
329
|
-
const ret = wasm.composermodel_get_content_as_message_html(this.__wbg_ptr);
|
|
330
|
-
deferred1_0 = ret[0];
|
|
331
|
-
deferred1_1 = ret[1];
|
|
332
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
333
|
-
} finally {
|
|
334
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
335
|
-
}
|
|
294
|
+
inline_code() {
|
|
295
|
+
const ret = wasm.composermodel_inline_code(this.__wbg_ptr);
|
|
296
|
+
return ComposerUpdate.__wrap(ret);
|
|
336
297
|
}
|
|
337
298
|
/**
|
|
338
|
-
* @returns {
|
|
299
|
+
* @returns {ComposerUpdate}
|
|
339
300
|
*/
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
try {
|
|
344
|
-
const ret = wasm.composermodel_get_content_as_markdown(this.__wbg_ptr);
|
|
345
|
-
deferred1_0 = ret[0];
|
|
346
|
-
deferred1_1 = ret[1];
|
|
347
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
348
|
-
} finally {
|
|
349
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
350
|
-
}
|
|
301
|
+
ordered_list() {
|
|
302
|
+
const ret = wasm.composermodel_ordered_list(this.__wbg_ptr);
|
|
303
|
+
return ComposerUpdate.__wrap(ret);
|
|
351
304
|
}
|
|
352
305
|
/**
|
|
353
|
-
* @returns {
|
|
306
|
+
* @returns {ComposerUpdate}
|
|
354
307
|
*/
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
try {
|
|
359
|
-
const ret = wasm.composermodel_get_content_as_message_markdown(this.__wbg_ptr);
|
|
360
|
-
deferred1_0 = ret[0];
|
|
361
|
-
deferred1_1 = ret[1];
|
|
362
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
363
|
-
} finally {
|
|
364
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
365
|
-
}
|
|
308
|
+
remove_links() {
|
|
309
|
+
const ret = wasm.composermodel_remove_links(this.__wbg_ptr);
|
|
310
|
+
return ComposerUpdate.__wrap(ret);
|
|
366
311
|
}
|
|
367
312
|
/**
|
|
368
|
-
* @
|
|
313
|
+
* @param {string} new_html
|
|
314
|
+
* @param {HtmlSource} external_source
|
|
315
|
+
* @returns {ComposerUpdate}
|
|
369
316
|
*/
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
deferred1_0 = ret[0];
|
|
376
|
-
deferred1_1 = ret[1];
|
|
377
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
378
|
-
} finally {
|
|
379
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
380
|
-
}
|
|
317
|
+
replace_html(new_html, external_source) {
|
|
318
|
+
const ptr0 = passStringToWasm0(new_html, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
319
|
+
const len0 = WASM_VECTOR_LEN;
|
|
320
|
+
const ret = wasm.composermodel_replace_html(this.__wbg_ptr, ptr0, len0, external_source);
|
|
321
|
+
return ComposerUpdate.__wrap(ret);
|
|
381
322
|
}
|
|
382
323
|
/**
|
|
383
|
-
* @
|
|
324
|
+
* @param {string} new_text
|
|
325
|
+
* @returns {ComposerUpdate}
|
|
384
326
|
*/
|
|
385
|
-
|
|
386
|
-
const
|
|
387
|
-
|
|
327
|
+
replace_text(new_text) {
|
|
328
|
+
const ptr0 = passStringToWasm0(new_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
329
|
+
const len0 = WASM_VECTOR_LEN;
|
|
330
|
+
const ret = wasm.composermodel_replace_text(this.__wbg_ptr, ptr0, len0);
|
|
331
|
+
return ComposerUpdate.__wrap(ret);
|
|
388
332
|
}
|
|
389
333
|
/**
|
|
390
334
|
* @returns {Map<any, any>}
|
|
@@ -393,185 +337,273 @@ class ComposerModel {
|
|
|
393
337
|
const ret = wasm.composermodel_action_states(this.__wbg_ptr);
|
|
394
338
|
return ret;
|
|
395
339
|
}
|
|
396
|
-
/**
|
|
397
|
-
* @param {number} start_utf16_codeunit
|
|
398
|
-
* @param {number} end_utf16_codeunit
|
|
399
|
-
* @returns {ComposerUpdate}
|
|
400
|
-
*/
|
|
401
|
-
select(start_utf16_codeunit, end_utf16_codeunit) {
|
|
402
|
-
const ret = wasm.composermodel_select(this.__wbg_ptr, start_utf16_codeunit, end_utf16_codeunit);
|
|
403
|
-
return ComposerUpdate.__wrap(ret);
|
|
404
|
-
}
|
|
405
340
|
/**
|
|
406
341
|
* @returns {number}
|
|
407
342
|
*/
|
|
408
|
-
|
|
409
|
-
const ret = wasm.
|
|
343
|
+
selection_end() {
|
|
344
|
+
const ret = wasm.composermodel_selection_end(this.__wbg_ptr);
|
|
410
345
|
return ret >>> 0;
|
|
411
346
|
}
|
|
412
347
|
/**
|
|
413
|
-
* @returns {
|
|
348
|
+
* @returns {ComposerUpdate}
|
|
414
349
|
*/
|
|
415
|
-
|
|
416
|
-
const ret = wasm.
|
|
417
|
-
return ret
|
|
350
|
+
backspace_word() {
|
|
351
|
+
const ret = wasm.composermodel_backspace_word(this.__wbg_ptr);
|
|
352
|
+
return ComposerUpdate.__wrap(ret);
|
|
418
353
|
}
|
|
419
354
|
/**
|
|
420
|
-
*
|
|
355
|
+
* Creates a mention node and inserts it into the composer at the current selection
|
|
356
|
+
* @param {string} url
|
|
357
|
+
* @param {string} text
|
|
358
|
+
* @param {Map<any, any>} attributes
|
|
421
359
|
* @returns {ComposerUpdate}
|
|
422
360
|
*/
|
|
423
|
-
|
|
424
|
-
const ptr0 = passStringToWasm0(
|
|
361
|
+
insert_mention(url, text, attributes) {
|
|
362
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
425
363
|
const len0 = WASM_VECTOR_LEN;
|
|
426
|
-
const
|
|
364
|
+
const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
365
|
+
const len1 = WASM_VECTOR_LEN;
|
|
366
|
+
const ret = wasm.composermodel_insert_mention(this.__wbg_ptr, ptr0, len0, ptr1, len1, attributes);
|
|
427
367
|
return ComposerUpdate.__wrap(ret);
|
|
428
368
|
}
|
|
429
369
|
/**
|
|
430
|
-
* @param {string} new_html
|
|
431
|
-
* @param {HtmlSource} external_source
|
|
432
370
|
* @returns {ComposerUpdate}
|
|
433
371
|
*/
|
|
434
|
-
|
|
435
|
-
const
|
|
436
|
-
const len0 = WASM_VECTOR_LEN;
|
|
437
|
-
const ret = wasm.composermodel_replace_html(this.__wbg_ptr, ptr0, len0, external_source);
|
|
372
|
+
strike_through() {
|
|
373
|
+
const ret = wasm.composermodel_strike_through(this.__wbg_ptr);
|
|
438
374
|
return ComposerUpdate.__wrap(ret);
|
|
439
375
|
}
|
|
440
376
|
/**
|
|
441
|
-
* @param {string} new_text
|
|
442
|
-
* @param {SuggestionPattern} suggestion
|
|
443
|
-
* @param {boolean} append_space
|
|
444
377
|
* @returns {ComposerUpdate}
|
|
445
378
|
*/
|
|
446
|
-
|
|
447
|
-
const
|
|
448
|
-
const len0 = WASM_VECTOR_LEN;
|
|
449
|
-
_assertClass(suggestion, SuggestionPattern);
|
|
450
|
-
const ret = wasm.composermodel_replace_text_suggestion(this.__wbg_ptr, ptr0, len0, suggestion.__wbg_ptr, append_space);
|
|
379
|
+
unordered_list() {
|
|
380
|
+
const ret = wasm.composermodel_unordered_list(this.__wbg_ptr);
|
|
451
381
|
return ComposerUpdate.__wrap(ret);
|
|
452
382
|
}
|
|
453
383
|
/**
|
|
384
|
+
* @returns {LinkAction}
|
|
385
|
+
*/
|
|
386
|
+
get_link_action() {
|
|
387
|
+
const ret = wasm.composermodel_get_link_action(this.__wbg_ptr);
|
|
388
|
+
return LinkAction.__wrap(ret);
|
|
389
|
+
}
|
|
390
|
+
/**
|
|
391
|
+
* @returns {number}
|
|
392
|
+
*/
|
|
393
|
+
selection_start() {
|
|
394
|
+
const ret = wasm.composermodel_selection_start(this.__wbg_ptr);
|
|
395
|
+
return ret >>> 0;
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* @returns {string}
|
|
399
|
+
*/
|
|
400
|
+
to_example_format() {
|
|
401
|
+
let deferred1_0;
|
|
402
|
+
let deferred1_1;
|
|
403
|
+
try {
|
|
404
|
+
const ret = wasm.composermodel_to_example_format(this.__wbg_ptr);
|
|
405
|
+
deferred1_0 = ret[0];
|
|
406
|
+
deferred1_1 = ret[1];
|
|
407
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
408
|
+
} finally {
|
|
409
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* @param {string} url
|
|
454
414
|
* @param {string} text
|
|
415
|
+
* @param {Map<any, any>} attributes
|
|
455
416
|
* @returns {ComposerUpdate}
|
|
456
417
|
*/
|
|
457
|
-
|
|
458
|
-
const ptr0 = passStringToWasm0(
|
|
418
|
+
set_link_with_text(url, text, attributes) {
|
|
419
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
459
420
|
const len0 = WASM_VECTOR_LEN;
|
|
460
|
-
const
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
return ComposerUpdate.__wrap(ret[0]);
|
|
421
|
+
const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
422
|
+
const len1 = WASM_VECTOR_LEN;
|
|
423
|
+
const ret = wasm.composermodel_set_link_with_text(this.__wbg_ptr, ptr0, len0, ptr1, len1, attributes);
|
|
424
|
+
return ComposerUpdate.__wrap(ret);
|
|
465
425
|
}
|
|
466
426
|
/**
|
|
467
427
|
* @param {string} text
|
|
468
|
-
* @returns {
|
|
428
|
+
* @returns {ComposerModel}
|
|
469
429
|
*/
|
|
470
|
-
|
|
430
|
+
static from_example_format(text) {
|
|
471
431
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
472
432
|
const len0 = WASM_VECTOR_LEN;
|
|
473
|
-
const ret = wasm.
|
|
474
|
-
|
|
475
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
476
|
-
}
|
|
477
|
-
return ComposerUpdate.__wrap(ret[0]);
|
|
433
|
+
const ret = wasm.composermodel_from_example_format(ptr0, len0);
|
|
434
|
+
return ComposerModel.__wrap(ret);
|
|
478
435
|
}
|
|
479
436
|
/**
|
|
480
|
-
* @returns {
|
|
437
|
+
* @returns {string}
|
|
481
438
|
*/
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
439
|
+
get_content_as_html() {
|
|
440
|
+
let deferred1_0;
|
|
441
|
+
let deferred1_1;
|
|
442
|
+
try {
|
|
443
|
+
const ret = wasm.composermodel_get_content_as_html(this.__wbg_ptr);
|
|
444
|
+
deferred1_0 = ret[0];
|
|
445
|
+
deferred1_1 = ret[1];
|
|
446
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
447
|
+
} finally {
|
|
448
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
449
|
+
}
|
|
485
450
|
}
|
|
486
451
|
/**
|
|
452
|
+
* @param {string} text
|
|
487
453
|
* @returns {ComposerUpdate}
|
|
488
454
|
*/
|
|
489
|
-
|
|
490
|
-
const
|
|
491
|
-
|
|
455
|
+
set_content_from_html(text) {
|
|
456
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
457
|
+
const len0 = WASM_VECTOR_LEN;
|
|
458
|
+
const ret = wasm.composermodel_set_content_from_html(this.__wbg_ptr, ptr0, len0);
|
|
459
|
+
if (ret[2]) {
|
|
460
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
461
|
+
}
|
|
462
|
+
return ComposerUpdate.__wrap(ret[0]);
|
|
492
463
|
}
|
|
493
464
|
/**
|
|
465
|
+
* Creates an at-room mention node and inserts it into the composer at the current selection
|
|
466
|
+
* @param {Map<any, any>} attributes
|
|
494
467
|
* @returns {ComposerUpdate}
|
|
495
468
|
*/
|
|
496
|
-
|
|
497
|
-
const ret = wasm.
|
|
469
|
+
insert_at_room_mention(attributes) {
|
|
470
|
+
const ret = wasm.composermodel_insert_at_room_mention(this.__wbg_ptr, attributes);
|
|
498
471
|
return ComposerUpdate.__wrap(ret);
|
|
499
472
|
}
|
|
500
473
|
/**
|
|
501
|
-
* @returns {
|
|
474
|
+
* @returns {string}
|
|
502
475
|
*/
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
476
|
+
get_content_as_markdown() {
|
|
477
|
+
let deferred1_0;
|
|
478
|
+
let deferred1_1;
|
|
479
|
+
try {
|
|
480
|
+
const ret = wasm.composermodel_get_content_as_markdown(this.__wbg_ptr);
|
|
481
|
+
deferred1_0 = ret[0];
|
|
482
|
+
deferred1_1 = ret[1];
|
|
483
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
484
|
+
} finally {
|
|
485
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
486
|
+
}
|
|
506
487
|
}
|
|
507
488
|
/**
|
|
489
|
+
* @param {string} new_text
|
|
490
|
+
* @param {SuggestionPattern} suggestion
|
|
491
|
+
* @param {boolean} append_space
|
|
508
492
|
* @returns {ComposerUpdate}
|
|
509
493
|
*/
|
|
510
|
-
|
|
511
|
-
const
|
|
494
|
+
replace_text_suggestion(new_text, suggestion, append_space) {
|
|
495
|
+
const ptr0 = passStringToWasm0(new_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
496
|
+
const len0 = WASM_VECTOR_LEN;
|
|
497
|
+
_assertClass(suggestion, SuggestionPattern);
|
|
498
|
+
const ret = wasm.composermodel_replace_text_suggestion(this.__wbg_ptr, ptr0, len0, suggestion.__wbg_ptr, append_space);
|
|
512
499
|
return ComposerUpdate.__wrap(ret);
|
|
513
500
|
}
|
|
514
501
|
/**
|
|
515
|
-
* @returns {
|
|
502
|
+
* @returns {string}
|
|
516
503
|
*/
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
504
|
+
get_content_as_plain_text() {
|
|
505
|
+
let deferred1_0;
|
|
506
|
+
let deferred1_1;
|
|
507
|
+
try {
|
|
508
|
+
const ret = wasm.composermodel_get_content_as_plain_text(this.__wbg_ptr);
|
|
509
|
+
deferred1_0 = ret[0];
|
|
510
|
+
deferred1_1 = ret[1];
|
|
511
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
512
|
+
} finally {
|
|
513
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
514
|
+
}
|
|
520
515
|
}
|
|
521
516
|
/**
|
|
517
|
+
* @param {string} text
|
|
522
518
|
* @returns {ComposerUpdate}
|
|
523
519
|
*/
|
|
524
|
-
|
|
525
|
-
const
|
|
526
|
-
|
|
520
|
+
set_content_from_markdown(text) {
|
|
521
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
522
|
+
const len0 = WASM_VECTOR_LEN;
|
|
523
|
+
const ret = wasm.composermodel_set_content_from_markdown(this.__wbg_ptr, ptr0, len0);
|
|
524
|
+
if (ret[2]) {
|
|
525
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
526
|
+
}
|
|
527
|
+
return ComposerUpdate.__wrap(ret[0]);
|
|
527
528
|
}
|
|
528
529
|
/**
|
|
529
|
-
* @returns {
|
|
530
|
+
* @returns {string}
|
|
530
531
|
*/
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
532
|
+
get_content_as_message_html() {
|
|
533
|
+
let deferred1_0;
|
|
534
|
+
let deferred1_1;
|
|
535
|
+
try {
|
|
536
|
+
const ret = wasm.composermodel_get_content_as_message_html(this.__wbg_ptr);
|
|
537
|
+
deferred1_0 = ret[0];
|
|
538
|
+
deferred1_1 = ret[1];
|
|
539
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
540
|
+
} finally {
|
|
541
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
542
|
+
}
|
|
534
543
|
}
|
|
535
544
|
/**
|
|
545
|
+
* Creates a mention node and inserts it into the composer, replacing the
|
|
546
|
+
* text content defined by the suggestion
|
|
547
|
+
* @param {string} url
|
|
548
|
+
* @param {string} text
|
|
549
|
+
* @param {SuggestionPattern} suggestion
|
|
550
|
+
* @param {Map<any, any>} attributes
|
|
536
551
|
* @returns {ComposerUpdate}
|
|
537
552
|
*/
|
|
538
|
-
|
|
539
|
-
const
|
|
553
|
+
insert_mention_at_suggestion(url, text, suggestion, attributes) {
|
|
554
|
+
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
555
|
+
const len0 = WASM_VECTOR_LEN;
|
|
556
|
+
const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
557
|
+
const len1 = WASM_VECTOR_LEN;
|
|
558
|
+
_assertClass(suggestion, SuggestionPattern);
|
|
559
|
+
const ret = wasm.composermodel_insert_mention_at_suggestion(this.__wbg_ptr, ptr0, len0, ptr1, len1, suggestion.__wbg_ptr, attributes);
|
|
540
560
|
return ComposerUpdate.__wrap(ret);
|
|
541
561
|
}
|
|
542
562
|
/**
|
|
543
|
-
* @
|
|
563
|
+
* @param {Array<any>} custom_suggestion_patterns
|
|
544
564
|
*/
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
return ComposerUpdate.__wrap(ret);
|
|
565
|
+
set_custom_suggestion_patterns(custom_suggestion_patterns) {
|
|
566
|
+
wasm.composermodel_set_custom_suggestion_patterns(this.__wbg_ptr, custom_suggestion_patterns);
|
|
548
567
|
}
|
|
549
568
|
/**
|
|
550
|
-
* @returns {
|
|
569
|
+
* @returns {string}
|
|
551
570
|
*/
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
571
|
+
get_content_as_message_markdown() {
|
|
572
|
+
let deferred1_0;
|
|
573
|
+
let deferred1_1;
|
|
574
|
+
try {
|
|
575
|
+
const ret = wasm.composermodel_get_content_as_message_markdown(this.__wbg_ptr);
|
|
576
|
+
deferred1_0 = ret[0];
|
|
577
|
+
deferred1_1 = ret[1];
|
|
578
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
579
|
+
} finally {
|
|
580
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
581
|
+
}
|
|
555
582
|
}
|
|
556
583
|
/**
|
|
584
|
+
* Creates an at-room mention node and inserts it into the composer, replacing the
|
|
585
|
+
* text content defined by the suggestion
|
|
586
|
+
* @param {SuggestionPattern} suggestion
|
|
587
|
+
* @param {Map<any, any>} attributes
|
|
557
588
|
* @returns {ComposerUpdate}
|
|
558
589
|
*/
|
|
559
|
-
|
|
560
|
-
|
|
590
|
+
insert_at_room_mention_at_suggestion(suggestion, attributes) {
|
|
591
|
+
_assertClass(suggestion, SuggestionPattern);
|
|
592
|
+
const ret = wasm.composermodel_insert_at_room_mention_at_suggestion(this.__wbg_ptr, suggestion.__wbg_ptr, attributes);
|
|
561
593
|
return ComposerUpdate.__wrap(ret);
|
|
562
594
|
}
|
|
563
595
|
/**
|
|
564
|
-
* @returns {
|
|
596
|
+
* @returns {ComposerModel}
|
|
565
597
|
*/
|
|
566
|
-
|
|
567
|
-
const ret = wasm.
|
|
568
|
-
return
|
|
598
|
+
static new() {
|
|
599
|
+
const ret = wasm.composermodel_new();
|
|
600
|
+
return ComposerModel.__wrap(ret);
|
|
569
601
|
}
|
|
570
602
|
/**
|
|
571
603
|
* @returns {ComposerUpdate}
|
|
572
604
|
*/
|
|
573
|
-
|
|
574
|
-
const ret = wasm.
|
|
605
|
+
bold() {
|
|
606
|
+
const ret = wasm.composermodel_bold(this.__wbg_ptr);
|
|
575
607
|
return ComposerUpdate.__wrap(ret);
|
|
576
608
|
}
|
|
577
609
|
/**
|
|
@@ -584,128 +616,98 @@ class ComposerModel {
|
|
|
584
616
|
/**
|
|
585
617
|
* @returns {ComposerUpdate}
|
|
586
618
|
*/
|
|
587
|
-
|
|
588
|
-
const ret = wasm.
|
|
619
|
+
undo() {
|
|
620
|
+
const ret = wasm.composermodel_undo(this.__wbg_ptr);
|
|
589
621
|
return ComposerUpdate.__wrap(ret);
|
|
590
622
|
}
|
|
591
623
|
/**
|
|
592
624
|
* @returns {ComposerUpdate}
|
|
593
625
|
*/
|
|
594
|
-
|
|
595
|
-
const ret = wasm.
|
|
626
|
+
clear() {
|
|
627
|
+
const ret = wasm.composermodel_clear(this.__wbg_ptr);
|
|
596
628
|
return ComposerUpdate.__wrap(ret);
|
|
597
629
|
}
|
|
598
630
|
/**
|
|
599
631
|
* @returns {ComposerUpdate}
|
|
600
632
|
*/
|
|
601
|
-
|
|
602
|
-
const ret = wasm.
|
|
633
|
+
enter() {
|
|
634
|
+
const ret = wasm.composermodel_enter(this.__wbg_ptr);
|
|
603
635
|
return ComposerUpdate.__wrap(ret);
|
|
604
636
|
}
|
|
605
637
|
/**
|
|
606
638
|
* @returns {ComposerUpdate}
|
|
607
639
|
*/
|
|
608
|
-
|
|
609
|
-
const ret = wasm.
|
|
640
|
+
quote() {
|
|
641
|
+
const ret = wasm.composermodel_quote(this.__wbg_ptr);
|
|
610
642
|
return ComposerUpdate.__wrap(ret);
|
|
611
643
|
}
|
|
612
644
|
/**
|
|
613
|
-
* @returns {
|
|
645
|
+
* @returns {ComposerUpdate}
|
|
614
646
|
*/
|
|
615
|
-
|
|
616
|
-
const ret = wasm.
|
|
617
|
-
return
|
|
647
|
+
delete() {
|
|
648
|
+
const ret = wasm.composermodel_delete(this.__wbg_ptr);
|
|
649
|
+
return ComposerUpdate.__wrap(ret);
|
|
618
650
|
}
|
|
619
651
|
/**
|
|
620
|
-
* @param {string} url
|
|
621
|
-
* @param {Map<any, any>} attributes
|
|
622
652
|
* @returns {ComposerUpdate}
|
|
623
653
|
*/
|
|
624
|
-
|
|
625
|
-
const
|
|
626
|
-
const len0 = WASM_VECTOR_LEN;
|
|
627
|
-
const ret = wasm.composermodel_set_link(this.__wbg_ptr, ptr0, len0, attributes);
|
|
654
|
+
indent() {
|
|
655
|
+
const ret = wasm.composermodel_indent(this.__wbg_ptr);
|
|
628
656
|
return ComposerUpdate.__wrap(ret);
|
|
629
657
|
}
|
|
630
658
|
/**
|
|
631
|
-
* @param {string} url
|
|
632
|
-
* @param {string} text
|
|
633
|
-
* @param {Map<any, any>} attributes
|
|
634
659
|
* @returns {ComposerUpdate}
|
|
635
660
|
*/
|
|
636
|
-
|
|
637
|
-
const
|
|
638
|
-
const len0 = WASM_VECTOR_LEN;
|
|
639
|
-
const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
640
|
-
const len1 = WASM_VECTOR_LEN;
|
|
641
|
-
const ret = wasm.composermodel_set_link_with_text(this.__wbg_ptr, ptr0, len0, ptr1, len1, attributes);
|
|
661
|
+
italic() {
|
|
662
|
+
const ret = wasm.composermodel_italic(this.__wbg_ptr);
|
|
642
663
|
return ComposerUpdate.__wrap(ret);
|
|
643
664
|
}
|
|
644
665
|
/**
|
|
645
|
-
* @param {
|
|
666
|
+
* @param {number} start_utf16_codeunit
|
|
667
|
+
* @param {number} end_utf16_codeunit
|
|
668
|
+
* @returns {ComposerUpdate}
|
|
646
669
|
*/
|
|
647
|
-
|
|
648
|
-
wasm.
|
|
670
|
+
select(start_utf16_codeunit, end_utf16_codeunit) {
|
|
671
|
+
const ret = wasm.composermodel_select(this.__wbg_ptr, start_utf16_codeunit, end_utf16_codeunit);
|
|
672
|
+
return ComposerUpdate.__wrap(ret);
|
|
649
673
|
}
|
|
650
674
|
/**
|
|
651
|
-
*
|
|
652
|
-
* @param {Map<any, any>} attributes
|
|
653
|
-
* @returns {ComposerUpdate}
|
|
675
|
+
* @returns {DomHandle}
|
|
654
676
|
*/
|
|
655
|
-
|
|
656
|
-
const ret = wasm.
|
|
657
|
-
return
|
|
677
|
+
document() {
|
|
678
|
+
const ret = wasm.composermodel_document(this.__wbg_ptr);
|
|
679
|
+
return DomHandle.__wrap(ret);
|
|
658
680
|
}
|
|
659
681
|
/**
|
|
660
|
-
* Creates a mention node and inserts it into the composer at the current selection
|
|
661
682
|
* @param {string} url
|
|
662
|
-
* @param {string} text
|
|
663
683
|
* @param {Map<any, any>} attributes
|
|
664
684
|
* @returns {ComposerUpdate}
|
|
665
685
|
*/
|
|
666
|
-
|
|
686
|
+
set_link(url, attributes) {
|
|
667
687
|
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
668
688
|
const len0 = WASM_VECTOR_LEN;
|
|
669
|
-
const
|
|
670
|
-
const len1 = WASM_VECTOR_LEN;
|
|
671
|
-
const ret = wasm.composermodel_insert_mention(this.__wbg_ptr, ptr0, len0, ptr1, len1, attributes);
|
|
689
|
+
const ret = wasm.composermodel_set_link(this.__wbg_ptr, ptr0, len0, attributes);
|
|
672
690
|
return ComposerUpdate.__wrap(ret);
|
|
673
691
|
}
|
|
674
692
|
/**
|
|
675
|
-
* Creates an at-room mention node and inserts it into the composer, replacing the
|
|
676
|
-
* text content defined by the suggestion
|
|
677
|
-
* @param {SuggestionPattern} suggestion
|
|
678
|
-
* @param {Map<any, any>} attributes
|
|
679
693
|
* @returns {ComposerUpdate}
|
|
680
694
|
*/
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
const ret = wasm.composermodel_insert_at_room_mention_at_suggestion(this.__wbg_ptr, suggestion.__wbg_ptr, attributes);
|
|
695
|
+
unindent() {
|
|
696
|
+
const ret = wasm.composermodel_unindent(this.__wbg_ptr);
|
|
684
697
|
return ComposerUpdate.__wrap(ret);
|
|
685
698
|
}
|
|
686
699
|
/**
|
|
687
|
-
* Creates a mention node and inserts it into the composer, replacing the
|
|
688
|
-
* text content defined by the suggestion
|
|
689
|
-
* @param {string} url
|
|
690
|
-
* @param {string} text
|
|
691
|
-
* @param {SuggestionPattern} suggestion
|
|
692
|
-
* @param {Map<any, any>} attributes
|
|
693
700
|
* @returns {ComposerUpdate}
|
|
694
701
|
*/
|
|
695
|
-
|
|
696
|
-
const
|
|
697
|
-
const len0 = WASM_VECTOR_LEN;
|
|
698
|
-
const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
699
|
-
const len1 = WASM_VECTOR_LEN;
|
|
700
|
-
_assertClass(suggestion, SuggestionPattern);
|
|
701
|
-
const ret = wasm.composermodel_insert_mention_at_suggestion(this.__wbg_ptr, ptr0, len0, ptr1, len1, suggestion.__wbg_ptr, attributes);
|
|
702
|
+
backspace() {
|
|
703
|
+
const ret = wasm.composermodel_backspace(this.__wbg_ptr);
|
|
702
704
|
return ComposerUpdate.__wrap(ret);
|
|
703
705
|
}
|
|
704
706
|
/**
|
|
705
707
|
* @returns {ComposerUpdate}
|
|
706
708
|
*/
|
|
707
|
-
|
|
708
|
-
const ret = wasm.
|
|
709
|
+
underline() {
|
|
710
|
+
const ret = wasm.composermodel_underline(this.__wbg_ptr);
|
|
709
711
|
return ComposerUpdate.__wrap(ret);
|
|
710
712
|
}
|
|
711
713
|
}
|
|
@@ -732,13 +734,6 @@ class ComposerUpdate {
|
|
|
732
734
|
const ptr = this.__destroy_into_raw();
|
|
733
735
|
wasm.__wbg_composerupdate_free(ptr, 0);
|
|
734
736
|
}
|
|
735
|
-
/**
|
|
736
|
-
* @returns {TextUpdate}
|
|
737
|
-
*/
|
|
738
|
-
text_update() {
|
|
739
|
-
const ret = wasm.composerupdate_text_update(this.__wbg_ptr);
|
|
740
|
-
return TextUpdate.__wrap(ret);
|
|
741
|
-
}
|
|
742
737
|
/**
|
|
743
738
|
* @returns {MenuState}
|
|
744
739
|
*/
|
|
@@ -753,6 +748,13 @@ class ComposerUpdate {
|
|
|
753
748
|
const ret = wasm.composerupdate_menu_action(this.__wbg_ptr);
|
|
754
749
|
return MenuAction.__wrap(ret);
|
|
755
750
|
}
|
|
751
|
+
/**
|
|
752
|
+
* @returns {TextUpdate}
|
|
753
|
+
*/
|
|
754
|
+
text_update() {
|
|
755
|
+
const ret = wasm.composerupdate_text_update(this.__wbg_ptr);
|
|
756
|
+
return TextUpdate.__wrap(ret);
|
|
757
|
+
}
|
|
756
758
|
}
|
|
757
759
|
exports.ComposerUpdate = ComposerUpdate;
|
|
758
760
|
const CreateFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
@@ -888,20 +890,19 @@ class DomHandle {
|
|
|
888
890
|
wasm.__wbg_domhandle_free(ptr, 0);
|
|
889
891
|
}
|
|
890
892
|
/**
|
|
891
|
-
* Returns
|
|
892
|
-
* node we refer to.
|
|
893
|
+
* Returns our tagname, or "-text-"/"-zwsp-" if we are a text/zwsp node.
|
|
893
894
|
* Panics if we are not a valid reference (because the model has changed
|
|
894
895
|
* since we were created, or because you passed in a different model
|
|
895
896
|
* from the one that created us.)
|
|
896
897
|
* @param {ComposerModel} model
|
|
897
898
|
* @returns {string}
|
|
898
899
|
*/
|
|
899
|
-
|
|
900
|
+
tag(model) {
|
|
900
901
|
let deferred1_0;
|
|
901
902
|
let deferred1_1;
|
|
902
903
|
try {
|
|
903
904
|
_assertClass(model, ComposerModel);
|
|
904
|
-
const ret = wasm.
|
|
905
|
+
const ret = wasm.domhandle_tag(this.__wbg_ptr, model.__wbg_ptr);
|
|
905
906
|
deferred1_0 = ret[0];
|
|
906
907
|
deferred1_1 = ret[1];
|
|
907
908
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -909,20 +910,6 @@ class DomHandle {
|
|
|
909
910
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
910
911
|
}
|
|
911
912
|
}
|
|
912
|
-
/**
|
|
913
|
-
* Returns a list of our children nodes, or an empty list if we refer
|
|
914
|
-
* to a text or line break node.
|
|
915
|
-
* Panics if we are not a valid reference (because the model has changed
|
|
916
|
-
* since we were created, or because you passed in a different model
|
|
917
|
-
* from the one that created us.)
|
|
918
|
-
* @param {ComposerModel} model
|
|
919
|
-
* @returns {DomChildren}
|
|
920
|
-
*/
|
|
921
|
-
children(model) {
|
|
922
|
-
_assertClass(model, ComposerModel);
|
|
923
|
-
const ret = wasm.domhandle_children(this.__wbg_ptr, model.__wbg_ptr);
|
|
924
|
-
return DomChildren.__wrap(ret);
|
|
925
|
-
}
|
|
926
913
|
/**
|
|
927
914
|
* Returns the text of this node, or an empty string if this is a
|
|
928
915
|
* container or line break.
|
|
@@ -946,19 +933,34 @@ class DomHandle {
|
|
|
946
933
|
}
|
|
947
934
|
}
|
|
948
935
|
/**
|
|
949
|
-
* Returns our
|
|
936
|
+
* Returns a list of our children nodes, or an empty list if we refer
|
|
937
|
+
* to a text or line break node.
|
|
938
|
+
* Panics if we are not a valid reference (because the model has changed
|
|
939
|
+
* since we were created, or because you passed in a different model
|
|
940
|
+
* from the one that created us.)
|
|
941
|
+
* @param {ComposerModel} model
|
|
942
|
+
* @returns {DomChildren}
|
|
943
|
+
*/
|
|
944
|
+
children(model) {
|
|
945
|
+
_assertClass(model, ComposerModel);
|
|
946
|
+
const ret = wasm.domhandle_children(this.__wbg_ptr, model.__wbg_ptr);
|
|
947
|
+
return DomChildren.__wrap(ret);
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* Returns "container", "line_break", "text" or "zwsp" depending on the type of
|
|
951
|
+
* node we refer to.
|
|
950
952
|
* Panics if we are not a valid reference (because the model has changed
|
|
951
953
|
* since we were created, or because you passed in a different model
|
|
952
954
|
* from the one that created us.)
|
|
953
955
|
* @param {ComposerModel} model
|
|
954
956
|
* @returns {string}
|
|
955
957
|
*/
|
|
956
|
-
|
|
958
|
+
node_type(model) {
|
|
957
959
|
let deferred1_0;
|
|
958
960
|
let deferred1_1;
|
|
959
961
|
try {
|
|
960
962
|
_assertClass(model, ComposerModel);
|
|
961
|
-
const ret = wasm.
|
|
963
|
+
const ret = wasm.domhandle_node_type(this.__wbg_ptr, model.__wbg_ptr);
|
|
962
964
|
deferred1_0 = ret[0];
|
|
963
965
|
deferred1_1 = ret[1];
|
|
964
966
|
return getStringFromWasm0(ret[0], ret[1]);
|
|
@@ -1157,6 +1159,13 @@ class MenuAction {
|
|
|
1157
1159
|
const ptr = this.__destroy_into_raw();
|
|
1158
1160
|
wasm.__wbg_menuaction_free(ptr, 0);
|
|
1159
1161
|
}
|
|
1162
|
+
/**
|
|
1163
|
+
* @returns {MenuActionSuggestion | undefined}
|
|
1164
|
+
*/
|
|
1165
|
+
suggestion() {
|
|
1166
|
+
const ret = wasm.menuaction_suggestion(this.__wbg_ptr);
|
|
1167
|
+
return ret === 0 ? undefined : MenuActionSuggestion.__wrap(ret);
|
|
1168
|
+
}
|
|
1160
1169
|
/**
|
|
1161
1170
|
* @returns {boolean}
|
|
1162
1171
|
*/
|
|
@@ -1171,13 +1180,6 @@ class MenuAction {
|
|
|
1171
1180
|
const ret = wasm.menuaction_none(this.__wbg_ptr);
|
|
1172
1181
|
return ret !== 0;
|
|
1173
1182
|
}
|
|
1174
|
-
/**
|
|
1175
|
-
* @returns {MenuActionSuggestion | undefined}
|
|
1176
|
-
*/
|
|
1177
|
-
suggestion() {
|
|
1178
|
-
const ret = wasm.menuaction_suggestion(this.__wbg_ptr);
|
|
1179
|
-
return ret === 0 ? undefined : MenuActionSuggestion.__wrap(ret);
|
|
1180
|
-
}
|
|
1181
1183
|
}
|
|
1182
1184
|
exports.MenuAction = MenuAction;
|
|
1183
1185
|
const MenuActionSuggestionFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
@@ -1672,7 +1674,7 @@ function __wbg_forEach_d6a05ca96422eff9(arg0, arg1, arg2) {
|
|
|
1672
1674
|
const a = state0.a;
|
|
1673
1675
|
state0.a = 0;
|
|
1674
1676
|
try {
|
|
1675
|
-
return
|
|
1677
|
+
return __wbg_adapter_131(a, state0.b, arg0, arg1, arg2);
|
|
1676
1678
|
} finally {
|
|
1677
1679
|
state0.a = a;
|
|
1678
1680
|
}
|
|
@@ -1693,7 +1695,7 @@ function __wbg_forEach_e1cf6f7c8ecb7dae(arg0, arg1, arg2) {
|
|
|
1693
1695
|
const a = state0.a;
|
|
1694
1696
|
state0.a = 0;
|
|
1695
1697
|
try {
|
|
1696
|
-
return
|
|
1698
|
+
return __wbg_adapter_124(a, state0.b, arg0, arg1);
|
|
1697
1699
|
} finally {
|
|
1698
1700
|
state0.a = a;
|
|
1699
1701
|
}
|