@lvce-editor/renderer-process 30.15.1 → 30.17.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.
@@ -978,287 +978,6 @@ const ElementTagMap = {
978
978
  getElementTag: getElementTag$1
979
979
  };
980
980
 
981
- const Backspace$1 = 'Backspace';
982
- const Tab$1 = 'Tab';
983
- const Space$1 = ' ';
984
- const Space2 = 'Space';
985
- const Enter$1 = 'Enter';
986
- const Escape$1 = 'Escape';
987
- const PageUp$1 = 'PageUp';
988
- const PageDown$1 = 'PageDown';
989
- const Home$1 = 'Home';
990
- const End$1 = 'End';
991
- const LeftArrow$1 = 'ArrowLeft';
992
- const RightArrow$1 = 'ArrowRight';
993
- const UpArrow$1 = 'ArrowUp';
994
- const DownArrow$1 = 'ArrowDown';
995
- const Insert$1 = 'Insert';
996
- const Delete$1 = 'Delete';
997
- const Digit0$1 = '0';
998
- const Digit1$1 = '1';
999
- const Digit2$1 = '2';
1000
- const Digit3$1 = '3';
1001
- const Digit4$1 = '4';
1002
- const Digit5$1 = '5';
1003
- const Digit6$1 = '6';
1004
- const Digit7$1 = '7';
1005
- const Digit8$1 = '8';
1006
- const Digit9$1 = '9';
1007
- const KeyA$1 = 'a';
1008
- const KeyB$1 = 'b';
1009
- const KeyC$1 = 'c';
1010
- const KeyD$1 = 'd';
1011
- const KeyE$1 = 'e';
1012
- const KeyF$1 = 'f';
1013
- const KeyG$1 = 'g';
1014
- const KeyH$1 = 'h';
1015
- const KeyI$1 = 'i';
1016
- const KeyJ$1 = 'j';
1017
- const KeyK$1 = 'k';
1018
- const KeyL$1 = 'l';
1019
- const KeyM$1 = 'm';
1020
- const KeyN$1 = 'n';
1021
- const KeyO$1 = 'o';
1022
- const KeyP$1 = 'p';
1023
- const KeyQ$1 = 'q';
1024
- const KeyR$1 = 'r';
1025
- const KeyS$1 = 's';
1026
- const KeyT$1 = 't';
1027
- const KeyU$1 = 'u';
1028
- const KeyV$1 = 'v';
1029
- const KeyW$1 = 'w';
1030
- const KeyX$1 = 'x';
1031
- const KeyY$1 = 'y';
1032
- const KeyZ$1 = 'z';
1033
- const F1$1 = 'F1';
1034
- const F2$1 = 'F2';
1035
- const F3$1 = 'F3';
1036
- const F4$1 = 'F4';
1037
- const F5$1 = 'F5';
1038
- const F6$1 = 'F6';
1039
- const F7$1 = 'F7';
1040
- const F8$1 = 'F8';
1041
- const F9$1 = 'F9';
1042
- const F10$1 = 'F10';
1043
- const F11$1 = 'F11';
1044
- const F12$1 = 'F12';
1045
- const F13$1 = 'F13';
1046
- const F14$1 = 'F14';
1047
- const F15$1 = 'F15';
1048
- const F16$1 = 'F16';
1049
- const F17$1 = 'F17';
1050
- const F18$1 = 'F18';
1051
- const F19$1 = 'F19';
1052
- const F20$1 = 'F20';
1053
- const F21$1 = 'F21';
1054
- const F22$1 = 'F22';
1055
- const F23$1 = 'F23';
1056
- const F24$1 = 'F24';
1057
- const SemiColon$1 = ';';
1058
- const Equal$1 = '=';
1059
- const Comma$1 = ',';
1060
- const Minus$1 = '-';
1061
- const Period$1 = '.';
1062
- const Slash$1 = '/';
1063
- const Backquote$1 = '`';
1064
- const Backquote2 = 'Backquote';
1065
- const BracketLeft$1 = '[';
1066
- const Backslash$1 = '\\';
1067
- const BracketRight$1 = ']';
1068
- const Quote$1 = `'`;
1069
- const Star$1 = '*';
1070
- const Plus$1 = '+';
1071
-
1072
- const Unknown = 0;
1073
- const Backspace = 1;
1074
- const Tab = 2;
1075
- const Enter = 3;
1076
- const Escape = 8;
1077
- const Space = 9;
1078
- const PageUp = 10;
1079
- const PageDown = 11;
1080
- const End = 255;
1081
- const Home = 12;
1082
- const LeftArrow = 13;
1083
- const UpArrow = 14;
1084
- const RightArrow = 15;
1085
- const DownArrow = 16;
1086
- const Insert = 17;
1087
- const Delete = 18;
1088
- const Digit0 = 19;
1089
- const Digit1 = 20;
1090
- const Digit2 = 21;
1091
- const Digit3 = 22;
1092
- const Digit4 = 23;
1093
- const Digit5 = 24;
1094
- const Digit6 = 25;
1095
- const Digit7 = 26;
1096
- const Digit8 = 27;
1097
- const Digit9 = 28;
1098
- const KeyA = 29;
1099
- const KeyB = 30;
1100
- const KeyC = 31;
1101
- const KeyD = 32;
1102
- const KeyE = 33;
1103
- const KeyF = 34;
1104
- const KeyG = 35;
1105
- const KeyH = 36;
1106
- const KeyI = 37;
1107
- const KeyJ = 38;
1108
- const KeyK = 39;
1109
- const KeyL = 40;
1110
- const KeyM = 41;
1111
- const KeyN = 42;
1112
- const KeyO = 43;
1113
- const KeyP = 44;
1114
- const KeyQ = 45;
1115
- const KeyR = 46;
1116
- const KeyS = 47;
1117
- const KeyT = 48;
1118
- const KeyU = 49;
1119
- const KeyV = 50;
1120
- const KeyW = 51;
1121
- const KeyX = 52;
1122
- const KeyY = 53;
1123
- const KeyZ = 54;
1124
- const F1 = 57;
1125
- const F2 = 58;
1126
- const F3 = 59;
1127
- const F4 = 60;
1128
- const F5 = 61;
1129
- const F6 = 62;
1130
- const F7 = 63;
1131
- const F8 = 64;
1132
- const F9 = 65;
1133
- const F10 = 66;
1134
- const F11 = 67;
1135
- const F12 = 68;
1136
- const F13 = 69;
1137
- const F14 = 70;
1138
- const F15 = 71;
1139
- const F16 = 72;
1140
- const F17 = 72;
1141
- const F18 = 74;
1142
- const F19 = 75;
1143
- const F20 = 76;
1144
- const F21 = 77;
1145
- const F22 = 78;
1146
- const F23 = 79;
1147
- const F24 = 80;
1148
- const SemiColon = 83;
1149
- const Equal = 84;
1150
- const Comma = 85;
1151
- const Minus = 86;
1152
- const Period = 87;
1153
- const Slash = 88;
1154
- const Backquote = 89;
1155
- const BracketLeft = 90;
1156
- const Backslash = 91;
1157
- const BracketRight = 92;
1158
- const Quote = 93;
1159
- const Star = 131;
1160
- const Plus = 132;
1161
-
1162
- const keyCodeMap$1 = {
1163
- [Backquote$1]: Backquote,
1164
- [Backquote2]: Backquote,
1165
- [Backslash$1]: Backslash,
1166
- [Backspace$1]: Backspace,
1167
- [BracketLeft$1]: BracketLeft,
1168
- [BracketRight$1]: BracketRight,
1169
- [Comma$1]: Comma,
1170
- [Delete$1]: Delete,
1171
- [Digit0$1]: Digit0,
1172
- [Digit1$1]: Digit1,
1173
- [Digit2$1]: Digit2,
1174
- [Digit3$1]: Digit3,
1175
- [Digit4$1]: Digit4,
1176
- [Digit5$1]: Digit5,
1177
- [Digit6$1]: Digit6,
1178
- [Digit7$1]: Digit7,
1179
- [Digit8$1]: Digit8,
1180
- [Digit9$1]: Digit9,
1181
- [DownArrow$1]: DownArrow,
1182
- [End$1]: End,
1183
- [Enter$1]: Enter,
1184
- [Equal$1]: Equal,
1185
- [Escape$1]: Escape,
1186
- [F1$1]: F1,
1187
- [F10$1]: F10,
1188
- [F11$1]: F11,
1189
- [F12$1]: F12,
1190
- [F13$1]: F13,
1191
- [F14$1]: F14,
1192
- [F15$1]: F15,
1193
- [F16$1]: F16,
1194
- [F17$1]: F17,
1195
- [F18$1]: F18,
1196
- [F19$1]: F19,
1197
- [F2$1]: F2,
1198
- [F20$1]: F20,
1199
- [F21$1]: F21,
1200
- [F22$1]: F22,
1201
- [F23$1]: F23,
1202
- [F24$1]: F24,
1203
- [F3$1]: F3,
1204
- [F4$1]: F4,
1205
- [F5$1]: F5,
1206
- [F6$1]: F6,
1207
- [F7$1]: F7,
1208
- [F8$1]: F8,
1209
- [F9$1]: F9,
1210
- [Home$1]: Home,
1211
- [Insert$1]: Insert,
1212
- [KeyA$1]: KeyA,
1213
- [KeyB$1]: KeyB,
1214
- [KeyC$1]: KeyC,
1215
- [KeyD$1]: KeyD,
1216
- [KeyE$1]: KeyE,
1217
- [KeyF$1]: KeyF,
1218
- [KeyG$1]: KeyG,
1219
- [KeyH$1]: KeyH,
1220
- [KeyI$1]: KeyI,
1221
- [KeyJ$1]: KeyJ,
1222
- [KeyK$1]: KeyK,
1223
- [KeyL$1]: KeyL,
1224
- [KeyM$1]: KeyM,
1225
- [KeyN$1]: KeyN,
1226
- [KeyO$1]: KeyO,
1227
- [KeyP$1]: KeyP,
1228
- [KeyQ$1]: KeyQ,
1229
- [KeyR$1]: KeyR,
1230
- [KeyS$1]: KeyS,
1231
- [KeyT$1]: KeyT,
1232
- [KeyU$1]: KeyU,
1233
- [KeyV$1]: KeyV,
1234
- [KeyW$1]: KeyW,
1235
- [KeyX$1]: KeyX,
1236
- [KeyY$1]: KeyY,
1237
- [KeyZ$1]: KeyZ,
1238
- [LeftArrow$1]: LeftArrow,
1239
- [Minus$1]: Minus,
1240
- [PageDown$1]: PageDown,
1241
- [PageUp$1]: PageUp,
1242
- [Period$1]: Period,
1243
- [Plus$1]: Plus,
1244
- [Quote$1]: Quote,
1245
- [RightArrow$1]: RightArrow,
1246
- [SemiColon$1]: SemiColon,
1247
- [Slash$1]: Slash,
1248
- [Space$1]: Space,
1249
- [Space2]: Space,
1250
- [Star$1]: Star,
1251
- [Tab$1]: Tab,
1252
- [UpArrow$1]: UpArrow
1253
- };
1254
- const getKeyCode = key => {
1255
- return keyCodeMap$1[key] || Unknown;
1256
- };
1257
-
1258
- const CtrlCmd = 1 << 11 >>> 0;
1259
- const Shift = 1 << 10 >>> 0;
1260
- const Alt = 1 << 9 >>> 0;
1261
-
1262
981
  const {
1263
982
  getElementTag
1264
983
  } = ElementTagMap;
