@lvce-editor/activity-bar-worker 7.16.0 → 7.16.2

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,
@@ -2746,6 +2753,7 @@ const handleSideBarStateChange = async (state, id, sideBarVisibleOverride) => {
2746
2753
  const {
2747
2754
  activityBarItems,
2748
2755
  currentViewletId,
2756
+ focused,
2749
2757
  height,
2750
2758
  itemHeight
2751
2759
  } = state;
@@ -2772,6 +2780,7 @@ const handleSideBarStateChange = async (state, id, sideBarVisibleOverride) => {
2772
2780
  activityBarItems: newActivityBarItems,
2773
2781
  currentViewletId: resolvedId,
2774
2782
  filteredItems,
2783
+ focused: resolvedId === currentViewletId && focused,
2775
2784
  selectedIndex,
2776
2785
  sideBarVisible
2777
2786
  };
@@ -3720,7 +3729,7 @@ const commandMap = {
3720
3729
  'ActivityBar.handleClickSettings': wrapCommand(handleClickSettings),
3721
3730
  'ActivityBar.handleClickSignIn': wrapCommand(handleClickSignIn),
3722
3731
  'ActivityBar.handleClickSignOut': wrapCommand(handleClickSignOut),
3723
- 'ActivityBar.handleContextMenu': wrapCommand(handleContextMenu),
3732
+ 'ActivityBar.handleContextMenu': wrapAsyncCommand(handleContextMenu),
3724
3733
  'ActivityBar.handleExtensionManagementMessagePort': handleExtensionManagementMessagePort,
3725
3734
  'ActivityBar.handleExtensionsChanged': wrapCommand(handleExtensionsChanged),
3726
3735
  'ActivityBar.handleFocus': wrapCommand(handleFocus),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/activity-bar-worker",
3
- "version": "7.16.0",
3
+ "version": "7.16.2",
4
4
  "description": "Explorer Worker",
5
5
  "repository": {
6
6
  "type": "git",