@lvce-editor/renderer-process 10.30.0 → 10.32.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.
@@ -2793,11 +2793,11 @@ const setBounds$3 = (state, x, y, width, height) => {
2793
2793
  const dispose$i = state => {
2794
2794
  remove$2(state.$Viewlet);
2795
2795
  };
2796
- const Events$d = ViewletFindWidgetEvents;
2796
+ const Events$c = ViewletFindWidgetEvents;
2797
2797
 
2798
2798
  const ViewletFindWidget = {
2799
2799
  __proto__: null,
2800
- Events: Events$d,
2800
+ Events: Events$c,
2801
2801
  appendWidget,
2802
2802
  create: create$H,
2803
2803
  dispose: dispose$i,
@@ -2858,7 +2858,6 @@ const TitleBarIcon = 'TitleBarIcon';
2858
2858
  const TitleBarMenuBar = 'TitleBarMenuBar';
2859
2859
  const Video = 'Video';
2860
2860
  const TitleBarTitle = 'TitleBarTitle';
2861
- const About = 'About';
2862
2861
  const EditorSourceActions = 'EditorSourceActions';
2863
2862
  const E2eTests = 'E2eTests';
2864
2863
  const E2eTest = 'E2eTest';
@@ -5840,8 +5839,6 @@ const load$1 = moduleId => {
5840
5839
  return Promise.resolve().then(function () { return ViewletVideo; });
5841
5840
  case TitleBarTitle:
5842
5841
  return Promise.resolve().then(function () { return ViewletTitleBarTitle; });
5843
- case About:
5844
- return Promise.resolve().then(function () { return ViewletAbout; });
5845
5842
  case EditorSourceActions:
5846
5843
  return Promise.resolve().then(function () { return ViewletEditorSourceActions; });
5847
5844
  case EmptyEditor:
@@ -5883,8 +5880,11 @@ const create$x = (id, uid = id) => {
5883
5880
  factory: module
5884
5881
  };
5885
5882
  };
5886
- const createFunctionalRoot = (id, uid = id) => {
5887
- const module = state$6.modules[id];
5883
+ const createFunctionalRoot = (id, uid = id, hasFunctionalEvents) => {
5884
+ let module = state$6.modules[id];
5885
+ if (hasFunctionalEvents) {
5886
+ module = {};
5887
+ }
5888
5888
  if (!module) {
5889
5889
  throw new Error(`module not found: ${id}`);
5890
5890
  }
@@ -6126,6 +6126,8 @@ const sendMultiple = commands => {
6126
6126
  case 'Viewlet.focusElementByName':
6127
6127
  // @ts-ignore
6128
6128
  return focusElementByName(viewletId, method, ...args);
6129
+ case 'Viewlet.registerEventListeners':
6130
+ return registerEventListeners(viewletId, method, ...args);
6129
6131
  default:
6130
6132
  {
6131
6133
  invoke(viewletId, method, ...args);
@@ -6289,6 +6291,8 @@ const getFn = command => {
6289
6291
  return createFunctionalRoot;
6290
6292
  case 'Viewlet.focusElementByName':
6291
6293
  return focusElementByName;
6294
+ case 'Viewlet.registerEventListeners':
6295
+ return registerEventListeners;
6292
6296
  default:
6293
6297
  throw new Error(`unknown command ${command}`);
6294
6298
  }
@@ -6296,7 +6300,6 @@ const getFn = command => {
6296
6300
  const executeCommands = commands => {
6297
6301
  for (const [command, ...args] of commands) {
6298
6302
  const fn = getFn(command);
6299
- // @ts-expect-error
6300
6303
  fn(...args);
6301
6304
  }
6302
6305
  };
@@ -6724,11 +6727,11 @@ const ViewletActivityBarEvents = {
6724
6727
  returnValue: returnValue$6
6725
6728
  };
6726
6729
 
6727
- const Events$c = ViewletActivityBarEvents;
6730
+ const Events$b = ViewletActivityBarEvents;
6728
6731
 
6729
6732
  const ViewletActivityBar = {
6730
6733
  __proto__: null,
6731
- Events: Events$c
6734
+ Events: Events$b
6732
6735
  };
6733
6736
 
6734
6737
  const handleAudioError = event => {
@@ -6751,11 +6754,11 @@ const ViewletAudioEvents = {
6751
6754
  handleAudioError
6752
6755
  };
6753
6756
 
6754
- const Events$b = ViewletAudioEvents;
6757
+ const Events$a = ViewletAudioEvents;
6755
6758
 
6756
6759
  const ViewletAudio = {
6757
6760
  __proto__: null,
6758
- Events: Events$b
6761
+ Events: Events$a
6759
6762
  };
6760
6763
 
6761
6764
  const create$v = () => {
@@ -7778,7 +7781,7 @@ const setSelections$1 = (state, cursorInfos, selectionInfos) => {
7778
7781
  setCursors(state, cursorInfos);
7779
7782
  setSelections$2(state, selectionInfos);
7780
7783
  };
7781
- const setFocused$3 = async (state, isFocused) => {
7784
+ const setFocused$2 = async (state, isFocused) => {
7782
7785
  const {
7783
7786
  $EditorInput
7784
7787
  } = state;
@@ -7835,8 +7838,8 @@ const hideOverlayMessage = state => {
7835
7838
  }
7836
7839
  }
7837
7840
  };
7838
- const setFocused$2 = setFocused$3;
7839
- const focus$e = setFocused$3;
7841
+ const setFocused$1 = setFocused$2;
7842
+ const focus$e = setFocused$2;
7840
7843
  const setDecorationsDom = setDecorationsDom$1;
7841
7844
 
7842
7845
  const ViewletEditorText = {
@@ -7848,7 +7851,7 @@ const ViewletEditorText = {
7848
7851
  highlightAsLink,
7849
7852
  renderGutter,
7850
7853
  setDecorationsDom,
7851
- setFocused: setFocused$2,
7854
+ setFocused: setFocused$1,
7852
7855
  setIncrementalEdits,
7853
7856
  setScrollBar,
7854
7857
  setScrollBarHorizontal,
@@ -8153,7 +8156,7 @@ const create$i = () => {
8153
8156
  $Viewlet
8154
8157
  };
8155
8158
  };
8156
- const Events$a = ViewletExplorerEvents;
8159
+ const Events$9 = ViewletExplorerEvents;
8157
8160
  const handleError$3 = (state, message) => {
8158
8161
  object(state);
8159
8162
  string(message);
@@ -8200,7 +8203,7 @@ const setDom$2 = (state, dom) => {
8200
8203
 
8201
8204
  const ViewletExplorer = {
8202
8205
  __proto__: null,
8203
- Events: Events$a,
8206
+ Events: Events$9,
8204
8207
  create: create$i,
8205
8208
  dispose: dispose$9,
8206
8209
  focusInput,
@@ -8244,11 +8247,11 @@ const ViewletExtensionDetailEvents = {
8244
8247
  handleReadmeContextMenu
8245
8248
  };
8246
8249
 
8247
- const Events$9 = ViewletExtensionDetailEvents;
8250
+ const Events$8 = ViewletExtensionDetailEvents;
8248
8251
 
8249
8252
  const ViewletExtensionDetail = {
8250
8253
  __proto__: null,
8251
- Events: Events$9,
8254
+ Events: Events$8,
8252
8255
  setSize
8253
8256
  };
8254
8257
 
@@ -8528,7 +8531,7 @@ const ViewletLocationsEvents = {
8528
8531
  handleLocationsMouseDown
8529
8532
  };
8530
8533
 
8531
- const Events$8 = ViewletLocationsEvents;
8534
+ const Events$7 = ViewletLocationsEvents;
8532
8535
  const setFocusedIndex$3 = (state, oldFocusedIndex, newFocusedIndex) => {
8533
8536
  const {
8534
8537
  $Viewlet
@@ -8563,7 +8566,7 @@ const focus$b = state => {
8563
8566
 
8564
8567
  const ViewletImplementations = {
8565
8568
  __proto__: null,
8566
- Events: Events$8,
8569
+ Events: Events$7,
8567
8570
  focus: focus$b,
8568
8571
  handleError: handleError$1,
8569
8572
  setFocusedIndex: setFocusedIndex$3
@@ -8674,11 +8677,11 @@ const setColumnWidths = (state, columnWidth1, columnWidth2, columnWidth3) => {
8674
8677
  $Resizer1.style.left = `${paddingLeft + columnWidth1}px`;
8675
8678
  $Resizer2.style.left = `${paddingLeft + columnWidth1 + columnWidth2}px`;
8676
8679
  };
8677
- const Events$7 = ViewletkeyBindingsEvents;
8680
+ const Events$6 = ViewletkeyBindingsEvents;
8678
8681
 
8679
8682
  const ViewletKeyBindings = {
8680
8683
  __proto__: null,
8681
- Events: Events$7,
8684
+ Events: Events$6,
8682
8685
  setColumnWidths,
8683
8686
  setScrollBar: setScrollBar$2,
8684
8687
  setSize,
@@ -10051,7 +10054,7 @@ const ViewletQuickPick = {
10051
10054
 
10052
10055
  const ViewletReferences = {
10053
10056
  __proto__: null,
10054
- Events: Events$8,
10057
+ Events: Events$7,
10055
10058
  focus: focus$b,
10056
10059
  handleError: handleError$1,
10057
10060
  setFocusedIndex: setFocusedIndex$3
@@ -10437,11 +10440,11 @@ const setFocus = (state, selector) => {
10437
10440
  }
10438
10441
  };
10439
10442
  const dispose$3 = () => {};
10440
- const Events$6 = ViewletSearchEvents;
10443
+ const Events$5 = ViewletSearchEvents;
10441
10444
 
10442
10445
  const ViewletSearch = {
10443
10446
  __proto__: null,
10444
- Events: Events$6,
10447
+ Events: Events$5,
10445
10448
  dispose: dispose$3,
10446
10449
  focus: focus$5,
10447
10450
  setFocus,
@@ -10772,11 +10775,11 @@ const ViewletStorageEvents = {
10772
10775
  handleClick: handleClick$1
10773
10776
  };
10774
10777
 
10775
- const Events$5 = ViewletStorageEvents;
10778
+ const Events$4 = ViewletStorageEvents;
10776
10779
 
10777
10780
  const ViewletStorage = {
10778
10781
  __proto__: null,
10779
- Events: Events$5
10782
+ Events: Events$4
10780
10783
  };
10781
10784
 
10782
10785
  const isUint8Array = value => {
@@ -11051,7 +11054,7 @@ const attachEvents = state => {
11051
11054
  });
11052
11055
  };
11053
11056
  const activeClassName = 'TitleBarActive';
11054
- const setFocused$1 = (state, isFocused) => {
11057
+ const setFocused = (state, isFocused) => {
11055
11058
  const {
11056
11059
  $Viewlet
11057
11060
  } = state;
@@ -11066,7 +11069,7 @@ const ViewletTitleBar = {
11066
11069
  __proto__: null,
11067
11070
  attachEvents,
11068
11071
  create: create$3,
11069
- setFocused: setFocused$1
11072
+ setFocused
11070
11073
  };
11071
11074
 
11072
11075
  /**
@@ -11087,18 +11090,18 @@ const ViewletTitleBarButtonEvents = {
11087
11090
  returnValue: returnValue$3
11088
11091
  };
11089
11092
 
11090
- const Events$4 = ViewletTitleBarButtonEvents;
11093
+ const Events$3 = ViewletTitleBarButtonEvents;
11091
11094
 
11092
11095
  const ViewletTitleBarButtons = {
11093
11096
  __proto__: null,
11094
- Events: Events$4
11097
+ Events: Events$3
11095
11098
  };
11096
11099
 
11097
- const Events$3 = {};
11100
+ const Events$2 = {};
11098
11101
 
11099
11102
  const ViewletTitleBarIcon = {
11100
11103
  __proto__: null,
11101
- Events: Events$3
11104
+ Events: Events$2
11102
11105
  };
11103
11106
 
11104
11107
  const isInsideTitleBarMenu = $Element => {
@@ -11430,11 +11433,11 @@ const setMenus = (state, changes, uid) => {
11430
11433
  }
11431
11434
  }
11432
11435
  };
11433
- const Events$2 = ViewletTitleBarMenuBarEvents;
11436
+ const Events$1 = ViewletTitleBarMenuBarEvents;
11434
11437
 
11435
11438
  const ViewletTitleBarMenuBar = {
11436
11439
  __proto__: null,
11437
- Events: Events$2,
11440
+ Events: Events$1,
11438
11441
  closeMenu,
11439
11442
  dispose,
11440
11443
  focus,
@@ -11466,11 +11469,11 @@ const ViewletVideoEvents = {
11466
11469
  handleVideoError
11467
11470
  };
11468
11471
 
11469
- const Events$1 = ViewletVideoEvents;
11472
+ const Events = ViewletVideoEvents;
11470
11473
 
11471
11474
  const ViewletVideo = {
11472
11475
  __proto__: null,
11473
- Events: Events$1
11476
+ Events
11474
11477
  };
11475
11478
 
11476
11479
  const create$2 = () => {
@@ -11493,27 +11496,6 @@ const ViewletTitleBarTitle = {
11493
11496
  setDom
11494
11497
  };
11495
11498
 
11496
- const setFocused = (state, selector) => {
11497
- if (selector === true) {
11498
- selector = 'button';
11499
- }
11500
- if (!selector) {
11501
- return;
11502
- }
11503
- const {
11504
- $Viewlet
11505
- } = state;
11506
- const $Focusable = $Viewlet.querySelector(selector);
11507
- $Focusable.focus();
11508
- };
11509
- const Events = {};
11510
-
11511
- const ViewletAbout = {
11512
- __proto__: null,
11513
- Events,
11514
- setFocused
11515
- };
11516
-
11517
11499
  const create$1 = () => {
11518
11500
  const $Viewlet = document.createElement('div');
11519
11501
  $Viewlet.className = 'Viewlet EmptyEditor';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "10.30.0",
3
+ "version": "10.32.0",
4
4
  "description": "",
5
5
  "main": "dist/rendererProcessMain.js",
6
6
  "type": "module",