@lvce-editor/editor-worker 19.77.4 → 19.77.5
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/diff-sdk.js +5 -2
- package/dist/editorWorkerMain.js +5 -2
- package/package.json +1 -1
package/dist/diff-sdk.js
CHANGED
|
@@ -17514,7 +17514,7 @@ const getSelections2 = editorUid => {
|
|
|
17514
17514
|
} = editor;
|
|
17515
17515
|
return selections;
|
|
17516
17516
|
};
|
|
17517
|
-
const setSelections2 = async (editorUid, selections) => {
|
|
17517
|
+
const setSelections2 = async (editorUid, selections, reveal = true) => {
|
|
17518
17518
|
const requested = get$a(editorUid);
|
|
17519
17519
|
if (!requested || requested.newState.lifecycle?.disposed) {
|
|
17520
17520
|
return;
|
|
@@ -17529,7 +17529,10 @@ const setSelections2 = async (editorUid, selections) => {
|
|
|
17529
17529
|
const {
|
|
17530
17530
|
lifecycle
|
|
17531
17531
|
} = editor;
|
|
17532
|
-
const newEditor = setSelections$2(editor, selections)
|
|
17532
|
+
const newEditor = reveal ? setSelections$2(editor, selections) : {
|
|
17533
|
+
...editor,
|
|
17534
|
+
selections
|
|
17535
|
+
};
|
|
17533
17536
|
const newEditorWithDerivedState = await updateDerivedState(editor, newEditor);
|
|
17534
17537
|
const current = get$a(editorUid);
|
|
17535
17538
|
if (!current || lifecycle?.disposed || current.newState.lifecycle !== lifecycle) {
|
package/dist/editorWorkerMain.js
CHANGED
|
@@ -17933,7 +17933,7 @@ const getSelections2 = editorUid => {
|
|
|
17933
17933
|
} = editor;
|
|
17934
17934
|
return selections;
|
|
17935
17935
|
};
|
|
17936
|
-
const setSelections2 = async (editorUid, selections) => {
|
|
17936
|
+
const setSelections2 = async (editorUid, selections, reveal = true) => {
|
|
17937
17937
|
const requested = get$9(editorUid);
|
|
17938
17938
|
if (!requested || requested.newState.lifecycle?.disposed) {
|
|
17939
17939
|
return;
|
|
@@ -17948,7 +17948,10 @@ const setSelections2 = async (editorUid, selections) => {
|
|
|
17948
17948
|
const {
|
|
17949
17949
|
lifecycle
|
|
17950
17950
|
} = editor;
|
|
17951
|
-
const newEditor = setSelections$2(editor, selections)
|
|
17951
|
+
const newEditor = reveal ? setSelections$2(editor, selections) : {
|
|
17952
|
+
...editor,
|
|
17953
|
+
selections
|
|
17954
|
+
};
|
|
17952
17955
|
const newEditorWithDerivedState = await updateDerivedState(editor, newEditor);
|
|
17953
17956
|
const current = get$9(editorUid);
|
|
17954
17957
|
if (!current || lifecycle?.disposed || current.newState.lifecycle !== lifecycle) {
|