prozilla-os 1.3.10 → 1.3.12

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 CHANGED
@@ -73,10 +73,7 @@ export declare class App<AppProps extends WindowProps = WindowProps> {
73
73
  /**
74
74
  * Default options that get passed to the {@link this.windowContent} component
75
75
  */
76
- windowOptions?: {
77
- size: Vector2;
78
- [key: string]: unknown;
79
- };
76
+ windowOptions?: Partial<AppProps> & WindowOptions_2;
80
77
  /**
81
78
  * Description of this application
82
79
  */
@@ -119,7 +116,7 @@ export declare class App<AppProps extends WindowProps = WindowProps> {
119
116
  isActive: boolean;
120
117
  isPinned?: boolean;
121
118
  isInstalled: boolean;
122
- constructor(name: App["name"], id: App["id"], windowContent: App<AppProps>["windowContent"], windowOptions?: App["windowOptions"]);
119
+ constructor(name: App["name"], id: App["id"], windowContent: App<AppProps>["windowContent"], windowOptions?: Partial<AppProps> & WindowOptions_2);
123
120
  WindowContent: (props: AppProps) => JSX_2.Element | null;
124
121
  /**
125
122
  * Set the display name of this application
@@ -165,6 +162,10 @@ export declare class App<AppProps extends WindowProps = WindowProps> {
165
162
  * Changes whether this application has a desktop icon in the default data
166
163
  */
167
164
  setShowDesktopIcon(showDesktopIcon: boolean): this;
165
+ /**
166
+ * Changes the default options for the {@link this.windowContent} component
167
+ */
168
+ setWindowOptions(windowOptions: Partial<AppProps> & WindowOptions_2): this;
168
169
  }
169
170
 
170
171
  export 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"];
@@ -187,8 +188,8 @@ export declare class AppsConfig {
187
188
  mediaViewer: string;
188
189
  browser: string;
189
190
  };
190
- constructor(options?: OptionalInterface<AppsConfigOptions>);
191
- get installedApps(): App<any>[];
191
+ constructor(options?: Partial<AppsConfigOptions>);
192
+ get installedApps(): App<WindowProps>[];
192
193
  /**
193
194
  * @param includeUninstalled Include apps that are not currently installed
194
195
  */
@@ -211,9 +212,11 @@ declare interface AppsConfigOptions {
211
212
  /**
212
213
  * An array of applications
213
214
  */
214
- apps: App<any>[];
215
+ apps: App<WindowProps>[];
215
216
  }
216
217
 
218
+ export declare const AUDIO_EXTENSIONS: string[];
219
+
217
220
  export declare const browser: App<BrowserProps>;
218
221
 
219
222
  declare interface BrowserProps extends WindowProps {
@@ -256,7 +259,7 @@ export declare const Desktop: MemoExoticComponent<() => JSX_2.Element>;
256
259
  export declare class DesktopConfig {
257
260
  defaultIconSize: DesktopConfigOptions["defaultIconSize"];
258
261
  defaultIconDirection: DesktopConfigOptions["defaultIconDirection"];
259
- constructor(options?: OptionalInterface<DesktopConfigOptions>);
262
+ constructor(options?: Partial<DesktopConfigOptions>);
260
263
  }
261
264
 
262
265
  declare interface DesktopConfigOptions {
@@ -292,6 +295,8 @@ declare interface DirectoryListProps {
292
295
 
293
296
  export declare function Divider(): JSX_2.Element;
294
297
 
298
+ export declare function downloadUrl(url: string, name: string): void;
299
+
295
300
  export declare function DropdownAction({ label, icon, children, showOnHover }: DropdownActionProps): ReactElement;
296
301
 
297
302
  declare interface DropdownActionProps extends ActionProps {
@@ -399,6 +404,8 @@ declare interface InteractableProps {
399
404
 
400
405
  export declare function isValidUrl(string: string): boolean;
401
406
 
407
+ export declare const MEDIA_EXTENSIONS: string[];
408
+
402
409
  export declare const mediaViewer: App<MediaViewerProps>;
403
410
 
404
411
  declare interface MediaViewerProps extends WindowProps {
@@ -407,7 +414,7 @@ declare interface MediaViewerProps extends WindowProps {
407
414
 
408
415
  export declare class MiscConfig {
409
416
  doubleClickDelay: MiscConfigOptions["doubleClickDelay"];
410
- constructor(options?: OptionalInterface<MiscConfigOptions>);
417
+ constructor(options?: Partial<MiscConfigOptions>);
411
418
  }
412
419
 
413
420
  declare interface MiscConfigOptions {
@@ -467,7 +474,7 @@ export declare class ModalsConfig {
467
474
  static DIALOG_CONTENT_TYPES: {
468
475
  closeButton: number;
469
476
  };
470
- constructor(options?: OptionalInterface<ModalsConfigOptions>);
477
+ constructor(options?: Partial<ModalsConfigOptions>);
471
478
  }
472
479
 
473
480
  declare interface ModalsConfigOptions {
@@ -524,14 +531,6 @@ declare interface OpenWindowedModalParams {
524
531
  fullscreen?: WindowProps["fullscreen"];
525
532
  }
526
533
 
527
- export declare type OptionalInterface<Interface> = {
528
- [Property in keyof Interface]?: Interface[Property];
529
- };
530
-
531
- declare type OptionalInterface_2<Interface> = {
532
- [Property in keyof Interface]?: Interface[Property];
533
- };
534
-
535
534
  declare type OptionalStringProperty = string | null | undefined;
536
535
 
537
536
  export declare const OutsideClickListener: MemoExoticComponent<({ onOutsideClick, children }: OutsideClickListenerProps) => JSX_2.Element>;
@@ -557,14 +556,14 @@ declare interface ProzillaOSProps {
557
556
  systemName?: string;
558
557
  tagLine?: string;
559
558
  config?: {
560
- apps?: OptionalInterface<AppsConfigOptions>;
561
- desktop?: OptionalInterface<DesktopConfigOptions>;
562
- misc?: OptionalInterface<MiscConfigOptions>;
563
- modals?: OptionalInterface<ModalsConfigOptions>;
564
- taskbar?: OptionalInterface<TaskbarConfigOptions>;
565
- tracking?: OptionalInterface<TrackingConfigOptions>;
566
- windows?: OptionalInterface<WindowsConfigOptions>;
567
- virtualDrive?: OptionalInterface<VirtualDriveConfigOptions>;
559
+ apps?: Partial<AppsConfigOptions>;
560
+ desktop?: Partial<DesktopConfigOptions>;
561
+ misc?: Partial<MiscConfigOptions>;
562
+ modals?: Partial<ModalsConfigOptions>;
563
+ taskbar?: Partial<TaskbarConfigOptions>;
564
+ tracking?: Partial<TrackingConfigOptions>;
565
+ windows?: Partial<WindowsConfigOptions>;
566
+ virtualDrive?: Partial<VirtualDriveConfigOptions>;
568
567
  };
569
568
  skin?: Skin;
570
569
  children?: ReactNode;
@@ -663,7 +662,7 @@ declare class Skin {
663
662
  folderIcons: SkinOptions["folderIcons"];
664
663
  loadStyleSheet: SkinOptions["loadStyleSheet"];
665
664
  defaultTheme: SkinOptions["defaultTheme"];
666
- constructor(options?: OptionalInterface_2<SkinOptions>);
665
+ constructor(options?: Partial<SkinOptions>);
667
666
  }
668
667
 
669
668
  declare interface SkinOptions {
@@ -704,6 +703,8 @@ declare interface SkinOptions {
704
703
  text?: string;
705
704
  code?: string;
706
705
  external?: string;
706
+ video?: string;
707
+ audio?: string;
707
708
  };
708
709
  /**
709
710
  * URLs of icons for types of folders
@@ -713,6 +714,8 @@ declare interface SkinOptions {
713
714
  images?: string;
714
715
  text?: string;
715
716
  link?: string;
717
+ video?: string;
718
+ audio?: string;
716
719
  };
717
720
  /**
718
721
  * Function that dynamically imports style sheet
@@ -776,7 +779,7 @@ export declare const Taskbar: MemoExoticComponent<() => JSX_2.Element>;
776
779
 
777
780
  export declare class TaskbarConfig {
778
781
  height: TaskbarConfigOptions["height"];
779
- constructor(options?: OptionalInterface<TaskbarConfigOptions>);
782
+ constructor(options?: Partial<TaskbarConfigOptions>);
780
783
  }
781
784
 
782
785
  declare interface TaskbarConfigOptions {
@@ -838,7 +841,7 @@ declare interface ToggleActionProps extends ActionProps {
838
841
  export declare class TrackingConfig {
839
842
  enabled: TrackingConfigOptions["enabled"];
840
843
  googleAnalyticsMeasurementId: TrackingConfigOptions["GAMeasurementId"];
841
- constructor(options?: OptionalInterface<TrackingConfigOptions>);
844
+ constructor(options?: Partial<TrackingConfigOptions>);
842
845
  }
843
846
 
844
847
  declare interface TrackingConfigOptions {
@@ -1002,6 +1005,8 @@ export declare class Vector2 {
1002
1005
  static lerp(vector2A: Vector2, vector2B: Vector2, t: number): Vector2;
1003
1006
  }
1004
1007
 
1008
+ export declare const VIDEO_EXTENSIONS: string[];
1009
+
1005
1010
  declare class VirtualBase extends EventEmitter<EventNamesMap> {
1006
1011
  name: string;
1007
1012
  alias: string | undefined | null;
@@ -1057,7 +1062,7 @@ declare interface VirtualBaseJson {
1057
1062
  export declare class VirtualDriveConfig {
1058
1063
  saveData: VirtualDriveConfigOptions["saveData"];
1059
1064
  defaultData: VirtualDriveConfigOptions["defaultData"];
1060
- constructor(options?: OptionalInterface<VirtualDriveConfigOptions>);
1065
+ constructor(options?: Partial<VirtualDriveConfigOptions>);
1061
1066
  }
1062
1067
 
1063
1068
  declare interface VirtualDriveConfigOptions {
@@ -1134,6 +1139,8 @@ export declare class VirtualFile extends VirtualBase {
1134
1139
  isFile(): boolean;
1135
1140
  getIconUrl(): string;
1136
1141
  getType(): string;
1142
+ download(): void;
1143
+ isDownloadable(): boolean;
1137
1144
  toJSON(): VirtualFileJson | null;
1138
1145
  static removeFileScheme(source: string): string;
1139
1146
  }
@@ -1372,6 +1379,11 @@ declare interface WindowOptions {
1372
1379
  [key: string]: unknown;
1373
1380
  }
1374
1381
 
1382
+ declare interface WindowOptions_2 {
1383
+ size?: Vector2;
1384
+ [key: string]: unknown;
1385
+ }
1386
+
1375
1387
  export declare interface WindowProps extends WindowOptions {
1376
1388
  fullscreen?: boolean;
1377
1389
  onInteract?: () => void;
@@ -1390,7 +1402,7 @@ export declare class WindowsConfig {
1390
1402
  screenMargin: WindowsConfigOptions["screenMargin"];
1391
1403
  titleSeparator: WindowsConfigOptions["titleSeparator"];
1392
1404
  minScreenSize: WindowsConfigOptions["minScreenSize"];
1393
- constructor(options?: OptionalInterface<WindowsConfigOptions>);
1405
+ constructor(options?: Partial<WindowsConfigOptions>);
1394
1406
  }
1395
1407
 
1396
1408
  declare interface WindowsConfigOptions {