@lvce-editor/editor-worker 12.1.0 → 12.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.
@@ -3420,7 +3420,7 @@ const getVisibleDiagnostics = (editor, diagnostics) => {
3420
3420
  const endLineDifference = 0;
3421
3421
  const halfCursorWidth = 0;
3422
3422
  const x = getX(lines[rowIndex], columnIndex, fontWeight, fontSize, fontFamily, isMonospaceFont, letterSpacing, tabSize, halfCursorWidth, width, charWidth, endLineDifference);
3423
- const y = getY(rowIndex, minLineY, rowHeight);
3423
+ const y = getY(rowIndex, minLineY, rowHeight) - rowHeight;
3424
3424
  visibleDiagnostics.push({
3425
3425
  x,
3426
3426
  y,
@@ -3622,8 +3622,10 @@ const createEditor = async ({
3622
3622
  // e.g. it might not always be necessary to send text to extension host worker
3623
3623
  // @ts-ignore
3624
3624
  await invoke$6(TextDocumentSyncFull, uri, id, languageId, content);
3625
+
3626
+ // TODO await promise
3625
3627
  if (diagnosticsEnabled) {
3626
- updateDiagnostics(newEditor4);
3628
+ await updateDiagnostics(newEditor4);
3627
3629
  }
3628
3630
  };
3629
3631
 
@@ -9352,6 +9354,13 @@ const getSourceActions = async editorUid => {
9352
9354
  const actions = await getEditorSourceActions(editorUid);
9353
9355
  return actions;
9354
9356
  };
9357
+ const getDiagnostics$1 = async editorUid => {
9358
+ const editor = getEditor(editorUid);
9359
+ const {
9360
+ diagnostics
9361
+ } = editor;
9362
+ return diagnostics;
9363
+ };
9355
9364
 
9356
9365
  const pending = Object.create(null);
9357
9366
  const loaded = Object.create(null);
@@ -10557,7 +10566,7 @@ const editorDiagnosticEffect = {
10557
10566
  }
10558
10567
  };
10559
10568
 
10560
- const keep = ['ActivateByEvent.activateByEvent', 'ExtensionHostManagement.activateByEvent', 'Editor.applyEdit2', 'Editor.applyEdits2', 'Editor.closeFind2', 'Editor.closeWidget2', 'Editor.create', 'Editor.getKeyBindings', 'Editor.getSourceActions', 'Editor.getLines2', 'Editor.getPositionAtCursor', 'Editor.getOffsetAtCursor', 'Editor.getQuickPickMenuEntries', 'Editor.getSelections', 'Editor.hotReload', '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', 'Editor.getKeys', 'Font.ensure', 'HandleMessagePort.handleMessagePort', 'Hover.getHoverInfo', 'Hover.handleSashPointerDown', 'Hover.handleSashPointerMove', 'Hover.handleSashPointerUp', 'Hover.loadContent', 'Hover.render', 'Initialize.initialize', 'SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker'
10569
+ const keep = ['ActivateByEvent.activateByEvent', 'ExtensionHostManagement.activateByEvent', 'Editor.applyEdit2', 'Editor.applyEdits2', 'Editor.closeFind2', 'Editor.closeWidget2', 'Editor.create', 'Editor.getKeyBindings', 'Editor.getSourceActions', 'Editor.getLines2', 'Editor.getPositionAtCursor', 'Editor.getOffsetAtCursor', 'Editor.getQuickPickMenuEntries', 'Editor.getSelections', 'Editor.hotReload', 'Editor.getSelections2', 'Editor.getDiagnostics', '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', 'Editor.getKeys', 'Font.ensure', 'HandleMessagePort.handleMessagePort', 'Hover.getHoverInfo', 'Hover.handleSashPointerDown', 'Hover.handleSashPointerMove', 'Hover.handleSashPointerUp', 'Hover.loadContent', 'Hover.render', 'Initialize.initialize', 'SendMessagePortToExtensionHostWorker.sendMessagePortToExtensionHostWorker'
10561
10570
  // 'ColorPicker.handleSliderPointerDown',
10562
10571
  // 'ColorPicker.handleSliderPointerMove',
10563
10572
  // 'ColorPicker.loadContent',
@@ -10690,6 +10699,7 @@ const commandMap = {
10690
10699
  'Editor.getQuickPickMenuEntries': getQuickPickMenuEntries,
10691
10700
  'Editor.getSelections': getSelections,
10692
10701
  'Editor.getSelections2': getSelections2,
10702
+ 'Editor.getDiagnostics': getDiagnostics$1,
10693
10703
  'Editor.getText': getText,
10694
10704
  'Editor.getUri': getUri,
10695
10705
  'Editor.getWordAt': getWordAt$1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "12.1.0",
3
+ "version": "12.2.0",
4
4
  "license": "MIT",
5
5
  "author": "Lvce Editor",
6
6
  "type": "module",