loro-crdt 1.5.8 → 1.5.10

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.
@@ -2181,6 +2181,7 @@ export class LoroDoc {
2181
2181
  * @param mode - The export mode to use. Can be one of:
2182
2182
  * - `{ mode: "snapshot" }`: Export a full snapshot of the document.
2183
2183
  * - `{ mode: "update", from?: VersionVector }`: Export updates from the given version vector.
2184
+ * If `from` is not provided, it will export the whole history of the document.
2184
2185
  * - `{ mode: "updates-in-range", spans: { id: ID, len: number }[] }`: Export updates within the specified ID spans.
2185
2186
  * - `{ mode: "shallow-snapshot", frontiers: Frontiers }`: Export a garbage-collected snapshot up to the given frontiers.
2186
2187
  *
@@ -3608,6 +3609,10 @@ export class UndoManager {
3608
3609
  * Redo the last undone operation.
3609
3610
  */
3610
3611
  redo(): boolean;
3612
+ /**
3613
+ * Get the peer id of the undo manager.
3614
+ */
3615
+ peer(): PeerID;
3611
3616
  /**
3612
3617
  * Can undo the last operation.
3613
3618
  */
@@ -2266,6 +2266,7 @@ export class LoroDoc {
2266
2266
  * @param mode - The export mode to use. Can be one of:
2267
2267
  * - `{ mode: "snapshot" }`: Export a full snapshot of the document.
2268
2268
  * - `{ mode: "update", from?: VersionVector }`: Export updates from the given version vector.
2269
+ * If `from` is not provided, it will export the whole history of the document.
2269
2270
  * - `{ mode: "updates-in-range", spans: { id: ID, len: number }[] }`: Export updates within the specified ID spans.
2270
2271
  * - `{ mode: "shallow-snapshot", frontiers: Frontiers }`: Export a garbage-collected snapshot up to the given frontiers.
2271
2272
  *
@@ -6171,6 +6172,14 @@ export class UndoManager {
6171
6172
  wasm.__wbindgen_add_to_stack_pointer(16);
6172
6173
  }
6173
6174
  }
6175
+ /**
6176
+ * Get the peer id of the undo manager.
6177
+ * @returns {PeerID}
6178
+ */
6179
+ peer() {
6180
+ const ret = wasm.undomanager_peer(this.__wbg_ptr);
6181
+ return takeObject(ret);
6182
+ }
6174
6183
  groupStart() {
6175
6184
  try {
6176
6185
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -6805,7 +6814,7 @@ export function __wbg_node_02999533c4ea02e3(arg0) {
6805
6814
  return addHeapObject(ret);
6806
6815
  };
6807
6816
 
6808
- export function __wbg_now_dc4980649ae44bd7() {
6817
+ export function __wbg_now_439b66158bc4f246() {
6809
6818
  const ret = Date.now();
6810
6819
  return ret;
6811
6820
  };
@@ -6946,12 +6955,12 @@ export function __wbindgen_cb_drop(arg0) {
6946
6955
  return ret;
6947
6956
  };
6948
6957
 
6949
- export function __wbindgen_closure_wrapper563(arg0, arg1, arg2) {
6958
+ export function __wbindgen_closure_wrapper562(arg0, arg1, arg2) {
6950
6959
  const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_60);
6951
6960
  return addHeapObject(ret);
6952
6961
  };
6953
6962
 
6954
- export function __wbindgen_closure_wrapper566(arg0, arg1, arg2) {
6963
+ export function __wbindgen_closure_wrapper565(arg0, arg1, arg2) {
6955
6964
  const ret = makeMutClosure(arg0, arg1, 8, __wbg_adapter_63);
6956
6965
  return addHeapObject(ret);
6957
6966
  };
Binary file
@@ -280,6 +280,7 @@ export const __wbg_undomanager_free: (a: number, b: number) => void;
280
280
  export const undomanager_new: (a: number, b: number) => number;
281
281
  export const undomanager_undo: (a: number, b: number) => void;
282
282
  export const undomanager_redo: (a: number, b: number) => void;
283
+ export const undomanager_peer: (a: number) => number;
283
284
  export const undomanager_groupStart: (a: number, b: number) => void;
284
285
  export const undomanager_groupEnd: (a: number) => void;
285
286
  export const undomanager_canUndo: (a: number) => number;
@@ -2181,6 +2181,7 @@ export class LoroDoc {
2181
2181
  * @param mode - The export mode to use. Can be one of:
2182
2182
  * - `{ mode: "snapshot" }`: Export a full snapshot of the document.
2183
2183
  * - `{ mode: "update", from?: VersionVector }`: Export updates from the given version vector.
2184
+ * If `from` is not provided, it will export the whole history of the document.
2184
2185
  * - `{ mode: "updates-in-range", spans: { id: ID, len: number }[] }`: Export updates within the specified ID spans.
2185
2186
  * - `{ mode: "shallow-snapshot", frontiers: Frontiers }`: Export a garbage-collected snapshot up to the given frontiers.
2186
2187
  *
@@ -3608,6 +3609,10 @@ export class UndoManager {
3608
3609
  * Redo the last undone operation.
3609
3610
  */
3610
3611
  redo(): boolean;
3612
+ /**
3613
+ * Get the peer id of the undo manager.
3614
+ */
3615
+ peer(): PeerID;
3611
3616
  /**
3612
3617
  * Can undo the last operation.
3613
3618
  */
@@ -2267,6 +2267,7 @@ class LoroDoc {
2267
2267
  * @param mode - The export mode to use. Can be one of:
2268
2268
  * - `{ mode: "snapshot" }`: Export a full snapshot of the document.
2269
2269
  * - `{ mode: "update", from?: VersionVector }`: Export updates from the given version vector.
2270
+ * If `from` is not provided, it will export the whole history of the document.
2270
2271
  * - `{ mode: "updates-in-range", spans: { id: ID, len: number }[] }`: Export updates within the specified ID spans.
2271
2272
  * - `{ mode: "shallow-snapshot", frontiers: Frontiers }`: Export a garbage-collected snapshot up to the given frontiers.
2272
2273
  *
@@ -6179,6 +6180,14 @@ class UndoManager {
6179
6180
  wasm.__wbindgen_add_to_stack_pointer(16);
6180
6181
  }
6181
6182
  }
6183
+ /**
6184
+ * Get the peer id of the undo manager.
6185
+ * @returns {PeerID}
6186
+ */
6187
+ peer() {
6188
+ const ret = wasm.undomanager_peer(this.__wbg_ptr);
6189
+ return takeObject(ret);
6190
+ }
6182
6191
  groupStart() {
6183
6192
  try {
6184
6193
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -6815,7 +6824,7 @@ module.exports.__wbg_node_02999533c4ea02e3 = function(arg0) {
6815
6824
  return addHeapObject(ret);
6816
6825
  };
6817
6826
 
6818
- module.exports.__wbg_now_dc4980649ae44bd7 = function() {
6827
+ module.exports.__wbg_now_439b66158bc4f246 = function() {
6819
6828
  const ret = Date.now();
6820
6829
  return ret;
6821
6830
  };
@@ -6956,12 +6965,12 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
6956
6965
  return ret;
6957
6966
  };
6958
6967
 
6959
- module.exports.__wbindgen_closure_wrapper563 = function(arg0, arg1, arg2) {
6968
+ module.exports.__wbindgen_closure_wrapper562 = function(arg0, arg1, arg2) {
6960
6969
  const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_60);
6961
6970
  return addHeapObject(ret);
6962
6971
  };
6963
6972
 
6964
- module.exports.__wbindgen_closure_wrapper566 = function(arg0, arg1, arg2) {
6973
+ module.exports.__wbindgen_closure_wrapper565 = function(arg0, arg1, arg2) {
6965
6974
  const ret = makeMutClosure(arg0, arg1, 8, __wbg_adapter_63);
6966
6975
  return addHeapObject(ret);
6967
6976
  };
Binary file
@@ -280,6 +280,7 @@ export const __wbg_undomanager_free: (a: number, b: number) => void;
280
280
  export const undomanager_new: (a: number, b: number) => number;
281
281
  export const undomanager_undo: (a: number, b: number) => void;
282
282
  export const undomanager_redo: (a: number, b: number) => void;
283
+ export const undomanager_peer: (a: number) => number;
283
284
  export const undomanager_groupStart: (a: number, b: number) => void;
284
285
  export const undomanager_groupEnd: (a: number) => void;
285
286
  export const undomanager_canUndo: (a: number) => number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loro-crdt",
3
- "version": "1.5.8",
3
+ "version": "1.5.10",
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",
@@ -2181,6 +2181,7 @@ export class LoroDoc {
2181
2181
  * @param mode - The export mode to use. Can be one of:
2182
2182
  * - `{ mode: "snapshot" }`: Export a full snapshot of the document.
2183
2183
  * - `{ mode: "update", from?: VersionVector }`: Export updates from the given version vector.
2184
+ * If `from` is not provided, it will export the whole history of the document.
2184
2185
  * - `{ mode: "updates-in-range", spans: { id: ID, len: number }[] }`: Export updates within the specified ID spans.
2185
2186
  * - `{ mode: "shallow-snapshot", frontiers: Frontiers }`: Export a garbage-collected snapshot up to the given frontiers.
2186
2187
  *
@@ -3608,6 +3609,10 @@ export class UndoManager {
3608
3609
  * Redo the last undone operation.
3609
3610
  */
3610
3611
  redo(): boolean;
3612
+ /**
3613
+ * Get the peer id of the undo manager.
3614
+ */
3615
+ peer(): PeerID;
3611
3616
  /**
3612
3617
  * Can undo the last operation.
3613
3618
  */
@@ -3969,6 +3974,7 @@ export interface InitOutput {
3969
3974
  readonly undomanager_new: (a: number, b: number) => number;
3970
3975
  readonly undomanager_undo: (a: number, b: number) => void;
3971
3976
  readonly undomanager_redo: (a: number, b: number) => void;
3977
+ readonly undomanager_peer: (a: number) => number;
3972
3978
  readonly undomanager_groupStart: (a: number, b: number) => void;
3973
3979
  readonly undomanager_groupEnd: (a: number) => void;
3974
3980
  readonly undomanager_canUndo: (a: number) => number;
package/web/loro_wasm.js CHANGED
@@ -2258,6 +2258,7 @@ export class LoroDoc {
2258
2258
  * @param mode - The export mode to use. Can be one of:
2259
2259
  * - `{ mode: "snapshot" }`: Export a full snapshot of the document.
2260
2260
  * - `{ mode: "update", from?: VersionVector }`: Export updates from the given version vector.
2261
+ * If `from` is not provided, it will export the whole history of the document.
2261
2262
  * - `{ mode: "updates-in-range", spans: { id: ID, len: number }[] }`: Export updates within the specified ID spans.
2262
2263
  * - `{ mode: "shallow-snapshot", frontiers: Frontiers }`: Export a garbage-collected snapshot up to the given frontiers.
2263
2264
  *
@@ -6163,6 +6164,14 @@ export class UndoManager {
6163
6164
  wasm.__wbindgen_add_to_stack_pointer(16);
6164
6165
  }
6165
6166
  }
6167
+ /**
6168
+ * Get the peer id of the undo manager.
6169
+ * @returns {PeerID}
6170
+ */
6171
+ peer() {
6172
+ const ret = wasm.undomanager_peer(this.__wbg_ptr);
6173
+ return takeObject(ret);
6174
+ }
6166
6175
  groupStart() {
6167
6176
  try {
6168
6177
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
@@ -6774,7 +6783,7 @@ function __wbg_get_imports() {
6774
6783
  const ret = getObject(arg0).node;
6775
6784
  return addHeapObject(ret);
6776
6785
  };
6777
- imports.wbg.__wbg_now_dc4980649ae44bd7 = function() {
6786
+ imports.wbg.__wbg_now_439b66158bc4f246 = function() {
6778
6787
  const ret = Date.now();
6779
6788
  return ret;
6780
6789
  };
@@ -6888,11 +6897,11 @@ function __wbg_get_imports() {
6888
6897
  const ret = false;
6889
6898
  return ret;
6890
6899
  };
6891
- imports.wbg.__wbindgen_closure_wrapper563 = function(arg0, arg1, arg2) {
6900
+ imports.wbg.__wbindgen_closure_wrapper562 = function(arg0, arg1, arg2) {
6892
6901
  const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_60);
6893
6902
  return addHeapObject(ret);
6894
6903
  };
6895
- imports.wbg.__wbindgen_closure_wrapper566 = function(arg0, arg1, arg2) {
6904
+ imports.wbg.__wbindgen_closure_wrapper565 = function(arg0, arg1, arg2) {
6896
6905
  const ret = makeMutClosure(arg0, arg1, 8, __wbg_adapter_63);
6897
6906
  return addHeapObject(ret);
6898
6907
  };
Binary file
@@ -280,6 +280,7 @@ export const __wbg_undomanager_free: (a: number, b: number) => void;
280
280
  export const undomanager_new: (a: number, b: number) => number;
281
281
  export const undomanager_undo: (a: number, b: number) => void;
282
282
  export const undomanager_redo: (a: number, b: number) => void;
283
+ export const undomanager_peer: (a: number) => number;
283
284
  export const undomanager_groupStart: (a: number, b: number) => void;
284
285
  export const undomanager_groupEnd: (a: number) => void;
285
286
  export const undomanager_canUndo: (a: number) => number;