@lvce-editor/renderer-process 30.15.1 → 30.16.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 +76 -59
- package/package.json +1 -1
|
@@ -3824,6 +3824,46 @@ const setThemeColor = color => {
|
|
|
3824
3824
|
meta.content = color;
|
|
3825
3825
|
};
|
|
3826
3826
|
|
|
3827
|
+
const Alert = 'alert';
|
|
3828
|
+
const Application = 'application';
|
|
3829
|
+
const Complementary = 'complementary';
|
|
3830
|
+
const Group = 'group';
|
|
3831
|
+
const ListBox = 'listbox';
|
|
3832
|
+
const Log = 'log';
|
|
3833
|
+
const Menu = 'menu';
|
|
3834
|
+
const None$1 = 'none';
|
|
3835
|
+
const Status = 'status';
|
|
3836
|
+
const TabList = 'tablist';
|
|
3837
|
+
const Toolbar = 'toolbar';
|
|
3838
|
+
|
|
3839
|
+
const setMaskImage = ($Element, icon) => {
|
|
3840
|
+
if (!icon || icon.includes('/icons')) {
|
|
3841
|
+
$Element.style.maskImage = `url('${icon}')`;
|
|
3842
|
+
$Element.style.webkitMaskImage = `url('${icon}')`;
|
|
3843
|
+
} else {
|
|
3844
|
+
$Element.classList.add(`MaskIcon${icon}`);
|
|
3845
|
+
}
|
|
3846
|
+
};
|
|
3847
|
+
|
|
3848
|
+
const create$t = icon => {
|
|
3849
|
+
const $Icon = document.createElement('div');
|
|
3850
|
+
$Icon.className = 'MaskIcon';
|
|
3851
|
+
setMaskImage($Icon, icon);
|
|
3852
|
+
$Icon.role = None$1;
|
|
3853
|
+
return $Icon;
|
|
3854
|
+
};
|
|
3855
|
+
|
|
3856
|
+
const create$Button = (label, icon) => {
|
|
3857
|
+
// TODO icon div might not be needed (unnecessary HTML element)
|
|
3858
|
+
const $Icon = create$t(icon);
|
|
3859
|
+
const $Button = document.createElement('button');
|
|
3860
|
+
$Button.className = 'IconButton';
|
|
3861
|
+
$Button.title = label;
|
|
3862
|
+
$Button.ariaLabel = label;
|
|
3863
|
+
$Button.append($Icon);
|
|
3864
|
+
return $Button;
|
|
3865
|
+
};
|
|
3866
|
+
|
|
3827
3867
|
// TODO this file is not needed when all elements are position fixed
|
|
3828
3868
|
const state$6 = {
|
|
3829
3869
|
$Widgets: undefined,
|
|
@@ -3868,13 +3908,31 @@ const remove$1 = $Element => {
|
|
|
3868
3908
|
}
|
|
3869
3909
|
};
|
|
3870
3910
|
|
|
3911
|
+
const handleCloseClick = event => {
|
|
3912
|
+
const $CloseButton = event.currentTarget;
|
|
3913
|
+
remove$1($CloseButton.parentNode);
|
|
3914
|
+
};
|
|
3915
|
+
const create$NotificationMessage = message => {
|
|
3916
|
+
const $NotificationMessage = document.createElement('p');
|
|
3917
|
+
$NotificationMessage.className = 'NotificationMessage';
|
|
3918
|
+
$NotificationMessage.textContent = message;
|
|
3919
|
+
return $NotificationMessage;
|
|
3920
|
+
};
|
|
3921
|
+
const create$CloseButton = () => {
|
|
3922
|
+
const $CloseButton = create$Button('Close', 'Close');
|
|
3923
|
+
$CloseButton.classList.add('NotificationCloseButton');
|
|
3924
|
+
$CloseButton.onclick = handleCloseClick;
|
|
3925
|
+
return $CloseButton;
|
|
3926
|
+
};
|
|
3871
3927
|
const create$Notification = message => {
|
|
3928
|
+
const $NotificationMessage = create$NotificationMessage(message);
|
|
3929
|
+
const $CloseButton = create$CloseButton();
|
|
3872
3930
|
const $Notification = document.createElement('div');
|
|
3873
3931
|
$Notification.className = 'Notification';
|
|
3874
|
-
$Notification.
|
|
3932
|
+
$Notification.append($NotificationMessage, $CloseButton);
|
|
3875
3933
|
return $Notification;
|
|
3876
3934
|
};
|
|
3877
|
-
const create$
|
|
3935
|
+
const create$s = (type, message) => {
|
|
3878
3936
|
// TODO this pattern might be also useful for activitybar, sidebar etc., creating elements as late as possible, only when actually needed
|
|
3879
3937
|
const $Notification = create$Notification(message);
|
|
3880
3938
|
append$1($Notification);
|
|
@@ -3898,9 +3956,8 @@ const handleNotificationClick = event => {
|
|
|
3898
3956
|
}
|
|
3899
3957
|
};
|
|
3900
3958
|
const create$NotificationWithOptions = (message, options) => {
|
|
3901
|
-
const $NotificationMessage =
|
|
3902
|
-
$
|
|
3903
|
-
$NotificationMessage.textContent = message;
|
|
3959
|
+
const $NotificationMessage = create$NotificationMessage(message);
|
|
3960
|
+
const $CloseButton = create$CloseButton();
|
|
3904
3961
|
const $NotificationOptions = document.createElement('div');
|
|
3905
3962
|
$NotificationOptions.className = 'NotificationOptions';
|
|
3906
3963
|
for (const option of options) {
|
|
@@ -3911,7 +3968,7 @@ const create$NotificationWithOptions = (message, options) => {
|
|
|
3911
3968
|
}
|
|
3912
3969
|
const $Notification = document.createElement('div');
|
|
3913
3970
|
$Notification.className = 'Notification';
|
|
3914
|
-
$Notification.append($NotificationMessage, $NotificationOptions);
|
|
3971
|
+
$Notification.append($NotificationMessage, $CloseButton, $NotificationOptions);
|
|
3915
3972
|
$Notification.onclick = handleNotificationClick;
|
|
3916
3973
|
return $Notification;
|
|
3917
3974
|
};
|
|
@@ -3930,7 +3987,7 @@ const set$6 = (canvasId, canvas) => {
|
|
|
3930
3987
|
state$5.canvasObjects[canvasId] = canvas;
|
|
3931
3988
|
};
|
|
3932
3989
|
|
|
3933
|
-
const create$
|
|
3990
|
+
const create$r = async (canvasId, objectId) => {
|
|
3934
3991
|
const canvas = document.createElement('canvas');
|
|
3935
3992
|
const offscreenCanvas = canvas.transferControlToOffscreen();
|
|
3936
3993
|
set$6(canvasId, canvas);
|
|
@@ -3958,18 +4015,6 @@ const create2 = async (canvasId, objectId, width, height) => {
|
|
|
3958
4015
|
const True = 'true';
|
|
3959
4016
|
const False = 'false';
|
|
3960
4017
|
|
|
3961
|
-
const Alert = 'alert';
|
|
3962
|
-
const Application = 'application';
|
|
3963
|
-
const Complementary = 'complementary';
|
|
3964
|
-
const Group = 'group';
|
|
3965
|
-
const ListBox = 'listbox';
|
|
3966
|
-
const Log = 'log';
|
|
3967
|
-
const Menu = 'menu';
|
|
3968
|
-
const None$1 = 'none';
|
|
3969
|
-
const Status = 'status';
|
|
3970
|
-
const TabList = 'tablist';
|
|
3971
|
-
const Toolbar = 'toolbar';
|
|
3972
|
-
|
|
3973
4018
|
const create$BackDrop = () => {
|
|
3974
4019
|
const $BackDrop = document.createElement('div');
|
|
3975
4020
|
$BackDrop.className = 'BackDrop';
|
|
@@ -5277,7 +5322,7 @@ const showError = (message, y, x) => {
|
|
|
5277
5322
|
$ImagePreviewImage
|
|
5278
5323
|
};
|
|
5279
5324
|
};
|
|
5280
|
-
const create$
|
|
5325
|
+
const create$q = (uri, top, left) => {
|
|
5281
5326
|
const $ImagePreviewImage = document.createElement('img');
|
|
5282
5327
|
$ImagePreviewImage.className = 'ImagePreviewImage';
|
|
5283
5328
|
$ImagePreviewImage.src = uri;
|
|
@@ -5308,7 +5353,7 @@ const dispose$g = state => {
|
|
|
5308
5353
|
|
|
5309
5354
|
const ImagePreview$1 = {
|
|
5310
5355
|
__proto__: null,
|
|
5311
|
-
create: create$
|
|
5356
|
+
create: create$q,
|
|
5312
5357
|
dispose: dispose$g,
|
|
5313
5358
|
showError,
|
|
5314
5359
|
update
|
|
@@ -5527,7 +5572,7 @@ const ViewletAudio = {
|
|
|
5527
5572
|
Events: Events$4
|
|
5528
5573
|
};
|
|
5529
5574
|
|
|
5530
|
-
const create$
|
|
5575
|
+
const create$p = () => {
|
|
5531
5576
|
const $Viewlet = document.createElement('div');
|
|
5532
5577
|
$Viewlet.className = 'Viewlet Clock';
|
|
5533
5578
|
return {
|
|
@@ -5544,7 +5589,7 @@ const setTime = (state, time) => {
|
|
|
5544
5589
|
|
|
5545
5590
|
const ViewletClock = {
|
|
5546
5591
|
__proto__: null,
|
|
5547
|
-
create: create$
|
|
5592
|
+
create: create$p,
|
|
5548
5593
|
dispose: dispose$f,
|
|
5549
5594
|
refresh: refresh$3,
|
|
5550
5595
|
setTime
|
|
@@ -5573,7 +5618,7 @@ const stopTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp)
|
|
|
5573
5618
|
// TODO use pointerlost event instead
|
|
5574
5619
|
$Target.removeEventListener(PointerUp, handlePointerUp);
|
|
5575
5620
|
};
|
|
5576
|
-
const create$
|
|
5621
|
+
const create$o = (pointerDown, pointerMove, pointerUp) => {
|
|
5577
5622
|
const shared = (fn, event) => {
|
|
5578
5623
|
const message = fn(event);
|
|
5579
5624
|
if (!message || message.length === 0) {
|
|
@@ -5606,7 +5651,7 @@ const create$p = (pointerDown, pointerMove, pointerUp) => {
|
|
|
5606
5651
|
};
|
|
5607
5652
|
|
|
5608
5653
|
const handleOffset = 20;
|
|
5609
|
-
const handleSliderPointerDown = create$
|
|
5654
|
+
const handleSliderPointerDown = create$o(event => {
|
|
5610
5655
|
const {
|
|
5611
5656
|
clientX,
|
|
5612
5657
|
clientY
|
|
@@ -5688,7 +5733,7 @@ const ViewletDebugConsoleEvents = {
|
|
|
5688
5733
|
handleInput: handleInput$5
|
|
5689
5734
|
};
|
|
5690
5735
|
|
|
5691
|
-
const create$
|
|
5736
|
+
const create$n = () => {
|
|
5692
5737
|
const $Viewlet = document.createElement('div');
|
|
5693
5738
|
$Viewlet.className = 'Viewlet DebugConsole';
|
|
5694
5739
|
return {
|
|
@@ -5704,7 +5749,7 @@ const setDom$9 = (state, dom) => {
|
|
|
5704
5749
|
|
|
5705
5750
|
const ViewletDebugConsole = {
|
|
5706
5751
|
__proto__: null,
|
|
5707
|
-
create: create$
|
|
5752
|
+
create: create$n,
|
|
5708
5753
|
setDom: setDom$9
|
|
5709
5754
|
};
|
|
5710
5755
|
|
|
@@ -5756,34 +5801,6 @@ const ViewletDefineKeyBinding = {
|
|
|
5756
5801
|
setValue: setValue$2
|
|
5757
5802
|
};
|
|
5758
5803
|
|
|
5759
|
-
const setMaskImage = ($Element, icon) => {
|
|
5760
|
-
if (!icon || icon.includes('/icons')) {
|
|
5761
|
-
$Element.style.maskImage = `url('${icon}')`;
|
|
5762
|
-
$Element.style.webkitMaskImage = `url('${icon}')`;
|
|
5763
|
-
} else {
|
|
5764
|
-
$Element.classList.add(`MaskIcon${icon}`);
|
|
5765
|
-
}
|
|
5766
|
-
};
|
|
5767
|
-
|
|
5768
|
-
const create$n = icon => {
|
|
5769
|
-
const $Icon = document.createElement('div');
|
|
5770
|
-
$Icon.className = 'MaskIcon';
|
|
5771
|
-
setMaskImage($Icon, icon);
|
|
5772
|
-
$Icon.role = None$1;
|
|
5773
|
-
return $Icon;
|
|
5774
|
-
};
|
|
5775
|
-
|
|
5776
|
-
const create$Button = (label, icon) => {
|
|
5777
|
-
// TODO icon div might not be needed (unnecessary HTML element)
|
|
5778
|
-
const $Icon = create$n(icon);
|
|
5779
|
-
const $Button = document.createElement('button');
|
|
5780
|
-
$Button.className = 'IconButton';
|
|
5781
|
-
$Button.title = label;
|
|
5782
|
-
$Button.ariaLabel = label;
|
|
5783
|
-
$Button.append($Icon);
|
|
5784
|
-
return $Button;
|
|
5785
|
-
};
|
|
5786
|
-
|
|
5787
5804
|
const handleClick$5 = index => {
|
|
5788
5805
|
send(/* Dialog.handleClick */'Dialog.handleClick', /* index */index);
|
|
5789
5806
|
};
|
|
@@ -5940,7 +5957,7 @@ const handleContextMenu$4 = event => {
|
|
|
5940
5957
|
} = event;
|
|
5941
5958
|
return ['handleContextMenu', button, clientX, clientY];
|
|
5942
5959
|
};
|
|
5943
|
-
const handleSashCornerPointerDown = create$
|
|
5960
|
+
const handleSashCornerPointerDown = create$o(event => {
|
|
5944
5961
|
const {
|
|
5945
5962
|
clientX,
|
|
5946
5963
|
clientY
|
|
@@ -6478,7 +6495,7 @@ const ViewletEditorError = {
|
|
|
6478
6495
|
};
|
|
6479
6496
|
|
|
6480
6497
|
const returnValue$3 = true;
|
|
6481
|
-
const handleSashPointerDown$2 = create$
|
|
6498
|
+
const handleSashPointerDown$2 = create$o(event => {
|
|
6482
6499
|
const {
|
|
6483
6500
|
clientX,
|
|
6484
6501
|
clientY
|
|
@@ -9519,10 +9536,10 @@ const commandMap = {
|
|
|
9519
9536
|
'Menu.showControlled': showControlled,
|
|
9520
9537
|
'Menu.showMenu': showMenu,
|
|
9521
9538
|
'Meta.setThemeColor': setThemeColor,
|
|
9522
|
-
'Notification.create': create$
|
|
9539
|
+
'Notification.create': create$s,
|
|
9523
9540
|
'Notification.createWithOptions': createWithOptions,
|
|
9524
9541
|
'Notification.dispose': dispose$h,
|
|
9525
|
-
'OffscreenCanvas.create': create$
|
|
9542
|
+
'OffscreenCanvas.create': create$r,
|
|
9526
9543
|
'OffscreenCanvas.create2': create2,
|
|
9527
9544
|
'Open.openUrl': openUrl,
|
|
9528
9545
|
'Open.redirectToUrl': redirectToUrl,
|