loro-crdt 1.8.4 → 1.8.6

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.
@@ -2472,7 +2472,7 @@ export class LoroDoc {
2472
2472
  * }
2473
2473
  * ```
2474
2474
  */
2475
- getCursorPos(cursor: Cursor): { update?: Cursor, offset: number, side: Side };
2475
+ getCursorPos(cursor: Cursor): { update?: Cursor, offset: number, side: Side } | undefined;
2476
2476
  /**
2477
2477
  * Gets container IDs modified in the given ID range.
2478
2478
  *
@@ -2472,7 +2472,7 @@ export class LoroDoc {
2472
2472
  * }
2473
2473
  * ```
2474
2474
  */
2475
- getCursorPos(cursor: Cursor): { update?: Cursor, offset: number, side: Side };
2475
+ getCursorPos(cursor: Cursor): { update?: Cursor, offset: number, side: Side } | undefined;
2476
2476
  /**
2477
2477
  * Gets container IDs modified in the given ID range.
2478
2478
  *
@@ -4,30 +4,21 @@ import * as wasm from "./loro_wasm_bg.wasm";
4
4
  import * as imports from "./loro_wasm_bg.js";
5
5
 
6
6
  if (wasm.__wbindgen_start) {
7
- imports.__wbg_set_wasm(wasm);
8
- // Seed wasm-bindgen's externref table so constants like `true`/`false`
9
- // don't alias arbitrary externrefs when we instantiate manually.
10
- if (typeof imports.__wbindgen_init_externref_table === "function") {
11
- imports.__wbindgen_init_externref_table();
12
- }
13
- wasm.__wbindgen_start();
14
- } else if ('Bun' in globalThis) {
15
- const { instance } = await WebAssembly.instantiateStreaming(fetch(Bun.pathToFileURL(wasm.default)), {
16
- "./loro_wasm_bg.js": imports,
17
- });
18
- imports.__wbg_set_wasm(instance.exports);
19
- // Bun path needs the same externref initialisation.
20
- if (typeof imports.__wbindgen_init_externref_table === "function") {
21
- imports.__wbindgen_init_externref_table();
22
- }
7
+ imports.__wbg_set_wasm(wasm);
8
+ wasm.__wbindgen_start();
9
+ } else if ("Bun" in globalThis) {
10
+ const { instance } = await WebAssembly.instantiateStreaming(
11
+ fetch(Bun.pathToFileURL(wasm.default)),
12
+ {
13
+ "./loro_wasm_bg.js": imports,
14
+ },
15
+ );
16
+ imports.__wbg_set_wasm(instance.exports);
23
17
  } else {
24
- const wkmod = await import("./loro_wasm_bg.wasm");
25
- const instance = new WebAssembly.Instance(wkmod.default, {
26
- "./loro_wasm_bg.js": imports,
27
- });
28
- imports.__wbg_set_wasm(instance.exports);
29
- if (typeof imports.__wbindgen_init_externref_table === "function") {
30
- imports.__wbindgen_init_externref_table();
31
- }
18
+ const wkmod = await import("./loro_wasm_bg.wasm");
19
+ const instance = new WebAssembly.Instance(wkmod.default, {
20
+ "./loro_wasm_bg.js": imports,
21
+ });
22
+ imports.__wbg_set_wasm(instance.exports);
32
23
  }
33
24
  export * from "./loro_wasm_bg.js";
@@ -2887,7 +2887,7 @@ export class LoroDoc {
2887
2887
  * }
2888
2888
  * ```
2889
2889
  * @param {Cursor} cursor
2890
- * @returns {{ update?: Cursor, offset: number, side: Side }}
2890
+ * @returns {{ update?: Cursor, offset: number, side: Side } | undefined}
2891
2891
  */
