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/nodejs/loro_wasm.js
CHANGED
|
@@ -1582,7 +1582,7 @@ class LoroDoc {
|
|
|
1582
1582
|
/**
|
|
1583
1583
|
* Get the path from the root to the container
|
|
1584
1584
|
* @param {ContainerID} id
|
|
1585
|
-
* @returns {
|
|
1585
|
+
* @returns {(string|number)[] | undefined}
|
|
1586
1586
|
*/
|
|
1587
1587
|
getPathToContainer(id) {
|
|
1588
1588
|
try {
|
|
@@ -2137,6 +2137,22 @@ class LoroDoc {
|
|
|
2137
2137
|
wasm.lorodoc_debugHistory(this.__wbg_ptr);
|
|
2138
2138
|
}
|
|
2139
2139
|
/**
|
|
2140
|
+
* Get the number of changes in the oplog.
|
|
2141
|
+
* @returns {number}
|
|
2142
|
+
*/
|
|
2143
|
+
changeCount() {
|
|
2144
|
+
const ret = wasm.lorodoc_changeCount(this.__wbg_ptr);
|
|
2145
|
+
return ret >>> 0;
|
|
2146
|
+
}
|
|
2147
|
+
/**
|
|
2148
|
+
* Get the number of ops in the oplog.
|
|
2149
|
+
* @returns {number}
|
|
2150
|
+
*/
|
|
2151
|
+
opCount() {
|
|
2152
|
+
const ret = wasm.lorodoc_opCount(this.__wbg_ptr);
|
|
2153
|
+
return ret >>> 0;
|
|
2154
|
+
}
|
|
2155
|
+
/**
|
|
2140
2156
|
* Get all of changes in the oplog.
|
|
2141
2157
|
*
|
|
2142
2158
|
* Note: this method is expensive when the oplog is large. O(n)
|
|
@@ -2799,6 +2815,14 @@ class LoroList {
|
|
|
2799
2815
|
const ret = wasm.lorolist_getIdAt(this.__wbg_ptr, pos);
|
|
2800
2816
|
return takeObject(ret);
|
|
2801
2817
|
}
|
|
2818
|
+
/**
|
|
2819
|
+
* Check if the container is deleted
|
|
2820
|
+
* @returns {boolean}
|
|
2821
|
+
*/
|
|
2822
|
+
isDeleted() {
|
|
2823
|
+
const ret = wasm.lorolist_isDeleted(this.__wbg_ptr);
|
|
2824
|
+
return ret !== 0;
|
|
2825
|
+
}
|
|
2802
2826
|
}
|
|
2803
2827
|
module.exports.LoroList = LoroList;
|
|
2804
2828
|
|
|
@@ -3242,6 +3266,14 @@ 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
|
module.exports.LoroMap = LoroMap;
|
|
3247
3279
|
|
|
@@ -3742,6 +3774,14 @@ class LoroMovableList {
|
|
|
3742
3774
|
const ret = wasm.loromovablelist_getLastEditorAt(this.__wbg_ptr, pos);
|
|
3743
3775
|
return takeObject(ret);
|
|
3744
3776
|
}
|
|
3777
|
+
/**
|
|
3778
|
+
* Check if the container is deleted
|
|
3779
|
+
* @returns {boolean}
|
|
3780
|
+
*/
|
|
3781
|
+
isDeleted() {
|
|
3782
|
+
const ret = wasm.loromovablelist_isDeleted(this.__wbg_ptr);
|
|
3783
|
+
return ret !== 0;
|
|
3784
|
+
}
|
|
3745
3785
|
}
|
|
3746
3786
|
module.exports.LoroMovableList = LoroMovableList;
|
|
3747
3787
|
|
|
@@ -4384,6 +4424,14 @@ class LoroText {
|
|
|
4384
4424
|
const ret = wasm.lorotext_getEditorOf(this.__wbg_ptr, pos);
|
|
4385
4425
|
return takeObject(ret);
|
|
4386
4426
|
}
|
|
4427
|
+
/**
|
|
4428
|
+
* Check if the container is deleted
|
|
4429
|
+
* @returns {boolean}
|
|
4430
|
+
*/
|
|
4431
|
+
isDeleted() {
|
|
4432
|
+
const ret = wasm.lorotext_isDeleted(this.__wbg_ptr);
|
|
4433
|
+
return ret !== 0;
|
|
4434
|
+
}
|
|
4387
4435
|
}
|
|
4388
4436
|
module.exports.LoroText = LoroText;
|
|
4389
4437
|
|
|
@@ -4821,6 +4869,14 @@ class LoroTree {
|
|
|
4821
4869
|
const ret = wasm.lorotree_isFractionalIndexEnabled(this.__wbg_ptr);
|
|
4822
4870
|
return ret !== 0;
|
|
4823
4871
|
}
|
|
4872
|
+
/**
|
|
4873
|
+
* Check if the container is deleted
|
|
4874
|
+
* @returns {boolean}
|
|
4875
|
+
*/
|
|
4876
|
+
isDeleted() {
|
|
4877
|
+
const ret = wasm.lorotree_isDeleted(this.__wbg_ptr);
|
|
4878
|
+
return ret !== 0;
|
|
4879
|
+
}
|
|
4824
4880
|
}
|
|
4825
4881
|
module.exports.LoroTree = LoroTree;
|
|
4826
4882
|
|
|
@@ -5512,6 +5568,63 @@ class VersionVector {
|
|
|
5512
5568
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5513
5569
|
}
|
|
5514
5570
|
}
|
|
5571
|
+
/**
|
|
5572
|
+
* set the exclusive ending point. target id will NOT be included by self
|
|
5573
|
+
* @param {{ peer: PeerID, counter: number }} id
|
|
5574
|
+
*/
|
|
5575
|
+
setEnd(id) {
|
|
5576
|
+
try {
|
|
5577
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
5578
|
+
wasm.versionvector_setEnd(retptr, this.__wbg_ptr, addHeapObject(id));
|
|
5579
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
5580
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
5581
|
+
if (r1) {
|
|
5582
|
+
throw takeObject(r0);
|
|
5583
|
+
}
|
|
5584
|
+
} finally {
|
|
5585
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5586
|
+
}
|
|
5587
|
+
}
|
|
5588
|
+
/**
|
|
5589
|
+
* set the inclusive ending point. target id will be included
|
|
5590
|
+
* @param {{ peer: PeerID, counter: number }} id
|
|
5591
|
+
*/
|
|
5592
|
+
setLast(id) {
|
|
5593
|
+
try {
|
|
5594
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
5595
|
+
wasm.versionvector_setLast(retptr, this.__wbg_ptr, addHeapObject(id));
|
|
5596
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
5597
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
5598
|
+
if (r1) {
|
|
5599
|
+
throw takeObject(r0);
|
|
5600
|
+
}
|
|
5601
|
+
} finally {
|
|
5602
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5603
|
+
}
|
|
5604
|
+
}
|
|
5605
|
+
/**
|
|
5606
|
+
* @param {PeerID} peer
|
|
5607
|
+
*/
|
|
5608
|
+
remove(peer) {
|
|
5609
|
+
try {
|
|
5610
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
5611
|
+
wasm.versionvector_remove(retptr, this.__wbg_ptr, addHeapObject(peer));
|
|
5612
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
5613
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
5614
|
+
if (r1) {
|
|
5615
|
+
throw takeObject(r0);
|
|
5616
|
+
}
|
|
5617
|
+
} finally {
|
|
5618
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
5619
|
+
}
|
|
5620
|
+
}
|
|
5621
|
+
/**
|
|
5622
|
+
* @returns {number}
|
|
5623
|
+
*/
|
|
5624
|
+
length() {
|
|
5625
|
+
const ret = wasm.versionvector_length(this.__wbg_ptr);
|
|
5626
|
+
return ret >>> 0;
|
|
5627
|
+
}
|
|
5515
5628
|
}
|
|
5516
5629
|
module.exports.VersionVector = VersionVector;
|
|
5517
5630
|
|
|
@@ -5519,8 +5632,8 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
|
5519
5632
|
takeObject(arg0);
|
|
5520
5633
|
};
|
|
5521
5634
|
|
|
5522
|
-
module.exports.
|
|
5523
|
-
const ret =
|
|
5635
|
+
module.exports.__wbg_lorotreenode_new = function(arg0) {
|
|
5636
|
+
const ret = LoroTreeNode.__wrap(arg0);
|
|
5524
5637
|
return addHeapObject(ret);
|
|
5525
5638
|
};
|
|
5526
5639
|
|
|
@@ -5529,13 +5642,13 @@ module.exports.__wbg_lorotree_new = function(arg0) {
|
|
|
5529
5642
|
return addHeapObject(ret);
|
|
5530
5643
|
};
|
|
5531
5644
|
|
|
5532
|
-
module.exports.
|
|
5533
|
-
const ret =
|
|
5645
|
+
module.exports.__wbg_lorotext_new = function(arg0) {
|
|
5646
|
+
const ret = LoroText.__wrap(arg0);
|
|
5534
5647
|
return addHeapObject(ret);
|
|
5535
5648
|
};
|
|
5536
5649
|
|
|
5537
|
-
module.exports.
|
|
5538
|
-
const ret =
|
|
5650
|
+
module.exports.__wbg_loromap_new = function(arg0) {
|
|
5651
|
+
const ret = LoroMap.__wrap(arg0);
|
|
5539
5652
|
return addHeapObject(ret);
|
|
5540
5653
|
};
|
|
5541
5654
|
|
|
@@ -5544,6 +5657,11 @@ module.exports.__wbg_lorocounter_new = function(arg0) {
|
|
|
5544
5657
|
return addHeapObject(ret);
|
|
5545
5658
|
};
|
|
5546
5659
|
|
|
5660
|
+
module.exports.__wbg_lorolist_new = function(arg0) {
|
|
5661
|
+
const ret = LoroList.__wrap(arg0);
|
|
5662
|
+
return addHeapObject(ret);
|
|
5663
|
+
};
|
|
5664
|
+
|
|
5547
5665
|
module.exports.__wbg_loromovablelist_new = function(arg0) {
|
|
5548
5666
|
const ret = LoroMovableList.__wrap(arg0);
|
|
5549
5667
|
return addHeapObject(ret);
|
|
@@ -5554,11 +5672,6 @@ module.exports.__wbg_cursor_new = function(arg0) {
|
|
|
5554
5672
|
return addHeapObject(ret);
|
|
5555
5673
|
};
|
|
5556
5674
|
|
|
5557
|
-
module.exports.__wbg_lorotext_new = function(arg0) {
|
|
5558
|
-
const ret = LoroText.__wrap(arg0);
|
|
5559
|
-
return addHeapObject(ret);
|
|
5560
|
-
};
|
|
5561
|
-
|
|
5562
5675
|
module.exports.__wbg_versionvector_new = function(arg0) {
|
|
5563
5676
|
const ret = VersionVector.__wrap(arg0);
|
|
5564
5677
|
return addHeapObject(ret);
|
|
@@ -5782,7 +5895,7 @@ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
|
|
|
5782
5895
|
}
|
|
5783
5896
|
};
|
|
5784
5897
|
|
|
5785
|
-
module.exports.
|
|
5898
|
+
module.exports.__wbg_now_11683c634f92ae89 = typeof Date.now == 'function' ? Date.now : notDefined('Date.now');
|
|
5786
5899
|
|
|
5787
5900
|
module.exports.__wbg_crypto_1d1f22824a6a080c = function(arg0) {
|
|
5788
5901
|
const ret = getObject(arg0).crypto;
|
|
@@ -6101,13 +6214,13 @@ module.exports.__wbindgen_memory = function() {
|
|
|
6101
6214
|
return addHeapObject(ret);
|
|
6102
6215
|
};
|
|
6103
6216
|
|
|
6104
|
-
module.exports.
|
|
6105
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
6217
|
+
module.exports.__wbindgen_closure_wrapper487 = function(arg0, arg1, arg2) {
|
|
6218
|
+
const ret = makeMutClosure(arg0, arg1, 11, __wbg_adapter_58);
|
|
6106
6219
|
return addHeapObject(ret);
|
|
6107
6220
|
};
|
|
6108
6221
|
|
|
6109
|
-
module.exports.
|
|
6110
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
6222
|
+
module.exports.__wbindgen_closure_wrapper490 = function(arg0, arg1, arg2) {
|
|
6223
|
+
const ret = makeMutClosure(arg0, arg1, 9, __wbg_adapter_61);
|
|
6111
6224
|
return addHeapObject(ret);
|
|
6112
6225
|
};
|
|
6113
6226
|
|
package/nodejs/loro_wasm_bg.wasm
CHANGED
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "loro-crdt",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Loro CRDTs is a high-performance CRDT framework that makes your app state synchronized, collaborative and maintainable effortlessly.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"crdt",
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
"./bundler",
|
|
22
22
|
"./nodejs",
|
|
23
23
|
"./web",
|
|
24
|
+
"./base64",
|
|
24
25
|
"CHANGELOG.md",
|
|
25
26
|
"README.md",
|
|
26
27
|
"LICENSE",
|
|
@@ -33,21 +34,22 @@
|
|
|
33
34
|
"@rollup/plugin-alias": "^5.1.1",
|
|
34
35
|
"@rollup/plugin-node-resolve": "^15.0.1",
|
|
35
36
|
"@rollup/plugin-typescript": "^12.1.1",
|
|
36
|
-
"rollup": "^
|
|
37
|
-
"tslib": "^2.8.0",
|
|
38
|
-
"typescript": "^5.6.3",
|
|
39
|
-
"vite-plugin-top-level-await": "^1.2.2",
|
|
40
|
-
"vite-plugin-wasm": "^3.1.0",
|
|
37
|
+
"@rollup/plugin-wasm": "^6.2.2",
|
|
41
38
|
"@typescript-eslint/parser": "^6.2.0",
|
|
42
39
|
"@vitest/ui": "^1.0.4",
|
|
43
40
|
"esbuild": "^0.18.20",
|
|
44
41
|
"eslint": "^8.46.0",
|
|
45
|
-
"loro-crdt-old": "npm:loro-crdt@=0.16.0",
|
|
46
42
|
"loro-crdt-alpha-4": "npm:loro-crdt@=1.0.0-alpha.4",
|
|
43
|
+
"loro-crdt-old": "npm:loro-crdt@=0.16.0",
|
|
47
44
|
"prettier": "^3.0.0",
|
|
45
|
+
"rollup": "^3.20.1",
|
|
48
46
|
"rollup-plugin-dts": "^5.3.0",
|
|
49
47
|
"rollup-plugin-esbuild": "^5.0.0",
|
|
48
|
+
"tslib": "^2.8.0",
|
|
49
|
+
"typescript": "^5.6.3",
|
|
50
50
|
"vite": "^4.2.1",
|
|
51
|
+
"vite-plugin-top-level-await": "^1.2.2",
|
|
52
|
+
"vite-plugin-wasm": "^3.1.0",
|
|
51
53
|
"vitest": "^1.4.0"
|
|
52
54
|
},
|
|
53
55
|
"scripts": {
|
package/web/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,6 +3232,24 @@ 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
|
}
|
|
3201
3254
|
|
|
3202
3255
|
export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
|
|
@@ -3283,6 +3336,8 @@ export interface InitOutput {
|
|
|
3283
3336
|
readonly lorodoc_subscribe: (a: number, b: number) => number;
|
|
3284
3337
|
readonly lorodoc_subscribeLocalUpdates: (a: number, b: number) => number;
|
|
3285
3338
|
readonly lorodoc_debugHistory: (a: number) => void;
|
|
3339
|
+
readonly lorodoc_changeCount: (a: number) => number;
|
|
3340
|
+
readonly lorodoc_opCount: (a: number) => number;
|
|
3286
3341
|
readonly lorodoc_getAllChanges: (a: number) => number;
|
|
3287
3342
|
readonly lorodoc_getChangeAt: (a: number, b: number, c: number) => void;
|
|
3288
3343
|
readonly lorodoc_getChangeAtLamport: (a: number, b: number, c: number, d: number, e: number) => void;
|
|
@@ -3318,6 +3373,7 @@ export interface InitOutput {
|
|
|
3318
3373
|
readonly lorotext_getCursor: (a: number, b: number, c: number) => number;
|
|
3319
3374
|
readonly lorotext_push: (a: number, b: number, c: number, d: number) => void;
|
|
3320
3375
|
readonly lorotext_getEditorOf: (a: number, b: number) => number;
|
|
3376
|
+
readonly lorotext_isDeleted: (a: number) => number;
|
|
3321
3377
|
readonly __wbg_loromap_free: (a: number) => void;
|
|
3322
3378
|
readonly loromap_new: () => number;
|
|
3323
3379
|
readonly loromap_kind: (a: number) => number;
|
|
@@ -3337,6 +3393,7 @@ export interface InitOutput {
|
|
|
3337
3393
|
readonly loromap_getAttached: (a: number) => number;
|
|
3338
3394
|
readonly loromap_clear: (a: number, b: number) => void;
|
|
3339
3395
|
readonly loromap_getLastEditor: (a: number, b: number, c: number) => number;
|
|
3396
|
+
readonly loromap_isDeleted: (a: number) => number;
|
|
3340
3397
|
readonly __wbg_lorolist_free: (a: number) => void;
|
|
3341
3398
|
readonly lorolist_new: () => number;
|
|
3342
3399
|
readonly lorolist_kind: (a: number) => number;
|
|
@@ -3358,6 +3415,7 @@ export interface InitOutput {
|
|
|
3358
3415
|
readonly lorolist_pop: (a: number, b: number) => void;
|
|
3359
3416
|
readonly lorolist_clear: (a: number, b: number) => void;
|
|
3360
3417
|
readonly lorolist_getIdAt: (a: number, b: number) => number;
|
|
3418
|
+
readonly lorolist_isDeleted: (a: number) => number;
|
|
3361
3419
|
readonly loromovablelist_new: () => number;
|
|
3362
3420
|
readonly loromovablelist_kind: (a: number) => number;
|
|
3363
3421
|
readonly loromovablelist_insert: (a: number, b: number, c: number, d: number) => void;
|
|
@@ -3381,6 +3439,7 @@ export interface InitOutput {
|
|
|
3381
3439
|
readonly loromovablelist_getCreatorAt: (a: number, b: number) => number;
|
|
3382
3440
|
readonly loromovablelist_getLastMoverAt: (a: number, b: number) => number;
|
|
3383
3441
|
readonly loromovablelist_getLastEditorAt: (a: number, b: number) => number;
|
|
3442
|
+
readonly loromovablelist_isDeleted: (a: number) => number;
|
|
3384
3443
|
readonly __wbg_lorotree_free: (a: number) => void;
|
|
3385
3444
|
readonly lorotreenode___getClassname: (a: number, b: number) => void;
|
|
3386
3445
|
readonly __wbg_lorotreenode_free: (a: number) => void;
|
|
@@ -3420,6 +3479,7 @@ export interface InitOutput {
|
|
|
3420
3479
|
readonly lorotree_enableFractionalIndex: (a: number, b: number) => void;
|
|
3421
3480
|
readonly lorotree_disableFractionalIndex: (a: number) => void;
|
|
3422
3481
|
readonly lorotree_isFractionalIndexEnabled: (a: number) => number;
|
|
3482
|
+
readonly lorotree_isDeleted: (a: number) => number;
|
|
3423
3483
|
readonly __wbg_cursor_free: (a: number) => void;
|
|
3424
3484
|
readonly cursor_containerId: (a: number) => number;
|
|
3425
3485
|
readonly cursor_pos: (a: number) => number;
|
|
@@ -3448,6 +3508,10 @@ export interface InitOutput {
|
|
|
3448
3508
|
readonly versionvector_decode: (a: number, b: number, c: number) => void;
|
|
3449
3509
|
readonly versionvector_get: (a: number, b: number, c: number) => void;
|
|
3450
3510
|
readonly versionvector_compare: (a: number, b: number, c: number) => void;
|
|
3511
|
+
readonly versionvector_setEnd: (a: number, b: number, c: number) => void;
|
|
3512
|
+
readonly versionvector_setLast: (a: number, b: number, c: number) => void;
|
|
3513
|
+
readonly versionvector_remove: (a: number, b: number, c: number) => void;
|
|
3514
|
+
readonly versionvector_length: (a: number) => number;
|
|
3451
3515
|
readonly decodeImportBlobMeta: (a: number, b: number, c: number, d: number) => void;
|
|
3452
3516
|
readonly __wbg_loromovablelist_free: (a: number) => void;
|
|
3453
3517
|
readonly loromovablelist_parent: (a: number) => number;
|