@@ -3824,6 +3543,46 @@ const setThemeColor = color => {
3824
3543
  meta.content = color;
3825
3544
  };
3826
3545
 
3546
+ const Alert = 'alert';
3547
+ const Application = 'application';
3548
+ const Complementary = 'complementary';
3549
+ const Group = 'group';
3550
+ const ListBox = 'listbox';
3551
+ const Log = 'log';
3552
+ const Menu = 'menu';
3553
+ const None$1 = 'none';
3554
+ const Status = 'status';
3555
+ const TabList = 'tablist';
3556
+ const Toolbar = 'toolbar';
3557
+
3558
+ const setMaskImage = ($Element, icon) => {
3559
+ if (!icon || icon.includes('/icons')) {
3560
+ $Element.style.maskImage = `url('${icon}')`;
3561
+ $Element.style.webkitMaskImage = `url('${icon}')`;
3562
+ } else {
3563
+ $Element.classList.add(`MaskIcon${icon}`);
3564
+ }
3565
+ };
3566
+
3567
+ const create$t = icon => {
3568
+ const $Icon = document.createElement('div');
3569
+ $Icon.className = 'MaskIcon';
3570
+ setMaskImage($Icon, icon);
3571
+ $Icon.role = None$1;
3572
+ return $Icon;
3573
+ };
3574
+
3575
+ const create$Button = (label, icon) => {
3576
+ // TODO icon div might not be needed (unnecessary HTML element)
3577
+ const $Icon = create$t(icon);
3578
+ const $Button = document.createElement('button');
3579
+ $Button.className = 'IconButton';
3580
+ $Button.title = label;
3581
+ $Button.ariaLabel = label;
3582
+ $Button.append($Icon);
3583
+ return $Button;
3584
+ };
3585
+
3827
3586
  // TODO this file is not needed when all elements are position fixed
