@vector-im/matrix-wysiwyg 2.38.2 → 2.38.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@vector-im/matrix-wysiwyg-wasm/package.json +1 -1
- package/node_modules/@vector-im/matrix-wysiwyg-wasm/pkg/wysiwyg.d.ts +109 -363
- package/node_modules/@vector-im/matrix-wysiwyg-wasm/pkg/wysiwyg_bg.cjs +592 -705
- package/node_modules/@vector-im/matrix-wysiwyg-wasm/pkg/wysiwyg_bg.js +598 -671
- 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 +132 -130
- package/package.json +1 -1
|
@@ -4,28 +4,27 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.TextUpdate = exports.SuggestionPattern = exports.Selection = exports.ReplaceAll = exports.PatternKeyType = exports.PatternKey = exports.MenuStateUpdate = exports.MenuState = exports.MenuActionSuggestion = exports.MenuAction = exports.LinkAction = exports.Keep = exports.Edit = exports.DomHandle = exports.DomCreationError = exports.DomChildren = exports.Disabled = exports.CreateWithText = exports.Create = exports.ComposerUpdate = exports.ComposerModel = exports.ComposerAction = exports.ActionState = void 0;
|
|
7
|
-
exports.
|
|
8
|
-
exports.
|
|
9
|
-
exports.
|
|
10
|
-
exports.
|
|
11
|
-
exports.
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
7
|
+
exports.__wbg_body_942ea927546a04ba = __wbg_body_942ea927546a04ba;
|
|
8
|
+
exports.__wbg_childNodes_c4423003f3a9441f = __wbg_childNodes_c4423003f3a9441f;
|
|
9
|
+
exports.__wbg_error_7534b8e9a36f1ab4 = __wbg_error_7534b8e9a36f1ab4;
|
|
10
|
+
exports.__wbg_forEach_d6a05ca96422eff9 = __wbg_forEach_d6a05ca96422eff9;
|
|
11
|
+
exports.__wbg_forEach_e1cf6f7c8ecb7dae = __wbg_forEach_e1cf6f7c8ecb7dae;
|
|
12
|
+
exports.__wbg_getAttribute_ea5166be2deba45e = __wbg_getAttribute_ea5166be2deba45e;
|
|
13
|
+
exports.__wbg_get_e27dfaeb6f46bd45 = __wbg_get_e27dfaeb6f46bd45;
|
|
14
|
+
exports.__wbg_hasAttribute_db31090c2e646f57 = __wbg_hasAttribute_db31090c2e646f57;
|
|
15
|
+
exports.__wbg_length_49b2ba67f0897e97 = __wbg_length_49b2ba67f0897e97;
|
|
16
|
+
exports.__wbg_new_363ae9575a2aba54 = __wbg_new_363ae9575a2aba54;
|
|
17
|
+
exports.__wbg_new_5e0be73521bc8c17 = __wbg_new_5e0be73521bc8c17;
|
|
18
|
+
exports.__wbg_new_8a6f238a6ece86ea = __wbg_new_8a6f238a6ece86ea;
|
|
19
|
+
exports.__wbg_nodeName_ff3aa439a5af6311 = __wbg_nodeName_ff3aa439a5af6311;
|
|
20
|
+
exports.__wbg_nodeType_5e1153141daac26a = __wbg_nodeType_5e1153141daac26a;
|
|
21
|
+
exports.__wbg_nodeValue_6ff4f14870c43bd9 = __wbg_nodeValue_6ff4f14870c43bd9;
|
|
22
|
+
exports.__wbg_parseFromString_91cbec9ba27a222a = __wbg_parseFromString_91cbec9ba27a222a;
|
|
23
|
+
exports.__wbg_set_8fc6bf8a5b1071d1 = __wbg_set_8fc6bf8a5b1071d1;
|
|
24
24
|
exports.__wbg_set_wasm = __wbg_set_wasm;
|
|
25
|
-
exports.
|
|
25
|
+
exports.__wbg_stack_0ed75d68575b0f3c = __wbg_stack_0ed75d68575b0f3c;
|
|
26
|
+
exports.__wbindgen_init_externref_table = __wbindgen_init_externref_table;
|
|
26
27
|
exports.__wbindgen_number_new = __wbindgen_number_new;
|
|
27
|
-
exports.__wbindgen_object_clone_ref = __wbindgen_object_clone_ref;
|
|
28
|
-
exports.__wbindgen_object_drop_ref = __wbindgen_object_drop_ref;
|
|
29
28
|
exports.__wbindgen_string_get = __wbindgen_string_get;
|
|
30
29
|
exports.__wbindgen_string_new = __wbindgen_string_new;
|
|
31
30
|
exports.__wbindgen_throw = __wbindgen_throw;
|
|
@@ -36,19 +35,32 @@ let wasm;
|
|
|
36
35
|
function __wbg_set_wasm(val) {
|
|
37
36
|
wasm = val;
|
|
38
37
|
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
function getObject(idx) {
|
|
42
|
-
return heap[idx];
|
|
38
|
+
function isLikeNone(x) {
|
|
39
|
+
return x === undefined || x === null;
|
|
43
40
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
function addToExternrefTable0(obj) {
|
|
42
|
+
const idx = wasm.__externref_table_alloc();
|
|
43
|
+
wasm.__wbindgen_export_1.set(idx, obj);
|
|
44
|
+
return idx;
|
|
45
|
+
}
|
|
46
|
+
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
|
47
|
+
let cachedTextDecoder = new lTextDecoder('utf-8', {
|
|
48
|
+
ignoreBOM: true,
|
|
49
|
+
fatal: true
|
|
50
|
+
});
|
|
51
|
+
cachedTextDecoder.decode();
|
|
52
|
+
let cachedUint8ArrayMemory0 = null;
|
|
53
|
+
function getUint8ArrayMemory0() {
|
|
54
|
+
if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {
|
|
55
|
+
cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);
|
|
49
56
|
}
|
|
50
|
-
return
|
|
57
|
+
return cachedUint8ArrayMemory0;
|
|
58
|
+
}
|
|
59
|
+
function getStringFromWasm0(ptr, len) {
|
|
60
|
+
ptr = ptr >>> 0;
|
|
61
|
+
return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
|
|
51
62
|
}
|
|
63
|
+
let WASM_VECTOR_LEN = 0;
|
|
52
64
|
const lTextEncoder = typeof TextEncoder === 'undefined' ? (0, module.require)('util').TextEncoder : TextEncoder;
|
|
53
65
|
let cachedTextEncoder = new lTextEncoder('utf-8');
|
|
54
66
|
const encodeString = typeof cachedTextEncoder.encodeInto === 'function' ? function (arg, view) {
|
|
@@ -65,13 +77,13 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
65
77
|
if (realloc === undefined) {
|
|
66
78
|
const buf = cachedTextEncoder.encode(arg);
|
|
67
79
|
const ptr = malloc(buf.length, 1) >>> 0;
|
|
68
|
-
|
|
80
|
+
getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);
|
|
69
81
|
WASM_VECTOR_LEN = buf.length;
|
|
70
82
|
return ptr;
|
|
71
83
|
}
|
|
72
84
|
let len = arg.length;
|
|
73
85
|
let ptr = malloc(len, 1) >>> 0;
|
|
74
|
-
const mem =
|
|
86
|
+
const mem = getUint8ArrayMemory0();
|
|
75
87
|
let offset = 0;
|
|
76
88
|
for (; offset < len; offset++) {
|
|
77
89
|
const code = arg.charCodeAt(offset);
|
|
@@ -83,7 +95,7 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
83
95
|
arg = arg.slice(offset);
|
|
84
96
|
}
|
|
85
97
|
ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;
|
|
86
|
-
const view =
|
|
98
|
+
const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);
|
|
87
99
|
const ret = encodeString(arg, view);
|
|
88
100
|
offset += ret.written;
|
|
89
101
|
ptr = realloc(ptr, len, offset, 1) >>> 0;
|
|
@@ -91,64 +103,39 @@ function passStringToWasm0(arg, malloc, realloc) {
|
|
|
91
103
|
WASM_VECTOR_LEN = offset;
|
|
92
104
|
return ptr;
|
|
93
105
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
function getInt32Memory0() {
|
|
99
|
-
if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
|
|
100
|
-
cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
|
|
106
|
+
let cachedDataViewMemory0 = null;
|
|
107
|
+
function getDataViewMemory0() {
|
|
108
|
+
if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer) {
|
|
109
|
+
cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
|
|
101
110
|
}
|
|
102
|
-
return
|
|
103
|
-
}
|
|
104
|
-
let heap_next = heap.length;
|
|
105
|
-
function dropObject(idx) {
|
|
106
|
-
if (idx < 132) return;
|
|
107
|
-
heap[idx] = heap_next;
|
|
108
|
-
heap_next = idx;
|
|
109
|
-
}
|
|
110
|
-
function takeObject(idx) {
|
|
111
|
-
const ret = getObject(idx);
|
|
112
|
-
dropObject(idx);
|
|
113
|
-
return ret;
|
|
111
|
+
return cachedDataViewMemory0;
|
|
114
112
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
ptr = ptr >>> 0;
|
|
123
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
124
|
-
}
|
|
125
|
-
function addHeapObject(obj) {
|
|
126
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
127
|
-
const idx = heap_next;
|
|
128
|
-
heap_next = heap[idx];
|
|
129
|
-
heap[idx] = obj;
|
|
130
|
-
return idx;
|
|
113
|
+
function handleError(f, args) {
|
|
114
|
+
try {
|
|
115
|
+
return f.apply(this, args);
|
|
116
|
+
} catch (e) {
|
|
117
|
+
const idx = addToExternrefTable0(e);
|
|
118
|
+
wasm.__wbindgen_exn_store(idx);
|
|
119
|
+
}
|
|
131
120
|
}
|
|
132
|
-
/**
|
|
133
|
-
*/
|
|
134
121
|
function start() {
|
|
135
122
|
wasm.start();
|
|
136
123
|
}
|
|
137
124
|
|
|
138
125
|
/**
|
|
139
|
-
* @returns {ComposerModel}
|
|
140
|
-
*/
|
|
126
|
+
* @returns {ComposerModel}
|
|
127
|
+
*/
|
|
141
128
|
function new_composer_model() {
|
|
142
129
|
const ret = wasm.composermodel_new();
|
|
143
130
|
return ComposerModel.__wrap(ret);
|
|
144
131
|
}
|
|
145
132
|
|
|
146
133
|
/**
|
|
147
|
-
* @param {string} html
|
|
148
|
-
* @param {number} start_utf16_codeunit
|
|
149
|
-
* @param {number} end_utf16_codeunit
|
|
150
|
-
* @returns {ComposerModel}
|
|
151
|
-
*/
|
|
134
|
+
* @param {string} html
|
|
135
|
+
* @param {number} start_utf16_codeunit
|
|
136
|
+
* @param {number} end_utf16_codeunit
|
|
137
|
+
* @returns {ComposerModel}
|
|
138
|
+
*/
|
|
152
139
|
function new_composer_model_from_html(html, start_utf16_codeunit, end_utf16_codeunit) {
|
|
153
140
|
const ptr0 = passStringToWasm0(html, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
154
141
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -159,43 +146,44 @@ function _assertClass(instance, klass) {
|
|
|
159
146
|
if (!(instance instanceof klass)) {
|
|
160
147
|
throw new Error(`expected instance of ${klass.name}`);
|
|
161
148
|
}
|
|
162
|
-
return instance.ptr;
|
|
163
149
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
150
|
+
function takeFromExternrefTable0(idx) {
|
|
151
|
+
const value = wasm.__wbindgen_export_1.get(idx);
|
|
152
|
+
wasm.__externref_table_dealloc(idx);
|
|
153
|
+
return value;
|
|
166
154
|
}
|
|
167
|
-
function
|
|
168
|
-
wasm.
|
|
155
|
+
function __wbg_adapter_123(arg0, arg1, arg2, arg3, arg4) {
|
|
156
|
+
wasm.closure98_externref_shim(arg0, arg1, arg2, arg3, arg4);
|
|
169
157
|
}
|
|
170
|
-
function
|
|
171
|
-
|
|
172
|
-
return f.apply(this, args);
|
|
173
|
-
} catch (e) {
|
|
174
|
-
wasm.__wbindgen_exn_store(addHeapObject(e));
|
|
175
|
-
}
|
|
158
|
+
function __wbg_adapter_126(arg0, arg1, arg2, arg3) {
|
|
159
|
+
wasm.closure101_externref_shim(arg0, arg1, arg2, arg3);
|
|
176
160
|
}
|
|
161
|
+
|
|
177
162
|
/**
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
*/
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
163
|
+
* @enum {0 | 1 | 2}
|
|
164
|
+
*/
|
|
165
|
+
const ActionState = exports.ActionState = Object.freeze({
|
|
166
|
+
/**
|
|
167
|
+
* The button can be clicked, and will perform its normal action
|
|
168
|
+
* e.g. make something bold
|
|
169
|
+
*/
|
|
170
|
+
Enabled: 0,
|
|
171
|
+
"0": "Enabled",
|
|
172
|
+
/**
|
|
173
|
+
* The button can be clicked, and will perform the reverse of its
|
|
174
|
+
* normal action e.g. stop something being bold
|
|
175
|
+
*/
|
|
176
|
+
Reversed: 1,
|
|
177
|
+
"1": "Reversed",
|
|
178
|
+
/**
|
|
179
|
+
* The button cannot be clicked
|
|
180
|
+
*/
|
|
181
|
+
Disabled: 2,
|
|
182
|
+
"2": "Disabled"
|
|
196
183
|
});
|
|
197
184
|
/**
|
|
198
|
-
|
|
185
|
+
* @enum {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13}
|
|
186
|
+
*/
|
|
199
187
|
const ComposerAction = exports.ComposerAction = Object.freeze({
|
|
200
188
|
Bold: 0,
|
|
201
189
|
"0": "Bold",
|
|
@@ -227,32 +215,32 @@ const ComposerAction = exports.ComposerAction = Object.freeze({
|
|
|
227
215
|
"13": "Quote"
|
|
228
216
|
});
|
|
229
217
|
/**
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
"
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
218
|
+
* @enum {0 | 1}
|
|
219
|
+
*/
|
|
220
|
+
const DomCreationError = exports.DomCreationError = Object.freeze({
|
|
221
|
+
HtmlParseError: 0,
|
|
222
|
+
"0": "HtmlParseError",
|
|
223
|
+
MarkdownParseError: 1,
|
|
224
|
+
"1": "MarkdownParseError"
|
|
225
|
+
});
|
|
226
|
+
/**
|
|
227
|
+
* @enum {0 | 1 | 2 | 3}
|
|
228
|
+
*/
|
|
229
|
+
const PatternKeyType = exports.PatternKeyType = Object.freeze({
|
|
230
|
+
At: 0,
|
|
231
|
+
"0": "At",
|
|
232
|
+
Hash: 1,
|
|
233
|
+
"1": "Hash",
|
|
234
|
+
Slash: 2,
|
|
235
|
+
"2": "Slash",
|
|
236
|
+
Custom: 3,
|
|
237
|
+
"3": "Custom"
|
|
249
238
|
});
|
|
239
|
+
const __wbindgen_enum_SupportedType = ["text/html", "text/xml", "application/xml", "application/xhtml+xml", "image/svg+xml"];
|
|
250
240
|
const ComposerModelFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
251
241
|
register: () => {},
|
|
252
242
|
unregister: () => {}
|
|
253
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_composermodel_free(ptr >>> 0));
|
|
254
|
-
/**
|
|
255
|
-
*/
|
|
243
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_composermodel_free(ptr >>> 0, 1));
|
|
256
244
|
class ComposerModel {
|
|
257
245
|
static __wrap(ptr) {
|
|
258
246
|
ptr = ptr >>> 0;
|
|
@@ -269,19 +257,19 @@ class ComposerModel {
|
|
|
269
257
|
}
|
|
270
258
|
free() {
|
|
271
259
|
const ptr = this.__destroy_into_raw();
|
|
272
|
-
wasm.__wbg_composermodel_free(ptr);
|
|
260
|
+
wasm.__wbg_composermodel_free(ptr, 0);
|
|
273
261
|
}
|
|
274
262
|
/**
|
|
275
|
-
|
|
276
|
-
|
|
263
|
+
* @returns {ComposerModel}
|
|
264
|
+
*/
|
|
277
265
|
static new() {
|
|
278
266
|
const ret = wasm.composermodel_new();
|
|
279
267
|
return ComposerModel.__wrap(ret);
|
|
280
268
|
}
|
|
281
269
|
/**
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
270
|
+
* @param {string} text
|
|
271
|
+
* @returns {ComposerModel}
|
|
272
|
+
*/
|
|
285
273
|
static from_example_format(text) {
|
|
286
274
|
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
287
275
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -289,160 +277,136 @@ class ComposerModel {
|
|
|
289
277
|
return ComposerModel.__wrap(ret);
|
|
290
278
|
}
|
|
291
279
|
/**
|
|
292
|
-
|
|
293
|
-
|
|
280
|
+
* @returns {string}
|
|
281
|
+
*/
|
|
294
282
|
to_example_format() {
|
|
295
283
|
let deferred1_0;
|
|
296
284
|
let deferred1_1;
|
|
297
285
|
try {
|
|
298
|
-
const
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
deferred1_0 = r0;
|
|
303
|
-
deferred1_1 = r1;
|
|
304
|
-
return getStringFromWasm0(r0, r1);
|
|
286
|
+
const ret = wasm.composermodel_to_example_format(this.__wbg_ptr);
|
|
287
|
+
deferred1_0 = ret[0];
|
|
288
|
+
deferred1_1 = ret[1];
|
|
289
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
305
290
|
} finally {
|
|
306
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
307
291
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
308
292
|
}
|
|
309
293
|
}
|
|
310
294
|
/**
|
|
311
|
-
|
|
312
|
-
|
|
295
|
+
* @returns {string}
|
|
296
|
+
*/
|
|
313
297
|
get_content_as_html() {
|
|
314
298
|
let deferred1_0;
|
|
315
299
|
let deferred1_1;
|
|
316
300
|
try {
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
deferred1_0 = r0;
|
|
322
|
-
deferred1_1 = r1;
|
|
323
|
-
return getStringFromWasm0(r0, r1);
|
|
301
|
+
const ret = wasm.composermodel_get_content_as_html(this.__wbg_ptr);
|
|
302
|
+
deferred1_0 = ret[0];
|
|
303
|
+
deferred1_1 = ret[1];
|
|
304
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
324
305
|
} finally {
|
|
325
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
326
306
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
327
307
|
}
|
|
328
308
|
}
|
|
329
309
|
/**
|
|
330
|
-
|
|
331
|
-
|
|
310
|
+
* @returns {string}
|
|
311
|
+
*/
|
|
332
312
|
get_content_as_message_html() {
|
|
333
313
|
let deferred1_0;
|
|
334
314
|
let deferred1_1;
|
|
335
315
|
try {
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
deferred1_0 = r0;
|
|
341
|
-
deferred1_1 = r1;
|
|
342
|
-
return getStringFromWasm0(r0, r1);
|
|
316
|
+
const ret = wasm.composermodel_get_content_as_message_html(this.__wbg_ptr);
|
|
317
|
+
deferred1_0 = ret[0];
|
|
318
|
+
deferred1_1 = ret[1];
|
|
319
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
343
320
|
} finally {
|
|
344
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
345
321
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
346
322
|
}
|
|
347
323
|
}
|
|
348
324
|
/**
|
|
349
|
-
|
|
350
|
-
|
|
325
|
+
* @returns {string}
|
|
326
|
+
*/
|
|
351
327
|
get_content_as_markdown() {
|
|
352
328
|
let deferred1_0;
|
|
353
329
|
let deferred1_1;
|
|
354
330
|
try {
|
|
355
|
-
const
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
deferred1_0 = r0;
|
|
360
|
-
deferred1_1 = r1;
|
|
361
|
-
return getStringFromWasm0(r0, r1);
|
|
331
|
+
const ret = wasm.composermodel_get_content_as_markdown(this.__wbg_ptr);
|
|
332
|
+
deferred1_0 = ret[0];
|
|
333
|
+
deferred1_1 = ret[1];
|
|
334
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
362
335
|
} finally {
|
|
363
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
364
336
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
365
337
|
}
|
|
366
338
|
}
|
|
367
339
|
/**
|
|
368
|
-
|
|
369
|
-
|
|
340
|
+
* @returns {string}
|
|
341
|
+
*/
|
|
370
342
|
get_content_as_message_markdown() {
|
|
371
343
|
let deferred1_0;
|
|
372
344
|
let deferred1_1;
|
|
373
345
|
try {
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
deferred1_0 = r0;
|
|
379
|
-
deferred1_1 = r1;
|
|
380
|
-
return getStringFromWasm0(r0, r1);
|
|
346
|
+
const ret = wasm.composermodel_get_content_as_message_markdown(this.__wbg_ptr);
|
|
347
|
+
deferred1_0 = ret[0];
|
|
348
|
+
deferred1_1 = ret[1];
|
|
349
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
381
350
|
} finally {
|
|
382
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
383
351
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
384
352
|
}
|
|
385
353
|
}
|
|
386
354
|
/**
|
|
387
|
-
|
|
388
|
-
|
|
355
|
+
* @returns {string}
|
|
356
|
+
*/
|
|
389
357
|
get_content_as_plain_text() {
|
|
390
358
|
let deferred1_0;
|
|
391
359
|
let deferred1_1;
|
|
392
360
|
try {
|
|
393
|
-
const
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
deferred1_0 = r0;
|
|
398
|
-
deferred1_1 = r1;
|
|
399
|
-
return getStringFromWasm0(r0, r1);
|
|
361
|
+
const ret = wasm.composermodel_get_content_as_plain_text(this.__wbg_ptr);
|
|
362
|
+
deferred1_0 = ret[0];
|
|
363
|
+
deferred1_1 = ret[1];
|
|
364
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
400
365
|
} finally {
|
|
401
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
402
366
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
403
367
|
}
|
|
404
368
|
}
|
|
405
369
|
/**
|
|
406
|
-
|
|
407
|
-
|
|
370
|
+
* @returns {DomHandle}
|
|
371
|
+
*/
|
|
408
372
|
document() {
|
|
409
373
|
const ret = wasm.composermodel_document(this.__wbg_ptr);
|
|
410
374
|
return DomHandle.__wrap(ret);
|
|
411
375
|
}
|
|
412
376
|
/**
|
|
413
|
-
|
|
414
|
-
|
|
377
|
+
* @returns {Map<any, any>}
|
|
378
|
+
*/
|
|
415
379
|
action_states() {
|
|
416
380
|
const ret = wasm.composermodel_action_states(this.__wbg_ptr);
|
|
417
|
-
return
|
|
381
|
+
return ret;
|
|
418
382
|
}
|
|
419
383
|
/**
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
384
|
+
* @param {number} start_utf16_codeunit
|
|
385
|
+
* @param {number} end_utf16_codeunit
|
|
386
|
+
* @returns {ComposerUpdate}
|
|
387
|
+
*/
|
|
424
388
|
select(start_utf16_codeunit, end_utf16_codeunit) {
|
|
425
389
|
const ret = wasm.composermodel_select(this.__wbg_ptr, start_utf16_codeunit, end_utf16_codeunit);
|
|
426
390
|
return ComposerUpdate.__wrap(ret);
|
|
427
391
|
}
|
|
428
392
|
/**
|
|
429
|
-
|
|
430
|
-
|
|
393
|
+
* @returns {number}
|
|
394
|
+
*/
|
|
431
395
|
selection_start() {
|
|
432
396
|
const ret = wasm.composermodel_selection_start(this.__wbg_ptr);
|
|
433
397
|
return ret >>> 0;
|
|
434
398
|
}
|
|
435
399
|
/**
|
|
436
|
-
|
|
437
|
-
|
|
400
|
+
* @returns {number}
|
|
401
|
+
*/
|
|
438
402
|
selection_end() {
|
|
439
403
|
const ret = wasm.composermodel_selection_end(this.__wbg_ptr);
|
|
440
404
|
return ret >>> 0;
|
|
441
405
|
}
|
|
442
406
|
/**
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
407
|
+
* @param {string} new_text
|
|
408
|
+
* @returns {ComposerUpdate}
|
|
409
|
+
*/
|
|
446
410
|
replace_text(new_text) {
|
|
447
411
|
const ptr0 = passStringToWasm0(new_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
448
412
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -450,11 +414,11 @@ class ComposerModel {
|
|
|
450
414
|
return ComposerUpdate.__wrap(ret);
|
|
451
415
|
}
|
|
452
416
|
/**
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
417
|
+
* @param {string} new_text
|
|
418
|
+
* @param {SuggestionPattern} suggestion
|
|
419
|
+
* @param {boolean} append_space
|
|
420
|
+
* @returns {ComposerUpdate}
|
|
421
|
+
*/
|
|
458
422
|
replace_text_suggestion(new_text, suggestion, append_space) {
|
|
459
423
|
const ptr0 = passStringToWasm0(new_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
460
424
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -463,275 +427,259 @@ class ComposerModel {
|
|
|
463
427
|
return ComposerUpdate.__wrap(ret);
|
|
464
428
|
}
|
|
465
429
|
/**
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
430
|
+
* @param {string} text
|
|
431
|
+
* @returns {ComposerUpdate}
|
|
432
|
+
*/
|
|
469
433
|
set_content_from_html(text) {
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
476
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
477
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
478
|
-
if (r2) {
|
|
479
|
-
throw takeObject(r1);
|
|
480
|
-
}
|
|
481
|
-
return ComposerUpdate.__wrap(r0);
|
|
482
|
-
} finally {
|
|
483
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
434
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
435
|
+
const len0 = WASM_VECTOR_LEN;
|
|
436
|
+
const ret = wasm.composermodel_set_content_from_html(this.__wbg_ptr, ptr0, len0);
|
|
437
|
+
if (ret[2]) {
|
|
438
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
484
439
|
}
|
|
440
|
+
return ComposerUpdate.__wrap(ret[0]);
|
|
485
441
|
}
|
|
486
442
|
/**
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
443
|
+
* @param {string} text
|
|
444
|
+
* @returns {ComposerUpdate}
|
|
445
|
+
*/
|
|
490
446
|
set_content_from_markdown(text) {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
497
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
498
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
499
|
-
if (r2) {
|
|
500
|
-
throw takeObject(r1);
|
|
501
|
-
}
|
|
502
|
-
return ComposerUpdate.__wrap(r0);
|
|
503
|
-
} finally {
|
|
504
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
447
|
+
const ptr0 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
448
|
+
const len0 = WASM_VECTOR_LEN;
|
|
449
|
+
const ret = wasm.composermodel_set_content_from_markdown(this.__wbg_ptr, ptr0, len0);
|
|
450
|
+
if (ret[2]) {
|
|
451
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
505
452
|
}
|
|
453
|
+
return ComposerUpdate.__wrap(ret[0]);
|
|
506
454
|
}
|
|
507
455
|
/**
|
|
508
|
-
|
|
509
|
-
|
|
456
|
+
* @returns {ComposerUpdate}
|
|
457
|
+
*/
|
|
510
458
|
clear() {
|
|
511
459
|
const ret = wasm.composermodel_clear(this.__wbg_ptr);
|
|
512
460
|
return ComposerUpdate.__wrap(ret);
|
|
513
461
|
}
|
|
514
462
|
/**
|
|
515
|
-
|
|
516
|
-
|
|
463
|
+
* @returns {ComposerUpdate}
|
|
464
|
+
*/
|
|
517
465
|
enter() {
|
|
518
466
|
const ret = wasm.composermodel_enter(this.__wbg_ptr);
|
|
519
467
|
return ComposerUpdate.__wrap(ret);
|
|
520
468
|
}
|
|
521
469
|
/**
|
|
522
|
-
|
|
523
|
-
|
|
470
|
+
* @returns {ComposerUpdate}
|
|
471
|
+
*/
|
|
524
472
|
backspace() {
|
|
525
473
|
const ret = wasm.composermodel_backspace(this.__wbg_ptr);
|
|
526
474
|
return ComposerUpdate.__wrap(ret);
|
|
527
475
|
}
|
|
528
476
|
/**
|
|
529
|
-
|
|
530
|
-
|
|
477
|
+
* @returns {ComposerUpdate}
|
|
478
|
+
*/
|
|
531
479
|
backspace_word() {
|
|
532
480
|
const ret = wasm.composermodel_backspace_word(this.__wbg_ptr);
|
|
533
481
|
return ComposerUpdate.__wrap(ret);
|
|
534
482
|
}
|
|
535
483
|
/**
|
|
536
|
-
|
|
537
|
-
|
|
484
|
+
* @returns {ComposerUpdate}
|
|
485
|
+
*/
|
|
538
486
|
delete() {
|
|
539
487
|
const ret = wasm.composermodel_delete(this.__wbg_ptr);
|
|
540
488
|
return ComposerUpdate.__wrap(ret);
|
|
541
489
|
}
|
|
542
490
|
/**
|
|
543
|
-
|
|
544
|
-
|
|
491
|
+
* @returns {ComposerUpdate}
|
|
492
|
+
*/
|
|
545
493
|
delete_word() {
|
|
546
494
|
const ret = wasm.composermodel_delete_word(this.__wbg_ptr);
|
|
547
495
|
return ComposerUpdate.__wrap(ret);
|
|
548
496
|
}
|
|
549
497
|
/**
|
|
550
|
-
|
|
551
|
-
|
|
498
|
+
* @returns {ComposerUpdate}
|
|
499
|
+
*/
|
|
552
500
|
bold() {
|
|
553
501
|
const ret = wasm.composermodel_bold(this.__wbg_ptr);
|
|
554
502
|
return ComposerUpdate.__wrap(ret);
|
|
555
503
|
}
|
|
556
504
|
/**
|
|
557
|
-
|
|
558
|
-
|
|
505
|
+
* @returns {ComposerUpdate}
|
|
506
|
+
*/
|
|
559
507
|
italic() {
|
|
560
508
|
const ret = wasm.composermodel_italic(this.__wbg_ptr);
|
|
561
509
|
return ComposerUpdate.__wrap(ret);
|
|
562
510
|
}
|
|
563
511
|
/**
|
|
564
|
-
|
|
565
|
-
|
|
512
|
+
* @returns {ComposerUpdate}
|
|
513
|
+
*/
|
|
566
514
|
strike_through() {
|
|
567
515
|
const ret = wasm.composermodel_strike_through(this.__wbg_ptr);
|
|
568
516
|
return ComposerUpdate.__wrap(ret);
|
|
569
517
|
}
|
|
570
518
|
/**
|
|
571
|
-
|
|
572
|
-
|
|
519
|
+
* @returns {ComposerUpdate}
|
|
520
|
+
*/
|
|
573
521
|
underline() {
|
|
574
522
|
const ret = wasm.composermodel_underline(this.__wbg_ptr);
|
|
575
523
|
return ComposerUpdate.__wrap(ret);
|
|
576
524
|
}
|
|
577
525
|
/**
|
|
578
|
-
|
|
579
|
-
|
|
526
|
+
* @returns {ComposerUpdate}
|
|
527
|
+
*/
|
|
580
528
|
quote() {
|
|
581
529
|
const ret = wasm.composermodel_quote(this.__wbg_ptr);
|
|
582
530
|
return ComposerUpdate.__wrap(ret);
|
|
583
531
|
}
|
|
584
532
|
/**
|
|
585
|
-
|
|
586
|
-
|
|
533
|
+
* @returns {ComposerUpdate}
|
|
534
|
+
*/
|
|
587
535
|
inline_code() {
|
|
588
536
|
const ret = wasm.composermodel_inline_code(this.__wbg_ptr);
|
|
589
537
|
return ComposerUpdate.__wrap(ret);
|
|
590
538
|
}
|
|
591
539
|
/**
|
|
592
|
-
|
|
593
|
-
|
|
540
|
+
* @returns {ComposerUpdate}
|
|
541
|
+
*/
|
|
594
542
|
code_block() {
|
|
595
543
|
const ret = wasm.composermodel_code_block(this.__wbg_ptr);
|
|
596
544
|
return ComposerUpdate.__wrap(ret);
|
|
597
545
|
}
|
|
598
546
|
/**
|
|
599
|
-
|
|
600
|
-
|
|
547
|
+
* @returns {ComposerUpdate}
|
|
548
|
+
*/
|
|
601
549
|
undo() {
|
|
602
550
|
const ret = wasm.composermodel_undo(this.__wbg_ptr);
|
|
603
551
|
return ComposerUpdate.__wrap(ret);
|
|
604
552
|
}
|
|
605
553
|
/**
|
|
606
|
-
|
|
607
|
-
|
|
554
|
+
* @returns {ComposerUpdate}
|
|
555
|
+
*/
|
|
608
556
|
redo() {
|
|
609
557
|
const ret = wasm.composermodel_redo(this.__wbg_ptr);
|
|
610
558
|
return ComposerUpdate.__wrap(ret);
|
|
611
559
|
}
|
|
612
560
|
/**
|
|
613
|
-
|
|
614
|
-
|
|
561
|
+
* @returns {ComposerUpdate}
|
|
562
|
+
*/
|
|
615
563
|
ordered_list() {
|
|
616
564
|
const ret = wasm.composermodel_ordered_list(this.__wbg_ptr);
|
|
617
565
|
return ComposerUpdate.__wrap(ret);
|
|
618
566
|
}
|
|
619
567
|
/**
|
|
620
|
-
|
|
621
|
-
|
|
568
|
+
* @returns {ComposerUpdate}
|
|
569
|
+
*/
|
|
622
570
|
unordered_list() {
|
|
623
571
|
const ret = wasm.composermodel_unordered_list(this.__wbg_ptr);
|
|
624
572
|
return ComposerUpdate.__wrap(ret);
|
|
625
573
|
}
|
|
626
574
|
/**
|
|
627
|
-
|
|
628
|
-
|
|
575
|
+
* @returns {ComposerUpdate}
|
|
576
|
+
*/
|
|
629
577
|
indent() {
|
|
630
578
|
const ret = wasm.composermodel_indent(this.__wbg_ptr);
|
|
631
579
|
return ComposerUpdate.__wrap(ret);
|
|
632
580
|
}
|
|
633
581
|
/**
|
|
634
|
-
|
|
635
|
-
|
|
582
|
+
* @returns {ComposerUpdate}
|
|
583
|
+
*/
|
|
636
584
|
unindent() {
|
|
637
585
|
const ret = wasm.composermodel_unindent(this.__wbg_ptr);
|
|
638
586
|
return ComposerUpdate.__wrap(ret);
|
|
639
587
|
}
|
|
640
588
|
/**
|
|
641
|
-
|
|
642
|
-
|
|
589
|
+
* @returns {LinkAction}
|
|
590
|
+
*/
|
|
643
591
|
get_link_action() {
|
|
644
592
|
const ret = wasm.composermodel_get_link_action(this.__wbg_ptr);
|
|
645
593
|
return LinkAction.__wrap(ret);
|
|
646
594
|
}
|
|
647
595
|
/**
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
596
|
+
* @param {string} url
|
|
597
|
+
* @param {Map<any, any>} attributes
|
|
598
|
+
* @returns {ComposerUpdate}
|
|
599
|
+
*/
|
|
652
600
|
set_link(url, attributes) {
|
|
653
601
|
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
654
602
|
const len0 = WASM_VECTOR_LEN;
|
|
655
|
-
const ret = wasm.composermodel_set_link(this.__wbg_ptr, ptr0, len0,
|
|
603
|
+
const ret = wasm.composermodel_set_link(this.__wbg_ptr, ptr0, len0, attributes);
|
|
656
604
|
return ComposerUpdate.__wrap(ret);
|
|
657
605
|
}
|
|
658
606
|
/**
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
607
|
+
* @param {string} url
|
|
608
|
+
* @param {string} text
|
|
609
|
+
* @param {Map<any, any>} attributes
|
|
610
|
+
* @returns {ComposerUpdate}
|
|
611
|
+
*/
|
|
664
612
|
set_link_with_text(url, text, attributes) {
|
|
665
613
|
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
666
614
|
const len0 = WASM_VECTOR_LEN;
|
|
667
615
|
const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
668
616
|
const len1 = WASM_VECTOR_LEN;
|
|
669
|
-
const ret = wasm.composermodel_set_link_with_text(this.__wbg_ptr, ptr0, len0, ptr1, len1,
|
|
617
|
+
const ret = wasm.composermodel_set_link_with_text(this.__wbg_ptr, ptr0, len0, ptr1, len1, attributes);
|
|
670
618
|
return ComposerUpdate.__wrap(ret);
|
|
671
619
|
}
|
|
672
620
|
/**
|
|
673
|
-
|
|
674
|
-
|
|
621
|
+
* @param {Array<any>} custom_suggestion_patterns
|
|
622
|
+
*/
|
|
675
623
|
set_custom_suggestion_patterns(custom_suggestion_patterns) {
|
|
676
|
-
wasm.composermodel_set_custom_suggestion_patterns(this.__wbg_ptr,
|
|
624
|
+
wasm.composermodel_set_custom_suggestion_patterns(this.__wbg_ptr, custom_suggestion_patterns);
|
|
677
625
|
}
|
|
678
626
|
/**
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
627
|
+
* Creates an at-room mention node and inserts it into the composer at the current selection
|
|
628
|
+
* @param {Map<any, any>} attributes
|
|
629
|
+
* @returns {ComposerUpdate}
|
|
630
|
+
*/
|
|
683
631
|
insert_at_room_mention(attributes) {
|
|
684
|
-
const ret = wasm.composermodel_insert_at_room_mention(this.__wbg_ptr,
|
|
632
|
+
const ret = wasm.composermodel_insert_at_room_mention(this.__wbg_ptr, attributes);
|
|
685
633
|
return ComposerUpdate.__wrap(ret);
|
|
686
634
|
}
|
|
687
635
|
/**
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
636
|
+
* Creates a mention node and inserts it into the composer at the current selection
|
|
637
|
+
* @param {string} url
|
|
638
|
+
* @param {string} text
|
|
639
|
+
* @param {Map<any, any>} attributes
|
|
640
|
+
* @returns {ComposerUpdate}
|
|
641
|
+
*/
|
|
694
642
|
insert_mention(url, text, attributes) {
|
|
695
643
|
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
696
644
|
const len0 = WASM_VECTOR_LEN;
|
|
697
645
|
const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
698
646
|
const len1 = WASM_VECTOR_LEN;
|
|
699
|
-
const ret = wasm.composermodel_insert_mention(this.__wbg_ptr, ptr0, len0, ptr1, len1,
|
|
647
|
+
const ret = wasm.composermodel_insert_mention(this.__wbg_ptr, ptr0, len0, ptr1, len1, attributes);
|
|
700
648
|
return ComposerUpdate.__wrap(ret);
|
|
701
649
|
}
|
|
702
650
|
/**
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
651
|
+
* Creates an at-room mention node and inserts it into the composer, replacing the
|
|
652
|
+
* text content defined by the suggestion
|
|
653
|
+
* @param {SuggestionPattern} suggestion
|
|
654
|
+
* @param {Map<any, any>} attributes
|
|
655
|
+
* @returns {ComposerUpdate}
|
|
656
|
+
*/
|
|
709
657
|
insert_at_room_mention_at_suggestion(suggestion, attributes) {
|
|
710
658
|
_assertClass(suggestion, SuggestionPattern);
|
|
711
|
-
const ret = wasm.composermodel_insert_at_room_mention_at_suggestion(this.__wbg_ptr, suggestion.__wbg_ptr,
|
|
659
|
+
const ret = wasm.composermodel_insert_at_room_mention_at_suggestion(this.__wbg_ptr, suggestion.__wbg_ptr, attributes);
|
|
712
660
|
return ComposerUpdate.__wrap(ret);
|
|
713
661
|
}
|
|
714
662
|
/**
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
663
|
+
* Creates a mention node and inserts it into the composer, replacing the
|
|
664
|
+
* text content defined by the suggestion
|
|
665
|
+
* @param {string} url
|
|
666
|
+
* @param {string} text
|
|
667
|
+
* @param {SuggestionPattern} suggestion
|
|
668
|
+
* @param {Map<any, any>} attributes
|
|
669
|
+
* @returns {ComposerUpdate}
|
|
670
|
+
*/
|
|
723
671
|
insert_mention_at_suggestion(url, text, suggestion, attributes) {
|
|
724
672
|
const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
725
673
|
const len0 = WASM_VECTOR_LEN;
|
|
726
674
|
const ptr1 = passStringToWasm0(text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
727
675
|
const len1 = WASM_VECTOR_LEN;
|
|
728
676
|
_assertClass(suggestion, SuggestionPattern);
|
|
729
|
-
const ret = wasm.composermodel_insert_mention_at_suggestion(this.__wbg_ptr, ptr0, len0, ptr1, len1, suggestion.__wbg_ptr,
|
|
677
|
+
const ret = wasm.composermodel_insert_mention_at_suggestion(this.__wbg_ptr, ptr0, len0, ptr1, len1, suggestion.__wbg_ptr, attributes);
|
|
730
678
|
return ComposerUpdate.__wrap(ret);
|
|
731
679
|
}
|
|
732
680
|
/**
|
|
733
|
-
|
|
734
|
-
|
|
681
|
+
* @returns {ComposerUpdate}
|
|
682
|
+
*/
|
|
735
683
|
remove_links() {
|
|
736
684
|
const ret = wasm.composermodel_remove_links(this.__wbg_ptr);
|
|
737
685
|
return ComposerUpdate.__wrap(ret);
|
|
@@ -741,9 +689,7 @@ exports.ComposerModel = ComposerModel;
|
|
|
741
689
|
const ComposerUpdateFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
742
690
|
register: () => {},
|
|
743
691
|
unregister: () => {}
|
|
744
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_composerupdate_free(ptr >>> 0));
|
|
745
|
-
/**
|
|
746
|
-
*/
|
|
692
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_composerupdate_free(ptr >>> 0, 1));
|
|
747
693
|
class ComposerUpdate {
|
|
748
694
|
static __wrap(ptr) {
|
|
749
695
|
ptr = ptr >>> 0;
|
|
@@ -760,25 +706,25 @@ class ComposerUpdate {
|
|
|
760
706
|
}
|
|
761
707
|
free() {
|
|
762
708
|
const ptr = this.__destroy_into_raw();
|
|
763
|
-
wasm.__wbg_composerupdate_free(ptr);
|
|
709
|
+
wasm.__wbg_composerupdate_free(ptr, 0);
|
|
764
710
|
}
|
|
765
711
|
/**
|
|
766
|
-
|
|
767
|
-
|
|
712
|
+
* @returns {TextUpdate}
|
|
713
|
+
*/
|
|
768
714
|
text_update() {
|
|
769
715
|
const ret = wasm.composerupdate_text_update(this.__wbg_ptr);
|
|
770
716
|
return TextUpdate.__wrap(ret);
|
|
771
717
|
}
|
|
772
718
|
/**
|
|
773
|
-
|
|
774
|
-
|
|
719
|
+
* @returns {MenuState}
|
|
720
|
+
*/
|
|
775
721
|
menu_state() {
|
|
776
722
|
const ret = wasm.composerupdate_menu_state(this.__wbg_ptr);
|
|
777
723
|
return MenuState.__wrap(ret);
|
|
778
724
|
}
|
|
779
725
|
/**
|
|
780
|
-
|
|
781
|
-
|
|
726
|
+
* @returns {MenuAction}
|
|
727
|
+
*/
|
|
782
728
|
menu_action() {
|
|
783
729
|
const ret = wasm.composerupdate_menu_action(this.__wbg_ptr);
|
|
784
730
|
return MenuAction.__wrap(ret);
|
|
@@ -788,9 +734,7 @@ exports.ComposerUpdate = ComposerUpdate;
|
|
|
788
734
|
const CreateFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
789
735
|
register: () => {},
|
|
790
736
|
unregister: () => {}
|
|
791
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_create_free(ptr >>> 0));
|
|
792
|
-
/**
|
|
793
|
-
*/
|
|
737
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_create_free(ptr >>> 0, 1));
|
|
794
738
|
class Create {
|
|
795
739
|
static __wrap(ptr) {
|
|
796
740
|
ptr = ptr >>> 0;
|
|
@@ -807,16 +751,14 @@ class Create {
|
|
|
807
751
|
}
|
|
808
752
|
free() {
|
|
809
753
|
const ptr = this.__destroy_into_raw();
|
|
810
|
-
wasm.__wbg_create_free(ptr);
|
|
754
|
+
wasm.__wbg_create_free(ptr, 0);
|
|
811
755
|
}
|
|
812
756
|
}
|
|
813
757
|
exports.Create = Create;
|
|
814
758
|
const CreateWithTextFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
815
759
|
register: () => {},
|
|
816
760
|
unregister: () => {}
|
|
817
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_createwithtext_free(ptr >>> 0));
|
|
818
|
-
/**
|
|
819
|
-
*/
|
|
761
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_createwithtext_free(ptr >>> 0, 1));
|
|
820
762
|
class CreateWithText {
|
|
821
763
|
static __wrap(ptr) {
|
|
822
764
|
ptr = ptr >>> 0;
|
|
@@ -833,16 +775,14 @@ class CreateWithText {
|
|
|
833
775
|
}
|
|
834
776
|
free() {
|
|
835
777
|
const ptr = this.__destroy_into_raw();
|
|
836
|
-
wasm.__wbg_createwithtext_free(ptr);
|
|
778
|
+
wasm.__wbg_createwithtext_free(ptr, 0);
|
|
837
779
|
}
|
|
838
780
|
}
|
|
839
781
|
exports.CreateWithText = CreateWithText;
|
|
840
782
|
const DisabledFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
841
783
|
register: () => {},
|
|
842
784
|
unregister: () => {}
|
|
843
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_disabled_free(ptr >>> 0));
|
|
844
|
-
/**
|
|
845
|
-
*/
|
|
785
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_disabled_free(ptr >>> 0, 1));
|
|
846
786
|
class Disabled {
|
|
847
787
|
static __wrap(ptr) {
|
|
848
788
|
ptr = ptr >>> 0;
|
|
@@ -859,18 +799,18 @@ class Disabled {
|
|
|
859
799
|
}
|
|
860
800
|
free() {
|
|
861
801
|
const ptr = this.__destroy_into_raw();
|
|
862
|
-
wasm.__wbg_disabled_free(ptr);
|
|
802
|
+
wasm.__wbg_disabled_free(ptr, 0);
|
|
863
803
|
}
|
|
864
804
|
}
|
|
865
805
|
exports.Disabled = Disabled;
|
|
866
806
|
const DomChildrenFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
867
807
|
register: () => {},
|
|
868
808
|
unregister: () => {}
|
|
869
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_domchildren_free(ptr >>> 0));
|
|
809
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_domchildren_free(ptr >>> 0, 1));
|
|
870
810
|
/**
|
|
871
|
-
* An iterator-like view of a DomHandle's children, written to work around
|
|
872
|
-
* the lack of support for returning Vec<T> in wasm_bindgen.
|
|
873
|
-
*/
|
|
811
|
+
* An iterator-like view of a DomHandle's children, written to work around
|
|
812
|
+
* the lack of support for returning Vec<T> in wasm_bindgen.
|
|
813
|
+
*/
|
|
874
814
|
class DomChildren {
|
|
875
815
|
static __wrap(ptr) {
|
|
876
816
|
ptr = ptr >>> 0;
|
|
@@ -887,11 +827,11 @@ class DomChildren {
|
|
|
887
827
|
}
|
|
888
828
|
free() {
|
|
889
829
|
const ptr = this.__destroy_into_raw();
|
|
890
|
-
wasm.__wbg_domchildren_free(ptr);
|
|
830
|
+
wasm.__wbg_domchildren_free(ptr, 0);
|
|
891
831
|
}
|
|
892
832
|
/**
|
|
893
|
-
|
|
894
|
-
|
|
833
|
+
* @returns {DomHandle | undefined}
|
|
834
|
+
*/
|
|
895
835
|
next_child() {
|
|
896
836
|
const ret = wasm.domchildren_next_child(this.__wbg_ptr);
|
|
897
837
|
return ret === 0 ? undefined : DomHandle.__wrap(ret);
|
|
@@ -901,10 +841,10 @@ exports.DomChildren = DomChildren;
|
|
|
901
841
|
const DomHandleFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
902
842
|
register: () => {},
|
|
903
843
|
unregister: () => {}
|
|
904
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_domhandle_free(ptr >>> 0));
|
|
844
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_domhandle_free(ptr >>> 0, 1));
|
|
905
845
|
/**
|
|
906
|
-
* Refers to a node in the composer model.
|
|
907
|
-
*/
|
|
846
|
+
* Refers to a node in the composer model.
|
|
847
|
+
*/
|
|
908
848
|
class DomHandle {
|
|
909
849
|
static __wrap(ptr) {
|
|
910
850
|
ptr = ptr >>> 0;
|
|
@@ -921,96 +861,84 @@ class DomHandle {
|
|
|
921
861
|
}
|
|
922
862
|
free() {
|
|
923
863
|
const ptr = this.__destroy_into_raw();
|
|
924
|
-
wasm.__wbg_domhandle_free(ptr);
|
|
864
|
+
wasm.__wbg_domhandle_free(ptr, 0);
|
|
925
865
|
}
|
|
926
866
|
/**
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
867
|
+
* Returns "container", "line_break", "text" or "zwsp" depending on the type of
|
|
868
|
+
* node we refer to.
|
|
869
|
+
* Panics if we are not a valid reference (because the model has changed
|
|
870
|
+
* since we were created, or because you passed in a different model
|
|
871
|
+
* from the one that created us.)
|
|
872
|
+
* @param {ComposerModel} model
|
|
873
|
+
* @returns {string}
|
|
874
|
+
*/
|
|
935
875
|
node_type(model) {
|
|
936
876
|
let deferred1_0;
|
|
937
877
|
let deferred1_1;
|
|
938
878
|
try {
|
|
939
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
940
879
|
_assertClass(model, ComposerModel);
|
|
941
|
-
wasm.domhandle_node_type(
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
deferred1_1 = r1;
|
|
946
|
-
return getStringFromWasm0(r0, r1);
|
|
880
|
+
const ret = wasm.domhandle_node_type(this.__wbg_ptr, model.__wbg_ptr);
|
|
881
|
+
deferred1_0 = ret[0];
|
|
882
|
+
deferred1_1 = ret[1];
|
|
883
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
947
884
|
} finally {
|
|
948
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
949
885
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
950
886
|
}
|
|
951
887
|
}
|
|
952
888
|
/**
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
889
|
+
* Returns a list of our children nodes, or an empty list if we refer
|
|
890
|
+
* to a text or line break node.
|
|
891
|
+
* Panics if we are not a valid reference (because the model has changed
|
|
892
|
+
* since we were created, or because you passed in a different model
|
|
893
|
+
* from the one that created us.)
|
|
894
|
+
* @param {ComposerModel} model
|
|
895
|
+
* @returns {DomChildren}
|
|
896
|
+
*/
|
|
961
897
|
children(model) {
|
|
962
898
|
_assertClass(model, ComposerModel);
|
|
963
899
|
const ret = wasm.domhandle_children(this.__wbg_ptr, model.__wbg_ptr);
|
|
964
900
|
return DomChildren.__wrap(ret);
|
|
965
901
|
}
|
|
966
902
|
/**
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
903
|
+
* Returns the text of this node, or an empty string if this is a
|
|
904
|
+
* container or line break.
|
|
905
|
+
* Panics if we are not a valid reference (because the model has changed
|
|
906
|
+
* since we were created, or because you passed in a different model
|
|
907
|
+
* from the one that created us.)
|
|
908
|
+
* @param {ComposerModel} model
|
|
909
|
+
* @returns {string}
|
|
910
|
+
*/
|
|
975
911
|
text(model) {
|
|
976
912
|
let deferred1_0;
|
|
977
913
|
let deferred1_1;
|
|
978
914
|
try {
|
|
979
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
980
915
|
_assertClass(model, ComposerModel);
|
|
981
|
-
wasm.domhandle_text(
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
deferred1_1 = r1;
|
|
986
|
-
return getStringFromWasm0(r0, r1);
|
|
916
|
+
const ret = wasm.domhandle_text(this.__wbg_ptr, model.__wbg_ptr);
|
|
917
|
+
deferred1_0 = ret[0];
|
|
918
|
+
deferred1_1 = ret[1];
|
|
919
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
987
920
|
} finally {
|
|
988
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
989
921
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
990
922
|
}
|
|
991
923
|
}
|
|
992
924
|
/**
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
925
|
+
* Returns our tagname, or "-text-"/"-zwsp-" if we are a text/zwsp node.
|
|
926
|
+
* Panics if we are not a valid reference (because the model has changed
|
|
927
|
+
* since we were created, or because you passed in a different model
|
|
928
|
+
* from the one that created us.)
|
|
929
|
+
* @param {ComposerModel} model
|
|
930
|
+
* @returns {string}
|
|
931
|
+
*/
|
|
1000
932
|
tag(model) {
|
|
1001
933
|
let deferred1_0;
|
|
1002
934
|
let deferred1_1;
|
|
1003
935
|
try {
|
|
1004
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1005
936
|
_assertClass(model, ComposerModel);
|
|
1006
|
-
wasm.domhandle_tag(
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
deferred1_1 = r1;
|
|
1011
|
-
return getStringFromWasm0(r0, r1);
|
|
937
|
+
const ret = wasm.domhandle_tag(this.__wbg_ptr, model.__wbg_ptr);
|
|
938
|
+
deferred1_0 = ret[0];
|
|
939
|
+
deferred1_1 = ret[1];
|
|
940
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1012
941
|
} finally {
|
|
1013
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1014
942
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1015
943
|
}
|
|
1016
944
|
}
|
|
@@ -1019,9 +947,7 @@ exports.DomHandle = DomHandle;
|
|
|
1019
947
|
const EditFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
1020
948
|
register: () => {},
|
|
1021
949
|
unregister: () => {}
|
|
1022
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_edit_free(ptr >>> 0));
|
|
1023
|
-
/**
|
|
1024
|
-
*/
|
|
950
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_edit_free(ptr >>> 0, 1));
|
|
1025
951
|
class Edit {
|
|
1026
952
|
static __wrap(ptr) {
|
|
1027
953
|
ptr = ptr >>> 0;
|
|
@@ -1038,30 +964,26 @@ class Edit {
|
|
|
1038
964
|
}
|
|
1039
965
|
free() {
|
|
1040
966
|
const ptr = this.__destroy_into_raw();
|
|
1041
|
-
wasm.__wbg_edit_free(ptr);
|
|
967
|
+
wasm.__wbg_edit_free(ptr, 0);
|
|
1042
968
|
}
|
|
1043
969
|
/**
|
|
1044
|
-
|
|
1045
|
-
|
|
970
|
+
* @returns {string}
|
|
971
|
+
*/
|
|
1046
972
|
get url() {
|
|
1047
973
|
let deferred1_0;
|
|
1048
974
|
let deferred1_1;
|
|
1049
975
|
try {
|
|
1050
|
-
const
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
deferred1_0 = r0;
|
|
1055
|
-
deferred1_1 = r1;
|
|
1056
|
-
return getStringFromWasm0(r0, r1);
|
|
976
|
+
const ret = wasm.__wbg_get_edit_url(this.__wbg_ptr);
|
|
977
|
+
deferred1_0 = ret[0];
|
|
978
|
+
deferred1_1 = ret[1];
|
|
979
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1057
980
|
} finally {
|
|
1058
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1059
981
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1060
982
|
}
|
|
1061
983
|
}
|
|
1062
984
|
/**
|
|
1063
|
-
|
|
1064
|
-
|
|
985
|
+
* @param {string} arg0
|
|
986
|
+
*/
|
|
1065
987
|
set url(arg0) {
|
|
1066
988
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1067
989
|
const len0 = WASM_VECTOR_LEN;
|
|
@@ -1072,9 +994,7 @@ exports.Edit = Edit;
|
|
|
1072
994
|
const KeepFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
1073
995
|
register: () => {},
|
|
1074
996
|
unregister: () => {}
|
|
1075
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_keep_free(ptr >>> 0));
|
|
1076
|
-
/**
|
|
1077
|
-
*/
|
|
997
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_keep_free(ptr >>> 0, 1));
|
|
1078
998
|
class Keep {
|
|
1079
999
|
static __wrap(ptr) {
|
|
1080
1000
|
ptr = ptr >>> 0;
|
|
@@ -1091,16 +1011,14 @@ class Keep {
|
|
|
1091
1011
|
}
|
|
1092
1012
|
free() {
|
|
1093
1013
|
const ptr = this.__destroy_into_raw();
|
|
1094
|
-
wasm.__wbg_keep_free(ptr);
|
|
1014
|
+
wasm.__wbg_keep_free(ptr, 0);
|
|
1095
1015
|
}
|
|
1096
1016
|
}
|
|
1097
1017
|
exports.Keep = Keep;
|
|
1098
1018
|
const LinkActionFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
1099
1019
|
register: () => {},
|
|
1100
1020
|
unregister: () => {}
|
|
1101
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_linkaction_free(ptr >>> 0));
|
|
1102
|
-
/**
|
|
1103
|
-
*/
|
|
1021
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_linkaction_free(ptr >>> 0, 1));
|
|
1104
1022
|
class LinkAction {
|
|
1105
1023
|
static __wrap(ptr) {
|
|
1106
1024
|
ptr = ptr >>> 0;
|
|
@@ -1117,18 +1035,18 @@ class LinkAction {
|
|
|
1117
1035
|
}
|
|
1118
1036
|
free() {
|
|
1119
1037
|
const ptr = this.__destroy_into_raw();
|
|
1120
|
-
wasm.__wbg_linkaction_free(ptr);
|
|
1038
|
+
wasm.__wbg_linkaction_free(ptr, 0);
|
|
1121
1039
|
}
|
|
1122
1040
|
/**
|
|
1123
|
-
|
|
1124
|
-
|
|
1041
|
+
* @returns {CreateWithText | undefined}
|
|
1042
|
+
*/
|
|
1125
1043
|
get create_with_text() {
|
|
1126
1044
|
const ret = wasm.__wbg_get_linkaction_create_with_text(this.__wbg_ptr);
|
|
1127
1045
|
return ret === 0 ? undefined : CreateWithText.__wrap(ret);
|
|
1128
1046
|
}
|
|
1129
1047
|
/**
|
|
1130
|
-
|
|
1131
|
-
|
|
1048
|
+
* @param {CreateWithText | null} [arg0]
|
|
1049
|
+
*/
|
|
1132
1050
|
set create_with_text(arg0) {
|
|
1133
1051
|
let ptr0 = 0;
|
|
1134
1052
|
if (!isLikeNone(arg0)) {
|
|
@@ -1138,15 +1056,15 @@ class LinkAction {
|
|
|
1138
1056
|
wasm.__wbg_set_linkaction_create_with_text(this.__wbg_ptr, ptr0);
|
|
1139
1057
|
}
|
|
1140
1058
|
/**
|
|
1141
|
-
|
|
1142
|
-
|
|
1059
|
+
* @returns {Create | undefined}
|
|
1060
|
+
*/
|
|
1143
1061
|
get create() {
|
|
1144
1062
|
const ret = wasm.__wbg_get_linkaction_create(this.__wbg_ptr);
|
|
1145
1063
|
return ret === 0 ? undefined : Create.__wrap(ret);
|
|
1146
1064
|
}
|
|
1147
1065
|
/**
|
|
1148
|
-
|
|
1149
|
-
|
|
1066
|
+
* @param {Create | null} [arg0]
|
|
1067
|
+
*/
|
|
1150
1068
|
set create(arg0) {
|
|
1151
1069
|
let ptr0 = 0;
|
|
1152
1070
|
if (!isLikeNone(arg0)) {
|
|
@@ -1156,15 +1074,15 @@ class LinkAction {
|
|
|
1156
1074
|
wasm.__wbg_set_linkaction_create(this.__wbg_ptr, ptr0);
|
|
1157
1075
|
}
|
|
1158
1076
|
/**
|
|
1159
|
-
|
|
1160
|
-
|
|
1077
|
+
* @returns {Edit | undefined}
|
|
1078
|
+
*/
|
|
1161
1079
|
get edit_link() {
|
|
1162
1080
|
const ret = wasm.__wbg_get_linkaction_edit_link(this.__wbg_ptr);
|
|
1163
1081
|
return ret === 0 ? undefined : Edit.__wrap(ret);
|
|
1164
1082
|
}
|
|
1165
1083
|
/**
|
|
1166
|
-
|
|
1167
|
-
|
|
1084
|
+
* @param {Edit | null} [arg0]
|
|
1085
|
+
*/
|
|
1168
1086
|
set edit_link(arg0) {
|
|
1169
1087
|
let ptr0 = 0;
|
|
1170
1088
|
if (!isLikeNone(arg0)) {
|
|
@@ -1174,15 +1092,15 @@ class LinkAction {
|
|
|
1174
1092
|
wasm.__wbg_set_linkaction_edit_link(this.__wbg_ptr, ptr0);
|
|
1175
1093
|
}
|
|
1176
1094
|
/**
|
|
1177
|
-
|
|
1178
|
-
|
|
1095
|
+
* @returns {Disabled | undefined}
|
|
1096
|
+
*/
|
|
1179
1097
|
get disabled() {
|
|
1180
1098
|
const ret = wasm.__wbg_get_linkaction_disabled(this.__wbg_ptr);
|
|
1181
1099
|
return ret === 0 ? undefined : Disabled.__wrap(ret);
|
|
1182
1100
|
}
|
|
1183
1101
|
/**
|
|
1184
|
-
|
|
1185
|
-
|
|
1102
|
+
* @param {Disabled | null} [arg0]
|
|
1103
|
+
*/
|
|
1186
1104
|
set disabled(arg0) {
|
|
1187
1105
|
let ptr0 = 0;
|
|
1188
1106
|
if (!isLikeNone(arg0)) {
|
|
@@ -1196,9 +1114,7 @@ exports.LinkAction = LinkAction;
|
|
|
1196
1114
|
const MenuActionFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
1197
1115
|
register: () => {},
|
|
1198
1116
|
unregister: () => {}
|
|
1199
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_menuaction_free(ptr >>> 0));
|
|
1200
|
-
/**
|
|
1201
|
-
*/
|
|
1117
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_menuaction_free(ptr >>> 0, 1));
|
|
1202
1118
|
class MenuAction {
|
|
1203
1119
|
static __wrap(ptr) {
|
|
1204
1120
|
ptr = ptr >>> 0;
|
|
@@ -1215,25 +1131,25 @@ class MenuAction {
|
|
|
1215
1131
|
}
|
|
1216
1132
|
free() {
|
|
1217
1133
|
const ptr = this.__destroy_into_raw();
|
|
1218
|
-
wasm.__wbg_menuaction_free(ptr);
|
|
1134
|
+
wasm.__wbg_menuaction_free(ptr, 0);
|
|
1219
1135
|
}
|
|
1220
1136
|
/**
|
|
1221
|
-
|
|
1222
|
-
|
|
1137
|
+
* @returns {boolean}
|
|
1138
|
+
*/
|
|
1223
1139
|
keep() {
|
|
1224
1140
|
const ret = wasm.menuaction_keep(this.__wbg_ptr);
|
|
1225
1141
|
return ret !== 0;
|
|
1226
1142
|
}
|
|
1227
1143
|
/**
|
|
1228
|
-
|
|
1229
|
-
|
|
1144
|
+
* @returns {boolean}
|
|
1145
|
+
*/
|
|
1230
1146
|
none() {
|
|
1231
1147
|
const ret = wasm.menuaction_none(this.__wbg_ptr);
|
|
1232
1148
|
return ret !== 0;
|
|
1233
1149
|
}
|
|
1234
1150
|
/**
|
|
1235
|
-
|
|
1236
|
-
|
|
1151
|
+
* @returns {MenuActionSuggestion | undefined}
|
|
1152
|
+
*/
|
|
1237
1153
|
suggestion() {
|
|
1238
1154
|
const ret = wasm.menuaction_suggestion(this.__wbg_ptr);
|
|
1239
1155
|
return ret === 0 ? undefined : MenuActionSuggestion.__wrap(ret);
|
|
@@ -1243,9 +1159,7 @@ exports.MenuAction = MenuAction;
|
|
|
1243
1159
|
const MenuActionSuggestionFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
1244
1160
|
register: () => {},
|
|
1245
1161
|
unregister: () => {}
|
|
1246
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_menuactionsuggestion_free(ptr >>> 0));
|
|
1247
|
-
/**
|
|
1248
|
-
*/
|
|
1162
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_menuactionsuggestion_free(ptr >>> 0, 1));
|
|
1249
1163
|
class MenuActionSuggestion {
|
|
1250
1164
|
static __wrap(ptr) {
|
|
1251
1165
|
ptr = ptr >>> 0;
|
|
@@ -1262,18 +1176,18 @@ class MenuActionSuggestion {
|
|
|
1262
1176
|
}
|
|
1263
1177
|
free() {
|
|
1264
1178
|
const ptr = this.__destroy_into_raw();
|
|
1265
|
-
wasm.__wbg_menuactionsuggestion_free(ptr);
|
|
1179
|
+
wasm.__wbg_menuactionsuggestion_free(ptr, 0);
|
|
1266
1180
|
}
|
|
1267
1181
|
/**
|
|
1268
|
-
|
|
1269
|
-
|
|
1182
|
+
* @returns {SuggestionPattern}
|
|
1183
|
+
*/
|
|
1270
1184
|
get suggestion_pattern() {
|
|
1271
1185
|
const ret = wasm.__wbg_get_menuactionsuggestion_suggestion_pattern(this.__wbg_ptr);
|
|
1272
1186
|
return SuggestionPattern.__wrap(ret);
|
|
1273
1187
|
}
|
|
1274
1188
|
/**
|
|
1275
|
-
|
|
1276
|
-
|
|
1189
|
+
* @param {SuggestionPattern} arg0
|
|
1190
|
+
*/
|
|
1277
1191
|
set suggestion_pattern(arg0) {
|
|
1278
1192
|
_assertClass(arg0, SuggestionPattern);
|
|
1279
1193
|
var ptr0 = arg0.__destroy_into_raw();
|
|
@@ -1284,9 +1198,7 @@ exports.MenuActionSuggestion = MenuActionSuggestion;
|
|
|
1284
1198
|
const MenuStateFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
1285
1199
|
register: () => {},
|
|
1286
1200
|
unregister: () => {}
|
|
1287
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_menustate_free(ptr >>> 0));
|
|
1288
|
-
/**
|
|
1289
|
-
*/
|
|
1201
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_menustate_free(ptr >>> 0, 1));
|
|
1290
1202
|
class MenuState {
|
|
1291
1203
|
static __wrap(ptr) {
|
|
1292
1204
|
ptr = ptr >>> 0;
|
|
@@ -1303,18 +1215,18 @@ class MenuState {
|
|
|
1303
1215
|
}
|
|
1304
1216
|
free() {
|
|
1305
1217
|
const ptr = this.__destroy_into_raw();
|
|
1306
|
-
wasm.__wbg_menustate_free(ptr);
|
|
1218
|
+
wasm.__wbg_menustate_free(ptr, 0);
|
|
1307
1219
|
}
|
|
1308
1220
|
/**
|
|
1309
|
-
|
|
1310
|
-
|
|
1221
|
+
* @returns {boolean}
|
|
1222
|
+
*/
|
|
1311
1223
|
keep() {
|
|
1312
1224
|
const ret = wasm.menustate_keep(this.__wbg_ptr);
|
|
1313
1225
|
return ret !== 0;
|
|
1314
1226
|
}
|
|
1315
1227
|
/**
|
|
1316
|
-
|
|
1317
|
-
|
|
1228
|
+
* @returns {MenuStateUpdate | undefined}
|
|
1229
|
+
*/
|
|
1318
1230
|
update() {
|
|
1319
1231
|
const ret = wasm.menustate_update(this.__wbg_ptr);
|
|
1320
1232
|
return ret === 0 ? undefined : MenuStateUpdate.__wrap(ret);
|
|
@@ -1324,9 +1236,7 @@ exports.MenuState = MenuState;
|
|
|
1324
1236
|
const MenuStateUpdateFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
1325
1237
|
register: () => {},
|
|
1326
1238
|
unregister: () => {}
|
|
1327
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_menustateupdate_free(ptr >>> 0));
|
|
1328
|
-
/**
|
|
1329
|
-
*/
|
|
1239
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_menustateupdate_free(ptr >>> 0, 1));
|
|
1330
1240
|
class MenuStateUpdate {
|
|
1331
1241
|
static __wrap(ptr) {
|
|
1332
1242
|
ptr = ptr >>> 0;
|
|
@@ -1343,29 +1253,27 @@ class MenuStateUpdate {
|
|
|
1343
1253
|
}
|
|
1344
1254
|
free() {
|
|
1345
1255
|
const ptr = this.__destroy_into_raw();
|
|
1346
|
-
wasm.__wbg_menustateupdate_free(ptr);
|
|
1256
|
+
wasm.__wbg_menustateupdate_free(ptr, 0);
|
|
1347
1257
|
}
|
|
1348
1258
|
/**
|
|
1349
|
-
|
|
1350
|
-
|
|
1259
|
+
* @returns {Map<any, any>}
|
|
1260
|
+
*/
|
|
1351
1261
|
get action_states() {
|
|
1352
1262
|
const ret = wasm.__wbg_get_menustateupdate_action_states(this.__wbg_ptr);
|
|
1353
|
-
return
|
|
1263
|
+
return ret;
|
|
1354
1264
|
}
|
|
1355
1265
|
/**
|
|
1356
|
-
|
|
1357
|
-
|
|
1266
|
+
* @param {Map<any, any>} arg0
|
|
1267
|
+
*/
|
|
1358
1268
|
set action_states(arg0) {
|
|
1359
|
-
wasm.__wbg_set_menustateupdate_action_states(this.__wbg_ptr,
|
|
1269
|
+
wasm.__wbg_set_menustateupdate_action_states(this.__wbg_ptr, arg0);
|
|
1360
1270
|
}
|
|
1361
1271
|
}
|
|
1362
1272
|
exports.MenuStateUpdate = MenuStateUpdate;
|
|
1363
1273
|
const PatternKeyFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
1364
1274
|
register: () => {},
|
|
1365
1275
|
unregister: () => {}
|
|
1366
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_patternkey_free(ptr >>> 0));
|
|
1367
|
-
/**
|
|
1368
|
-
*/
|
|
1276
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_patternkey_free(ptr >>> 0, 1));
|
|
1369
1277
|
class PatternKey {
|
|
1370
1278
|
static __wrap(ptr) {
|
|
1371
1279
|
ptr = ptr >>> 0;
|
|
@@ -1382,43 +1290,36 @@ class PatternKey {
|
|
|
1382
1290
|
}
|
|
1383
1291
|
free() {
|
|
1384
1292
|
const ptr = this.__destroy_into_raw();
|
|
1385
|
-
wasm.__wbg_patternkey_free(ptr);
|
|
1293
|
+
wasm.__wbg_patternkey_free(ptr, 0);
|
|
1386
1294
|
}
|
|
1387
1295
|
/**
|
|
1388
|
-
|
|
1389
|
-
|
|
1296
|
+
* @returns {PatternKeyType}
|
|
1297
|
+
*/
|
|
1390
1298
|
get key_type() {
|
|
1391
1299
|
const ret = wasm.__wbg_get_patternkey_key_type(this.__wbg_ptr);
|
|
1392
1300
|
return ret;
|
|
1393
1301
|
}
|
|
1394
1302
|
/**
|
|
1395
|
-
|
|
1396
|
-
|
|
1303
|
+
* @param {PatternKeyType} arg0
|
|
1304
|
+
*/
|
|
1397
1305
|
set key_type(arg0) {
|
|
1398
1306
|
wasm.__wbg_set_patternkey_key_type(this.__wbg_ptr, arg0);
|
|
1399
1307
|
}
|
|
1400
1308
|
/**
|
|
1401
|
-
|
|
1402
|
-
|
|
1309
|
+
* @returns {string | undefined}
|
|
1310
|
+
*/
|
|
1403
1311
|
get custom_key_value() {
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
let v1;
|
|
1410
|
-
if (r0 !== 0) {
|
|
1411
|
-
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1412
|
-
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
1413
|
-
}
|
|
1414
|
-
return v1;
|
|
1415
|
-
} finally {
|
|
1416
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1312
|
+
const ret = wasm.__wbg_get_patternkey_custom_key_value(this.__wbg_ptr);
|
|
1313
|
+
let v1;
|
|
1314
|
+
if (ret[0] !== 0) {
|
|
1315
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
1316
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
1417
1317
|
}
|
|
1318
|
+
return v1;
|
|
1418
1319
|
}
|
|
1419
1320
|
/**
|
|
1420
|
-
|
|
1421
|
-
|
|
1321
|
+
* @param {string | null} [arg0]
|
|
1322
|
+
*/
|
|
1422
1323
|
set custom_key_value(arg0) {
|
|
1423
1324
|
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1424
1325
|
var len0 = WASM_VECTOR_LEN;
|
|
@@ -1429,9 +1330,7 @@ exports.PatternKey = PatternKey;
|
|
|
1429
1330
|
const ReplaceAllFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
1430
1331
|
register: () => {},
|
|
1431
1332
|
unregister: () => {}
|
|
1432
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_replaceall_free(ptr >>> 0));
|
|
1433
|
-
/**
|
|
1434
|
-
*/
|
|
1333
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_replaceall_free(ptr >>> 0, 1));
|
|
1435
1334
|
class ReplaceAll {
|
|
1436
1335
|
static __wrap(ptr) {
|
|
1437
1336
|
ptr = ptr >>> 0;
|
|
@@ -1448,58 +1347,54 @@ class ReplaceAll {
|
|
|
1448
1347
|
}
|
|
1449
1348
|
free() {
|
|
1450
1349
|
const ptr = this.__destroy_into_raw();
|
|
1451
|
-
wasm.__wbg_replaceall_free(ptr);
|
|
1350
|
+
wasm.__wbg_replaceall_free(ptr, 0);
|
|
1452
1351
|
}
|
|
1453
1352
|
/**
|
|
1454
|
-
|
|
1455
|
-
|
|
1353
|
+
* @returns {string}
|
|
1354
|
+
*/
|
|
1456
1355
|
get replacement_html() {
|
|
1457
1356
|
let deferred1_0;
|
|
1458
1357
|
let deferred1_1;
|
|
1459
1358
|
try {
|
|
1460
|
-
const
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
deferred1_0 = r0;
|
|
1465
|
-
deferred1_1 = r1;
|
|
1466
|
-
return getStringFromWasm0(r0, r1);
|
|
1359
|
+
const ret = wasm.__wbg_get_replaceall_replacement_html(this.__wbg_ptr);
|
|
1360
|
+
deferred1_0 = ret[0];
|
|
1361
|
+
deferred1_1 = ret[1];
|
|
1362
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1467
1363
|
} finally {
|
|
1468
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1469
1364
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1470
1365
|
}
|
|
1471
1366
|
}
|
|
1472
1367
|
/**
|
|
1473
|
-
|
|
1474
|
-
|
|
1368
|
+
* @param {string} arg0
|
|
1369
|
+
*/
|
|
1475
1370
|
set replacement_html(arg0) {
|
|
1476
1371
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1477
1372
|
const len0 = WASM_VECTOR_LEN;
|
|
1478
1373
|
wasm.__wbg_set_edit_url(this.__wbg_ptr, ptr0, len0);
|
|
1479
1374
|
}
|
|
1480
1375
|
/**
|
|
1481
|
-
|
|
1482
|
-
|
|
1376
|
+
* @returns {number}
|
|
1377
|
+
*/
|
|
1483
1378
|
get start_utf16_codeunit() {
|
|
1484
1379
|
const ret = wasm.__wbg_get_replaceall_start_utf16_codeunit(this.__wbg_ptr);
|
|
1485
1380
|
return ret >>> 0;
|
|
1486
1381
|
}
|
|
1487
1382
|
/**
|
|
1488
|
-
|
|
1489
|
-
|
|
1383
|
+
* @param {number} arg0
|
|
1384
|
+
*/
|
|
1490
1385
|
set start_utf16_codeunit(arg0) {
|
|
1491
1386
|
wasm.__wbg_set_replaceall_start_utf16_codeunit(this.__wbg_ptr, arg0);
|
|
1492
1387
|
}
|
|
1493
1388
|
/**
|
|
1494
|
-
|
|
1495
|
-
|
|
1389
|
+
* @returns {number}
|
|
1390
|
+
*/
|
|
1496
1391
|
get end_utf16_codeunit() {
|
|
1497
1392
|
const ret = wasm.__wbg_get_replaceall_end_utf16_codeunit(this.__wbg_ptr);
|
|
1498
1393
|
return ret >>> 0;
|
|
1499
1394
|
}
|
|
1500
1395
|
/**
|
|
1501
|
-
|
|
1502
|
-
|
|
1396
|
+
* @param {number} arg0
|
|
1397
|
+
*/
|
|
1503
1398
|
set end_utf16_codeunit(arg0) {
|
|
1504
1399
|
wasm.__wbg_set_replaceall_end_utf16_codeunit(this.__wbg_ptr, arg0);
|
|
1505
1400
|
}
|
|
@@ -1508,9 +1403,7 @@ exports.ReplaceAll = ReplaceAll;
|
|
|
1508
1403
|
const SelectionFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
1509
1404
|
register: () => {},
|
|
1510
1405
|
unregister: () => {}
|
|
1511
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_selection_free(ptr >>> 0));
|
|
1512
|
-
/**
|
|
1513
|
-
*/
|
|
1406
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_selection_free(ptr >>> 0, 1));
|
|
1514
1407
|
class Selection {
|
|
1515
1408
|
static __wrap(ptr) {
|
|
1516
1409
|
ptr = ptr >>> 0;
|
|
@@ -1527,31 +1420,31 @@ class Selection {
|
|
|
1527
1420
|
}
|
|
1528
1421
|
free() {
|
|
1529
1422
|
const ptr = this.__destroy_into_raw();
|
|
1530
|
-
wasm.__wbg_selection_free(ptr);
|
|
1423
|
+
wasm.__wbg_selection_free(ptr, 0);
|
|
1531
1424
|
}
|
|
1532
1425
|
/**
|
|
1533
|
-
|
|
1534
|
-
|
|
1426
|
+
* @returns {number}
|
|
1427
|
+
*/
|
|
1535
1428
|
get start_utf16_codeunit() {
|
|
1536
1429
|
const ret = wasm.__wbg_get_selection_start_utf16_codeunit(this.__wbg_ptr);
|
|
1537
1430
|
return ret >>> 0;
|
|
1538
1431
|
}
|
|
1539
1432
|
/**
|
|
1540
|
-
|
|
1541
|
-
|
|
1433
|
+
* @param {number} arg0
|
|
1434
|
+
*/
|
|
1542
1435
|
set start_utf16_codeunit(arg0) {
|
|
1543
1436
|
wasm.__wbg_set_selection_start_utf16_codeunit(this.__wbg_ptr, arg0);
|
|
1544
1437
|
}
|
|
1545
1438
|
/**
|
|
1546
|
-
|
|
1547
|
-
|
|
1439
|
+
* @returns {number}
|
|
1440
|
+
*/
|
|
1548
1441
|
get end_utf16_codeunit() {
|
|
1549
1442
|
const ret = wasm.__wbg_get_selection_end_utf16_codeunit(this.__wbg_ptr);
|
|
1550
1443
|
return ret >>> 0;
|
|
1551
1444
|
}
|
|
1552
1445
|
/**
|
|
1553
|
-
|
|
1554
|
-
|
|
1446
|
+
* @param {number} arg0
|
|
1447
|
+
*/
|
|
1555
1448
|
set end_utf16_codeunit(arg0) {
|
|
1556
1449
|
wasm.__wbg_set_selection_end_utf16_codeunit(this.__wbg_ptr, arg0);
|
|
1557
1450
|
}
|
|
@@ -1560,9 +1453,7 @@ exports.Selection = Selection;
|
|
|
1560
1453
|
const SuggestionPatternFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
1561
1454
|
register: () => {},
|
|
1562
1455
|
unregister: () => {}
|
|
1563
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_suggestionpattern_free(ptr >>> 0));
|
|
1564
|
-
/**
|
|
1565
|
-
*/
|
|
1456
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_suggestionpattern_free(ptr >>> 0, 1));
|
|
1566
1457
|
class SuggestionPattern {
|
|
1567
1458
|
static __wrap(ptr) {
|
|
1568
1459
|
ptr = ptr >>> 0;
|
|
@@ -1579,73 +1470,69 @@ class SuggestionPattern {
|
|
|
1579
1470
|
}
|
|
1580
1471
|
free() {
|
|
1581
1472
|
const ptr = this.__destroy_into_raw();
|
|
1582
|
-
wasm.__wbg_suggestionpattern_free(ptr);
|
|
1473
|
+
wasm.__wbg_suggestionpattern_free(ptr, 0);
|
|
1583
1474
|
}
|
|
1584
1475
|
/**
|
|
1585
|
-
|
|
1586
|
-
|
|
1476
|
+
* @returns {PatternKey}
|
|
1477
|
+
*/
|
|
1587
1478
|
get key() {
|
|
1588
1479
|
const ret = wasm.__wbg_get_suggestionpattern_key(this.__wbg_ptr);
|
|
1589
1480
|
return PatternKey.__wrap(ret);
|
|
1590
1481
|
}
|
|
1591
1482
|
/**
|
|
1592
|
-
|
|
1593
|
-
|
|
1483
|
+
* @param {PatternKey} arg0
|
|
1484
|
+
*/
|
|
1594
1485
|
set key(arg0) {
|
|
1595
1486
|
_assertClass(arg0, PatternKey);
|
|
1596
1487
|
var ptr0 = arg0.__destroy_into_raw();
|
|
1597
1488
|
wasm.__wbg_set_suggestionpattern_key(this.__wbg_ptr, ptr0);
|
|
1598
1489
|
}
|
|
1599
1490
|
/**
|
|
1600
|
-
|
|
1601
|
-
|
|
1491
|
+
* @returns {string}
|
|
1492
|
+
*/
|
|
1602
1493
|
get text() {
|
|
1603
1494
|
let deferred1_0;
|
|
1604
1495
|
let deferred1_1;
|
|
1605
1496
|
try {
|
|
1606
|
-
const
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
deferred1_0 = r0;
|
|
1611
|
-
deferred1_1 = r1;
|
|
1612
|
-
return getStringFromWasm0(r0, r1);
|
|
1497
|
+
const ret = wasm.__wbg_get_suggestionpattern_text(this.__wbg_ptr);
|
|
1498
|
+
deferred1_0 = ret[0];
|
|
1499
|
+
deferred1_1 = ret[1];
|
|
1500
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
1613
1501
|
} finally {
|
|
1614
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1615
1502
|
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
1616
1503
|
}
|
|
1617
1504
|
}
|
|
1618
1505
|
/**
|
|
1619
|
-
|
|
1620
|
-
|
|
1506
|
+
* @param {string} arg0
|
|
1507
|
+
*/
|
|
1621
1508
|
set text(arg0) {
|
|
1622
1509
|
const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1623
1510
|
const len0 = WASM_VECTOR_LEN;
|
|
1624
1511
|
wasm.__wbg_set_edit_url(this.__wbg_ptr, ptr0, len0);
|
|
1625
1512
|
}
|
|
1626
1513
|
/**
|
|
1627
|
-
|
|
1628
|
-
|
|
1514
|
+
* @returns {number}
|
|
1515
|
+
*/
|
|
1629
1516
|
get start() {
|
|
1630
1517
|
const ret = wasm.__wbg_get_suggestionpattern_start(this.__wbg_ptr);
|
|
1631
1518
|
return ret >>> 0;
|
|
1632
1519
|
}
|
|
1633
1520
|
/**
|
|
1634
|
-
|
|
1635
|
-
|
|
1521
|
+
* @param {number} arg0
|
|
1522
|
+
*/
|
|
1636
1523
|
set start(arg0) {
|
|
1637
1524
|
wasm.__wbg_set_suggestionpattern_start(this.__wbg_ptr, arg0);
|
|
1638
1525
|
}
|
|
1639
1526
|
/**
|
|
1640
|
-
|
|
1641
|
-
|
|
1527
|
+
* @returns {number}
|
|
1528
|
+
*/
|
|
1642
1529
|
get end() {
|
|
1643
1530
|
const ret = wasm.__wbg_get_suggestionpattern_end(this.__wbg_ptr);
|
|
1644
1531
|
return ret >>> 0;
|
|
1645
1532
|
}
|
|
1646
1533
|
/**
|
|
1647
|
-
|
|
1648
|
-
|
|
1534
|
+
* @param {number} arg0
|
|
1535
|
+
*/
|
|
1649
1536
|
set end(arg0) {
|
|
1650
1537
|
wasm.__wbg_set_suggestionpattern_end(this.__wbg_ptr, arg0);
|
|
1651
1538
|
}
|
|
@@ -1654,9 +1541,7 @@ exports.SuggestionPattern = SuggestionPattern;
|
|
|
1654
1541
|
const TextUpdateFinalization = typeof FinalizationRegistry === 'undefined' ? {
|
|
1655
1542
|
register: () => {},
|
|
1656
1543
|
unregister: () => {}
|
|
1657
|
-
} : new FinalizationRegistry(ptr => wasm.__wbg_textupdate_free(ptr >>> 0));
|
|
1658
|
-
/**
|
|
1659
|
-
*/
|
|
1544
|
+
} : new FinalizationRegistry(ptr => wasm.__wbg_textupdate_free(ptr >>> 0, 1));
|
|
1660
1545
|
class TextUpdate {
|
|
1661
1546
|
static __wrap(ptr) {
|
|
1662
1547
|
ptr = ptr >>> 0;
|
|
@@ -1673,18 +1558,18 @@ class TextUpdate {
|
|
|
1673
1558
|
}
|
|
1674
1559
|
free() {
|
|
1675
1560
|
const ptr = this.__destroy_into_raw();
|
|
1676
|
-
wasm.__wbg_textupdate_free(ptr);
|
|
1561
|
+
wasm.__wbg_textupdate_free(ptr, 0);
|
|
1677
1562
|
}
|
|
1678
1563
|
/**
|
|
1679
|
-
|
|
1680
|
-
|
|
1564
|
+
* @returns {Keep | undefined}
|
|
1565
|
+
*/
|
|
1681
1566
|
get keep() {
|
|
1682
1567
|
const ret = wasm.__wbg_get_textupdate_keep(this.__wbg_ptr);
|
|
1683
1568
|
return ret === 0 ? undefined : Keep.__wrap(ret);
|
|
1684
1569
|
}
|
|
1685
1570
|
/**
|
|
1686
|
-
|
|
1687
|
-
|
|
1571
|
+
* @param {Keep | null} [arg0]
|
|
1572
|
+
*/
|
|
1688
1573
|
set keep(arg0) {
|
|
1689
1574
|
let ptr0 = 0;
|
|
1690
1575
|
if (!isLikeNone(arg0)) {
|
|
@@ -1694,15 +1579,15 @@ class TextUpdate {
|
|
|
1694
1579
|
wasm.__wbg_set_textupdate_keep(this.__wbg_ptr, ptr0);
|
|
1695
1580
|
}
|
|
1696
1581
|
/**
|
|
1697
|
-
|
|
1698
|
-
|
|
1582
|
+
* @returns {ReplaceAll | undefined}
|
|
1583
|
+
*/
|
|
1699
1584
|
get replace_all() {
|
|
1700
1585
|
const ret = wasm.__wbg_get_textupdate_replace_all(this.__wbg_ptr);
|
|
1701
1586
|
return ret === 0 ? undefined : ReplaceAll.__wrap(ret);
|
|
1702
1587
|
}
|
|
1703
1588
|
/**
|
|
1704
|
-
|
|
1705
|
-
|
|
1589
|
+
* @param {ReplaceAll | null} [arg0]
|
|
1590
|
+
*/
|
|
1706
1591
|
set replace_all(arg0) {
|
|
1707
1592
|
let ptr0 = 0;
|
|
1708
1593
|
if (!isLikeNone(arg0)) {
|
|
@@ -1712,15 +1597,15 @@ class TextUpdate {
|
|
|
1712
1597
|
wasm.__wbg_set_textupdate_replace_all(this.__wbg_ptr, ptr0);
|
|
1713
1598
|
}
|
|
1714
1599
|
/**
|
|
1715
|
-
|
|
1716
|
-
|
|
1600
|
+
* @returns {Selection | undefined}
|
|
1601
|
+
*/
|
|
1717
1602
|
get select() {
|
|
1718
1603
|
const ret = wasm.__wbg_get_textupdate_select(this.__wbg_ptr);
|
|
1719
1604
|
return ret === 0 ? undefined : Selection.__wrap(ret);
|
|
1720
1605
|
}
|
|
1721
1606
|
/**
|
|
1722
|
-
|
|
1723
|
-
|
|
1607
|
+
* @param {Selection | null} [arg0]
|
|
1608
|
+
*/
|
|
1724
1609
|
set select(arg0) {
|
|
1725
1610
|
let ptr0 = 0;
|
|
1726
1611
|
if (!isLikeNone(arg0)) {
|
|
@@ -1731,180 +1616,182 @@ class TextUpdate {
|
|
|
1731
1616
|
}
|
|
1732
1617
|
}
|
|
1733
1618
|
exports.TextUpdate = TextUpdate;
|
|
1734
|
-
function
|
|
1735
|
-
const
|
|
1736
|
-
|
|
1737
|
-
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1738
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1739
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1740
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1741
|
-
}
|
|
1742
|
-
;
|
|
1743
|
-
function __wbindgen_object_drop_ref(arg0) {
|
|
1744
|
-
takeObject(arg0);
|
|
1745
|
-
}
|
|
1746
|
-
;
|
|
1747
|
-
function __wbg_new_d9bc3a0147634640() {
|
|
1748
|
-
const ret = new Map();
|
|
1749
|
-
return addHeapObject(ret);
|
|
1619
|
+
function __wbg_body_942ea927546a04ba(arg0) {
|
|
1620
|
+
const ret = arg0.body;
|
|
1621
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1750
1622
|
}
|
|
1751
1623
|
;
|
|
1752
|
-
function
|
|
1753
|
-
const ret =
|
|
1754
|
-
return
|
|
1624
|
+
function __wbg_childNodes_c4423003f3a9441f(arg0) {
|
|
1625
|
+
const ret = arg0.childNodes;
|
|
1626
|
+
return ret;
|
|
1755
1627
|
}
|
|
1756
1628
|
;
|
|
1757
|
-
function
|
|
1758
|
-
|
|
1759
|
-
|
|
1629
|
+
function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
|
|
1630
|
+
let deferred0_0;
|
|
1631
|
+
let deferred0_1;
|
|
1632
|
+
try {
|
|
1633
|
+
deferred0_0 = arg0;
|
|
1634
|
+
deferred0_1 = arg1;
|
|
1635
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
1636
|
+
} finally {
|
|
1637
|
+
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1638
|
+
}
|
|
1760
1639
|
}
|
|
1761
1640
|
;
|
|
1762
|
-
function
|
|
1641
|
+
function __wbg_forEach_d6a05ca96422eff9(arg0, arg1, arg2) {
|
|
1763
1642
|
try {
|
|
1764
1643
|
var state0 = {
|
|
1765
1644
|
a: arg1,
|
|
1766
1645
|
b: arg2
|
|
1767
1646
|
};
|
|
1768
|
-
var cb0 = (arg0, arg1) => {
|
|
1647
|
+
var cb0 = (arg0, arg1, arg2) => {
|
|
1769
1648
|
const a = state0.a;
|
|
1770
1649
|
state0.a = 0;
|
|
1771
1650
|
try {
|
|
1772
|
-
return
|
|
1651
|
+
return __wbg_adapter_123(a, state0.b, arg0, arg1, arg2);
|
|
1773
1652
|
} finally {
|
|
1774
1653
|
state0.a = a;
|
|
1775
1654
|
}
|
|
1776
1655
|
};
|
|
1777
|
-
|
|
1656
|
+
arg0.forEach(cb0);
|
|
1778
1657
|
} finally {
|
|
1779
1658
|
state0.a = state0.b = 0;
|
|
1780
1659
|
}
|
|
1781
1660
|
}
|
|
1782
1661
|
;
|
|
1783
|
-
function
|
|
1784
|
-
const ret = arg0;
|
|
1785
|
-
return addHeapObject(ret);
|
|
1786
|
-
}
|
|
1787
|
-
;
|
|
1788
|
-
function __wbg_forEach_2be8de7347d63332(arg0, arg1, arg2) {
|
|
1662
|
+
function __wbg_forEach_e1cf6f7c8ecb7dae(arg0, arg1, arg2) {
|
|
1789
1663
|
try {
|
|
1790
1664
|
var state0 = {
|
|
1791
1665
|
a: arg1,
|
|
1792
1666
|
b: arg2
|
|
1793
1667
|
};
|
|
1794
|
-
var cb0 = (arg0, arg1
|
|
1668
|
+
var cb0 = (arg0, arg1) => {
|
|
1795
1669
|
const a = state0.a;
|
|
1796
1670
|
state0.a = 0;
|
|
1797
1671
|
try {
|
|
1798
|
-
return
|
|
1672
|
+
return __wbg_adapter_126(a, state0.b, arg0, arg1);
|
|
1799
1673
|
} finally {
|
|
1800
1674
|
state0.a = a;
|
|
1801
1675
|
}
|
|
1802
1676
|
};
|
|
1803
|
-
|
|
1677
|
+
arg0.forEach(cb0);
|
|
1804
1678
|
} finally {
|
|
1805
1679
|
state0.a = state0.b = 0;
|
|
1806
1680
|
}
|
|
1807
1681
|
}
|
|
1808
1682
|
;
|
|
1809
|
-
function
|
|
1810
|
-
const ret =
|
|
1811
|
-
|
|
1683
|
+
function __wbg_getAttribute_ea5166be2deba45e(arg0, arg1, arg2, arg3) {
|
|
1684
|
+
const ret = arg1.getAttribute(getStringFromWasm0(arg2, arg3));
|
|
1685
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1686
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1687
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1688
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1812
1689
|
}
|
|
1813
1690
|
;
|
|
1814
|
-
function
|
|
1815
|
-
const ret =
|
|
1816
|
-
return
|
|
1691
|
+
function __wbg_get_e27dfaeb6f46bd45(arg0, arg1) {
|
|
1692
|
+
const ret = arg0[arg1 >>> 0];
|
|
1693
|
+
return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
|
|
1817
1694
|
}
|
|
1818
1695
|
;
|
|
1819
|
-
function
|
|
1820
|
-
const ret =
|
|
1821
|
-
|
|
1822
|
-
const len1 = WASM_VECTOR_LEN;
|
|
1823
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1824
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1696
|
+
function __wbg_hasAttribute_db31090c2e646f57(arg0, arg1, arg2) {
|
|
1697
|
+
const ret = arg0.hasAttribute(getStringFromWasm0(arg1, arg2));
|
|
1698
|
+
return ret;
|
|
1825
1699
|
}
|
|
1826
1700
|
;
|
|
1827
|
-
function
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
try {
|
|
1831
|
-
deferred0_0 = arg0;
|
|
1832
|
-
deferred0_1 = arg1;
|
|
1833
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
1834
|
-
} finally {
|
|
1835
|
-
wasm.__wbindgen_free(deferred0_0, deferred0_1, 1);
|
|
1836
|
-
}
|
|
1701
|
+
function __wbg_length_49b2ba67f0897e97(arg0) {
|
|
1702
|
+
const ret = arg0.length;
|
|
1703
|
+
return ret;
|
|
1837
1704
|
}
|
|
1838
1705
|
;
|
|
1839
|
-
function
|
|
1840
|
-
|
|
1706
|
+
function __wbg_new_363ae9575a2aba54() {
|
|
1707
|
+
return handleError(function () {
|
|
1708
|
+
const ret = new DOMParser();
|
|
1709
|
+
return ret;
|
|
1710
|
+
}, arguments);
|
|
1841
1711
|
}
|
|
1842
1712
|
;
|
|
1843
|
-
function
|
|
1844
|
-
const ret =
|
|
1845
|
-
|
|
1846
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1847
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1848
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1713
|
+
function __wbg_new_5e0be73521bc8c17() {
|
|
1714
|
+
const ret = new Map();
|
|
1715
|
+
return ret;
|
|
1849
1716
|
}
|
|
1850
1717
|
;
|
|
1851
|
-
function
|
|
1852
|
-
const ret =
|
|
1853
|
-
|
|
1854
|
-
var len1 = WASM_VECTOR_LEN;
|
|
1855
|
-
getInt32Memory0()[arg0 / 4 + 1] = len1;
|
|
1856
|
-
getInt32Memory0()[arg0 / 4 + 0] = ptr1;
|
|
1718
|
+
function __wbg_new_8a6f238a6ece86ea() {
|
|
1719
|
+
const ret = new Error();
|
|
1720
|
+
return ret;
|
|
1857
1721
|
}
|
|
1858
1722
|
;
|
|
1859
|
-
function
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1723
|
+
function __wbg_nodeName_ff3aa439a5af6311(arg0, arg1) {
|
|
1724
|
+
const ret = arg1.nodeName;
|
|
1725
|
+
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1726
|
+
const len1 = WASM_VECTOR_LEN;
|
|
1727
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1728
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1864
1729
|
}
|
|
1865
1730
|
;
|
|
1866
|
-
function
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
return addHeapObject(ret);
|
|
1870
|
-
}, arguments);
|
|
1731
|
+
function __wbg_nodeType_5e1153141daac26a(arg0) {
|
|
1732
|
+
const ret = arg0.nodeType;
|
|
1733
|
+
return ret;
|
|
1871
1734
|
}
|
|
1872
1735
|
;
|
|
1873
|
-
function
|
|
1874
|
-
const ret =
|
|
1875
|
-
|
|
1736
|
+
function __wbg_nodeValue_6ff4f14870c43bd9(arg0, arg1) {
|
|
1737
|
+
const ret = arg1.nodeValue;
|
|
1738
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1739
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1740
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1741
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1876
1742
|
}
|
|
1877
1743
|
;
|
|
1878
|
-
function
|
|
1879
|
-
|
|
1880
|
-
|
|
1744
|
+
function __wbg_parseFromString_91cbec9ba27a222a() {
|
|
1745
|
+
return handleError(function (arg0, arg1, arg2, arg3) {
|
|
1746
|
+
const ret = arg0.parseFromString(getStringFromWasm0(arg1, arg2), __wbindgen_enum_SupportedType[arg3]);
|
|
1747
|
+
return ret;
|
|
1748
|
+
}, arguments);
|
|
1881
1749
|
}
|
|
1882
1750
|
;
|
|
1883
|
-
function
|
|
1884
|
-
const ret =
|
|
1751
|
+
function __wbg_set_8fc6bf8a5b1071d1(arg0, arg1, arg2) {
|
|
1752
|
+
const ret = arg0.set(arg1, arg2);
|
|
1885
1753
|
return ret;
|
|
1886
1754
|
}
|
|
1887
1755
|
;
|
|
1888
|
-
function
|
|
1889
|
-
const ret =
|
|
1890
|
-
return isLikeNone(ret) ? 0 : addHeapObject(ret);
|
|
1891
|
-
}
|
|
1892
|
-
;
|
|
1893
|
-
function __wbg_nodeName_149f7e29f80d1338(arg0, arg1) {
|
|
1894
|
-
const ret = getObject(arg1).nodeName;
|
|
1756
|
+
function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
|
|
1757
|
+
const ret = arg1.stack;
|
|
1895
1758
|
const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1896
1759
|
const len1 = WASM_VECTOR_LEN;
|
|
1897
|
-
|
|
1898
|
-
|
|
1760
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1761
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1899
1762
|
}
|
|
1900
1763
|
;
|
|
1901
|
-
function
|
|
1902
|
-
const
|
|
1764
|
+
function __wbindgen_init_externref_table() {
|
|
1765
|
+
const table = wasm.__wbindgen_export_1;
|
|
1766
|
+
const offset = table.grow(4);
|
|
1767
|
+
table.set(0, undefined);
|
|
1768
|
+
table.set(offset + 0, undefined);
|
|
1769
|
+
table.set(offset + 1, null);
|
|
1770
|
+
table.set(offset + 2, true);
|
|
1771
|
+
table.set(offset + 3, false);
|
|
1772
|
+
;
|
|
1773
|
+
}
|
|
1774
|
+
;
|
|
1775
|
+
function __wbindgen_number_new(arg0) {
|
|
1776
|
+
const ret = arg0;
|
|
1903
1777
|
return ret;
|
|
1904
1778
|
}
|
|
1905
1779
|
;
|
|
1906
|
-
function
|
|
1907
|
-
const
|
|
1780
|
+
function __wbindgen_string_get(arg0, arg1) {
|
|
1781
|
+
const obj = arg1;
|
|
1782
|
+
const ret = typeof obj === 'string' ? obj : undefined;
|
|
1783
|
+
var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1784
|
+
var len1 = WASM_VECTOR_LEN;
|
|
1785
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
|
|
1786
|
+
getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
|
|
1787
|
+
}
|
|
1788
|
+
;
|
|
1789
|
+
function __wbindgen_string_new(arg0, arg1) {
|
|
1790
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
1908
1791
|
return ret;
|
|
1909
1792
|
}
|
|
1793
|
+
;
|
|
1794
|
+
function __wbindgen_throw(arg0, arg1) {
|
|
1795
|
+
throw new Error(getStringFromWasm0(arg0, arg1));
|
|
1796
|
+
}
|
|
1910
1797
|
;
|