@lvce-editor/editor-worker 19.31.0 → 19.32.1
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 +14 -1
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -11884,6 +11884,15 @@ const EditorSourceActionWidget = {
|
|
|
11884
11884
|
toggleDetails
|
|
11885
11885
|
};
|
|
11886
11886
|
|
|
11887
|
+
const executeViewletCommand$1 = async (commandMap, uid, commandId, ...args) => {
|
|
11888
|
+
const fn = commandMap[commandId];
|
|
11889
|
+
if (typeof fn !== 'function') {
|
|
11890
|
+
throw new TypeError(`Viewlet command not found: ${commandId}`);
|
|
11891
|
+
}
|
|
11892
|
+
await fn(uid, ...args);
|
|
11893
|
+
await invoke$a('Viewlet.requestRender', uid);
|
|
11894
|
+
};
|
|
11895
|
+
|
|
11887
11896
|
const executeWidgetCommand = async (editor, name, method, _uid, widgetId, ...params) => {
|
|
11888
11897
|
const invoke = getWidgetInvoke(widgetId);
|
|
11889
11898
|
const actualMethod = method.slice(name.length + 1);
|
|
@@ -14356,7 +14365,7 @@ const editorDiagnosticEffect = {
|
|
|
14356
14365
|
apply(editor) {
|
|
14357
14366
|
return updateDiagnostics(editor);
|
|
14358
14367
|
},
|
|
14359
|
-
isActive: (oldEditor, newEditor) => newEditor.diagnosticsEnabled && oldEditor.lines !== newEditor.lines
|
|
14368
|
+
isActive: (oldEditor, newEditor) => !oldEditor.initial && newEditor.diagnosticsEnabled && oldEditor.lines !== newEditor.lines
|
|
14360
14369
|
};
|
|
14361
14370
|
|
|
14362
14371
|
const queues = {};
|
|
@@ -14496,6 +14505,9 @@ const wrapCommand = (fn, preservesTypingCoalescing = false) => async (uid, ...ar
|
|
|
14496
14505
|
}
|
|
14497
14506
|
};
|
|
14498
14507
|
|
|
14508
|
+
const executeViewletCommand = (uid, commandId, ...args) => {
|
|
14509
|
+
return executeViewletCommand$1(commandMap, uid, commandId, ...args);
|
|
14510
|
+
};
|
|
14499
14511
|
const commandMap = {
|
|
14500
14512
|
'ActivateByEvent.activateByEvent': activateByEvent,
|
|
14501
14513
|
'CodeGenerator.accept': codeGeneratorAccept,
|
|
@@ -14560,6 +14572,7 @@ const commandMap = {
|
|
|
14560
14572
|
'Editor.deleteWordRight': wrapCommand(deleteWordRight),
|
|
14561
14573
|
'Editor.diff2': diff2,
|
|
14562
14574
|
'Editor.dispose': disposeEditor,
|
|
14575
|
+
'Editor.executeViewletCommand': executeViewletCommand,
|
|
14563
14576
|
'Editor.executeWidgetCommand': wrapCommand(executeWidgetCommand),
|
|
14564
14577
|
'Editor.findAllReferences': wrapCommand(findAllReferences$1),
|
|
14565
14578
|
'Editor.fold': wrapCommand(fold$1),
|