slate-react 0.80.0-202242523622 → 0.81.0

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,4 +1,4 @@
1
- import { Node, Path, Point, Range, BaseEditor } from 'slate';
1
+ import { BaseEditor, Node, Path, Point, Range } from 'slate';
2
2
  import { Key } from '../utils/key';
3
3
  import { DOMNode, DOMPoint, DOMRange, DOMSelection, DOMStaticRange } from '../utils/dom';
4
4
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"react-editor.d.ts","sourceRoot":"","sources":["../packages/slate-react/src/plugin/react-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAc,UAAU,EAAE,MAAM,OAAO,CAAA;AAEhF,OAAO,EAAE,GAAG,EAAE,MAAM,cAAc,CAAA;AAalC,OAAO,EAEL,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,YAAY,EACZ,cAAc,EAKf,MAAM,cAAc,CAAA;AAGrB;;GAEG;AAEH,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,UAAU,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAA;IACxC,kBAAkB,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAA;IACnD,cAAc,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAA;IAC/C,eAAe,EAAE,CACf,IAAI,EAAE,YAAY,EAClB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,KAClC,IAAI,CAAA;IACT,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,KAAK,OAAO,CAAA;CACzD;AAED,eAAO,MAAM,WAAW;IACtB;;OAEG;wBAEiB,WAAW,GAAG,OAAO;IAIzC;;OAEG;sBAEe,WAAW,GAAG,MAAM;IAQtC;;OAEG;oBAEa,WAAW,QAAQ,IAAI,GAAG,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;;OAEG;2BAEoB,WAAW,QAAQ,YAAY,GAAG,OAAO;IAIhE;;OAEG;4BAGO,WAAW,QACb,YAAY,sDAEjB,IAAI;IAIP;;OAEG;sBAEe,WAAW,QAAQ,IAAI,GAAG,WAAW;IAevD;;OAEG;uBAEgB,WAAW,SAAS,KAAK;IAkD5C;;;;;;;OAOG;uBAEgB,WAAW,SAAS,KAAK,GAAG,QAAQ;IA8BvD;;OAEG;wBAEiB,WAAW,WAAW,OAAO,GAAG,IAAI;IAgBxD;;OAEG;2BAEoB,WAAW,SAAS,GAAG,GAAG,KAAK;IAiEtD;;OAEG;4CAGO,WAAW;;;;IAmHrB;;OAEG;8CAGO,WAAW,YACT,QAAQ,GAAG,cAAc,GAAG,YAAY;;;;;;qBAyFnC,WAAW,SAAS,KAAK,GAAG,OAAO;CAMrD,CAAA"}
@@ -3738,7 +3738,7 @@
3738
3738
  child = parent;
3739
3739
  }
3740
3740
 
3741
- throw new Error("Unable to find the path for Slate node: ".concat(JSON.stringify(node)));
3741
+ throw new Error("Unable to find the path for Slate node: ".concat(slate.Scrubber.stringify(node)));
3742
3742
  },
3743
3743
 
3744
3744
  /**
@@ -3881,7 +3881,7 @@
3881
3881
  var domNode = slate.Editor.isEditor(node) ? EDITOR_TO_ELEMENT.get(editor) : KEY_TO_ELEMENT === null || KEY_TO_ELEMENT === void 0 ? void 0 : KEY_TO_ELEMENT.get(ReactEditor.findKey(editor, node));
3882
3882
 
3883
3883
  if (!domNode) {
3884
- throw new Error("Cannot resolve a DOM node from Slate node: ".concat(JSON.stringify(node)));
3884
+ throw new Error("Cannot resolve a DOM node from Slate node: ".concat(slate.Scrubber.stringify(node)));
3885
3885
  }
3886
3886
 
3887
3887
  return domNode;
@@ -3938,7 +3938,7 @@
3938
3938
  }
3939
3939
 
3940
3940
  if (!domPoint) {
3941
- throw new Error("Cannot resolve a DOM point from Slate point: ".concat(JSON.stringify(point)));
3941
+ throw new Error("Cannot resolve a DOM point from Slate point: ".concat(slate.Scrubber.stringify(point)));
3942
3942
  }
3943
3943
 
3944
3944
  return domPoint;
@@ -5309,11 +5309,11 @@
5309
5309
 
5310
5310
  var _React$useState = React__default['default'].useState(function () {
5311
5311
  if (!slate.Node.isNodeList(value)) {
5312
- throw new Error("[Slate] value is invalid! Expected a list of elements" + "but got: ".concat(JSON.stringify(value)));
5312
+ throw new Error("[Slate] value is invalid! Expected a list of elements" + "but got: ".concat(slate.Scrubber.stringify(value)));
5313
5313
  }
5314
5314
 
5315
5315
  if (!slate.Editor.isEditor(editor)) {
5316
- throw new Error("[Slate] editor is invalid! you passed:" + "".concat(JSON.stringify(editor)));
5316
+ throw new Error("[Slate] editor is invalid! you passed:" + "".concat(slate.Scrubber.stringify(editor)));
5317
5317
  }
5318
5318
 
5319
5319
  editor.children = value;