@lvce-editor/renderer-process 10.28.0 → 10.30.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.
@@ -1909,12 +1909,12 @@ const handlePointerDown$7 = event => {
1909
1909
  }
1910
1910
  return [];
1911
1911
  };
1912
- const returnValue$b = true;
1912
+ const returnValue$a = true;
1913
1913
 
1914
1914
  const ViewletColorPickerEvents = {
1915
1915
  __proto__: null,
1916
1916
  handlePointerDown: handlePointerDown$7,
1917
- returnValue: returnValue$b
1917
+ returnValue: returnValue$a
1918
1918
  };
1919
1919
 
1920
1920
  const setColor = (state, color) => {
@@ -2070,17 +2070,17 @@ forwardViewletCommand('handleClickOpenFile');
2070
2070
  forwardViewletCommand('handleClickRestore');
2071
2071
  const handleClickTab$2 = forwardViewletCommand('handleClickTab');
2072
2072
  forwardViewletCommand('handleClickToggleMaximize');
2073
- const handleContextMenu$d = forwardViewletCommand('handleContextMenu');
2073
+ const handleContextMenu$c = forwardViewletCommand('handleContextMenu');
2074
2074
  const handleDoubleClick = forwardViewletCommand('handleDoubleClick');
2075
2075
  const handleDragEnd$1 = forwardViewletCommand('handleDragEnd');
2076
2076
  const handleDragLeave$1 = forwardViewletCommand('handleDragLeave');
2077
- const handleDragOver$1 = forwardViewletCommand('handleDragOver');
2077
+ const handleDragOver$2 = forwardViewletCommand('handleDragOver');
2078
2078
  forwardViewletCommand('handleDrop');
2079
2079
  const handleDropFilePath = forwardViewletCommand('handleDropFilePath');
2080
2080
  const handleDropFiles = forwardViewletCommand('handleDrop');
2081
2081
  forwardViewletCommand('handleFilterInput');
2082
2082
  const handleFocus$c = forwardViewletCommand('handleFocus');
2083
- const handleFocusIn$5 = forwardViewletCommand('handleFocusIn');
2083
+ const handleFocusIn$4 = forwardViewletCommand('handleFocusIn');
2084
2084
  const handleIconError$1 = forwardViewletCommand('handleIconError');
2085
2085
  const handleImageError$1 = forwardViewletCommand('handleImageError');
2086
2086
  const handleInput$9 = forwardViewletCommand('handleInput');
@@ -2113,10 +2113,12 @@ forwardViewletCommand('handleScrollBarVerticalPointerDown');
2113
2113
  forwardViewletCommand('handleSliderPointerDown');
2114
2114
  forwardViewletCommand('handleSliderPointerMove');
2115
2115
  const handleTabClick = forwardViewletCommand('handleTabClick');
2116
+ const handleTabDrop = forwardViewletCommand('handleTabDrop');
2116
2117
  const handleTabContextMenu = forwardViewletCommand('handleTabContextMenu');
2117
2118
  forwardViewletCommand('handleTabsPointerOut');
2118
2119
  forwardViewletCommand('handleTabsPointerOver');
2119
2120
  const handleTabsWheel$1 = forwardViewletCommand('handleTabsWheel');
2121
+ const handleTabsDragOver = forwardViewletCommand('handleTabsDragOver');
2120
2122
  const handleTouchEnd$1 = forwardViewletCommand('handleTouchEnd');
2121
2123
  const handleTouchMove$1 = forwardViewletCommand('handleTouchMove');
2122
2124
  const handleTouchStart$1 = forwardViewletCommand('handleTouchStart');
@@ -2137,10 +2139,10 @@ forwardViewletCommand('type');
2137
2139
  forwardViewletCommand('typeWithAutoClosing');
2138
2140
  const updateEditingValue = forwardViewletCommand('updateEditingValue');
2139
2141
 
2140
- const handleFocusIn$4 = event => {
2142
+ const handleFocusIn$3 = event => {
2141
2143
  preventDefault(event);
2142
2144
  const uid = fromEvent(event);
2143
- handleFocusIn$5(uid);
2145
+ handleFocusIn$4(uid);
2144
2146
  };
2145
2147
  const handleBlur$a = event => {
2146
2148
  preventDefault(event);
@@ -2151,7 +2153,7 @@ const handleBlur$a = event => {
2151
2153
  const ViewletEditorCodeGeneratorEvents = {
2152
2154
  __proto__: null,
2153
2155
  handleBlur: handleBlur$a,
2154
- handleFocusIn: handleFocusIn$4
2156
+ handleFocusIn: handleFocusIn$3
2155
2157
  };
2156
2158
 
2157
2159
  const setBounds$9 = (state, x, y, width, height) => {
@@ -2445,12 +2447,12 @@ const ViewletEditorCompletion = {
2445
2447
  const handleClose = () => {
2446
2448
  return ['closeDetails'];
2447
2449
  };
2448
- const returnValue$a = true;
2450
+ const returnValue$9 = true;
2449
2451
 
2450
2452
  const ViewletEditorCompletionDetailsEvents = {
2451
2453
  __proto__: null,
2452
2454
  handleClose,
2453
- returnValue: returnValue$a
2455
+ returnValue: returnValue$9
2454
2456
  };
2455
2457
 
2456
2458
  const create$I = () => {
@@ -2502,7 +2504,7 @@ const ViewletEditorCompletionDetails = {
2502
2504
 
2503
2505
  const rememberFocus = rememberFocus$1;
2504
2506
 
2505
- const returnValue$9 = true;
2507
+ const returnValue$8 = true;
2506
2508
  const handleSashPointerDown$2 = create$K(event => {
2507
2509
  const {
2508
2510
  clientX,
@@ -2526,7 +2528,7 @@ const handleSashPointerDown$2 = create$K(event => {
2526
2528
  const ViewletEditorHoverEvents = {
2527
2529
  __proto__: null,
2528
2530
  handleSashPointerDown: handleSashPointerDown$2,
2529
- returnValue: returnValue$9
2531
+ returnValue: returnValue$8
2530
2532
  };
2531
2533
 
2532
2534
  const setBounds$6 = (state, x, y, width, height) => {
@@ -2557,10 +2559,10 @@ const ViewletEditorHover = {
2557
2559
  setDom: setDom$9
2558
2560
  };
2559
2561
 
2560
- const handleFocusIn$3 = event => {
2562
+ const handleFocusIn$2 = event => {
2561
2563
  preventDefault(event);
2562
2564
  const uid = fromEvent(event);
2563
- handleFocusIn$5(uid);
2565
+ handleFocusIn$4(uid);
2564
2566
  };
2565
2567
  const handleBlur$9 = event => {
2566
2568
  const uid = fromEvent(event);
@@ -2580,7 +2582,7 @@ const handleInput$8 = event => {
2580
2582
  const ViewletEditorRenameEvents = {
2581
2583
  __proto__: null,
2582
2584
  handleBlur: handleBlur$9,
2583
- handleFocusIn: handleFocusIn$3,
2585
+ handleFocusIn: handleFocusIn$2,
2584
2586
  handleInput: handleInput$8
2585
2587
  };
2586
2588
 
@@ -2609,15 +2611,15 @@ const ViewletEditorRename = {
2609
2611
  setBounds: setBounds$5
2610
2612
  };
2611
2613
 
2612
- const handleFocusIn$2 = event => {
2614
+ const handleFocusIn$1 = event => {
2613
2615
  preventDefault(event);
2614
2616
  const uid = fromEvent(event);
2615
- handleFocusIn$5(uid);
2617
+ handleFocusIn$4(uid);
2616
2618
  };
2617
2619
 
2618
2620
  const ViewletEditorSourceActionsEvents = {
2619
2621
  __proto__: null,
2620
- handleFocusIn: handleFocusIn$2
2622
+ handleFocusIn: handleFocusIn$1
2621
2623
  };
2622
2624
 
2623
2625
  const setBounds$4 = (state, x, y, width, height) => {
@@ -2654,7 +2656,7 @@ const handleInput$7 = event => {
2654
2656
  } = target;
2655
2657
  return ['FindWidget.handleInput', value];
2656
2658
  };
2657
- const handleClickClose$2 = event => {
2659
+ const handleClickClose$1 = event => {
2658
2660
  preventDefault(event);
2659
2661
  return ['FindWidget.close'];
2660
2662
  };
@@ -2711,11 +2713,11 @@ const handleFocusClose = event => {
2711
2713
  const handleFocusReplaceAll = event => {
2712
2714
  return ['FindWidget.handleFocusReplaceAll'];
2713
2715
  };
2714
- const returnValue$8 = true;
2716
+ const returnValue$7 = true;
2715
2717
 
2716
2718
  const ViewletFindWidgetEvents = {
2717
2719
  __proto__: null,
2718
- handleClickClose: handleClickClose$2,
2720
+ handleClickClose: handleClickClose$1,
2719
2721
  handleClickNextMatch,
2720
2722
  handleClickPreviousMatch,
2721
2723
  handleClickReplace,
@@ -2731,7 +2733,7 @@ const ViewletFindWidgetEvents = {
2731
2733
  handleReplaceFocus,
2732
2734
  handleReplaceInput: handleReplaceInput$1,
2733
2735
  handleToggleReplaceFocus,
2734
- returnValue: returnValue$8
2736
+ returnValue: returnValue$7
2735
2737
  };
2736
2738
 
2737
2739
  const create$H = () => {
@@ -2791,11 +2793,11 @@ const setBounds$3 = (state, x, y, width, height) => {
2791
2793
  const dispose$i = state => {
2792
2794
  remove$2(state.$Viewlet);
2793
2795
  };
2794
- const Events$c = ViewletFindWidgetEvents;
2796
+ const Events$d = ViewletFindWidgetEvents;
2795
2797
 
2796
2798
  const ViewletFindWidget = {
2797
2799
  __proto__: null,
2798
- Events: Events$c,
2800
+ Events: Events$d,
2799
2801
  appendWidget,
2800
2802
  create: create$H,
2801
2803
  dispose: dispose$i,
@@ -4855,7 +4857,7 @@ const create$Menu$1 = () => {
4855
4857
  // })
4856
4858
  $Menu.onkeydown = handleKeyDown$4;
4857
4859
  $Menu.addEventListener(FocusOut, handleFocusOut$1);
4858
- $Menu.oncontextmenu = handleContextMenu$c;
4860
+ $Menu.oncontextmenu = handleContextMenu$b;
4859
4861
  // $ContextMenu.onfocus = handleFocus
4860
4862
  // $ContextMenu.onblur = handleBlur
4861
4863
  return $Menu;
@@ -4884,14 +4886,14 @@ const handleBackDropMouseDown = event => {
4884
4886
  stopPropagation(event);
4885
4887
  send(/* Menu.hide */'Menu.hide');
4886
4888
  };
4887
- const handleContextMenu$c = event => {
4889
+ const handleContextMenu$b = event => {
4888
4890
  preventDefault(event);
4889
4891
  };
4890
4892
  const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom, mouseBlocking = false) => {
4891
4893
  if (mouseBlocking) {
4892
4894
  const $BackDrop = create$BackDrop();
4893
4895
  $BackDrop.onmousedown = handleBackDropMouseDown;
4894
- $BackDrop.oncontextmenu = handleContextMenu$c;
4896
+ $BackDrop.oncontextmenu = handleContextMenu$b;
4895
4897
  // @ts-expect-error
4896
4898
  state$1.$BackDrop = $BackDrop;
4897
4899
  append$1($BackDrop);
@@ -5936,6 +5938,21 @@ const focus$g = viewletId => {
5936
5938
  instance.factory.focus(instance.state);
5937
5939
  } else ;
5938
5940
  };
5941
+ const focusElementByName = (viewletId, name) => {
5942
+ const selector = `[name="${name}"]`;
5943
+ const instance = state$6.instances[viewletId];
5944
+ if (!instance) {
5945
+ return;
5946
+ }
5947
+ const {
5948
+ $Viewlet
5949
+ } = instance.state;
5950
+ const $Element = $Viewlet.querySelector(selector);
5951
+ if (!$Element) {
5952
+ return;
5953
+ }
5954
+ $Element.focus();
5955
+ };
5939
5956
  const focusSelector = (viewletId, selector) => {
5940
5957
  const instance = state$6.instances[viewletId];
5941
5958
  if (!instance) {
@@ -6103,6 +6120,12 @@ const sendMultiple = commands => {
6103
6120
  case 'Viewlet.focusSelector':
6104
6121
  // @ts-ignore
6105
6122
  return focusSelector(viewletId, method, ...args);
6123
+ case 'Viewlet.focusSelector':
6124
+ // @ts-ignore
6125
+ return focusSelector(viewletId, method, ...args);
6126
+ case 'Viewlet.focusElementByName':
6127
+ // @ts-ignore
6128
+ return focusElementByName(viewletId, method, ...args);
6106
6129
  default:
6107
6130
  {
6108
6131
  invoke(viewletId, method, ...args);
@@ -6264,6 +6287,8 @@ const getFn = command => {
6264
6287
  return setDom$7;
6265
6288
  case 'Viewlet.createFunctionalRoot':
6266
6289
  return createFunctionalRoot;
6290
+ case 'Viewlet.focusElementByName':
6291
+ return focusElementByName;
6267
6292
  default:
6268
6293
  throw new Error(`unknown command ${command}`);
6269
6294
  }
@@ -6301,17 +6326,18 @@ const Commands$9 = {
6301
6326
  dispose: dispose$e,
6302
6327
  executeCommands: executeCommands,
6303
6328
  focus: focus$g,
6329
+ focusElementByName: focusElementByName,
6304
6330
  focusSelector: focusSelector,
6305
6331
  handleError: handleError$6,
6306
6332
  invoke: invoke,
6307
6333
  loadModule: loadModule,
6308
6334
  refresh: refresh$4,
6335
+ registerEventListeners: registerEventListeners,
6309
6336
  removeKeyBindings: removeKeyBindings,
6310
6337
  send: invoke,
6311
6338
  sendMultiple: sendMultiple,
6312
6339
  setBounds: setBounds$2,
6313
- show: show,
6314
- registerEventListeners: registerEventListeners
6340
+ show: show
6315
6341
  };
6316
6342
 
6317
6343
  const Viewlet_ipc = {
@@ -6678,7 +6704,7 @@ const handleFocus$a = () => {
6678
6704
 
6679
6705
  // TODO use context menu events function again
6680
6706
 
6681
- const handleContextMenu$b = event => {
6707
+ const handleContextMenu$a = event => {
6682
6708
  preventDefault(event);
6683
6709
  const {
6684
6710
  button,
@@ -6687,22 +6713,22 @@ const handleContextMenu$b = event => {
6687
6713
  } = event;
6688
6714
  return ['handleContextMenu', button, clientX, clientY];
6689
6715
  };
6690
- const returnValue$7 = true;
6716
+ const returnValue$6 = true;
6691
6717
 
6692
6718
  const ViewletActivityBarEvents = {
6693
6719
  __proto__: null,
6694
6720
  handleBlur: handleBlur$8,
6695
- handleContextMenu: handleContextMenu$b,
6721
+ handleContextMenu: handleContextMenu$a,
6696
6722
  handleFocus: handleFocus$a,
6697
6723
  handleMouseDown: handleMouseDown$2,
6698
- returnValue: returnValue$7
6724
+ returnValue: returnValue$6
6699
6725
  };
6700
6726
 
6701
- const Events$b = ViewletActivityBarEvents;
6727
+ const Events$c = ViewletActivityBarEvents;
6702
6728
 
6703
6729
  const ViewletActivityBar = {
6704
6730
  __proto__: null,
6705
- Events: Events$b
6731
+ Events: Events$c
6706
6732
  };
6707
6733
 
6708
6734
  const handleAudioError = event => {
@@ -6725,11 +6751,11 @@ const ViewletAudioEvents = {
6725
6751
  handleAudioError
6726
6752
  };
6727
6753
 
6728
- const Events$a = ViewletAudioEvents;
6754
+ const Events$b = ViewletAudioEvents;
6729
6755
 
6730
6756
  const ViewletAudio = {
6731
6757
  __proto__: null,
6732
- Events: Events$a
6758
+ Events: Events$b
6733
6759
  };
6734
6760
 
6735
6761
  const create$v = () => {
@@ -7139,7 +7165,7 @@ const handleWheel$2 = event => {
7139
7165
  *
7140
7166
  * @param {MouseEvent} event
7141
7167
  */
7142
- const handleContextMenu$a = event => {
7168
+ const handleContextMenu$9 = event => {
7143
7169
  preventDefault(event);
7144
7170
  const {
7145
7171
  button,
@@ -7147,7 +7173,7 @@ const handleContextMenu$a = event => {
7147
7173
  clientY
7148
7174
  } = event;
7149
7175
  const uid = fromEvent(event);
7150
- handleContextMenu$d(uid, button, clientX, clientY);
7176
+ handleContextMenu$c(uid, button, clientX, clientY);
7151
7177
  };
7152
7178
  const handleError$5 = event => {
7153
7179
  const uid = fromEvent(event);
@@ -7172,7 +7198,7 @@ const attachEvents$8 = state => {
7172
7198
  attachEvents$c($Viewlet, {
7173
7199
  [PointerDown]: handlePointerDown$5,
7174
7200
  [PointerUp]: handlePointerUp,
7175
- [ContextMenu]: handleContextMenu$a,
7201
+ [ContextMenu]: handleContextMenu$9,
7176
7202
  [FocusIn]: handleFocus$8
7177
7203
  });
7178
7204
  $Viewlet.addEventListener(Error$3, handleError$5, Capture);
@@ -7538,7 +7564,7 @@ const handleScrollBarContextMenu = event => {
7538
7564
  preventDefault(event);
7539
7565
  stopPropagation(event);
7540
7566
  };
7541
- const handleContextMenu$9 = event => {
7567
+ const handleContextMenu$8 = event => {
7542
7568
  preventDefault(event);
7543
7569
  const {
7544
7570
  button,
@@ -7694,7 +7720,7 @@ const create$n = () => {
7694
7720
  $Editor.role = Code;
7695
7721
  $Editor.append($LayerGutter, $EditorContent);
7696
7722
  attachEventsFunctional($Editor, {
7697
- [ContextMenu]: handleContextMenu$9,
7723
+ [ContextMenu]: handleContextMenu$8,
7698
7724
  [Wheel]: handleWheel$1,
7699
7725
  returnValue: true
7700
7726
  });
@@ -7899,7 +7925,7 @@ const ViewletError = {
7899
7925
  setMessage: setMessage$2
7900
7926
  };
7901
7927
 
7902
- const handleContextMenu$8 = event => {
7928
+ const handleContextMenu$7 = event => {
7903
7929
  preventDefault(event);
7904
7930
  const {
7905
7931
  button,
@@ -7907,7 +7933,7 @@ const handleContextMenu$8 = event => {
7907
7933
  clientY
7908
7934
  } = event;
7909
7935
  const uid = fromEvent(event);
7910
- handleContextMenu$d(uid, button, clientX, clientY);
7936
+ handleContextMenu$c(uid, button, clientX, clientY);
7911
7937
  };
7912
7938
 
7913
7939
  const CopyMove = 'copyMove';
@@ -7960,21 +7986,26 @@ const handleDragStart$1 = event => {
7960
7986
  dataTransfer,
7961
7987
  target
7962
7988
  } = event;
7989
+ // @ts-ignore
7963
7990
  setEffectAllowed(dataTransfer, CopyMove);
7991
+
7992
+ // @ts-ignore
7964
7993
  if (target.classList.contains('TreeItem')) {
7994
+ // @ts-ignore
7965
7995
  const filePath = target.title;
7996
+ // @ts-ignore
7966
7997
  const fileName = target.textContent;
7967
7998
  setFilePath(dataTransfer, filePath, fileName);
7968
7999
  }
7969
8000
  };
7970
- const handleDragOver = event => {
8001
+ const handleDragOver$1 = event => {
7971
8002
  preventDefault(event);
7972
8003
  const {
7973
8004
  clientX,
7974
8005
  clientY
7975
8006
  } = event;
7976
8007
  const uid = fromEvent(event);
7977
- handleDragOver$1(uid, clientX, clientY);
8008
+ handleDragOver$2(uid, clientX, clientY);
7978
8009
  };
7979
8010
  const handleDragEnd = event => {
7980
8011
  const {
@@ -7997,7 +8028,7 @@ const handleDragLeave = event => {
7997
8028
  *
7998
8029
  * @param {DragEvent} event
7999
8030
  */
8000
- const handleDrop = event => {
8031
+ const handleDrop$1 = event => {
8001
8032
  preventDefault(event);
8002
8033
  const {
8003
8034
  dataTransfer,
@@ -8098,12 +8129,12 @@ const ViewletExplorerEvents = {
8098
8129
  handleBlur: handleBlur$5,
8099
8130
  handleClick: handleClick$5,
8100
8131
  handleClickOpenFolder,
8101
- handleContextMenu: handleContextMenu$8,
8132
+ handleContextMenu: handleContextMenu$7,
8102
8133
  handleDragEnd,
8103
8134
  handleDragLeave,
8104
- handleDragOver,
8135
+ handleDragOver: handleDragOver$1,
8105
8136
  handleDragStart: handleDragStart$1,
8106
- handleDrop,
8137
+ handleDrop: handleDrop$1,
8107
8138
  handleEditingInput,
8108
8139
  handleFocus: handleFocus$6,
8109
8140
  handleMouseEnter,
@@ -8122,7 +8153,7 @@ const create$i = () => {
8122
8153
  $Viewlet
8123
8154
  };
8124
8155
  };
8125
- const Events$9 = ViewletExplorerEvents;
8156
+ const Events$a = ViewletExplorerEvents;
8126
8157
  const handleError$3 = (state, message) => {
8127
8158
  object(state);
8128
8159
  string(message);
@@ -8169,7 +8200,7 @@ const setDom$2 = (state, dom) => {
8169
8200
 
8170
8201
  const ViewletExplorer = {
8171
8202
  __proto__: null,
8172
- Events: Events$9,
8203
+ Events: Events$a,
8173
8204
  create: create$i,
8174
8205
  dispose: dispose$9,
8175
8206
  focusInput,
@@ -8213,11 +8244,11 @@ const ViewletExtensionDetailEvents = {
8213
8244
  handleReadmeContextMenu
8214
8245
  };
8215
8246
 
8216
- const Events$8 = ViewletExtensionDetailEvents;
8247
+ const Events$9 = ViewletExtensionDetailEvents;
8217
8248
 
8218
8249
  const ViewletExtensionDetail = {
8219
8250
  __proto__: null,
8220
- Events: Events$8,
8251
+ Events: Events$9,
8221
8252
  setSize
8222
8253
  };
8223
8254
 
@@ -8363,7 +8394,7 @@ const attachEvents$7 = state => {
8363
8394
  // @ts-expect-error
8364
8395
  $ExtensionHeader.addEventListener(Click, undefined);
8365
8396
  attachEvents$c($ListItems, {
8366
- [ContextMenu]: handleContextMenu$8,
8397
+ [ContextMenu]: handleContextMenu$7,
8367
8398
  [PointerDown]: handlePointerDown$3,
8368
8399
  [Focus]: handleFocus$5,
8369
8400
  [Scroll]: handleScroll
@@ -8497,7 +8528,7 @@ const ViewletLocationsEvents = {
8497
8528
  handleLocationsMouseDown
8498
8529
  };
8499
8530
 
8500
- const Events$7 = ViewletLocationsEvents;
8531
+ const Events$8 = ViewletLocationsEvents;
8501
8532
  const setFocusedIndex$3 = (state, oldFocusedIndex, newFocusedIndex) => {
8502
8533
  const {
8503
8534
  $Viewlet
@@ -8532,7 +8563,7 @@ const focus$b = state => {
8532
8563
 
8533
8564
  const ViewletImplementations = {
8534
8565
  __proto__: null,
8535
- Events: Events$7,
8566
+ Events: Events$8,
8536
8567
  focus: focus$b,
8537
8568
  handleError: handleError$1,
8538
8569
  setFocusedIndex: setFocusedIndex$3
@@ -8614,7 +8645,7 @@ const handlePointerDown$2 = event => {
8614
8645
 
8615
8646
  const ViewletkeyBindingsEvents = {
8616
8647
  __proto__: null,
8617
- handleContextMenu: handleContextMenu$8,
8648
+ handleContextMenu: handleContextMenu$7,
8618
8649
  handleInput: handleInput$4,
8619
8650
  handlePointerDown: handlePointerDown$2,
8620
8651
  handleResizerPointerDown,
@@ -8643,11 +8674,11 @@ const setColumnWidths = (state, columnWidth1, columnWidth2, columnWidth3) => {
8643
8674
  $Resizer1.style.left = `${paddingLeft + columnWidth1}px`;
8644
8675
  $Resizer2.style.left = `${paddingLeft + columnWidth1 + columnWidth2}px`;
8645
8676
  };
8646
- const Events$6 = ViewletkeyBindingsEvents;
8677
+ const Events$7 = ViewletkeyBindingsEvents;
8647
8678
 
8648
8679
  const ViewletKeyBindings = {
8649
8680
  __proto__: null,
8650
- Events: Events$6,
8681
+ Events: Events$7,
8651
8682
  setColumnWidths,
8652
8683
  setScrollBar: setScrollBar$2,
8653
8684
  setSize,
@@ -9204,7 +9235,7 @@ const ViewletLayout = {
9204
9235
  setSashes
9205
9236
  };
9206
9237
 
9207
- const handleContextMenu$7 = event => {
9238
+ const handleContextMenu$6 = event => {
9208
9239
  if (event.defaultPrevented) {
9209
9240
  return;
9210
9241
  }
@@ -9214,7 +9245,7 @@ const handleContextMenu$7 = event => {
9214
9245
  clientY
9215
9246
  } = event;
9216
9247
  const uid = fromEvent(event);
9217
- handleContextMenu$d(uid, clientX, clientY);
9248
+ handleContextMenu$c(uid, clientX, clientY);
9218
9249
  };
9219
9250
 
9220
9251
  // TODO Main should not be bound to Editor -> Lazy load Editor
@@ -9244,11 +9275,11 @@ const attachEvents$5 = state => {
9244
9275
  $Viewlet
9245
9276
  } = state;
9246
9277
  attachEvents$c($Viewlet, {
9247
- [Drop]: handleDrop,
9248
- [DragOver]: handleDragOver,
9278
+ [Drop]: handleDrop$1,
9279
+ [DragOver]: handleDragOver$1,
9249
9280
  [DragEnd]: handleDragEnd,
9250
9281
  [DragLeave]: handleDragLeave,
9251
- [ContextMenu]: handleContextMenu$7
9282
+ [ContextMenu]: handleContextMenu$6
9252
9283
  });
9253
9284
  };
9254
9285
  const dispose$7 = state => {};
@@ -9345,7 +9376,36 @@ const handleTabsWheel = event => {
9345
9376
  handleTabsWheel$1(uid, deltaX, deltaY);
9346
9377
  };
9347
9378
  const handleDragStart = event => {
9348
- setEffectAllowed(event.dataTransfer, CopyMove);
9379
+ const {
9380
+ target,
9381
+ dataTransfer
9382
+ } = event;
9383
+ setEffectAllowed(dataTransfer, CopyMove);
9384
+ dataTransfer.setData('x-lvce-drag', target.dataset.dragUid);
9385
+ };
9386
+ const handleDragOver = event => {
9387
+ const {
9388
+ clientX,
9389
+ clientY
9390
+ } = event;
9391
+ const uid = getUid();
9392
+ handleTabsDragOver(uid, clientX, clientY);
9393
+ };
9394
+
9395
+ /**
9396
+ *
9397
+ * @param {DragEvent} event
9398
+ */
9399
+ const handleDrop = event => {
9400
+ preventDefault(event);
9401
+ const {
9402
+ dataTransfer,
9403
+ clientX,
9404
+ clientY
9405
+ } = event;
9406
+ const item = dataTransfer.getData('x-lvce-drag');
9407
+ const uid = getUid();
9408
+ handleTabDrop(uid, item, clientX, clientY);
9349
9409
  };
9350
9410
  const handleTabsMouseDown = event => {
9351
9411
  const {
@@ -9381,9 +9441,11 @@ const attachEvents$4 = state => {
9381
9441
  $MainTabs
9382
9442
  } = state;
9383
9443
  attachEvents$c($MainTabs, {
9384
- [MouseDown]: handleTabsMouseDown,
9385
9444
  [ContextMenu]: handleTabsContextMenu,
9386
- [DragStart]: handleDragStart
9445
+ [DragOver]: handleDragOver,
9446
+ [DragStart]: handleDragStart,
9447
+ [Drop]: handleDrop,
9448
+ [MouseDown]: handleTabsMouseDown
9387
9449
  });
9388
9450
  $MainTabs.addEventListener(Wheel, handleTabsWheel, Passive);
9389
9451
  };
@@ -9399,11 +9461,22 @@ const setScrollLeft = (state, scrollLeft) => {
9399
9461
  } = state;
9400
9462
  $Viewlet.scrollLeft = scrollLeft;
9401
9463
  };
9464
+ const setHighlight = (state, highlightLeft) => {
9465
+ const $ExistingHighlight = state.$Viewlet.querySelector('.TabDragHighlight');
9466
+ if ($ExistingHighlight) {
9467
+ $ExistingHighlight.remove();
9468
+ }
9469
+ const $Highlight = document.createElement('div');
9470
+ $Highlight.className = 'TabDragHighlight';
9471
+ $Highlight.style.left = `${highlightLeft}px`;
9472
+ state.$Viewlet.append($Highlight);
9473
+ };
9402
9474
 
9403
9475
  const ViewletMainTabs = {
9404
9476
  __proto__: null,
9405
9477
  attachEvents: attachEvents$4,
9406
9478
  create: create$e,
9479
+ setHighlight,
9407
9480
  setScrollLeft,
9408
9481
  setTabsDom: setTabsDom$2
9409
9482
  };
@@ -9469,7 +9542,7 @@ const ViewletOutput = {
9469
9542
  setText
9470
9543
  };
9471
9544
 
9472
- const handleClickClose$1 = event => {
9545
+ const handleClickClose = event => {
9473
9546
  const uid = fromEvent(event);
9474
9547
  hidePanel(uid);
9475
9548
  };
@@ -9564,7 +9637,7 @@ const attachEvents$3 = state => {
9564
9637
  [Click]: handleClickMaximize
9565
9638
  });
9566
9639
  attachEvents$c($ButtonClose, {
9567
- [Click]: handleClickClose$1
9640
+ [Click]: handleClickClose
9568
9641
  });
9569
9642
  };
9570
9643
  const setTabsDom$1 = (state, dom) => {
@@ -9642,7 +9715,7 @@ const handlePointerDown$1 = event => {
9642
9715
  } = event;
9643
9716
  return ['handleClickAt', clientX, clientY];
9644
9717
  };
9645
- const handleContextMenu$6 = event => {
9718
+ const handleContextMenu$5 = event => {
9646
9719
  preventDefault(event);
9647
9720
  const {
9648
9721
  clientX,
@@ -9662,15 +9735,15 @@ const handleFilterInput = event => {
9662
9735
  const handleClearFilterClick = event => {
9663
9736
  return ['clearFilter'];
9664
9737
  };
9665
- const returnValue$6 = true;
9738
+ const returnValue$5 = true;
9666
9739
 
9667
9740
  const ViewletProblemsEvents = {
9668
9741
  __proto__: null,
9669
9742
  handleClearFilterClick,
9670
- handleContextMenu: handleContextMenu$6,
9743
+ handleContextMenu: handleContextMenu$5,
9671
9744
  handleFilterInput,
9672
9745
  handlePointerDown: handlePointerDown$1,
9673
- returnValue: returnValue$6
9746
+ returnValue: returnValue$5
9674
9747
  };
9675
9748
 
9676
9749
  const setFocusedIndex$2 = (state, focusedIndex) => {
@@ -9978,7 +10051,7 @@ const ViewletQuickPick = {
9978
10051
 
9979
10052
  const ViewletReferences = {
9980
10053
  __proto__: null,
9981
- Events: Events$7,
10054
+ Events: Events$8,
9982
10055
  focus: focus$b,
9983
10056
  handleError: handleError$1,
9984
10057
  setFocusedIndex: setFocusedIndex$3
@@ -10294,7 +10367,7 @@ const handleHeaderFocusIn = event => {
10294
10367
  }
10295
10368
  return ['handleFocusIn', key];
10296
10369
  };
10297
- const handleContextMenu$5 = event => {
10370
+ const handleContextMenu$4 = event => {
10298
10371
  preventDefault(event);
10299
10372
  const {
10300
10373
  button,
@@ -10310,12 +10383,12 @@ const handleWheel = event => {
10310
10383
  } = event;
10311
10384
  return ['handleWheel', deltaMode, deltaY];
10312
10385
  };
10313
- const returnValue$5 = true;
10386
+ const returnValue$4 = true;
10314
10387
 
10315
10388
  const ViewletSearchEvents = {
10316
10389
  __proto__: null,
10317
10390
  handleClick: handleClick$4,
10318
- handleContextMenu: handleContextMenu$5,
10391
+ handleContextMenu: handleContextMenu$4,
10319
10392
  handleExcludeInput,
10320
10393
  handleFocus: handleFocus$2,
10321
10394
  handleHeaderClick: handleHeaderClick$1,
@@ -10331,7 +10404,7 @@ const ViewletSearchEvents = {
10331
10404
  handleSharedInput,
10332
10405
  handleToggleButtonClick,
10333
10406
  handleWheel,
10334
- returnValue: returnValue$5
10407
+ returnValue: returnValue$4
10335
10408
  };
10336
10409
 
10337
10410
  const focus$5 = state => {
@@ -10364,11 +10437,11 @@ const setFocus = (state, selector) => {
10364
10437
  }
10365
10438
  };
10366
10439
  const dispose$3 = () => {};
10367
- const Events$5 = ViewletSearchEvents;
10440
+ const Events$6 = ViewletSearchEvents;
10368
10441
 
10369
10442
  const ViewletSearch = {
10370
10443
  __proto__: null,
10371
- Events: Events$5,
10444
+ Events: Events$6,
10372
10445
  dispose: dispose$3,
10373
10446
  focus: focus$5,
10374
10447
  setFocus,
@@ -10620,7 +10693,7 @@ const handleInput = event => {
10620
10693
  const ViewletSourceControlEvents = {
10621
10694
  __proto__: null,
10622
10695
  handleClick: handleClick$3,
10623
- handleContextMenu: handleContextMenu$8,
10696
+ handleContextMenu: handleContextMenu$7,
10624
10697
  handleFocus,
10625
10698
  handleInput,
10626
10699
  handleMouseOut,
@@ -10699,11 +10772,11 @@ const ViewletStorageEvents = {
10699
10772
  handleClick: handleClick$1
10700
10773
  };
10701
10774
 
10702
- const Events$4 = ViewletStorageEvents;
10775
+ const Events$5 = ViewletStorageEvents;
10703
10776
 
10704
10777
  const ViewletStorage = {
10705
10778
  __proto__: null,
10706
- Events: Events$4
10779
+ Events: Events$5
10707
10780
  };
10708
10781
 
10709
10782
  const isUint8Array = value => {
@@ -10946,7 +11019,7 @@ const ViewletTerminals = {
10946
11019
  setTabsDom
10947
11020
  };
10948
11021
 
10949
- const handleContextMenu$4 = event => {
11022
+ const handleContextMenu$3 = event => {
10950
11023
  preventDefault(event);
10951
11024
  const {
10952
11025
  button,
@@ -10974,7 +11047,7 @@ const attachEvents = state => {
10974
11047
  $Viewlet
10975
11048
  } = state;
10976
11049
  attachEvents$c($Viewlet, {
10977
- [ContextMenu]: handleContextMenu$4
11050
+ [ContextMenu]: handleContextMenu$3
10978
11051
  });
10979
11052
  };
10980
11053
  const activeClassName = 'TitleBarActive';
@@ -11006,26 +11079,26 @@ const handleTitleBarButtonsClick = event => {
11006
11079
  } = event;
11007
11080
  return ['handleClick', target.className];
11008
11081
  };
11009
- const returnValue$4 = true;
11082
+ const returnValue$3 = true;
11010
11083
 
11011
11084
  const ViewletTitleBarButtonEvents = {
11012
11085
  __proto__: null,
11013
11086
  handleTitleBarButtonsClick,
11014
- returnValue: returnValue$4
11087
+ returnValue: returnValue$3
11015
11088
  };
11016
11089
 
11017
- const Events$3 = ViewletTitleBarButtonEvents;
11090
+ const Events$4 = ViewletTitleBarButtonEvents;
11018
11091
 
11019
11092
  const ViewletTitleBarButtons = {
11020
11093
  __proto__: null,
11021
- Events: Events$3
11094
+ Events: Events$4
11022
11095
  };
11023
11096
 
11024
- const Events$2 = {};
11097
+ const Events$3 = {};
11025
11098
 
11026
11099
  const ViewletTitleBarIcon = {
11027
11100
  __proto__: null,
11028
- Events: Events$2
11101
+ Events: Events$3
11029
11102
  };
11030
11103
 
11031
11104
  const isInsideTitleBarMenu = $Element => {
@@ -11108,7 +11181,7 @@ const handleMenuClick = event => {
11108
11181
  const uid = fromEvent(event);
11109
11182
  handleMenuClick$1(uid, level, index);
11110
11183
  };
11111
- const handleFocusIn$1 = event => {
11184
+ const handleFocusIn = event => {
11112
11185
  const uid = fromEvent(event);
11113
11186
  handleFocus$c(uid);
11114
11187
  };
@@ -11116,7 +11189,7 @@ const handleFocusIn$1 = event => {
11116
11189
  const ViewletTitleBarMenuBarEvents = {
11117
11190
  __proto__: null,
11118
11191
  handleClick,
11119
- handleFocusIn: handleFocusIn$1,
11192
+ handleFocusIn,
11120
11193
  handleFocusOut,
11121
11194
  handleMenuClick,
11122
11195
  handleMenuMouseOver,
@@ -11357,11 +11430,11 @@ const setMenus = (state, changes, uid) => {
11357
11430
  }
11358
11431
  }
11359
11432
  };
11360
- const Events$1 = ViewletTitleBarMenuBarEvents;
11433
+ const Events$2 = ViewletTitleBarMenuBarEvents;
11361
11434
 
11362
11435
  const ViewletTitleBarMenuBar = {
11363
11436
  __proto__: null,
11364
- Events: Events$1,
11437
+ Events: Events$2,
11365
11438
  closeMenu,
11366
11439
  dispose,
11367
11440
  focus,
@@ -11393,11 +11466,11 @@ const ViewletVideoEvents = {
11393
11466
  handleVideoError
11394
11467
  };
11395
11468
 
11396
- const Events = ViewletVideoEvents;
11469
+ const Events$1 = ViewletVideoEvents;
11397
11470
 
11398
11471
  const ViewletVideo = {
11399
11472
  __proto__: null,
11400
- Events
11473
+ Events: Events$1
11401
11474
  };
11402
11475
 
11403
11476
  const create$2 = () => {
@@ -11420,34 +11493,6 @@ const ViewletTitleBarTitle = {
11420
11493
  setDom
11421
11494
  };
11422
11495
 
11423
- const handleClickOk = event => {
11424
- return ['handleClickOk'];
11425
- };
11426
- const handleClickClose = event => {
11427
- return ['handleClickClose'];
11428
- };
11429
- const handleClickCopy = event => {
11430
- return ['handleClickCopy'];
11431
- };
11432
- const handleFocusIn = event => {
11433
- return ['handleFocusIn'];
11434
- };
11435
- const handleContextMenu$3 = event => {
11436
- preventDefault(event);
11437
- return [];
11438
- };
11439
- const returnValue$3 = true;
11440
-
11441
- const ViewletAboutEvents = {
11442
- __proto__: null,
11443
- handleClickClose,
11444
- handleClickCopy,
11445
- handleClickOk,
11446
- handleContextMenu: handleContextMenu$3,
11447
- handleFocusIn,
11448
- returnValue: returnValue$3
11449
- };
11450
-
11451
11496
  const setFocused = (state, selector) => {
11452
11497
  if (selector === true) {
11453
11498
  selector = 'button';
@@ -11461,10 +11506,11 @@ const setFocused = (state, selector) => {
11461
11506
  const $Focusable = $Viewlet.querySelector(selector);
11462
11507
  $Focusable.focus();
11463
11508
  };
11509
+ const Events = {};
11464
11510
 
11465
11511
  const ViewletAbout = {
11466
11512
  __proto__: null,
11467
- Events: ViewletAboutEvents,
11513
+ Events,
11468
11514
  setFocused
11469
11515
  };
11470
11516
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "10.28.0",
3
+ "version": "10.30.0",
4
4
  "description": "",
5
5
  "main": "dist/rendererProcessMain.js",
6
6
  "type": "module",