loro-crdt 1.4.5 → 1.5.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 +160 -0
- package/base64/index.d.ts +52 -2
- package/base64/index.js +376 -26
- package/base64/loro_wasm.d.ts +239 -5
- package/base64/loro_wasm_bg-536e230f.js +64 -0
- package/bundler/index.d.ts +52 -2
- package/bundler/index.js +92 -3
- package/bundler/index.js.map +1 -1
- package/bundler/loro_wasm.d.ts +239 -5
- package/bundler/loro_wasm_bg.js +281 -22
- package/bundler/loro_wasm_bg.wasm +0 -0
- package/bundler/loro_wasm_bg.wasm.d.ts +20 -0
- package/nodejs/index.d.ts +52 -2
- package/nodejs/index.js +92 -1
- package/nodejs/index.js.map +1 -1
- package/nodejs/loro_wasm.d.ts +239 -5
- package/nodejs/loro_wasm.js +283 -22
- package/nodejs/loro_wasm_bg.wasm +0 -0
- package/nodejs/loro_wasm_bg.wasm.d.ts +20 -0
- package/package.json +1 -1
- package/web/index.d.ts +52 -2
- package/web/index.js +92 -3
- package/web/index.js.map +1 -1
- package/web/loro_wasm.d.ts +259 -5
- package/web/loro_wasm.js +278 -20
- package/web/loro_wasm_bg.wasm +0 -0
- package/web/loro_wasm_bg.wasm.d.ts +20 -0
- package/base64/loro_wasm_bg-2fc402da.js +0 -64
package/bundler/loro_wasm_bg.js
CHANGED
|
@@ -621,6 +621,52 @@ export class AwarenessWasm {
|
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
|
|
624
|
+
const ChangeModifierFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
625
|
+
? { register: () => {}, unregister: () => {} }
|
|
626
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_changemodifier_free(ptr >>> 0));
|
|
627
|
+
/**
|
|
628
|
+
*/
|
|
629
|
+
export class ChangeModifier {
|
|
630
|
+
|
|
631
|
+
static __wrap(ptr) {
|
|
632
|
+
ptr = ptr >>> 0;
|
|
633
|
+
const obj = Object.create(ChangeModifier.prototype);
|
|
634
|
+
obj.__wbg_ptr = ptr;
|
|
635
|
+
ChangeModifierFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
636
|
+
return obj;
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
__destroy_into_raw() {
|
|
640
|
+
const ptr = this.__wbg_ptr;
|
|
641
|
+
this.__wbg_ptr = 0;
|
|
642
|
+
ChangeModifierFinalization.unregister(this);
|
|
643
|
+
return ptr;
|
|
644
|
+
}
|
|
645
|
+
|
|
646
|
+
free() {
|
|
647
|
+
const ptr = this.__destroy_into_raw();
|
|
648
|
+
wasm.__wbg_changemodifier_free(ptr);
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* @param {string} message
|
|
652
|
+
* @returns {ChangeModifier}
|
|
653
|
+
*/
|
|
654
|
+
setMessage(message) {
|
|
655
|
+
const ptr0 = passStringToWasm0(message, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
656
|
+
const len0 = WASM_VECTOR_LEN;
|
|
657
|
+
const ret = wasm.changemodifier_setMessage(this.__wbg_ptr, ptr0, len0);
|
|
658
|
+
return ChangeModifier.__wrap(ret);
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* @param {number} timestamp
|
|
662
|
+
* @returns {ChangeModifier}
|
|
663
|
+
*/
|
|
664
|
+
setTimestamp(timestamp) {
|
|
665
|
+
const ret = wasm.changemodifier_setTimestamp(this.__wbg_ptr, timestamp);
|
|
666
|
+
return ChangeModifier.__wrap(ret);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
|
|
624
670
|
const CursorFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
625
671
|
? { register: () => {}, unregister: () => {} }
|
|
626
672
|
: new FinalizationRegistry(ptr => wasm.__wbg_cursor_free(ptr >>> 0));
|
|
@@ -753,6 +799,161 @@ export class Cursor {
|
|
|
753
799
|
}
|
|
754
800
|
}
|
|
755
801
|
|
|
802
|
+
const EphemeralStoreWasmFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
803
|
+
? { register: () => {}, unregister: () => {} }
|
|
804
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_ephemeralstorewasm_free(ptr >>> 0));
|
|
805
|
+
/**
|
|
806
|
+
*/
|
|
807
|
+
export class EphemeralStoreWasm {
|
|
808
|
+
|
|
809
|
+
__destroy_into_raw() {
|
|
810
|
+
const ptr = this.__wbg_ptr;
|
|
811
|
+
this.__wbg_ptr = 0;
|
|
812
|
+
EphemeralStoreWasmFinalization.unregister(this);
|
|
813
|
+
return ptr;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
free() {
|
|
817
|
+
const ptr = this.__destroy_into_raw();
|
|
818
|
+
wasm.__wbg_ephemeralstorewasm_free(ptr);
|
|
819
|
+
}
|
|
820
|
+
/**
|
|
821
|
+
* Creates a new `EphemeralStore` instance.
|
|
822
|
+
*
|
|
823
|
+
* The `timeout` parameter specifies the duration in milliseconds.
|
|
824
|
+
* A state of a peer is considered outdated, if the last update of the state of the peer
|
|
825
|
+
* is older than the `timeout`.
|
|
826
|
+
* @param {number} timeout
|
|
827
|
+
*/
|
|
828
|
+
constructor(timeout) {
|
|
829
|
+
const ret = wasm.ephemeralstorewasm_new(timeout);
|
|
830
|
+
this.__wbg_ptr = ret >>> 0;
|
|
831
|
+
return this;
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* @param {string} key
|
|
835
|
+
* @param {any} value
|
|
836
|
+
*/
|
|
837
|
+
set(key, value) {
|
|
838
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
839
|
+
const len0 = WASM_VECTOR_LEN;
|
|
840
|
+
wasm.ephemeralstorewasm_set(this.__wbg_ptr, ptr0, len0, addHeapObject(value));
|
|
841
|
+
}
|
|
842
|
+
/**
|
|
843
|
+
* @param {string} key
|
|
844
|
+
*/
|
|
845
|
+
delete(key) {
|
|
846
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
847
|
+
const len0 = WASM_VECTOR_LEN;
|
|
848
|
+
wasm.ephemeralstorewasm_delete(this.__wbg_ptr, ptr0, len0);
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* @param {string} key
|
|
852
|
+
* @returns {any}
|
|
853
|
+
*/
|
|
854
|
+
get(key) {
|
|
855
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
856
|
+
const len0 = WASM_VECTOR_LEN;
|
|
857
|
+
const ret = wasm.ephemeralstorewasm_get(this.__wbg_ptr, ptr0, len0);
|
|
858
|
+
return takeObject(ret);
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* @returns {any}
|
|
862
|
+
*/
|
|
863
|
+
getAllStates() {
|
|
864
|
+
const ret = wasm.ephemeralstorewasm_getAllStates(this.__wbg_ptr);
|
|
865
|
+
return takeObject(ret);
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* @param {Function} f
|
|
869
|
+
* @returns {any}
|
|
870
|
+
*/
|
|
871
|
+
subscribeLocalUpdates(f) {
|
|
872
|
+
const ret = wasm.ephemeralstorewasm_subscribeLocalUpdates(this.__wbg_ptr, addHeapObject(f));
|
|
873
|
+
return takeObject(ret);
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* @param {Function} f
|
|
877
|
+
* @returns {any}
|
|
878
|
+
*/
|
|
879
|
+
subscribe(f) {
|
|
880
|
+
const ret = wasm.ephemeralstorewasm_subscribe(this.__wbg_ptr, addHeapObject(f));
|
|
881
|
+
return takeObject(ret);
|
|
882
|
+
}
|
|
883
|
+
/**
|
|
884
|
+
* @param {string} key
|
|
885
|
+
* @returns {Uint8Array}
|
|
886
|
+
*/
|
|
887
|
+
encode(key) {
|
|
888
|
+
try {
|
|
889
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
890
|
+
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
|
|
891
|
+
const len0 = WASM_VECTOR_LEN;
|
|
892
|
+
wasm.ephemeralstorewasm_encode(retptr, this.__wbg_ptr, ptr0, len0);
|
|
893
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
894
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
895
|
+
var v2 = getArrayU8FromWasm0(r0, r1).slice();
|
|
896
|
+
wasm.__wbindgen_export_5(r0, r1 * 1, 1);
|
|
897
|
+
return v2;
|
|
898
|
+
} finally {
|
|
899
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
/**
|
|
903
|
+
* @returns {Uint8Array}
|
|
904
|
+
*/
|
|
905
|
+
encodeAll() {
|
|
906
|
+
try {
|
|
907
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
908
|
+
wasm.ephemeralstorewasm_encodeAll(retptr, this.__wbg_ptr);
|
|
909
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
910
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
911
|
+
var v1 = getArrayU8FromWasm0(r0, r1).slice();
|
|
912
|
+
wasm.__wbindgen_export_5(r0, r1 * 1, 1);
|
|
913
|
+
return v1;
|
|
914
|
+
} finally {
|
|
915
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
/**
|
|
919
|
+
* @param {Uint8Array} data
|
|
920
|
+
*/
|
|
921
|
+
apply(data) {
|
|
922
|
+
const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_export_0);
|
|
923
|
+
const len0 = WASM_VECTOR_LEN;
|
|
924
|
+
wasm.ephemeralstorewasm_apply(this.__wbg_ptr, ptr0, len0);
|
|
925
|
+
}
|
|
926
|
+
/**
|
|
927
|
+
*/
|
|
928
|
+
removeOutdated() {
|
|
929
|
+
wasm.ephemeralstorewasm_removeOutdated(this.__wbg_ptr);
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* If the state is empty.
|
|
933
|
+
* @returns {boolean}
|
|
934
|
+
*/
|
|
935
|
+
isEmpty() {
|
|
936
|
+
const ret = wasm.ephemeralstorewasm_isEmpty(this.__wbg_ptr);
|
|
937
|
+
return ret !== 0;
|
|
938
|
+
}
|
|
939
|
+
/**
|
|
940
|
+
* @returns {(string)[]}
|
|
941
|
+
*/
|
|
942
|
+
keys() {
|
|
943
|
+
try {
|
|
944
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
945
|
+
wasm.ephemeralstorewasm_keys(retptr, this.__wbg_ptr);
|
|
946
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
947
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
948
|
+
var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
949
|
+
wasm.__wbindgen_export_5(r0, r1 * 4, 4);
|
|
950
|
+
return v1;
|
|
951
|
+
} finally {
|
|
952
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
|
|
756
957
|
const LoroCounterFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
757
958
|
? { register: () => {}, unregister: () => {} }
|
|
758
959
|
: new FinalizationRegistry(ptr => wasm.__wbg_lorocounter_free(ptr >>> 0));
|
|
@@ -2805,6 +3006,61 @@ export class LoroDoc {
|
|
|
2805
3006
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2806
3007
|
}
|
|
2807
3008
|
}
|
|
3009
|
+
/**
|
|
3010
|
+
* Get the pending operations from the current transaction in JSON format
|
|
3011
|
+
*
|
|
3012
|
+
* This method returns a JSON representation of operations that have been applied
|
|
3013
|
+
* but not yet committed in the current transaction.
|
|
3014
|
+
*
|
|
3015
|
+
* It will use the same data format as `doc.exportJsonUpdates()`
|
|
3016
|
+
*
|
|
3017
|
+
* @example
|
|
3018
|
+
* ```ts
|
|
3019
|
+
* const doc = new LoroDoc();
|
|
3020
|
+
* const text = doc.getText("text");
|
|
3021
|
+
* text.insert(0, "Hello");
|
|
3022
|
+
* // Get pending ops before commit
|
|
3023
|
+
* const pendingOps = doc.getPendingOpsFromCurrentTxnAsJson();
|
|
3024
|
+
* doc.commit();
|
|
3025
|
+
* const emptyOps = doc.getPendingOpsFromCurrentTxnAsJson(); // this is undefined
|
|
3026
|
+
* ```
|
|
3027
|
+
* @returns {JsonSchema | undefined}
|
|
3028
|
+
*/
|
|
3029
|
+
getUncommittedOpsAsJson() {
|
|
3030
|
+
try {
|
|
3031
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3032
|
+
wasm.lorodoc_getUncommittedOpsAsJson(retptr, this.__wbg_ptr);
|
|
3033
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
3034
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
3035
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
3036
|
+
if (r2) {
|
|
3037
|
+
throw takeObject(r1);
|
|
3038
|
+
}
|
|
3039
|
+
return takeObject(r0);
|
|
3040
|
+
} finally {
|
|
3041
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
/**
|
|
3045
|
+
* @param {Function} f
|
|
3046
|
+
* @returns {any}
|
|
3047
|
+
*/
|
|
3048
|
+
subscribeFirstCommitFromPeer(f) {
|
|
3049
|
+
const ret = wasm.lorodoc_subscribeFirstCommitFromPeer(this.__wbg_ptr, addHeapObject(f));
|
|
3050
|
+
return takeObject(ret);
|
|
3051
|
+
}
|
|
3052
|
+
/**
|
|
3053
|
+
* Subscribe to the pre-commit event.
|
|
3054
|
+
*
|
|
3055
|
+
* The callback will be called when the changes are committed but not yet applied to the OpLog.
|
|
3056
|
+
* You can modify the commit message and timestamp in the callback by `ChangeModifier`.
|
|
3057
|
+
* @param {Function} f
|
|
3058
|
+
* @returns {any}
|
|
3059
|
+
*/
|
|
3060
|
+
subscribePreCommit(f) {
|
|
3061
|
+
const ret = wasm.lorodoc_subscribePreCommit(this.__wbg_ptr, addHeapObject(f));
|
|
3062
|
+
return takeObject(ret);
|
|
3063
|
+
}
|
|
2808
3064
|
}
|
|
2809
3065
|
|
|
2810
3066
|
const LoroListFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -4635,8 +4891,6 @@ export class LoroText {
|
|
|
4635
4891
|
*
|
|
4636
4892
|
* You can use it to create a highlight, make a range of text bold, or add a link to a range of text.
|
|
4637
4893
|
*
|
|
4638
|
-
* Note: this is not suitable for unmergeable annotations like comments.
|
|
4639
|
-
*
|
|
4640
4894
|
* @example
|
|
4641
4895
|
* ```ts
|
|
4642
4896
|
* import { LoroDoc } from "loro-crdt";
|
|
@@ -6152,11 +6406,6 @@ export function __wbg_lorocounter_new(arg0) {
|
|
|
6152
6406
|
return addHeapObject(ret);
|
|
6153
6407
|
};
|
|
6154
6408
|
|
|
6155
|
-
export function __wbg_lorotreenode_new(arg0) {
|
|
6156
|
-
const ret = LoroTreeNode.__wrap(arg0);
|
|
6157
|
-
return addHeapObject(ret);
|
|
6158
|
-
};
|
|
6159
|
-
|
|
6160
6409
|
export function __wbg_cursor_new(arg0) {
|
|
6161
6410
|
const ret = Cursor.__wrap(arg0);
|
|
6162
6411
|
return addHeapObject(ret);
|
|
@@ -6167,13 +6416,18 @@ export function __wbg_loromap_new(arg0) {
|
|
|
6167
6416
|
return addHeapObject(ret);
|
|
6168
6417
|
};
|
|
6169
6418
|
|
|
6170
|
-
export function
|
|
6171
|
-
const ret =
|
|
6419
|
+
export function __wbg_lorotreenode_new(arg0) {
|
|
6420
|
+
const ret = LoroTreeNode.__wrap(arg0);
|
|
6172
6421
|
return addHeapObject(ret);
|
|
6173
6422
|
};
|
|
6174
6423
|
|
|
6175
|
-
export function
|
|
6176
|
-
const ret =
|
|
6424
|
+
export function __wbg_lorolist_new(arg0) {
|
|
6425
|
+
const ret = LoroList.__wrap(arg0);
|
|
6426
|
+
return addHeapObject(ret);
|
|
6427
|
+
};
|
|
6428
|
+
|
|
6429
|
+
export function __wbg_lorotext_new(arg0) {
|
|
6430
|
+
const ret = LoroText.__wrap(arg0);
|
|
6177
6431
|
return addHeapObject(ret);
|
|
6178
6432
|
};
|
|
6179
6433
|
|
|
@@ -6182,8 +6436,8 @@ export function __wbg_loromovablelist_new(arg0) {
|
|
|
6182
6436
|
return addHeapObject(ret);
|
|
6183
6437
|
};
|
|
6184
6438
|
|
|
6185
|
-
export function
|
|
6186
|
-
const ret =
|
|
6439
|
+
export function __wbg_lorotree_new(arg0) {
|
|
6440
|
+
const ret = LoroTree.__wrap(arg0);
|
|
6187
6441
|
return addHeapObject(ret);
|
|
6188
6442
|
};
|
|
6189
6443
|
|
|
@@ -6192,6 +6446,11 @@ export function __wbg_versionvector_new(arg0) {
|
|
|
6192
6446
|
return addHeapObject(ret);
|
|
6193
6447
|
};
|
|
6194
6448
|
|
|
6449
|
+
export function __wbg_changemodifier_new(arg0) {
|
|
6450
|
+
const ret = ChangeModifier.__wrap(arg0);
|
|
6451
|
+
return addHeapObject(ret);
|
|
6452
|
+
};
|
|
6453
|
+
|
|
6195
6454
|
export function __wbindgen_is_function(arg0) {
|
|
6196
6455
|
const ret = typeof(getObject(arg0)) === 'function';
|
|
6197
6456
|
return ret;
|
|
@@ -6415,7 +6674,7 @@ export function __wbg_error_f851667af71bcfc6(arg0, arg1) {
|
|
|
6415
6674
|
}
|
|
6416
6675
|
};
|
|
6417
6676
|
|
|
6418
|
-
export const
|
|
6677
|
+
export const __wbg_now_761faa1e2f3f9d93 = typeof Date.now == 'function' ? Date.now : notDefined('Date.now');
|
|
6419
6678
|
|
|
6420
6679
|
export function __wbg_crypto_1d1f22824a6a080c(arg0) {
|
|
6421
6680
|
const ret = getObject(arg0).crypto;
|
|
@@ -6447,14 +6706,14 @@ export function __wbg_msCrypto_eb05e62b530a1508(arg0) {
|
|
|
6447
6706
|
return addHeapObject(ret);
|
|
6448
6707
|
};
|
|
6449
6708
|
|
|
6450
|
-
export function __wbg_getRandomValues_3aa56aa6edec874c() { return handleError(function (arg0, arg1) {
|
|
6451
|
-
getObject(arg0).getRandomValues(getObject(arg1));
|
|
6452
|
-
}, arguments) };
|
|
6453
|
-
|
|
6454
6709
|
export function __wbg_randomFillSync_5c9c955aa56b6049() { return handleError(function (arg0, arg1) {
|
|
6455
6710
|
getObject(arg0).randomFillSync(takeObject(arg1));
|
|
6456
6711
|
}, arguments) };
|
|
6457
6712
|
|
|
6713
|
+
export function __wbg_getRandomValues_3aa56aa6edec874c() { return handleError(function (arg0, arg1) {
|
|
6714
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
6715
|
+
}, arguments) };
|
|
6716
|
+
|
|
6458
6717
|
export function __wbg_self_ce0dbfc45cf2f5be() { return handleError(function () {
|
|
6459
6718
|
const ret = self.self;
|
|
6460
6719
|
return addHeapObject(ret);
|
|
@@ -6739,13 +6998,13 @@ export function __wbindgen_memory() {
|
|
|
6739
6998
|
return addHeapObject(ret);
|
|
6740
6999
|
};
|
|
6741
7000
|
|
|
6742
|
-
export function
|
|
6743
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
7001
|
+
export function __wbindgen_closure_wrapper487(arg0, arg1, arg2) {
|
|
7002
|
+
const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_60);
|
|
6744
7003
|
return addHeapObject(ret);
|
|
6745
7004
|
};
|
|
6746
7005
|
|
|
6747
|
-
export function
|
|
6748
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
7006
|
+
export function __wbindgen_closure_wrapper489(arg0, arg1, arg2) {
|
|
7007
|
+
const ret = makeMutClosure(arg0, arg1, 8, __wbg_adapter_63);
|
|
6749
7008
|
return addHeapObject(ret);
|
|
6750
7009
|
};
|
|
6751
7010
|
|
|
Binary file
|
|
@@ -27,6 +27,20 @@ export function awarenesswasm_removeOutdated(a: number, b: number): void;
|
|
|
27
27
|
export function awarenesswasm_length(a: number): number;
|
|
28
28
|
export function awarenesswasm_isEmpty(a: number): number;
|
|
29
29
|
export function awarenesswasm_peers(a: number, b: number): void;
|
|
30
|
+
export function __wbg_ephemeralstorewasm_free(a: number): void;
|
|
31
|
+
export function ephemeralstorewasm_new(a: number): number;
|
|
32
|
+
export function ephemeralstorewasm_set(a: number, b: number, c: number, d: number): void;
|
|
33
|
+
export function ephemeralstorewasm_delete(a: number, b: number, c: number): void;
|
|
34
|
+
export function ephemeralstorewasm_get(a: number, b: number, c: number): number;
|
|
35
|
+
export function ephemeralstorewasm_getAllStates(a: number): number;
|
|
36
|
+
export function ephemeralstorewasm_subscribeLocalUpdates(a: number, b: number): number;
|
|
37
|
+
export function ephemeralstorewasm_subscribe(a: number, b: number): number;
|
|
38
|
+
export function ephemeralstorewasm_encode(a: number, b: number, c: number, d: number): void;
|
|
39
|
+
export function ephemeralstorewasm_encodeAll(a: number, b: number): void;
|
|
40
|
+
export function ephemeralstorewasm_apply(a: number, b: number, c: number): void;
|
|
41
|
+
export function ephemeralstorewasm_removeOutdated(a: number): void;
|
|
42
|
+
export function ephemeralstorewasm_isEmpty(a: number): number;
|
|
43
|
+
export function ephemeralstorewasm_keys(a: number, b: number): void;
|
|
30
44
|
export function LORO_VERSION(a: number): void;
|
|
31
45
|
export function run(): void;
|
|
32
46
|
export function encodeFrontiers(a: number, b: number, c: number): void;
|
|
@@ -107,6 +121,9 @@ export function lorodoc_getChangedContainersIn(a: number, b: number, c: number,
|
|
|
107
121
|
export function lorodoc_revertTo(a: number, b: number, c: number, d: number): void;
|
|
108
122
|
export function lorodoc_applyDiff(a: number, b: number, c: number): void;
|
|
109
123
|
export function lorodoc_diff(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void;
|
|
124
|
+
export function lorodoc_getUncommittedOpsAsJson(a: number, b: number): void;
|
|
125
|
+
export function lorodoc_subscribeFirstCommitFromPeer(a: number, b: number): number;
|
|
126
|
+
export function lorodoc_subscribePreCommit(a: number, b: number): number;
|
|
110
127
|
export function __wbg_lorotext_free(a: number): void;
|
|
111
128
|
export function lorotext_new(): number;
|
|
112
129
|
export function lorotext_kind(a: number): number;
|
|
@@ -278,6 +295,9 @@ export function versionvector_setLast(a: number, b: number, c: number): void;
|
|
|
278
295
|
export function versionvector_remove(a: number, b: number, c: number): void;
|
|
279
296
|
export function versionvector_length(a: number): number;
|
|
280
297
|
export function decodeImportBlobMeta(a: number, b: number, c: number, d: number): void;
|
|
298
|
+
export function __wbg_changemodifier_free(a: number): void;
|
|
299
|
+
export function changemodifier_setMessage(a: number, b: number, c: number): number;
|
|
300
|
+
export function changemodifier_setTimestamp(a: number, b: number): number;
|
|
281
301
|
export function __wbg_loromovablelist_free(a: number): void;
|
|
282
302
|
export function lorodoc_importUpdateBatch(a: number, b: number, c: number): void;
|
|
283
303
|
export function loromovablelist_parent(a: number): number;
|
package/nodejs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from "./loro_wasm";
|
|
2
2
|
export type * from "./loro_wasm";
|
|
3
|
-
import { AwarenessWasm, PeerID, Container, ContainerID, ContainerType, LoroCounter, LoroDoc, LoroList, LoroMap, LoroText, LoroTree, OpId, Value, AwarenessListener } from "./loro_wasm";
|
|
3
|
+
import { AwarenessWasm, EphemeralStoreWasm, PeerID, Container, ContainerID, ContainerType, LoroCounter, LoroDoc, LoroList, LoroMap, LoroText, LoroTree, OpId, Value, AwarenessListener, EphemeralListener, EphemeralLocalListener } from "./loro_wasm";
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated Please use LoroDoc
|
|
6
6
|
*/
|
|
@@ -46,10 +46,12 @@ export declare function getType<T>(value: T): T extends LoroText ? "Text" : T ex
|
|
|
46
46
|
export declare function newContainerID(id: OpId, type: ContainerType): ContainerID;
|
|
47
47
|
export declare function newRootContainerID(name: string, type: ContainerType): ContainerID;
|
|
48
48
|
/**
|
|
49
|
+
* @deprecated Please use `EphemeralStore` instead.
|
|
50
|
+
*
|
|
49
51
|
* Awareness is a structure that allows to track the ephemeral state of the peers.
|
|
50
52
|
*
|
|
51
53
|
* If we don't receive a state update from a peer within the timeout, we will remove their state.
|
|
52
|
-
* The timeout is in milliseconds. This can be used to handle the
|
|
54
|
+
* The timeout is in milliseconds. This can be used to handle the offline state of a peer.
|
|
53
55
|
*/
|
|
54
56
|
export declare class Awareness<T extends Value = Value> {
|
|
55
57
|
inner: AwarenessWasm<T>;
|
|
@@ -70,3 +72,51 @@ export declare class Awareness<T extends Value = Value> {
|
|
|
70
72
|
destroy(): void;
|
|
71
73
|
private startTimerIfNotEmpty;
|
|
72
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* EphemeralStore is a structure that allows to track the ephemeral state of the peers.
|
|
77
|
+
*
|
|
78
|
+
* It can be used to synchronize cursor positions, selections, and the names of the peers.
|
|
79
|
+
* Each entry uses timestamp-based LWW (Last-Write-Wins) for conflict resolution.
|
|
80
|
+
*
|
|
81
|
+
* If we don't receive a state update from a peer within the timeout, we will remove their state.
|
|
82
|
+
* The timeout is in milliseconds. This can be used to handle the offline state of a peer.
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
*
|
|
86
|
+
* ```ts
|
|
87
|
+
* const store = new EphemeralStore();
|
|
88
|
+
* const store2 = new EphemeralStore();
|
|
89
|
+
* // Subscribe to local updates
|
|
90
|
+
* store.subscribeLocalUpdates((data)=>{
|
|
91
|
+
* store2.apply(data);
|
|
92
|
+
* })
|
|
93
|
+
* // Subscribe to all updates
|
|
94
|
+
* store2.subscribe((event)=>{
|
|
95
|
+
* console.log("event: ", event);
|
|
96
|
+
* })
|
|
97
|
+
* // Set a value
|
|
98
|
+
* store.set("key", "value");
|
|
99
|
+
* // Encode the value
|
|
100
|
+
* const encoded = store.encode("key");
|
|
101
|
+
* // Apply the encoded value
|
|
102
|
+
* store2.apply(encoded);
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
export declare class EphemeralStore<T extends Value = Value> {
|
|
106
|
+
inner: EphemeralStoreWasm<T>;
|
|
107
|
+
private timer;
|
|
108
|
+
private timeout;
|
|
109
|
+
constructor(timeout?: number);
|
|
110
|
+
apply(bytes: Uint8Array): void;
|
|
111
|
+
set(key: string, value: T): void;
|
|
112
|
+
get(key: string): T | undefined;
|
|
113
|
+
getAllStates(): Record<string, T>;
|
|
114
|
+
encode(key: string): Uint8Array;
|
|
115
|
+
encodeAll(): Uint8Array;
|
|
116
|
+
keys(): string[];
|
|
117
|
+
destroy(): void;
|
|
118
|
+
subscribe(listener: EphemeralListener): () => void;
|
|
119
|
+
subscribeLocalUpdates(listener: EphemeralLocalListener): () => void;
|
|
120
|
+
private startTimerIfNotEmpty;
|
|
121
|
+
}
|
|
122
|
+
export declare function idStrToId(idStr: `${number}@${PeerID}`): OpId;
|
package/nodejs/index.js
CHANGED
|
@@ -75,10 +75,12 @@ function newRootContainerID(name, type) {
|
|
|
75
75
|
return `cid:root-${name}:${type}`;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
|
+
* @deprecated Please use `EphemeralStore` instead.
|
|
79
|
+
*
|
|
78
80
|
* Awareness is a structure that allows to track the ephemeral state of the peers.
|
|
79
81
|
*
|
|
80
82
|
* If we don't receive a state update from a peer within the timeout, we will remove their state.
|
|
81
|
-
* The timeout is in milliseconds. This can be used to handle the
|
|
83
|
+
* The timeout is in milliseconds. This can be used to handle the offline state of a peer.
|
|
82
84
|
*/
|
|
83
85
|
class Awareness {
|
|
84
86
|
constructor(peer, timeout = 30000) {
|
|
@@ -152,6 +154,86 @@ class Awareness {
|
|
|
152
154
|
}, this.timeout / 2);
|
|
153
155
|
}
|
|
154
156
|
}
|
|
157
|
+
/**
|
|
158
|
+
* EphemeralStore is a structure that allows to track the ephemeral state of the peers.
|
|
159
|
+
*
|
|
160
|
+
* It can be used to synchronize cursor positions, selections, and the names of the peers.
|
|
161
|
+
* Each entry uses timestamp-based LWW (Last-Write-Wins) for conflict resolution.
|
|
162
|
+
*
|
|
163
|
+
* If we don't receive a state update from a peer within the timeout, we will remove their state.
|
|
164
|
+
* The timeout is in milliseconds. This can be used to handle the offline state of a peer.
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
*
|
|
168
|
+
* ```ts
|
|
169
|
+
* const store = new EphemeralStore();
|
|
170
|
+
* const store2 = new EphemeralStore();
|
|
171
|
+
* // Subscribe to local updates
|
|
172
|
+
* store.subscribeLocalUpdates((data)=>{
|
|
173
|
+
* store2.apply(data);
|
|
174
|
+
* })
|
|
175
|
+
* // Subscribe to all updates
|
|
176
|
+
* store2.subscribe((event)=>{
|
|
177
|
+
* console.log("event: ", event);
|
|
178
|
+
* })
|
|
179
|
+
* // Set a value
|
|
180
|
+
* store.set("key", "value");
|
|
181
|
+
* // Encode the value
|
|
182
|
+
* const encoded = store.encode("key");
|
|
183
|
+
* // Apply the encoded value
|
|
184
|
+
* store2.apply(encoded);
|
|
185
|
+
* ```
|
|
186
|
+
*/
|
|
187
|
+
class EphemeralStore {
|
|
188
|
+
constructor(timeout = 30000) {
|
|
189
|
+
this.inner = new loroWasm.EphemeralStoreWasm(timeout);
|
|
190
|
+
this.timeout = timeout;
|
|
191
|
+
}
|
|
192
|
+
apply(bytes) {
|
|
193
|
+
this.inner.apply(bytes);
|
|
194
|
+
this.startTimerIfNotEmpty();
|
|
195
|
+
}
|
|
196
|
+
set(key, value) {
|
|
197
|
+
this.inner.set(key, value);
|
|
198
|
+
this.startTimerIfNotEmpty();
|
|
199
|
+
}
|
|
200
|
+
get(key) {
|
|
201
|
+
return this.inner.get(key);
|
|
202
|
+
}
|
|
203
|
+
getAllStates() {
|
|
204
|
+
return this.inner.getAllStates();
|
|
205
|
+
}
|
|
206
|
+
encode(key) {
|
|
207
|
+
return this.inner.encode(key);
|
|
208
|
+
}
|
|
209
|
+
encodeAll() {
|
|
210
|
+
return this.inner.encodeAll();
|
|
211
|
+
}
|
|
212
|
+
keys() {
|
|
213
|
+
return this.inner.keys();
|
|
214
|
+
}
|
|
215
|
+
destroy() {
|
|
216
|
+
clearInterval(this.timer);
|
|
217
|
+
}
|
|
218
|
+
subscribe(listener) {
|
|
219
|
+
return this.inner.subscribe(listener);
|
|
220
|
+
}
|
|
221
|
+
subscribeLocalUpdates(listener) {
|
|
222
|
+
return this.inner.subscribeLocalUpdates(listener);
|
|
223
|
+
}
|
|
224
|
+
startTimerIfNotEmpty() {
|
|
225
|
+
if (this.inner.isEmpty() || this.timer != null) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
this.timer = setInterval(() => {
|
|
229
|
+
this.inner.removeOutdated();
|
|
230
|
+
if (this.inner.isEmpty()) {
|
|
231
|
+
clearInterval(this.timer);
|
|
232
|
+
this.timer = undefined;
|
|
233
|
+
}
|
|
234
|
+
}, this.timeout / 2);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
155
237
|
loroWasm.LoroDoc.prototype.toJsonWithReplacer = function (replacer) {
|
|
156
238
|
const processed = new Set();
|
|
157
239
|
const doc = this;
|
|
@@ -207,10 +289,19 @@ loroWasm.LoroDoc.prototype.toJsonWithReplacer = function (replacer) {
|
|
|
207
289
|
const layer = doc.getShallowValue();
|
|
208
290
|
return run(layer);
|
|
209
291
|
};
|
|
292
|
+
function idStrToId(idStr) {
|
|
293
|
+
const [counter, peer] = idStr.split("@");
|
|
294
|
+
return {
|
|
295
|
+
counter: parseInt(counter),
|
|
296
|
+
peer: peer,
|
|
297
|
+
};
|
|
298
|
+
}
|
|
210
299
|
|
|
211
300
|
exports.Awareness = Awareness;
|
|
301
|
+
exports.EphemeralStore = EphemeralStore;
|
|
212
302
|
exports.Loro = Loro;
|
|
213
303
|
exports.getType = getType;
|
|
304
|
+
exports.idStrToId = idStrToId;
|
|
214
305
|
exports.isContainer = isContainer;
|
|
215
306
|
exports.isContainerId = isContainerId;
|
|
216
307
|
exports.newContainerID = newContainerID;
|
package/nodejs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../index.ts"],"sourcesContent":[null],"names":["LoroDoc","AwarenessWasm"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../index.ts"],"sourcesContent":[null],"names":["LoroDoc","AwarenessWasm","EphemeralStoreWasm"],"mappings":";;;;AAsBA;;AAEG;AACG,MAAO,IAAK,SAAQA,gBAAO,CAAA;AAAI,CAAA;AAErC,MAAM,eAAe,GAAG;IACpB,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,aAAa;IACb,SAAS;CACZ,CAAC;AAEI,SAAU,aAAa,CAAC,CAAS,EAAA;AACnC,IAAA,OAAO,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;AAChC,CAAC;AAED;;;;;;;;;;;;;;;;AAgBG;AACG,SAAU,WAAW,CAAC,KAAU,EAAA;IAClC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,IAAI,IAAI,EAAE;AAC5C,QAAA,OAAO,KAAK,CAAC;KAChB;IAED,MAAM,CAAC,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AACvC,IAAA,IAAI,CAAC,IAAI,IAAI,IAAI,OAAO,CAAC,KAAK,QAAQ,IAAI,OAAO,CAAC,CAAC,MAAM,CAAC,KAAK,UAAU,EAAE;AACvE,QAAA,OAAO,KAAK,CAAC;KAChB;IAED,OAAO,eAAe,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC;AAGD;;;;;;;;;;;;;;;;AAgBG;AACG,SAAU,OAAO,CACnB,KAAQ,EAAA;AAOR,IAAA,IAAI,WAAW,CAAC,KAAK,CAAC,EAAE;AACpB,QAAA,OAAO,KAAK,CAAC,IAAI,EAAoB,CAAC;KACzC;AAED,IAAA,OAAO,MAAa,CAAC;AACzB,CAAC;AAGe,SAAA,cAAc,CAAC,EAAQ,EAAE,IAAm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