@lvce-editor/renderer-process 11.6.0 → 12.0.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.
@@ -194,7 +194,7 @@ const getModuleId = commandId => {
194
194
  case 'Window.reload':
195
195
  case 'Window.unmaximize':
196
196
  return Window;
197
- case 33111:
197
+ case 33_111:
198
198
  return Workbench;
199
199
  case 'WindowTitle.set':
200
200
  return WindowTitle;
@@ -340,7 +340,7 @@ const execute = (command, ...args) => {
340
340
  if (command in state$a.commands) {
341
341
  const fn = state$a.commands[command];
342
342
  if (typeof fn !== 'function') {
343
- throw new Error(`[renderer-worker] Command ${command} is not a function`);
343
+ throw new TypeError(`[renderer-worker] Command ${command} is not a function`);
344
344
  }
345
345
  return fn(...args);
346
346
  }
@@ -450,8 +450,6 @@ const getModule$1 = method => {
450
450
  }
451
451
  };
452
452
 
453
- const shouldLaunchMultipleWorkers = true;
454
-
455
453
  const Two = '2.0';
456
454
  const create$4$1 = (method, params) => {
457
455
  return {
@@ -989,6 +987,8 @@ const RendererWorker = {
989
987
  state: state$9
990
988
  };
991
989
 
990
+ const shouldLaunchMultipleWorkers = true;
991
+
992
992
  const create$I = async ({
993
993
  method,
994
994
  ...options
@@ -2986,11 +2986,11 @@ const setBounds$3 = (state, x, y, width, height) => {
2986
2986
  const dispose$f = state => {
2987
2987
  remove$2(state.$Viewlet);
2988
2988
  };
2989
- const Events$9 = ViewletFindWidgetEvents;
2989
+ const Events$5 = ViewletFindWidgetEvents;
2990
2990
 
2991
2991
  const ViewletFindWidget = {
2992
2992
  __proto__: null,
2993
- Events: Events$9,
2993
+ Events: Events$5,
2994
2994
  appendWidget,
2995
2995
  create: create$D,
2996
2996
  dispose: dispose$f,
@@ -4858,6 +4858,12 @@ const OffscreenCanvas_ipc = {
4858
4858
  name: name$g
4859
4859
  };
4860
4860
 
4861
+ const create$BackDrop = () => {
4862
+ const $BackDrop = document.createElement('div');
4863
+ $BackDrop.className = 'BackDrop';
4864
+ return $BackDrop;
4865
+ };
4866
+
4861
4867
  // TODO this module should be called dom or dom utils
4862
4868
 
4863
4869
  // TODO this module makes for weird code splitting chunks,
@@ -4878,12 +4884,6 @@ const findIndex = ($Container, $Target) => {
4878
4884
  return -1;
4879
4885
  };
4880
4886
 
4881
- const create$BackDrop = () => {
4882
- const $BackDrop = document.createElement('div');
4883
- $BackDrop.className = 'BackDrop';
4884
- return $BackDrop;
4885
- };
4886
-
4887
4887
  const state$2 = {
4888
4888
  /**
4889
4889
  * @type {HTMLElement|undefined}
@@ -5329,42 +5329,6 @@ const ScreenCapture_ipc = {
5329
5329
  name: name$b
5330
5330
  };
5331
5331
 
5332
- const getTimeStamp = () => {
5333
- return performance.now();
5334
- };
5335
-
5336
- const waitForMutation = async maxDelay => {
5337
- const disposables = [];
5338
- await Promise.race([new Promise(resolve => {
5339
- const timeout = setTimeout(resolve, maxDelay);
5340
- // @ts-expect-error
5341
- disposables.push(() => {
5342
- clearTimeout(timeout);
5343
- });
5344
- }), new Promise(resolve => {
5345
- const callback = mutations => {
5346
- resolve(undefined);
5347
- };
5348
- const observer = new MutationObserver(callback);
5349
- observer.observe(document.body, {
5350
- childList: true,
5351
- attributes: true,
5352
- characterData: true,
5353
- subtree: true,
5354
- attributeOldValue: true,
5355
- characterDataOldValue: true
5356
- });
5357
- // @ts-expect-error
5358
- disposables.push(() => {
5359
- observer.disconnect();
5360
- });
5361
- })]);
5362
- for (const disposable of disposables) {
5363
- // @ts-expect-error
5364
- disposable();
5365
- }
5366
- };
5367
-
5368
5332
  const getEventClass = eventType => {
5369
5333
  switch (eventType) {
5370
5334
  case Wheel:
@@ -5511,6 +5475,42 @@ const querySelectorWithOptions = (selector, {
5511
5475
  return element;
5512
5476
  };
5513
5477
 
5478
+ const getTimeStamp = () => {
5479
+ return performance.now();
5480
+ };
5481
+
5482
+ const waitForMutation = async maxDelay => {
5483
+ const disposables = [];
5484
+ await Promise.race([new Promise(resolve => {
5485
+ const timeout = setTimeout(resolve, maxDelay);
5486
+ // @ts-expect-error
5487
+ disposables.push(() => {
5488
+ clearTimeout(timeout);
5489
+ });
5490
+ }), new Promise(resolve => {
5491
+ const callback = mutations => {
5492
+ resolve(undefined);
5493
+ };
5494
+ const observer = new MutationObserver(callback);
5495
+ observer.observe(document.body, {
5496
+ childList: true,
5497
+ attributes: true,
5498
+ characterData: true,
5499
+ subtree: true,
5500
+ attributeOldValue: true,
5501
+ characterDataOldValue: true
5502
+ });
5503
+ // @ts-expect-error
5504
+ disposables.push(() => {
5505
+ observer.disconnect();
5506
+ });
5507
+ })]);
5508
+ for (const disposable of disposables) {
5509
+ // @ts-expect-error
5510
+ disposable();
5511
+ }
5512
+ };
5513
+
5514
5514
  // TODO this should also come in via options
5515
5515
  const maxTimeout$1 = 2000;
5516
5516
  const performAction2 = async (locator, fnName, options) => {
@@ -6018,11 +6018,11 @@ const ViewletActivityBarEvents = {
6018
6018
  returnValue: returnValue$5
6019
6019
  };
6020
6020
 
6021
- const Events$8 = ViewletActivityBarEvents;
6021
+ const Events$4 = ViewletActivityBarEvents;
6022
6022
 
6023
6023
  const ViewletActivityBar = {
6024
6024
  __proto__: null,
6025
- Events: Events$8
6025
+ Events: Events$4
6026
6026
  };
6027
6027
 
6028
6028
  const handleAudioError = event => {
@@ -6045,11 +6045,11 @@ const ViewletAudioEvents = {
6045
6045
  handleAudioError
6046
6046
  };
6047
6047
 
6048
- const Events$7 = ViewletAudioEvents;
6048
+ const Events$3 = ViewletAudioEvents;
6049
6049
 
6050
6050
  const ViewletAudio = {
6051
6051
  __proto__: null,
6052
- Events: Events$7
6052
+ Events: Events$3
6053
6053
  };
6054
6054
 
6055
6055
  const create$t = () => {
@@ -7702,7 +7702,6 @@ const ViewletLocationsEvents = {
7702
7702
  handleLocationsMouseDown
7703
7703
  };
7704
7704
 
7705
- const Events$6 = ViewletLocationsEvents;
7706
7705
  const setFocusedIndex$2 = (state, oldFocusedIndex, newFocusedIndex) => {
7707
7706
  const {
7708
7707
  $Viewlet
@@ -7737,7 +7736,7 @@ const focus$a = state => {
7737
7736
 
7738
7737
  const ViewletImplementations = {
7739
7738
  __proto__: null,
7740
- Events: Events$6,
7739
+ Events: ViewletLocationsEvents,
7741
7740
  focus: focus$a,
7742
7741
  handleError: handleError$2,
7743
7742
  setFocusedIndex: setFocusedIndex$2
@@ -7831,11 +7830,11 @@ const setColumnWidths = (state, columnWidth1, columnWidth2, columnWidth3) => {
7831
7830
  $Resizer1.style.left = `${paddingLeft + columnWidth1}px`;
7832
7831
  $Resizer2.style.left = `${paddingLeft + columnWidth1 + columnWidth2}px`;
7833
7832
  };
7834
- const Events$5 = ViewletkeyBindingsEvents;
7833
+ const Events$2 = ViewletkeyBindingsEvents;
7835
7834
 
7836
7835
  const ViewletKeyBindings = {
7837
7836
  __proto__: null,
7838
- Events: Events$5,
7837
+ Events: Events$2,
7839
7838
  setColumnWidths,
7840
7839
  setScrollBar: setScrollBar$2,
7841
7840
  setSize,
@@ -9006,7 +9005,7 @@ const ViewletProblems = {
9006
9005
 
9007
9006
  const ViewletReferences = {
9008
9007
  __proto__: null,
9009
- Events: Events$6,
9008
+ Events: ViewletLocationsEvents,
9010
9009
  focus: focus$a,
9011
9010
  handleError: handleError$2,
9012
9011
  setFocusedIndex: setFocusedIndex$2
@@ -9509,11 +9508,11 @@ const ViewletStorageEvents = {
9509
9508
  handleClick: handleClick$1
9510
9509
  };
9511
9510
 
9512
- const Events$4 = ViewletStorageEvents;
9511
+ const Events$1 = ViewletStorageEvents;
9513
9512
 
9514
9513
  const ViewletStorage = {
9515
9514
  __proto__: null,
9516
- Events: Events$4
9515
+ Events: Events$1
9517
9516
  };
9518
9517
 
9519
9518
  const handleClickTab = event => {
@@ -9618,24 +9617,22 @@ const handleTitleBarButtonsClick = event => {
9618
9617
  };
9619
9618
  const returnValue$1 = true;
9620
9619
 
9621
- const ViewletTitleBarButtonEvents = {
9620
+ const ViewletTitleBarButtonsEvents = {
9622
9621
  __proto__: null,
9623
9622
  handleTitleBarButtonsClick,
9624
9623
  returnValue: returnValue$1
9625
9624
  };
9626
9625
 
9627
- const Events$3 = ViewletTitleBarButtonEvents;
9628
-
9629
9626
  const ViewletTitleBarButtons = {
9630
9627
  __proto__: null,
9631
- Events: Events$3
9628
+ Events: ViewletTitleBarButtonsEvents
9632
9629
  };
9633
9630
 
9634
- const Events$2 = {};
9631
+ const Events = {};
9635
9632
 
9636
9633
  const ViewletTitleBarIcon = {
9637
9634
  __proto__: null,
9638
- Events: Events$2
9635
+ Events
9639
9636
  };
9640
9637
 
9641
9638
  const isInsideTitleBarMenu = $Element => {
@@ -9967,11 +9964,10 @@ const setMenus = (state, changes, uid) => {
9967
9964
  }
9968
9965
  }
9969
9966
  };
9970
- const Events$1 = ViewletTitleBarMenuBarEvents;
9971
9967
 
9972
9968
  const ViewletTitleBarMenuBar = {
9973
9969
  __proto__: null,
9974
- Events: Events$1,
9970
+ Events: ViewletTitleBarMenuBarEvents,
9975
9971
  closeMenu,
9976
9972
  dispose: dispose$3,
9977
9973
  focus: focus$2,
@@ -10023,11 +10019,9 @@ const ViewletVideoEvents = {
10023
10019
  handleVideoError
10024
10020
  };
10025
10021
 
10026
- const Events = ViewletVideoEvents;
10027
-
10028
10022
  const ViewletVideo = {
10029
10023
  __proto__: null,
10030
- Events
10024
+ Events: ViewletVideoEvents
10031
10025
  };
10032
10026
 
10033
10027
  const handleClickAt = event => {
package/package.json CHANGED
@@ -1,27 +1,17 @@
1
1
  {
2
2
  "name": "@lvce-editor/renderer-process",
3
- "version": "11.6.0",
3
+ "version": "12.0.0",
4
4
  "description": "",
5
- "main": "dist/rendererProcessMain.js",
6
- "type": "module",
7
- "directories": {
8
- "test": "test"
9
- },
10
5
  "keywords": [
11
6
  "lvce-editor",
12
7
  "renderer-process"
13
8
  ],
14
- "author": "Lvce Editor",
15
- "license": "MIT",
16
9
  "repository": {
17
10
  "type": "git",
18
11
  "url": "https://github.com/lvce-editor/renderer-process.git"
19
12
  },
20
- "nodemonConfig": {
21
- "watch": [
22
- "src"
23
- ],
24
- "ext": "ts,js",
25
- "exec": "node scripts/build.js"
26
- }
13
+ "license": "MIT",
14
+ "author": "Lvce Editor",
15
+ "type": "module",
16
+ "main": "dist/rendererProcessMain.js"
27
17
  }