@todesktop/shared 7.128.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 +21 -19
- package/package.json +1 -1
- package/src/desktopify2.ts +28 -19
package/lib/desktopify2.d.ts
CHANGED
|
@@ -3,24 +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
|
-
|
|
6
|
+
interface BaseAssetDetails {
|
|
7
7
|
/**
|
|
8
8
|
* Remote URL where the asset can be downloaded
|
|
9
9
|
*/
|
|
10
10
|
url: string;
|
|
11
|
-
/**
|
|
12
|
-
* Whether the asset is bundled into the final built app
|
|
13
|
-
*/
|
|
14
|
-
isBundled: boolean;
|
|
15
11
|
/**
|
|
16
12
|
* Local path where the asset is/should be stored. This path is relative to the app directory
|
|
17
13
|
*/
|
|
18
14
|
relativeLocalPath: string;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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;
|
|
24
26
|
/**
|
|
25
27
|
* Custom ToDesktop Roles for Application & Tray Menus
|
|
26
28
|
*/
|
|
@@ -35,7 +37,7 @@ export interface DesktopifyMenuItemConstructorOptions extends Omit<MenuItemConst
|
|
|
35
37
|
actionType?: "jsEvent" | "role";
|
|
36
38
|
iconUrl?: string;
|
|
37
39
|
bundledIcon?: string;
|
|
38
|
-
iconAssetDetails?:
|
|
40
|
+
iconAssetDetails?: MenuIconAssetDetails;
|
|
39
41
|
useTemplateImage?: boolean;
|
|
40
42
|
}
|
|
41
43
|
/**
|
|
@@ -68,13 +70,13 @@ export interface DesktopifyAppTray {
|
|
|
68
70
|
icon?: string;
|
|
69
71
|
useSeparateIcons?: boolean;
|
|
70
72
|
windowsIcon?: string;
|
|
71
|
-
windowsIconAssetDetails?:
|
|
73
|
+
windowsIconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
72
74
|
macOSIcon?: string;
|
|
73
|
-
macOSIconAssetDetails?:
|
|
75
|
+
macOSIconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
74
76
|
linuxIcon?: string;
|
|
75
|
-
linuxIconAssetDetails?:
|
|
77
|
+
linuxIconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
76
78
|
bundledIcon?: string;
|
|
77
|
-
iconAssetDetails?:
|
|
79
|
+
iconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
78
80
|
useTemplateImage?: boolean;
|
|
79
81
|
rightClick: DesktopifyAppTrayAction;
|
|
80
82
|
leftClick: DesktopifyAppTrayAction;
|
|
@@ -202,17 +204,17 @@ export interface DesktopifyApp2 {
|
|
|
202
204
|
/**
|
|
203
205
|
* Details concerning how the app icon should be handled across ToDesktop services
|
|
204
206
|
*/
|
|
205
|
-
iconAssetDetails?:
|
|
207
|
+
iconAssetDetails?: AppIconAssetDetails;
|
|
206
208
|
/**
|
|
207
209
|
* Instead of using one icon for every platform, use a separate icon for different platforms
|
|
208
210
|
*/
|
|
209
211
|
useSeparateIcons?: boolean;
|
|
210
212
|
windowsIcon?: string;
|
|
211
|
-
windowsIconAssetDetails?:
|
|
213
|
+
windowsIconAssetDetails?: AppIconAssetDetails;
|
|
212
214
|
macOSIcon?: string;
|
|
213
|
-
macOSIconAssetDetails?:
|
|
215
|
+
macOSIconAssetDetails?: AppIconAssetDetails;
|
|
214
216
|
linuxIcon?: string;
|
|
215
|
-
linuxIconAssetDetails?:
|
|
217
|
+
linuxIconAssetDetails?: AppIconAssetDetails;
|
|
216
218
|
/**
|
|
217
219
|
* The name of the company that the app belongs to
|
|
218
220
|
*/
|
package/package.json
CHANGED
package/src/desktopify2.ts
CHANGED
|
@@ -7,24 +7,33 @@ import {
|
|
|
7
7
|
import { BaseApp, Schemable } from "./base";
|
|
8
8
|
import { DesktopAppPlugin } from "./plugin";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
interface BaseAssetDetails {
|
|
11
11
|
/**
|
|
12
12
|
* Remote URL where the asset can be downloaded
|
|
13
13
|
*/
|
|
14
14
|
url: string;
|
|
15
|
-
/**
|
|
16
|
-
* Whether the asset is bundled into the final built app
|
|
17
|
-
*/
|
|
18
|
-
isBundled: boolean;
|
|
19
15
|
/**
|
|
20
16
|
* Local path where the asset is/should be stored. This path is relative to the app directory
|
|
21
17
|
*/
|
|
22
18
|
relativeLocalPath: string;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
type: "
|
|
27
|
-
}
|
|
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;
|
|
28
37
|
|
|
29
38
|
/**
|
|
30
39
|
* Custom ToDesktop Roles for Application & Tray Menus
|
|
@@ -59,7 +68,7 @@ export interface DesktopifyMenuItemConstructorOptions
|
|
|
59
68
|
actionType?: "jsEvent" | "role";
|
|
60
69
|
iconUrl?: string;
|
|
61
70
|
bundledIcon?: string;
|
|
62
|
-
iconAssetDetails?:
|
|
71
|
+
iconAssetDetails?: MenuIconAssetDetails;
|
|
63
72
|
useTemplateImage?: boolean;
|
|
64
73
|
}
|
|
65
74
|
|
|
@@ -100,13 +109,13 @@ export interface DesktopifyAppTray {
|
|
|
100
109
|
icon?: string;
|
|
101
110
|
useSeparateIcons?: boolean;
|
|
102
111
|
windowsIcon?: string;
|
|
103
|
-
windowsIconAssetDetails?:
|
|
112
|
+
windowsIconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
104
113
|
macOSIcon?: string;
|
|
105
|
-
macOSIconAssetDetails?:
|
|
114
|
+
macOSIconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
106
115
|
linuxIcon?: string;
|
|
107
|
-
linuxIconAssetDetails?:
|
|
116
|
+
linuxIconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
108
117
|
bundledIcon?: string;
|
|
109
|
-
iconAssetDetails?:
|
|
118
|
+
iconAssetDetails?: TrayMenubarIconAssetDetails;
|
|
110
119
|
useTemplateImage?: boolean;
|
|
111
120
|
rightClick: DesktopifyAppTrayAction;
|
|
112
121
|
leftClick: DesktopifyAppTrayAction;
|
|
@@ -316,19 +325,19 @@ export interface DesktopifyApp2 {
|
|
|
316
325
|
/**
|
|
317
326
|
* Details concerning how the app icon should be handled across ToDesktop services
|
|
318
327
|
*/
|
|
319
|
-
iconAssetDetails?:
|
|
328
|
+
iconAssetDetails?: AppIconAssetDetails;
|
|
320
329
|
/**
|
|
321
330
|
* Instead of using one icon for every platform, use a separate icon for different platforms
|
|
322
331
|
*/
|
|
323
332
|
useSeparateIcons?: boolean;
|
|
324
333
|
windowsIcon?: string;
|
|
325
|
-
windowsIconAssetDetails?:
|
|
334
|
+
windowsIconAssetDetails?: AppIconAssetDetails;
|
|
326
335
|
|
|
327
336
|
macOSIcon?: string;
|
|
328
|
-
macOSIconAssetDetails?:
|
|
337
|
+
macOSIconAssetDetails?: AppIconAssetDetails;
|
|
329
338
|
|
|
330
339
|
linuxIcon?: string;
|
|
331
|
-
linuxIconAssetDetails?:
|
|
340
|
+
linuxIconAssetDetails?: AppIconAssetDetails;
|
|
332
341
|
/**
|
|
333
342
|
* The name of the company that the app belongs to
|
|
334
343
|
*/
|