slate 0.142.1 → 0.143.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/core/get-split-properties.d.ts +4 -0
- package/dist/core/get-split-properties.d.ts.map +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/create-editor.d.ts.map +1 -1
- package/dist/index.es.js +6 -3
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +144 -133
- package/dist/index.js.map +1 -1
- package/dist/interfaces/editor.d.ts +1 -0
- package/dist/interfaces/editor.d.ts.map +1 -1
- package/dist/slate.js +144 -133
- package/dist/slate.min.js +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-split-properties.d.ts","sourceRoot":"","sources":["../../../../packages/slate/src/core/get-split-properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAQ,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AAEnD,eAAO,MAAM,kBAAkB,EAAE,kBAAkB,CACjD,MAAM,CAAC,oBAAoB,CAAC,CACe,CAAA"}
|
package/dist/core/index.d.ts
CHANGED
package/dist/core/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/slate/src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../packages/slate/src/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,wBAAwB,CAAA;AACtC,cAAc,kBAAkB,CAAA;AAChC,cAAc,oBAAoB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-editor.d.ts","sourceRoot":"","sources":["../src/create-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,MAAM,
|
|
1
|
+
{"version":3,"file":"create-editor.d.ts","sourceRoot":"","sources":["../src/create-editor.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,UAAU,EACV,MAAM,EAYP,MAAM,IAAI,CAAA;AA4EX;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,UAAU,GAAG,MAAM,OAAK,CA0G9D,CAAA"}
|
package/dist/index.es.js
CHANGED
|
@@ -2670,6 +2670,8 @@ const getFragment = editor => {
|
|
|
2670
2670
|
return [];
|
|
2671
2671
|
};
|
|
2672
2672
|
|
|
2673
|
+
const getSplitProperties = (editor, node) => Node.extractProps(node);
|
|
2674
|
+
|
|
2673
2675
|
const normalizeNode = (editor, entry, options) => {
|
|
2674
2676
|
const [node, path] = entry; // node is not yet normalized, treat as hostile
|
|
2675
2677
|
// There are no core normalizations for text nodes.
|
|
@@ -5698,7 +5700,7 @@ const splitNodes = (editor, options = {}) => {
|
|
|
5698
5700
|
const isEnd = Editor.isEnd(editor, point, path);
|
|
5699
5701
|
if (always || !beforeRef || !Editor.isEdge(editor, point, path)) {
|
|
5700
5702
|
split = true;
|
|
5701
|
-
const properties =
|
|
5703
|
+
const properties = editor.getSplitProperties(node, path);
|
|
5702
5704
|
editor.apply({
|
|
5703
5705
|
type: 'split_node',
|
|
5704
5706
|
path,
|
|
@@ -5899,7 +5901,7 @@ const wrapNodes = (editor, element, options = {}) => {
|
|
|
5899
5901
|
type: 'split_node',
|
|
5900
5902
|
path,
|
|
5901
5903
|
position,
|
|
5902
|
-
properties:
|
|
5904
|
+
properties: editor.getSplitProperties(node, path)
|
|
5903
5905
|
});
|
|
5904
5906
|
} else if (edge === 'start' ? before : after) {
|
|
5905
5907
|
const outside = edge === 'start' ? Editor.after(editor, path, {
|
|
@@ -6006,6 +6008,7 @@ const createEditor = () => {
|
|
|
6006
6008
|
normalizeNode: (...args) => normalizeNode(editor, ...args),
|
|
6007
6009
|
removeMark: (...args) => removeMark(editor, ...args),
|
|
6008
6010
|
getDirtyPaths: (...args) => getDirtyPaths(editor, ...args),
|
|
6011
|
+
getSplitProperties: (...args) => getSplitProperties(editor, ...args),
|
|
6009
6012
|
shouldNormalize: (...args) => shouldNormalize(editor, ...args),
|
|
6010
6013
|
// Editor interface
|
|
6011
6014
|
above: (...args) => above(editor, ...args),
|
|
@@ -6077,5 +6080,5 @@ const createEditor = () => {
|
|
|
6077
6080
|
return editor;
|
|
6078
6081
|
};
|
|
6079
6082
|
|
|
6080
|
-
export { Editor, Element, Location, Node, Operation, Path, PathRef, Point, PointRef, Range, RangeRef, Scrubber, Span, Text, Transforms, above, addMark, after, apply, before, collapse, createEditor, deleteBackward, deleteForward, deleteFragment, deleteText, deselect, edges, elementReadOnly, end, first, fragment, getDirtyPaths, getFragment, getVoid, hasBlocks, hasInlines, hasPath, hasRange, hasTexts, insertBreak, insertFragment, insertNode, insertNodes, insertSoftBreak, insertText, insertionPoint, isBlock, isEdge, isEditor, isEmpty, isEnd, isNormalizing, isObject, isStart, last, leaf, levels, liftNodes, marks, mergeNodes, move, moveNodes, next, node, nodes, normalize, normalizeNode, parent, path, pathRef, pathRefs, point, pointRef, pointRefs, positions, previous, range, rangeRef, rangeRefs, removeMark, removeNodes, select, setNodes, setNormalizing, setPoint, setSelection, shouldMergeNodesRemovePrevNode, shouldNormalize, splitNodes, start, string, unhangRange, unsetNodes, unwrapNodes, withoutNormalizing, word, wrapNodes };
|
|
6083
|
+
export { Editor, Element, Location, Node, Operation, Path, PathRef, Point, PointRef, Range, RangeRef, Scrubber, Span, Text, Transforms, above, addMark, after, apply, before, collapse, createEditor, deleteBackward, deleteForward, deleteFragment, deleteText, deselect, edges, elementReadOnly, end, first, fragment, getDirtyPaths, getFragment, getSplitProperties, getVoid, hasBlocks, hasInlines, hasPath, hasRange, hasTexts, insertBreak, insertFragment, insertNode, insertNodes, insertSoftBreak, insertText, insertionPoint, isBlock, isEdge, isEditor, isEmpty, isEnd, isNormalizing, isObject, isStart, last, leaf, levels, liftNodes, marks, mergeNodes, move, moveNodes, next, node, nodes, normalize, normalizeNode, parent, path, pathRef, pathRefs, point, pointRef, pointRefs, positions, previous, range, rangeRef, rangeRefs, removeMark, removeNodes, select, setNodes, setNormalizing, setPoint, setSelection, shouldMergeNodesRemovePrevNode, shouldNormalize, splitNodes, start, string, unhangRange, unsetNodes, unwrapNodes, withoutNormalizing, word, wrapNodes };
|
|
6081
6084
|
//# sourceMappingURL=index.es.js.map
|