@lvce-editor/renderer-process 10.18.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':
@@ -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,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
@@ -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,
2711
+ appendWidget,
2642
2712
  create: create$I,
2643
- dispose: dispose$k,
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';
@@ -2740,6 +2775,7 @@ const E2eTest = 'E2eTest';
2740
2775
  const WebView = 'WebView';
2741
2776
  const EditorCompletionDetails = 'EditorCompletionDetails';
2742
2777
  const EditorTextError = 'EditorTextError';
2778
+ const EditorRename = 'EditorRename';
2743
2779
 
2744
2780
  const state$6 = {
2745
2781
  instances: Object.create(null),
@@ -3082,12 +3118,13 @@ const enable = async window => {
3082
3118
 
3083
3119
  const main = async () => {
3084
3120
  enable(window);
3121
+ state$6.modules[ColorPicker] = ViewletColorPicker;
3085
3122
  state$6.modules[EditorCompletion] = ViewletEditorCompletion;
3086
3123
  state$6.modules[EditorCompletionDetails] = ViewletEditorCompletionDetails;
3087
- state$6.modules[ColorPicker] = ViewletColorPicker;
3088
- state$6.modules[FindWidget] = ViewletFindWidget;
3089
3124
  state$6.modules[EditorHover] = ViewletEditorHover;
3125
+ state$6.modules[EditorRename] = ViewletEditorRename;
3090
3126
  state$6.modules[EditorSourceActions] = ViewletEditorSourceActions;
3127
+ state$6.modules[FindWidget] = ViewletFindWidget;
3091
3128
  setLoad(load$2);
3092
3129
  // TODO this is discovered very late
3093
3130
  await launchWorkers();
@@ -5899,7 +5936,7 @@ const isSpecial = id => {
5899
5936
  const createPlaceholder = (viewletId, parentId, top, left, width, height) => {
5900
5937
  const $PlaceHolder = document.createElement('div');
5901
5938
  $PlaceHolder.className = `Viewlet ${viewletId}`;
5902
- setBounds$8($PlaceHolder, left, top, width, height);
5939
+ setBounds$9($PlaceHolder, left, top, width, height);
5903
5940
  if (isSpecial(viewletId)) {
5904
5941
  $PlaceHolder.id = viewletId;
5905
5942
  }
@@ -6220,7 +6257,7 @@ const setBounds$2 = (id, left, top, width, height) => {
6220
6257
  return;
6221
6258
  }
6222
6259
  const $Viewlet = instance.state.$Viewlet;
6223
- setBounds$8($Viewlet, left, top, width, height);
6260
+ setBounds$9($Viewlet, left, top, width, height);
6224
6261
  };
6225
6262
 
6226
6263
  const name$8 = 'Viewlet';
@@ -6977,7 +7014,7 @@ const setBounds$1 = (state, x, y, width, height) => {
6977
7014
  const {
6978
7015
  $Viewlet
6979
7016
  } = state;
6980
- setBounds$8($Viewlet, x, y, width, height);
7017
+ setBounds$9($Viewlet, x, y, width, height);
6981
7018
  };
6982
7019
 
6983
7020
  const ViewletEditorError = {
@@ -7777,7 +7814,7 @@ const setBounds = (state, x, y, width, height) => {
7777
7814
  const {
7778
7815
  $Viewlet
7779
7816
  } = state;
7780
- setBounds$8($Viewlet, x, y, width, height);
7817
+ setBounds$9($Viewlet, x, y, width, height);
7781
7818
  };
7782
7819
 
7783
7820
  const ViewletEditorWidgetError = {
@@ -9119,9 +9156,9 @@ const setSashes = (state, sashSideBar, sashPanel) => {
9119
9156
  $SashSideBar,
9120
9157
  $SashPanel
9121
9158
  } = state;
9122
- setBounds$8($SashSideBar, sashSideBar.x, sashSideBar.y, sashSideBar.width, sashSideBar.height);
9159
+ setBounds$9($SashSideBar, sashSideBar.x, sashSideBar.y, sashSideBar.width, sashSideBar.height);
9123
9160
  $SashSideBar.classList.toggle('SashActive', sashSideBar.active);
9124
- setBounds$8($SashPanel, sashPanel.x, sashPanel.y, sashPanel.width, sashPanel.height);
9161
+ setBounds$9($SashPanel, sashPanel.x, sashPanel.y, sashPanel.width, sashPanel.height);
9125
9162
  $SashPanel.classList.toggle('SashActive', sashPanel.active);
9126
9163
  };
9127
9164
 
@@ -9234,7 +9271,7 @@ const setDragOverlay = (state, visible, x, y, width, height) => {
9234
9271
  const {
9235
9272
  $DragOverlay
9236
9273
  } = state;
9237
- setBounds$8($DragOverlay, x, y, width, height);
9274
+ setBounds$9($DragOverlay, x, y, width, height);
9238
9275
  if (!hasOverlay) {
9239
9276
  document.body.append($DragOverlay);
9240
9277
  }
@@ -11177,7 +11214,7 @@ const setMenus = (state, changes, uid) => {
11177
11214
  level,
11178
11215
  focusedIndex
11179
11216
  } = menu;
11180
- setBounds$8($Menu, x, y, width, height);
11217
+ setBounds$9($Menu, x, y, width, height);
11181
11218
  renderInto($Menu, dom);
11182
11219
  $Menu.id = `Menu-${level}`;
11183
11220
  append$1($Menu);
@@ -11203,7 +11240,7 @@ const setMenus = (state, changes, uid) => {
11203
11240
  focusedIndex
11204
11241
  } = menu;
11205
11242
  const $Menu = $$Menus[level];
11206
- setBounds$8($Menu, x, y, width, height);
11243
+ setBounds$9($Menu, x, y, width, height);
11207
11244
  renderInto($Menu, dom);
11208
11245
  if (level === newLength - 1) {
11209
11246
  if (focusedIndex === -1) {
@@ -11628,7 +11665,7 @@ const setPort = (state, portId, origin) => {
11628
11665
  };
11629
11666
  const setPosition = (state, id, x, y, width, height) => {
11630
11667
  const $Iframe = get(id);
11631
- setBounds$8($Iframe, x, y, width, height);
11668
+ setBounds$9($Iframe, x, y, width, height);
11632
11669
  };
11633
11670
 
11634
11671
  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.19.0",
4
4
  "description": "",
5
5
  "main": "dist/rendererProcessMain.js",
6
6
  "type": "module",