prozilla-os 1.0.16 → 1.1.1

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 +89 -34
  2. package/package.json +10 -10
package/dist/main.d.ts CHANGED
@@ -69,6 +69,7 @@ export declare const ANSI: {
69
69
  bg: {};
70
70
  decoration: {
71
71
  dim: string;
72
+ bold: string;
72
73
  };
73
74
  reset: string;
74
75
  };
@@ -119,7 +120,7 @@ export declare class App<AppProps extends WindowProps = WindowProps> {
119
120
  */
120
121
  pinnedByDefault: boolean;
121
122
  /**
122
- * Determiens whether the app is launched at startup
123
+ * Determines whether the app is launched at startup
123
124
  * @default false
124
125
  */
125
126
  launchAtStartup: boolean;
@@ -226,18 +227,12 @@ export declare function copyToClipboard(string: string, onSuccess?: (value: void
226
227
  export declare const Desktop: MemoExoticComponent<() => JSX_2.Element>;
227
228
 
228
229
  export declare class DesktopConfig {
229
- wallpapers: DesktopConfigOptions["wallpapers"];
230
- defaultWallpaper: DesktopConfigOptions["defaultWallpaper"];
231
230
  defaultIconSize: DesktopConfigOptions["defaultIconSize"];
232
231
  defaultIconDirection: DesktopConfigOptions["defaultIconDirection"];
233
232
  constructor(options?: OptionalInterface<DesktopConfigOptions>);
234
233
  }
235
234
 
236
235
  declare interface DesktopConfigOptions {
237
- /** Array of URLs of wallpaper images */
238
- wallpapers: string[];
239
- /** URL of default wallpaper image */
240
- defaultWallpaper: string;
241
236
  /**
242
237
  * @default 1
243
238
  */
@@ -503,6 +498,10 @@ export declare type OptionalInterface<Interface> = {
503
498
  [Property in keyof Interface]?: Interface[Property];
504
499
  };
505
500
 
501
+ declare type OptionalInterface_2<Interface> = {
502
+ [Property in keyof Interface]?: Interface[Property];
503
+ };
504
+
506
505
  declare type OptionalStringProperty = string | null | undefined;
507
506
 
508
507
  export declare const OutsideClickListener: MemoExoticComponent<({ onOutsideClick, children }: OutsideClickListenerProps) => JSX_2.Element>;
@@ -537,6 +536,7 @@ declare interface ProzillaOSProps {
537
536
  windows?: OptionalInterface<WindowsConfigOptions>;
538
537
  virtualDrive?: OptionalInterface<VirtualDriveConfigOptions>;
539
538
  };
539
+ skin?: Skin;
540
540
  children?: ReactNode;
541
541
  }
542
542
 
@@ -622,6 +622,64 @@ export declare function setViewportTitle(title: string): void;
622
622
 
623
623
  export declare function Share({ modal, params, ...props }: ModalProps): JSX_2.Element;
624
624
 
625
+ declare class Skin {
626
+ appIcons: SkinOptions["appIcons"];
627
+ appNames: SkinOptions["appNames"];
628
+ wallpapers: SkinOptions["wallpapers"];
629
+ defaultWallpaper: SkinOptions["defaultWallpaper"];
630
+ fileIcons: SkinOptions["fileIcons"];
631
+ folderIcons: SkinOptions["folderIcons"];
632
+ loadStyleSheet: SkinOptions["loadStyleSheet"];
633
+ constructor(options?: OptionalInterface_2<SkinOptions>);
634
+ }
635
+
636
+ declare interface SkinOptions {
637
+ /**
638
+ * Replacements for app icons based on app id
639
+ */
640
+ appIcons?: {
641
+ [key: string]: string;
642
+ };
643
+ /**
644
+ * Replacements for app names based on app id
645
+ */
646
+ appNames?: {
647
+ [key: string]: string;
648
+ };
649
+ /**
650
+ * Array of URLs of wallpaper images
651
+ */
652
+ wallpapers: string[];
653
+ /**
654
+ * URL of default wallpaper image
655
+ * @default
656
+ * "https://os.prozilla.dev/assets/wallpapers/vibrant-wallpaper-blue-purple-red.png"
657
+ */
658
+ defaultWallpaper: string;
659
+ /**
660
+ * URLs of icons for types of files
661
+ */
662
+ fileIcons: {
663
+ generic: string;
664
+ info?: string;
665
+ text?: string;
666
+ code?: string;
667
+ };
668
+ /**
669
+ * URLs of icons for types of folders
670
+ */
671
+ folderIcons: {
672
+ generic: string;
673
+ images?: string;
674
+ text?: string;
675
+ link?: string;
676
+ };
677
+ /**
678
+ * Function that dynamically imports style sheet
679
+ */
680
+ loadStyleSheet?: () => void;
681
+ }
682
+
625
683
  declare class StorageManager_2 {
626
684
  static MAX_BYTES: number;
627
685
  static store(key: string, value: string): void;
@@ -634,23 +692,26 @@ export { StorageManager_2 as StorageManager }
634
692
 
635
693
  export declare class SystemManager {
636
694
  #private;
637
- systemName: string;
638
- tagLine: string;
639
- appsConfig: AppsConfig;
640
- desktopConfig: DesktopConfig;
641
- miscConfig: MiscConfig;
642
- modalsConfig: ModalsConfig;
643
- taskbarConfig: TaskbarConfig;
644
- trackingConfig: TrackingConfig;
645
- windowsConfig: WindowsConfig;
646
- virtualDriveConfig: VirtualDriveConfig;
647
- constructor({ systemName, tagLine, desktopConfig, appsConfig, miscConfig, modalsConfig, taskbarConfig, trackingConfig, windowsConfig, virtualDriveConfig }: SystemManagerParams);
695
+ readonly systemName: string;
696
+ readonly tagLine: string;
697
+ readonly skin: Skin;
698
+ readonly appsConfig: AppsConfig;
699
+ readonly desktopConfig: DesktopConfig;
700
+ readonly miscConfig: MiscConfig;
701
+ readonly modalsConfig: ModalsConfig;
702
+ readonly taskbarConfig: TaskbarConfig;
703
+ readonly trackingConfig: TrackingConfig;
704
+ readonly windowsConfig: WindowsConfig;
705
+ readonly virtualDriveConfig: VirtualDriveConfig;
706
+ constructor({ systemName, tagLine, skin, desktopConfig, appsConfig, miscConfig, modalsConfig, taskbarConfig, trackingConfig, windowsConfig, virtualDriveConfig }: SystemManagerParams);
707
+ private loadSkin;
648
708
  getUptime(precision?: number): string;
649
709
  }
650
710
 
651
711
  declare interface SystemManagerParams {
652
712
  systemName: SystemManager["systemName"] | null;
653
713
  tagLine: SystemManager["tagLine"] | null;
714
+ skin?: SystemManager["skin"];
654
715
  desktopConfig: DesktopConfig;
655
716
  appsConfig: AppsConfig;
656
717
  miscConfig: MiscConfig;
@@ -743,6 +804,11 @@ export declare function useAlert(): {
743
804
 
744
805
  export declare function useAppFolder(app?: App): VirtualFolder | null;
745
806
 
807
+ /**
808
+ * Combine clas names and an optional static class name
809
+ */
810
+ export declare function useClassNames(classNames: (string | undefined)[], block?: string, element?: string, modifier?: string): string;
811
+
746
812
  export declare function useContextMenu({ Actions }: UseContextMenuParams): {
747
813
  onContextMenu: (event: MouseEvent_2<HTMLElement, MouseEvent_2>, params?: object) => Modal;
748
814
  ShortcutsListener: () => JSX_2.Element;
@@ -829,6 +895,11 @@ declare interface UseShortcutsParams {
829
895
  useCategories?: boolean;
830
896
  }
831
897
 
898
+ /**
899
+ * Generates static class name using BEM notation
900
+ */
901
+ export declare function useStaticClassName(block?: string, element?: string, modifier?: string): string | null;
902
+
832
903
  export declare function useSystemManager(): SystemManager;
833
904
 
834
905
  export declare function useTrackingManager(): TrackingManagerState;
@@ -917,26 +988,10 @@ declare interface VirtualBaseJson {
917
988
  }
918
989
 
919
990
  export declare class VirtualDriveConfig {
920
- fileIcon: VirtualDriveConfigOptions["fileIcon"];
921
- infoFileIcon: VirtualDriveConfigOptions["infoFileIcon"];
922
- textFileIcon: VirtualDriveConfigOptions["textFileIcon"];
923
- codeFileIcon: VirtualDriveConfigOptions["codeFileIcon"];
924
- folderIcon: VirtualDriveConfigOptions["folderIcon"];
925
- imagesFolderIcon: VirtualDriveConfigOptions["imagesFolderIcon"];
926
- textFolderIcon: VirtualDriveConfigOptions["textFolderIcon"];
927
- folderLinkIcon: VirtualDriveConfigOptions["folderLinkIcon"];
928
991
  constructor(options?: OptionalInterface<VirtualDriveConfigOptions>);
929
992
  }
930
993
 
931
994
  declare interface VirtualDriveConfigOptions {
932
- fileIcon: string;
933
- infoFileIcon: string;
934
- textFileIcon: string;
935
- codeFileIcon: string;
936
- folderIcon: string;
937
- imagesFolderIcon: string;
938
- textFolderIcon: string;
939
- folderLinkIcon: string;
940
995
  }
941
996
 
942
997
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prozilla-os",
3
3
  "description": "a React component library written in TypeScript for building web-based operating systems, made by Prozilla.",
4
- "version": "1.0.16",
4
+ "version": "1.1.1",
5
5
  "homepage": "https://os.prozilla.dev",
6
6
  "author": {
7
7
  "name": "Prozilla",
@@ -20,14 +20,14 @@
20
20
  "dependencies": {
21
21
  "@fortawesome/fontawesome-svg-core": "^6.5.2",
22
22
  "react-ga4": "^2.1.0",
23
- "@prozilla-os/browser": "1.0.2",
24
- "@prozilla-os/core": "1.0.16",
25
- "@prozilla-os/calculator": "1.0.2",
26
- "@prozilla-os/file-explorer": "1.0.13",
27
- "@prozilla-os/media-viewer": "1.0.2",
28
- "@prozilla-os/settings": "1.0.2",
29
- "@prozilla-os/terminal": "1.0.6",
30
- "@prozilla-os/text-editor": "1.0.6"
23
+ "@prozilla-os/browser": "1.0.4",
24
+ "@prozilla-os/calculator": "1.0.4",
25
+ "@prozilla-os/media-viewer": "1.0.4",
26
+ "@prozilla-os/core": "1.1.1",
27
+ "@prozilla-os/file-explorer": "1.0.15",
28
+ "@prozilla-os/settings": "1.0.4",
29
+ "@prozilla-os/text-editor": "1.0.8",
30
+ "@prozilla-os/terminal": "1.0.8"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/node": "^20.14.5",
@@ -60,6 +60,6 @@
60
60
  "virtual-desktop"
61
61
  ],
62
62
  "scripts": {
63
- "build": "tsc && vite build"
63
+ "build": "tsc --project tsconfig.build.json && vite build"
64
64
  }
65
65
  }