@lvce-editor/title-bar-worker 4.25.3 → 4.25.4

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.
@@ -5510,6 +5510,23 @@ const handleKeySpaceMenuOpen = state => handleKeyEnterMenuOpen(state);
5510
5510
  // TODO this is same as handle key enter -> merge the functions
5511
5511
  const handleKeySpace = ifElse(handleKeySpaceMenuOpen, handleKeySpaceMenuClosed);
5512
5512
 
5513
+ const handleMenuMouseLeave = state => {
5514
+ object(state);
5515
+ const {
5516
+ menus
5517
+ } = state;
5518
+ if (menus.every(menu => menu.focusedIndex === -1)) {
5519
+ return state;
5520
+ }
5521
+ return {
5522
+ ...state,
5523
+ menus: menus.map(menu => ({
5524
+ ...menu,
5525
+ focusedIndex: -1
5526
+ }))
5527
+ };
5528
+ };
5529
+
5513
5530
  const getNewMenus = async (menus, level, index, flags) => {
5514
5531
  const menu = menus[level];
5515
5532
  if (!menu) {
@@ -5663,6 +5680,7 @@ const commandMap = {
5663
5680
  'TitleBar.handleKeyHome': wrapCommand(handleKeyHome),
5664
5681
  'TitleBar.handleKeySpace': wrapCommand(handleKeySpace),
5665
5682
  'TitleBar.handleMenuClick': wrapCommand(handleMenuClick),
5683
+ 'TitleBar.handleMenuMouseLeave': wrapCommand(handleMenuMouseLeave),
5666
5684
  'TitleBar.handleMenuMouseOver': wrapCommand(handleMenuMouseOver),
5667
5685
  'TitleBar.handleMessagePort': handleDirectMessagePort,
5668
5686
  'TitleBar.handleMouseOut': wrapCommand(handleMouseOut),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/title-bar-worker",
3
- "version": "4.25.3",
3
+ "version": "4.25.4",
4
4
  "description": "Title Bar Worker",
5
5
  "repository": {
6
6
  "type": "git",