slate-react 0.72.2-2021112212944 → 0.72.4-2022010232811

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,13 +1,19 @@
1
1
  # slate-react
2
2
 
3
- ## 0.72.2-2021112212944
3
+ ## 0.72.4-2022010232811
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - [#4734](https://github.com/ianstormtaylor/slate/pull/4734) [`3c07a870`](https://github.com/ianstormtaylor/slate/commit/3c07a8706ef152fe35c5363a2316aa291c12c2f0) Thanks [@YasinChan](https://github.com/YasinChan)! - [AndroidEditor] Solve input association problems and add click events.
7
+ - [#4753](https://github.com/ianstormtaylor/slate/pull/4753) [`e9a46ad2`](https://github.com/ianstormtaylor/slate/commit/e9a46ad29e0376a45051c4a8100c5678784b785c) Thanks [@alessiogaldy](https://github.com/alessiogaldy)! - Fix "editor.insertText never gets called inside plugins on android"
8
+
9
+ * [#4755](https://github.com/ianstormtaylor/slate/pull/4755) [`8daa77e9`](https://github.com/ianstormtaylor/slate/commit/8daa77e9fab6b222ad796b420b86f3ec88999a39) Thanks [@jhurwitz](https://github.com/jhurwitz)! - fix useFocused hook
10
+
11
+ ## 0.72.2
8
12
 
9
- - Updated dependencies [[`ab62da20`](https://github.com/ianstormtaylor/slate/commit/ab62da2064921f534ce158f20cd853d2d904f6f6), [`205d4b7e`](https://github.com/ianstormtaylor/slate/commit/205d4b7e66b30ec911e8968a736593aaf2be1567), [`e5427ddd`](https://github.com/ianstormtaylor/slate/commit/e5427dddfc57b4362b7545e9971cdfb9b05d5c3d)]:
10
- - slate@0.72.2-2021112212944
13
+ ### Patch Changes
14
+
15
+ - [#4734](https://github.com/ianstormtaylor/slate/pull/4734) [`3c07a870`](https://github.com/ianstormtaylor/slate/commit/3c07a8706ef152fe35c5363a2316aa291c12c2f0) Thanks [@YasinChan](https://github.com/YasinChan)! - [AndroidEditor] Solve input association problems and add click events.
16
+ - [#4733](https://github.com/ianstormtaylor/slate/pull/4733) [`ccafb69`](https://github.com/ianstormtaylor/slate/commit/ccafb6982f56364becc8ca39ed6c1953a5febac3) Thanks [@Schipy](https://github.com/Schipy)! - Optimize TextString rendering to support browser/OS text features, e.g. fix native spellcheck.
11
17
 
12
18
  ## 0.72.1
13
19
 
@@ -1 +1 @@
1
- {"version":3,"file":"android-editable.d.ts","sourceRoot":"","sources":["../../packages/slate-react/src/components/android/android-editable.tsx"],"names":[],"mappings":";AACA,OAAO,EAAU,OAAO,EAAuC,MAAM,OAAO,CAAA;AA+B5E,OAAO,EAAE,aAAa,EAAa,MAAM,aAAa,CAAA;AAqBtD,eAAO,MAAM,eAAe,UAAW,aAAa,KAAG,GAAG,CAAC,OA8jB1D,CAAA"}
1
+ {"version":3,"file":"android-editable.d.ts","sourceRoot":"","sources":["../../packages/slate-react/src/components/android/android-editable.tsx"],"names":[],"mappings":";AACA,OAAO,EAAU,OAAO,EAAuC,MAAM,OAAO,CAAA;AA+B5E,OAAO,EAAE,aAAa,EAAa,MAAM,aAAa,CAAA;AAqBtD,eAAO,MAAM,eAAe,UAAW,aAAa,KAAG,GAAG,CAAC,OA4jB1D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"android-input-manager.d.ts","sourceRoot":"","sources":["../../packages/slate-react/src/components/android/android-input-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AA2BvD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,qBAAa,mBAAmB;IAClB,OAAO,CAAC,MAAM;IAAe,OAAO,CAAC,UAAU;gBAAvC,MAAM,EAAE,WAAW,EAAU,UAAU,EAAE,MAAM,IAAI;IAKvE;;;;OAIG;IAEH,KAAK,cAAe,cAAc,EAAE,UAYnC;IAED;;;;OAIG;IAEH,OAAO,CAAC,kBAAkB,CAkBzB;IAED;;OAEG;IAEH,OAAO,CAAC,UAAU,CAkCjB;IAED;;OAEG;IAEH,OAAO,CAAC,WAAW,CAoBlB;IAED;;OAEG;IAEH,OAAO,CAAC,wBAAwB,CAY/B;IAED;;OAEG;IAEH,OAAO,CAAC,cAAc,CAOrB;IAED;;OAEG;IACH,OAAO,CAAC,eAAe,CAWtB;CACF;AAED,eAAe,mBAAmB,CAAA"}
1
+ {"version":3,"file":"android-input-manager.d.ts","sourceRoot":"","sources":["../../packages/slate-react/src/components/android/android-input-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AA2BvD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,qBAAa,mBAAmB;IAClB,OAAO,CAAC,MAAM;IAAe,OAAO,CAAC,UAAU;gBAAvC,MAAM,EAAE,WAAW,EAAU,UAAU,EAAE,MAAM,IAAI;IAKvE;;;;OAIG;IAEH,KAAK,cAAe,cAAc,EAAE,UAYnC;IAED;;;;OAIG;IAEH,OAAO,CAAC,kBAAkB,CAkBzB;IAED;;OAEG;IAEH,OAAO,CAAC,UAAU,CAgCjB;IAED;;OAEG;IAEH,OAAO,CAAC,WAAW,CAoBlB;IAED;;OAEG;IAEH,OAAO,CAAC,wBAAwB,CAY/B;IAED;;OAEG;IAEH,OAAO,CAAC,cAAc,CAOrB;IAED;;OAEG;IACH,OAAO,CAAC,eAAe,CAWtB;CACF;AAED,eAAe,mBAAmB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"slate.d.ts","sourceRoot":"","sources":["../packages/slate-react/src/components/slate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAA;AACxE,OAAO,EAAyB,UAAU,EAAE,MAAM,OAAO,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAOpD;;;GAGG;AAEH,eAAO,MAAM,KAAK;YACR,WAAW;WACZ,UAAU,EAAE;cACT,KAAK,CAAC,SAAS;sBACP,UAAU,EAAE,KAAK,IAAI;iBA6DxC,CAAA"}
1
+ {"version":3,"file":"slate.d.ts","sourceRoot":"","sources":["../packages/slate-react/src/components/slate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAA;AACxE,OAAO,EAAyB,UAAU,EAAE,MAAM,OAAO,CAAA;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAOpD;;;GAGG;AAEH,eAAO,MAAM,KAAK;YACR,WAAW;WACZ,UAAU,EAAE;cACT,KAAK,CAAC,SAAS;sBACP,UAAU,EAAE,KAAK,IAAI;iBAqExC,CAAA"}
package/dist/index.es.js CHANGED
@@ -1604,7 +1604,7 @@ var Editable$1 = props => {
1604
1604
  distance: currentTextNode.text.length,
1605
1605
  reverse: true
1606
1606
  });
1607
- Transforms.insertText(editor, text);
1607
+ Editor.insertText(editor, text);
1608
1608
  });
1609
1609
  }
1610
1610
  }
@@ -3205,9 +3205,7 @@ class AndroidInputManager {
3205
3205
  });
3206
3206
  this.editor.marks = null;
3207
3207
  } else {
3208
- Transforms.insertText(this.editor, text, {
3209
- at
3210
- });
3208
+ Editor.insertText(this.editor, text);
3211
3209
  }
3212
3210
  });
3213
3211
  };
@@ -3845,9 +3843,7 @@ var AndroidEditable = props => {
3845
3843
  });
