@lvce-editor/renderer-process 14.6.0 → 15.0.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
  };
@@ -4043,7 +4037,7 @@ const showError = (message, y, x) => {
4043
4037
  $ImagePreviewImage
4044
4038
  };
4045
4039
  };
4046
- const create$y = (uri, top, left) => {
4040
+ const create$x = (uri, top, left) => {
4047
4041
  const $ImagePreviewImage = document.createElement('img');
4048
4042
  $ImagePreviewImage.className = 'ImagePreviewImage';
4049
4043
  $ImagePreviewImage.src = uri;
@@ -4068,14 +4062,14 @@ const create$y = (uri, top, left) => {
4068
4062
  const update = (state, uri) => {
4069
4063
  state.$ImagePreviewImage.uri = uri;
4070
4064
  };
4071
- const dispose$i = state => {
4065
+ const dispose$h = state => {
4072
4066
  remove$1(state.$ImagePreview);
4073
4067
  };
4074
4068
 
4075
4069
  const ImagePreview$1 = {
4076
4070
  __proto__: null,
4077
- create: create$y,
4078
- dispose: dispose$i,
4071
+ create: create$x,
4072
+ dispose: dispose$h,
4079
4073
  showError,
4080
4074
  update
4081
4075
  };
@@ -4116,13 +4110,13 @@ const handleMouseDown$3 = event => {
4116
4110
  const handleBlur$9 = () => {
4117
4111
  return ['handleBlur'];
4118
4112
  };
4119
- const handleFocus$a = () => {
4113
+ const handleFocus$9 = () => {
4120
4114
  return ['handleFocus'];
4121
4115
  };
4122
4116
 
4123
4117
  // TODO use context menu events function again
4124
4118
 
4125
- const handleContextMenu$a = event => {
4119
+ const handleContextMenu$9 = event => {
4126
4120
  preventDefault(event);
4127
4121
  const {
4128
4122
  button,
@@ -4131,15 +4125,15 @@ const handleContextMenu$a = event => {
4131
4125
  } = event;
4132
4126
  return ['handleContextMenu', button, clientX, clientY];
4133
4127
  };
4134
- const returnValue$9 = true;
4128
+ const returnValue$8 = true;
4135
4129
 
4136
4130
  const ViewletActivityBarEvents = {
4137
4131
  __proto__: null,
4138
4132
  handleBlur: handleBlur$9,
4139
- handleContextMenu: handleContextMenu$a,
4140
- handleFocus: handleFocus$a,
4133
+ handleContextMenu: handleContextMenu$9,
4134
+ handleFocus: handleFocus$9,
4141
4135
  handleMouseDown: handleMouseDown$3,
4142
- returnValue: returnValue$9
4136
+ returnValue: returnValue$8
4143
4137
  };
4144
4138
 
4145
4139
  const Events$5 = ViewletActivityBarEvents;
@@ -4198,7 +4192,7 @@ forwardViewletCommand('handleClickOpenFolder');
4198
4192
  forwardViewletCommand('handleClickRestore');
4199
4193
  const handleClickTab$2 = forwardViewletCommand('handleClickTab');
4200
4194
  forwardViewletCommand('handleClickToggleMaximize');
4201
- const handleContextMenu$9 = forwardViewletCommand('handleContextMenu');
4195
+ const handleContextMenu$8 = forwardViewletCommand('handleContextMenu');
4202
4196
  forwardViewletCommand('handleDoubleClick');
4203
4197
  const handleDragEnd$1 = forwardViewletCommand('handleDragEnd');
4204
4198
  const handleDragLeave$1 = forwardViewletCommand('handleDragLeave');
@@ -4211,11 +4205,11 @@ forwardViewletCommand('handleClickSize');
4211
4205
  forwardViewletCommand('handleClickDisable');
4212
4206
  forwardViewletCommand('handleClickUninstall');
4213
4207
  forwardViewletCommand('handleFilterInput');
4214
- const handleFocus$9 = forwardViewletCommand('handleFocus');
4208
+ const handleFocus$8 = forwardViewletCommand('handleFocus');
4215
4209
  const handleFocusIn$4 = forwardViewletCommand('handleFocusIn');
4216
4210
  forwardViewletCommand('handleIconError');
4217
4211
  const handleImageError = forwardViewletCommand('handleImageError');
4218
- const handleInput$7 = forwardViewletCommand('handleInput');
4212
+ const handleInput$6 = forwardViewletCommand('handleInput');
4219
4213
  const handleKeyDown$4 = forwardViewletCommand('handleKeyDown');
4220
4214
  forwardViewletCommand('handleListBlur');
4221
4215
  forwardViewletCommand('handleListFocus');
@@ -4226,7 +4220,7 @@ forwardViewletCommand('handleMouseMove');
4226
4220
  const handleMouseOut$1 = forwardViewletCommand('handleMouseOut');
4227
4221
  const handleMouseOver$1 = forwardViewletCommand('handleMouseOver');
4228
4222
  forwardViewletCommand('handlePointerCaptureLost');
4229
- const handlePointerDown$5 = forwardViewletCommand('handlePointerDown');
4223
+ const handlePointerDown$3 = forwardViewletCommand('handlePointerDown');
4230
4224
  const handlePointerMove$1 = forwardViewletCommand('handlePointerMove');
4231
4225
  forwardViewletCommand('handlePointerOver');
4232
4226
  const handlePointerUp$1 = forwardViewletCommand('handlePointerUp');
@@ -4234,12 +4228,12 @@ forwardViewletCommand('handleReadmeContextMenu');
4234
4228
  forwardViewletCommand('handleReplaceInput');
4235
4229
  const handleResizerClick = forwardViewletCommand('handleResizerClick');
4236
4230
  const handleResizerMove = forwardViewletCommand('handleResizerMove');
4237
- const handleScrollBarCaptureLost = forwardViewletCommand('handleScrollBarCaptureLost');
4231
+ forwardViewletCommand('handleScrollBarCaptureLost');
4238
4232
  const handleScrollBarClick = forwardViewletCommand('handleScrollBarClick');
4239
4233
  forwardViewletCommand('handleScrollBarHorizontalMove');
4240
4234
  forwardViewletCommand('handleScrollBarHorizontalPointerDown');
4241
4235
  forwardViewletCommand('handleScrollBarMove');
4242
- const handleScrollBarThumbPointerMove$2 = forwardViewletCommand('handleScrollBarThumbPointerMove');
4236
+ const handleScrollBarThumbPointerMove$1 = forwardViewletCommand('handleScrollBarThumbPointerMove');
4243
4237
  forwardViewletCommand('handleScrollBarMove');
4244
4238
  forwardViewletCommand('handleScrollBarVerticalPointerDown');
4245
4239
  forwardViewletCommand('handleSliderPointerDown');
@@ -4252,9 +4246,9 @@ const handleTabsDragOver = forwardViewletCommand('handleTabsDragOver');
4252
4246
  forwardViewletCommand('handleTabsPointerOut');
4253
4247
  forwardViewletCommand('handleTabsPointerOver');
4254
4248
  const handleTabsWheel$1 = forwardViewletCommand('handleTabsWheel');
4255
- const handleTouchEnd$1 = forwardViewletCommand('handleTouchEnd');
4256
- const handleTouchMove$1 = forwardViewletCommand('handleTouchMove');
4257
- const handleTouchStart$1 = forwardViewletCommand('handleTouchStart');
4249
+ forwardViewletCommand('handleTouchEnd');
4250
+ forwardViewletCommand('handleTouchMove');
4251
+ forwardViewletCommand('handleTouchStart');
4258
4252
  const handleWheel$4 = forwardViewletCommand('handleWheel');
4259
4253
  const hidePanel = forwardViewletCommand('hidePanel');
4260
4254
  forwardViewletCommand('moveRectangleSelectionPx');
@@ -4299,14 +4293,14 @@ const ViewletAudio = {
4299
4293
  Events: Events$4
4300
4294
  };
4301
4295
 
4302
- const create$x = () => {
4296
+ const create$w = () => {
4303
4297
  const $Viewlet = document.createElement('div');
4304
4298
  $Viewlet.className = 'Viewlet Clock';
4305
4299
  return {
4306
4300
  $Viewlet
4307
4301
  };
4308
4302
  };
4309
- const dispose$h = state => {};
4303
+ const dispose$g = state => {};
4310
4304
  const refresh$4 = () => {};
4311
4305
  const setTime = (state, time) => {
4312
4306
  object(state);
@@ -4316,8 +4310,8 @@ const setTime = (state, time) => {
4316
4310
 
4317
4311
  const ViewletClock = {
4318
4312
  __proto__: null,
4319
- create: create$x,
4320
- dispose: dispose$h,
4313
+ create: create$w,
4314
+ dispose: dispose$g,
4321
4315
  refresh: refresh$4,
4322
4316
  setTime
4323
4317
  };
@@ -4345,7 +4339,7 @@ const stopTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp)
4345
4339
  // TODO use pointerlost event instead
4346
4340
  $Target.removeEventListener(PointerUp, handlePointerUp);
4347
4341
  };
4348
- const create$w = (pointerDown, pointerMove, pointerUp) => {
4342
+ const create$v = (pointerDown, pointerMove, pointerUp) => {
4349
4343
  const shared = (fn, event) => {
4350
4344
  const message = fn(event);
4351
4345
  if (!message || message.length === 0) {
@@ -4378,7 +4372,7 @@ const create$w = (pointerDown, pointerMove, pointerUp) => {
4378
4372
  };
4379
4373
 
4380
4374
  const handleOffset = 20;
4381
- const handleSliderPointerDown = create$w(event => {
4375
+ const handleSliderPointerDown = create$v(event => {
4382
4376
  const {
4383
4377
  clientX,
4384
4378
  clientY
@@ -4393,7 +4387,7 @@ const handleSliderPointerDown = create$w(event => {
4393
4387
  }, () => {
4394
4388
  return [];
4395
4389
  });
4396
- const handlePointerDown$4 = event => {
4390
+ const handlePointerDown$2 = event => {
4397
4391
  const {
4398
4392
  target
4399
4393
  } = event;
@@ -4402,12 +4396,12 @@ const handlePointerDown$4 = event => {
4402
4396
  }
4403
4397
  return [];
4404
4398
  };
4405
- const returnValue$8 = true;
4399
+ const returnValue$7 = true;
4406
4400
 
4407
4401
  const ViewletColorPickerEvents = {
4408
4402
  __proto__: null,
4409
- handlePointerDown: handlePointerDown$4,
4410
- returnValue: returnValue$8
4403
+ handlePointerDown: handlePointerDown$2,
4404
+ returnValue: returnValue$7
4411
4405
  };
4412
4406
 
4413
4407
  const setColor = (state, color) => {
@@ -4439,7 +4433,7 @@ const ViewletColorPicker = {
4439
4433
  setOffsetX
4440
4434
  };
4441
4435
 
4442
- const handleInput$6 = event => {
4436
+ const handleInput$5 = event => {
4443
4437
  const uid = fromEvent(event);
4444
4438
  const {
4445
4439
  target
@@ -4447,20 +4441,20 @@ const handleInput$6 = event => {
4447
4441
  const {
4448
4442
  value
4449
4443
  } = target;
4450
- handleInput$7(uid, value);
4444
+ handleInput$6(uid, value);
4451
4445
  };
4452
- const handleFocus$8 = event => {
4446
+ const handleFocus$7 = event => {
4453
4447
  const uid = fromEvent(event);
4454
- handleFocus$9(uid);
4448
+ handleFocus$8(uid);
4455
4449
  };
4456
4450
 
4457
4451
  const ViewletDebugConsoleEvents = {
4458
4452
  __proto__: null,
4459
- handleFocus: handleFocus$8,
4460
- handleInput: handleInput$6
4453
+ handleFocus: handleFocus$7,
4454
+ handleInput: handleInput$5
4461
4455
  };
4462
4456
 
4463
- const create$v = () => {
4457
+ const create$u = () => {
4464
4458
  const $Viewlet = document.createElement('div');
4465
4459
  $Viewlet.className = 'Viewlet DebugConsole';
4466
4460
  return {
@@ -4476,7 +4470,7 @@ const setDom$9 = (state, dom) => {
4476
4470
 
4477
4471
  const ViewletDebugConsole = {
4478
4472
  __proto__: null,
4479
- create: create$v,
4473
+ create: create$u,
4480
4474
  setDom: setDom$9
4481
4475
  };
4482
4476
 
@@ -4513,7 +4507,7 @@ const setValue$2 = (state, value) => {
4513
4507
  const $Input = $Viewlet.querySelector('input');
4514
4508
  $Input.value = value;
4515
4509
  };
4516
- const focus$g = state => {
4510
+ const focus$e = state => {
4517
4511
  const {
4518
4512
  $Viewlet
4519
4513
  } = state;
@@ -4524,7 +4518,7 @@ const focus$g = state => {
4524
4518
  const ViewletDefineKeyBinding = {
4525
4519
  __proto__: null,
4526
4520
  Events: ViewletDefineKeyBindingEvents,
4527
- focus: focus$g,
4521
+ focus: focus$e,
4528
4522
  setValue: setValue$2
4529
4523
  };
4530
4524
 
@@ -4537,7 +4531,7 @@ const setMaskImage = ($Element, icon) => {
4537
4531
  }
4538
4532
  };
4539
4533
 
4540
- const create$u = icon => {
4534
+ const create$t = icon => {
4541
4535
  const $Icon = document.createElement('div');
4542
4536
  $Icon.className = 'MaskIcon';
4543
4537
  setMaskImage($Icon, icon);
@@ -4547,7 +4541,7 @@ const create$u = icon => {
4547
4541
 
4548
4542
  const create$Button = (label, icon) => {
4549
4543
  // TODO icon div might not be needed (unnecessary html element)
4550
- const $Icon = create$u(icon);
4544
+ const $Icon = create$t(icon);
4551
4545
  const $Button = document.createElement('button');
4552
4546
  $Button.className = 'IconButton';
4553
4547
  $Button.title = label;
@@ -4568,7 +4562,7 @@ const handleClick$4 = event => {
4568
4562
  handleClick$5(index);
4569
4563
  };
4570
4564
 
4571
- const create$t = () => {
4565
+ const create$s = () => {
4572
4566
  const $DialogTitle = document.createElement('h2');
4573
4567
  $DialogTitle.id = 'DialogTitle';
4574
4568
  const $DialogCloseButton = create$Button('Close', 'Close');
@@ -4649,7 +4643,7 @@ const setErrorStack = (state, errorStack) => {
4649
4643
 
4650
4644
  const ViewletDialog = {
4651
4645
  __proto__: null,
4652
- create: create$t,
4646
+ create: create$s,
4653
4647
  postAppend,
4654
4648
  setButtons,
4655
4649
  setCodeFrame,
@@ -4667,13 +4661,13 @@ const handleWheel$3 = event => {
4667
4661
  handleWheel$4(uid, deltaMode, deltaY);
4668
4662
  };
4669
4663
 
4670
- const handleScrollBarPointerDown$3 = event => {
4664
+ const handleScrollBarPointerDown$2 = event => {
4671
4665
  // TODO
4672
4666
  };
4673
4667
 
4674
4668
  const ViewletDiffEditorEvents = {
4675
4669
  __proto__: null,
4676
- handleScrollBarPointerDown: handleScrollBarPointerDown$3,
4670
+ handleScrollBarPointerDown: handleScrollBarPointerDown$2,
4677
4671
  handleWheel: handleWheel$3
4678
4672
  };
4679
4673
 
@@ -4703,7 +4697,7 @@ const handleClickAt$2 = event => {
4703
4697
  const handleLoad$3 = event => {
4704
4698
  return ['handleLoad'];
4705
4699
  };
4706
- const handleContextMenu$8 = event => {
4700
+ const handleContextMenu$7 = event => {
4707
4701
  preventDefault(event);
4708
4702
  const {
4709
4703
  button,
@@ -4712,7 +4706,7 @@ const handleContextMenu$8 = event => {
4712
4706
  } = event;
4713
4707
  return ['handleContextMenu', button, clientX, clientY];
4714
4708
  };
4715
- const handleSashCornerPointerDown = create$w(event => {
4709
+ const handleSashCornerPointerDown = create$v(event => {
4716
4710
  const {
4717
4711
  clientX,
4718
4712
  clientY
@@ -4731,15 +4725,15 @@ const handleSashCornerPointerDown = create$w(event => {
4731
4725
  } = event;
4732
4726
  return ['handleSashCornerPointerUp', clientX, clientY];
4733
4727
  });
4734
- const returnValue$7 = true;
4728
+ const returnValue$6 = true;
4735
4729
 
4736
4730
  const ViewletE2eTestEvents = {
4737
4731
  __proto__: null,
4738
4732
  handleClickAt: handleClickAt$2,
4739
- handleContextMenu: handleContextMenu$8,
4733
+ handleContextMenu: handleContextMenu$7,
4740
4734
  handleLoad: handleLoad$3,
4741
4735
  handleSashCornerPointerDown,
4742
- returnValue: returnValue$7
4736
+ returnValue: returnValue$6
4743
4737
  };
4744
4738
 
4745
4739
  // TODO could use browser view when running in electron
@@ -4800,7 +4794,7 @@ const handleClickAt$1 = event => {
4800
4794
  const handleLoad$2 = event => {
4801
4795
  return ['handleLoad'];
4802
4796
  };
4803
- const handleContextMenu$7 = event => {
4797
+ const handleContextMenu$6 = event => {
4804
4798
  preventDefault(event);
4805
4799
  const {
4806
4800
  button,
@@ -4809,14 +4803,14 @@ const handleContextMenu$7 = event => {
4809
4803
  } = event;
4810
4804
  return ['handleContextMenu', button, clientX, clientY];
4811
4805
  };
4812
- const returnValue$6 = true;
4806
+ const returnValue$5 = true;
4813
4807
 
4814
4808
  const ViewletE2eTestsEvents = {
4815
4809
  __proto__: null,
4816
4810
  handleClickAt: handleClickAt$1,
4817
- handleContextMenu: handleContextMenu$7,
4811
+ handleContextMenu: handleContextMenu$6,
4818
4812
  handleLoad: handleLoad$2,
4819
- returnValue: returnValue$6
4813
+ returnValue: returnValue$5
4820
4814
  };
4821
4815
 
4822
4816
  const sendToIframe = (contentWindow, message, origin, transfer) => {
@@ -4911,10 +4905,10 @@ const appendWidget$5 = state => {
4911
4905
  } = state;
4912
4906
  append$1($Viewlet);
4913
4907
  };
4914
- const dispose$g = state => {
4908
+ const dispose$f = state => {
4915
4909
  remove$1(state.$Viewlet);
4916
4910
  };
4917
- const focus$f = (state, key, source) => {
4911
+ const focus$d = (state, key, source) => {
4918
4912
  if (!key) {
4919
4913
  return;
4920
4914
  }
@@ -4937,12 +4931,12 @@ const ViewletEditorCodeGenerator = {
4937
4931
  __proto__: null,
4938
4932
  Events: ViewletEditorCodeGeneratorEvents,
4939
4933
  appendWidget: appendWidget$5,
4940
- dispose: dispose$g,
4941
- focus: focus$f,
4934
+ dispose: dispose$f,
4935
+ focus: focus$d,
4942
4936
  setBounds: setBounds$9
4943
4937
  };
4944
4938
 
4945
- const attachEvents$a = ($Node, eventMap) => {
4939
+ const attachEvents$9 = ($Node, eventMap) => {
4946
4940
  for (const [key, value] of Object.entries(eventMap)) {
4947
4941
  $Node.addEventListener(key, value);
4948
4942
  }
@@ -4980,28 +4974,28 @@ const handleMousedown = event => {
4980
4974
  const uid = fromEvent(event);
4981
4975
  handleClickAt$3(uid, clientX, clientY);
4982
4976
  };
4983
- const handleScrollBarThumbPointerMove$1 = event => {
4977
+ const handleScrollBarThumbPointerMove = event => {
4984
4978
  const {
4985
4979
  clientY
4986
4980
  } = event;
4987
4981
  const uid = fromEvent(event);
4988
- handleScrollBarThumbPointerMove$2(uid, clientY);
4982
+ handleScrollBarThumbPointerMove$1(uid, clientY);
4989
4983
  };
4990
4984
  const handlePointerCaptureLost$2 = event => {
4991
4985
  const {
4992
4986
  target,
4993
4987
  pointerId
4994
4988
  } = event;
4995
- stopTracking(target, pointerId, handleScrollBarThumbPointerMove$1, handlePointerCaptureLost$2);
4989
+ stopTracking(target, pointerId, handleScrollBarThumbPointerMove, handlePointerCaptureLost$2);
4996
4990
  };
4997
- const handleScrollBarPointerDown$2 = event => {
4991
+ const handleScrollBarPointerDown$1 = event => {
4998
4992
  preventDefault(event);
4999
4993
  const {
5000
4994
  target,
5001
4995
  pointerId,
5002
4996
  clientY
5003
4997
  } = event;
5004
- startTracking(target, pointerId, handleScrollBarThumbPointerMove$1, handlePointerCaptureLost$2);
4998
+ startTracking(target, pointerId, handleScrollBarThumbPointerMove, handlePointerCaptureLost$2);
5005
4999
  const uid = fromEvent(event);
5006
5000
  handleScrollBarClick(uid, clientY);
5007
5001
  };
@@ -5061,7 +5055,7 @@ const setNegativeMargin = (state, negativeMargin) => {
5061
5055
  setTop($ListItems, negativeMargin);
5062
5056
  };
5063
5057
 
5064
- const create$s = () => {
5058
+ const create$r = () => {
5065
5059
  const $ListItems = document.createElement('div');
5066
5060
  $ListItems.className = 'ListItems';
5067
5061
  $ListItems.role = ListBox;
@@ -5085,18 +5079,18 @@ const create$s = () => {
5085
5079
  $ScrollBarThumb
5086
5080
  };
5087
5081
  };
5088
- const attachEvents$9 = state => {
5082
+ const attachEvents$8 = state => {
5089
5083
  const {
5090
5084
  $Viewlet,
5091
5085
  $ListItems,
5092
5086
  $ScrollBar
5093
5087
  } = state;
5094
5088
  $Viewlet.addEventListener(Wheel, handleWheel$2, Passive);
5095
- attachEvents$a($ListItems, {
5089
+ attachEvents$9($ListItems, {
5096
5090
  [MouseDown]: handleMousedown
5097
5091
  });
5098
- attachEvents$a($ScrollBar, {
5099
- [PointerDown]: handleScrollBarPointerDown$2
5092
+ attachEvents$9($ScrollBar, {
5093
+ [PointerDown]: handleScrollBarPointerDown$1
5100
5094
  });
5101
5095
  };
5102
5096
  // TODO show should be passed active cursor position
@@ -5114,7 +5108,7 @@ const setDom$8 = (state, dom) => {
5114
5108
  // TODO recycle nodes
5115
5109
  // TODO set right aria attributes on $EditorInput
5116
5110
  };
5117
- const dispose$f = state => {
5111
+ const dispose$e = state => {
5118
5112
  remove$1(state.$Viewlet);
5119
5113
  // state.$EditorInput.removeAttribute('aria-activedescendant')
5120
5114
  };
@@ -5128,7 +5122,7 @@ const showLoading = (state, x, y) => {
5128
5122
  $Viewlet.append($Loading);
5129
5123
  append$1($Viewlet);
5130
5124
  };
5131
- const handleError$7 = (state, error) => {
5125
+ const handleError$6 = (state, error) => {
5132
5126
  const {
5133
5127
  $Viewlet
5134
5128
  } = state;
@@ -5144,10 +5138,10 @@ const setBounds$8 = (state, x, y, width, height) => {
5144
5138
 
5145
5139
  const ViewletEditorCompletion = {
5146
5140
  __proto__: null,
5147
- attachEvents: attachEvents$9,
5148
- create: create$s,
5149
- dispose: dispose$f,
5150
- handleError: handleError$7,
5141
+ attachEvents: attachEvents$8,
5142
+ create: create$r,
5143
+ dispose: dispose$e,
5144
+ handleError: handleError$6,
5151
5145
  setBounds: setBounds$8,
5152
5146
  setContentHeight,
5153
5147
  setDom: setDom$8,
@@ -5160,15 +5154,15 @@ const ViewletEditorCompletion = {
5160
5154
  const handleClose = () => {
5161
5155
  return ['closeDetails'];
5162
5156
  };
5163
- const returnValue$5 = true;
5157
+ const returnValue$4 = true;
5164
5158
 
5165
5159
  const ViewletEditorCompletionDetailsEvents = {
5166
5160
  __proto__: null,
5167
5161
  handleClose,
5168
- returnValue: returnValue$5
5162
+ returnValue: returnValue$4
5169
5163
  };
5170
5164
 
5171
- const create$r = () => {
5165
+ const create$q = () => {
5172
5166
  const $Viewlet = document.createElement('div');
5173
5167
  $Viewlet.className = 'Viewlet EditorCompletionDetails';
5174
5168
  $Viewlet.id = 'CompletionsDetails';
@@ -5176,7 +5170,7 @@ const create$r = () => {
5176
5170
  $Viewlet
5177
5171
  };
5178
5172
  };
5179
- const attachEvents$8 = state => {
5173
+ const attachEvents$7 = state => {
5180
5174
  // TODO
5181
5175
  };
5182
5176
  const setDom$7 = (state, dom) => {
@@ -5194,7 +5188,7 @@ const appendWidget$4 = state => {
5194
5188
  } = state;
5195
5189
  append$1($Viewlet);
5196
5190
  };
5197
- const dispose$e = state => {
5191
+ const dispose$d = state => {
5198
5192
  remove$1(state.$Viewlet);
5199
5193
  };
5200
5194
  const setBounds$7 = (state, x, y, width, height) => {
@@ -5208,9 +5202,9 @@ const ViewletEditorCompletionDetails = {
5208
5202
  __proto__: null,
5209
5203
  Events: ViewletEditorCompletionDetailsEvents,
5210
5204
  appendWidget: appendWidget$4,
5211
- attachEvents: attachEvents$8,
5212
- create: create$r,
5213
- dispose: dispose$e,
5205
+ attachEvents: attachEvents$7,
5206
+ create: create$q,
5207
+ dispose: dispose$d,
5214
5208
  setBounds: setBounds$7,
5215
5209
  setDom: setDom$7
5216
5210
  };
@@ -5228,7 +5222,7 @@ const ViewletEditorCompletionDetails = {
5228
5222
 
5229
5223
  // TODO aria alert
5230
5224
 
5231
- const create$q = () => {
5225
+ const create$p = () => {
5232
5226
  const $Viewlet = document.createElement('div');
5233
5227
  $Viewlet.className = 'Viewlet EditorError';
5234
5228
  return {
@@ -5250,13 +5244,13 @@ const setBounds$6 = (state, x, y, width, height) => {
5250
5244
 
5251
5245
  const ViewletEditorError = {
5252
5246
  __proto__: null,
5253
- create: create$q,
5247
+ create: create$p,
5254
5248
  setBounds: setBounds$6,
5255
5249
  setDom: setDom$6
5256
5250
  };
5257
5251
 
5258
- const returnValue$4 = true;
5259
- const handleSashPointerDown$2 = create$w(event => {
5252
+ const returnValue$3 = true;
5253
+ const handleSashPointerDown$2 = create$v(event => {
5260
5254
  const {
5261
5255
  clientX,
5262
5256
  clientY
@@ -5279,7 +5273,7 @@ const handleSashPointerDown$2 = create$w(event => {
5279
5273
  const ViewletEditorHoverEvents = {
5280
5274
  __proto__: null,
5281
5275
  handleSashPointerDown: handleSashPointerDown$2,
5282
- returnValue: returnValue$4
5276
+ returnValue: returnValue$3
5283
5277
  };
5284
5278
 
5285
5279
  const setBounds$5 = (state, x, y, width, height) => {
@@ -5353,7 +5347,7 @@ const handlePointerCaptureLost$1 = event => {
5353
5347
  /**
5354
5348
  * @param {PointerEvent} event
5355
5349
  */
5356
- const handlePointerDown$3 = event => {
5350
+ const handlePointerDown$1 = event => {
5357
5351
  const {
5358
5352
  pointerId,
5359
5353
  clientX,
@@ -5369,7 +5363,7 @@ const handlePointerDown$3 = event => {
5369
5363
  target.addEventListener(PointerUp, handlePointerUp);
5370
5364
  target.addEventListener(LostPointerCapture, handlePointerCaptureLost$1);
5371
5365
  const uid = fromEvent(event);
5372
- handlePointerDown$5(uid, pointerId, clientX, clientY);
5366
+ handlePointerDown$3(uid, pointerId, clientX, clientY);
5373
5367
  };
5374
5368
 
5375
5369
  /**
@@ -5390,7 +5384,7 @@ const handleWheel$1 = event => {
5390
5384
  *
5391
5385
  * @param {MouseEvent} event
5392
5386
  */
5393
- const handleContextMenu$6 = event => {
5387
+ const handleContextMenu$5 = event => {
5394
5388
  preventDefault(event);
5395
5389
  const {
5396
5390
  button,
@@ -5398,35 +5392,35 @@ const handleContextMenu$6 = event => {
5398
5392
  clientY
5399
5393
  } = event;
5400
5394
  const uid = fromEvent(event);
5401
- handleContextMenu$9(uid, button, clientX, clientY);
5395
+ handleContextMenu$8(uid, button, clientX, clientY);
5402
5396
  };
5403
- const handleError$6 = event => {
5397
+ const handleError$5 = event => {
5404
5398
  const uid = fromEvent(event);
5405
5399
  handleImageError(uid);
5406
5400
  };
5407
- const handleFocus$7 = event => {
5401
+ const handleFocus$6 = event => {
5408
5402
  const uid = fromEvent(event);
5409
- handleFocus$9(uid);
5403
+ handleFocus$8(uid);
5410
5404
  };
5411
5405
 
5412
- const create$p = () => {
5406
+ const create$o = () => {
5413
5407
  const $Viewlet = document.createElement('div');
5414
5408
  $Viewlet.className = 'Viewlet EditorImage';
5415
5409
  return {
5416
5410
  $Viewlet
5417
5411
  };
5418
5412
  };
5419
- const attachEvents$7 = state => {
5413
+ const attachEvents$6 = state => {
5420
5414
  const {
5421
5415
  $Viewlet
5422
5416
  } = state;
5423
- attachEvents$a($Viewlet, {
5424
- [PointerDown]: handlePointerDown$3,
5417
+ attachEvents$9($Viewlet, {
5418
+ [PointerDown]: handlePointerDown$1,
5425
5419
  [PointerUp]: handlePointerUp,
5426
- [ContextMenu]: handleContextMenu$6,
5427
- [FocusIn]: handleFocus$7
5420
+ [ContextMenu]: handleContextMenu$5,
5421
+ [FocusIn]: handleFocus$6
5428
5422
  });
5429
- $Viewlet.addEventListener(Error$2, handleError$6, Capture);
5423
+ $Viewlet.addEventListener(Error$2, handleError$5, Capture);
5430
5424
  $Viewlet.addEventListener(Wheel, handleWheel$1, Passive);
5431
5425
  };
5432
5426
  const setTransform = (state, transform) => {
@@ -5451,14 +5445,14 @@ const setDom$4 = (state, dom) => {
5451
5445
 
5452
5446
  const ViewletEditorImage = {
5453
5447
  __proto__: null,
5454
- attachEvents: attachEvents$7,
5455
- create: create$p,
5448
+ attachEvents: attachEvents$6,
5449
+ create: create$o,
5456
5450
  setDom: setDom$4,
5457
5451
  setDragging,
5458
5452
  setTransform
5459
5453
  };
5460
5454
 
5461
- const create$o = () => {
5455
+ const create$n = () => {
5462
5456
  const $Viewlet = document.createElement('div');
5463
5457
  $Viewlet.className = 'Viewlet EditorText';
5464
5458
  $Viewlet.textContent = 'loading...';
@@ -5466,7 +5460,7 @@ const create$o = () => {
5466
5460
  $Viewlet
5467
5461
  };
5468
5462
  };
5469
- const dispose$d = state => {};
5463
+ const dispose$c = state => {};
5470
5464
  const refresh$3 = (state, context) => {
5471
5465
  object(state);
5472
5466
  string(context.content);
@@ -5475,8 +5469,8 @@ const refresh$3 = (state, context) => {
5475
5469
 
5476
5470
  const ViewletEditorPlainText = {
5477
5471
  __proto__: null,
5478
- create: create$o,
5479
- dispose: dispose$d,
5472
+ create: create$n,
5473
+ dispose: dispose$c,
5480
5474
  refresh: refresh$3
5481
5475
  };
5482
5476
 
@@ -5504,7 +5498,7 @@ const appendWidget$2 = state => {
5504
5498
  } = state;
5505
5499
  append$1($Viewlet);
5506
5500
  };
5507
- const dispose$c = state => {
5501
+ const dispose$b = state => {
5508
5502
  remove$1(state.$Viewlet);
5509
5503
  };
5510
5504
 
@@ -5512,7 +5506,7 @@ const ViewletEditorSourceActions = {
5512
5506
  __proto__: null,
5513
5507
  Events: ViewletEditorSourceActionsEvents,
5514
5508
  appendWidget: appendWidget$2,
5515
- dispose: dispose$c,
5509
+ dispose: dispose$b,
5516
5510
  setBounds: setBounds$4
5517
5511
  };
5518
5512
 
@@ -5599,29 +5593,6 @@ const getModifierKey = event => {
5599
5593
  return None;
5600
5594
  };
5601
5595
 
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
5596
  // TODO so many things in this file
5626
5597
 
5627
5598
 
@@ -5629,7 +5600,7 @@ const toSimpleTouchEvent = event => {
5629
5600
 
5630
5601
  // TODO tree shake out mobile support when targeting electron -> less code -> less event listeners -> less memory -> less cpu
5631
5602
 
5632
- const handleFocus$6 = event => {
5603
+ const handleFocus$5 = event => {
5633
5604
  return ['handleFocus'];
5634
5605
  };
5635
5606
  const handleMouseMove = event => {
@@ -5769,7 +5740,7 @@ const handlePaste = event => {
5769
5740
  const text = getText(clipboardData);
5770
5741
  return ['paste', text];
5771
5742
  };
5772
- const handleScrollBarVerticalPointerDown = create$w(event => {
5743
+ const handleScrollBarVerticalPointerDown = create$v(event => {
5773
5744
  const {
5774
5745
  clientY
5775
5746
  } = event;
@@ -5824,7 +5795,7 @@ const handleScrollBarContextMenu = event => {
5824
5795
  preventDefault(event);
5825
5796
  stopPropagation(event);
5826
5797
  };
5827
- const handleContextMenu$5 = event => {
5798
+ const handleContextMenu$4 = event => {
5828
5799
  preventDefault(event);
5829
5800
  const {
5830
5801
  button,
@@ -5892,7 +5863,7 @@ const setLineInfos = (state, dom) => {
5892
5863
  // 1. create -> only create dom elements
5893
5864
  // 2. render -> fill elements with attributes and data
5894
5865
  // that way all dom nodes can be recycled
5895
- const create$n = () => {
5866
+ const create$m = () => {
5896
5867
  const $EditorInput = document.createElement('textarea');
5897
5868
  $EditorInput.className = 'EditorInput';
5898
5869
  $EditorInput.ariaAutoComplete = List;
@@ -5910,7 +5881,7 @@ const create$n = () => {
5910
5881
  [CompositionStart]: handleCompositionStart,
5911
5882
  [CompositionUpdate]: handleCompositionUpdate,
5912
5883
  [CompositionEnd]: handleCompositionEnd,
5913
- [Focus]: handleFocus$6,
5884
+ [Focus]: handleFocus$5,
5914
5885
  [Blur]: handleBlur$5,
5915
5886
  [Cut]: handleCut,
5916
5887
  [Paste]: handlePaste,
@@ -5980,7 +5951,7 @@ const create$n = () => {
5980
5951
  $Editor.role = Code;
5981
5952
  $Editor.append($LayerGutter, $EditorContent);
5982
5953
  attachEventsFunctional($Editor, {
5983
- [ContextMenu]: handleContextMenu$5,
5954
+ [ContextMenu]: handleContextMenu$4,
5984
5955
  [Wheel]: handleWheel,
5985
5956
  returnValue: true
5986
5957
  });
@@ -6059,11 +6030,11 @@ const setDecorationsDom$1 = (state, decorations) => {
6059
6030
  setDecorationsDom$2(state, decorations);
6060
6031
  };
6061
6032
 
6062
- const create$m = create$n;
6033
+ const create$l = create$m;
6063
6034
  const setText$1 = setText$2;
6064
6035
  const setSelections = setSelections$1;
6065
6036
  const setIncrementalEdits = setIncrementalEdits$1;
6066
- const handleError$5 = (state, error) => {
6037
+ const handleError$4 = (state, error) => {
6067
6038
  state.$Viewlet.textContent = error;
6068
6039
  };
6069
6040
  const setScrollBar = setScrollBar$1;
@@ -6096,14 +6067,14 @@ const hideOverlayMessage = state => {
6096
6067
  }
6097
6068
  };
6098
6069
  const setFocused$1 = setFocused$2;
6099
- const focus$e = setFocused$2;
6070
+ const focus$c = setFocused$2;
6100
6071
  const setDecorationsDom = setDecorationsDom$1;
6101
6072
 
6102
6073
  const ViewletEditorText = {
6103
6074
  __proto__: null,
6104
- create: create$m,
6105
- focus: focus$e,
6106
- handleError: handleError$5,
6075
+ create: create$l,
6076
+ focus: focus$c,
6077
+ handleError: handleError$4,
6107
6078
  hideOverlayMessage,
6108
6079
  highlightAsLink,
6109
6080
  renderGutter,
@@ -6117,14 +6088,14 @@ const ViewletEditorText = {
6117
6088
  showOverlayMessage
6118
6089
  };
6119
6090
 
6120
- const create$l = () => {
6091
+ const create$k = () => {
6121
6092
  const $Viewlet = document.createElement('div');
6122
6093
  $Viewlet.className = 'Viewlet EditorTextError';
6123
6094
  return {
6124
6095
  $Viewlet
6125
6096
  };
6126
6097
  };
6127
- const setMessage$4 = (state, message) => {
6098
+ const setMessage$3 = (state, message) => {
6128
6099
  const {
6129
6100
  $Viewlet
6130
6101
  } = state;
@@ -6133,18 +6104,18 @@ const setMessage$4 = (state, message) => {
6133
6104
 
6134
6105
  const ViewletEditorTextError = {
6135
6106
  __proto__: null,
6136
- create: create$l,
6137
- setMessage: setMessage$4
6107
+ create: create$k,
6108
+ setMessage: setMessage$3
6138
6109
  };
6139
6110
 
6140
- const create$k = () => {
6111
+ const create$j = () => {
6141
6112
  const $Viewlet = document.createElement('div');
6142
6113
  $Viewlet.className = 'Viewlet EditorWidgetError EditorOverlayMessage';
6143
6114
  return {
6144
6115
  $Viewlet
6145
6116
  };
6146
6117
  };
6147
- const setMessage$3 = (state, message) => {
6118
+ const setMessage$2 = (state, message) => {
6148
6119
  const {
6149
6120
  $Viewlet
6150
6121
  } = state;
@@ -6160,12 +6131,12 @@ const setBounds$3 = (state, x, y, width, height) => {
6160
6131
 
6161
6132
  const ViewletEditorWidgetError = {
6162
6133
  __proto__: null,
6163
- create: create$k,
6134
+ create: create$j,
6164
6135
  setBounds: setBounds$3,
6165
- setMessage: setMessage$3
6136
+ setMessage: setMessage$2
6166
6137
  };
6167
6138
 
6168
- const create$j = () => {
6139
+ const create$i = () => {
6169
6140
  const $Viewlet = document.createElement('div');
6170
6141
  $Viewlet.dataset.viewlet = 'Empty';
6171
6142
  $Viewlet.className = 'Viewlet';
@@ -6174,18 +6145,18 @@ const create$j = () => {
6174
6145
  };
6175
6146
  };
6176
6147
  const refresh$2 = (state, context) => {};
6177
- const focus$d = state => {};
6178
- const dispose$b = state => {};
6148
+ const focus$b = state => {};
6149
+ const dispose$a = state => {};
6179
6150
 
6180
6151
  const ViewletEmpty = {
6181
6152
  __proto__: null,
6182
- create: create$j,
6183
- dispose: dispose$b,
6184
- focus: focus$d,
6153
+ create: create$i,
6154
+ dispose: dispose$a,
6155
+ focus: focus$b,
6185
6156
  refresh: refresh$2
6186
6157
  };
6187
6158
 
6188
- const create$i = () => {
6159
+ const create$h = () => {
6189
6160
  const $Viewlet = document.createElement('div');
6190
6161
  $Viewlet.className = 'Viewlet EmptyEditor';
6191
6162
  return {
@@ -6195,17 +6166,17 @@ const create$i = () => {
6195
6166
 
6196
6167
  const ViewletEmptyEditor = {
6197
6168
  __proto__: null,
6198
- create: create$i
6169
+ create: create$h
6199
6170
  };
6200
6171
 
6201
- const create$h = () => {
6172
+ const create$g = () => {
6202
6173
  const $Viewlet = document.createElement('div');
6203
6174
  $Viewlet.className = 'Viewlet Error';
6204
6175
  return {
6205
6176
  $Viewlet
6206
6177
  };
6207
6178
  };
6208
- const setMessage$2 = (state, message) => {
6179
+ const setMessage$1 = (state, message) => {
6209
6180
  const {
6210
6181
  $Viewlet
6211
6182
  } = state;
@@ -6214,277 +6185,8 @@ const setMessage$2 = (state, message) => {
6214
6185
 
6215
6186
  const ViewletError = {
6216
6187
  __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
6188
  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
6189
+ setMessage: setMessage$1
6488
6190
  };
6489
6191
 
6490
6192
  const handleInput$4 = event => {
@@ -6553,7 +6255,7 @@ const handleFocusClose = event => {
6553
6255
  const handleFocusReplaceAll = event => {
6554
6256
  return ['FindWidget.handleFocusReplaceAll'];
6555
6257
  };
6556
- const returnValue$3 = true;
6258
+ const returnValue$2 = true;
6557
6259
 
6558
6260
  const ViewletFindWidgetEvents = {
6559
6261
  __proto__: null,
@@ -6573,7 +6275,7 @@ const ViewletFindWidgetEvents = {
6573
6275
  handleReplaceFocus,
6574
6276
  handleReplaceInput,
6575
6277
  handleToggleReplaceFocus,
6576
- returnValue: returnValue$3
6278
+ returnValue: returnValue$2
6577
6279
  };
6578
6280
 
6579
6281
  const create$f = () => {
@@ -6584,7 +6286,7 @@ const create$f = () => {
6584
6286
  $Viewlet
6585
6287
  };
6586
6288
  };
6587
- const focus$b = (state, key, source) => {
6289
+ const focus$a = (state, key, source) => {
6588
6290
  if (!key) {
6589
6291
  return;
6590
6292
  }
@@ -6641,7 +6343,7 @@ const ViewletFindWidget = {
6641
6343
  appendWidget: appendWidget$1,
6642
6344
  create: create$f,
6643
6345
  dispose: dispose$9,
6644
- focus: focus$b,
6346
+ focus: focus$a,
6645
6347
  setBounds: setBounds$2,
6646
6348
  setDom: setDom$3,
6647
6349
  setValue: setValue$1
@@ -6665,7 +6367,7 @@ const ViewletLocationsEvents = {
6665
6367
  handleLocationsMouseDown
6666
6368
  };
6667
6369
 
6668
- const setFocusedIndex$2 = (state, oldFocusedIndex, newFocusedIndex) => {
6370
+ const setFocusedIndex$1 = (state, oldFocusedIndex, newFocusedIndex) => {
6669
6371
  const {
6670
6372
  $Viewlet
6671
6373
  } = state;
@@ -6688,7 +6390,7 @@ const handleError$3 = (state, message) => {
6688
6390
  } = state;
6689
6391
  $Message.textContent = message;
6690
6392
  };
6691
- const focus$a = state => {
6393
+ const focus$9 = state => {
6692
6394
  const {
6693
6395
  $Locations
6694
6396
  } = state;
@@ -6700,9 +6402,9 @@ const focus$a = state => {
6700
6402
  const ViewletImplementations = {
6701
6403
  __proto__: null,
6702
6404
  Events: ViewletLocationsEvents,
6703
- focus: focus$a,
6405
+ focus: focus$9,
6704
6406
  handleError: handleError$3,
6705
- setFocusedIndex: setFocusedIndex$2
6407
+ setFocusedIndex: setFocusedIndex$1
6706
6408
  };
6707
6409
 
6708
6410
  const handleScrollBarPointerDown = event => {
@@ -6759,7 +6461,7 @@ const getPointerDownFunction = event => {
6759
6461
  return undefined;
6760
6462
  }
6761
6463
  };
6762
- const handlePointerDown$1 = event => {
6464
+ const handlePointerDown = event => {
6763
6465
  const pointerDownFunction = getPointerDownFunction(event);
6764
6466
  if (!pointerDownFunction) {
6765
6467
  return;
@@ -6769,7 +6471,7 @@ const handlePointerDown$1 = event => {
6769
6471
 
6770
6472
  const ViewletkeyBindingsEvents = {
6771
6473
  __proto__: null,
6772
- handlePointerDown: handlePointerDown$1,
6474
+ handlePointerDown,
6773
6475
  handleResizerPointerDown,
6774
6476
  handleResizerPointerMove,
6775
6477
  handleResizerPointerUp
@@ -7320,15 +7022,15 @@ const attachEvents$5 = state => {
7320
7022
  $SashSideBar,
7321
7023
  $SashPanel
7322
7024
  } = state;
7323
- attachEvents$a($SashSideBar, {
7025
+ attachEvents$9($SashSideBar, {
7324
7026
  [PointerDown]: handleSashPointerDown,
7325
7027
  [DoubleClick]: handleSashDoubleClick
7326
7028
  });
7327
- attachEvents$a($SashPanel, {
7029
+ attachEvents$9($SashPanel, {
7328
7030
  [PointerDown]: handleSashPointerDown,
7329
7031
  [DoubleClick]: handleSashDoubleClick
7330
7032
  });
7331
- attachEvents$a(window, {
7033
+ attachEvents$9(window, {
7332
7034
  [Resize]: handleResize,
7333
7035
  [Focus]: handleFocus$2,
7334
7036
  [Blur]: handleBlur$3,
@@ -7441,7 +7143,7 @@ const handleContextMenu$3 = event => {
7441
7143
  clientY
7442
7144
  } = event;
7443
7145
  const uid = fromEvent(event);
7444
- handleContextMenu$9(uid, clientX, clientY);
7146
+ handleContextMenu$8(uid, clientX, clientY);
7445
7147
  };
7446
7148
 
7447
7149
  // TODO Main should not be bound to Editor -> Lazy load Editor
@@ -7470,7 +7172,7 @@ const attachEvents$4 = state => {
7470
7172
  const {
7471
7173
  $Viewlet
7472
7174
  } = state;
7473
- attachEvents$a($Viewlet, {
7175
+ attachEvents$9($Viewlet, {
7474
7176
  [Drop]: handleDrop$1,
7475
7177
  [DragOver]: handleDragOver$1,
7476
7178
  [DragEnd]: handleDragEnd,
@@ -7500,7 +7202,7 @@ const closeViewletAndTab = (state, index) => {
7500
7202
  state.$MainTabs.remove();
7501
7203
  state.$MainTabs = undefined;
7502
7204
  };
7503
- const focus$9 = () => {};
7205
+ const focus$8 = () => {};
7504
7206
  const highlightDragOver = state => {
7505
7207
  const {
7506
7208
  $MainTabs
@@ -7547,7 +7249,7 @@ const ViewletMain = {
7547
7249
  closeViewletAndTab,
7548
7250
  create: create$d,
7549
7251
  dispose: dispose$8,
7550
- focus: focus$9,
7252
+ focus: focus$8,
7551
7253
  highlightDragOver,
7552
7254
  openEditor,
7553
7255
  replaceEditor,
@@ -7636,7 +7338,7 @@ const attachEvents$3 = state => {
7636
7338
  const {
7637
7339
  $MainTabs
7638
7340
  } = state;
7639
- attachEvents$a($MainTabs, {
7341
+ attachEvents$9($MainTabs, {
7640
7342
  [ContextMenu]: handleTabsContextMenu,
7641
7343
  [DragOver]: handleDragOver,
7642
7344
  [DragStart]: handleDragStart,
@@ -7695,7 +7397,6 @@ const EditorText = 'Editor';
7695
7397
  const EditorWidgetError = 'EditorWidgetError';
7696
7398
  const Empty = 'Empty';
7697
7399
  const Error$1 = 'Error';
7698
- const Extensions = 'Extensions';
7699
7400
  const FindWidget = 'FindWidget';
7700
7401
  const ImagePreview = 'ImagePreview';
7701
7402
  const InlineDiffEditor = 'InlineDiffEditor';
@@ -7706,7 +7407,6 @@ const Main = 'Main';
7706
7407
  const MainTabs = 'MainTabs';
7707
7408
  const Output = 'Output';
7708
7409
  const Panel = 'Panel';
7709
- const Problems = 'Problems';
7710
7410
  const References = 'References';
7711
7411
  const RunAndDebug = 'Run And Debug';
7712
7412
  const ScreenCapture = 'ScreenCapture';
@@ -7764,9 +7464,9 @@ const handleError$2 = (state, error) => {
7764
7464
  string(error);
7765
7465
  state.content.textContent = error;
7766
7466
  };
7767
- const focus$8 = state => {
7467
+ const focus$7 = state => {
7768
7468
  object(state);
7769
- focus$h(state.$ViewletOutputContent);
7469
+ focus$f(state.$ViewletOutputContent);
7770
7470
  send('Focus.setFocus', FocusOutput);
7771
7471
  };
7772
7472
 
@@ -7787,7 +7487,7 @@ const ViewletOutput = {
7787
7487
  create: create$b,
7788
7488
  dispose: dispose$7,
7789
7489
  disposeFindWidget,
7790
- focus: focus$8,
7490
+ focus: focus$7,
7791
7491
  handleError: handleError$2,
7792
7492
  openFindWidget,
7793
7493
  setText
@@ -7889,13 +7589,13 @@ const attachEvents$2 = state => {
7889
7589
  $ButtonClose,
7890
7590
  $PanelHeader
7891
7591
  } = state;
7892
- attachEvents$a($PanelHeader, {
7592
+ attachEvents$9($PanelHeader, {
7893
7593
  [Click]: handleHeaderClick$1
7894
7594
  });
7895
- attachEvents$a($ButtonMaximize, {
7595
+ attachEvents$9($ButtonMaximize, {
7896
7596
  [Click]: handleClickMaximize
7897
7597
  });
7898
- attachEvents$a($ButtonClose, {
7598
+ attachEvents$9($ButtonClose, {
7899
7599
  [Click]: handleClickClose
7900
7600
  });
7901
7601
  };
@@ -7907,7 +7607,7 @@ const setTabsDom$1 = (state, dom) => {
7907
7607
  };
7908
7608
 
7909
7609
  // TODO add test for focus method
7910
- const focus$7 = state => {
7610
+ const focus$6 = state => {
7911
7611
  object(state);
7912
7612
  if (!state.currentViewlet) {
7913
7613
  return;
@@ -7961,81 +7661,18 @@ const ViewletPanel = {
7961
7661
  attachEvents: attachEvents$2,
7962
7662
  create: create$a,
7963
7663
  dispose: dispose$6,
7964
- focus: focus$7,
7664
+ focus: focus$6,
7965
7665
  setActionsDom: setActionsDom$1,
7966
7666
  setSelectedIndex,
7967
7667
  setTabsDom: setTabsDom$1
7968
7668
  };
7969
7669
 
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
7670
  const ViewletReferences = {
8034
7671
  __proto__: null,
8035
7672
  Events: ViewletLocationsEvents,
8036
- focus: focus$a,
7673
+ focus: focus$9,
8037
7674
  handleError: handleError$3,
8038
- setFocusedIndex: setFocusedIndex$2
7675
+ setFocusedIndex: setFocusedIndex$1
8039
7676
  };
8040
7677
 
8041
7678
  const ViewletRunAndDebug = {
@@ -8115,7 +7752,7 @@ const attachEvents$1 = state => {
8115
7752
  const {
8116
7753
  $SideBarTitleArea
8117
7754
  } = state;
8118
- attachEvents$a($SideBarTitleArea, {
7755
+ attachEvents$9($SideBarTitleArea, {
8119
7756
  [Click]: handleHeaderClick
8120
7757
  });
8121
7758
  };
@@ -8242,9 +7879,20 @@ const ViewletSimpleBrowser = {
8242
7879
  Events: ViewletSimpleBrowserEvents
8243
7880
  };
8244
7881
 
7882
+ const handleContextMenu$2 = event => {
7883
+ preventDefault(event);
7884
+ const {
7885
+ button,
7886
+ clientX,
7887
+ clientY
7888
+ } = event;
7889
+ const uid = fromEvent(event);
7890
+ handleContextMenu$8(uid, button, clientX, clientY);
7891
+ };
7892
+
8245
7893
  const handleFocus = event => {
8246
7894
  const uid = fromEvent(event);
8247
- handleFocus$9(uid);
7895
+ handleFocus$8(uid);
8248
7896
  };
8249
7897
  const getButtonIndex = $Node => {
8250
7898
  let index = -1;
@@ -8314,13 +7962,13 @@ const handleInput$1 = event => {
8314
7962
  value
8315
7963
  } = target;
8316
7964
  const uid = fromEvent(event);
8317
- handleInput$7(uid, value);
7965
+ handleInput$6(uid, value);
8318
7966
  };
8319
7967
 
8320
7968
  const ViewletSourceControlEvents = {
8321
7969
  __proto__: null,
8322
7970
  handleClick: handleClick$3,
8323
- handleContextMenu: handleContextMenu$4,
7971
+ handleContextMenu: handleContextMenu$2,
8324
7972
  handleFocus,
8325
7973
  handleInput: handleInput$1,
8326
7974
  handleMouseOut,
@@ -8473,7 +8121,7 @@ const attachEvents = state => {
8473
8121
  const {
8474
8122
  $Viewlet
8475
8123
  } = state;
8476
- attachEvents$a($Viewlet, {
8124
+ attachEvents$9($Viewlet, {
8477
8125
  [ContextMenu]: handleContextMenu$1
8478
8126
  });
8479
8127
  };
@@ -8608,7 +8256,7 @@ const handleMenuClick = event => {
8608
8256
  };
8609
8257
  const handleFocusIn$1 = event => {
8610
8258
  const uid = fromEvent(event);
8611
- handleFocus$9(uid);
8259
+ handleFocus$8(uid);
8612
8260
  };
8613
8261
 
8614
8262
  const ViewletTitleBarMenuBarEvents = {
@@ -9071,8 +8719,6 @@ const load$1 = moduleId => {
9071
8719
  return ViewletEmpty;
9072
8720
  case Error$1:
9073
8721
  return ViewletError;
9074
- case Extensions:
9075
- return ViewletExtensions;
9076
8722
  case FindWidget:
9077
8723
  return ViewletFindWidget;
9078
8724
  case Implementations:
@@ -9089,8 +8735,6 @@ const load$1 = moduleId => {
9089
8735
  return ViewletOutput;
9090
8736
  case Panel:
9091
8737
  return ViewletPanel;
9092
- case Problems:
9093
- return ViewletProblems;
9094
8738
  case References:
9095
8739
  return ViewletReferences;
9096
8740
  case RunAndDebug:
@@ -9945,7 +9589,7 @@ const commandMap = {
9945
9589
  'GetFilePathElectron.getFilePathElectron': getFilePathElectron,
9946
9590
  'HandleMessagePort.handleMessagePort': handleMessagePort,
9947
9591
  'InitData.getInitData': getInitData,
9948
- 'IpcParent.create': create$B,
9592
+ 'IpcParent.create': create$A,
9949
9593
  'KeyBindings.setIdentifiers': setIdentifiers,
9950
9594
  'Layout.getBounds': getBounds,
9951
9595
  'Location.getHref': getHref,
@@ -9960,10 +9604,10 @@ const commandMap = {
9960
9604
  'Menu.showControlled': showControlled,
9961
9605
  'Menu.showMenu': showMenu,
9962
9606
  'Meta.setThemeColor': setThemeColor,
9963
- 'Notification.create': create$A,
9607
+ 'Notification.create': create$z,
9964
9608
  'Notification.createWithOptions': createWithOptions,
9965
- 'Notification.dispose': dispose$j,
9966
- 'OffscreenCanvas.create': create$z,
9609
+ 'Notification.dispose': dispose$i,
9610
+ 'OffscreenCanvas.create': create$y,
9967
9611
  'Open.openUrl': openUrl,
9968
9612
  'Performance.getMemory': getMemory,
9969
9613
  'Performance.measureUserAgentSpecificMemory': measureUserAgentSpecificMemory,
@@ -10039,7 +9683,7 @@ const getConfiguredEditorWorkerUrl = () => {
10039
9683
  const editorWorkerUrl = getConfiguredEditorWorkerUrl() || `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/editor-worker/dist/editorWorkerMain.js`;
10040
9684
 
10041
9685
  const launchEditorWorker = async port => {
10042
- const ipc = await create$B({
9686
+ const ipc = await create$A({
10043
9687
  name: 'Editor Worker',
10044
9688
  url: editorWorkerUrl,
10045
9689
  method: ModuleWorkerWithMessagePort,
@@ -10067,7 +9711,7 @@ const extensionHostWorkerUrl = getConfiguredExtensionHostWorkerUrl() || `${asset
10067
9711
 
10068
9712
  const launchExtensionHostWorker = async port => {
10069
9713
  const name = isElectron ? 'Extension Host (Electron)' : 'Extension Host';
10070
- const ipc = await create$B({
9714
+ const ipc = await create$A({
10071
9715
  name,
10072
9716
  url: extensionHostWorkerUrl,
10073
9717
  method: ModuleWorkerWithMessagePort,
@@ -10091,7 +9735,7 @@ const hydrate$1 = async () => {
10091
9735
  const syntaxHighlightingWorkerUrl = `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/syntax-highlighting-worker/dist/syntaxHighlightingWorkerMain.js`;
10092
9736
 
10093
9737
  const launchSyntaxHighlightingWorker = async port => {
10094
- const ipc = await create$B({
9738
+ const ipc = await create$A({
10095
9739
  name: 'Syntax Highlighting Worker',
10096
9740
  url: syntaxHighlightingWorkerUrl,
10097
9741
  method: ModuleWorkerWithMessagePort,