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.
@@ -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).
@@ -1077,6 +1077,26 @@ export 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).
Binary file
@@ -39,6 +39,7 @@ export function lorodoc_isDetachedEditingEnabled(a: number): number;
39
39
  export function lorodoc_setRecordTimestamp(a: number, b: number): void;
40
40
  export function lorodoc_setChangeMergeInterval(a: number, b: number): void;
41
41
  export function lorodoc_configTextStyle(a: number, b: number, c: number): void;
42
+ export function lorodoc_configDefaultTextStyle(a: number, b: number, c: number): void;
42
43
  export function lorodoc_fromSnapshot(a: number, b: number, c: number): void;
43
44
  export function lorodoc_attach(a: number): void;
44
45
  export function lorodoc_isDetached(a: number): number;
@@ -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).
@@ -1075,6 +1075,26 @@ class LoroDoc {
1075
1075
  }
1076
1076
  }
1077
1077
  /**
1078
+ * Configures the default text style for the document.
1079
+ *
1080
+ * This method sets the default text style configuration for the document when using LoroText.
1081
+ * If `None` is provided, the default style is reset.
1082
+ * @param {{ expand: 'before'|'after'|'none'|'both' } | undefined} style
1083
+ */
1084
+ configDefaultTextStyle(style) {
1085
+ try {
1086
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1087
+ wasm.lorodoc_configDefaultTextStyle(retptr, this.__wbg_ptr, addHeapObject(style));
1088
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1089
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1090
+ if (r1) {
1091
+ throw takeObject(r0);
1092
+ }
1093
+ } finally {
1094
+ wasm.__wbindgen_add_to_stack_pointer(16);
1095
+ }
1096
+ }
1097
+ /**
1078
1098
  * Create a loro document from the snapshot.
1079
1099
  *
1080
1100
  * @see You can learn more [here](https://loro.dev/docs/tutorial/encoding).
Binary file
@@ -39,6 +39,7 @@ export function lorodoc_isDetachedEditingEnabled(a: number): number;
39
39
  export function lorodoc_setRecordTimestamp(a: number, b: number): void;
40
40
  export function lorodoc_setChangeMergeInterval(a: number, b: number): void;
41
41
  export function lorodoc_configTextStyle(a: number, b: number, c: number): void;
42
+ export function lorodoc_configDefaultTextStyle(a: number, b: number, c: number): void;
42
43
  export function lorodoc_fromSnapshot(a: number, b: number, c: number): void;
43
44
  export function lorodoc_attach(a: number): void;
44
45
  export function lorodoc_isDetached(a: number): number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loro-crdt",
3
- "version": "1.4.4",
3
+ "version": "1.4.5",
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",
@@ -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).
@@ -3738,6 +3746,7 @@ export interface InitOutput {
3738
3746
  readonly lorodoc_setRecordTimestamp: (a: number, b: number) => void;
3739
3747
  readonly lorodoc_setChangeMergeInterval: (a: number, b: number) => void;
3740
3748
  readonly lorodoc_configTextStyle: (a: number, b: number, c: number) => void;
3749
+ readonly lorodoc_configDefaultTextStyle: (a: number, b: number, c: number) => void;
3741
3750
  readonly lorodoc_fromSnapshot: (a: number, b: number, c: number) => void;
3742
3751
  readonly lorodoc_attach: (a: number) => void;
3743
3752
  readonly lorodoc_isDetached: (a: number) => number;
package/web/loro_wasm.js CHANGED
@@ -1069,6 +1069,26 @@ export class LoroDoc {
1069
1069
  }
1070
1070
  }
1071
1071
  /**
1072
+ * Configures the default text style for the document.
1073
+ *
1074
+ * This method sets the default text style configuration for the document when using LoroText.
1075
+ * If `None` is provided, the default style is reset.
1076
+ * @param {{ expand: 'before'|'after'|'none'|'both' } | undefined} style
1077
+ */
1078
+ configDefaultTextStyle(style) {
1079
+ try {
1080
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1081
+ wasm.lorodoc_configDefaultTextStyle(retptr, this.__wbg_ptr, addHeapObject(style));
1082
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1083
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1084
+ if (r1) {
1085
+ throw takeObject(r0);
1086
+ }
1087
+ } finally {
1088
+ wasm.__wbindgen_add_to_stack_pointer(16);
1089
+ }
1090
+ }
1091
+ /**
1072
1092
  * Create a loro document from the snapshot.
1073
1093
  *
1074
1094
  * @see You can learn more [here](https://loro.dev/docs/tutorial/encoding).
Binary file
@@ -39,6 +39,7 @@ export function lorodoc_isDetachedEditingEnabled(a: number): number;
39
39
  export function lorodoc_setRecordTimestamp(a: number, b: number): void;
40
40
  export function lorodoc_setChangeMergeInterval(a: number, b: number): void;
41
41
  export function lorodoc_configTextStyle(a: number, b: number, c: number): void;
42
+ export function lorodoc_configDefaultTextStyle(a: number, b: number, c: number): void;
42
43
  export function lorodoc_fromSnapshot(a: number, b: number, c: number): void;
43
44
  export function lorodoc_attach(a: number): void;
44
45
  export function lorodoc_isDetached(a: number): number;