@lvce-editor/renderer-process 10.17.0 → 10.19.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.
@@ -19,7 +19,7 @@ const Download = 5;
19
19
  const EditorController = 6;
20
20
  const EditorError$1 = 7;
21
21
  const EditorHover$1 = 8;
22
- const EditorRename = 9;
22
+ const EditorRename$1 = 9;
23
23
  const ImagePreview$2 = 10;
24
24
  const InitData = 11;
25
25
  const Layout$1 = 12;
@@ -94,7 +94,7 @@ const getModuleId = commandId => {
94
94
  case 'EditorRename.create':
95
95
  case 'EditorRename.dispose':
96
96
  case 'EditorRename.finish':
97
- return EditorRename;
97
+ return EditorRename$1;
98
98
  case 'FilePicker.showDirectoryPicker':
99
99
  case 'FilePicker.showFilePicker':
100
100
  case 'FilePicker.showSaveFilePicker':
@@ -739,7 +739,7 @@ const getErrorResponse = (message, error, preparePrettyError, logError) => {
739
739
  const errorProperty = getErrorProperty(error, prettyError);
740
740
  return create$1$1(message, errorProperty);
741
741
  };
742
- const create$M = (message, result) => {
742
+ const create$N = (message, result) => {
743
743
  return {
744
744
  jsonrpc: Two,
745
745
  id: message.id,
@@ -748,7 +748,7 @@ const create$M = (message, result) => {
748
748
  };
749
749
  const getSuccessResponse = (message, result) => {
750
750
  const resultProperty = result ?? null;
751
- return create$M(message, resultProperty);
751
+ return create$N(message, resultProperty);
752
752
  };
753
753
  const getResponse = async (message, ipc, execute, preparePrettyError, logError, requiresSocket) => {
754
754
  try {
@@ -923,7 +923,7 @@ const launchWorker = async ({
923
923
  name,
924
924
  url
925
925
  }) => {
926
- const worker = await create$L({
926
+ const worker = await create$M({
927
927
  method: Auto,
928
928
  url,
929
929
  name
@@ -998,7 +998,7 @@ const hydrate$4 = async () => {
998
998
  };
999
999
 
1000
1000
  // TODO needed?
1001
- const dispose$n = () => {
1001
+ const dispose$o = () => {
1002
1002
  // @ts-expect-error
1003
1003
  if (state$9.rendererWorker) {
1004
1004
  // @ts-expect-error
@@ -1021,7 +1021,7 @@ const invokeAndTransfer = (method, ...params) => {
1021
1021
 
1022
1022
  const RendererWorker = {
1023
1023
  __proto__: null,
1024
- dispose: dispose$n,
1024
+ dispose: dispose$o,
1025
1025
  hydrate: hydrate$4,
1026
1026
  invoke: invoke$1,
1027
1027
  invokeAndTransfer,
@@ -1030,7 +1030,7 @@ const RendererWorker = {
1030
1030
  state: state$9
1031
1031
  };
1032
1032
 
1033
- const create$L = async ({
1033
+ const create$M = async ({
1034
1034
  method,
1035
1035
  ...options
1036
1036
  }) => {
@@ -1051,7 +1051,7 @@ const create$L = async ({
1051
1051
  };
1052
1052
 
1053
1053
  const launchEditorWorker = async port => {
1054
- const ipc = await create$L({
1054
+ const ipc = await create$M({
1055
1055
  name: 'Editor Worker',
1056
1056
  url: editorWorkerUrl,
1057
1057
  method: ModuleWorkerWithMessagePort,
@@ -1081,7 +1081,7 @@ const extensionHostWorkerUrl = getConfiguredExtensionHostWorkerUrl() || `${asset
1081
1081
 
1082
1082
  const launchExtensionHostWorker = async port => {
1083
1083
  const name = isElectron ? 'Extension Host (Electron)' : 'Extension Host';
1084
- const ipc = await create$L({
1084
+ const ipc = await create$M({
1085
1085
  name,
1086
1086
  url: extensionHostWorkerUrl,
1087
1087
  method: ModuleWorkerWithMessagePort,
@@ -1105,7 +1105,7 @@ const hydrate$2 = async () => {
1105
1105
  const syntaxHighlightingWorkerUrl = `${assetDir}/packages/renderer-worker/node_modules/@lvce-editor/syntax-highlighting-worker/dist/syntaxHighlightingWorkerMain.js`;
1106
1106
 
1107
1107
  const launchSyntaxHighlightingWorker = async port => {
1108
- const ipc = await create$L({
1108
+ const ipc = await create$M({
1109
1109
  name: 'Syntax Highlighting Worker',
1110
1110
  url: syntaxHighlightingWorkerUrl,
1111
1111
  method: ModuleWorkerWithMessagePort,
@@ -1147,7 +1147,7 @@ const load$2 = moduleId => {
1147
1147
  return Promise.resolve().then(function () { return Download_ipc; });
1148
1148
  case EditorError$1:
1149
1149
  return Promise.resolve().then(function () { return EditorError_ipc; });
1150
- case EditorRename:
1150
+ case EditorRename$1:
1151
1151
  return Promise.resolve().then(function () { return EditorRename_ipc; });
1152
1152
  case FilePicker:
1153
1153
  return Promise.resolve().then(function () { return FilePicker_ipc; });
@@ -1709,7 +1709,7 @@ const applyUidWorkaround = element => {
1709
1709
  set$5(element, editorUid);
1710
1710
  };
1711
1711
 
1712
- const setBounds$8 = ($Element, x, y, width, height) => {
1712
+ const setBounds$9 = ($Element, x, y, width, height) => {
1713
1713
  $Element.style.top = `${y}px`;
1714
1714
  $Element.style.left = `${x}px`;
1715
1715
  $Element.style.width = `${width}px`;
@@ -1845,7 +1845,7 @@ const stopTracking$1 = ($Target, pointerId, handlePointerMove, handlePointerUp)
1845
1845
  // TODO use pointerlost event instead
1846
1846
  $Target.removeEventListener(PointerUp, handlePointerUp);
1847
1847
  };
1848
- const create$K = (pointerDown, pointerMove, pointerUp) => {
1848
+ const create$L = (pointerDown, pointerMove, pointerUp) => {
1849
1849
  const shared = (fn, event) => {
1850
1850
  const message = fn(event);
1851
1851
  if (!message || message.length === 0) {
@@ -1878,7 +1878,7 @@ const create$K = (pointerDown, pointerMove, pointerUp) => {
1878
1878
  };
1879
1879
 
1880
1880
  const handleOffset = 20;
1881
- const handleSliderPointerDown = create$K(event => {
1881
+ const handleSliderPointerDown = create$L(event => {
1882
1882
  const {
1883
1883
  clientX,
1884
1884
  clientY
@@ -1924,7 +1924,7 @@ const setOffsetX = (state, offsetX) => {
1924
1924
  setXAndYTransform($ColorPickerSliderThumb, offsetX, 0);
1925
1925
  applyUidWorkaround($Viewlet);
1926
1926
  };
1927
- const appendWidget$4 = state => {
1927
+ const appendWidget$5 = state => {
1928
1928
  const {
1929
1929
  $Viewlet
1930
1930
  } = state;
@@ -1934,7 +1934,7 @@ const appendWidget$4 = state => {
1934
1934
  const ViewletColorPicker = {
1935
1935
  __proto__: null,
1936
1936
  Events: ViewletColorPickerEvents,
1937
- appendWidget: appendWidget$4,
1937
+ appendWidget: appendWidget$5,
1938
1938
  setColor,
1939
1939
  setOffsetX
1940
1940
  };
@@ -2119,7 +2119,7 @@ const handleDropFilePath = forwardViewletCommand('handleDropFilePath');
2119
2119
  const handleDropFiles = forwardViewletCommand('handleDrop');
2120
2120
  forwardViewletCommand('handleFilterInput');
2121
2121
  const handleFocus$c = forwardViewletCommand('handleFocus');
2122
- const handleFocusIn$3 = forwardViewletCommand('handleFocusIn');
2122
+ const handleFocusIn$4 = forwardViewletCommand('handleFocusIn');
2123
2123
  const handleIconError$1 = forwardViewletCommand('handleIconError');
2124
2124
  const handleImageError$1 = forwardViewletCommand('handleImageError');
2125
2125
  const handleInput$8 = forwardViewletCommand('handleInput');
@@ -2276,7 +2276,7 @@ const setNegativeMargin = (state, negativeMargin) => {
2276
2276
  setTop($ListItems, negativeMargin);
2277
2277
  };
2278
2278
 
2279
- const create$J = () => {
2279
+ const create$K = () => {
2280
2280
  const $ListItems = document.createElement('div');
2281
2281
  $ListItems.className = 'ListItems';
2282
2282
  $ListItems.role = ListBox;
@@ -2329,7 +2329,7 @@ const setDom$b = (state, dom) => {
2329
2329
  // TODO recycle nodes
2330
2330
  // TODO set right aria attributes on $EditorInput
2331
2331
  };
2332
- const dispose$m = state => {
2332
+ const dispose$n = state => {
2333
2333
  remove$2(state.$Viewlet);
2334
2334
  // state.$EditorInput.removeAttribute('aria-activedescendant')
2335
2335
  };
@@ -2349,21 +2349,21 @@ const handleError$8 = (state, error) => {
2349
2349
  } = state;
2350
2350
  $Viewlet.textContent = `${error}`;
2351
2351
  };
2352
- const setBounds$7 = (state, x, y, width, height) => {
2352
+ const setBounds$8 = (state, x, y, width, height) => {
2353
2353
  const {
2354
2354
  $Viewlet
2355
2355
  } = state;
2356
- setBounds$8($Viewlet, x, y, width, height);
2356
+ setBounds$9($Viewlet, x, y, width, height);
2357
2357
  applyUidWorkaround($Viewlet);
2358
2358
  };
2359
2359
 
2360
2360
  const ViewletEditorCompletion = {
2361
2361
  __proto__: null,
2362
2362
  attachEvents: attachEvents$b,
2363
- create: create$J,
2364
- dispose: dispose$m,
2363
+ create: create$K,
2364
+ dispose: dispose$n,
2365
2365
  handleError: handleError$8,
2366
- setBounds: setBounds$7,
2366
+ setBounds: setBounds$8,
2367
2367
  setContentHeight,
2368
2368
  setDom: setDom$b,
2369
2369
  setNegativeMargin,
@@ -2383,7 +2383,7 @@ const ViewletEditorCompletionDetailsEvents = {
2383
2383
  returnValue: returnValue$a
2384
2384
  };
2385
2385
 
2386
- const create$I = () => {
2386
+ const create$J = () => {
2387
2387
  const $Viewlet = document.createElement('div');
2388
2388
  $Viewlet.className = 'Viewlet EditorCompletionDetails';
2389
2389
  $Viewlet.id = 'CompletionsDetails';
@@ -2403,37 +2403,37 @@ const setDom$a = (state, dom) => {
2403
2403
  $Viewlet.replaceChildren(...$Root.firstChild.childNodes);
2404
2404
  append$1($Viewlet);
2405
2405
  };
2406
- const appendWidget$3 = state => {
2406
+ const appendWidget$4 = state => {
2407
2407
  const {
2408
2408
  $Viewlet
2409
2409
  } = state;
2410
2410
  append$1($Viewlet);
2411
2411
  };
2412
- const dispose$l = state => {
2412
+ const dispose$m = state => {
2413
2413
  remove$2(state.$Viewlet);
2414
2414
  };
2415
- const setBounds$6 = (state, x, y, width, height) => {
2415
+ const setBounds$7 = (state, x, y, width, height) => {
2416
2416
  const {
2417
2417
  $Viewlet
2418
2418
  } = state;
2419
- setBounds$8($Viewlet, x, y, width, height);
2419
+ setBounds$9($Viewlet, x, y, width, height);
2420
2420
  };
2421
2421
 
2422
2422
  const ViewletEditorCompletionDetails = {
2423
2423
  __proto__: null,
2424
2424
  Events: ViewletEditorCompletionDetailsEvents,
2425
- appendWidget: appendWidget$3,
2425
+ appendWidget: appendWidget$4,
2426
2426
  attachEvents: attachEvents$a,
2427
- create: create$I,
2428
- dispose: dispose$l,
2429
- setBounds: setBounds$6,
2427
+ create: create$J,
2428
+ dispose: dispose$m,
2429
+ setBounds: setBounds$7,
2430
2430
  setDom: setDom$a
2431
2431
  };
2432
2432
 
2433
2433
  const rememberFocus = rememberFocus$1;
2434
2434
 
2435
2435
  const returnValue$9 = true;
2436
- const handleSashPointerDown$2 = create$K(event => {
2436
+ const handleSashPointerDown$2 = create$L(event => {
2437
2437
  const {
2438
2438
  clientX,
2439
2439
  clientY
@@ -2459,14 +2459,14 @@ const ViewletEditorHoverEvents = {
2459
2459
  returnValue: returnValue$9
2460
2460
  };
2461
2461
 
2462
- const setBounds$5 = (state, x, y, width, height) => {
2462
+ const setBounds$6 = (state, x, y, width, height) => {
2463
2463
  const {
2464
2464
  $Viewlet
2465
2465
  } = state;
2466
2466
  setWidth($Viewlet, width);
2467
2467
  setXAndYTransform($Viewlet, x, -y);
2468
2468
  };
2469
- const appendWidget$2 = state => {
2469
+ const appendWidget$3 = state => {
2470
2470
  const {
2471
2471
  $Viewlet
2472
2472
  } = state;
@@ -2482,11 +2482,81 @@ const setDom$9 = (state, dom) => {
2482
2482
  const ViewletEditorHover = {
2483
2483
  __proto__: null,
2484
2484
  Events: ViewletEditorHoverEvents,
2485
- appendWidget: appendWidget$2,
2486
- setBounds: setBounds$5,
2485
+ appendWidget: appendWidget$3,
2486
+ setBounds: setBounds$6,
2487
2487
  setDom: setDom$9
2488
2488
  };
2489
2489
 
2490
+ const handleFocusIn$3 = event => {
2491
+ preventDefault(event);
2492
+ const uid = fromEvent(event);
2493
+ handleFocusIn$4(uid);
2494
+ };
2495
+
2496
+ const ViewletEditorRenameEvents = {
2497
+ __proto__: null,
2498
+ handleFocusIn: handleFocusIn$3
2499
+ };
2500
+
2501
+ const setBounds$5 = (state, x, y) => {
2502
+ const {
2503
+ $Viewlet
2504
+ } = state;
2505
+ setXAndYTransform($Viewlet, x, -y);
2506
+ };
2507
+ const appendWidget$2 = state => {
2508
+ const {
2509
+ $Viewlet
2510
+ } = state;
2511
+ append$1($Viewlet);
2512
+ };
2513
+ const dispose$l = state => {
2514
+ remove$2(state.$Viewlet);
2515
+ };
2516
+
2517
+ const ViewletEditorRename = {
2518
+ __proto__: null,
2519
+ Events: ViewletEditorRenameEvents,
2520
+ appendWidget: appendWidget$2,
2521
+ dispose: dispose$l,
2522
+ setBounds: setBounds$5
2523
+ };
2524
+
2525
+ const handleFocusIn$2 = event => {
2526
+ preventDefault(event);
2527
+ const uid = fromEvent(event);
2528
+ handleFocusIn$4(uid);
2529
+ };
2530
+
2531
+ const ViewletEditorSourceActionsEvents = {
2532
+ __proto__: null,
2533
+ handleFocusIn: handleFocusIn$2
2534
+ };
2535
+
2536
+ const setBounds$4 = (state, x, y) => {
2537
+ const {
2538
+ $Viewlet
2539
+ } = state;
2540
+ setXAndYTransform($Viewlet, x, -y);
2541
+ };
2542
+ const appendWidget$1 = state => {
2543
+ const {
2544
+ $Viewlet
2545
+ } = state;
2546
+ append$1($Viewlet);
2547
+ };
2548
+ const dispose$k = state => {
2549
+ remove$2(state.$Viewlet);
2550
+ };
2551
+
2552
+ const ViewletEditorSourceActions = {
2553
+ __proto__: null,
2554
+ Events: ViewletEditorSourceActionsEvents,
2555
+ appendWidget: appendWidget$1,
2556
+ dispose: dispose$k,
2557
+ setBounds: setBounds$4
2558
+ };
2559
+
2490
2560
  const handleInput$7 = event => {
2491
2561
  const {
2492
2562
  target
@@ -2576,7 +2646,7 @@ const ViewletFindWidgetEvents = {
2576
2646
  returnValue: returnValue$8
2577
2647
  };
2578
2648
 
2579
- const create$H = () => {
2649
+ const create$I = () => {
2580
2650
  const $Viewlet = document.createElement('div');
2581
2651
  $Viewlet.className = 'Viewlet FindWidget';
2582
2652
  $Viewlet.role = Group;
@@ -2612,7 +2682,7 @@ const setValue$4 = (state, value) => {
2612
2682
  }
2613
2683
  $InputBox.value = value;
2614
2684
  };
2615
- const appendWidget$1 = state => {
2685
+ const appendWidget = state => {
2616
2686
  const {
2617
2687
  $Viewlet
2618
2688
  } = state;
@@ -2624,13 +2694,13 @@ const setDom$8 = (state, dom) => {
2624
2694
  } = state;
2625
2695
  rememberFocus($Viewlet, dom, ViewletFindWidgetEvents, 0);
2626
2696
  };
2627
- const setBounds$4 = (state, x, y, width, height) => {
2697
+ const setBounds$3 = (state, x, y, width, height) => {
2628
2698
  const {
2629
2699
  $Viewlet
2630
2700
  } = state;
2631
- setBounds$8($Viewlet, x, y, width, height);
2701
+ setBounds$9($Viewlet, x, y, width, height);
2632
2702
  };
2633
- const dispose$k = state => {
2703
+ const dispose$j = state => {
2634
2704
  remove$2(state.$Viewlet);
2635
2705
  };
2636
2706
  const Events$c = ViewletFindWidgetEvents;
@@ -2638,50 +2708,15 @@ const Events$c = ViewletFindWidgetEvents;
2638
2708
  const ViewletFindWidget = {
2639
2709
  __proto__: null,
2640
2710
  Events: Events$c,
2641
- appendWidget: appendWidget$1,
2642
- create: create$H,
2643
- dispose: dispose$k,
2711
+ appendWidget,
2712
+ create: create$I,
2713
+ dispose: dispose$j,
2644
2714
  focus: focus$i,
2645
- setBounds: setBounds$4,
2715
+ setBounds: setBounds$3,
2646
2716
  setDom: setDom$8,
2647
2717
  setValue: setValue$4
2648
2718
  };
2649
2719
 
2650
- const handleFocusIn$2 = event => {
2651
- preventDefault(event);
2652
- const uid = fromEvent(event);
2653
- handleFocusIn$3(uid);
2654
- };
2655
-
2656
- const ViewletEditorSourceActionsEvents = {
2657
- __proto__: null,
2658
- handleFocusIn: handleFocusIn$2
2659
- };
2660
-
2661
- const setBounds$3 = (state, x, y) => {
2662
- const {
2663
- $Viewlet
2664
- } = state;
2665
- setXAndYTransform($Viewlet, x, -y);
2666
- };
2667
- const appendWidget = state => {
2668
- const {
2669
- $Viewlet
2670
- } = state;
2671
- append$1($Viewlet);
2672
- };
2673
- const dispose$j = state => {
2674
- remove$2(state.$Viewlet);
2675
- };
2676
-
2677
- const ViewletEditorSourceActions = {
2678
- __proto__: null,
2679
- Events: ViewletEditorSourceActionsEvents,
2680
- appendWidget,
2681
- dispose: dispose$j,
2682
- setBounds: setBounds$3
2683
- };
2684
-
2685
2720
  const ActivityBar = 'ActivityBar';
2686
2721
  const Audio$1 = 'Audio';
2687
2722
  const BrowserViewOverview = 'BrowserViewOverview';
@@ -2739,6 +2774,8 @@ const E2eTests = 'E2eTests';
2739
2774
  const E2eTest = 'E2eTest';
2740
2775
  const WebView = 'WebView';
2741
2776
  const EditorCompletionDetails = 'EditorCompletionDetails';
2777
+ const EditorTextError = 'EditorTextError';
2778
+ const EditorRename = 'EditorRename';
2742
2779
 
2743
2780
  const state$6 = {
2744
2781
  instances: Object.create(null),
@@ -3081,12 +3118,13 @@ const enable = async window => {
3081
3118
 
3082
3119
  const main = async () => {
3083
3120
  enable(window);
3121
+ state$6.modules[ColorPicker] = ViewletColorPicker;
3084
3122
  state$6.modules[EditorCompletion] = ViewletEditorCompletion;
3085
3123
  state$6.modules[EditorCompletionDetails] = ViewletEditorCompletionDetails;
3086
- state$6.modules[ColorPicker] = ViewletColorPicker;
3087
- state$6.modules[FindWidget] = ViewletFindWidget;
3088
3124
  state$6.modules[EditorHover] = ViewletEditorHover;
3125
+ state$6.modules[EditorRename] = ViewletEditorRename;
3089
3126
  state$6.modules[EditorSourceActions] = ViewletEditorSourceActions;
3127
+ state$6.modules[FindWidget] = ViewletFindWidget;
3090
3128
  setLoad(load$2);
3091
3129
  // TODO this is discovered very late
3092
3130
  await launchWorkers();
@@ -3180,7 +3218,7 @@ ${relevant}`;
3180
3218
 
3181
3219
  const Module = 'module';
3182
3220
 
3183
- const create$G = async ({
3221
+ const create$H = async ({
3184
3222
  url,
3185
3223
  name
3186
3224
  }) => {
@@ -3246,7 +3284,7 @@ const wrap = worker => {
3246
3284
 
3247
3285
  const IpcParentWithModuleWorker = {
3248
3286
  __proto__: null,
3249
- create: create$G,
3287
+ create: create$H,
3250
3288
  wrap
3251
3289
  };
3252
3290
 
@@ -3254,7 +3292,7 @@ const isMessagePort$1 = value => {
3254
3292
  return value instanceof MessagePort;
3255
3293
  };
3256
3294
 
3257
- const create$F = async ({
3295
+ const create$G = async ({
3258
3296
  url
3259
3297
  }) => {
3260
3298
  string(url);
@@ -3275,10 +3313,10 @@ const create$F = async ({
3275
3313
 
3276
3314
  const IpcParentWithMessagePort = {
3277
3315
  __proto__: null,
3278
- create: create$F
3316
+ create: create$G
3279
3317
  };
3280
3318
 
3281
- const create$E = async url => {
3319
+ const create$F = async url => {
3282
3320
  const referencePort = await new Promise(resolve => {
3283
3321
  globalThis.acceptReferencePort = resolve;
3284
3322
  import(url);
@@ -3289,7 +3327,7 @@ const create$E = async url => {
3289
3327
 
3290
3328
  const IpcParentWithReferencePort = {
3291
3329
  __proto__: null,
3292
- create: create$E
3330
+ create: create$F
3293
3331
  };
3294
3332
 
3295
3333
  const isWorker = value => {
@@ -3297,12 +3335,12 @@ const isWorker = value => {
3297
3335
  };
3298
3336
 
3299
3337
  // TODO add test
3300
- const create$D = async ({
3338
+ const create$E = async ({
3301
3339
  url,
3302
3340
  name,
3303
3341
  port
3304
3342
  }) => {
3305
- const worker = await create$G({
3343
+ const worker = await create$H({
3306
3344
  url,
3307
3345
  name
3308
3346
  });
@@ -3321,7 +3359,7 @@ const create$D = async ({
3321
3359
 
3322
3360
  const IpcParentWithModuleWorkerWithMessagePort = {
3323
3361
  __proto__: null,
3324
- create: create$D
3362
+ create: create$E
3325
3363
  };
3326
3364
 
3327
3365
  const handleIpcOnce = ipc => {
@@ -3852,7 +3890,7 @@ const IpcChildWithMessagePort$1 = {
3852
3890
  };
3853
3891
 
3854
3892
  // TODO use handleIncomingIpc function
3855
- const create$C = async ({
3893
+ const create$D = async ({
3856
3894
  port,
3857
3895
  ipcId
3858
3896
  }) => {
@@ -3868,7 +3906,7 @@ const create$C = async ({
3868
3906
 
3869
3907
  const IpcParentWithElectron = {
3870
3908
  __proto__: null,
3871
- create: create$C
3909
+ create: create$D
3872
3910
  };
3873
3911
 
3874
3912
  const play = async src => {
@@ -4054,7 +4092,7 @@ const create$AriaAlert = () => {
4054
4092
  $AriaAlert.ariaAtomic = True;
4055
4093
  return $AriaAlert;
4056
4094
  };
4057
- const setMessage$3 = ($Old, $New, message) => {
4095
+ const setMessage$4 = ($Old, $New, message) => {
4058
4096
  $Old.textContent = String(Math.random());
4059
4097
  $Old.ariaHidden = True;
4060
4098
  $New.removeAttribute(AriaHidden);
@@ -4078,9 +4116,9 @@ const alert$1 = message => {
4078
4116
  const $AriaAlert2 = getAriaAlert2();
4079
4117
  // @ts-expect-error
4080
4118
  if ($AriaAlert1.textContent === message) {
4081
- setMessage$3($AriaAlert1, $AriaAlert2, message);
4119
+ setMessage$4($AriaAlert1, $AriaAlert2, message);
4082
4120
  } else {
4083
- setMessage$3($AriaAlert2, $AriaAlert1, message);
4121
+ setMessage$4($AriaAlert2, $AriaAlert1, message);
4084
4122
  }
4085
4123
  };
4086
4124
 
@@ -4099,7 +4137,7 @@ const AriaAlert = {
4099
4137
  // but that's difficult to know
4100
4138
 
4101
4139
  // TODO hide widget after timeout or mousemove
4102
- const create$B = (message, x, y) => {
4140
+ const create$C = (message, x, y) => {
4103
4141
  const $EditorError = document.createElement('div');
4104
4142
  $EditorError.className = 'EditorWidgetError';
4105
4143
  $EditorError.textContent = message;
@@ -4114,7 +4152,7 @@ const create$B = (message, x, y) => {
4114
4152
 
4115
4153
  const name$t = 'EditorError';
4116
4154
  const Commands$u = {
4117
- create: create$B
4155
+ create: create$C
4118
4156
  };
4119
4157
 
4120
4158
  const EditorError_ipc = {
@@ -4154,7 +4192,7 @@ const focusPrevious = () => {
4154
4192
  }
4155
4193
  };
4156
4194
 
4157
- const create$A = () => {
4195
+ const create$B = () => {
4158
4196
  const $InputBox = document.createElement('input');
4159
4197
  $InputBox.className = 'InputBox';
4160
4198
  $InputBox.spellcheck = false;
@@ -4178,8 +4216,8 @@ const FocusOutput = 28;
4178
4216
  const handleBlur$9 = () => {
4179
4217
  send(/* EditorRename.abort */'EditorRename.abort');
4180
4218
  };
4181
- const create$z = (x, y) => {
4182
- const $RenameWidgetInputBox = create$A();
4219
+ const create$A = (x, y) => {
4220
+ const $RenameWidgetInputBox = create$B();
4183
4221
  $RenameWidgetInputBox.className = 'RenameWidgetInputBox';
4184
4222
  $RenameWidgetInputBox.onblur = handleBlur$9;
4185
4223
  const $RenameWidget = document.createElement('div');
@@ -4210,7 +4248,7 @@ const finish = state => {
4210
4248
 
4211
4249
  const name$s = 'EditorRename';
4212
4250
  const Commands$t = {
4213
- create: create$z,
4251
+ create: create$A,
4214
4252
  dispose: dispose$i,
4215
4253
  finish: finish
4216
4254
  };
@@ -4296,7 +4334,7 @@ const showError = (message, y, x) => {
4296
4334
  $ImagePreviewImage
4297
4335
  };
4298
4336
  };
4299
- const create$y = (uri, top, left) => {
4337
+ const create$z = (uri, top, left) => {
4300
4338
  const $ImagePreviewImage = document.createElement('img');
4301
4339
  $ImagePreviewImage.className = 'ImagePreviewImage';
4302
4340
  $ImagePreviewImage.src = uri;
@@ -4327,7 +4365,7 @@ const dispose$h = state => {
4327
4365
 
4328
4366
  const ImagePreview = {
4329
4367
  __proto__: null,
4330
- create: create$y,
4368
+ create: create$z,
4331
4369
  dispose: dispose$h,
4332
4370
  showError,
4333
4371
  update
@@ -4335,7 +4373,7 @@ const ImagePreview = {
4335
4373
 
4336
4374
  const name$p = 'ImagePreview';
4337
4375
  const Commands$q = {
4338
- create: create$y,
4376
+ create: create$z,
4339
4377
  dispose: dispose$h,
4340
4378
  showError: showError,
4341
4379
  update: update
@@ -4413,7 +4451,7 @@ const InitData_ipc = {
4413
4451
 
4414
4452
  const name$n = 'IpcParent';
4415
4453
  const Commands$o = {
4416
- create: create$L
4454
+ create: create$M
4417
4455
  };
4418
4456
 
4419
4457
  const IpcParent_ipc = {
@@ -4533,7 +4571,7 @@ const create$Notification = message => {
4533
4571
  $Notification.textContent = message;
4534
4572
  return $Notification;
4535
4573
  };
4536
- const create$x = (type, message) => {
4574
+ const create$y = (type, message) => {
4537
4575
  // TODO this pattern might be also useful for activitybar, sidebar etc., creating elements as late as possible, only when actually needed
4538
4576
  const $Notification = create$Notification(message);
4539
4577
  append$1($Notification);
@@ -4586,7 +4624,7 @@ const name$h = 'Notification';
4586
4624
 
4587
4625
  // prettier-ignore
4588
4626
  const Commands$i = {
4589
- create: create$x,
4627
+ create: create$y,
4590
4628
  createWithOptions: createWithOptions,
4591
4629
  dispose: dispose$g
4592
4630
  };
@@ -4610,7 +4648,7 @@ const set$3 = (canvasId, canvas) => {
4610
4648
  const get$3 = id => {
4611
4649
  return get$4(id);
4612
4650
  };
4613
- const create$w = async (canvasId, objectId) => {
4651
+ const create$x = async (canvasId, objectId) => {
4614
4652
  const canvas = document.createElement('canvas');
4615
4653
  const offscreenCanvas = canvas.transferControlToOffscreen();
4616
4654
  set$3(canvasId, canvas);
@@ -4621,7 +4659,7 @@ const name$g = 'OffscreenCanvas';
4621
4659
 
4622
4660
  // prettier-ignore
4623
4661
  const Commands$h = {
4624
- create: create$w
4662
+ create: create$x
4625
4663
  };
4626
4664
 
4627
4665
  const OffscreenCanvas_ipc = {
@@ -5784,12 +5822,14 @@ const load$1 = moduleId => {
5784
5822
  return Promise.resolve().then(function () { return ViewletWebView; });
5785
5823
  case EditorCompletionDetails:
5786
5824
  return Promise.resolve().then(function () { return ViewletEditorCompletionDetails; });
5825
+ case EditorTextError:
5826
+ return Promise.resolve().then(function () { return ViewletEditorTextError; });
5787
5827
  default:
5788
5828
  throw new Error(`${moduleId} module not found in renderer process`);
5789
5829
  }
5790
5830
  };
5791
5831
 
5792
- const create$v = (id, uid = id) => {
5832
+ const create$w = (id, uid = id) => {
5793
5833
  const module = state$6.modules[id];
5794
5834
  if (!module) {
5795
5835
  throw new Error(`module not found: ${id}`);
@@ -5896,7 +5936,7 @@ const isSpecial = id => {
5896
5936
  const createPlaceholder = (viewletId, parentId, top, left, width, height) => {
5897
5937
  const $PlaceHolder = document.createElement('div');
5898
5938
  $PlaceHolder.className = `Viewlet ${viewletId}`;
5899
- setBounds$8($PlaceHolder, left, top, width, height);
5939
+ setBounds$9($PlaceHolder, left, top, width, height);
5900
5940
  if (isSpecial(viewletId)) {
5901
5941
  $PlaceHolder.id = viewletId;
5902
5942
  }
@@ -5966,7 +6006,7 @@ const sendMultiple = commands => {
5966
6006
  }
5967
6007
  case 'Viewlet.create':
5968
6008
  {
5969
- create$v(viewletId, method);
6009
+ create$w(viewletId, method);
5970
6010
  break;
5971
6011
  }
5972
6012
  case 'Viewlet.createFunctionalRoot':
@@ -6161,7 +6201,7 @@ const appendToBody = childId => {
6161
6201
  const getFn = command => {
6162
6202
  switch (command) {
6163
6203
  case 'Viewlet.create':
6164
- return create$v;
6204
+ return create$w;
6165
6205
  case 'Viewlet.send':
6166
6206
  return invoke;
6167
6207
  case 'Viewlet.show':
@@ -6217,7 +6257,7 @@ const setBounds$2 = (id, left, top, width, height) => {
6217
6257
  return;
6218
6258
  }
6219
6259
  const $Viewlet = instance.state.$Viewlet;
6220
- setBounds$8($Viewlet, left, top, width, height);
6260
+ setBounds$9($Viewlet, left, top, width, height);
6221
6261
  };
6222
6262
 
6223
6263
  const name$8 = 'Viewlet';
@@ -6507,7 +6547,7 @@ const waitForFrameToLoad = $Frame => {
6507
6547
  };
6508
6548
 
6509
6549
  // TODO could use browser view when running in electron
6510
- const create$u = async (uid, src, sandbox, csp, credentialless) => {
6550
+ const create$v = async (uid, src, sandbox, csp, credentialless) => {
6511
6551
  const $Iframe = document.createElement('iframe');
6512
6552
  setIframeCredentialless($Iframe, credentialless);
6513
6553
  setIframeCsp($Iframe, csp);
@@ -6549,7 +6589,7 @@ const dispose$d = uid => {
6549
6589
 
6550
6590
  const name = 'WebView';
6551
6591
  const Commands$1 = {
6552
- create: create$u,
6592
+ create: create$v,
6553
6593
  load: load,
6554
6594
  setPort: setPort$2,
6555
6595
  dispose: dispose$d
@@ -6657,7 +6697,7 @@ const ViewletAudio = {
6657
6697
  Events: Events$a
6658
6698
  };
6659
6699
 
6660
- const create$t = () => {
6700
+ const create$u = () => {
6661
6701
  const $Viewlet = document.createElement('div');
6662
6702
  $Viewlet.className = 'Viewlet BrowserViewOverview';
6663
6703
  return {
@@ -6673,11 +6713,11 @@ const setDom$6 = (state, dom) => {
6673
6713
 
6674
6714
  const ViewletBrowserViewOverview = {
6675
6715
  __proto__: null,
6676
- create: create$t,
6716
+ create: create$u,
6677
6717
  setDom: setDom$6
6678
6718
  };
6679
6719
 
6680
- const create$s = () => {
6720
+ const create$t = () => {
6681
6721
  const $Viewlet = document.createElement('div');
6682
6722
  $Viewlet.className = 'Viewlet Clock';
6683
6723
  return {
@@ -6694,7 +6734,7 @@ const setTime = (state, time) => {
6694
6734
 
6695
6735
  const ViewletClock = {
6696
6736
  __proto__: null,
6697
- create: create$s,
6737
+ create: create$t,
6698
6738
  dispose: dispose$c,
6699
6739
  refresh: refresh$3,
6700
6740
  setTime
@@ -6721,7 +6761,7 @@ const ViewletDebugConsoleEvents = {
6721
6761
  handleInput: handleInput$6
6722
6762
  };
6723
6763
 
6724
- const create$r = () => {
6764
+ const create$s = () => {
6725
6765
  const $Viewlet = document.createElement('div');
6726
6766
  $Viewlet.className = 'Viewlet DebugConsole';
6727
6767
  return {
@@ -6737,7 +6777,7 @@ const setDom$5 = (state, dom) => {
6737
6777
 
6738
6778
  const ViewletDebugConsole = {
6739
6779
  __proto__: null,
6740
- create: create$r,
6780
+ create: create$s,
6741
6781
  setDom: setDom$5
6742
6782
  };
6743
6783
 
@@ -6798,7 +6838,7 @@ const setMaskImage = ($Element, icon) => {
6798
6838
  }
6799
6839
  };
6800
6840
 
6801
- const create$q = icon => {
6841
+ const create$r = icon => {
6802
6842
  const $Icon = document.createElement('div');
6803
6843
  $Icon.className = 'MaskIcon';
6804
6844
  setMaskImage($Icon, icon);
@@ -6808,7 +6848,7 @@ const create$q = icon => {
6808
6848
 
6809
6849
  const create$Button = (label, icon) => {
6810
6850
  // TODO icon div might not be needed (unnecessary html element)
6811
- const $Icon = create$q(icon);
6851
+ const $Icon = create$r(icon);
6812
6852
  const $Button = document.createElement('button');
6813
6853
  $Button.className = 'IconButton';
6814
6854
  $Button.title = label;
@@ -6829,7 +6869,7 @@ const handleClick$6 = event => {
6829
6869
  handleClick$7(index);
6830
6870
  };
6831
6871
 
6832
- const create$p = () => {
6872
+ const create$q = () => {
6833
6873
  const $DialogTitle = document.createElement('h2');
6834
6874
  $DialogTitle.id = 'DialogTitle';
6835
6875
  const $DialogCloseButton = create$Button('Close', 'Close');
@@ -6910,7 +6950,7 @@ const setErrorStack = (state, errorStack) => {
6910
6950
 
6911
6951
  const ViewletDialog = {
6912
6952
  __proto__: null,
6913
- create: create$p,
6953
+ create: create$q,
6914
6954
  postAppend,
6915
6955
  setButtons,
6916
6956
  setCodeFrame,
@@ -6957,7 +6997,7 @@ const ViewletDiffEditor = {
6957
6997
 
6958
6998
  // TODO aria alert
6959
6999
 
6960
- const create$o = () => {
7000
+ const create$p = () => {
6961
7001
  const $Viewlet = document.createElement('div');
6962
7002
  $Viewlet.className = 'Viewlet EditorError';
6963
7003
  return {
@@ -6974,12 +7014,12 @@ const setBounds$1 = (state, x, y, width, height) => {
6974
7014
  const {
6975
7015
  $Viewlet
6976
7016
  } = state;
6977
- setBounds$8($Viewlet, x, y, width, height);
7017
+ setBounds$9($Viewlet, x, y, width, height);
6978
7018
  };
6979
7019
 
6980
7020
  const ViewletEditorError = {
6981
7021
  __proto__: null,
6982
- create: create$o,
7022
+ create: create$p,
6983
7023
  setBounds: setBounds$1,
6984
7024
  setDom: setDom$4
6985
7025
  };
@@ -7083,7 +7123,7 @@ const handleFocus$8 = event => {
7083
7123
  handleFocus$c(uid);
7084
7124
  };
7085
7125
 
7086
- const create$n = () => {
7126
+ const create$o = () => {
7087
7127
  const $Viewlet = document.createElement('div');
7088
7128
  $Viewlet.className = 'Viewlet EditorImage';
7089
7129
  return {
@@ -7126,13 +7166,13 @@ const setDom$3 = (state, dom) => {
7126
7166
  const ViewletEditorImage = {
7127
7167
  __proto__: null,
7128
7168
  attachEvents: attachEvents$8,
7129
- create: create$n,
7169
+ create: create$o,
7130
7170
  setDom: setDom$3,
7131
7171
  setDragging,
7132
7172
  setTransform
7133
7173
  };
7134
7174
 
7135
- const create$m = () => {
7175
+ const create$n = () => {
7136
7176
  const $Viewlet = document.createElement('div');
7137
7177
  $Viewlet.className = 'Viewlet EditorText';
7138
7178
  $Viewlet.textContent = 'loading...';
@@ -7149,7 +7189,7 @@ const refresh$2 = (state, context) => {
7149
7189
 
7150
7190
  const ViewletEditorPlainText = {
7151
7191
  __proto__: null,
7152
- create: create$m,
7192
+ create: create$n,
7153
7193
  dispose: dispose$b,
7154
7194
  refresh: refresh$2
7155
7195
  };
@@ -7408,7 +7448,7 @@ const handlePaste = event => {
7408
7448
  const text = getText(clipboardData);
7409
7449
  return ['paste', text];
7410
7450
  };
7411
- const handleScrollBarVerticalPointerDown = create$K(event => {
7451
+ const handleScrollBarVerticalPointerDown = create$L(event => {
7412
7452
  const {
7413
7453
  clientY
7414
7454
  } = event;
@@ -7531,7 +7571,7 @@ const setLineInfos = (state, dom) => {
7531
7571
  // 1. create -> only create dom elements
7532
7572
  // 2. render -> fill elements with attributes and data
7533
7573
  // that way all dom nodes can be recycled
7534
- const create$l = () => {
7574
+ const create$m = () => {
7535
7575
  const $EditorInput = document.createElement('textarea');
7536
7576
  $EditorInput.className = 'EditorInput';
7537
7577
  $EditorInput.ariaAutoComplete = List;
@@ -7698,7 +7738,7 @@ const setDecorationsDom$1 = (state, decorations) => {
7698
7738
  setDecorationsDom$2(state, decorations);
7699
7739
  };
7700
7740
 
7701
- const create$k = create$l;
7741
+ const create$l = create$m;
7702
7742
  const setText$1 = setText$2;
7703
7743
  const setSelections = setSelections$1;
7704
7744
  const setIncrementalEdits = setIncrementalEdits$1;
@@ -7740,7 +7780,7 @@ const setDecorationsDom = setDecorationsDom$1;
7740
7780
 
7741
7781
  const ViewletEditorText = {
7742
7782
  __proto__: null,
7743
- create: create$k,
7783
+ create: create$l,
7744
7784
  focus: focus$e,
7745
7785
  handleError: handleError$4,
7746
7786
  hideOverlayMessage,
@@ -7756,14 +7796,14 @@ const ViewletEditorText = {
7756
7796
  showOverlayMessage
7757
7797
  };
7758
7798
 
7759
- const create$j = () => {
7799
+ const create$k = () => {
7760
7800
  const $Viewlet = document.createElement('div');
7761
7801
  $Viewlet.className = 'Viewlet EditorWidgetError EditorOverlayMessage';
7762
7802
  return {
7763
7803
  $Viewlet
7764
7804
  };
7765
7805
  };
7766
- const setMessage$2 = (state, message) => {
7806
+ const setMessage$3 = (state, message) => {
7767
7807
  const {
7768
7808
  $Viewlet
7769
7809
  } = state;
@@ -7774,17 +7814,17 @@ const setBounds = (state, x, y, width, height) => {
7774
7814
  const {
7775
7815
  $Viewlet
7776
7816
  } = state;
7777
- setBounds$8($Viewlet, x, y, width, height);
7817
+ setBounds$9($Viewlet, x, y, width, height);
7778
7818
  };
7779
7819
 
7780
7820
  const ViewletEditorWidgetError = {
7781
7821
  __proto__: null,
7782
- create: create$j,
7822
+ create: create$k,
7783
7823
  setBounds,
7784
- setMessage: setMessage$2
7824
+ setMessage: setMessage$3
7785
7825
  };
7786
7826
 
7787
- const create$i = () => {
7827
+ const create$j = () => {
7788
7828
  const $Viewlet = document.createElement('div');
7789
7829
  $Viewlet.dataset.viewlet = 'Empty';
7790
7830
  $Viewlet.className = 'Viewlet';
@@ -7798,20 +7838,20 @@ const dispose$a = state => {};
7798
7838
 
7799
7839
  const ViewletEmpty = {
7800
7840
  __proto__: null,
7801
- create: create$i,
7841
+ create: create$j,
7802
7842
  dispose: dispose$a,
7803
7843
  focus: focus$d,
7804
7844
  refresh: refresh$1
7805
7845
  };
7806
7846
 
7807
- const create$h = () => {
7847
+ const create$i = () => {
7808
7848
  const $Viewlet = document.createElement('div');
7809
7849
  $Viewlet.className = 'Viewlet Error';
7810
7850
  return {
7811
7851
  $Viewlet
7812
7852
  };
7813
7853
  };
7814
- const setMessage$1 = (state, message) => {
7854
+ const setMessage$2 = (state, message) => {
7815
7855
  const {
7816
7856
  $Viewlet
7817
7857
  } = state;
@@ -7820,8 +7860,8 @@ const setMessage$1 = (state, message) => {
7820
7860
 
7821
7861
  const ViewletError = {
7822
7862
  __proto__: null,
7823
- create: create$h,
7824
- setMessage: setMessage$1
7863
+ create: create$i,
7864
+ setMessage: setMessage$2
7825
7865
  };
7826
7866
 
7827
7867
  const handleContextMenu$8 = event => {
@@ -8037,7 +8077,7 @@ const ViewletExplorerEvents = {
8037
8077
  handleWheel: handleWheel$3
8038
8078
  };
8039
8079
 
8040
- const create$g = () => {
8080
+ const create$h = () => {
8041
8081
  const $Viewlet = document.createElement('div');
8042
8082
  $Viewlet.className = 'Viewlet Explorer';
8043
8083
  $Viewlet.tabIndex = 0;
@@ -8095,7 +8135,7 @@ const setDom$2 = (state, dom) => {
8095
8135
  const ViewletExplorer = {
8096
8136
  __proto__: null,
8097
8137
  Events: Events$9,
8098
- create: create$g,
8138
+ create: create$h,
8099
8139
  dispose: dispose$9,
8100
8140
  focusInput,
8101
8141
  handleError: handleError$3,
@@ -8243,7 +8283,7 @@ const handleTouchEnd = event => {
8243
8283
 
8244
8284
  // based on https://github.com/microsoft/vscode/blob/main/src/vs/workbench/contrib/extensions/browser/extensionsList.ts (License MIT)
8245
8285
 
8246
- const create$f = () => {
8286
+ const create$g = () => {
8247
8287
  const $ExtensionHeader = document.createElement('div');
8248
8288
  $ExtensionHeader.className = 'ExtensionHeader';
8249
8289
 
@@ -8313,7 +8353,7 @@ const setExtensionState = () => {
8313
8353
  // state.extensions[index].state = extensionState
8314
8354
  // render(state)
8315
8355
  };
8316
- const setMessage = (state, message) => {
8356
+ const setMessage$1 = (state, message) => {
8317
8357
  object(state);
8318
8358
  string(message);
8319
8359
  const {
@@ -8388,7 +8428,7 @@ const ViewletExtensions = {
8388
8428
  __proto__: null,
8389
8429
  attachEvents: attachEvents$7,
8390
8430
  closeSuggest,
8391
- create: create$f,
8431
+ create: create$g,
8392
8432
  dispose: dispose$8,
8393
8433
  focus: focus$c,
8394
8434
  handleError: handleError$2,
@@ -8397,7 +8437,7 @@ const ViewletExtensions = {
8397
8437
  setExtensionState,
8398
8438
  setExtensionsDom,
8399
8439
  setHeaderDom,
8400
- setMessage,
8440
+ setMessage: setMessage$1,
8401
8441
  setNegativeMargin,
8402
8442
  setScrollBar: setScrollBar$2,
8403
8443
  setSearchValue,
@@ -9069,7 +9109,7 @@ const handleBlur$3 = () => {
9069
9109
  const handleKeyDown$1 = handleKeyDown$2;
9070
9110
  const handleKeyUp = handleKeyUp$1;
9071
9111
 
9072
- const create$e = () => {
9112
+ const create$f = () => {
9073
9113
  // TODO use aria role splitter once supported https://github.com/w3c/aria/issues/1348
9074
9114
  const $SashSideBar = document.createElement('div');
9075
9115
  $SashSideBar.className = 'Viewlet Sash SashVertical';
@@ -9116,16 +9156,16 @@ const setSashes = (state, sashSideBar, sashPanel) => {
9116
9156
  $SashSideBar,
9117
9157
  $SashPanel
9118
9158
  } = state;
9119
- setBounds$8($SashSideBar, sashSideBar.x, sashSideBar.y, sashSideBar.width, sashSideBar.height);
9159
+ setBounds$9($SashSideBar, sashSideBar.x, sashSideBar.y, sashSideBar.width, sashSideBar.height);
9120
9160
  $SashSideBar.classList.toggle('SashActive', sashSideBar.active);
9121
- setBounds$8($SashPanel, sashPanel.x, sashPanel.y, sashPanel.width, sashPanel.height);
9161
+ setBounds$9($SashPanel, sashPanel.x, sashPanel.y, sashPanel.width, sashPanel.height);
9122
9162
  $SashPanel.classList.toggle('SashActive', sashPanel.active);
9123
9163
  };
9124
9164
 
9125
9165
  const ViewletLayout = {
9126
9166
  __proto__: null,
9127
9167
  attachEvents: attachEvents$6,
9128
- create: create$e,
9168
+ create: create$f,
9129
9169
  setSashes
9130
9170
  };
9131
9171
 
@@ -9143,7 +9183,7 @@ const handleContextMenu$7 = event => {
9143
9183
  };
9144
9184
 
9145
9185
  // TODO Main should not be bound to Editor -> Lazy load Editor
9146
- const create$d = () => {
9186
+ const create$e = () => {
9147
9187
  const $Viewlet = document.createElement('div');
9148
9188
  $Viewlet.id = 'Main';
9149
9189
  $Viewlet.className = 'Viewlet Main';
@@ -9231,7 +9271,7 @@ const setDragOverlay = (state, visible, x, y, width, height) => {
9231
9271
  const {
9232
9272
  $DragOverlay
9233
9273
  } = state;
9234
- setBounds$8($DragOverlay, x, y, width, height);
9274
+ setBounds$9($DragOverlay, x, y, width, height);
9235
9275
  if (!hasOverlay) {
9236
9276
  document.body.append($DragOverlay);
9237
9277
  }
@@ -9243,7 +9283,7 @@ const ViewletMain = {
9243
9283
  attachEvents: attachEvents$5,
9244
9284
  closeAllViewlets,
9245
9285
  closeViewletAndTab,
9246
- create: create$d,
9286
+ create: create$e,
9247
9287
  dispose: dispose$7,
9248
9288
  focus: focus$a,
9249
9289
  highlightDragOver,
@@ -9292,7 +9332,7 @@ const handleTabsContextMenu = event => {
9292
9332
  handleTabContextMenu(uid, clientX, clientY);
9293
9333
  };
9294
9334
 
9295
- const create$c = () => {
9335
+ const create$d = () => {
9296
9336
  const $MainTabs = document.createElement('div');
9297
9337
  $MainTabs.className = 'Viewlet MainTabs';
9298
9338
  $MainTabs.role = TabList;
@@ -9329,12 +9369,12 @@ const setScrollLeft = (state, scrollLeft) => {
9329
9369
  const ViewletMainTabs = {
9330
9370
  __proto__: null,
9331
9371
  attachEvents: attachEvents$4,
9332
- create: create$c,
9372
+ create: create$d,
9333
9373
  setScrollLeft,
9334
9374
  setTabsDom: setTabsDom$2
9335
9375
  };
9336
9376
 
9337
- const create$b = () => {
9377
+ const create$c = () => {
9338
9378
  const $ViewletOutputContent = document.createElement('div');
9339
9379
  $ViewletOutputContent.className = 'OutputContent';
9340
9380
  $ViewletOutputContent.role = Log;
@@ -9386,7 +9426,7 @@ const dispose$6 = state => {};
9386
9426
  const ViewletOutput = {
9387
9427
  __proto__: null,
9388
9428
  clear,
9389
- create: create$b,
9429
+ create: create$c,
9390
9430
  dispose: dispose$6,
9391
9431
  disposeFindWidget,
9392
9432
  focus: focus$9,
@@ -9439,7 +9479,7 @@ const UiStrings = {
9439
9479
  Close: 'Close',
9440
9480
  Maximize: 'Maximize'
9441
9481
  };
9442
- const create$a = () => {
9482
+ const create$b = () => {
9443
9483
  const $PanelTabs = document.createElement('div');
9444
9484
  $PanelTabs.className = 'PanelTabs';
9445
9485
  $PanelTabs.role = TabList;
@@ -9552,7 +9592,7 @@ const setActionsDom$1 = (state, actions, childUid) => {
9552
9592
  const ViewletPanel = {
9553
9593
  __proto__: null,
9554
9594
  attachEvents: attachEvents$3,
9555
- create: create$a,
9595
+ create: create$b,
9556
9596
  dispose: dispose$5,
9557
9597
  focus: focus$8,
9558
9598
  setActionsDom: setActionsDom$1,
@@ -9767,8 +9807,8 @@ const focus$6 = state => {
9767
9807
  // - for windows narrator, ariaLabel works well
9768
9808
  // - for nvda ariaRoleDescription works better
9769
9809
 
9770
- const create$9 = () => {
9771
- const $QuickPickInput = create$A();
9810
+ const create$a = () => {
9811
+ const $QuickPickInput = create$B();
9772
9812
  $QuickPickInput.setAttribute(AriaControls, Ids.QuickPickItems); // TODO use idl once supported
9773
9813
  $QuickPickInput.role = ComboBox;
9774
9814
  $QuickPickInput.ariaLabel = 'Type the name of a command to run.';
@@ -9878,7 +9918,7 @@ const noop = state => {};
9878
9918
  const ViewletQuickPick = {
9879
9919
  __proto__: null,
9880
9920
  attachEvents: attachEvents$2,
9881
- create: create$9,
9921
+ create: create$a,
9882
9922
  dispose: dispose$4,
9883
9923
  focus: focus$6,
9884
9924
  hideStatus,
@@ -10049,7 +10089,7 @@ const handleLoadedMetaData = event => {
10049
10089
  target.play();
10050
10090
  };
10051
10091
 
10052
- const create$8 = () => {
10092
+ const create$9 = () => {
10053
10093
  const $Viewlet = document.createElement('div');
10054
10094
  $Viewlet.className = 'Viewlet ScreenCapture';
10055
10095
  return {
@@ -10069,7 +10109,7 @@ const setScreenCapture = (state, id) => {
10069
10109
 
10070
10110
  const ViewletScreenCapture = {
10071
10111
  __proto__: null,
10072
- create: create$8,
10112
+ create: create$9,
10073
10113
  setScreenCapture
10074
10114
  };
10075
10115
 
@@ -10259,7 +10299,7 @@ const handleHeaderClick = event => {
10259
10299
  }
10260
10300
  };
10261
10301
 
10262
- const create$7 = () => {
10302
+ const create$8 = () => {
10263
10303
  const $SideBarTitleAreaTitle = document.createElement('h2');
10264
10304
  $SideBarTitleAreaTitle.className = 'SideBarTitleAreaTitle';
10265
10305
  const $SideBarTitleArea = document.createElement('div');
@@ -10323,7 +10363,7 @@ const focus$4 = async () => {
10323
10363
  const ViewletSideBar = {
10324
10364
  __proto__: null,
10325
10365
  attachEvents: attachEvents$1,
10326
- create: create$7,
10366
+ create: create$8,
10327
10367
  dispose: dispose$2,
10328
10368
  focus: focus$4,
10329
10369
  setActionsDom,
@@ -10524,7 +10564,7 @@ const ViewletStatusBarEvents = {
10524
10564
  handleClick: handleClick$2
10525
10565
  };
10526
10566
 
10527
- const create$6 = () => {
10567
+ const create$7 = () => {
10528
10568
  const $Viewlet = document.createElement('div');
10529
10569
  $Viewlet.id = 'StatusBar';
10530
10570
  $Viewlet.className = 'Viewlet StatusBar';
@@ -10553,7 +10593,7 @@ const focus$2 = state => {
10553
10593
 
10554
10594
  const ViewletStatusBar = {
10555
10595
  __proto__: null,
10556
- create: create$6,
10596
+ create: create$7,
10557
10597
  focus: focus$2,
10558
10598
  setDom: setDom$1
10559
10599
  };
@@ -10656,7 +10696,7 @@ const createOffscreenTerminalDom = (root, {
10656
10696
  };
10657
10697
 
10658
10698
  // @ts-ignore
10659
- const create$5 = ({
10699
+ const create$6 = ({
10660
10700
  $Element,
10661
10701
  ...options
10662
10702
  }) => {
@@ -10677,7 +10717,7 @@ const handleKeyDown = (event, ...args) => {
10677
10717
  handleKeyDown$5(uid, ...args);
10678
10718
  };
10679
10719
 
10680
- const create$4 = () => {
10720
+ const create$5 = () => {
10681
10721
  const $Viewlet = document.createElement('div');
10682
10722
  $Viewlet.className = 'Viewlet Terminal';
10683
10723
  return {
@@ -10691,7 +10731,7 @@ const setTerminal = (state, canvasCursorId, canvasTextId) => {
10691
10731
  const {
10692
10732
  $Viewlet
10693
10733
  } = state;
10694
- const terminal = create$5({
10734
+ const terminal = create$6({
10695
10735
  $Element: $Viewlet,
10696
10736
  handleKeyDown: (...args) => {
10697
10737
  handleKeyDown({
@@ -10763,7 +10803,7 @@ const Commands = {
10763
10803
  const ViewletTerminal = {
10764
10804
  __proto__: null,
10765
10805
  Commands,
10766
- create: create$4,
10806
+ create: create$5,
10767
10807
  dispose: dispose$1,
10768
10808
  focus: focus$1,
10769
10809
  focusTextArea,
@@ -10784,7 +10824,7 @@ const handleClickTab = event => {
10784
10824
  handleClickTab$2(uid, index);
10785
10825
  };
10786
10826
 
10787
- const create$3 = () => {
10827
+ const create$4 = () => {
10788
10828
  const $Viewlet = document.createElement('div');
10789
10829
  $Viewlet.className = 'Viewlet Terminals';
10790
10830
  return {
@@ -10811,7 +10851,7 @@ const setTabsDom = (state, dom) => {
10811
10851
 
10812
10852
  const ViewletTerminals = {
10813
10853
  __proto__: null,
10814
- create: create$3,
10854
+ create: create$4,
10815
10855
  setTabsDom
10816
10856
  };
10817
10857
 
@@ -10825,7 +10865,7 @@ const handleContextMenu$4 = event => {
10825
10865
  return ['handleContextMenu', button, clientX, clientY];
10826
10866
  };
10827
10867
 
10828
- const create$2 = () => {
10868
+ const create$3 = () => {
10829
10869
  // TODO set aria label for title bar menu
10830
10870
  // TODO add tests for aria properties
10831
10871
  const $Viewlet = document.createElement('div');
@@ -10861,7 +10901,7 @@ const setFocused$1 = (state, isFocused) => {
10861
10901
  const ViewletTitleBar = {
10862
10902
  __proto__: null,
10863
10903
  attachEvents,
10864
- create: create$2,
10904
+ create: create$3,
10865
10905
  setFocused: setFocused$1
10866
10906
  };
10867
10907
 
@@ -11174,7 +11214,7 @@ const setMenus = (state, changes, uid) => {
11174
11214
  level,
11175
11215
  focusedIndex
11176
11216
  } = menu;
11177
- setBounds$8($Menu, x, y, width, height);
11217
+ setBounds$9($Menu, x, y, width, height);
11178
11218
  renderInto($Menu, dom);
11179
11219
  $Menu.id = `Menu-${level}`;
11180
11220
  append$1($Menu);
@@ -11200,7 +11240,7 @@ const setMenus = (state, changes, uid) => {
11200
11240
  focusedIndex
11201
11241
  } = menu;
11202
11242
  const $Menu = $$Menus[level];
11203
- setBounds$8($Menu, x, y, width, height);
11243
+ setBounds$9($Menu, x, y, width, height);
11204
11244
  renderInto($Menu, dom);
11205
11245
  if (level === newLength - 1) {
11206
11246
  if (focusedIndex === -1) {
@@ -11269,7 +11309,7 @@ const ViewletVideo = {
11269
11309
  Events
11270
11310
  };
11271
11311
 
11272
- const create$1 = () => {
11312
+ const create$2 = () => {
11273
11313
  const $Viewlet = document.createElement('div');
11274
11314
  $Viewlet.className = 'Viewlet TitleBarTitle';
11275
11315
  return {
@@ -11285,7 +11325,7 @@ const setDom = (state, dom) => {
11285
11325
 
11286
11326
  const ViewletTitleBarTitle = {
11287
11327
  __proto__: null,
11288
- create: create$1,
11328
+ create: create$2,
11289
11329
  setDom
11290
11330
  };
11291
11331
 
@@ -11337,7 +11377,7 @@ const ViewletAbout = {
11337
11377
  setFocused
11338
11378
  };
11339
11379
 
11340
- const create = () => {
11380
+ const create$1 = () => {
11341
11381
  const $Viewlet = document.createElement('div');
11342
11382
  $Viewlet.className = 'Viewlet EmptyEditor';
11343
11383
  return {
@@ -11347,7 +11387,7 @@ const create = () => {
11347
11387
 
11348
11388
  const ViewletEmptyEditor = {
11349
11389
  __proto__: null,
11350
- create
11390
+ create: create$1
11351
11391
  };
11352
11392
 
11353
11393
  const handleScrollBarPointerDown = event => {
@@ -11472,7 +11512,7 @@ const handleContextMenu$1 = event => {
11472
11512
  } = event;
11473
11513
  return ['handleContextMenu', button, clientX, clientY];
11474
11514
  };
11475
- const handleSashCornerPointerDown = create$K(event => {
11515
+ const handleSashCornerPointerDown = create$L(event => {
11476
11516
  const {
11477
11517
  clientX,
11478
11518
  clientY
@@ -11625,7 +11665,7 @@ const setPort = (state, portId, origin) => {
11625
11665
  };
11626
11666
  const setPosition = (state, id, x, y, width, height) => {
11627
11667
  const $Iframe = get(id);
11628
- setBounds$8($Iframe, x, y, width, height);
11668
+ setBounds$9($Iframe, x, y, width, height);
11629
11669
  };
11630
11670
 
11631
11671
  const ViewletWebView = {
@@ -11635,3 +11675,23 @@ const ViewletWebView = {
11635
11675
  setPort,
11636
11676
  setPosition
11637
11677
  };
11678
+
11679
+ const create = () => {
11680
+ const $Viewlet = document.createElement('div');
11681
+ $Viewlet.className = 'Viewlet EditorTextError';
11682
+ return {
11683
+ $Viewlet
11684
+ };
11685
+ };
11686
+ const setMessage = (state, message) => {
11687
+ const {
11688
+ $Viewlet
11689
+ } = state;
11690
+ $Viewlet.textContent = message;
11691
+ };
11692
+
11693
+ const ViewletEditorTextError = {
11694
+ __proto__: null,
11695
+ create,
11696
+ setMessage
11697
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "10.17.0",
3
+ "version": "10.19.0",
4
4
  "description": "",
5
5
  "main": "dist/rendererProcessMain.js",
6
6
  "type": "module",