slate-react 0.72.4-2022010232655 → 0.72.4-20220121801

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,11 +1,19 @@
1
1
  # slate-react
2
2
 
3
- ## 0.72.4-2022010232655
3
+ ## 0.72.4-20220121801
4
4
 
5
5
  ### Patch Changes
6
6
 
7
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
8
 
9
+ * [#4779](https://github.com/ianstormtaylor/slate/pull/4779) [`345b8fc9`](https://github.com/ianstormtaylor/slate/commit/345b8fc9e8f073674c006098bd843823309db2e2) Thanks [@alessiogaldy](https://github.com/alessiogaldy)! - Android editable updates
10
+
11
+ - Remove logic to delay handling of text insertion
12
+ - Call Transforms.setSelection before Editor.insertText to adjust position
13
+
14
+ - [#4786](https://github.com/ianstormtaylor/slate/pull/4786) [`67aa1f10`](https://github.com/ianstormtaylor/slate/commit/67aa1f10106e15486031b4103285c7fae4373056) Thanks [@alessiogaldy](https://github.com/alessiogaldy)! - - Restore logic to delay text insertion on android
15
+ - Always call Trasform.setSelection before calling Editor.insertText
16
+
9
17
  * [#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
18
 
11
19
  ## 0.72.2
@@ -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,OA4jB1D,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,OA6jB1D,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,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
+ {"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,CAiCjB;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"}
package/dist/index.es.js CHANGED
@@ -3205,6 +3205,7 @@ class AndroidInputManager {
3205
3205
  });
3206
3206
  this.editor.marks = null;
3207
3207
  } else {
3208
+ Transforms.setSelection(this.editor, at);
3208
3209
  Editor.insertText(this.editor, text);
3209
3210
  }
3210
3211
  });
@@ -3843,6 +3844,7 @@ var AndroidEditable = props => {
3843
3844
  });
3844
3845
  editor.marks = null;
3845
3846
  } else {
3847
+ Transforms.setSelection(editor, at);
3846
3848
  Editor.insertText(editor, text);
3847
3849
  }
3848
3850
  });