@lvce-editor/editor-worker 19.30.7 → 19.30.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.
@@ -11154,6 +11154,7 @@ const CompletionDetailCloseButton = 'CompletionDetailCloseButton';
11154
11154
  const CompletionDetailContent = 'CompletionDetailContent';
11155
11155
  const Diagnostic = 'Diagnostic';
11156
11156
  const EditorCursor = 'EditorCursor';
11157
+ const EditorHoverDiagnosticOnly = 'EditorHoverDiagnosticOnly';
11157
11158
  const EditorRow = 'EditorRow';
11158
11159
  const EditorRowHighlighted = 'EditorRowHighlighted';
11159
11160
  const EditorSelection = 'EditorSelection';
@@ -11272,11 +11273,15 @@ const getChildCount = (lineInfos, documentation, diagnostics) => {
11272
11273
  const diagnosticsCount = diagnostics && diagnostics.length > 0 ? 1 : 0;
11273
11274
  return lineInfos.length + documentationCount + diagnosticsCount;
11274
11275
  };
11276
+ const getEditorHoverClassName = (lineInfos, documentation, diagnostics) => {
11277
+ const isDiagnosticOnly = diagnostics?.length === 1 && lineInfos.length === 0 && !documentation;
11278
+ return mergeClassNames('Viewlet', 'EditorHover', isDiagnosticOnly ? EditorHoverDiagnosticOnly : '');
11279
+ };
11275
11280
  const getHoverVirtualDom = (lineInfos, documentation, diagnostics) => {
11276
11281
  const dom = [];
11277
11282
  dom.push({
11278
11283
  childCount: getChildCount(lineInfos, documentation, diagnostics) + 1,
11279
- className: mergeClassNames('Viewlet', 'EditorHover'),
11284
+ className: getEditorHoverClassName(lineInfos, documentation, diagnostics),
11280
11285
  type: Div
11281
11286
  });
11282
11287
  if (diagnostics && diagnostics.length > 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "19.30.7",
3
+ "version": "19.30.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"