loro-crdt 1.4.4 → 1.4.5

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,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - aab07c6: feat: set default config for text style #669
8
+ - 6cf06e5: fix: detached loro text issues #665
9
+
3
10
  ## 1.4.4
4
11
 
5
12
  ### Patch Changes
package/base64/index.js CHANGED
@@ -1077,6 +1077,26 @@ class LoroDoc {
1077
1077
  }
1078
1078
  }
1079
1079
  /**
1080
+ * Configures the default text style for the document.
1081
+ *
1082
+ * This method sets the default text style configuration for the document when using LoroText.
1083
+ * If `None` is provided, the default style is reset.
1084
+ * @param {{ expand: 'before'|'after'|'none'|'both' } | undefined} style
1085
+ */
1086
+ configDefaultTextStyle(style) {
1087
+ try {
1088
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1089
+ wasm.lorodoc_configDefaultTextStyle(retptr, this.__wbg_ptr, addHeapObject(style));
1090
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1091
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1092
+ if (r1) {
1093
+ throw takeObject(r0);
1094
+ }
1095
+ } finally {
1096
+ wasm.__wbindgen_add_to_stack_pointer(16);
1097
+ }
1098
+ }
1099
+ /**
1080
1100
  * Create a loro document from the snapshot.
1081
1101
  *
1082
1102
  * @see You can learn more [here](https://loro.dev/docs/tutorial/encoding).
@@ -6758,7 +6778,7 @@ var imports = /*#__PURE__*/Object.freeze({
6758
6778
  // Without this patch, Cloudflare Worker would raise issue like: "Uncaught TypeError: wasm2.__wbindgen_start is not a function"
6759
6779
 
6760
6780
 
6761
- import loro_wasm_bg_js from './loro_wasm_bg-ec1c7122.js';
6781
+ import loro_wasm_bg_js from './loro_wasm_bg-2fc402da.js';
6762
6782
  const instance = new WebAssembly.Instance(loro_wasm_bg_js(), {
6763
6783
  "./loro_wasm_bg.js": imports,
6764
6784
  });
@@ -1606,6 +1606,14 @@ export class LoroDoc {
1606
1606
  */
1607
1607
  configTextStyle(styles: {[key: string]: { expand: 'before'|'after'|'none'|'both' }}): void;
1608
1608
  /**
1609
+ * Configures the default text style for the document.
1610
+ *
1611
+ * This method sets the default text style configuration for the document when using LoroText.
1612
+ * If `None` is provided, the default style is reset.
1613
+ * @param {{ expand: 'before'|'after'|'none'|'both' } | undefined} style
1614
+ */
1615
+ configDefaultTextStyle(style: { expand: 'before'|'after'|'none'|'both' } | undefined): void;
1616
+ /**
1609
1617
  * Create a loro document from the snapshot.
1610
1618
  *
1611
1619
  * @see You can learn more [here](https://loro.dev/docs/tutorial/encoding).