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.
- package/dist/components/slate.d.ts.map +1 -1
- package/dist/index.es.js +6 -6
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/plugin/react-editor.d.ts +1 -1
- package/dist/plugin/react-editor.d.ts.map +1 -1
- package/dist/slate-react.js +5 -5
- package/dist/slate-react.min.js +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slate.d.ts","sourceRoot":"","sources":["../packages/slate-react/src/components/slate.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"slate.d.ts","sourceRoot":"","sources":["../packages/slate-react/src/components/slate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AACvE,OAAO,EAAgB,UAAU,EAAY,MAAM,OAAO,CAAA;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AAYpD;;;GAGG;AAEH,eAAO,MAAM,KAAK;YACR,WAAW;WACZ,UAAU,EAAE;cACT,KAAK,CAAC,SAAS;wBACN,UAAU,EAAE,KAAK,IAAI;iBAqFzC,CAAA"}
|
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useLayoutEffect, useEffect, useRef, useState, Fragment, useContext, createContext, useMemo, useCallback, useReducer } from 'react';
|
|
2
|
-
import { Path, Node, Editor, Text as Text$1, Range, Element as Element$1, Transforms } from 'slate';
|
|
2
|
+
import { Path, Node, Editor, Text as Text$1, Range, Element as Element$1, Transforms, Scrubber } from 'slate';
|
|
3
3
|
import getDirection from 'direction';
|
|
4
4
|
import debounce from 'lodash/debounce';
|
|
5
5
|
import throttle from 'lodash/throttle';
|
|
@@ -2571,7 +2571,7 @@ var ReactEditor = {
|
|
|
2571
2571
|
child = parent;
|
|
2572
2572
|
}
|
|
2573
2573
|
|
|
2574
|
-
throw new Error("Unable to find the path for Slate node: ".concat(
|
|
2574
|
+
throw new Error("Unable to find the path for Slate node: ".concat(Scrubber.stringify(node)));
|
|
2575
2575
|
},
|
|
2576
2576
|
|
|
2577
2577
|
/**
|
|
@@ -2717,7 +2717,7 @@ var ReactEditor = {
|
|
|
2717
2717
|
var domNode = 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));
|
|
2718
2718
|
|
|
2719
2719
|
if (!domNode) {
|
|
2720
|
-
throw new Error("Cannot resolve a DOM node from Slate node: ".concat(
|
|
2720
|
+
throw new Error("Cannot resolve a DOM node from Slate node: ".concat(Scrubber.stringify(node)));
|
|
2721
2721
|
}
|
|
2722
2722
|
|
|
2723
2723
|
return domNode;
|
|
@@ -2772,7 +2772,7 @@ var ReactEditor = {
|
|
|
2772
2772
|
}
|
|
2773
2773
|
|
|
2774
2774
|
if (!domPoint) {
|
|
2775
|
-
throw new Error("Cannot resolve a DOM point from Slate point: ".concat(
|
|
2775
|
+
throw new Error("Cannot resolve a DOM point from Slate point: ".concat(Scrubber.stringify(point)));
|
|
2776
2776
|
}
|
|
2777
2777
|
|
|
2778
2778
|
return domPoint;
|
|
@@ -4118,11 +4118,11 @@ var Slate = props => {
|
|
|
4118
4118
|
var unmountRef = useRef(false);
|
|
4119
4119
|
var [context, setContext] = React.useState(() => {
|
|
4120
4120
|
if (!Node.isNodeList(value)) {
|
|
4121
|
-
throw new Error("[Slate] value is invalid! Expected a list of elements" + "but got: ".concat(
|
|
4121
|
+
throw new Error("[Slate] value is invalid! Expected a list of elements" + "but got: ".concat(Scrubber.stringify(value)));
|
|
4122
4122
|
}
|
|
4123
4123
|
|
|
4124
4124
|
if (!Editor.isEditor(editor)) {
|
|
4125
|
-
throw new Error("[Slate] editor is invalid! you passed:" + "".concat(
|
|
4125
|
+
throw new Error("[Slate] editor is invalid! you passed:" + "".concat(Scrubber.stringify(editor)));
|
|
4126
4126
|
}
|
|
4127
4127
|
|
|
4128
4128
|
editor.children = value;
|