@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.
- package/dist/editorWorkerMain.js +6 -1
- package/package.json +1 -1
package/dist/editorWorkerMain.js
CHANGED
|
@@ -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:
|
|
11284
|
+
className: getEditorHoverClassName(lineInfos, documentation, diagnostics),
|
|
11280
11285
|
type: Div
|
|
11281
11286
|
});
|
|
11282
11287
|
if (diagnostics && diagnostics.length > 0) {
|