slate-vue3 0.7.2 → 0.7.3

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/dom.js CHANGED
@@ -1,5 +1,5 @@
1
- import { D as DOMEditor, E as EDITOR_TO_KEY_TO_ELEMENT, a as EDITOR_TO_USER_MARKS, g as getChunkTreeForNode, b as EDITOR_TO_USER_SELECTION, N as NODE_TO_KEY, i as isDOMText, c as getPlainText, d as getSlateFragmentAttribute, e as EDITOR_TO_ON_CHANGE } from "./hotkeys-196l6rxo.js";
2
- import { C, J, L, M, H, F, I, v, O, w, x, P, y, Q, A, z, B, G, K, R, S, T, U, f, h, j, k, l, m, o, p, q, r, s, t, u, n } from "./hotkeys-196l6rxo.js";
1
+ import { D as DOMEditor, E as EDITOR_TO_KEY_TO_ELEMENT, a as EDITOR_TO_USER_MARKS, g as getChunkTreeForNode, b as EDITOR_TO_USER_SELECTION, N as NODE_TO_KEY, i as isDOMText, c as getPlainText, d as getSlateFragmentAttribute, e as EDITOR_TO_ON_CHANGE } from "./hotkeys-BF9U1Pfk.js";
2
+ import { C, J, L, M, H, F, I, v, O, w, x, P, y, Q, A, z, B, G, K, R, S, T, U, f, h, j, k, l, m, o, p, q, r, s, t, u, n } from "./hotkeys-BF9U1Pfk.js";
3
3
  import { E as Editor, R as Range, a as Element, c as Transforms, N as Node, P as Path } from "./batch-dirty-paths-DTifjYae.js";
4
4
  import "vue";
