@prozilla-os/dev-tools 1.1.8 → 1.1.10
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/LICENSE +20 -20
- package/README.md +40 -40
- package/dist/main.d.ts +41 -17
- package/package.json +3 -3
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2023 Sieben De Beule
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Sieben De Beule
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
<br />
|
|
3
|
-
<p>
|
|
4
|
-
<a href="https://os.prozilla.dev/"><img src="https://os.prozilla.dev/assets/logo.svg?v=2" height="200" alt="ProzillaOS" /></a>
|
|
5
|
-
</p>
|
|
6
|
-
<p>
|
|
7
|
-
<a href="https://github.com/prozilla-os/ProzillaOS/blob/main/LICENSE.md"><img alt="License" src="https://img.shields.io/github/license/Prozilla/ProzillaOS?style=flat-square&color=FF4D5B&label=License"></a>
|
|
8
|
-
<a href="https://github.com/prozilla-os/ProzillaOS"><img alt="Stars" src="https://img.shields.io/github/stars/Prozilla/ProzillaOS?style=flat-square&color=FED24C&label=%E2%AD%90"></a>
|
|
9
|
-
<a href="https://github.com/prozilla-os/ProzillaOS"><img alt="Forks" src="https://img.shields.io/github/forks/Prozilla/ProzillaOS?style=flat-square&color=4D9CFF&label=Forks&logo=github"></a>
|
|
10
|
-
<a href="https://www.npmjs.com/package/prozilla-os"><img alt="NPM Version" src="https://img.shields.io/npm/v/prozilla-os?logo=npm&style=flat-square&label=prozilla-os&color=FF4D5B"></a>
|
|
11
|
-
</p>
|
|
12
|
-
</div>
|
|
13
|
-
|
|
14
|
-
## About
|
|
15
|
-
|
|
16
|
-
`@prozilla-os/dev-tools` is a library of tools for the development of ProzillaOS packages.
|
|
17
|
-
|
|
18
|
-
## Installation
|
|
19
|
-
|
|
20
|
-
```sh
|
|
21
|
-
npm install @prozilla-os/dev-tools
|
|
22
|
-
yarn add @prozilla-os/dev-tools
|
|
23
|
-
pnpm add @prozilla-os/dev-tools
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Links
|
|
27
|
-
|
|
28
|
-
- [Demo][demo]
|
|
29
|
-
- [Docs][docs]
|
|
30
|
-
- [GitHub][github]
|
|
31
|
-
- [npm][npm]
|
|
32
|
-
- [Discord][discord]
|
|
33
|
-
- [Ko-fi][ko-fi]
|
|
34
|
-
|
|
35
|
-
[demo]: https://os.prozilla.dev/
|
|
36
|
-
[docs]: https://os.prozilla.dev/docs/reference/dev-tools
|
|
37
|
-
[github]: https://github.com/prozilla-os/ProzillaOS/tree/main/packages/dev-tools
|
|
38
|
-
[npm]: https://www.npmjs.com/package/@prozilla-os/dev-tools
|
|
39
|
-
[discord]: https://discord.gg/JwbyQP4tdz
|
|
40
|
-
[ko-fi]: https://ko-fi.com/prozilla
|
|
1
|
+
<div align="center">
|
|
2
|
+
<br />
|
|
3
|
+
<p>
|
|
4
|
+
<a href="https://os.prozilla.dev/"><img src="https://os.prozilla.dev/assets/logo.svg?v=2" height="200" alt="ProzillaOS" /></a>
|
|
5
|
+
</p>
|
|
6
|
+
<p>
|
|
7
|
+
<a href="https://github.com/prozilla-os/ProzillaOS/blob/main/LICENSE.md"><img alt="License" src="https://img.shields.io/github/license/Prozilla/ProzillaOS?style=flat-square&color=FF4D5B&label=License"></a>
|
|
8
|
+
<a href="https://github.com/prozilla-os/ProzillaOS"><img alt="Stars" src="https://img.shields.io/github/stars/Prozilla/ProzillaOS?style=flat-square&color=FED24C&label=%E2%AD%90"></a>
|
|
9
|
+
<a href="https://github.com/prozilla-os/ProzillaOS"><img alt="Forks" src="https://img.shields.io/github/forks/Prozilla/ProzillaOS?style=flat-square&color=4D9CFF&label=Forks&logo=github"></a>
|
|
10
|
+
<a href="https://www.npmjs.com/package/prozilla-os"><img alt="NPM Version" src="https://img.shields.io/npm/v/prozilla-os?logo=npm&style=flat-square&label=prozilla-os&color=FF4D5B"></a>
|
|
11
|
+
</p>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
## About
|
|
15
|
+
|
|
16
|
+
`@prozilla-os/dev-tools` is a library of tools for the development of ProzillaOS packages.
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
npm install @prozilla-os/dev-tools
|
|
22
|
+
yarn add @prozilla-os/dev-tools
|
|
23
|
+
pnpm add @prozilla-os/dev-tools
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Links
|
|
27
|
+
|
|
28
|
+
- [Demo][demo]
|
|
29
|
+
- [Docs][docs]
|
|
30
|
+
- [GitHub][github]
|
|
31
|
+
- [npm][npm]
|
|
32
|
+
- [Discord][discord]
|
|
33
|
+
- [Ko-fi][ko-fi]
|
|
34
|
+
|
|
35
|
+
[demo]: https://os.prozilla.dev/
|
|
36
|
+
[docs]: https://os.prozilla.dev/docs/reference/dev-tools
|
|
37
|
+
[github]: https://github.com/prozilla-os/ProzillaOS/tree/main/packages/dev-tools
|
|
38
|
+
[npm]: https://www.npmjs.com/package/@prozilla-os/dev-tools
|
|
39
|
+
[discord]: https://discord.gg/JwbyQP4tdz
|
|
40
|
+
[ko-fi]: https://ko-fi.com/prozilla
|
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.10",
|
|
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/
|
|
27
|
-
"@prozilla-os/
|
|
26
|
+
"@prozilla-os/shared": "1.2.0",
|
|
27
|
+
"@prozilla-os/core": "1.3.13"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/node": "^20.14.5",
|