3846
3844
  editor.marks = null;
3847
3845
  } else {
3848
- Transforms.insertText(editor, text, {
3849
- at
3850
- });
3846
+ Editor.insertText(editor, text);
3851
3847
  }
3852
3848
  });
3853
3849
  }, RESOLVE_DELAY);
@@ -3942,13 +3938,21 @@ var Slate = props => {
3942
3938
  setIsFocused(ReactEditor.isFocused(editor));
3943
3939
  });
3944
3940
  useIsomorphicLayoutEffect(() => {
3945
- var fn = () => setIsFocused(ReactEditor.isFocused(editor));
3941
+ var fn = () => {
3942
+ setTimeout(() => {
3943
+ setIsFocused(ReactEditor.isFocused(editor));
3944
+ }, 0);
3945
+ };
3946
3946
 
3947
3947
  document.addEventListener('focus', fn, true);
3948
3948
  return () => document.removeEventListener('focus', fn, true);
3949
3949
  }, []);
3950
3950
  useIsomorphicLayoutEffect(() => {
3951
- var fn = () => setIsFocused(ReactEditor.isFocused(editor));
3951
+ var fn = () => {
3952
+ setTimeout(() => {
3953
+ setIsFocused(ReactEditor.isFocused(editor));
3954
+ }, 0);
3955
+ };
3952
3956
 
3953
3957
  document.addEventListener('blur', fn, true);
3954
3958
  return () => document.removeEventListener('blur', fn, true);