@lvce-editor/activity-bar-worker 7.15.1 → 7.16.1

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.
@@ -250,6 +250,7 @@ const {
250
250
  getCommandIds,
251
251
  registerCommands,
252
252
  set: set$3,
253
+ wrapAsyncCommand,
253
254
  wrapCommand,
254
255
  wrapGetter
255
256
  } = create$a();
@@ -2475,14 +2476,28 @@ const handleClickSignOut = async state => {
2475
2476
  return state;
2476
2477
  };
2477
2478
 
2478
- const handleContextMenu = async (state, button, eventX, eventY) => {
2479
+ const getSideBarPosition = async () => {
2480
+ try {
2481
+ return await invoke('Layout.getSideBarPosition');
2482
+ } catch {
2483
+ return Left;
2484
+ }
2485
+ };
2486
+
2487
+ const handleContextMenu = async (context, button, eventX, eventY) => {
2488
+ const sideBarLocation = await getSideBarPosition();
2489
+ const state = await context.updateState(state => {
2490
+ return {
2491
+ ...state,
2492
+ sideBarLocation
2493
+ };
2494
+ });
2479
2495
  const {
2480
2496
  uid
2481
2497
  } = state;
2482
2498
  await show2(uid, ActivityBar$3, eventX, eventY, {
2483
2499
  menuId: ActivityBar$3
2484
2500
  });
2485
- return state;
2486
2501
  };
2487
2502
 
2488
2503
  const commandMap$1 = {};
@@ -2690,14 +2705,6 @@ const getAccountEnabled = async defaultValue => {
2690
2705
  }
2691
2706
  };
2692
2707
 
2693
- const getSideBarPosition = async () => {
2694
- try {
2695
- return await invoke('Layout.getSideBarPosition');
2696
- } catch {
2697
- return Left;
2698
- }
2699
- };
2700
-
2701
2708
  const handleSettingsChanged = async state => {
2702
2709
  const {
2703
2710
  accountEnabled: currentAccountEnabled,
@@ -3661,6 +3668,13 @@ const setUserLoginState = (state, userLoginState, userInfo) => {
3661
3668
  };
3662
3669
  };
3663
3670
 
3671
+ const sleep = uid => {
3672
+ const {
3673
+ newState
3674
+ } = get$2(uid);
3675
+ return newState;
3676
+ };
3677
+
3664
3678
  const toggleActivityBarItem = async (state, itemId) => {
3665
3679
  const {
3666
3680
  activityBarItems,
@@ -3685,6 +3699,10 @@ const toggleActivityBarItem = async (state, itemId) => {
3685
3699
  };
3686
3700
  };
3687
3701
 
3702
+ const wakeUp = sleepState => {
3703
+ set$3(sleepState.uid, sleepState, sleepState);
3704
+ };
3705
+
3688
3706
  const commandMap = {
3689
3707
  'ActivityBar.create': create$9,
3690
3708
  'ActivityBar.diff2': diff2,
@@ -3709,7 +3727,7 @@ const commandMap = {
3709
3727
  'ActivityBar.handleClickSettings': wrapCommand(handleClickSettings),
3710
3728
  'ActivityBar.handleClickSignIn': wrapCommand(handleClickSignIn),
3711
3729
  'ActivityBar.handleClickSignOut': wrapCommand(handleClickSignOut),
3712
- 'ActivityBar.handleContextMenu': wrapCommand(handleContextMenu),
3730
+ 'ActivityBar.handleContextMenu': wrapAsyncCommand(handleContextMenu),
3713
3731
  'ActivityBar.handleExtensionManagementMessagePort': handleExtensionManagementMessagePort,
3714
3732
  'ActivityBar.handleExtensionsChanged': wrapCommand(handleExtensionsChanged),
3715
3733
  'ActivityBar.handleFocus': wrapCommand(handleFocus),
@@ -3725,8 +3743,10 @@ const commandMap = {
3725
3743
  'ActivityBar.selectCurrent': wrapCommand(selectCurrent),
3726
3744
  'ActivityBar.setAccountEnabled': wrapCommand(setAccountEnabled),
3727
3745
  'ActivityBar.setUserLoginState': wrapCommand(setUserLoginState),
3746
+ 'ActivityBar.sleep': sleep,
3728
3747
  'ActivityBar.terminate': terminate,
3729
- 'ActivityBar.toggleActivityBarItem': wrapCommand(toggleActivityBarItem)
3748
+ 'ActivityBar.toggleActivityBarItem': wrapCommand(toggleActivityBarItem),
3749
+ 'ActivityBar.wakeUp': wakeUp
3730
3750
  };
3731
3751
 
3732
3752
  const send = async port => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/activity-bar-worker",
3
- "version": "7.15.1",
3
+ "version": "7.16.1",
4
4
  "description": "Explorer Worker",
5
5
  "repository": {
6
6
  "type": "git",