prozilla-os 1.3.10 → 1.3.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 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,7 +212,7 @@ 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
 
217
218
  export declare const browser: App<BrowserProps>;
@@ -256,7 +257,7 @@ export declare const Desktop: MemoExoticComponent<() => JSX_2.Element>;
256
257
  export declare class DesktopConfig {
257
258
  defaultIconSize: DesktopConfigOptions["defaultIconSize"];
258
259
  defaultIconDirection: DesktopConfigOptions["defaultIconDirection"];
259
- constructor(options?: OptionalInterface<DesktopConfigOptions>);
260
+ constructor(options?: Partial<DesktopConfigOptions>);
260
261
  }
261
262
 
262
263
  declare interface DesktopConfigOptions {
@@ -407,7 +408,7 @@ declare interface MediaViewerProps extends WindowProps {
407
408
 
408
409
  export declare class MiscConfig {
409
410
  doubleClickDelay: MiscConfigOptions["doubleClickDelay"];
410
- constructor(options?: OptionalInterface<MiscConfigOptions>);
411
+ constructor(options?: Partial<MiscConfigOptions>);
411
412
  }
412
413
 
413
414
  declare interface MiscConfigOptions {
@@ -467,7 +468,7 @@ export declare class ModalsConfig {
467
468
  static DIALOG_CONTENT_TYPES: {
468
469
  closeButton: number;
469
470
  };
470
- constructor(options?: OptionalInterface<ModalsConfigOptions>);
471
+ constructor(options?: Partial<ModalsConfigOptions>);
471
472
  }
472
473
 
473
474
  declare interface ModalsConfigOptions {
@@ -524,14 +525,6 @@ declare interface OpenWindowedModalParams {
524
525
  fullscreen?: WindowProps["fullscreen"];
525
526
  }
526
527
 
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
528
  declare type OptionalStringProperty = string | null | undefined;
536
529
 
537
530
  export declare const OutsideClickListener: MemoExoticComponent<({ onOutsideClick, children }: OutsideClickListenerProps) => JSX_2.Element>;
@@ -557,14 +550,14 @@ declare interface ProzillaOSProps {
557
550
  systemName?: string;
558
551
  tagLine?: string;
559
552
  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>;
553
+ apps?: Partial<AppsConfigOptions>;
554
+ desktop?: Partial<DesktopConfigOptions>;
555
+ misc?: Partial<MiscConfigOptions>;
556
+ modals?: Partial<ModalsConfigOptions>;
557
+ taskbar?: Partial<TaskbarConfigOptions>;
558
+ tracking?: Partial<TrackingConfigOptions>;
559
+ windows?: Partial<WindowsConfigOptions>;
560
+ virtualDrive?: Partial<VirtualDriveConfigOptions>;
568
561
  };
569
562
  skin?: Skin;
570
563
  children?: ReactNode;
@@ -663,7 +656,7 @@ declare class Skin {
663
656
  folderIcons: SkinOptions["folderIcons"];
664
657
  loadStyleSheet: SkinOptions["loadStyleSheet"];
665
658
  defaultTheme: SkinOptions["defaultTheme"];
666
- constructor(options?: OptionalInterface_2<SkinOptions>);
659
+ constructor(options?: Partial<SkinOptions>);
667
660
  }
668
661
 
669
662
  declare interface SkinOptions {
@@ -776,7 +769,7 @@ export declare const Taskbar: MemoExoticComponent<() => JSX_2.Element>;
776
769
 
777
770
  export declare class TaskbarConfig {
778
771
  height: TaskbarConfigOptions["height"];
779
- constructor(options?: OptionalInterface<TaskbarConfigOptions>);
772
+ constructor(options?: Partial<TaskbarConfigOptions>);
780
773
  }
781
774
 
782
775
  declare interface TaskbarConfigOptions {
@@ -838,7 +831,7 @@ declare interface ToggleActionProps extends ActionProps {
838
831
  export declare class TrackingConfig {
839
832
  enabled: TrackingConfigOptions["enabled"];
840
833
  googleAnalyticsMeasurementId: TrackingConfigOptions["GAMeasurementId"];
841
- constructor(options?: OptionalInterface<TrackingConfigOptions>);
834
+ constructor(options?: Partial<TrackingConfigOptions>);
842
835
  }
843
836
 
844
837
  declare interface TrackingConfigOptions {
@@ -1057,7 +1050,7 @@ declare interface VirtualBaseJson {
1057
1050
  export declare class VirtualDriveConfig {
1058
1051
  saveData: VirtualDriveConfigOptions["saveData"];
1059
1052
  defaultData: VirtualDriveConfigOptions["defaultData"];
1060
- constructor(options?: OptionalInterface<VirtualDriveConfigOptions>);
1053
+ constructor(options?: Partial<VirtualDriveConfigOptions>);
1061
1054
  }
1062
1055
 
1063
1056
  declare interface VirtualDriveConfigOptions {
@@ -1372,6 +1365,11 @@ declare interface WindowOptions {
1372
1365
  [key: string]: unknown;
1373
1366
  }
1374
1367
 
1368
+ declare interface WindowOptions_2 {
1369
+ size?: Vector2;
1370
+ [key: string]: unknown;
1371
+ }
1372
+
1375
1373
  export declare interface WindowProps extends WindowOptions {
1376
1374
  fullscreen?: boolean;
1377
1375
  onInteract?: () => void;
@@ -1390,7 +1388,7 @@ export declare class WindowsConfig {
1390
1388
  screenMargin: WindowsConfigOptions["screenMargin"];
1391
1389
  titleSeparator: WindowsConfigOptions["titleSeparator"];
1392
1390
  minScreenSize: WindowsConfigOptions["minScreenSize"];
1393
- constructor(options?: OptionalInterface<WindowsConfigOptions>);
1391
+ constructor(options?: Partial<WindowsConfigOptions>);
1394
1392
  }
1395
1393
 
1396
1394
  declare interface WindowsConfigOptions {
package/dist/main.js CHANGED
@@ -3885,7 +3885,7 @@ function Si({ app: e, path: t, selectorMode: n, Footer: r, onSelectionChange: a,
3885
3885
  }
3886
3886
  var Oi = /* @__PURE__ */ ((e) => (e[e.None = 0] = "None", e[e.Single = 1] = "Single", e[e.Multi = 2] = "Multi", e))(Oi || {});
3887
3887
  const Pi = new Un("File Explorer", "file-explorer", Si).setIconUrl("https://os.prozilla.dev/assets/apps/icons/file-explorer.svg").setRole(Rt.APP_ROLES.fileExplorer).setCategory("Utilities & tools");
3888
- Pi.setMetadata({ name: "@prozilla-os/file-explorer", version: "1.1.14", author: "Prozilla" });
3888
+ Pi.setMetadata({ name: "@prozilla-os/file-explorer", version: "1.1.15", author: "Prozilla" });
3889
3889
  (function() {
3890
3890
  try {
3891
3891
  if (typeof document < "u") {
@@ -3913,7 +3913,7 @@ function Ci({ file: e, close: t, setTitle: n }) {
3913
3913
  return e.extension == null || !Wn.includes(e.extension) ? /* @__PURE__ */ b("p", { children: "Invalid file format." }) : e.source == null ? /* @__PURE__ */ b("p", { children: "File failed to load." }) : /* @__PURE__ */ b("div", { className: ki.MediaViewer, children: /* @__PURE__ */ b("img", { src: e.source, alt: e.id, draggable: "false" }) });
3914
3914
  }
3915
3915
  const Ii = new Un("Media Viewer", "media-viewer", Ci).setIconUrl("https://os.prozilla.dev/assets/apps/icons/media-viewer.svg").setRole(Rt.APP_ROLES.mediaViewer).setAssociatedExtensions(Wn).setCategory("Photo & video");
3916
- Ii.setMetadata({ name: "@prozilla-os/media-viewer", version: "1.1.14", author: "Prozilla" });
3916
+ Ii.setMetadata({ name: "@prozilla-os/media-viewer", version: "1.1.15", author: "Prozilla" });
3917
3917
  export {
3918
3918
  Oi as FileSelectorMode,
3919
3919
  Pi as fileExplorer,