@lvce-editor/editor-worker 12.0.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
 
@@ -8590,8 +8592,9 @@ const {
8590
8592
  toggleDetails: toggleDetails$1,
8591
8593
  closeDetails: closeDetails$1,
8592
8594
  handleWheel: handleWheel$1,
8593
- close: close$4
8594
- } = createFns(['handleEditorType', 'focusFirst', 'focusNext', 'focusPrevious', 'focusLast', 'handleEditorDeleteLeft', 'openDetails', 'focusIndex', 'handleEditorBlur', 'handleEditorClick', 'openDetails', 'selectCurrent', 'selectIndex', 'toggleDetails', 'closeDetails', 'handleWheel', 'close'], 'Completions', Completion);
8595
+ close: close$4,
8596
+ handlePointerDown
8597
+ } = createFns(['handleEditorType', 'focusFirst', 'focusNext', 'focusPrevious', 'focusLast', 'handleEditorDeleteLeft', 'openDetails', 'focusIndex', 'handleEditorBlur', 'handleEditorClick', 'openDetails', 'selectCurrent', 'selectIndex', 'toggleDetails', 'closeDetails', 'handleWheel', 'close', 'handlePointerDown'], 'Completions', Completion);
8595
8598
 
8596
8599
  const EditorCompletionWidget = {
8597
8600
  __proto__: null,
@@ -8607,6 +8610,7 @@ const EditorCompletionWidget = {
8607
8610
  handleEditorClick,
8608
8611
  handleEditorDeleteLeft: handleEditorDeleteLeft$1,
8609
8612
  handleEditorType: handleEditorType$1,
8613
+ handlePointerDown,
8610
8614
  handleWheel: handleWheel$1,
8611
8615
  openDetails,
8612
8616
  remove: remove$7,
@@ -9350,6 +9354,13 @@ const getSourceActions = async editorUid => {
9350
9354
  const actions = await getEditorSourceActions(editorUid);
9351
9355
  return actions;
9352
9356
  };
9357
+ const getDiagnostics$1 = async editorUid => {
9358
+ const editor = getEditor(editorUid);
9359
+ const {
9360
+ diagnostics
9361
+ } = editor;
9362
+ return diagnostics;
9363
+ };
9353
9364
 
9354
9365
  const pending = Object.create(null);
9355
9366
  const loaded = Object.create(null);
@@ -10555,7 +10566,7 @@ const editorDiagnosticEffect = {
10555
10566
  }
10556
10567
  };
10557
10568
 
10558
- 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'
10559
10570
  // 'ColorPicker.handleSliderPointerDown',
10560
10571
  // 'ColorPicker.handleSliderPointerMove',
10561
10572
  // 'ColorPicker.loadContent',
@@ -10688,6 +10699,7 @@ const commandMap = {
10688
10699
  'Editor.getQuickPickMenuEntries': getQuickPickMenuEntries,
10689
10700
  'Editor.getSelections': getSelections,
10690
10701
  'Editor.getSelections2': getSelections2,
10702
+ 'Editor.getDiagnostics': getDiagnostics$1,
10691
10703
  'Editor.getText': getText,
10692
10704
  'Editor.getUri': getUri,
10693
10705
  'Editor.getWordAt': getWordAt$1,
@@ -10801,6 +10813,7 @@ const commandMap = {
10801
10813
  'EditorCompletion.selectCurrent': selectCurrent$1,
10802
10814
  'EditorCompletion.selectIndex': selectIndex$1,
10803
10815
  'EditorCompletion.toggleDetails': toggleDetails$1,
10816
+ 'EditorCompletion.handlePointerDown': handlePointerDown,
10804
10817
  'EditorSourceAction.close': close$1,
10805
10818
  'EditorSourceAction.closeDetails': closeDetails,
10806
10819
  'EditorSourceAction.focusFirst': focusFirst,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "12.0.0",
3
+ "version": "12.2.0",
4
4
  "license": "MIT",
5
5
  "author": "Lvce Editor",
6
6
  "type": "module",