slate 0.77.2 → 0.80.0-20224713209

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.
@@ -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,MAuR/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;AAIX;;GAEG;AAEH,eAAO,MAAM,YAAY,QAAO,MAuR/B,CAAA"}
package/dist/index.es.js CHANGED
@@ -5882,12 +5882,16 @@ var TextTransforms = {
5882
5882
  return;
5883
5883
  }
5884
5884
 
5885
- var pointRef = Editor.pointRef(editor, end);
5885
+ var start = Range.start(at);
5886
+ var startRef = Editor.pointRef(editor, start);
5887
+ var endRef = Editor.pointRef(editor, end);
5886
5888
  Transforms.delete(editor, {
5887
5889
  at,
5888
5890
  voids
5889
5891
  });
5890
- at = pointRef.unref();
5892
+ var startPoint = startRef.unref();
5893
+ var endPoint = endRef.unref();
5894
+ at = startPoint || endPoint;
5891
5895
  Transforms.setSelection(editor, {
5892
5896
  anchor: at,
5893
5897
  focus: at