slate 0.145.2-20261018015657 → 0.146.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/index.es.js +7 -0
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +32 -14
- package/dist/index.js.map +1 -1
- package/dist/interfaces/node.d.ts +1 -0
- package/dist/interfaces/node.d.ts.map +1 -1
- package/dist/slate.js +32 -14
- package/dist/slate.min.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -735,6 +735,13 @@ const Node = {
|
|
|
735
735
|
}
|
|
736
736
|
return newRoot.children;
|
|
737
737
|
},
|
|
738
|
+
findPath(root, node) {
|
|
739
|
+
for (const [descendant, path] of Node.nodes(root)) {
|
|
740
|
+
if (descendant === node) {
|
|
741
|
+
return path;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
},
|
|
738
745
|
get(root, path) {
|
|
739
746
|
const node = Node.getIf(root, path);
|
|
740
747
|
if (node === undefined) {
|