prozilla-os 1.0.15 → 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.
package/README.md CHANGED
@@ -179,7 +179,7 @@ function App() {
179
179
 
180
180
  [website]: https://os.prozilla.dev/
181
181
  [website-source]: https://github.com/prozilla-os/ProzillaOS
182
- [github]: https://github.com/prozilla-os/ProzillaOS/tree/convert-to-monorepo/packages/prozilla-os
182
+ [github]: https://github.com/prozilla-os/ProzillaOS/tree/main/packages/prozilla-os
183
183
  [npm]: https://www.npmjs.com/package/prozilla-os
184
184
  [discord]: https://discord.gg/JwbyQP4tdz
185
185
  [ko-fi]: https://ko-fi.com/prozilla
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
  };
@@ -113,6 +114,16 @@ export declare class App<AppProps extends WindowProps = WindowProps> {
113
114
  * An array of file extensions that this application can interpret
114
115
  */
115
116
  associatedExtensions: string[];
117
+ /**
118
+ * Determines whether the app is pinned by default
119
+ * @default true
120
+ */
121
+ pinnedByDefault: boolean;
122
+ /**
123
+ * Determines whether the app is launched at startup
124
+ * @default false
125
+ */
126
+ launchAtStartup: boolean;
116
127
  isActive: boolean;
117
128
  isPinned?: boolean;
118
129
  constructor(name: App["name"], id: App["id"], windowContent: App<AppProps>["windowContent"], windowOptions?: App["windowOptions"]);
@@ -137,6 +148,14 @@ export declare class App<AppProps extends WindowProps = WindowProps> {
137
148
  * Set the associated extensions of this application
138
149
  */
139
150
  setAssociatedExtensions(extensions: string[] | null): this;
151
+ /**
152
+ * Changes whether this application is pinned by default or not
153
+ */
154
+ setPinnedByDefault(pinnedByDefault: boolean): this;
155
+ /**
156
+ * Changes whether this application is launched at startup or not
157
+ */
158
+ setLaunchAtStartup(launchAtStartup: boolean): this;
140
159
  }
141
160
 
142
161
  export declare class AppsConfig {
@@ -519,6 +538,7 @@ declare interface ProzillaOSProps {
519
538
  windows?: OptionalInterface<WindowsConfigOptions>;
520
539
  virtualDrive?: OptionalInterface<VirtualDriveConfigOptions>;
521
540
  };
541
+ skin?: Skin;
522
542
  children?: ReactNode;
523
543
  }
524
544
 
@@ -604,6 +624,37 @@ export declare function setViewportTitle(title: string): void;
604
624
 
605
625
  export declare function Share({ modal, params, ...props }: ModalProps): JSX_2.Element;
606
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
+
607
658
  declare class StorageManager_2 {
608
659
  static MAX_BYTES: number;
609
660
  static store(key: string, value: string): void;
@@ -618,6 +669,7 @@ export declare class SystemManager {
618
669
  #private;
619
670
  systemName: string;
620
671
  tagLine: string;
672
+ skin?: Skin;
621
673
  appsConfig: AppsConfig;
622
674
  desktopConfig: DesktopConfig;
623
675
  miscConfig: MiscConfig;
@@ -626,13 +678,14 @@ export declare class SystemManager {
626
678
  trackingConfig: TrackingConfig;
627
679
  windowsConfig: WindowsConfig;
628
680
  virtualDriveConfig: VirtualDriveConfig;
629
- 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);
630
682
  getUptime(precision?: number): string;
631
683
  }
632
684
 
633
685
  declare interface SystemManagerParams {
634
686
  systemName: SystemManager["systemName"] | null;
635
687
  tagLine: SystemManager["tagLine"] | null;
688
+ skin?: SystemManager["skin"];
636
689
  desktopConfig: DesktopConfig;
637
690
  appsConfig: AppsConfig;
638
691
  miscConfig: MiscConfig;
@@ -725,6 +778,11 @@ export declare function useAlert(): {
725
778
 
726
779
  export declare function useAppFolder(app?: App): VirtualFolder | null;
727
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
+
728
786
  export declare function useContextMenu({ Actions }: UseContextMenuParams): {
729
787
  onContextMenu: (event: MouseEvent_2<HTMLElement, MouseEvent_2>, params?: object) => Modal;
730
788
  ShortcutsListener: () => JSX_2.Element;
@@ -811,6 +869,11 @@ declare interface UseShortcutsParams {
811
869
  useCategories?: boolean;
812
870
  }
813
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
+
814
877
  export declare function useSystemManager(): SystemManager;
815
878
 
816
879
  export declare function useTrackingManager(): TrackingManagerState;
@@ -941,7 +1004,7 @@ export declare class VirtualFile extends VirtualBase {
941
1004
  /**
942
1005
  * Sets the content of this file and removes the source
943
1006
  */
944
- setContent(content: string): this;
1007
+ setContent(content: string | string[]): this;
945
1008
  get id(): string;
946
1009
  static splitId(id: string): {
947
1010
  name: string;
package/dist/main.js CHANGED
@@ -37683,7 +37683,7 @@ function sh({ active: t }) {
37683
37683
  ] })
37684
37684
  ] });
37685
37685
  }
37686
- const uh = new yd("Calculator", "calculator", sh, { size: new Ad(400, 600) }).setIconUrl("https://os.prozilla.dev/assets/apps/icons/calculator.svg");
37686
+ const uh = new yd("Calculator", "calculator", sh, { size: new Ad(400, 600) }).setIconUrl("https://os.prozilla.dev/assets/apps/icons/calculator.svg").setPinnedByDefault(!1);
37687
37687
  export {
37688
37688
  uh as calculator,
37689
37689
  dh as textEditor