prozilla-os 1.3.11 → 1.3.15
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/LICENSE +20 -20
- package/README.md +212 -212
- package/dist/main.d.ts +549 -84
- package/dist/main.js +1163 -1132
- package/dist/main.js.map +1 -1
- package/package.json +10 -10
package/dist/main.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { Context } from 'react';
|
|
2
|
+
import { Dispatch } from 'react';
|
|
3
|
+
import { EventEmitter as EventEmitter_2 } from '@prozilla-os/shared';
|
|
1
4
|
import { FC } from 'react';
|
|
2
5
|
import { HTMLAttributeAnchorTarget } from 'react';
|
|
3
6
|
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
@@ -9,20 +12,28 @@ import { NamedExoticComponent } from 'react';
|
|
|
9
12
|
import { ReactElement } from 'react';
|
|
10
13
|
import { ReactNode } from 'react';
|
|
11
14
|
import { Ref } from 'react';
|
|
15
|
+
import { SetStateAction } from 'react';
|
|
12
16
|
import { UaEventOptions } from 'react-ga4/types/ga4';
|
|
13
17
|
import { default as utilStyles } from './utils.module.css';
|
|
14
18
|
|
|
15
|
-
declare interface ActionProps {
|
|
19
|
+
export declare interface ActionProps {
|
|
20
|
+
/** ID of the action */
|
|
16
21
|
actionId?: string;
|
|
22
|
+
/** Label of the action */
|
|
17
23
|
label?: string;
|
|
24
|
+
/** Icon for the action */
|
|
18
25
|
icon?: string | object;
|
|
26
|
+
/** Keyboard shortcut for the action */
|
|
19
27
|
shortcut?: string[];
|
|
28
|
+
/** Function that handles the trigger event for the action */
|
|
20
29
|
onTrigger?: (event?: Event, triggerParams?: unknown, ...args: unknown[]) => void;
|
|
21
30
|
children?: ReactNode;
|
|
31
|
+
/** Whether the action should be disabled */
|
|
22
32
|
disabled?: boolean;
|
|
23
33
|
}
|
|
24
34
|
|
|
25
35
|
/**
|
|
36
|
+
* Component that renders a collection of actions (e.g., as a context menu or a header menu) and handles keyboard shortcuts
|
|
26
37
|
* @example
|
|
27
38
|
* <ClickAction
|
|
28
39
|
* label="Reload"
|
|
@@ -35,20 +46,34 @@ declare interface ActionProps {
|
|
|
35
46
|
*/
|
|
36
47
|
export declare function Actions({ children, mode, className, onAnyTrigger, triggerParams, avoidTaskbar }: ActionsProps): ReactElement;
|
|
37
48
|
|
|
38
|
-
declare interface ActionsProps {
|
|
49
|
+
export declare interface ActionsProps {
|
|
39
50
|
mode?: string;
|
|
51
|
+
/** `className` prop for the container */
|
|
40
52
|
className?: string;
|
|
53
|
+
/** Function that handles the trigger event for all actions */
|
|
41
54
|
onAnyTrigger?: (event: Event, triggerParams: unknown, ...args: unknown[]) => void;
|
|
42
55
|
children?: ReactNode;
|
|
56
|
+
/** The parameters to pass whenever an action is triggered */
|
|
43
57
|
triggerParams?: unknown;
|
|
58
|
+
/** Whether the actions should automatically orient themselves to not overlap with the taskbar */
|
|
44
59
|
avoidTaskbar?: boolean;
|
|
45
60
|
[key: string]: unknown;
|
|
46
61
|
}
|
|
47
62
|
|
|
48
|
-
declare interface AlertParams {
|
|
63
|
+
export declare interface AlertParams {
|
|
64
|
+
/**
|
|
65
|
+
* The title of the alert
|
|
66
|
+
* @default "Alert"
|
|
67
|
+
*/
|
|
49
68
|
title: string;
|
|
69
|
+
/** The body of the alert */
|
|
50
70
|
text: string;
|
|
71
|
+
/** The URL of the icon of the alert */
|
|
51
72
|
iconUrl?: string;
|
|
73
|
+
/**
|
|
74
|
+
* The size of the alert modal
|
|
75
|
+
* @default new Vector2(300, 150)
|
|
76
|
+
*/
|
|
52
77
|
size?: Vector2;
|
|
53
78
|
single?: boolean;
|
|
54
79
|
}
|
|
@@ -71,9 +96,9 @@ export declare class App<AppProps extends WindowProps = WindowProps> {
|
|
|
71
96
|
*/
|
|
72
97
|
windowContent: FC<AppProps>;
|
|
73
98
|
/**
|
|
74
|
-
* Default options that get passed to the {@link
|
|
99
|
+
* Default options that get passed to the {@link App.windowContent} component
|
|
75
100
|
*/
|
|
76
|
-
windowOptions?: Partial<AppProps> &
|
|
101
|
+
windowOptions?: Partial<AppProps> & DefaultWindowOptions;
|
|
77
102
|
/**
|
|
78
103
|
* Description of this application
|
|
79
104
|
*/
|
|
@@ -116,26 +141,29 @@ export declare class App<AppProps extends WindowProps = WindowProps> {
|
|
|
116
141
|
isActive: boolean;
|
|
117
142
|
isPinned?: boolean;
|
|
118
143
|
isInstalled: boolean;
|
|
119
|
-
constructor(name: App["name"], id: App["id"], windowContent: App<AppProps>["windowContent"], windowOptions?: Partial<AppProps> &
|
|
144
|
+
constructor(name: App["name"], id: App["id"], windowContent: App<AppProps>["windowContent"], windowOptions?: Partial<AppProps> & DefaultWindowOptions);
|
|
145
|
+
/**
|
|
146
|
+
* Returns the component that renders the content of a window for this app
|
|
147
|
+
*/
|
|
120
148
|
WindowContent: (props: AppProps) => JSX_2.Element | null;
|
|
121
149
|
/**
|
|
122
|
-
*
|
|
150
|
+
* Sets the display name of this application
|
|
123
151
|
*/
|
|
124
152
|
setName(name: string): this;
|
|
125
153
|
/**
|
|
126
|
-
*
|
|
154
|
+
* Sets the description of this application
|
|
127
155
|
*/
|
|
128
156
|
setDescription(description: App["description"]): this;
|
|
129
157
|
/**
|
|
130
|
-
*
|
|
158
|
+
* Sets the URL of the icon of this application
|
|
131
159
|
*/
|
|
132
160
|
setIconUrl(iconUrl: App["iconUrl"]): this;
|
|
133
161
|
/**
|
|
134
|
-
*
|
|
162
|
+
* Sets the role of this application
|
|
135
163
|
*/
|
|
136
164
|
setRole(role: string | null): this;
|
|
137
165
|
/**
|
|
138
|
-
*
|
|
166
|
+
* Sets the associated extensions of this application
|
|
139
167
|
*/
|
|
140
168
|
setAssociatedExtensions(extensions: string[] | null): this;
|
|
141
169
|
/**
|
|
@@ -151,11 +179,11 @@ export declare class App<AppProps extends WindowProps = WindowProps> {
|
|
|
151
179
|
*/
|
|
152
180
|
setInstalled(installed: boolean): this;
|
|
153
181
|
/**
|
|
154
|
-
*
|
|
182
|
+
* Sets the category this application belongs to
|
|
155
183
|
*/
|
|
156
184
|
setCategory(category: typeof APP_CATEGORIES[number] | null): this;
|
|
157
185
|
/**
|
|
158
|
-
*
|
|
186
|
+
* Sets the metadata for this application
|
|
159
187
|
*/
|
|
160
188
|
setMetadata(metadata: AppMetadata | null): this;
|
|
161
189
|
/**
|
|
@@ -163,16 +191,16 @@ export declare class App<AppProps extends WindowProps = WindowProps> {
|
|
|
163
191
|
*/
|
|
164
192
|
setShowDesktopIcon(showDesktopIcon: boolean): this;
|
|
165
193
|
/**
|
|
166
|
-
*
|
|
194
|
+
* Sets the default options for the {@link App.windowContent} component
|
|
167
195
|
*/
|
|
168
|
-
setWindowOptions(windowOptions: Partial<AppProps> &
|
|
196
|
+
setWindowOptions(windowOptions: Partial<AppProps> & DefaultWindowOptions): this;
|
|
169
197
|
}
|
|
170
198
|
|
|
171
199
|
export declare const APP_CATEGORIES: readonly ["Business", "Developer tools", "Education", "Entertainment", "Food & dining", "Health & fitness", "Kids & family", "Lifestyle", "Media", "Medical", "Multimedia design", "Music", "Navigation & maps", "News & weather", "Personal finance", "Personalization", "Photo & video", "Productivity", "Security", "Shopping", "Social", "Sports", "Travel", "Utilities & tools"];
|
|
172
200
|
|
|
173
201
|
export declare const appCenter: App<WindowProps>;
|
|
174
202
|
|
|
175
|
-
declare interface AppMetadata {
|
|
203
|
+
export declare interface AppMetadata {
|
|
176
204
|
name: string;
|
|
177
205
|
version: `${number}.${number}.${number}`;
|
|
178
206
|
author: string;
|
|
@@ -208,13 +236,15 @@ export declare class AppsConfig {
|
|
|
208
236
|
getAppsByCategory(category: typeof APP_CATEGORIES[number]): App[];
|
|
209
237
|
}
|
|
210
238
|
|
|
211
|
-
declare interface AppsConfigOptions {
|
|
239
|
+
export declare interface AppsConfigOptions {
|
|
212
240
|
/**
|
|
213
241
|
* An array of applications
|
|
214
242
|
*/
|
|
215
243
|
apps: App<WindowProps>[];
|
|
216
244
|
}
|
|
217
245
|
|
|
246
|
+
export declare const AUDIO_EXTENSIONS: string[];
|
|
247
|
+
|
|
218
248
|
export declare const browser: App<BrowserProps>;
|
|
219
249
|
|
|
220
250
|
declare interface BrowserProps extends WindowProps {
|
|
@@ -223,7 +253,7 @@ declare interface BrowserProps extends WindowProps {
|
|
|
223
253
|
|
|
224
254
|
export declare function Button({ className, href, children, icon, target, ...props }: ButtonProps): JSX_2.Element;
|
|
225
255
|
|
|
226
|
-
declare interface ButtonProps {
|
|
256
|
+
export declare interface ButtonProps {
|
|
227
257
|
className?: string;
|
|
228
258
|
href?: string;
|
|
229
259
|
icon?: IconProp;
|
|
@@ -236,7 +266,7 @@ export declare const calculator: App<WindowProps>;
|
|
|
236
266
|
|
|
237
267
|
export declare const ClickAction: MemoExoticComponent<({ actionId, label, shortcut, disabled, onTrigger, icon }: ClickActionProps) => JSX_2.Element>;
|
|
238
268
|
|
|
239
|
-
declare interface ClickActionProps extends ActionProps {
|
|
269
|
+
export declare interface ClickActionProps extends ActionProps {
|
|
240
270
|
icon?: string | object;
|
|
241
271
|
}
|
|
242
272
|
|
|
@@ -248,10 +278,47 @@ export declare function closeViewport(requireConfirmation: boolean | undefined,
|
|
|
248
278
|
|
|
249
279
|
export declare const CODE_EXTENSIONS: string[];
|
|
250
280
|
|
|
281
|
+
export declare class Command {
|
|
282
|
+
#private;
|
|
283
|
+
options: Option_2[];
|
|
284
|
+
manual?: Manual;
|
|
285
|
+
requireArgs?: boolean;
|
|
286
|
+
requireOptions?: boolean;
|
|
287
|
+
execute: Execute;
|
|
288
|
+
setName(name?: string): Command;
|
|
289
|
+
get name(): string;
|
|
290
|
+
setExecute(execute: Execute): Command;
|
|
291
|
+
setRequireArgs(value: boolean): Command;
|
|
292
|
+
setRequireOptions(value: boolean): Command;
|
|
293
|
+
setManual({ purpose, usage, description, options }: Manual): Command;
|
|
294
|
+
addOption({ short, long, isInput }: Option_2): Command;
|
|
295
|
+
getOption(key: string): Option_2 | null;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
export declare type CommandResponse = string | {
|
|
299
|
+
blank: boolean;
|
|
300
|
+
} | void | Stream;
|
|
301
|
+
|
|
302
|
+
export declare class CommandsManager {
|
|
303
|
+
static COMMANDS: Command[];
|
|
304
|
+
static addCommand(command: Command): void;
|
|
305
|
+
static find(name: string): Command | null;
|
|
306
|
+
static search(pattern: string): Command[];
|
|
307
|
+
static reload(): void;
|
|
308
|
+
}
|
|
309
|
+
|
|
251
310
|
export declare function copyToClipboard(string: string, onSuccess?: (value: void) => void, onFail?: (value: void) => void): void;
|
|
252
311
|
|
|
253
312
|
export declare function DefaultRoute(): JSX_2.Element;
|
|
254
313
|
|
|
314
|
+
export declare interface DefaultWindowOptions {
|
|
315
|
+
size?: Vector2;
|
|
316
|
+
[key: string]: unknown;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Component that renders the wallpaper and desktop icons
|
|
321
|
+
*/
|
|
255
322
|
export declare const Desktop: MemoExoticComponent<() => JSX_2.Element>;
|
|
256
323
|
|
|
257
324
|
export declare class DesktopConfig {
|
|
@@ -260,12 +327,14 @@ export declare class DesktopConfig {
|
|
|
260
327
|
constructor(options?: Partial<DesktopConfigOptions>);
|
|
261
328
|
}
|
|
262
329
|
|
|
263
|
-
declare interface DesktopConfigOptions {
|
|
330
|
+
export declare interface DesktopConfigOptions {
|
|
264
331
|
/**
|
|
332
|
+
* The default size of the icons
|
|
265
333
|
* @default 1
|
|
266
334
|
*/
|
|
267
335
|
defaultIconSize: 0 | 1 | 2;
|
|
268
336
|
/**
|
|
337
|
+
* The defailt direction of the icons
|
|
269
338
|
* 0: vertical, 1: horizontal
|
|
270
339
|
* @default 0
|
|
271
340
|
* */
|
|
@@ -274,36 +343,58 @@ declare interface DesktopConfigOptions {
|
|
|
274
343
|
|
|
275
344
|
export declare function DialogBox({ modal, params, children, ...props }: ModalProps): JSX_2.Element;
|
|
276
345
|
|
|
346
|
+
/**
|
|
347
|
+
* Component that displays the contents of a directory
|
|
348
|
+
*/
|
|
277
349
|
export declare function DirectoryList({ directory, showHidden, folderClassName, fileClassName, className, onContextMenuFile, onContextMenuFolder, onOpenFile, onOpenFolder, allowMultiSelect, onSelectionChange, ...props }: DirectoryListProps): ReactElement | null;
|
|
278
350
|
|
|
279
|
-
declare interface DirectoryListProps {
|
|
351
|
+
export declare interface DirectoryListProps {
|
|
352
|
+
/** The directory to display */
|
|
280
353
|
directory: VirtualFolder;
|
|
354
|
+
/** Whether to show hidden files and folders */
|
|
281
355
|
showHidden?: boolean;
|
|
356
|
+
/** `className` prop for folders */
|
|
282
357
|
folderClassName?: string;
|
|
358
|
+
/** `className` prop for files */
|
|
283
359
|
fileClassName?: string;
|
|
360
|
+
/** `className` prop for this component */
|
|
284
361
|
className?: string;
|
|
362
|
+
/** Function that handles context menu interactions on files */
|
|
285
363
|
onContextMenuFile?: FileEventHandler;
|
|
364
|
+
/** Function that handles context menu interactions on folders */
|
|
286
365
|
onContextMenuFolder?: FolderEventHandler;
|
|
366
|
+
/** Function that handles file opening events */
|
|
287
367
|
onOpenFile?: FileEventHandler;
|
|
368
|
+
/** Function that handles folder opening events */
|
|
288
369
|
onOpenFolder?: FolderEventHandler;
|
|
370
|
+
/** Whether to allow multiple files and folders to be selected at the same time */
|
|
289
371
|
allowMultiSelect?: boolean;
|
|
372
|
+
/** Function that handles selection changes */
|
|
290
373
|
onSelectionChange?: (params: OnSelectionChangeParams) => void;
|
|
291
374
|
[key: string]: unknown;
|
|
292
375
|
}
|
|
293
376
|
|
|
294
377
|
export declare function Divider(): JSX_2.Element;
|
|
295
378
|
|
|
379
|
+
export declare function downloadUrl(url: string, name: string): void;
|
|
380
|
+
|
|
296
381
|
export declare function DropdownAction({ label, icon, children, showOnHover }: DropdownActionProps): ReactElement;
|
|
297
382
|
|
|
298
|
-
declare interface DropdownActionProps extends ActionProps {
|
|
383
|
+
export declare interface DropdownActionProps extends ActionProps {
|
|
299
384
|
showOnHover?: boolean;
|
|
300
385
|
}
|
|
301
386
|
|
|
387
|
+
/**
|
|
388
|
+
* Component that opens a dropdown menu
|
|
389
|
+
*/
|
|
302
390
|
export declare function DropdownButton({ label, options, shortcuts }: DropdownButtonProps): JSX_2.Element;
|
|
303
391
|
|
|
304
|
-
declare interface DropdownButtonProps {
|
|
392
|
+
export declare interface DropdownButtonProps {
|
|
393
|
+
/** The label of the button */
|
|
305
394
|
label: string;
|
|
395
|
+
/** The options in the dropdown menu mapped to the function that handles their selection */
|
|
306
396
|
options: Record<string, () => void>;
|
|
397
|
+
/** The keyboard shortcut for options in the dropdown menu */
|
|
307
398
|
shortcuts: Record<string, string[]>;
|
|
308
399
|
}
|
|
309
400
|
|
|
@@ -313,11 +404,11 @@ declare class EventEmitter<EventMap extends EventNamesMap> {
|
|
|
313
404
|
/**
|
|
314
405
|
* Add event listener for an event
|
|
315
406
|
*/
|
|
316
|
-
on<Key extends keyof EventMap>(eventName: Key, callback:
|
|
407
|
+
on<Key extends keyof EventMap>(eventName: Key, callback: Listener): Listener;
|
|
317
408
|
/**
|
|
318
409
|
* Remove event listener for an event
|
|
319
410
|
*/
|
|
320
|
-
off<Key extends keyof EventMap>(eventName: Key, callback:
|
|
411
|
+
off<Key extends keyof EventMap>(eventName: Key, callback: Listener): void;
|
|
321
412
|
/**
|
|
322
413
|
* Dispatch event
|
|
323
414
|
*/
|
|
@@ -326,6 +417,26 @@ declare class EventEmitter<EventMap extends EventNamesMap> {
|
|
|
326
417
|
|
|
327
418
|
declare type EventNamesMap = Record<string, string>;
|
|
328
419
|
|
|
420
|
+
declare type Execute = (args?: string[], params?: ExecuteParams) => CommandResponse | Promise<CommandResponse>;
|
|
421
|
+
|
|
422
|
+
export declare type ExecuteParams = {
|
|
423
|
+
promptOutput?: (text: string) => void;
|
|
424
|
+
pushHistory?: (entry: HistoryEntry) => void;
|
|
425
|
+
virtualRoot?: VirtualRoot;
|
|
426
|
+
currentDirectory: VirtualFolder;
|
|
427
|
+
setCurrentDirectory?: Dispatch<SetStateAction<VirtualFolder>>;
|
|
428
|
+
username?: string;
|
|
429
|
+
hostname?: string;
|
|
430
|
+
rawInputValue?: string;
|
|
431
|
+
options?: string[];
|
|
432
|
+
exit?: () => void;
|
|
433
|
+
inputs?: Record<string, string>;
|
|
434
|
+
timestamp: number;
|
|
435
|
+
settingsManager: SettingsManager;
|
|
436
|
+
systemManager: SystemManager;
|
|
437
|
+
app: App;
|
|
438
|
+
};
|
|
439
|
+
|
|
329
440
|
export declare const FILE_SCHEMES: {
|
|
330
441
|
external: string;
|
|
331
442
|
app: string;
|
|
@@ -358,9 +469,9 @@ export declare type FolderEventHandler = (event: Event, folder: VirtualFolder) =
|
|
|
358
469
|
*/
|
|
359
470
|
export declare function formatShortcut(shortcut: string[]): string;
|
|
360
471
|
|
|
361
|
-
export declare function generateUrl(options:
|
|
472
|
+
export declare function generateUrl(options: GenerateUrlParams): string;
|
|
362
473
|
|
|
363
|
-
declare interface
|
|
474
|
+
export declare interface GenerateUrlParams {
|
|
364
475
|
appId?: string;
|
|
365
476
|
fullscreen?: boolean;
|
|
366
477
|
standalone?: boolean;
|
|
@@ -368,8 +479,18 @@ declare interface GenerateUrlOptions {
|
|
|
368
479
|
|
|
369
480
|
export declare function getViewportParams(): Record<string, string>;
|
|
370
481
|
|
|
482
|
+
/**
|
|
483
|
+
* Component that shows a header menu at the top of a window
|
|
484
|
+
*/
|
|
371
485
|
export declare function HeaderMenu({ children, ...props }: ActionsProps): JSX_2.Element;
|
|
372
486
|
|
|
487
|
+
declare interface HistoryEntry {
|
|
488
|
+
text?: string;
|
|
489
|
+
isInput: boolean;
|
|
490
|
+
value?: string;
|
|
491
|
+
clear?: boolean;
|
|
492
|
+
}
|
|
493
|
+
|
|
373
494
|
declare function Image_2({ className, src, ...props }: ImageProps): JSX_2.Element;
|
|
374
495
|
export { Image_2 as Image }
|
|
375
496
|
|
|
@@ -377,22 +498,27 @@ export declare const IMAGE_EXTENSIONS: string[];
|
|
|
377
498
|
|
|
378
499
|
export declare function ImagePreview({ source, className, onError, ...props }: ImagePreviewProps): JSX_2.Element;
|
|
379
500
|
|
|
380
|
-
declare interface ImagePreviewProps {
|
|
501
|
+
export declare interface ImagePreviewProps {
|
|
381
502
|
source: string;
|
|
382
503
|
className?: string;
|
|
383
504
|
onError?: () => void;
|
|
384
505
|
}
|
|
385
506
|
|
|
386
|
-
declare interface ImageProps {
|
|
507
|
+
export declare interface ImageProps {
|
|
387
508
|
className?: string;
|
|
388
509
|
src?: string;
|
|
389
510
|
[key: string]: unknown;
|
|
390
511
|
}
|
|
391
512
|
|
|
513
|
+
/**
|
|
514
|
+
* Button component that handles single and double clicks
|
|
515
|
+
*/
|
|
392
516
|
export declare function Interactable({ onClick, onDoubleClick, children, ...props }: InteractableProps): JSX_2.Element;
|
|
393
517
|
|
|
394
|
-
declare interface InteractableProps {
|
|
518
|
+
export declare interface InteractableProps {
|
|
519
|
+
/** Function that handles single clicks */
|
|
395
520
|
onClick?: (event: MouseEvent) => void;
|
|
521
|
+
/** Function that handles double clicks */
|
|
396
522
|
onDoubleClick?: (event: MouseEvent) => void;
|
|
397
523
|
children: ReactNode;
|
|
398
524
|
[key: string]: unknown;
|
|
@@ -400,6 +526,17 @@ declare interface InteractableProps {
|
|
|
400
526
|
|
|
401
527
|
export declare function isValidUrl(string: string): boolean;
|
|
402
528
|
|
|
529
|
+
declare type Listener = (data: unknown) => void;
|
|
530
|
+
|
|
531
|
+
declare type Manual = {
|
|
532
|
+
purpose?: string;
|
|
533
|
+
usage?: string;
|
|
534
|
+
description?: string;
|
|
535
|
+
options?: object;
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
export declare const MEDIA_EXTENSIONS: string[];
|
|
539
|
+
|
|
403
540
|
export declare const mediaViewer: App<MediaViewerProps>;
|
|
404
541
|
|
|
405
542
|
declare interface MediaViewerProps extends WindowProps {
|
|
@@ -411,7 +548,7 @@ export declare class MiscConfig {
|
|
|
411
548
|
constructor(options?: Partial<MiscConfigOptions>);
|
|
412
549
|
}
|
|
413
550
|
|
|
414
|
-
declare interface MiscConfigOptions {
|
|
551
|
+
export declare interface MiscConfigOptions {
|
|
415
552
|
/**
|
|
416
553
|
* The maximum time between two clicks to register as a double click (in ms)
|
|
417
554
|
* @default 250
|
|
@@ -419,17 +556,49 @@ declare interface MiscConfigOptions {
|
|
|
419
556
|
doubleClickDelay: number;
|
|
420
557
|
}
|
|
421
558
|
|
|
422
|
-
|
|
559
|
+
/**
|
|
560
|
+
* Represents a modal window
|
|
561
|
+
*/
|
|
562
|
+
export declare class Modal {
|
|
563
|
+
/**
|
|
564
|
+
* The size of this modal
|
|
565
|
+
* @default new Vector2(400, 200)
|
|
566
|
+
*/
|
|
423
567
|
size: Vector2;
|
|
568
|
+
/**
|
|
569
|
+
* The position of this modal
|
|
570
|
+
* @default new Vector2(300, 300)
|
|
571
|
+
*/
|
|
424
572
|
position: Vector2;
|
|
573
|
+
/**
|
|
574
|
+
* The icon of this modal
|
|
575
|
+
* @default null
|
|
576
|
+
*/
|
|
425
577
|
icon: string | null;
|
|
578
|
+
/**
|
|
579
|
+
* The title of this modal
|
|
580
|
+
* @default null
|
|
581
|
+
*/
|
|
426
582
|
title: string | null;
|
|
583
|
+
/**
|
|
584
|
+
* The manager that handles all modals
|
|
585
|
+
*/
|
|
427
586
|
modalsManager: ModalsManager | null;
|
|
587
|
+
/**
|
|
588
|
+
* The content of this modal
|
|
589
|
+
* @default null
|
|
590
|
+
*/
|
|
428
591
|
element: FC<ModalProps> | null;
|
|
429
592
|
props: object;
|
|
430
593
|
callback: ((...args: unknown[]) => void) | null;
|
|
594
|
+
/** The ID of this modal */
|
|
431
595
|
id: number | null;
|
|
596
|
+
/**
|
|
597
|
+
* Whether this modal can be dismissed (e.g., by pressing ESC)
|
|
598
|
+
* @default true
|
|
599
|
+
*/
|
|
432
600
|
dismissible: boolean;
|
|
601
|
+
/** Timestamp of the most recent interaction with this modal */
|
|
433
602
|
lastInteraction?: number;
|
|
434
603
|
constructor(element: Modal["element"], callback?: Modal["callback"]);
|
|
435
604
|
setIcon(icon: string): Modal;
|
|
@@ -448,6 +617,7 @@ declare class Modal {
|
|
|
448
617
|
}
|
|
449
618
|
|
|
450
619
|
export declare interface ModalProps {
|
|
620
|
+
/** */
|
|
451
621
|
modal?: Modal;
|
|
452
622
|
params?: {
|
|
453
623
|
appId?: string;
|
|
@@ -471,7 +641,7 @@ export declare class ModalsConfig {
|
|
|
471
641
|
constructor(options?: Partial<ModalsConfigOptions>);
|
|
472
642
|
}
|
|
473
643
|
|
|
474
|
-
declare interface ModalsConfigOptions {
|
|
644
|
+
export declare interface ModalsConfigOptions {
|
|
475
645
|
/**
|
|
476
646
|
* Default size of a dialog box
|
|
477
647
|
* @default new Vector2(400, 200)
|
|
@@ -484,71 +654,132 @@ declare interface ModalsConfigOptions {
|
|
|
484
654
|
defaultFileSelectorSize: Vector2;
|
|
485
655
|
}
|
|
486
656
|
|
|
657
|
+
/**
|
|
658
|
+
* Manages the opening, closing and ordering of modals
|
|
659
|
+
*/
|
|
487
660
|
export declare class ModalsManager {
|
|
661
|
+
/** Maps every modal ID to the corresponding modal */
|
|
488
662
|
modals: Record<string, Modal>;
|
|
489
663
|
containerRef?: MutableRefObject<HTMLElement>;
|
|
664
|
+
/** Function that handles changes to modals */
|
|
490
665
|
updateModals: (modals: ModalsManager["modals"]) => void;
|
|
491
666
|
/**
|
|
667
|
+
* Opens a modal
|
|
492
668
|
* @param single - Set to false to preserve other open modals
|
|
493
669
|
*/
|
|
494
670
|
open(modal: Modal, single?: boolean): void;
|
|
671
|
+
/**
|
|
672
|
+
* Closes a modal
|
|
673
|
+
* @param modalId The ID of the modal to close
|
|
674
|
+
*/
|
|
495
675
|
close(modalId: string | number, sendModalsUpdate?: boolean): void;
|
|
676
|
+
/**
|
|
677
|
+
* Brings a modal into focus
|
|
678
|
+
* @param modalId The ID of the modal to bring into focus
|
|
679
|
+
*/
|
|
496
680
|
focus(modalId: string): void;
|
|
497
681
|
setUpdateModals(updateModals: ModalsManager["updateModals"]): void;
|
|
682
|
+
/**
|
|
683
|
+
* Returns the IDs of all open modals
|
|
684
|
+
*/
|
|
498
685
|
get modalIds(): string[];
|
|
499
686
|
static getModalIconUrl(name: string): string;
|
|
500
687
|
}
|
|
501
688
|
|
|
502
|
-
declare
|
|
689
|
+
export declare const modalsManagerContext: Context<ModalsManagerState>;
|
|
690
|
+
|
|
691
|
+
export declare type ModalsManagerState = ModalsManager | undefined;
|
|
503
692
|
|
|
693
|
+
/**
|
|
694
|
+
* Component that renders all active modals
|
|
695
|
+
*/
|
|
504
696
|
export declare const ModalsView: MemoExoticComponent<() => JSX_2.Element>;
|
|
505
697
|
|
|
506
698
|
export declare function NoRoute(): JSX_2.Element;
|
|
507
699
|
|
|
700
|
+
export declare interface NoRouteProps {
|
|
701
|
+
/**
|
|
702
|
+
* Title of the route
|
|
703
|
+
* @default "404: Not Found"
|
|
704
|
+
*/
|
|
705
|
+
title: string;
|
|
706
|
+
}
|
|
707
|
+
|
|
508
708
|
export declare interface OnSelectionChangeParams {
|
|
709
|
+
/** The selected files */
|
|
509
710
|
files?: string[];
|
|
711
|
+
/** The selected folders */
|
|
510
712
|
folders?: string[];
|
|
713
|
+
/** The directory the selection was made in */
|
|
511
714
|
directory?: VirtualFolder;
|
|
512
715
|
}
|
|
513
716
|
|
|
514
717
|
export declare function openUrl(url: string, target?: HTMLAttributeAnchorTarget): void;
|
|
515
718
|
|
|
516
|
-
declare type OpenWindowedModal = (params: OpenWindowedModalParams) => Modal;
|
|
719
|
+
export declare type OpenWindowedModal = (params: OpenWindowedModalParams) => Modal;
|
|
517
720
|
|
|
518
|
-
declare interface OpenWindowedModalParams {
|
|
721
|
+
export declare interface OpenWindowedModalParams {
|
|
722
|
+
/** The ID of the associated app */
|
|
519
723
|
appId?: string;
|
|
724
|
+
/** The URL of the icon of the modal */
|
|
520
725
|
iconUrl?: string;
|
|
726
|
+
/** The title of the modal */
|
|
521
727
|
title?: string;
|
|
728
|
+
/** The size of the modal */
|
|
522
729
|
size: Vector2;
|
|
730
|
+
/** The modal component */
|
|
523
731
|
Modal: FC<ModalProps>;
|
|
524
732
|
single?: boolean;
|
|
525
733
|
fullscreen?: WindowProps["fullscreen"];
|
|
526
734
|
}
|
|
527
735
|
|
|
528
|
-
declare type
|
|
736
|
+
declare type Option_2 = {
|
|
737
|
+
long: string;
|
|
738
|
+
short: string;
|
|
739
|
+
isInput: boolean;
|
|
740
|
+
};
|
|
529
741
|
|
|
742
|
+
export declare type OptionalStringProperty = string | null | undefined;
|
|
743
|
+
|
|
744
|
+
/**
|
|
745
|
+
* Component that calls a function when the user clicks outside of it
|
|
746
|
+
*/
|
|
530
747
|
export declare const OutsideClickListener: MemoExoticComponent<({ onOutsideClick, children }: OutsideClickListenerProps) => JSX_2.Element>;
|
|
531
748
|
|
|
532
|
-
declare interface OutsideClickListenerProps {
|
|
749
|
+
export declare interface OutsideClickListenerProps {
|
|
750
|
+
/** Function that handles clicks outside of this component */
|
|
533
751
|
onOutsideClick: (event: Event) => void;
|
|
534
752
|
children: ReactNode;
|
|
535
753
|
}
|
|
536
754
|
|
|
755
|
+
/**
|
|
756
|
+
* Component that renders a progress bar
|
|
757
|
+
*/
|
|
537
758
|
export declare function ProgressBar({ fillPercentage, fillColor, backgroundColor, align, className }: ProgressBarProps): JSX_2.Element;
|
|
538
759
|
|
|
539
|
-
declare interface ProgressBarProps {
|
|
760
|
+
export declare interface ProgressBarProps {
|
|
761
|
+
/** The amount of progress, as a percentage */
|
|
540
762
|
fillPercentage: number;
|
|
763
|
+
/** The CSS color to use for the filled part of the progress bar */
|
|
541
764
|
fillColor?: string;
|
|
765
|
+
/** The CSS background color of the progress bar */
|
|
542
766
|
backgroundColor?: string;
|
|
543
767
|
align?: "left";
|
|
768
|
+
/** `className` prop for the progress bar */
|
|
544
769
|
className?: string;
|
|
545
770
|
}
|
|
546
771
|
|
|
772
|
+
/**
|
|
773
|
+
* Main component that contains everything
|
|
774
|
+
*/
|
|
547
775
|
export declare const ProzillaOS: NamedExoticComponent<ProzillaOSProps>;
|
|
548
776
|
|
|
549
|
-
declare interface ProzillaOSProps {
|
|
777
|
+
export declare interface ProzillaOSProps {
|
|
778
|
+
/** The name of the system */
|
|
550
779
|
systemName?: string;
|
|
780
|
+
/** The tagline/short description of the system */
|
|
551
781
|
tagLine?: string;
|
|
782
|
+
/** The system configuration */
|
|
552
783
|
config?: {
|
|
553
784
|
apps?: Partial<AppsConfigOptions>;
|
|
554
785
|
desktop?: Partial<DesktopConfigOptions>;
|
|
@@ -575,7 +806,7 @@ export declare function RadioAction({ actionId, options, initialIndex, onTrigger
|
|
|
575
806
|
* @param {number} props.initialIndex
|
|
576
807
|
* @param {Function} props.onTrigger
|
|
577
808
|
*/
|
|
578
|
-
declare interface RadioActionProps extends ActionProps {
|
|
809
|
+
export declare interface RadioActionProps extends ActionProps {
|
|
579
810
|
options: {
|
|
580
811
|
label: string;
|
|
581
812
|
shortcut?: string[];
|
|
@@ -594,14 +825,14 @@ export declare function removeUrlProtocol(url: string): string;
|
|
|
594
825
|
|
|
595
826
|
export declare function Router({ path, homePage, fallbackPage, children }: RouterProps): JSX_2.Element;
|
|
596
827
|
|
|
597
|
-
declare interface RouterProps {
|
|
828
|
+
export declare interface RouterProps {
|
|
598
829
|
path?: string;
|
|
599
830
|
homePage?: JSX.Element;
|
|
600
831
|
fallbackPage?: JSX.Element;
|
|
601
832
|
children?: ReactElement;
|
|
602
833
|
}
|
|
603
834
|
|
|
604
|
-
declare class Settings {
|
|
835
|
+
export declare class Settings {
|
|
605
836
|
#private;
|
|
606
837
|
path: string;
|
|
607
838
|
file: VirtualFile;
|
|
@@ -617,10 +848,39 @@ declare class Settings {
|
|
|
617
848
|
*/
|
|
618
849
|
isMissingXmlDoc(): Promise<boolean>;
|
|
619
850
|
/**
|
|
620
|
-
* Gets a value by a given key if it exists
|
|
851
|
+
* Gets a value by a given key if it exists and optionally calls a callback function whenever the value changes
|
|
852
|
+
* @param key The key of the setting
|
|
853
|
+
* @param callback The callback function to call whenever the value changes
|
|
854
|
+
*/
|
|
855
|
+
get(key: string, callback?: (value: string) => void): Promise<{
|
|
856
|
+
value: string | null;
|
|
857
|
+
listener?: Listener;
|
|
858
|
+
}>;
|
|
859
|
+
/**
|
|
860
|
+
* Gets a value by a given key as a boolean
|
|
861
|
+
*/
|
|
862
|
+
getBool(key: string, callback?: (value: boolean) => void): Promise<{
|
|
863
|
+
value: boolean | null;
|
|
864
|
+
listener?: Listener;
|
|
865
|
+
}>;
|
|
866
|
+
/**
|
|
867
|
+
* Gets a value by a given key as an integer
|
|
868
|
+
*/
|
|
869
|
+
getInt(key: string, callback?: (value: number) => void): Promise<{
|
|
870
|
+
value: number | null;
|
|
871
|
+
listener?: Listener;
|
|
872
|
+
}>;
|
|
873
|
+
/**
|
|
874
|
+
* Sets the value associated with a given key
|
|
875
|
+
* @param key The key of the setting
|
|
876
|
+
* @param value The new value
|
|
621
877
|
*/
|
|
622
|
-
get(key: string, callback?: (value: string) => void): Promise<string | null>;
|
|
623
878
|
set(key: string, value: string): Promise<void>;
|
|
879
|
+
/**
|
|
880
|
+
* Removes a listener from the settings file
|
|
881
|
+
* @param listener The listener to remove
|
|
882
|
+
*/
|
|
883
|
+
removeListener(listener: Listener): void;
|
|
624
884
|
}
|
|
625
885
|
|
|
626
886
|
export declare const settings: App<SettingsProps>;
|
|
@@ -634,7 +894,11 @@ export declare class SettingsManager {
|
|
|
634
894
|
getSettings(path: string): Settings;
|
|
635
895
|
}
|
|
636
896
|
|
|
637
|
-
declare
|
|
897
|
+
export declare const SettingsManagerContext: Context<SettingsManagerState>;
|
|
898
|
+
|
|
899
|
+
export declare type SettingsManagerState = SettingsManager | undefined;
|
|
900
|
+
|
|
901
|
+
export declare type SettingsPath = typeof SettingsManager.VIRTUAL_PATHS[string];
|
|
638
902
|
|
|
639
903
|
declare interface SettingsProps extends WindowProps {
|
|
640
904
|
tab?: number;
|
|
@@ -697,6 +961,8 @@ declare interface SkinOptions {
|
|
|
697
961
|
text?: string;
|
|
698
962
|
code?: string;
|
|
699
963
|
external?: string;
|
|
964
|
+
video?: string;
|
|
965
|
+
audio?: string;
|
|
700
966
|
};
|
|
701
967
|
/**
|
|
702
968
|
* URLs of icons for types of folders
|
|
@@ -706,6 +972,8 @@ declare interface SkinOptions {
|
|
|
706
972
|
images?: string;
|
|
707
973
|
text?: string;
|
|
708
974
|
link?: string;
|
|
975
|
+
video?: string;
|
|
976
|
+
audio?: string;
|
|
709
977
|
};
|
|
710
978
|
/**
|
|
711
979
|
* Function that dynamically imports style sheet
|
|
@@ -719,7 +987,7 @@ declare interface SkinOptions {
|
|
|
719
987
|
|
|
720
988
|
export declare function StandaloneRoute({ app }: StandaloneRouteProps): JSX_2.Element;
|
|
721
989
|
|
|
722
|
-
declare interface StandaloneRouteProps {
|
|
990
|
+
export declare interface StandaloneRouteProps {
|
|
723
991
|
app: App;
|
|
724
992
|
}
|
|
725
993
|
|
|
@@ -733,9 +1001,29 @@ declare class StorageManager_2 {
|
|
|
733
1001
|
}
|
|
734
1002
|
export { StorageManager_2 as StorageManager }
|
|
735
1003
|
|
|
1004
|
+
export declare class Stream extends EventEmitter_2<typeof StreamEvents> {
|
|
1005
|
+
static EVENT_NAMES: {
|
|
1006
|
+
readonly new: "new";
|
|
1007
|
+
readonly start: "start";
|
|
1008
|
+
readonly stop: "stop";
|
|
1009
|
+
};
|
|
1010
|
+
enabled: boolean;
|
|
1011
|
+
start(callback?: (stream: this) => void): Stream;
|
|
1012
|
+
stop(): Stream;
|
|
1013
|
+
send(text: string): Stream;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
declare const StreamEvents: {
|
|
1017
|
+
readonly new: "new";
|
|
1018
|
+
readonly start: "start";
|
|
1019
|
+
readonly stop: "stop";
|
|
1020
|
+
};
|
|
1021
|
+
|
|
736
1022
|
export declare class SystemManager {
|
|
737
1023
|
#private;
|
|
1024
|
+
/** The name of the system */
|
|
738
1025
|
readonly systemName: string;
|
|
1026
|
+
/** The tagline/short description of the system */
|
|
739
1027
|
readonly tagLine: string;
|
|
740
1028
|
readonly skin: Skin;
|
|
741
1029
|
readonly appsConfig: AppsConfig;
|
|
@@ -751,7 +1039,9 @@ export declare class SystemManager {
|
|
|
751
1039
|
getUptime(precision?: number): string;
|
|
752
1040
|
}
|
|
753
1041
|
|
|
754
|
-
declare
|
|
1042
|
+
export declare const SystemManagerContext: Context<SystemManager | undefined>;
|
|
1043
|
+
|
|
1044
|
+
export declare interface SystemManagerParams {
|
|
755
1045
|
systemName: SystemManager["systemName"] | null;
|
|
756
1046
|
tagLine: SystemManager["tagLine"] | null;
|
|
757
1047
|
skin?: SystemManager["skin"];
|
|
@@ -765,6 +1055,9 @@ declare interface SystemManagerParams {
|
|
|
765
1055
|
virtualDriveConfig: VirtualDriveConfig;
|
|
766
1056
|
}
|
|
767
1057
|
|
|
1058
|
+
/**
|
|
1059
|
+
* Component that renders the start and search menus, pinned applications and various indicators
|
|
1060
|
+
*/
|
|
768
1061
|
export declare const Taskbar: MemoExoticComponent<() => JSX_2.Element>;
|
|
769
1062
|
|
|
770
1063
|
export declare class TaskbarConfig {
|
|
@@ -772,7 +1065,7 @@ export declare class TaskbarConfig {
|
|
|
772
1065
|
constructor(options?: Partial<TaskbarConfigOptions>);
|
|
773
1066
|
}
|
|
774
1067
|
|
|
775
|
-
declare interface TaskbarConfigOptions {
|
|
1068
|
+
export declare interface TaskbarConfigOptions {
|
|
776
1069
|
/**
|
|
777
1070
|
* Height of the taskbar in CSS pixels
|
|
778
1071
|
* @default 3 * 16
|
|
@@ -780,7 +1073,13 @@ declare interface TaskbarConfigOptions {
|
|
|
780
1073
|
height: number;
|
|
781
1074
|
}
|
|
782
1075
|
|
|
783
|
-
export declare const terminal:
|
|
1076
|
+
export declare const terminal: TerminalApp;
|
|
1077
|
+
|
|
1078
|
+
export declare class TerminalApp extends App<TerminalProps> {
|
|
1079
|
+
constructor();
|
|
1080
|
+
addCommands(commands: Command[]): this;
|
|
1081
|
+
addCommand(command: Command): this;
|
|
1082
|
+
}
|
|
784
1083
|
|
|
785
1084
|
declare interface TerminalProps extends WindowProps {
|
|
786
1085
|
path?: string;
|
|
@@ -789,7 +1088,7 @@ declare interface TerminalProps extends WindowProps {
|
|
|
789
1088
|
|
|
790
1089
|
export declare function TextDisplay({ children }: TextDisplayProps): JSX_2.Element;
|
|
791
1090
|
|
|
792
|
-
declare interface TextDisplayProps {
|
|
1091
|
+
export declare interface TextDisplayProps {
|
|
793
1092
|
children: ReactNode;
|
|
794
1093
|
}
|
|
795
1094
|
|
|
@@ -824,7 +1123,7 @@ export declare class TimeManager {
|
|
|
824
1123
|
|
|
825
1124
|
export declare function ToggleAction({ actionId, label, shortcut, initialValue, onTrigger }: ToggleActionProps): ReactElement;
|
|
826
1125
|
|
|
827
|
-
declare interface ToggleActionProps extends ActionProps {
|
|
1126
|
+
export declare interface ToggleActionProps extends ActionProps {
|
|
828
1127
|
initialValue: boolean;
|
|
829
1128
|
}
|
|
830
1129
|
|
|
@@ -834,7 +1133,7 @@ export declare class TrackingConfig {
|
|
|
834
1133
|
constructor(options?: Partial<TrackingConfigOptions>);
|
|
835
1134
|
}
|
|
836
1135
|
|
|
837
|
-
declare interface TrackingConfigOptions {
|
|
1136
|
+
export declare interface TrackingConfigOptions {
|
|
838
1137
|
/**
|
|
839
1138
|
* Enable tracking
|
|
840
1139
|
* @default true
|
|
@@ -852,65 +1151,132 @@ export declare class TrackingManager {
|
|
|
852
1151
|
event(options: UaEventOptions | string): void;
|
|
853
1152
|
}
|
|
854
1153
|
|
|
855
|
-
declare
|
|
1154
|
+
export declare const TrackingManagerContext: Context<TrackingManagerState>;
|
|
1155
|
+
|
|
1156
|
+
export declare type TrackingManagerState = TrackingManager | undefined;
|
|
856
1157
|
|
|
1158
|
+
/** Returns a function that opens an alert modal */
|
|
857
1159
|
export declare function useAlert(): {
|
|
858
|
-
alert: (
|
|
1160
|
+
alert: (params: AlertParams) => void;
|
|
859
1161
|
};
|
|
860
1162
|
|
|
1163
|
+
/**
|
|
1164
|
+
* Returns the folder associated with a given app
|
|
1165
|
+
*/
|
|
861
1166
|
export declare function useAppFolder(app?: App): VirtualFolder | null;
|
|
862
1167
|
|
|
1168
|
+
/**
|
|
1169
|
+
* Returns the boolean value of a setting and a function to update it
|
|
1170
|
+
* @param path The path of the settings file
|
|
1171
|
+
* @param key The key of the setting
|
|
1172
|
+
* @param defaultValue The default value of the setting
|
|
1173
|
+
* @returns The boolean value of a setting and a function to update it
|
|
1174
|
+
*/
|
|
1175
|
+
export declare function useBoolSetting(path: SettingsPath, key: string, defaultValue?: boolean): [boolean, (value: string | boolean) => void];
|
|
1176
|
+
|
|
863
1177
|
/**
|
|
864
1178
|
* Combine class names and an optional static class name
|
|
865
1179
|
*/
|
|
866
1180
|
export declare function useClassNames(classNames: (string | undefined)[], block?: string, element?: string, modifier?: string | string[]): string;
|
|
867
1181
|
|
|
1182
|
+
/**
|
|
1183
|
+
* Creates a function that handles the opening of a custom context menu and a component that listens for keyboard shortcuts
|
|
1184
|
+
*/
|
|
868
1185
|
export declare function useContextMenu({ Actions }: UseContextMenuParams): {
|
|
869
1186
|
onContextMenu: (event: MouseEvent_2<HTMLElement, MouseEvent_2>, params?: object) => Modal;
|
|
870
1187
|
ShortcutsListener: () => JSX_2.Element;
|
|
871
1188
|
};
|
|
872
1189
|
|
|
873
|
-
declare interface UseContextMenuParams {
|
|
1190
|
+
export declare interface UseContextMenuParams {
|
|
1191
|
+
/** The component with the actions of the context menu */
|
|
874
1192
|
Actions: FC<ActionsProps>;
|
|
875
1193
|
}
|
|
876
1194
|
|
|
1195
|
+
/**
|
|
1196
|
+
* Returns an object that handles stateful history with undo and redo methods
|
|
1197
|
+
*/
|
|
877
1198
|
export declare function useHistory<Type>(initialState: Type): {
|
|
1199
|
+
/** The entries of the history */
|
|
878
1200
|
history: Type[];
|
|
1201
|
+
/** The index of the active entry in list of entries */
|
|
879
1202
|
stateIndex: number;
|
|
1203
|
+
/** Adds a new entry to the history */
|
|
880
1204
|
pushState: (state: Type) => void;
|
|
1205
|
+
/** Moves backwards in the history */
|
|
881
1206
|
undo: () => void;
|
|
1207
|
+
/** Moves forwards in the history */
|
|
882
1208
|
redo: () => void;
|
|
883
1209
|
undoAvailable: boolean;
|
|
884
1210
|
redoAvailable: boolean;
|
|
885
1211
|
};
|
|
886
1212
|
|
|
1213
|
+
/**
|
|
1214
|
+
* Returns the integer value of a setting and a function to update it
|
|
1215
|
+
* @param path The path of the settings file
|
|
1216
|
+
* @param key The key of the setting
|
|
1217
|
+
* @param defaultValue The default value of the setting
|
|
1218
|
+
* @returns The integer value of a setting and a function to update it
|
|
1219
|
+
*/
|
|
1220
|
+
export declare function useIntSetting(path: SettingsPath, key: string, defaultValue?: number): [number, (value: string | number) => void];
|
|
1221
|
+
|
|
1222
|
+
/**
|
|
1223
|
+
* Creates listeners for `"keydown"` and `"keyup"` events
|
|
1224
|
+
*/
|
|
887
1225
|
export declare function useKeyboardListener({ onKeyDown, onKeyUp }: UseKeyboardListenerParams): void;
|
|
888
1226
|
|
|
889
|
-
declare interface UseKeyboardListenerParams {
|
|
1227
|
+
export declare interface UseKeyboardListenerParams {
|
|
1228
|
+
/** Function that handles `"keydown"` events */
|
|
890
1229
|
onKeyDown?: (event: KeyboardEvent) => void;
|
|
1230
|
+
/** Function that handles `"keyup"` events */
|
|
891
1231
|
onKeyUp?: (event: KeyboardEvent) => void;
|
|
892
1232
|
}
|
|
893
1233
|
|
|
1234
|
+
/**
|
|
1235
|
+
* Returns the items of a list value of a setting and a function to update it
|
|
1236
|
+
* @param path The path of the settings file
|
|
1237
|
+
* @param key The key of the setting
|
|
1238
|
+
* @param defaultValue The default value of the setting
|
|
1239
|
+
* @returns The items of a list value of a setting and a function to update it
|
|
1240
|
+
*/
|
|
1241
|
+
export declare function useListSetting(path: SettingsPath, key: string, defaultValue?: string[]): [string[], (value: string | string[]) => void];
|
|
1242
|
+
|
|
894
1243
|
export declare function useModalsManager(): ModalsManagerState;
|
|
895
1244
|
|
|
1245
|
+
/**
|
|
1246
|
+
* Creates listeners for `"mousedown"`, `"mouseup"`, `"click"` and `"contextmenu"` events
|
|
1247
|
+
*/
|
|
896
1248
|
export declare function useMouseListener({ onMouseDown, onMouseUp, onClick, onContextMenu }: UseMouseListenerParams): void;
|
|
897
1249
|
|
|
898
|
-
declare interface UseMouseListenerParams {
|
|
1250
|
+
export declare interface UseMouseListenerParams {
|
|
1251
|
+
/** Function that handles `"mousedown"` events */
|
|
899
1252
|
onMouseDown: EventListener;
|
|
1253
|
+
/** Function that handles `"mouseup"` events */
|
|
900
1254
|
onMouseUp: EventListener;
|
|
1255
|
+
/** Function that handles `"click"` events */
|
|
901
1256
|
onClick: EventListener;
|
|
1257
|
+
/** Function that handles `"contextmenu"` events */
|
|
902
1258
|
onContextMenu: EventListener;
|
|
903
1259
|
}
|
|
904
1260
|
|
|
1261
|
+
/**
|
|
1262
|
+
* Returns the ideal orientation of an element so that it does not go outside of the screen
|
|
1263
|
+
*/
|
|
905
1264
|
export declare function useScreenBounds({ avoidTaskbar }: {
|
|
1265
|
+
/** Whether to avoid the task bar */
|
|
906
1266
|
avoidTaskbar: boolean;
|
|
907
1267
|
}): {
|
|
1268
|
+
/** The React ref of the element */
|
|
908
1269
|
ref: Ref<HTMLElement>;
|
|
909
1270
|
initiated: boolean;
|
|
1271
|
+
/** Whether the element should align to the left (`true`) or right (`false`) */
|
|
910
1272
|
alignLeft: boolean;
|
|
1273
|
+
/** Whether the element should align to the top (`true`) or bottom (`false`) */
|
|
911
1274
|
alignTop: boolean;
|
|
912
1275
|
};
|
|
913
1276
|
|
|
1277
|
+
/**
|
|
1278
|
+
* Returns the width and height of the element with ID "root"
|
|
1279
|
+
*/
|
|
914
1280
|
export declare function useScreenDimensions(): [screenWidth: number | null, screenHeight: number | null];
|
|
915
1281
|
|
|
916
1282
|
export declare function useScrollWithShadow(params: UseScrollWithShadowParams): {
|
|
@@ -920,7 +1286,7 @@ export declare function useScrollWithShadow(params: UseScrollWithShadowParams):
|
|
|
920
1286
|
}) => void;
|
|
921
1287
|
};
|
|
922
1288
|
|
|
923
|
-
declare interface UseScrollWithShadowParams {
|
|
1289
|
+
export declare interface UseScrollWithShadowParams {
|
|
924
1290
|
ref?: MutableRefObject<HTMLElement>;
|
|
925
1291
|
horizontal?: boolean;
|
|
926
1292
|
dynamicOffset?: boolean;
|
|
@@ -938,14 +1304,25 @@ declare interface UseScrollWithShadowParams {
|
|
|
938
1304
|
};
|
|
939
1305
|
}
|
|
940
1306
|
|
|
1307
|
+
/**
|
|
1308
|
+
* Returns the value of a setting and a function to update it
|
|
1309
|
+
* @param path The path of the settings file
|
|
1310
|
+
* @param key The key of the setting
|
|
1311
|
+
* @param defaultValue The default value of the setting
|
|
1312
|
+
* @param parse A function that converts a string to a value
|
|
1313
|
+
* @param stringify A function that converts a value to a string
|
|
1314
|
+
* @returns The value of a setting and a function to update it
|
|
1315
|
+
*/
|
|
1316
|
+
export declare function useSetting<Type = string>(path: SettingsPath, key: string, defaultValue: Type, parse: (value: string) => Type, stringify?: (value: Type) => string): [Type, (value: Type | string) => void];
|
|
1317
|
+
|
|
941
1318
|
export declare function useSettingsManager(): SettingsManagerState;
|
|
942
1319
|
|
|
943
1320
|
/**
|
|
944
|
-
*
|
|
1321
|
+
* Creates listeners for keyboard shortcuts
|
|
945
1322
|
*/
|
|
946
1323
|
export declare function useShortcuts({ options, shortcuts, useCategories }: UseShortcutsParams): void;
|
|
947
1324
|
|
|
948
|
-
declare interface UseShortcutsParams {
|
|
1325
|
+
export declare interface UseShortcutsParams {
|
|
949
1326
|
options: Record<string, Record<string, (event: KeyboardEvent) => void>> | Record<string, (event: KeyboardEvent) => void>;
|
|
950
1327
|
shortcuts?: Record<string, Record<string, string[]>> | Record<string, string[]>;
|
|
951
1328
|
useCategories?: boolean;
|
|
@@ -956,6 +1333,15 @@ declare interface UseShortcutsParams {
|
|
|
956
1333
|
*/
|
|
957
1334
|
export declare function useStaticClassName(block?: string, element?: string, modifier?: string | string[]): string | null;
|
|
958
1335
|
|
|
1336
|
+
/**
|
|
1337
|
+
* Returns the value of a setting and a function to update it
|
|
1338
|
+
* @param path The path of the settings file
|
|
1339
|
+
* @param key The key of the setting
|
|
1340
|
+
* @param defaultValue The default value of the setting
|
|
1341
|
+
* @returns The value of a setting and a function to update it
|
|
1342
|
+
*/
|
|
1343
|
+
export declare function useStringSetting(path: SettingsPath, key: string, defaultValue?: string | null): [string | null, (value: string | null) => void];
|
|
1344
|
+
|
|
959
1345
|
export declare function useSystemManager(): SystemManager;
|
|
960
1346
|
|
|
961
1347
|
export declare function useTrackingManager(): TrackingManagerState;
|
|
@@ -970,7 +1356,7 @@ export declare function useWindowsManager(): WindowsManagerState;
|
|
|
970
1356
|
|
|
971
1357
|
export declare function useZIndex({ groupIndex, index }: UseZIndexParams): number;
|
|
972
1358
|
|
|
973
|
-
declare interface UseZIndexParams {
|
|
1359
|
+
export declare interface UseZIndexParams {
|
|
974
1360
|
groupIndex: number;
|
|
975
1361
|
index: number;
|
|
976
1362
|
}
|
|
@@ -995,17 +1381,30 @@ export declare class Vector2 {
|
|
|
995
1381
|
static lerp(vector2A: Vector2, vector2B: Vector2, t: number): Vector2;
|
|
996
1382
|
}
|
|
997
1383
|
|
|
1384
|
+
export declare const VIDEO_EXTENSIONS: string[];
|
|
1385
|
+
|
|
998
1386
|
declare class VirtualBase extends EventEmitter<EventNamesMap> {
|
|
1387
|
+
/** The name of this item */
|
|
999
1388
|
name: string;
|
|
1389
|
+
/** The alias of this item */
|
|
1000
1390
|
alias: string | undefined | null;
|
|
1391
|
+
/** The folder this item is in */
|
|
1001
1392
|
parent: VirtualFolder | undefined | null;
|
|
1393
|
+
/** Whether this item is protected from changes */
|
|
1002
1394
|
isProtected: boolean | undefined | null;
|
|
1395
|
+
/** The URL of the icon of this item */
|
|
1003
1396
|
iconUrl: string | undefined | null;
|
|
1397
|
+
/** The file this item links to */
|
|
1004
1398
|
linkedFile: VirtualFile | undefined | null;
|
|
1399
|
+
/** The folder this item links to */
|
|
1005
1400
|
linkedFolder: VirtualFolder | undefined | null;
|
|
1401
|
+
/** Whether this item has been edited by the user */
|
|
1006
1402
|
editedByUser: boolean | undefined | null;
|
|
1403
|
+
/** Whether this item is the root folder */
|
|
1007
1404
|
isRoot: boolean | undefined | null;
|
|
1405
|
+
/** The root folder */
|
|
1008
1406
|
root: VirtualRoot | undefined | null;
|
|
1407
|
+
/** Whether this item has been deleted */
|
|
1009
1408
|
isDeleted: boolean;
|
|
1010
1409
|
static EVENT_NAMES: {
|
|
1011
1410
|
update: string;
|
|
@@ -1019,9 +1418,18 @@ declare class VirtualBase extends EventEmitter<EventNamesMap> {
|
|
|
1019
1418
|
setIconUrl(iconUrl: string | null): this;
|
|
1020
1419
|
getIconUrl(): string;
|
|
1021
1420
|
getType(): string;
|
|
1421
|
+
/**
|
|
1422
|
+
* Tries to delete this item
|
|
1423
|
+
*/
|
|
1022
1424
|
delete(): void;
|
|
1023
1425
|
confirmChanges(root?: VirtualRoot): void;
|
|
1426
|
+
/**
|
|
1427
|
+
* Opens this item in the appropriate application
|
|
1428
|
+
*/
|
|
1024
1429
|
open(..._args: unknown[]): unknown;
|
|
1430
|
+
/**
|
|
1431
|
+
* Returns the path of this item
|
|
1432
|
+
*/
|
|
1025
1433
|
get path(): string;
|
|
1026
1434
|
/**
|
|
1027
1435
|
* Returns path without using this item's alias
|
|
@@ -1035,6 +1443,9 @@ declare class VirtualBase extends EventEmitter<EventNamesMap> {
|
|
|
1035
1443
|
* Returns whether this can be edited in its current state
|
|
1036
1444
|
*/
|
|
1037
1445
|
get canBeEdited(): boolean;
|
|
1446
|
+
/**
|
|
1447
|
+
* Returns the root folder
|
|
1448
|
+
*/
|
|
1038
1449
|
getRoot(): VirtualRoot;
|
|
1039
1450
|
isFile(): boolean;
|
|
1040
1451
|
isFolder(): boolean;
|
|
@@ -1053,7 +1464,7 @@ export declare class VirtualDriveConfig {
|
|
|
1053
1464
|
constructor(options?: Partial<VirtualDriveConfigOptions>);
|
|
1054
1465
|
}
|
|
1055
1466
|
|
|
1056
|
-
declare interface VirtualDriveConfigOptions {
|
|
1467
|
+
export declare interface VirtualDriveConfigOptions {
|
|
1057
1468
|
/**
|
|
1058
1469
|
* Enables persistent storage of the virtual drive
|
|
1059
1470
|
* @default true
|
|
@@ -1096,8 +1507,11 @@ declare interface VirtualDriveConfigOptions {
|
|
|
1096
1507
|
* A virtual file that can be stored inside a folder
|
|
1097
1508
|
*/
|
|
1098
1509
|
export declare class VirtualFile extends VirtualBase {
|
|
1510
|
+
/** The extension of this file */
|
|
1099
1511
|
extension: OptionalStringProperty;
|
|
1512
|
+
/** The URL of the source of this file */
|
|
1100
1513
|
source: OptionalStringProperty;
|
|
1514
|
+
/** The content of this file */
|
|
1101
1515
|
content: OptionalStringProperty;
|
|
1102
1516
|
static NON_TEXT_EXTENSIONS: string[];
|
|
1103
1517
|
static EVENT_NAMES: {
|
|
@@ -1127,11 +1541,13 @@ export declare class VirtualFile extends VirtualBase {
|
|
|
1127
1541
|
isFile(): boolean;
|
|
1128
1542
|
getIconUrl(): string;
|
|
1129
1543
|
getType(): string;
|
|
1544
|
+
download(): void;
|
|
1545
|
+
isDownloadable(): boolean;
|
|
1130
1546
|
toJSON(): VirtualFileJson | null;
|
|
1131
1547
|
static removeFileScheme(source: string): string;
|
|
1132
1548
|
}
|
|
1133
1549
|
|
|
1134
|
-
declare interface VirtualFileJson extends VirtualBaseJson {
|
|
1550
|
+
export declare interface VirtualFileJson extends VirtualBaseJson {
|
|
1135
1551
|
ext?: string;
|
|
1136
1552
|
cnt?: string;
|
|
1137
1553
|
src?: string;
|
|
@@ -1156,7 +1572,7 @@ export declare class VirtualFileLink extends VirtualFile {
|
|
|
1156
1572
|
getIconUrl(...args: Parameters<VirtualFile["getIconUrl"]>): ReturnType<VirtualFile["getIconUrl"]>;
|
|
1157
1573
|
}
|
|
1158
1574
|
|
|
1159
|
-
declare interface VirtualFileLinkJson extends VirtualFileJson {
|
|
1575
|
+
export declare interface VirtualFileLinkJson extends VirtualFileJson {
|
|
1160
1576
|
lnk: string;
|
|
1161
1577
|
}
|
|
1162
1578
|
|
|
@@ -1164,8 +1580,14 @@ declare interface VirtualFileLinkJson extends VirtualFileJson {
|
|
|
1164
1580
|
* A virtual folder that can contains files and sub-folders
|
|
1165
1581
|
*/
|
|
1166
1582
|
export declare class VirtualFolder extends VirtualBase {
|
|
1583
|
+
/** The folders inside this folder */
|
|
1167
1584
|
subFolders: (VirtualFolder | VirtualFolderLink)[];
|
|
1585
|
+
/** The files inside this folder */
|
|
1168
1586
|
files: (VirtualFile | VirtualFileLink)[];
|
|
1587
|
+
/**
|
|
1588
|
+
* The type of this folder
|
|
1589
|
+
* @default VirtualFolder.TYPE.general
|
|
1590
|
+
*/
|
|
1169
1591
|
type: number | undefined;
|
|
1170
1592
|
static TYPE: {
|
|
1171
1593
|
general: number;
|
|
@@ -1262,7 +1684,7 @@ export declare class VirtualFolder extends VirtualBase {
|
|
|
1262
1684
|
toJSON(): VirtualFolderJson | null;
|
|
1263
1685
|
}
|
|
1264
1686
|
|
|
1265
|
-
declare interface VirtualFolderJson extends VirtualBaseJson {
|
|
1687
|
+
export declare interface VirtualFolderJson extends VirtualBaseJson {
|
|
1266
1688
|
fls?: VirtualFileJson[];
|
|
1267
1689
|
fds?: VirtualFolderJson[];
|
|
1268
1690
|
}
|
|
@@ -1293,7 +1715,7 @@ export declare class VirtualFolderLink extends VirtualFolder {
|
|
|
1293
1715
|
getItemCount(...args: Parameters<VirtualFolder["getItemCount"]>): ReturnType<VirtualFolder["getItemCount"]>;
|
|
1294
1716
|
}
|
|
1295
1717
|
|
|
1296
|
-
declare interface VirtualFolderLinkJson extends VirtualFolderJson {
|
|
1718
|
+
export declare interface VirtualFolderLinkJson extends VirtualFolderJson {
|
|
1297
1719
|
lnk: string;
|
|
1298
1720
|
}
|
|
1299
1721
|
|
|
@@ -1301,6 +1723,7 @@ declare interface VirtualFolderLinkJson extends VirtualFolderJson {
|
|
|
1301
1723
|
* A virtual folder that serves as the root folder
|
|
1302
1724
|
*/
|
|
1303
1725
|
export declare class VirtualRoot extends VirtualFolder {
|
|
1726
|
+
/** Aliases for files and folders */
|
|
1304
1727
|
shortcuts: Record<string, VirtualFile | VirtualFileLink | VirtualFolder | VirtualFolderLink>;
|
|
1305
1728
|
initiated: boolean;
|
|
1306
1729
|
loadedDefaultData: boolean;
|
|
@@ -1317,7 +1740,7 @@ export declare class VirtualRoot extends VirtualFolder {
|
|
|
1317
1740
|
*/
|
|
1318
1741
|
saveData(): void;
|
|
1319
1742
|
/**
|
|
1320
|
-
*
|
|
1743
|
+
* Initializes this root by loading the default data and then the user's data on top
|
|
1321
1744
|
*/
|
|
1322
1745
|
init(): VirtualRoot;
|
|
1323
1746
|
/**
|
|
@@ -1328,34 +1751,47 @@ export declare class VirtualRoot extends VirtualFolder {
|
|
|
1328
1751
|
* Tells the storage manager to clear all data and reloads the window
|
|
1329
1752
|
*/
|
|
1330
1753
|
reset(): void;
|
|
1331
|
-
static isValidName(_name: string):
|
|
1332
|
-
static isValidFileName(_name: string):
|
|
1333
|
-
static isValidFolderName(_name: string):
|
|
1754
|
+
static isValidName(_name: string): boolean;
|
|
1755
|
+
static isValidFileName(_name: string): boolean;
|
|
1756
|
+
static isValidFolderName(_name: string): boolean;
|
|
1334
1757
|
get path(): string;
|
|
1335
1758
|
get displayPath(): string;
|
|
1336
1759
|
toJSON(): VirtualRootJson | null;
|
|
1337
1760
|
toString(): string | null;
|
|
1338
1761
|
}
|
|
1339
1762
|
|
|
1340
|
-
declare
|
|
1763
|
+
export declare const VirtualRootContext: Context<VirtualRootState>;
|
|
1764
|
+
|
|
1765
|
+
export declare interface VirtualRootJson extends VirtualFolderJson {
|
|
1341
1766
|
scs: Record<string, string>;
|
|
1342
1767
|
}
|
|
1343
1768
|
|
|
1344
|
-
declare type VirtualRootState = VirtualRoot | undefined;
|
|
1769
|
+
export declare type VirtualRootState = VirtualRoot | undefined;
|
|
1345
1770
|
|
|
1771
|
+
/**
|
|
1772
|
+
* Component that renders an external application inside an iframe
|
|
1773
|
+
*/
|
|
1346
1774
|
export declare const WebView: FC<WebViewProps>;
|
|
1347
1775
|
|
|
1348
|
-
declare interface WebViewProps extends WindowProps {
|
|
1776
|
+
export declare interface WebViewProps extends WindowProps {
|
|
1777
|
+
/** The URL of the external application */
|
|
1349
1778
|
source?: string;
|
|
1350
1779
|
title?: string;
|
|
1351
1780
|
}
|
|
1352
1781
|
|
|
1353
1782
|
export declare function WindowedModal({ modal, params, children, ...props }: ModalProps): JSX_2.Element;
|
|
1354
1783
|
|
|
1355
|
-
declare interface WindowOptions {
|
|
1784
|
+
export declare interface WindowOptions {
|
|
1785
|
+
/** The ID of the window */
|
|
1356
1786
|
id?: string;
|
|
1787
|
+
/** The app associated with the window */
|
|
1357
1788
|
app?: App;
|
|
1789
|
+
/**
|
|
1790
|
+
* The size of the window
|
|
1791
|
+
* @default new Vector2(700, 400)
|
|
1792
|
+
*/
|
|
1358
1793
|
size?: Vector2;
|
|
1794
|
+
/** The position of the window */
|
|
1359
1795
|
position?: Vector2;
|
|
1360
1796
|
fullscreen?: boolean | string;
|
|
1361
1797
|
options?: object;
|
|
@@ -1365,22 +1801,31 @@ declare interface WindowOptions {
|
|
|
1365
1801
|
[key: string]: unknown;
|
|
1366
1802
|
}
|
|
1367
1803
|
|
|
1368
|
-
declare interface WindowOptions_2 {
|
|
1369
|
-
size?: Vector2;
|
|
1370
|
-
[key: string]: unknown;
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
1804
|
export declare interface WindowProps extends WindowOptions {
|
|
1805
|
+
/**
|
|
1806
|
+
* Whether to start the window in fullscreen mode
|
|
1807
|
+
* @default false
|
|
1808
|
+
*/
|
|
1374
1809
|
fullscreen?: boolean;
|
|
1810
|
+
/** Function that handles interactions with the window */
|
|
1375
1811
|
onInteract?: () => void;
|
|
1812
|
+
/** Function that sets the title of the window */
|
|
1376
1813
|
setTitle?: React.Dispatch<React.SetStateAction<string>>;
|
|
1814
|
+
/** Function that sets the icon URL of the window */
|
|
1377
1815
|
setIconUrl?: React.Dispatch<React.SetStateAction<string>>;
|
|
1816
|
+
/** Function that closes the window */
|
|
1378
1817
|
close?: (event?: Event) => void;
|
|
1818
|
+
/** Function that brings the window in focus */
|
|
1379
1819
|
focus?: (event: Event, force?: boolean) => void;
|
|
1820
|
+
/** Whether the window is currently focused and should allow interactions */
|
|
1380
1821
|
active?: boolean;
|
|
1822
|
+
/** Whether to start the window in minimized mode */
|
|
1381
1823
|
minimized?: boolean;
|
|
1824
|
+
/** Function that toggles the minimized mode of the window */
|
|
1382
1825
|
toggleMinimized?: (event?: Event) => void;
|
|
1826
|
+
/** The depth value of the window */
|
|
1383
1827
|
index?: number;
|
|
1828
|
+
/** Whether the window is in standalone mode */
|
|
1384
1829
|
standalone?: boolean;
|
|
1385
1830
|
}
|
|
1386
1831
|
|
|
@@ -1391,12 +1836,14 @@ export declare class WindowsConfig {
|
|
|
1391
1836
|
constructor(options?: Partial<WindowsConfigOptions>);
|
|
1392
1837
|
}
|
|
1393
1838
|
|
|
1394
|
-
declare interface WindowsConfigOptions {
|
|
1839
|
+
export declare interface WindowsConfigOptions {
|
|
1395
1840
|
/**
|
|
1841
|
+
* The margin around windows that are not maximized, in pixels
|
|
1396
1842
|
* @default 32
|
|
1397
1843
|
*/
|
|
1398
1844
|
screenMargin: number;
|
|
1399
1845
|
/**
|
|
1846
|
+
* The separator to use in window titles
|
|
1400
1847
|
* @default "-"
|
|
1401
1848
|
*/
|
|
1402
1849
|
titleSeparator: string;
|
|
@@ -1407,16 +1854,21 @@ declare interface WindowsConfigOptions {
|
|
|
1407
1854
|
minScreenSize: Vector2;
|
|
1408
1855
|
}
|
|
1409
1856
|
|
|
1857
|
+
/**
|
|
1858
|
+
* Manages the states of windows
|
|
1859
|
+
*/
|
|
1410
1860
|
export declare class WindowsManager {
|
|
1411
1861
|
#private;
|
|
1412
1862
|
windows: {
|
|
1413
1863
|
[id: string]: WindowOptions;
|
|
1414
1864
|
};
|
|
1865
|
+
/** Function that handles changes to the open windows */
|
|
1415
1866
|
updateWindows: (window: WindowsManager["windows"]) => void;
|
|
1416
1867
|
startupComplete: boolean;
|
|
1417
1868
|
constructor(systemManager: SystemManager, trackingManager: TrackingManager);
|
|
1418
1869
|
/**
|
|
1419
|
-
*
|
|
1870
|
+
* Opens a window for an application
|
|
1871
|
+
* @param appId The ID of the app
|
|
1420
1872
|
*/
|
|
1421
1873
|
open(appId: string, options?: WindowOptions | null): object | null;
|
|
1422
1874
|
/**
|
|
@@ -1462,11 +1914,24 @@ export declare class WindowsManager {
|
|
|
1462
1914
|
get windowIds(): string[];
|
|
1463
1915
|
}
|
|
1464
1916
|
|
|
1465
|
-
declare
|
|
1917
|
+
export declare const WindowsManagerContext: Context<WindowsManagerState>;
|
|
1918
|
+
|
|
1919
|
+
export declare type WindowsManagerState = WindowsManager | undefined;
|
|
1466
1920
|
|
|
1921
|
+
/**
|
|
1922
|
+
* Component that renders the windows for all currently active applications
|
|
1923
|
+
*/
|
|
1467
1924
|
export declare const WindowsView: FC;
|
|
1468
1925
|
|
|
1469
|
-
|
|
1926
|
+
/**
|
|
1927
|
+
* Component that renders the window for an application
|
|
1928
|
+
*/
|
|
1929
|
+
export declare const WindowView: FC<WindowProps>;
|
|
1930
|
+
|
|
1931
|
+
/**
|
|
1932
|
+
* Represents a group of HTML elements whose z-index is automatically calculated based on a given order
|
|
1933
|
+
*/
|
|
1934
|
+
export declare class ZIndexGroup {
|
|
1470
1935
|
length: number;
|
|
1471
1936
|
offset: number;
|
|
1472
1937
|
groupIndex: number;
|