custom-electron-titlebar 4.2.3 → 4.2.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.
- package/{dist/base → base}/browser/keyboardEvent.js +0 -2
- package/{dist/menubar → menubar}/index.js +7 -4
- package/package.json +12 -10
- /package/{dist/base → base}/browser/browser.d.ts +0 -0
- /package/{dist/base → base}/browser/browser.js +0 -0
- /package/{dist/base → base}/browser/event.d.ts +0 -0
- /package/{dist/base → base}/browser/event.js +0 -0
- /package/{dist/base → base}/browser/keyboardEvent.d.ts +0 -0
- /package/{dist/base → base}/browser/mouseEvent.d.ts +0 -0
- /package/{dist/base → base}/browser/mouseEvent.js +0 -0
- /package/{dist/base → base}/browser/touch.d.ts +0 -0
- /package/{dist/base → base}/browser/touch.js +0 -0
- /package/{dist/base → base}/common/arrays.d.ts +0 -0
- /package/{dist/base → base}/common/arrays.js +0 -0
- /package/{dist/base → base}/common/async.d.ts +0 -0
- /package/{dist/base → base}/common/async.js +0 -0
- /package/{dist/base → base}/common/charCode.d.ts +0 -0
- /package/{dist/base → base}/common/charCode.js +0 -0
- /package/{dist/base → base}/common/color.d.ts +0 -0
- /package/{dist/base → base}/common/color.js +0 -0
- /package/{dist/base → base}/common/decorators.d.ts +0 -0
- /package/{dist/base → base}/common/decorators.js +0 -0
- /package/{dist/base → base}/common/dom.d.ts +0 -0
- /package/{dist/base → base}/common/dom.js +0 -0
- /package/{dist/base → base}/common/event.d.ts +0 -0
- /package/{dist/base → base}/common/event.js +0 -0
- /package/{dist/base → base}/common/iterator.d.ts +0 -0
- /package/{dist/base → base}/common/iterator.js +0 -0
- /package/{dist/base → base}/common/keyCodes.d.ts +0 -0
- /package/{dist/base → base}/common/keyCodes.js +0 -0
- /package/{dist/base → base}/common/lifecycle.d.ts +0 -0
- /package/{dist/base → base}/common/lifecycle.js +0 -0
- /package/{dist/base → base}/common/linkedList.d.ts +0 -0
- /package/{dist/base → base}/common/linkedList.js +0 -0
- /package/{dist/base → base}/common/platform.d.ts +0 -0
- /package/{dist/base → base}/common/platform.js +0 -0
- /package/{dist/base → base}/common/strings.d.ts +0 -0
- /package/{dist/base → base}/common/strings.js +0 -0
- /package/{dist/consts.d.ts → consts.d.ts} +0 -0
- /package/{dist/consts.js → consts.js} +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/index.js → index.js} +0 -0
- /package/{dist/main → main}/attach-titlebar-to-window.d.ts +0 -0
- /package/{dist/main → main}/attach-titlebar-to-window.js +0 -0
- /package/{dist/main → main}/index.d.ts +0 -0
- /package/{dist/main → main}/index.js +0 -0
- /package/{dist/main → main}/setup-titlebar.d.ts +0 -0
- /package/{dist/main → main}/setup-titlebar.js +0 -0
- /package/{dist/menubar → menubar}/index.d.ts +0 -0
- /package/{dist/menubar → menubar}/menu/index.d.ts +0 -0
- /package/{dist/menubar → menubar}/menu/index.js +0 -0
- /package/{dist/menubar → menubar}/menu/item.d.ts +0 -0
- /package/{dist/menubar → menubar}/menu/item.js +0 -0
- /package/{dist/menubar → menubar}/menu/separator.d.ts +0 -0
- /package/{dist/menubar → menubar}/menu/separator.js +0 -0
- /package/{dist/menubar → menubar}/menu/submenu.d.ts +0 -0
- /package/{dist/menubar → menubar}/menu/submenu.js +0 -0
- /package/{dist/menubar → menubar}/menubar-options.d.ts +0 -0
- /package/{dist/menubar → menubar}/menubar-options.js +0 -0
- /package/{dist/titlebar → titlebar}/index.d.ts +0 -0
- /package/{dist/titlebar → titlebar}/index.js +0 -0
- /package/{dist/titlebar → titlebar}/options.d.ts +0 -0
- /package/{dist/titlebar → titlebar}/options.js +0 -0
- /package/{dist/titlebar → titlebar}/themebar.d.ts +0 -0
- /package/{dist/titlebar → titlebar}/themebar.js +0 -0
|
@@ -210,9 +210,7 @@ class StandardKeyboardEvent {
|
|
|
210
210
|
this.metaKey = this.metaKey || this.keyCode === 57 /* KeyCode.Meta */;
|
|
211
211
|
this._asKeybinding = this._computeKeybinding();
|
|
212
212
|
this._asRuntimeKeybinding = this._computeRuntimeKeybinding();
|
|
213
|
-
// console.log(`code: ${e.code}, keyCode: ${e.keyCode}, key: ${e.key}`);
|
|
214
213
|
}
|
|
215
|
-
|
|
216
214
|
preventDefault() {
|
|
217
215
|
if (this.browserEvent && this.browserEvent.preventDefault) {
|
|
218
216
|
this.browserEvent.preventDefault();
|
|
@@ -39,6 +39,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
39
39
|
value: true
|
|
40
40
|
});
|
|
41
41
|
exports.MenuBar = void 0;
|
|
42
|
+
const electron_1 = require("electron");
|
|
42
43
|
const DOM = _get__("__importStar")(require("../base/common/dom"));
|
|
43
44
|
const event_1 = require("../base/common/event");
|
|
44
45
|
const lifecycle_1 = require("../base/common/lifecycle");
|
|
@@ -153,7 +154,6 @@ class MenuBar extends _get__("lifecycle_1").Disposable {
|
|
|
153
154
|
if (!this.options.enableMnemonics || !e.altKey || e.ctrlKey || e.defaultPrevented) {
|
|
154
155
|
return;
|
|
155
156
|
}
|
|
156
|
-
console.log(this.mnemonics);
|
|
157
157
|
const key = e.key.toLocaleLowerCase();
|
|
158
158
|
if (!this.mnemonics.has(key)) {
|
|
159
159
|
return;
|
|
@@ -730,9 +730,6 @@ class MenuBar extends _get__("lifecycle_1").Disposable {
|
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
732
|
updateMnemonicVisibility(visible) {
|
|
733
|
-
console.log({
|
|
734
|
-
visible
|
|
735
|
-
});
|
|
736
733
|
if (this.menus) {
|
|
737
734
|
this.menus.forEach(menuBarMenu => {
|
|
738
735
|
if (menuBarMenu.titleElement && menuBarMenu.titleElement.children.length) {
|
|
@@ -769,6 +766,10 @@ class MenuBar extends _get__("lifecycle_1").Disposable {
|
|
|
769
766
|
return this._onFocusStateChange.event;
|
|
770
767
|
}
|
|
771
768
|
onMenuTriggered(menuIndex, clicked) {
|
|
769
|
+
if (!this.menus[menuIndex].actions) {
|
|
770
|
+
_get__("electron_1").ipcRenderer.send('menu-event', menuIndex + 1);
|
|
771
|
+
return;
|
|
772
|
+
}
|
|
772
773
|
if (this.isOpen) {
|
|
773
774
|
if (this.isCurrentMenu(menuIndex)) {
|
|
774
775
|
this.setUnfocusedState();
|
|
@@ -1019,6 +1020,8 @@ function _get_original__(variableName) {
|
|
|
1019
1020
|
return lifecycle_1;
|
|
1020
1021
|
case "strings":
|
|
1021
1022
|
return strings;
|
|
1023
|
+
case "electron_1":
|
|
1024
|
+
return electron_1;
|
|
1022
1025
|
case "keyCodes_1":
|
|
1023
1026
|
return keyCodes_1;
|
|
1024
1027
|
}
|
package/package.json
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "custom-electron-titlebar",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.4",
|
|
4
4
|
"description": "Library for electron that allows you to configure a fully customizable title bar.",
|
|
5
|
-
"types": "./
|
|
5
|
+
"types": "./index.d.ts",
|
|
6
|
+
"main": "./index.js",
|
|
6
7
|
"typesVersions": {
|
|
7
8
|
"*": {
|
|
8
9
|
"main": [
|
|
9
|
-
"./
|
|
10
|
+
"./main/index.d.ts"
|
|
10
11
|
]
|
|
11
12
|
}
|
|
12
13
|
},
|
|
13
14
|
"exports": {
|
|
14
|
-
".": "./
|
|
15
|
-
"./main": "./
|
|
15
|
+
".": "./index.js",
|
|
16
|
+
"./main": "./main/index.js"
|
|
16
17
|
},
|
|
17
18
|
"scripts": {
|
|
18
19
|
"clean": "rimraf ./dist",
|
|
@@ -20,7 +21,8 @@
|
|
|
20
21
|
"build:babel": "babel ./dist --out-dir ./dist --extensions \".js\"",
|
|
21
22
|
"start": "electron example/main.js",
|
|
22
23
|
"dev": "npm run build && npm run start",
|
|
23
|
-
"build": "npm run clean && npm run build:package && npm run build:babel"
|
|
24
|
+
"build": "npm run clean && npm run build:package && npm run build:babel",
|
|
25
|
+
"test": ""
|
|
24
26
|
},
|
|
25
27
|
"author": "AlexTorresDev <alextorressk@gmail.com>",
|
|
26
28
|
"license": "MIT",
|
|
@@ -40,10 +42,6 @@
|
|
|
40
42
|
"url": "https://github.com/AlexTorresDev/custom-electron-titlebar/issues"
|
|
41
43
|
},
|
|
42
44
|
"homepage": "https://github.com/AlexTorresDev/custom-electron-titlebar#readme",
|
|
43
|
-
"directories": {
|
|
44
|
-
"example": "example",
|
|
45
|
-
"dist": "dist"
|
|
46
|
-
},
|
|
47
45
|
"peerDependencies": {
|
|
48
46
|
"electron": ">20.0.0"
|
|
49
47
|
},
|
|
@@ -63,7 +61,11 @@
|
|
|
63
61
|
"eslint-plugin-n": "15.7.0",
|
|
64
62
|
"eslint-plugin-promise": "6.1.1",
|
|
65
63
|
"rimraf": "5.0.0",
|
|
64
|
+
"standard": "17.1.0",
|
|
66
65
|
"tsc-alias": "1.8.6",
|
|
67
66
|
"typescript": "5.0.4"
|
|
67
|
+
},
|
|
68
|
+
"eslintConfig": {
|
|
69
|
+
"extends": "./node_modules/standard/eslintrc.json"
|
|
68
70
|
}
|
|
69
71
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|