@trayjs/trayjs 0.0.2 → 0.0.3

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 (2) hide show
  1. package/index.mjs +6 -0
  2. package/package.json +7 -7
package/index.mjs CHANGED
@@ -51,6 +51,7 @@ function getBinaryPath() {
51
51
  * @property {boolean} [enabled]
52
52
  * @property {boolean} [checked]
53
53
  * @property {boolean} [separator]
54
+ * @property {MenuItem[]} [items] - Nested submenu items
54
55
  */
55
56
 
56
57
  /**
@@ -131,6 +132,11 @@ export class Tray extends EventEmitter {
131
132
  });
132
133
  }
133
134
 
135
+ /** @param {MenuItem[]} items */
136
+ setMenu(items) {
137
+ this.#send({ method: 'setMenu', params: { items } });
138
+ }
139
+
134
140
  /** @param {string} text */
135
141
  setTooltip(text) {
136
142
  this.#send({ method: 'setTooltip', params: { text } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trayjs/trayjs",
3
- "version": "0.0.2",
3
+ "version": "0.0.3",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "exports": "./index.mjs",
@@ -8,11 +8,11 @@
8
8
  "index.mjs"
9
9
  ],
10
10
  "optionalDependencies": {
11
- "@trayjs/linux-x64": "0.0.1",
12
- "@trayjs/linux-arm64": "0.0.1",
13
- "@trayjs/darwin-x64": "0.0.1",
14
- "@trayjs/darwin-arm64": "0.0.1",
15
- "@trayjs/win32-x64": "0.0.1",
16
- "@trayjs/win32-arm64": "0.0.1"
11
+ "@trayjs/linux-x64": "0.0.3",
12
+ "@trayjs/linux-arm64": "0.0.3",
13
+ "@trayjs/darwin-x64": "0.0.3",
14
+ "@trayjs/darwin-arm64": "0.0.3",
15
+ "@trayjs/win32-x64": "0.0.3",
16
+ "@trayjs/win32-arm64": "0.0.3"
17
17
  }
18
18
  }