slate 0.72.4-20220620225 → 0.72.8

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,10 +1,10 @@
1
1
  # slate
2
2
 
3
- ## 0.72.4-20220620225
3
+ ## 0.72.8
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - [#4769](https://github.com/ianstormtaylor/slate/pull/4769) [`0ca31e74`](https://github.com/ianstormtaylor/slate/commit/0ca31e74985cc15e81f941a34c00c10b88f2ca76) Thanks [@jameshfisher](https://github.com/jameshfisher)! - Warn when normalization removes node
7
+ - [#4804](https://github.com/ianstormtaylor/slate/pull/4804) [`03861afc`](https://github.com/ianstormtaylor/slate/commit/03861afc62c3b27339d20151ca8a3e52f51ff973) Thanks [@suilang](https://github.com/suilang)! - update insertText logic when selection is not collapsed
8
8
 
9
9
  ## 0.72.3
10
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"create-editor.d.ts","sourceRoot":"","sources":["packages/slate/src/create-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAYP,MAAM,IAAI,CAAA;AAGX;;GAEG;AAEH,eAAO,MAAM,YAAY,QAAO,MA2R/B,CAAA"}
1
+ {"version":3,"file":"create-editor.d.ts","sourceRoot":"","sources":["packages/slate/src/create-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EAYP,MAAM,IAAI,CAAA;AAGX;;GAEG;AAEH,eAAO,MAAM,YAAY,QAAO,MAmR/B,CAAA"}
package/dist/index.es.js CHANGED
@@ -246,8 +246,6 @@ var createEditor = () => {
246
246
  // text.
247
247
 
248
248
  if (isInlineOrText !== shouldHaveInlines) {
249
- // eslint-disable-next-line no-console
250
- console.warn("Removing ".concat(isInlineOrText ? 'inline' : 'block', " node at path ").concat(path.concat(n), " because parent expects ").concat(shouldHaveInlines ? 'inline' : 'block', " children"));
251
249
  Transforms.removeNodes(editor, {
252
250
  at: path.concat(n),
253
251
  voids: true
@@ -2107,7 +2105,7 @@ var Editor = {
2107
2105
  match: n => Editor.isBlock(editor, n)
2108
2106
  });
2109
2107
  var blockPath = endBlock ? endBlock[1] : [];
2110
- var first = Editor.start(editor, []);
2108
+ var first = Editor.start(editor, start);
2111
2109
  var before = {
2112
2110
  anchor: first,
2113
2111
  focus: end
@@ -5849,7 +5847,8 @@ var TextTransforms = {
5849
5847
  return;
5850
5848
  }
5851
5849
 
5852
- var pointRef = Editor.pointRef(editor, end);
5850
+ var start = Range.start(at);
5851
+ var pointRef = Editor.pointRef(editor, start);
5853
5852
  Transforms.delete(editor, {
5854
5853
  at,
5855
5854
  voids