@lvce-editor/editor-worker 19.67.2 → 19.67.3

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.
@@ -15372,12 +15372,14 @@ const getCss = (uid, rowHeight, scrollBarHeight, scrollBarTop, scrollBarWidth, s
15372
15372
  const scrollOffset = getScrollOffset(deltaY, rowHeight);
15373
15373
  const translate = scrollOffset === 0 ? 'none' : `0px -${scrollOffset}px`;
15374
15374
  return `${editorSelector} {
15375
+ --EditorRowContain: size style;
15375
15376
  --EditorRowHeight: ${rowHeight}px;
15376
15377
  --ScrollBarHeight: ${scrollBarHeight}px;
15377
15378
  --ScrollBarTop: ${scrollBarTop}px;
15378
15379
  --ScrollBarWidth: ${scrollBarWidth}px;
15379
15380
  --ScrollBarLeft: ${scrollBarLeft}px;
15380
15381
  }
15382
+ .EditorRow { contain: var(--EditorRowContain, strict); }
15381
15383
  ${editorSelector} .SelectionTopLeft { border-top-left-radius: 3px; }
15382
15384
  ${editorSelector} .SelectionTopRight { border-top-right-radius: 3px; }
15383
15385
  ${editorSelector} .SelectionBottomRight { border-bottom-right-radius: 3px; }
@@ -15396,15 +15398,6 @@ ${editorSelector} .GutterRows {
15396
15398
  display: flex;
15397
15399
  flex-direction: column;
15398
15400
  }
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
15401
  ${editorSelector} .MergeConflictActions,
15409
15402
  ${editorSelector} .MergeConflictActionsGutter {
15410
15403
  box-sizing: border-box;
@@ -15445,10 +15438,6 @@ ${editorSelector} .EditorLineDecoration {
15445
15438
  margin-left: 2em;
15446
15439
  user-select: none;
15447
15440
  }
15448
- ${editorSelector} .LineNumber {
15449
- contain: content;
15450
- position: relative;
15451
- }
15452
15441
  ${editorSelector} .EditorGutterDecoration {
15453
15442
  bottom: 0;
15454
15443
  left: 0;
@@ -15988,6 +15977,7 @@ const editorContentNode = {
15988
15977
  };
15989
15978
  const getEditorContentVirtualDom = ({
15990
15979
  bracketMatchInfos = [],
15980
+ breadcrumbsEnabled = false,
15991
15981
  cursorInfos = [],
15992
15982
  diagnostics = [],
15993
15983
  differences,
@@ -16003,7 +15993,10 @@ const getEditorContentVirtualDom = ({
16003
15993
  visibleLineIndices = [],
16004
15994
  visibleViewLineIndices = []
16005
15995
  }) => {
16006
- return [editorContentNode, ...getEditorInputVirtualDom(), ...getEditorLayersVirtualDom(selectionInfos, textInfos, differences, lineNumbers, highlightedLine, cursorInfos, diagnostics, visibleLineIndices, endOfLineDecorations, bracketMatchInfos, focused, visibleViewLineIndices, problemsHighlightedRow, roundedSelection), ...getEditorScrollBarDiagnosticsVirtualDom(scrollBarDiagnostics), ...getScrollBarVirtualDom()];
15996
+ return [{
15997
+ ...editorContentNode,
15998
+ className: breadcrumbsEnabled ? 'EditorContent EditorBreadcrumbsOffset' : 'EditorContent'
15999
+ }, ...getEditorInputVirtualDom(), ...getEditorLayersVirtualDom(selectionInfos, textInfos, differences, lineNumbers, highlightedLine, cursorInfos, diagnostics, visibleLineIndices, endOfLineDecorations, bracketMatchInfos, focused, visibleViewLineIndices, problemsHighlightedRow, roundedSelection), ...getEditorScrollBarDiagnosticsVirtualDom(scrollBarDiagnostics), ...getScrollBarVirtualDom()];
16007
16000
  };
16008
16001
 
16009
16002
  const getGutterInfoVirtualDom = (gutterInfo, activeLineNumber) => {
@@ -16057,11 +16050,11 @@ const getEditorGutterVirtualDom$1 = (gutterInfos, activeLineNumber = -1) => {
16057
16050
  }, ...dom];
16058
16051
  };
16059
16052
 
16060
- const getEditorGutterVirtualDom = (gutterInfos, activeLineNumber = -1) => {
16053
+ const getEditorGutterVirtualDom = (gutterInfos, activeLineNumber = -1, breadcrumbsEnabled = false) => {
16061
16054
  const gutterDom = getEditorGutterVirtualDom$1([...gutterInfos], activeLineNumber);
16062
16055
  return [{
16063
16056
  childCount: gutterInfos.length === 0 ? 0 : 1,
16064
- className: 'Gutter',
16057
+ className: breadcrumbsEnabled ? 'Gutter EditorBreadcrumbsOffset' : 'Gutter',
16065
16058
  type: Div
16066
16059
  }, ...gutterDom];
16067
16060
  };
@@ -16128,14 +16121,14 @@ const textEditorErrorMessageNode = {
16128
16121
  className: 'TextEditorErrorMessage',
16129
16122
  type: Div
16130
16123
  };
16131
- const getMinimapVirtualDom = (minimapEnabled, minimapLines, minLineY) => {
16124
+ const getMinimapVirtualDom = (minimapEnabled, minimapLines, minLineY, breadcrumbsEnabled) => {
16132
16125
  if (!minimapEnabled) {
16133
16126
  return [];
16134
16127
  }
16135
16128
  return [{
16136
16129
  ariaHidden: True,
16137
16130
  childCount: 0,
16138
- className: 'EditorMinimap',
16131
+ className: breadcrumbsEnabled ? 'EditorMinimap EditorBreadcrumbsOffset' : 'EditorMinimap',
16139
16132
  'data-lineCount': minimapLines.length,
16140
16133
  'data-visibleStart': minLineY,
16141
16134
  type: Div
@@ -16191,8 +16184,8 @@ const getEditorVirtualDom = ({
16191
16184
  const showGutter = lineNumbers || breakPoints.length > 0 || lightBulbRowIndex >= 0 || gutterDecorations.length > 0;
16192
16185
  const primaryCursorRowIndex = getPrimaryCursorRowIndex(selections, primarySelectionIndex);
16193
16186
  const activeLineNumber = highlightActiveLineNumber ? primaryCursorRowIndex + 1 : -1;
16194
- const gutterDom = showGutter ? getEditorGutterVirtualDom(visibleGutterInfos, activeLineNumber) : [];
16195
- const minimapDom = getMinimapVirtualDom(minimapEnabled, minimapLines, minLineY);
16187
+ const gutterDom = showGutter ? getEditorGutterVirtualDom(visibleGutterInfos, activeLineNumber, breadcrumbsEnabled) : [];
16188
+ const minimapDom = getMinimapVirtualDom(minimapEnabled, minimapLines, minLineY, breadcrumbsEnabled);
16196
16189
  const breadcrumbsDom = breadcrumbsEnabled ? getEditorBreadcrumbsVirtualDom({
16197
16190
  breadcrumbsEnabled,
16198
16191
  documentSymbols,
@@ -16211,6 +16204,7 @@ const getEditorVirtualDom = ({
16211
16204
  type: Div
16212
16205
  }, ...breadcrumbsDom, ...gutterDom, ...getEditorContentVirtualDom({
16213
16206
  bracketMatchInfos,
16207
+ breadcrumbsEnabled,
16214
16208
  cursorInfos,
16215
16209
  diagnostics,
16216
16210
  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.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"