@prozilla-os/dev-tools 1.1.6 → 1.1.8

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.
Files changed (2) hide show
  1. package/dist/main.d.ts +14 -12
  2. package/package.json +2 -2
package/dist/main.d.ts CHANGED
@@ -24,10 +24,7 @@ declare class App<AppProps extends WindowProps = WindowProps> {
24
24
  /**
25
25
  * Default options that get passed to the {@link this.windowContent} component
26
26
  */
27
- windowOptions?: {
28
- size: Vector2;
29
- [key: string]: unknown;
30
- };
27
+ windowOptions?: Partial<AppProps> & WindowOptions_2;
31
28
  /**
32
29
  * Description of this application
33
30
  */
@@ -70,7 +67,7 @@ declare class App<AppProps extends WindowProps = WindowProps> {
70
67
  isActive: boolean;
71
68
  isPinned?: boolean;
72
69
  isInstalled: boolean;
73
- constructor(name: App["name"], id: App["id"], windowContent: App<AppProps>["windowContent"], windowOptions?: App["windowOptions"]);
70
+ constructor(name: App["name"], id: App["id"], windowContent: App<AppProps>["windowContent"], windowOptions?: Partial<AppProps> & WindowOptions_2);
74
71
  WindowContent: (props: AppProps) => JSX_2.Element | null;
75
72
  /**
76
73
  * Set the display name of this application
@@ -116,6 +113,10 @@ declare class App<AppProps extends WindowProps = WindowProps> {
116
113
  * Changes whether this application has a desktop icon in the default data
117
114
  */
118
115
  setShowDesktopIcon(showDesktopIcon: boolean): this;
116
+ /**
117
+ * Changes the default options for the {@link this.windowContent} component
118
+ */
119
+ setWindowOptions(windowOptions: Partial<AppProps> & WindowOptions_2): this;
119
120
  }
120
121
 
121
122
  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"];
@@ -142,8 +143,8 @@ declare class AppsConfig {
142
143
  mediaViewer: string;
143
144
  browser: string;
144
145
  };
145
- constructor(options?: OptionalInterface<AppsConfigOptions>);
146
- get installedApps(): App<any>[];
146
+ constructor(options?: Partial<AppsConfigOptions>);
147
+ get installedApps(): App<WindowProps>[];
147
148
  /**
148
149
  * @param includeUninstalled Include apps that are not currently installed
149
150
  */
@@ -166,7 +167,7 @@ declare interface AppsConfigOptions {
166
167
  /**
167
168
  * An array of applications
168
169
  */
169
- apps: App<any>[];
170
+ apps: App<WindowProps>[];
170
171
  }
171
172
 
172
173
  /**
@@ -178,10 +179,6 @@ declare interface AppsConfigOptions {
178
179
  */
179
180
  export declare const appViteConfig: (basePath: string, entryPath: string) => UserConfig;
180
181
 
181
- declare type OptionalInterface<Interface> = {
182
- [Property in keyof Interface]?: Interface[Property];
183
- };
184
-
185
182
  declare function print_2(message: string, status?: Status, newLine?: boolean): void;
186
183
  export { print_2 as print }
187
184
 
@@ -249,6 +246,11 @@ declare interface WindowOptions {
249
246
  [key: string]: unknown;
250
247
  }
251
248
 
249
+ declare interface WindowOptions_2 {
250
+ size?: Vector2;
251
+ [key: string]: unknown;
252
+ }
253
+
252
254
  declare interface WindowProps extends WindowOptions {
253
255
  fullscreen?: boolean;
254
256
  onInteract?: () => void;
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.6",
4
+ "version": "1.1.8",
5
5
  "homepage": "https://os.prozilla.dev",
6
6
  "author": {
7
7
  "name": "Prozilla",
@@ -23,7 +23,7 @@
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.9",
26
+ "@prozilla-os/core": "1.3.11",
27
27
  "@prozilla-os/shared": "1.2.0"
28
28
  },
29
29
  "devDependencies": {