@lvce-editor/editor-worker 7.11.0 → 7.13.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 +16 -5
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -785,7 +785,7 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
|
|
|
785
785
|
const errorProperty = getErrorProperty(error, prettyError);
|
|
786
786
|
return create$1$1(id, errorProperty);
|
|
787
787
|
};
|
|
788
|
-
const create$
|
|
788
|
+
const create$b = (message, result) => {
|
|
789
789
|
return {
|
|
790
790
|
jsonrpc: Two,
|
|
791
791
|
id: message.id,
|
|
@@ -794,7 +794,7 @@ const create$c = (message, result) => {
|
|
|
794
794
|
};
|
|
795
795
|
const getSuccessResponse = (message, result) => {
|
|
796
796
|
const resultProperty = result ?? null;
|
|
797
|
-
return create$
|
|
797
|
+
return create$b(message, resultProperty);
|
|
798
798
|
};
|
|
799
799
|
const getErrorResponseSimple = (id, error) => {
|
|
800
800
|
return {
|
|
@@ -976,7 +976,7 @@ const listen$1 = async (module, options) => {
|
|
|
976
976
|
const ipc = module.wrap(rawIpc);
|
|
977
977
|
return ipc;
|
|
978
978
|
};
|
|
979
|
-
const create$
|
|
979
|
+
const create$d = async ({
|
|
980
980
|
commandMap,
|
|
981
981
|
messagePort,
|
|
982
982
|
isMessagePortOpen
|
|
@@ -994,7 +994,7 @@ const create$b = async ({
|
|
|
994
994
|
};
|
|
995
995
|
const MessagePortRpcParent = {
|
|
996
996
|
__proto__: null,
|
|
997
|
-
create: create$
|
|
997
|
+
create: create$d
|
|
998
998
|
};
|
|
999
999
|
const create$5$1 = async ({
|
|
1000
1000
|
commandMap,
|
|
@@ -8020,6 +8020,10 @@ const getUri = editorUid => {
|
|
|
8020
8020
|
const editor = getEditor(editorUid);
|
|
8021
8021
|
return editor.uri;
|
|
8022
8022
|
};
|
|
8023
|
+
const getLanguageId = editorUid => {
|
|
8024
|
+
const editor = getEditor(editorUid);
|
|
8025
|
+
return editor.languageId;
|
|
8026
|
+
};
|
|
8023
8027
|
const getOffsetAtCursor = editorUid => {
|
|
8024
8028
|
const editor = getEditor(editorUid);
|
|
8025
8029
|
return getOffsetAtCursor$1(editor);
|
|
@@ -8545,6 +8549,11 @@ const getKeyBindings = () => {
|
|
|
8545
8549
|
}];
|
|
8546
8550
|
};
|
|
8547
8551
|
|
|
8552
|
+
const getProblems = async () => {
|
|
8553
|
+
// TODO return problems from currently open editors or ask extension host worker for problems
|
|
8554
|
+
return [];
|
|
8555
|
+
};
|
|
8556
|
+
|
|
8548
8557
|
const getQuickPickMenuEntries = () => {
|
|
8549
8558
|
return [{
|
|
8550
8559
|
id: 'Editor.format',
|
|
@@ -9729,7 +9738,7 @@ const editorDiagnosticEffect = {
|
|
|
9729
9738
|
}
|
|
9730
9739
|
};
|
|
9731
9740
|
|
|
9732
|
-
const keep = ['ActivateByEvent.activateByEvent', 'Editor.applyEdit2', 'Editor.applyEdits2', 'Editor.closeFind2', 'Editor.closeWidget2', 'Editor.create', 'Editor.getKeyBindings', 'Editor.getLines2', 'Editor.getPositionAtCursor', 'Editor.getOffsetAtCursor', 'Editor.getQuickPickMenuEntries', 'Editor.getSelections', 'Editor.getSelections2', 'Editor.getText', 'Editor.getWordAt', 'Editor.getWordAt2', 'Editor.getWordAtOffset2', 'Editor.getUri', 'Editor.getWordBefore', 'Editor.getWordBefore2', 'Editor.offsetAt', 'Editor.render', 'Editor.setSelections2', 'Editor.updateDebugInfo', 'Font.ensure', 'HandleMessagePort.handleMessagePort', 'Hover.getHoverInfo', 'Hover.handleSashPointerDown', 'Hover.handleSashPointerMove', 'Hover.handleSashPointerUp', 'Hover.loadContent', 'Hover.render', 'Initialize.initialize', 'SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker'
|
|
9741
|
+
const keep = ['ActivateByEvent.activateByEvent', 'Editor.applyEdit2', 'Editor.applyEdits2', 'Editor.closeFind2', 'Editor.closeWidget2', 'Editor.create', 'Editor.getKeyBindings', 'Editor.getLines2', 'Editor.getPositionAtCursor', 'Editor.getOffsetAtCursor', 'Editor.getQuickPickMenuEntries', 'Editor.getSelections', 'Editor.getSelections2', 'Editor.getText', 'Editor.getWordAt', 'Editor.getWordAt2', 'Editor.getWordAtOffset2', 'Editor.getUri', 'Editor.getWordBefore', 'Editor.getWordBefore2', 'Editor.offsetAt', 'Editor.render', 'Editor.setSelections2', 'Editor.updateDebugInfo', 'Editor.getLanguageId', 'Editor.getProblems', 'Font.ensure', 'HandleMessagePort.handleMessagePort', 'Hover.getHoverInfo', 'Hover.handleSashPointerDown', 'Hover.handleSashPointerMove', 'Hover.handleSashPointerUp', 'Hover.loadContent', 'Hover.render', 'Initialize.initialize', 'SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker'
|
|
9733
9742
|
// 'ColorPicker.handleSliderPointerDown',
|
|
9734
9743
|
// 'ColorPicker.handleSliderPointerMove',
|
|
9735
9744
|
// 'ColorPicker.loadContent',
|
|
@@ -9875,6 +9884,7 @@ const commandMap = {
|
|
|
9875
9884
|
'Editor.getQuickPickMenuEntries': getQuickPickMenuEntries,
|
|
9876
9885
|
'Editor.getSelections': getSelections,
|
|
9877
9886
|
'Editor.getSelections2': getSelections2,
|
|
9887
|
+
'Editor.getLanguageId': getLanguageId,
|
|
9878
9888
|
'Editor.getUri': getUri,
|
|
9879
9889
|
'Editor.getText': getText,
|
|
9880
9890
|
'Editor.getWordAt': getWordAt$1,
|
|
@@ -9929,6 +9939,7 @@ const commandMap = {
|
|
|
9929
9939
|
'Editor.paste': paste,
|
|
9930
9940
|
'Editor.pasteText': pasteText,
|
|
9931
9941
|
'Editor.render': renderEditor,
|
|
9942
|
+
'Editor.getProblems': getProblems,
|
|
9932
9943
|
'Editor.renderEventListeners': renderEventListeners,
|
|
9933
9944
|
'Editor.replaceRange': replaceRange,
|
|
9934
9945
|
'Editor.rerender': rerender,
|