slate-vue3 0.0.39 → 0.0.41

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.
Files changed (169) hide show
  1. package/README.md +4 -12
  2. package/dist/dom.js +4 -4
  3. package/dist/{hotkeys-1OnMQ7H6.js → hotkeys-DpsWjIJe.js} +1 -1
  4. package/dist/index.js +6 -18
  5. package/dist/share-tools/index.d.ts +22 -0
  6. package/dist/slate/core/apply.d.ts +3 -0
  7. package/dist/slate/core/batch-dirty-paths.d.ts +3 -0
  8. package/dist/slate/core/get-dirty-paths.d.ts +6 -0
  9. package/dist/slate/core/get-fragment.d.ts +3 -0
  10. package/dist/slate/core/index.d.ts +5 -0
  11. package/dist/slate/core/normalize-node.d.ts +3 -0
  12. package/dist/slate/core/should-normalize.d.ts +3 -0
  13. package/dist/slate/core/update-dirty-paths.d.ts +9 -0
  14. package/dist/slate/create-editor.d.ts +5 -0
  15. package/dist/slate/editor/above.d.ts +2 -0
  16. package/dist/slate/editor/add-mark.d.ts +2 -0
  17. package/dist/slate/editor/after.d.ts +2 -0
  18. package/dist/slate/editor/before.d.ts +2 -0
  19. package/dist/slate/editor/delete-backward.d.ts +3 -0
  20. package/dist/slate/editor/delete-forward.d.ts +3 -0
  21. package/dist/slate/editor/delete-fragment.d.ts +2 -0
  22. package/dist/slate/editor/edges.d.ts +2 -0
  23. package/dist/slate/editor/element-read-only.d.ts +2 -0
  24. package/dist/slate/editor/end.d.ts +2 -0
  25. package/dist/slate/editor/first.d.ts +2 -0
  26. package/dist/slate/editor/fragment.d.ts +2 -0
  27. package/dist/slate/editor/get-void.d.ts +2 -0
  28. package/dist/slate/editor/has-blocks.d.ts +2 -0
  29. package/dist/slate/editor/has-inlines.d.ts +2 -0
  30. package/dist/slate/editor/has-path.d.ts +2 -0
  31. package/dist/slate/editor/has-texts.d.ts +2 -0
  32. package/dist/slate/editor/index.d.ts +55 -0
  33. package/dist/slate/editor/insert-break.d.ts +2 -0
  34. package/dist/slate/editor/insert-node.d.ts +2 -0
  35. package/dist/slate/editor/insert-soft-break.d.ts +2 -0
  36. package/dist/slate/editor/insert-text.d.ts +2 -0
  37. package/dist/slate/editor/is-block.d.ts +2 -0
  38. package/dist/slate/editor/is-edge.d.ts +2 -0
  39. package/dist/slate/editor/is-editor.d.ts +2 -0
  40. package/dist/slate/editor/is-empty.d.ts +2 -0
  41. package/dist/slate/editor/is-end.d.ts +2 -0
  42. package/dist/slate/editor/is-normalizing.d.ts +2 -0
  43. package/dist/slate/editor/is-start.d.ts +2 -0
  44. package/dist/slate/editor/last.d.ts +2 -0
  45. package/dist/slate/editor/leaf.d.ts +2 -0
  46. package/dist/slate/editor/levels.d.ts +3 -0
  47. package/dist/slate/editor/marks.d.ts +2 -0
  48. package/dist/slate/editor/next.d.ts +2 -0
  49. package/dist/slate/editor/node.d.ts +2 -0
  50. package/dist/slate/editor/nodes.d.ts +3 -0
  51. package/dist/slate/editor/normalize.d.ts +2 -0
  52. package/dist/slate/editor/parent.d.ts +2 -0
  53. package/dist/slate/editor/path-ref.d.ts +2 -0
  54. package/dist/slate/editor/path-refs.d.ts +2 -0
  55. package/dist/slate/editor/path.d.ts +2 -0
  56. package/dist/slate/editor/point-ref.d.ts +2 -0
  57. package/dist/slate/editor/point-refs.d.ts +2 -0
  58. package/dist/slate/editor/point.d.ts +2 -0
  59. package/dist/slate/editor/positions.d.ts +3 -0
  60. package/dist/slate/editor/previous.d.ts +2 -0
  61. package/dist/slate/editor/range-ref.d.ts +2 -0
  62. package/dist/slate/editor/range-refs.d.ts +2 -0
  63. package/dist/slate/editor/range.d.ts +2 -0
  64. package/dist/slate/editor/remove-mark.d.ts +2 -0
  65. package/dist/slate/editor/set-normalizing.d.ts +2 -0
  66. package/dist/slate/editor/should-merge-nodes-remove-prev-node.d.ts +2 -0
  67. package/dist/slate/editor/start.d.ts +2 -0
  68. package/dist/slate/editor/string.d.ts +2 -0
  69. package/dist/slate/editor/unhang-range.d.ts +2 -0
  70. package/dist/slate/editor/without-normalizing.d.ts +2 -0
  71. package/dist/slate/index.d.ts +21 -0
  72. package/dist/slate/interfaces/editor.d.ts +502 -0
  73. package/dist/slate/interfaces/element.d.ts +46 -0
  74. package/dist/slate/interfaces/index.d.ts +14 -0
  75. package/dist/slate/interfaces/location.d.ts +29 -0
  76. package/dist/slate/interfaces/node.d.ts +177 -0
  77. package/dist/slate/interfaces/operation.d.ts +107 -0
  78. package/dist/slate/interfaces/path-ref.d.ts +18 -0
  79. package/dist/slate/interfaces/path.d.ts +132 -0
  80. package/dist/slate/interfaces/point-ref.d.ts +19 -0
  81. package/dist/slate/interfaces/point.d.ts +49 -0
  82. package/dist/slate/interfaces/range-ref.d.ts +18 -0
  83. package/dist/slate/interfaces/range.d.ts +84 -0
  84. package/dist/slate/interfaces/scrubber.d.ts +21 -0
  85. package/dist/slate/interfaces/text.d.ts +54 -0
  86. package/dist/slate/interfaces/transforms/general.d.ts +8 -0
  87. package/dist/slate/interfaces/transforms/index.d.ts +5 -0
  88. package/dist/slate/interfaces/transforms/node.d.ts +118 -0
  89. package/dist/slate/interfaces/transforms/selection.d.ts +41 -0
  90. package/dist/slate/interfaces/transforms/text.d.ts +37 -0
  91. package/dist/slate/transforms-node/index.d.ts +10 -0
  92. package/dist/slate/transforms-node/insert-nodes.d.ts +2 -0
  93. package/dist/slate/transforms-node/lift-nodes.d.ts +2 -0
  94. package/dist/slate/transforms-node/merge-nodes.d.ts +2 -0
  95. package/dist/slate/transforms-node/move-nodes.d.ts +2 -0
  96. package/dist/slate/transforms-node/remove-nodes.d.ts +2 -0
  97. package/dist/slate/transforms-node/set-nodes.d.ts +2 -0
  98. package/dist/slate/transforms-node/split-nodes.d.ts +2 -0
  99. package/dist/slate/transforms-node/unset-nodes.d.ts +2 -0
  100. package/dist/slate/transforms-node/unwrap-nodes.d.ts +2 -0
  101. package/dist/slate/transforms-node/wrap-nodes.d.ts +2 -0
  102. package/dist/slate/transforms-selection/collapse.d.ts +2 -0
  103. package/dist/slate/transforms-selection/deselect.d.ts +2 -0
  104. package/dist/slate/transforms-selection/index.d.ts +6 -0
  105. package/dist/slate/transforms-selection/move.d.ts +2 -0
  106. package/dist/slate/transforms-selection/select.d.ts +2 -0
  107. package/dist/slate/transforms-selection/set-point.d.ts +2 -0
  108. package/dist/slate/transforms-selection/set-selection.d.ts +2 -0
  109. package/dist/slate/transforms-text/delete-text.d.ts +2 -0
  110. package/dist/slate/transforms-text/index.d.ts +2 -0
  111. package/dist/slate/transforms-text/insert-fragment.d.ts +2 -0
  112. package/dist/slate/types/custom-types.d.ts +9 -0
  113. package/dist/slate/types/index.d.ts +2 -0
  114. package/dist/slate/types/types.d.ts +10 -0
  115. package/dist/slate/utils/deep-equal.d.ts +1 -0
  116. package/dist/slate/utils/get-default-insert-location.d.ts +8 -0
  117. package/dist/slate/utils/index.d.ts +6 -0
  118. package/dist/slate/utils/match-path.d.ts +4 -0
  119. package/dist/slate/utils/string.d.ts +17 -0
  120. package/dist/slate/utils/types.d.ts +4 -0
  121. package/dist/slate/utils/weak-maps.d.ts +9 -0
  122. package/dist/slate-dom/custom-types.d.ts +35 -0
  123. package/dist/slate-dom/index.d.ts +11 -0
  124. package/dist/slate-dom/plugin/dom-editor.d.ts +148 -0
  125. package/dist/slate-dom/plugin/with-dom.d.ts +11 -0
  126. package/dist/slate-dom/utils/diff-text.d.ts +16 -0
  127. package/dist/slate-dom/utils/dom.d.ts +94 -0
  128. package/dist/slate-dom/utils/environment.d.ts +15 -0
  129. package/dist/slate-dom/utils/hotkeys.d.ts +29 -0
  130. package/dist/slate-dom/utils/key.d.ts +11 -0
  131. package/dist/slate-dom/utils/lines.d.ts +11 -0
  132. package/dist/slate-dom/utils/range-list.d.ts +22 -0
  133. package/dist/slate-dom/utils/types.d.ts +1 -0
  134. package/dist/slate-dom/utils/weak-maps.d.ts +42 -0
  135. package/dist/slate-history/history-editor.d.ts +67 -0
  136. package/dist/slate-history/history.d.ts +20 -0
  137. package/dist/slate-history/index.d.ts +3 -0
  138. package/dist/slate-history/with-history.d.ts +12 -0
  139. package/dist/slate-hyperscript/creators.d.ts +50 -0
  140. package/dist/slate-hyperscript/hyperscript.d.ts +33 -0
  141. package/dist/slate-hyperscript/index.d.ts +18 -0
  142. package/dist/slate-hyperscript/tokens.d.ts +44 -0
  143. package/dist/slate-vue/components/children.d.ts +3 -0
  144. package/dist/slate-vue/components/editable.d.ts +360 -0
  145. package/dist/slate-vue/components/element.d.ts +8 -0
  146. package/dist/slate-vue/components/placeholder.d.ts +10 -0
  147. package/dist/slate-vue/components/slate.d.ts +25 -0
  148. package/dist/slate-vue/components/string.d.ts +14 -0
  149. package/dist/slate-vue/components/text.d.ts +10 -0
  150. package/dist/slate-vue/components/utils.d.ts +24 -0
  151. package/dist/slate-vue/hooks/use-android-manager.d.ts +5 -0
  152. package/dist/slate-vue/hooks/use-composing.d.ts +5 -0
  153. package/dist/slate-vue/hooks/use-decorate.d.ts +5 -0
  154. package/dist/slate-vue/hooks/use-editor.d.ts +5 -0
  155. package/dist/slate-vue/hooks/use-focused.d.ts +5 -0
  156. package/dist/slate-vue/hooks/use-inherit-ref.d.ts +4 -0
  157. package/dist/slate-vue/hooks/use-read-only.d.ts +5 -0
  158. package/dist/slate-vue/hooks/use-render.d.ts +8 -0
  159. package/dist/slate-vue/hooks/use-selected.d.ts +5 -0
  160. package/dist/slate-vue/hooks/use-selection.d.ts +7 -0
  161. package/dist/slate-vue/index.d.ts +12 -0
  162. package/dist/slate-vue/utils/constants.d.ts +13 -0
  163. package/dist/slate-vue/utils/interface.d.ts +37 -0
  164. package/package.json +6 -6
  165. package/dist/core.d.ts +0 -1821
  166. package/dist/dom.d.ts +0 -2021
  167. package/dist/history.d.ts +0 -1742
  168. package/dist/hyperscript.d.ts +0 -1753
  169. package/dist/index.d.ts +0 -2258
