@prozilla-os/dev-tools 1.1.9 → 1.1.11
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/dist/main.d.ts +41 -17
- package/package.json +3 -3
package/dist/main.d.ts
CHANGED
|
@@ -22,9 +22,9 @@ declare class App<AppProps extends WindowProps = WindowProps> {
|
|
|
22
22
|
*/
|
|
23
23
|
windowContent: FC<AppProps>;
|
|
24
24
|
/**
|
|
25
|
-
* Default options that get passed to the {@link
|
|
25
|
+
* Default options that get passed to the {@link App.windowContent} component
|
|
26
26
|
*/
|
|
27
|
-
windowOptions?: Partial<AppProps> &
|
|
27
|
+
windowOptions?: Partial<AppProps> & DefaultWindowOptions;
|
|
28
28
|
/**
|
|
29
29
|
* Description of this application
|
|
30
30
|
*/
|
|
@@ -67,26 +67,29 @@ declare class App<AppProps extends WindowProps = WindowProps> {
|
|
|
67
67
|
isActive: boolean;
|
|
68
68
|
isPinned?: boolean;
|
|
69
69
|
isInstalled: boolean;
|
|
70
|
-
constructor(name: App["name"], id: App["id"], windowContent: App<AppProps>["windowContent"], windowOptions?: Partial<AppProps> &
|
|
70
|
+
constructor(name: App["name"], id: App["id"], windowContent: App<AppProps>["windowContent"], windowOptions?: Partial<AppProps> & DefaultWindowOptions);
|
|
71
|
+
/**
|
|
72
|
+
* Returns the component that renders the content of a window for this app
|
|
73
|
+
*/
|
|
71
74
|
WindowContent: (props: AppProps) => JSX_2.Element | null;
|
|
72
75
|
/**
|
|
73
|
-
*
|
|
76
|
+
* Sets the display name of this application
|
|
74
77
|
*/
|
|
75
78
|
setName(name: string): this;
|
|
76
79
|
/**
|
|
77
|
-
*
|
|
80
|
+
* Sets the description of this application
|
|
78
81
|
*/
|
|
79
82
|
setDescription(description: App["description"]): this;
|
|
80
83
|
/**
|
|
81
|
-
*
|
|
84
|
+
* Sets the URL of the icon of this application
|
|
82
85
|
*/
|
|
83
86
|
setIconUrl(iconUrl: App["iconUrl"]): this;
|
|
84
87
|
/**
|
|
85
|
-
*
|
|
88
|
+
* Sets the role of this application
|
|
86
89
|
*/
|
|
87
90
|
setRole(role: string | null): this;
|
|
88
91
|
/**
|
|
89
|
-
*
|
|
92
|
+
* Sets the associated extensions of this application
|
|
90
93
|
*/
|
|
91
94
|
setAssociatedExtensions(extensions: string[] | null): this;
|
|
92
95
|
/**
|
|
@@ -102,11 +105,11 @@ declare class App<AppProps extends WindowProps = WindowProps> {
|
|
|
102
105
|
*/
|
|
103
106
|
setInstalled(installed: boolean): this;
|
|
104
107
|
/**
|
|
105
|
-
*
|
|
108
|
+
* Sets the category this application belongs to
|
|
106
109
|
*/
|
|
107
110
|
setCategory(category: typeof APP_CATEGORIES[number] | null): this;
|
|
108
111
|
/**
|
|
109
|
-
*
|
|
112
|
+
* Sets the metadata for this application
|
|
110
113
|
*/
|
|
111
114
|
setMetadata(metadata: AppMetadata | null): this;
|
|
112
115
|
/**
|
|
@@ -114,9 +117,9 @@ declare class App<AppProps extends WindowProps = WindowProps> {
|
|
|
114
117
|
*/
|
|
115
118
|
setShowDesktopIcon(showDesktopIcon: boolean): this;
|
|
116
119
|
/**
|
|
117
|
-
*
|
|
120
|
+
* Sets the default options for the {@link App.windowContent} component
|
|
118
121
|
*/
|
|
119
|
-
setWindowOptions(windowOptions: Partial<AppProps> &
|
|
122
|
+
setWindowOptions(windowOptions: Partial<AppProps> & DefaultWindowOptions): this;
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
declare const APP_CATEGORIES: readonly ["Business", "Developer tools", "Education", "Entertainment", "Food & dining", "Health & fitness", "Kids & family", "Lifestyle", "Media", "Medical", "Multimedia design", "Music", "Navigation & maps", "News & weather", "Personal finance", "Personalization", "Photo & video", "Productivity", "Security", "Shopping", "Social", "Sports", "Travel", "Utilities & tools"];
|
|
@@ -179,6 +182,11 @@ declare interface AppsConfigOptions {
|
|
|
179
182
|
*/
|
|
180
183
|
export declare const appViteConfig: (basePath: string, entryPath: string) => UserConfig;
|
|
181
184
|
|
|
185
|
+
declare interface DefaultWindowOptions {
|
|
186
|
+
size?: Vector2;
|
|
187
|
+
[key: string]: unknown;
|
|
188
|
+
}
|
|
189
|
+
|
|
182
190
|
declare function print_2(message: string, status?: Status, newLine?: boolean): void;
|
|
183
191
|
export { print_2 as print }
|
|
184
192
|
|
|
@@ -234,9 +242,16 @@ declare class Vector2 {
|
|
|
234
242
|
}
|
|
235
243
|
|
|
236
244
|
declare interface WindowOptions {
|
|
245
|
+
/** The ID of the window */
|
|
237
246
|
id?: string;
|
|
247
|
+
/** The app associated with the window */
|
|
238
248
|
app?: App;
|
|
249
|
+
/**
|
|
250
|
+
* The size of the window
|
|
251
|
+
* @default new Vector2(700, 400)
|
|
252
|
+
*/
|
|
239
253
|
size?: Vector2;
|
|
254
|
+
/** The position of the window */
|
|
240
255
|
position?: Vector2;
|
|
241
256
|
fullscreen?: boolean | string;
|
|
242
257
|
options?: object;
|
|
@@ -246,22 +261,31 @@ declare interface WindowOptions {
|
|
|
246
261
|
[key: string]: unknown;
|
|
247
262
|
}
|
|
248
263
|
|
|
249
|
-
declare interface WindowOptions_2 {
|
|
250
|
-
size?: Vector2;
|
|
251
|
-
[key: string]: unknown;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
264
|
declare interface WindowProps extends WindowOptions {
|
|
265
|
+
/**
|
|
266
|
+
* Whether to start the window in fullscreen mode
|
|
267
|
+
* @default false
|
|
268
|
+
*/
|
|
255
269
|
fullscreen?: boolean;
|
|
270
|
+
/** Function that handles interactions with the window */
|
|
256
271
|
onInteract?: () => void;
|
|
272
|
+
/** Function that sets the title of the window */
|
|
257
273
|
setTitle?: React.Dispatch<React.SetStateAction<string>>;
|
|
274
|
+
/** Function that sets the icon URL of the window */
|
|
258
275
|
setIconUrl?: React.Dispatch<React.SetStateAction<string>>;
|
|
276
|
+
/** Function that closes the window */
|
|
259
277
|
close?: (event?: Event) => void;
|
|
278
|
+
/** Function that brings the window in focus */
|
|
260
279
|
focus?: (event: Event, force?: boolean) => void;
|
|
280
|
+
/** Whether the window is currently focused and should allow interactions */
|
|
261
281
|
active?: boolean;
|
|
282
|
+
/** Whether to start the window in minimized mode */
|
|
262
283
|
minimized?: boolean;
|
|
284
|
+
/** Function that toggles the minimized mode of the window */
|
|
263
285
|
toggleMinimized?: (event?: Event) => void;
|
|
286
|
+
/** The depth value of the window */
|
|
264
287
|
index?: number;
|
|
288
|
+
/** Whether the window is in standalone mode */
|
|
265
289
|
standalone?: boolean;
|
|
266
290
|
}
|
|
267
291
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prozilla-os/dev-tools",
|
|
3
3
|
"description": "A library of tools for the development of ProzillaOS packages.",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.11",
|
|
5
5
|
"homepage": "https://os.prozilla.dev",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "Prozilla",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"vite": "^5.4.8",
|
|
24
24
|
"vite-plugin-css-injected-by-js": "^3.5.1",
|
|
25
25
|
"vite-plugin-dts": "^3.9.1",
|
|
26
|
-
"@prozilla-os/core": "1.3.
|
|
27
|
-
"@prozilla-os/shared": "1.2.
|
|
26
|
+
"@prozilla-os/core": "1.3.14",
|
|
27
|
+
"@prozilla-os/shared": "1.2.1"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "^20.14.5",
|