@lvce-editor/renderer-process 5.0.1 → 6.1.0

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.
@@ -2677,7 +2677,6 @@ const setHeight = ($Element, height) => {
2677
2677
 
2678
2678
  const FocusDebugInput = 6;
2679
2679
  const FocusEditorRename = 11;
2680
- const FocusExplorer = 13;
2681
2680
  const FocusExplorerEditBox = 14;
2682
2681
  const FocusLocationList = 17;
2683
2682
  const FocusMenu = 18;
@@ -4987,7 +4986,7 @@ const ModuleWorkerAndMessagePort = 8;
4987
4986
  const getData$1 = event => {
4988
4987
  return event.data;
4989
4988
  };
4990
- const attachEvents$d = that => {
4989
+ const attachEvents$c = that => {
4991
4990
  const handleMessage = (...args) => {
4992
4991
  const data = that.getData(...args);
4993
4992
  that.dispatchEvent(new MessageEvent('message', {
@@ -5004,7 +5003,7 @@ class Ipc extends EventTarget {
5004
5003
  constructor(rawIpc) {
5005
5004
  super();
5006
5005
  this._rawIpc = rawIpc;
5007
- attachEvents$d(this);
5006
+ attachEvents$c(this);
5008
5007
  }
5009
5008
  }
5010
5009
  const readyMessage = 'ready';
@@ -5773,11 +5772,11 @@ const ViewletActivityBarEvents = {
5773
5772
  returnValue: returnValue$6
5774
5773
  };
5775
5774
 
5776
- const Events$9 = ViewletActivityBarEvents;
5775
+ const Events$a = ViewletActivityBarEvents;
5777
5776
 
5778
5777
  const ViewletActivityBar = {
5779
5778
  __proto__: null,
5780
- Events: Events$9
5779
+ Events: Events$a
5781
5780
  };
5782
5781
 
5783
5782
  const executeViewletCommand = (uid, command, ...args) => {
@@ -5820,6 +5819,7 @@ const handleClick$9 = forwardViewletCommand('handleClick');
5820
5819
  const handleClickAction$2 = forwardViewletCommand('handleClickAction');
5821
5820
  forwardViewletCommand('handleClickAdd');
5822
5821
  const handleClickAt = forwardViewletCommand('handleClickAt');
5822
+ const handleClickOpenFolder$1 = forwardViewletCommand('handleClickOpenFolder');
5823
5823
  forwardViewletCommand('handleClickClose');
5824
5824
  forwardViewletCommand('handleClickCopy');
5825
5825
  forwardViewletCommand('handleClickMinimize');
@@ -5915,11 +5915,11 @@ const ViewletAudioEvents = {
5915
5915
  handleAudioError
5916
5916
  };
5917
5917
 
5918
- const Events$8 = ViewletAudioEvents;
5918
+ const Events$9 = ViewletAudioEvents;
5919
5919
 
5920
5920
  const ViewletAudio = {
5921
5921
  __proto__: null,
5922
- Events: Events$8
5922
+ Events: Events$9
5923
5923
  };
5924
5924
 
5925
5925
  const create$x = () => {
@@ -6295,7 +6295,7 @@ const ViewletDiffEditor = {
6295
6295
  setScrollBar: setScrollBar$2
6296
6296
  };
6297
6297
 
6298
- const attachEvents$c = ($Node, eventMap) => {
6298
+ const attachEvents$b = ($Node, eventMap) => {
6299
6299
  for (const [key, value] of Object.entries(eventMap)) {
6300
6300
  $Node.addEventListener(key, value);
6301
6301
  }
@@ -6417,17 +6417,17 @@ const create$s = () => {
6417
6417
  $ScrollBarThumb
6418
6418
  };
6419
6419
  };
6420
- const attachEvents$b = state => {
6420
+ const attachEvents$a = state => {
6421
6421
  const {
6422
6422
  $Viewlet,
6423
6423
  $ListItems,
6424
6424
  $ScrollBar
6425
6425
  } = state;
6426
6426
  $Viewlet.addEventListener(Wheel, handleWheel$3, Passive);
6427
- attachEvents$c($ListItems, {
6427
+ attachEvents$b($ListItems, {
6428
6428
  [MouseDown]: handleMousedown
6429
6429
  });
6430
- attachEvents$c($ScrollBar, {
6430
+ attachEvents$b($ScrollBar, {
6431
6431
  [PointerDown]: handleScrollBarPointerDown$3
6432
6432
  });
6433
6433
  };
@@ -6475,7 +6475,7 @@ const setBounds$4 = (state, x, y, width, height) => {
6475
6475
 
6476
6476
  const ViewletEditorCompletion = {
6477
6477
  __proto__: null,
6478
- attachEvents: attachEvents$b,
6478
+ attachEvents: attachEvents$a,
6479
6479
  create: create$s,
6480
6480
  dispose: dispose$c,
6481
6481
  handleError: handleError$6,
@@ -6719,11 +6719,11 @@ const create$p = () => {
6719
6719
  $Viewlet
6720
6720
  };
6721
6721
  };
6722
- const attachEvents$a = state => {
6722
+ const attachEvents$9 = state => {
6723
6723
  const {
6724
6724
  $Viewlet
6725
6725
  } = state;
6726
- attachEvents$c($Viewlet, {
6726
+ attachEvents$b($Viewlet, {
6727
6727
  [PointerDown]: handlePointerDown$5,
6728
6728
  [PointerUp]: handlePointerUp,
6729
6729
  [ContextMenu]: handleContextMenu$7,
@@ -6754,7 +6754,7 @@ const setDom$5 = (state, dom) => {
6754
6754
 
6755
6755
  const ViewletEditorImage = {
6756
6756
  __proto__: null,
6757
- attachEvents: attachEvents$a,
6757
+ attachEvents: attachEvents$9,
6758
6758
  create: create$p,
6759
6759
  setDom: setDom$5,
6760
6760
  setDragging,
@@ -7597,6 +7597,11 @@ const handleClick$6 = event => {
7597
7597
  const uid = fromEvent(event);
7598
7598
  handleClickAt(uid, button, clientX, clientY);
7599
7599
  };
7600
+ const handleClickOpenFolder = event => {
7601
+ preventDefault(event);
7602
+ const uid = fromEvent(event);
7603
+ handleClickOpenFolder$1(uid);
7604
+ };
7600
7605
  const handlePointerDown$4 = event => {
7601
7606
  const {
7602
7607
  button,
@@ -7643,6 +7648,7 @@ const ViewletExplorerEvents = {
7643
7648
  __proto__: null,
7644
7649
  handleBlur: handleBlur$5,
7645
7650
  handleClick: handleClick$6,
7651
+ handleClickOpenFolder,
7646
7652
  handleContextMenu: handleContextMenu$5,
7647
7653
  handleDragEnd,
7648
7654
  handleDragLeave,
@@ -7657,8 +7663,6 @@ const ViewletExplorerEvents = {
7657
7663
  handleWheel: handleWheel$3
7658
7664
  };
7659
7665
 
7660
- const activeId$2 = 'TreeItemActive';
7661
- const focusClassName = 'FocusOutline';
7662
7666
  const create$i = () => {
7663
7667
  const $Viewlet = document.createElement('div');
7664
7668
  $Viewlet.className = 'Viewlet Explorer';
@@ -7669,25 +7673,7 @@ const create$i = () => {
7669
7673
  $Viewlet
7670
7674
  };
7671
7675
  };
7672
- const attachEvents$9 = state => {
7673
- const {
7674
- $Viewlet
7675
- } = state;
7676
- // TODO use the other mouse events that capture automatically
7677
- $Viewlet.addEventListener(MouseEnter, handleMouseEnter, Capture);
7678
- $Viewlet.addEventListener(MouseLeave, handleMouseLeave, Capture);
7679
- $Viewlet.addEventListener(Wheel, handleWheel$3, Passive);
7680
- attachEvents$c($Viewlet, {
7681
- [Blur]: handleBlur$5,
7682
- [Click]: handleClick$6,
7683
- [ContextMenu]: handleContextMenu$5,
7684
- [DragOver]: handleDragOver,
7685
- [DragStart]: handleDragStart$1,
7686
- [Drop]: handleDrop,
7687
- [Focus]: handleFocus$7,
7688
- [PointerDown]: handlePointerDown$4
7689
- });
7690
- };
7676
+ const Events$8 = ViewletExplorerEvents;
7691
7677
  const handleError$3 = (state, message) => {
7692
7678
  object(state);
7693
7679
  string(message);
@@ -7696,59 +7682,6 @@ const handleError$3 = (state, message) => {
7696
7682
  } = state;
7697
7683
  $Viewlet.textContent = message;
7698
7684
  };
7699
- const setFocusedIndex$4 = (state, oldIndex, newIndex, focused) => {
7700
- object(state);
7701
- number(oldIndex);
7702
- number(newIndex);
7703
- const {
7704
- $Viewlet
7705
- } = state;
7706
- switch (oldIndex) {
7707
- case -2:
7708
- break;
7709
- case -1:
7710
- $Viewlet.classList.remove(focusClassName);
7711
- break;
7712
- default:
7713
- const $Dirent = $Viewlet.children[oldIndex];
7714
- if ($Dirent) {
7715
- $Dirent.classList.remove(activeId$2);
7716
- $Dirent.classList.remove(focusClassName);
7717
- $Dirent.removeAttribute('id');
7718
- }
7719
- break;
7720
- }
7721
- switch (newIndex) {
7722
- case -2:
7723
- $Viewlet.classList.remove(focusClassName);
7724
- $Viewlet.removeAttribute(AriaActiveDescendant);
7725
- break;
7726
- case -1:
7727
- if (focused) {
7728
- $Viewlet.classList.add(focusClassName);
7729
- $Viewlet.removeAttribute(AriaActiveDescendant);
7730
- }
7731
- break;
7732
- default:
7733
- if (newIndex >= 0) {
7734
- const $Dirent = $Viewlet.children[newIndex];
7735
- if (!$Dirent) {
7736
- break;
7737
- }
7738
- $Dirent.id = activeId$2;
7739
- $Dirent.classList.add(activeId$2);
7740
- $Viewlet.setAttribute(AriaActiveDescendant, activeId$2);
7741
- if (focused) {
7742
- $Dirent.classList.add(focusClassName);
7743
- }
7744
- }
7745
- break;
7746
- }
7747
- if (focused) {
7748
- $Viewlet.focus();
7749
- send('Focus.setFocus', FocusExplorer);
7750
- }
7751
- };
7752
7685
  const focusInput = (state, id) => {
7753
7686
  const $Input = document.getElementById(id);
7754
7687
  if (!$Input) {
@@ -7787,14 +7720,13 @@ const setDom$4 = (state, dom) => {
7787
7720
 
7788
7721
  const ViewletExplorer = {
7789
7722
  __proto__: null,
7790
- attachEvents: attachEvents$9,
7723
+ Events: Events$8,
7791
7724
  create: create$i,
7792
7725
  dispose: dispose$9,
7793
7726
  focusInput,
7794
7727
  handleError: handleError$3,
7795
7728
  setDom: setDom$4,
7796
- setDropTargets,
7797
- setFocusedIndex: setFocusedIndex$4
7729
+ setDropTargets
7798
7730
  };
7799
7731
 
7800
7732
  const handleIconError = event => {
@@ -7981,7 +7913,7 @@ const attachEvents$8 = state => {
7981
7913
  $ExtensionHeader.addEventListener(Input, handleInput$6, Capture);
7982
7914
  // @ts-expect-error
7983
7915
  $ExtensionHeader.addEventListener(Click, undefined);
7984
- attachEvents$c($ListItems, {
7916
+ attachEvents$b($ListItems, {
7985
7917
  [ContextMenu]: handleContextMenu$5,
7986
7918
  [PointerDown]: handlePointerDown$3,
7987
7919
  [Focus]: handleFocus$6,
@@ -7991,7 +7923,7 @@ const attachEvents$8 = state => {
7991
7923
  $ListItems.addEventListener(TouchMove, handleTouchMove, Passive);
7992
7924
  $ListItems.addEventListener(TouchEnd, handleTouchEnd, Passive);
7993
7925
  $ListItems.addEventListener(Wheel, handleWheel$3, Passive);
7994
- attachEvents$c($ScrollBar, {
7926
+ attachEvents$b($ScrollBar, {
7995
7927
  [PointerDown]: handleScrollBarPointerDown$2
7996
7928
  });
7997
7929
  };
@@ -8897,15 +8829,15 @@ const attachEvents$7 = state => {
8897
8829
  $SashSideBar,
8898
8830
  $SashPanel
8899
8831
  } = state;
8900
- attachEvents$c($SashSideBar, {
8832
+ attachEvents$b($SashSideBar, {
8901
8833
  [PointerDown]: handleSashPointerDown,
8902
8834
  [DoubleClick]: handleSashDoubleClick
8903
8835
  });
8904
- attachEvents$c($SashPanel, {
8836
+ attachEvents$b($SashPanel, {
8905
8837
  [PointerDown]: handleSashPointerDown,
8906
8838
  [DoubleClick]: handleSashDoubleClick
8907
8839
  });
8908
- attachEvents$c(window, {
8840
+ attachEvents$b(window, {
8909
8841
  [Resize]: handleResize,
8910
8842
  [Focus]: handleFocus$3,
8911
8843
  [Blur]: handleBlur$3,
@@ -8970,7 +8902,7 @@ const attachEvents$6 = state => {
8970
8902
  const {
8971
8903
  $Viewlet
8972
8904
  } = state;
8973
- attachEvents$c($Viewlet, {
8905
+ attachEvents$b($Viewlet, {
8974
8906
  [Drop]: handleDrop,
8975
8907
  [DragOver]: handleDragOver,
8976
8908
  [DragEnd]: handleDragEnd,
@@ -9108,7 +9040,7 @@ const attachEvents$5 = state => {
9108
9040
  const {
9109
9041
  $MainTabs
9110
9042
  } = state;
9111
- attachEvents$c($MainTabs, {
9043
+ attachEvents$b($MainTabs, {
9112
9044
  [MouseDown]: handleTabsMouseDown,
9113
9045
  [ContextMenu]: handleTabsContextMenu,
9114
9046
  [DragStart]: handleDragStart
@@ -9285,13 +9217,13 @@ const attachEvents$4 = state => {
9285
9217
  $ButtonClose,
9286
9218
  $PanelHeader
9287
9219
  } = state;
9288
- attachEvents$c($PanelHeader, {
9220
+ attachEvents$b($PanelHeader, {
9289
9221
  [Click]: handleHeaderClick$2
9290
9222
  });
9291
- attachEvents$c($ButtonMaximize, {
9223
+ attachEvents$b($ButtonMaximize, {
9292
9224
  [Click]: handleClickMaximize
9293
9225
  });
9294
- attachEvents$c($ButtonClose, {
9226
+ attachEvents$b($ButtonClose, {
9295
9227
  [Click]: handleClickClose$1
9296
9228
  });
9297
9229
  };
@@ -9607,11 +9539,11 @@ const attachEvents$3 = state => {
9607
9539
  $QuickPickItems,
9608
9540
  $QuickPickInput
9609
9541
  } = state;
9610
- attachEvents$c($QuickPickItems, {
9542
+ attachEvents$b($QuickPickItems, {
9611
9543
  [PointerDown]: handlePointerDown
9612
9544
  });
9613
9545
  $QuickPickItems.addEventListener(Wheel, handleWheel$3, Passive);
9614
- attachEvents$c($QuickPickInput, {
9546
+ attachEvents$b($QuickPickInput, {
9615
9547
  [Blur]: handleBlur$2,
9616
9548
  [BeforeInput]: handleBeforeInput
9617
9549
  });
@@ -10086,7 +10018,7 @@ const attachEvents$2 = state => {
10086
10018
  const {
10087
10019
  $SideBarTitleArea
10088
10020
  } = state;
10089
- attachEvents$c($SideBarTitleArea, {
10021
+ attachEvents$b($SideBarTitleArea, {
10090
10022
  [Click]: handleHeaderClick
10091
10023
  });
10092
10024
  };
@@ -10659,7 +10591,7 @@ const attachEvents = state => {
10659
10591
  const {
10660
10592
  $Viewlet
10661
10593
  } = state;
10662
- attachEvents$c($Viewlet, {
10594
+ attachEvents$b($Viewlet, {
10663
10595
  [ContextMenu]: handleContextMenu$1
10664
10596
  });
10665
10597
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "5.0.1",
3
+ "version": "6.1.0",
4
4
  "description": "",
5
5
  "main": "dist/diffWorkerMain.js",
6
6
  "type": "module",