@lvce-editor/editor-worker 19.69.7 → 19.69.8

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)
@@ -10071,6 +10076,7 @@ const handleMouseLeave = (viewletUid, editorUidValue) => {
10071
10076
  const newEditor = {
10072
10077
  ...latestEditor,
10073
10078
  additionalFocus: 0,
10079
+ focus: FocusEditorText$1,
10074
10080
  focused: true,
10075
10081
  widgetRevision: next(editorUid),
10076
10082
  widgets: removeEditorWidget(latestEditor.widgets, Hover)
@@ -14126,6 +14132,7 @@ const HandleMergeConflictActionClick = 36;
14126
14132
  const HandleMergeConflictActionsMouseDown = 37;
14127
14133
  const HandleMouseOut = 38;
14128
14134
  const HandleMouseOver = 39;
14135
+ const HandleHoverMouseDown = 40;
14129
14136
 
14130
14137
  const Button$1 = 1;
14131
14138
  const Div = 4;
@@ -14430,6 +14437,8 @@ const mergeClassNames = (...classNames) => {
14430
14437
  return classNames.filter(Boolean).join(' ');
14431
14438
  };
14432
14439
 
14440
+ const Focusable = 0;
14441
+
14433
14442
  const hoverProblemMessage = {
14434
14443
  childCount: 1,
14435
14444
  className: HoverProblemMessage,
@@ -14466,8 +14475,10 @@ const getHoverVirtualDom = (lineInfos, documentationVirtualDom, diagnostics, edi
14466
14475
  childCount: getChildCount$1(lineInfos, documentationVirtualDom, diagnostics) + 1,
14467
14476
  className: getEditorHoverClassName(lineInfos, documentationVirtualDom, diagnostics),
14468
14477
  'data-uid': editorUid,
14478
+ onMouseDown: HandleHoverMouseDown,
14469
14479
  onMouseOut: HandleMouseOut,
14470
14480
  onMouseOver: HandleMouseOver,
14481
+ tabIndex: Focusable,
14471
14482
  type: Div
14472
14483
  });
14473
14484
  if (diagnostics && diagnostics.length > 0) {
@@ -17649,6 +17660,10 @@ const renderEditor = async id => {
17649
17660
 
17650
17661
  const renderEventListeners = () => {
17651
17662
  return [{
17663
+ name: HandleHoverMouseDown,
17664
+ params: [],
17665
+ stopPropagation: true
17666
+ }, {
17652
17667
  name: HandleLightBulbClick,
17653
17668
  params: ['showSourceActions3'],
17654
17669
  preventDefault: true
@@ -18525,8 +18540,6 @@ const EditorColorPickerWidget = {
18525
18540
  render: render$4
18526
18541
  };
18527
18542
 
18528
- const Focusable = 0;
18529
-
18530
18543
  const completionDetailNode = {
18531
18544
  childCount: 2,
18532
18545
  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.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"