@lvce-editor/title-bar-worker 4.19.1 → 4.20.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.
@@ -0,0 +1,36 @@
1
+ [
2
+ {
3
+ "category": "window",
4
+ "description": "Controls whether the active workspace or editor title is shown in the title bar.",
5
+ "heading": "Show Window Title",
6
+ "id": "titleBar.titleEnabled",
7
+ "type": 3,
8
+ "value": "false"
9
+ },
10
+ {
11
+ "category": "window",
12
+ "description": "Controls whether the native window controls are overlaid on the custom title bar.",
13
+ "heading": "Window Controls Overlay",
14
+ "id": "window.controlsOverlay.enabled",
15
+ "type": 3,
16
+ "value": "true"
17
+ },
18
+ {
19
+ "category": "window",
20
+ "description": "Controls whether the window uses the native or custom title bar.",
21
+ "heading": "Title Bar Style",
22
+ "id": "window.titleBarStyle",
23
+ "options": [
24
+ {
25
+ "id": "native",
26
+ "label": "Native"
27
+ },
28
+ {
29
+ "id": "custom",
30
+ "label": "Custom"
31
+ }
32
+ ],
33
+ "type": 1,
34
+ "value": "custom"
35
+ }
36
+ ]
@@ -4976,8 +4976,20 @@ const handleFocus = async state => {
4976
4976
  };
4977
4977
 
4978
4978
  const handleFocusOut = async state => {
4979
- // The renderer process checks relatedTarget and closes the menu only when focus leaves the complete menu tree.
4980
- return state;
4979
+ const {
4980
+ isMenuOpen
4981
+ } = state;
4982
+ if (isMenuOpen) {
4983
+ return state;
4984
+ }
4985
+ const closedState = closeMenu(state, /* keepFocus */false);
4986
+ if (!closedState.focused) {
4987
+ return closedState;
4988
+ }
4989
+ return {
4990
+ ...closedState,
4991
+ focused: false
4992
+ };
4981
4993
  };
4982
4994
 
4983
4995
  const openMenu = async (state, focus) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lvce-editor/title-bar-worker",
3
- "version": "4.19.1",
3
+ "version": "4.20.1",
4
4
  "description": "Title Bar Worker",
5
5
  "repository": {
6
6
  "type": "git",