prozilla-os 1.0.14 → 1.0.16
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 +13 -3
- package/dist/assets/main.css +1 -1
- package/dist/main.d.ts +49 -6
- package/dist/main.js +3299 -3133
- package/dist/main.js.map +1 -1
- package/package.json +9 -5
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
<br />
|
|
3
3
|
<p>
|
|
4
|
-
<a href="https://os.prozilla.dev/"><img src="https://os.prozilla.dev/assets/logo.svg" height="200" alt="ProzillaOS" /></a>
|
|
4
|
+
<a href="https://os.prozilla.dev/"><img src="https://os.prozilla.dev/assets/logo.svg?v=2" height="200" alt="ProzillaOS" /></a>
|
|
5
5
|
</p>
|
|
6
6
|
<p>
|
|
7
7
|
<a href="https://github.com/prozilla-os/ProzillaOS/blob/main/LICENSE.md"><img alt="License" src="https://img.shields.io/github/license/Prozilla/ProzillaOS?style=flat-square&color=FF4D5B&label=License"></a>
|
|
@@ -33,6 +33,10 @@ $ pnpm add prozilla-os
|
|
|
33
33
|
- [`@prozilla-os/file-explorer`][file-explorer] - File explorer app
|
|
34
34
|
- [`@prozilla-os/terminal`][terminal] - Terminal/shell app
|
|
35
35
|
- [`@prozilla-os/text-editor`][text-editor] - Text editor app
|
|
36
|
+
- [`@prozilla-os/settings`][settings] - Settings app
|
|
37
|
+
- [`@prozilla-os/media-viewer`][media-viewer] - Media viewer app
|
|
38
|
+
- [`@prozilla-os/browser`][browser] - Browser app
|
|
39
|
+
- [`@prozilla-os/calculator`][calculator] - Calculator app
|
|
36
40
|
|
|
37
41
|
## Usage
|
|
38
42
|
|
|
@@ -170,14 +174,20 @@ function App() {
|
|
|
170
174
|
- [Website/demo][website]
|
|
171
175
|
- [GitHub][github]
|
|
172
176
|
- [npm][npm]
|
|
177
|
+
- [Discord][discord]
|
|
173
178
|
- [Ko-fi][ko-fi]
|
|
174
179
|
|
|
175
180
|
[website]: https://os.prozilla.dev/
|
|
176
181
|
[website-source]: https://github.com/prozilla-os/ProzillaOS
|
|
177
|
-
[github]: https://github.com/prozilla-os/ProzillaOS/tree/
|
|
182
|
+
[github]: https://github.com/prozilla-os/ProzillaOS/tree/main/packages/prozilla-os
|
|
178
183
|
[npm]: https://www.npmjs.com/package/prozilla-os
|
|
184
|
+
[discord]: https://discord.gg/JwbyQP4tdz
|
|
179
185
|
[ko-fi]: https://ko-fi.com/prozilla
|
|
180
186
|
[core]: https://www.npmjs.com/package/@prozilla-os/core
|
|
181
187
|
[file-explorer]: https://www.npmjs.com/package/@prozilla-os/file-explorer
|
|
182
188
|
[terminal]: https://www.npmjs.com/package/@prozilla-os/terminal
|
|
183
|
-
[text-editor]: https://www.npmjs.com/package/@prozilla-os/text-editor
|
|
189
|
+
[text-editor]: https://www.npmjs.com/package/@prozilla-os/text-editor
|
|
190
|
+
[settings]: https://www.npmjs.com/package/@prozilla-os/settings
|
|
191
|
+
[media-viewer]: https://www.npmjs.com/package/@prozilla-os/media-viewer
|
|
192
|
+
[browser]: https://www.npmjs.com/package/@prozilla-os/browser
|
|
193
|
+
[calculator]: https://www.npmjs.com/package/@prozilla-os/calculator
|
package/dist/assets/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._TextEditor_dix3z_1{display:flex;flex-direction:column;width:100%;height:100%;text-align:start}._TextEditor_dix3z_1 p,._TextEditor_dix3z_1 div,._TextEditor_dix3z_1 span,._TextEditor_dix3z_1 textarea{font-size:1em}._View_dix3z_31,._Code_dix3z_31{width:100%;height:100%;padding:1rem!important;color:var(--foreground-color-0)!important;background-color:var(--background-color-2)!important;border:none;outline:none;font-size:1rem;font-family:var(--body-font-family);resize:none;overflow:auto}._View_dix3z_31{z-index:2}._MarkdownImage_dix3z_67{max-width:100%;object-fit:contain;border-radius:var(--border-radius-0);margin:1rem .5rem 1rem 0}._MarkdownBlockquote_dix3z_81{display:flex;gap:1rem;flex-direction:column;margin:0}._AlertContainer_dix3z_95{--color-0: var(--color-1);--color-1: var(--background-color-0);--color-2: var(--background-color-1);margin:0;padding:1rem 1.5rem;border-left:1rem solid var(--color-1);background-color:var(--color-2);border-radius:var(--border-radius-1)}._Alert_dix3z_95{display:inline-flex;gap:.5rem;justify-content:flex-start;align-items:center;margin-bottom:.5rem;color:var(--color-0);font-weight:600}._Alert_dix3z_95>svg *{fill:var(--color-0)}._ImportantAlert_dix3z_147{--color-0: var(--purple-0);--color-1: var(--purple-1);--color-2: var(--purple-2)}._NoteAlert_dix3z_159{--color-0: var(--blue-0);--color-1: var(--blue-1);--color-2: var(--blue-2)}._TipAlert_dix3z_171{--color-0: var(--green-0);--color-1: var(--green-1);--color-2: var(--green-2)}._WarningAlert_dix3z_183{--color-0: var(--yellow-0);--color-1: var(--yellow-1);--color-2: var(--yellow-2)}._CautionAlert_dix3z_195{--color-0: var(--red-0);--color-1: var(--red-1);--color-2: var(--red-2)}._View_dix3z_31 code{position:relative;font-family:var(--mono-font-family);border-radius:var(--border-radius-1);padding:.125rem .25rem;font-size:.875rem;letter-spacing:-.01rem}._View_dix3z_31 code:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--background-color-1);border-radius:inherit;z-index:-1}._MarkdownLink_dix3z_251{position:relative;display:inline-block;color:var(--light-blue-0);transition:color .2s ease-in-out}._MarkdownLink_dix3z_251:hover,._MarkdownLink_dix3z_251:focus-visible{color:var(--light-blue-1)}._MarkdownLink_dix3z_251>*{color:inherit}div>._MarkdownLink_dix3z_251{margin:1rem 0}._MarkdownLink_dix3z_251>._MarkdownImage_dix3z_67{margin:0}._View_dix3z_31 h1,._View_dix3z_31 h2,._View_dix3z_31 h3,._View_dix3z_31 h4,._View_dix3z_31 h5,._View_dix3z_31 h6{margin-top:1.75rem;margin-bottom:-.25rem}._View_dix3z_31 p{line-height:1.375rem}._View_dix3z_31 li>ul{margin:1rem 0}._View_dix3z_31 table{margin:1rem 0;border-collapse:collapse}._View_dix3z_31 table,._View_dix3z_31 th,._View_dix3z_31 td{border:.2rem solid var(--background-color-0)}._View_dix3z_31 th,._View_dix3z_31 td{padding:.5rem}._Code_dix3z_31{margin:0;cursor:default}._Code_dix3z_31 *[class*=hljs-string]{color:var(--green-0)}._Code_dix3z_31 *[class*=hljs-literal],._Code_dix3z_31 *[class*=hljs-number]{color:var(--yellow-0)}._Code_dix3z_31 *[class*=hljs-keyword]{color:var(--blue-0)}._Code_dix3z_31 *[class*=hljs-title]{color:var(--cyan-0)}._Code_dix3z_31 *[class*=hljs-name]{color:var(---red-0)}._Code_dix3z_31 *[class*=hljs-attr]{color:var(--blue-0)}._Code_dix3z_31 *[class*=hljs-param]{color:var(---red-0)}._Code_dix3z_31 *[class*=hljs-comment],._Code_dix3z_31 *[class*=linenumber]{color:var(--black-0)}._Code_dix3z_31 *[class*=hljs-meta]{color:var(--blue-0)}
|
|
1
|
+
._TextEditor_dix3z_1{display:flex;flex-direction:column;width:100%;height:100%;text-align:start}._TextEditor_dix3z_1 p,._TextEditor_dix3z_1 div,._TextEditor_dix3z_1 span,._TextEditor_dix3z_1 textarea{font-size:1em}._View_dix3z_31,._Code_dix3z_31{width:100%;height:100%;padding:1rem!important;color:var(--foreground-color-0)!important;background-color:var(--background-color-2)!important;border:none;outline:none;font-size:1rem;font-family:var(--body-font-family);resize:none;overflow:auto}._View_dix3z_31{z-index:2}._MarkdownImage_dix3z_67{max-width:100%;object-fit:contain;border-radius:var(--border-radius-0);margin:1rem .5rem 1rem 0}._MarkdownBlockquote_dix3z_81{display:flex;gap:1rem;flex-direction:column;margin:0}._AlertContainer_dix3z_95{--color-0: var(--color-1);--color-1: var(--background-color-0);--color-2: var(--background-color-1);margin:0;padding:1rem 1.5rem;border-left:1rem solid var(--color-1);background-color:var(--color-2);border-radius:var(--border-radius-1)}._Alert_dix3z_95{display:inline-flex;gap:.5rem;justify-content:flex-start;align-items:center;margin-bottom:.5rem;color:var(--color-0);font-weight:600}._Alert_dix3z_95>svg *{fill:var(--color-0)}._ImportantAlert_dix3z_147{--color-0: var(--purple-0);--color-1: var(--purple-1);--color-2: var(--purple-2)}._NoteAlert_dix3z_159{--color-0: var(--blue-0);--color-1: var(--blue-1);--color-2: var(--blue-2)}._TipAlert_dix3z_171{--color-0: var(--green-0);--color-1: var(--green-1);--color-2: var(--green-2)}._WarningAlert_dix3z_183{--color-0: var(--yellow-0);--color-1: var(--yellow-1);--color-2: var(--yellow-2)}._CautionAlert_dix3z_195{--color-0: var(--red-0);--color-1: var(--red-1);--color-2: var(--red-2)}._View_dix3z_31 code{position:relative;font-family:var(--mono-font-family);border-radius:var(--border-radius-1);padding:.125rem .25rem;font-size:.875rem;letter-spacing:-.01rem}._View_dix3z_31 code:after{content:"";position:absolute;top:0;left:0;width:100%;height:100%;background-color:var(--background-color-1);border-radius:inherit;z-index:-1}._MarkdownLink_dix3z_251{position:relative;display:inline-block;color:var(--light-blue-0);transition:color .2s ease-in-out}._MarkdownLink_dix3z_251:hover,._MarkdownLink_dix3z_251:focus-visible{color:var(--light-blue-1)}._MarkdownLink_dix3z_251>*{color:inherit}div>._MarkdownLink_dix3z_251{margin:1rem 0}._MarkdownLink_dix3z_251>._MarkdownImage_dix3z_67{margin:0}._View_dix3z_31 h1,._View_dix3z_31 h2,._View_dix3z_31 h3,._View_dix3z_31 h4,._View_dix3z_31 h5,._View_dix3z_31 h6{margin-top:1.75rem;margin-bottom:-.25rem}._View_dix3z_31 p{line-height:1.375rem}._View_dix3z_31 li>ul{margin:1rem 0}._View_dix3z_31 table{margin:1rem 0;border-collapse:collapse}._View_dix3z_31 table,._View_dix3z_31 th,._View_dix3z_31 td{border:.2rem solid var(--background-color-0)}._View_dix3z_31 th,._View_dix3z_31 td{padding:.5rem}._Code_dix3z_31{margin:0;cursor:default}._Code_dix3z_31 *[class*=hljs-string]{color:var(--green-0)}._Code_dix3z_31 *[class*=hljs-literal],._Code_dix3z_31 *[class*=hljs-number]{color:var(--yellow-0)}._Code_dix3z_31 *[class*=hljs-keyword]{color:var(--blue-0)}._Code_dix3z_31 *[class*=hljs-title]{color:var(--cyan-0)}._Code_dix3z_31 *[class*=hljs-name]{color:var(---red-0)}._Code_dix3z_31 *[class*=hljs-attr]{color:var(--blue-0)}._Code_dix3z_31 *[class*=hljs-param]{color:var(---red-0)}._Code_dix3z_31 *[class*=hljs-comment],._Code_dix3z_31 *[class*=linenumber]{color:var(--black-0)}._Code_dix3z_31 *[class*=hljs-meta]{color:var(--blue-0)}._Calculator_1ddjk_1{display:flex;flex-direction:column;height:100%;--output-height: 20%;--button-gap: .25rem}._Output_1ddjk_19{display:flex;gap:.25rem;flex-direction:column;justify-content:center;align-items:flex-end;height:var(--output-height);padding:.5rem}._Calculation_1ddjk_39,._Preview_1ddjk_39{margin:0}._Calculation_1ddjk_39{color:var(--foreground-color-2);height:1.25rem}._Preview_1ddjk_39{color:var(--foreground-color-0);font-size:2.5rem}._Input_1ddjk_67{display:flex;gap:var(--button-gap);flex-direction:column;height:calc(100% - var(--output-height));padding:.5rem}._InputRow_1ddjk_83{flex:1;display:flex;gap:var(--button-gap)}._Button_1ddjk_95{flex:1;border-radius:var(--border-radius-0);font-size:1.5rem}._InputRow_1ddjk_83:first-of-type ._Button_1ddjk_95{--normal-color: var(--background-color-1);--hover-color: var(--background-color-2)}._InputRow_1ddjk_83 ._Button_1ddjk_95:last-of-type{--text-color: var(--background-color-0);--normal-color: var(--blue-0);--hover-color: var(--blue-1)}._ButtonLarge_1ddjk_129{min-width:calc(50% - var(--button-gap) / 2)}
|
package/dist/main.d.ts
CHANGED
|
@@ -113,6 +113,16 @@ export declare class App<AppProps extends WindowProps = WindowProps> {
|
|
|
113
113
|
* An array of file extensions that this application can interpret
|
|
114
114
|
*/
|
|
115
115
|
associatedExtensions: string[];
|
|
116
|
+
/**
|
|
117
|
+
* Determines whether the app is pinned by default
|
|
118
|
+
* @default true
|
|
119
|
+
*/
|
|
120
|
+
pinnedByDefault: boolean;
|
|
121
|
+
/**
|
|
122
|
+
* Determiens whether the app is launched at startup
|
|
123
|
+
* @default false
|
|
124
|
+
*/
|
|
125
|
+
launchAtStartup: boolean;
|
|
116
126
|
isActive: boolean;
|
|
117
127
|
isPinned?: boolean;
|
|
118
128
|
constructor(name: App["name"], id: App["id"], windowContent: App<AppProps>["windowContent"], windowOptions?: App["windowOptions"]);
|
|
@@ -137,6 +147,14 @@ export declare class App<AppProps extends WindowProps = WindowProps> {
|
|
|
137
147
|
* Set the associated extensions of this application
|
|
138
148
|
*/
|
|
139
149
|
setAssociatedExtensions(extensions: string[] | null): this;
|
|
150
|
+
/**
|
|
151
|
+
* Changes whether this application is pinned by default or not
|
|
152
|
+
*/
|
|
153
|
+
setPinnedByDefault(pinnedByDefault: boolean): this;
|
|
154
|
+
/**
|
|
155
|
+
* Changes whether this application is launched at startup or not
|
|
156
|
+
*/
|
|
157
|
+
setLaunchAtStartup(launchAtStartup: boolean): this;
|
|
140
158
|
}
|
|
141
159
|
|
|
142
160
|
export declare class AppsConfig {
|
|
@@ -145,6 +163,9 @@ export declare class AppsConfig {
|
|
|
145
163
|
FileExplorer: string;
|
|
146
164
|
Terminal: string;
|
|
147
165
|
TextEditor: string;
|
|
166
|
+
Settings: string;
|
|
167
|
+
MediaViewer: string;
|
|
168
|
+
Browser: string;
|
|
148
169
|
};
|
|
149
170
|
constructor(options?: OptionalInterface<AppsConfigOptions>);
|
|
150
171
|
getAppById(id: string): App | null;
|
|
@@ -165,6 +186,12 @@ declare interface AppsConfigOptions {
|
|
|
165
186
|
apps: App<any>[];
|
|
166
187
|
}
|
|
167
188
|
|
|
189
|
+
export declare const browser: App<BrowserProps>;
|
|
190
|
+
|
|
191
|
+
declare interface BrowserProps extends WindowProps {
|
|
192
|
+
url?: string;
|
|
193
|
+
}
|
|
194
|
+
|
|
168
195
|
export declare function Button({ className, href, children, icon, target, ...props }: ButtonProps): JSX_2.Element;
|
|
169
196
|
|
|
170
197
|
declare interface ButtonProps {
|
|
@@ -176,6 +203,8 @@ declare interface ButtonProps {
|
|
|
176
203
|
[key: string]: unknown;
|
|
177
204
|
}
|
|
178
205
|
|
|
206
|
+
export declare const calculator: App<WindowProps>;
|
|
207
|
+
|
|
179
208
|
export declare function clamp(value: number, min: number, max: number): number;
|
|
180
209
|
|
|
181
210
|
export declare const ClickAction: MemoExoticComponent<({ actionId, label, shortcut, disabled, onTrigger, icon }: ClickActionProps) => JSX_2.Element>;
|
|
@@ -283,9 +312,9 @@ export declare const fileExplorer: App<FileExplorerProps>;
|
|
|
283
312
|
declare interface FileExplorerProps extends WindowProps {
|
|
284
313
|
path?: string;
|
|
285
314
|
selectorMode?: number;
|
|
286
|
-
Footer
|
|
287
|
-
onSelectionChange
|
|
288
|
-
onSelectionFinish
|
|
315
|
+
Footer?: FC;
|
|
316
|
+
onSelectionChange?: (params: OnSelectionChangeParams) => void;
|
|
317
|
+
onSelectionFinish?: Function;
|
|
289
318
|
}
|
|
290
319
|
|
|
291
320
|
export declare enum FileSelectorMode {
|
|
@@ -324,6 +353,8 @@ export declare function getViewportParams(): Record<string, string>;
|
|
|
324
353
|
|
|
325
354
|
export declare function HeaderMenu({ children, ...props }: ActionsProps): JSX_2.Element;
|
|
326
355
|
|
|
356
|
+
export declare const IMAGE_EXTENSIONS: string[];
|
|
357
|
+
|
|
327
358
|
export declare function ImagePreview({ source, className, onError, ...props }: ImagePreviewProps): JSX_2.Element;
|
|
328
359
|
|
|
329
360
|
declare interface ImagePreviewProps {
|
|
@@ -345,6 +376,12 @@ export declare function isValidInteger(number: number | string): number | boolea
|
|
|
345
376
|
|
|
346
377
|
export declare function isValidUrl(string: string): boolean;
|
|
347
378
|
|
|
379
|
+
export declare const mediaViewer: App<MediaViewerProps>;
|
|
380
|
+
|
|
381
|
+
declare interface MediaViewerProps extends WindowProps {
|
|
382
|
+
file?: VirtualFile;
|
|
383
|
+
}
|
|
384
|
+
|
|
348
385
|
export declare class MiscConfig {
|
|
349
386
|
doubleClickDelay: MiscConfigOptions["doubleClickDelay"];
|
|
350
387
|
constructor(options?: OptionalInterface<MiscConfigOptions>);
|
|
@@ -562,6 +599,8 @@ declare class Settings {
|
|
|
562
599
|
set(key: string, value: string): Promise<void>;
|
|
563
600
|
}
|
|
564
601
|
|
|
602
|
+
export declare const settings: App<SettingsProps>;
|
|
603
|
+
|
|
565
604
|
export declare class SettingsManager {
|
|
566
605
|
#private;
|
|
567
606
|
static VIRTUAL_PATHS: {
|
|
@@ -573,6 +612,10 @@ export declare class SettingsManager {
|
|
|
573
612
|
|
|
574
613
|
declare type SettingsManagerState = SettingsManager | undefined;
|
|
575
614
|
|
|
615
|
+
declare interface SettingsProps extends WindowProps {
|
|
616
|
+
tab?: number;
|
|
617
|
+
}
|
|
618
|
+
|
|
576
619
|
export declare function setViewportIcon(url: string): void;
|
|
577
620
|
|
|
578
621
|
export declare function setViewportTitle(title: string): void;
|
|
@@ -636,8 +679,8 @@ declare interface TaskbarConfigOptions {
|
|
|
636
679
|
export declare const terminal: App<TerminalProps>;
|
|
637
680
|
|
|
638
681
|
declare interface TerminalProps extends WindowProps {
|
|
639
|
-
path
|
|
640
|
-
input
|
|
682
|
+
path?: string;
|
|
683
|
+
input?: string;
|
|
641
684
|
}
|
|
642
685
|
|
|
643
686
|
export declare function TextDisplay({ children }: TextDisplayProps): JSX_2.Element;
|
|
@@ -916,7 +959,7 @@ export declare class VirtualFile extends VirtualBase {
|
|
|
916
959
|
/**
|
|
917
960
|
* Sets the content of this file and removes the source
|
|
918
961
|
*/
|
|
919
|
-
setContent(content: string): this;
|
|
962
|
+
setContent(content: string | string[]): this;
|
|
920
963
|
get id(): string;
|
|
921
964
|
static splitId(id: string): {
|
|
922
965
|
name: string;
|