@lvce-editor/renderer-process 10.29.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.
- package/dist/rendererProcessMain.js +60 -11
- package/package.json +1 -1
|
@@ -2074,7 +2074,7 @@ 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$
|
|
2077
|
+
const handleDragOver$2 = forwardViewletCommand('handleDragOver');
|
|
2078
2078
|
forwardViewletCommand('handleDrop');
|
|
2079
2079
|
const handleDropFilePath = forwardViewletCommand('handleDropFilePath');
|
|
2080
2080
|
const handleDropFiles = forwardViewletCommand('handleDrop');
|
|
@@ -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');
|
|
@@ -7984,21 +7986,26 @@ const handleDragStart$1 = event => {
|
|
|
7984
7986
|
dataTransfer,
|
|
7985
7987
|
target
|
|
7986
7988
|
} = event;
|
|
7989
|
+
// @ts-ignore
|
|
7987
7990
|
setEffectAllowed(dataTransfer, CopyMove);
|
|
7991
|
+
|
|
7992
|
+
// @ts-ignore
|
|
7988
7993
|
if (target.classList.contains('TreeItem')) {
|
|
7994
|
+
// @ts-ignore
|
|
7989
7995
|
const filePath = target.title;
|
|
7996
|
+
// @ts-ignore
|
|
7990
7997
|
const fileName = target.textContent;
|
|
7991
7998
|
setFilePath(dataTransfer, filePath, fileName);
|
|
7992
7999
|
}
|
|
7993
8000
|
};
|
|
7994
|
-
const handleDragOver = event => {
|
|
8001
|
+
const handleDragOver$1 = event => {
|
|
7995
8002
|
preventDefault(event);
|
|
7996
8003
|
const {
|
|
7997
8004
|
clientX,
|
|
7998
8005
|
clientY
|
|
7999
8006
|
} = event;
|
|
8000
8007
|
const uid = fromEvent(event);
|
|
8001
|
-
handleDragOver$
|
|
8008
|
+
handleDragOver$2(uid, clientX, clientY);
|
|
8002
8009
|
};
|
|
8003
8010
|
const handleDragEnd = event => {
|
|
8004
8011
|
const {
|
|
@@ -8021,7 +8028,7 @@ const handleDragLeave = event => {
|
|
|
8021
8028
|
*
|
|
8022
8029
|
* @param {DragEvent} event
|
|
8023
8030
|
*/
|
|
8024
|
-
const handleDrop = event => {
|
|
8031
|
+
const handleDrop$1 = event => {
|
|
8025
8032
|
preventDefault(event);
|
|
8026
8033
|
const {
|
|
8027
8034
|
dataTransfer,
|
|
@@ -8125,9 +8132,9 @@ const ViewletExplorerEvents = {
|
|
|
8125
8132
|
handleContextMenu: handleContextMenu$7,
|
|
8126
8133
|
handleDragEnd,
|
|
8127
8134
|
handleDragLeave,
|
|
8128
|
-
handleDragOver,
|
|
8135
|
+
handleDragOver: handleDragOver$1,
|
|
8129
8136
|
handleDragStart: handleDragStart$1,
|
|
8130
|
-
handleDrop,
|
|
8137
|
+
handleDrop: handleDrop$1,
|
|
8131
8138
|
handleEditingInput,
|
|
8132
8139
|
handleFocus: handleFocus$6,
|
|
8133
8140
|
handleMouseEnter,
|
|
@@ -9268,8 +9275,8 @@ const attachEvents$5 = state => {
|
|
|
9268
9275
|
$Viewlet
|
|
9269
9276
|
} = state;
|
|
9270
9277
|
attachEvents$c($Viewlet, {
|
|
9271
|
-
[Drop]: handleDrop,
|
|
9272
|
-
[DragOver]: handleDragOver,
|
|
9278
|
+
[Drop]: handleDrop$1,
|
|
9279
|
+
[DragOver]: handleDragOver$1,
|
|
9273
9280
|
[DragEnd]: handleDragEnd,
|
|
9274
9281
|
[DragLeave]: handleDragLeave,
|
|
9275
9282
|
[ContextMenu]: handleContextMenu$6
|
|
@@ -9369,7 +9376,36 @@ const handleTabsWheel = event => {
|
|
|
9369
9376
|
handleTabsWheel$1(uid, deltaX, deltaY);
|
|
9370
9377
|
};
|
|
9371
9378
|
const handleDragStart = event => {
|
|
9372
|
-
|
|
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);
|
|
9373
9409
|
};
|
|
9374
9410
|
const handleTabsMouseDown = event => {
|
|
9375
9411
|
const {
|
|
@@ -9405,9 +9441,11 @@ const attachEvents$4 = state => {
|
|
|
9405
9441
|
$MainTabs
|
|
9406
9442
|
} = state;
|
|
9407
9443
|
attachEvents$c($MainTabs, {
|
|
9408
|
-
[MouseDown]: handleTabsMouseDown,
|
|
9409
9444
|
[ContextMenu]: handleTabsContextMenu,
|
|
9410
|
-
[
|
|
9445
|
+
[DragOver]: handleDragOver,
|
|
9446
|
+
[DragStart]: handleDragStart,
|
|
9447
|
+
[Drop]: handleDrop,
|
|
9448
|
+
[MouseDown]: handleTabsMouseDown
|
|
9411
9449
|
});
|
|
9412
9450
|
$MainTabs.addEventListener(Wheel, handleTabsWheel, Passive);
|
|
9413
9451
|
};
|
|
@@ -9423,11 +9461,22 @@ const setScrollLeft = (state, scrollLeft) => {
|
|
|
9423
9461
|
} = state;
|
|
9424
9462
|
$Viewlet.scrollLeft = scrollLeft;
|
|
9425
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
|
+
};
|
|
9426
9474
|
|
|
9427
9475
|
const ViewletMainTabs = {
|
|
9428
9476
|
__proto__: null,
|
|
9429
9477
|
attachEvents: attachEvents$4,
|
|
9430
9478
|
create: create$e,
|
|
9479
|
+
setHighlight,
|
|
9431
9480
|
setScrollLeft,
|
|
9432
9481
|
setTabsDom: setTabsDom$2
|
|
9433
9482
|
};
|