prozilla-os 1.1.0 → 1.1.2

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 (3) hide show
  1. package/README.md +43 -24
  2. package/dist/main.d.ts +48 -38
  3. package/package.json +10 -10
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  `prozilla-os` is a React Vite component library written in TypeScript for building web-based operating systems, made by Prozilla. This package combines multiple other packages for easy access to different ProzillaOS features. You can also download these packages separately instead.
17
17
 
18
- **Live demo: [os.prozilla.dev][website]** - [(source)][website-source]
18
+ **Live demo: [os.prozilla.dev][demo]** - [(source)][website-source]
19
19
 
20
20
  ## Installation
21
21
 
@@ -61,15 +61,43 @@ function App() {
61
61
 
62
62
  <br />
63
63
 
64
- ### `<ProzillaOS>` props
64
+ ### Configuration
65
65
 
66
66
  ```tsx
67
- {
67
+ interface ProzillaOSProps {
68
68
 
69
69
  systemName: string,
70
70
 
71
71
  tagLine: string,
72
72
 
73
+ skin: new Skin({
74
+
75
+ appIcons: Record<number, string> | undefined,
76
+
77
+ appNames: Record<number, string> | undefined,
78
+
79
+ wallpapers: string[],
80
+
81
+ defaultWallpaper: string,
82
+
83
+ fileIcons: {
84
+ generic: string;
85
+ info: string | undefined;
86
+ text: string | undefined;
87
+ code: string | undefined;
88
+ },
89
+
90
+ folderIcons: {
91
+ generic: string;
92
+ images: string | undefined;
93
+ text: string | undefined;
94
+ link: string | undefined;
95
+ },
96
+
97
+ loadStyleSheet: () => void | undefined
98
+
99
+ })
100
+
73
101
  config: {
74
102
  apps: new AppsConfig({
75
103
 
@@ -78,12 +106,6 @@ function App() {
78
106
  }),
79
107
  desktop: new DesktopConfig({
80
108
 
81
- /** Array of URLs of wallpaper images */
82
- wallpapers: string[],
83
-
84
- /** URL of default wallpaper image */
85
- defaultWallpaper: string,
86
-
87
109
  /**
88
110
  * @default 1
89
111
  */
@@ -96,6 +118,14 @@ function App() {
96
118
  defaultIconDirection: 0 | 1
97
119
 
98
120
  }),
121
+ misc: new MiscConfig({
122
+
123
+ /**
124
+ * @default 250
125
+ */
126
+ doubleClickDelay: number
127
+
128
+ })
99
129
  modals: new ModalsConfig({
100
130
 
101
131
  /**
@@ -131,19 +161,6 @@ function App() {
131
161
  /** Google Analytics measurement ID */
132
162
  GAMeasurementId: string
133
163
 
134
- }),
135
- virtualDrive: new VirtualDriveConfig({
136
-
137
- fileIcon: string,
138
- infoFileIcon: string,
139
- textFileIcon: string,
140
- codeFileIcon: string,
141
-
142
- folderIcon: string,
143
- imagesFolderIcon: string,
144
- textFolderIcon: string,
145
- folderLinkIcon: string
146
-
147
164
  }),
148
165
  windows: new WindowsConfig({
149
166
 
@@ -171,13 +188,15 @@ function App() {
171
188
 
172
189
  ## Links
173
190
 
174
- - [Website/demo][website]
191
+ - [Demo][demo]
192
+ - [Docs][docs]
175
193
  - [GitHub][github]
176
194
  - [npm][npm]
177
195
  - [Discord][discord]
178
196
  - [Ko-fi][ko-fi]
179
197
 
180
- [website]: https://os.prozilla.dev/
198
+ [demo]: https://os.prozilla.dev/
199
+ [docs]: https://os.prozilla.dev/docs/reference/prozilla-os
181
200
  [website-source]: https://github.com/prozilla-os/ProzillaOS
182
201
  [github]: https://github.com/prozilla-os/ProzillaOS/tree/main/packages/prozilla-os
183
202
  [npm]: https://www.npmjs.com/package/prozilla-os
package/dist/main.d.ts CHANGED
@@ -227,18 +227,12 @@ export declare function copyToClipboard(string: string, onSuccess?: (value: void
227
227
  export declare const Desktop: MemoExoticComponent<() => JSX_2.Element>;
228
228
 
229
229
  export declare class DesktopConfig {
230
- wallpapers: DesktopConfigOptions["wallpapers"];
231
- defaultWallpaper: DesktopConfigOptions["defaultWallpaper"];
232
230
  defaultIconSize: DesktopConfigOptions["defaultIconSize"];
233
231
  defaultIconDirection: DesktopConfigOptions["defaultIconDirection"];
234
232
  constructor(options?: OptionalInterface<DesktopConfigOptions>);
235
233
  }
236
234
 
237
235
  declare interface DesktopConfigOptions {
238
- /** Array of URLs of wallpaper images */
239
- wallpapers: string[];
240
- /** URL of default wallpaper image */
241
- defaultWallpaper: string;
242
236
  /**
243
237
  * @default 1
244
238
  */
@@ -504,6 +498,10 @@ export declare type OptionalInterface<Interface> = {
504
498
  [Property in keyof Interface]?: Interface[Property];
505
499
  };
506
500
 
501
+ declare type OptionalInterface_2<Interface> = {
502
+ [Property in keyof Interface]?: Interface[Property];
503
+ };
504
+
507
505
  declare type OptionalStringProperty = string | null | undefined;
508
506
 
509
507
  export declare const OutsideClickListener: MemoExoticComponent<({ onOutsideClick, children }: OutsideClickListenerProps) => JSX_2.Element>;
@@ -626,32 +624,59 @@ export declare function Share({ modal, params, ...props }: ModalProps): JSX_2.El
626
624
 
627
625
  declare class Skin {
628
626
  appIcons: SkinOptions["appIcons"];
627
+ appNames: SkinOptions["appNames"];
629
628
  wallpapers: SkinOptions["wallpapers"];
630
629
  defaultWallpaper: SkinOptions["defaultWallpaper"];
631
630
  fileIcons: SkinOptions["fileIcons"];
632
631
  folderIcons: SkinOptions["folderIcons"];
633
632
  loadStyleSheet: SkinOptions["loadStyleSheet"];
634
- constructor(options: SkinOptions);
633
+ constructor(options?: OptionalInterface_2<SkinOptions>);
635
634
  }
636
635
 
637
636
  declare interface SkinOptions {
637
+ /**
638
+ * Replacements for app icons based on app id
639
+ */
638
640
  appIcons?: {
639
641
  [key: string]: string;
640
642
  };
641
- wallpapers?: string[];
642
- defaultWallpaper?: string;
643
- fileIcons?: {
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: {
644
663
  generic: string;
645
664
  info?: string;
646
665
  text?: string;
647
666
  code?: string;
648
667
  };
649
- folderIcons?: {
668
+ /**
669
+ * URLs of icons for types of folders
670
+ */
671
+ folderIcons: {
650
672
  generic: string;
651
673
  images?: string;
652
674
  text?: string;
653
675
  link?: string;
654
676
  };
677
+ /**
678
+ * Function that dynamically imports style sheet
679
+ */
655
680
  loadStyleSheet?: () => void;
656
681
  }
657
682
 
@@ -667,18 +692,19 @@ export { StorageManager_2 as StorageManager }
667
692
 
668
693
  export declare class SystemManager {
669
694
  #private;
670
- systemName: string;
671
- tagLine: string;
672
- skin?: Skin;
673
- appsConfig: AppsConfig;
674
- desktopConfig: DesktopConfig;
675
- miscConfig: MiscConfig;
676
- modalsConfig: ModalsConfig;
677
- taskbarConfig: TaskbarConfig;
678
- trackingConfig: TrackingConfig;
679
- windowsConfig: WindowsConfig;
680
- virtualDriveConfig: VirtualDriveConfig;
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;
681
706
  constructor({ systemName, tagLine, skin, desktopConfig, appsConfig, miscConfig, modalsConfig, taskbarConfig, trackingConfig, windowsConfig, virtualDriveConfig }: SystemManagerParams);
707
+ private loadSkin;
682
708
  getUptime(precision?: number): string;
683
709
  }
684
710
 
@@ -962,26 +988,10 @@ declare interface VirtualBaseJson {
962
988
  }
963
989
 
964
990
  export declare class VirtualDriveConfig {
965
- fileIcon: VirtualDriveConfigOptions["fileIcon"];
966
- infoFileIcon: VirtualDriveConfigOptions["infoFileIcon"];
967
- textFileIcon: VirtualDriveConfigOptions["textFileIcon"];
968
- codeFileIcon: VirtualDriveConfigOptions["codeFileIcon"];
969
- folderIcon: VirtualDriveConfigOptions["folderIcon"];
970
- imagesFolderIcon: VirtualDriveConfigOptions["imagesFolderIcon"];
971
- textFolderIcon: VirtualDriveConfigOptions["textFolderIcon"];
972
- folderLinkIcon: VirtualDriveConfigOptions["folderLinkIcon"];
973
991
  constructor(options?: OptionalInterface<VirtualDriveConfigOptions>);
974
992
  }
975
993
 
976
994
  declare interface VirtualDriveConfigOptions {
977
- fileIcon: string;
978
- infoFileIcon: string;
979
- textFileIcon: string;
980
- codeFileIcon: string;
981
- folderIcon: string;
982
- imagesFolderIcon: string;
983
- textFolderIcon: string;
984
- folderLinkIcon: string;
985
995
  }
986
996
 
987
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.1.0",
4
+ "version": "1.1.2",
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/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"
23
+ "@prozilla-os/file-explorer": "1.0.16",
24
+ "@prozilla-os/calculator": "1.0.5",
25
+ "@prozilla-os/browser": "1.0.5",
26
+ "@prozilla-os/core": "1.1.2",
27
+ "@prozilla-os/media-viewer": "1.0.5",
28
+ "@prozilla-os/settings": "1.0.5",
29
+ "@prozilla-os/terminal": "1.0.9",
30
+ "@prozilla-os/text-editor": "1.0.9"
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 --project tsconfig-build.json && vite build"
63
+ "build": "tsc --project tsconfig.build.json && vite build"
64
64
  }
65
65
  }