loro-crdt 1.12.2 → 1.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/base64/index.js +89 -89
- package/base64/loro_wasm.d.ts +7 -7
- package/browser/index.js +138 -0
- package/browser/index.js.map +1 -1
- package/browser/loro_wasm.d.ts +7 -7
- package/browser/loro_wasm.js +422 -8
- package/browser/loro_wasm_bg.js +84 -84
- package/browser/loro_wasm_bg.wasm +0 -0
- package/browser/loro_wasm_bg.wasm.d.ts +2 -2
- package/bundler/index.js +138 -0
- package/bundler/index.js.map +1 -1
- package/bundler/loro_wasm.d.ts +7 -7
- package/bundler/loro_wasm_bg.js +84 -84
- package/bundler/loro_wasm_bg.wasm +0 -0
- package/bundler/loro_wasm_bg.wasm.d.ts +2 -2
- package/nodejs/index.js.map +1 -1
- package/nodejs/loro_wasm.d.ts +7 -7
- package/nodejs/loro_wasm.js +84 -84
- package/nodejs/loro_wasm_bg.wasm +0 -0
- package/nodejs/loro_wasm_bg.wasm.d.ts +2 -2
- package/package.json +1 -1
- package/web/index.js +26 -0
- package/web/index.js.map +1 -1
- package/web/loro_wasm.d.ts +9 -9
- package/web/loro_wasm.js +84 -84
- package/web/loro_wasm_bg.wasm +0 -0
- package/web/loro_wasm_bg.wasm.d.ts +2 -2
package/browser/loro_wasm.js
CHANGED
|
@@ -1,5 +1,281 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
AwarenessWasm,
|
|
3
|
+
ChangeModifier,
|
|
4
|
+
Cursor,
|
|
5
|
+
EphemeralStoreWasm,
|
|
6
|
+
LORO_VERSION,
|
|
7
|
+
LoroCounter,
|
|
8
|
+
LoroDoc,
|
|
9
|
+
LoroList,
|
|
10
|
+
LoroMap,
|
|
11
|
+
LoroMovableList,
|
|
12
|
+
LoroText,
|
|
13
|
+
LoroTree,
|
|
14
|
+
LoroTreeNode,
|
|
15
|
+
UndoManager,
|
|
16
|
+
VersionVector,
|
|
17
|
+
__wbg_String_8f0eb39a4a4c2f66,
|
|
18
|
+
__wbg_apply_36be6a55257c99bf,
|
|
19
|
+
__wbg_apply_eb9e9b97497f91e4,
|
|
20
|
+
__wbg_buffer_609cc3eee51ed158,
|
|
21
|
+
__wbg_call_672a4d21634d4a24,
|
|
22
|
+
__wbg_call_7cccdd69e0791ae2,
|
|
23
|
+
__wbg_call_833bed5770ea2041,
|
|
24
|
+
__wbg_call_b8adc8b1d0a0d8eb,
|
|
25
|
+
__wbg_changemodifier_new,
|
|
26
|
+
__wbg_crypto_574e78ad8b13b65f,
|
|
27
|
+
__wbg_cursor_new,
|
|
28
|
+
__wbg_done_769e5ede4b31c67b,
|
|
29
|
+
__wbg_entries_3265d4158b33e5dc,
|
|
30
|
+
__wbg_entries_c8a90a7ed73e84ce,
|
|
31
|
+
__wbg_error_7534b8e9a36f1ab4,
|
|
32
|
+
__wbg_error_ce432bc82cee0d8e,
|
|
33
|
+
__wbg_from_2a5d3e218e67aa85,
|
|
34
|
+
__wbg_getOwnPropertySymbols_97eebed6fe6e08be,
|
|
35
|
+
__wbg_getRandomValues_b8f5dbd5f3995a9e,
|
|
36
|
+
__wbg_get_67b2ba62fc30de12,
|
|
37
|
+
__wbg_get_b9b93047fe3cf45b,
|
|
38
|
+
__wbg_getindex_5b00c274b05714aa,
|
|
39
|
+
__wbg_getwithrefkey_1dc361bd10053bfe,
|
|
40
|
+
__wbg_instanceof_ArrayBuffer_e14585432e3737fc,
|
|
41
|
+
__wbg_instanceof_Map_f3469ce2244d2430,
|
|
42
|
+
__wbg_instanceof_Object_7f2dcef8f78644a4,
|
|
43
|
+
__wbg_instanceof_Uint8Array_17156bcf118086a9,
|
|
44
|
+
__wbg_isArray_a1eab7e0d067391b,
|
|
45
|
+
__wbg_isSafeInteger_343e2beeeece1bb0,
|
|
46
|
+
__wbg_iterator_9a24c88df860dc65,
|
|
47
|
+
__wbg_length_a446193dc22c12f8,
|
|
48
|
+
__wbg_length_e2d2a49132c1b256,
|
|
49
|
+
__wbg_log_0cc1b7768397bcfe,
|
|
50
|
+
__wbg_log_bb5a8a0c408f06e3,
|
|
51
|
+
__wbg_log_cb9e190acc5753fb,
|
|
52
|
+
__wbg_lorocounter_new,
|
|
53
|
+
__wbg_lorolist_new,
|
|
54
|
+
__wbg_loromap_new,
|
|
55
|
+
__wbg_loromovablelist_new,
|
|
56
|
+
__wbg_lorotext_new,
|
|
57
|
+
__wbg_lorotree_new,
|
|
58
|
+
__wbg_lorotreenode_new,
|
|
59
|
+
__wbg_mark_7438147ce31e9d4b,
|
|
60
|
+
__wbg_measure_fb7825c11612c823,
|
|
61
|
+
__wbg_msCrypto_a61aeb35a24c1329,
|
|
62
|
+
__wbg_new_405e22f390576ce2,
|
|
63
|
+
__wbg_new_5e0be73521bc8c17,
|
|
64
|
+
__wbg_new_78feb108b6472713,
|
|
65
|
+
__wbg_new_8a6f238a6ece86ea,
|
|
66
|
+
__wbg_new_a12002a7f91c75be,
|
|
67
|
+
__wbg_newnoargs_105ed471475aaf50,
|
|
68
|
+
__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a,
|
|
69
|
+
__wbg_newwithlength_a381634e90c276d4,
|
|
70
|
+
__wbg_newwithlength_c4c419ef0bc8a1f8,
|
|
71
|
+
__wbg_next_25feadfc0913fea9,
|
|
72
|
+
__wbg_next_6574e1a8a62d1055,
|
|
73
|
+
__wbg_node_905d3e251edff8a2,
|
|
74
|
+
__wbg_now_6727e3e536e11536,
|
|
75
|
+
__wbg_ownKeys_3930041068756f1f,
|
|
76
|
+
__wbg_process_dc0fbacc7c1c06f7,
|
|
77
|
+
__wbg_push_737cfc8c1432c2c6,
|
|
78
|
+
__wbg_randomFillSync_ac0988aba3254290,
|
|
79
|
+
__wbg_require_60cc747a6bc5215a,
|
|
80
|
+
__wbg_resolve_4851785c9c5f573d,
|
|
81
|
+
__wbg_set_37837023f3d740e8,
|
|
82
|
+
__wbg_set_3f1d0b984ed272ed,
|
|
83
|
+
__wbg_set_65595bdd868b3009,
|
|
84
|
+
__wbg_set_8fc6bf8a5b1071d1,
|
|
85
|
+
__wbg_set_bb8cecf6a62b9f46,
|
|
86
|
+
__wbg_set_wasm,
|
|
87
|
+
__wbg_setindex_dcd71eabf405bde1,
|
|
88
|
+
__wbg_stack_0ed75d68575b0f3c,
|
|
89
|
+
__wbg_static_accessor_GLOBAL_88a902d13a557d07,
|
|
90
|
+
__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0,
|
|
91
|
+
__wbg_static_accessor_SELF_37c5d418e4bf5819,
|
|
92
|
+
__wbg_static_accessor_WINDOW_5de37043a91a9c40,
|
|
93
|
+
__wbg_subarray_aa9065fa9dc5df96,
|
|
94
|
+
__wbg_then_44b73946d2fb3e7d,
|
|
95
|
+
__wbg_value_cd1ffa7b1ab794f1,
|
|
96
|
+
__wbg_versions_c01dfd4722a88165,
|
|
97
|
+
__wbg_versionvector_new,
|
|
98
|
+
__wbg_warn_1a8c5d1d6cc53fc0,
|
|
99
|
+
__wbindgen_as_number,
|
|
100
|
+
__wbindgen_bigint_from_i64,
|
|
101
|
+
__wbindgen_bigint_from_u64,
|
|
102
|
+
__wbindgen_bigint_get_as_i64,
|
|
103
|
+
__wbindgen_boolean_get,
|
|
104
|
+
__wbindgen_cb_drop,
|
|
105
|
+
__wbindgen_closure_wrapper332,
|
|
106
|
+
__wbindgen_closure_wrapper335,
|
|
107
|
+
__wbindgen_debug_string,
|
|
108
|
+
__wbindgen_error_new,
|
|
109
|
+
__wbindgen_in,
|
|
110
|
+
__wbindgen_is_array,
|
|
111
|
+
__wbindgen_is_bigint,
|
|
112
|
+
__wbindgen_is_falsy,
|
|
113
|
+
__wbindgen_is_function,
|
|
114
|
+
__wbindgen_is_null,
|
|
115
|
+
__wbindgen_is_object,
|
|
116
|
+
__wbindgen_is_string,
|
|
117
|
+
__wbindgen_is_undefined,
|
|
118
|
+
__wbindgen_jsval_eq,
|
|
119
|
+
__wbindgen_jsval_loose_eq,
|
|
120
|
+
__wbindgen_memory,
|
|
121
|
+
__wbindgen_number_get,
|
|
122
|
+
__wbindgen_number_new,
|
|
123
|
+
__wbindgen_object_clone_ref,
|
|
124
|
+
__wbindgen_object_drop_ref,
|
|
125
|
+
__wbindgen_rethrow,
|
|
126
|
+
__wbindgen_string_get,
|
|
127
|
+
__wbindgen_string_new,
|
|
128
|
+
__wbindgen_throw,
|
|
129
|
+
__wbindgen_typeof,
|
|
130
|
+
callPendingEvents,
|
|
131
|
+
decodeFrontiers,
|
|
132
|
+
decodeImportBlobMeta,
|
|
133
|
+
encodeFrontiers,
|
|
134
|
+
redactJsonUpdates,
|
|
135
|
+
run,
|
|
136
|
+
setDebug,
|
|
137
|
+
} from "./loro_wasm_bg.js";
|
|
2
138
|
|
|
139
|
+
// Keep the import object as a plain object built from named imports. Parcel
|
|
140
|
+
// scope hoisting can lose a direct namespace import when it is used as a
|
|
141
|
+
// WebAssembly import object.
|
|
142
|
+
const imports = {
|
|
143
|
+
AwarenessWasm,
|
|
144
|
+
ChangeModifier,
|
|
145
|
+
Cursor,
|
|
146
|
+
EphemeralStoreWasm,
|
|
147
|
+
LORO_VERSION,
|
|
148
|
+
LoroCounter,
|
|
149
|
+
LoroDoc,
|
|
150
|
+
LoroList,
|
|
151
|
+
LoroMap,
|
|
152
|
+
LoroMovableList,
|
|
153
|
+
LoroText,
|
|
154
|
+
LoroTree,
|
|
155
|
+
LoroTreeNode,
|
|
156
|
+
UndoManager,
|
|
157
|
+
VersionVector,
|
|
158
|
+
__wbg_String_8f0eb39a4a4c2f66,
|
|
159
|
+
__wbg_apply_36be6a55257c99bf,
|
|
160
|
+
__wbg_apply_eb9e9b97497f91e4,
|
|
161
|
+
__wbg_buffer_609cc3eee51ed158,
|
|
162
|
+
__wbg_call_672a4d21634d4a24,
|
|
163
|
+
__wbg_call_7cccdd69e0791ae2,
|
|
164
|
+
__wbg_call_833bed5770ea2041,
|
|
165
|
+
__wbg_call_b8adc8b1d0a0d8eb,
|
|
166
|
+
__wbg_changemodifier_new,
|
|
167
|
+
__wbg_crypto_574e78ad8b13b65f,
|
|
168
|
+
__wbg_cursor_new,
|
|
169
|
+
__wbg_done_769e5ede4b31c67b,
|
|
170
|
+
__wbg_entries_3265d4158b33e5dc,
|
|
171
|
+
__wbg_entries_c8a90a7ed73e84ce,
|
|
172
|
+
__wbg_error_7534b8e9a36f1ab4,
|
|
173
|
+
__wbg_error_ce432bc82cee0d8e,
|
|
174
|
+
__wbg_from_2a5d3e218e67aa85,
|
|
175
|
+
__wbg_getOwnPropertySymbols_97eebed6fe6e08be,
|
|
176
|
+
__wbg_getRandomValues_b8f5dbd5f3995a9e,
|
|
177
|
+
__wbg_get_67b2ba62fc30de12,
|
|
178
|
+
__wbg_get_b9b93047fe3cf45b,
|
|
179
|
+
__wbg_getindex_5b00c274b05714aa,
|
|
180
|
+
__wbg_getwithrefkey_1dc361bd10053bfe,
|
|
181
|
+
__wbg_instanceof_ArrayBuffer_e14585432e3737fc,
|
|
182
|
+
__wbg_instanceof_Map_f3469ce2244d2430,
|
|
183
|
+
__wbg_instanceof_Object_7f2dcef8f78644a4,
|
|
184
|
+
__wbg_instanceof_Uint8Array_17156bcf118086a9,
|
|
185
|
+
__wbg_isArray_a1eab7e0d067391b,
|
|
186
|
+
__wbg_isSafeInteger_343e2beeeece1bb0,
|
|
187
|
+
__wbg_iterator_9a24c88df860dc65,
|
|
188
|
+
__wbg_length_a446193dc22c12f8,
|
|
189
|
+
__wbg_length_e2d2a49132c1b256,
|
|
190
|
+
__wbg_log_0cc1b7768397bcfe,
|
|
191
|
+
__wbg_log_bb5a8a0c408f06e3,
|
|
192
|
+
__wbg_log_cb9e190acc5753fb,
|
|
193
|
+
__wbg_lorocounter_new,
|
|
194
|
+
__wbg_lorolist_new,
|
|
195
|
+
__wbg_loromap_new,
|
|
196
|
+
__wbg_loromovablelist_new,
|
|
197
|
+
__wbg_lorotext_new,
|
|
198
|
+
__wbg_lorotree_new,
|
|
199
|
+
__wbg_lorotreenode_new,
|
|
200
|
+
__wbg_mark_7438147ce31e9d4b,
|
|
201
|
+
__wbg_measure_fb7825c11612c823,
|
|
202
|
+
__wbg_msCrypto_a61aeb35a24c1329,
|
|
203
|
+
__wbg_new_405e22f390576ce2,
|
|
204
|
+
__wbg_new_5e0be73521bc8c17,
|
|
205
|
+
__wbg_new_78feb108b6472713,
|
|
206
|
+
__wbg_new_8a6f238a6ece86ea,
|
|
207
|
+
__wbg_new_a12002a7f91c75be,
|
|
208
|
+
__wbg_newnoargs_105ed471475aaf50,
|
|
209
|
+
__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a,
|
|
210
|
+
__wbg_newwithlength_a381634e90c276d4,
|
|
211
|
+
__wbg_newwithlength_c4c419ef0bc8a1f8,
|
|
212
|
+
__wbg_next_25feadfc0913fea9,
|
|
213
|
+
__wbg_next_6574e1a8a62d1055,
|
|
214
|
+
__wbg_node_905d3e251edff8a2,
|
|
215
|
+
__wbg_now_6727e3e536e11536,
|
|
216
|
+
__wbg_ownKeys_3930041068756f1f,
|
|
217
|
+
__wbg_process_dc0fbacc7c1c06f7,
|
|
218
|
+
__wbg_push_737cfc8c1432c2c6,
|
|
219
|
+
__wbg_randomFillSync_ac0988aba3254290,
|
|
220
|
+
__wbg_require_60cc747a6bc5215a,
|
|
221
|
+
__wbg_resolve_4851785c9c5f573d,
|
|
222
|
+
__wbg_set_37837023f3d740e8,
|
|
223
|
+
__wbg_set_3f1d0b984ed272ed,
|
|
224
|
+
__wbg_set_65595bdd868b3009,
|
|
225
|
+
__wbg_set_8fc6bf8a5b1071d1,
|
|
226
|
+
__wbg_set_bb8cecf6a62b9f46,
|
|
227
|
+
__wbg_set_wasm,
|
|
228
|
+
__wbg_setindex_dcd71eabf405bde1,
|
|
229
|
+
__wbg_stack_0ed75d68575b0f3c,
|
|
230
|
+
__wbg_static_accessor_GLOBAL_88a902d13a557d07,
|
|
231
|
+
__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0,
|
|
232
|
+
__wbg_static_accessor_SELF_37c5d418e4bf5819,
|
|
233
|
+
__wbg_static_accessor_WINDOW_5de37043a91a9c40,
|
|
234
|
+
__wbg_subarray_aa9065fa9dc5df96,
|
|
235
|
+
__wbg_then_44b73946d2fb3e7d,
|
|
236
|
+
__wbg_value_cd1ffa7b1ab794f1,
|
|
237
|
+
__wbg_versions_c01dfd4722a88165,
|
|
238
|
+
__wbg_versionvector_new,
|
|
239
|
+
__wbg_warn_1a8c5d1d6cc53fc0,
|
|
240
|
+
__wbindgen_as_number,
|
|
241
|
+
__wbindgen_bigint_from_i64,
|
|
242
|
+
__wbindgen_bigint_from_u64,
|
|
243
|
+
__wbindgen_bigint_get_as_i64,
|
|
244
|
+
__wbindgen_boolean_get,
|
|
245
|
+
__wbindgen_cb_drop,
|
|
246
|
+
__wbindgen_closure_wrapper332,
|
|
247
|
+
__wbindgen_closure_wrapper335,
|
|
248
|
+
__wbindgen_debug_string,
|
|
249
|
+
__wbindgen_error_new,
|
|
250
|
+
__wbindgen_in,
|
|
251
|
+
__wbindgen_is_array,
|
|
252
|
+
__wbindgen_is_bigint,
|
|
253
|
+
__wbindgen_is_falsy,
|
|
254
|
+
__wbindgen_is_function,
|
|
255
|
+
__wbindgen_is_null,
|
|
256
|
+
__wbindgen_is_object,
|
|
257
|
+
__wbindgen_is_string,
|
|
258
|
+
__wbindgen_is_undefined,
|
|
259
|
+
__wbindgen_jsval_eq,
|
|
260
|
+
__wbindgen_jsval_loose_eq,
|
|
261
|
+
__wbindgen_memory,
|
|
262
|
+
__wbindgen_number_get,
|
|
263
|
+
__wbindgen_number_new,
|
|
264
|
+
__wbindgen_object_clone_ref,
|
|
265
|
+
__wbindgen_object_drop_ref,
|
|
266
|
+
__wbindgen_rethrow,
|
|
267
|
+
__wbindgen_string_get,
|
|
268
|
+
__wbindgen_string_new,
|
|
269
|
+
__wbindgen_throw,
|
|
270
|
+
__wbindgen_typeof,
|
|
271
|
+
callPendingEvents,
|
|
272
|
+
decodeFrontiers,
|
|
273
|
+
decodeImportBlobMeta,
|
|
274
|
+
encodeFrontiers,
|
|
275
|
+
redactJsonUpdates,
|
|
276
|
+
run,
|
|
277
|
+
setDebug,
|
|
278
|
+
};
|
|
3
279
|
const WASM_IMPORTS = {
|
|
4
280
|
"./loro_wasm_bg.js": imports,
|
|
5
281
|
};
|
|
@@ -26,7 +302,9 @@ function loadWasmBytesSync(url) {
|
|
|
26
302
|
|
|
27
303
|
const request = new XMLHttpRequest();
|
|
28
304
|
request.open("GET", url, false);
|
|
29
|
-
|
|
305
|
+
// A document cannot set `responseType` on synchronous XHR. Force a one-byte
|
|
306
|
+
// text decoding instead and convert the result back to wasm bytes.
|
|
307
|
+
request.overrideMimeType("text/plain; charset=x-user-defined");
|
|
30
308
|
request.send(null);
|
|
31
309
|
|
|
32
310
|
if (request.status !== 0 && (request.status < 200 || request.status >= 300)) {
|
|
@@ -35,13 +313,13 @@ function loadWasmBytesSync(url) {
|
|
|
35
313
|
);
|
|
36
314
|
}
|
|
37
315
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
);
|
|
316
|
+
const text = request.responseText;
|
|
317
|
+
const bytes = new Uint8Array(text.length);
|
|
318
|
+
for (let i = 0; i < text.length; i++) {
|
|
319
|
+
bytes[i] = text.charCodeAt(i) & 0xff;
|
|
42
320
|
}
|
|
43
321
|
|
|
44
|
-
return
|
|
322
|
+
return bytes;
|
|
45
323
|
}
|
|
46
324
|
|
|
47
325
|
function instantiateSync(bytes, importObject) {
|
|
@@ -54,4 +332,140 @@ const instance = instantiateSync(loadWasmBytesSync(wasmUrl.href), WASM_IMPORTS);
|
|
|
54
332
|
|
|
55
333
|
finalize(instance.exports);
|
|
56
334
|
|
|
57
|
-
export
|
|
335
|
+
export {
|
|
336
|
+
AwarenessWasm,
|
|
337
|
+
ChangeModifier,
|
|
338
|
+
Cursor,
|
|
339
|
+
EphemeralStoreWasm,
|
|
340
|
+
LORO_VERSION,
|
|
341
|
+
LoroCounter,
|
|
342
|
+
LoroDoc,
|
|
343
|
+
LoroList,
|
|
344
|
+
LoroMap,
|
|
345
|
+
LoroMovableList,
|
|
346
|
+
LoroText,
|
|
347
|
+
LoroTree,
|
|
348
|
+
LoroTreeNode,
|
|
349
|
+
UndoManager,
|
|
350
|
+
VersionVector,
|
|
351
|
+
__wbg_String_8f0eb39a4a4c2f66,
|
|
352
|
+
__wbg_apply_36be6a55257c99bf,
|
|
353
|
+
__wbg_apply_eb9e9b97497f91e4,
|
|
354
|
+
__wbg_buffer_609cc3eee51ed158,
|
|
355
|
+
__wbg_call_672a4d21634d4a24,
|
|
356
|
+
__wbg_call_7cccdd69e0791ae2,
|
|
357
|
+
__wbg_call_833bed5770ea2041,
|
|
358
|
+
__wbg_call_b8adc8b1d0a0d8eb,
|
|
359
|
+
__wbg_changemodifier_new,
|
|
360
|
+
__wbg_crypto_574e78ad8b13b65f,
|
|
361
|
+
__wbg_cursor_new,
|
|
362
|
+
__wbg_done_769e5ede4b31c67b,
|
|
363
|
+
__wbg_entries_3265d4158b33e5dc,
|
|
364
|
+
__wbg_entries_c8a90a7ed73e84ce,
|
|
365
|
+
__wbg_error_7534b8e9a36f1ab4,
|
|
366
|
+
__wbg_error_ce432bc82cee0d8e,
|
|
367
|
+
__wbg_from_2a5d3e218e67aa85,
|
|
368
|
+
__wbg_getOwnPropertySymbols_97eebed6fe6e08be,
|
|
369
|
+
__wbg_getRandomValues_b8f5dbd5f3995a9e,
|
|
370
|
+
__wbg_get_67b2ba62fc30de12,
|
|
371
|
+
__wbg_get_b9b93047fe3cf45b,
|
|
372
|
+
__wbg_getindex_5b00c274b05714aa,
|
|
373
|
+
__wbg_getwithrefkey_1dc361bd10053bfe,
|
|
374
|
+
__wbg_instanceof_ArrayBuffer_e14585432e3737fc,
|
|
375
|
+
__wbg_instanceof_Map_f3469ce2244d2430,
|
|
376
|
+
__wbg_instanceof_Object_7f2dcef8f78644a4,
|
|
377
|
+
__wbg_instanceof_Uint8Array_17156bcf118086a9,
|
|
378
|
+
__wbg_isArray_a1eab7e0d067391b,
|
|
379
|
+
__wbg_isSafeInteger_343e2beeeece1bb0,
|
|
380
|
+
__wbg_iterator_9a24c88df860dc65,
|
|
381
|
+
__wbg_length_a446193dc22c12f8,
|
|
382
|
+
__wbg_length_e2d2a49132c1b256,
|
|
383
|
+
__wbg_log_0cc1b7768397bcfe,
|
|
384
|
+
__wbg_log_bb5a8a0c408f06e3,
|
|
385
|
+
__wbg_log_cb9e190acc5753fb,
|
|
386
|
+
__wbg_lorocounter_new,
|
|
387
|
+
__wbg_lorolist_new,
|
|
388
|
+
__wbg_loromap_new,
|
|
389
|
+
__wbg_loromovablelist_new,
|
|
390
|
+
__wbg_lorotext_new,
|
|
391
|
+
__wbg_lorotree_new,
|
|
392
|
+
__wbg_lorotreenode_new,
|
|
393
|
+
__wbg_mark_7438147ce31e9d4b,
|
|
394
|
+
__wbg_measure_fb7825c11612c823,
|
|
395
|
+
__wbg_msCrypto_a61aeb35a24c1329,
|
|
396
|
+
__wbg_new_405e22f390576ce2,
|
|
397
|
+
__wbg_new_5e0be73521bc8c17,
|
|
398
|
+
__wbg_new_78feb108b6472713,
|
|
399
|
+
__wbg_new_8a6f238a6ece86ea,
|
|
400
|
+
__wbg_new_a12002a7f91c75be,
|
|
401
|
+
__wbg_newnoargs_105ed471475aaf50,
|
|
402
|
+
__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a,
|
|
403
|
+
__wbg_newwithlength_a381634e90c276d4,
|
|
404
|
+
__wbg_newwithlength_c4c419ef0bc8a1f8,
|
|
405
|
+
__wbg_next_25feadfc0913fea9,
|
|
406
|
+
__wbg_next_6574e1a8a62d1055,
|
|
407
|
+
__wbg_node_905d3e251edff8a2,
|
|
408
|
+
__wbg_now_6727e3e536e11536,
|
|
409
|
+
__wbg_ownKeys_3930041068756f1f,
|
|
410
|
+
__wbg_process_dc0fbacc7c1c06f7,
|
|
411
|
+
__wbg_push_737cfc8c1432c2c6,
|
|
412
|
+
__wbg_randomFillSync_ac0988aba3254290,
|
|
413
|
+
__wbg_require_60cc747a6bc5215a,
|
|
414
|
+
__wbg_resolve_4851785c9c5f573d,
|
|
415
|
+
__wbg_set_37837023f3d740e8,
|
|
416
|
+
__wbg_set_3f1d0b984ed272ed,
|
|
417
|
+
__wbg_set_65595bdd868b3009,
|
|
418
|
+
__wbg_set_8fc6bf8a5b1071d1,
|
|
419
|
+
__wbg_set_bb8cecf6a62b9f46,
|
|
420
|
+
__wbg_set_wasm,
|
|
421
|
+
__wbg_setindex_dcd71eabf405bde1,
|
|
422
|
+
__wbg_stack_0ed75d68575b0f3c,
|
|
423
|
+
__wbg_static_accessor_GLOBAL_88a902d13a557d07,
|
|
424
|
+
__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0,
|
|
425
|
+
__wbg_static_accessor_SELF_37c5d418e4bf5819,
|
|
426
|
+
__wbg_static_accessor_WINDOW_5de37043a91a9c40,
|
|
427
|
+
__wbg_subarray_aa9065fa9dc5df96,
|
|
428
|
+
__wbg_then_44b73946d2fb3e7d,
|
|
429
|
+
__wbg_value_cd1ffa7b1ab794f1,
|
|
430
|
+
__wbg_versions_c01dfd4722a88165,
|
|
431
|
+
__wbg_versionvector_new,
|
|
432
|
+
__wbg_warn_1a8c5d1d6cc53fc0,
|
|
433
|
+
__wbindgen_as_number,
|
|
434
|
+
__wbindgen_bigint_from_i64,
|
|
435
|
+
__wbindgen_bigint_from_u64,
|
|
436
|
+
__wbindgen_bigint_get_as_i64,
|
|
437
|
+
__wbindgen_boolean_get,
|
|
438
|
+
__wbindgen_cb_drop,
|
|
439
|
+
__wbindgen_closure_wrapper332,
|
|
440
|
+
__wbindgen_closure_wrapper335,
|
|
441
|
+
__wbindgen_debug_string,
|
|
442
|
+
__wbindgen_error_new,
|
|
443
|
+
__wbindgen_in,
|
|
444
|
+
__wbindgen_is_array,
|
|
445
|
+
__wbindgen_is_bigint,
|
|
446
|
+
__wbindgen_is_falsy,
|
|
447
|
+
__wbindgen_is_function,
|
|
448
|
+
__wbindgen_is_null,
|
|
449
|
+
__wbindgen_is_object,
|
|
450
|
+
__wbindgen_is_string,
|
|
451
|
+
__wbindgen_is_undefined,
|
|
452
|
+
__wbindgen_jsval_eq,
|
|
453
|
+
__wbindgen_jsval_loose_eq,
|
|
454
|
+
__wbindgen_memory,
|
|
455
|
+
__wbindgen_number_get,
|
|
456
|
+
__wbindgen_number_new,
|
|
457
|
+
__wbindgen_object_clone_ref,
|
|
458
|
+
__wbindgen_object_drop_ref,
|
|
459
|
+
__wbindgen_rethrow,
|
|
460
|
+
__wbindgen_string_get,
|
|
461
|
+
__wbindgen_string_new,
|
|
462
|
+
__wbindgen_throw,
|
|
463
|
+
__wbindgen_typeof,
|
|
464
|
+
callPendingEvents,
|
|
465
|
+
decodeFrontiers,
|
|
466
|
+
decodeImportBlobMeta,
|
|
467
|
+
encodeFrontiers,
|
|
468
|
+
redactJsonUpdates,
|
|
469
|
+
run,
|
|
470
|
+
setDebug,
|
|
471
|
+
};
|
package/browser/loro_wasm_bg.js
CHANGED
|
@@ -263,83 +263,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
263
263
|
}
|
|
264
264
|
return result;
|
|
265
265
|
}
|
|
266
|
-
/**
|
|
267
|
-
* Get the version of Loro
|
|
268
|
-
* @returns {string}
|
|
269
|
-
*/
|
|
270
|
-
export function LORO_VERSION() {
|
|
271
|
-
let deferred1_0;
|
|
272
|
-
let deferred1_1;
|
|
273
|
-
try {
|
|
274
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
275
|
-
wasm.LORO_VERSION(retptr);
|
|
276
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
277
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
278
|
-
deferred1_0 = r0;
|
|
279
|
-
deferred1_1 = r1;
|
|
280
|
-
return getStringFromWasm0(r0, r1);
|
|
281
|
-
} finally {
|
|
282
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
283
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
/**
|
|
288
|
-
* @param {Uint8Array} bytes
|
|
289
|
-
* @returns {{ peer: PeerID, counter: number }[]}
|
|
290
|
-
*/
|
|
291
|
-
export function decodeFrontiers(bytes) {
|
|
292
|
-
try {
|
|
293
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
294
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
295
|
-
const len0 = WASM_VECTOR_LEN;
|
|
296
|
-
wasm.decodeFrontiers(retptr, ptr0, len0);
|
|
297
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
298
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
299
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
300
|
-
if (r2) {
|
|
301
|
-
throw takeObject(r1);
|
|
302
|
-
}
|
|
303
|
-
return takeObject(r0);
|
|
304
|
-
} finally {
|
|
305
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
function passArrayJsValueToWasm0(array, malloc) {
|
|
310
|
-
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
311
|
-
const mem = getDataViewMemory0();
|
|
312
|
-
for (let i = 0; i < array.length; i++) {
|
|
313
|
-
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
314
|
-
}
|
|
315
|
-
WASM_VECTOR_LEN = array.length;
|
|
316
|
-
return ptr;
|
|
317
|
-
}
|
|
318
|
-
/**
|
|
319
|
-
* @param {({ peer: PeerID, counter: number })[]} frontiers
|
|
320
|
-
* @returns {Uint8Array}
|
|
321
|
-
*/
|
|
322
|
-
export function encodeFrontiers(frontiers) {
|
|
323
|
-
try {
|
|
324
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
325
|
-
const ptr0 = passArrayJsValueToWasm0(frontiers, wasm.__wbindgen_malloc);
|
|
326
|
-
const len0 = WASM_VECTOR_LEN;
|
|
327
|
-
wasm.encodeFrontiers(retptr, ptr0, len0);
|
|
328
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
329
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
330
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
331
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
332
|
-
if (r3) {
|
|
333
|
-
throw takeObject(r2);
|
|
334
|
-
}
|
|
335
|
-
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
336
|
-
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
337
|
-
return v2;
|
|
338
|
-
} finally {
|
|
339
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
|
|
343
266
|
/**
|
|
344
267
|
* Decode the metadata of the import blob.
|
|
345
268
|
*
|
|
@@ -377,6 +300,31 @@ export function run() {
|
|
|
377
300
|
wasm.run();
|
|
378
301
|
}
|
|
379
302
|
|
|
303
|
+
export function callPendingEvents() {
|
|
304
|
+
wasm.callPendingEvents();
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* Get the version of Loro
|
|
309
|
+
* @returns {string}
|
|
310
|
+
*/
|
|
311
|
+
export function LORO_VERSION() {
|
|
312
|
+
let deferred1_0;
|
|
313
|
+
let deferred1_1;
|
|
314
|
+
try {
|
|
315
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
316
|
+
wasm.LORO_VERSION(retptr);
|
|
317
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
318
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
319
|
+
deferred1_0 = r0;
|
|
320
|
+
deferred1_1 = r1;
|
|
321
|
+
return getStringFromWasm0(r0, r1);
|
|
322
|
+
} finally {
|
|
323
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
324
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
380
328
|
/**
|
|
381
329
|
* Redacts sensitive content in JSON updates within the specified version range.
|
|
382
330
|
*
|
|
@@ -422,16 +370,68 @@ export function setDebug() {
|
|
|
422
370
|
wasm.setDebug();
|
|
423
371
|
}
|
|
424
372
|
|
|
425
|
-
|
|
426
|
-
|
|
373
|
+
/**
|
|
374
|
+
* @param {Uint8Array} bytes
|
|
375
|
+
* @returns {{ peer: PeerID, counter: number }[]}
|
|
376
|
+
*/
|
|
377
|
+
export function decodeFrontiers(bytes) {
|
|
378
|
+
try {
|
|
379
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
380
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
381
|
+
const len0 = WASM_VECTOR_LEN;
|
|
382
|
+
wasm.decodeFrontiers(retptr, ptr0, len0);
|
|
383
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
384
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
385
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
386
|
+
if (r2) {
|
|
387
|
+
throw takeObject(r1);
|
|
388
|
+
}
|
|
389
|
+
return takeObject(r0);
|
|
390
|
+
} finally {
|
|
391
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
function passArrayJsValueToWasm0(array, malloc) {
|
|
396
|
+
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
397
|
+
const mem = getDataViewMemory0();
|
|
398
|
+
for (let i = 0; i < array.length; i++) {
|
|
399
|
+
mem.setUint32(ptr + 4 * i, addHeapObject(array[i]), true);
|
|
400
|
+
}
|
|
401
|
+
WASM_VECTOR_LEN = array.length;
|
|
402
|
+
return ptr;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* @param {({ peer: PeerID, counter: number })[]} frontiers
|
|
406
|
+
* @returns {Uint8Array}
|
|
407
|
+
*/
|
|
408
|
+
export function encodeFrontiers(frontiers) {
|
|
409
|
+
try {
|
|
410
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
411
|
+
const ptr0 = passArrayJsValueToWasm0(frontiers, wasm.__wbindgen_malloc);
|
|
412
|
+
const len0 = WASM_VECTOR_LEN;
|
|
413
|
+
wasm.encodeFrontiers(retptr, ptr0, len0);
|
|
414
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
415
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
416
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
417
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
418
|
+
if (r3) {
|
|
419
|
+
throw takeObject(r2);
|
|
420
|
+
}
|
|
421
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
422
|
+
wasm.__wbindgen_free(r0, r1 * 1, 1);
|
|
423
|
+
return v2;
|
|
424
|
+
} finally {
|
|
425
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
426
|
+
}
|
|
427
427
|
}
|
|
428
428
|
|
|
429
429
|
function __wbg_adapter_60(arg0, arg1, arg2) {
|
|
430
|
-
wasm.
|
|
430
|
+
wasm._dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4140222e72d5e007(arg0, arg1, addHeapObject(arg2));
|
|
431
431
|
}
|
|
432
432
|
|
|
433
433
|
function __wbg_adapter_63(arg0, arg1) {
|
|
434
|
-
wasm.
|
|
434
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h88ce803bd0871954(arg0, arg1);
|
|
435
435
|
}
|
|
436
436
|
|
|
437
437
|
const AwarenessWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -6821,7 +6821,7 @@ export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
|
|
|
6821
6821
|
}
|
|
6822
6822
|
};
|
|
6823
6823
|
|
|
6824
|
-
export function
|
|
6824
|
+
export function __wbg_error_ce432bc82cee0d8e(arg0, arg1) {
|
|
6825
6825
|
console.error(getStringFromWasm0(arg0, arg1));
|
|
6826
6826
|
};
|
|
6827
6827
|
|
|
@@ -6940,7 +6940,7 @@ export function __wbg_log_0cc1b7768397bcfe(arg0, arg1, arg2, arg3, arg4, arg5, a
|
|
|
6940
6940
|
}
|
|
6941
6941
|
};
|
|
6942
6942
|
|
|
6943
|
-
export function
|
|
6943
|
+
export function __wbg_log_bb5a8a0c408f06e3(arg0, arg1) {
|
|
6944
6944
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
6945
6945
|
};
|
|
6946
6946
|
|
|
@@ -7190,7 +7190,7 @@ export function __wbg_versionvector_new(arg0) {
|
|
|
7190
7190
|
return addHeapObject(ret);
|
|
7191
7191
|
};
|
|
7192
7192
|
|
|
7193
|
-
export function
|
|
7193
|
+
export function __wbg_warn_1a8c5d1d6cc53fc0(arg0, arg1) {
|
|
7194
7194
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
7195
7195
|
};
|
|
7196
7196
|
|
|
Binary file
|
|
@@ -324,6 +324,6 @@ export const __wbindgen_exn_store: (a: number) => void;
|
|
|
324
324
|
export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
325
325
|
export const __wbindgen_export_4: WebAssembly.Table;
|
|
326
326
|
export const __wbindgen_add_to_stack_pointer: (a: number) => number;
|
|
327
|
-
export const
|
|
328
|
-
export const
|
|
327
|
+
export const _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h4140222e72d5e007: (a: number, b: number, c: number) => void;
|
|
328
|
+
export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h88ce803bd0871954: (a: number, b: number) => void;
|
|
329
329
|
export const __wbindgen_start: () => void;
|