package/README.md CHANGED
@@ -33,8 +33,11 @@ npm install slate-vue3
33
33
  ## 2. Now, you can use it in vue-sfc :point_right: [**live demo**](https://guan-erjia.github.io/slate-vue3/)
34
34
  ```vue
35
35
  <script setup lang="ts">
36
- import { withDOM, Slate, Editable, defaultRenderLeaf, defaultRenderPlaceHolder, createEditor, withHistory } from "slate-vue3"
37
36
  import { h } from "vue"
37
+ import { Slate, Editable, defaultRenderLeaf, defaultRenderPlaceHolder } from "slate-vue3"
38
+ import { createEditor } from "slate-vue3/core"
39
+ import { withDOM } from "slate-vue3/dom"
40
+ import { withHistory } from "slate-vue3/history"
38
41
 
39
42
  const initialValue = [
40
43
  {
@@ -260,17 +263,6 @@ Vue uses lazy updates, rendering with components generates additional state, whi
260
263
  3. packages/slate/src/interfaces/range.ts 224:224
261
264
  4. packages/slate/src/interfaces/transforms/general.ts 322:333
262
265
 
263
- **rewrite implement for WeakMap**
264
-
265
- 1. packages/share-tools/index.ts
266
- 2. packages/slate-dom/src/utils/weak-maps.ts
267
-
268
- **import types from globalThis in slate-dom**
269
-
270
- 1. packages/slate-dom/src/index.ts
271
- 2. packages/slate-dom/src/plugin/dom-editor.ts
272
- 3. packages/slate-dom/src/utils/dom.ts
273
-
274
266
  **other compact**
275
267
 
276
268
  1. packages/slate/src/core/normalize-node.ts
package/dist/dom.js CHANGED
@@ -1,6 +1,6 @@
1
- import { D as DOMEditor, E as EDITOR_TO_KEY_TO_ELEMENT, a as EDITOR_TO_USER_MARKS, b as EDITOR_TO_USER_SELECTION, N as NODE_TO_KEY, i as isDOMText, g as getPlainText, c as getSlateFragmentAttribute, d as EDITOR_TO_ON_CHANGE, P as PLACEHOLDER_SYMBOL } from "./hotkeys-1OnMQ7H6.js";
2
- import { C, F, G, J, H, B, I, u, L, v, w, M, x, O, z, y, A, K, Q, R, S, T, e, f, h, j, k, l, m, o, p, q, r, s, t, n } from "./hotkeys-1OnMQ7H6.js";
3
- import { E as Editor, R as Range, t as toRawWeakMap, a as Element, c as Transforms, P as Path, N as Node } from "./batch-dirty-paths-CZqHWmdq.js";
1
+ import { D as DOMEditor, E as EDITOR_TO_KEY_TO_ELEMENT, a as EDITOR_TO_USER_MARKS, b as EDITOR_TO_USER_SELECTION, N as NODE_TO_KEY, i as isDOMText, g as getPlainText, c as getSlateFragmentAttribute, d as EDITOR_TO_ON_CHANGE, P as PLACEHOLDER_SYMBOL } from "./hotkeys-DpsWjIJe.js";
2
+ import { C, F, G, J, H, B, I, u, L, v, w, M, x, O, z, y, A, K, Q, R, S, T, e, f, h, j, k, l, m, o, p, q, r, s, t, n } from "./hotkeys-DpsWjIJe.js";
3
+ import { E as Editor, R as Range, a as Element, c as Transforms, P as Path, N as Node } from "./batch-dirty-paths-CZqHWmdq.js";
4
4
  import "vue";
5
5
  const doRectsIntersect = (rect, compareRect) => {
6
6
  const middle = (compareRect.top + compareRect.bottom) / 2;
@@ -48,7 +48,7 @@ const findCurrentLineRange = (editor, parentRange) => {
48
48
  const withDOM = (editor, clipboardFormatKey = "x-slate-fragment") => {
49
49
  const e2 = editor;
50
50
  const { apply, onChange, deleteBackward, addMark, removeMark } = e2;
51
- EDITOR_TO_KEY_TO_ELEMENT.set(e2, new toRawWeakMap());
51
+ EDITOR_TO_KEY_TO_ELEMENT.set(e2, /* @__PURE__ */ new WeakMap());
52
52
  e2.addMark = (key, value) => {
53
53
  EDITOR_TO_USER_MARKS.delete(e2);
54
54
  addMark(key, value);
@@ -118,7 +118,7 @@ const getSelection = (root) => {
118
118
  };
119
119
  const isTrackedMutation = (editor, mutation, batch) => {
120
120
  const { target } = mutation;
121
- if (isDOMElement(target) && target.matches('[contentEditable="false"]')) {
121
+ if (isDOMElement(target) && target.matches('[contenteditable="false"]')) {
122
122
  return false;
123
123
  }
124
124
  const { document: document2 } = DOMEditor.getWindow(editor);
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { defineComponent, provide, ref, computed, onMounted, onUnmounted, renderSlot, inject, h, watch, renderList, Fragment, useAttrs, reactive } from "vue";
2
2
  import { e as isObjectLike, f as baseGetTag, g as Symbol$1, h as isArray, j as defineProperty, M as MapCache, k as isArguments, l as arrayPush, m as getPrototype, n as copyObject, o as getAllKeysIn, p as baseClone, N as Node, S as Scrubber, P as Path, E as Editor, R as Range, T as Text, a as Element, c as Transforms } from "./batch-dirty-paths-CZqHWmdq.js";
3
- import { D as DOMEditor, d as EDITOR_TO_ON_CHANGE, Q as MARK_PLACEHOLDER_SYMBOL, I as IS_ANDROID, x as IS_IOS, E as EDITOR_TO_KEY_TO_ELEMENT, J as ELEMENT_TO_NODE, R as NODE_TO_ELEMENT, S as NODE_TO_INDEX, T as NODE_TO_PARENT, p as isDOMNode, y as IS_WEBKIT, e as applyStringDiff, q as isDOMSelection, n as normalizeStringDiff, O as IS_READ_ONLY, h as getDefaultView, G as EDITOR_TO_WINDOW, F as EDITOR_TO_ELEMENT, H as HAS_BEFORE_INPUT_SUPPORT, C as CAN_USE_DOM, f as getActiveElement, j as getSelection, M as IS_FOCUSED, b as EDITOR_TO_USER_SELECTION, L as IS_COMPOSING, o as isDOMElement, w as IS_FIREFOX_LEGACY, A as IS_WECHATBROWSER, z as IS_UC_MOBILE, a as EDITOR_TO_USER_MARKS, v as IS_FIREFOX, B as Hotkeys, u as IS_CHROME, r as isPlainTextOnlyPaste } from "./hotkeys-1OnMQ7H6.js";
3
+ import { D as DOMEditor, d as EDITOR_TO_ON_CHANGE, Q as MARK_PLACEHOLDER_SYMBOL, I as IS_ANDROID, x as IS_IOS, E as EDITOR_TO_KEY_TO_ELEMENT, J as ELEMENT_TO_NODE, R as NODE_TO_ELEMENT, S as NODE_TO_INDEX, T as NODE_TO_PARENT, p as isDOMNode, y as IS_WEBKIT, e as applyStringDiff, q as isDOMSelection, n as normalizeStringDiff, O as IS_READ_ONLY, h as getDefaultView, G as EDITOR_TO_WINDOW, F as EDITOR_TO_ELEMENT, H as HAS_BEFORE_INPUT_SUPPORT, C as CAN_USE_DOM, f as getActiveElement, j as getSelection, M as IS_FOCUSED, b as EDITOR_TO_USER_SELECTION, L as IS_COMPOSING, o as isDOMElement, w as IS_FIREFOX_LEGACY, A as IS_WECHATBROWSER, z as IS_UC_MOBILE, a as EDITOR_TO_USER_MARKS, v as IS_FIREFOX, B as Hotkeys, u as IS_CHROME, r as isPlainTextOnlyPaste } from "./hotkeys-DpsWjIJe.js";
4
4
  const SLATE_USE_EDITOR = Symbol("SLATE_USE_EDITOR");
5
5
  const SLATE_USE_DECORATE = Symbol("SLATE_USE_DECORATE");
6
6
  const SLATE_USE_SELECTED = Symbol("SLATE_USE_SELECTED");
@@ -568,25 +568,13 @@ const ElementComp = defineComponent({
568
568
  setup(props) {
569
569
  const element = props.element;
570
570
  const editor = useEditor();
571
- const selection = computed(() => {
571
+ const selected = computed(() => {
572
572
  const path = DOMEditor.findPath(editor, element);
573
- const elemList = [[element, path]];
574
- let parent2 = Editor.parent(editor, path);
575
- while (parent2[1].length) {
576
- elemList.unshift(parent2);
577
- parent2 = Editor.parent(editor, parent2[1]);
578
- }
579
- let sel = editor.selection;
580
- for (const item of elemList) {
581
- if (sel) {
582
- sel = Range.intersection(Editor.range(editor, item[1]), sel);
583
- } else {
584
- break;
585
- }
573
+ if (!editor.selection) {
574
+ return false;
586
575
  }
587
- return sel;
576
+ return !!Range.intersection(Editor.range(editor, path), editor.selection);
588
577
  });
589
- const selected = computed(() => !!selection.value);
590
578
  provide(SLATE_USE_SELECTED, selected);
591
579
  const elementRef = ref(null);
592
580
  onMounted(() => {
@@ -1284,7 +1272,7 @@ const Editable = defineComponent({
1284
1272
  const slateRange = DOMEditor.toSlateRange(editor, domSelection, {
1285
1273
  exactMatch: true,
1286
1274
  // domSelection is not necessarily a valid Slate range
1287
- // (e.g. when clicking on contentEditable:false element)
1275
+ // (e.g. when clicking on contenteditable:false element)
1288
1276
  suppressThrow: true
1289
1277
  });
1290
1278
  if (slateRange && Range.equals(slateRange, editor.selection)) {
@@ -0,0 +1,22 @@
1
+ export declare function isPlainObject(o: any): boolean;
2
+ export declare class toRawWeakMap<K extends WeakKey, V> extends WeakMap {
3
+ constructor();
4
+ /**
5
+ * Removes the specified element from the toRawWeakMap.
6
+ * @returns true if the element was successfully removed, or false if it was not present.
7
+ */
8
+ delete(key: K): boolean;
9
+ /**
10
+ * @returns a specified element.
11
+ */
12
+ get(key: K): any;
13
+ /**
14
+ * @returns a boolean indicating whether an element with the specified key exists or not.
15
+ */
16
+ has(key: K): boolean;
17
+ /**
18
+ * Adds a new element with a specified key and value.
19
+ * @param key Must be an object or symbol.
20
+ */
21
+ set(key: K, value: V): this;
22
+ }
@@ -0,0 +1,3 @@
1
+ import { WithEditorFirstArg } from '../utils/types';
2
+ import { Editor } from '../interfaces/editor';
3
+ export declare const apply: WithEditorFirstArg<Editor['apply']>;
@@ -0,0 +1,3 @@
1
+ import { Editor } from '../interfaces/editor';
2
+ export declare const isBatchingDirtyPaths: (editor: Editor) => any;
3
+ export declare const batchDirtyPaths: (editor: Editor, fn: () => void, update: () => void) => void;
@@ -0,0 +1,6 @@
1
+ import { WithEditorFirstArg } from '../utils/types';
2
+ import { Editor } from '../interfaces/editor';
3
+ /**
4
+ * Get the "dirty" paths generated from an operation.
5
+ */
6
+ export declare const getDirtyPaths: WithEditorFirstArg<Editor['getDirtyPaths']>;
@@ -0,0 +1,3 @@
1
+ import { Editor } from '../interfaces';
2
+ import { WithEditorFirstArg } from '../utils';
3
+ export declare const getFragment: WithEditorFirstArg<Editor['getFragment']>;
@@ -0,0 +1,5 @@
1
+ export * from './apply';
2
+ export * from './get-dirty-paths';
3
+ export * from './get-fragment';
4
+ export * from './normalize-node';
5
+ export * from './should-normalize';
@@ -0,0 +1,3 @@
1
+ import { WithEditorFirstArg } from '../utils/types';
2
+ import { Editor } from '../interfaces/editor';
3
+ export declare const normalizeNode: WithEditorFirstArg<Editor['normalizeNode']>;
@@ -0,0 +1,3 @@
1
+ import { WithEditorFirstArg } from '../utils/types';
2
+ import { Editor } from '../interfaces/editor';
3
+ export declare const shouldNormalize: WithEditorFirstArg<Editor['shouldNormalize']>;
@@ -0,0 +1,9 @@
1
+ import { Path } from '../interfaces/path';
2
+ import { Editor } from '../interfaces/editor';
3
+ /**
4
+ * update editor dirty paths
5
+ *
6
+ * @param newDirtyPaths: Path[]; new dirty paths
7
+ * @param transform: (p: Path) => Path | null; how to transform existing dirty paths
8
+ */
9
+ export declare function updateDirtyPaths(editor: Editor, newDirtyPaths: Path[], transform?: (p: Path) => Path | null): void;
@@ -0,0 +1,5 @@
1
+ import { Editor, Descendant } from './';
2
+ /**
3
+ * Create a new Slate `Editor` object.
4
+ */
5
+ export declare const createEditor: (children: Descendant[]) => Editor;
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const above: EditorInterface['above'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const addMark: EditorInterface['addMark'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const after: EditorInterface['after'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const before: EditorInterface['before'];
@@ -0,0 +1,3 @@
1
+ import { Editor } from '../interfaces/editor';
2
+ import { WithEditorFirstArg } from '../utils/types';
3
+ export declare const deleteBackward: WithEditorFirstArg<Editor['deleteBackward']>;
@@ -0,0 +1,3 @@
1
+ import { Editor } from '../interfaces/editor';
2
+ import { WithEditorFirstArg } from '../utils/types';
3
+ export declare const deleteForward: WithEditorFirstArg<Editor['deleteForward']>;
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const deleteFragment: EditorInterface['deleteFragment'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const edges: EditorInterface['edges'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const elementReadOnly: EditorInterface['elementReadOnly'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const end: EditorInterface['end'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const first: EditorInterface['first'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const fragment: EditorInterface['fragment'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const getVoid: EditorInterface['void'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const hasBlocks: EditorInterface['hasBlocks'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const hasInlines: EditorInterface['hasInlines'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const hasPath: EditorInterface['hasPath'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const hasTexts: EditorInterface['hasTexts'];
@@ -0,0 +1,55 @@
1
+ export * from './above';
2
+ export * from './add-mark';
3
+ export * from './after';
4
+ export * from './before';
5
+ export * from './delete-backward';
6
+ export * from './delete-forward';
7
+ export * from './delete-fragment';
8
+ export * from './edges';
9
+ export * from './element-read-only';
10
+ export * from './end';
11
+ export * from './first';
12
+ export * from './fragment';
13
+ export * from './get-void';
14
+ export * from './has-blocks';
15
+ export * from './has-inlines';
16
+ export * from './has-path';
17
+ export * from './has-texts';
18
+ export * from './insert-break';
19
+ export * from './insert-node';
20
+ export * from './insert-soft-break';
21
+ export * from './insert-text';
22
+ export * from './is-block';
23
+ export * from './is-edge';
24
+ export * from './is-editor';
25
+ export * from './is-empty';
26
+ export * from './is-end';
27
+ export * from './is-normalizing';
28
+ export * from './is-start';
29
+ export * from './last';
30
+ export * from './leaf';
31
+ export * from './levels';
32
+ export * from './marks';
33
+ export * from './next';
34
+ export * from './node';
35
+ export * from './nodes';
36
+ export * from './normalize';
37
+ export * from './parent';
38
+ export * from './path-ref';
39
+ export * from './path-refs';
40
+ export * from './path';
41
+ export * from './point-ref';
42
+ export * from './point-refs';
43
+ export * from './point';
44
+ export * from './positions';
45
+ export * from './previous';
46
+ export * from './range-ref';
47
+ export * from './range-refs';
48
+ export * from './range';
49
+ export * from './remove-mark';
50
+ export * from './set-normalizing';
51
+ export * from './start';
52
+ export * from './string';
53
+ export * from './unhang-range';
54
+ export * from './without-normalizing';
55
+ export * from './should-merge-nodes-remove-prev-node';
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const insertBreak: EditorInterface['insertBreak'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const insertNode: EditorInterface['insertNode'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const insertSoftBreak: EditorInterface['insertSoftBreak'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const insertText: EditorInterface['insertText'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const isBlock: EditorInterface['isBlock'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const isEdge: EditorInterface['isEdge'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const isEditor: EditorInterface['isEditor'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const isEmpty: EditorInterface['isEmpty'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const isEnd: EditorInterface['isEnd'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const isNormalizing: EditorInterface['isNormalizing'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const isStart: EditorInterface['isStart'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const last: EditorInterface['last'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const leaf: EditorInterface['leaf'];
@@ -0,0 +1,3 @@
1
+ import { Node, NodeEntry } from '../interfaces/node';
2
+ import { Editor, EditorLevelsOptions } from '../interfaces/editor';
3
+ export declare function levels<T extends Node>(editor: Editor, options?: EditorLevelsOptions<T>): Generator<NodeEntry<T>, void, undefined>;
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const marks: EditorInterface['marks'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const next: EditorInterface['next'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const node: EditorInterface['node'];
@@ -0,0 +1,3 @@
1
+ import { Node, NodeEntry } from '../interfaces/node';
2
+ import { Editor, EditorNodesOptions } from '../interfaces/editor';
3
+ export declare function nodes<T extends Node>(editor: Editor, options?: EditorNodesOptions<T>): Generator<NodeEntry<T>, void, undefined>;
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const normalize: EditorInterface['normalize'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const parent: EditorInterface['parent'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const pathRef: EditorInterface['pathRef'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const pathRefs: EditorInterface['pathRefs'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces';
2
+ export declare const path: EditorInterface['path'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const pointRef: EditorInterface['pointRef'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const pointRefs: EditorInterface['pointRefs'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const point: EditorInterface['point'];
@@ -0,0 +1,3 @@
1
+ import { Editor, EditorPositionsOptions } from '../interfaces/editor';
2
+ import { Point } from '../interfaces/point';
3
+ export declare function positions(editor: Editor, options?: EditorPositionsOptions): Generator<Point, void, undefined>;
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const previous: EditorInterface['previous'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const rangeRef: EditorInterface['rangeRef'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const rangeRefs: EditorInterface['rangeRefs'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const range: EditorInterface['range'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const removeMark: EditorInterface['removeMark'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const setNormalizing: EditorInterface['setNormalizing'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces';
2
+ export declare const shouldMergeNodesRemovePrevNode: EditorInterface['shouldMergeNodesRemovePrevNode'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const start: EditorInterface['start'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const string: EditorInterface['string'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const unhangRange: EditorInterface['unhangRange'];
@@ -0,0 +1,2 @@
1
+ import { EditorInterface } from '../interfaces/editor';
2
+ export declare const withoutNormalizing: EditorInterface['withoutNormalizing'];
@@ -0,0 +1,21 @@
1
+ export * from './core';
2
+ export * from './create-editor';
3
+ export * from './editor';
4
+ export * from './interfaces/editor';
5
+ export * from './interfaces/element';
6
+ export * from './interfaces/location';
7
+ export * from './interfaces/node';
8
+ export * from './interfaces/operation';
9
+ export * from './interfaces/path-ref';
10
+ export * from './interfaces/path';
11
+ export * from './interfaces/point-ref';
12
+ export * from './interfaces/point';
13
+ export * from './interfaces/range-ref';
14
+ export * from './interfaces/range';
15
+ export * from './interfaces/scrubber';
16
+ export * from './interfaces/text';
17
+ export * from './interfaces/transforms/index';
18
+ export * from './transforms-node';
19
+ export * from './transforms-selection';
20
+ export * from './transforms-text';
21
+ export * from './types';