@todesktop/shared 7.58.0 → 7.62.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/base.d.ts +12 -0
- package/lib/base.js +2 -0
- package/lib/desktopify2.d.ts +6 -11
- package/lib/desktopify2.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/toDesktop.d.ts +3 -12
- package/package.json +1 -1
- package/src/base.ts +13 -0
- package/src/desktopify2.ts +7 -12
- package/src/index.ts +1 -0
- package/src/toDesktop.ts +3 -13
package/lib/base.d.ts
ADDED
package/lib/base.js
ADDED
package/lib/desktopify2.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import {
|
|
2
|
+
import { ISwitchableValue } from "./toDesktop";
|
|
3
3
|
import { MenuItemConstructorOptions, BrowserWindowConstructorOptions, WebPreferences } from "@todesktop/client-electron-types";
|
|
4
|
+
import { BaseApp, Schemable } from "./base";
|
|
4
5
|
/**
|
|
5
6
|
* Custom ToDesktop Roles for Application & Tray Menus
|
|
6
7
|
*/
|
|
@@ -41,7 +42,7 @@ export interface DesktopifyAppTray {
|
|
|
41
42
|
rightClick: DesktopifyAppTrayAction;
|
|
42
43
|
leftClick: DesktopifyAppTrayAction;
|
|
43
44
|
}
|
|
44
|
-
export declare type DesktopifyAppMenu = DesktopifyMenuItemConstructorOptions
|
|
45
|
+
export declare type DesktopifyAppMenu = DesktopifyMenuItemConstructorOptions;
|
|
45
46
|
/**
|
|
46
47
|
* Whitelist of allowed DesktopifyWindow Options.
|
|
47
48
|
* These attrs (if set) are passed to the `BrowserWindow` constructor
|
|
@@ -135,15 +136,11 @@ export interface DesktopifyAppWindow {
|
|
|
135
136
|
webPreferences?: Pick<WebPreferences, whitelistedWebPreferencesOptions>;
|
|
136
137
|
};
|
|
137
138
|
}
|
|
138
|
-
export interface DesktopifyApp2 {
|
|
139
|
+
export interface DesktopifyApp2 extends Schemable {
|
|
139
140
|
/**
|
|
140
141
|
* The name of the app
|
|
141
142
|
*/
|
|
142
143
|
name: string;
|
|
143
|
-
/**
|
|
144
|
-
* A unique app id
|
|
145
|
-
*/
|
|
146
|
-
id: string;
|
|
147
144
|
/**
|
|
148
145
|
* The app icon
|
|
149
146
|
*/
|
|
@@ -250,9 +247,7 @@ export interface DesktopifyApp2 {
|
|
|
250
247
|
*/
|
|
251
248
|
menus: DesktopifyAppMenu[];
|
|
252
249
|
}
|
|
253
|
-
export interface IApp2 extends
|
|
254
|
-
|
|
255
|
-
trays: DesktopifyAppTray[];
|
|
256
|
-
menus: DesktopifyAppMenu[];
|
|
250
|
+
export interface IApp2 extends BaseApp {
|
|
251
|
+
desktopApp?: DesktopifyApp2;
|
|
257
252
|
}
|
|
258
253
|
export {};
|
package/lib/desktopify2.js
CHANGED
package/lib/index.d.ts
CHANGED
package/lib/toDesktop.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BaseApp, Schemable } from "./base";
|
|
1
2
|
import { ExtraFileReference, FilePath, IAppBuilderLib, URL } from "./desktopify";
|
|
2
3
|
export declare type IUploadFileStatus = "error" | "success" | "done" | "uploading" | "removed";
|
|
3
4
|
export interface IUploadFile {
|
|
@@ -191,12 +192,6 @@ export interface IAppPublishedVersions {
|
|
|
191
192
|
desktopify?: string;
|
|
192
193
|
version?: string;
|
|
193
194
|
}
|
|
194
|
-
interface IStripeSubscription {
|
|
195
|
-
status: string;
|
|
196
|
-
subscriptionId: string;
|
|
197
|
-
itemId: string;
|
|
198
|
-
planId: string;
|
|
199
|
-
}
|
|
200
195
|
export interface ISwitchableValue<T> {
|
|
201
196
|
enabled: boolean;
|
|
202
197
|
value: T;
|
|
@@ -233,7 +228,7 @@ export interface CustomWindowsCodeSignEV {
|
|
|
233
228
|
hsmCertType: WindowsHSMCertType.ev;
|
|
234
229
|
hsmCertName: string;
|
|
235
230
|
}
|
|
236
|
-
export interface IApp {
|
|
231
|
+
export interface IApp extends BaseApp {
|
|
237
232
|
appModelId: string;
|
|
238
233
|
appPkgName?: string;
|
|
239
234
|
appProtocol?: ISwitchableValue<string>;
|
|
@@ -254,7 +249,6 @@ export interface IApp {
|
|
|
254
249
|
};
|
|
255
250
|
icon?: string;
|
|
256
251
|
icons?: IIcon[];
|
|
257
|
-
id: string;
|
|
258
252
|
internalUrls?: ISwitchableValue<string>;
|
|
259
253
|
isContextMenuDisabled: boolean;
|
|
260
254
|
isDevToolsDisabled: boolean;
|
|
@@ -293,7 +287,6 @@ export interface IApp {
|
|
|
293
287
|
snapStore?: {
|
|
294
288
|
login?: string;
|
|
295
289
|
};
|
|
296
|
-
subscription?: IStripeSubscription;
|
|
297
290
|
themeSource?: "system" | "light" | "dark";
|
|
298
291
|
themeSourceMac?: "system" | "light" | "dark";
|
|
299
292
|
toggleVisibilityKeyboardShortcut?: ISwitchableValue<string>;
|
|
@@ -302,9 +295,8 @@ export interface IApp {
|
|
|
302
295
|
windowOptions: IWindowOptions;
|
|
303
296
|
pollForAppUpdatesEveryXMinutes?: number;
|
|
304
297
|
}
|
|
305
|
-
export interface IUser {
|
|
298
|
+
export interface IUser extends Schemable {
|
|
306
299
|
id: string;
|
|
307
|
-
schemaVersion?: number;
|
|
308
300
|
authInfo?: {};
|
|
309
301
|
avatar?: string;
|
|
310
302
|
currentApplication?: string;
|
|
@@ -322,4 +314,3 @@ export interface CiInput {
|
|
|
322
314
|
buildId?: string;
|
|
323
315
|
userId: string;
|
|
324
316
|
}
|
|
325
|
-
export {};
|
package/package.json
CHANGED
package/src/base.ts
ADDED
package/src/desktopify2.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ISwitchableValue } from "./toDesktop";
|
|
2
2
|
import {
|
|
3
3
|
MenuItemConstructorOptions,
|
|
4
4
|
BrowserWindowConstructorOptions,
|
|
5
5
|
WebPreferences,
|
|
6
6
|
} from "@todesktop/client-electron-types";
|
|
7
|
+
import { BaseApp, Schemable } from "./base";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Custom ToDesktop Roles for Application & Tray Menus
|
|
@@ -67,7 +68,7 @@ export interface DesktopifyAppTray {
|
|
|
67
68
|
leftClick: DesktopifyAppTrayAction;
|
|
68
69
|
}
|
|
69
70
|
|
|
70
|
-
export type DesktopifyAppMenu = DesktopifyMenuItemConstructorOptions
|
|
71
|
+
export type DesktopifyAppMenu = DesktopifyMenuItemConstructorOptions;
|
|
71
72
|
|
|
72
73
|
/**
|
|
73
74
|
* Whitelist of allowed DesktopifyWindow Options.
|
|
@@ -114,7 +115,7 @@ export const allowedBrowserWindowConstructorOptions: Readonly<
|
|
|
114
115
|
"visualEffectState",
|
|
115
116
|
"titleBarStyle",
|
|
116
117
|
"trafficLightPosition",
|
|
117
|
-
"roundedCorners",
|
|
118
|
+
// "roundedCorners",
|
|
118
119
|
"fullscreenWindowTitle",
|
|
119
120
|
"thickFrame",
|
|
120
121
|
"type",
|
|
@@ -242,15 +243,11 @@ export interface DesktopifyAppWindow {
|
|
|
242
243
|
}
|
|
243
244
|
// TODO: Look into hasMinHeight, etc
|
|
244
245
|
|
|
245
|
-
export interface DesktopifyApp2 {
|
|
246
|
+
export interface DesktopifyApp2 extends Schemable {
|
|
246
247
|
/**
|
|
247
248
|
* The name of the app
|
|
248
249
|
*/
|
|
249
250
|
name: string;
|
|
250
|
-
/**
|
|
251
|
-
* A unique app id
|
|
252
|
-
*/
|
|
253
|
-
id: string;
|
|
254
251
|
/**
|
|
255
252
|
* The app icon
|
|
256
253
|
*/
|
|
@@ -358,8 +355,6 @@ export interface DesktopifyApp2 {
|
|
|
358
355
|
menus: DesktopifyAppMenu[];
|
|
359
356
|
}
|
|
360
357
|
|
|
361
|
-
export interface IApp2 extends
|
|
362
|
-
|
|
363
|
-
trays: DesktopifyAppTray[];
|
|
364
|
-
menus: DesktopifyAppMenu[];
|
|
358
|
+
export interface IApp2 extends BaseApp {
|
|
359
|
+
desktopApp?: DesktopifyApp2;
|
|
365
360
|
}
|
package/src/index.ts
CHANGED
package/src/toDesktop.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BaseApp, Schemable } from "./base";
|
|
1
2
|
import {
|
|
2
3
|
ExtraFileReference,
|
|
3
4
|
FilePath,
|
|
@@ -216,13 +217,6 @@ export interface IAppPublishedVersions {
|
|
|
216
217
|
version?: string;
|
|
217
218
|
}
|
|
218
219
|
|
|
219
|
-
interface IStripeSubscription {
|
|
220
|
-
status: string;
|
|
221
|
-
subscriptionId: string;
|
|
222
|
-
itemId: string;
|
|
223
|
-
planId: string;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
220
|
export interface ISwitchableValue<T> {
|
|
227
221
|
enabled: boolean;
|
|
228
222
|
value: T;
|
|
@@ -267,7 +261,7 @@ export interface CustomWindowsCodeSignEV {
|
|
|
267
261
|
hsmCertName: string;
|
|
268
262
|
}
|
|
269
263
|
|
|
270
|
-
export interface IApp {
|
|
264
|
+
export interface IApp extends BaseApp {
|
|
271
265
|
appModelId: string;
|
|
272
266
|
appPkgName?: string;
|
|
273
267
|
appProtocol?: ISwitchableValue<string>;
|
|
@@ -286,7 +280,6 @@ export interface IApp {
|
|
|
286
280
|
environmentVariables?: { [propertyName: string]: string };
|
|
287
281
|
icon?: string;
|
|
288
282
|
icons?: IIcon[];
|
|
289
|
-
id: string;
|
|
290
283
|
internalUrls?: ISwitchableValue<string>;
|
|
291
284
|
isContextMenuDisabled: boolean;
|
|
292
285
|
isDevToolsDisabled: boolean;
|
|
@@ -301,7 +294,6 @@ export interface IApp {
|
|
|
301
294
|
shouldUseRealUserAgent?: boolean;
|
|
302
295
|
extraBrowserWindowOptions?: string;
|
|
303
296
|
enablePushNotifications?: boolean;
|
|
304
|
-
|
|
305
297
|
isTransitioningFromSquirrelWindows?: boolean;
|
|
306
298
|
jsToInject?: string;
|
|
307
299
|
menubarIcon?: string;
|
|
@@ -324,7 +316,6 @@ export interface IApp {
|
|
|
324
316
|
shouldOnlySendAbsolutelyNecessaryRequests?: boolean;
|
|
325
317
|
shouldReuseRendererProcess?: boolean;
|
|
326
318
|
snapStore?: { login?: string };
|
|
327
|
-
subscription?: IStripeSubscription;
|
|
328
319
|
themeSource?: "system" | "light" | "dark";
|
|
329
320
|
themeSourceMac?: "system" | "light" | "dark";
|
|
330
321
|
toggleVisibilityKeyboardShortcut?: ISwitchableValue<string>;
|
|
@@ -334,9 +325,8 @@ export interface IApp {
|
|
|
334
325
|
pollForAppUpdatesEveryXMinutes?: number;
|
|
335
326
|
}
|
|
336
327
|
|
|
337
|
-
export interface IUser {
|
|
328
|
+
export interface IUser extends Schemable {
|
|
338
329
|
id: string;
|
|
339
|
-
schemaVersion?: number;
|
|
340
330
|
authInfo?: {};
|
|
341
331
|
avatar?: string;
|
|
342
332
|
currentApplication?: string;
|