3828
3587
  const state$6 = {
3829
3588
  $Widgets: undefined,
@@ -3868,13 +3627,31 @@ const remove$1 = $Element => {
3868
3627
  }
3869
3628
  };
3870
3629
 
3630
+ const handleCloseClick = event => {
3631
+ const $CloseButton = event.currentTarget;
3632
+ remove$1($CloseButton.parentNode);
3633
+ };
3634
+ const create$NotificationMessage = message => {
3635
+ const $NotificationMessage = document.createElement('p');
3636
+ $NotificationMessage.className = 'NotificationMessage';
3637
+ $NotificationMessage.textContent = message;
3638
+ return $NotificationMessage;
3639
+ };
3640
+ const create$CloseButton = () => {
3641
+ const $CloseButton = create$Button('Close', 'Close');
3642
+ $CloseButton.classList.add('NotificationCloseButton');
3643
+ $CloseButton.onclick = handleCloseClick;
3644
+ return $CloseButton;
3645
+ };
3871
3646
  const create$Notification = message => {
3647
+ const $NotificationMessage = create$NotificationMessage(message);
3648
+ const $CloseButton = create$CloseButton();
3872
3649
  const $Notification = document.createElement('div');
3873
3650
  $Notification.className = 'Notification';
3874
- $Notification.textContent = message;
3651
+ $Notification.append($NotificationMessage, $CloseButton);
3875
3652
  return $Notification;
3876
3653
  };