5
5
  const doRectsIntersect = (rect, compareRect) => {
@@ -1224,7 +1224,6 @@ const reconcileChildren = (editor, {
1224
1224
  chunkTree,
1225
1225
  children,
1226
1226
  chunkSize,
1227
- rerenderChildren = [],
1228
1227
  onInsert,
1229
1228
  onUpdate,
1230
1229
  onIndexChange,
@@ -1254,7 +1253,7 @@ const reconcileChildren = (editor, {
1254
1253
  });
1255
1254
  }
1256
1255
  const matchingChildIndex = childrenHelper.pointerIndex - 1;
1257
- if (treeLeaf.node !== toRaw(matchingChild)) {
1256
+ if (toRaw(treeLeaf.node) !== toRaw(matchingChild)) {
1258
1257
  treeLeaf.node = matchingChild;
1259
1258
  onUpdate == null ? void 0 : onUpdate(matchingChild, matchingChildIndex);
1260
1259
  }
@@ -1262,7 +1261,6 @@ const reconcileChildren = (editor, {
1262
1261
  treeLeaf.index = matchingChildIndex;
1263
1262
  onIndexChange == null ? void 0 : onIndexChange(matchingChild, matchingChildIndex);
1264
1263
  }
1265
- if (rerenderChildren.includes(matchingChildIndex)) ;
1266
1264
  }
1267
1265
  if (!childrenHelper.reachedEnd) {
1268
1266
  const remainingChildren = childrenHelper.remaining();
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { S as SLATE_USE_ELEMENT, u as useEditor, a as SLATE_USE_SELECTION } from "./use-focused-B3M4g8lf.js";
2
- import { g, D, c, e, f, d, E, b, h, i, j } from "./use-focused-B3M4g8lf.js";
1
+ import { S as SLATE_USE_ELEMENT, u as useEditor, a as SLATE_USE_SELECTION } from "./use-focused-DcDZV3X4.js";
2
+ import { g, D, c, e, f, d, E, b, h, i, j } from "./use-focused-DcDZV3X4.js";
3
3
  import { E as Editor, R as Range } from "./batch-dirty-paths-DTifjYae.js";
4
4
  import { t } from "./batch-dirty-paths-DTifjYae.js";
5
5
  import { inject, computed } from "vue";
6
- import { D as DOMEditor } from "./hotkeys-196l6rxo.js";
6
+ import { D as DOMEditor } from "./hotkeys-BF9U1Pfk.js";
7
7
  const useElement = () => {
8
8
  const element = inject(SLATE_USE_ELEMENT);
9
9
  if (element === void 0) {
@@ -16,4 +16,4 @@ export interface ReconcileOptions extends ChunkTreeHelperOptions {
16
16
  * Update the chunk tree to match the children array, inserting, removing and
17
17
  * updating differing nodes
18
18
  */
19
- export declare const reconcileChildren: (editor: DOMEditor, { chunkTree, children, chunkSize, rerenderChildren, onInsert, onUpdate, onIndexChange, debug, }: ReconcileOptions) => void;
19
+ export declare const reconcileChildren: (editor: DOMEditor, { chunkTree, children, chunkSize, onInsert, onUpdate, onIndexChange, debug, }: ReconcileOptions) => void;
@@ -1,6 +1,6 @@
1
1
  import { h, defineComponent, provide, ref, computed, onMounted, onUnmounted, renderSlot, inject, watch, renderList, onUpdated, useAttrs, reactive, toRaw } from "vue";
2
2
  import { R as Range, N as Node, S as Scrubber, T as Text, P as Path, E as Editor, a as Element, c as Transforms } from "./batch-dirty-paths-DTifjYae.js";
3
- import { I as IS_ANDROID, q as isDOMNode, D as DOMEditor, R as MARK_PLACEHOLDER_SYMBOL, e as EDITOR_TO_ON_CHANGE, w as IS_FIREFOX, z as IS_WEBKIT, E as EDITOR_TO_KEY_TO_ELEMENT, M as ELEMENT_TO_NODE, S as NODE_TO_ELEMENT, T as NODE_TO_INDEX, U as NODE_TO_PARENT, g as getChunkTreeForNode, f as applyStringDiff, r as isDOMSelection, n as normalizeStringDiff, Q as IS_READ_ONLY, j as getDefaultView, L as EDITOR_TO_WINDOW, J as EDITOR_TO_ELEMENT, H as HAS_BEFORE_INPUT_SUPPORT, C as CAN_USE_DOM, h as getActiveElement, k as getSelection, P as IS_FOCUSED, s as isPlainTextOnlyPaste, O as IS_COMPOSING, F as Hotkeys, v as IS_CHROME, x as IS_FIREFOX_LEGACY, y as IS_IOS, B as IS_WECHATBROWSER, A as IS_UC_MOBILE, a as EDITOR_TO_USER_MARKS, p as isDOMElement, b as EDITOR_TO_USER_SELECTION } from "./hotkeys-196l6rxo.js";
3
+ import { I as IS_ANDROID, q as isDOMNode, D as DOMEditor, R as MARK_PLACEHOLDER_SYMBOL, e as EDITOR_TO_ON_CHANGE, w as IS_FIREFOX, z as IS_WEBKIT, E as EDITOR_TO_KEY_TO_ELEMENT, M as ELEMENT_TO_NODE, S as NODE_TO_ELEMENT, T as NODE_TO_INDEX, U as NODE_TO_PARENT, g as getChunkTreeForNode, f as applyStringDiff, r as isDOMSelection, n as normalizeStringDiff, Q as IS_READ_ONLY, j as getDefaultView, L as EDITOR_TO_WINDOW, J as EDITOR_TO_ELEMENT, H as HAS_BEFORE_INPUT_SUPPORT, C as CAN_USE_DOM, h as getActiveElement, k as getSelection, P as IS_FOCUSED, s as isPlainTextOnlyPaste, O as IS_COMPOSING, F as Hotkeys, v as IS_CHROME, x as IS_FIREFOX_LEGACY, y as IS_IOS, B as IS_WECHATBROWSER, A as IS_UC_MOBILE, a as EDITOR_TO_USER_MARKS, p as isDOMElement, b as EDITOR_TO_USER_SELECTION } from "./hotkeys-BF9U1Pfk.js";
4
4
  const SLATE_USE_EDITOR = Symbol("SLATE_USE_EDITOR");
5
5
  const SLATE_USE_ELEMENT = Symbol("SLATE_USE_ELEMENT");
6
6
  const SLATE_USE_FOCUSED = Symbol("SLATE_USE_FOCUSED");
@@ -1542,7 +1542,7 @@ const Editable = defineComponent({
1542
1542
  }
1543
1543
  };
1544
1544
  const onCompositionend = (event) => {
1545
- if (!DOMEditor.hasEditableTarget(editor, event.target) || DOMEditor.isTargetInsideNonReadonlyVoid(editor, event.target)) {
1545
+ if (!DOMEditor.hasSelectableTarget(editor, event.target)) {
1546
1546
  return;
1547
1547
  }
1548
1548
  if (DOMEditor.isComposing(editor)) {
package/dist/yjs.js CHANGED
@@ -2,8 +2,8 @@ import { d as isObject, T as Text, N as Node, P as Path, E as Editor, t as toRaw
2
2
  import { toRaw, ref, onMounted, onUnmounted, watch, onUpdated, computed } from "vue";
3
3
  import { XmlText, YTextEvent, createRelativePositionFromTypeIndex, createAbsolutePositionFromRelativePosition, createRelativePositionFromJSON, decodeRelativePosition, encodeRelativePosition, UndoManager, compareRelativePositions } from "yjs";
4
4
  import { L as Location } from "./location-V9fJlEiJ.js";
5
- import { u as useEditor, i as useFocused } from "./use-focused-B3M4g8lf.js";
6
- import { D as DOMEditor } from "./hotkeys-196l6rxo.js";
5
+ import { u as useEditor, i as useFocused } from "./use-focused-DcDZV3X4.js";
6
+ import { D as DOMEditor } from "./hotkeys-BF9U1Pfk.js";
7
7
  function deepEquals(node, another) {
8
8
  for (const key in node) {
9
9
  const a = node[key];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slate-vue3",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",