loro-crdt 1.1.0 → 1.1.2
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 +14 -0
- package/README.md +13 -13
- package/base64/index.d.ts +72 -0
- package/base64/index.js +6406 -0
- package/base64/loro_wasm.d.ts +3253 -0
- package/base64/loro_wasm_bg-4a32f96e.js +64 -0
- package/bundler/loro_wasm.d.ts +55 -2
- package/bundler/loro_wasm_bg.js +130 -17
- package/bundler/loro_wasm_bg.wasm +0 -0
- package/bundler/loro_wasm_bg.wasm.d.ts +11 -0
- package/nodejs/loro_wasm.d.ts +55 -2
- package/nodejs/loro_wasm.js +130 -17
- package/nodejs/loro_wasm_bg.wasm +0 -0
- package/nodejs/loro_wasm_bg.wasm.d.ts +11 -0
- package/package.json +9 -7
- package/web/loro_wasm.d.ts +66 -2
- package/web/loro_wasm.js +129 -16
- package/web/loro_wasm_bg.wasm +0 -0
- package/web/loro_wasm_bg.wasm.d.ts +11 -0
- package/bundler/vite.config.d.ts +0 -2
- package/nodejs/vite.config.d.ts +0 -2
- package/web/vite.config.d.ts +0 -2
package/bundler/loro_wasm.d.ts
CHANGED
|
@@ -1676,9 +1676,9 @@ export class LoroDoc {
|
|
|
1676
1676
|
/**
|
|
1677
1677
|
* Get the path from the root to the container
|
|
1678
1678
|
* @param {ContainerID} id
|
|
1679
|
-
* @returns {
|
|
1679
|
+
* @returns {(string|number)[] | undefined}
|
|
1680
1680
|
*/
|
|
1681
|
-
getPathToContainer(id: ContainerID):
|
|
1681
|
+
getPathToContainer(id: ContainerID): (string|number)[] | undefined;
|
|
1682
1682
|
/**
|
|
1683
1683
|
* Evaluate JSONPath against a LoroDoc
|
|
1684
1684
|
* @param {string} jsonpath
|
|
@@ -1929,6 +1929,16 @@ export class LoroDoc {
|
|
|
1929
1929
|
*/
|
|
1930
1930
|
debugHistory(): void;
|
|
1931
1931
|
/**
|
|
1932
|
+
* Get the number of changes in the oplog.
|
|
1933
|
+
* @returns {number}
|
|
1934
|
+
*/
|
|
1935
|
+
changeCount(): number;
|
|
1936
|
+
/**
|
|
1937
|
+
* Get the number of ops in the oplog.
|
|
1938
|
+
* @returns {number}
|
|
1939
|
+
*/
|
|
1940
|
+
opCount(): number;
|
|
1941
|
+
/**
|
|
1932
1942
|
* Get all of changes in the oplog.
|
|
1933
1943
|
*
|
|
1934
1944
|
* Note: this method is expensive when the oplog is large. O(n)
|
|
@@ -2165,6 +2175,11 @@ export class LoroList {
|
|
|
2165
2175
|
*/
|
|
2166
2176
|
getIdAt(pos: number): { peer: PeerID, counter: number } | undefined;
|
|
2167
2177
|
/**
|
|
2178
|
+
* Check if the container is deleted
|
|
2179
|
+
* @returns {boolean}
|
|
2180
|
+
*/
|
|
2181
|
+
isDeleted(): boolean;
|
|
2182
|
+
/**
|
|
2168
2183
|
* Get the id of this container.
|
|
2169
2184
|
*/
|
|
2170
2185
|
readonly id: ContainerID;
|
|
@@ -2321,6 +2336,11 @@ export class LoroMap {
|
|
|
2321
2336
|
*/
|
|
2322
2337
|
getLastEditor(key: string): PeerID | undefined;
|
|
2323
2338
|
/**
|
|
2339
|
+
* Check if the container is deleted
|
|
2340
|
+
* @returns {boolean}
|
|
2341
|
+
*/
|
|
2342
|
+
isDeleted(): boolean;
|
|
2343
|
+
/**
|
|
2324
2344
|
* The container id of this handler.
|
|
2325
2345
|
*/
|
|
2326
2346
|
readonly id: ContainerID;
|
|
@@ -2459,6 +2479,11 @@ export class LoroMovableList {
|
|
|
2459
2479
|
*/
|
|
2460
2480
|
getLastEditorAt(pos: number): PeerID | undefined;
|
|
2461
2481
|
/**
|
|
2482
|
+
* Check if the container is deleted
|
|
2483
|
+
* @returns {boolean}
|
|
2484
|
+
*/
|
|
2485
|
+
isDeleted(): boolean;
|
|
2486
|
+
/**
|
|
2462
2487
|
* Get the id of this container.
|
|
2463
2488
|
*/
|
|
2464
2489
|
readonly id: ContainerID;
|
|
@@ -2769,6 +2794,11 @@ export class LoroText {
|
|
|
2769
2794
|
*/
|
|
2770
2795
|
getEditorOf(pos: number): PeerID | undefined;
|
|
2771
2796
|
/**
|
|
2797
|
+
* Check if the container is deleted
|
|
2798
|
+
* @returns {boolean}
|
|
2799
|
+
*/
|
|
2800
|
+
isDeleted(): boolean;
|
|
2801
|
+
/**
|
|
2772
2802
|
* Get the container id of the text.
|
|
2773
2803
|
*/
|
|
2774
2804
|
readonly id: ContainerID;
|
|
@@ -2933,6 +2963,11 @@ export class LoroTree {
|
|
|
2933
2963
|
*/
|
|
2934
2964
|
isFractionalIndexEnabled(): boolean;
|
|
2935
2965
|
/**
|
|
2966
|
+
* Check if the container is deleted
|
|
2967
|
+
* @returns {boolean}
|
|
2968
|
+
*/
|
|
2969
|
+
isDeleted(): boolean;
|
|
2970
|
+
/**
|
|
2936
2971
|
* Get the id of the container.
|
|
2937
2972
|
*/
|
|
2938
2973
|
readonly id: ContainerID;
|
|
@@ -3197,4 +3232,22 @@ export class VersionVector {
|
|
|
3197
3232
|
* @returns {number | undefined}
|
|
3198
3233
|
*/
|
|
3199
3234
|
compare(other: VersionVector): number | undefined;
|
|
3235
|
+
/**
|
|
3236
|
+
* set the exclusive ending point. target id will NOT be included by self
|
|
3237
|
+
* @param {{ peer: PeerID, counter: number }} id
|
|
3238
|
+
*/
|
|
3239
|
+
setEnd(id: { peer: PeerID, counter: number }): void;
|
|
3240
|
+
/**
|
|
3241
|
+
* set the inclusive ending point. target id will be included
|
|
3242
|
+
* @param {{ peer: PeerID, counter: number }} id
|
|
3243
|
+
*/
|
|
3244
|
+
setLast(id: { peer: PeerID, counter: number }): void;
|
|
3245
|
+
/**
|
|
3246
|
+
* @param {PeerID} peer
|
|
3247
|
+
*/
|
|
3248
|
+
remove(peer: PeerID): void;
|
|
3249
|
+
/**
|
|
3250
|
+
* @returns {number}
|
|
3251
|
+
*/
|
|
3252
|
+
length(): number;
|
|
3200
3253
|
}
|
package/bundler/loro_wasm_bg.js
CHANGED
|
@@ -1584,7 +1584,7 @@ export class LoroDoc {
|
|
|
1584
1584
|
/**
|
|
1585
1585
|
* Get the path from the root to the container
|
|
1586
1586
|
* @param {ContainerID} id
|
|
1587
|
-
* @returns {
|
|
1587
|
+
* @returns {(string|number)[] | undefined}
|
|
1588
1588
|
*/
|
|
1589
1589
|
getPathToContainer(id) {
|
|
1590
1590
|
try {
|
|
@@ -2139,6 +2139,22 @@ export class LoroDoc {
|
|
|
2139
2139
|
wasm.lorodoc_debugHistory(this.__wbg_ptr);
|
|
2140
2140
|
}
|
|
2141
2141
|
/**
|
|
2142
|
+
* Get the number of changes in the oplog.
|
|
2143
|
+
* @returns {number}
|
|
2144
|
+
*/
|
|
2145
|
+
changeCount() {
|
|
2146
|
+
const ret = wasm.lorodoc_changeCount(this.__wbg_ptr);
|
|
2147
|
+
return ret >>> 0;
|
|
2148
|
+
}
|
|
2149
|
+
/**
|
|
2150
|
+
* Get the number of ops in the oplog.
|
|
2151
|
+
* @returns {number}
|
|
2152
|
+
*/
|
|
2153
|
+
opCount() {
|
|
2154
|
+
const ret = wasm.lorodoc_opCount(this.__wbg_ptr);
|
|
2155
|
+
return ret >>> 0;
|
|
2156
|
+
}
|
|
2157
|
+
/**
|
|
2142
2158
|
* Get all of changes in the oplog.
|
|
2143
2159
|
*
|
|
2144
2160
|
* Note: this method is expensive when the oplog is large. O(n)
|
|
@@ -2800,6 +2816,14 @@ export class LoroList {
|
|
|
2800
2816
|
const ret = wasm.lorolist_getIdAt(this.__wbg_ptr, pos);
|
|
2801
2817
|
return takeObject(ret);
|
|
2802
2818
|
}
|
|
2819
|
+
/**
|
|
2820
|
+
* Check if the container is deleted
|
|
2821
|
+
* @returns {boolean}
|
|
2822
|
+
*/
|
|
2823
|
+
isDeleted() {
|
|
2824
|
+
const ret = wasm.lorolist_isDeleted(this.__wbg_ptr);
|
|
2825
|
+
return ret !== 0;
|
|
2826
|
+
}
|
|
2803
2827
|
}
|
|
2804
2828
|
|
|
2805
2829
|
const LoroMapFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -3242,6 +3266,14 @@ export class LoroMap {
|
|
|
3242
3266
|
const ret = wasm.loromap_getLastEditor(this.__wbg_ptr, ptr0, len0);
|
|
3243
3267
|
return takeObject(ret);
|
|
3244
3268
|
}
|
|
3269
|
+
/**
|
|
3270
|
+
* Check if the container is deleted
|
|
3271
|
+
* @returns {boolean}
|
|
3272
|
+
*/
|
|
3273
|
+
isDeleted() {
|
|
3274
|
+
const ret = wasm.loromap_isDeleted(this.__wbg_ptr);
|
|
3275
|
+
return ret !== 0;
|
|
3276
|
+
}
|
|
3245
3277
|
}
|
|
3246
3278
|
|
|
3247
3279
|
const LoroMovableListFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -3741,6 +3773,14 @@ export class LoroMovableList {
|
|
|
3741
3773
|
const ret = wasm.loromovablelist_getLastEditorAt(this.__wbg_ptr, pos);
|
|
3742
3774
|
return takeObject(ret);
|
|
3743
3775
|
}
|
|
3776
|
+
/**
|
|
3777
|
+
* Check if the container is deleted
|
|
3778
|
+
* @returns {boolean}
|
|
3779
|
+
*/
|
|
3780
|
+
isDeleted() {
|
|
3781
|
+
const ret = wasm.loromovablelist_isDeleted(this.__wbg_ptr);
|
|
3782
|
+
return ret !== 0;
|
|
3783
|
+
}
|
|
3744
3784
|
}
|
|
3745
3785
|
|
|
3746
3786
|
const LoroTextFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -4382,6 +4422,14 @@ export class LoroText {
|
|
|
4382
4422
|
const ret = wasm.lorotext_getEditorOf(this.__wbg_ptr, pos);
|
|
4383
4423
|
return takeObject(ret);
|
|
4384
4424
|
}
|
|
4425
|
+
/**
|
|
4426
|
+
* Check if the container is deleted
|
|
4427
|
+
* @returns {boolean}
|
|
4428
|
+
*/
|
|
4429
|
+
isDeleted() {
|
|
4430
|
+
const ret = wasm.lorotext_isDeleted(this.__wbg_ptr);
|
|
4431
|
+
return ret !== 0;
|
|
4432
|
+
}
|
|
4385
4433
|
}
|
|
4386
4434
|
|
|
4387
4435
|
const LoroTreeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -4818,6 +4866,14 @@ export class LoroTree {
|
|
|
4818
4866
|
const ret = wasm.lorotree_isFractionalIndexEnabled(this.__wbg_ptr);
|
|
4819
4867
|
return ret !== 0;
|
|
4820
4868
|
}
|
|
4869
|
+
/**
|
|
4870
|
+
* Check if the container is deleted
|
|
4871
|
+
* @returns {boolean}
|
|
4872
|
+
*/
|
|
4873
|
+
isDeleted() {
|
|
4874
|
+
const ret = wasm.lorotree_isDeleted(this.__wbg_ptr);
|
|
4875
|
+
return ret !== 0;
|
|
4876
|
+
}
|
|
4821
4877
|
}
|
|
4822
4878
|
|
|
4823
4879
|
const LoroTreeNodeFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -5506,14 +5562,71 @@ export class VersionVector {
|
|
|
5506
5562
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5507
5563
|
}
|
|
5508
5564
|
}
|
|
5565
|
+
/**
|
|
5566
|
+
* set the exclusive ending point. target id will NOT be included by self
|
|
5567
|
+
* @param {{ peer: PeerID, counter: number }} id
|
|
5568
|
+
*/
|
|
5569
|
+
setEnd(id) {
|
|
5570
|
+
try {
|
|
5571
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
5572
|
+
wasm.versionvector_setEnd(retptr, this.__wbg_ptr, addHeapObject(id));
|
|
5573
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
5574
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
5575
|
+
if (r1) {
|
|
5576
|
+
throw takeObject(r0);
|
|
5577
|
+
}
|
|
5578
|
+
} finally {
|
|
5579
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5580
|
+
}
|
|
5581
|
+
}
|
|
5582
|
+
/**
|
|
5583
|
+
* set the inclusive ending point. target id will be included
|
|
5584
|
+
* @param {{ peer: PeerID, counter: number }} id
|
|
5585
|
+
*/
|
|
5586
|
+
setLast(id) {
|
|
5587
|
+
try {
|
|
5588
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
5589
|
+
wasm.versionvector_setLast(retptr, this.__wbg_ptr, addHeapObject(id));
|
|
5590
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
5591
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
5592
|
+
if (r1) {
|
|
5593
|
+
throw takeObject(r0);
|
|
5594
|
+
}
|
|
5595
|
+
} finally {
|
|
5596
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5597
|
+
}
|
|
5598
|
+
}
|
|
5599
|
+
/**
|
|
5600
|
+
* @param {PeerID} peer
|
|
5601
|
+
*/
|
|
5602
|
+
remove(peer) {
|
|
5603
|
+
try {
|
|
5604
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
5605
|
+
wasm.versionvector_remove(retptr, this.__wbg_ptr, addHeapObject(peer));
|
|
5606
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
5607
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
5608
|
+
if (r1) {
|
|
5609
|
+
throw takeObject(r0);
|
|
5610
|
+
}
|
|
5611
|
+
} finally {
|
|
5612
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5613
|
+
}
|
|
5614
|
+
}
|
|
5615
|
+
/**
|
|
5616
|
+
* @returns {number}
|
|
5617
|
+
*/
|
|
5618
|
+
length() {
|
|
5619
|
+
const ret = wasm.versionvector_length(this.__wbg_ptr);
|
|
5620
|
+
return ret >>> 0;
|
|
5621
|
+
}
|
|
5509
5622
|
}
|
|
5510
5623
|
|
|
5511
5624
|
export function __wbindgen_object_drop_ref(arg0) {
|
|
5512
5625
|
takeObject(arg0);
|
|
5513
5626
|
};
|
|
5514
5627
|
|
|
5515
|
-
export function
|
|
5516
|
-
const ret =
|
|
5628
|
+
export function __wbg_lorotreenode_new(arg0) {
|
|
5629
|
+
const ret = LoroTreeNode.__wrap(arg0);
|
|
5517
5630
|
return addHeapObject(ret);
|
|
5518
5631
|
};
|
|
5519
5632
|
|
|
@@ -5522,13 +5635,13 @@ export function __wbg_lorotree_new(arg0) {
|
|
|
5522
5635
|
return addHeapObject(ret);
|
|
5523
5636
|
};
|
|
5524
5637
|
|
|
5525
|
-
export function
|
|
5526
|
-
const ret =
|
|
5638
|
+
export function __wbg_lorotext_new(arg0) {
|
|
5639
|
+
const ret = LoroText.__wrap(arg0);
|
|
5527
5640
|
return addHeapObject(ret);
|
|
5528
5641
|
};
|
|
5529
5642
|
|
|
5530
|
-
export function
|
|
5531
|
-
const ret =
|
|
5643
|
+
export function __wbg_loromap_new(arg0) {
|
|
5644
|
+
const ret = LoroMap.__wrap(arg0);
|
|
5532
5645
|
return addHeapObject(ret);
|
|
5533
5646
|
};
|
|
5534
5647
|
|
|
@@ -5537,6 +5650,11 @@ export function __wbg_lorocounter_new(arg0) {
|
|
|
5537
5650
|
return addHeapObject(ret);
|
|
5538
5651
|
};
|
|
5539
5652
|
|
|
5653
|
+
export function __wbg_lorolist_new(arg0) {
|
|
5654
|
+
const ret = LoroList.__wrap(arg0);
|
|
5655
|
+
return addHeapObject(ret);
|
|
5656
|
+
};
|
|
5657
|
+
|
|
5540
5658
|
export function __wbg_loromovablelist_new(arg0) {
|
|
5541
5659
|
const ret = LoroMovableList.__wrap(arg0);
|
|
5542
5660
|
return addHeapObject(ret);
|
|
@@ -5547,11 +5665,6 @@ export function __wbg_cursor_new(arg0) {
|
|
|
5547
5665
|
return addHeapObject(ret);
|
|
5548
5666
|
};
|
|
5549
5667
|
|
|
5550
|
-
export function __wbg_lorotext_new(arg0) {
|
|
5551
|
-
const ret = LoroText.__wrap(arg0);
|
|
5552
|
-
return addHeapObject(ret);
|
|
5553
|
-
};
|
|
5554
|
-
|
|
5555
5668
|
export function __wbg_versionvector_new(arg0) {
|
|
5556
5669
|
const ret = VersionVector.__wrap(arg0);
|
|
5557
5670
|
return addHeapObject(ret);
|
|
@@ -5775,7 +5888,7 @@ export function __wbg_error_f851667af71bcfc6(arg0, arg1) {
|
|
|
5775
5888
|
}
|
|
5776
5889
|
};
|
|
5777
5890
|
|
|
5778
|
-
export const
|
|
5891
|
+
export const __wbg_now_11683c634f92ae89 = typeof Date.now == 'function' ? Date.now : notDefined('Date.now');
|
|
5779
5892
|
|
|
5780
5893
|
export function __wbg_crypto_1d1f22824a6a080c(arg0) {
|
|
5781
5894
|
const ret = getObject(arg0).crypto;
|
|
@@ -6094,13 +6207,13 @@ export function __wbindgen_memory() {
|
|
|
6094
6207
|
return addHeapObject(ret);
|
|
6095
6208
|
};
|
|
6096
6209
|
|
|
6097
|
-
export function
|
|
6098
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
6210
|
+
export function __wbindgen_closure_wrapper487(arg0, arg1, arg2) {
|
|
6211
|
+
const ret = makeMutClosure(arg0, arg1, 11, __wbg_adapter_58);
|
|
6099
6212
|
return addHeapObject(ret);
|
|
6100
6213
|
};
|
|
6101
6214
|
|
|
6102
|
-
export function
|
|
6103
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
6215
|
+
export function __wbindgen_closure_wrapper490(arg0, arg1, arg2) {
|
|
6216
|
+
const ret = makeMutClosure(arg0, arg1, 9, __wbg_adapter_61);
|
|
6104
6217
|
return addHeapObject(ret);
|
|
6105
6218
|
};
|
|
6106
6219
|
|
|
Binary file
|
|
@@ -81,6 +81,8 @@ export function lorodoc_toJSON(a: number, b: number): void;
|
|
|
81
81
|
export function lorodoc_subscribe(a: number, b: number): number;
|
|
82
82
|
export function lorodoc_subscribeLocalUpdates(a: number, b: number): number;
|
|
83
83
|
export function lorodoc_debugHistory(a: number): void;
|
|
84
|
+
export function lorodoc_changeCount(a: number): number;
|
|
85
|
+
export function lorodoc_opCount(a: number): number;
|
|
84
86
|
export function lorodoc_getAllChanges(a: number): number;
|
|
85
87
|
export function lorodoc_getChangeAt(a: number, b: number, c: number): void;
|
|
86
88
|
export function lorodoc_getChangeAtLamport(a: number, b: number, c: number, d: number, e: number): void;
|
|
@@ -116,6 +118,7 @@ export function lorotext_getAttached(a: number): number;
|
|
|
116
118
|
export function lorotext_getCursor(a: number, b: number, c: number): number;
|
|
117
119
|
export function lorotext_push(a: number, b: number, c: number, d: number): void;
|
|
118
120
|
export function lorotext_getEditorOf(a: number, b: number): number;
|
|
121
|
+
export function lorotext_isDeleted(a: number): number;
|
|
119
122
|
export function __wbg_loromap_free(a: number): void;
|
|
120
123
|
export function loromap_new(): number;
|
|
121
124
|
export function loromap_kind(a: number): number;
|
|
@@ -135,6 +138,7 @@ export function loromap_parent(a: number): number;
|
|
|
135
138
|
export function loromap_getAttached(a: number): number;
|
|
136
139
|
export function loromap_clear(a: number, b: number): void;
|
|
137
140
|
export function loromap_getLastEditor(a: number, b: number, c: number): number;
|
|
141
|
+
export function loromap_isDeleted(a: number): number;
|
|
138
142
|
export function __wbg_lorolist_free(a: number): void;
|
|
139
143
|
export function lorolist_new(): number;
|
|
140
144
|
export function lorolist_kind(a: number): number;
|
|
@@ -156,6 +160,7 @@ export function lorolist_push(a: number, b: number, c: number): void;
|
|
|
156
160
|
export function lorolist_pop(a: number, b: number): void;
|
|
157
161
|
export function lorolist_clear(a: number, b: number): void;
|
|
158
162
|
export function lorolist_getIdAt(a: number, b: number): number;
|
|
163
|
+
export function lorolist_isDeleted(a: number): number;
|
|
159
164
|
export function loromovablelist_new(): number;
|
|
160
165
|
export function loromovablelist_kind(a: number): number;
|
|
161
166
|
export function loromovablelist_insert(a: number, b: number, c: number, d: number): void;
|
|
@@ -179,6 +184,7 @@ export function loromovablelist_clear(a: number, b: number): void;
|
|
|
179
184
|
export function loromovablelist_getCreatorAt(a: number, b: number): number;
|
|
180
185
|
export function loromovablelist_getLastMoverAt(a: number, b: number): number;
|
|
181
186
|
export function loromovablelist_getLastEditorAt(a: number, b: number): number;
|
|
187
|
+
export function loromovablelist_isDeleted(a: number): number;
|
|
182
188
|
export function __wbg_lorotree_free(a: number): void;
|
|
183
189
|
export function lorotreenode___getClassname(a: number, b: number): void;
|
|
184
190
|
export function __wbg_lorotreenode_free(a: number): void;
|
|
@@ -218,6 +224,7 @@ export function lorotree_getAttached(a: number): number;
|
|
|
218
224
|
export function lorotree_enableFractionalIndex(a: number, b: number): void;
|
|
219
225
|
export function lorotree_disableFractionalIndex(a: number): void;
|
|
220
226
|
export function lorotree_isFractionalIndexEnabled(a: number): number;
|
|
227
|
+
export function lorotree_isDeleted(a: number): number;
|
|
221
228
|
export function __wbg_cursor_free(a: number): void;
|
|
222
229
|
export function cursor_containerId(a: number): number;
|
|
223
230
|
export function cursor_pos(a: number): number;
|
|
@@ -246,6 +253,10 @@ export function versionvector_encode(a: number, b: number): void;
|
|
|
246
253
|
export function versionvector_decode(a: number, b: number, c: number): void;
|
|
247
254
|
export function versionvector_get(a: number, b: number, c: number): void;
|
|
248
255
|
export function versionvector_compare(a: number, b: number, c: number): void;
|
|
256
|
+
export function versionvector_setEnd(a: number, b: number, c: number): void;
|
|
257
|
+
export function versionvector_setLast(a: number, b: number, c: number): void;
|
|
258
|
+
export function versionvector_remove(a: number, b: number, c: number): void;
|
|
259
|
+
export function versionvector_length(a: number): number;
|
|
249
260
|
export function decodeImportBlobMeta(a: number, b: number, c: number, d: number): void;
|
|
250
261
|
export function __wbg_loromovablelist_free(a: number): void;
|
|
251
262
|
export function loromovablelist_parent(a: number): number;
|
package/nodejs/loro_wasm.d.ts
CHANGED
|
@@ -1676,9 +1676,9 @@ export class LoroDoc {
|
|
|
1676
1676
|
/**
|
|
1677
1677
|
* Get the path from the root to the container
|
|
1678
1678
|
* @param {ContainerID} id
|
|
1679
|
-
* @returns {
|
|
1679
|
+
* @returns {(string|number)[] | undefined}
|
|
1680
1680
|
*/
|
|
1681
|
-
getPathToContainer(id: ContainerID):
|
|
1681
|
+
getPathToContainer(id: ContainerID): (string|number)[] | undefined;
|
|
1682
1682
|
/**
|
|
1683
1683
|
* Evaluate JSONPath against a LoroDoc
|
|
1684
1684
|
* @param {string} jsonpath
|
|
@@ -1929,6 +1929,16 @@ export class LoroDoc {
|
|
|
1929
1929
|
*/
|
|
1930
1930
|
debugHistory(): void;
|
|
1931
1931
|
/**
|
|
1932
|
+
* Get the number of changes in the oplog.
|
|
1933
|
+
* @returns {number}
|
|
1934
|
+
*/
|
|
1935
|
+
changeCount(): number;
|
|
1936
|
+
/**
|
|
1937
|
+
* Get the number of ops in the oplog.
|
|
1938
|
+
* @returns {number}
|
|
1939
|
+
*/
|
|
1940
|
+
opCount(): number;
|
|
1941
|
+
/**
|
|
1932
1942
|
* Get all of changes in the oplog.
|
|
1933
1943
|
*
|
|
1934
1944
|
* Note: this method is expensive when the oplog is large. O(n)
|
|
@@ -2165,6 +2175,11 @@ export class LoroList {
|
|
|
2165
2175
|
*/
|
|
2166
2176
|
getIdAt(pos: number): { peer: PeerID, counter: number } | undefined;
|
|
2167
2177
|
/**
|
|
2178
|
+
* Check if the container is deleted
|
|
2179
|
+
* @returns {boolean}
|
|
2180
|
+
*/
|
|
2181
|
+
isDeleted(): boolean;
|
|
2182
|
+
/**
|
|
2168
2183
|
* Get the id of this container.
|
|
2169
2184
|
*/
|
|
2170
2185
|
readonly id: ContainerID;
|
|
@@ -2321,6 +2336,11 @@ export class LoroMap {
|
|
|
2321
2336
|
*/
|
|
2322
2337
|
getLastEditor(key: string): PeerID | undefined;
|
|
2323
2338
|
/**
|
|
2339
|
+
* Check if the container is deleted
|
|
2340
|
+
* @returns {boolean}
|
|
2341
|
+
*/
|
|
2342
|
+
isDeleted(): boolean;
|
|
2343
|
+
/**
|
|
2324
2344
|
* The container id of this handler.
|
|
2325
2345
|
*/
|
|
2326
2346
|
readonly id: ContainerID;
|
|
@@ -2459,6 +2479,11 @@ export class LoroMovableList {
|
|
|
2459
2479
|
*/
|
|
2460
2480
|
getLastEditorAt(pos: number): PeerID | undefined;
|
|
2461
2481
|
/**
|
|
2482
|
+
* Check if the container is deleted
|
|
2483
|
+
* @returns {boolean}
|
|
2484
|
+
*/
|
|
2485
|
+
isDeleted(): boolean;
|
|
2486
|
+
/**
|
|
2462
2487
|
* Get the id of this container.
|
|
2463
2488
|
*/
|
|
2464
2489
|
readonly id: ContainerID;
|
|
@@ -2769,6 +2794,11 @@ export class LoroText {
|
|
|
2769
2794
|
*/
|
|
2770
2795
|
getEditorOf(pos: number): PeerID | undefined;
|
|
2771
2796
|
/**
|
|
2797
|
+
* Check if the container is deleted
|
|
2798
|
+
* @returns {boolean}
|
|
2799
|
+
*/
|
|
2800
|
+
isDeleted(): boolean;
|
|
2801
|
+
/**
|
|
2772
2802
|
* Get the container id of the text.
|
|
2773
2803
|
*/
|
|
2774
2804
|
readonly id: ContainerID;
|
|
@@ -2933,6 +2963,11 @@ export class LoroTree {
|
|
|
2933
2963
|
*/
|
|
2934
2964
|
isFractionalIndexEnabled(): boolean;
|
|
2935
2965
|
/**
|
|
2966
|
+
* Check if the container is deleted
|
|
2967
|
+
* @returns {boolean}
|
|
2968
|
+
*/
|
|
2969
|
+
isDeleted(): boolean;
|
|
2970
|
+
/**
|
|
2936
2971
|
* Get the id of the container.
|
|
2937
2972
|
*/
|
|
2938
2973
|
readonly id: ContainerID;
|
|
@@ -3197,4 +3232,22 @@ export class VersionVector {
|
|
|
3197
3232
|
* @returns {number | undefined}
|
|
3198
3233
|
*/
|
|
3199
3234
|
compare(other: VersionVector): number | undefined;
|
|
3235
|
+
/**
|
|
3236
|
+
* set the exclusive ending point. target id will NOT be included by self
|
|
3237
|
+
* @param {{ peer: PeerID, counter: number }} id
|
|
3238
|
+
*/
|
|
3239
|
+
setEnd(id: { peer: PeerID, counter: number }): void;
|
|
3240
|
+
/**
|
|
3241
|
+
* set the inclusive ending point. target id will be included
|
|
3242
|
+
* @param {{ peer: PeerID, counter: number }} id
|
|
3243
|
+
*/
|
|
3244
|
+
setLast(id: { peer: PeerID, counter: number }): void;
|
|
3245
|
+
/**
|
|
3246
|
+
* @param {PeerID} peer
|
|
3247
|
+
*/
|
|
3248
|
+
remove(peer: PeerID): void;
|
|
3249
|
+
/**
|
|
3250
|
+
* @returns {number}
|
|
3251
|
+
*/
|
|
3252
|
+
length(): number;
|
|
3200
3253
|
}
|