@lvce-editor/renderer-process 14.6.0 → 15.1.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.
@@ -237,7 +237,7 @@ const Col = 2;
237
237
  const ColGroup = 3;
238
238
  const Div = 4;
239
239
  const H1 = 5;
240
- const Input$2 = 6;
240
+ const Input = 6;
241
241
  const Kbd = 7;
242
242
  const Span = 8;
243
243
  const Table = 9;
@@ -318,7 +318,7 @@ const getElementTag = type => {
318
318
  return THead$1;
319
319
  case Tr:
320
320
  return Tr$1;
321
- case Input$2:
321
+ case Input:
322
322
  return Input$1;
323
323
  case ColGroup:
324
324
  return ColGroup$1;
@@ -713,7 +713,7 @@ const getDragInfo = id => {
713
713
  return dragInfos[id];
714
714
  };
715
715
  let id$1 = 0;
716
- const create$I = () => {
716
+ const create$H = () => {
717
717
  return ++id$1;
718
718
  };
719
719
  const state$8 = Object.create(null);
@@ -728,7 +728,7 @@ const getFileHandles$1 = async ids => {
728
728
  return handles;
729
729
  };
730
730
  const add = promise => {
731
- const id = create$I();
731
+ const id = create$H();
732
732
  state$8[id] = promise;
733
733
  return id;
734
734
  };
@@ -1259,7 +1259,7 @@ const getWorkerDisplayName$1 = name => {
1259
1259
  }
1260
1260
  return `${name} worker`;
1261
1261
  };
1262
- const create$H = async ({
1262
+ const create$G = async ({
1263
1263
  url,
1264
1264
  name
1265
1265
  }) => {
@@ -1326,7 +1326,7 @@ const wrap = worker => {
1326
1326
 
1327
1327
  const IpcParentWithModuleWorker$2 = {
1328
1328
  __proto__: null,
1329
- create: create$H,
1329
+ create: create$G,
1330
1330
  wrap
1331
1331
  };
1332
1332
 
@@ -1334,7 +1334,7 @@ const isMessagePort$1 = value => {
1334
1334
  return value instanceof MessagePort;
1335
1335
  };
1336
1336
 
1337
- const create$G = async ({
1337
+ const create$F = async ({
1338
1338
  url
1339
1339
  }) => {
1340
1340
  string(url);
@@ -1355,10 +1355,10 @@ const create$G = async ({
1355
1355
 
1356
1356
  const IpcParentWithMessagePort$2 = {
1357
1357
  __proto__: null,
1358
- create: create$G
1358
+ create: create$F
1359
1359
  };
1360
1360
 
1361
- const create$F = async url => {
1361
+ const create$E = async url => {
1362
1362
  const referencePort = await new Promise(resolve => {
1363
1363
  globalThis.acceptReferencePort = resolve;
1364
1364
  import(url);
@@ -1369,7 +1369,7 @@ const create$F = async url => {
1369
1369
 
1370
1370
  const IpcParentWithReferencePort = {
1371
1371
  __proto__: null,
1372
- create: create$F
1372
+ create: create$E
1373
1373
  };
1374
1374
 
1375
1375
  const normalizeLine = line => {
@@ -1514,7 +1514,7 @@ const fixElectronParameters = value => {
1514
1514
  transfer
1515
1515
  };
1516
1516
  };
1517
- const attachEvents$b = that => {
1517
+ const attachEvents$a = that => {
1518
1518
  const handleMessage = (...args) => {
1519
1519
  const data = that.getData(...args);
1520
1520
  that.dispatchEvent(new MessageEvent('message', {
@@ -1531,7 +1531,7 @@ class Ipc extends EventTarget {
1531
1531
  constructor(rawIpc) {
1532
1532
  super();
1533
1533
  this._rawIpc = rawIpc;
1534
- attachEvents$b(this);
1534
+ attachEvents$a(this);
1535
1535
  }
1536
1536
  }
1537
1537
  const E_INCOMPATIBLE_NATIVE_MODULE = 'E_INCOMPATIBLE_NATIVE_MODULE';
@@ -2179,7 +2179,7 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
2179
2179
  const errorProperty = getErrorProperty(error, prettyError);
2180
2180
  return create$1$1(id, errorProperty);
2181
2181
  };
2182
- const create$E = (message, result) => {
2182
+ const create$D = (message, result) => {
2183
2183
  return {
2184
2184
  jsonrpc: Two,
2185
2185
  id: message.id,
@@ -2188,7 +2188,7 @@ const create$E = (message, result) => {
2188
2188
  };
2189
2189
  const getSuccessResponse = (message, result) => {
2190
2190
  const resultProperty = result ?? null;
2191
- return create$E(message, resultProperty);
2191
+ return create$D(message, resultProperty);
2192
2192
  };
2193
2193
  const getErrorResponseSimple = (id, error) => {
2194
2194
  return {
@@ -2468,7 +2468,7 @@ const PlainMessagePortRpcParent = {
2468
2468
  };
2469
2469
 
2470
2470
  // TODO add test
2471
- const create$D = async ({
2471
+ const create$C = async ({
2472
2472
  url,
2473
2473
  name,
2474
2474
  port
@@ -2484,7 +2484,7 @@ const create$D = async ({
2484
2484
 
2485
2485
  const IpcParentWithModuleWorkerWithMessagePort = {
2486
2486
  __proto__: null,
2487
- create: create$D
2487
+ create: create$C
2488
2488
  };
2489
2489
 
2490
2490
  const Web = 1;
@@ -2517,7 +2517,7 @@ const platform = getPlatform();
2517
2517
  const isElectron = platform === Electron;
2518
2518
 
2519
2519
  // TODO use handleIncomingIpc function
2520
- const create$C = async ({
2520
+ const create$B = async ({
2521
2521
  port,
2522
2522
  ipcId
2523
2523
  }) => {
@@ -2535,7 +2535,7 @@ const create$C = async ({
2535
2535
 
2536
2536
  const IpcParentWithElectron = {
2537
2537
  __proto__: null,
2538
- create: create$C
2538
+ create: create$B
2539
2539
  };
2540
2540
 
2541
2541
  const getModule = method => {
@@ -2626,7 +2626,7 @@ const hydrate$3 = async () => {
2626
2626
  };
2627
2627
 
2628
2628
  // TODO needed?
2629
- const dispose$k = () => {
2629
+ const dispose$j = () => {
2630
2630
  if (state$7.rpc) {
2631
2631
  // @ts-expect-error
2632
2632
  state$7.rpc.dispose();
@@ -2651,7 +2651,7 @@ const invokeAndTransfer = (method, ...params) => {
2651
2651
 
2652
2652
  const RendererWorker = {
2653
2653
  __proto__: null,
2654
- dispose: dispose$k,
2654
+ dispose: dispose$j,
2655
2655
  hydrate: hydrate$3,
2656
2656
  invoke: invoke$1,
2657
2657
  invokeAndTransfer,
@@ -2660,7 +2660,7 @@ const RendererWorker = {
2660
2660
  state: state$7
2661
2661
  };
2662
2662
 
2663
- const create$B = async ({
2663
+ const create$A = async ({
2664
2664
  method,
2665
2665
  ...options
2666
2666
  }) => {
@@ -2777,7 +2777,7 @@ const create$Notification = message => {
2777
2777
  $Notification.textContent = message;
2778
2778
  return $Notification;
2779
2779
  };
2780
- const create$A = (type, message) => {
2780
+ const create$z = (type, message) => {
2781
2781
  // TODO this pattern might be also useful for activitybar, sidebar etc., creating elements as late as possible, only when actually needed
2782
2782
  const $Notification = create$Notification(message);
2783
2783
  append$1($Notification);
@@ -2822,7 +2822,7 @@ const createWithOptions = (type, message, options) => {
2822
2822
  const $Notification = create$NotificationWithOptions(message, options);
2823
2823
  append$1($Notification);
2824
2824
  };
2825
- const dispose$j = id => {
2825
+ const dispose$i = id => {
2826
2826
  // const $Notification = state.$Notifications
2827
2827
  };
2828
2828
 
@@ -2839,7 +2839,7 @@ const set$6 = (canvasId, canvas) => {
2839
2839
  const get$4 = id => {
2840
2840
  return get$5(id);
2841
2841
  };
2842
- const create$z = async (canvasId, objectId) => {
2842
+ const create$y = async (canvasId, objectId) => {
2843
2843
  const canvas = document.createElement('canvas');
2844
2844
  const offscreenCanvas = canvas.transferControlToOffscreen();
2845
2845
  set$6(canvasId, canvas);
@@ -2855,7 +2855,6 @@ const Code = 'code';
2855
2855
  const Complementary = 'complementary';
2856
2856
  const ContentInfo = 'contentinfo';
2857
2857
  const Group = 'group';
2858
- const List$1 = 'list';
2859
2858
  const ListBox = 'listbox';
2860
2859
  const Log = 'log';
2861
2860
  const Main$1 = 'main';
@@ -2897,7 +2896,6 @@ const Error$2 = 'error';
2897
2896
  const Focus = 'focus';
2898
2897
  const FocusIn = 'focusin';
2899
2898
  const FocusOut = 'focusout';
2900
- const Input = 'input';
2901
2899
  const KeyDown = 'keydown';
2902
2900
  const KeyUp = 'keyup';
2903
2901
  const LostPointerCapture = 'lostpointercapture';
@@ -2910,10 +2908,6 @@ const PointerDown = 'pointerdown';
2910
2908
  const PointerMove = 'pointermove';
2911
2909
  const PointerUp = 'pointerup';
2912
2910
  const Resize = 'resize';
2913
- const Scroll = 'scroll';
2914
- const TouchEnd = 'touchend';
2915
- const TouchMove = 'touchmove';
2916
- const TouchStart = 'touchstart';
2917
2911
  const Wheel = 'wheel';
2918
2912
 
2919
2913
  /**
@@ -2962,7 +2956,7 @@ const getElement = () => {
2962
2956
  return state$4.$PreviousFocusElement;
2963
2957
  };
2964
2958
 
2965
- const focus$h = $Element => {
2959
+ const focus$f = $Element => {
2966
2960
  if ($Element === document.activeElement) {
2967
2961
  return;
2968
2962
  }
@@ -3154,7 +3148,7 @@ const create$Menu$1 = () => {
3154
3148
  // })
3155
3149
  $Menu.onkeydown = handleKeyDown$5;
3156
3150
  $Menu.addEventListener(FocusOut, handleFocusOut$1);
3157
- $Menu.oncontextmenu = handleContextMenu$b;
3151
+ $Menu.oncontextmenu = handleContextMenu$a;
3158
3152
  // $ContextMenu.onfocus = handleFocus
3159
3153
  // $ContextMenu.onblur = handleBlur
3160
3154
  return $Menu;
@@ -3183,14 +3177,14 @@ const handleBackDropMouseDown = event => {
3183
3177
  stopPropagation(event);
3184
3178
  send(/* Menu.hide */'Menu.hide');
3185
3179
  };
3186
- const handleContextMenu$b = event => {
3180
+ const handleContextMenu$a = event => {
3187
3181
  preventDefault(event);
3188
3182
  };
3189
3183
  const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom, mouseBlocking = false) => {
3190
3184
  if (mouseBlocking) {
3191
3185
  const $BackDrop = create$BackDrop();
3192
3186
  $BackDrop.onmousedown = handleBackDropMouseDown;
3193
- $BackDrop.oncontextmenu = handleContextMenu$b;
3187
+ $BackDrop.oncontextmenu = handleContextMenu$a;
3194
3188
  // @ts-expect-error
3195
3189
  state$3.$BackDrop = $BackDrop;
3196
3190
  append$1($BackDrop);
@@ -3211,7 +3205,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom, mous
3211
3205
  state$3.$$Menus.push($Menu);
3212
3206
  append$1($Menu);
3213
3207
  if (level === 0) {
3214
- focus$h($Menu);
3208
+ focus$f($Menu);
3215
3209
  send('Focus.setFocus', FocusMenu);
3216
3210
  }
3217
3211
  };
@@ -3651,6 +3645,13 @@ const toHaveAttribute$1 = (element, {
3651
3645
  const attribute = element.getAttribute(key);
3652
3646
  return attribute === value;
3653
3647
  };
3648
+ const toHaveJSProperty = (element, {
3649
+ key,
3650
+ value
3651
+ }) => {
3652
+ const attribute = element[key];
3653
+ return attribute === value;
3654
+ };
3654
3655
  const toBeFocused$1 = element => {
3655
3656
  return element === document.activeElement;
3656
3657
  };
@@ -3685,6 +3686,7 @@ const SingleElementConditions = {
3685
3686
  toHaveClass: toHaveClass$1,
3686
3687
  toHaveCss: toHaveCss$1,
3687
3688
  toHaveId: toHaveId$1,
3689
+ toHaveJSProperty,
3688
3690
  toHaveText: toHaveText$1,
3689
3691
  toHaveValue
3690
3692
  };
@@ -4043,7 +4045,7 @@ const showError = (message, y, x) => {
4043
4045
  $ImagePreviewImage
4044
4046
  };
4045
4047
  };
4046
- const create$y = (uri, top, left) => {
4048
+ const create$x = (uri, top, left) => {
4047
4049
  const $ImagePreviewImage = document.createElement('img');
4048
4050
  $ImagePreviewImage.className = 'ImagePreviewImage';
4049
4051
  $ImagePreviewImage.src = uri;
@@ -4068,14 +4070,14 @@ const create$y = (uri, top, left) => {
4068
4070
  const update = (state, uri) => {
4069
4071
  state.$ImagePreviewImage.uri = uri;
4070
4072
  };
4071
- const dispose$i = state => {
4073
+ const dispose$h = state => {
4072
4074
  remove$1(state.$ImagePreview);
4073
4075
  };
4074
4076
 
4075
4077
  const ImagePreview$1 = {
4076
4078
  __proto__: null,
4077
- create: create$y,
4078
- dispose: dispose$i,
4079
+ create: create$x,
4080
+ dispose: dispose$h,
4079
4081
  showError,
4080
4082
  update
4081
4083
  };
@@ -4116,13 +4118,13 @@ const handleMouseDown$3 = event => {
4116
4118
  const handleBlur$9 = () => {
4117
4119
  return ['handleBlur'];
4118
4120
  };
4119
- const handleFocus$a = () => {
4121
+ const handleFocus$9 = () => {
4120
4122
  return ['handleFocus'];
4121
4123
  };
4122
4124
 
4123
4125
  // TODO use context menu events function again
4124
4126
 
4125
- const handleContextMenu$a = event => {
4127
+ const handleContextMenu$9 = event => {
4126
4128
  preventDefault(event);
4127
4129
  const {
4128
4130
  button,
@@ -4131,15 +4133,15 @@ const handleContextMenu$a = event => {
4131
4133
  } = event;
4132
4134
  return ['handleContextMenu', button, clientX, clientY];
4133
4135
  };
4134
- const returnValue$9 = true;
4136
+ const returnValue$8 = true;
4135
4137
 
4136
4138
  const ViewletActivityBarEvents = {
4137
4139
  __proto__: null,
4138
4140
  handleBlur: handleBlur$9,
4139
- handleContextMenu: handleContextMenu$a,
4140
- handleFocus: handleFocus$a,
4141
+ handleContextMenu: handleContextMenu$9,
4142
+ handleFocus: handleFocus$9,
4141
4143
  handleMouseDown: handleMouseDown$3,
4142
- returnValue: returnValue$9
4144
+ returnValue: returnValue$8
4143
4145
  };
4144
4146
 
4145
4147
  const Events$5 = ViewletActivityBarEvents;
@@ -4198,7 +4200,7 @@ forwardViewletCommand('handleClickOpenFolder');
4198
4200
  forwardViewletCommand('handleClickRestore');
4199
4201
  const handleClickTab$2 = forwardViewletCommand('handleClickTab');
4200
4202
  forwardViewletCommand('handleClickToggleMaximize');
4201
- const handleContextMenu$9 = forwardViewletCommand('handleContextMenu');
4203
+ const handleContextMenu$8 = forwardViewletCommand('handleContextMenu');
4202
4204
  forwardViewletCommand('handleDoubleClick');
4203
4205
  const handleDragEnd$1 = forwardViewletCommand('handleDragEnd');
4204
4206
  const handleDragLeave$1 = forwardViewletCommand('handleDragLeave');
@@ -4211,11 +4213,11 @@ forwardViewletCommand('handleClickSize');
4211
4213
  forwardViewletCommand('handleClickDisable');
4212
4214
  forwardViewletCommand('handleClickUninstall');
4213
4215
  forwardViewletCommand('handleFilterInput');
4214
- const handleFocus$9 = forwardViewletCommand('handleFocus');
4216
+ const handleFocus$8 = forwardViewletCommand('handleFocus');
4215
4217
  const handleFocusIn$4 = forwardViewletCommand('handleFocusIn');
4216
4218
  forwardViewletCommand('handleIconError');
4217
4219
  const handleImageError = forwardViewletCommand('handleImageError');
4218
- const handleInput$7 = forwardViewletCommand('handleInput');
4220
+ const handleInput$6 = forwardViewletCommand('handleInput');
4219
4221
  const handleKeyDown$4 = forwardViewletCommand('handleKeyDown');
4220
4222
  forwardViewletCommand('handleListBlur');
4221
4223
  forwardViewletCommand('handleListFocus');
@@ -4226,7 +4228,7 @@ forwardViewletCommand('handleMouseMove');
4226
4228
  const handleMouseOut$1 = forwardViewletCommand('handleMouseOut');
4227
4229
  const handleMouseOver$1 = forwardViewletCommand('handleMouseOver');
4228
4230
  forwardViewletCommand('handlePointerCaptureLost');
4229
- const handlePointerDown$5 = forwardViewletCommand('handlePointerDown');
4231
+ const handlePointerDown$3 = forwardViewletCommand('handlePointerDown');
4230
4232
  const handlePointerMove$1 = forwardViewletCommand('handlePointerMove');
4231
4233
  forwardViewletCommand('handlePointerOver');
4232
4234
  const handlePointerUp$1 = forwardViewletCommand('handlePointerUp');
@@ -4234,12 +4236,12 @@ forwardViewletCommand('handleReadmeContextMenu');
4234
4236
  forwardViewletCommand('handleReplaceInput');
4235
4237
  const handleResizerClick = forwardViewletCommand('handleResizerClick');
4236
4238
  const handleResizerMove = forwardViewletCommand('handleResizerMove');
4237
- const handleScrollBarCaptureLost = forwardViewletCommand('handleScrollBarCaptureLost');
4239
+ forwardViewletCommand('handleScrollBarCaptureLost');
4238
4240
  const handleScrollBarClick = forwardViewletCommand('handleScrollBarClick');
4239
4241
  forwardViewletCommand('handleScrollBarHorizontalMove');
4240
4242
  forwardViewletCommand('handleScrollBarHorizontalPointerDown');
4241
4243
  forwardViewletCommand('handleScrollBarMove');
4242
- const handleScrollBarThumbPointerMove$2 = forwardViewletCommand('handleScrollBarThumbPointerMove');
4244
+ const handleScrollBarThumbPointerMove$1 = forwardViewletCommand('handleScrollBarThumbPointerMove');
4243
4245
  forwardViewletCommand('handleScrollBarMove');
4244
4246
  forwardViewletCommand('handleScrollBarVerticalPointerDown');
4245
4247
  forwardViewletCommand('handleSliderPointerDown');
@@ -4252,9 +4254,9 @@ const handleTabsDragOver = forwardViewletCommand('handleTabsDragOver');
4252
4254
  forwardViewletCommand('handleTabsPointerOut');
4253
4255
  forwardViewletCommand('handleTabsPointerOver');
4254
4256
  const handleTabsWheel$1 = forwardViewletCommand('handleTabsWheel');
4255
- const handleTouchEnd$1 = forwardViewletCommand('handleTouchEnd');
4256
- const handleTouchMove$1 = forwardViewletCommand('handleTouchMove');
4257
- const handleTouchStart$1 = forwardViewletCommand('handleTouchStart');
4257
+ forwardViewletCommand('handleTouchEnd');
4258
+ forwardViewletCommand('handleTouchMove');
4259
+ forwardViewletCommand('handleTouchStart');
4258
4260
  const handleWheel$4 = forwardViewletCommand('handleWheel');
4259
4261
  const hidePanel = forwardViewletCommand('hidePanel');
4260
4262
  forwardViewletCommand('moveRectangleSelectionPx');
@@ -4299,14 +4301,14 @@ const ViewletAudio = {
4299
4301
  Events: Events$4
4300
4302
  };
4301
4303
 
4302
- const create$x = () => {
4304
+ const create$w = () => {
4303
4305
  const $Viewlet = document.createElement('div');
4304
4306
  $Viewlet.className = 'Viewlet Clock';
4305
4307
  return {
4306
4308
  $Viewlet
4307
4309
  };
4308
4310
  };
4309
- const dispose$h = state => {};
4311
+ const dispose$g = state => {};
4310
4312
  const refresh$4 = () => {};
4311
4313
  const setTime = (state, time) => {
4312
4314
  object(state);
@@ -4316,8 +4318,8 @@ const setTime = (state, time) => {
4316
4318
 
4317
4319
  const ViewletClock = {
4318
4320
  __proto__: null,
4319
- create: create$x,
4320
- dispose: dispose$h,
4321
+ create: create$w,
4322
+ dispose: dispose$g,
4321
4323
  refresh: refresh$4,
4322
4324
  setTime
4323
4325
  };
@@ -4345,7 +4347,7 @@ const stopTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp)
4345
4347
  // TODO use pointerlost event instead
4346
4348
  $Target.removeEventListener(PointerUp, handlePointerUp);
4347
4349
  };
4348
- const create$w = (pointerDown, pointerMove, pointerUp) => {
4350
+ const create$v = (pointerDown, pointerMove, pointerUp) => {
4349
4351
  const shared = (fn, event) => {
4350
4352
  const message = fn(event);
4351
4353
  if (!message || message.length === 0) {
@@ -4378,7 +4380,7 @@ const create$w = (pointerDown, pointerMove, pointerUp) => {
4378
4380
  };
4379
4381
 
4380
4382
  const handleOffset = 20;
4381
- const handleSliderPointerDown = create$w(event => {
4383
+ const handleSliderPointerDown = create$v(event => {
4382
4384
  const {
4383
4385
  clientX,
4384
4386
  clientY
@@ -4393,7 +4395,7 @@ const handleSliderPointerDown = create$w(event => {
4393
4395
  }, () => {
4394
4396
  return [];
4395
4397
  });
4396
- const handlePointerDown$4 = event => {
4398
+ const handlePointerDown$2 = event => {
4397
4399
  const {
4398
4400
  target
4399
4401
  } = event;
@@ -4402,12 +4404,12 @@ const handlePointerDown$4 = event => {
4402
4404
  }
4403
4405
  return [];
4404
4406
  };
4405
- const returnValue$8 = true;
4407
+ const returnValue$7 = true;
4406
4408
 
4407
4409
  const ViewletColorPickerEvents = {
4408
4410
  __proto__: null,
4409
- handlePointerDown: handlePointerDown$4,
4410
- returnValue: returnValue$8
4411
+ handlePointerDown: handlePointerDown$2,
4412
+ returnValue: returnValue$7
4411
4413
  };
4412
4414
 
4413
4415
  const setColor = (state, color) => {
@@ -4439,7 +4441,7 @@ const ViewletColorPicker = {
4439
4441
  setOffsetX
4440
4442
  };
4441
4443
 
4442
- const handleInput$6 = event => {
4444
+ const handleInput$5 = event => {
4443
4445
  const uid = fromEvent(event);
4444
4446
  const {
4445
4447
  target
@@ -4447,20 +4449,20 @@ const handleInput$6 = event => {
4447
4449
  const {
4448
4450
  value
4449
4451
  } = target;
4450
- handleInput$7(uid, value);
4452
+ handleInput$6(uid, value);
4451
4453
  };
4452
- const handleFocus$8 = event => {
4454
+ const handleFocus$7 = event => {
4453
4455
  const uid = fromEvent(event);
4454
- handleFocus$9(uid);
4456
+ handleFocus$8(uid);
4455
4457
  };
4456
4458
 
4457
4459
  const ViewletDebugConsoleEvents = {
4458
4460
  __proto__: null,
4459
- handleFocus: handleFocus$8,
4460
- handleInput: handleInput$6
4461
+ handleFocus: handleFocus$7,
4462
+ handleInput: handleInput$5
4461
4463
  };
4462
4464
 
4463
- const create$v = () => {
4465
+ const create$u = () => {
4464
4466
  const $Viewlet = document.createElement('div');
4465
4467
  $Viewlet.className = 'Viewlet DebugConsole';
4466
4468
  return {
@@ -4476,7 +4478,7 @@ const setDom$9 = (state, dom) => {
4476
4478
 
4477
4479
  const ViewletDebugConsole = {
4478
4480
  __proto__: null,
4479
- create: create$v,
4481
+ create: create$u,
4480
4482
  setDom: setDom$9
4481
4483
  };
4482
4484
 
@@ -4513,7 +4515,7 @@ const setValue$2 = (state, value) => {
4513
4515
  const $Input = $Viewlet.querySelector('input');
4514
4516
  $Input.value = value;
4515
4517
  };
4516
- const focus$g = state => {
4518
+ const focus$e = state => {
4517
4519
  const {
4518
4520
  $Viewlet
4519
4521
  } = state;
@@ -4524,7 +4526,7 @@ const focus$g = state => {
4524
4526
  const ViewletDefineKeyBinding = {
4525
4527
  __proto__: null,
4526
4528
  Events: ViewletDefineKeyBindingEvents,
4527
- focus: focus$g,
4529
+ focus: focus$e,
4528
4530
  setValue: setValue$2
4529
4531
  };
4530
4532
 
@@ -4537,7 +4539,7 @@ const setMaskImage = ($Element, icon) => {
4537
4539
  }
4538
4540
  };
4539
4541
 
4540
- const create$u = icon => {
4542
+ const create$t = icon => {
4541
4543
  const $Icon = document.createElement('div');
4542
4544
  $Icon.className = 'MaskIcon';
4543
4545
  setMaskImage($Icon, icon);
@@ -4547,7 +4549,7 @@ const create$u = icon => {
4547
4549
 
4548
4550
  const create$Button = (label, icon) => {
4549
4551
  // TODO icon div might not be needed (unnecessary html element)
4550
- const $Icon = create$u(icon);
4552
+ const $Icon = create$t(icon);
4551
4553
  const $Button = document.createElement('button');
4552
4554
  $Button.className = 'IconButton';
4553
4555
  $Button.title = label;
@@ -4568,7 +4570,7 @@ const handleClick$4 = event => {
4568
4570
  handleClick$5(index);
4569
4571
  };
4570
4572
 
4571
- const create$t = () => {
4573
+ const create$s = () => {
4572
4574
  const $DialogTitle = document.createElement('h2');
4573
4575
  $DialogTitle.id = 'DialogTitle';
4574
4576
  const $DialogCloseButton = create$Button('Close', 'Close');
@@ -4649,7 +4651,7 @@ const setErrorStack = (state, errorStack) => {
4649
4651
 
4650
4652
  const ViewletDialog = {
4651
4653
  __proto__: null,
4652
- create: create$t,
4654
+ create: create$s,
4653
4655
  postAppend,
4654
4656
  setButtons,
4655
4657
  setCodeFrame,
@@ -4667,13 +4669,13 @@ const handleWheel$3 = event => {
4667
4669
  handleWheel$4(uid, deltaMode, deltaY);
4668
4670
  };
4669
4671
 
4670
- const handleScrollBarPointerDown$3 = event => {
4672
+ const handleScrollBarPointerDown$2 = event => {
4671
4673
  // TODO
4672
4674
  };
4673
4675
 
4674
4676
  const ViewletDiffEditorEvents = {
4675
4677
  __proto__: null,
4676
- handleScrollBarPointerDown: handleScrollBarPointerDown$3,
4678
+ handleScrollBarPointerDown: handleScrollBarPointerDown$2,
4677
4679
  handleWheel: handleWheel$3
4678
4680
  };
4679
4681
 
@@ -4703,7 +4705,7 @@ const handleClickAt$2 = event => {
4703
4705
  const handleLoad$3 = event => {
4704
4706
  return ['handleLoad'];
4705
4707
  };
4706
- const handleContextMenu$8 = event => {
4708
+ const handleContextMenu$7 = event => {
4707
4709
  preventDefault(event);
4708
4710
  const {
4709
4711
  button,
@@ -4712,7 +4714,7 @@ const handleContextMenu$8 = event => {
4712
4714
  } = event;
4713
4715
  return ['handleContextMenu', button, clientX, clientY];
4714
4716
  };
4715
- const handleSashCornerPointerDown = create$w(event => {
4717
+ const handleSashCornerPointerDown = create$v(event => {
4716
4718
  const {
4717
4719
  clientX,
4718
4720
  clientY
@@ -4731,15 +4733,15 @@ const handleSashCornerPointerDown = create$w(event => {
4731
4733
  } = event;
4732
4734
  return ['handleSashCornerPointerUp', clientX, clientY];
4733
4735
  });
4734
- const returnValue$7 = true;
4736
+ const returnValue$6 = true;
4735
4737
 
4736
4738
  const ViewletE2eTestEvents = {
4737
4739
  __proto__: null,
4738
4740
  handleClickAt: handleClickAt$2,
4739
- handleContextMenu: handleContextMenu$8,
4741
+ handleContextMenu: handleContextMenu$7,
4740
4742
  handleLoad: handleLoad$3,
4741
4743
  handleSashCornerPointerDown,
4742
- returnValue: returnValue$7
4744
+ returnValue: returnValue$6
4743
4745
  };
4744
4746
 
4745
4747
  // TODO could use browser view when running in electron
@@ -4800,7 +4802,7 @@ const handleClickAt$1 = event => {
4800
4802
  const handleLoad$2 = event => {
4801
4803
  return ['handleLoad'];
4802
4804
  };
4803
- const handleContextMenu$7 = event => {
4805
+ const handleContextMenu$6 = event => {
4804
4806
  preventDefault(event);
4805
4807
  const {
4806
4808
  button,
@@ -4809,14 +4811,14 @@ const handleContextMenu$7 = event => {
4809
4811
  } = event;
4810
4812
  return ['handleContextMenu', button, clientX, clientY];
4811
4813
  };
4812
- const returnValue$6 = true;
4814
+ const returnValue$5 = true;
4813
4815
 
4814
4816
  const ViewletE2eTestsEvents = {
4815
4817
  __proto__: null,
4816
4818
  handleClickAt: handleClickAt$1,
4817
- handleContextMenu: handleContextMenu$7,
4819
+ handleContextMenu: handleContextMenu$6,
4818
4820
  handleLoad: handleLoad$2,
4819
- returnValue: returnValue$6
4821
+ returnValue: returnValue$5
4820
4822
  };
4821
4823
 
4822
4824
  const sendToIframe = (contentWindow, message, origin, transfer) => {
@@ -4911,10 +4913,10 @@ const appendWidget$5 = state => {
4911
4913
  } = state;
4912
4914
  append$1($Viewlet);
4913
4915
  };
4914
- const dispose$g = state => {
4916
+ const dispose$f = state => {
4915
4917
  remove$1(state.$Viewlet);
4916
4918
  };
4917
- const focus$f = (state, key, source) => {
4919
+ const focus$d = (state, key, source) => {
4918
4920
  if (!key) {
4919
4921
  return;
4920
4922
  }
@@ -4937,12 +4939,12 @@ const ViewletEditorCodeGenerator = {
4937
4939
  __proto__: null,
4938
4940
  Events: ViewletEditorCodeGeneratorEvents,
4939
4941
  appendWidget: appendWidget$5,
4940
- dispose: dispose$g,
4941
- focus: focus$f,
4942
+ dispose: dispose$f,
4943
+ focus: focus$d,
4942
4944
  setBounds: setBounds$9
4943
4945
  };
4944
4946
 
4945
- const attachEvents$a = ($Node, eventMap) => {
4947
+ const attachEvents$9 = ($Node, eventMap) => {
4946
4948
  for (const [key, value] of Object.entries(eventMap)) {
4947
4949
  $Node.addEventListener(key, value);
4948
4950
  }
@@ -4980,28 +4982,28 @@ const handleMousedown = event => {
4980
4982
  const uid = fromEvent(event);
4981
4983
  handleClickAt$3(uid, clientX, clientY);
4982
4984
  };
4983
- const handleScrollBarThumbPointerMove$1 = event => {
4985
+ const handleScrollBarThumbPointerMove = event => {
4984
4986
  const {
4985
4987
  clientY
4986
4988
  } = event;
4987
4989
  const uid = fromEvent(event);
4988
- handleScrollBarThumbPointerMove$2(uid, clientY);
4990
+ handleScrollBarThumbPointerMove$1(uid, clientY);
4989
4991
  };
4990
4992
  const handlePointerCaptureLost$2 = event => {
4991
4993
  const {
4992
4994
  target,
4993
4995
  pointerId
4994
4996
  } = event;
4995
- stopTracking(target, pointerId, handleScrollBarThumbPointerMove$1, handlePointerCaptureLost$2);
4997
+ stopTracking(target, pointerId, handleScrollBarThumbPointerMove, handlePointerCaptureLost$2);
4996
4998
  };
4997
- const handleScrollBarPointerDown$2 = event => {
4999
+ const handleScrollBarPointerDown$1 = event => {
4998
5000
  preventDefault(event);
4999
5001
  const {
5000
5002
  target,
5001
5003
  pointerId,
5002
5004
  clientY
5003
5005
  } = event;
5004
- startTracking(target, pointerId, handleScrollBarThumbPointerMove$1, handlePointerCaptureLost$2);
5006
+ startTracking(target, pointerId, handleScrollBarThumbPointerMove, handlePointerCaptureLost$2);
5005
5007
  const uid = fromEvent(event);
5006
5008
  handleScrollBarClick(uid, clientY);
5007
5009
  };
@@ -5061,7 +5063,7 @@ const setNegativeMargin = (state, negativeMargin) => {
5061
5063
  setTop($ListItems, negativeMargin);
5062
5064
  };
5063
5065
 
5064
- const create$s = () => {
5066
+ const create$r = () => {
5065
5067
  const $ListItems = document.createElement('div');
5066
5068
  $ListItems.className = 'ListItems';
5067
5069
  $ListItems.role = ListBox;
@@ -5085,18 +5087,18 @@ const create$s = () => {
5085
5087
  $ScrollBarThumb
5086
5088
  };
5087
5089
  };
5088
- const attachEvents$9 = state => {
5090
+ const attachEvents$8 = state => {
5089
5091
  const {
5090
5092
  $Viewlet,
5091
5093
  $ListItems,
5092
5094
  $ScrollBar
5093
5095
  } = state;
5094
5096
  $Viewlet.addEventListener(Wheel, handleWheel$2, Passive);
5095
- attachEvents$a($ListItems, {
5097
+ attachEvents$9($ListItems, {
5096
5098
  [MouseDown]: handleMousedown
5097
5099
  });
5098
- attachEvents$a($ScrollBar, {
5099
- [PointerDown]: handleScrollBarPointerDown$2
5100
+ attachEvents$9($ScrollBar, {
5101
+ [PointerDown]: handleScrollBarPointerDown$1
5100
5102
  });
5101
5103
  };
5102
5104
  // TODO show should be passed active cursor position
@@ -5114,7 +5116,7 @@ const setDom$8 = (state, dom) => {
5114
5116
  // TODO recycle nodes
5115
5117
  // TODO set right aria attributes on $EditorInput
5116
5118
  };
5117
- const dispose$f = state => {
5119
+ const dispose$e = state => {
5118
5120
  remove$1(state.$Viewlet);
5119
5121
  // state.$EditorInput.removeAttribute('aria-activedescendant')
5120
5122
  };
@@ -5128,7 +5130,7 @@ const showLoading = (state, x, y) => {
5128
5130
  $Viewlet.append($Loading);
5129
5131
  append$1($Viewlet);
5130
5132
  };
5131
- const handleError$7 = (state, error) => {
5133
+ const handleError$6 = (state, error) => {
5132
5134
  const {
5133
5135
  $Viewlet
5134
5136
  } = state;
@@ -5144,10 +5146,10 @@ const setBounds$8 = (state, x, y, width, height) => {
5144
5146
 
5145
5147
  const ViewletEditorCompletion = {
5146
5148
  __proto__: null,
5147
- attachEvents: attachEvents$9,
5148
- create: create$s,
5149
- dispose: dispose$f,
5150
- handleError: handleError$7,
5149
+ attachEvents: attachEvents$8,
5150
+ create: create$r,
5151
+ dispose: dispose$e,
5152
+ handleError: handleError$6,
5151
5153
  setBounds: setBounds$8,
5152
5154
  setContentHeight,
5153
5155
  setDom: setDom$8,
@@ -5160,15 +5162,15 @@ const ViewletEditorCompletion = {
5160
5162
  const handleClose = () => {
5161
5163
  return ['closeDetails'];
5162
5164
  };
5163
- const returnValue$5 = true;
5165
+ const returnValue$4 = true;
5164
5166
 
5165
5167
  const ViewletEditorCompletionDetailsEvents = {
5166
5168
  __proto__: null,
5167
5169
  handleClose,
5168
- returnValue: returnValue$5
5170
+ returnValue: returnValue$4
5169
5171
  };
5170
5172
 
5171
- const create$r = () => {
5173
+ const create$q = () => {
5172
5174
  const $Viewlet = document.createElement('div');
5173
5175
  $Viewlet.className = 'Viewlet EditorCompletionDetails';
5174
5176
  $Viewlet.id = 'CompletionsDetails';
@@ -5176,7 +5178,7 @@ const create$r = () => {
5176
5178
  $Viewlet
5177
5179
  };
5178
5180
  };
5179
- const attachEvents$8 = state => {
5181
+ const attachEvents$7 = state => {
5180
5182
  // TODO
5181
5183
  };
5182
5184
  const setDom$7 = (state, dom) => {
@@ -5194,7 +5196,7 @@ const appendWidget$4 = state => {
5194
5196
  } = state;
5195
5197
  append$1($Viewlet);
5196
5198
  };
5197
- const dispose$e = state => {
5199
+ const dispose$d = state => {
5198
5200
  remove$1(state.$Viewlet);
5199
5201
  };
5200
5202
  const setBounds$7 = (state, x, y, width, height) => {
@@ -5208,9 +5210,9 @@ const ViewletEditorCompletionDetails = {
5208
5210
  __proto__: null,
5209
5211
  Events: ViewletEditorCompletionDetailsEvents,
5210
5212
  appendWidget: appendWidget$4,
5211
- attachEvents: attachEvents$8,
5212
- create: create$r,
5213
- dispose: dispose$e,
5213
+ attachEvents: attachEvents$7,
5214
+ create: create$q,
5215
+ dispose: dispose$d,
5214
5216
  setBounds: setBounds$7,
5215
5217
  setDom: setDom$7
5216
5218
  };
@@ -5228,7 +5230,7 @@ const ViewletEditorCompletionDetails = {
5228
5230
 
5229
5231
  // TODO aria alert
5230
5232
 
5231
- const create$q = () => {
5233
+ const create$p = () => {
5232
5234
  const $Viewlet = document.createElement('div');
5233
5235
  $Viewlet.className = 'Viewlet EditorError';
5234
5236
  return {
@@ -5250,13 +5252,13 @@ const setBounds$6 = (state, x, y, width, height) => {
5250
5252
 
5251
5253
  const ViewletEditorError = {
5252
5254
  __proto__: null,
5253
- create: create$q,
5255
+ create: create$p,
5254
5256
  setBounds: setBounds$6,
5255
5257
  setDom: setDom$6
5256
5258
  };
5257
5259
 
5258
- const returnValue$4 = true;
5259
- const handleSashPointerDown$2 = create$w(event => {
5260
+ const returnValue$3 = true;
5261
+ const handleSashPointerDown$2 = create$v(event => {
5260
5262
  const {
5261
5263
  clientX,
5262
5264
  clientY
@@ -5279,7 +5281,7 @@ const handleSashPointerDown$2 = create$w(event => {
5279
5281
  const ViewletEditorHoverEvents = {
5280
5282
  __proto__: null,
5281
5283
  handleSashPointerDown: handleSashPointerDown$2,
5282
- returnValue: returnValue$4
5284
+ returnValue: returnValue$3
5283
5285
  };
5284
5286
 
5285
5287
  const setBounds$5 = (state, x, y, width, height) => {
@@ -5353,7 +5355,7 @@ const handlePointerCaptureLost$1 = event => {
5353
5355
  /**
5354
5356
  * @param {PointerEvent} event
5355
5357
  */
5356
- const handlePointerDown$3 = event => {
5358
+ const handlePointerDown$1 = event => {
5357
5359
  const {
5358
5360
  pointerId,
5359
5361
  clientX,
@@ -5369,7 +5371,7 @@ const handlePointerDown$3 = event => {
5369
5371
  target.addEventListener(PointerUp, handlePointerUp);
5370
5372
  target.addEventListener(LostPointerCapture, handlePointerCaptureLost$1);
5371
5373
  const uid = fromEvent(event);
5372
- handlePointerDown$5(uid, pointerId, clientX, clientY);
5374
+ handlePointerDown$3(uid, pointerId, clientX, clientY);
5373
5375
  };
5374
5376
 
5375
5377
  /**
@@ -5390,7 +5392,7 @@ const handleWheel$1 = event => {
5390
5392
  *
5391
5393
  * @param {MouseEvent} event
5392
5394
  */
5393
- const handleContextMenu$6 = event => {
5395
+ const handleContextMenu$5 = event => {
5394
5396
  preventDefault(event);
5395
5397
  const {
5396
5398
  button,
@@ -5398,35 +5400,35 @@ const handleContextMenu$6 = event => {
5398
5400
  clientY
5399
5401
  } = event;
5400
5402
  const uid = fromEvent(event);
5401
- handleContextMenu$9(uid, button, clientX, clientY);
5403
+ handleContextMenu$8(uid, button, clientX, clientY);
5402
5404
  };
5403
- const handleError$6 = event => {
5405
+ const handleError$5 = event => {
5404
5406
  const uid = fromEvent(event);
5405
5407
  handleImageError(uid);
5406
5408
  };
5407
- const handleFocus$7 = event => {
5409
+ const handleFocus$6 = event => {
5408
5410
  const uid = fromEvent(event);
5409
- handleFocus$9(uid);
5411
+ handleFocus$8(uid);
5410
5412
  };
5411
5413
 
5412
- const create$p = () => {
5414
+ const create$o = () => {
5413
5415
  const $Viewlet = document.createElement('div');
5414
5416
  $Viewlet.className = 'Viewlet EditorImage';
5415
5417
  return {
5416
5418
  $Viewlet
5417
5419
  };
5418
5420
  };
5419
- const attachEvents$7 = state => {
5421
+ const attachEvents$6 = state => {
5420
5422
  const {
5421
5423
  $Viewlet
5422
5424
  } = state;
5423
- attachEvents$a($Viewlet, {
5424
- [PointerDown]: handlePointerDown$3,
5425
+ attachEvents$9($Viewlet, {
5426
+ [PointerDown]: handlePointerDown$1,
5425
5427
  [PointerUp]: handlePointerUp,
5426
- [ContextMenu]: handleContextMenu$6,
5427
- [FocusIn]: handleFocus$7
5428
+ [ContextMenu]: handleContextMenu$5,
5429
+ [FocusIn]: handleFocus$6
5428
5430
  });
5429
- $Viewlet.addEventListener(Error$2, handleError$6, Capture);
5431
+ $Viewlet.addEventListener(Error$2, handleError$5, Capture);
5430
5432
  $Viewlet.addEventListener(Wheel, handleWheel$1, Passive);
5431
5433
  };
5432
5434
  const setTransform = (state, transform) => {
@@ -5451,14 +5453,14 @@ const setDom$4 = (state, dom) => {
5451
5453
 
5452
5454
  const ViewletEditorImage = {
5453
5455
  __proto__: null,
5454
- attachEvents: attachEvents$7,
5455
- create: create$p,
5456
+ attachEvents: attachEvents$6,
5457
+ create: create$o,
5456
5458
  setDom: setDom$4,
5457
5459
  setDragging,
5458
5460
  setTransform
5459
5461
  };
5460
5462
 
5461
- const create$o = () => {
5463
+ const create$n = () => {
5462
5464
  const $Viewlet = document.createElement('div');
5463
5465
  $Viewlet.className = 'Viewlet EditorText';
5464
5466
  $Viewlet.textContent = 'loading...';
@@ -5466,7 +5468,7 @@ const create$o = () => {
5466
5468
  $Viewlet
5467
5469
  };
5468
5470
  };
5469
- const dispose$d = state => {};
5471
+ const dispose$c = state => {};
5470
5472
  const refresh$3 = (state, context) => {
5471
5473
  object(state);
5472
5474
  string(context.content);
@@ -5475,8 +5477,8 @@ const refresh$3 = (state, context) => {
5475
5477
 
5476
5478
  const ViewletEditorPlainText = {
5477
5479
  __proto__: null,
5478
- create: create$o,
5479
- dispose: dispose$d,
5480
+ create: create$n,
5481
+ dispose: dispose$c,
5480
5482
  refresh: refresh$3
5481
5483
  };
5482
5484
 
@@ -5504,7 +5506,7 @@ const appendWidget$2 = state => {
5504
5506
  } = state;
5505
5507
  append$1($Viewlet);
5506
5508
  };
5507
- const dispose$c = state => {
5509
+ const dispose$b = state => {
5508
5510
  remove$1(state.$Viewlet);
5509
5511
  };
5510
5512
 
@@ -5512,7 +5514,7 @@ const ViewletEditorSourceActions = {
5512
5514
  __proto__: null,
5513
5515
  Events: ViewletEditorSourceActionsEvents,
5514
5516
  appendWidget: appendWidget$2,
5515
- dispose: dispose$c,
5517
+ dispose: dispose$b,
5516
5518
  setBounds: setBounds$4
5517
5519
  };
5518
5520
 
@@ -5599,29 +5601,6 @@ const getModifierKey = event => {
5599
5601
  return None;
5600
5602
  };
5601
5603
 
5602
- const toSimpleTouch = touch => {
5603
- return {
5604
- x: touch.clientX,
5605
- y: touch.clientY,
5606
- identifier: touch.identifier
5607
- };
5608
- };
5609
- const toSimpleTouches = touches => {
5610
- return Array.from(touches).map(toSimpleTouch);
5611
- };
5612
-
5613
- /**
5614
- * @param {TouchEvent} event
5615
- */
5616
- const toSimpleTouchEvent = event => {
5617
- const touches = toSimpleTouches(event.touches);
5618
- const changedTouches = toSimpleTouches(event.changedTouches);
5619
- return {
5620
- touches,
5621
- changedTouches
5622
- };
5623
- };
5624
-
5625
5604
  // TODO so many things in this file
5626
5605
 
5627
5606
 
@@ -5629,7 +5608,7 @@ const toSimpleTouchEvent = event => {
5629
5608
 
5630
5609
  // TODO tree shake out mobile support when targeting electron -> less code -> less event listeners -> less memory -> less cpu
5631
5610
 
5632
- const handleFocus$6 = event => {
5611
+ const handleFocus$5 = event => {
5633
5612
  return ['handleFocus'];
5634
5613
  };
5635
5614
  const handleMouseMove = event => {
@@ -5769,7 +5748,7 @@ const handlePaste = event => {
5769
5748
  const text = getText(clipboardData);
5770
5749
  return ['paste', text];
5771
5750
  };
5772
- const handleScrollBarVerticalPointerDown = create$w(event => {
5751
+ const handleScrollBarVerticalPointerDown = create$v(event => {
5773
5752
  const {
5774
5753
  clientY
5775
5754
  } = event;
@@ -5824,7 +5803,7 @@ const handleScrollBarContextMenu = event => {
5824
5803
  preventDefault(event);
5825
5804
  stopPropagation(event);
5826
5805
  };
5827
- const handleContextMenu$5 = event => {
5806
+ const handleContextMenu$4 = event => {
5828
5807
  preventDefault(event);
5829
5808
  const {
5830
5809
  button,
@@ -5892,7 +5871,7 @@ const setLineInfos = (state, dom) => {
5892
5871
  // 1. create -> only create dom elements
5893
5872
  // 2. render -> fill elements with attributes and data
5894
5873
  // that way all dom nodes can be recycled
5895
- const create$n = () => {
5874
+ const create$m = () => {
5896
5875
  const $EditorInput = document.createElement('textarea');
5897
5876
  $EditorInput.className = 'EditorInput';
5898
5877
  $EditorInput.ariaAutoComplete = List;
@@ -5910,7 +5889,7 @@ const create$n = () => {
5910
5889
  [CompositionStart]: handleCompositionStart,
5911
5890
  [CompositionUpdate]: handleCompositionUpdate,
5912
5891
  [CompositionEnd]: handleCompositionEnd,
5913
- [Focus]: handleFocus$6,
5892
+ [Focus]: handleFocus$5,
5914
5893
  [Blur]: handleBlur$5,
5915
5894
  [Cut]: handleCut,
5916
5895
  [Paste]: handlePaste,
@@ -5980,7 +5959,7 @@ const create$n = () => {
5980
5959
  $Editor.role = Code;
5981
5960
  $Editor.append($LayerGutter, $EditorContent);
5982
5961
  attachEventsFunctional($Editor, {
5983
- [ContextMenu]: handleContextMenu$5,
5962
+ [ContextMenu]: handleContextMenu$4,
5984
5963
  [Wheel]: handleWheel,
5985
5964
  returnValue: true
5986
5965
  });
@@ -6059,11 +6038,11 @@ const setDecorationsDom$1 = (state, decorations) => {
6059
6038
  setDecorationsDom$2(state, decorations);
6060
6039
  };
6061
6040
 
6062
- const create$m = create$n;
6041
+ const create$l = create$m;
6063
6042
  const setText$1 = setText$2;
6064
6043
  const setSelections = setSelections$1;
6065
6044
  const setIncrementalEdits = setIncrementalEdits$1;
6066
- const handleError$5 = (state, error) => {
6045
+ const handleError$4 = (state, error) => {
6067
6046
  state.$Viewlet.textContent = error;
6068
6047
  };
6069
6048
  const setScrollBar = setScrollBar$1;
@@ -6096,14 +6075,14 @@ const hideOverlayMessage = state => {
6096
6075
  }
6097
6076
  };
6098
6077
  const setFocused$1 = setFocused$2;
6099
- const focus$e = setFocused$2;
6078
+ const focus$c = setFocused$2;
6100
6079
  const setDecorationsDom = setDecorationsDom$1;
6101
6080
 
6102
6081
  const ViewletEditorText = {
6103
6082
  __proto__: null,
6104
- create: create$m,
6105
- focus: focus$e,
6106
- handleError: handleError$5,
6083
+ create: create$l,
6084
+ focus: focus$c,
6085
+ handleError: handleError$4,
6107
6086
  hideOverlayMessage,
6108
6087
  highlightAsLink,
6109
6088
  renderGutter,
@@ -6117,14 +6096,14 @@ const ViewletEditorText = {
6117
6096
  showOverlayMessage
6118
6097
  };
6119
6098
 
6120
- const create$l = () => {
6099
+ const create$k = () => {
6121
6100
  const $Viewlet = document.createElement('div');
6122
6101
  $Viewlet.className = 'Viewlet EditorTextError';
6123
6102
  return {
6124
6103
  $Viewlet
6125
6104
  };
6126
6105
  };
6127
- const setMessage$4 = (state, message) => {
6106
+ const setMessage$3 = (state, message) => {
6128
6107
  const {
6129
6108
  $Viewlet
6130
6109
  } = state;
@@ -6133,18 +6112,18 @@ const setMessage$4 = (state, message) => {
6133
6112
 
6134
6113
  const ViewletEditorTextError = {
6135
6114
  __proto__: null,
6136
- create: create$l,
6137
- setMessage: setMessage$4
6115
+ create: create$k,
6116
+ setMessage: setMessage$3
6138
6117
  };
6139
6118
 
6140
- const create$k = () => {
6119
+ const create$j = () => {
6141
6120
  const $Viewlet = document.createElement('div');
6142
6121
  $Viewlet.className = 'Viewlet EditorWidgetError EditorOverlayMessage';
6143
6122
  return {
6144
6123
  $Viewlet
6145
6124
  };
6146
6125
  };
6147
- const setMessage$3 = (state, message) => {
6126
+ const setMessage$2 = (state, message) => {
6148
6127
  const {
6149
6128
  $Viewlet
6150
6129
  } = state;
@@ -6160,12 +6139,12 @@ const setBounds$3 = (state, x, y, width, height) => {
6160
6139
 
6161
6140
  const ViewletEditorWidgetError = {
6162
6141
  __proto__: null,
6163
- create: create$k,
6142
+ create: create$j,
6164
6143
  setBounds: setBounds$3,
6165
- setMessage: setMessage$3
6144
+ setMessage: setMessage$2
6166
6145
  };
6167
6146
 
6168
- const create$j = () => {
6147
+ const create$i = () => {
6169
6148
  const $Viewlet = document.createElement('div');
6170
6149
  $Viewlet.dataset.viewlet = 'Empty';
6171
6150
  $Viewlet.className = 'Viewlet';
@@ -6174,18 +6153,18 @@ const create$j = () => {
6174
6153
  };
6175
6154
  };
6176
6155
  const refresh$2 = (state, context) => {};
6177
- const focus$d = state => {};
6178
- const dispose$b = state => {};
6156
+ const focus$b = state => {};
6157
+ const dispose$a = state => {};
6179
6158
 
6180
6159
  const ViewletEmpty = {
6181
6160
  __proto__: null,
6182
- create: create$j,
6183
- dispose: dispose$b,
6184
- focus: focus$d,
6161
+ create: create$i,
6162
+ dispose: dispose$a,
6163
+ focus: focus$b,
6185
6164
  refresh: refresh$2
6186
6165
  };
6187
6166
 
6188
- const create$i = () => {
6167
+ const create$h = () => {
6189
6168
  const $Viewlet = document.createElement('div');
6190
6169
  $Viewlet.className = 'Viewlet EmptyEditor';
6191
6170
  return {
@@ -6195,17 +6174,17 @@ const create$i = () => {
6195
6174
 
6196
6175
  const ViewletEmptyEditor = {
6197
6176
  __proto__: null,
6198
- create: create$i
6177
+ create: create$h
6199
6178
  };
6200
6179
 
6201
- const create$h = () => {
6180
+ const create$g = () => {
6202
6181
  const $Viewlet = document.createElement('div');
6203
6182
  $Viewlet.className = 'Viewlet Error';
6204
6183
  return {
6205
6184
  $Viewlet
6206
6185
  };
6207
6186
  };
6208
- const setMessage$2 = (state, message) => {
6187
+ const setMessage$1 = (state, message) => {
6209
6188
  const {
6210
6189
  $Viewlet
6211
6190
  } = state;
@@ -6214,277 +6193,8 @@ const setMessage$2 = (state, message) => {
6214
6193
 
6215
6194
  const ViewletError = {
6216
6195
  __proto__: null,
6217
- create: create$h,
6218
- setMessage: setMessage$2
6219
- };
6220
-
6221
- const Polite = 'polite';
6222
-
6223
- const handleContextMenu$4 = event => {
6224
- preventDefault(event);
6225
- const {
6226
- button,
6227
- clientX,
6228
- clientY
6229
- } = event;
6230
- const uid = fromEvent(event);
6231
- handleContextMenu$9(uid, button, clientX, clientY);
6232
- };
6233
-
6234
- const handleScrollBarThumbPointerMove = event => {
6235
- const {
6236
- clientY
6237
- } = event;
6238
- const uid = fromEvent(event);
6239
- handleScrollBarThumbPointerMove$2(uid, clientY);
6240
- };
6241
- const handleScrollBarPointerCaptureLost = event => {
6242
- const {
6243
- target,
6244
- pointerId
6245
- } = event;
6246
- stopTracking(target, pointerId, handleScrollBarThumbPointerMove, handleScrollBarPointerCaptureLost);
6247
- const uid = fromEvent(event);
6248
- handleScrollBarCaptureLost(uid);
6249
- };
6250
- const handleScrollBarPointerDown$1 = event => {
6251
- const {
6252
- target,
6253
- pointerId,
6254
- clientY
6255
- } = event;
6256
- startTracking(target, pointerId, handleScrollBarThumbPointerMove, handleScrollBarPointerCaptureLost);
6257
- const uid = fromEvent(event);
6258
- handleScrollBarClick(uid, clientY);
6259
- };
6260
- const handleFocus$5 = event => {
6261
- const uid = fromEvent(event);
6262
- handleFocus$9(uid);
6263
- };
6264
- const handlePointerDown$2 = event => {
6265
- const {
6266
- target,
6267
- button
6268
- } = event;
6269
- const uid = fromEvent(event);
6270
- if (button !== LeftClick) {
6271
- return;
6272
- }
6273
- const $Extension = target.closest('.ExtensionListItem');
6274
- const index = getNodeIndex($Extension);
6275
- handleClick$6(uid, index);
6276
- };
6277
- const handleInput$5 = event => {
6278
- const $Target = event.target;
6279
- const value = $Target.value;
6280
- const uid = fromEvent(event);
6281
- handleInput$7(uid, value);
6282
- // TODO
6283
- // TODO use beforeinput event to set value and extension list items at the same time
6284
- // state.$Viewlet.ariaBusy = 'true'
6285
- };
6286
- const handleScroll = event => {};
6287
-
6288
- /**
6289
- * @param {TouchEvent} event
6290
- */
6291
- const handleTouchMove = event => {
6292
- const {
6293
- timeStamp
6294
- } = event;
6295
- const {
6296
- changedTouches
6297
- } = toSimpleTouchEvent(event);
6298
- const uid = fromEvent(event);
6299
- handleTouchMove$1(uid, timeStamp, changedTouches);
6300
- };
6301
-
6302
- /**
6303
- * @param {TouchEvent} event
6304
- */
6305
- const handleTouchStart = event => {
6306
- const {
6307
- timeStamp
6308
- } = event;
6309
- const {
6310
- changedTouches
6311
- } = toSimpleTouchEvent(event);
6312
- const uid = fromEvent(event);
6313
- handleTouchStart$1(uid, timeStamp, changedTouches);
6314
- };
6315
-
6316
- /**
6317
- * @param {TouchEvent} event
6318
- */
6319
- const handleTouchEnd = event => {
6320
- const {
6321
- changedTouches
6322
- } = toSimpleTouchEvent(event);
6323
- const uid = fromEvent(event);
6324
- handleTouchEnd$1(uid, changedTouches);
6325
- };
6326
-
6327
- // based on https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/extensions/browser/extensionsList.ts (License MIT)
6328
-
6329
- const create$g = () => {
6330
- const $ExtensionHeader = document.createElement('div');
6331
- $ExtensionHeader.className = 'ExtensionHeader';
6332
-
6333
- // TODO handle error
6334
- const $ListItems = document.createElement('div');
6335
- $ListItems.className = 'ListItems';
6336
- $ListItems.tabIndex = 0;
6337
- $ListItems.ariaLabel = 'Extensions';
6338
- $ListItems.role = List$1;
6339
- const $ScrollBarThumb = document.createElement('div');
6340
- $ScrollBarThumb.className = 'ScrollBarThumb';
6341
- const $ScrollBar = document.createElement('div');
6342
- $ScrollBar.className = 'ScrollBar ScrollBarSmall';
6343
- $ScrollBar.append($ScrollBarThumb);
6344
- const $List = document.createElement('div');
6345
- $List.className = 'Viewlet List';
6346
- $List.append($ListItems, $ScrollBar);
6347
- const $Viewlet = document.createElement('div');
6348
- $Viewlet.className = 'Viewlet Extensions';
6349
- $Viewlet.ariaLive = Polite;
6350
- $Viewlet.ariaBusy = True;
6351
- $Viewlet.role = None$2;
6352
- $Viewlet.append($ExtensionHeader, $List);
6353
- return {
6354
- $Viewlet,
6355
- $List,
6356
- $ListItems,
6357
- $ExtensionHeader,
6358
- $ExtensionSuggestions: undefined,
6359
- $ScrollBarThumb,
6360
- $ScrollBar,
6361
- $Message: undefined
6362
- };
6363
- };
6364
- const attachEvents$6 = state => {
6365
- const {
6366
- $ExtensionHeader,
6367
- $ListItems,
6368
- $ScrollBar
6369
- } = state;
6370
- $ExtensionHeader.addEventListener(Input, handleInput$5, Capture);
6371
- // @ts-expect-error
6372
- $ExtensionHeader.addEventListener(Click, undefined);
6373
- attachEvents$a($ListItems, {
6374
- [ContextMenu]: handleContextMenu$4,
6375
- [PointerDown]: handlePointerDown$2,
6376
- [Focus]: handleFocus$5,
6377
- [Scroll]: handleScroll
6378
- });
6379
- $ListItems.addEventListener(TouchStart, handleTouchStart, Passive);
6380
- $ListItems.addEventListener(TouchMove, handleTouchMove, Passive);
6381
- $ListItems.addEventListener(TouchEnd, handleTouchEnd, Passive);
6382
- $ListItems.addEventListener(Wheel, handleWheel$3, Passive);
6383
- attachEvents$a($ScrollBar, {
6384
- [PointerDown]: handleScrollBarPointerDown$1
6385
- });
6386
- };
6387
- const focus$c = state => {
6388
- object(state);
6389
- state.$InputBox.focus();
6390
- };
6391
- const setExtensionState = () => {
6392
- // const index = state.extensions.findIndex((extension) => extension.id === id)
6393
- // if (index === -1) {
6394
- // return
6395
- // }
6396
- // state.extensions[index].state = extensionState
6397
- // render(state)
6398
- };
6399
- const setMessage$1 = (state, message) => {
6400
- object(state);
6401
- string(message);
6402
- const {
6403
- $List,
6404
- $ListItems,
6405
- $ScrollBar
6406
- } = state;
6407
- if (!message) {
6408
- $List.replaceChildren($ListItems, $ScrollBar);
6409
- state.$Message = undefined;
6410
- return;
6411
- }
6412
- const $Message = document.createElement('div');
6413
- $Message.className = 'ViewletExtensionMessage';
6414
- $Message.textContent = message;
6415
- $List.replaceChildren($Message);
6416
- state.$Message = $Message;
6417
- };
6418
- const setHeaderDom = (state, dom) => {
6419
- const {
6420
- $ExtensionHeader
6421
- } = state;
6422
- // @ts-expect-error
6423
- const $Element = render(dom).firstChild.firstChild;
6424
- $ExtensionHeader.replaceChildren($Element);
6425
- };
6426
- const setExtensionsDom = (state, dom) => {
6427
- object(state);
6428
- array(dom);
6429
- const {
6430
- $ListItems
6431
- } = state;
6432
- const $Root = render(dom);
6433
- // @ts-expect-error
6434
- $ListItems.replaceChildren(...$Root.firstChild.childNodes);
6435
- };
6436
- const dispose$a = () => {};
6437
- const openSuggest = state => {
6438
- // TODO maybe cache getBoundingClientRect (though it is not a bottleneck right now)
6439
- // TODO getBoundingClientRect should not be needed, all positions should be known already in renderer worker
6440
- // @ts-ignore
6441
- state.$InputBox.getBoundingClientRect();
6442
- // const x = state.$InputBox.offsetLeft
6443
- // const y = state.$InputBox.offsetTop
6444
- };
6445
- const closeSuggest = state => {
6446
- state.$ExtensionSuggestions.remove();
6447
- };
6448
- const handleError$4 = (state, message) => {
6449
- object(state);
6450
- string(message);
6451
- const {
6452
- $ListItems
6453
- } = state;
6454
- $ListItems.textContent = message;
6455
- };
6456
- const setSearchValue = (state, oldValue, newValue) => {
6457
- const {
6458
- $ExtensionHeader
6459
- } = state;
6460
- if (!$ExtensionHeader) {
6461
- return;
6462
- }
6463
- const $InputBox = $ExtensionHeader.querySelector('textarea');
6464
- if (!$InputBox) {
6465
- return;
6466
- }
6467
- $InputBox.value = newValue;
6468
- };
6469
-
6470
- const ViewletExtensions = {
6471
- __proto__: null,
6472
- attachEvents: attachEvents$6,
6473
- closeSuggest,
6474
6196
  create: create$g,
6475
- dispose: dispose$a,
6476
- focus: focus$c,
6477
- handleError: handleError$4,
6478
- openSuggest,
6479
- setContentHeight,
6480
- setExtensionState,
6481
- setExtensionsDom,
6482
- setHeaderDom,
6483
- setMessage: setMessage$1,
6484
- setNegativeMargin,
6485
- setScrollBar: setScrollBar$2,
6486
- setSearchValue,
6487
- setSize
6197
+ setMessage: setMessage$1
6488
6198
  };
6489
6199
 
6490
6200
  const handleInput$4 = event => {
@@ -6553,7 +6263,7 @@ const handleFocusClose = event => {
6553
6263
  const handleFocusReplaceAll = event => {
6554
6264
  return ['FindWidget.handleFocusReplaceAll'];
6555
6265
  };
6556
- const returnValue$3 = true;
6266
+ const returnValue$2 = true;
6557
6267
 
6558
6268
  const ViewletFindWidgetEvents = {
6559
6269
  __proto__: null,
@@ -6573,7 +6283,7 @@ const ViewletFindWidgetEvents = {
6573
6283
  handleReplaceFocus,
6574
6284
  handleReplaceInput,
6575
6285
  handleToggleReplaceFocus,
6576
- returnValue: returnValue$3
6286
+ returnValue: returnValue$2
6577
6287
  };
6578
6288
 
6579
6289
  const create$f = () => {
@@ -6584,7 +6294,7 @@ const create$f = () => {
6584
6294
  $Viewlet
6585
6295
  };
6586
6296
  };
6587
- const focus$b = (state, key, source) => {
6297
+ const focus$a = (state, key, source) => {
6588
6298
  if (!key) {
6589
6299
  return;
6590
6300
  }
@@ -6641,7 +6351,7 @@ const ViewletFindWidget = {
6641
6351
  appendWidget: appendWidget$1,
6642
6352
  create: create$f,
6643
6353
  dispose: dispose$9,
6644
- focus: focus$b,
6354
+ focus: focus$a,
6645
6355
  setBounds: setBounds$2,
6646
6356
  setDom: setDom$3,
6647
6357
  setValue: setValue$1
@@ -6665,7 +6375,7 @@ const ViewletLocationsEvents = {
6665
6375
  handleLocationsMouseDown
6666
6376
  };
6667
6377
 
6668
- const setFocusedIndex$2 = (state, oldFocusedIndex, newFocusedIndex) => {
6378
+ const setFocusedIndex$1 = (state, oldFocusedIndex, newFocusedIndex) => {
6669
6379
  const {
6670
6380
  $Viewlet
6671
6381
  } = state;
@@ -6688,7 +6398,7 @@ const handleError$3 = (state, message) => {
6688
6398
  } = state;
6689
6399
  $Message.textContent = message;
6690
6400
  };
6691
- const focus$a = state => {
6401
+ const focus$9 = state => {
6692
6402
  const {
6693
6403
  $Locations
6694
6404
  } = state;
@@ -6700,9 +6410,9 @@ const focus$a = state => {
6700
6410
  const ViewletImplementations = {
6701
6411
  __proto__: null,
6702
6412
  Events: ViewletLocationsEvents,
6703
- focus: focus$a,
6413
+ focus: focus$9,
6704
6414
  handleError: handleError$3,
6705
- setFocusedIndex: setFocusedIndex$2
6415
+ setFocusedIndex: setFocusedIndex$1
6706
6416
  };
6707
6417
 
6708
6418
  const handleScrollBarPointerDown = event => {
@@ -6759,7 +6469,7 @@ const getPointerDownFunction = event => {
6759
6469
  return undefined;
6760
6470
  }
6761
6471
  };
6762
- const handlePointerDown$1 = event => {
6472
+ const handlePointerDown = event => {
6763
6473
  const pointerDownFunction = getPointerDownFunction(event);
6764
6474
  if (!pointerDownFunction) {
6765
6475
  return;
@@ -6769,7 +6479,7 @@ const handlePointerDown$1 = event => {
6769
6479
 
6770
6480
  const ViewletkeyBindingsEvents = {
6771
6481
  __proto__: null,
6772
- handlePointerDown: handlePointerDown$1,
6482
+ handlePointerDown,
6773
6483
  handleResizerPointerDown,
6774
6484
  handleResizerPointerMove,
6775
6485
  handleResizerPointerUp
@@ -7320,15 +7030,15 @@ const attachEvents$5 = state => {
7320
7030
  $SashSideBar,
7321
7031
  $SashPanel
7322
7032
  } = state;
7323
- attachEvents$a($SashSideBar, {
7033
+ attachEvents$9($SashSideBar, {
7324
7034
  [PointerDown]: handleSashPointerDown,
7325
7035
  [DoubleClick]: handleSashDoubleClick
7326
7036
  });
7327
- attachEvents$a($SashPanel, {
7037
+ attachEvents$9($SashPanel, {
7328
7038
  [PointerDown]: handleSashPointerDown,
7329
7039
  [DoubleClick]: handleSashDoubleClick
7330
7040
  });
7331
- attachEvents$a(window, {
7041
+ attachEvents$9(window, {
7332
7042
  [Resize]: handleResize,
7333
7043
  [Focus]: handleFocus$2,
7334
7044
  [Blur]: handleBlur$3,
@@ -7441,7 +7151,7 @@ const handleContextMenu$3 = event => {
7441
7151
  clientY
7442
7152
  } = event;
7443
7153
  const uid = fromEvent(event);
7444
- handleContextMenu$9(uid, clientX, clientY);
7154
+ handleContextMenu$8(uid, clientX, clientY);
7445
7155
  };
7446
7156
 
7447
7157
  // TODO Main should not be bound to Editor -> Lazy load Editor
@@ -7470,7 +7180,7 @@ const attachEvents$4 = state => {
7470
7180
  const {
7471
7181
  $Viewlet
7472
7182
  } = state;
7473
- attachEvents$a($Viewlet, {
7183
+ attachEvents$9($Viewlet, {
7474
7184
  [Drop]: handleDrop$1,
7475
7185
  [DragOver]: handleDragOver$1,
7476
7186
  [DragEnd]: handleDragEnd,
@@ -7500,7 +7210,7 @@ const closeViewletAndTab = (state, index) => {
7500
7210
  state.$MainTabs.remove();
7501
7211
  state.$MainTabs = undefined;
7502
7212
  };
7503
- const focus$9 = () => {};
7213
+ const focus$8 = () => {};
7504
7214
  const highlightDragOver = state => {
7505
7215
  const {
7506
7216
  $MainTabs
@@ -7547,7 +7257,7 @@ const ViewletMain = {
7547
7257
  closeViewletAndTab,
7548
7258
  create: create$d,
7549
7259
  dispose: dispose$8,
7550
- focus: focus$9,
7260
+ focus: focus$8,
7551
7261
  highlightDragOver,
7552
7262
  openEditor,
7553
7263
  replaceEditor,
@@ -7636,7 +7346,7 @@ const attachEvents$3 = state => {
7636
7346
  const {
7637
7347
  $MainTabs
7638
7348
  } = state;
7639
- attachEvents$a($MainTabs, {
7349
+ attachEvents$9($MainTabs, {
7640
7350
  [ContextMenu]: handleTabsContextMenu,
7641
7351
  [DragOver]: handleDragOver,
7642
7352
  [DragStart]: handleDragStart,
@@ -7695,7 +7405,6 @@ const EditorText = 'Editor';
7695
7405
  const EditorWidgetError = 'EditorWidgetError';
7696
7406
  const Empty = 'Empty';
7697
7407
  const Error$1 = 'Error';
7698
- const Extensions = 'Extensions';
7699
7408
  const FindWidget = 'FindWidget';
7700
7409
  const ImagePreview = 'ImagePreview';
7701
7410
  const InlineDiffEditor = 'InlineDiffEditor';
@@ -7706,7 +7415,6 @@ const Main = 'Main';
7706
7415
  const MainTabs = 'MainTabs';
7707
7416
  const Output = 'Output';
7708
7417
  const Panel = 'Panel';
7709
- const Problems = 'Problems';
7710
7418
  const References = 'References';
7711
7419
  const RunAndDebug = 'Run And Debug';
7712
7420
  const ScreenCapture = 'ScreenCapture';
@@ -7764,9 +7472,9 @@ const handleError$2 = (state, error) => {
7764
7472
  string(error);
7765
7473
  state.content.textContent = error;
7766
7474
  };
7767
- const focus$8 = state => {
7475
+ const focus$7 = state => {
7768
7476
  object(state);
7769
- focus$h(state.$ViewletOutputContent);
7477
+ focus$f(state.$ViewletOutputContent);
7770
7478
  send('Focus.setFocus', FocusOutput);
7771
7479
  };
7772
7480
 
@@ -7787,7 +7495,7 @@ const ViewletOutput = {
7787
7495
  create: create$b,
7788
7496
  dispose: dispose$7,
7789
7497
  disposeFindWidget,
7790
- focus: focus$8,
7498
+ focus: focus$7,
7791
7499
  handleError: handleError$2,
7792
7500
  openFindWidget,
7793
7501
  setText
@@ -7889,13 +7597,13 @@ const attachEvents$2 = state => {
7889
7597
  $ButtonClose,
7890
7598
  $PanelHeader
7891
7599
  } = state;
7892
- attachEvents$a($PanelHeader, {
7600
+ attachEvents$9($PanelHeader, {
7893
7601
  [Click]: handleHeaderClick$1
7894
7602
  });
7895
- attachEvents$a($ButtonMaximize, {
7603
+ attachEvents$9($ButtonMaximize, {
7896
7604
  [Click]: handleClickMaximize
7897
7605
  });
7898
- attachEvents$a($ButtonClose, {
7606
+ attachEvents$9($ButtonClose, {
7899
7607
  [Click]: handleClickClose
7900
7608
  });
7901
7609
  };
@@ -7907,7 +7615,7 @@ const setTabsDom$1 = (state, dom) => {
7907
7615
  };
7908
7616
 
7909
7617
  // TODO add test for focus method
7910
- const focus$7 = state => {
7618
+ const focus$6 = state => {
7911
7619
  object(state);
7912
7620
  if (!state.currentViewlet) {
7913
7621
  return;
@@ -7961,81 +7669,18 @@ const ViewletPanel = {
7961
7669
  attachEvents: attachEvents$2,
7962
7670
  create: create$a,
7963
7671
  dispose: dispose$6,
7964
- focus: focus$7,
7672
+ focus: focus$6,
7965
7673
  setActionsDom: setActionsDom$1,
7966
7674
  setSelectedIndex,
7967
7675
  setTabsDom: setTabsDom$1
7968
7676
  };
7969
7677
 
7970
- const handlePointerDown = event => {
7971
- preventDefault(event);
7972
- const {
7973
- clientX,
7974
- clientY
7975
- } = event;
7976
- return ['handleClickAt', clientX, clientY];
7977
- };
7978
- const handleContextMenu$2 = event => {
7979
- preventDefault(event);
7980
- const {
7981
- clientX,
7982
- clientY
7983
- } = event;
7984
- return ['handleContextMenu', clientX, clientY];
7985
- };
7986
- const handleFilterInput = event => {
7987
- const {
7988
- target
7989
- } = event;
7990
- const {
7991
- value
7992
- } = target;
7993
- return ['handleFilterInput', value];
7994
- };
7995
- const handleClearFilterClick = event => {
7996
- return ['clearFilter'];
7997
- };
7998
- const returnValue$2 = true;
7999
-
8000
- const ViewletProblemsEvents = {
8001
- __proto__: null,
8002
- handleClearFilterClick,
8003
- handleContextMenu: handleContextMenu$2,
8004
- handleFilterInput,
8005
- handlePointerDown,
8006
- returnValue: returnValue$2
8007
- };
8008
-
8009
- const setFocusedIndex$1 = (state, focusedIndex) => {
8010
- const {
8011
- $Viewlet
8012
- } = state;
8013
- if (focusedIndex === -1) {
8014
- $Viewlet.classList.add('FocusOutline');
8015
- $Viewlet.focus();
8016
- }
8017
- };
8018
- const focus$6 = state => {
8019
- const {
8020
- $Viewlet
8021
- } = state;
8022
- $Viewlet.focus();
8023
- };
8024
-
8025
- const ViewletProblems = {
8026
- __proto__: null,
8027
- EventMap: ViewletProblemsEvents,
8028
- Events: ViewletProblemsEvents,
8029
- focus: focus$6,
8030
- setFocusedIndex: setFocusedIndex$1
8031
- };
8032
-
8033
7678
  const ViewletReferences = {
8034
7679
  __proto__: null,
8035
7680
  Events: ViewletLocationsEvents,
8036
- focus: focus$a,
7681
+ focus: focus$9,
8037
7682
  handleError: handleError$3,
8038
- setFocusedIndex: setFocusedIndex$2
7683
+ setFocusedIndex: setFocusedIndex$1
8039
7684
  };
8040
7685
 
8041
7686
  const ViewletRunAndDebug = {
@@ -8115,7 +7760,7 @@ const attachEvents$1 = state => {
8115
7760
  const {
8116
7761
  $SideBarTitleArea
8117
7762
  } = state;
8118
- attachEvents$a($SideBarTitleArea, {
7763
+ attachEvents$9($SideBarTitleArea, {
8119
7764
  [Click]: handleHeaderClick
8120
7765
  });
8121
7766
  };
@@ -8242,9 +7887,20 @@ const ViewletSimpleBrowser = {
8242
7887
  Events: ViewletSimpleBrowserEvents
8243
7888
  };
8244
7889
 
7890
+ const handleContextMenu$2 = event => {
7891
+ preventDefault(event);
7892
+ const {
7893
+ button,
7894
+ clientX,
7895
+ clientY
7896
+ } = event;
7897
+ const uid = fromEvent(event);
7898
+ handleContextMenu$8(uid, button, clientX, clientY);
7899
+ };
7900
+
8245
7901
  const handleFocus = event => {
8246
7902
  const uid = fromEvent(event);
8247
- handleFocus$9(uid);
7903
+ handleFocus$8(uid);
8248
7904
  };
8249
7905
  const getButtonIndex = $Node => {
8250
7906
  let index = -1;
@@ -8314,13 +7970,13 @@ const handleInput$1 = event => {
8314
7970
  value
8315
7971
  } = target;
8316
7972
  const uid = fromEvent(event);
8317
- handleInput$7(uid, value);
7973
+ handleInput$6(uid, value);
8318
7974
  };
8319
7975
 
8320
7976
  const ViewletSourceControlEvents = {
8321
7977
  __proto__: null,
8322
7978
  handleClick: handleClick$3,
8323
- handleContextMenu: handleContextMenu$4,
7979
+ handleContextMenu: handleContextMenu$2,
8324
7980
  handleFocus,
8325
7981
  handleInput: handleInput$1,
8326
7982
  handleMouseOut,
@@ -8473,7 +8129,7 @@ const attachEvents = state => {
8473
8129
  const {
8474
8130
  $Viewlet
8475
8131
  } = state;
8476
- attachEvents$a($Viewlet, {
8132
+ attachEvents$9($Viewlet, {
8477
8133
  [ContextMenu]: handleContextMenu$1
8478
8134
  });
8479
8135
  };
@@ -8608,7 +8264,7 @@ const handleMenuClick = event => {
8608
8264
  };
8609
8265
  const handleFocusIn$1 = event => {
8610
8266
  const uid = fromEvent(event);
8611
- handleFocus$9(uid);
8267
+ handleFocus$8(uid);
8612
8268
  };
8613
8269
 
8614
8270
  const ViewletTitleBarMenuBarEvents = {
@@ -9071,8 +8727,6 @@ const load$1 = moduleId => {
9071
8727
  return ViewletEmpty;
9072
8728
  case Error$1:
9073
8729
  return ViewletError;
9074
- case Extensions:
9075
- return ViewletExtensions;
9076
8730
  case FindWidget:
9077
8731
  return ViewletFindWidget;
9078
8732
  case Implementations:
@@ -9089,8 +8743,6 @@ const load$1 = moduleId => {
9089
8743
  return ViewletOutput;
9090
8744
  case Panel:
9091
8745
  return ViewletPanel;
9092
- case Problems:
9093
- return ViewletProblems;
9094
8746
  case References:
9095
8747
  return ViewletReferences;
9096
8748
  case RunAndDebug:
@@ -9742,6 +9394,9 @@ const setProperty = (id, selector, property, value) => {
9742
9394
  }
9743
9395
  const $Viewlet = instance.state.$Viewlet;
9744
9396
  const $Element = $Viewlet.querySelector(selector);
9397
+ if (!$Element) {
9398
+ return;
9399
+ }
9745
9400
  $Element[property] = value;
9746
9401
  };
9747
9402
 
@@ -9945,7 +9600,7 @@ const commandMap = {
9945
9600
  'GetFilePathElectron.getFilePathElectron': getFilePathElectron,
9946
9601
  'HandleMessagePort.handleMessagePort': handleMessagePort,
9947
9602
  'InitData.getInitData': getInitData,
9948
- 'IpcParent.create': create$B,
9603
+ 'IpcParent.create': create$A,
9949
9604
  'KeyBindings.setIdentifiers': setIdentifiers,
9950
9605
  'Layout.getBounds': getBounds,
9951
9606
  'Location.getHref': getHref,
@@ -9960,10 +9615,10 @@ const commandMap = {
9960
9615
  'Menu.showControlled': showControlled,
9961
9616
  'Menu.showMenu': showMenu,
9962
9617
  'Meta.setThemeColor': setThemeColor,
9963
- 'Notification.create': create$A,
9618
+ 'Notification.create': create$z,
9964
9619
  'Notification.createWithOptions': createWithOptions,
9965
- 'Notification.dispose': dispose$j,
9966
- 'OffscreenCanvas.create': create$z,
9620
+ 'Notification.dispose': dispose$i,
9621
+ 'OffscreenCanvas.create': create$y,
9967
9622
  'Open.openUrl': openUrl,
9968
9623
  'Performance.getMemory': getMemory,
9969
9624
  'Performance.measureUserAgentSpecificMemory': measureUserAgentSpecificMemory,
@@ -10039,7 +9694,7 @@ const getConfiguredEditorWorkerUrl = () => {
10039
9694
  const editorWorkerUrl = getConfiguredEditorWorkerUrl() || `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/editor-worker/dist/editorWorkerMain.js`;
10040
9695
 
10041
9696
  const launchEditorWorker = async port => {
10042
- const ipc = await create$B({
9697
+ const ipc = await create$A({
10043
9698
  name: 'Editor Worker',
10044
9699
  url: editorWorkerUrl,
10045
9700
  method: ModuleWorkerWithMessagePort,
@@ -10067,7 +9722,7 @@ const extensionHostWorkerUrl = getConfiguredExtensionHostWorkerUrl() || `${asset
10067
9722
 
10068
9723
  const launchExtensionHostWorker = async port => {
10069
9724
  const name = isElectron ? 'Extension Host (Electron)' : 'Extension Host';
10070
- const ipc = await create$B({
9725
+ const ipc = await create$A({
10071
9726
  name,
10072
9727
  url: extensionHostWorkerUrl,
10073
9728
  method: ModuleWorkerWithMessagePort,
@@ -10091,7 +9746,7 @@ const hydrate$1 = async () => {
10091
9746
  const syntaxHighlightingWorkerUrl = `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/syntax-highlighting-worker/dist/syntaxHighlightingWorkerMain.js`;
10092
9747
 
10093
9748
  const launchSyntaxHighlightingWorker = async port => {
10094
- const ipc = await create$B({
9749
+ const ipc = await create$A({
10095
9750
  name: 'Syntax Highlighting Worker',
10096
9751
  url: syntaxHighlightingWorkerUrl,
10097
9752
  method: ModuleWorkerWithMessagePort,