prozilla-os 1.0.12 → 1.0.13

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/dist/main.d.ts CHANGED
@@ -73,39 +73,95 @@ export declare const ANSI: {
73
73
  reset: string;
74
74
  };
75
75
 
76
+ /**
77
+ * An application that can be ran by ProzillaOS
78
+ * Applications can be installed by adding them to the `apps` array in {@link AppsConfig}
79
+ */
76
80
  export declare class App<AppProps extends WindowProps = WindowProps> {
81
+ /**
82
+ * The display name of this application
83
+ */
77
84
  name: string;
85
+ /**
86
+ * The unique ID of this application
87
+ */
78
88
  id: string;
89
+ /**
90
+ * Main component that renders this app inside a window
91
+ */
79
92
  windowContent: FC<AppProps>;
93
+ /**
94
+ * Default options that get passed to the {@link this.windowContent} component
95
+ */
80
96
  windowOptions?: {
81
97
  size: Vector2;
82
98
  [key: string]: unknown;
83
99
  };
100
+ /**
101
+ * Description of this application
102
+ */
84
103
  description: string | null;
104
+ /**
105
+ * URL of the icon of this application
106
+ */
85
107
  iconUrl: string | null;
86
- isActive: boolean;
87
- isPinned?: boolean;
88
108
  /**
89
- * @param windowOptions - Default window options
109
+ * Defines what the app can handle and how it can be used elsewhere in the system
90
110
  */
111
+ role: string | null;
112
+ /**
113
+ * An array of file extensions that this application can interpret
114
+ */
115
+ associatedExtensions: string[];
116
+ isActive: boolean;
117
+ isPinned?: boolean;
91
118
  constructor(name: App["name"], id: App["id"], windowContent: App<AppProps>["windowContent"], windowOptions?: App["windowOptions"]);
92
119
  WindowContent: (props: AppProps) => JSX_2.Element | null;
120
+ /**
121
+ * Set the display name of this application
122
+ */
123
+ setName(name: string): this;
124
+ /**
125
+ * Set the description of this application
126
+ */
93
127
  setDescription(description: App["description"]): this;
128
+ /**
129
+ * Set the URL of the icon of this application
130
+ */
94
131
  setIconUrl(iconUrl: App["iconUrl"]): this;
95
- setName(name: string): this;
132
+ /**
133
+ * Set the role of this application
134
+ */
135
+ setRole(role: string | null): this;
136
+ /**
137
+ * Set the associated extensions of this application
138
+ */
139
+ setAssociatedExtensions(extensions: string[] | null): this;
96
140
  }
97
141
 
98
142
  export declare class AppsConfig {
99
143
  apps: AppsConfigOptions["apps"];
144
+ static APP_ROLES: {
145
+ FileExplorer: string;
146
+ Terminal: string;
147
+ TextEditor: string;
148
+ };
100
149
  constructor(options?: OptionalInterface<AppsConfigOptions>);
101
150
  getAppById(id: string): App | null;
102
151
  /**
103
152
  * Get the app associated with a file extension
104
153
  */
105
154
  getAppByFileExtension(fileExtension: string): App | null;
155
+ /**
156
+ * Get the app with a specific role
157
+ */
158
+ getAppByRole(role: string): App | null;
106
159
  }
107
160
 
108
161
  declare interface AppsConfigOptions {
162
+ /**
163
+ * An array of applications
164
+ */
109
165
  apps: App<any>[];
110
166
  }
111
167
 
@@ -164,10 +220,6 @@ declare interface DesktopConfigOptions {
164
220
  defaultIconDirection: 0 | 1;
165
221
  }
166
222
 
167
- export declare const DIALOG_CONTENT_TYPES: {
168
- closeButton: number;
169
- };
170
-
171
223
  export declare function DialogBox({ modal, params, children, ...props }: ModalProps): JSX_2.Element;
172
224
 
173
225
  export declare function DirectoryList({ directory, showHidden, folderClassName, fileClassName, className, onContextMenuFile, onContextMenuFolder, onOpenFile, onOpenFolder, allowMultiSelect, onSelectionChange, ...props }: DirectoryListProps): ReactElement | null;
@@ -352,6 +404,9 @@ export declare interface ModalProps {
352
404
  export declare class ModalsConfig {
353
405
  defaultDialogSize: ModalsConfigOptions["defaultDialogSize"];
354
406
  defaultFileSelectorSize: ModalsConfigOptions["defaultFileSelectorSize"];
407
+ static DIALOG_CONTENT_TYPES: {
408
+ CloseButton: number;
409
+ };
355
410
  constructor(options?: OptionalInterface<ModalsConfigOptions>);
356
411
  }
357
412
 
@@ -984,7 +1039,7 @@ export declare class VirtualFolder extends VirtualBase {
984
1039
  /**
985
1040
  * Opens this folder in file explorer
986
1041
  */
987
- open(windowsManager: WindowsManager): object | null;
1042
+ open(windowsManager: WindowsManager): object | null | undefined;
988
1043
  /**
989
1044
  * Deletes this folder and all its files and sub-folders recursively
990
1045
  */