@prozilla-os/core 1.2.3 → 1.3.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
@@ -11,16 +11,16 @@
11
11
  </p>
12
12
  </div>
13
13
 
14
- ## About
14
+ ## About
15
15
 
16
16
  `@prozilla-os/core` is a React Vite component library written in TypeScript for building web-based operating systems, made by Prozilla.
17
17
 
18
18
  ## Installation
19
19
 
20
20
  ```sh
21
- $ npm install @prozilla-os/core
22
- $ yarn add @prozilla-os/core
23
- $ pnpm add @prozilla-os/core
21
+ npm install @prozilla-os/core
22
+ yarn add @prozilla-os/core
23
+ pnpm add @prozilla-os/core
24
24
  ```
25
25
 
26
26
  ## Usage
@@ -57,27 +57,27 @@ interface ProzillaOSProps {
57
57
 
58
58
  appIcons: Record<number, string> | undefined,
59
59
 
60
- appNames: Record<number, string> | undefined,
60
+ appNames: Record<number, string> | undefined,
61
61
 
62
- wallpapers: string[],
62
+ wallpapers: string[],
63
63
 
64
- defaultWallpaper: string,
64
+ defaultWallpaper: string,
65
65
 
66
- fileIcons: {
67
- generic: string;
68
- info: string | undefined;
69
- text: string | undefined;
70
- code: string | undefined;
71
- },
66
+ fileIcons: {
67
+ generic: string;
68
+ info: string | undefined;
69
+ text: string | undefined;
70
+ code: string | undefined;
71
+ },
72
72
 
73
- folderIcons: {
74
- generic: string;
75
- images: string | undefined;
76
- text: string | undefined;
77
- link: string | undefined;
78
- },
73
+ folderIcons: {
74
+ generic: string;
75
+ images: string | undefined;
76
+ text: string | undefined;
77
+ link: string | undefined;
78
+ },
79
79
 
80
- loadStyleSheet: () => void | undefined
80
+ loadStyleSheet: () => void | undefined
81
81
 
82
82
  })
83
83
 
@@ -101,14 +101,14 @@ interface ProzillaOSProps {
101
101
  defaultIconDirection: 0 | 1
102
102
 
103
103
  }),
104
- misc: new MiscConfig({
104
+ misc: new MiscConfig({
105
105
 
106
106
  /**
107
- * @default 250
108
- */
109
- doubleClickDelay: number
107
+ * @default 250
108
+ */
109
+ doubleClickDelay: number
110
110
 
111
- })
111
+ })
112
112
  modals: new ModalsConfig({
113
113
 
114
114
  /**
@@ -183,4 +183,4 @@ interface ProzillaOSProps {
183
183
  [github]: https://github.com/prozilla-os/ProzillaOS/tree/main/packages/core
184
184
  [npm]: https://www.npmjs.com/package/@prozilla-os/core
185
185
  [discord]: https://discord.gg/JwbyQP4tdz
186
- [ko-fi]: https://ko-fi.com/prozilla
186
+ [ko-fi]: https://ko-fi.com/prozilla
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}
@@ -198,8 +179,6 @@ declare interface ButtonProps {
198
179
  [key: string]: unknown;
199
180
  }
200
181
 
201
- export declare function clamp(value: number, min: number, max: number): number;
202
-
203
182
  export declare const ClickAction: MemoExoticComponent<({ actionId, label, shortcut, disabled, onTrigger, icon }: ClickActionProps) => JSX_2.Element>;
204
183
 
205
184
  declare interface ClickActionProps extends ActionProps {
@@ -273,7 +252,7 @@ export declare function DropdownButton({ label, options, shortcuts }: {
273
252
  };
274
253
  }): JSX_2.Element;
275
254
 
276
- export declare class EventEmitter<EventMap extends EventNamesMap> {
255
+ declare class EventEmitter<EventMap extends EventNamesMap> {
277
256
  #private;
278
257
  static EVENT_NAMES: EventNamesMap;
279
258
  /**
@@ -290,28 +269,14 @@ export declare class EventEmitter<EventMap extends EventNamesMap> {
290
269
  emit<Key extends keyof EventMap>(eventName: Key, data?: unknown): void;
291
270
  }
292
271
 
293
- export declare type EventNamesMap = Record<string, string>;
272
+ declare type EventNamesMap = Record<string, string>;
294
273
 
295
274
  export declare type FileEventHandler = (event: Event, file: VirtualFile) => void;
296
275
 
297
276
  export declare type FolderEventHandler = (event: Event, folder: VirtualFolder) => void;
298
277
 
299
- /**
300
- * Format a time relative to now
301
- * @param date - The date
302
- * @param maxLength - The maximum amount of units, e.g.: 3 => years, months, days
303
- */
304
- export declare function formatRelativeTime(date: Date, maxLength: number | undefined, allowAffixes: boolean): string;
305
-
306
278
  export declare function formatShortcut(shortcut: string[]): string;
307
279
 
308
- /**
309
- * Format a time
310
- * @param time - Time in milliseconds
311
- * @param maxLength - The maximum amount of units, e.g.: 3 => years, months, days
312
- */
313
- export declare function formatTime(time: number, maxLength: number | undefined, allowAffixes: boolean): string;
314
-
315
280
  export declare function generateUrl(options: generateUrlOptions): string;
316
281
 
317
282
  declare interface generateUrlOptions {
@@ -352,8 +317,6 @@ declare interface InteractableProps {
352
317
  [key: string]: unknown;
353
318
  }
354
319
 
355
- export declare function isValidInteger(number: number | string): number | boolean;
356
-
357
320
  export declare function isValidUrl(string: string): boolean;
358
321
 
359
322
  export declare class MiscConfig {
@@ -539,23 +502,13 @@ declare interface RadioActionProps extends ActionProps {
539
502
  initialIndex: number;
540
503
  }
541
504
 
542
- export declare function randomFromArray<Type>(array: Type[]): Type;
543
-
544
- export declare function randomRange(min: number, max: number): number;
545
-
546
505
  /**
547
506
  * Reloads the viewport
548
507
  */
549
508
  export declare function reloadViewport(): void;
550
509
 
551
- export declare function removeDuplicatesFromArray<Type>(array: Type[]): Type[];
552
-
553
- export declare function removeFromArray<Type>(item: Type, array: Type[]): void;
554
-
555
510
  export declare function removeUrlProtocol(url: string): string;
556
511
 
557
- export declare function round(value: number, precision: number): number;
558
-
559
512
  declare class Settings {
560
513
  #private;
561
514
  path: string;