prozilla-os 1.2.5 → 1.3.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.
- package/README.md +26 -26
- package/dist/main.d.ts +19 -48
- package/dist/main.js +4276 -4202
- package/dist/main.js.map +1 -1
- package/package.json +11 -10
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</p>
|
|
12
12
|
</div>
|
|
13
13
|
|
|
14
|
-
## About
|
|
14
|
+
## About
|
|
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
|
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
npm install prozilla-os
|
|
24
|
+
yarn add prozilla-os
|
|
25
|
+
pnpm add prozilla-os
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
## Packages
|
|
@@ -74,27 +74,27 @@ interface ProzillaOSProps {
|
|
|
74
74
|
|
|
75
75
|
appIcons: Record<number, string> | undefined,
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
appNames: Record<number, string> | undefined,
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
wallpapers: string[],
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
defaultWallpaper: string,
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
fileIcons: {
|
|
84
|
+
generic: string;
|
|
85
|
+
info: string | undefined;
|
|
86
|
+
text: string | undefined;
|
|
87
|
+
code: string | undefined;
|
|
88
|
+
},
|
|
89
89
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
90
|
+
folderIcons: {
|
|
91
|
+
generic: string;
|
|
92
|
+
images: string | undefined;
|
|
93
|
+
text: string | undefined;
|
|
94
|
+
link: string | undefined;
|
|
95
|
+
},
|
|
96
96
|
|
|
97
|
-
|
|
97
|
+
loadStyleSheet: () => void | undefined
|
|
98
98
|
|
|
99
99
|
})
|
|
100
100
|
|
|
@@ -118,14 +118,14 @@ interface ProzillaOSProps {
|
|
|
118
118
|
defaultIconDirection: 0 | 1
|
|
119
119
|
|
|
120
120
|
}),
|
|
121
|
-
|
|
121
|
+
misc: new MiscConfig({
|
|
122
122
|
|
|
123
123
|
/**
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
124
|
+
* @default 250
|
|
125
|
+
*/
|
|
126
|
+
doubleClickDelay: number
|
|
127
127
|
|
|
128
|
-
|
|
128
|
+
})
|
|
129
129
|
modals: new ModalsConfig({
|
|
130
130
|
|
|
131
131
|
/**
|
|
@@ -209,4 +209,4 @@ interface ProzillaOSProps {
|
|
|
209
209
|
[settings]: https://www.npmjs.com/package/@prozilla-os/settings
|
|
210
210
|
[media-viewer]: https://www.npmjs.com/package/@prozilla-os/media-viewer
|
|
211
211
|
[browser]: https://www.npmjs.com/package/@prozilla-os/browser
|
|
212
|
-
[calculator]: https://www.npmjs.com/package/@prozilla-os/calculator
|
|
212
|
+
[calculator]: https://www.npmjs.com/package/@prozilla-os/calculator
|
package/dist/main.d.ts
CHANGED
|
@@ -55,25 +55,6 @@ declare interface AlertParams {
|
|
|
55
55
|
single?: boolean;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export declare const ANSI: {
|
|
59
|
-
fg: {
|
|
60
|
-
black: string;
|
|
61
|
-
red: string;
|
|
62
|
-
green: string;
|
|
63
|
-
yellow: string;
|
|
64
|
-
blue: string;
|
|
65
|
-
magenta: string;
|
|
66
|
-
cyan: string;
|
|
67
|
-
white: string;
|
|
68
|
-
};
|
|
69
|
-
bg: {};
|
|
70
|
-
decoration: {
|
|
71
|
-
dim: string;
|
|
72
|
-
bold: string;
|
|
73
|
-
};
|
|
74
|
-
reset: string;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
58
|
/**
|
|
78
59
|
* An application that can be ran by ProzillaOS
|
|
79
60
|
* Applications can be installed by adding them to the `apps` array in {@link AppsConfig}
|
|
@@ -206,8 +187,6 @@ declare interface ButtonProps {
|
|
|
206
187
|
|
|
207
188
|
export declare const calculator: App<WindowProps>;
|
|
208
189
|
|
|
209
|
-
export declare function clamp(value: number, min: number, max: number): number;
|
|
210
|
-
|
|
211
190
|
export declare const ClickAction: MemoExoticComponent<({ actionId, label, shortcut, disabled, onTrigger, icon }: ClickActionProps) => JSX_2.Element>;
|
|
212
191
|
|
|
213
192
|
declare interface ClickActionProps extends ActionProps {
|
|
@@ -224,6 +203,8 @@ export declare const CODE_EXTENSIONS: string[];
|
|
|
224
203
|
|
|
225
204
|
export declare function copyToClipboard(string: string, onSuccess?: (value: void) => void, onFail?: (value: void) => void): void;
|
|
226
205
|
|
|
206
|
+
export declare function DefaultRoute(): JSX_2.Element;
|
|
207
|
+
|
|
227
208
|
export declare const Desktop: MemoExoticComponent<() => JSX_2.Element>;
|
|
228
209
|
|
|
229
210
|
export declare class DesktopConfig {
|
|
@@ -281,7 +262,7 @@ export declare function DropdownButton({ label, options, shortcuts }: {
|
|
|
281
262
|
};
|
|
282
263
|
}): JSX_2.Element;
|
|
283
264
|
|
|
284
|
-
|
|
265
|
+
declare class EventEmitter<EventMap extends EventNamesMap> {
|
|
285
266
|
#private;
|
|
286
267
|
static EVENT_NAMES: EventNamesMap;
|
|
287
268
|
/**
|
|
@@ -298,7 +279,7 @@ export declare class EventEmitter<EventMap extends EventNamesMap> {
|
|
|
298
279
|
emit<Key extends keyof EventMap>(eventName: Key, data?: unknown): void;
|
|
299
280
|
}
|
|
300
281
|
|
|
301
|
-
|
|
282
|
+
declare type EventNamesMap = Record<string, string>;
|
|
302
283
|
|
|
303
284
|
export declare type FileEventHandler = (event: Event, file: VirtualFile) => void;
|
|
304
285
|
|
|
@@ -320,22 +301,8 @@ export declare enum FileSelectorMode {
|
|
|
320
301
|
|
|
321
302
|
export declare type FolderEventHandler = (event: Event, folder: VirtualFolder) => void;
|
|
322
303
|
|
|
323
|
-
/**
|
|
324
|
-
* Format a time relative to now
|
|
325
|
-
* @param date - The date
|
|
326
|
-
* @param maxLength - The maximum amount of units, e.g.: 3 => years, months, days
|
|
327
|
-
*/
|
|
328
|
-
export declare function formatRelativeTime(date: Date, maxLength: number | undefined, allowAffixes: boolean): string;
|
|
329
|
-
|
|
330
304
|
export declare function formatShortcut(shortcut: string[]): string;
|
|
331
305
|
|
|
332
|
-
/**
|
|
333
|
-
* Format a time
|
|
334
|
-
* @param time - Time in milliseconds
|
|
335
|
-
* @param maxLength - The maximum amount of units, e.g.: 3 => years, months, days
|
|
336
|
-
*/
|
|
337
|
-
export declare function formatTime(time: number, maxLength: number | undefined, allowAffixes: boolean): string;
|
|
338
|
-
|
|
339
306
|
export declare function generateUrl(options: generateUrlOptions): string;
|
|
340
307
|
|
|
341
308
|
declare interface generateUrlOptions {
|
|
@@ -376,8 +343,6 @@ declare interface InteractableProps {
|
|
|
376
343
|
[key: string]: unknown;
|
|
377
344
|
}
|
|
378
345
|
|
|
379
|
-
export declare function isValidInteger(number: number | string): number | boolean;
|
|
380
|
-
|
|
381
346
|
export declare function isValidUrl(string: string): boolean;
|
|
382
347
|
|
|
383
348
|
export declare const mediaViewer: App<MediaViewerProps>;
|
|
@@ -483,6 +448,8 @@ declare type ModalsManagerState = ModalsManager | undefined;
|
|
|
483
448
|
|
|
484
449
|
export declare const ModalsView: MemoExoticComponent<() => JSX_2.Element>;
|
|
485
450
|
|
|
451
|
+
export declare function NoRoute(): JSX_2.Element;
|
|
452
|
+
|
|
486
453
|
export declare interface OnSelectionChangeParams {
|
|
487
454
|
files?: string[];
|
|
488
455
|
folders?: string[];
|
|
@@ -569,22 +536,20 @@ declare interface RadioActionProps extends ActionProps {
|
|
|
569
536
|
initialIndex: number;
|
|
570
537
|
}
|
|
571
538
|
|
|
572
|
-
export declare function randomFromArray<Type>(array: Type[]): Type;
|
|
573
|
-
|
|
574
|
-
export declare function randomRange(min: number, max: number): number;
|
|
575
|
-
|
|
576
539
|
/**
|
|
577
540
|
* Reloads the viewport
|
|
578
541
|
*/
|
|
579
542
|
export declare function reloadViewport(): void;
|
|
580
543
|
|
|
581
|
-
export declare function removeDuplicatesFromArray<Type>(array: Type[]): Type[];
|
|
582
|
-
|
|
583
|
-
export declare function removeFromArray<Type>(item: Type, array: Type[]): void;
|
|
584
|
-
|
|
585
544
|
export declare function removeUrlProtocol(url: string): string;
|
|
586
545
|
|
|
587
|
-
export declare function
|
|
546
|
+
export declare function Router({ path, homePage, fallbackPage }: RouterProps): JSX_2.Element;
|
|
547
|
+
|
|
548
|
+
declare interface RouterProps {
|
|
549
|
+
path?: string;
|
|
550
|
+
homePage?: JSX.Element;
|
|
551
|
+
fallbackPage?: JSX.Element;
|
|
552
|
+
}
|
|
588
553
|
|
|
589
554
|
declare class Settings {
|
|
590
555
|
#private;
|
|
@@ -689,6 +654,12 @@ declare interface SkinOptions {
|
|
|
689
654
|
loadStyleSheet?: () => void;
|
|
690
655
|
}
|
|
691
656
|
|
|
657
|
+
export declare function StandaloneRoute({ app }: StandaloneRouteProps): JSX_2.Element;
|
|
658
|
+
|
|
659
|
+
declare interface StandaloneRouteProps {
|
|
660
|
+
app: App;
|
|
661
|
+
}
|
|
662
|
+
|
|
692
663
|
declare class StorageManager_2 {
|
|
693
664
|
static MAX_BYTES: number;
|
|
694
665
|
static store(key: string, value: string): void;
|