loro-crdt 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/base64/index.js +156 -75
- package/base64/loro_wasm.d.ts +19 -11
- package/bundler/loro_wasm.d.ts +19 -11
- package/bundler/loro_wasm_bg.js +149 -68
- package/bundler/loro_wasm_bg.wasm +0 -0
- package/bundler/loro_wasm_bg.wasm.d.ts +21 -19
- package/nodejs/loro_wasm.d.ts +19 -11
- package/nodejs/loro_wasm.js +149 -68
- package/nodejs/loro_wasm_bg.wasm +0 -0
- package/nodejs/loro_wasm_bg.wasm.d.ts +21 -19
- package/package.json +1 -1
- package/web/loro_wasm.d.ts +40 -30
- package/web/loro_wasm.js +147 -67
- package/web/loro_wasm_bg.wasm +0 -0
- package/web/loro_wasm_bg.wasm.d.ts +21 -19
package/nodejs/loro_wasm.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Get the version of Loro
|
|
5
|
+
*/
|
|
6
|
+
export function LORO_VERSION(): string;
|
|
7
|
+
/**
|
|
8
|
+
* Enable debug info of Loro
|
|
9
|
+
*/
|
|
10
|
+
export function setDebug(): void;
|
|
11
|
+
export function run(): void;
|
|
12
|
+
export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
|
|
4
13
|
/**
|
|
5
14
|
* Redacts sensitive content in JSON updates within the specified version range.
|
|
6
15
|
*
|
|
@@ -21,7 +30,6 @@ export function callPendingEvents(): void;
|
|
|
21
30
|
* @returns {Object} The redacted JSON updates
|
|
22
31
|
*/
|
|
23
32
|
export function redactJsonUpdates(json_updates: string | JsonSchema, version_range: any): JsonSchema;
|
|
24
|
-
export function run(): void;
|
|
25
33
|
/**
|
|
26
34
|
* Decode the metadata of the import blob.
|
|
27
35
|
*
|
|
@@ -35,16 +43,8 @@ export function run(): void;
|
|
|
35
43
|
* - changeNum
|
|
36
44
|
*/
|
|
37
45
|
export function decodeImportBlobMeta(blob: Uint8Array, check_checksum: boolean): ImportBlobMetadata;
|
|
38
|
-
/**
|
|
39
|
-
* Get the version of Loro
|
|
40
|
-
*/
|
|
41
|
-
export function LORO_VERSION(): string;
|
|
42
|
-
export function decodeFrontiers(bytes: Uint8Array): { peer: PeerID, counter: number }[];
|
|
43
46
|
export function encodeFrontiers(frontiers: ({ peer: PeerID, counter: number })[]): Uint8Array;
|
|
44
|
-
|
|
45
|
-
* Enable debug info of Loro
|
|
46
|
-
*/
|
|
47
|
-
export function setDebug(): void;
|
|
47
|
+
export function callPendingEvents(): void;
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
50
|
* Container types supported by loro.
|
|
@@ -3074,12 +3074,20 @@ export class LoroText {
|
|
|
3074
3074
|
* If it's detached, the operations on the container will not be persisted.
|
|
3075
3075
|
*/
|
|
3076
3076
|
isAttached(): boolean;
|
|
3077
|
+
/**
|
|
3078
|
+
* Get the rich text delta in the given range (utf-16 index).
|
|
3079
|
+
*/
|
|
3080
|
+
sliceDelta(start: number, end: number): Delta<string>[];
|
|
3077
3081
|
/**
|
|
3078
3082
|
* Get the attached container associated with this.
|
|
3079
3083
|
*
|
|
3080
3084
|
* Returns an attached `Container` that is equal to this or created by this; otherwise, it returns `undefined`.
|
|
3081
3085
|
*/
|
|
3082
3086
|
getAttached(): LoroText | undefined;
|
|
3087
|
+
/**
|
|
3088
|
+
* Get the rich text delta in the given range (utf-8 index).
|
|
3089
|
+
*/
|
|
3090
|
+
sliceDeltaUtf8(start: number, end: number): Delta<string>[];
|
|
3083
3091
|
/**
|
|
3084
3092
|
* Get the shallow value of the text. This equals to `text.toString()`.
|
|
3085
3093
|
*/
|
package/nodejs/loro_wasm.js
CHANGED
|
@@ -236,9 +236,46 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
236
236
|
wasm.__externref_drop_slice(ptr, len);
|
|
237
237
|
return result;
|
|
238
238
|
}
|
|
239
|
+
/**
|
|
240
|
+
* Get the version of Loro
|
|
241
|
+
* @returns {string}
|
|
242
|
+
*/
|
|
243
|
+
module.exports.LORO_VERSION = function() {
|
|
244
|
+
let deferred1_0;
|
|
245
|
+
let deferred1_1;
|
|
246
|
+
try {
|
|
247
|
+
const ret = wasm.LORO_VERSION();
|
|
248
|
+
deferred1_0 = ret[0];
|
|
249
|
+
deferred1_1 = ret[1];
|
|
250
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
251
|
+
} finally {
|
|
252
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
253
|
+
}
|
|
254
|
+
};
|
|
239
255
|
|
|
240
|
-
|
|
241
|
-
|
|
256
|
+
/**
|
|
257
|
+
* Enable debug info of Loro
|
|
258
|
+
*/
|
|
259
|
+
module.exports.setDebug = function() {
|
|
260
|
+
wasm.setDebug();
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
module.exports.run = function() {
|
|
264
|
+
wasm.run();
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* @param {Uint8Array} bytes
|
|
269
|
+
* @returns {{ peer: PeerID, counter: number }[]}
|
|
270
|
+
*/
|
|
271
|
+
module.exports.decodeFrontiers = function(bytes) {
|
|
272
|
+
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
273
|
+
const len0 = WASM_VECTOR_LEN;
|
|
274
|
+
const ret = wasm.decodeFrontiers(ptr0, len0);
|
|
275
|
+
if (ret[2]) {
|
|
276
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
277
|
+
}
|
|
278
|
+
return takeFromExternrefTable0(ret[0]);
|
|
242
279
|
};
|
|
243
280
|
|
|
244
281
|
/**
|
|
@@ -271,10 +308,6 @@ module.exports.redactJsonUpdates = function(json_updates, version_range) {
|
|
|
271
308
|
return takeFromExternrefTable0(ret[0]);
|
|
272
309
|
};
|
|
273
310
|
|
|
274
|
-
module.exports.run = function() {
|
|
275
|
-
wasm.run();
|
|
276
|
-
};
|
|
277
|
-
|
|
278
311
|
/**
|
|
279
312
|
* Decode the metadata of the import blob.
|
|
280
313
|
*
|
|
@@ -300,37 +333,6 @@ module.exports.decodeImportBlobMeta = function(blob, check_checksum) {
|
|
|
300
333
|
return takeFromExternrefTable0(ret[0]);
|
|
301
334
|
};
|
|
302
335
|
|
|
303
|
-
/**
|
|
304
|
-
* Get the version of Loro
|
|
305
|
-
* @returns {string}
|
|
306
|
-
*/
|
|
307
|
-
module.exports.LORO_VERSION = function() {
|
|
308
|
-
let deferred1_0;
|
|
309
|
-
let deferred1_1;
|
|
310
|
-
try {
|
|
311
|
-
const ret = wasm.LORO_VERSION();
|
|
312
|
-
deferred1_0 = ret[0];
|
|
313
|
-
deferred1_1 = ret[1];
|
|
314
|
-
return getStringFromWasm0(ret[0], ret[1]);
|
|
315
|
-
} finally {
|
|
316
|
-
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
317
|
-
}
|
|
318
|
-
};
|
|
319
|
-
|
|
320
|
-
/**
|
|
321
|
-
* @param {Uint8Array} bytes
|
|
322
|
-
* @returns {{ peer: PeerID, counter: number }[]}
|
|
323
|
-
*/
|
|
324
|
-
module.exports.decodeFrontiers = function(bytes) {
|
|
325
|
-
const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_malloc);
|
|
326
|
-
const len0 = WASM_VECTOR_LEN;
|
|
327
|
-
const ret = wasm.decodeFrontiers(ptr0, len0);
|
|
328
|
-
if (ret[2]) {
|
|
329
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
330
|
-
}
|
|
331
|
-
return takeFromExternrefTable0(ret[0]);
|
|
332
|
-
};
|
|
333
|
-
|
|
334
336
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
335
337
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
336
338
|
for (let i = 0; i < array.length; i++) {
|
|
@@ -356,19 +358,16 @@ module.exports.encodeFrontiers = function(frontiers) {
|
|
|
356
358
|
return v2;
|
|
357
359
|
};
|
|
358
360
|
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
*/
|
|
362
|
-
module.exports.setDebug = function() {
|
|
363
|
-
wasm.setDebug();
|
|
361
|
+
module.exports.callPendingEvents = function() {
|
|
362
|
+
wasm.callPendingEvents();
|
|
364
363
|
};
|
|
365
364
|
|
|
366
365
|
function __wbg_adapter_62(arg0, arg1, arg2) {
|
|
367
|
-
wasm.
|
|
366
|
+
wasm.closure11_externref_shim(arg0, arg1, arg2);
|
|
368
367
|
}
|
|
369
368
|
|
|
370
369
|
function __wbg_adapter_65(arg0, arg1) {
|
|
371
|
-
wasm.
|
|
370
|
+
wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h87f1268ec3b8423e(arg0, arg1);
|
|
372
371
|
}
|
|
373
372
|
|
|
374
373
|
const AwarenessWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -401,7 +400,10 @@ class AwarenessWasm {
|
|
|
401
400
|
*/
|
|
402
401
|
getAllStates() {
|
|
403
402
|
const ret = wasm.awarenesswasm_getAllStates(this.__wbg_ptr);
|
|
404
|
-
|
|
403
|
+
if (ret[2]) {
|
|
404
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
405
|
+
}
|
|
406
|
+
return takeFromExternrefTable0(ret[0]);
|
|
405
407
|
}
|
|
406
408
|
/**
|
|
407
409
|
* Get the timestamp of the state of a given peer.
|
|
@@ -410,6 +412,9 @@ class AwarenessWasm {
|
|
|
410
412
|
*/
|
|
411
413
|
getTimestamp(peer) {
|
|
412
414
|
const ret = wasm.awarenesswasm_getTimestamp(this.__wbg_ptr, peer);
|
|
415
|
+
if (ret[3]) {
|
|
416
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
417
|
+
}
|
|
413
418
|
return ret[0] === 0 ? undefined : ret[1];
|
|
414
419
|
}
|
|
415
420
|
/**
|
|
@@ -440,7 +445,10 @@ class AwarenessWasm {
|
|
|
440
445
|
*/
|
|
441
446
|
constructor(peer, timeout) {
|
|
442
447
|
const ret = wasm.awarenesswasm_new(peer, timeout);
|
|
443
|
-
|
|
448
|
+
if (ret[2]) {
|
|
449
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
450
|
+
}
|
|
451
|
+
this.__wbg_ptr = ret[0] >>> 0;
|
|
444
452
|
AwarenessWasmFinalization.register(this, this.__wbg_ptr, this);
|
|
445
453
|
return this;
|
|
446
454
|
}
|
|
@@ -486,6 +494,9 @@ class AwarenessWasm {
|
|
|
486
494
|
*/
|
|
487
495
|
encode(peers) {
|
|
488
496
|
const ret = wasm.awarenesswasm_encode(this.__wbg_ptr, peers);
|
|
497
|
+
if (ret[3]) {
|
|
498
|
+
throw takeFromExternrefTable0(ret[2]);
|
|
499
|
+
}
|
|
489
500
|
var v1 = getArrayU8FromWasm0(ret[0], ret[1]).slice();
|
|
490
501
|
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
491
502
|
return v1;
|
|
@@ -513,7 +524,10 @@ class AwarenessWasm {
|
|
|
513
524
|
*/
|
|
514
525
|
getState(peer) {
|
|
515
526
|
const ret = wasm.awarenesswasm_getState(this.__wbg_ptr, peer);
|
|
516
|
-
|
|
527
|
+
if (ret[2]) {
|
|
528
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
529
|
+
}
|
|
530
|
+
return takeFromExternrefTable0(ret[0]);
|
|
517
531
|
}
|
|
518
532
|
/**
|
|
519
533
|
* Encodes the state of all peers.
|
|
@@ -647,7 +661,10 @@ class Cursor {
|
|
|
647
661
|
*/
|
|
648
662
|
pos() {
|
|
649
663
|
const ret = wasm.cursor_pos(this.__wbg_ptr);
|
|
650
|
-
|
|
664
|
+
if (ret[2]) {
|
|
665
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
666
|
+
}
|
|
667
|
+
return takeFromExternrefTable0(ret[0]);
|
|
651
668
|
}
|
|
652
669
|
/**
|
|
653
670
|
* "Cursor"
|
|
@@ -714,7 +731,10 @@ class EphemeralStoreWasm {
|
|
|
714
731
|
*/
|
|
715
732
|
getAllStates() {
|
|
716
733
|
const ret = wasm.ephemeralstorewasm_getAllStates(this.__wbg_ptr);
|
|
717
|
-
|
|
734
|
+
if (ret[2]) {
|
|
735
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
736
|
+
}
|
|
737
|
+
return takeFromExternrefTable0(ret[0]);
|
|
718
738
|
}
|
|
719
739
|
removeOutdated() {
|
|
720
740
|
wasm.ephemeralstorewasm_removeOutdated(this.__wbg_ptr);
|
|
@@ -881,7 +901,10 @@ class LoroCounter {
|
|
|
881
901
|
*/
|
|
882
902
|
getShallowValue() {
|
|
883
903
|
const ret = wasm.lorocounter_getShallowValue(this.__wbg_ptr);
|
|
884
|
-
|
|
904
|
+
if (ret[2]) {
|
|
905
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
906
|
+
}
|
|
907
|
+
return ret[0];
|
|
885
908
|
}
|
|
886
909
|
/**
|
|
887
910
|
* The container id of this handler.
|
|
@@ -925,7 +948,10 @@ class LoroCounter {
|
|
|
925
948
|
*/
|
|
926
949
|
toJSON() {
|
|
927
950
|
const ret = wasm.lorocounter_toJSON(this.__wbg_ptr);
|
|
928
|
-
|
|
951
|
+
if (ret[2]) {
|
|
952
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
953
|
+
}
|
|
954
|
+
return ret[0];
|
|
929
955
|
}
|
|
930
956
|
/**
|
|
931
957
|
* Decrement the counter by the given value.
|
|
@@ -943,7 +969,10 @@ class LoroCounter {
|
|
|
943
969
|
*/
|
|
944
970
|
get value() {
|
|
945
971
|
const ret = wasm.lorocounter_value(this.__wbg_ptr);
|
|
946
|
-
|
|
972
|
+
if (ret[2]) {
|
|
973
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
974
|
+
}
|
|
975
|
+
return ret[0];
|
|
947
976
|
}
|
|
948
977
|
/**
|
|
949
978
|
* Increment the counter by the given value.
|
|
@@ -1423,7 +1452,10 @@ class LoroDoc {
|
|
|
1423
1452
|
*/
|
|
1424
1453
|
oplogFrontiers() {
|
|
1425
1454
|
const ret = wasm.lorodoc_oplogFrontiers(this.__wbg_ptr);
|
|
1426
|
-
|
|
1455
|
+
if (ret[2]) {
|
|
1456
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1457
|
+
}
|
|
1458
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1427
1459
|
}
|
|
1428
1460
|
/**
|
|
1429
1461
|
* Convert a version vector to frontiers
|
|
@@ -1959,7 +1991,10 @@ class LoroDoc {
|
|
|
1959
1991
|
*/
|
|
1960
1992
|
shallowSinceFrontiers() {
|
|
1961
1993
|
const ret = wasm.lorodoc_shallowSinceFrontiers(this.__wbg_ptr);
|
|
1962
|
-
|
|
1994
|
+
if (ret[2]) {
|
|
1995
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
1996
|
+
}
|
|
1997
|
+
return takeFromExternrefTable0(ret[0]);
|
|
1963
1998
|
}
|
|
1964
1999
|
/**
|
|
1965
2000
|
* Subscribe the updates from local edits
|
|
@@ -2491,7 +2526,10 @@ class LoroDoc {
|
|
|
2491
2526
|
*/
|
|
2492
2527
|
frontiers() {
|
|
2493
2528
|
const ret = wasm.lorodoc_frontiers(this.__wbg_ptr);
|
|
2494
|
-
|
|
2529
|
+
if (ret[2]) {
|
|
2530
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2531
|
+
}
|
|
2532
|
+
return takeFromExternrefTable0(ret[0]);
|
|
2495
2533
|
}
|
|
2496
2534
|
/**
|
|
2497
2535
|
* Evaluate JSONPath against a LoroDoc
|
|
@@ -2840,7 +2878,10 @@ class LoroList {
|
|
|
2840
2878
|
*/
|
|
2841
2879
|
getIdAt(pos) {
|
|
2842
2880
|
const ret = wasm.lorolist_getIdAt(this.__wbg_ptr, pos);
|
|
2843
|
-
|
|
2881
|
+
if (ret[2]) {
|
|
2882
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
2883
|
+
}
|
|
2884
|
+
return takeFromExternrefTable0(ret[0]);
|
|
2844
2885
|
}
|
|
2845
2886
|
/**
|
|
2846
2887
|
* Get elements of the list. If the type of a element is a container, it will be
|
|
@@ -3931,6 +3972,19 @@ class LoroText {
|
|
|
3931
3972
|
const ret = wasm.lorotext_isAttached(this.__wbg_ptr);
|
|
3932
3973
|
return ret !== 0;
|
|
3933
3974
|
}
|
|
3975
|
+
/**
|
|
3976
|
+
* Get the rich text delta in the given range (utf-16 index).
|
|
3977
|
+
* @param {number} start
|
|
3978
|
+
* @param {number} end
|
|
3979
|
+
* @returns {Delta<string>[]}
|
|
3980
|
+
*/
|
|
3981
|
+
sliceDelta(start, end) {
|
|
3982
|
+
const ret = wasm.lorotext_sliceDelta(this.__wbg_ptr, start, end);
|
|
3983
|
+
if (ret[2]) {
|
|
3984
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
3985
|
+
}
|
|
3986
|
+
return takeFromExternrefTable0(ret[0]);
|
|
3987
|
+
}
|
|
3934
3988
|
/**
|
|
3935
3989
|
* Get the attached container associated with this.
|
|
3936
3990
|
*
|
|
@@ -3956,6 +4010,19 @@ class LoroText {
|
|
|
3956
4010
|
throw takeFromExternrefTable0(ret[0]);
|
|
3957
4011
|
}
|
|
3958
4012
|
}
|
|
4013
|
+
/**
|
|
4014
|
+
* Get the rich text delta in the given range (utf-8 index).
|
|
4015
|
+
* @param {number} start
|
|
4016
|
+
* @param {number} end
|
|
4017
|
+
* @returns {Delta<string>[]}
|
|
4018
|
+
*/
|
|
4019
|
+
sliceDeltaUtf8(start, end) {
|
|
4020
|
+
const ret = wasm.lorotext_sliceDeltaUtf8(this.__wbg_ptr, start, end);
|
|
4021
|
+
if (ret[2]) {
|
|
4022
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
4023
|
+
}
|
|
4024
|
+
return takeFromExternrefTable0(ret[0]);
|
|
4025
|
+
}
|
|
3959
4026
|
/**
|
|
3960
4027
|
* Get the shallow value of the text. This equals to `text.toString()`.
|
|
3961
4028
|
* @returns {string}
|
|
@@ -4312,7 +4379,10 @@ class LoroText {
|
|
|
4312
4379
|
*/
|
|
4313
4380
|
toDelta() {
|
|
4314
4381
|
const ret = wasm.lorotext_toDelta(this.__wbg_ptr);
|
|
4315
|
-
|
|
4382
|
+
if (ret[2]) {
|
|
4383
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
4384
|
+
}
|
|
4385
|
+
return takeFromExternrefTable0(ret[0]);
|
|
4316
4386
|
}
|
|
4317
4387
|
/**
|
|
4318
4388
|
* Get the cursor at the given position.
|
|
@@ -4821,7 +4891,10 @@ class LoroTreeNode {
|
|
|
4821
4891
|
*/
|
|
4822
4892
|
creationId() {
|
|
4823
4893
|
const ret = wasm.lorotreenode_creationId(this.__wbg_ptr);
|
|
4824
|
-
|
|
4894
|
+
if (ret[2]) {
|
|
4895
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
4896
|
+
}
|
|
4897
|
+
return takeFromExternrefTable0(ret[0]);
|
|
4825
4898
|
}
|
|
4826
4899
|
/**
|
|
4827
4900
|
* Check if the node is deleted.
|
|
@@ -4895,7 +4968,10 @@ class LoroTreeNode {
|
|
|
4895
4968
|
*/
|
|
4896
4969
|
getLastMoveId() {
|
|
4897
4970
|
const ret = wasm.lorotreenode_getLastMoveId(this.__wbg_ptr);
|
|
4898
|
-
|
|
4971
|
+
if (ret[2]) {
|
|
4972
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
4973
|
+
}
|
|
4974
|
+
return takeFromExternrefTable0(ret[0]);
|
|
4899
4975
|
}
|
|
4900
4976
|
/**
|
|
4901
4977
|
* @returns {any}
|
|
@@ -5443,10 +5519,6 @@ module.exports.__wbg_entries_c8a90a7ed73e84ce = function(arg0) {
|
|
|
5443
5519
|
return ret;
|
|
5444
5520
|
};
|
|
5445
5521
|
|
|
5446
|
-
module.exports.__wbg_error_741e969e3ea41e08 = function(arg0, arg1) {
|
|
5447
|
-
console.error(getStringFromWasm0(arg0, arg1));
|
|
5448
|
-
};
|
|
5449
|
-
|
|
5450
5522
|
module.exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
5451
5523
|
let deferred0_0;
|
|
5452
5524
|
let deferred0_1;
|
|
@@ -5459,11 +5531,20 @@ module.exports.__wbg_error_7534b8e9a36f1ab4 = function(arg0, arg1) {
|
|
|
5459
5531
|
}
|
|
5460
5532
|
};
|
|
5461
5533
|
|
|
5534
|
+
module.exports.__wbg_error_d3c8fa5665ed2ac9 = function(arg0, arg1) {
|
|
5535
|
+
console.error(getStringFromWasm0(arg0, arg1));
|
|
5536
|
+
};
|
|
5537
|
+
|
|
5462
5538
|
module.exports.__wbg_from_2a5d3e218e67aa85 = function(arg0) {
|
|
5463
5539
|
const ret = Array.from(arg0);
|
|
5464
5540
|
return ret;
|
|
5465
5541
|
};
|
|
5466
5542
|
|
|
5543
|
+
module.exports.__wbg_getOwnPropertySymbols_97eebed6fe6e08be = function(arg0) {
|
|
5544
|
+
const ret = Object.getOwnPropertySymbols(arg0);
|
|
5545
|
+
return ret;
|
|
5546
|
+
};
|
|
5547
|
+
|
|
5467
5548
|
module.exports.__wbg_getRandomValues_b8f5dbd5f3995a9e = function() { return handleError(function (arg0, arg1) {
|
|
5468
5549
|
arg0.getRandomValues(arg1);
|
|
5469
5550
|
}, arguments) };
|
|
@@ -5569,7 +5650,7 @@ module.exports.__wbg_log_0cc1b7768397bcfe = function(arg0, arg1, arg2, arg3, arg
|
|
|
5569
5650
|
}
|
|
5570
5651
|
};
|
|
5571
5652
|
|
|
5572
|
-
module.exports.
|
|
5653
|
+
module.exports.__wbg_log_5f802740a68181b2 = function(arg0, arg1) {
|
|
5573
5654
|
console.log(getStringFromWasm0(arg0, arg1));
|
|
5574
5655
|
};
|
|
5575
5656
|
|
|
@@ -5706,7 +5787,7 @@ module.exports.__wbg_node_905d3e251edff8a2 = function(arg0) {
|
|
|
5706
5787
|
return ret;
|
|
5707
5788
|
};
|
|
5708
5789
|
|
|
5709
|
-
module.exports.
|
|
5790
|
+
module.exports.__wbg_now_d256cd3265ccdaa6 = function() {
|
|
5710
5791
|
const ret = Date.now();
|
|
5711
5792
|
return ret;
|
|
5712
5793
|
};
|
|
@@ -5819,7 +5900,7 @@ module.exports.__wbg_versionvector_new = function(arg0) {
|
|
|
5819
5900
|
return ret;
|
|
5820
5901
|
};
|
|
5821
5902
|
|
|
5822
|
-
module.exports.
|
|
5903
|
+
module.exports.__wbg_warn_13f0ef2de338c601 = function(arg0, arg1) {
|
|
5823
5904
|
console.warn(getStringFromWasm0(arg0, arg1));
|
|
5824
5905
|
};
|
|
5825
5906
|
|
|
@@ -5861,12 +5942,12 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
|
|
|
5861
5942
|
return ret;
|
|
5862
5943
|
};
|
|
5863
5944
|
|
|
5864
|
-
module.exports.
|
|
5945
|
+
module.exports.__wbindgen_closure_wrapper718 = function(arg0, arg1, arg2) {
|
|
5865
5946
|
const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_62);
|
|
5866
5947
|
return ret;
|
|
5867
5948
|
};
|
|
5868
5949
|
|
|
5869
|
-
module.exports.
|
|
5950
|
+
module.exports.__wbindgen_closure_wrapper720 = function(arg0, arg1, arg2) {
|
|
5870
5951
|
const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_65);
|
|
5871
5952
|
return ret;
|
|
5872
5953
|
};
|
package/nodejs/loro_wasm_bg.wasm
CHANGED
|
Binary file
|
|
@@ -16,14 +16,14 @@ export const __wbg_lorotreenode_free: (a: number, b: number) => void;
|
|
|
16
16
|
export const __wbg_undomanager_free: (a: number, b: number) => void;
|
|
17
17
|
export const __wbg_versionvector_free: (a: number, b: number) => void;
|
|
18
18
|
export const awarenesswasm_apply: (a: number, b: number, c: number) => [number, number, number];
|
|
19
|
-
export const awarenesswasm_encode: (a: number, b: any) => [number, number];
|
|
19
|
+
export const awarenesswasm_encode: (a: number, b: any) => [number, number, number, number];
|
|
20
20
|
export const awarenesswasm_encodeAll: (a: number) => [number, number];
|
|
21
|
-
export const awarenesswasm_getAllStates: (a: number) =>
|
|
22
|
-
export const awarenesswasm_getState: (a: number, b: any) =>
|
|
23
|
-
export const awarenesswasm_getTimestamp: (a: number, b: any) => [number, number];
|
|
21
|
+
export const awarenesswasm_getAllStates: (a: number) => [number, number, number];
|
|
22
|
+
export const awarenesswasm_getState: (a: number, b: any) => [number, number, number];
|
|
23
|
+
export const awarenesswasm_getTimestamp: (a: number, b: any) => [number, number, number, number];
|
|
24
24
|
export const awarenesswasm_isEmpty: (a: number) => number;
|
|
25
25
|
export const awarenesswasm_length: (a: number) => number;
|
|
26
|
-
export const awarenesswasm_new: (a: any, b: number) => number;
|
|
26
|
+
export const awarenesswasm_new: (a: any, b: number) => [number, number, number];
|
|
27
27
|
export const awarenesswasm_peer: (a: number) => any;
|
|
28
28
|
export const awarenesswasm_peers: (a: number) => [number, number];
|
|
29
29
|
export const awarenesswasm_removeOutdated: (a: number) => [number, number];
|
|
@@ -35,7 +35,7 @@ export const cursor_containerId: (a: number) => any;
|
|
|
35
35
|
export const cursor_decode: (a: number, b: number) => [number, number, number];
|
|
36
36
|
export const cursor_encode: (a: number) => [number, number];
|
|
37
37
|
export const cursor_kind: (a: number) => any;
|
|
38
|
-
export const cursor_pos: (a: number) =>
|
|
38
|
+
export const cursor_pos: (a: number) => [number, number, number];
|
|
39
39
|
export const cursor_side: (a: number) => any;
|
|
40
40
|
export const decodeFrontiers: (a: number, b: number) => [number, number, number];
|
|
41
41
|
export const decodeImportBlobMeta: (a: number, b: number, c: number) => [number, number, number];
|
|
@@ -45,7 +45,7 @@ export const ephemeralstorewasm_delete: (a: number, b: number, c: number) => voi
|
|
|
45
45
|
export const ephemeralstorewasm_encode: (a: number, b: number, c: number) => [number, number];
|
|
46
46
|
export const ephemeralstorewasm_encodeAll: (a: number) => [number, number];
|
|
47
47
|
export const ephemeralstorewasm_get: (a: number, b: number, c: number) => any;
|
|
48
|
-
export const ephemeralstorewasm_getAllStates: (a: number) =>
|
|
48
|
+
export const ephemeralstorewasm_getAllStates: (a: number) => [number, number, number];
|
|
49
49
|
export const ephemeralstorewasm_isEmpty: (a: number) => number;
|
|
50
50
|
export const ephemeralstorewasm_keys: (a: number) => [number, number];
|
|
51
51
|
export const ephemeralstorewasm_new: (a: number) => number;
|
|
@@ -55,7 +55,7 @@ export const ephemeralstorewasm_subscribe: (a: number, b: any) => any;
|
|
|
55
55
|
export const ephemeralstorewasm_subscribeLocalUpdates: (a: number, b: any) => any;
|
|
56
56
|
export const lorocounter_decrement: (a: number, b: number) => [number, number];
|
|
57
57
|
export const lorocounter_getAttached: (a: number) => any;
|
|
58
|
-
export const lorocounter_getShallowValue: (a: number) => number;
|
|
58
|
+
export const lorocounter_getShallowValue: (a: number) => [number, number, number];
|
|
59
59
|
export const lorocounter_id: (a: number) => any;
|
|
60
60
|
export const lorocounter_increment: (a: number, b: number) => [number, number];
|
|
61
61
|
export const lorocounter_isAttached: (a: number) => number;
|
|
@@ -63,8 +63,6 @@ export const lorocounter_kind: (a: number) => any;
|
|
|
63
63
|
export const lorocounter_new: () => number;
|
|
64
64
|
export const lorocounter_parent: (a: number) => any;
|
|
65
65
|
export const lorocounter_subscribe: (a: number, b: any) => [number, number, number];
|
|
66
|
-
export const lorocounter_toJSON: (a: number) => number;
|
|
67
|
-
export const lorocounter_value: (a: number) => number;
|
|
68
66
|
export const lorodoc_JSONPath: (a: number, b: number, c: number) => [number, number, number];
|
|
69
67
|
export const lorodoc_applyDiff: (a: number, b: any) => [number, number];
|
|
70
68
|
export const lorodoc_attach: (a: number) => void;
|
|
@@ -88,7 +86,7 @@ export const lorodoc_findIdSpansBetween: (a: number, b: number, c: number, d: nu
|
|
|
88
86
|
export const lorodoc_fork: (a: number) => number;
|
|
89
87
|
export const lorodoc_forkAt: (a: number, b: number, c: number) => [number, number, number];
|
|
90
88
|
export const lorodoc_fromSnapshot: (a: number, b: number) => [number, number, number];
|
|
91
|
-
export const lorodoc_frontiers: (a: number) =>
|
|
89
|
+
export const lorodoc_frontiers: (a: number) => [number, number, number];
|
|
92
90
|
export const lorodoc_frontiersToVV: (a: number, b: number, c: number) => [number, number, number];
|
|
93
91
|
export const lorodoc_getAllChanges: (a: number) => any;
|
|
94
92
|
export const lorodoc_getByPath: (a: number, b: number, c: number) => any;
|
|
@@ -118,7 +116,7 @@ export const lorodoc_isDetachedEditingEnabled: (a: number) => number;
|
|
|
118
116
|
export const lorodoc_isShallow: (a: number) => number;
|
|
119
117
|
export const lorodoc_new: () => number;
|
|
120
118
|
export const lorodoc_opCount: (a: number) => number;
|
|
121
|
-
export const lorodoc_oplogFrontiers: (a: number) =>
|
|
119
|
+
export const lorodoc_oplogFrontiers: (a: number) => [number, number, number];
|
|
122
120
|
export const lorodoc_oplogVersion: (a: number) => number;
|
|
123
121
|
export const lorodoc_peerId: (a: number) => bigint;
|
|
124
122
|
export const lorodoc_peerIdStr: (a: number) => any;
|
|
@@ -132,7 +130,7 @@ export const lorodoc_setNextCommitOrigin: (a: number, b: number, c: number) => v
|
|
|
132
130
|
export const lorodoc_setNextCommitTimestamp: (a: number, b: number) => void;
|
|
133
131
|
export const lorodoc_setPeerId: (a: number, b: any) => [number, number];
|
|
134
132
|
export const lorodoc_setRecordTimestamp: (a: number, b: number) => void;
|
|
135
|
-
export const lorodoc_shallowSinceFrontiers: (a: number) =>
|
|
133
|
+
export const lorodoc_shallowSinceFrontiers: (a: number) => [number, number, number];
|
|
136
134
|
export const lorodoc_shallowSinceVV: (a: number) => number;
|
|
137
135
|
export const lorodoc_subscribe: (a: number, b: any) => any;
|
|
138
136
|
export const lorodoc_subscribeFirstCommitFromPeer: (a: number, b: any) => any;
|
|
@@ -147,7 +145,7 @@ export const lorolist_delete: (a: number, b: number, c: number) => [number, numb
|
|
|
147
145
|
export const lorolist_get: (a: number, b: number) => any;
|
|
148
146
|
export const lorolist_getAttached: (a: number) => any;
|
|
149
147
|
export const lorolist_getCursor: (a: number, b: number, c: any) => number;
|
|
150
|
-
export const lorolist_getIdAt: (a: number, b: number) =>
|
|
148
|
+
export const lorolist_getIdAt: (a: number, b: number) => [number, number, number];
|
|
151
149
|
export const lorolist_getShallowValue: (a: number) => any;
|
|
152
150
|
export const lorolist_id: (a: number) => any;
|
|
153
151
|
export const lorolist_insert: (a: number, b: number, c: any) => [number, number];
|
|
@@ -233,9 +231,11 @@ export const lorotext_new: () => number;
|
|
|
233
231
|
export const lorotext_parent: (a: number) => any;
|
|
234
232
|
export const lorotext_push: (a: number, b: number, c: number) => [number, number];
|
|
235
233
|
export const lorotext_slice: (a: number, b: number, c: number) => [number, number, number, number];
|
|
234
|
+
export const lorotext_sliceDelta: (a: number, b: number, c: number) => [number, number, number];
|
|
235
|
+
export const lorotext_sliceDeltaUtf8: (a: number, b: number, c: number) => [number, number, number];
|
|
236
236
|
export const lorotext_splice: (a: number, b: number, c: number, d: number, e: number) => [number, number, number, number];
|
|
237
237
|
export const lorotext_subscribe: (a: number, b: any) => [number, number, number];
|
|
238
|
-
export const lorotext_toDelta: (a: number) =>
|
|
238
|
+
export const lorotext_toDelta: (a: number) => [number, number, number];
|
|
239
239
|
export const lorotext_toJSON: (a: number) => any;
|
|
240
240
|
export const lorotext_toString: (a: number) => [number, number];
|
|
241
241
|
export const lorotext_unmark: (a: number, b: any, c: number, d: number) => [number, number];
|
|
@@ -267,11 +267,11 @@ export const lorotree_toJSON: (a: number) => any;
|
|
|
267
267
|
export const lorotreenode___getClassname: (a: number) => [number, number];
|
|
268
268
|
export const lorotreenode_children: (a: number) => any;
|
|
269
269
|
export const lorotreenode_createNode: (a: number, b: number) => [number, number, number];
|
|
270
|
-
export const lorotreenode_creationId: (a: number) =>
|
|
270
|
+
export const lorotreenode_creationId: (a: number) => [number, number, number];
|
|
271
271
|
export const lorotreenode_creator: (a: number) => any;
|
|
272
272
|
export const lorotreenode_data: (a: number) => [number, number, number];
|
|
273
273
|
export const lorotreenode_fractionalIndex: (a: number) => [number, number, number];
|
|
274
|
-
export const lorotreenode_getLastMoveId: (a: number) =>
|
|
274
|
+
export const lorotreenode_getLastMoveId: (a: number) => [number, number, number];
|
|
275
275
|
export const lorotreenode_id: (a: number) => any;
|
|
276
276
|
export const lorotreenode_index: (a: number) => [number, number, number];
|
|
277
277
|
export const lorotreenode_isDeleted: (a: number) => [number, number, number];
|
|
@@ -312,6 +312,8 @@ export const versionvector_setLast: (a: number, b: any) => [number, number];
|
|
|
312
312
|
export const versionvector_toJSON: (a: number) => any;
|
|
313
313
|
export const lorodoc_importUpdateBatch: (a: number, b: any) => [number, number, number];
|
|
314
314
|
export const __wbg_loromovablelist_free: (a: number, b: number) => void;
|
|
315
|
+
export const lorocounter_value: (a: number) => [number, number, number];
|
|
316
|
+
export const lorocounter_toJSON: (a: number) => [number, number, number];
|
|
315
317
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
|
316
318
|
export const __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
|
|
317
319
|
export const __wbindgen_exn_store: (a: number) => void;
|
|
@@ -321,6 +323,6 @@ export const __wbindgen_free: (a: number, b: number, c: number) => void;
|
|
|
321
323
|
export const __wbindgen_export_6: WebAssembly.Table;
|
|
322
324
|
export const __externref_table_dealloc: (a: number) => void;
|
|
323
325
|
export const __externref_drop_slice: (a: number, b: number) => void;
|
|
324
|
-
export const
|
|
325
|
-
export const
|
|
326
|
+
export const closure11_externref_shim: (a: number, b: number, c: any) => void;
|
|
327
|
+
export const _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h87f1268ec3b8423e: (a: number, b: number) => void;
|
|
326
328
|
export const __wbindgen_start: () => void;
|
package/package.json
CHANGED