@lvce-editor/editor-worker 19.69.7 → 19.69.9

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.
@@ -7592,16 +7592,20 @@ const handleBlur$1 = async editor => {
7592
7592
  return editor;
7593
7593
  }
7594
7594
  const widgetRevision = next(editor.uid);
7595
+ const hoverWidget = editor.widgets?.find(widget => widget.id === Hover);
7595
7596
  const completionWidgetDismissedOnBlur = hasWidget([...(editor.widgets || [])], Completion);
7596
7597
  const newEditor = {
7597
7598
  ...editor,
7598
- additionalFocus: 0,
7599
+ additionalFocus: hoverWidget ? FocusEditorHover : 0,
7599
7600
  ...(completionWidgetDismissedOnBlur && {
7600
7601
  completionWidgetDismissedOnBlur: true
7601
7602
  }),
7603
+ ...(hoverWidget && {
7604
+ focus: Empty
7605
+ }),
7602
7606
  focused: false,
7603
7607
  widgetRevision,
7604
- widgets: closeWidgetsMaybe(editor.widgets || [])
7608
+ widgets: hoverWidget ? [...closeWidgetsMaybe(editor.widgets || []), hoverWidget] : closeWidgetsMaybe(editor.widgets || [])
7605
7609
  };
7606
7610
  if (!editor.modified || isUntitledFile(editor.uri)) {
7607
7611
  return newEditor;
@@ -7732,6 +7736,7 @@ const cancelSelection = editor => {
7732
7736
  return {
7733
7737
  ...editor,
7734
7738
  additionalFocus: 0,
7739
+ focus: FocusEditorText$1,
7735
7740
  focused: true,
7736
7741
  widgetRevision: next(editor.uid),
7737
7742
  widgets: removeEditorWidget(widgets, Hover)
@@ -9324,6 +9329,7 @@ const EditorDecrementSelection = 'Editor: Decrement Selection';
9324
9329
  const EditorFormatDocumentForced = 'Editor: Format Document (forced)';
9325
9330
  const EditorGoToDefinition = 'Editor: Go To Definition';
9326
9331
  const EditorGoToTypeDefinition = 'Editor: Go To Type Definition';
9332
+ const EditorOrganizeImports = 'Editor: Organize Imports';
9327
9333
  const EditorIndent = 'Editor: Indent';
9328
9334
  const EditorIncrementSelection = 'Editor: Increment Selection';
9329
9335
  const EditorOpenColorPicker = 'Editor: Open Color Picker';
@@ -9390,6 +9396,9 @@ const noTypeDefinitionFound = () => {
9390
9396
  const sourceAction = () => {
9391
9397
  return i18nString(SourceAction);
9392
9398
  };
9399
+ const editorOrganizeImports = () => {
9400
+ return i18nString(EditorOrganizeImports);
9401
+ };
9393
9402
  const escapeToClose = () => {
9394
9403
  return i18nString(EscapeToClose);
9395
9404
  };
@@ -10071,6 +10080,7 @@ const handleMouseLeave = (viewletUid, editorUidValue) => {
10071
10080
  const newEditor = {
10072
10081
  ...latestEditor,
10073
10082
  additionalFocus: 0,
10083
+ focus: FocusEditorText$1,
10074
10084
  focused: true,
10075
10085
  widgetRevision: next(editorUid),
10076
10086
  widgets: removeEditorWidget(latestEditor.widgets, Hover)
@@ -14126,6 +14136,7 @@ const HandleMergeConflictActionClick = 36;
14126
14136
  const HandleMergeConflictActionsMouseDown = 37;
14127
14137
  const HandleMouseOut = 38;
14128
14138
  const HandleMouseOver = 39;
14139
+ const HandleHoverMouseDown = 40;
14129
14140
 
14130
14141
  const Button$1 = 1;
14131
14142
  const Div = 4;
@@ -14430,6 +14441,8 @@ const mergeClassNames = (...classNames) => {
14430
14441
  return classNames.filter(Boolean).join(' ');
14431
14442
  };
14432
14443
 
14444
+ const Focusable = 0;
14445
+
14433
14446
  const hoverProblemMessage = {
14434
14447
  childCount: 1,
14435
14448
  className: HoverProblemMessage,
@@ -14466,8 +14479,10 @@ const getHoverVirtualDom = (lineInfos, documentationVirtualDom, diagnostics, edi
14466
14479
  childCount: getChildCount$1(lineInfos, documentationVirtualDom, diagnostics) + 1,
14467
14480
  className: getEditorHoverClassName(lineInfos, documentationVirtualDom, diagnostics),
14468
14481
  'data-uid': editorUid,
14482
+ onMouseDown: HandleHoverMouseDown,
14469
14483
  onMouseOut: HandleMouseOut,
14470
14484
  onMouseOver: HandleMouseOver,
14485
+ tabIndex: Focusable,
14471
14486
  type: Div
14472
14487
  });
14473
14488
  if (diagnostics && diagnostics.length > 0) {
@@ -15365,6 +15380,9 @@ const getQuickPickMenuEntries = () => {
15365
15380
  }, {
15366
15381
  id: 'Editor.format',
15367
15382
  label: formatDocument()
15383
+ }, {
15384
+ id: 'Editor.organizeImports',
15385
+ label: editorOrganizeImports()
15368
15386
  }, {
15369
15387
  id: 'Editor.showHover',
15370
15388
  label: editorShowHover()
@@ -17649,6 +17667,10 @@ const renderEditor = async id => {
17649
17667
 
17650
17668
  const renderEventListeners = () => {
17651
17669
  return [{
17670
+ name: HandleHoverMouseDown,
17671
+ params: [],
17672
+ stopPropagation: true
17673
+ }, {
17652
17674
  name: HandleLightBulbClick,
17653
17675
  params: ['showSourceActions3'],
17654
17676
  preventDefault: true
@@ -18525,8 +18547,6 @@ const EditorColorPickerWidget = {
18525
18547
  render: render$4
18526
18548
  };
18527
18549
 
18528
- const Focusable = 0;
18529
-
18530
18550
  const completionDetailNode = {
18531
18551
  childCount: 2,
18532
18552
  className: mergeClassNames('Viewlet', 'EditorCompletionDetails'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "19.69.7",
3
+ "version": "19.69.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"