@lvce-editor/editor-worker 19.68.1 → 19.68.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.
@@ -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) => {
@@ -11748,6 +11748,9 @@ const writeClipboardImage = async (editor, blob) => {
11748
11748
  for (let index = 0; index < 1000; index++) {
11749
11749
  const fileName = index === 0 ? `image.${extension}` : `image-${index}.${extension}`;
11750
11750
  const uri = getImageUri(editor.uri, fileName);
11751
+ if (await invoke$9(editor.applicationId, 'FileSystem.exists', uri)) {
11752
+ continue;
11753
+ }
11751
11754
  try {
11752
11755
  await invoke$9(editor.applicationId, 'FileSystem.createFile', uri);
11753
11756
  } catch (error) {
@@ -16493,8 +16496,16 @@ const horizontalScrollBarThumbNode = {
16493
16496
  className: mergeClassNames('ScrollBarThumb', 'ScrollBarThumbHorizontal'),
16494
16497
  type: Div
16495
16498
  };
16496
- const getScrollBarVirtualDom = () => {
16497
- return [verticalScrollBarNode, verticalScrollBarThumbNode, horizontalScrollBarNode, horizontalScrollBarThumbNode];
16499
+ const getScrollBarVirtualDom = (scrollBarHeight, scrollBarWidth) => {
16500
+ const hasVerticalThumb = scrollBarHeight > 0;
16501
+ const hasHorizontalThumb = scrollBarWidth > 0;
16502
+ return [{
16503
+ ...verticalScrollBarNode,
16504
+ childCount: hasVerticalThumb ? 1 : 0
16505
+ }, ...(hasVerticalThumb ? [verticalScrollBarThumbNode] : []), {
16506
+ ...horizontalScrollBarNode,
16507
+ childCount: hasHorizontalThumb ? 1 : 0
16508
+ }, ...(hasHorizontalThumb ? [horizontalScrollBarThumbNode] : [])];
16498
16509
  };
16499
16510
 
16500
16511
  const editorContentNode = {
@@ -16518,6 +16529,8 @@ const getEditorContentVirtualDom = ({
16518
16529
  problemsHighlightedRow = -1,
16519
16530
  roundedSelection = false,
16520
16531
  scrollBarDiagnostics = [],
16532
+ scrollBarHeight = 0,
16533
+ scrollBarWidth = 0,
16521
16534
  selectionInfos = [],
16522
16535
  textInfos,
16523
16536
  visibleLineIndices = [],
@@ -16526,7 +16539,7 @@ const getEditorContentVirtualDom = ({
16526
16539
  return [{
16527
16540
  ...editorContentNode,
16528
16541
  className: breadcrumbsEnabled ? 'EditorContent EditorBreadcrumbsOffset' : 'EditorContent'
16529
- }, ...getEditorInputVirtualDom(), ...getEditorLayersVirtualDom(selectionInfos, textInfos, differences, lineNumbers, highlightedLine, cursorInfos, diagnostics, visibleLineIndices, endOfLineDecorations, bracketMatchInfos, focused, visibleViewLineIndices, problemsHighlightedRow, roundedSelection), ...getEditorScrollBarDiagnosticsVirtualDom(scrollBarDiagnostics), ...getScrollBarVirtualDom()];
16542
+ }, ...getEditorInputVirtualDom(), ...getEditorLayersVirtualDom(selectionInfos, textInfos, differences, lineNumbers, highlightedLine, cursorInfos, diagnostics, visibleLineIndices, endOfLineDecorations, bracketMatchInfos, focused, visibleViewLineIndices, problemsHighlightedRow, roundedSelection), ...getEditorScrollBarDiagnosticsVirtualDom(scrollBarDiagnostics), ...getScrollBarVirtualDom(scrollBarHeight, scrollBarWidth)];
16530
16543
  };
16531
16544
 
16532
16545
  const getGutterInfoVirtualDom = (gutterInfo, activeLineNumber) => {
@@ -16692,6 +16705,8 @@ const getEditorVirtualDom = ({
16692
16705
  problemsHighlightedRow = -1,
16693
16706
  roundedSelection = false,
16694
16707
  scrollBarDiagnostics = [],
16708
+ scrollBarHeight = 0,
16709
+ scrollBarWidth = 0,
16695
16710
  selectionInfos = [],
16696
16711
  selections = new Uint32Array(),
16697
16712
  textInfos,
@@ -16747,6 +16762,8 @@ const getEditorVirtualDom = ({
16747
16762
  problemsHighlightedRow,
16748
16763
  roundedSelection,
16749
16764
  scrollBarDiagnostics,
16765
+ scrollBarHeight,
16766
+ scrollBarWidth,
16750
16767
  selectionInfos,
16751
16768
  textInfos: combineWhitespaceTokens$1 ? textInfos.map(combineWhitespaceTokens) : textInfos,
16752
16769
  visibleLineIndices: visibleLineIndices || [],
@@ -16770,8 +16787,11 @@ const getDom = state => {
16770
16787
  const {
16771
16788
  diagnostics = [],
16772
16789
  initial,
16790
+ longestLineWidth,
16791
+ minimumSliderSize,
16773
16792
  textInfos,
16774
- visualDecorations = []
16793
+ visualDecorations = [],
16794
+ width
16775
16795
  } = state;
16776
16796
  if (initial && textInfos.length === 0) {
16777
16797
  return [];
@@ -16779,7 +16799,8 @@ const getDom = state => {
16779
16799
  return getEditorVirtualDom({
16780
16800
  ...state,
16781
16801
  diagnostics: visualDecorations,
16782
- scrollBarDiagnostics: getScrollBarDiagnostics(state, diagnostics)
16802
+ scrollBarDiagnostics: getScrollBarDiagnostics(state, diagnostics),
16803
+ scrollBarWidth: getScrollBarSize(width, longestLineWidth, minimumSliderSize)
16783
16804
  });
16784
16805
  };
16785
16806
  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.1",
3
+ "version": "19.68.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@github.com:lvce-editor/editor-worker.git"