electron-menubar 11.1.1 โ†’ 11.1.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.
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  <h1 align="center">โž– electron-menubar</h1>
2
2
 
3
3
  <p align="center">
4
+ <a href="https://electron-menubar.gitify.io"><img src="https://img.shields.io/badge/docs-mintlify-18E299?logo=mintlify&amp;logoColor=black" alt="Documentation" /></a>
4
5
  <a href="https://github.com/gitify-app/electron-menubar/actions"><img src="https://img.shields.io/github/actions/workflow/status/gitify-app/electron-menubar/test.yml?logo=github&amp;label=ci" alt="CI Workflow" /></a>
5
6
  <a href="https://github.com/gitify-app/electron-menubar/actions"><img src="https://img.shields.io/github/actions/workflow/status/gitify-app/electron-menubar/release.yml?logo=github&amp;label=release" alt="Release Workflow" /></a>
6
7
  <a href="https://sonarcloud.io/summary/new_code?id=gitify-app_electron-menubar"><img src="https://img.shields.io/sonar/quality_gate/gitify-app_electron-menubar?server=https%3A%2F%2Fsonarcloud.io&amp;logo=sonarqubecloud" alt="Quality Gate Status" /></a>
@@ -14,11 +15,11 @@
14
15
  </p>
15
16
 
16
17
  <h5 align="center"><i>formerly known as menubar</i></h5>
17
- <h4 align="center">High level way to create menubar desktop applications with Electron.</h4>
18
+ <h4 align="center">A high-level way to build menubar apps with Electron.</h4>
18
19
 
19
20
  <br />
20
21
 
21
- ## Features
22
+ ## ๐Ÿ“ฆ Features
22
23
 
23
24
  - โšก๏ธ Quick start for creating menubar applications using Electron.
24
25
  - ๐Ÿš€ Zero runtime dependencies.
@@ -31,7 +32,7 @@
31
32
  > [!NOTE]
32
33
  > On native Wayland, the desktop compositor controls window placement, so the popover cannot be anchored to the tray icon and is positioned by the desktop (usually centered). This is a Wayland limitation, not something the library can override. Tray-relative positioning works under X11/XWayland. See [window positioning on Linux][platforms] for the detail and a workaround.
33
34
 
34
- ## Why electron-menubar?
35
+ ## ๐Ÿ’ก Why electron-menubar?
35
36
 