3877
- const create$t = (type, message) => {
3654
+ const create$s = (type, message) => {
3878
3655
  // TODO this pattern might be also useful for activitybar, sidebar etc., creating elements as late as possible, only when actually needed
3879
3656
  const $Notification = create$Notification(message);
3880
3657
  append$1($Notification);
@@ -3898,9 +3675,8 @@ const handleNotificationClick = event => {
3898
3675
  }
3899
3676
  };
3900
3677
  const create$NotificationWithOptions = (message, options) => {
3901
- const $NotificationMessage = document.createElement('p');
3902
- $NotificationMessage.className = 'NotificationMessage';
3903
- $NotificationMessage.textContent = message;
3678
+ const $NotificationMessage = create$NotificationMessage(message);
3679
+ const $CloseButton = create$CloseButton();
3904
3680
  const $NotificationOptions = document.createElement('div');
3905
3681
  $NotificationOptions.className = 'NotificationOptions';
3906
3682
  for (const option of options) {
@@ -3911,7 +3687,7 @@ const create$NotificationWithOptions = (message, options) => {
3911
3687
  }
3912
3688
  const $Notification = document.createElement('div');
3913
3689
  $Notification.className = 'Notification';
3914
- $Notification.append($NotificationMessage, $NotificationOptions);
3690
+ $Notification.append($NotificationMessage, $CloseButton, $NotificationOptions);
3915
3691
  $Notification.onclick = handleNotificationClick;
3916
3692
  return $Notification;
3917
3693
  };
@@ -3930,7 +3706,7 @@ const set$6 = (canvasId, canvas) => {
3930
3706
  state$5.canvasObjects[canvasId] = canvas;
3931
3707
  };
3932
3708
 
3933
- const create$s = async (canvasId, objectId) => {
3709
+ const create$r = async (canvasId, objectId) => {
3934
3710
  const canvas = document.createElement('canvas');
3935
3711
  const offscreenCanvas = canvas.transferControlToOffscreen();
3936
3712
  set$6(canvasId, canvas);
@@ -3958,18 +3734,6 @@ const create2 = async (canvasId, objectId, width, height) => {
3958
3734
  const True = 'true';
3959
3735
  const False = 'false';
3960
3736
 
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
3737
  const create$BackDrop = () => {
3974
3738
  const $BackDrop = document.createElement('div');
3975
3739
  $BackDrop.className = 'BackDrop';
@@ -4861,7 +4625,7 @@ const ConditionValues = {
4861
4625
  toHaveText: toHaveText$1
4862
4626
  };
4863
4627
 
4864
- const keyCodeMap = {
4628
+ const keyCodeMap$1 = {
4865
4629
  ' ': {
4866
4630
  code: 'Space',
4867
4631
  keyCode: 32
@@ -4888,8 +4652,8 @@ const keyCodeMap = {
4888
4652
  const getKeyboardOptions = options => {
4889
4653
  const key = options.key || '';
4890
4654
  const normalizedKey = key === 'Space' ? ' ' : key;
4891
- if (keyCodeMap[key]) {
4892
- const mapped = keyCodeMap[key];
4655
+ if (keyCodeMap$1[key]) {
4656
+ const mapped = keyCodeMap$1[key];
4893
4657
  const keyCode = mapped.keyCode;
4894
4658
  return {
4895
4659
  ...options,
@@ -5277,7 +5041,7 @@ const showError = (message, y, x) => {
5277
5041
  $ImagePreviewImage
5278
5042
  };
5279
5043
  };
5280
- const create$r = (uri, top, left) => {
5044
+ const create$q = (uri, top, left) => {
5281
5045
  const $ImagePreviewImage = document.createElement('img');
5282
5046
  $ImagePreviewImage.className = 'ImagePreviewImage';
5283
5047
  $ImagePreviewImage.src = uri;
@@ -5308,7 +5072,7 @@ const dispose$g = state => {
5308
5072
 
5309
5073
  const ImagePreview$1 = {
5310
5074
  __proto__: null,
5311
- create: create$r,
5075
+ create: create$q,
5312
5076
  dispose: dispose$g,
5313
5077
  showError,
5314
5078
  update
@@ -5527,7 +5291,7 @@ const ViewletAudio = {
5527
5291
  Events: Events$4
5528
5292
  };
5529
5293
 
5530
- const create$q = () => {
5294
+ const create$p = () => {
5531
5295
  const $Viewlet = document.createElement('div');
5532
5296
  $Viewlet.className = 'Viewlet Clock';
5533
5297
  return {
@@ -5544,7 +5308,7 @@ const setTime = (state, time) => {
5544
5308
 
5545
5309
  const ViewletClock = {
5546
5310
  __proto__: null,
5547
- create: create$q,
5311
+ create: create$p,
5548
5312
  dispose: dispose$f,
5549
5313
  refresh: refresh$3,
5550
5314
  setTime
@@ -5573,7 +5337,7 @@ const stopTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp)
5573
5337
  // TODO use pointerlost event instead
5574
5338
  $Target.removeEventListener(PointerUp, handlePointerUp);
5575
5339
  };
5576
- const create$p = (pointerDown, pointerMove, pointerUp) => {
5340
+ const create$o = (pointerDown, pointerMove, pointerUp) => {
5577
5341
  const shared = (fn, event) => {
5578
5342
  const message = fn(event);
5579
5343
  if (!message || message.length === 0) {
@@ -5606,7 +5370,7 @@ const create$p = (pointerDown, pointerMove, pointerUp) => {
5606
5370
  };
5607
5371
 
5608
5372
  const handleOffset = 20;
5609
- const handleSliderPointerDown = create$p(event => {
5373
+ const handleSliderPointerDown = create$o(event => {
5610
5374
  const {
5611
5375
  clientX,
5612
5376
  clientY
@@ -5688,7 +5452,7 @@ const ViewletDebugConsoleEvents = {
5688
5452
  handleInput: handleInput$5
5689
5453
  };
5690
5454
 
5691
- const create$o = () => {
5455
+ const create$n = () => {
5692
5456
  const $Viewlet = document.createElement('div');
5693
5457
  $Viewlet.className = 'Viewlet DebugConsole';
5694
5458
  return {
@@ -5704,7 +5468,7 @@ const setDom$9 = (state, dom) => {
5704
5468
 
5705
5469
  const ViewletDebugConsole = {
5706
5470
  __proto__: null,
5707
- create: create$o,
5471
+ create: create$n,
5708
5472
  setDom: setDom$9
5709
5473
  };
5710
5474
 
@@ -5756,34 +5520,6 @@ const ViewletDefineKeyBinding = {
5756
5520
  setValue: setValue$2
5757
5521
  };
5758
5522
 
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
5523
  const handleClick$5 = index => {
5788
5524
  send(/* Dialog.handleClick */'Dialog.handleClick', /* index */index);
5789
5525
  };
@@ -5940,7 +5676,7 @@ const handleContextMenu$4 = event => {
5940
5676
  } = event;
5941
5677
  return ['handleContextMenu', button, clientX, clientY];
5942
5678
  };
5943
- const handleSashCornerPointerDown = create$p(event => {
5679
+ const handleSashCornerPointerDown = create$o(event => {
5944
5680
  const {
5945
5681
  clientX,
5946
5682
  clientY
@@ -6478,7 +6214,7 @@ const ViewletEditorError = {
6478
6214
  };
6479
6215
 
6480
6216
  const returnValue$3 = true;
6481
- const handleSashPointerDown$2 = create$p(event => {
6217
+ const handleSashPointerDown$2 = create$o(event => {
6482
6218
  const {
6483
6219
  clientX,
6484
6220
  clientY
@@ -7178,52 +6914,333 @@ const handlePointerDown = event => {
7178
6914
  pointerDownFunction(event);
7179
6915
  };
7180
6916
 
7181
- const ViewletkeyBindingsEvents = {
7182
- __proto__: null,
7183
- handlePointerDown,
7184
- handleResizerPointerDown,
7185
- handleResizerPointerMove,
7186
- handleResizerPointerUp
7187
- };
6917
+ const ViewletkeyBindingsEvents = {
6918
+ __proto__: null,
6919
+ handlePointerDown,
6920
+ handleResizerPointerDown,
6921
+ handleResizerPointerMove,
6922
+ handleResizerPointerUp
6923
+ };
6924
+
6925
+ const setValue = (state, value) => {
6926
+ const {
6927
+ $Viewlet
6928
+ } = state;
6929
+ const $InputBox = $Viewlet.querySelector(':scope input');
6930
+ $InputBox.value = value;
6931
+ };
6932
+ const setColumnWidths = (state, columnWidth1, columnWidth2, columnWidth3) => {
6933
+ const paddingLeft = 15;
6934
+ const {
6935
+ $Viewlet
6936
+ } = state;
6937
+ const $$Resizers = $Viewlet.querySelectorAll(':scope .Resizer');
6938
+ const $Resizer1 = $$Resizers[0];
6939
+ const $Resizer2 = $$Resizers[1];
6940
+ $Resizer1.style.left = `${paddingLeft + columnWidth1}px`;
6941
+ $Resizer2.style.left = `${paddingLeft + columnWidth1 + columnWidth2}px`;
6942
+ };
6943
+ const Events$2 = ViewletkeyBindingsEvents;
6944
+
6945
+ const ViewletKeyBindings = {
6946
+ __proto__: null,
6947
+ Events: Events$2,
6948
+ setColumnWidths,
6949
+ setScrollBar,
6950
+ setSize,
6951
+ setValue
6952
+ };
6953
+
6954
+ const getSashId = $Target => {
6955
+ if ($Target.id === 'SashPanel') {
6956
+ return 'Panel';
6957
+ }
6958
+ if ($Target.id === 'SashSideBar') {
6959
+ return 'SideBar';
6960
+ }
6961
+ return '';
6962
+ };
6963
+
6964
+ const Backspace$1 = 'Backspace';
6965
+ const Tab$1 = 'Tab';
6966
+ const Space$1 = ' ';
6967
+ const Space2 = 'Space';
6968
+ const Enter$1 = 'Enter';
6969
+ const Escape$1 = 'Escape';
6970
+ const PageUp$1 = 'PageUp';
6971
+ const PageDown$1 = 'PageDown';
6972
+ const Home$1 = 'Home';
6973
+ const End$1 = 'End';
6974
+ const LeftArrow$1 = 'ArrowLeft';
6975
+ const RightArrow$1 = 'ArrowRight';
6976
+ const UpArrow$1 = 'ArrowUp';
6977
+ const DownArrow$1 = 'ArrowDown';
6978
+ const Insert$1 = 'Insert';
6979
+ const Delete$1 = 'Delete';
6980
+ const Digit0$1 = '0';
6981
+ const Digit1$1 = '1';
6982
+ const Digit2$1 = '2';
6983
+ const Digit3$1 = '3';
6984
+ const Digit4$1 = '4';
6985
+ const Digit5$1 = '5';
6986
+ const Digit6$1 = '6';
6987
+ const Digit7$1 = '7';
6988
+ const Digit8$1 = '8';
6989
+ const Digit9$1 = '9';
6990
+ const KeyA$1 = 'a';
6991
+ const KeyB$1 = 'b';
6992
+ const KeyC$1 = 'c';
6993
+ const KeyD$1 = 'd';
6994
+ const KeyE$1 = 'e';
6995
+ const KeyF$1 = 'f';
6996
+ const KeyG$1 = 'g';
6997
+ const KeyH$1 = 'h';
6998
+ const KeyI$1 = 'i';
6999
+ const KeyJ$1 = 'j';
7000
+ const KeyK$1 = 'k';
7001
+ const KeyL$1 = 'l';
7002
+ const KeyM$1 = 'm';
7003
+ const KeyN$1 = 'n';
7004
+ const KeyO$1 = 'o';
7005
+ const KeyP$1 = 'p';
7006
+ const KeyQ$1 = 'q';
7007
+ const KeyR$1 = 'r';
7008
+ const KeyS$1 = 's';
7009
+ const KeyT$1 = 't';
7010
+ const KeyU$1 = 'u';
7011
+ const KeyV$1 = 'v';
7012
+ const KeyW$1 = 'w';
7013
+ const KeyX$1 = 'x';
7014
+ const KeyY$1 = 'y';
7015
+ const KeyZ$1 = 'z';
7016
+ const F1$1 = 'F1';
7017
+ const F2$1 = 'F2';
7018
+ const F3$1 = 'F3';
7019
+ const F4$1 = 'F4';
7020
+ const F5$1 = 'F5';
7021
+ const F6$1 = 'F6';
7022
+ const F7$1 = 'F7';
7023
+ const F8$1 = 'F8';
7024
+ const F9$1 = 'F9';
7025
+ const F10$1 = 'F10';
7026
+ const F11$1 = 'F11';
7027
+ const F12$1 = 'F12';
7028
+ const F13$1 = 'F13';
7029
+ const F14$1 = 'F14';
7030
+ const F15$1 = 'F15';
7031
+ const F16$1 = 'F16';
7032
+ const F17$1 = 'F17';
7033
+ const F18$1 = 'F18';
7034
+ const F19$1 = 'F19';
7035
+ const F20$1 = 'F20';
7036
+ const F21$1 = 'F21';
7037
+ const F22$1 = 'F22';
7038
+ const F23$1 = 'F23';
7039
+ const F24$1 = 'F24';
7040
+ const SemiColon$1 = ';';
7041
+ const Equal$1 = '=';
7042
+ const Comma$1 = ',';
7043
+ const Minus$1 = '-';
7044
+ const Period$1 = '.';
7045
+ const Slash$1 = '/';
7046
+ const Backquote$1 = '`';
7047
+ const Backquote2 = 'Backquote';
7048
+ const BracketLeft$1 = '[';
7049
+ const Backslash$1 = '\\';
7050
+ const BracketRight$1 = ']';
7051
+ const Quote$1 = `'`;
7052
+ const Star$1 = '*';
7053
+ const Plus$1 = '+';
7054
+
7055
+ const Unknown = 0;
7056
+ const Backspace = 1;
7057
+ const Tab = 2;
7058
+ const Enter = 3;
7059
+ const Escape = 8;
7060
+ const Space = 9;
7061
+ const PageUp = 10;
7062
+ const PageDown = 11;
7063
+ const End = 255;
7064
+ const Home = 12;
7065
+ const LeftArrow = 13;
7066
+ const UpArrow = 14;
7067
+ const RightArrow = 15;
7068
+ const DownArrow = 16;
7069
+ const Insert = 17;
7070
+ const Delete = 18;
7071
+ const Digit0 = 19;
7072
+ const Digit1 = 20;
7073
+ const Digit2 = 21;
7074
+ const Digit3 = 22;
7075
+ const Digit4 = 23;
7076
+ const Digit5 = 24;
7077
+ const Digit6 = 25;
7078
+ const Digit7 = 26;
7079
+ const Digit8 = 27;
7080
+ const Digit9 = 28;
7081
+ const KeyA = 29;
7082
+ const KeyB = 30;
7083
+ const KeyC = 31;
7084
+ const KeyD = 32;
7085
+ const KeyE = 33;
7086
+ const KeyF = 34;
7087
+ const KeyG = 35;
7088
+ const KeyH = 36;
7089
+ const KeyI = 37;
7090
+ const KeyJ = 38;
7091
+ const KeyK = 39;
7092
+ const KeyL = 40;
7093
+ const KeyM = 41;
7094
+ const KeyN = 42;
7095
+ const KeyO = 43;
7096
+ const KeyP = 44;
7097
+ const KeyQ = 45;
7098
+ const KeyR = 46;
7099
+ const KeyS = 47;
7100
+ const KeyT = 48;
7101
+ const KeyU = 49;
7102
+ const KeyV = 50;
7103
+ const KeyW = 51;
7104
+ const KeyX = 52;
7105
+ const KeyY = 53;
7106
+ const KeyZ = 54;
7107
+ const F1 = 57;
7108
+ const F2 = 58;
7109
+ const F3 = 59;
7110
+ const F4 = 60;
7111
+ const F5 = 61;
7112
+ const F6 = 62;
7113
+ const F7 = 63;
7114
+ const F8 = 64;
7115
+ const F9 = 65;
7116
+ const F10 = 66;
7117
+ const F11 = 67;
7118
+ const F12 = 68;
7119
+ const F13 = 69;
7120
+ const F14 = 70;
7121
+ const F15 = 71;
7122
+ const F16 = 72;
7123
+ const F17 = 72;
7124
+ const F18 = 74;
7125
+ const F19 = 75;
7126
+ const F20 = 76;
7127
+ const F21 = 77;
7128
+ const F22 = 78;
7129
+ const F23 = 79;
7130
+ const F24 = 80;
7131
+ const SemiColon = 83;
7132
+ const Equal = 84;
7133
+ const Comma = 85;
7134
+ const Minus = 86;
7135
+ const Period = 87;
7136
+ const Slash = 88;
7137
+ const Backquote = 89;
7138
+ const BracketLeft = 90;
7139
+ const Backslash = 91;
7140
+ const BracketRight = 92;
7141
+ const Quote = 93;
7142
+ const Star = 131;
7143
+ const Plus = 132;
7188
7144
 
7189
- const setValue = (state, value) => {
7190
- const {
7191
- $Viewlet
7192
- } = state;
7193
- const $InputBox = $Viewlet.querySelector(':scope input');
7194
- $InputBox.value = value;
7195
- };
7196
- const setColumnWidths = (state, columnWidth1, columnWidth2, columnWidth3) => {
7197
- const paddingLeft = 15;
7198
- const {
7199
- $Viewlet
7200
- } = state;
7201
- const $$Resizers = $Viewlet.querySelectorAll(':scope .Resizer');
7202
- const $Resizer1 = $$Resizers[0];
7203
- const $Resizer2 = $$Resizers[1];
7204
- $Resizer1.style.left = `${paddingLeft + columnWidth1}px`;
7205
- $Resizer2.style.left = `${paddingLeft + columnWidth1 + columnWidth2}px`;
7145
+ const keyCodeMap = {
7146
+ [Backquote$1]: Backquote,
7147
+ [Backquote2]: Backquote,
7148
+ [Backslash$1]: Backslash,
7149
+ [Backspace$1]: Backspace,
7150
+ [BracketLeft$1]: BracketLeft,
7151
+ [BracketRight$1]: BracketRight,
7152
+ [Comma$1]: Comma,
7153
+ [Delete$1]: Delete,
7154
+ [Digit0$1]: Digit0,
7155
+ [Digit1$1]: Digit1,
7156
+ [Digit2$1]: Digit2,
7157
+ [Digit3$1]: Digit3,
7158
+ [Digit4$1]: Digit4,
7159
+ [Digit5$1]: Digit5,
7160
+ [Digit6$1]: Digit6,
7161
+ [Digit7$1]: Digit7,
7162
+ [Digit8$1]: Digit8,
7163
+ [Digit9$1]: Digit9,
7164
+ [DownArrow$1]: DownArrow,
7165
+ [End$1]: End,
7166
+ [Enter$1]: Enter,
7167
+ [Equal$1]: Equal,
7168
+ [Escape$1]: Escape,
7169
+ [F1$1]: F1,
7170
+ [F10$1]: F10,
7171
+ [F11$1]: F11,
7172
+ [F12$1]: F12,
7173
+ [F13$1]: F13,
7174
+ [F14$1]: F14,
7175
+ [F15$1]: F15,
7176
+ [F16$1]: F16,
7177
+ [F17$1]: F17,
7178
+ [F18$1]: F18,
7179
+ [F19$1]: F19,
7180
+ [F2$1]: F2,
7181
+ [F20$1]: F20,
7182
+ [F21$1]: F21,
7183
+ [F22$1]: F22,
7184
+ [F23$1]: F23,
7185
+ [F24$1]: F24,
7186
+ [F3$1]: F3,
7187
+ [F4$1]: F4,
7188
+ [F5$1]: F5,
7189
+ [F6$1]: F6,
7190
+ [F7$1]: F7,
7191
+ [F8$1]: F8,
7192
+ [F9$1]: F9,
7193
+ [Home$1]: Home,
7194
+ [Insert$1]: Insert,
7195
+ [KeyA$1]: KeyA,
7196
+ [KeyB$1]: KeyB,
7197
+ [KeyC$1]: KeyC,
7198
+ [KeyD$1]: KeyD,
7199
+ [KeyE$1]: KeyE,
7200
+ [KeyF$1]: KeyF,
7201
+ [KeyG$1]: KeyG,
7202
+ [KeyH$1]: KeyH,
7203
+ [KeyI$1]: KeyI,
7204
+ [KeyJ$1]: KeyJ,
7205
+ [KeyK$1]: KeyK,
7206
+ [KeyL$1]: KeyL,
7207
+ [KeyM$1]: KeyM,
7208
+ [KeyN$1]: KeyN,
7209
+ [KeyO$1]: KeyO,
7210
+ [KeyP$1]: KeyP,
7211
+ [KeyQ$1]: KeyQ,
7212
+ [KeyR$1]: KeyR,
7213
+ [KeyS$1]: KeyS,
7214
+ [KeyT$1]: KeyT,
7215
+ [KeyU$1]: KeyU,
7216
+ [KeyV$1]: KeyV,
7217
+ [KeyW$1]: KeyW,
7218
+ [KeyX$1]: KeyX,
7219
+ [KeyY$1]: KeyY,
7220
+ [KeyZ$1]: KeyZ,
7221
+ [LeftArrow$1]: LeftArrow,
7222
+ [Minus$1]: Minus,
7223
+ [PageDown$1]: PageDown,
7224
+ [PageUp$1]: PageUp,
7225
+ [Period$1]: Period,
7226
+ [Plus$1]: Plus,
7227
+ [Quote$1]: Quote,
7228
+ [RightArrow$1]: RightArrow,
7229
+ [SemiColon$1]: SemiColon,
7230
+ [Slash$1]: Slash,
7231
+ [Space$1]: Space,
7232
+ [Space2]: Space,
7233
+ [Star$1]: Star,
7234
+ [Tab$1]: Tab,
7235
+ [UpArrow$1]: UpArrow
7206
7236
  };
7207
- const Events$2 = ViewletkeyBindingsEvents;
7208
-
7209
- const ViewletKeyBindings = {
7210
- __proto__: null,
7211
- Events: Events$2,
7212
- setColumnWidths,
7213
- setScrollBar,
7214
- setSize,
7215
- setValue
7237
+ const getKeyCode = key => {
7238
+ return keyCodeMap[key] || Unknown;
7216
7239
  };
7217
7240
 
7218
- const getSashId = $Target => {
7219
- if ($Target.id === 'SashPanel') {
7220
- return 'Panel';
7221
- }
7222
- if ($Target.id === 'SashSideBar') {
7223
- return 'SideBar';
7224
- }
7225
- return '';
7226
- };
7241
+ const CtrlCmd = 1 << 11 >>> 0;
7242
+ const Shift = 1 << 10 >>> 0;
7243
+ const Alt = 1 << 9 >>> 0;
7227
7244
 
7228
7245
  const normalizeKey = (key, code) => {
7229
7246
  if (key.length === 1) {
@@ -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$t,
9539
+ 'Notification.create': create$s,
9523
9540
  'Notification.createWithOptions': createWithOptions,
9524
9541
  'Notification.dispose': dispose$h,
9525
- 'OffscreenCanvas.create': create$s,
9542
+ 'OffscreenCanvas.create': create$r,
9526
9543
  'OffscreenCanvas.create2': create2,
9527
9544
  'Open.openUrl': openUrl,
9528
9545
  'Open.redirectToUrl': redirectToUrl,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "30.15.1",
3
+ "version": "30.17.0",
4
4
  "keywords": [
5
5
  "lvce-editor",
6
6
  "renderer-process"