@todesktop/shared 7.98.0 → 7.101.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.
- package/lib/desktopify2.d.ts +3 -9
- package/package.json +1 -1
- package/src/desktopify2.ts +2 -9
package/lib/desktopify2.d.ts
CHANGED
|
@@ -5,13 +5,14 @@ import { BaseApp } from "./base";
|
|
|
5
5
|
/**
|
|
6
6
|
* Custom ToDesktop Roles for Application & Tray Menus
|
|
7
7
|
*/
|
|
8
|
-
declare type todesktopRoles = "todesktop:launch-at-startup" | "todesktop:check-for-updates" | "todesktop:quit" | "todesktop:new-window" | "todesktop:new-tab" | "todesktop:check-for-updates" | "todesktop:history-home" | "todesktop:history-back" | "todesktop:history-forward" | "todesktop:show-window" | "todesktop:hide-window" | "todesktop:toggle-window0" | "todesktop:toggle-window1" | "todesktop:toggle-window2" | "todesktop:toggle-window3" | "todesktop:toggle-window4";
|
|
8
|
+
declare type todesktopRoles = "todesktop:launch-at-startup" | "todesktop:check-for-updates" | "todesktop:quit" | "todesktop:new-window" | "todesktop:new-tab" | "todesktop:check-for-updates" | "todesktop:history-home" | "todesktop:history-back" | "todesktop:history-forward" | "todesktop:show-window" | "todesktop:hide-window" | "todesktop:toggle-window" | "todesktop:toggle-window0" | "todesktop:toggle-window1" | "todesktop:toggle-window2" | "todesktop:toggle-window3" | "todesktop:toggle-window4";
|
|
9
9
|
export interface DesktopifyMenuItemConstructorOptions extends Omit<MenuItemConstructorOptions, "role" | "submenu"> {
|
|
10
10
|
platforms?: NodeJS.Platform[];
|
|
11
11
|
submenu?: DesktopifyMenuItemConstructorOptions[];
|
|
12
12
|
role?: MenuItemConstructorOptions["role"] | todesktopRoles;
|
|
13
13
|
useSystemLabel?: boolean;
|
|
14
14
|
event?: string;
|
|
15
|
+
targetWindowId?: string;
|
|
15
16
|
actionType?: "jsEvent" | "role";
|
|
16
17
|
}
|
|
17
18
|
/**
|
|
@@ -32,19 +33,13 @@ export declare type DesktopifyAppTrayToggleMenuAction = {
|
|
|
32
33
|
role: "toggleMenu";
|
|
33
34
|
menu: DesktopifyMenuItemConstructorOptions[];
|
|
34
35
|
};
|
|
35
|
-
/**
|
|
36
|
-
* Custom Menu Role
|
|
37
|
-
*/
|
|
38
|
-
export declare type DesktopifyAppTrayCustomMenuAction = {
|
|
39
|
-
role: "customMenu";
|
|
40
|
-
};
|
|
41
36
|
/**
|
|
42
37
|
* No Action Tray Action
|
|
43
38
|
*/
|
|
44
39
|
export declare type DesktopifyAppTrayNoAction = {
|
|
45
40
|
role: "noAction";
|
|
46
41
|
};
|
|
47
|
-
export declare type DesktopifyAppTrayAction = DesktopifyAppTrayToggleMenuAction |
|
|
42
|
+
export declare type DesktopifyAppTrayAction = DesktopifyAppTrayToggleMenuAction | DesktopifyAppTrayToggleWindowAction | DesktopifyAppTrayNoAction;
|
|
48
43
|
export interface DesktopifyAppTray {
|
|
49
44
|
id: string;
|
|
50
45
|
icon?: string;
|
|
@@ -54,7 +49,6 @@ export interface DesktopifyAppTray {
|
|
|
54
49
|
linuxIcon?: string;
|
|
55
50
|
bundledIcon?: string;
|
|
56
51
|
useTemplateImage?: boolean;
|
|
57
|
-
customMenu?: DesktopifyAppMenu[];
|
|
58
52
|
rightClick: DesktopifyAppTrayAction;
|
|
59
53
|
leftClick: DesktopifyAppTrayAction;
|
|
60
54
|
}
|
package/package.json
CHANGED
package/src/desktopify2.ts
CHANGED
|
@@ -21,6 +21,7 @@ type todesktopRoles =
|
|
|
21
21
|
| "todesktop:history-forward"
|
|
22
22
|
| "todesktop:show-window"
|
|
23
23
|
| "todesktop:hide-window"
|
|
24
|
+
| "todesktop:toggle-window"
|
|
24
25
|
| "todesktop:toggle-window0"
|
|
25
26
|
| "todesktop:toggle-window1"
|
|
26
27
|
| "todesktop:toggle-window2"
|
|
@@ -34,6 +35,7 @@ export interface DesktopifyMenuItemConstructorOptions
|
|
|
34
35
|
role?: MenuItemConstructorOptions["role"] | todesktopRoles;
|
|
35
36
|
useSystemLabel?: boolean;
|
|
36
37
|
event?: string;
|
|
38
|
+
targetWindowId?: string;
|
|
37
39
|
actionType?: "jsEvent" | "role";
|
|
38
40
|
}
|
|
39
41
|
|
|
@@ -57,13 +59,6 @@ export type DesktopifyAppTrayToggleMenuAction = {
|
|
|
57
59
|
menu: DesktopifyMenuItemConstructorOptions[];
|
|
58
60
|
};
|
|
59
61
|
|
|
60
|
-
/**
|
|
61
|
-
* Custom Menu Role
|
|
62
|
-
*/
|
|
63
|
-
export type DesktopifyAppTrayCustomMenuAction = {
|
|
64
|
-
role: "customMenu";
|
|
65
|
-
};
|
|
66
|
-
|
|
67
62
|
/**
|
|
68
63
|
* No Action Tray Action
|
|
69
64
|
*/
|
|
@@ -73,7 +68,6 @@ export type DesktopifyAppTrayNoAction = {
|
|
|
73
68
|
|
|
74
69
|
export type DesktopifyAppTrayAction =
|
|
75
70
|
| DesktopifyAppTrayToggleMenuAction
|
|
76
|
-
| DesktopifyAppTrayCustomMenuAction
|
|
77
71
|
| DesktopifyAppTrayToggleWindowAction
|
|
78
72
|
| DesktopifyAppTrayNoAction;
|
|
79
73
|
|
|
@@ -86,7 +80,6 @@ export interface DesktopifyAppTray {
|
|
|
86
80
|
linuxIcon?: string;
|
|
87
81
|
bundledIcon?: string;
|
|
88
82
|
useTemplateImage?: boolean;
|
|
89
|
-
customMenu?: DesktopifyAppMenu[];
|
|
90
83
|
rightClick: DesktopifyAppTrayAction;
|
|
91
84
|
leftClick: DesktopifyAppTrayAction;
|
|
92
85
|
}
|