@todesktop/shared 7.127.0 → 7.128.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 +30 -0
- package/package.json +1 -1
- package/src/desktopify2.ts +34 -1
package/lib/desktopify2.d.ts
CHANGED
|
@@ -3,6 +3,24 @@ 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
|
+
export declare type AssetDetails = {
|
|
7
|
+
/**
|
|
8
|
+
* Remote URL where the asset can be downloaded
|
|
9
|
+
*/
|
|
10
|
+
url: string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the asset is bundled into the final built app
|
|
13
|
+
*/
|
|
14
|
+
isBundled: boolean;
|
|
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
|
+
* The type of asset being stored
|
|
21
|
+
*/
|
|
22
|
+
type: "templateImage" | "default";
|
|
23
|
+
};
|
|
6
24
|
/**
|
|
7
25
|
* Custom ToDesktop Roles for Application & Tray Menus
|
|
8
26
|
*/
|
|
@@ -17,6 +35,7 @@ export interface DesktopifyMenuItemConstructorOptions extends Omit<MenuItemConst
|
|
|
17
35
|
actionType?: "jsEvent" | "role";
|
|
18
36
|
iconUrl?: string;
|
|
19
37
|
bundledIcon?: string;
|
|
38
|
+
iconAssetDetails?: AssetDetails;
|
|
20
39
|
useTemplateImage?: boolean;
|
|
21
40
|
}
|
|
22
41
|
/**
|
|
@@ -49,9 +68,13 @@ export interface DesktopifyAppTray {
|
|
|
49
68
|
icon?: string;
|
|
50
69
|
useSeparateIcons?: boolean;
|
|
51
70
|
windowsIcon?: string;
|
|
71
|
+
windowsIconAssetDetails?: AssetDetails;
|
|
52
72
|
macOSIcon?: string;
|
|
73
|
+
macOSIconAssetDetails?: AssetDetails;
|
|
53
74
|
linuxIcon?: string;
|
|
75
|
+
linuxIconAssetDetails?: AssetDetails;
|
|
54
76
|
bundledIcon?: string;
|
|
77
|
+
iconAssetDetails?: AssetDetails;
|
|
55
78
|
useTemplateImage?: boolean;
|
|
56
79
|
rightClick: DesktopifyAppTrayAction;
|
|
57
80
|
leftClick: DesktopifyAppTrayAction;
|
|
@@ -176,13 +199,20 @@ export interface DesktopifyApp2 {
|
|
|
176
199
|
* The locally-bundled app icon.
|
|
177
200
|
*/
|
|
178
201
|
bundledIcon?: string;
|
|
202
|
+
/**
|
|
203
|
+
* Details concerning how the app icon should be handled across ToDesktop services
|
|
204
|
+
*/
|
|
205
|
+
iconAssetDetails?: AssetDetails;
|
|
179
206
|
/**
|
|
180
207
|
* Instead of using one icon for every platform, use a separate icon for different platforms
|
|
181
208
|
*/
|
|
182
209
|
useSeparateIcons?: boolean;
|
|
183
210
|
windowsIcon?: string;
|
|
211
|
+
windowsIconAssetDetails?: AssetDetails;
|
|
184
212
|
macOSIcon?: string;
|
|
213
|
+
macOSIconAssetDetails?: AssetDetails;
|
|
185
214
|
linuxIcon?: string;
|
|
215
|
+
linuxIconAssetDetails?: AssetDetails;
|
|
186
216
|
/**
|
|
187
217
|
* The name of the company that the app belongs to
|
|
188
218
|
*/
|
package/package.json
CHANGED
package/src/desktopify2.ts
CHANGED
|
@@ -7,6 +7,25 @@ import {
|
|
|
7
7
|
import { BaseApp, Schemable } from "./base";
|
|
8
8
|
import { DesktopAppPlugin } from "./plugin";
|
|
9
9
|
|
|
10
|
+
export type AssetDetails = {
|
|
11
|
+
/**
|
|
12
|
+
* Remote URL where the asset can be downloaded
|
|
13
|
+
*/
|
|
14
|
+
url: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the asset is bundled into the final built app
|
|
17
|
+
*/
|
|
18
|
+
isBundled: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Local path where the asset is/should be stored. This path is relative to the app directory
|
|
21
|
+
*/
|
|
22
|
+
relativeLocalPath: string;
|
|
23
|
+
/**
|
|
24
|
+
* The type of asset being stored
|
|
25
|
+
*/
|
|
26
|
+
type: "templateImage" | "default"
|
|
27
|
+
};
|
|
28
|
+
|
|
10
29
|
/**
|
|
11
30
|
* Custom ToDesktop Roles for Application & Tray Menus
|
|
12
31
|
*/
|
|
@@ -40,6 +59,7 @@ export interface DesktopifyMenuItemConstructorOptions
|
|
|
40
59
|
actionType?: "jsEvent" | "role";
|
|
41
60
|
iconUrl?: string;
|
|
42
61
|
bundledIcon?: string;
|
|
62
|
+
iconAssetDetails?: AssetDetails;
|
|
43
63
|
useTemplateImage?: boolean;
|
|
44
64
|
}
|
|
45
65
|
|
|
@@ -80,9 +100,13 @@ export interface DesktopifyAppTray {
|
|
|
80
100
|
icon?: string;
|
|
81
101
|
useSeparateIcons?: boolean;
|
|
82
102
|
windowsIcon?: string;
|
|
103
|
+
windowsIconAssetDetails?: AssetDetails;
|
|
83
104
|
macOSIcon?: string;
|
|
105
|
+
macOSIconAssetDetails?: AssetDetails;
|
|
84
106
|
linuxIcon?: string;
|
|
107
|
+
linuxIconAssetDetails?: AssetDetails;
|
|
85
108
|
bundledIcon?: string;
|
|
109
|
+
iconAssetDetails?: AssetDetails;
|
|
86
110
|
useTemplateImage?: boolean;
|
|
87
111
|
rightClick: DesktopifyAppTrayAction;
|
|
88
112
|
leftClick: DesktopifyAppTrayAction;
|
|
@@ -288,14 +312,23 @@ export interface DesktopifyApp2 {
|
|
|
288
312
|
/**
|
|
289
313
|
* The locally-bundled app icon.
|
|
290
314
|
*/
|
|
291
|
-
|
|
315
|
+
bundledIcon?: string;
|
|
316
|
+
/**
|
|
317
|
+
* Details concerning how the app icon should be handled across ToDesktop services
|
|
318
|
+
*/
|
|
319
|
+
iconAssetDetails?: AssetDetails;
|
|
292
320
|
/**
|
|
293
321
|
* Instead of using one icon for every platform, use a separate icon for different platforms
|
|
294
322
|
*/
|
|
295
323
|
useSeparateIcons?: boolean;
|
|
296
324
|
windowsIcon?: string;
|
|
325
|
+
windowsIconAssetDetails?: AssetDetails;
|
|
326
|
+
|
|
297
327
|
macOSIcon?: string;
|
|
328
|
+
macOSIconAssetDetails?: AssetDetails;
|
|
329
|
+
|
|
298
330
|
linuxIcon?: string;
|
|
331
|
+
linuxIconAssetDetails?: AssetDetails;
|
|
299
332
|
/**
|
|
300
333
|
* The name of the company that the app belongs to
|
|
301
334
|
*/
|