electron-menubar 10.1.5 → 10.1.8

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
@@ -107,7 +107,7 @@ You can pass an optional options object into the `menubar({ ... })` function:
107
107
  | `loadUrlOptions` | `undefined` | The options passed when loading the index URL in the menubar's `browserWindow`. Everything `browserWindow.loadURL` supports is supported; this object is simply passed onto [browserWindow.loadURL][electron-docs-browserwindow-loadurl]. |
108
108
  | `showOnAllWorkspaces` | `true` | Makes the window available on all macOS workspaces. |
109
109
  | `windowPosition` | `trayCenter` (macOS/Linux), `trayBottomCenter` (Windows) | Sets the window position (`browserWindow.x` / `browserWindow.y` will still override this). Valid values: `trayLeft`, `trayBottomLeft`, `trayRight`, `trayBottomRight`, `trayCenter`, `trayBottomCenter`, `topLeft`, `topRight`, `bottomLeft`, `bottomRight`, `topCenter`, `bottomCenter`, `leftCenter`, `rightCenter`, `center`. |
110
- | `showDockIcon` | `false` | Configure the visibility of the application dock icon. |
110
+ | `showDockIcon` | `false` | Configure the visibility of the application dock icon, macOS only. <details><summary>Hiding reliably</summary>When `false`, the library calls [`app.dock.hide()`](https://www.electronjs.org/docs/latest/api/app#appdockhide-macos) at startup and re-asserts it once shortly after, because macOS can silently drop the underlying process transform when it races the launch activation. The transform only runs after the process has already launched as a regular dock app, so the tile briefly exists on every launch and hiding it stays best-effort. Packaged apps that never want a dock tile should also declare [`LSUIElement`](https://developer.apple.com/documentation/bundleresources/information-property-list/lsuielement) in their `Info.plist` (with electron-builder: `mac.extendInfo.LSUIElement: true`), so the process starts as an agent app and no tile is ever created. `showDockIcon: false` then still covers development runs, where the stock Electron binary's plist is not under your control.</details> |
111
111
  | `trigger` | `'click'` | Tray event that toggles the menubar window. One of `'click'`, `'right-click'`, or `'none'`. Use `'none'` to disable automatic toggling, useful when a single tray icon serves multiple windows. The window can still be shown by calling `mb.showWindow()` directly. |
112
112
  | `showOnRightClick` | `false` | **Deprecated**, use `trigger: 'right-click'` instead. Show the window on `right-click` event instead of regular `click`. |
113
113
  | `contextMenu` | | An Electron `Menu` to attach to the tray icon. <details><summary>Platform behavior</summary>On Linux it is bound via `tray.setContextMenu` (required by libappindicator / StatusNotifierItem) and re-published on every show/hide to defeat the indicator's menu cache. On macOS and Windows it pops up on right-click via `tray.popUpContextMenu`, so left-click continues to toggle the window. Combine with `trigger: 'none'` if you want right-click to be the only interaction.</details> |
package/lib/index.d.cts CHANGED
@@ -130,6 +130,13 @@ interface Options {
130
130
  /**
131
131
  * Configure the visibility of the application dock icon, macOS only. Calls
132
132
  * [`app.dock.hide`](https://electronjs.org/docs/api/app#appdockhide-macos).
133
+ *
134
+ * Hiding at runtime is a process transform that macOS can silently drop, so
135
+ * packaged apps that never want a dock tile should also declare
136
+ * `LSUIElement` in their `Info.plist` (with electron-builder:
137
+ * `mac.extendInfo.LSUIElement: true`). This option then still covers
138
+ * development runs, where the stock Electron binary's plist is not under
139
+ * your control.
133
140
  */
134
141
  showDockIcon?: boolean;
135
142
  /**
package/lib/index.d.mts CHANGED
@@ -130,6 +130,13 @@ interface Options {
130
130
  /**
131
131
  * Configure the visibility of the application dock icon, macOS only. Calls
132
132
  * [`app.dock.hide`](https://electronjs.org/docs/api/app#appdockhide-macos).
133
+ *
134
+ * Hiding at runtime is a process transform that macOS can silently drop, so
135
+ * packaged apps that never want a dock tile should also declare
136
+ * `LSUIElement` in their `Info.plist` (with electron-builder:
137
+ * `mac.extendInfo.LSUIElement: true`). This option then still covers
138
+ * development runs, where the stock Electron binary's plist is not under
139
+ * your control.
133
140
  */
134
141
  showDockIcon?: boolean;
135
142
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-menubar",
3
- "version": "10.1.5",
3
+ "version": "10.1.8",
4
4
  "description": "high level way to create menubar desktop applications with electron",
5
5
  "keywords": [
6
6
  "app",
@@ -74,7 +74,7 @@
74
74
  "vitest": "4.1.10"
75
75
  },
76
76
  "peerDependencies": {
77
- "electron": "43.2.0"
77
+ "electron": ">=35.0.0"
78
78
  },
79
79
  "packageManager": "pnpm@11.17.0"
80
80
  }