@lvce-editor/renderer-process 30.21.0 → 30.21.2
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 +114 -86
- package/package.json +1 -1
|
@@ -118,25 +118,25 @@ const confirm = message => {
|
|
|
118
118
|
return window.confirm(message);
|
|
119
119
|
};
|
|
120
120
|
|
|
121
|
-
const state$
|
|
121
|
+
const state$c = {
|
|
122
122
|
styleSheets: Object.create(null),
|
|
123
123
|
texts: Object.create(null)
|
|
124
124
|
};
|
|
125
125
|
const set$b = (id, sheet) => {
|
|
126
|
-
state$
|
|
126
|
+
state$c.styleSheets[id] = sheet;
|
|
127
127
|
};
|
|
128
128
|
const get$9 = id => {
|
|
129
|
-
return state$
|
|
129
|
+
return state$c.styleSheets[id];
|
|
130
130
|
};
|
|
131
131
|
const setText$2 = (id, text) => {
|
|
132
|
-
state$
|
|
132
|
+
state$c.texts[id] = text;
|
|
133
133
|
};
|
|
134
134
|
const getText = id => {
|
|
135
|
-
return state$
|
|
135
|
+
return state$c.texts[id];
|
|
136
136
|
};
|
|
137
137
|
const remove$5 = id => {
|
|
138
|
-
delete state$
|
|
139
|
-
delete state$
|
|
138
|
+
delete state$c.styleSheets[id];
|
|
139
|
+
delete state$c.texts[id];
|
|
140
140
|
};
|
|
141
141
|
|
|
142
142
|
const addCssStyleSheet = (id, text) => {
|
|
@@ -338,10 +338,10 @@ const createIdGenerator = () => {
|
|
|
338
338
|
};
|
|
339
339
|
const create$J = createIdGenerator();
|
|
340
340
|
|
|
341
|
-
const state$
|
|
341
|
+
const state$b = Object.create(null);
|
|
342
342
|
const acquire$1 = id => {
|
|
343
|
-
const promise = state$
|
|
344
|
-
delete state$
|
|
343
|
+
const promise = state$b[id];
|
|
344
|
+
delete state$b[id];
|
|
345
345
|
return promise;
|
|
346
346
|
};
|
|
347
347
|
const getFileHandles$1 = async ids => {
|
|
@@ -351,7 +351,7 @@ const getFileHandles$1 = async ids => {
|
|
|
351
351
|
};
|
|
352
352
|
const add$1 = promise => {
|
|
353
353
|
const id = create$J();
|
|
354
|
-
state$
|
|
354
|
+
state$b[id] = promise;
|
|
355
355
|
return id;
|
|
356
356
|
};
|
|
357
357
|
const addFileHandle$1 = fileHandle => {
|
|
@@ -534,14 +534,14 @@ const getEventListenerArgs = (params, event) => {
|
|
|
534
534
|
return serialized;
|
|
535
535
|
};
|
|
536
536
|
|
|
537
|
-
const state$
|
|
537
|
+
const state$a = {
|
|
538
538
|
ipc: undefined
|
|
539
539
|
};
|
|
540
540
|
const getIpc = () => {
|
|
541
|
-
return state$
|
|
541
|
+
return state$a.ipc;
|
|
542
542
|
};
|
|
543
543
|
const setIpc = value => {
|
|
544
|
-
state$
|
|
544
|
+
state$a.ipc = value;
|
|
545
545
|
};
|
|
546
546
|
|
|
547
547
|
const nameAnonymousFunction$1 = (fn, name) => {
|
|
@@ -3312,7 +3312,7 @@ const launchRendererWorker = async () => {
|
|
|
3312
3312
|
};
|
|
3313
3313
|
|
|
3314
3314
|
const selector = 'script.RendererWorkerTrace';
|
|
3315
|
-
const state$
|
|
3315
|
+
const state$9 = {
|
|
3316
3316
|
enabled: false,
|
|
3317
3317
|
entries: []
|
|
3318
3318
|
};
|
|
@@ -3362,14 +3362,14 @@ const isCommand = value => {
|
|
|
3362
3362
|
};
|
|
3363
3363
|
const initialize = search => {
|
|
3364
3364
|
const searchParams = new URLSearchParams(search);
|
|
3365
|
-
state$
|
|
3366
|
-
state$
|
|
3365
|
+
state$9.enabled = searchParams.has('traceRendererWorker');
|
|
3366
|
+
state$9.entries = [];
|
|
3367
3367
|
};
|
|
3368
3368
|
const record = (direction, method, params) => {
|
|
3369
|
-
if (!state$
|
|
3369
|
+
if (!state$9.enabled) {
|
|
3370
3370
|
return;
|
|
3371
3371
|
}
|
|
3372
|
-
state$
|
|
3372
|
+
state$9.entries.push({
|
|
3373
3373
|
direction,
|
|
3374
3374
|
method,
|
|
3375
3375
|
params: serialize(params),
|
|
@@ -3377,7 +3377,7 @@ const record = (direction, method, params) => {
|
|
|
3377
3377
|
});
|
|
3378
3378
|
};
|
|
3379
3379
|
const listen = rpc => {
|
|
3380
|
-
if (!state$
|
|
3380
|
+
if (!state$9.enabled) {
|
|
3381
3381
|
return;
|
|
3382
3382
|
}
|
|
3383
3383
|
const ipc = rpc.ipc;
|
|
@@ -3392,7 +3392,7 @@ const listen = rpc => {
|
|
|
3392
3392
|
});
|
|
3393
3393
|
};
|
|
3394
3394
|
const exportToDom = () => {
|
|
3395
|
-
if (!state$
|
|
3395
|
+
if (!state$9.enabled) {
|
|
3396
3396
|
return;
|
|
3397
3397
|
}
|
|
3398
3398
|
const existing = document.querySelector(selector);
|
|
@@ -3400,7 +3400,7 @@ const exportToDom = () => {
|
|
|
3400
3400
|
script.className = 'RendererWorkerTrace';
|
|
3401
3401
|
script.type = 'application/json';
|
|
3402
3402
|
script.textContent = JSON.stringify({
|
|
3403
|
-
entries: state$
|
|
3403
|
+
entries: state$9.entries,
|
|
3404
3404
|
version: 1
|
|
3405
3405
|
});
|
|
3406
3406
|
if (!existing) {
|
|
@@ -3408,53 +3408,53 @@ const exportToDom = () => {
|
|
|
3408
3408
|
}
|
|
3409
3409
|
};
|
|
3410
3410
|
const scheduleExport = () => {
|
|
3411
|
-
if (!state$
|
|
3411
|
+
if (!state$9.enabled) {
|
|
3412
3412
|
return;
|
|
3413
3413
|
}
|
|
3414
3414
|
queueMicrotask(exportToDom);
|
|
3415
3415
|
};
|
|
3416
3416
|
|
|
3417
|
-
const state$
|
|
3417
|
+
const state$8 = {
|
|
3418
3418
|
rpc: undefined
|
|
3419
3419
|
};
|
|
3420
3420
|
const hydrate$3 = async () => {
|
|
3421
3421
|
const result = await launchRendererWorker();
|
|
3422
3422
|
if (isError(result)) {
|
|
3423
|
-
state$
|
|
3423
|
+
state$8.rpc = undefined;
|
|
3424
3424
|
return result;
|
|
3425
3425
|
}
|
|
3426
|
-
state$
|
|
3426
|
+
state$8.rpc = result.value;
|
|
3427
3427
|
listen(result.value);
|
|
3428
3428
|
return success(undefined);
|
|
3429
3429
|
};
|
|
3430
3430
|
|
|
3431
3431
|
// TODO needed?
|
|
3432
3432
|
const dispose$j = () => {
|
|
3433
|
-
if (state$
|
|
3434
|
-
state$
|
|
3433
|
+
if (state$8.rpc) {
|
|
3434
|
+
state$8.rpc.dispose();
|
|
3435
3435
|
}
|
|
3436
3436
|
};
|
|
3437
3437
|
const send = (method, ...params) => {
|
|
3438
3438
|
record('sent', method, params);
|
|
3439
3439
|
// @ts-ignore
|
|
3440
|
-
state$
|
|
3440
|
+
state$8.rpc.send(method, ...params);
|
|
3441
3441
|
};
|
|
3442
3442
|
const invoke$1 = (method, ...params) => {
|
|
3443
3443
|
record('sent', method, params);
|
|
3444
3444
|
// @ts-ignore
|
|
3445
|
-
return state$
|
|
3445
|
+
return state$8.rpc.invoke(method, ...params);
|
|
3446
3446
|
};
|
|
3447
3447
|
const sendAndTransfer = message => {
|
|
3448
3448
|
if (Array.isArray(message) && typeof message[0] === 'string') {
|
|
3449
3449
|
record('sent', message[0], message.slice(1));
|
|
3450
3450
|
}
|
|
3451
3451
|
// @ts-expect-error
|
|
3452
|
-
state$
|
|
3452
|
+
state$8.rpc.sendAndTransfer(message);
|
|
3453
3453
|
};
|
|
3454
3454
|
const invokeAndTransfer = (method, ...params) => {
|
|
3455
3455
|
record('sent', method, params);
|
|
3456
3456
|
// @ts-ignore
|
|
3457
|
-
return state$
|
|
3457
|
+
return state$8.rpc.invokeAndTransfer(method, ...params);
|
|
3458
3458
|
};
|
|
3459
3459
|
|
|
3460
3460
|
const RendererWorker = {
|
|
@@ -3465,7 +3465,7 @@ const RendererWorker = {
|
|
|
3465
3465
|
invokeAndTransfer,
|
|
3466
3466
|
send,
|
|
3467
3467
|
sendAndTransfer,
|
|
3468
|
-
state: state$
|
|
3468
|
+
state: state$8
|
|
3469
3469
|
};
|
|
3470
3470
|
|
|
3471
3471
|
const create$u = async ({
|
|
@@ -3584,7 +3584,7 @@ const create$Button = (label, icon) => {
|
|
|
3584
3584
|
};
|
|
3585
3585
|
|
|
3586
3586
|
// TODO this file is not needed when all elements are position fixed
|
|
3587
|
-
const state$
|
|
3587
|
+
const state$7 = {
|
|
3588
3588
|
$Widgets: undefined,
|
|
3589
3589
|
widgetSet: new Set()
|
|
3590
3590
|
};
|
|
@@ -3596,20 +3596,20 @@ const create$Widgets = () => {
|
|
|
3596
3596
|
};
|
|
3597
3597
|
const append$1 = $Element => {
|
|
3598
3598
|
// TODO should not call append in the first place if it is already in DOM
|
|
3599
|
-
if (state$
|
|
3599
|
+
if (state$7.widgetSet.has($Element)) {
|
|
3600
3600
|
return;
|
|
3601
3601
|
}
|
|
3602
|
-
state$
|
|
3603
|
-
if (state$
|
|
3602
|
+
state$7.widgetSet.add($Element);
|
|
3603
|
+
if (state$7.$Widgets) {
|
|
3604
3604
|
// @ts-expect-error
|
|
3605
|
-
state$
|
|
3605
|
+
state$7.$Widgets.append($Element);
|
|
3606
3606
|
} else {
|
|
3607
3607
|
// @ts-expect-error
|
|
3608
|
-
state$
|
|
3608
|
+
state$7.$Widgets = create$Widgets();
|
|
3609
3609
|
// @ts-expect-error
|
|
3610
|
-
state$
|
|
3610
|
+
state$7.$Widgets.append($Element);
|
|
3611
3611
|
// @ts-expect-error
|
|
3612
|
-
document.body.append(state$
|
|
3612
|
+
document.body.append(state$7.$Widgets);
|
|
3613
3613
|
}
|
|
3614
3614
|
};
|
|
3615
3615
|
const remove$1 = $Element => {
|
|
@@ -3617,13 +3617,13 @@ const remove$1 = $Element => {
|
|
|
3617
3617
|
// TODO $Element should always be defined
|
|
3618
3618
|
return;
|
|
3619
3619
|
}
|
|
3620
|
-
state$
|
|
3620
|
+
state$7.widgetSet.delete($Element);
|
|
3621
3621
|
$Element.remove();
|
|
3622
3622
|
// TODO state.$Widgets should always be defined at this point
|
|
3623
|
-
if (state$
|
|
3623
|
+
if (state$7.widgetSet.size === 0 && state$7.$Widgets) {
|
|
3624
3624
|
// @ts-expect-error
|
|
3625
|
-
state$
|
|
3626
|
-
state$
|
|
3625
|
+
state$7.$Widgets.remove();
|
|
3626
|
+
state$7.$Widgets = undefined;
|
|
3627
3627
|
}
|
|
3628
3628
|
};
|
|
3629
3629
|
|
|
@@ -3699,11 +3699,11 @@ const dispose$h = id => {
|
|
|
3699
3699
|
// const $Notification = state.$Notifications
|
|
3700
3700
|
};
|
|
3701
3701
|
|
|
3702
|
-
const state$
|
|
3702
|
+
const state$6 = {
|
|
3703
3703
|
canvasObjects: Object.create(null)
|
|
3704
3704
|
};
|
|
3705
3705
|
const set$6 = (canvasId, canvas) => {
|
|
3706
|
-
state$
|
|
3706
|
+
state$6.canvasObjects[canvasId] = canvas;
|
|
3707
3707
|
};
|
|
3708
3708
|
|
|
3709
3709
|
const create$r = async (canvasId, objectId) => {
|
|
@@ -3802,16 +3802,16 @@ const findIndex = ($Container, $Target) => {
|
|
|
3802
3802
|
return -1;
|
|
3803
3803
|
};
|
|
3804
3804
|
|
|
3805
|
-
const state$
|
|
3805
|
+
const state$5 = {
|
|
3806
3806
|
/**
|
|
3807
3807
|
* @type {HTMLElement|undefined}
|
|
3808
3808
|
*/
|
|
3809
3809
|
$PreviousFocusElement: undefined};
|
|
3810
3810
|
const setElement = $Element => {
|
|
3811
|
-
state$
|
|
3811
|
+
state$5.$PreviousFocusElement = $Element;
|
|
3812
3812
|
};
|
|
3813
3813
|
const getElement = () => {
|
|
3814
|
-
return state$
|
|
3814
|
+
return state$5.$PreviousFocusElement;
|
|
3815
3815
|
};
|
|
3816
3816
|
|
|
3817
3817
|
const focus$d = $Element => {
|
|
@@ -3900,7 +3900,7 @@ const FocusOutput = 28;
|
|
|
3900
3900
|
|
|
3901
3901
|
// TODO keyboard handling
|
|
3902
3902
|
|
|
3903
|
-
const state$
|
|
3903
|
+
const state$4 = {
|
|
3904
3904
|
$$Menus: [],
|
|
3905
3905
|
$BackDrop: undefined,
|
|
3906
3906
|
anchorTime: -1,
|
|
@@ -3911,9 +3911,9 @@ const state$3 = {
|
|
|
3911
3911
|
};
|
|
3912
3912
|
const getLevel = $Menu => {
|
|
3913
3913
|
// @ts-expect-error
|
|
3914
|
-
return state$
|
|
3914
|
+
return state$4.$$Menus.indexOf($Menu);
|
|
3915
3915
|
};
|
|
3916
|
-
const handleMouseDown$
|
|
3916
|
+
const handleMouseDown$4 = event => {
|
|
3917
3917
|
const $Target = event.target;
|
|
3918
3918
|
const $Menu = $Target.closest('.Menu');
|
|
3919
3919
|
const index = findIndex($Menu, $Target);
|
|
@@ -3977,10 +3977,10 @@ const handleMouseLeave = event => {
|
|
|
3977
3977
|
|
|
3978
3978
|
// const handleBlur = (event) => {}
|
|
3979
3979
|
const handleKeyDown$4 = event => {
|
|
3980
|
-
state$
|
|
3980
|
+
state$4.handleKeyDown(event);
|
|
3981
3981
|
};
|
|
3982
3982
|
const handleFocusOut$1 = event => {
|
|
3983
|
-
state$
|
|
3983
|
+
state$4.handleFocusOut(event);
|
|
3984
3984
|
};
|
|
3985
3985
|
const create$Menu$1 = () => {
|
|
3986
3986
|
// TODO set aria label on menu (e.g. File, Edit, Selection)
|
|
@@ -3990,7 +3990,7 @@ const create$Menu$1 = () => {
|
|
|
3990
3990
|
$Menu.tabIndex = -1;
|
|
3991
3991
|
// $ContextMenu.onmousedown = contextMenuHandleMouseDown
|
|
3992
3992
|
// TODO mousedown vs click? (click is usually better but mousedown is faster, why wait 100ms?)
|
|
3993
|
-
$Menu.addEventListener(MouseDown, handleMouseDown$
|
|
3993
|
+
$Menu.addEventListener(MouseDown, handleMouseDown$4);
|
|
3994
3994
|
$Menu.addEventListener(MouseEnter, handleMouseEnter, {
|
|
3995
3995
|
capture: true
|
|
3996
3996
|
});
|
|
@@ -4008,7 +4008,7 @@ const create$Menu$1 = () => {
|
|
|
4008
4008
|
return $Menu;
|
|
4009
4009
|
};
|
|
4010
4010
|
const focusIndex = (level, oldFocusedIndex, newFocusedIndex) => {
|
|
4011
|
-
const $Menu = state$
|
|
4011
|
+
const $Menu = state$4.$$Menus[level];
|
|
4012
4012
|
if (oldFocusedIndex !== -1) {
|
|
4013
4013
|
// @ts-expect-error
|
|
4014
4014
|
$Menu.children[oldFocusedIndex].classList.remove('MenuItemFocused');
|
|
@@ -4030,21 +4030,21 @@ const handleBackDropMouseDown = event => {
|
|
|
4030
4030
|
preventDefault(event);
|
|
4031
4031
|
stopPropagation(event);
|
|
4032
4032
|
send(/* Menu.hide */'Menu.hide');
|
|
4033
|
-
if (state$
|
|
4034
|
-
remove$1(state$
|
|
4035
|
-
state$
|
|
4033
|
+
if (state$4.$BackDrop) {
|
|
4034
|
+
remove$1(state$4.$BackDrop);
|
|
4035
|
+
state$4.$BackDrop = undefined;
|
|
4036
4036
|
}
|
|
4037
4037
|
};
|
|
4038
4038
|
const handleContextMenu$7 = event => {
|
|
4039
4039
|
preventDefault(event);
|
|
4040
4040
|
};
|
|
4041
4041
|
const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom = [], mouseBlocking = false) => {
|
|
4042
|
-
if (mouseBlocking && !state$
|
|
4042
|
+
if (mouseBlocking && !state$4.$BackDrop) {
|
|
4043
4043
|
const $BackDrop = create$BackDrop();
|
|
4044
4044
|
$BackDrop.onmousedown = handleBackDropMouseDown;
|
|
4045
4045
|
$BackDrop.oncontextmenu = handleContextMenu$7;
|
|
4046
4046
|
// @ts-expect-error
|
|
4047
|
-
state$
|
|
4047
|
+
state$4.$BackDrop = $BackDrop;
|
|
4048
4048
|
append$1($BackDrop);
|
|
4049
4049
|
}
|
|
4050
4050
|
const $Menu = create$Menu$1();
|
|
@@ -4052,7 +4052,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom = [],
|
|
|
4052
4052
|
setXAndY($Menu, x, y);
|
|
4053
4053
|
$Menu.id = `Menu-${level}`;
|
|
4054
4054
|
if (parentIndex !== -1) {
|
|
4055
|
-
const $ParentMenu = state$
|
|
4055
|
+
const $ParentMenu = state$4.$$Menus[level - 1];
|
|
4056
4056
|
// @ts-expect-error
|
|
4057
4057
|
const $ParentMenuItem = $ParentMenu.children[parentIndex];
|
|
4058
4058
|
$ParentMenuItem.ariaExpanded = True;
|
|
@@ -4060,7 +4060,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom = [],
|
|
|
4060
4060
|
}
|
|
4061
4061
|
|
|
4062
4062
|
// @ts-expect-error
|
|
4063
|
-
state$
|
|
4063
|
+
state$4.$$Menus.push($Menu);
|
|
4064
4064
|
append$1($Menu);
|
|
4065
4065
|
if (level === 0) {
|
|
4066
4066
|
focus$d($Menu);
|
|
@@ -4068,14 +4068,14 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom = [],
|
|
|
4068
4068
|
}
|
|
4069
4069
|
};
|
|
4070
4070
|
const hideSubmenu = level => {
|
|
4071
|
-
const $$ChildMenus = state$
|
|
4071
|
+
const $$ChildMenus = state$4.$$Menus.slice(level);
|
|
4072
4072
|
for (const $ChildMenu of $$ChildMenus) {
|
|
4073
4073
|
remove$1($ChildMenu);
|
|
4074
4074
|
}
|
|
4075
|
-
state$
|
|
4076
|
-
if (state$
|
|
4077
|
-
remove$1(state$
|
|
4078
|
-
state$
|
|
4075
|
+
state$4.$$Menus = state$4.$$Menus.slice(0, level);
|
|
4076
|
+
if (state$4.$$Menus.length === 0 && state$4.$BackDrop) {
|
|
4077
|
+
remove$1(state$4.$BackDrop);
|
|
4078
|
+
state$4.$BackDrop = undefined;
|
|
4079
4079
|
}
|
|
4080
4080
|
};
|
|
4081
4081
|
|
|
@@ -4117,9 +4117,9 @@ const showControlled = ({
|
|
|
4117
4117
|
// TODO menu should not necessarily know about parent (titleBarMenuBar)
|
|
4118
4118
|
// it should be the other way around
|
|
4119
4119
|
// @ts-expect-error
|
|
4120
|
-
state$
|
|
4121
|
-
state$
|
|
4122
|
-
state$
|
|
4120
|
+
state$4.$Parent = $Parent;
|
|
4121
|
+
state$4.handleFocusOut = handleFocusOut;
|
|
4122
|
+
state$4.handleKeyDown = handleKeyDown;
|
|
4123
4123
|
if ($Parent) {
|
|
4124
4124
|
// state.$Menu.ariaLabel=''
|
|
4125
4125
|
// state.$Menu.ariaLabelledBy =$Parent.id
|
|
@@ -4131,13 +4131,13 @@ const showControlled = ({
|
|
|
4131
4131
|
// TODO have function to show submenu
|
|
4132
4132
|
|
|
4133
4133
|
const hide = (restoreFocus = true) => {
|
|
4134
|
-
for (const $Menu of state$
|
|
4134
|
+
for (const $Menu of state$4.$$Menus) {
|
|
4135
4135
|
remove$1($Menu);
|
|
4136
4136
|
}
|
|
4137
|
-
state$
|
|
4138
|
-
if (state$
|
|
4139
|
-
remove$1(state$
|
|
4140
|
-
state$
|
|
4137
|
+
state$4.$$Menus = [];
|
|
4138
|
+
if (state$4.$BackDrop) {
|
|
4139
|
+
remove$1(state$4.$BackDrop);
|
|
4140
|
+
state$4.$BackDrop = undefined;
|
|
4141
4141
|
}
|
|
4142
4142
|
// TODO focus previous item
|
|
4143
4143
|
if (restoreFocus) {
|
|
@@ -4976,9 +4976,16 @@ const set$3 = setComponentUid;
|
|
|
4976
4976
|
const get = getComponentUid;
|
|
4977
4977
|
const fromEvent = getComponentUidFromEvent;
|
|
4978
4978
|
|
|
4979
|
+
const state$3 = {
|
|
4980
|
+
currentDragInfo: undefined
|
|
4981
|
+
};
|
|
4979
4982
|
const set$2 = (id, data) => {
|
|
4983
|
+
state$3.currentDragInfo = data;
|
|
4980
4984
|
setDragInfo(id, data);
|
|
4981
4985
|
};
|
|
4986
|
+
const getCurrent = () => {
|
|
4987
|
+
return state$3.currentDragInfo;
|
|
4988
|
+
};
|
|
4982
4989
|
|
|
4983
4990
|
const state$2 = {
|
|
4984
4991
|
identifiers: new Uint32Array()
|
|
@@ -5089,7 +5096,7 @@ const getNodeIndex = $Node => {
|
|
|
5089
5096
|
const get$ItemFromEvent = event => {
|
|
5090
5097
|
return event.target.closest?.('.ActivityBarItem');
|
|
5091
5098
|
};
|
|
5092
|
-
const handleMouseDown$
|
|
5099
|
+
const handleMouseDown$3 = event => {
|
|
5093
5100
|
const {
|
|
5094
5101
|
button,
|
|
5095
5102
|
clientX,
|
|
@@ -5129,7 +5136,7 @@ const ViewletActivityBarEvents = {
|
|
|
5129
5136
|
handleBlur: handleBlur$7,
|
|
5130
5137
|
handleContextMenu: handleContextMenu$6,
|
|
5131
5138
|
handleFocus: handleFocus$8,
|
|
5132
|
-
handleMouseDown: handleMouseDown$
|
|
5139
|
+
handleMouseDown: handleMouseDown$3,
|
|
5133
5140
|
returnValue: returnValue$8
|
|
5134
5141
|
};
|
|
5135
5142
|
|
|
@@ -5212,7 +5219,7 @@ forwardViewletCommand('handleListBlur');
|
|
|
5212
5219
|
forwardViewletCommand('handleListFocus');
|
|
5213
5220
|
const handleMenuClick$1 = forwardViewletCommand('handleMenuClick');
|
|
5214
5221
|
const handleMenuMouseOver$1 = forwardViewletCommand('handleMenuMouseOver');
|
|
5215
|
-
forwardViewletCommand('handleMouseDown');
|
|
5222
|
+
const handleMouseDown$2 = forwardViewletCommand('handleMouseDown');
|
|
5216
5223
|
forwardViewletCommand('handleMouseMove');
|
|
5217
5224
|
const handleMouseOut$1 = forwardViewletCommand('handleMouseOut');
|
|
5218
5225
|
const handleMouseOver$1 = forwardViewletCommand('handleMouseOver');
|
|
@@ -7545,7 +7552,7 @@ const handleClickTab$1 = (target, uid) => {
|
|
|
7545
7552
|
const index = getNodeIndex(target);
|
|
7546
7553
|
selectIndex(uid, index);
|
|
7547
7554
|
};
|
|
7548
|
-
const handleClickAction$1 =
|
|
7555
|
+
const handleClickAction$1 = target => {
|
|
7549
7556
|
const index = getNodeIndex(target);
|
|
7550
7557
|
const {
|
|
7551
7558
|
command
|
|
@@ -7555,7 +7562,8 @@ const handleClickAction$1 = (target, uid) => {
|
|
|
7555
7562
|
console.info('[panel] action command not found');
|
|
7556
7563
|
return;
|
|
7557
7564
|
}
|
|
7558
|
-
|
|
7565
|
+
const childUid = get(target);
|
|
7566
|
+
handleClickAction$2(childUid, index, command);
|
|
7559
7567
|
};
|
|
7560
7568
|
const handleHeaderClick$1 = event => {
|
|
7561
7569
|
const {
|
|
@@ -7568,7 +7576,7 @@ const handleHeaderClick$1 = event => {
|
|
|
7568
7576
|
}
|
|
7569
7577
|
const action = target.closest?.('.IconButton[data-command]');
|
|
7570
7578
|
if (action) {
|
|
7571
|
-
handleClickAction$1(action
|
|
7579
|
+
handleClickAction$1(action);
|
|
7572
7580
|
}
|
|
7573
7581
|
};
|
|
7574
7582
|
|
|
@@ -8103,10 +8111,26 @@ const handleClickTab = event => {
|
|
|
8103
8111
|
const shouldDelete = Boolean(target.closest?.('.TerminalTabDeleteButton'));
|
|
8104
8112
|
handleClickTab$2(uid, index, shouldDelete);
|
|
8105
8113
|
};
|
|
8114
|
+
const handleMouseDown$1 = event => {
|
|
8115
|
+
const uid = fromEvent(event);
|
|
8116
|
+
const {
|
|
8117
|
+
target
|
|
8118
|
+
} = event;
|
|
8119
|
+
const terminal = target.closest?.('.XtermTerminal');
|
|
8120
|
+
if (!terminal) {
|
|
8121
|
+
return;
|
|
8122
|
+
}
|
|
8123
|
+
const terminalUid = get(terminal);
|
|
8124
|
+
if (!terminalUid) {
|
|
8125
|
+
return;
|
|
8126
|
+
}
|
|
8127
|
+
handleMouseDown$2(uid, terminalUid);
|
|
8128
|
+
};
|
|
8106
8129
|
|
|
8107
8130
|
const ViewletTerminalsEvents = {
|
|
8108
8131
|
__proto__: null,
|
|
8109
|
-
handleClickTab
|
|
8132
|
+
handleClickTab,
|
|
8133
|
+
handleMouseDown: handleMouseDown$1
|
|
8110
8134
|
};
|
|
8111
8135
|
|
|
8112
8136
|
const Events$1 = ViewletTerminalsEvents;
|
|
@@ -8329,8 +8353,8 @@ const openMenu = (state, unFocusIndex, index, level, menuItems, menuFocusedIndex
|
|
|
8329
8353
|
$Viewlet.children[unFocusIndex].removeAttribute(AriaOwns);
|
|
8330
8354
|
}
|
|
8331
8355
|
$Viewlet.children[index].ariaExpanded = True;
|
|
8332
|
-
const $$Menus = state$
|
|
8333
|
-
state$
|
|
8356
|
+
const $$Menus = state$4.$$Menus;
|
|
8357
|
+
state$4.$$Menus = [];
|
|
8334
8358
|
// @ts-expect-error
|
|
8335
8359
|
showControlled({
|
|
8336
8360
|
$Parent: $Viewlet.children[index],
|
|
@@ -8959,6 +8983,9 @@ const createPlaceholder = (viewletId, parentId, top, left, width, height) => {
|
|
|
8959
8983
|
const setDragData = (viewletId, dragData) => {
|
|
8960
8984
|
set$2(viewletId, dragData);
|
|
8961
8985
|
};
|
|
8986
|
+
const getDragData = () => {
|
|
8987
|
+
return getCurrent();
|
|
8988
|
+
};
|
|
8962
8989
|
const setDom = (viewletId, dom) => {
|
|
8963
8990
|
const instance = get$8(viewletId);
|
|
8964
8991
|
if (!instance) {
|
|
@@ -9579,6 +9606,7 @@ const commandMap = {
|
|
|
9579
9606
|
'Viewlet.focus': focus$1,
|
|
9580
9607
|
'Viewlet.focusElementByName': focusElementByName,
|
|
9581
9608
|
'Viewlet.focusSelector': focusSelector,
|
|
9609
|
+
'Viewlet.getDragData': getDragData,
|
|
9582
9610
|
'Viewlet.handleError': handleError$1,
|
|
9583
9611
|
'Viewlet.invoke': invoke,
|
|
9584
9612
|
'Viewlet.loadModule': loadModule,
|