@todesktop/shared 7.127.0 → 7.129.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 +32 -0
- package/package.json +1 -1
- package/src/desktopify2.ts +43 -1
package/lib/desktopify2.d.ts
CHANGED
|
@@ -3,6 +3,26 @@ import { ISwitchableValue } from "./toDesktop";
|
|
|
3
3
|
import { MenuItemConstructorOptions, BrowserWindowConstructorOptions, WebPreferences } from "@todesktop/client-electron-types";
|
|
4
4
|
import { BaseApp } from "./base";
|
|
5
5
|
import { DesktopAppPlugin } from "./plugin";
|
|
6
|
+
interface BaseAssetDetails {
|
|
7
|
+
/**
|
|
8
|
+
* Remote URL where the asset can be downloaded
|
|
9
|
+
*/
|
|
10
|
+
url: string;
|
|
11
|
+
/**
|
|
12
|
+
* Local path where the asset is/should be stored. This path is relative to the app directory
|
|
13
|
+
*/
|
|
14
|
+
relativeLocalPath: string;
|
|
15
|
+
}
|
|
16
|
+
export interface AppIconAssetDetails extends BaseAssetDetails {
|
|
17
|
+
type: "appIcon";
|
|
18
|
+
}
|
|
19
|
+
export interface MenuIconAssetDetails extends BaseAssetDetails {
|
|
20
|
+
type: "menuIcon";
|
|
21
|
+
}
|
|
22
|
+
export interface TrayMenubarIconAssetDetails extends BaseAssetDetails {
|
|
23
|
+
type: "trayMenubarIcon";
|
|
24
|
+
}
|
|
25
|
+
export declare type AssetDetails = AppIconAssetDetails | MenuIconAssetDetails | TrayMenubarIconAssetDetails;
|
|
6
26
|
/**
|
|
7
27
|
* Custom ToDesktop Roles for Application & Tray Menus
|
|
8
28
|
*/
|
|
@@ -17,6 +37,7 @@ export interface DesktopifyMenuItemConstructorOptions extends Omit<MenuItemConst
|
|
|
17
37
|
actionType?: "jsEvent" | "role";
|
|
18
38
|
iconUrl?: string;
|
|
19
39
|
bundledIcon?: string;
|
|
40
|
+
iconAssetDetails?: MenuIconAssetDetails;
|
|
20
41
|
useTemplateImage?: boolean;
|
|
21
42
|
}
|
|
22
43
|
/**
|
|
@@ -49,9 +70,13 @@ export interface DesktopifyAppTray {
|
|
|
49
70
|
icon?: string;
|
|
50
71
|
useSeparateIcons?: boolean;
|
|
51
72
|
windowsIcon?: string;
|
|
73
|
+
windowsIconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
52
74
|
macOSIcon?: string;
|
|
75
|
+
macOSIconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
53
76
|
linuxIcon?: string;
|
|
77
|
+
linuxIconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
54
78
|
bundledIcon?: string;
|
|
79
|
+
iconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
55
80
|
useTemplateImage?: boolean;
|
|
56
81
|
rightClick: DesktopifyAppTrayAction;
|
|
57
82
|
leftClick: DesktopifyAppTrayAction;
|
|
@@ -176,13 +201,20 @@ export interface DesktopifyApp2 {
|
|
|
176
201
|
* The locally-bundled app icon.
|
|
177
202
|
*/
|
|
178
203
|
bundledIcon?: string;
|
|
204
|
+
/**
|
|
205
|
+
* Details concerning how the app icon should be handled across ToDesktop services
|
|
206
|
+
*/
|
|
207
|
+
iconAssetDetails?: AppIconAssetDetails;
|
|
179
208
|
/**
|
|
180
209
|
* Instead of using one icon for every platform, use a separate icon for different platforms
|
|
181
210
|
*/
|
|
182
211
|
useSeparateIcons?: boolean;
|
|
183
212
|
windowsIcon?: string;
|
|
213
|
+
windowsIconAssetDetails?: AppIconAssetDetails;
|
|
184
214
|
macOSIcon?: string;
|
|
215
|
+
macOSIconAssetDetails?: AppIconAssetDetails;
|
|
185
216
|
linuxIcon?: string;
|
|
217
|
+
linuxIconAssetDetails?: AppIconAssetDetails;
|
|
186
218
|
/**
|
|
187
219
|
* The name of the company that the app belongs to
|
|
188
220
|
*/
|
package/package.json
CHANGED
package/src/desktopify2.ts
CHANGED
|
@@ -7,6 +7,34 @@ import {
|
|
|
7
7
|
import { BaseApp, Schemable } from "./base";
|
|
8
8
|
import { DesktopAppPlugin } from "./plugin";
|
|
9
9
|
|
|
10
|
+
interface BaseAssetDetails {
|
|
11
|
+
/**
|
|
12
|
+
* Remote URL where the asset can be downloaded
|
|
13
|
+
*/
|
|
14
|
+
url: string;
|
|
15
|
+
/**
|
|
16
|
+
* Local path where the asset is/should be stored. This path is relative to the app directory
|
|
17
|
+
*/
|
|
18
|
+
relativeLocalPath: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface AppIconAssetDetails extends BaseAssetDetails {
|
|
22
|
+
type: "appIcon";
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface MenuIconAssetDetails extends BaseAssetDetails {
|
|
26
|
+
type: "menuIcon";
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface TrayMenubarIconAssetDetails extends BaseAssetDetails {
|
|
30
|
+
type: "trayMenubarIcon";
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export type AssetDetails =
|
|
34
|
+
| AppIconAssetDetails
|
|
35
|
+
| MenuIconAssetDetails
|
|
36
|
+
| TrayMenubarIconAssetDetails;
|
|
37
|
+
|
|
10
38
|
/**
|
|
11
39
|
* Custom ToDesktop Roles for Application & Tray Menus
|
|
12
40
|
*/
|
|
@@ -40,6 +68,7 @@ export interface DesktopifyMenuItemConstructorOptions
|
|
|
40
68
|
actionType?: "jsEvent" | "role";
|
|
41
69
|
iconUrl?: string;
|
|
42
70
|
bundledIcon?: string;
|
|
71
|
+
iconAssetDetails?: MenuIconAssetDetails;
|
|
43
72
|
useTemplateImage?: boolean;
|
|
44
73
|
}
|
|
45
74
|
|
|
@@ -80,9 +109,13 @@ export interface DesktopifyAppTray {
|
|
|
80
109
|
icon?: string;
|
|
81
110
|
useSeparateIcons?: boolean;
|
|
82
111
|
windowsIcon?: string;
|
|
112
|
+
windowsIconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
83
113
|
macOSIcon?: string;
|
|
114
|
+
macOSIconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
84
115
|
linuxIcon?: string;
|
|
116
|
+
linuxIconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
85
117
|
bundledIcon?: string;
|
|
118
|
+
iconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
86
119
|
useTemplateImage?: boolean;
|
|
87
120
|
rightClick: DesktopifyAppTrayAction;
|
|
88
121
|
leftClick: DesktopifyAppTrayAction;
|
|
@@ -288,14 +321,23 @@ export interface DesktopifyApp2 {
|
|
|
288
321
|
/**
|
|
289
322
|
* The locally-bundled app icon.
|
|
290
323
|
*/
|
|
291
|
-
|
|
324
|
+
bundledIcon?: string;
|
|
325
|
+
/**
|
|
326
|
+
* Details concerning how the app icon should be handled across ToDesktop services
|
|
327
|
+
*/
|
|
328
|
+
iconAssetDetails?: AppIconAssetDetails;
|
|
292
329
|
/**
|
|
293
330
|
* Instead of using one icon for every platform, use a separate icon for different platforms
|
|
294
331
|
*/
|
|
295
332
|
useSeparateIcons?: boolean;
|
|
296
333
|
windowsIcon?: string;
|
|
334
|
+
windowsIconAssetDetails?: AppIconAssetDetails;
|
|
335
|
+
|
|
297
336
|
macOSIcon?: string;
|
|
337
|
+
macOSIconAssetDetails?: AppIconAssetDetails;
|
|
338
|
+
|
|
298
339
|
linuxIcon?: string;
|
|
340
|
+
linuxIconAssetDetails?: AppIconAssetDetails;
|
|
299
341
|
/**
|
|
300
342
|
* The name of the company that the app belongs to
|
|
301
343
|
*/
|