@lvce-editor/renderer-process 10.9.0 → 10.11.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.
@@ -1924,7 +1924,7 @@ const setOffsetX = (state, offsetX) => {
1924
1924
  setXAndYTransform($ColorPickerSliderThumb, offsetX, 0);
1925
1925
  applyUidWorkaround($Viewlet);
1926
1926
  };
1927
- const appendWidget$2 = state => {
1927
+ const appendWidget$3 = state => {
1928
1928
  const {
1929
1929
  $Viewlet
1930
1930
  } = state;
@@ -1934,7 +1934,7 @@ const appendWidget$2 = state => {
1934
1934
  const ViewletColorPicker = {
1935
1935
  __proto__: null,
1936
1936
  Events: ViewletColorPickerEvents,
1937
- appendWidget: appendWidget$2,
1937
+ appendWidget: appendWidget$3,
1938
1938
  setColor,
1939
1939
  setOffsetX
1940
1940
  };
@@ -2318,7 +2318,7 @@ const attachEvents$b = state => {
2318
2318
  // TODO show should be passed active cursor position
2319
2319
  // this would make this function easier to test as it would avoid dependency on globals of other files
2320
2320
 
2321
- const setDom$a = (state, dom) => {
2321
+ const setDom$b = (state, dom) => {
2322
2322
  const {
2323
2323
  $ListItems,
2324
2324
  $Viewlet
@@ -2365,7 +2365,7 @@ const ViewletEditorCompletion = {
2365
2365
  handleError: handleError$8,
2366
2366
  setBounds: setBounds$7,
2367
2367
  setContentHeight,
2368
- setDom: setDom$a,
2368
+ setDom: setDom$b,
2369
2369
  setNegativeMargin,
2370
2370
  setScrollBar: setScrollBar$2,
2371
2371
  setSize,
@@ -2394,7 +2394,7 @@ const create$I = () => {
2394
2394
  const attachEvents$a = state => {
2395
2395
  // TODO
2396
2396
  };
2397
- const setDom$9 = (state, dom) => {
2397
+ const setDom$a = (state, dom) => {
2398
2398
  const {
2399
2399
  $Viewlet
2400
2400
  } = state;
@@ -2403,7 +2403,7 @@ const setDom$9 = (state, dom) => {
2403
2403
  $Viewlet.replaceChildren(...$Root.firstChild.childNodes);
2404
2404
  append$1($Viewlet);
2405
2405
  };
2406
- const appendWidget$1 = state => {
2406
+ const appendWidget$2 = state => {
2407
2407
  const {
2408
2408
  $Viewlet
2409
2409
  } = state;
@@ -2422,16 +2422,71 @@ const setBounds$6 = (state, x, y, width, height) => {
2422
2422
  const ViewletEditorCompletionDetails = {
2423
2423
  __proto__: null,
2424
2424
  Events: ViewletEditorCompletionDetailsEvents,
2425
- appendWidget: appendWidget$1,
2425
+ appendWidget: appendWidget$2,
2426
2426
  attachEvents: attachEvents$a,
2427
2427
  create: create$I,
2428
2428
  dispose: dispose$j,
2429
2429
  setBounds: setBounds$6,
2430
- setDom: setDom$9
2430
+ setDom: setDom$a
2431
2431
  };
2432
2432
 
2433
2433
  const rememberFocus = rememberFocus$1;
2434
2434
 
2435
+ const returnValue$9 = true;
2436
+ const handleSashPointerDown$2 = create$K(event => {
2437
+ const {
2438
+ clientX,
2439
+ clientY
2440
+ } = event;
2441
+ return ['handleSashPointerDown', clientX, clientY];
2442
+ }, event => {
2443
+ const {
2444
+ clientX,
2445
+ clientY
2446
+ } = event;
2447
+ return ['handleSashPointerMove', clientX, clientY];
2448
+ }, event => {
2449
+ const {
2450
+ clientX,
2451
+ clientY
2452
+ } = event;
2453
+ return ['handleSashPointerUp', clientX, clientY];
2454
+ });
2455
+
2456
+ const ViewletEditorHoverEvents = {
2457
+ __proto__: null,
2458
+ handleSashPointerDown: handleSashPointerDown$2,
2459
+ returnValue: returnValue$9
2460
+ };
2461
+
2462
+ const setBounds$5 = (state, x, y, width, height) => {
2463
+ const {
2464
+ $Viewlet
2465
+ } = state;
2466
+ setWidth($Viewlet, width);
2467
+ setXAndYTransform($Viewlet, x, -y);
2468
+ };
2469
+ const appendWidget$1 = state => {
2470
+ const {
2471
+ $Viewlet
2472
+ } = state;
2473
+ append$1($Viewlet);
2474
+ };
2475
+ const setDom$9 = (state, dom) => {
2476
+ const {
2477
+ $Viewlet
2478
+ } = state;
2479
+ rememberFocus($Viewlet, dom, ViewletEditorHoverEvents, 0);
2480
+ };
2481
+
2482
+ const ViewletEditorHover = {
2483
+ __proto__: null,
2484
+ Events: ViewletEditorHoverEvents,
2485
+ appendWidget: appendWidget$1,
2486
+ setBounds: setBounds$5,
2487
+ setDom: setDom$9
2488
+ };
2489
+
2435
2490
  const handleInput$7 = event => {
2436
2491
  const {
2437
2492
  target
@@ -2477,7 +2532,22 @@ const handleReplaceFocus = event => {
2477
2532
  const handleFocus$b = event => {
2478
2533
  return ['FindWidget.handleFocus'];
2479
2534
  };
2480
- const returnValue$9 = true;
2535
+ const handleToggleReplaceFocus = event => {
2536
+ return ['FindWidget.handleToggleReplaceFocus'];
2537
+ };
2538
+ const handleFocusPrevious = event => {
2539
+ return ['FindWidget.handleFocusPrevious'];
2540
+ };
2541
+ const handleFocusNext = event => {
2542
+ return ['FindWidget.handleFocusNext'];
2543
+ };
2544
+ const handleFocusClose = event => {
2545
+ return ['FindWidget.handleFocusClose'];
2546
+ };
2547
+ const handleFocusReplaceAll = event => {
2548
+ return ['FindWidget.handleFocusReplaceAll'];
2549
+ };
2550
+ const returnValue$8 = true;
2481
2551
 
2482
2552
  const ViewletFindWidgetEvents = {
2483
2553
  __proto__: null,
@@ -2488,11 +2558,16 @@ const ViewletFindWidgetEvents = {
2488
2558
  handleClickReplaceAll,
2489
2559
  handleClickToggleReplace,
2490
2560
  handleFocus: handleFocus$b,
2561
+ handleFocusClose,
2562
+ handleFocusNext,
2563
+ handleFocusPrevious,
2564
+ handleFocusReplaceAll,
2491
2565
  handleInput: handleInput$7,
2492
2566
  handleInputBlur,
2493
2567
  handleReplaceFocus,
2494
2568
  handleReplaceInput: handleReplaceInput$1,
2495
- returnValue: returnValue$9
2569
+ handleToggleReplaceFocus,
2570
+ returnValue: returnValue$8
2496
2571
  };
2497
2572
 
2498
2573
  const create$H = () => {
@@ -2503,15 +2578,22 @@ const create$H = () => {
2503
2578
  $Viewlet
2504
2579
  };
2505
2580
  };
2506
- const focus$i = state => {
2581
+ const focus$i = (state, key, source) => {
2582
+ if (!key) {
2583
+ return;
2584
+ }
2585
+ if (source !== /* script */2) {
2586
+ return;
2587
+ }
2507
2588
  const {
2508
2589
  $Viewlet
2509
2590
  } = state;
2510
- const $InputBox = $Viewlet.querySelector('.MultilineInputBox');
2511
- if (!$InputBox) {
2591
+ const $Element = $Viewlet.querySelector(key);
2592
+ if (!$Element) {
2593
+ console.warn(`element not found: ${key}`);
2512
2594
  return;
2513
2595
  }
2514
- $InputBox.focus();
2596
+ $Element.focus();
2515
2597
  applyUidWorkaround($Viewlet);
2516
2598
  };
2517
2599
  const setValue$4 = (state, value) => {
@@ -2536,7 +2618,7 @@ const setDom$8 = (state, dom) => {
2536
2618
  } = state;
2537
2619
  rememberFocus($Viewlet, dom, ViewletFindWidgetEvents, 0);
2538
2620
  };
2539
- const setBounds$5 = (state, x, y, width, height) => {
2621
+ const setBounds$4 = (state, x, y, width, height) => {
2540
2622
  const {
2541
2623
  $Viewlet
2542
2624
  } = state;
@@ -2550,7 +2632,7 @@ const ViewletFindWidget = {
2550
2632
  appendWidget,
2551
2633
  create: create$H,
2552
2634
  focus: focus$i,
2553
- setBounds: setBounds$5,
2635
+ setBounds: setBounds$4,
2554
2636
  setDom: setDom$8,
2555
2637
  setValue: setValue$4
2556
2638
  };
@@ -2958,6 +3040,7 @@ const main = async () => {
2958
3040
  state$6.modules[EditorCompletionDetails] = ViewletEditorCompletionDetails;
2959
3041
  state$6.modules[ColorPicker] = ViewletColorPicker;
2960
3042
  state$6.modules[FindWidget] = ViewletFindWidget;
3043
+ state$6.modules[EditorHover] = ViewletEditorHover;
2961
3044
  setLoad(load$2);
2962
3045
  // TODO this is discovered very late
2963
3046
  await launchWorkers();
@@ -5832,7 +5915,7 @@ const sendMultiple = commands => {
5832
5915
  case 'Viewlet.setBounds':
5833
5916
  {
5834
5917
  // @ts-expect-error
5835
- setBounds$4(viewletId, method, ...args);
5918
+ setBounds$3(viewletId, method, ...args);
5836
5919
  break;
5837
5920
  }
5838
5921
  case 'Viewlet.create':
@@ -6042,7 +6125,7 @@ const getFn = command => {
6042
6125
  case 'Viewlet.setDom2':
6043
6126
  return setDom2;
6044
6127
  case 'Viewlet.setBounds':
6045
- return setBounds$4;
6128
+ return setBounds$3;
6046
6129
  case 'Viewlet.ariaAnnounce':
6047
6130
  return ariaAnnounce;
6048
6131
  case 'Viewlet.append':
@@ -6082,7 +6165,7 @@ const show = id => {
6082
6165
  instance.factory.focus(instance.state);
6083
6166
  }
6084
6167
  };
6085
- const setBounds$4 = (id, left, top, width, height) => {
6168
+ const setBounds$3 = (id, left, top, width, height) => {
6086
6169
  const instance = state$6.instances[id];
6087
6170
  if (!instance) {
6088
6171
  return;
@@ -6106,7 +6189,7 @@ const Commands$9 = {
6106
6189
  removeKeyBindings: removeKeyBindings,
6107
6190
  send: invoke,
6108
6191
  sendMultiple: sendMultiple,
6109
- setBounds: setBounds$4,
6192
+ setBounds: setBounds$3,
6110
6193
  show: show
6111
6194
  };
6112
6195
 
@@ -6483,7 +6566,7 @@ const handleContextMenu$b = event => {
6483
6566
  } = event;
6484
6567
  return ['handleContextMenu', button, clientX, clientY];
6485
6568
  };
6486
- const returnValue$8 = true;
6569
+ const returnValue$7 = true;
6487
6570
 
6488
6571
  const ViewletActivityBarEvents = {
6489
6572
  __proto__: null,
@@ -6491,7 +6574,7 @@ const ViewletActivityBarEvents = {
6491
6574
  handleContextMenu: handleContextMenu$b,
6492
6575
  handleFocus: handleFocus$a,
6493
6576
  handleMouseDown: handleMouseDown$2,
6494
- returnValue: returnValue$8
6577
+ returnValue: returnValue$7
6495
6578
  };
6496
6579
 
6497
6580
  const Events$b = ViewletActivityBarEvents;
@@ -6832,7 +6915,7 @@ const setDom$4 = (state, dom) => {
6832
6915
  } = state;
6833
6916
  renderInto($Viewlet, dom);
6834
6917
  };
6835
- const setBounds$3 = (state, x, y, width, height) => {
6918
+ const setBounds$2 = (state, x, y, width, height) => {
6836
6919
  const {
6837
6920
  $Viewlet
6838
6921
  } = state;
@@ -6842,51 +6925,10 @@ const setBounds$3 = (state, x, y, width, height) => {
6842
6925
  const ViewletEditorError = {
6843
6926
  __proto__: null,
6844
6927
  create: create$o,
6845
- setBounds: setBounds$3,
6928
+ setBounds: setBounds$2,
6846
6929
  setDom: setDom$4
6847
6930
  };
6848
6931
 
6849
- const returnValue$7 = true;
6850
- const handleSashPointerDown$2 = create$K(event => {
6851
- const {
6852
- clientX,
6853
- clientY
6854
- } = event;
6855
- return ['handleSashPointerDown', clientX, clientY];
6856
- }, event => {
6857
- const {
6858
- clientX,
6859
- clientY
6860
- } = event;
6861
- return ['handleSashPointerMove', clientX, clientY];
6862
- }, event => {
6863
- const {
6864
- clientX,
6865
- clientY
6866
- } = event;
6867
- return ['handleSashPointerUp', clientX, clientY];
6868
- });
6869
-
6870
- const ViewletEditorHoverEvents = {
6871
- __proto__: null,
6872
- handleSashPointerDown: handleSashPointerDown$2,
6873
- returnValue: returnValue$7
6874
- };
6875
-
6876
- const setBounds$2 = (state, x, y, width, height) => {
6877
- const {
6878
- $Viewlet
6879
- } = state;
6880
- setWidth($Viewlet, width);
6881
- setXAndYTransform($Viewlet, x, -y);
6882
- };
6883
-
6884
- const ViewletEditorHover = {
6885
- __proto__: null,
6886
- Events: ViewletEditorHoverEvents,
6887
- setBounds: setBounds$2
6888
- };
6889
-
6890
6932
  const LeftClick = 0;
6891
6933
  const RightClick = 2;
6892
6934
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "10.9.0",
3
+ "version": "10.11.0",
4
4
  "description": "",
5
5
  "main": "dist/rendererProcessMain.js",
6
6
  "type": "module",