@todesktop/shared 7.126.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.
@@ -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;
@@ -169,16 +192,27 @@ export interface DesktopifyApp2 {
169
192
  */
170
193
  name: string;
171
194
  /**
172
- * The app icon
195
+ * The app icon url
173
196
  */
174
197
  icon?: string;
198
+ /**
199
+ * The locally-bundled app icon.
200
+ */
201
+ bundledIcon?: string;
202
+ /**
203
+ * Details concerning how the app icon should be handled across ToDesktop services
204
+ */
205
+ iconAssetDetails?: AssetDetails;
175
206
  /**
176
207
  * Instead of using one icon for every platform, use a separate icon for different platforms
177
208
  */
178
209
  useSeparateIcons?: boolean;
179
210
  windowsIcon?: string;
211
+ windowsIconAssetDetails?: AssetDetails;
180
212
  macOSIcon?: string;
213
+ macOSIconAssetDetails?: AssetDetails;
181
214
  linuxIcon?: string;
215
+ linuxIconAssetDetails?: AssetDetails;
182
216
  /**
183
217
  * The name of the company that the app belongs to
184
218
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todesktop/shared",
3
- "version": "7.126.0",
3
+ "version": "7.128.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -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;
@@ -282,16 +306,29 @@ export interface DesktopifyApp2 {
282
306
  */
283
307
  name: string;
284
308
  /**
285
- * The app icon
309
+ * The app icon url
286
310
  */
287
311
  icon?: string;
312
+ /**
313
+ * The locally-bundled app icon.
314
+ */
315
+ bundledIcon?: string;
316
+ /**
317
+ * Details concerning how the app icon should be handled across ToDesktop services
318
+ */
319
+ iconAssetDetails?: AssetDetails;
288
320
  /**
289
321
  * Instead of using one icon for every platform, use a separate icon for different platforms
290
322
  */
291
323
  useSeparateIcons?: boolean;
292
324
  windowsIcon?: string;
325
+ windowsIconAssetDetails?: AssetDetails;
326
+
293
327
  macOSIcon?: string;
328
+ macOSIconAssetDetails?: AssetDetails;
329
+
294
330
  linuxIcon?: string;
331
+ linuxIconAssetDetails?: AssetDetails;
295
332
  /**
296
333
  * The name of the company that the app belongs to
297
334
  */