@lvce-editor/editor-worker 7.0.0 → 7.2.0
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 +4 -4
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -1132,14 +1132,14 @@ const getModule$2 = id => {
|
|
|
1132
1132
|
const applyWidgetChange = async (editor, widget, changes) => {
|
|
1133
1133
|
const module = getModule$2(widget.id);
|
|
1134
1134
|
if (changes.length === 1 && changes[0].origin === EditorType && module.handleEditorType) {
|
|
1135
|
-
const newState = await module.handleEditorType(
|
|
1135
|
+
const newState = await module.handleEditorType(widget.newState);
|
|
1136
1136
|
return {
|
|
1137
1137
|
...widget,
|
|
1138
1138
|
newState
|
|
1139
1139
|
};
|
|
1140
1140
|
}
|
|
1141
1141
|
if (changes.length === 1 && changes[0].origin === DeleteLeft && module.handleEditorDeleteLeft) {
|
|
1142
|
-
const newState = await module.handleEditorDeleteLeft(
|
|
1142
|
+
const newState = await module.handleEditorDeleteLeft(widget.newState);
|
|
1143
1143
|
return {
|
|
1144
1144
|
...widget,
|
|
1145
1145
|
newState
|
|
@@ -7719,11 +7719,11 @@ const remove$7 = widget => {
|
|
|
7719
7719
|
return [['Viewlet.dispose', widget.newState.uid]];
|
|
7720
7720
|
};
|
|
7721
7721
|
const createFn = key => {
|
|
7722
|
-
const fn = async state => {
|
|
7722
|
+
const fn = async (state, ...args) => {
|
|
7723
7723
|
const {
|
|
7724
7724
|
uid
|
|
7725
7725
|
} = state;
|
|
7726
|
-
await invoke$3(`Completions.${key}`, uid);
|
|
7726
|
+
await invoke$3(`Completions.${key}`, uid, ...args);
|
|
7727
7727
|
const diff = await invoke$3('Completions.diff2', uid);
|
|
7728
7728
|
const commands = await invoke$3('Completions.render2', uid, diff);
|
|
7729
7729
|
return {
|