custom-electron-titlebar 4.2.0-alpha.2 → 4.2.0

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.
Files changed (63) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +83 -65
  3. package/package.json +69 -58
  4. package/dist/enums/menu-state.d.ts +0 -6
  5. package/dist/index.d.ts +0 -3
  6. package/dist/index.js +0 -1
  7. package/dist/titlebar.d.ts +0 -143
  8. package/dist/types/menubar-options.d.ts +0 -41
  9. package/dist/types/scss.d.ts +0 -6
  10. package/dist/types/titlebar-options.d.ts +0 -66
  11. package/dist/utils/color.d.ts +0 -2
  12. package/dist/vs/base/browser/browser.d.ts +0 -40
  13. package/dist/vs/base/browser/canIUse.d.ts +0 -17
  14. package/dist/vs/base/browser/dom.d.ts +0 -325
  15. package/dist/vs/base/browser/event.d.ts +0 -27
  16. package/dist/vs/base/browser/fastDomNode.d.ts +0 -59
  17. package/dist/vs/base/browser/globalMouseMoveMonitor.d.ts +0 -29
  18. package/dist/vs/base/browser/iframe.d.ts +0 -33
  19. package/dist/vs/base/browser/keyboardEvent.d.ts +0 -42
  20. package/dist/vs/base/browser/mouseEvent.d.ts +0 -69
  21. package/dist/vs/base/browser/touch.d.ts +0 -39
  22. package/dist/vs/base/browser/ui/actionbar/actionViewItems.d.ts +0 -58
  23. package/dist/vs/base/browser/ui/actionbar/actionbar.d.ts +0 -95
  24. package/dist/vs/base/browser/ui/contextview/contextview.d.ts +0 -94
  25. package/dist/vs/base/browser/ui/menu/menu.d.ts +0 -58
  26. package/dist/vs/base/browser/ui/menu/menubar.d.ts +0 -78
  27. package/dist/vs/base/browser/ui/scrollbar/abstractScrollbar.d.ts +0 -67
  28. package/dist/vs/base/browser/ui/scrollbar/horizontalScrollbar.d.ts +0 -15
  29. package/dist/vs/base/browser/ui/scrollbar/scrollableElement.d.ts +0 -107
  30. package/dist/vs/base/browser/ui/scrollbar/scrollableElementOptions.d.ts +0 -157
  31. package/dist/vs/base/browser/ui/scrollbar/scrollbarArrow.d.ts +0 -25
  32. package/dist/vs/base/browser/ui/scrollbar/scrollbarState.d.ts +0 -75
  33. package/dist/vs/base/browser/ui/scrollbar/scrollbarVisibilityController.d.ts +0 -24
  34. package/dist/vs/base/browser/ui/scrollbar/verticalScrollbar.d.ts +0 -15
  35. package/dist/vs/base/browser/ui/widget.d.ts +0 -16
  36. package/dist/vs/base/common/actions.d.ts +0 -115
  37. package/dist/vs/base/common/arrays.d.ts +0 -168
  38. package/dist/vs/base/common/async.d.ts +0 -510
  39. package/dist/vs/base/common/cache.d.ts +0 -23
  40. package/dist/vs/base/common/cancellation.d.ts +0 -29
  41. package/dist/vs/base/common/charCode.d.ts +0 -405
  42. package/dist/vs/base/common/color.d.ts +0 -159
  43. package/dist/vs/base/common/decorators.d.ts +0 -7
  44. package/dist/vs/base/common/errors.d.ts +0 -77
  45. package/dist/vs/base/common/event.d.ts +0 -274
  46. package/dist/vs/base/common/functional.d.ts +0 -1
  47. package/dist/vs/base/common/iterator.d.ts +0 -31
  48. package/dist/vs/base/common/keyCodes.d.ts +0 -429
  49. package/dist/vs/base/common/keybindings.d.ts +0 -99
  50. package/dist/vs/base/common/lazy.d.ts +0 -19
  51. package/dist/vs/base/common/lifecycle.d.ts +0 -129
  52. package/dist/vs/base/common/linkedList.d.ts +0 -15
  53. package/dist/vs/base/common/platform.d.ts +0 -85
  54. package/dist/vs/base/common/range.d.ts +0 -18
  55. package/dist/vs/base/common/scrollable.d.ts +0 -141
  56. package/dist/vs/base/common/strings.d.ts +0 -215
  57. package/dist/vs/base/common/types.d.ts +0 -89
  58. package/dist/vs/base/common/uint.d.ts +0 -31
  59. package/dist/vs/nls.d.ts +0 -18
  60. package/main/attach-titlebar-to-window.d.ts +0 -3
  61. package/main/index.d.ts +0 -5
  62. package/main/main.js +0 -1
  63. package/main/setup-main.d.ts +0 -2
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2018 - now Alex Torres
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2018 Alex Torres
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,65 +1,83 @@
1
- # Custom Electron Titlebar
2
-
3
- This project is a typescript library for electron that allows you to configure a fully customizable title bar.
4
-
5
- [![LICENSE](https://img.shields.io/github/license/AlexTorresSk/custom-electron-titlebar.svg)](https://github.com/AlexTorresSk/custom-electron-titlebar/blob/master/LICENSE)
6
- [![NPM Version](https://img.shields.io/npm/v/custom-electron-titlebar.svg)](https://npmjs.org/package/custom-electron-titlebar)
7
- [![install size](https://packagephobia.com/badge?p=custom-electron-titlebar)](https://packagephobia.com/result?p=custom-electron-titlebar)
8
-
9
- ![Screenshot 1](screenshots/cet-001.jpg)
10
-
11
- ![Screenshot 2](screenshots/cet-002.jpg)
12
-
13
- ![Screenshot 3](screenshots/cet-003.jpg)
14
- <br><br>
15
-
16
- # 📦 Installing
17
- You can install this package with `npm`.
18
- ```sh
19
- npm install custom-electron-titlebar
20
- ```
21
- <br>
22
-
23
- # 🛠️ Usage
24
- The implementation is done as follows:
25
-
26
- In the main application file (main.js or .ts)
27
- ```js
28
- import { setupTitlebar, attachTitlebarToWindow } from "custom-electron-titlebar/main";
29
-
30
- // setup the titlebar main process
31
- setupTitlebar();
32
-
33
- function createWindow() {
34
- // Create the browser window.
35
- const mainWindow = new BrowserWindow({
36
- width: 800,
37
- height: 600,
38
- titleBarStyle: 'hidden',
39
- //frame: false, // needed if process.versions.electron < 14
40
- webPreferences: {
41
- preload: path.join(__dirname, 'preload.js')
42
- }
43
- });
44
-
45
- ...
46
-
47
- // attach fullscreen(f11 and not 'maximized') && focus listeners
48
- attachTitlebarToWindow(mainWindow);
49
- }
50
- ```
51
-
52
- In the preload file (preload.js or .ts)
53
- ```js
54
- import { Titlebar } from "custom-electron-titlebar";
55
-
56
- window.addEventListener('DOMContentLoaded', () => {
57
- // Title bar implemenation
58
- new Titlebar();
59
- });
60
- ```
61
- To see the options you can include in the Title Bar constructor, such as color of elements, icons, menu position, and much more, and the methods you can use, go to the [wiki](https://github.com/AlexTorresSk/custom-electron-titlebar/wiki)
62
- <br><br>
63
-
64
- ## ✅ License
65
- This project is under the [MIT](https://github.com/AlexTorresSk/custom-electron-titlebar/blob/master/LICENSE) license.
1
+ # Custom Electron Titlebar
2
+
3
+ This project is a typescript library for electron that allows you to configure a fully customizable title bar.
4
+
5
+ [![LICENSE](https://img.shields.io/github/license/AlexTorresDev/custom-electron-titlebar.svg)](https://github.com/AlexTorresDev/custom-electron-titlebar/blob/master/LICENSE)
6
+ [![NPM Version](https://img.shields.io/npm/v/custom-electron-titlebar.svg)](https://npmjs.org/package/custom-electron-titlebar)
7
+ [![install size](https://packagephobia.com/badge?p=custom-electron-titlebar)](https://packagephobia.com/result?p=custom-electron-titlebar)
8
+
9
+ [📄 Visit Documentation](https://cet.alextrs.dev)
10
+
11
+ Standard Title Bar
12
+
13
+ ![Screenshot 1](screenshots/cet-1.png)
14
+
15
+ Bottom Menu Bar
16
+
17
+ ![Screenshot 2](screenshots/cet-2.png)
18
+
19
+ Menu
20
+
21
+ ![Screenshot 3](screenshots/cet-3.png)
22
+
23
+ Custom color
24
+
25
+ ![Screenshot 4](screenshots/cet-4.png)
26
+
27
+ # 📦 Installing
28
+ You can install this package with `npm`.
29
+ ```sh
30
+ npm install custom-electron-titlebar
31
+ ```
32
+
33
+ # 🛠️ Usage
34
+ The implementation is done as follows:
35
+
36
+ In the main application file (main.js or .ts)
37
+ ```js
38
+ import { setupTitlebar, attachTitlebarToWindow } from "custom-electron-titlebar/main";
39
+
40
+ // setup the titlebar main process
41
+ setupTitlebar();
42
+
43
+ function createWindow() {
44
+ // Create the browser window.
45
+ const mainWindow = new BrowserWindow({
46
+ width: 800,
47
+ height: 600,
48
+ titleBarStyle: 'hidden',
49
+ //frame: false, // needed if process.versions.electron < 14
50
+ webPreferences: {
51
+ sandbox: false,
52
+ preload: path.join(__dirname, 'preload.js')
53
+ }
54
+ });
55
+
56
+ ...
57
+
58
+ // attach fullScreen(f11 and not 'maximized') && focus listeners
59
+ attachTitlebarToWindow(mainWindow);
60
+ }
61
+ ```
62
+
63
+ In the preload file (preload.js or .ts)
64
+ ```js
65
+ import { Titlebar } from "custom-electron-titlebar";
66
+
67
+ window.addEventListener('DOMContentLoaded', () => {
68
+ // Title bar implementation
69
+ new Titlebar();
70
+ });
71
+ ```
72
+ To see the options you can include in the Title Bar constructor, such as color of elements, icons, menu position, and much more, and the methods you can use, go to the [wiki](https://github.com/AlexTorresDev/custom-electron-titlebar/wiki)
73
+
74
+ ## 💰 Support
75
+ If you want to support my development, you can do so by donating through [Buy me a coffee](https://www.buymeacoffee.com/AlexTorresDev)
76
+
77
+
78
+ ## 📝 Collaborators
79
+ I would like to express my sincere gratitude to all the people who have collaborated in the development and advancement of this project. I appreciate your contributions.
80
+
81
+
82
+ ## ✅ License
83
+ This project is under the [MIT](https://github.com/AlexTorresDev/custom-electron-titlebar/blob/master/LICENSE) license.
package/package.json CHANGED
@@ -1,58 +1,69 @@
1
- {
2
- "name": "custom-electron-titlebar",
3
- "version": "4.2.0-alpha.2",
4
- "description": "Library for electron that allows you to configure a fully customizable title bar.",
5
- "main": "dist/index.js",
6
- "exports": {
7
- ".": "./dist/index.js",
8
- "./main": "./main/main.js"
9
- },
10
- "scripts": {
11
- "build:develop": "webpack --mode=development",
12
- "build": "webpack --mode=production",
13
- "example": "electron example/main.js",
14
- "start": "npm run build:develop && npm run example",
15
- "prepare": "npm run build"
16
- },
17
- "author": "AlexTorresSk <alextorressk@gmail.com>",
18
- "license": "MIT",
19
- "repository": {
20
- "type": "git",
21
- "url": "https://github.com/AlexTorresSk/custom-electron-titlebar.git"
22
- },
23
- "keywords": [
24
- "typescript",
25
- "electron",
26
- "title bar",
27
- "menubar",
28
- "windows",
29
- "linux"
30
- ],
31
- "bugs": {
32
- "url": "https://github.com/AlexTorresSk/custom-electron-titlebar/issues"
33
- },
34
- "homepage": "https://github.com/AlexTorresSk/custom-electron-titlebar#readme",
35
- "directories": {
36
- "example": "example",
37
- "dist": "dist"
38
- },
39
- "peerDependencies": {
40
- "electron": ">=10"
41
- },
42
- "devDependencies": {
43
- "@babel/core": "^7.19.3",
44
- "@babel/preset-env": "^7.19.3",
45
- "@types/node": "^18.8.0",
46
- "babel-loader": "^8.2.5",
47
- "css-loader": "^6.7.1",
48
- "electron": "^21.0.1",
49
- "sass": "^1.55.0",
50
- "sass-loader": "^13.0.2",
51
- "style-loader": "^3.3.1",
52
- "ts-loader": "^9.4.1",
53
- "tsconfig-paths-webpack-plugin": "^4.0.0",
54
- "typescript": "^4.8.4",
55
- "webpack": "^5.74.0",
56
- "webpack-cli": "^4.10.0"
57
- }
58
- }
1
+ {
2
+ "name": "custom-electron-titlebar",
3
+ "version": "4.2.0",
4
+ "description": "Library for electron that allows you to configure a fully customizable title bar.",
5
+ "types": "./dist/index.d.ts",
6
+ "typesVersions": {
7
+ "*": {
8
+ "main": [
9
+ "./dist/main/index.d.ts"
10
+ ]
11
+ }
12
+ },
13
+ "exports": {
14
+ ".": "./dist/index.js",
15
+ "./main": "./dist/main/index.js"
16
+ },
17
+ "scripts": {
18
+ "clean": "rimraf ./dist",
19
+ "build:package": "tsc && tsc-alias",
20
+ "build:babel": "babel ./dist --out-dir ./dist --extensions \".js\"",
21
+ "start": "electron example/main.js",
22
+ "dev": "npm run build && npm run start",
23
+ "build": "npm run clean && npm run build:package && npm run build:babel"
24
+ },
25
+ "author": "AlexTorresDev <alextorressk@gmail.com>",
26
+ "license": "MIT",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/AlexTorresDev/custom-electron-titlebar.git"
30
+ },
31
+ "keywords": [
32
+ "typescript",
33
+ "electron",
34
+ "title bar",
35
+ "menubar",
36
+ "windows",
37
+ "linux"
38
+ ],
39
+ "bugs": {
40
+ "url": "https://github.com/AlexTorresDev/custom-electron-titlebar/issues"
41
+ },
42
+ "homepage": "https://github.com/AlexTorresDev/custom-electron-titlebar#readme",
43
+ "directories": {
44
+ "example": "example",
45
+ "dist": "dist"
46
+ },
47
+ "peerDependencies": {
48
+ "electron": ">20.0.0"
49
+ },
50
+ "devDependencies": {
51
+ "@babel/cli": "7.21.5",
52
+ "@babel/core": "7.21.8",
53
+ "@typescript-eslint/eslint-plugin": "5.59.2",
54
+ "@typescript-eslint/parser": "5.59.2",
55
+ "babel-plugin-import-require-as-string": "1.0.2",
56
+ "babel-plugin-module-resolver": "5.0.0",
57
+ "babel-plugin-rewire": "1.2.0",
58
+ "electron": "24.2.0",
59
+ "eslint": "8.40.0",
60
+ "eslint-config-prettier": "8.8.0",
61
+ "eslint-config-standard": "17.0.0",
62
+ "eslint-plugin-import": "2.27.5",
63
+ "eslint-plugin-n": "15.7.0",
64
+ "eslint-plugin-promise": "6.1.1",
65
+ "rimraf": "5.0.0",
66
+ "tsc-alias": "1.8.6",
67
+ "typescript": "5.0.4"
68
+ }
69
+ }
@@ -1,6 +0,0 @@
1
- export declare enum MenubarState {
2
- HIDDEN = 0,
3
- VISIBLE = 1,
4
- FOCUSED = 2,
5
- OPEN = 3
6
- }
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import { Titlebar } from './titlebar';
2
- import { Color } from 'vs/base/common/color';
3
- export { Titlebar, Color };