@lvce-editor/renderer-process 30.72.1 → 30.73.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.
@@ -932,7 +932,7 @@ const getErrorResponse = (id, error, preparePrettyError, logError) => {
932
932
  const errorProperty = getErrorProperty(error, prettyError);
933
933
  return create$1$1(id, errorProperty);
934
934
  };
935
- const create$J = (message, result) => {
935
+ const create$I = (message, result) => {
936
936
  return {
937
937
  id: message.id,
938
938
  jsonrpc: Two$1,
@@ -941,7 +941,7 @@ const create$J = (message, result) => {
941
941
  };
942
942
  const getSuccessResponse = (message, result) => {
943
943
  const resultProperty = result ?? null;
944
- return create$J(message, resultProperty);
944
+ return create$I(message, resultProperty);
945
945
  };
946
946
  const getErrorResponseSimple = (id, error) => {
947
947
  return {
@@ -1040,7 +1040,7 @@ const handleJsonRpcMessage = async (...args) => {
1040
1040
 
1041
1041
  const Two = '2.0';
1042
1042
 
1043
- const create$I = (method, params) => {
1043
+ const create$H = (method, params) => {
1044
1044
  return {
1045
1045
  jsonrpc: Two,
1046
1046
  method,
@@ -1048,7 +1048,7 @@ const create$I = (method, params) => {
1048
1048
  };
1049
1049
  };
1050
1050
 
1051
- const create$H = (id, method, params) => {
1051
+ const create$G = (id, method, params) => {
1052
1052
  const message = {
1053
1053
  id,
1054
1054
  jsonrpc: Two,
@@ -1059,12 +1059,12 @@ const create$H = (id, method, params) => {
1059
1059
  };
1060
1060
 
1061
1061
  let id = 0;
1062
- const create$G = () => {
1062
+ const create$F = () => {
1063
1063
  return ++id;
1064
1064
  };
1065
1065
 
1066
1066
  const registerPromise = map => {
1067
- const id = create$G();
1067
+ const id = create$F();
1068
1068
  const {
1069
1069
  promise,
1070
1070
  resolve
@@ -1081,7 +1081,7 @@ const invokeHelper = async (callbacks, ipc, method, params, useSendAndTransfer)
1081
1081
  id,
1082
1082
  promise
1083
1083
  } = registerPromise(callbacks);
1084
- const message = create$H(id, method, params);
1084
+ const message = create$G(id, method, params);
1085
1085
  if (useSendAndTransfer && ipc.sendAndTransfer) {
1086
1086
  ipc.sendAndTransfer(message);
1087
1087
  } else {
@@ -1117,7 +1117,7 @@ const createRpc = ipc => {
1117
1117
  * @deprecated
1118
1118
  */
1119
1119
  send(method, ...params) {
1120
- const message = create$I(method, params);
1120
+ const message = create$H(method, params);
1121
1121
  ipc.send(message);
1122
1122
  }
1123
1123
  };
@@ -1159,7 +1159,7 @@ const unhandleIpc = ipc => {
1159
1159
  }
1160
1160
  };
1161
1161
 
1162
- const create$F = async ({
1162
+ const create$E = async ({
1163
1163
  commandMap,
1164
1164
  window
1165
1165
  }) => {
@@ -1171,7 +1171,7 @@ const create$F = async ({
1171
1171
  return rpc;
1172
1172
  };
1173
1173
 
1174
- const create$E = async ({
1174
+ const create$D = async ({
1175
1175
  commandMap,
1176
1176
  isMessagePortOpen = true,
1177
1177
  messagePort
@@ -1193,7 +1193,7 @@ const isWorker = value => {
1193
1193
  return value instanceof Worker;
1194
1194
  };
1195
1195
 
1196
- const create$D = async ({
1196
+ const create$C = async ({
1197
1197
  commandMap,
1198
1198
  name,
1199
1199
  url
@@ -1213,7 +1213,7 @@ const create$D = async ({
1213
1213
  return workerRpc;
1214
1214
  };
1215
1215
 
1216
- const create$C = async ({
1216
+ const create$B = async ({
1217
1217
  commandMap,
1218
1218
  name,
1219
1219
  port,
@@ -1236,11 +1236,11 @@ const create$C = async ({
1236
1236
  return workerRpc;
1237
1237
  };
1238
1238
 
1239
- const create$B = async ({
1239
+ const create$A = async ({
1240
1240
  commandMap,
1241
1241
  messagePort
1242
1242
  }) => {
1243
- return create$E({
1243
+ return create$D({
1244
1244
  commandMap,
1245
1245
  messagePort
1246
1246
  });
@@ -1565,7 +1565,7 @@ const launchWorker = async ({
1565
1565
  const generation = getGeneration();
1566
1566
  const trackedWorker = createRuntimeName(name);
1567
1567
  try {
1568
- const rpc = await create$D({
1568
+ const rpc = await create$C({
1569
1569
  commandMap: commandMapRef,
1570
1570
  name: trackedWorker.runtimeName,
1571
1571
  url
@@ -1862,7 +1862,7 @@ const configureProxy = async (options, port) => {
1862
1862
  try {
1863
1863
  const id = await client.invoke('start', options, capture(document));
1864
1864
  proxyPort = await client.invokeAndTransfer('proxy', port);
1865
- const rpc = await create$B({
1865
+ const rpc = await create$A({
1866
1866
  commandMap: commandMapRef,
1867
1867
  messagePort: proxyPort
1868
1868
  });
@@ -2130,7 +2130,7 @@ const createIdGenerator = () => {
2130
2130
  return ++id;
2131
2131
  };
2132
2132
  };
2133
- const create$A = createIdGenerator();
2133
+ const create$z = createIdGenerator();
2134
2134
 
2135
2135
  const state$j = Object.create(null);
2136
2136
  const retainString = (item, index) => {
@@ -2182,7 +2182,7 @@ const retainItems = dataTransfer => {
2182
2182
  return items;
2183
2183
  };
2184
2184
  const addItems = items => {
2185
- const id = create$A();
2185
+ const id = create$z();
2186
2186
  state$j[id] = items;
2187
2187
  return id;
2188
2188
  };
@@ -2210,7 +2210,7 @@ const getFileHandles = async ids => {
2210
2210
  return handles;
2211
2211
  };
2212
2212
  const add$1 = promise => {
2213
- const id = create$A();
2213
+ const id = create$z();
2214
2214
  state$i[id] = promise;
2215
2215
  return id;
2216
2216
  };
@@ -4118,14 +4118,14 @@ const launchDragAndDropWorker = async () => {
4118
4118
  port1,
4119
4119
  port2
4120
4120
  } = new MessageChannel();
4121
- const workerRpc = await create$C({
4121
+ const workerRpc = await create$B({
4122
4122
  commandMap: {},
4123
4123
  name: trackedWorker.runtimeName,
4124
4124
  port: port1,
4125
4125
  url: dragAndDropWorkerUrl
4126
4126
  });
4127
4127
  trackRpc(workerRpc, generation, trackedWorker);
4128
- const rpc = await create$E({
4128
+ const rpc = await create$D({
4129
4129
  commandMap: commandMapRef,
4130
4130
  messagePort: port2
4131
4131
  });
@@ -4395,7 +4395,7 @@ const getWorkerDisplayName = name => {
4395
4395
  }
4396
4396
  return `${name} worker`;
4397
4397
  };
4398
- const create$z = async ({
4398
+ const create$y = async ({
4399
4399
  name,
4400
4400
  url
4401
4401
  }) => {
@@ -4473,7 +4473,7 @@ const wrap = worker => {
4473
4473
 
4474
4474
  const IpcParentWithModuleWorker = {
4475
4475
  __proto__: null,
4476
- create: create$z,
4476
+ create: create$y,
4477
4477
  wrap
4478
4478
  };
4479
4479
 
@@ -4481,7 +4481,7 @@ const isMessagePort = value => {
4481
4481
  return value instanceof MessagePort;
4482
4482
  };
4483
4483
 
4484
- const create$y = async ({
4484
+ const create$x = async ({
4485
4485
  url
4486
4486
  }) => {
4487
4487
  string(url);
@@ -4510,10 +4510,10 @@ const create$y = async ({
4510
4510
 
4511
4511
  const IpcParentWithMessagePort = {
4512
4512
  __proto__: null,
4513
- create: create$y
4513
+ create: create$x
4514
4514
  };
4515
4515
 
4516
- const create$x = async url => {
4516
+ const create$w = async url => {
4517
4517
  const {
4518
4518
  promise,
4519
4519
  resolve
@@ -4532,7 +4532,7 @@ const create$x = async url => {
4532
4532
 
4533
4533
  const IpcParentWithReferencePort = {
4534
4534
  __proto__: null,
4535
- create: create$x
4535
+ create: create$w
4536
4536
  };
4537
4537
 
4538
4538
  const workers = Object.create(null);
@@ -4550,7 +4550,7 @@ const clear$2 = () => {
4550
4550
  }
4551
4551
  };
4552
4552
 
4553
- const create$w = async ({
4553
+ const create$v = async ({
4554
4554
  id,
4555
4555
  name,
4556
4556
  parentName,
@@ -4558,7 +4558,7 @@ const create$w = async ({
4558
4558
  raw,
4559
4559
  rpcId,
4560
4560
  url
4561
- }, createTransferredRpc = create$C, createNativeRpc = create$D) => {
4561
+ }, createTransferredRpc = create$B, createNativeRpc = create$C) => {
4562
4562
  const generation = getGeneration();
4563
4563
  const trackedWorker = createRuntimeName(name || 'Worker', parentName);
4564
4564
  let rpc;
@@ -4595,13 +4595,13 @@ const create$w = async ({
4595
4595
 
4596
4596
  const IpcParentWithModuleWorkerWithMessagePort = {
4597
4597
  __proto__: null,
4598
- create: create$w
4598
+ create: create$v
4599
4599
  };
4600
4600
 
4601
4601
  const isElectron = platform === Electron$1;
4602
4602
 
4603
4603
  // TODO use handleIncomingIpc function
4604
- const create$v = async ({
4604
+ const create$u = async ({
4605
4605
  ipcId,
4606
4606
  port
4607
4607
  }) => {
@@ -4609,7 +4609,7 @@ const create$v = async ({
4609
4609
  if (!isElectron) {
4610
4610
  throw new Error('Electron api was requested but is not available');
4611
4611
  }
4612
- const rpc = await create$F({
4612
+ const rpc = await create$E({
4613
4613
  commandMap: {},
4614
4614
  window
4615
4615
  });
@@ -4619,7 +4619,7 @@ const create$v = async ({
4619
4619
 
4620
4620
  const IpcParentWithElectron = {
4621
4621
  __proto__: null,
4622
- create: create$v
4622
+ create: create$u
4623
4623
  };
4624
4624
 
4625
4625
  const getModule = method => {
@@ -4641,7 +4641,7 @@ const getModule = method => {
4641
4641
 
4642
4642
  const shouldLaunchMultipleWorkers = true;
4643
4643
 
4644
- const create$u = async ({
4644
+ const create$t = async ({
4645
4645
  method,
4646
4646
  ...options
4647
4647
  }) => {
@@ -4670,7 +4670,7 @@ const dispose$l = id => {
4670
4670
 
4671
4671
  const launchEditorWorker = async port => {
4672
4672
  try {
4673
- await create$u({
4673
+ await create$t({
4674
4674
  method: ModuleWorkerWithMessagePort,
4675
4675
  name: 'Editor Worker',
4676
4676
  port,
@@ -4711,7 +4711,7 @@ const syntaxHighlightingWorkerUrl = getConfiguredSyntaxHighlightingWorkerUrl() |
4711
4711
 
4712
4712
  const launchSyntaxHighlightingWorker = async port => {
4713
4713
  try {
4714
- await create$u({
4714
+ await create$t({
4715
4715
  method: ModuleWorkerWithMessagePort,
4716
4716
  name: 'Syntax Highlighting Worker',
4717
4717
  parentName: 'Editor Worker',
@@ -4936,7 +4936,9 @@ const executeViewletCommand$1 = 'Viewlet.executeViewletCommand';
4936
4936
  const send = (method, uid, ...args) => {
4937
4937
  // Editor shortcuts still execute through renderer-worker. Keep their input
4938
4938
  // events on the same port so typing cannot overtake a preceding shortcut.
4939
- if (method === executeViewletCommand$1 && getRpcId(uid) !== 'Editor') {
4939
+ // Blur uses the direct editor handler, whose delayed render preserves the
4940
+ // focus of the next editor instead of clearing its keyboard context.
4941
+ if (method === executeViewletCommand$1 && (getRpcId(uid) !== 'Editor' || args[0] === 'handleBlur')) {
4940
4942
  const rpc = get$8(uid);
4941
4943
  if (rpc) {
4942
4944
  rpc.send(method, uid, ...args);
@@ -5297,7 +5299,7 @@ const showError = (message, y, x) => {
5297
5299
  $ImagePreviewImage
5298
5300
  };
5299
5301
  };
5300
- const create$t = (uri, top, left) => {
5302
+ const create$s = (uri, top, left) => {
5301
5303
  const $ImagePreviewImage = document.createElement('img');
5302
5304
  $ImagePreviewImage.className = 'ImagePreviewImage';
5303
5305
  $ImagePreviewImage.src = uri;
@@ -5328,7 +5330,7 @@ const dispose$h = state => {
5328
5330
 
5329
5331
  const ImagePreview$1 = {
5330
5332
  __proto__: null,
5331
- create: create$t,
5333
+ create: create$s,
5332
5334
  dispose: dispose$h,
5333
5335
  showError,
5334
5336
  update: update$1
@@ -5377,13 +5379,13 @@ const handleMouseDown$4 = event => {
5377
5379
  const handleBlur$7 = () => {
5378
5380
  return ['handleBlur'];
5379
5381
  };
5380
- const handleFocus$9 = () => {
5382
+ const handleFocus$8 = () => {
5381
5383
  return ['handleFocus'];
5382
5384
  };
5383
5385
 
5384
5386
  // TODO use context menu events function again
5385
5387
 
5386
- const handleContextMenu$7 = event => {
5388
+ const handleContextMenu$6 = event => {
5387
5389
  preventDefault(event);
5388
5390
  const {
5389
5391
  button,
@@ -5397,8 +5399,8 @@ const returnValue$8 = true;
5397
5399
  const ViewletActivityBarEvents = {
5398
5400
  __proto__: null,
5399
5401
  handleBlur: handleBlur$7,
5400
- handleContextMenu: handleContextMenu$7,
5401
- handleFocus: handleFocus$9,
5402
+ handleContextMenu: handleContextMenu$6,
5403
+ handleFocus: handleFocus$8,
5402
5404
  handleMouseDown: handleMouseDown$4,
5403
5405
  returnValue: returnValue$8
5404
5406
  };
@@ -5440,8 +5442,8 @@ const handleAudioError$1 = forwardViewletCommand('handleAudioError');
5440
5442
  forwardViewletCommand('handleBeforeInput');
5441
5443
  forwardViewletCommand('handleBeforeInputFromContentEditable');
5442
5444
  const handleBlur$6 = forwardViewletCommand('handleBlur');
5443
- const handleButtonClick = forwardViewletCommand('handleButtonClick');
5444
- const handleClick$6 = forwardViewletCommand('handleClick');
5445
+ forwardViewletCommand('handleButtonClick');
5446
+ const handleClick$4 = forwardViewletCommand('handleClick');
5445
5447
  const handleClickAction$2 = forwardViewletCommand('handleClickAction');
5446
5448
  forwardViewletCommand('handleClickAdd');
5447
5449
  const handleClickAt$3 = forwardViewletCommand('handleClickAt');
@@ -5454,7 +5456,7 @@ forwardViewletCommand('handleClickOpenFolder');
5454
5456
  forwardViewletCommand('handleClickRestore');
5455
5457
  const handleClickTab$2 = forwardViewletCommand('handleClickTab');
5456
5458
  forwardViewletCommand('handleClickToggleMaximize');
5457
- const handleContextMenu$6 = forwardViewletCommand('handleContextMenu');
5459
+ const handleContextMenu$5 = forwardViewletCommand('handleContextMenu');
5458
5460
  forwardViewletCommand('handleDoubleClick');
5459
5461
  forwardViewletCommand('handleDragEnd');
5460
5462
  forwardViewletCommand('handleDragLeave');
@@ -5467,11 +5469,11 @@ forwardViewletCommand('handleClickSize');
5467
5469
  forwardViewletCommand('handleClickDisable');
5468
5470
  forwardViewletCommand('handleClickUninstall');
5469
5471
  forwardViewletCommand('handleFilterInput');
5470
- const handleFocus$8 = forwardViewletCommand('handleFocus');
5472
+ const handleFocus$7 = forwardViewletCommand('handleFocus');
5471
5473
  const handleFocusIn$4 = forwardViewletCommand('handleFocusIn');
5472
5474
  forwardViewletCommand('handleIconError');
5473
5475
  const handleImageError = forwardViewletCommand('handleImageError');
5474
- const handleInput$6 = forwardViewletCommand('handleInput');
5476
+ const handleInput$5 = forwardViewletCommand('handleInput');
5475
5477
  const handleKeyDown$4 = forwardViewletCommand('handleKeyDown');
5476
5478
  const handleLink = forwardViewletCommand('handleLink');
5477
5479
  forwardViewletCommand('handleListBlur');
@@ -5481,8 +5483,8 @@ const handleMenuMouseOver$1 = forwardViewletCommand('handleMenuMouseOver');
5481
5483
  const handleMenuMouseLeave$1 = forwardViewletCommand('handleMenuMouseLeave');
5482
5484
  const handleMouseDown$3 = forwardViewletCommand('handleMouseDown');
5483
5485
  forwardViewletCommand('handleMouseMove');
5484
- const handleMouseOut$1 = forwardViewletCommand('handleMouseOut');
5485
- const handleMouseOver$1 = forwardViewletCommand('handleMouseOver');
5486
+ const handleMouseOut = forwardViewletCommand('handleMouseOut');
5487
+ const handleMouseOver = forwardViewletCommand('handleMouseOver');
5486
5488
  forwardViewletCommand('handlePointerCaptureLost');
5487
5489
  const handlePointerDown$3 = forwardViewletCommand('handlePointerDown');
5488
5490
  const handlePointerMove$1 = forwardViewletCommand('handlePointerMove');
@@ -5558,7 +5560,7 @@ const ViewletAudio = {
5558
5560
  Events: Events$5
5559
5561
  };
5560
5562
 
5561
- const create$s = () => {
5563
+ const create$r = () => {
5562
5564
  const $Viewlet = document.createElement('div');
5563
5565
  $Viewlet.className = 'Viewlet Clock';
5564
5566
  return {
@@ -5575,7 +5577,7 @@ const setTime = (state, time) => {
5575
5577
 
5576
5578
  const ViewletClock = {
5577
5579
  __proto__: null,
5578
- create: create$s,
5580
+ create: create$r,
5579
5581
  dispose: dispose$g,
5580
5582
  refresh: refresh$3,
5581
5583
  setTime
@@ -5604,7 +5606,7 @@ const stopTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp)
5604
5606
  // TODO use pointerlost event instead
5605
5607
  $Target.removeEventListener(PointerUp, handlePointerUp);
5606
5608
  };
5607
- const create$r = (pointerDown, pointerMove, pointerUp) => {
5609
+ const create$q = (pointerDown, pointerMove, pointerUp) => {
5608
5610
  const shared = (fn, event) => {
5609
5611
  const message = fn(event);
5610
5612
  if (!message || message.length === 0) {
@@ -5637,7 +5639,7 @@ const create$r = (pointerDown, pointerMove, pointerUp) => {
5637
5639
  };
5638
5640
 
5639
5641
  const handleOffset = 20;
5640
- const handleSliderPointerDown = create$r(event => {
5642
+ const handleSliderPointerDown = create$q(event => {
5641
5643
  const {
5642
5644
  clientX,
5643
5645
  clientY
@@ -5698,7 +5700,7 @@ const ViewletColorPicker = {
5698
5700
  setOffsetX
5699
5701
  };
5700
5702
 
5701
- const handleInput$5 = event => {
5703
+ const handleInput$4 = event => {
5702
5704
  const uid = fromEvent(event);
5703
5705
  const {
5704
5706
  target
@@ -5706,27 +5708,27 @@ const handleInput$5 = event => {
5706
5708
  const {
5707
5709
  value
5708
5710
  } = target;
5709
- handleInput$6(uid, value);
5711
+ handleInput$5(uid, value);
5710
5712
  };
5711
- const handleFocus$7 = event => {
5713
+ const handleFocus$6 = event => {
5712
5714
  const uid = fromEvent(event);
5713
- handleFocus$8(uid);
5715
+ handleFocus$7(uid);
5714
5716
  };
5715
5717
 
5716
5718
  const ViewletDebugConsoleEvents = {
5717
5719
  __proto__: null,
5718
- handleFocus: handleFocus$7,
5719
- handleInput: handleInput$5
5720
+ handleFocus: handleFocus$6,
5721
+ handleInput: handleInput$4
5720
5722
  };
5721
5723
 
5722
- const create$q = () => {
5724
+ const create$p = () => {
5723
5725
  const $Viewlet = document.createElement('div');
5724
5726
  $Viewlet.className = 'Viewlet DebugConsole';
5725
5727
  return {
5726
5728
  $Viewlet
5727
5729
  };
5728
5730
  };
5729
- const setDom$9 = (state, dom) => {
5731
+ const setDom$8 = (state, dom) => {
5730
5732
  const {
5731
5733
  $Viewlet
5732
5734
  } = state;
@@ -5735,8 +5737,8 @@ const setDom$9 = (state, dom) => {
5735
5737
 
5736
5738
  const ViewletDebugConsole = {
5737
5739
  __proto__: null,
5738
- create: create$q,
5739
- setDom: setDom$9
5740
+ create: create$p,
5741
+ setDom: setDom$8
5740
5742
  };
5741
5743
 
5742
5744
  const handleKeyDown$3 = event => {
@@ -5772,7 +5774,7 @@ const setValue$2 = (state, value) => {
5772
5774
  const $Input = $Viewlet.querySelector(':scope input');
5773
5775
  $Input.value = value;
5774
5776
  };
5775
- const focus$e = state => {
5777
+ const focus$c = state => {
5776
5778
  const {
5777
5779
  $Viewlet
5778
5780
  } = state;
@@ -5783,7 +5785,7 @@ const focus$e = state => {
5783
5785
  const ViewletDefineKeyBinding = {
5784
5786
  __proto__: null,
5785
5787
  Events: ViewletDefineKeyBindingEvents,
5786
- focus: focus$e,
5788
+ focus: focus$c,
5787
5789
  setValue: setValue$2
5788
5790
  };
5789
5791
 
@@ -5803,7 +5805,6 @@ const Log = 'log';
5803
5805
  const Menu = 'menu';
5804
5806
  const MenuItem = 'menuitem';
5805
5807
  const None$1 = 'none';
5806
- const Status = 'status';
5807
5808
  const TabList = 'tablist';
5808
5809
  const Toolbar = 'toolbar';
5809
5810
 
@@ -5816,7 +5817,7 @@ const setMaskImage = ($Element, icon) => {
5816
5817
  }
5817
5818
  };
5818
5819
 
5819
- const create$p = icon => {
5820
+ const create$o = icon => {
5820
5821
  const $Icon = document.createElement('div');
5821
5822
  $Icon.className = 'MaskIcon';
5822
5823
  setMaskImage($Icon, icon);
@@ -5826,7 +5827,7 @@ const create$p = icon => {
5826
5827
 
5827
5828
  const create$Button = (label, icon) => {
5828
5829
  // TODO icon div might not be needed (unnecessary HTML element)
5829
- const $Icon = create$p(icon);
5830
+ const $Icon = create$o(icon);
5830
5831
  const $Button = document.createElement('button');
5831
5832
  $Button.className = 'IconButton';
5832
5833
  $Button.title = label;
@@ -5835,19 +5836,19 @@ const create$Button = (label, icon) => {
5835
5836
  return $Button;
5836
5837
  };
5837
5838
 
5838
- const handleClick$5 = index => {
5839
+ const handleClick$3 = index => {
5839
5840
  send$1(/* Dialog.handleClick */'Dialog.handleClick', /* index */index);
5840
5841
  };
5841
5842
 
5842
- const handleClick$4 = event => {
5843
+ const handleClick$2 = event => {
5843
5844
  const {
5844
5845
  target
5845
5846
  } = event;
5846
5847
  const index = getNodeIndex(target);
5847
- handleClick$5(index);
5848
+ handleClick$3(index);
5848
5849
  };
5849
5850
 
5850
- const create$o = () => {
5851
+ const create$n = () => {
5851
5852
  const $DialogTitle = document.createElement('h2');
5852
5853
  $DialogTitle.id = 'DialogTitle';
5853
5854
  const $DialogCloseButton = create$Button('Close', 'Close');
@@ -5874,7 +5875,7 @@ const create$o = () => {
5874
5875
  $Dialog.setAttribute(AriaLabelledBy, 'DialogTitle');
5875
5876
  $Dialog.setAttribute(AriaDescribedBy, 'DialogBodyErrorMessage');
5876
5877
  $Dialog.append($DialogHeader, $DialogBody);
5877
- $Dialog.onclick = handleClick$4;
5878
+ $Dialog.onclick = handleClick$2;
5878
5879
  return {
5879
5880
  $DialogBodyErrorCodeFrame,
5880
5881
  $DialogBodyErrorMessage,
@@ -5928,7 +5929,7 @@ const setErrorStack = (state, errorStack) => {
5928
5929
 
5929
5930
  const ViewletDialog = {
5930
5931
  __proto__: null,
5931
- create: create$o,
5932
+ create: create$n,
5932
5933
  postAppend,
5933
5934
  setButtons,
5934
5935
  setCodeFrame,
@@ -5982,7 +5983,7 @@ const handleClickAt$2 = event => {
5982
5983
  const handleLoad$3 = event => {
5983
5984
  return ['handleLoad'];
5984
5985
  };
5985
- const handleContextMenu$5 = event => {
5986
+ const handleContextMenu$4 = event => {
5986
5987
  preventDefault(event);
5987
5988
  const {
5988
5989
  button,
@@ -5991,7 +5992,7 @@ const handleContextMenu$5 = event => {
5991
5992
  } = event;
5992
5993
  return ['handleContextMenu', button, clientX, clientY];
5993
5994
  };
5994
- const handleSashCornerPointerDown = create$r(event => {
5995
+ const handleSashCornerPointerDown = create$q(event => {
5995
5996
  const {
5996
5997
  clientX,
5997
5998
  clientY
@@ -6015,7 +6016,7 @@ const returnValue$6 = true;
6015
6016
  const ViewletE2eTestEvents = {
6016
6017
  __proto__: null,
6017
6018
  handleClickAt: handleClickAt$2,
6018
- handleContextMenu: handleContextMenu$5,
6019
+ handleContextMenu: handleContextMenu$4,
6019
6020
  handleLoad: handleLoad$3,
6020
6021
  handleSashCornerPointerDown,
6021
6022
  returnValue: returnValue$6
@@ -6079,7 +6080,7 @@ const handleClickAt$1 = event => {
6079
6080
  const handleLoad$2 = event => {
6080
6081
  return ['handleLoad'];
6081
6082
  };
6082
- const handleContextMenu$4 = event => {
6083
+ const handleContextMenu$3 = event => {
6083
6084
  preventDefault(event);
6084
6085
  const {
6085
6086
  button,
@@ -6093,7 +6094,7 @@ const returnValue$5 = true;
6093
6094
  const ViewletE2eTestsEvents = {
6094
6095
  __proto__: null,
6095
6096
  handleClickAt: handleClickAt$1,
6096
- handleContextMenu: handleContextMenu$4,
6097
+ handleContextMenu: handleContextMenu$3,
6097
6098
  handleLoad: handleLoad$2,
6098
6099
  returnValue: returnValue$5
6099
6100
  };
@@ -6240,7 +6241,7 @@ const appendWidget$5 = state => {
6240
6241
  const dispose$f = state => {
6241
6242
  remove$1(state.$Viewlet);
6242
6243
  };
6243
- const focus$d = (state, key, source) => {
6244
+ const focus$b = (state, key, source) => {
6244
6245
  if (!key) {
6245
6246
  return;
6246
6247
  }
@@ -6264,7 +6265,7 @@ const ViewletEditorCodeGenerator = {
6264
6265
  Events: ViewletEditorCodeGeneratorEvents,
6265
6266
  appendWidget: appendWidget$5,
6266
6267
  dispose: dispose$f,
6267
- focus: focus$d,
6268
+ focus: focus$b,
6268
6269
  setBounds: setBounds$9
6269
6270
  };
6270
6271
 
@@ -6381,7 +6382,7 @@ const setNegativeMargin = (state, negativeMargin) => {
6381
6382
  setTop($ListItems, negativeMargin);
6382
6383
  };
6383
6384
 
6384
- const create$n = () => {
6385
+ const create$m = () => {
6385
6386
  const $ListItems = document.createElement('div');
6386
6387
  $ListItems.className = 'ListItems';
6387
6388
  $ListItems.role = ListBox;
@@ -6422,7 +6423,7 @@ const attachEvents$6 = state => {
6422
6423
  // TODO show should be passed active cursor position
6423
6424
  // this would make this function easier to test as it would avoid dependency on globals of other files
6424
6425
 
6425
- const setDom$8 = (state, dom) => {
6426
+ const setDom$7 = (state, dom) => {
6426
6427
  const {
6427
6428
  $ListItems,
6428
6429
  $Viewlet
@@ -6464,12 +6465,12 @@ const setBounds$8 = (state, x, y, width, height) => {
6464
6465
  const ViewletEditorCompletion = {
6465
6466
  __proto__: null,
6466
6467
  attachEvents: attachEvents$6,
6467
- create: create$n,
6468
+ create: create$m,
6468
6469
  dispose: dispose$e,
6469
6470
  handleError: handleError$5,
6470
6471
  setBounds: setBounds$8,
6471
6472
  setContentHeight,
6472
- setDom: setDom$8,
6473
+ setDom: setDom$7,
6473
6474
  setNegativeMargin,
6474
6475
  setScrollBar,
6475
6476
  setSize,
@@ -6487,7 +6488,7 @@ const ViewletEditorCompletionDetailsEvents = {
6487
6488
  returnValue: returnValue$4
6488
6489
  };
6489
6490
 
6490
- const create$m = () => {
6491
+ const create$l = () => {
6491
6492
  const $Viewlet = document.createElement('div');
6492
6493
  $Viewlet.className = 'Viewlet EditorCompletionDetails';
6493
6494
  $Viewlet.id = 'CompletionsDetails';
@@ -6498,7 +6499,7 @@ const create$m = () => {
6498
6499
  const attachEvents$5 = state => {
6499
6500
  // TODO
6500
6501
  };
6501
- const setDom$7 = (state, dom) => {
6502
+ const setDom$6 = (state, dom) => {
6502
6503
  const {
6503
6504
  $Viewlet
6504
6505
  } = state;
@@ -6527,10 +6528,10 @@ const ViewletEditorCompletionDetails = {
6527
6528
  Events: ViewletEditorCompletionDetailsEvents,
6528
6529
  appendWidget: appendWidget$4,
6529
6530
  attachEvents: attachEvents$5,
6530
- create: create$m,
6531
+ create: create$l,
6531
6532
  dispose: dispose$d,
6532
6533
  setBounds: setBounds$7,
6533
- setDom: setDom$7
6534
+ setDom: setDom$6
6534
6535
  };
6535
6536
 
6536
6537
  // TODO not sure whether created DOM node
@@ -6546,14 +6547,14 @@ const ViewletEditorCompletionDetails = {
6546
6547
 
6547
6548
  // TODO aria alert
6548
6549
 
6549
- const create$l = () => {
6550
+ const create$k = () => {
6550
6551
  const $Viewlet = document.createElement('div');
6551
6552
  $Viewlet.className = 'Viewlet EditorError';
6552
6553
  return {
6553
6554
  $Viewlet
6554
6555
  };
6555
6556
  };
6556
- const setDom$6 = (state, dom) => {
6557
+ const setDom$5 = (state, dom) => {
6557
6558
  const {
6558
6559
  $Viewlet
6559
6560
  } = state;
@@ -6568,13 +6569,13 @@ const setBounds$6 = (state, x, y, width, height) => {
6568
6569
 
6569
6570
  const ViewletEditorError = {
6570
6571
  __proto__: null,
6571
- create: create$l,
6572
+ create: create$k,
6572
6573
  setBounds: setBounds$6,
6573
- setDom: setDom$6
6574
+ setDom: setDom$5
6574
6575
  };
6575
6576
 
6576
6577
  const returnValue$3 = true;
6577
- const handleSashPointerDown$2 = create$r(event => {
6578
+ const handleSashPointerDown$2 = create$q(event => {
6578
6579
  const {
6579
6580
  clientX,
6580
6581
  clientY
@@ -6613,7 +6614,7 @@ const appendWidget$3 = state => {
6613
6614
  } = state;
6614
6615
  append$1($Viewlet);
6615
6616
  };
6616
- const setDom$5 = (state, dom) => {
6617
+ const setDom$4 = (state, dom) => {
6617
6618
  const {
6618
6619
  $Viewlet
6619
6620
  } = state;
@@ -6625,7 +6626,7 @@ const ViewletEditorHover = {
6625
6626
  Events: ViewletEditorHoverEvents,
6626
6627
  appendWidget: appendWidget$3,
6627
6628
  setBounds: setBounds$5,
6628
- setDom: setDom$5
6629
+ setDom: setDom$4
6629
6630
  };
6630
6631
 
6631
6632
  const LeftClick = 0;
@@ -6707,7 +6708,7 @@ const handleWheel = event => {
6707
6708
  *
6708
6709
  * @param {MouseEvent} event
6709
6710
  */
6710
- const handleContextMenu$3 = event => {
6711
+ const handleContextMenu$2 = event => {
6711
6712
  preventDefault(event);
6712
6713
  const {
6713
6714
  button,
@@ -6715,18 +6716,18 @@ const handleContextMenu$3 = event => {
6715
6716
  clientY
6716
6717
  } = event;
6717
6718
  const uid = fromEvent(event);
6718
- handleContextMenu$6(uid, button, clientX, clientY);
6719
+ handleContextMenu$5(uid, button, clientX, clientY);
6719
6720
  };
6720
6721
  const handleError$4 = event => {
6721
6722
  const uid = fromEvent(event);
6722
6723
  handleImageError(uid);
6723
6724
  };
6724
- const handleFocus$6 = event => {
6725
+ const handleFocus$5 = event => {
6725
6726
  const uid = fromEvent(event);
6726
- handleFocus$8(uid);
6727
+ handleFocus$7(uid);
6727
6728
  };
6728
6729
 
6729
- const create$k = () => {
6730
+ const create$j = () => {
6730
6731
  const $Viewlet = document.createElement('div');
6731
6732
  $Viewlet.className = 'Viewlet EditorImage';
6732
6733
  return {
@@ -6738,8 +6739,8 @@ const attachEvents$4 = state => {
6738
6739
  $Viewlet
6739
6740
  } = state;
6740
6741
  attachEvents$7($Viewlet, {
6741
- [ContextMenu]: handleContextMenu$3,
6742
- [FocusIn]: handleFocus$6,
6742
+ [ContextMenu]: handleContextMenu$2,
6743
+ [FocusIn]: handleFocus$5,
6743
6744
  [PointerDown]: handlePointerDown$1,
6744
6745
  [PointerUp]: handlePointerUp
6745
6746
  });
@@ -6759,7 +6760,7 @@ const setDragging = (state, isDragging) => {
6759
6760
  } = state;
6760
6761
  $Viewlet.classList.toggle('Dragging', isDragging);
6761
6762
  };
6762
- const setDom$4 = (state, dom) => {
6763
+ const setDom$3 = (state, dom) => {
6763
6764
  const {
6764
6765
  $Viewlet
6765
6766
  } = state;
@@ -6769,13 +6770,13 @@ const setDom$4 = (state, dom) => {
6769
6770
  const ViewletEditorImage = {
6770
6771
  __proto__: null,
6771
6772
  attachEvents: attachEvents$4,
6772
- create: create$k,
6773
- setDom: setDom$4,
6773
+ create: create$j,
6774
+ setDom: setDom$3,
6774
6775
  setDragging,
6775
6776
  setTransform
6776
6777
  };
6777
6778
 
6778
- const create$j = () => {
6779
+ const create$i = () => {
6779
6780
  const $Viewlet = document.createElement('div');
6780
6781
  $Viewlet.className = 'Viewlet EditorText';
6781
6782
  $Viewlet.textContent = 'loading...';
@@ -6792,7 +6793,7 @@ const refresh$2 = (state, context) => {
6792
6793
 
6793
6794
  const ViewletEditorPlainText = {
6794
6795
  __proto__: null,
6795
- create: create$j,
6796
+ create: create$i,
6796
6797
  dispose: dispose$c,
6797
6798
  refresh: refresh$2
6798
6799
  };
@@ -6833,7 +6834,7 @@ const ViewletEditorSourceActions = {
6833
6834
  setBounds: setBounds$4
6834
6835
  };
6835
6836
 
6836
- const create$i = () => {
6837
+ const create$h = () => {
6837
6838
  const $Viewlet = document.createElement('div');
6838
6839
  $Viewlet.className = 'Viewlet EditorTextError';
6839
6840
  return {
@@ -6849,11 +6850,11 @@ const setMessage$3 = (state, message) => {
6849
6850
 
6850
6851
  const ViewletEditorTextError = {
6851
6852
  __proto__: null,
6852
- create: create$i,
6853
+ create: create$h,
6853
6854
  setMessage: setMessage$3
6854
6855
  };
6855
6856
 
6856
- const create$h = () => {
6857
+ const create$g = () => {
6857
6858
  const $Viewlet = document.createElement('div');
6858
6859
  $Viewlet.className = 'Viewlet EditorWidgetError EditorOverlayMessage';
6859
6860
  return {
@@ -6876,12 +6877,12 @@ const setBounds$3 = (state, x, y, width, height) => {
6876
6877
 
6877
6878
  const ViewletEditorWidgetError = {
6878
6879
  __proto__: null,
6879
- create: create$h,
6880
+ create: create$g,
6880
6881
  setBounds: setBounds$3,
6881
6882
  setMessage: setMessage$2
6882
6883
  };
6883
6884
 
6884
- const create$g = () => {
6885
+ const create$f = () => {
6885
6886
  const $Viewlet = document.createElement('div');
6886
6887
  $Viewlet.dataset.viewlet = 'Empty';
6887
6888
  $Viewlet.className = 'Viewlet';
@@ -6890,18 +6891,18 @@ const create$g = () => {
6890
6891
  };
6891
6892
  };
6892
6893
  const refresh$1 = (state, context) => {};
6893
- const focus$c = state => {};
6894
+ const focus$a = state => {};
6894
6895
  const dispose$a = state => {};
6895
6896
 
6896
6897
  const ViewletEmpty = {
6897
6898
  __proto__: null,
6898
- create: create$g,
6899
+ create: create$f,
6899
6900
  dispose: dispose$a,
6900
- focus: focus$c,
6901
+ focus: focus$a,
6901
6902
  refresh: refresh$1
6902
6903
  };
6903
6904
 
6904
- const create$f = () => {
6905
+ const create$e = () => {
6905
6906
  const $Viewlet = document.createElement('div');
6906
6907
  $Viewlet.className = 'Viewlet EmptyEditor';
6907
6908
  return {
@@ -6911,10 +6912,10 @@ const create$f = () => {
6911
6912
 
6912
6913
  const ViewletEmptyEditor = {
6913
6914
  __proto__: null,
6914
- create: create$f
6915
+ create: create$e
6915
6916
  };
6916
6917
 
6917
- const create$e = () => {
6918
+ const create$d = () => {
6918
6919
  const $Viewlet = document.createElement('div');
6919
6920
  $Viewlet.className = 'Viewlet Error';
6920
6921
  return {
@@ -6930,7 +6931,7 @@ const setMessage$1 = (state, message) => {
6930
6931
 
6931
6932
  const ViewletError = {
6932
6933
  __proto__: null,
6933
- create: create$e,
6934
+ create: create$d,
6934
6935
  setMessage: setMessage$1
6935
6936
  };
6936
6937
 
@@ -6970,7 +6971,7 @@ const setIframeSrc = ($Iframe, src, srcDoc = '') => {
6970
6971
  }
6971
6972
  };
6972
6973
 
6973
- const focus$b = state => {
6974
+ const focus$9 = state => {
6974
6975
  state.$Viewlet.focus();
6975
6976
  };
6976
6977
  const setIframe$1 = (state, src, sandbox = [], srcDoc = '', csp = '', credentialless = true, title = '') => {
@@ -6994,11 +6995,11 @@ const setIframe$1 = (state, src, sandbox = [], srcDoc = '', csp = '', credential
6994
6995
  const ViewletExtensionView = {
6995
6996
  __proto__: null,
6996
6997
  Events: ViewletExtensionViewEvents,
6997
- focus: focus$b,
6998
+ focus: focus$9,
6998
6999
  setIframe: setIframe$1
6999
7000
  };
7000
7001
 
7001
- const handleInput$4 = event => {
7002
+ const handleInput$3 = event => {
7002
7003
  const {
7003
7004
  target
7004
7005
  } = event;
@@ -7046,7 +7047,7 @@ const handleReplaceInput = event => {
7046
7047
  const handleReplaceFocus = event => {
7047
7048
  return ['FindWidget.handleReplaceFocus'];
7048
7049
  };
7049
- const handleFocus$5 = event => {
7050
+ const handleFocus$4 = event => {
7050
7051
  return ['FindWidget.handleFocus'];
7051
7052
  };
7052
7053
  const handleToggleReplaceFocus = event => {
@@ -7074,12 +7075,12 @@ const ViewletFindWidgetEvents = {
7074
7075
  handleClickReplace,
7075
7076
  handleClickReplaceAll,
7076
7077
  handleClickToggleReplace,
7077
- handleFocus: handleFocus$5,
7078
+ handleFocus: handleFocus$4,
7078
7079
  handleFocusClose,
7079
7080
  handleFocusNext,
7080
7081
  handleFocusPrevious,
7081
7082
  handleFocusReplaceAll,
7082
- handleInput: handleInput$4,
7083
+ handleInput: handleInput$3,
7083
7084
  handleInputBlur,
7084
7085
  handleReplaceFocus,
7085
7086
  handleReplaceInput,
@@ -7087,7 +7088,7 @@ const ViewletFindWidgetEvents = {
7087
7088
  returnValue: returnValue$2
7088
7089
  };
7089
7090
 
7090
- const create$d = () => {
7091
+ const create$c = () => {
7091
7092
  const $Viewlet = document.createElement('div');
7092
7093
  $Viewlet.className = 'Viewlet FindWidget';
7093
7094
  $Viewlet.role = Group;
@@ -7095,7 +7096,7 @@ const create$d = () => {
7095
7096
  $Viewlet
7096
7097
  };
7097
7098
  };
7098
- const focus$a = (state, key, source) => {
7099
+ const focus$8 = (state, key, source) => {
7099
7100
  if (!key) {
7100
7101
  return;
7101
7102
  }
@@ -7129,7 +7130,7 @@ const appendWidget$1 = state => {
7129
7130
  } = state;
7130
7131
  append$1($Viewlet);
7131
7132
  };
7132
- const setDom$3 = (state, dom) => {
7133
+ const setDom$2 = (state, dom) => {
7133
7134
  const {
7134
7135
  $Viewlet
7135
7136
  } = state;
@@ -7150,11 +7151,11 @@ const ViewletFindWidget = {
7150
7151
  __proto__: null,
7151
7152
  Events: Events$4,
7152
7153
  appendWidget: appendWidget$1,
7153
- create: create$d,
7154
+ create: create$c,
7154
7155
  dispose: dispose$9,
7155
- focus: focus$a,
7156
+ focus: focus$8,
7156
7157
  setBounds: setBounds$2,
7157
- setDom: setDom$3,
7158
+ setDom: setDom$2,
7158
7159
  setValue: setValue$1
7159
7160
  };
7160
7161
 
@@ -7204,7 +7205,7 @@ const handleError$3 = (state, message) => {
7204
7205
  } = state;
7205
7206
  $Message.textContent = message;
7206
7207
  };
7207
- const focus$9 = state => {
7208
+ const focus$7 = state => {
7208
7209
  const {
7209
7210
  $Locations
7210
7211
  } = state;
@@ -7216,7 +7217,7 @@ const focus$9 = state => {
7216
7217
  const ViewletImplementations = {
7217
7218
  __proto__: null,
7218
7219
  Events: ViewletLocationsEvents,
7219
- focus: focus$9,
7220
+ focus: focus$7,
7220
7221
  handleError: handleError$3,
7221
7222
  setFocusedIndex: setFocusedIndex$1
7222
7223
  };
@@ -7443,7 +7444,7 @@ const handleSashDoubleClick$1 = id => {
7443
7444
  const handleResize$1 = (width, height) => {
7444
7445
  send$1('Layout.handleResize', width, height);
7445
7446
  };
7446
- const handleFocus$4 = () => {
7447
+ const handleFocus$3 = () => {
7447
7448
  send$1('Layout.handleFocus');
7448
7449
  };
7449
7450
  const handleBlur$3 = () => {
@@ -7492,8 +7493,8 @@ const handleResize = () => {
7492
7493
  } = window;
7493
7494
  handleResize$1(innerWidth, innerHeight);
7494
7495
  };
7495
- const handleFocus$3 = () => {
7496
- handleFocus$4();
7496
+ const handleFocus$2 = () => {
7497
+ handleFocus$3();
7497
7498
  };
7498
7499
  const handleBlur$2 = () => {
7499
7500
  handleBlur$3();
@@ -7501,7 +7502,7 @@ const handleBlur$2 = () => {
7501
7502
  const handleKeyDown$1 = handleKeyDown$2;
7502
7503
  const handleKeyUp = handleKeyUp$1;
7503
7504
 
7504
- const create$c = () => {
7505
+ const create$b = () => {
7505
7506
  // TODO use aria role splitter once supported https://github.com/w3c/aria/issues/1348
7506
7507
  const $SashSidebar = document.createElement('div');
7507
7508
  $SashSidebar.className = 'Viewlet Sash SashVertical';
@@ -7537,7 +7538,7 @@ const attachEvents$3 = state => {
7537
7538
  });
7538
7539
  attachEvents$7(window, {
7539
7540
  [Blur]: handleBlur$2,
7540
- [Focus]: handleFocus$3,
7541
+ [Focus]: handleFocus$2,
7541
7542
  [KeyDown]: handleKeyDown$1,
7542
7543
  [KeyUp]: handleKeyUp,
7543
7544
  [Resize]: handleResize
@@ -7557,7 +7558,7 @@ const setSashes = (state, sashSidebar, sashPanel) => {
7557
7558
  const ViewletLayout = {
7558
7559
  __proto__: null,
7559
7560
  attachEvents: attachEvents$3,
7560
- create: create$c,
7561
+ create: create$b,
7561
7562
  setSashes
7562
7563
  };
7563
7564
 
@@ -7593,8 +7594,6 @@ const ScreenCapture = 'ScreenCapture';
7593
7594
  const Sidebar$1 = 'SideBar';
7594
7595
  const SimpleBrowser = 'SimpleBrowser';
7595
7596
  const SimpleBrowserHistory = 'SimpleBrowserHistory';
7596
- const SourceControl = 'Source Control';
7597
- const StatusBar$1 = 'StatusBar';
7598
7597
  const Storage = 'Storage';
7599
7598
  const Terminal2 = 'Terminal2';
7600
7599
  const Terminals = 'Terminals';
@@ -7625,7 +7624,7 @@ const getElement = () => {
7625
7624
  return state$8.$PreviousFocusElement;
7626
7625
  };
7627
7626
 
7628
- const focus$8 = $Element => {
7627
+ const focus$6 = $Element => {
7629
7628
  if ($Element === document.activeElement) {
7630
7629
  return;
7631
7630
  }
@@ -7642,7 +7641,7 @@ const focusPrevious = () => {
7642
7641
  }
7643
7642
  };
7644
7643
 
7645
- const create$b = () => {
7644
+ const create$a = () => {
7646
7645
  const $ViewletOutputContent = document.createElement('div');
7647
7646
  $ViewletOutputContent.className = 'OutputContent';
7648
7647
  $ViewletOutputContent.role = Log;
@@ -7674,9 +7673,9 @@ const handleError$2 = (state, error) => {
7674
7673
  string(error);
7675
7674
  state.content.textContent = error;
7676
7675
  };
7677
- const focus$7 = state => {
7676
+ const focus$5 = state => {
7678
7677
  object(state);
7679
- focus$8(state.$ViewletOutputContent);
7678
+ focus$6(state.$ViewletOutputContent);
7680
7679
  send$1('Focus.setFocus', FocusOutput);
7681
7680
  };
7682
7681
 
@@ -7694,10 +7693,10 @@ const dispose$8 = state => {};
7694
7693
  const ViewletOutput = {
7695
7694
  __proto__: null,
7696
7695
  clear: clear$1,
7697
- create: create$b,
7696
+ create: create$a,
7698
7697
  dispose: dispose$8,
7699
7698
  disposeFindWidget,
7700
- focus: focus$7,
7699
+ focus: focus$5,
7701
7700
  handleError: handleError$2,
7702
7701
  openFindWidget,
7703
7702
  setText
@@ -7750,7 +7749,7 @@ const UiStrings = {
7750
7749
  Close: 'Close',
7751
7750
  Maximize: 'Maximize'
7752
7751
  };
7753
- const create$a = () => {
7752
+ const create$9 = () => {
7754
7753
  const $PanelTabs = document.createElement('div');
7755
7754
  $PanelTabs.className = 'PanelTabs';
7756
7755
  $PanelTabs.role = TabList;
@@ -7812,7 +7811,7 @@ const setTabsDom$1 = (state, dom) => {
7812
7811
  };
7813
7812
 
7814
7813
  // TODO add test for focus method
7815
- const focus$6 = state => {
7814
+ const focus$4 = state => {
7816
7815
  object(state);
7817
7816
  if (!state.currentViewlet) {
7818
7817
  return;
@@ -7864,9 +7863,9 @@ const setActionsDom$1 = (state, actions, childUid) => {
7864
7863
  const ViewletPanel = {
7865
7864
  __proto__: null,
7866
7865
  attachEvents: attachEvents$2,
7867
- create: create$a,
7866
+ create: create$9,
7868
7867
  dispose: dispose$7,
7869
- focus: focus$6,
7868
+ focus: focus$4,
7870
7869
  setActionsDom: setActionsDom$1,
7871
7870
  setSelectedIndex,
7872
7871
  setTabsDom: setTabsDom$1
@@ -7875,7 +7874,7 @@ const ViewletPanel = {
7875
7874
  const ViewletReferences = {
7876
7875
  __proto__: null,
7877
7876
  Events: ViewletLocationsEvents,
7878
- focus: focus$9,
7877
+ focus: focus$7,
7879
7878
  handleError: handleError$3,
7880
7879
  setFocusedIndex: setFocusedIndex$1
7881
7880
  };
@@ -7915,7 +7914,7 @@ const handleLoadedMetadata = event => {
7915
7914
  target.play();
7916
7915
  };
7917
7916
 
7918
- const create$9 = () => {
7917
+ const create$8 = () => {
7919
7918
  const $Viewlet = document.createElement('div');
7920
7919
  $Viewlet.className = 'Viewlet ScreenCapture';
7921
7920
  return {
@@ -7935,12 +7934,11 @@ const setScreenCapture = (state, id) => {
7935
7934
 
7936
7935
  const ViewletScreenCapture = {
7937
7936
  __proto__: null,
7938
- create: create$9,
7937
+ create: create$8,
7939
7938
  setScreenCapture
7940
7939
  };
7941
7940
 
7942
7941
  const Sidebar = 'Side Bar';
7943
- const StatusBar = 'Status Bar';
7944
7942
 
7945
7943
  const handleClickAction = (target, uid) => {
7946
7944
  const index = getNodeIndex(target);
@@ -7959,7 +7957,7 @@ const handleHeaderClick = event => {
7959
7957
  }
7960
7958
  };
7961
7959
 
7962
- const create$8 = () => {
7960
+ const create$7 = () => {
7963
7961
  const $SidebarTitleAreaTitle = document.createElement('h2');
7964
7962
  $SidebarTitleAreaTitle.className = 'SideBarTitleAreaTitle';
7965
7963
  const $SidebarTitleArea = document.createElement('div');
@@ -8016,23 +8014,23 @@ const setActionsDom = (state, actions, parentId, eventMap = {}) => {
8016
8014
  }
8017
8015
  state.$Actions = $NewViewlet;
8018
8016
  };
8019
- const focus$5 = async () => {
8017
+ const focus$3 = async () => {
8020
8018
  // await
8021
8019
  };
8022
8020
 
8023
8021
  const ViewletSidebar = {
8024
8022
  __proto__: null,
8025
8023
  attachEvents: attachEvents$1,
8026
- create: create$8,
8024
+ create: create$7,
8027
8025
  dispose: dispose$6,
8028
- focus: focus$5,
8026
+ focus: focus$3,
8029
8027
  setActionsDom,
8030
8028
  setTitle
8031
8029
  };
8032
8030
 
8033
8031
  const pendingSelections = new WeakMap();
8034
8032
  const state$7 = {};
8035
- const handleFocus$2 = event => {
8033
+ const handleFocus$1 = event => {
8036
8034
  const target = event.target;
8037
8035
  if (target instanceof HTMLElement && !target.closest('.SimpleBrowser') && target.closest('.Main, .Panel, .Editor, .Terminal')) {
8038
8036
  state$7.codingFocus = new WeakRef(target);
@@ -8058,7 +8056,7 @@ const cancelPendingAddressSelection = event => {
8058
8056
  pendingSelections.delete(address);
8059
8057
  };
8060
8058
  const listen = () => {
8061
- document.addEventListener('focusin', handleFocus$2);
8059
+ document.addEventListener('focusin', handleFocus$1);
8062
8060
  document.addEventListener('focusout', handleFocusOut$2);
8063
8061
  document.addEventListener('input', cancelPendingAddressSelection);
8064
8062
  document.addEventListener('keydown', cancelPendingAddressSelection);
@@ -8127,7 +8125,7 @@ const restoreBrowserParent$1 = uid => {
8127
8125
  if (browser && marker.isConnected) marker.replaceWith(browser);else marker.remove();
8128
8126
  };
8129
8127
 
8130
- const handleInput$3 = value => {
8128
+ const handleInput$2 = value => {
8131
8129
  send$1('SimpleBrowser.handleInput', value);
8132
8130
  };
8133
8131
  const acceptSuggestion = value => {
@@ -8153,14 +8151,14 @@ const openExternal = () => {
8153
8151
  };
8154
8152
 
8155
8153
  const simpleBrowserAddressName = 'simple-browser-address';
8156
- const handleInput$2 = event => {
8154
+ const handleInput$1 = event => {
8157
8155
  const {
8158
8156
  target
8159
8157
  } = event;
8160
8158
  const {
8161
8159
  value
8162
8160
  } = target;
8163
- handleInput$3(value);
8161
+ handleInput$2(value);
8164
8162
  };
8165
8163
  const handleClickSuggestion = event => {
8166
8164
  const suggestion = event.target.closest?.('.SimpleBrowserSuggestion');
@@ -8170,7 +8168,7 @@ const handleClickSuggestion = event => {
8170
8168
  }
8171
8169
  acceptSuggestion(value);
8172
8170
  };
8173
- const handleFocus$1 = event => {
8171
+ const handleFocus = event => {
8174
8172
  const {
8175
8173
  target
8176
8174
  } = event;
@@ -8225,8 +8223,8 @@ const ViewletSimpleBrowserEvents = {
8225
8223
  handleClickOpenExternal,
8226
8224
  handleClickReload,
8227
8225
  handleClickSuggestion,
8228
- handleFocus: handleFocus$1,
8229
- handleInput: handleInput$2
8226
+ handleFocus,
8227
+ handleInput: handleInput$1
8230
8228
  };
8231
8229
 
8232
8230
  const ViewletSimpleBrowser = {
@@ -8238,185 +8236,9 @@ const ViewletSimpleBrowserHistory = {
8238
8236
  __proto__: null
8239
8237
  };
8240
8238
 
8241
- // TODO this module should be called DOM or DOM utils
8242
-
8243
- // TODO this module makes for weird code splitting chunks,
8244
- // maybe duplicate the code per file for better chunks
8245
-
8246
- const findIndex$1 = ($Container, $Target) => {
8247
- while ($Target && $Target.parentNode !== $Container) {
8248
- $Target = $Target.parentNode;
8249
- }
8250
- if (!$Target) {
8251
- return -1;
8252
- }
8253
- for (let i = 0; i < $Container.children.length; i++) {
8254
- if ($Container.children[i] === $Target) {
8255
- return i;
8256
- }
8257
- }
8258
- return -1;
8259
- };
8260
-
8261
- const handleContextMenu$2 = event => {
8262
- preventDefault(event);
8263
- const {
8264
- button,
8265
- clientX,
8266
- clientY
8267
- } = event;
8268
- const uid = fromEvent(event);
8269
- handleContextMenu$6(uid, button, clientX, clientY);
8270
- };
8271
-
8272
- const handleFocus = event => {
8273
- const uid = fromEvent(event);
8274
- handleFocus$8(uid);
8275
- };
8276
- const getButtonIndex = $Node => {
8277
- let index = -1;
8278
- while ($Node?.classList.contains('SourceControlButton')) {
8279
- $Node = $Node.previousElementSibling;
8280
- index++;
8281
- }
8282
- return index;
8283
- };
8284
- const handleClick$3 = event => {
8285
- const {
8286
- target
8287
- } = event;
8288
- const uid = fromEvent(event);
8289
- const $Button = target.closest?.('.SourceControlButton');
8290
- if ($Button) {
8291
- const index = getButtonIndex($Button);
8292
- handleButtonClick(uid, index);
8293
- return;
8294
- }
8295
- const $Parent = target.closest('.SourceControlItems');
8296
- if (!$Parent) {
8297
- return;
8298
- }
8299
- const index = findIndex$1($Parent, target);
8300
- if (index === -1) {
8301
- return;
8302
- }
8303
- handleClick$6(uid, index);
8304
- };
8305
- const handleMouseOver = event => {
8306
- const {
8307
- target
8308
- } = event;
8309
- const $Parent = target.closest('.SourceControlItems');
8310
- if (!$Parent) {
8311
- return;
8312
- }
8313
- const index = findIndex$1($Parent, target);
8314
- const uid = fromEvent(event);
8315
- handleMouseOver$1(uid, index);
8316
- };
8317
- const handleMouseOut = event => {
8318
- const {
8319
- relatedTarget,
8320
- target
8321
- } = event;
8322
- if (!relatedTarget) {
8323
- return;
8324
- }
8325
- const $Parent = relatedTarget.closest('.SourceControlItems');
8326
- const uid = fromEvent(event);
8327
- if (!$Parent) {
8328
- handleMouseOut$1(uid, -1);
8329
- return;
8330
- }
8331
- const index = findIndex$1($Parent, target);
8332
- handleMouseOut$1(uid, index);
8333
- };
8334
- const handleInput$1 = event => {
8335
- const {
8336
- target
8337
- } = event;
8338
- const {
8339
- value
8340
- } = target;
8341
- const uid = fromEvent(event);
8342
- handleInput$6(uid, value);
8343
- };
8344
-
8345
- const ViewletSourceControlEvents = {
8346
- __proto__: null,
8347
- handleClick: handleClick$3,
8348
- handleContextMenu: handleContextMenu$2,
8349
- handleFocus,
8350
- handleInput: handleInput$1,
8351
- handleMouseOut,
8352
- handleMouseOver,
8353
- handleWheel: handleWheel$2
8354
- };
8355
-
8356
- const focus$4 = state => {
8357
- const {
8358
- $Viewlet
8359
- } = state;
8360
- $Viewlet.querySelector(':scope input').focus();
8361
- };
8362
-
8363
- const ViewletSourceControl = {
8364
- __proto__: null,
8365
- Events: ViewletSourceControlEvents,
8366
- focus: focus$4
8367
- };
8368
-
8369
- const handleClick$2 = event => {
8370
- const uid = fromEvent(event);
8371
- const {
8372
- clientX,
8373
- clientY
8374
- } = event;
8375
- handleClick$6(uid, clientX, clientY);
8376
- };
8377
-
8378
- const ViewletStatusBarEvents = {
8379
- __proto__: null,
8380
- handleClick: handleClick$2
8381
- };
8382
-
8383
- const create$7 = () => {
8384
- const $Viewlet = document.createElement('div');
8385
- $Viewlet.id = 'StatusBar';
8386
- $Viewlet.className = 'Viewlet StatusBar';
8387
- $Viewlet.tabIndex = 0;
8388
- $Viewlet.role = Status;
8389
- $Viewlet.ariaRoleDescription = StatusBar;
8390
- $Viewlet.ariaLive = 'off'; // see https://github.com/microsoft/vscode/issues/94677
8391
- $Viewlet.addEventListener('click', handleClick$2);
8392
- return {
8393
- $Viewlet
8394
- };
8395
- };
8396
- const setDom$2 = (state, dom) => {
8397
- const {
8398
- $Viewlet
8399
- } = state;
8400
- renderInto($Viewlet, dom, ViewletStatusBarEvents);
8401
- };
8402
- const focus$3 = state => {
8403
- object(state);
8404
- const {
8405
- $Viewlet
8406
- } = state;
8407
- $Viewlet.focus();
8408
- };
8409
-
8410
- const ViewletStatusBar = {
8411
- __proto__: null,
8412
- create: create$7,
8413
- focus: focus$3,
8414
- setDom: setDom$2
8415
- };
8416
-
8417
8239
  const handleClick$1 = event => {
8418
8240
  const uid = fromEvent(event);
8419
- handleClick$6(uid);
8241
+ handleClick$4(uid);
8420
8242
  };
8421
8243
 
8422
8244
  const ViewletStorageEvents = {
@@ -8530,6 +8352,26 @@ const create$BackDrop = () => {
8530
8352
  return $BackDrop;
8531
8353
  };
8532
8354
 
8355
+ // TODO this module should be called DOM or DOM utils
8356
+
8357
+ // TODO this module makes for weird code splitting chunks,
8358
+ // maybe duplicate the code per file for better chunks
8359
+
8360
+ const findIndex$1 = ($Container, $Target) => {
8361
+ while ($Target && $Target.parentNode !== $Container) {
8362
+ $Target = $Target.parentNode;
8363
+ }
8364
+ if (!$Target) {
8365
+ return -1;
8366
+ }
8367
+ for (let i = 0; i < $Container.children.length; i++) {
8368
+ if ($Container.children[i] === $Target) {
8369
+ return i;
8370
+ }
8371
+ }
8372
+ return -1;
8373
+ };
8374
+
8533
8375
  // TODO when pressing tab -> focus next element in tab order and close menu
8534
8376
 
8535
8377
  // TODO menu and contextmenu should have own keybinding logic
@@ -8724,7 +8566,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom = [],
8724
8566
  state$6.$$Menus.push($Menu);
8725
8567
  append$1($Menu);
8726
8568
  if (level === 0) {
8727
- focus$8($Menu);
8569
+ focus$6($Menu);
8728
8570
  send$1('Focus.setFocus', FocusMenu);
8729
8571
  }
8730
8572
  };
@@ -8842,7 +8684,7 @@ const handlePointerOver = event => {
8842
8684
  } = event;
8843
8685
  const index = getIndex(target);
8844
8686
  const uid = fromEvent(event);
8845
- handleMouseOver$1(uid, index);
8687
+ handleMouseOver(uid, index);
8846
8688
  };
8847
8689
  const handlePointerOut = event => {
8848
8690
  const {
@@ -8850,7 +8692,7 @@ const handlePointerOut = event => {
8850
8692
  } = event;
8851
8693
  const index = getIndex(target);
8852
8694
  const uid = fromEvent(event);
8853
- handleMouseOut$1(uid, index);
8695
+ handleMouseOut(uid, index);
8854
8696
  };
8855
8697
  const getIndex = $Target => {
8856
8698
  if ($Target.classList.contains('TitleBarTopLevelEntry')) {
@@ -8865,7 +8707,7 @@ const handleClick = event => {
8865
8707
  } = event;
8866
8708
  const index = getIndex(target);
8867
8709
  const uid = fromEvent(event);
8868
- handleClick$6(uid, button, index);
8710
+ handleClick$4(uid, button, index);
8869
8711
  };
8870
8712
  const getLevelAndIndex = event => {
8871
8713
  const {
@@ -8911,7 +8753,7 @@ const handleMenuClick = event => {
8911
8753
  };
8912
8754
  const handleFocusIn$1 = event => {
8913
8755
  const uid = fromEvent(event);
8914
- handleFocus$8(uid);
8756
+ handleFocus$7(uid);
8915
8757
  };
8916
8758
 
8917
8759
  const ViewletTitleBarMenuBarEvents = {
@@ -9437,8 +9279,6 @@ const moduleLoaders = {
9437
9279
  [Sidebar$1]: () => ViewletSidebar,
9438
9280
  [SimpleBrowser]: () => ViewletSimpleBrowser,
9439
9281
  [SimpleBrowserHistory]: () => ViewletSimpleBrowserHistory,
9440
- [SourceControl]: () => ViewletSourceControl,
9441
- [StatusBar$1]: () => ViewletStatusBar,
9442
9282
  [Storage]: () => ViewletStorage,
9443
9283
  [Terminal2]: () => Promise.resolve().then(function () { return ViewletTerminal2; }),
9444
9284
  [Terminals]: () => ViewletTerminals,
@@ -9960,7 +9800,7 @@ const move = async (uid, selector, target) => {
9960
9800
  const attachWindowEvents = () => {
9961
9801
  attachEvents$7(window, {
9962
9802
  [Blur]: handleBlur$2,
9963
- [Focus]: handleFocus$3,
9803
+ [Focus]: handleFocus$2,
9964
9804
  [KeyDown]: handleKeyDown$1,
9965
9805
  [KeyUp]: handleKeyUp,
9966
9806
  [Resize]: handleResize
@@ -11878,6 +11718,27 @@ const checkConditionError = (fnName, ...params) => {
11878
11718
  const fn = ConditionValues[getConditionName(fnName)];
11879
11719
  return fn(...params);
11880
11720
  };
11721
+ const toMatchScreenShot = async (locator, uri) => {
11722
+ string(uri);
11723
+ const parsedSelector = getParsedSelector(locator);
11724
+ await waitForCondition(() => Boolean(querySelectorOne(parsedSelector)));
11725
+ const element = querySelectorOne(parsedSelector);
11726
+ if (!element) {
11727
+ throw new Error(`[SCREENSHOT_ELEMENT_NOT_FOUND] ${JSON.stringify(parsedSelector)}: ${uri}`);
11728
+ }
11729
+ const host = globalThis;
11730
+ if (!host.lvceMatchScreenshot) {
11731
+ throw new Error(`[SCREENSHOT_RUNNER_UNAVAILABLE] Run with a screenshot-capable test-with-playwright: ${uri}`);
11732
+ }
11733
+ const targets = host.lvceScreenshotTargets ||= new Map();
11734
+ const token = crypto.randomUUID();
11735
+ targets.set(token, element);
11736
+ try {
11737
+ await host.lvceMatchScreenshot(uri, token);
11738
+ } finally {
11739
+ targets.delete(token);
11740
+ }
11741
+ };
11881
11742
 
11882
11743
  const LocalStorage = 1;
11883
11744
  const SessionStorage = 2;
@@ -12026,7 +11887,7 @@ const forwardRendererWorkerCommand = (method, ...params) => {
12026
11887
  send$1(method, ...params);
12027
11888
  };
12028
11889
  const handleMessagePort = async (port, rpcId) => {
12029
- const rpc = await create$B({
11890
+ const rpc = await create$A({
12030
11891
  commandMap: {
12031
11892
  'Viewlet.forwardRendererWorkerCommand': forwardRendererWorkerCommand,
12032
11893
  'Viewlet.queueCommands': queueCommands
@@ -12392,7 +12253,7 @@ const commandMap = {
12392
12253
  'HotReload.getStatus': getStatus,
12393
12254
  'HotReload.request': request,
12394
12255
  'InitData.getInitData': getInitData,
12395
- 'IpcParent.create': create$u,
12256
+ 'IpcParent.create': create$t,
12396
12257
  'IpcParent.dispose': dispose$l,
12397
12258
  'KeyBindings.setIdentifiers': setIdentifiers,
12398
12259
  'Layout.getBounds': getBounds,
@@ -12450,6 +12311,7 @@ const commandMap = {
12450
12311
  'TestFrameWork.performKeyBoardAction': performKeyboardAction,
12451
12312
  'TestFrameWork.showOverlay': showOverlay,
12452
12313
  'TestFrameWork.showTestResults': showTestResults,
12314
+ 'TestFrameWork.toMatchScreenShot': toMatchScreenShot,
12453
12315
  'TestFrameWork.transfer': transfer,
12454
12316
  'TestFrameWork.transferToWebView': transferToWebView,
12455
12317
  'Viewlet.addKeyBindings': addKeyBindings,
@@ -12969,7 +12831,7 @@ const mountTerminal = async (state, uid) => {
12969
12831
  return;
12970
12832
  }
12971
12833
  const inputDisposable = terminal.onData(data => {
12972
- handleInput$6(uid, data);
12834
+ handleInput$5(uid, data);
12973
12835
  });
12974
12836
  const resizeDisposable = terminal.onResize(({
12975
12837
  cols,