@lvce-editor/editor-worker 19.67.2 → 19.67.4

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.
@@ -6177,6 +6177,11 @@ const disposeEditor = async editorUid => {
6177
6177
  }
6178
6178
  // Invalidate the registry before awaiting widget or worker cleanup.
6179
6179
  dispose$6(editorUid);
6180
+ try {
6181
+ await invoke$9(editor.applicationId, 'Layout.handleDiagnosticsChange', editor.uri);
6182
+ } catch {
6183
+ // Older renderer workers do not support diagnostics change listeners.
6184
+ }
6180
6185
  dispose$2(editorUid);
6181
6186
  dispose$4(editorUid);
6182
6187
  clear$1(editorUid);
@@ -15372,12 +15377,14 @@ const getCss = (uid, rowHeight, scrollBarHeight, scrollBarTop, scrollBarWidth, s
15372
15377
  const scrollOffset = getScrollOffset(deltaY, rowHeight);
15373
15378
  const translate = scrollOffset === 0 ? 'none' : `0px -${scrollOffset}px`;
15374
15379
  return `${editorSelector} {
15380
+ --EditorRowContain: size style;
15375
15381
  --EditorRowHeight: ${rowHeight}px;
15376
15382
  --ScrollBarHeight: ${scrollBarHeight}px;
15377
15383
  --ScrollBarTop: ${scrollBarTop}px;
15378
15384
  --ScrollBarWidth: ${scrollBarWidth}px;
15379
15385
  --ScrollBarLeft: ${scrollBarLeft}px;
15380
15386
  }
15387
+ .EditorRow { contain: var(--EditorRowContain, strict); }
15381
15388
  ${editorSelector} .SelectionTopLeft { border-top-left-radius: 3px; }
15382
15389
  ${editorSelector} .SelectionTopRight { border-top-right-radius: 3px; }
15383
15390
  ${editorSelector} .SelectionBottomRight { border-bottom-right-radius: 3px; }
@@ -15396,15 +15403,6 @@ ${editorSelector} .GutterRows {
15396
15403
  display: flex;
15397
15404
  flex-direction: column;
15398
15405
  }
15399
- ${editorSelector} .EditorRow,
15400
- ${editorSelector} .LineNumber {
15401
- flex: none;
15402
- }
15403
- ${editorSelector} .EditorRow {
15404
- contain: size style;
15405
- height: var(--EditorRowHeight);
15406
- line-height: var(--EditorRowHeight);
15407
- }
15408
15406
  ${editorSelector} .MergeConflictActions,
15409
15407
  ${editorSelector} .MergeConflictActionsGutter {
15410
15408
  box-sizing: border-box;
@@ -15445,10 +15443,6 @@ ${editorSelector} .EditorLineDecoration {
15445
15443
  margin-left: 2em;
15446
15444
  user-select: none;
15447
15445
  }
15448
- ${editorSelector} .LineNumber {
15449
- contain: content;
15450
- position: relative;
15451
- }
15452
15446
  ${editorSelector} .EditorGutterDecoration {
15453
15447
  bottom: 0;
15454
15448
  left: 0;
@@ -15988,6 +15982,7 @@ const editorContentNode = {
15988
15982
  };
15989
15983
  const getEditorContentVirtualDom = ({
15990
15984
  bracketMatchInfos = [],
15985
+ breadcrumbsEnabled = false,
15991
15986
  cursorInfos = [],
15992
15987
  diagnostics = [],
15993
15988
  differences,
@@ -16003,7 +15998,10 @@ const getEditorContentVirtualDom = ({
16003
15998
  visibleLineIndices = [],
16004
15999
  visibleViewLineIndices = []
16005
16000
  }) => {
16006
- return [editorContentNode, ...getEditorInputVirtualDom(), ...getEditorLayersVirtualDom(selectionInfos, textInfos, differences, lineNumbers, highlightedLine, cursorInfos, diagnostics, visibleLineIndices, endOfLineDecorations, bracketMatchInfos, focused, visibleViewLineIndices, problemsHighlightedRow, roundedSelection), ...getEditorScrollBarDiagnosticsVirtualDom(scrollBarDiagnostics), ...getScrollBarVirtualDom()];
16001
+ return [{
16002
+ ...editorContentNode,
16003
+ className: breadcrumbsEnabled ? 'EditorContent EditorBreadcrumbsOffset' : 'EditorContent'
16004
+ }, ...getEditorInputVirtualDom(), ...getEditorLayersVirtualDom(selectionInfos, textInfos, differences, lineNumbers, highlightedLine, cursorInfos, diagnostics, visibleLineIndices, endOfLineDecorations, bracketMatchInfos, focused, visibleViewLineIndices, problemsHighlightedRow, roundedSelection), ...getEditorScrollBarDiagnosticsVirtualDom(scrollBarDiagnostics), ...getScrollBarVirtualDom()];
16007
16005
  };
16008
16006
 
16009
16007
  const getGutterInfoVirtualDom = (gutterInfo, activeLineNumber) => {
@@ -16057,11 +16055,11 @@ const getEditorGutterVirtualDom$1 = (gutterInfos, activeLineNumber = -1) => {
16057
16055
  }, ...dom];
16058
16056
  };
16059
16057
 
16060
- const getEditorGutterVirtualDom = (gutterInfos, activeLineNumber = -1) => {
16058
+ const getEditorGutterVirtualDom = (gutterInfos, activeLineNumber = -1, breadcrumbsEnabled = false) => {
16061
16059
  const gutterDom = getEditorGutterVirtualDom$1([...gutterInfos], activeLineNumber);
16062
16060
  return [{
16063
16061
  childCount: gutterInfos.length === 0 ? 0 : 1,
16064
- className: 'Gutter',
16062
+ className: breadcrumbsEnabled ? 'Gutter EditorBreadcrumbsOffset' : 'Gutter',
16065
16063
  type: Div
16066
16064
  }, ...gutterDom];
16067
16065
  };
@@ -16128,14 +16126,14 @@ const textEditorErrorMessageNode = {
16128
16126
  className: 'TextEditorErrorMessage',
16129
16127
  type: Div
16130
16128
  };
16131
- const getMinimapVirtualDom = (minimapEnabled, minimapLines, minLineY) => {
16129
+ const getMinimapVirtualDom = (minimapEnabled, minimapLines, minLineY, breadcrumbsEnabled) => {
16132
16130
  if (!minimapEnabled) {
16133
16131
  return [];
16134
16132
  }
16135
16133
  return [{
16136
16134
  ariaHidden: True,
16137
16135
  childCount: 0,
16138
- className: 'EditorMinimap',
16136
+ className: breadcrumbsEnabled ? 'EditorMinimap EditorBreadcrumbsOffset' : 'EditorMinimap',
16139
16137
  'data-lineCount': minimapLines.length,
16140
16138
  'data-visibleStart': minLineY,
16141
16139
  type: Div
@@ -16191,8 +16189,8 @@ const getEditorVirtualDom = ({
16191
16189
  const showGutter = lineNumbers || breakPoints.length > 0 || lightBulbRowIndex >= 0 || gutterDecorations.length > 0;
16192
16190
  const primaryCursorRowIndex = getPrimaryCursorRowIndex(selections, primarySelectionIndex);
16193
16191
  const activeLineNumber = highlightActiveLineNumber ? primaryCursorRowIndex + 1 : -1;
16194
- const gutterDom = showGutter ? getEditorGutterVirtualDom(visibleGutterInfos, activeLineNumber) : [];
16195
- const minimapDom = getMinimapVirtualDom(minimapEnabled, minimapLines, minLineY);
16192
+ const gutterDom = showGutter ? getEditorGutterVirtualDom(visibleGutterInfos, activeLineNumber, breadcrumbsEnabled) : [];
16193
+ const minimapDom = getMinimapVirtualDom(minimapEnabled, minimapLines, minLineY, breadcrumbsEnabled);
16196
16194
  const breadcrumbsDom = breadcrumbsEnabled ? getEditorBreadcrumbsVirtualDom({
16197
16195
  breadcrumbsEnabled,
16198
16196
  documentSymbols,
@@ -16211,6 +16209,7 @@ const getEditorVirtualDom = ({
16211
16209
  type: Div
16212
16210
  }, ...breadcrumbsDom, ...gutterDom, ...getEditorContentVirtualDom({
16213
16211
  bracketMatchInfos,
16212
+ breadcrumbsEnabled,
16214
16213
  cursorInfos,
16215
16214
  diagnostics,
16216
16215
  differences,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "19.67.2",
3
+ "version": "19.67.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"