@lvce-editor/editor-worker 19.29.5 → 19.29.6
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/editorWorkerMain.js +16 -9
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -2115,17 +2115,17 @@ const applyWidgetChange = async (editor, widget, changes) => {
|
|
|
2115
2115
|
...newState
|
|
2116
2116
|
};
|
|
2117
2117
|
}
|
|
2118
|
-
return
|
|
2118
|
+
return editor;
|
|
2119
2119
|
};
|
|
2120
2120
|
|
|
2121
2121
|
const applyWidgetChanges = async (editor, changes) => {
|
|
2122
2122
|
const widgets = editor.widgets || [];
|
|
2123
2123
|
if (widgets.length === 0) {
|
|
2124
|
-
return
|
|
2124
|
+
return editor;
|
|
2125
2125
|
}
|
|
2126
2126
|
let latestEditor = editor;
|
|
2127
2127
|
for (const widget of widgets) {
|
|
2128
|
-
latestEditor = await applyWidgetChange(
|
|
2128
|
+
latestEditor = await applyWidgetChange(latestEditor, widget, changes);
|
|
2129
2129
|
}
|
|
2130
2130
|
return latestEditor;
|
|
2131
2131
|
};
|
|
@@ -8898,6 +8898,7 @@ const createFn = (key, name, widgetId) => {
|
|
|
8898
8898
|
const latestAfterInvoke = get$8(editor.uid).newState;
|
|
8899
8899
|
const latestChildIndex = latestAfterInvoke.widgets.findIndex(isWidget);
|
|
8900
8900
|
if (latestChildIndex === -1) {
|
|
8901
|
+
set$8(editor.uid, editor, latestAfterInvoke);
|
|
8901
8902
|
return latestAfterInvoke;
|
|
8902
8903
|
}
|
|
8903
8904
|
const diff = await invoke(`${name}.diff2`, uid);
|
|
@@ -9972,6 +9973,7 @@ const create = () => {
|
|
|
9972
9973
|
id: SourceAction$1,
|
|
9973
9974
|
newState: {
|
|
9974
9975
|
commands: [],
|
|
9976
|
+
editorUid: 0,
|
|
9975
9977
|
focusedIndex: 0,
|
|
9976
9978
|
height: 0,
|
|
9977
9979
|
maxHeight: 0,
|
|
@@ -9983,6 +9985,7 @@ const create = () => {
|
|
|
9983
9985
|
},
|
|
9984
9986
|
oldState: {
|
|
9985
9987
|
commands: [],
|
|
9988
|
+
editorUid: 0,
|
|
9986
9989
|
focusedIndex: 0,
|
|
9987
9990
|
height: 0,
|
|
9988
9991
|
maxHeight: 0,
|
|
@@ -11173,10 +11176,13 @@ const render$8 = widget => {
|
|
|
11173
11176
|
const commands = renderFull$3(widget.oldState, widget.newState);
|
|
11174
11177
|
const wrappedCommands = [];
|
|
11175
11178
|
const {
|
|
11179
|
+
editorUid,
|
|
11176
11180
|
uid
|
|
11177
11181
|
} = widget.newState;
|
|
11178
11182
|
for (const command of commands) {
|
|
11179
|
-
if (
|
|
11183
|
+
if (command[0] === SetFocusContext) {
|
|
11184
|
+
wrappedCommands.push([command[0], editorUid, ...command.slice(1)]);
|
|
11185
|
+
} else if (commandsToForward$2.includes(command[0])) {
|
|
11180
11186
|
wrappedCommands.push(command);
|
|
11181
11187
|
} else {
|
|
11182
11188
|
wrappedCommands.push(['Viewlet.send', uid, ...command]);
|
|
@@ -11417,23 +11423,23 @@ const getKeyBindings = () => {
|
|
|
11417
11423
|
key: Escape,
|
|
11418
11424
|
when: FocusSourceActions
|
|
11419
11425
|
}, {
|
|
11420
|
-
command: '
|
|
11426
|
+
command: 'EditorSourceAction.focusNext',
|
|
11421
11427
|
key: DownArrow,
|
|
11422
11428
|
when: FocusSourceActions
|
|
11423
11429
|
}, {
|
|
11424
|
-
command: '
|
|
11430
|
+
command: 'EditorSourceAction.focusPrevious',
|
|
11425
11431
|
key: UpArrow,
|
|
11426
11432
|
when: FocusSourceActions
|
|
11427
11433
|
}, {
|
|
11428
|
-
command: '
|
|
11434
|
+
command: 'EditorSourceAction.focusFirst',
|
|
11429
11435
|
key: Home,
|
|
11430
11436
|
when: FocusSourceActions
|
|
11431
11437
|
}, {
|
|
11432
|
-
command: '
|
|
11438
|
+
command: 'EditorSourceAction.focusLast',
|
|
11433
11439
|
key: End,
|
|
11434
11440
|
when: FocusSourceActions
|
|
11435
11441
|
}, {
|
|
11436
|
-
command: '
|
|
11442
|
+
command: 'EditorSourceAction.selectCurrent',
|
|
11437
11443
|
key: Enter,
|
|
11438
11444
|
when: FocusSourceActions
|
|
11439
11445
|
}, {
|
|
@@ -13837,6 +13843,7 @@ const commandMap = {
|
|
|
13837
13843
|
'Editor.handleScrollBarVerticalPointerMove': wrapCommand(handleScrollBarVerticalPointerMove),
|
|
13838
13844
|
'Editor.handleSettingsChanged': wrapCommand(handleSettingsChanged),
|
|
13839
13845
|
'Editor.handleSingleClick': wrapCommand(handleSingleClick),
|
|
13846
|
+
'Editor.handleSourceActionClick': selectItem,
|
|
13840
13847
|
'Editor.handleTab': wrapCommand(handleTab),
|
|
13841
13848
|
'Editor.handleTouchEnd': wrapCommand(handleTouchEnd),
|
|
13842
13849
|
'Editor.handleTouchMove': wrapCommand(handleTouchMove),
|