@lvce-editor/editor-worker 19.68.2 → 19.68.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.
@@ -5910,7 +5910,7 @@ const isEqual$3 = (oldState, newState) => {
5910
5910
  };
5911
5911
 
5912
5912
  const isEqual$2 = (oldState, newState) => {
5913
- return oldState.breadcrumbFileIcon === newState.breadcrumbFileIcon && oldState.breadcrumbsEnabled === newState.breadcrumbsEnabled && oldState.breakPoints === newState.breakPoints && oldState.bracketMatchInfos === newState.bracketMatchInfos && oldState.cursorInfos === newState.cursorInfos && oldState.diagnostics === newState.diagnostics && oldState.documentSymbols === newState.documentSymbols && oldState.endOfLineDecorations === newState.endOfLineDecorations && oldState.focused === newState.focused && oldState.gutterDecorations === newState.gutterDecorations && oldState.highlightActiveLineNumber === newState.highlightActiveLineNumber && oldState.highlightedLine === newState.highlightedLine && oldState.problemsHighlightedRow === newState.problemsHighlightedRow && oldState.lineNumbers === newState.lineNumbers && oldState.loadError === newState.loadError && oldState.textInfos === newState.textInfos && oldState.visibleViewLineIndices === newState.visibleViewLineIndices && oldState.differences === newState.differences && oldState.initial === newState.initial && oldState.selectionInfos === newState.selectionInfos && oldState.selections === newState.selections && oldState.workspaceUri === newState.workspaceUri;
5913
+ return oldState.breadcrumbFileIcon === newState.breadcrumbFileIcon && oldState.breadcrumbsEnabled === newState.breadcrumbsEnabled && oldState.breakPoints === newState.breakPoints && oldState.bracketMatchInfos === newState.bracketMatchInfos && oldState.cursorInfos === newState.cursorInfos && oldState.diagnostics === newState.diagnostics && oldState.documentSymbols === newState.documentSymbols && oldState.endOfLineDecorations === newState.endOfLineDecorations && oldState.focused === newState.focused && oldState.gutterDecorations === newState.gutterDecorations && oldState.highlightActiveLineNumber === newState.highlightActiveLineNumber && oldState.highlightedLine === newState.highlightedLine && oldState.problemsHighlightedRow === newState.problemsHighlightedRow && oldState.lineNumbers === newState.lineNumbers && oldState.loadError === newState.loadError && oldState.textInfos === newState.textInfos && oldState.visibleViewLineIndices === newState.visibleViewLineIndices && oldState.differences === newState.differences && oldState.initial === newState.initial && oldState.scrollBarHeight === newState.scrollBarHeight && oldState.width === newState.width && oldState.longestLineWidth === newState.longestLineWidth && oldState.minimumSliderSize === newState.minimumSliderSize && oldState.selectionInfos === newState.selectionInfos && oldState.selections === newState.selections && oldState.workspaceUri === newState.workspaceUri;
5914
5914
  };
5915
5915
 
5916
5916
  const isEqual$1 = (oldState, newState) => {
@@ -9929,9 +9929,6 @@ const getLineInfos = (lines, tokenizer, languageId) => {
9929
9929
  lineInfos.push(lineInfo);
9930
9930
  currentLineState = result;
9931
9931
  }
9932
- console.error({
9933
- lineInfos
9934
- });
9935
9932
  return lineInfos;
9936
9933
  };
9937
9934
 
@@ -16496,8 +16493,16 @@ const horizontalScrollBarThumbNode = {
16496
16493
  className: mergeClassNames('ScrollBarThumb', 'ScrollBarThumbHorizontal'),
16497
16494
  type: Div
16498
16495
  };