36
37
  `electron-menubar` builds on [max-mapper/menubar][github-upstream-repo], with fixes and controls developed for [Gitify](https://github.com/gitify-app/gitify). The original provides the tray-app foundation. This fork brings more of the platform-specific behavior into the library so applications have less to implement themselves.
37
38
 
@@ -46,7 +47,7 @@
46
47
  | Packaging | Zero runtime dependencies, including a built-in positioner. Ships CommonJS and ESM entry points with TypeScript declarations. |
47
48
  | Verification | Unit tests, native Electron end-to-end tests on macOS, Windows, and Linux, and visual checks that the tray icon and window render. The [platform report][platforms] includes screenshots and positioning limitations. |
48
49
 
49
- ### Popup behavior without platform checks
50
+ ### ๐ŸชŸ Popup behavior without platform checks
50
51
 
51
52
  Menubar manages popup stacking and focus on every platform. A plain `menubar()` dismisses on click-away and opens above the Windows hidden-icons panel. To keep it open, change one option:
52
53
 
@@ -59,20 +60,20 @@ mb.setOption('hideOnBlur', true); // Resume click-away dismissal.
59
60
 
60
61
  Opening DevTools temporarily keeps the popup open. Closing DevTools restores the latest `hideOnBlur` preference. Options set before window creation also apply when the window is recreated.
61
62
 
62
- #### Migrating from 10.x
63
+ #### ๐Ÿšš Migrating from 10.x
63
64
 
64
65
  These defaults apply starting with 11.0.0. Previously, menubar inferred dismissal from `window.isAlwaysOnTop()`. Use `hideOnBlur: false` for persistent popups instead of `browserWindow.alwaysOnTop: true` or runtime `window.setAlwaysOnTop(true)` calls. `browserWindow.alwaysOnTop` now controls stacking only; it does not disable dismissal. Setting `hideOnBlur: false` also keeps the popup on top on macOS and Linux.
65
66
 
66
67
  Remove Windows `pop-up-menu` workarounds and DevTools focus handlers from apps. Menubar owns stacking during window creation, showing, preference changes, and DevTools transitions. Apps can still customize DevTools dimensions and layout.
67
68
  See the [changelog](CHANGELOG.md) for released changes and the [API documentation](#api-documentation) for all options.
68
69
 
69
- ## Installation
70
+ ## ๐Ÿš€ Installation
70
71
 
71
72
  ```bash
72
73
  pnpm add electron-menubar
73
74
  ```
74
75
 
75
- ## Usage
76
+ ## ๐Ÿ”ง Usage
76
77
 
77
78
  Starting with your own new project, run these commands:
78
79
 
@@ -101,17 +102,17 @@ Then use `electron` to run the app:
101
102
  $ electron myApp.js
102
103
  ```
103
104
 
104
- ## Examples
105
+ ## ๐Ÿ“š Examples
105
106
 
106
107
  See [`examples`][examples] folder for a selection of working examples.
107
108
 
108
- ## API Documentation
109
+ ## ๐Ÿ“– API Documentation
109
110
 
110
- ### `Menubar` Class
111
+ ### ๐Ÿงฑ `Menubar` Class
111
112
 
112
113
  The return value of `menubar()` is a `Menubar` class instance, which exposes the following properties and methods.
113
114
 
114
- #### Properties
115
+ #### ๐Ÿงพ Properties
115
116
 
116
117
  | Property | Description |
117
118
  | ------------ | ----------------------------------------------------------------------------- |
@@ -120,7 +121,7 @@ The return value of `menubar()` is a `Menubar` class instance, which exposes the
120
121
  | `tray` | The [Electron Tray][electron-docs-tray] instance. |
121
122
  | `positioner` | The `Positioner` instance used to compute the window's on-screen coordinates. |
122
123
 
123
- #### Methods
124
+ #### ๐Ÿงฐ Methods
124
125
 
125
126
  | Method | Description |
126
127
  | -------------------------------- | ------------------------------------------------------------------------------------------------------------ |
@@ -136,7 +137,7 @@ The return value of `menubar()` is a `Menubar` class instance, which exposes the
136
137
  | `destroy()` | Tear down the menubar instance. |
137
138
  | `isDestroyed()` | Whether the menubar is currently destroyed. |
138
139
 
139
- ### `menubar()` Options
140
+ ### ๐ŸŽ›๏ธ `menubar()` Options
140
141
 
141
142
  You can pass an optional options object into the `menubar({ ... })` function:
142
143
 
@@ -162,7 +163,7 @@ You can pass an optional options object into the `menubar({ ... })` function:
162
163
  | `ignoreDoubleClickEvents` | `true` (macOS only) | Calls `tray.setIgnoreDoubleClickEvents(true)` so an accidental double-click doesn't race the close-on-blur handler and flicker the tray icon. Pass `false` to opt out. No-op on Linux/Windows. |
163
164
  | `globalShortcut` | | An [Accelerator][electron-docs-accelerator] string registered as a global keyboard shortcut that toggles the menubar window. Unregistered automatically on `destroy()`. Use `mb.setGlobalShortcut(accelerator)` to change or clear it at runtime. |
164
165
 
165
- ### Events
166
+ ### ๐Ÿ“ก Events
166
167
 
167
168
  The `Menubar` class is an event emitter:
168
169
 
@@ -179,7 +180,7 @@ The `Menubar` class is an event emitter:
179
180
  | `after-close` | After the `.window` (BrowserWindow) property has been deleted. |
180
181
  | `focus-lost` | Emitted on click-away when `hideOnBlur` is `false` or DevTools is open. |
181
182
 
182
- ## Tips
183
+ ## ๐Ÿง  Tips
183
184
 
184
185
  - Use `mb.on('after-create-window', callback)` to run things after your app has loaded. For example you could run `mb.window.openDevTools()` to open the developer tools for debugging, or load a different URL with `mb.window.loadURL()`
185
186
  - Use `mb.on('focus-lost')` if you would like to perform some operation when using the option `hideOnBlur: false`
@@ -187,7 +188,7 @@ The `Menubar` class is an event emitter:
187
188
  - To attach a native context menu, pass it as `contextMenu`: `menubar({ contextMenu })`. The library wires it via `setContextMenu` on Linux and `popUpContextMenu` on right-click on macOS/Windows so left-click still toggles the window. See [this example][examples-native] for more information.
188
189
  - To avoid a flash when opening your menubar app, you can disable backgrounding the app using the following: `mb.app.commandLine.appendSwitch('disable-backgrounding-occluded-windows', 'true');`
189
190
 
190
- ## Acknowledgements
191
+ ## ๐Ÿค Acknowledgements
191
192
 
192
193
  Originally created by [Max][github-upstream-creator] โ€” hard-forked from [max-mapper/menubar][github-upstream-repo].
193
194
 
package/lib/index.d.cts CHANGED
@@ -391,4 +391,5 @@ export declare function getWindowPosition(tray: Tray): WindowPosition;
391
391
  * {@link Options}
392
392
  */
393
393
  export declare function menubar(options?: Partial<Options>): Menubar;
394
- //#endregion
394
+ //#endregion
395
+ export {};
package/lib/index.d.mts CHANGED
@@ -392,4 +392,5 @@ export declare function getWindowPosition(tray: Tray): WindowPosition;
392
392
  */
393
393
  export declare function menubar(options?: Partial<Options>): Menubar;
394
394
  //#endregion
395
+ export {};
395
396
  //# sourceMappingURL=index.d.mts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-menubar",
3
- "version": "11.1.1",
3
+ "version": "11.1.2",
4
4
  "description": "high level way to create menubar desktop applications with electron",
5
5
  "keywords": [
6
6
  "app",
@@ -62,19 +62,19 @@
62
62
  "typecheck": "tsc --noEmit"
63
63
  },
64
64
  "devDependencies": {
65
- "@playwright/test": "1.63.0",
65
+ "@playwright/test": "1.64.1",
66
66
  "@types/pngjs": "6.0.5",
67
- "electron": "44.5.1",
68
- "oxfmt": "0.71.0",
69
- "oxlint": "1.86.0",
67
+ "electron": "45.0.0",
68
+ "oxfmt": "0.74.0",
69
+ "oxlint": "1.89.0",
70
70
  "pngjs": "7.0.0",
71
- "rolldown": "1.2.12",
72
- "rolldown-plugin-dts": "0.28.6",
71
+ "rolldown": "1.2.14",
72
+ "rolldown-plugin-dts": "0.28.8",
73
73
  "typescript": "7.0.2",
74
- "vitest": "5.0.3"
74
+ "vitest": "5.0.5"
75
75
  },
76
76
  "peerDependencies": {
77
- "electron": ">=35.0.0"
77
+ "electron": ">=44.9.1"
78
78
  },
79
- "packageManager": "pnpm@12.9.1"
79
+ "packageManager": "pnpm@12.14.0"
80
80
  }