@lvce-editor/renderer-process 10.61.0 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -686,7 +686,7 @@ const getErrorResponse = (message, error, preparePrettyError, logError) => {
686
686
  const errorProperty = getErrorProperty(error, prettyError);
687
687
  return create$1$1(message, errorProperty);
688
688
  };
689
- const create$K = (message, result) => {
689
+ const create$I = (message, result) => {
690
690
  return {
691
691
  jsonrpc: Two,
692
692
  id: message.id,
@@ -695,7 +695,7 @@ const create$K = (message, result) => {
695
695
  };
696
696
  const getSuccessResponse = (message, result) => {
697
697
  const resultProperty = result ?? null;
698
- return create$K(message, resultProperty);
698
+ return create$I(message, resultProperty);
699
699
  };
700
700
  const getResponse = async (message, ipc, execute, preparePrettyError, logError, requiresSocket) => {
701
701
  try {
@@ -879,7 +879,7 @@ const launchWorker = async ({
879
879
  name,
880
880
  url
881
881
  }) => {
882
- const worker = await create$J({
882
+ const worker = await create$H({
883
883
  method: Auto,
884
884
  url,
885
885
  name
@@ -954,7 +954,7 @@ const hydrate$4 = async () => {
954
954
  };
955
955
 
956
956
  // TODO needed?
957
- const dispose$m = () => {
957
+ const dispose$l = () => {
958
958
  // @ts-expect-error
959
959
  if (state$9.rendererWorker) {
960
960
  // @ts-expect-error
@@ -977,7 +977,7 @@ const invokeAndTransfer = (method, ...params) => {
977
977
 
978
978
  const RendererWorker = {
979
979
  __proto__: null,
980
- dispose: dispose$m,
980
+ dispose: dispose$l,
981
981
  hydrate: hydrate$4,
982
982
  invoke: invoke$1,
983
983
  invokeAndTransfer,
@@ -986,7 +986,7 @@ const RendererWorker = {
986
986
  state: state$9
987
987
  };
988
988
 
989
- const create$J = async ({
989
+ const create$H = async ({
990
990
  method,
991
991
  ...options
992
992
  }) => {
@@ -1007,7 +1007,7 @@ const create$J = async ({
1007
1007
  };
1008
1008
 
1009
1009
  const launchEditorWorker = async port => {
1010
- const ipc = await create$J({
1010
+ const ipc = await create$H({
1011
1011
  name: 'Editor Worker',
1012
1012
  url: editorWorkerUrl,
1013
1013
  method: ModuleWorkerWithMessagePort,
@@ -1037,7 +1037,7 @@ const extensionHostWorkerUrl = getConfiguredExtensionHostWorkerUrl() || `${asset
1037
1037
 
1038
1038
  const launchExtensionHostWorker = async port => {
1039
1039
  const name = isElectron ? 'Extension Host (Electron)' : 'Extension Host';
1040
- const ipc = await create$J({
1040
+ const ipc = await create$H({
1041
1041
  name,
1042
1042
  url: extensionHostWorkerUrl,
1043
1043
  method: ModuleWorkerWithMessagePort,
@@ -1061,7 +1061,7 @@ const hydrate$2 = async () => {
1061
1061
  const syntaxHighlightingWorkerUrl = `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/syntax-highlighting-worker/dist/syntaxHighlightingWorkerMain.js`;
1062
1062
 
1063
1063
  const launchSyntaxHighlightingWorker = async port => {
1064
- const ipc = await create$J({
1064
+ const ipc = await create$H({
1065
1065
  name: 'Syntax Highlighting Worker',
1066
1066
  url: syntaxHighlightingWorkerUrl,
1067
1067
  method: ModuleWorkerWithMessagePort,
@@ -2022,7 +2022,7 @@ const stopTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp)
2022
2022
  // TODO use pointerlost event instead
2023
2023
  $Target.removeEventListener(PointerUp, handlePointerUp);
2024
2024
  };
2025
- const create$I = (pointerDown, pointerMove, pointerUp) => {
2025
+ const create$G = (pointerDown, pointerMove, pointerUp) => {
2026
2026
  const shared = (fn, event) => {
2027
2027
  const message = fn(event);
2028
2028
  if (!message || message.length === 0) {
@@ -2055,7 +2055,7 @@ const create$I = (pointerDown, pointerMove, pointerUp) => {
2055
2055
  };
2056
2056
 
2057
2057
  const handleOffset = 20;
2058
- const handleSliderPointerDown = create$I(event => {
2058
+ const handleSliderPointerDown = create$G(event => {
2059
2059
  const {
2060
2060
  clientX,
2061
2061
  clientY
@@ -2070,7 +2070,7 @@ const handleSliderPointerDown = create$I(event => {
2070
2070
  }, () => {
2071
2071
  return [];
2072
2072
  });
2073
- const handlePointerDown$6 = event => {
2073
+ const handlePointerDown$5 = event => {
2074
2074
  const {
2075
2075
  target
2076
2076
  } = event;
@@ -2083,7 +2083,7 @@ const returnValue$9 = true;
2083
2083
 
2084
2084
  const ViewletColorPickerEvents = {
2085
2085
  __proto__: null,
2086
- handlePointerDown: handlePointerDown$6,
2086
+ handlePointerDown: handlePointerDown$5,
2087
2087
  returnValue: returnValue$9
2088
2088
  };
2089
2089
 
@@ -2223,9 +2223,9 @@ forwardViewletCommand('focusIndex');
2223
2223
  forwardViewletCommand('focusNext');
2224
2224
  forwardViewletCommand('focusPrevious');
2225
2225
  const handleAudioError$1 = forwardViewletCommand('handleAudioError');
2226
- const handleBeforeInput$2 = forwardViewletCommand('handleBeforeInput');
2226
+ forwardViewletCommand('handleBeforeInput');
2227
2227
  forwardViewletCommand('handleBeforeInputFromContentEditable');
2228
- const handleBlur$a = forwardViewletCommand('handleBlur');
2228
+ const handleBlur$9 = forwardViewletCommand('handleBlur');
2229
2229
  const handleButtonClick = forwardViewletCommand('handleButtonClick');
2230
2230
  const handleClick$6 = forwardViewletCommand('handleClick');
2231
2231
  const handleClickAction$2 = forwardViewletCommand('handleClickAction');
@@ -2268,7 +2268,7 @@ forwardViewletCommand('handleMouseMove');
2268
2268
  const handleMouseOut$1 = forwardViewletCommand('handleMouseOut');
2269
2269
  const handleMouseOver$1 = forwardViewletCommand('handleMouseOver');
2270
2270
  forwardViewletCommand('handlePointerCaptureLost');
2271
- const handlePointerDown$5 = forwardViewletCommand('handlePointerDown');
2271
+ const handlePointerDown$4 = forwardViewletCommand('handlePointerDown');
2272
2272
  const handlePointerMove$1 = forwardViewletCommand('handlePointerMove');
2273
2273
  forwardViewletCommand('handlePointerOver');
2274
2274
  const handlePointerUp$1 = forwardViewletCommand('handlePointerUp');
@@ -2319,15 +2319,15 @@ const handleFocusIn$3 = event => {
2319
2319
  const uid = fromEvent(event);
2320
2320
  handleFocusIn$4(uid);
2321
2321
  };
2322
- const handleBlur$9 = event => {
2322
+ const handleBlur$8 = event => {
2323
2323
  preventDefault(event);
2324
2324
  const uid = fromEvent(event);
2325
- handleBlur$a(uid);
2325
+ handleBlur$9(uid);
2326
2326
  };
2327
2327
 
2328
2328
  const ViewletEditorCodeGeneratorEvents = {
2329
2329
  __proto__: null,
2330
- handleBlur: handleBlur$9,
2330
+ handleBlur: handleBlur$8,
2331
2331
  handleFocusIn: handleFocusIn$3
2332
2332
  };
2333
2333
 
@@ -2344,10 +2344,10 @@ const appendWidget$5 = state => {
2344
2344
  } = state;
2345
2345
  append$1($Viewlet);
2346
2346
  };
2347
- const dispose$l = state => {
2347
+ const dispose$k = state => {
2348
2348
  remove$2(state.$Viewlet);
2349
2349
  };
2350
- const focus$i = (state, key, source) => {
2350
+ const focus$h = (state, key, source) => {
2351
2351
  if (!key) {
2352
2352
  return;
2353
2353
  }
@@ -2370,8 +2370,8 @@ const ViewletEditorCodeGenerator = {
2370
2370
  __proto__: null,
2371
2371
  Events: ViewletEditorCodeGeneratorEvents,
2372
2372
  appendWidget: appendWidget$5,
2373
- dispose: dispose$l,
2374
- focus: focus$i,
2373
+ dispose: dispose$k,
2374
+ focus: focus$h,
2375
2375
  setBounds: setBounds$9
2376
2376
  };
2377
2377
 
@@ -2391,9 +2391,8 @@ const Status = 'status';
2391
2391
  const TabList = 'tablist';
2392
2392
  const TextBox = 'textbox';
2393
2393
  const ToolBar = 'toolbar';
2394
- const ComboBox = 'combobox';
2395
2394
 
2396
- const attachEvents$c = ($Node, eventMap) => {
2395
+ const attachEvents$b = ($Node, eventMap) => {
2397
2396
  for (const [key, value] of Object.entries(eventMap)) {
2398
2397
  $Node.addEventListener(key, value);
2399
2398
  }
@@ -2522,7 +2521,7 @@ const setNegativeMargin = (state, negativeMargin) => {
2522
2521
  setTop($ListItems, negativeMargin);
2523
2522
  };
2524
2523
 
2525
- const create$H = () => {
2524
+ const create$F = () => {
2526
2525
  const $ListItems = document.createElement('div');
2527
2526
  $ListItems.className = 'ListItems';
2528
2527
  $ListItems.role = ListBox;
@@ -2546,17 +2545,17 @@ const create$H = () => {
2546
2545
  $ScrollBarThumb
2547
2546
  };
2548
2547
  };
2549
- const attachEvents$b = state => {
2548
+ const attachEvents$a = state => {
2550
2549
  const {
2551
2550
  $Viewlet,
2552
2551
  $ListItems,
2553
2552
  $ScrollBar
2554
2553
  } = state;
2555
2554
  $Viewlet.addEventListener(Wheel, handleWheel$3, Passive);
2556
- attachEvents$c($ListItems, {
2555
+ attachEvents$b($ListItems, {
2557
2556
  [MouseDown]: handleMousedown
2558
2557
  });
2559
- attachEvents$c($ScrollBar, {
2558
+ attachEvents$b($ScrollBar, {
2560
2559
  [PointerDown]: handleScrollBarPointerDown$3
2561
2560
  });
2562
2561
  };
@@ -2575,7 +2574,7 @@ const setDom$9 = (state, dom) => {
2575
2574
  // TODO recycle nodes
2576
2575
  // TODO set right aria attributes on $EditorInput
2577
2576
  };
2578
- const dispose$k = state => {
2577
+ const dispose$j = state => {
2579
2578
  remove$2(state.$Viewlet);
2580
2579
  // state.$EditorInput.removeAttribute('aria-activedescendant')
2581
2580
  };
@@ -2605,9 +2604,9 @@ const setBounds$8 = (state, x, y, width, height) => {
2605
2604
 
2606
2605
  const ViewletEditorCompletion = {
2607
2606
  __proto__: null,
2608
- attachEvents: attachEvents$b,
2609
- create: create$H,
2610
- dispose: dispose$k,
2607
+ attachEvents: attachEvents$a,
2608
+ create: create$F,
2609
+ dispose: dispose$j,
2611
2610
  handleError: handleError$7,
2612
2611
  setBounds: setBounds$8,
2613
2612
  setContentHeight,
@@ -2629,7 +2628,7 @@ const ViewletEditorCompletionDetailsEvents = {
2629
2628
  returnValue: returnValue$8
2630
2629
  };
2631
2630
 
2632
- const create$G = () => {
2631
+ const create$E = () => {
2633
2632
  const $Viewlet = document.createElement('div');
2634
2633
  $Viewlet.className = 'Viewlet EditorCompletionDetails';
2635
2634
  $Viewlet.id = 'CompletionsDetails';
@@ -2637,7 +2636,7 @@ const create$G = () => {
2637
2636
  $Viewlet
2638
2637
  };
2639
2638
  };
2640
- const attachEvents$a = state => {
2639
+ const attachEvents$9 = state => {
2641
2640
  // TODO
2642
2641
  };
2643
2642
  const setDom$8 = (state, dom) => {
@@ -2655,7 +2654,7 @@ const appendWidget$4 = state => {
2655
2654
  } = state;
2656
2655
  append$1($Viewlet);
2657
2656
  };
2658
- const dispose$j = state => {
2657
+ const dispose$i = state => {
2659
2658
  remove$2(state.$Viewlet);
2660
2659
  };
2661
2660
  const setBounds$7 = (state, x, y, width, height) => {
@@ -2669,9 +2668,9 @@ const ViewletEditorCompletionDetails = {
2669
2668
  __proto__: null,
2670
2669
  Events: ViewletEditorCompletionDetailsEvents,
2671
2670
  appendWidget: appendWidget$4,
2672
- attachEvents: attachEvents$a,
2673
- create: create$G,
2674
- dispose: dispose$j,
2671
+ attachEvents: attachEvents$9,
2672
+ create: create$E,
2673
+ dispose: dispose$i,
2675
2674
  setBounds: setBounds$7,
2676
2675
  setDom: setDom$8
2677
2676
  };
@@ -2679,7 +2678,7 @@ const ViewletEditorCompletionDetails = {
2679
2678
  const rememberFocus = rememberFocus$1;
2680
2679
 
2681
2680
  const returnValue$7 = true;
2682
- const handleSashPointerDown$2 = create$I(event => {
2681
+ const handleSashPointerDown$2 = create$G(event => {
2683
2682
  const {
2684
2683
  clientX,
2685
2684
  clientY
@@ -2738,7 +2737,7 @@ const handleFocusIn$2 = event => {
2738
2737
  const uid = fromEvent(event);
2739
2738
  handleFocusIn$4(uid);
2740
2739
  };
2741
- const handleBlur$8 = event => {
2740
+ const handleBlur$7 = event => {
2742
2741
  const uid = fromEvent(event);
2743
2742
  executeViewletCommand(uid, 'EditorRename.handleBlur');
2744
2743
  };
@@ -2755,7 +2754,7 @@ const handleInput$6 = event => {
2755
2754
 
2756
2755
  const ViewletEditorRenameEvents = {
2757
2756
  __proto__: null,
2758
- handleBlur: handleBlur$8,
2757
+ handleBlur: handleBlur$7,
2759
2758
  handleFocusIn: handleFocusIn$2,
2760
2759
  handleInput: handleInput$6
2761
2760
  };
@@ -2773,7 +2772,7 @@ const appendWidget$2 = state => {
2773
2772
  } = state;
2774
2773
  append$1($Viewlet);
2775
2774
  };
2776
- const dispose$i = state => {
2775
+ const dispose$h = state => {
2777
2776
  remove$2(state.$Viewlet);
2778
2777
  };
2779
2778
 
@@ -2781,7 +2780,7 @@ const ViewletEditorRename = {
2781
2780
  __proto__: null,
2782
2781
  Events: ViewletEditorRenameEvents,
2783
2782
  appendWidget: appendWidget$2,
2784
- dispose: dispose$i,
2783
+ dispose: dispose$h,
2785
2784
  setBounds: setBounds$5
2786
2785
  };
2787
2786
 
@@ -2809,7 +2808,7 @@ const appendWidget$1 = state => {
2809
2808
  } = state;
2810
2809
  append$1($Viewlet);
2811
2810
  };
2812
- const dispose$h = state => {
2811
+ const dispose$g = state => {
2813
2812
  remove$2(state.$Viewlet);
2814
2813
  };
2815
2814
 
@@ -2817,7 +2816,7 @@ const ViewletEditorSourceActions = {
2817
2816
  __proto__: null,
2818
2817
  Events: ViewletEditorSourceActionsEvents,
2819
2818
  appendWidget: appendWidget$1,
2820
- dispose: dispose$h,
2819
+ dispose: dispose$g,
2821
2820
  setBounds: setBounds$4
2822
2821
  };
2823
2822
 
@@ -2910,7 +2909,7 @@ const ViewletFindWidgetEvents = {
2910
2909
  returnValue: returnValue$6
2911
2910
  };
2912
2911
 
2913
- const create$F = () => {
2912
+ const create$D = () => {
2914
2913
  const $Viewlet = document.createElement('div');
2915
2914
  $Viewlet.className = 'Viewlet FindWidget';
2916
2915
  $Viewlet.role = Group;
@@ -2918,7 +2917,7 @@ const create$F = () => {
2918
2917
  $Viewlet
2919
2918
  };
2920
2919
  };
2921
- const focus$h = (state, key, source) => {
2920
+ const focus$g = (state, key, source) => {
2922
2921
  if (!key) {
2923
2922
  return;
2924
2923
  }
@@ -2936,7 +2935,7 @@ const focus$h = (state, key, source) => {
2936
2935
  $Element.focus();
2937
2936
  applyUidWorkaround($Viewlet);
2938
2937
  };
2939
- const setValue$3 = (state, value) => {
2938
+ const setValue$2 = (state, value) => {
2940
2939
  const {
2941
2940
  $Viewlet
2942
2941
  } = state;
@@ -2964,7 +2963,7 @@ const setBounds$3 = (state, x, y, width, height) => {
2964
2963
  } = state;
2965
2964
  setBounds$a($Viewlet, x, y, width, height);
2966
2965
  };
2967
- const dispose$g = state => {
2966
+ const dispose$f = state => {
2968
2967
  remove$2(state.$Viewlet);
2969
2968
  };
2970
2969
  const Events$9 = ViewletFindWidgetEvents;
@@ -2973,12 +2972,12 @@ const ViewletFindWidget = {
2973
2972
  __proto__: null,
2974
2973
  Events: Events$9,
2975
2974
  appendWidget,
2976
- create: create$F,
2977
- dispose: dispose$g,
2978
- focus: focus$h,
2975
+ create: create$D,
2976
+ dispose: dispose$f,
2977
+ focus: focus$g,
2979
2978
  setBounds: setBounds$3,
2980
2979
  setDom: setDom$6,
2981
- setValue: setValue$3
2980
+ setValue: setValue$2
2982
2981
  };
2983
2982
 
2984
2983
  const ActivityBar = 'ActivityBar';
@@ -3011,7 +3010,6 @@ const MainTabs = 'MainTabs';
3011
3010
  const Output = 'Output';
3012
3011
  const Panel = 'Panel';
3013
3012
  const Problems = 'Problems';
3014
- const QuickPick = 'QuickPick';
3015
3013
  const References = 'References';
3016
3014
  const RunAndDebug = 'Run And Debug';
3017
3015
  const ScreenCapture = 'ScreenCapture';
@@ -3476,7 +3474,7 @@ const getWorkerDisplayName = name => {
3476
3474
  }
3477
3475
  return `${name} worker`;
3478
3476
  };
3479
- const create$E = async ({
3477
+ const create$C = async ({
3480
3478
  url,
3481
3479
  name
3482
3480
  }) => {
@@ -3543,7 +3541,7 @@ const wrap = worker => {
3543
3541
 
3544
3542
  const IpcParentWithModuleWorker = {
3545
3543
  __proto__: null,
3546
- create: create$E,
3544
+ create: create$C,
3547
3545
  wrap
3548
3546
  };
3549
3547
 
@@ -3551,7 +3549,7 @@ const isMessagePort$1 = value => {
3551
3549
  return value instanceof MessagePort;
3552
3550
  };
3553
3551
 
3554
- const create$D = async ({
3552
+ const create$B = async ({
3555
3553
  url
3556
3554
  }) => {
3557
3555
  string(url);
@@ -3572,10 +3570,10 @@ const create$D = async ({
3572
3570
 
3573
3571
  const IpcParentWithMessagePort = {
3574
3572
  __proto__: null,
3575
- create: create$D
3573
+ create: create$B
3576
3574
  };
3577
3575
 
3578
- const create$C = async url => {
3576
+ const create$A = async url => {
3579
3577
  const referencePort = await new Promise(resolve => {
3580
3578
  globalThis.acceptReferencePort = resolve;
3581
3579
  import(url);
@@ -3586,7 +3584,7 @@ const create$C = async url => {
3586
3584
 
3587
3585
  const IpcParentWithReferencePort = {
3588
3586
  __proto__: null,
3589
- create: create$C
3587
+ create: create$A
3590
3588
  };
3591
3589
 
3592
3590
  const isWorker = value => {
@@ -3594,12 +3592,12 @@ const isWorker = value => {
3594
3592
  };
3595
3593
 
3596
3594
  // TODO add test
3597
- const create$B = async ({
3595
+ const create$z = async ({
3598
3596
  url,
3599
3597
  name,
3600
3598
  port
3601
3599
  }) => {
3602
- const worker = await create$E({
3600
+ const worker = await create$C({
3603
3601
  url,
3604
3602
  name
3605
3603
  });
@@ -3618,7 +3616,7 @@ const create$B = async ({
3618
3616
 
3619
3617
  const IpcParentWithModuleWorkerWithMessagePort = {
3620
3618
  __proto__: null,
3621
- create: create$B
3619
+ create: create$z
3622
3620
  };
3623
3621
 
3624
3622
  const handleIpcOnce = ipc => {
@@ -3774,7 +3772,7 @@ const fixElectronParameters = value => {
3774
3772
  transfer
3775
3773
  };
3776
3774
  };
3777
- const attachEvents$9 = that => {
3775
+ const attachEvents$8 = that => {
3778
3776
  const handleMessage = (...args) => {
3779
3777
  const data = that.getData(...args);
3780
3778
  that.dispatchEvent(new MessageEvent('message', {
@@ -3791,7 +3789,7 @@ class Ipc extends EventTarget {
3791
3789
  constructor(rawIpc) {
3792
3790
  super();
3793
3791
  this._rawIpc = rawIpc;
3794
- attachEvents$9(this);
3792
+ attachEvents$8(this);
3795
3793
  }
3796
3794
  }
3797
3795
  const E_INCOMPATIBLE_NATIVE_MODULE = 'E_INCOMPATIBLE_NATIVE_MODULE';
@@ -4145,7 +4143,7 @@ const IpcChildWithModuleWorkerAndMessagePort$1 = {
4145
4143
  };
4146
4144
 
4147
4145
  // TODO use handleIncomingIpc function
4148
- const create$A = async ({
4146
+ const create$y = async ({
4149
4147
  port,
4150
4148
  ipcId
4151
4149
  }) => {
@@ -4161,7 +4159,7 @@ const create$A = async ({
4161
4159
 
4162
4160
  const IpcParentWithElectron = {
4163
4161
  __proto__: null,
4164
- create: create$A
4162
+ create: create$y
4165
4163
  };
4166
4164
 
4167
4165
  const play = async src => {
@@ -4336,7 +4334,6 @@ const AriaLabelledBy = 'aria-labelledby';
4336
4334
  const AriaDescribedBy = 'aria-describedby';
4337
4335
  const AriaActiveDescendant = 'aria-activedescendant';
4338
4336
  const AriaSelected = 'aria-selected';
4339
- const AriaControls = 'aria-controls';
4340
4337
  const AriaHidden = 'aria-hidden';
4341
4338
 
4342
4339
  // based on https://github.com/microsoft/vscode/blob/5f87632829dc3ac80203e2377727935184399431/src/vs/base/browser/ui/aria/aria.ts (License MIT)
@@ -4392,7 +4389,7 @@ const AriaAlert = {
4392
4389
  // but that's difficult to know
4393
4390
 
4394
4391
  // TODO hide widget after timeout or mousemove
4395
- const create$z = (message, x, y) => {
4392
+ const create$x = (message, x, y) => {
4396
4393
  const $EditorError = document.createElement('div');
4397
4394
  $EditorError.className = 'EditorWidgetError';
4398
4395
  $EditorError.textContent = message;
@@ -4407,7 +4404,7 @@ const create$z = (message, x, y) => {
4407
4404
 
4408
4405
  const name$s = 'EditorError';
4409
4406
  const Commands$t = {
4410
- create: create$z
4407
+ create: create$x
4411
4408
  };
4412
4409
 
4413
4410
  const EditorError_ipc = {
@@ -4491,7 +4488,7 @@ const showError = (message, y, x) => {
4491
4488
  $ImagePreviewImage
4492
4489
  };
4493
4490
  };
4494
- const create$y = (uri, top, left) => {
4491
+ const create$w = (uri, top, left) => {
4495
4492
  const $ImagePreviewImage = document.createElement('img');
4496
4493
  $ImagePreviewImage.className = 'ImagePreviewImage';
4497
4494
  $ImagePreviewImage.src = uri;
@@ -4516,22 +4513,22 @@ const create$y = (uri, top, left) => {
4516
4513
  const update = (state, uri) => {
4517
4514
  state.$ImagePreviewImage.uri = uri;
4518
4515
  };
4519
- const dispose$f = state => {
4516
+ const dispose$e = state => {
4520
4517
  remove$2(state.$ImagePreview);
4521
4518
  };
4522
4519
 
4523
4520
  const ImagePreview = {
4524
4521
  __proto__: null,
4525
- create: create$y,
4526
- dispose: dispose$f,
4522
+ create: create$w,
4523
+ dispose: dispose$e,
4527
4524
  showError,
4528
4525
  update
4529
4526
  };
4530
4527
 
4531
4528
  const name$p = 'ImagePreview';
4532
4529
  const Commands$q = {
4533
- create: create$y,
4534
- dispose: dispose$f,
4530
+ create: create$w,
4531
+ dispose: dispose$e,
4535
4532
  showError: showError,
4536
4533
  update: update
4537
4534
  };
@@ -4608,7 +4605,7 @@ const InitData_ipc = {
4608
4605
 
4609
4606
  const name$n = 'IpcParent';
4610
4607
  const Commands$o = {
4611
- create: create$J
4608
+ create: create$H
4612
4609
  };
4613
4610
 
4614
4611
  const IpcParent_ipc = {
@@ -4728,7 +4725,7 @@ const create$Notification = message => {
4728
4725
  $Notification.textContent = message;
4729
4726
  return $Notification;
4730
4727
  };
4731
- const create$x = (type, message) => {
4728
+ const create$v = (type, message) => {
4732
4729
  // TODO this pattern might be also useful for activitybar, sidebar etc., creating elements as late as possible, only when actually needed
4733
4730
  const $Notification = create$Notification(message);
4734
4731
  append$1($Notification);
@@ -4773,7 +4770,7 @@ const createWithOptions = (type, message, options) => {
4773
4770
  const $Notification = create$NotificationWithOptions(message, options);
4774
4771
  append$1($Notification);
4775
4772
  };
4776
- const dispose$e = id => {
4773
+ const dispose$d = id => {
4777
4774
  // const $Notification = state.$Notifications
4778
4775
  };
4779
4776
 
@@ -4781,9 +4778,9 @@ const name$h = 'Notification';
4781
4778
 
4782
4779
  // prettier-ignore
4783
4780
  const Commands$i = {
4784
- create: create$x,
4781
+ create: create$v,
4785
4782
  createWithOptions: createWithOptions,
4786
- dispose: dispose$e
4783
+ dispose: dispose$d
4787
4784
  };
4788
4785
 
4789
4786
  const Notification_ipc = {
@@ -4805,7 +4802,7 @@ const set$4 = (canvasId, canvas) => {
4805
4802
  const get$3 = id => {
4806
4803
  return get$4(id);
4807
4804
  };
4808
- const create$w = async (canvasId, objectId) => {
4805
+ const create$u = async (canvasId, objectId) => {
4809
4806
  const canvas = document.createElement('canvas');
4810
4807
  const offscreenCanvas = canvas.transferControlToOffscreen();
4811
4808
  set$4(canvasId, canvas);
@@ -4816,7 +4813,7 @@ const name$g = 'OffscreenCanvas';
4816
4813
 
4817
4814
  // prettier-ignore
4818
4815
  const Commands$h = {
4819
- create: create$w
4816
+ create: create$u
4820
4817
  };
4821
4818
 
4822
4819
  const OffscreenCanvas_ipc = {
@@ -4863,7 +4860,7 @@ const getElement = () => {
4863
4860
  return state$2.$PreviousFocusElement;
4864
4861
  };
4865
4862
 
4866
- const focus$g = $Element => {
4863
+ const focus$f = $Element => {
4867
4864
  if ($Element === document.activeElement) {
4868
4865
  return;
4869
4866
  }
@@ -4883,7 +4880,6 @@ const focusPrevious = () => {
4883
4880
  const FocusDebugInput = 6;
4884
4881
  const FocusLocationList = 17;
4885
4882
  const FocusMenu = 18;
4886
- const FocusQuickPickInput = 20;
4887
4883
  const FocusSimpleBrowserInput = 23;
4888
4884
  const FocusOutput = 28;
4889
4885
 
@@ -5073,7 +5069,7 @@ const showMenu = (x, y, width, height, items, level, parentIndex = -1, dom, mous
5073
5069
  state$1.$$Menus.push($Menu);
5074
5070
  append$1($Menu);
5075
5071
  if (level === 0) {
5076
- focus$g($Menu);
5072
+ focus$f($Menu);
5077
5073
  send('Focus.setFocus', FocusMenu);
5078
5074
  }
5079
5075
  };
@@ -5272,7 +5268,7 @@ const start = async (id, options) => {
5272
5268
  throw new VError$1(error, `Failed to start screen capture`);
5273
5269
  }
5274
5270
  };
5275
- const dispose$d = async (id, options) => {
5271
+ const dispose$c = async (id, options) => {
5276
5272
  try {
5277
5273
  number(id);
5278
5274
  const captureStream = get$2(id);
@@ -5287,7 +5283,7 @@ const dispose$d = async (id, options) => {
5287
5283
 
5288
5284
  const name$b = 'ScreenCapture';
5289
5285
  const Commands$c = {
5290
- dispose: dispose$d,
5286
+ dispose: dispose$c,
5291
5287
  start: start
5292
5288
  };
5293
5289
 
@@ -5957,7 +5953,7 @@ const handleMouseDown$2 = event => {
5957
5953
  const index = getNodeIndex($Item);
5958
5954
  return ['handleClick', button, index, clientX, clientY];
5959
5955
  };
5960
- const handleBlur$7 = () => {
5956
+ const handleBlur$6 = () => {
5961
5957
  return ['handleBlur'];
5962
5958
  };
5963
5959
  const handleFocus$8 = () => {
@@ -5979,7 +5975,7 @@ const returnValue$5 = true;
5979
5975
 
5980
5976
  const ViewletActivityBarEvents = {
5981
5977
  __proto__: null,
5982
- handleBlur: handleBlur$7,
5978
+ handleBlur: handleBlur$6,
5983
5979
  handleContextMenu: handleContextMenu$9,
5984
5980
  handleFocus: handleFocus$8,
5985
5981
  handleMouseDown: handleMouseDown$2,
@@ -6020,14 +6016,14 @@ const ViewletAudio = {
6020
6016
  Events: Events$7
6021
6017
  };
6022
6018
 
6023
- const create$v = () => {
6019
+ const create$t = () => {
6024
6020
  const $Viewlet = document.createElement('div');
6025
6021
  $Viewlet.className = 'Viewlet Clock';
6026
6022
  return {
6027
6023
  $Viewlet
6028
6024
  };
6029
6025
  };
6030
- const dispose$c = state => {};
6026
+ const dispose$b = state => {};
6031
6027
  const refresh$4 = () => {};
6032
6028
  const setTime = (state, time) => {
6033
6029
  object(state);
@@ -6037,8 +6033,8 @@ const setTime = (state, time) => {
6037
6033
 
6038
6034
  const ViewletClock = {
6039
6035
  __proto__: null,
6040
- create: create$v,
6041
- dispose: dispose$c,
6036
+ create: create$t,
6037
+ dispose: dispose$b,
6042
6038
  refresh: refresh$4,
6043
6039
  setTime
6044
6040
  };
@@ -6064,7 +6060,7 @@ const ViewletDebugConsoleEvents = {
6064
6060
  handleInput: handleInput$4
6065
6061
  };
6066
6062
 
6067
- const create$u = () => {
6063
+ const create$s = () => {
6068
6064
  const $Viewlet = document.createElement('div');
6069
6065
  $Viewlet.className = 'Viewlet DebugConsole';
6070
6066
  return {
@@ -6080,7 +6076,7 @@ const setDom$5 = (state, dom) => {
6080
6076
 
6081
6077
  const ViewletDebugConsole = {
6082
6078
  __proto__: null,
6083
- create: create$u,
6079
+ create: create$s,
6084
6080
  setDom: setDom$5
6085
6081
  };
6086
6082
 
@@ -6097,18 +6093,18 @@ const handleKeyDown$3 = event => {
6097
6093
  } = event;
6098
6094
  handleKeyDown$5(uid, key, altKey, ctrlKey, shiftKey, metaKey);
6099
6095
  };
6100
- const handleBlur$6 = event => {
6096
+ const handleBlur$5 = event => {
6101
6097
  const uid = fromEvent(event);
6102
- handleBlur$a(uid);
6098
+ handleBlur$9(uid);
6103
6099
  };
6104
6100
 
6105
6101
  const ViewletDefineKeyBindingEvents = {
6106
6102
  __proto__: null,
6107
- handleBlur: handleBlur$6,
6103
+ handleBlur: handleBlur$5,
6108
6104
  handleKeyDown: handleKeyDown$3
6109
6105
  };
6110
6106
 
6111
- const setValue$2 = (state, value) => {
6107
+ const setValue$1 = (state, value) => {
6112
6108
  object(state);
6113
6109
  string(value);
6114
6110
  const {
@@ -6117,7 +6113,7 @@ const setValue$2 = (state, value) => {
6117
6113
  const $Input = $Viewlet.querySelector('input');
6118
6114
  $Input.value = value;
6119
6115
  };
6120
- const focus$f = state => {
6116
+ const focus$e = state => {
6121
6117
  const {
6122
6118
  $Viewlet
6123
6119
  } = state;
@@ -6128,8 +6124,8 @@ const focus$f = state => {
6128
6124
  const ViewletDefineKeyBinding = {
6129
6125
  __proto__: null,
6130
6126
  Events: ViewletDefineKeyBindingEvents,
6131
- focus: focus$f,
6132
- setValue: setValue$2
6127
+ focus: focus$e,
6128
+ setValue: setValue$1
6133
6129
  };
6134
6130
 
6135
6131
  const setMaskImage = ($Element, icon) => {
@@ -6141,7 +6137,7 @@ const setMaskImage = ($Element, icon) => {
6141
6137
  }
6142
6138
  };
6143
6139
 
6144
- const create$t = icon => {
6140
+ const create$r = icon => {
6145
6141
  const $Icon = document.createElement('div');
6146
6142
  $Icon.className = 'MaskIcon';
6147
6143
  setMaskImage($Icon, icon);
@@ -6151,7 +6147,7 @@ const create$t = icon => {
6151
6147
 
6152
6148
  const create$Button = (label, icon) => {
6153
6149
  // TODO icon div might not be needed (unnecessary html element)
6154
- const $Icon = create$t(icon);
6150
+ const $Icon = create$r(icon);
6155
6151
  const $Button = document.createElement('button');
6156
6152
  $Button.className = 'IconButton';
6157
6153
  $Button.title = label;
@@ -6172,7 +6168,7 @@ const handleClick$4 = event => {
6172
6168
  handleClick$5(index);
6173
6169
  };
6174
6170
 
6175
- const create$s = () => {
6171
+ const create$q = () => {
6176
6172
  const $DialogTitle = document.createElement('h2');
6177
6173
  $DialogTitle.id = 'DialogTitle';
6178
6174
  const $DialogCloseButton = create$Button('Close', 'Close');
@@ -6253,7 +6249,7 @@ const setErrorStack = (state, errorStack) => {
6253
6249
 
6254
6250
  const ViewletDialog = {
6255
6251
  __proto__: null,
6256
- create: create$s,
6252
+ create: create$q,
6257
6253
  postAppend,
6258
6254
  setButtons,
6259
6255
  setCodeFrame,
@@ -6306,7 +6302,7 @@ const handleContextMenu$8 = event => {
6306
6302
  } = event;
6307
6303
  return ['handleContextMenu', button, clientX, clientY];
6308
6304
  };
6309
- const handleSashCornerPointerDown = create$I(event => {
6305
+ const handleSashCornerPointerDown = create$G(event => {
6310
6306
  const {
6311
6307
  clientX,
6312
6308
  clientY
@@ -6484,7 +6480,7 @@ const ViewletE2eTests = {
6484
6480
 
6485
6481
  // TODO aria alert
6486
6482
 
6487
- const create$r = () => {
6483
+ const create$p = () => {
6488
6484
  const $Viewlet = document.createElement('div');
6489
6485
  $Viewlet.className = 'Viewlet EditorError';
6490
6486
  return {
@@ -6506,7 +6502,7 @@ const setBounds$2 = (state, x, y, width, height) => {
6506
6502
 
6507
6503
  const ViewletEditorError = {
6508
6504
  __proto__: null,
6509
- create: create$r,
6505
+ create: create$p,
6510
6506
  setBounds: setBounds$2,
6511
6507
  setDom: setDom$4
6512
6508
  };
@@ -6554,7 +6550,7 @@ const handlePointerCaptureLost$1 = event => {
6554
6550
  /**
6555
6551
  * @param {PointerEvent} event
6556
6552
  */
6557
- const handlePointerDown$4 = event => {
6553
+ const handlePointerDown$3 = event => {
6558
6554
  const {
6559
6555
  pointerId,
6560
6556
  clientX,
@@ -6570,7 +6566,7 @@ const handlePointerDown$4 = event => {
6570
6566
  target.addEventListener(PointerUp, handlePointerUp);
6571
6567
  target.addEventListener(LostPointerCapture, handlePointerCaptureLost$1);
6572
6568
  const uid = fromEvent(event);
6573
- handlePointerDown$5(uid, pointerId, clientX, clientY);
6569
+ handlePointerDown$4(uid, pointerId, clientX, clientY);
6574
6570
  };
6575
6571
 
6576
6572
  /**
@@ -6610,19 +6606,19 @@ const handleFocus$6 = event => {
6610
6606
  handleFocus$a(uid);
6611
6607
  };
6612
6608
 
6613
- const create$q = () => {
6609
+ const create$o = () => {
6614
6610
  const $Viewlet = document.createElement('div');
6615
6611
  $Viewlet.className = 'Viewlet EditorImage';
6616
6612
  return {
6617
6613
  $Viewlet
6618
6614
  };
6619
6615
  };
6620
- const attachEvents$8 = state => {
6616
+ const attachEvents$7 = state => {
6621
6617
  const {
6622
6618
  $Viewlet
6623
6619
  } = state;
6624
- attachEvents$c($Viewlet, {
6625
- [PointerDown]: handlePointerDown$4,
6620
+ attachEvents$b($Viewlet, {
6621
+ [PointerDown]: handlePointerDown$3,
6626
6622
  [PointerUp]: handlePointerUp,
6627
6623
  [ContextMenu]: handleContextMenu$6,
6628
6624
  [FocusIn]: handleFocus$6
@@ -6652,14 +6648,14 @@ const setDom$3 = (state, dom) => {
6652
6648
 
6653
6649
  const ViewletEditorImage = {
6654
6650
  __proto__: null,
6655
- attachEvents: attachEvents$8,
6656
- create: create$q,
6651
+ attachEvents: attachEvents$7,
6652
+ create: create$o,
6657
6653
  setDom: setDom$3,
6658
6654
  setDragging,
6659
6655
  setTransform
6660
6656
  };
6661
6657
 
6662
- const create$p = () => {
6658
+ const create$n = () => {
6663
6659
  const $Viewlet = document.createElement('div');
6664
6660
  $Viewlet.className = 'Viewlet EditorText';
6665
6661
  $Viewlet.textContent = 'loading...';
@@ -6667,7 +6663,7 @@ const create$p = () => {
6667
6663
  $Viewlet
6668
6664
  };
6669
6665
  };
6670
- const dispose$b = state => {};
6666
+ const dispose$a = state => {};
6671
6667
  const refresh$3 = (state, context) => {
6672
6668
  object(state);
6673
6669
  string(context.content);
@@ -6676,15 +6672,14 @@ const refresh$3 = (state, context) => {
6676
6672
 
6677
6673
  const ViewletEditorPlainText = {
6678
6674
  __proto__: null,
6679
- create: create$p,
6680
- dispose: dispose$b,
6675
+ create: create$n,
6676
+ dispose: dispose$a,
6681
6677
  refresh: refresh$3
6682
6678
  };
6683
6679
 
6684
6680
  const List = 'list';
6685
6681
 
6686
6682
  const Editor = 'editor';
6687
- const QuickInput = 'Quick Input';
6688
6683
  const SideBar = 'Side Bar';
6689
6684
  const StatusBar = 'Status Bar';
6690
6685
 
@@ -6806,7 +6801,7 @@ const handleMouseMove = event => {
6806
6801
  } = event;
6807
6802
  return ['handleMouseMove', clientX, clientY, altKey];
6808
6803
  };
6809
- const handleBlur$5 = event => {
6804
+ const handleBlur$4 = event => {
6810
6805
  // needed for save on blur
6811
6806
  // also needed to close completions on blur
6812
6807
  return ['handleBlur'];
@@ -6816,7 +6811,7 @@ const handleBlur$5 = event => {
6816
6811
  *
6817
6812
  * @param {InputEvent} event
6818
6813
  */
6819
- const handleBeforeInput$1 = event => {
6814
+ const handleBeforeInput = event => {
6820
6815
  preventDefault(event);
6821
6816
  const {
6822
6817
  inputType,
@@ -6935,7 +6930,7 @@ const handlePaste = event => {
6935
6930
  const text = getText(clipboardData);
6936
6931
  return ['paste', text];
6937
6932
  };
6938
- const handleScrollBarVerticalPointerDown = create$I(event => {
6933
+ const handleScrollBarVerticalPointerDown = create$G(event => {
6939
6934
  const {
6940
6935
  clientY
6941
6936
  } = event;
@@ -7058,7 +7053,7 @@ const setLineInfos = (state, dom) => {
7058
7053
  // 1. create -> only create dom elements
7059
7054
  // 2. render -> fill elements with attributes and data
7060
7055
  // that way all dom nodes can be recycled
7061
- const create$o = () => {
7056
+ const create$m = () => {
7062
7057
  const $EditorInput = document.createElement('textarea');
7063
7058
  $EditorInput.className = 'EditorInput';
7064
7059
  $EditorInput.ariaAutoComplete = List;
@@ -7072,12 +7067,12 @@ const create$o = () => {
7072
7067
  $EditorInput.role = TextBox;
7073
7068
  // TODO where to best put listeners (side effects)
7074
7069
  attachEventsFunctional($EditorInput, {
7075
- [BeforeInput]: handleBeforeInput$1,
7070
+ [BeforeInput]: handleBeforeInput,
7076
7071
  [CompositionStart]: handleCompositionStart,
7077
7072
  [CompositionUpdate]: handleCompositionUpdate,
7078
7073
  [CompositionEnd]: handleCompositionEnd,
7079
7074
  [Focus]: handleFocus$5,
7080
- [Blur]: handleBlur$5,
7075
+ [Blur]: handleBlur$4,
7081
7076
  [Cut]: handleCut,
7082
7077
  [Paste]: handlePaste,
7083
7078
  returnValue: true
@@ -7225,7 +7220,7 @@ const setDecorationsDom$1 = (state, decorations) => {
7225
7220
  setDecorationsDom$2(state, decorations);
7226
7221
  };
7227
7222
 
7228
- const create$n = create$o;
7223
+ const create$l = create$m;
7229
7224
  const setText$1 = setText$2;
7230
7225
  const setSelections = setSelections$1;
7231
7226
  const setIncrementalEdits = setIncrementalEdits$1;
@@ -7262,13 +7257,13 @@ const hideOverlayMessage = state => {
7262
7257
  }
7263
7258
  };
7264
7259
  const setFocused$1 = setFocused$2;
7265
- const focus$e = setFocused$2;
7260
+ const focus$d = setFocused$2;
7266
7261
  const setDecorationsDom = setDecorationsDom$1;
7267
7262
 
7268
7263
  const ViewletEditorText = {
7269
7264
  __proto__: null,
7270
- create: create$n,
7271
- focus: focus$e,
7265
+ create: create$l,
7266
+ focus: focus$d,
7272
7267
  handleError: handleError$4,
7273
7268
  hideOverlayMessage,
7274
7269
  highlightAsLink,
@@ -7283,7 +7278,7 @@ const ViewletEditorText = {
7283
7278
  showOverlayMessage
7284
7279
  };
7285
7280
 
7286
- const create$m = () => {
7281
+ const create$k = () => {
7287
7282
  const $Viewlet = document.createElement('div');
7288
7283
  $Viewlet.className = 'Viewlet EditorTextError';
7289
7284
  return {
@@ -7299,11 +7294,11 @@ const setMessage$3 = (state, message) => {
7299
7294
 
7300
7295
  const ViewletEditorTextError = {
7301
7296
  __proto__: null,
7302
- create: create$m,
7297
+ create: create$k,
7303
7298
  setMessage: setMessage$3
7304
7299
  };
7305
7300
 
7306
- const create$l = () => {
7301
+ const create$j = () => {
7307
7302
  const $Viewlet = document.createElement('div');
7308
7303
  $Viewlet.className = 'Viewlet EditorWidgetError EditorOverlayMessage';
7309
7304
  return {
@@ -7326,12 +7321,12 @@ const setBounds$1 = (state, x, y, width, height) => {
7326
7321
 
7327
7322
  const ViewletEditorWidgetError = {
7328
7323
  __proto__: null,
7329
- create: create$l,
7324
+ create: create$j,
7330
7325
  setBounds: setBounds$1,
7331
7326
  setMessage: setMessage$2
7332
7327
  };
7333
7328
 
7334
- const create$k = () => {
7329
+ const create$i = () => {
7335
7330
  const $Viewlet = document.createElement('div');
7336
7331
  $Viewlet.dataset.viewlet = 'Empty';
7337
7332
  $Viewlet.className = 'Viewlet';
@@ -7340,18 +7335,18 @@ const create$k = () => {
7340
7335
  };
7341
7336
  };
7342
7337
  const refresh$2 = (state, context) => {};
7343
- const focus$d = state => {};
7344
- const dispose$a = state => {};
7338
+ const focus$c = state => {};
7339
+ const dispose$9 = state => {};
7345
7340
 
7346
7341
  const ViewletEmpty = {
7347
7342
  __proto__: null,
7348
- create: create$k,
7349
- dispose: dispose$a,
7350
- focus: focus$d,
7343
+ create: create$i,
7344
+ dispose: dispose$9,
7345
+ focus: focus$c,
7351
7346
  refresh: refresh$2
7352
7347
  };
7353
7348
 
7354
- const create$j = () => {
7349
+ const create$h = () => {
7355
7350
  const $Viewlet = document.createElement('div');
7356
7351
  $Viewlet.className = 'Viewlet EmptyEditor';
7357
7352
  return {
@@ -7361,10 +7356,10 @@ const create$j = () => {
7361
7356
 
7362
7357
  const ViewletEmptyEditor = {
7363
7358
  __proto__: null,
7364
- create: create$j
7359
+ create: create$h
7365
7360
  };
7366
7361
 
7367
- const create$i = () => {
7362
+ const create$g = () => {
7368
7363
  const $Viewlet = document.createElement('div');
7369
7364
  $Viewlet.className = 'Viewlet Error';
7370
7365
  return {
@@ -7380,7 +7375,7 @@ const setMessage$1 = (state, message) => {
7380
7375
 
7381
7376
  const ViewletError = {
7382
7377
  __proto__: null,
7383
- create: create$i,
7378
+ create: create$g,
7384
7379
  setMessage: setMessage$1
7385
7380
  };
7386
7381
 
@@ -7427,7 +7422,7 @@ const handleFocus$4 = event => {
7427
7422
  const uid = fromEvent(event);
7428
7423
  handleFocus$a(uid);
7429
7424
  };
7430
- const handlePointerDown$3 = event => {
7425
+ const handlePointerDown$2 = event => {
7431
7426
  const {
7432
7427
  target,
7433
7428
  button
@@ -7492,7 +7487,7 @@ const handleTouchEnd = event => {
7492
7487
 
7493
7488
  // based on https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/extensions/browser/extensionsList.ts (License MIT)
7494
7489
 
7495
- const create$h = () => {
7490
+ const create$f = () => {
7496
7491
  const $ExtensionHeader = document.createElement('div');
7497
7492
  $ExtensionHeader.className = 'ExtensionHeader';
7498
7493
 
@@ -7527,7 +7522,7 @@ const create$h = () => {
7527
7522
  $Message: undefined
7528
7523
  };
7529
7524
  };
7530
- const attachEvents$7 = state => {
7525
+ const attachEvents$6 = state => {
7531
7526
  const {
7532
7527
  $ExtensionHeader,
7533
7528
  $ListItems,
@@ -7536,9 +7531,9 @@ const attachEvents$7 = state => {
7536
7531
  $ExtensionHeader.addEventListener(Input, handleInput$3, Capture);
7537
7532
  // @ts-expect-error
7538
7533
  $ExtensionHeader.addEventListener(Click, undefined);
7539
- attachEvents$c($ListItems, {
7534
+ attachEvents$b($ListItems, {
7540
7535
  [ContextMenu]: handleContextMenu$4,
7541
- [PointerDown]: handlePointerDown$3,
7536
+ [PointerDown]: handlePointerDown$2,
7542
7537
  [Focus]: handleFocus$4,
7543
7538
  [Scroll]: handleScroll
7544
7539
  });
@@ -7546,11 +7541,11 @@ const attachEvents$7 = state => {
7546
7541
  $ListItems.addEventListener(TouchMove, handleTouchMove, Passive);
7547
7542
  $ListItems.addEventListener(TouchEnd, handleTouchEnd, Passive);
7548
7543
  $ListItems.addEventListener(Wheel, handleWheel$2, Passive);
7549
- attachEvents$c($ScrollBar, {
7544
+ attachEvents$b($ScrollBar, {
7550
7545
  [PointerDown]: handleScrollBarPointerDown$1
7551
7546
  });
7552
7547
  };
7553
- const focus$c = state => {
7548
+ const focus$b = state => {
7554
7549
  object(state);
7555
7550
  state.$InputBox.focus();
7556
7551
  };
@@ -7599,7 +7594,7 @@ const setExtensionsDom = (state, dom) => {
7599
7594
  // @ts-expect-error
7600
7595
  $ListItems.replaceChildren(...$Root.firstChild.childNodes);
7601
7596
  };
7602
- const dispose$9 = () => {};
7597
+ const dispose$8 = () => {};
7603
7598
  const openSuggest = state => {
7604
7599
  // TODO maybe cache getBoundingClientRect (though it is not a bottleneck right now)
7605
7600
  // TODO getBoundingClientRect should not be needed, all positions should be known already in renderer worker
@@ -7635,11 +7630,11 @@ const setSearchValue = (state, oldValue, newValue) => {
7635
7630
 
7636
7631
  const ViewletExtensions = {
7637
7632
  __proto__: null,
7638
- attachEvents: attachEvents$7,
7633
+ attachEvents: attachEvents$6,
7639
7634
  closeSuggest,
7640
- create: create$h,
7641
- dispose: dispose$9,
7642
- focus: focus$c,
7635
+ create: create$f,
7636
+ dispose: dispose$8,
7637
+ focus: focus$b,
7643
7638
  handleError: handleError$3,
7644
7639
  openSuggest,
7645
7640
  setContentHeight,
@@ -7672,7 +7667,7 @@ const ViewletLocationsEvents = {
7672
7667
  };
7673
7668
 
7674
7669
  const Events$6 = ViewletLocationsEvents;
7675
- const setFocusedIndex$3 = (state, oldFocusedIndex, newFocusedIndex) => {
7670
+ const setFocusedIndex$2 = (state, oldFocusedIndex, newFocusedIndex) => {
7676
7671
  const {
7677
7672
  $Viewlet
7678
7673
  } = state;
@@ -7695,7 +7690,7 @@ const handleError$2 = (state, message) => {
7695
7690
  } = state;
7696
7691
  $Message.textContent = message;
7697
7692
  };
7698
- const focus$b = state => {
7693
+ const focus$a = state => {
7699
7694
  const {
7700
7695
  $Locations
7701
7696
  } = state;
@@ -7707,9 +7702,9 @@ const focus$b = state => {
7707
7702
  const ViewletImplementations = {
7708
7703
  __proto__: null,
7709
7704
  Events: Events$6,
7710
- focus: focus$b,
7705
+ focus: focus$a,
7711
7706
  handleError: handleError$2,
7712
- setFocusedIndex: setFocusedIndex$3
7707
+ setFocusedIndex: setFocusedIndex$2
7713
7708
  };
7714
7709
 
7715
7710
  const handleScrollBarPointerDown = event => {
@@ -7766,7 +7761,7 @@ const getPointerDownFunction = event => {
7766
7761
  return undefined;
7767
7762
  }
7768
7763
  };
7769
- const handlePointerDown$2 = event => {
7764
+ const handlePointerDown$1 = event => {
7770
7765
  const pointerDownFunction = getPointerDownFunction(event);
7771
7766
  if (!pointerDownFunction) {
7772
7767
  return;
@@ -7776,13 +7771,13 @@ const handlePointerDown$2 = event => {
7776
7771
 
7777
7772
  const ViewletkeyBindingsEvents = {
7778
7773
  __proto__: null,
7779
- handlePointerDown: handlePointerDown$2,
7774
+ handlePointerDown: handlePointerDown$1,
7780
7775
  handleResizerPointerDown,
7781
7776
  handleResizerPointerMove,
7782
7777
  handleResizerPointerUp
7783
7778
  };
7784
7779
 
7785
- const setValue$1 = (state, value) => {
7780
+ const setValue = (state, value) => {
7786
7781
  const {
7787
7782
  $Viewlet
7788
7783
  } = state;
@@ -7808,7 +7803,7 @@ const ViewletKeyBindings = {
7808
7803
  setColumnWidths,
7809
7804
  setScrollBar: setScrollBar$2,
7810
7805
  setSize,
7811
- setValue: setValue$1
7806
+ setValue
7812
7807
  };
7813
7808
 
7814
7809
  const getSashId = $Target => {
@@ -8249,7 +8244,7 @@ const handleResize$1 = (width, height) => {
8249
8244
  const handleFocus$3 = () => {
8250
8245
  send('Layout.handleFocus');
8251
8246
  };
8252
- const handleBlur$4 = () => {
8247
+ const handleBlur$3 = () => {
8253
8248
  send('Layout.handleBlur');
8254
8249
  };
8255
8250
 
@@ -8295,13 +8290,13 @@ const handleResize = () => {
8295
8290
  const handleFocus$2 = () => {
8296
8291
  handleFocus$3();
8297
8292
  };
8298
- const handleBlur$3 = () => {
8299
- handleBlur$4();
8293
+ const handleBlur$2 = () => {
8294
+ handleBlur$3();
8300
8295
  };
8301
8296
  const handleKeyDown$1 = handleKeyDown$2;
8302
8297
  const handleKeyUp = handleKeyUp$1;
8303
8298
 
8304
- const create$g = () => {
8299
+ const create$e = () => {
8305
8300
  // TODO use aria role splitter once supported https://github.com/w3c/aria/issues/1348
8306
8301
  const $SashSideBar = document.createElement('div');
8307
8302
  $SashSideBar.className = 'Viewlet Sash SashVertical';
@@ -8322,23 +8317,23 @@ const create$g = () => {
8322
8317
  $SashPanel
8323
8318
  };
8324
8319
  };
8325
- const attachEvents$6 = state => {
8320
+ const attachEvents$5 = state => {
8326
8321
  const {
8327
8322
  $SashSideBar,
8328
8323
  $SashPanel
8329
8324
  } = state;
8330
- attachEvents$c($SashSideBar, {
8325
+ attachEvents$b($SashSideBar, {
8331
8326
  [PointerDown]: handleSashPointerDown,
8332
8327
  [DoubleClick]: handleSashDoubleClick
8333
8328
  });
8334
- attachEvents$c($SashPanel, {
8329
+ attachEvents$b($SashPanel, {
8335
8330
  [PointerDown]: handleSashPointerDown,
8336
8331
  [DoubleClick]: handleSashDoubleClick
8337
8332
  });
8338
- attachEvents$c(window, {
8333
+ attachEvents$b(window, {
8339
8334
  [Resize]: handleResize,
8340
8335
  [Focus]: handleFocus$2,
8341
- [Blur]: handleBlur$3,
8336
+ [Blur]: handleBlur$2,
8342
8337
  [KeyDown]: handleKeyDown$1,
8343
8338
  [KeyUp]: handleKeyUp
8344
8339
  });
@@ -8356,8 +8351,8 @@ const setSashes = (state, sashSideBar, sashPanel) => {
8356
8351
 
8357
8352
  const ViewletLayout = {
8358
8353
  __proto__: null,
8359
- attachEvents: attachEvents$6,
8360
- create: create$g,
8354
+ attachEvents: attachEvents$5,
8355
+ create: create$e,
8361
8356
  setSashes
8362
8357
  };
8363
8358
 
@@ -8452,7 +8447,7 @@ const handleContextMenu$3 = event => {
8452
8447
  };
8453
8448
 
8454
8449
  // TODO Main should not be bound to Editor -> Lazy load Editor
8455
- const create$f = () => {
8450
+ const create$d = () => {
8456
8451
  const $Viewlet = document.createElement('div');
8457
8452
  $Viewlet.id = 'Main';
8458
8453
  $Viewlet.className = 'Viewlet Main';
@@ -8473,11 +8468,11 @@ const create$f = () => {
8473
8468
  $DragOverlay: undefined
8474
8469
  };
8475
8470
  };
8476
- const attachEvents$5 = state => {
8471
+ const attachEvents$4 = state => {
8477
8472
  const {
8478
8473
  $Viewlet
8479
8474
  } = state;
8480
- attachEvents$c($Viewlet, {
8475
+ attachEvents$b($Viewlet, {
8481
8476
  [Drop]: handleDrop$1,
8482
8477
  [DragOver]: handleDragOver$1,
8483
8478
  [DragEnd]: handleDragEnd,
@@ -8485,7 +8480,7 @@ const attachEvents$5 = state => {
8485
8480
  [ContextMenu]: handleContextMenu$3
8486
8481
  });
8487
8482
  };
8488
- const dispose$8 = state => {};
8483
+ const dispose$7 = state => {};
8489
8484
  const replaceEditor = (state, id, uri, languageId) => {};
8490
8485
  const addEditor = (state, id, uri, languageId) => {};
8491
8486
 
@@ -8507,7 +8502,7 @@ const closeViewletAndTab = (state, index) => {
8507
8502
  state.$MainTabs.remove();
8508
8503
  state.$MainTabs = undefined;
8509
8504
  };
8510
- const focus$a = () => {};
8505
+ const focus$9 = () => {};
8511
8506
  const highlightDragOver = state => {
8512
8507
  const {
8513
8508
  $MainTabs
@@ -8549,12 +8544,12 @@ const setDragOverlay = (state, visible, x, y, width, height) => {
8549
8544
  const ViewletMain = {
8550
8545
  __proto__: null,
8551
8546
  addEditor,
8552
- attachEvents: attachEvents$5,
8547
+ attachEvents: attachEvents$4,
8553
8548
  closeAllViewlets,
8554
8549
  closeViewletAndTab,
8555
- create: create$f,
8556
- dispose: dispose$8,
8557
- focus: focus$a,
8550
+ create: create$d,
8551
+ dispose: dispose$7,
8552
+ focus: focus$9,
8558
8553
  highlightDragOver,
8559
8554
  openEditor,
8560
8555
  replaceEditor,
@@ -8629,7 +8624,7 @@ const handleTabsContextMenu = event => {
8629
8624
  handleTabContextMenu(uid, clientX, clientY);
8630
8625
  };
8631
8626
 
8632
- const create$e = () => {
8627
+ const create$c = () => {
8633
8628
  const $MainTabs = document.createElement('div');
8634
8629
  $MainTabs.className = 'Viewlet MainTabs';
8635
8630
  $MainTabs.role = TabList;
@@ -8639,11 +8634,11 @@ const create$e = () => {
8639
8634
  $MainTabs
8640
8635
  };
8641
8636
  };
8642
- const attachEvents$4 = state => {
8637
+ const attachEvents$3 = state => {
8643
8638
  const {
8644
8639
  $MainTabs
8645
8640
  } = state;
8646
- attachEvents$c($MainTabs, {
8641
+ attachEvents$b($MainTabs, {
8647
8642
  [ContextMenu]: handleTabsContextMenu,
8648
8643
  [DragOver]: handleDragOver,
8649
8644
  [DragStart]: handleDragStart,
@@ -8677,14 +8672,14 @@ const setHighlight = (state, highlightLeft) => {
8677
8672
 
8678
8673
  const ViewletMainTabs = {
8679
8674
  __proto__: null,
8680
- attachEvents: attachEvents$4,
8681
- create: create$e,
8675
+ attachEvents: attachEvents$3,
8676
+ create: create$c,
8682
8677
  setHighlight,
8683
8678
  setScrollLeft,
8684
8679
  setTabsDom: setTabsDom$2
8685
8680
  };
8686
8681
 
8687
- const create$d = () => {
8682
+ const create$b = () => {
8688
8683
  const $ViewletOutputContent = document.createElement('div');
8689
8684
  $ViewletOutputContent.className = 'OutputContent';
8690
8685
  $ViewletOutputContent.role = Log;
@@ -8716,9 +8711,9 @@ const handleError$1 = (state, error) => {
8716
8711
  string(error);
8717
8712
  state.content.textContent = error;
8718
8713
  };
8719
- const focus$9 = state => {
8714
+ const focus$8 = state => {
8720
8715
  object(state);
8721
- focus$g(state.$ViewletOutputContent);
8716
+ focus$f(state.$ViewletOutputContent);
8722
8717
  send('Focus.setFocus', FocusOutput);
8723
8718
  };
8724
8719
 
@@ -8731,15 +8726,15 @@ const disposeFindWidget = state => {
8731
8726
  return;
8732
8727
  }
8733
8728
  };
8734
- const dispose$7 = state => {};
8729
+ const dispose$6 = state => {};
8735
8730
 
8736
8731
  const ViewletOutput = {
8737
8732
  __proto__: null,
8738
8733
  clear: clear$1,
8739
- create: create$d,
8740
- dispose: dispose$7,
8734
+ create: create$b,
8735
+ dispose: dispose$6,
8741
8736
  disposeFindWidget,
8742
- focus: focus$9,
8737
+ focus: focus$8,
8743
8738
  handleError: handleError$1,
8744
8739
  openFindWidget,
8745
8740
  setText
@@ -8789,7 +8784,7 @@ const UiStrings = {
8789
8784
  Close: 'Close',
8790
8785
  Maximize: 'Maximize'
8791
8786
  };
8792
- const create$c = () => {
8787
+ const create$a = () => {
8793
8788
  const $PanelTabs = document.createElement('div');
8794
8789
  $PanelTabs.className = 'PanelTabs';
8795
8790
  $PanelTabs.role = TabList;
@@ -8827,19 +8822,19 @@ const create$c = () => {
8827
8822
  };
8828
8823
  // await openViewlet('Terminal')
8829
8824
  };
8830
- const attachEvents$3 = state => {
8825
+ const attachEvents$2 = state => {
8831
8826
  const {
8832
8827
  $ButtonMaximize,
8833
8828
  $ButtonClose,
8834
8829
  $PanelHeader
8835
8830
  } = state;
8836
- attachEvents$c($PanelHeader, {
8831
+ attachEvents$b($PanelHeader, {
8837
8832
  [Click]: handleHeaderClick$1
8838
8833
  });
8839
- attachEvents$c($ButtonMaximize, {
8834
+ attachEvents$b($ButtonMaximize, {
8840
8835
  [Click]: handleClickMaximize
8841
8836
  });
8842
- attachEvents$c($ButtonClose, {
8837
+ attachEvents$b($ButtonClose, {
8843
8838
  [Click]: handleClickClose
8844
8839
  });
8845
8840
  };
@@ -8851,14 +8846,14 @@ const setTabsDom$1 = (state, dom) => {
8851
8846
  };
8852
8847
 
8853
8848
  // TODO add test for focus method
8854
- const focus$8 = state => {
8849
+ const focus$7 = state => {
8855
8850
  object(state);
8856
8851
  if (!state.currentViewlet) {
8857
8852
  return;
8858
8853
  }
8859
8854
  state.currentViewlet.factory.focus(state.currentViewlet.state);
8860
8855
  };
8861
- const dispose$6 = state => {
8856
+ const dispose$5 = state => {
8862
8857
  if (state.$PanelContent) {
8863
8858
  state.$PanelContent.remove();
8864
8859
  state.$PanelContent = undefined;
@@ -8901,16 +8896,16 @@ const setActionsDom$1 = (state, actions, childUid) => {
8901
8896
 
8902
8897
  const ViewletPanel = {
8903
8898
  __proto__: null,
8904
- attachEvents: attachEvents$3,
8905
- create: create$c,
8906
- dispose: dispose$6,
8907
- focus: focus$8,
8899
+ attachEvents: attachEvents$2,
8900
+ create: create$a,
8901
+ dispose: dispose$5,
8902
+ focus: focus$7,
8908
8903
  setActionsDom: setActionsDom$1,
8909
8904
  setSelectedIndex,
8910
8905
  setTabsDom: setTabsDom$1
8911
8906
  };
8912
8907
 
8913
- const handlePointerDown$1 = event => {
8908
+ const handlePointerDown = event => {
8914
8909
  preventDefault(event);
8915
8910
  const {
8916
8911
  clientX,
@@ -8945,11 +8940,11 @@ const ViewletProblemsEvents = {
8945
8940
  handleClearFilterClick,
8946
8941
  handleContextMenu: handleContextMenu$2,
8947
8942
  handleFilterInput,
8948
- handlePointerDown: handlePointerDown$1,
8943
+ handlePointerDown,
8949
8944
  returnValue: returnValue$2
8950
8945
  };
8951
8946
 
8952
- const setFocusedIndex$2 = (state, focusedIndex) => {
8947
+ const setFocusedIndex$1 = (state, focusedIndex) => {
8953
8948
  const {
8954
8949
  $Viewlet
8955
8950
  } = state;
@@ -8958,7 +8953,7 @@ const setFocusedIndex$2 = (state, focusedIndex) => {
8958
8953
  $Viewlet.focus();
8959
8954
  }
8960
8955
  };
8961
- const focus$7 = state => {
8956
+ const focus$6 = state => {
8962
8957
  const {
8963
8958
  $Viewlet
8964
8959
  } = state;
@@ -8969,294 +8964,16 @@ const ViewletProblems = {
8969
8964
  __proto__: null,
8970
8965
  EventMap: ViewletProblemsEvents,
8971
8966
  Events: ViewletProblemsEvents,
8972
- focus: focus$7,
8973
- setFocusedIndex: setFocusedIndex$2
8974
- };
8975
-
8976
- const create$b = () => {
8977
- const $InputBox = document.createElement('input');
8978
- $InputBox.className = 'InputBox';
8979
- $InputBox.spellcheck = false;
8980
- $InputBox.autocapitalize = 'off';
8981
- // $InputBox.autocomplete = 'off' // TODO needed?
8982
- $InputBox.type = 'text';
8983
- $InputBox.setAttribute('autocorrect', 'off'); // for ios
8984
- return $InputBox;
8985
- };
8986
-
8987
- const getIsMobile = () => {
8988
- // @ts-ignore
8989
- if (typeof process !== 'undefined' && process.env.NODE_ENV === 'test') {
8990
- return false;
8991
- }
8992
- // @ts-expect-error
8993
- const userAgentData = navigator.userAgentData;
8994
- if (userAgentData && 'mobile' in userAgentData) {
8995
- return userAgentData.mobile;
8996
- }
8997
- if (navigator.userAgent.includes('Android')) {
8998
- return true;
8999
- }
9000
- return false;
9001
- };
9002
- const isMobile = getIsMobile();
9003
-
9004
- /* Tries to implement the pattern for combobox with listbox popup https://www.w3.org/TR/wai-aria-1.2/#combobox */
9005
-
9006
-
9007
- // TODO use another virtual list that just appends elements and
9008
- // is optimized for fast show/hide, scrolling performance should
9009
- // be good as well but is not as important as fast show/hide
9010
-
9011
- // TODO screenreader makes pause after reading colon, maybe there is a setting for screenreaders so they speak normally
9012
-
9013
- // TODO state
9014
-
9015
- // TODO when quickpick is shown recalculate style and layout is really slow (>10ms every time)
9016
-
9017
- // TODO accessibility issues with nvda: when pressing escape, it goes into different mode
9018
- // but should just close quick-pick like vscode does
9019
-
9020
- const handlePointerDown = event => {
9021
- if (isMobile) {
9022
- // workaround to disable virtual keyboard automatically opening on android
9023
- // see https://stackoverflow.com/questions/48635501/how-to-hide-soft-keyboard-and-keep-input-on-focus#answer-53104238
9024
- const $Input = document.querySelector('#QuickPickHeader .InputBox');
9025
- if ($Input) {
9026
- // @ts-expect-error
9027
- $Input.readOnly = true;
9028
- }
9029
- }
9030
- preventDefault(event);
9031
- const {
9032
- clientX,
9033
- clientY
9034
- } = event;
9035
- const uid = fromEvent(event);
9036
- handleClickAt$3(uid, clientX, clientY);
9037
- };
9038
- const handleBlur$2 = event => {
9039
- const uid = fromEvent(event);
9040
- handleBlur$a(uid);
9041
- };
9042
-
9043
- // TODO
9044
- // - for windows narrator, ariaLabel works well
9045
- // - for nvda ariaRoleDescription works better
9046
-
9047
- const handleBeforeInput = event => {
9048
- const {
9049
- target,
9050
- inputType,
9051
- data
9052
- } = event;
9053
- const {
9054
- selectionStart,
9055
- selectionEnd
9056
- } = target;
9057
- const uid = fromEvent(event);
9058
- handleBeforeInput$2(uid, inputType, data, selectionStart, selectionEnd);
9059
- };
9060
-
9061
- /* Tries to implement the pattern for combobox with listbox popup https://www.w3.org/TR/wai-aria-1.2/#combobox */
9062
-
9063
-
9064
- // TODO use another virtual list that just appends elements and
9065
- // is optimized for fast show/hide, scrolling performance should
9066
- // be good as well but is not as important as fast show/hide
9067
-
9068
- // TODO screenreader makes pause after reading colon, maybe there is a setting for screenreaders so they speak normally
9069
-
9070
- // TODO state
9071
-
9072
- // TODO when quickpick is shown recalculate style and layout is really slow (>10ms every time)
9073
-
9074
- // TODO accessibility issues with nvda: when pressing escape, it goes into different mode
9075
- // but should just close quick-pick like vscode does
9076
-
9077
- const activeId$1 = 'QuickPickItemActive';
9078
-
9079
- // TODO forbidden:
9080
- // 1. methods
9081
- // 2. functions inside functions
9082
-
9083
- /**
9084
- * @enum {string}
9085
- */
9086
- const Ids = {
9087
- QuickPickItems: 'QuickPickItems',
9088
- QuickPick: 'QuickPick'
9089
- };
9090
-
9091
- // TODO add test with show and slicedItems length is 0
9092
-
9093
- const setFocusedIndex$1 = (state, oldFocusedIndex, newFocusedIndex) => {
9094
- const {
9095
- $QuickPickInput
9096
- } = state;
9097
- if (newFocusedIndex >= 0) {
9098
- $QuickPickInput.setAttribute(AriaActiveDescendant, activeId$1);
9099
- }
9100
- };
9101
- const focusElement = $Element => {
9102
- if (!$Element) {
9103
- return;
9104
- }
9105
- if (isMobile) {
9106
- // workaround to disable virtual keyboard automatically opening on android
9107
- // see https://stackoverflow.com/questions/48635501/how-to-hide-soft-keyboard-and-keep-input-on-focus#answer-53104238
9108
- $Element.readOnly = true;
9109
- $Element.focus();
9110
- const handleTimeout = () => {
9111
- $Element.readOnly = false;
9112
- };
9113
- setTimeout(handleTimeout, 0);
9114
- } else {
9115
- $Element.focus();
9116
- }
9117
- };
9118
- const focus$6 = state => {
9119
- const {
9120
- $QuickPickInput
9121
- } = state;
9122
- focusElement($QuickPickInput);
9123
- send('Focus.setFocus', FocusQuickPickInput);
9124
- };
9125
-
9126
- // TODO
9127
- // - for windows narrator, ariaLabel works well
9128
- // - for nvda ariaRoleDescription works better
9129
-
9130
- const create$a = () => {
9131
- const $QuickPickInput = create$b();
9132
- $QuickPickInput.setAttribute(AriaControls, Ids.QuickPickItems); // TODO use idl once supported
9133
- $QuickPickInput.role = ComboBox;
9134
- $QuickPickInput.ariaLabel = 'Type the name of a command to run.';
9135
- $QuickPickInput.ariaAutoComplete = List;
9136
- $QuickPickInput.ariaExpanded = True;
9137
- const $QuickPickHeader = document.createElement('div');
9138
- $QuickPickHeader.className = 'QuickPickHeader';
9139
- $QuickPickHeader.append($QuickPickInput);
9140
- const $QuickPickItems = document.createElement('div');
9141
- $QuickPickItems.id = Ids.QuickPickItems;
9142
- $QuickPickItems.className = 'QuickPickItems';
9143
- $QuickPickItems.role = ListBox;
9144
-
9145
- // TODO this works well with nvda but not with windows narrator
9146
- // probably a bug with windows narrator that doesn't support ariaRoleDescription
9147
- $QuickPickItems.ariaRoleDescription = QuickInput;
9148
- const $QuickPick = document.createElement('div');
9149
- $QuickPick.id = Ids.QuickPick;
9150
- $QuickPick.className = 'Viewlet QuickPick';
9151
- // $QuickPick.role= 'dialog'
9152
- $QuickPick.append($QuickPickHeader, $QuickPickItems);
9153
- // $QuickPick.setAttribute('aria-modal', 'false') // TODO why is this
9154
- $QuickPick.ariaLabel = 'Quick open';
9155
- return {
9156
- $Viewlet: $QuickPick,
9157
- $QuickPick,
9158
- $QuickPickInput,
9159
- $QuickPickItems,
9160
- $QuickPickStatus: undefined
9161
- };
9162
- };
9163
- const attachEvents$2 = state => {
9164
- const {
9165
- $QuickPickItems,
9166
- $QuickPickInput
9167
- } = state;
9168
- attachEvents$c($QuickPickItems, {
9169
- [PointerDown]: handlePointerDown
9170
- });
9171
- $QuickPickItems.addEventListener(Wheel, handleWheel$2, Passive);
9172
- attachEvents$c($QuickPickInput, {
9173
- [Blur]: handleBlur$2,
9174
- [BeforeInput]: handleBeforeInput
9175
- });
9176
- };
9177
- const create$QuickPickStatus = () => {
9178
- const $QuickPickStatus = document.createElement('div');
9179
- $QuickPickStatus.className = 'QuickPickStatus';
9180
- // const te.$QuickPickStatus.role = AriaRoles.Status
9181
- // $QuickPickStatus.ariaLive = 'polite'
9182
- // $QuickPickStatus.id = 'QuickPickStatus'
9183
- return $QuickPickStatus;
9184
- };
9185
- const hideStatus = state => {
9186
- state.$QuickPickStatus.remove();
9187
- state.$QuickPickStatus = undefined;
9188
- };
9189
- const showNoResults = (state, noResults, unfocusIndex) => {
9190
- if (!state.$QuickPickStatus) {
9191
- state.$QuickPickStatus = create$QuickPickStatus();
9192
- state.$QuickPick.append(state.$QuickPickStatus);
9193
- }
9194
- state.$QuickPickStatus.textContent = 'No Results';
9195
-
9196
- // announce to screenreaders that there are no results
9197
- alert$1('No results');
9198
- };
9199
-
9200
- // TODO QuickPick module is always loaded lazily -> can create $QuickPick eagerly (no state / less state laying around)
9201
-
9202
- // TODO remove from dom vs display none which should be used?
9203
-
9204
- // TODO have common widgets container for all widgets (this, notifications, context menu)
9205
- const dispose$5 = state => {
9206
- const {
9207
- $QuickPickInput
9208
- } = state;
9209
- $QuickPickInput.onblur = null;
9210
- };
9211
- const setValue = (state, value) => {
9212
- const {
9213
- $QuickPickInput
9214
- } = state;
9215
- $QuickPickInput.value = value;
9216
- };
9217
- const setCursorOffset = (state, cursorOffset) => {
9218
- const {
9219
- $QuickPickInput
9220
- } = state;
9221
- $QuickPickInput.selectionStart = cursorOffset;
9222
- $QuickPickInput.selectionEnd = cursorOffset;
9223
- };
9224
- const setItemsHeight = (state, itemsHeight) => {
9225
- const {
9226
- $QuickPickItems
9227
- } = state;
9228
- setHeight($QuickPickItems, itemsHeight);
9229
- };
9230
- const setItemsDom = (state, dom) => {
9231
- const {
9232
- $QuickPickItems
9233
- } = state;
9234
- renderInto($QuickPickItems, dom);
9235
- };
9236
- const noop = state => {};
9237
-
9238
- const ViewletQuickPick = {
9239
- __proto__: null,
9240
- attachEvents: attachEvents$2,
9241
- create: create$a,
9242
- dispose: dispose$5,
9243
8967
  focus: focus$6,
9244
- hideStatus,
9245
- noop,
9246
- setCursorOffset,
9247
- setFocusedIndex: setFocusedIndex$1,
9248
- setItemsDom,
9249
- setItemsHeight,
9250
- setValue,
9251
- showNoResults
8968
+ setFocusedIndex: setFocusedIndex$1
9252
8969
  };
9253
8970
 
9254
8971
  const ViewletReferences = {
9255
8972
  __proto__: null,
9256
8973
  Events: Events$6,
9257
- focus: focus$b,
8974
+ focus: focus$a,
9258
8975
  handleError: handleError$2,
9259
- setFocusedIndex: setFocusedIndex$3
8976
+ setFocusedIndex: setFocusedIndex$2
9260
8977
  };
9261
8978
 
9262
8979
  const handleContinue = () => {
@@ -9472,7 +9189,7 @@ const attachEvents$1 = state => {
9472
9189
  const {
9473
9190
  $SideBarTitleArea
9474
9191
  } = state;
9475
- attachEvents$c($SideBarTitleArea, {
9192
+ attachEvents$b($SideBarTitleArea, {
9476
9193
  [Click]: handleHeaderClick
9477
9194
  });
9478
9195
  };
@@ -9830,7 +9547,7 @@ const attachEvents = state => {
9830
9547
  const {
9831
9548
  $Viewlet
9832
9549
  } = state;
9833
- attachEvents$c($Viewlet, {
9550
+ attachEvents$b($Viewlet, {
9834
9551
  [ContextMenu]: handleContextMenu$1
9835
9552
  });
9836
9553
  };
@@ -10453,8 +10170,6 @@ const load$1 = moduleId => {
10453
10170
  return ViewletPanel;
10454
10171
  case Problems:
10455
10172
  return ViewletProblems;
10456
- case QuickPick:
10457
- return ViewletQuickPick;
10458
10173
  case References:
10459
10174
  return ViewletReferences;
10460
10175
  case RunAndDebug:
@@ -11453,7 +11168,7 @@ const create$1 = ({
11453
11168
 
11454
11169
  const handleBlur = event => {
11455
11170
  const uid = fromEvent(event);
11456
- handleBlur$a(uid);
11171
+ handleBlur$9(uid);
11457
11172
  };
11458
11173
  const handleMouseDown = (event, ...args) => {
11459
11174
  const uid = fromEvent(event);