16499
- const getScrollBarVirtualDom = () => {
16500
- return [verticalScrollBarNode, verticalScrollBarThumbNode, horizontalScrollBarNode, horizontalScrollBarThumbNode];
16496
+ const getScrollBarVirtualDom = (scrollBarHeight, scrollBarWidth) => {
16497
+ const hasVerticalThumb = scrollBarHeight > 0;
16498
+ const hasHorizontalThumb = scrollBarWidth > 0;
16499
+ return [{
16500
+ ...verticalScrollBarNode,
16501
+ childCount: hasVerticalThumb ? 1 : 0
16502
+ }, ...(hasVerticalThumb ? [verticalScrollBarThumbNode] : []), {
16503
+ ...horizontalScrollBarNode,
16504
+ childCount: hasHorizontalThumb ? 1 : 0
16505
+ }, ...(hasHorizontalThumb ? [horizontalScrollBarThumbNode] : [])];
16501
16506
  };
16502
16507
 
16503
16508
  const editorContentNode = {
@@ -16521,6 +16526,8 @@ const getEditorContentVirtualDom = ({
16521
16526
  problemsHighlightedRow = -1,
16522
16527
  roundedSelection = false,
16523
16528
  scrollBarDiagnostics = [],
16529
+ scrollBarHeight = 0,
16530
+ scrollBarWidth = 0,
16524
16531
  selectionInfos = [],
16525
16532
  textInfos,
16526
16533
  visibleLineIndices = [],
@@ -16529,7 +16536,7 @@ const getEditorContentVirtualDom = ({
16529
16536
  return [{
16530
16537
  ...editorContentNode,
16531
16538
  className: breadcrumbsEnabled ? 'EditorContent EditorBreadcrumbsOffset' : 'EditorContent'
16532
- }, ...getEditorInputVirtualDom(), ...getEditorLayersVirtualDom(selectionInfos, textInfos, differences, lineNumbers, highlightedLine, cursorInfos, diagnostics, visibleLineIndices, endOfLineDecorations, bracketMatchInfos, focused, visibleViewLineIndices, problemsHighlightedRow, roundedSelection), ...getEditorScrollBarDiagnosticsVirtualDom(scrollBarDiagnostics), ...getScrollBarVirtualDom()];
16539
+ }, ...getEditorInputVirtualDom(), ...getEditorLayersVirtualDom(selectionInfos, textInfos, differences, lineNumbers, highlightedLine, cursorInfos, diagnostics, visibleLineIndices, endOfLineDecorations, bracketMatchInfos, focused, visibleViewLineIndices, problemsHighlightedRow, roundedSelection), ...getEditorScrollBarDiagnosticsVirtualDom(scrollBarDiagnostics), ...getScrollBarVirtualDom(scrollBarHeight, scrollBarWidth)];
16533
16540
  };
16534
16541
 
16535
16542
  const getGutterInfoVirtualDom = (gutterInfo, activeLineNumber) => {
@@ -16695,6 +16702,8 @@ const getEditorVirtualDom = ({
16695
16702
  problemsHighlightedRow = -1,
16696
16703
  roundedSelection = false,
16697
16704
  scrollBarDiagnostics = [],
16705
+ scrollBarHeight = 0,
16706
+ scrollBarWidth = 0,
16698
16707
  selectionInfos = [],
16699
16708
  selections = new Uint32Array(),
16700
16709
  textInfos,
@@ -16750,6 +16759,8 @@ const getEditorVirtualDom = ({
16750
16759
  problemsHighlightedRow,
16751
16760
  roundedSelection,
16752
16761
  scrollBarDiagnostics,
16762
+ scrollBarHeight,
16763
+ scrollBarWidth,
16753
16764
  selectionInfos,
16754
16765
  textInfos: combineWhitespaceTokens$1 ? textInfos.map(combineWhitespaceTokens) : textInfos,
16755
16766
  visibleLineIndices: visibleLineIndices || [],
@@ -16773,8 +16784,11 @@ const getDom = state => {
16773
16784
  const {
16774
16785
  diagnostics = [],
16775
16786
  initial,
16787
+ longestLineWidth,
16788
+ minimumSliderSize,
16776
16789
  textInfos,
16777
- visualDecorations = []
16790
+ visualDecorations = [],
16791
+ width
16778
16792
  } = state;
16779
16793
  if (initial && textInfos.length === 0) {
16780
16794
  return [];
@@ -16782,7 +16796,8 @@ const getDom = state => {
16782
16796
  return getEditorVirtualDom({
16783
16797
  ...state,
16784
16798
  diagnostics: visualDecorations,
16785
- scrollBarDiagnostics: getScrollBarDiagnostics(state, diagnostics)
16799
+ scrollBarDiagnostics: getScrollBarDiagnostics(state, diagnostics),
16800
+ scrollBarWidth: getScrollBarSize(width, longestLineWidth, minimumSliderSize)
16786
16801
  });
16787
16802
  };
16788
16803
  const mergeConflictsEqual = (oldState, newState) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/editor-worker",
3
- "version": "19.68.2",
3
+ "version": "19.68.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"