prozilla-os 1.0.16 → 1.1.0

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 +47 -2
  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;
@@ -537,6 +538,7 @@ declare interface ProzillaOSProps {
537
538
  windows?: OptionalInterface<WindowsConfigOptions>;
538
539
  virtualDrive?: OptionalInterface<VirtualDriveConfigOptions>;
539
540
  };
541
+ skin?: Skin;
540
542
  children?: ReactNode;
541
543
  }
542
544
 
@@ -622,6 +624,37 @@ export declare function setViewportTitle(title: string): void;
622
624
 
623
625
  export declare function Share({ modal, params, ...props }: ModalProps): JSX_2.Element;
624
626
 
627
+ declare class Skin {
628
+ appIcons: SkinOptions["appIcons"];
629
+ wallpapers: SkinOptions["wallpapers"];
630
+ defaultWallpaper: SkinOptions["defaultWallpaper"];
631
+ fileIcons: SkinOptions["fileIcons"];
632
+ folderIcons: SkinOptions["folderIcons"];
633
+ loadStyleSheet: SkinOptions["loadStyleSheet"];
634
+ constructor(options: SkinOptions);
635
+ }
636
+
637
+ declare interface SkinOptions {
638
+ appIcons?: {
639
+ [key: string]: string;
640
+ };
641
+ wallpapers?: string[];
642
+ defaultWallpaper?: string;
643
+ fileIcons?: {
644
+ generic: string;
645
+ info?: string;
646
+ text?: string;
647
+ code?: string;
648
+ };
649
+ folderIcons?: {
650
+ generic: string;
651
+ images?: string;
652
+ text?: string;
653
+ link?: string;
654
+ };
655
+ loadStyleSheet?: () => void;
656
+ }
657
+
625
658
  declare class StorageManager_2 {
626
659
  static MAX_BYTES: number;
627
660
  static store(key: string, value: string): void;
@@ -636,6 +669,7 @@ export declare class SystemManager {
636
669
  #private;
637
670
  systemName: string;
638
671
  tagLine: string;
672
+ skin?: Skin;
639
673
  appsConfig: AppsConfig;
640
674
  desktopConfig: DesktopConfig;
641
675
  miscConfig: MiscConfig;
@@ -644,13 +678,14 @@ export declare class SystemManager {
644
678
  trackingConfig: TrackingConfig;
645
679
  windowsConfig: WindowsConfig;
646
680
  virtualDriveConfig: VirtualDriveConfig;
647
- constructor({ systemName, tagLine, desktopConfig, appsConfig, miscConfig, modalsConfig, taskbarConfig, trackingConfig, windowsConfig, virtualDriveConfig }: SystemManagerParams);
681
+ constructor({ systemName, tagLine, skin, desktopConfig, appsConfig, miscConfig, modalsConfig, taskbarConfig, trackingConfig, windowsConfig, virtualDriveConfig }: SystemManagerParams);
648
682
  getUptime(precision?: number): string;
649
683
  }
650
684
 
651
685
  declare interface SystemManagerParams {
652
686
  systemName: SystemManager["systemName"] | null;
653
687
  tagLine: SystemManager["tagLine"] | null;
688
+ skin?: SystemManager["skin"];
654
689
  desktopConfig: DesktopConfig;
655
690
  appsConfig: AppsConfig;
656
691
  miscConfig: MiscConfig;
@@ -743,6 +778,11 @@ export declare function useAlert(): {
743
778
 
744
779
  export declare function useAppFolder(app?: App): VirtualFolder | null;
745
780
 
781
+ /**
782
+ * Combine clas names and an optional static class name
783
+ */
784
+ export declare function useClassNames(classNames: (string | undefined)[], block?: string, element?: string, modifier?: string): string;
785
+
746
786
  export declare function useContextMenu({ Actions }: UseContextMenuParams): {
747
787
  onContextMenu: (event: MouseEvent_2<HTMLElement, MouseEvent_2>, params?: object) => Modal;
748
788
  ShortcutsListener: () => JSX_2.Element;
@@ -829,6 +869,11 @@ declare interface UseShortcutsParams {
829
869
  useCategories?: boolean;
830
870
  }
831
871
 
872
+ /**
873
+ * Generates static class name using BEM notation
874
+ */
875
+ export declare function useStaticClassName(block?: string, element?: string, modifier?: string): string | null;
876
+
832
877
  export declare function useSystemManager(): SystemManager;
833
878
 
834
879
  export declare function useTrackingManager(): TrackingManagerState;
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.0",
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/calculator": "1.0.3",
24
+ "@prozilla-os/browser": "1.0.3",
25
+ "@prozilla-os/file-explorer": "1.0.14",
26
+ "@prozilla-os/core": "1.1.0",
27
+ "@prozilla-os/media-viewer": "1.0.3",
28
+ "@prozilla-os/terminal": "1.0.7",
29
+ "@prozilla-os/settings": "1.0.3",
30
+ "@prozilla-os/text-editor": "1.0.7"
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
  }