2892
2892
  getCursorPos(cursor) {
2893
2893
  try {
@@ -6969,6 +6969,10 @@ export function __wbg_versionvector_new(arg0) {
6969
6969
  return addHeapObject(ret);
6970
6970
  };
6971
6971
 
6972
+ export function __wbg_warn_e5b4e7fccddaec9a(arg0, arg1) {
6973
+ console.warn(getStringFromWasm0(arg0, arg1));
6974
+ };
6975
+
6972
6976
  export function __wbindgen_as_number(arg0) {
6973
6977
  const ret = +getObject(arg0);
6974
6978
  return ret;
@@ -7008,11 +7012,11 @@ export function __wbindgen_cb_drop(arg0) {
7008
7012
  };
7009
7013
 
7010
7014
  export function __wbindgen_closure_wrapper710(arg0, arg1, arg2) {
7011
- const ret = makeMutClosure(arg0, arg1, 12, __wbg_adapter_60);
7015
+ const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_60);
7012
7016
  return addHeapObject(ret);
7013
7017
  };
7014
7018
 
7015
- export function __wbindgen_closure_wrapper713(arg0, arg1, arg2) {
7019
+ export function __wbindgen_closure_wrapper712(arg0, arg1, arg2) {
7016
7020
  const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_63);
7017
7021
  return addHeapObject(ret);
7018
7022
  };
Binary file
@@ -2472,7 +2472,7 @@ export class LoroDoc {
2472
2472
  * }
2473
2473
  * ```
2474
2474
  */
2475
- getCursorPos(cursor: Cursor): { update?: Cursor, offset: number, side: Side };
2475
+ getCursorPos(cursor: Cursor): { update?: Cursor, offset: number, side: Side } | undefined;
2476
2476
  /**
2477
2477
  * Gets container IDs modified in the given ID range.
2478
2478
  *
@@ -2888,7 +2888,7 @@ class LoroDoc {
2888
2888
  * }
2889
2889
  * ```
2890
2890
  * @param {Cursor} cursor
2891
- * @returns {{ update?: Cursor, offset: number, side: Side }}
2891
+ * @returns {{ update?: Cursor, offset: number, side: Side } | undefined}
2892
2892
  */
2893
2893
  getCursorPos(cursor) {
2894
2894
  try {
@@ -6979,6 +6979,10 @@ module.exports.__wbg_versionvector_new = function(arg0) {
6979
6979
  return addHeapObject(ret);
6980
6980
  };
6981
6981
 
6982
+ module.exports.__wbg_warn_e5b4e7fccddaec9a = function(arg0, arg1) {
6983
+ console.warn(getStringFromWasm0(arg0, arg1));
6984
+ };
6985
+
6982
6986
  module.exports.__wbindgen_as_number = function(arg0) {
6983
6987
  const ret = +getObject(arg0);
6984
6988
  return ret;
@@ -7018,11 +7022,11 @@ module.exports.__wbindgen_cb_drop = function(arg0) {
7018
7022
  };
7019
7023
 
7020
7024
  module.exports.__wbindgen_closure_wrapper710 = function(arg0, arg1, arg2) {
7021
- const ret = makeMutClosure(arg0, arg1, 12, __wbg_adapter_60);
7025
+ const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_60);
7022
7026
  return addHeapObject(ret);
7023
7027
  };
7024
7028
 
7025
- module.exports.__wbindgen_closure_wrapper713 = function(arg0, arg1, arg2) {
7029
+ module.exports.__wbindgen_closure_wrapper712 = function(arg0, arg1, arg2) {
7026
7030
  const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_63);
7027
7031
  return addHeapObject(ret);
7028
7032
  };
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loro-crdt",
3
- "version": "1.8.4",
3
+ "version": "1.8.6",
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",
@@ -2472,7 +2472,7 @@ export class LoroDoc {
2472
2472
  * }
2473
2473
  * ```
2474
2474
  */
2475
- getCursorPos(cursor: Cursor): { update?: Cursor, offset: number, side: Side };
2475
+ getCursorPos(cursor: Cursor): { update?: Cursor, offset: number, side: Side } | undefined;
2476
2476
  /**
2477
2477
  * Gets container IDs modified in the given ID range.
2478
2478
  *
package/web/loro_wasm.js CHANGED
@@ -2879,7 +2879,7 @@ export class LoroDoc {
2879
2879
  * }
2880
2880
  * ```
2881
2881
  * @param {Cursor} cursor
2882
- * @returns {{ update?: Cursor, offset: number, side: Side }}
2882
+ * @returns {{ update?: Cursor, offset: number, side: Side } | undefined}
2883
2883
  */
2884
2884
  getCursorPos(cursor) {
2885
2885
  try {
@@ -6916,6 +6916,9 @@ function __wbg_get_imports() {
6916
6916
  const ret = VersionVector.__wrap(arg0);
6917
6917
  return addHeapObject(ret);
6918
6918
  };
6919
+ imports.wbg.__wbg_warn_e5b4e7fccddaec9a = function(arg0, arg1) {
6920
+ console.warn(getStringFromWasm0(arg0, arg1));
6921
+ };
6919
6922
  imports.wbg.__wbindgen_as_number = function(arg0) {
6920
6923
  const ret = +getObject(arg0);
6921
6924
  return ret;
@@ -6949,10 +6952,10 @@ function __wbg_get_imports() {
6949
6952
  return ret;
6950
6953
  };
6951
6954
  imports.wbg.__wbindgen_closure_wrapper710 = function(arg0, arg1, arg2) {
6952
- const ret = makeMutClosure(arg0, arg1, 12, __wbg_adapter_60);
6955
+ const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_60);
6953
6956
  return addHeapObject(ret);
6954
6957
  };
6955
- imports.wbg.__wbindgen_closure_wrapper713 = function(arg0, arg1, arg2) {
6958
+ imports.wbg.__wbindgen_closure_wrapper712 = function(arg0, arg1, arg2) {
6956
6959
  const ret = makeMutClosure(arg0, arg1, 10, __wbg_adapter_63);
6957
6960
  return addHeapObject(ret);
6958
6961
  };
Binary file