loro-crdt 1.1.2 → 1.1.3

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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - d6966ac: The fractional index in LoroTree is now enabled by default with jitter=0.
8
+
9
+ To reduce the cost of LoroTree, if the `index` property in LoroTree is unused, users can still
10
+ call `tree.disableFractionalIndex()`. However, in the new version, after disabling the fractional
11
+ index, `tree.moveTo()`, `tree.moveBefore()`, `tree.moveAfter()`, and `tree.createAt()` will
12
+ throw an error
13
+
3
14
  ## 1.1.2
4
15
 
5
16
  ### Patch Changes
package/base64/index.js CHANGED
@@ -4852,8 +4852,11 @@ class LoroTree {
4852
4852
  wasm.lorotree_enableFractionalIndex(this.__wbg_ptr, jitter);
4853
4853
  }
4854
4854
  /**
4855
- * Disable the fractional index generation for Tree Position when
4856
- * you don't need the Tree's siblings to be sorted. The fractional index will always be set to default.
4855
+ * Disable the fractional index generation when you don't need the Tree's siblings to be sorted.
4856
+ * The fractional index will always be set to the same default value 0.
4857
+ *
4858
+ * After calling this, you cannot use `tree.moveTo()`, `tree.moveBefore()`, `tree.moveAfter()`,
4859
+ * and `tree.createAt()`.
4857
4860
  */
4858
4861
  disableFractionalIndex() {
4859
4862
  wasm.lorotree_disableFractionalIndex(this.__wbg_ptr);
@@ -6245,7 +6248,7 @@ var imports = /*#__PURE__*/Object.freeze({
6245
6248
  // Without this patch, Cloudflare Worker would raise issue like: "Uncaught TypeError: wasm2.__wbindgen_start is not a function"
6246
6249
 
6247
6250
 
6248
- import loro_wasm_bg_js from './loro_wasm_bg-4a32f96e.js';
6251
+ import loro_wasm_bg_js from './loro_wasm_bg-63931712.js';
6249
6252
  const instance = new WebAssembly.Instance(loro_wasm_bg_js(), {
6250
6253
  "./loro_wasm_bg.js": imports,
6251
6254
  });
@@ -2953,8 +2953,11 @@ export class LoroTree {
2953
2953
  */
2954
2954
  enableFractionalIndex(jitter: number): void;
2955
2955
  /**
2956
- * Disable the fractional index generation for Tree Position when
2957
- * you don't need the Tree's siblings to be sorted. The fractional index will always be set to default.
2956
+ * Disable the fractional index generation when you don't need the Tree's siblings to be sorted.
2957
+ * The fractional index will always be set to the same default value 0.
2958
+ *
2959
+ * After calling this, you cannot use `tree.moveTo()`, `tree.moveBefore()`, `tree.moveAfter()`,
2960
+ * and `tree.createAt()`.
2958
2961
  */
2959
2962
  disableFractionalIndex(): void;
2960
2963
  /**