slate-vue3 0.7.7 → 0.7.9
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.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SLATE_USE_ELEMENT, u as useEditor, a as SLATE_USE_SELECTION } from "./use-focused-
|
|
2
|
-
import { g, D, c, e, f, d, E, b, h, i, j } from "./use-focused-
|
|
1
|
+
import { S as SLATE_USE_ELEMENT, u as useEditor, a as SLATE_USE_SELECTION } from "./use-focused-BSO-C7iP.js";
|
|
2
|
+
import { g, D, c, e, f, d, E, b, h, i, j } from "./use-focused-BSO-C7iP.js";
|
|
3
3
|
import { E as Editor, R as Range } from "./batch-dirty-paths-9ixbU5Xv.js";
|
|
4
4
|
import { t } from "./batch-dirty-paths-9ixbU5Xv.js";
|
|
5
5
|
import { inject, computed } from "vue";
|
|
@@ -341,8 +341,8 @@ const StringComp = defineComponent({
|
|
|
341
341
|
return null;
|
|
342
342
|
});
|
|
343
343
|
return () => zeroStringAttrs.value ? h("span", zeroStringAttrs.value, [
|
|
344
|
-
!IS_ANDROID || !isLineBreak ? "\uFEFF" : null,
|
|
345
|
-
|
|
344
|
+
!IS_ANDROID || !isLineBreak.value ? "\uFEFF" : null,
|
|
345
|
+
!IS_FIREFOX && isLineBreak.value ? h("br") : null
|
|
346
346
|
]) : h("span", { "data-slate-string": true }, getTextContent.value);
|
|
347
347
|
}
|
|
348
348
|
});
|
|
@@ -1059,7 +1059,20 @@ const useAndroidManager = (editableRef) => {
|
|
|
1059
1059
|
insertPositionHint = false;
|
|
1060
1060
|
}
|
|
1061
1061
|
if (canStoreDiff) {
|
|
1062
|
+
const currentSelection = editor.selection;
|
|
1062
1063
|
storeDiff(start.path, diff);
|
|
1064
|
+
if (currentSelection) {
|
|
1065
|
+
const newPoint = {
|
|
1066
|
+
path: start.path,
|
|
1067
|
+
offset: start.offset + text.length
|
|
1068
|
+
};
|
|
1069
|
+
scheduleAction(() => {
|
|
1070
|
+
Transforms.select(editor, {
|
|
1071
|
+
anchor: newPoint,
|
|
1072
|
+
focus: newPoint
|
|
1073
|
+
});
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
1063
1076
|
return;
|
|
1064
1077
|
}
|
|
1065
1078
|
}
|
package/dist/yjs.js
CHANGED
|
@@ -2,7 +2,7 @@ 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-Df07ugyf.js";
|
|
5
|
-
import { u as useEditor, i as useFocused } from "./use-focused-
|
|
5
|
+
import { u as useEditor, i as useFocused } from "./use-focused-BSO-C7iP.js";
|
|
6
6
|
import { D as DOMEditor } from "./hotkeys-WTh2lFjJ.js";
|
|
7
7
|
function deepEquals(node, another) {
|
|
8
8
|
for (const key in node) {
|