@lvce-editor/renderer-process 10.18.0 → 10.20.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':
@@ -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,
@@ -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`;
@@ -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');
@@ -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,11 +2349,11 @@ 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
 
@@ -2361,9 +2361,9 @@ const ViewletEditorCompletion = {
2361
2361
  __proto__: null,
2362
2362
  attachEvents: attachEvents$b,
2363
2363
  create: create$K,
2364
- dispose: dispose$m,
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,
@@ -2403,30 +2403,30 @@ 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
2427
  create: create$J,
2428
- dispose: dispose$l,
2429
- setBounds: setBounds$6,
2428
+ dispose: dispose$m,
2429
+ setBounds: setBounds$7,
2430
2430
  setDom: setDom$a
2431
2431
  };
2432
2432
 
@@ -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,82 @@ 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, width, height) => {
2502
+ const {
2503
+ $Viewlet
2504
+ } = state;
2505
+ setBounds$9($Viewlet, x, y, width, height);
2506
+ applyUidWorkaround($Viewlet);
2507
+ };
2508
+ const appendWidget$2 = state => {
2509
+ const {
2510
+ $Viewlet
2511
+ } = state;
2512
+ append$1($Viewlet);
2513
+ };
2514
+ const dispose$l = state => {
2515
+ remove$2(state.$Viewlet);
2516
+ };
2517
+
2518
+ const ViewletEditorRename = {
2519
+ __proto__: null,
2520
+ Events: ViewletEditorRenameEvents,
2521
+ appendWidget: appendWidget$2,
2522
+ dispose: dispose$l,
2523
+ setBounds: setBounds$5
2524
+ };
2525
+
2526
+ const handleFocusIn$2 = event => {
2527
+ preventDefault(event);
2528
+ const uid = fromEvent(event);
2529
+ handleFocusIn$4(uid);
2530
+ };
2531
+
2532
+ const ViewletEditorSourceActionsEvents = {
2533
+ __proto__: null,
2534
+ handleFocusIn: handleFocusIn$2
2535
+ };
2536
+
2537
+ const setBounds$4 = (state, x, y) => {
2538
+ const {
2539
+ $Viewlet
2540
+ } = state;
2541
+ setXAndYTransform($Viewlet, x, -y);
2542
+ };
2543
+ const appendWidget$1 = state => {
2544
+ const {
2545
+ $Viewlet
2546
+ } = state;
2547
+ append$1($Viewlet);
2548
+ };
2549
+ const dispose$k = state => {
2550
+ remove$2(state.$Viewlet);
2551
+ };
2552
+
2553
+ const ViewletEditorSourceActions = {
2554
+ __proto__: null,
2555
+ Events: ViewletEditorSourceActionsEvents,
2556
+ appendWidget: appendWidget$1,
2557
+ dispose: dispose$k,
2558
+ setBounds: setBounds$4
2559
+ };
2560
+
2490
2561
  const handleInput$7 = event => {
2491
2562
  const {
2492
2563
  target
@@ -2612,7 +2683,7 @@ const setValue$4 = (state, value) => {
2612
2683
  }
2613
2684
  $InputBox.value = value;
2614
2685
  };
2615
- const appendWidget$1 = state => {
2686
+ const appendWidget = state => {
2616
2687
  const {
2617
2688
  $Viewlet
2618
2689
  } = state;
@@ -2624,13 +2695,13 @@ const setDom$8 = (state, dom) => {
2624
2695
  } = state;
2625
2696
  rememberFocus($Viewlet, dom, ViewletFindWidgetEvents, 0);
2626
2697
  };
2627
- const setBounds$4 = (state, x, y, width, height) => {
2698
+ const setBounds$3 = (state, x, y, width, height) => {
2628
2699
  const {
2629
2700
  $Viewlet
2630
2701
  } = state;
2631
- setBounds$8($Viewlet, x, y, width, height);
2702
+ setBounds$9($Viewlet, x, y, width, height);
2632
2703
  };
2633
- const dispose$k = state => {
2704
+ const dispose$j = state => {
2634
2705
  remove$2(state.$Viewlet);
2635
2706
  };
2636
2707
  const Events$c = ViewletFindWidgetEvents;
@@ -2638,50 +2709,15 @@ const Events$c = ViewletFindWidgetEvents;
2638
2709
  const ViewletFindWidget = {
2639
2710
  __proto__: null,
2640
2711
  Events: Events$c,
2641
- appendWidget: appendWidget$1,
2712
+ appendWidget,
2642
2713
  create: create$I,
2643
- dispose: dispose$k,
2714
+ dispose: dispose$j,
2644
2715
  focus: focus$i,
2645
- setBounds: setBounds$4,
2716
+ setBounds: setBounds$3,
2646
2717
  setDom: setDom$8,
2647
2718
  setValue: setValue$4
2648
2719
  };
2649
2720
 
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
2721
  const ActivityBar = 'ActivityBar';
2686
2722
  const Audio$1 = 'Audio';
2687
2723
  const BrowserViewOverview = 'BrowserViewOverview';
@@ -2740,6 +2776,7 @@ const E2eTest = 'E2eTest';
2740
2776
  const WebView = 'WebView';
2741
2777
  const EditorCompletionDetails = 'EditorCompletionDetails';
2742
2778
  const EditorTextError = 'EditorTextError';
2779
+ const EditorRename = 'EditorRename';
2743
2780
 
2744
2781
  const state$6 = {
2745
2782
  instances: Object.create(null),
@@ -3082,12 +3119,13 @@ const enable = async window => {
3082
3119
 
3083
3120
  const main = async () => {
3084
3121
  enable(window);
3122
+ state$6.modules[ColorPicker] = ViewletColorPicker;
3085
3123
  state$6.modules[EditorCompletion] = ViewletEditorCompletion;
3086
3124
  state$6.modules[EditorCompletionDetails] = ViewletEditorCompletionDetails;
3087
- state$6.modules[ColorPicker] = ViewletColorPicker;
3088
- state$6.modules[FindWidget] = ViewletFindWidget;
3089
3125
  state$6.modules[EditorHover] = ViewletEditorHover;
3126
+ state$6.modules[EditorRename] = ViewletEditorRename;
3090
3127
  state$6.modules[EditorSourceActions] = ViewletEditorSourceActions;
3128
+ state$6.modules[FindWidget] = ViewletFindWidget;
3091
3129
  setLoad(load$2);
3092
3130
  // TODO this is discovered very late
3093
3131
  await launchWorkers();
@@ -5899,7 +5937,7 @@ const isSpecial = id => {
5899
5937
  const createPlaceholder = (viewletId, parentId, top, left, width, height) => {
5900
5938
  const $PlaceHolder = document.createElement('div');
5901
5939
  $PlaceHolder.className = `Viewlet ${viewletId}`;
5902
- setBounds$8($PlaceHolder, left, top, width, height);
5940
+ setBounds$9($PlaceHolder, left, top, width, height);
5903
5941
  if (isSpecial(viewletId)) {
5904
5942
  $PlaceHolder.id = viewletId;
5905
5943
  }
@@ -6220,7 +6258,7 @@ const setBounds$2 = (id, left, top, width, height) => {
6220
6258
  return;
6221
6259
  }
6222
6260
  const $Viewlet = instance.state.$Viewlet;
6223
- setBounds$8($Viewlet, left, top, width, height);
6261
+ setBounds$9($Viewlet, left, top, width, height);
6224
6262
  };
6225
6263
 
6226
6264
  const name$8 = 'Viewlet';
@@ -6977,7 +7015,7 @@ const setBounds$1 = (state, x, y, width, height) => {
6977
7015
  const {
6978
7016
  $Viewlet
6979
7017
  } = state;
6980
- setBounds$8($Viewlet, x, y, width, height);
7018
+ setBounds$9($Viewlet, x, y, width, height);
6981
7019
  };
6982
7020
 
6983
7021
  const ViewletEditorError = {
@@ -7777,7 +7815,7 @@ const setBounds = (state, x, y, width, height) => {
7777
7815
  const {
7778
7816
  $Viewlet
7779
7817
  } = state;
7780
- setBounds$8($Viewlet, x, y, width, height);
7818
+ setBounds$9($Viewlet, x, y, width, height);
7781
7819
  };
7782
7820
 
7783
7821
  const ViewletEditorWidgetError = {
@@ -9119,9 +9157,9 @@ const setSashes = (state, sashSideBar, sashPanel) => {
9119
9157
  $SashSideBar,
9120
9158
  $SashPanel
9121
9159
  } = state;
9122
- setBounds$8($SashSideBar, sashSideBar.x, sashSideBar.y, sashSideBar.width, sashSideBar.height);
9160
+ setBounds$9($SashSideBar, sashSideBar.x, sashSideBar.y, sashSideBar.width, sashSideBar.height);
9123
9161
  $SashSideBar.classList.toggle('SashActive', sashSideBar.active);
9124
- setBounds$8($SashPanel, sashPanel.x, sashPanel.y, sashPanel.width, sashPanel.height);
9162
+ setBounds$9($SashPanel, sashPanel.x, sashPanel.y, sashPanel.width, sashPanel.height);
9125
9163
  $SashPanel.classList.toggle('SashActive', sashPanel.active);
9126
9164
  };
9127
9165
 
@@ -9234,7 +9272,7 @@ const setDragOverlay = (state, visible, x, y, width, height) => {
9234
9272
  const {
9235
9273
  $DragOverlay
9236
9274
  } = state;
9237
- setBounds$8($DragOverlay, x, y, width, height);
9275
+ setBounds$9($DragOverlay, x, y, width, height);
9238
9276
  if (!hasOverlay) {
9239
9277
  document.body.append($DragOverlay);
9240
9278
  }
@@ -11177,7 +11215,7 @@ const setMenus = (state, changes, uid) => {
11177
11215
  level,
11178
11216
  focusedIndex
11179
11217
  } = menu;
11180
- setBounds$8($Menu, x, y, width, height);
11218
+ setBounds$9($Menu, x, y, width, height);
11181
11219
  renderInto($Menu, dom);
11182
11220
  $Menu.id = `Menu-${level}`;
11183
11221
  append$1($Menu);
@@ -11203,7 +11241,7 @@ const setMenus = (state, changes, uid) => {
11203
11241
  focusedIndex
11204
11242
  } = menu;
11205
11243
  const $Menu = $$Menus[level];
11206
- setBounds$8($Menu, x, y, width, height);
11244
+ setBounds$9($Menu, x, y, width, height);
11207
11245
  renderInto($Menu, dom);
11208
11246
  if (level === newLength - 1) {
11209
11247
  if (focusedIndex === -1) {
@@ -11628,7 +11666,7 @@ const setPort = (state, portId, origin) => {
11628
11666
  };
11629
11667
  const setPosition = (state, id, x, y, width, height) => {
11630
11668
  const $Iframe = get(id);
11631
- setBounds$8($Iframe, x, y, width, height);
11669
+ setBounds$9($Iframe, x, y, width, height);
11632
11670
  };
11633
11671
 
11634
11672
  const ViewletWebView = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "10.18.0",
3
+ "version": "10.20.0",
4
4
  "description": "",
5
5
  "main": "dist/rendererProcessMain.js",
6
6
  "type": "module",