From ae6b8209b64415392721a8b17093dbbdeeb676aa Mon Sep 17 00:00:00 2001 From: Prozilla Date: Thu, 13 Jun 2024 21:54:26 +0200 Subject: [PATCH] Updated documentation --- deploy.sh | 22 - docs/README.md | 13 +- docs/configuration/README.md | 30 +- docs/features/README.md | 49 +- docs/features/apps/README.md | 2 +- package-lock.json | 827 ++++++++++-------- package.json | 26 +- public/documents/Prozilla.md | 16 + public/documents/info.md | 12 +- public/documents/links.md | 15 - scripts/_utils/print.ts | 29 + scripts/deploy.ts | 27 + {src/tools => scripts}/fetchRepository.ts | 13 +- {src/tools => scripts}/stage.ts | 81 +- src/components/actions/Actions.tsx | 1 - src/components/apps/browser/Browser.tsx | 12 +- .../apps/file-explorer/FileExplorer.tsx | 4 +- .../apps/media-viewer/MediaViewer.tsx | 2 +- .../apps/settings/tabs/AboutSettings.tsx | 4 +- src/components/apps/terminal/Terminal.tsx | 6 +- .../apps/text-editor/TextEditor.module.css | 138 ++- .../apps/text-editor/TextEditor.tsx | 28 +- .../overrides/MarkdownBlockquote.tsx | 86 ++ .../text-editor/overrides/MarkdownImage.tsx | 4 +- .../text-editor/overrides/MarkdownLink.tsx | 6 +- src/components/desktop/Desktop.tsx | 12 +- src/components/modals/share/Share.module.css | 73 +- src/components/modals/share/Share.tsx | 159 ++-- src/components/taskbar/menus/HomeMenu.tsx | 6 +- src/components/windows/WindowView.tsx | 2 +- src/config/branding.config.ts | 2 - src/config/deploy.config.ts | 9 + .../virtual-drive/folder/virtualFolder.ts | 2 +- .../virtual-drive/root/defaultData.ts | 14 +- src/hooks/_utils/scrollWithShadows.ts | 4 +- src/index.tsx | 8 +- tsconfig.json | 7 +- vite.config.ts | 10 +- 38 files changed, 1126 insertions(+), 635 deletions(-) delete mode 100644 deploy.sh create mode 100644 public/documents/Prozilla.md delete mode 100644 public/documents/links.md create mode 100644 scripts/_utils/print.ts create mode 100644 scripts/deploy.ts rename {src/tools => scripts}/fetchRepository.ts (81%) rename {src/tools => scripts}/stage.ts (72%) create mode 100644 src/components/apps/text-editor/overrides/MarkdownBlockquote.tsx create mode 100644 src/config/deploy.config.ts diff --git a/deploy.sh b/deploy.sh deleted file mode 100644 index 3c2aeb4..0000000 --- a/deploy.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# Edit these variables before deploying -COMMIT_MESSAGE="Deployed build to GitHub Pages" -REPO_URL="https://github.com/Prozilla/ProzillaOS" - -# ------- You don't need to edit anything below this line ------- - -echo -e "\e[0;33mDeploying to GitHub Pages...\e[0m" - -domain=$(cat dist/CNAME) - -echo -e "Domain: \e[0;36m$domain\e[0m" -echo -e "Commit message: \e[0;36m$COMMIT_MESSAGE\e[0m" -echo -e "Repository: \e[0;36m$REPO_URL\e[0m" -echo "" - -if gh-pages -d dist -m "$COMMIT_MESSAGE" -r "$REPO_URL" ; then - echo -e "\e[0;32m✓ Successfully deployed to \e[0;36mhttps://$domain/\e[0m" -else - echo -e "\e[0;31mFailed to deploy\e[0m" -fi \ No newline at end of file diff --git a/docs/README.md b/docs/README.md index 213e5a4..27eb753 100644 --- a/docs/README.md +++ b/docs/README.md @@ -25,11 +25,11 @@ These are the scripts in logical order, that will be available when you have ins 1. `npm run start` - Start Vite dev server at [localhost:3000](http://localhost:3000/). Changes to module will dynamically be hot-reloaded, so normally there is no need for hard-refreshes. + Start Vite dev server at [localhost:3000](http://localhost:3000/). Changes to module will dynamically be hot-reloaded, so normally there is no need for hard-refreshes. VSCode is configured to run this script whenever the project is opened. 2. `npm run build` - Compile project using TypeScript and bundle all files into the `dist` directory. This directory can be uploaded to a web server. + Compile project using TypeScript and bundle all files into the `dist` directory, or the directory specified in config file. This directory can be uploaded to a web server. 3. `npm run serve` @@ -37,17 +37,14 @@ These are the scripts in logical order, that will be available when you have ins 4. `npm run stage` - Run [node program](../src/tools/stage.ts) that stages the build and prepares it for deployment. Script will generate a sitemap, CNAME file, etc. + Execute [stage.ts](../scripts/stage.ts), which stages the build and prepares it for deployment. Script will generate a sitemap, robots.txt and all other necessary files. 5. `npm run deploy` - Run scripts #2 and #4, then execute [deploy.sh](../deploy.sh), which deploys the staged build to GitHub Pages on branch called `gh-pages`. + Run scripts #2 and #4, then execute [deploy.ts](../scripts/deploy.ts), which uploads the staged build to GitHub Pages on branch called `gh-pages`. This should then trigger a GitHub Action that deploys the build to production. > [!IMPORTANT] -> Check the "Deployment" section on the [Configuration](./configuration/README.md) page, to see what configurations must be made before starting the staging or deployment process. - -> [!NOTE] -> After this deployment process, GitHub Pages will run its own build step to finalize the deployment, as seen in the `Actions` tab on GitHub. This usually takes less than a minute and once it's done, your deployment will be live. +> Make sure you update your [configuration](./configuration/README.md) before running the `stage` or `deploy` script, otherwise your deployment will probably fail or be partially broken. ### Other scripts diff --git a/docs/configuration/README.md b/docs/configuration/README.md index 9ef82fd..6faeb36 100644 --- a/docs/configuration/README.md +++ b/docs/configuration/README.md @@ -6,31 +6,45 @@ ProzillaOS can be configured in numerous ways. The most important one being via For developers, these are the methods of configuring ProzillaOS: -- `src/config` - The `src/config` directory holds all global variables used in the rest of the `src` directory, which are mostly string and number constants, but also includes some arrays and dictionaries that can be adjusted to configure ProzillaOS. -- `styles` - Everything related to styles, can be configured in `styles` directory. Most configurations will happen inside `styles/global`, where you can define the fonts, css variables/properties and other details. -- `public/config` - This directory has XML files that serve as the default data for config files used by the app in the virtual drive. These can be edited by the user once they're loaded during initialisation. +- `src/config` + + This directory contains the main configurations for ProzillaOS. + +- `styles` + + Everything related to styles can be configured in this directory. The stylesheets inside `styles/global` contain CSS variables, font declarations, etc. + +- `public/config` + + This directory has XML files that serve as the default data for config files used by the app in the virtual drive. These can be edited by the user once they're loaded during initialisation. ## Deployment +- [deploy.config.ts](../../src/config/deploy.config.ts) + Before starting the deployment process, you will need to make sure these parts of your configuration are set up correctly. ### Domain -To change the domain that your website will be deployed to, go to [`branding.config.ts`](../../src/config/branding.config.ts) and set the `DOMAIN` variable to your own domain. You may also want to adjust the `BASE_URL` in case your domain does not have an SSL certificate. If you are using GitHub Pages, go to your Pages settings on GitHub and make sure the domain matches the one you just configured to deploy to. +Set the `DOMAIN` variable to the domain you wish to deploy the website to. You may also want to adjust the `BASE_URL` in case your domain does not have an SSL certificate. If you are using GitHub Pages, go to your Pages settings on GitHub and make sure the domain option there matches this variable. > [!WARNING] > This configuration is also required before starting the staging process. ### Branch -If you are deploying to GitHub Pages, go to your Pages settings on GitHub, navigate to "Build and deployment" and set the source to "Deploy from a branch". Then select the `gh-pages` branch, select the `/ (root)` folder and click "Save". Make sure your domain matches the domain in your configuration, as described in the previous paragraph. +If you are deploying to GitHub Pages, go to your Pages settings on GitHub, navigate to "Build and deployment" and set the source to "Deploy from a branch". Then select the `gh-pages` branch and select the `/ (root)` folder. + +If you would like to use a different branch, also set the `REPO.branch` to that same branch. ### Repository URL & commit message -If you are deploying to GitHub Pages, open [deploy.sh](../../deploy.sh) and set the `REPO_URL` variable to the URL of your GitHub repository. You may also want to customize the `COMMIT_MESSAGE` variable, which will be used to name commits made to the `gh-pages` branch. +If you are deploying to GitHub Pages, set `REPO.owner` and `REPO.name` to your GitHub username and your repository's name respectively. You may also want to customize the `COMMIT_MESSAGE` variable, which will be used by the `deploy` script to commit the build to the `gh-pages` branch. ## Branding -### Name +- [branding.config.ts](../../src/config/branding.config.ts) -Change the variable called `NAME` in [`branding.config.ts`](../../src/config/branding.config.ts). \ No newline at end of file +### Name & tag line + +Set the `NAME` and `TAG_LINE` variables to the name and tag line or short description you wish to use for the website respectively. \ No newline at end of file diff --git a/docs/features/README.md b/docs/features/README.md index fa6f545..68995fe 100644 --- a/docs/features/README.md +++ b/docs/features/README.md @@ -4,14 +4,14 @@ Most code for features can be found in the [features](../../src/features) directory. This directory is a library that is mostly used by files in the [components](../../src/components) and [hooks](../../src/hooks) directory. -> [!NOTE] +> [!NOTE] > Mentions of directories inside this part of the documentation, are relative to the `src` folder. > ``` > components -> src/components > hooks -> src/hooks > ``` -> [!TIP] +> [!TIP] > To see the status and to-do's of each feature, check the [task board](https://prozilla.notion.site/8325fabca1fb4f9885b6d6dfd5aa64c8?v=1a59f7ce50914f5ea711fe6460e52868&pvs=4) on Notion. ## Pages @@ -24,4 +24,47 @@ Most code for features can be found in the [features](../../src/features) direct - [Taskbar](taskbar/README.md) - [Virtual Drive](virtual-drive//README.md) - [Windows](windows/README.md) -- [Z-index](z-index/README.md) \ No newline at end of file +- [Z-index](z-index/README.md) + +## Overview + +This is a simplified overview of ProzillaOS' features, check the pages inside this folder for more details about each individual feature. + +### System + +- Customizable **taskbar** with a home menu, search menu, pinned apps and utilities +- Customizable **desktop** with icons, accompanied by custom wallpapers +- **Virtual drive** that can handle files, folders, symbolic links, as well as read from external sources + - Storage system that stores and loads the virtual drive from local storage + +### Applications + +- Resizable and draggable **windows**, with dynamic titles, for displaying and interacting with apps, which adapts to the user's screen resolution +- Native and web-view **applications** + - **File explorer** that interacts with virtual drive and allows user to browse the source code on the website itself + - **Terminal** with custom linux-inspired commands + - **Settings** application for customizing appearance, managing apps and managing virtual drive + - **Text editor** app that can read and write files as well as render markdown files + - Other applications like a calculator, minigames, image viewer, browser, etc. +- **Standalone** system that allows each app to have its own dedicated page in an isolated view, which is also indexable by search engines +- **URL params** that trigger an app to open with optional arguments + +### Interactions + +- **Modals** that can be used as context menus, header menus, file selectors, dialog boxes, etc. +- Advanced **actions** system, for easily assembling different menus that can handle dropdowns, selections, toggles, shortcuts, etc. + +### Assets + +- Custom **wallpapers** made in Figma +- Custom **icons** made in Figma inspired by Font Awesome + +### Codebase + +- Free, open-source and self-hostable +- Uses **React**, **Vite** and **TypeScript** +- Extensive **documentation** +- **Configuration** files that allow you to configure almost everything inside the project +- **Eslint** for linting +- Custom **build and deployment tools** to automate tasks +- Separation of concerns and feature-based folder structure diff --git a/docs/features/apps/README.md b/docs/features/apps/README.md index 700a51b..e47c2a7 100644 --- a/docs/features/apps/README.md +++ b/docs/features/apps/README.md @@ -29,7 +29,7 @@ In the list above, you can see some app names, as well as the corresponding IDs, | Apps list | :x: | :heavy_check_mark: | | Standalone title | :x: | :heavy_check_mark: | -> [!CAUTION] +> [!CAUTION] > Changing the ID of an application that has already been deployed once may cause unexpected issues, like creating invalid links. ## Common components diff --git a/package-lock.json b/package-lock.json index bdf4ebd..9edfb65 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,6 @@ "@fortawesome/react-fontawesome": "^0.2.0", "@vitejs/plugin-react-swc": "^3.7.0", "anser": "^2.1.1", - "core-js": "^3.37.0", "escape-carriage": "^1.3.1", "markdown-to-jsx": "^7.2.1", "react": "^18.2.0", @@ -27,27 +26,22 @@ "react-syntax-highlighter": "^15.5.0", "react-tabs": "^6.0.2", "vite": "^5.2.12", - "vite-plugin-svgr": "^4.2.0", - "vite-tsconfig-paths": "^4.3.2" + "vite-plugin-svgr": "^4.2.0" }, "devDependencies": { - "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@eslint/js": "^9.2.0", + "@types/gh-pages": "^6.1.0", "@types/node": "^20.12.8", "@types/react": "^18.3.1", "@types/react-dom": "^18.3.0", "@types/react-syntax-highlighter": "^15.5.13", - "@types/webpack-env": "^1.18.4", - "@typescript-eslint/eslint-plugin": "^7.8.0", - "@typescript-eslint/parser": "^7.8.0", "eslint": "^8.57.0", "eslint-plugin-react": "^7.34.1", "eslint-plugin-react-refresh": "^0.4.7", "gh-pages": "^5.0.0", - "ts-node": "^10.9.2", + "tsx": "^4.15.4", "typescript": "^5.4.5", - "typescript-eslint": "^7.8.0", - "web-vitals": "^4.0.1" + "typescript-eslint": "^7.8.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -147,18 +141,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", - "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-compilation-targets": { "version": "7.24.6", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.6.tgz", @@ -182,38 +164,6 @@ "semver": "bin/semver" } }, - "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.5.tgz", - "integrity": "sha512-uRc4Cv8UQWnE4NXlYTIIdM7wfFkOqlFztcC/gVXDKohKoVB3OyonfelUBaJzSwpBntZ2KYGF/9S7asCHsXwW6g==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-member-expression-to-functions": "^7.24.5", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.24.1", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.24.5", - "semver": "^6.3.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-class-features-plugin/node_modules/semver": { - "version": "6.3.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", - "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, "node_modules/@babel/helper-environment-visitor": { "version": "7.24.6", "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.6.tgz", @@ -245,18 +195,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.5.tgz", - "integrity": "sha512-4owRteeihKWKamtqg4JmWSsEZU445xpFRXPEwp44HbgbxdWlUV1b4Agg4lkA806Lil5XM/e+FJyS0vj5T6vmcA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-module-imports": { "version": "7.24.6", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.6.tgz", @@ -286,44 +224,6 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", - "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz", - "integrity": "sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.1.tgz", - "integrity": "sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==", - "dev": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-member-expression-to-functions": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, "node_modules/@babel/helper-simple-access": { "version": "7.24.6", "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.6.tgz", @@ -335,18 +235,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", - "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-split-export-declaration": { "version": "7.24.6", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.6.tgz", @@ -419,39 +307,6 @@ "node": ">=6.0.0" } }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.21.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz", - "integrity": "sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.21.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, "node_modules/@babel/runtime": { "version": "7.24.5", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.5.tgz", @@ -514,28 +369,6 @@ "node": ">=6.9.0" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, "node_modules/@esbuild/aix-ppc64": { "version": "0.20.2", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.20.2.tgz", @@ -1823,35 +1656,17 @@ "tslib": "^2.6.0" } }, - "node_modules/@tsconfig/node10": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.11.tgz", - "integrity": "sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==", - "dev": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true - }, "node_modules/@types/estree": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" }, + "node_modules/@types/gh-pages": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@types/gh-pages/-/gh-pages-6.1.0.tgz", + "integrity": "sha512-Ma9bmKkE+WUtywENLC1rSLXTW66cJHJMWX2RQrJTMKhYM8o+73bRJ1ebfo3RWXUcG+HW3khky2nhVaN7nCsa3Q==", + "dev": true + }, "node_modules/@types/hast": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.8.tgz", @@ -1919,12 +1734,6 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, - "node_modules/@types/webpack-env": { - "version": "1.18.4", - "resolved": "https://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.18.4.tgz", - "integrity": "sha512-I6e+9+HtWADAWeeJWDFQtdk4EVSAbj6Rtz4q8fJ7mSr1M0jzlFcs8/HZ+Xb5SHzVm1dxH7aUiI+A8kA8Gcrm0A==", - "dev": true - }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "7.8.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.8.0.tgz", @@ -2177,15 +1986,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-walk": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", - "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/ajv": { "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", @@ -2227,12 +2027,6 @@ "node": ">=4" } }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true - }, "node_modules/array-buffer-byte-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", @@ -2428,12 +2222,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -2617,22 +2411,6 @@ "node": ">= 0.6" } }, - "node_modules/core-js": { - "version": "3.37.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.37.0.tgz", - "integrity": "sha512-fu5vHevQ8ZG4og+LXug8ulUtVxjOcEYvifJr7L5Bfq9GOztVqsKd9/59hUk2ZSbCrS3BqUr3EpaYGIYzq7g3Ug==", - "hasInstallScript": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true - }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2760,15 +2538,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", @@ -3516,9 +3285,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -3696,6 +3465,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-tsconfig": { + "version": "4.7.5", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.5.tgz", + "integrity": "sha512-ZCuZCnlqNzjb4QprAzXKdpp/gh6KTxSJuw3IBsPnV/7fV4NxC9ckB+vPTt8w7fJA0TaSD7c55BR47JD6MEDyDw==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/gh-pages": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/gh-pages/-/gh-pages-5.0.0.tgz", @@ -3711,8 +3492,8 @@ "globby": "^6.1.0" }, "bin": { - "gh-pages": "bin/gh-pages", - "gh-pages-clean": "bin/gh-pages-clean" + "gh-pages": "bin/gh-pages.js", + "gh-pages-clean": "bin/gh-pages-clean.js" }, "engines": { "node": ">=10" @@ -3841,11 +3622,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/globrex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", - "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==" - }, "node_modules/gopd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", @@ -4652,12 +4428,6 @@ "semver": "bin/semver" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true - }, "node_modules/markdown-to-jsx": { "version": "7.2.1", "resolved": "https://registry.npmjs.org/markdown-to-jsx/-/markdown-to-jsx-7.2.1.tgz", @@ -5418,6 +5188,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", @@ -5871,54 +5650,436 @@ "typescript": ">=4.2.0" } }, - "node_modules/ts-node": { - "version": "10.9.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.2.tgz", - "integrity": "sha512-f0FFpIdcHgn8zcPSbf1dRevwt047YMnaiJM3u2w2RewrB+fob/zePZcrOyQoLMMO7aBIddLcQIEK5dYjkLnGrQ==", - "dev": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, "node_modules/tslib": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" }, + "node_modules/tsx": { + "version": "4.15.4", + "resolved": "https://registry.npmjs.org/tsx/-/tsx-4.15.4.tgz", + "integrity": "sha512-d++FLCwJLrXaBFtRcqdPBzu6FiVOJ2j+UsvUZPtoTrnYtCGU5CEW7iHXtNZfA2fcRTvJFWPqA6SWBuB0GSva9w==", + "dev": true, + "dependencies": { + "esbuild": "~0.21.4", + "get-tsconfig": "^4.7.5" + }, + "bin": { + "tsx": "dist/cli.mjs" + }, + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + } + }, + "node_modules/tsx/node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/tsx/node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -6111,12 +6272,6 @@ "punycode": "^2.1.0" } }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true - }, "node_modules/vite": { "version": "5.2.12", "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.12.tgz", @@ -6184,49 +6339,6 @@ "vite": "^2.6.0 || 3 || 4 || 5" } }, - "node_modules/vite-tsconfig-paths": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-4.3.2.tgz", - "integrity": "sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==", - "dependencies": { - "debug": "^4.1.1", - "globrex": "^0.1.2", - "tsconfck": "^3.0.3" - }, - "peerDependencies": { - "vite": "*" - }, - "peerDependenciesMeta": { - "vite": { - "optional": true - } - } - }, - "node_modules/vite-tsconfig-paths/node_modules/tsconfck": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/tsconfck/-/tsconfck-3.1.0.tgz", - "integrity": "sha512-CMjc5zMnyAjcS9sPLytrbFmj89st2g+JYtY/c02ug4Q+CZaAtCgbyviI0n1YvjZE/pzoc6FbNsINS13DOL1B9w==", - "bin": { - "tsconfck": "bin/tsconfck.js" - }, - "engines": { - "node": "^18 || >=20" - }, - "peerDependencies": { - "typescript": "^5.0.0" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/web-vitals": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/web-vitals/-/web-vitals-4.0.1.tgz", - "integrity": "sha512-AW6qT/vXK3pbf+WgVcEBXY//AWCpXjVKgdb6rt0cARSUdtT+NUtZCOeo+CSLUX7PjSQ275DmxfkAs7QlPbtR6w==", - "dev": true - }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -6337,15 +6449,6 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 79b9841..b50ebcb 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,11 @@ "name": "prozilla-os", "version": "0.1.0", "private": false, - "author": "Prozilla", + "author": { + "name": "Prozilla", + "email": "business@prozilla.dev", + "url": "https://prozilla.dev/" + }, "homepage": "https://os.prozilla.dev/", "repository": "https://github.com/Prozilla/ProzillaOS", "type": "module", @@ -10,10 +14,10 @@ "start": "vite --port 3000 --host", "build": "tsc && vite build", "serve": "vite preview --port 8080 --host", + "stage": "tsx scripts/stage", "predeploy": "npm run build && npm run stage", - "stage": "node --no-warnings --loader ts-node/esm ./src/tools/stage", - "deploy": "sh deploy.sh", - "fetch": "node --no-warnings --loader ts-node/esm ./src/tools/fetchRepository" + "deploy": "tsx scripts/deploy", + "fetch": "tsx scripts/fetchRepository" }, "dependencies": { "@fortawesome/fontawesome-svg-core": "^6.4.0", @@ -22,7 +26,6 @@ "@fortawesome/react-fontawesome": "^0.2.0", "@vitejs/plugin-react-swc": "^3.7.0", "anser": "^2.1.1", - "core-js": "^3.37.0", "escape-carriage": "^1.3.1", "markdown-to-jsx": "^7.2.1", "react": "^18.2.0", @@ -35,27 +38,22 @@ "react-syntax-highlighter": "^15.5.0", "react-tabs": "^6.0.2", "vite": "^5.2.12", - "vite-plugin-svgr": "^4.2.0", - "vite-tsconfig-paths": "^4.3.2" + "vite-plugin-svgr": "^4.2.0" }, "devDependencies": { - "@babel/plugin-proposal-private-property-in-object": "^7.21.11", "@eslint/js": "^9.2.0", + "@types/gh-pages": "^6.1.0", "@types/node": "^20.12.8", "@types/react": "^18.3.1", "@types/react-dom": "^18.3.0", "@types/react-syntax-highlighter": "^15.5.13", - "@types/webpack-env": "^1.18.4", - "@typescript-eslint/eslint-plugin": "^7.8.0", - "@typescript-eslint/parser": "^7.8.0", "eslint": "^8.57.0", "eslint-plugin-react": "^7.34.1", "eslint-plugin-react-refresh": "^0.4.7", "gh-pages": "^5.0.0", - "ts-node": "^10.9.2", + "tsx": "^4.15.4", "typescript": "^5.4.5", - "typescript-eslint": "^7.8.0", - "web-vitals": "^4.0.1" + "typescript-eslint": "^7.8.0" }, "browserslist": { "production": [ diff --git a/public/documents/Prozilla.md b/public/documents/Prozilla.md new file mode 100644 index 0000000..aa12244 --- /dev/null +++ b/public/documents/Prozilla.md @@ -0,0 +1,16 @@ +# Prozilla Prozilla's logo + +Hi, I'm Sieben De Beule, but you can call me Prozilla. I'm a passionate software developer and 3D artist. Experienced in application (especially games) and web development as well as web design. + +## About me + +I made ProzillaOS and a few other projects, including a VR game called [Crumbling City](https://store.steampowered.com/app/1520290/Crumbling_City/) which is available on Steam. + +My portfolio is available at [prozilla.dev](https://prozilla.dev/) and you can contact me [business@prozilla.dev](mailto:business@prozilla.dev). If you would like to support my work, feel free to donate on my [Ko-fi page](https://ko-fi.com/prozilla). If you have any suggestions, bug reports on ProzillaOS or if you've made your own version of ProzillaOS, don't hesitate to contact me! + + +## Connect with me +prozilladev +sieben de beule +prozilladev +prozilla diff --git a/public/documents/info.md b/public/documents/info.md index 9f8ad5b..55ac6ad 100644 --- a/public/documents/info.md +++ b/public/documents/info.md @@ -1,13 +1,15 @@ -Banner with the logo of ProzillaOS +License Stars Forks -# Info +# ProzillaOS -This is ProzillaOS, a web-based operating system made with React.js by [Prozilla](https://prozilla.dev/). +Banner with the logo of ProzillaOS + +ProzillaOS is a web-based operating system inspired by Ubuntu Linux and Windows made with React by [Prozilla](https://prozilla.dev/). It's a virtual desktop environment that mimics a real operating system and runs entirely in the browser. ## Open-source -ProzillaOS is [open-source](https://github.com/Prozilla/ProzillaOS)! Feel free to fork this project and create your own OS or share feedback by creating an issue on the GitHub page. +This website was made using React, Vite and TypeScript. The source code is available both on [GitHub](https://github.com/Prozilla/ProzillaOS) and [on the website itself](/). You can find the documentation for this project inside the [docs](/docs) folder. ## Support ProzillaOS -You can support this project by donating to [ko-fi.com/prozilla](https://ko-fi.com/prozilla). \ No newline at end of file +If you like what you see, consider supporting this project by donating to [ko-fi.com/prozilla](https://ko-fi.com/prozilla). diff --git a/public/documents/links.md b/public/documents/links.md deleted file mode 100644 index 5590425..0000000 --- a/public/documents/links.md +++ /dev/null @@ -1,15 +0,0 @@ -# Links - -**ProzillaOS** - -- [GitHub](https://github.com/Prozilla/ProzillaOS) - -**Prozilla** - -- [Website (prozilla.dev)](https://prozilla.dev/) -- [Ko-fi](https://ko-fi.com/prozilla) - -**Crumbling City** - -- [Website (crumblingcity.com)](https://crumblingcity.com/) -- [Steam page](https://store.steampowered.com/app/1520290/Crumbling_City/) \ No newline at end of file diff --git a/scripts/_utils/print.ts b/scripts/_utils/print.ts new file mode 100644 index 0000000..0ee3420 --- /dev/null +++ b/scripts/_utils/print.ts @@ -0,0 +1,29 @@ +import { ANSI } from "../../src/config/apps/terminal.config"; + +export type status = "error" | "info" | "file" | "success" | "start"; + +export function print(message: string, status?: status, newLine?: boolean) { + if (newLine) + console.log(""); + + if (status == null) + return console.log(message); + + switch (status) { + case "start": + console.log(`${ANSI.fg.yellow}${message}...${ANSI.reset}`); + break; + case "file": + console.log(`- ${ANSI.fg.cyan}${message}${ANSI.reset}`); + break; + case "success": + console.log(`${ANSI.fg.green}✓ ${message}${ANSI.reset}`); + break; + case "error": + console.error(`${ANSI.fg.red}⚠ ${message}${ANSI.reset}`); + break; + default: + console.log(message); + break; + } +} \ No newline at end of file diff --git a/scripts/deploy.ts b/scripts/deploy.ts new file mode 100644 index 0000000..f177f69 --- /dev/null +++ b/scripts/deploy.ts @@ -0,0 +1,27 @@ +import ghpages from "gh-pages"; +import { ANSI } from "../src/config/apps/terminal.config"; +import { BASE_URL, BUILD_DIR, COMMIT_MESSAGE, DOMAIN, REPO_URL } from "../src/config/deploy.config"; + +function deploy() { + console.log(`${ANSI.fg.yellow}Deploying to GitHub Pages...${ANSI.reset}`); + console.log(`Domain: ${ANSI.fg.cyan + DOMAIN + ANSI.reset}`); + console.log(`Commit message: ${ANSI.fg.cyan + COMMIT_MESSAGE + ANSI.reset}`); + console.log(`Repository: ${ANSI.fg.cyan + REPO_URL + ANSI.reset}\n`); + + void ghpages.publish(BUILD_DIR, { + repo: REPO_URL, + cname: DOMAIN, + message: COMMIT_MESSAGE + }, (error) => { + if (error == null) + return; + + console.error(error); + console.log(`${ANSI.fg.red}⚠ Failed to deploy${ANSI.reset}`); + process.exit(1); + }).then(() => { + console.log(`${ANSI.fg.green}✓ Successfully deployed to ${ANSI.fg.cyan + BASE_URL + ANSI.reset}`); + }); +} + +deploy(); \ No newline at end of file diff --git a/src/tools/fetchRepository.ts b/scripts/fetchRepository.ts similarity index 81% rename from src/tools/fetchRepository.ts rename to scripts/fetchRepository.ts index 0a65aaa..53a82b0 100644 --- a/src/tools/fetchRepository.ts +++ b/scripts/fetchRepository.ts @@ -1,15 +1,10 @@ import fs from "node:fs"; -import { ANSI } from "../config/apps/terminal.config"; +import { ANSI } from "../src/config/apps/terminal.config"; +import { REPO } from "../src/config/deploy.config"; const API_URL = "https://api.github.com/"; const TREE_PATH = "public/config/tree.json"; -// TO DO: split these two variables into their own file -const OWNER = "Prozilla"; -const REPO = "ProzillaOS"; - -const BRANCH = "main"; - interface ReponseType { sha: string; url: string; @@ -24,7 +19,7 @@ interface ReponseType { } function fetchRepositoryTree(callback: (tree: string) => void) { - const treeUrl = `${API_URL}repos/${OWNER}/${REPO}/git/trees/${BRANCH}?recursive=true`; + const treeUrl = `${API_URL}repos/${REPO.owner}/${REPO.name}/git/trees/${REPO.branch}?recursive=true`; console.log(`${ANSI.fg.yellow}Fetching: ${ANSI.fg.cyan + treeUrl + ANSI.reset}`); @@ -62,4 +57,6 @@ try { }); } catch (error) { console.error(error); + console.log(`${ANSI.fg.red}⚠ Failed to fetch repository${ANSI.reset}`); + process.exit(1); } \ No newline at end of file diff --git a/src/tools/stage.ts b/scripts/stage.ts similarity index 72% rename from src/tools/stage.ts rename to scripts/stage.ts index b40e015..3156a32 100644 --- a/src/tools/stage.ts +++ b/scripts/stage.ts @@ -1,16 +1,14 @@ import fs from "node:fs"; -import { APP_DESCRIPTIONS, APP_NAMES, APPS } from "../config/apps.config"; -import { ANSI } from "../config/apps/terminal.config"; -import { BASE_URL, DOMAIN, NAME, TAG_LINE } from "../config/branding.config"; -import { WALLPAPERS } from "../config/desktop.config"; - -const BUILD_DIR = "dist"; +import { APP_DESCRIPTIONS, APP_NAMES, APPS } from "../src/config/apps.config"; +import { ANSI } from "../src/config/apps/terminal.config"; +import { NAME, TAG_LINE } from "../src/config/branding.config"; +import { WALLPAPERS } from "../src/config/desktop.config"; +import { BASE_URL, BUILD_DIR } from "../src/config/deploy.config"; const PATHS = { sitemapXml: BUILD_DIR + "/sitemap.xml", robotsTxt: BUILD_DIR + "/robots.txt", indexHtml: BUILD_DIR + "/index.html", - cname: BUILD_DIR + "/CNAME", }; function generateSitemapXml() { @@ -55,10 +53,6 @@ Disallow: Sitemap: ${sitemapUrl}`; } -function generateCname() { - return DOMAIN; -} - function generateTemplate(html: string) { const baseUrlRegex = /(?<=")https?:\/\/[a-z0-9-]+(\.)([a-zA-Z0-9-]+(\.))*[a-z]{2,3}\/(?=.*")/gi; html = html.replaceAll(baseUrlRegex, BASE_URL); @@ -120,34 +114,39 @@ function generateAppPages(template: string) { } } -try { - console.log(`${ANSI.fg.yellow}Staging build...${ANSI.reset}`); +function stage() { + try { + console.log(`${ANSI.fg.yellow}Staging build...${ANSI.reset}`); + + const files: [string, () => string][] = [ + [PATHS.sitemapXml, generateSitemapXml], + [PATHS.robotsTxt, generateRobotsTxt], + ]; + + files.forEach(([path, generateContent]) => { + const directory = path.substring(0, path.lastIndexOf("/")); + if (directory != "" && !fs.existsSync(directory)){ + fs.mkdirSync(directory, { recursive: true }); + } + + fs.writeFileSync(path, generateContent(), { flag: "w+" }); + console.log(`- ${ANSI.fg.cyan}${path}${ANSI.reset}`); + }); + + console.log(`\n${ANSI.fg.yellow}Generating pages...${ANSI.reset}`); + + const html = fs.readFileSync(PATHS.indexHtml, "utf-8"); + const template = generateTemplate(html); + + generate404Page(template); + generateAppPages(template); + + console.log(`\n${ANSI.fg.green}✓ Staging complete${ANSI.reset}`); + } catch (error) { + console.error(error); + console.log(`${ANSI.fg.red}⚠ Staging failed${ANSI.reset}`); + process.exit(1); + } +} - const files: [string, () => string][] = [ - [PATHS.sitemapXml, generateSitemapXml], - [PATHS.robotsTxt, generateRobotsTxt], - [PATHS.cname, generateCname], - ]; - - files.forEach(([path, generateContent]) => { - const directory = path.substring(0, path.lastIndexOf("/")); - if (directory != "" && !fs.existsSync(directory)){ - fs.mkdirSync(directory, { recursive: true }); - } - - fs.writeFileSync(path, generateContent(), { flag: "w+" }); - console.log(`- ${ANSI.fg.cyan}${path}${ANSI.reset}`); - }); - - console.log(`\n${ANSI.fg.yellow}Generating pages...${ANSI.reset}`); - - const html = fs.readFileSync(PATHS.indexHtml, "utf-8"); - const template = generateTemplate(html); - - generate404Page(template); - generateAppPages(template); - - console.log(`\n${ANSI.fg.green}✓ Staging complete${ANSI.reset}`); -} catch (error) { - console.error(error); -} \ No newline at end of file +stage(); \ No newline at end of file diff --git a/src/components/actions/Actions.tsx b/src/components/actions/Actions.tsx index a7db7ef..936be58 100644 --- a/src/components/actions/Actions.tsx +++ b/src/components/actions/Actions.tsx @@ -72,7 +72,6 @@ export function Actions({ children, className, onAnyTrigger, triggerParams, avoi actionId, children: iterateOverChildren((child.props as ActionProps).children), onTrigger: onTriggerOverride - } as ActionProps); }); diff --git a/src/components/apps/browser/Browser.tsx b/src/components/apps/browser/Browser.tsx index 88fb7e4..adcd553 100644 --- a/src/components/apps/browser/Browser.tsx +++ b/src/components/apps/browser/Browser.tsx @@ -9,15 +9,13 @@ import { useHistory } from "../../../hooks/_utils/history"; import { WindowProps } from "../../windows/WindowView"; interface BrowserProps extends WindowProps { - startUrl?: string; + url?: string; } -export function Browser({ startUrl, focus }: BrowserProps) { - const initialUrl = startUrl ?? HOME_URL; - - const [url, setUrl] = useState(initialUrl); - const [input, setInput] = useState(initialUrl); - const { history, pushState, stateIndex, undo, redo, undoAvailable, redoAvailable } = useHistory(initialUrl); +export function Browser({ url: startUrl = HOME_URL, focus }: BrowserProps) { + const [url, setUrl] = useState(startUrl); + const [input, setInput] = useState(startUrl); + const { history, pushState, stateIndex, undo, redo, undoAvailable, redoAvailable } = useHistory(startUrl); const ref = useRef(null); useEffect(() => { diff --git a/src/components/apps/file-explorer/FileExplorer.tsx b/src/components/apps/file-explorer/FileExplorer.tsx index 6a18ac9..e05b7c9 100644 --- a/src/components/apps/file-explorer/FileExplorer.tsx +++ b/src/components/apps/file-explorer/FileExplorer.tsx @@ -31,14 +31,14 @@ import { useAlert } from "../../../hooks/modals/alert"; import { VirtualRoot } from "../../../features/virtual-drive/root/virtualRoot"; interface FileExplorerProps extends WindowProps { - startPath?: string; + path?: string; selectorMode?: number; Footer: FC; onSelectionChange: (params: OnSelectionChangeParams) => void; onSelectionFinish: Function; } -export function FileExplorer({ startPath, selectorMode, Footer, onSelectionChange, onSelectionFinish }: FileExplorerProps) { +export function FileExplorer({ path: startPath, selectorMode, Footer, onSelectionChange, onSelectionFinish }: FileExplorerProps) { const isSelector = (Footer != null && selectorMode != null && selectorMode !== SELECTOR_MODE.NONE); const virtualRoot = useVirtualRoot(); diff --git a/src/components/apps/media-viewer/MediaViewer.tsx b/src/components/apps/media-viewer/MediaViewer.tsx index 2752e16..8248223 100644 --- a/src/components/apps/media-viewer/MediaViewer.tsx +++ b/src/components/apps/media-viewer/MediaViewer.tsx @@ -21,7 +21,7 @@ export function MediaViewer({ file, close, setTitle }: MediaViewerProps) { if (file == null) { setTimeout(() => { - windowsManager.open(APPS.FILE_EXPLORER, { startPath: "~/Pictures" }); + windowsManager.open(APPS.FILE_EXPLORER, { path: "~/Pictures" }); close(); }, 10); return; diff --git a/src/components/apps/settings/tabs/AboutSettings.tsx b/src/components/apps/settings/tabs/AboutSettings.tsx index 5af2cf3..148bb73 100644 --- a/src/components/apps/settings/tabs/AboutSettings.tsx +++ b/src/components/apps/settings/tabs/AboutSettings.tsx @@ -21,12 +21,12 @@ export function AboutSettings() { event.preventDefault(); windowsManager.open("text-editor", { mode: "view", - file: virtualRoot.navigate("~/Documents/info.md"), + file: virtualRoot.navigate("~/Documents/Info.md"), size: new Vector2(575, 675), }); }} > - Open info.md + Open Info.md ; diff --git a/src/components/taskbar/menus/HomeMenu.tsx b/src/components/taskbar/menus/HomeMenu.tsx index 7dc434f..8c090a6 100644 --- a/src/components/taskbar/menus/HomeMenu.tsx +++ b/src/components/taskbar/menus/HomeMenu.tsx @@ -77,7 +77,7 @@ export function HomeMenu({ active, setActive, search }: HomeMenuProps) { setActive(false); windowsManager.open("text-editor", { mode: "view", - file: virtualRoot.navigate("~/Documents/info.md"), + file: virtualRoot.navigate("~/Documents/Info.md"), size: new Vector2(575, 675), }); }}> @@ -85,13 +85,13 @@ export function HomeMenu({ active, setActive, search }: HomeMenuProps) { diff --git a/src/components/windows/WindowView.tsx b/src/components/windows/WindowView.tsx index a188087..247c1cc 100644 --- a/src/components/windows/WindowView.tsx +++ b/src/components/windows/WindowView.tsx @@ -69,7 +69,7 @@ export const WindowView: FC = memo(({ id, app, size, position, onIn openWindowedModal({ appId: app.id, fullscreen: maximized, - size: new Vector2(350, 400), + size: new Vector2(350, 350), Modal: (props) => }); }}/> diff --git a/src/config/branding.config.ts b/src/config/branding.config.ts index b131482..351c411 100644 --- a/src/config/branding.config.ts +++ b/src/config/branding.config.ts @@ -2,8 +2,6 @@ import { ANSI } from "./apps/terminal.config"; export const NAME = "ProzillaOS"; export const TAG_LINE = "Web-based Operating System"; -export const DOMAIN = "os.prozilla.dev"; -export const BASE_URL = `https://${DOMAIN}/`; export const ASCII_LOGO = ` :. diff --git a/src/config/deploy.config.ts b/src/config/deploy.config.ts new file mode 100644 index 0000000..b59f20f --- /dev/null +++ b/src/config/deploy.config.ts @@ -0,0 +1,9 @@ +export const BUILD_DIR = "dist"; + +export const DOMAIN = "os.prozilla.dev"; +export const BASE_URL = `https://${DOMAIN}/`; + +export const REPO = { owner: "Prozilla", name: "ProzillaOS", branch: "main" }; +export const REPO_URL = `https://github.com/${REPO.owner}/${REPO.name}`; + +export const COMMIT_MESSAGE = "Deployed build to GitHub Pages"; \ No newline at end of file diff --git a/src/features/virtual-drive/folder/virtualFolder.ts b/src/features/virtual-drive/folder/virtualFolder.ts index 387feb8..148107a 100644 --- a/src/features/virtual-drive/folder/virtualFolder.ts +++ b/src/features/virtual-drive/folder/virtualFolder.ts @@ -289,7 +289,7 @@ export class VirtualFolder extends VirtualBase { * Opens this folder in file explorer */ open(windowsManager: WindowsManager) { - return windowsManager.open(APPS.FILE_EXPLORER, { startPath: this.path }); + return windowsManager.open(APPS.FILE_EXPLORER, { path: this.path }); } /** diff --git a/src/features/virtual-drive/root/defaultData.ts b/src/features/virtual-drive/root/defaultData.ts index a4505c5..aa6a20a 100644 --- a/src/features/virtual-drive/root/defaultData.ts +++ b/src/features/virtual-drive/root/defaultData.ts @@ -37,6 +37,8 @@ export function loadDefaultData(virtualRoot: VirtualRoot) { } }).createFile("ProzillaOS", "png", (file) => { file.setSource("/assets/banner-logo-title.png"); + }).createFile("Icon", "svg", (file) => { + file.setSource("/icon.svg"); }).createFolder("Crumbling City", (folder) => { folder.createFile("Japan", "png", (file) => { file.setSource("https://daisygames.org/media/Games/Crumbling%20City/CrumblingCityRelease.png"); @@ -52,22 +54,22 @@ export function loadDefaultData(virtualRoot: VirtualRoot) { folder.setIconUrl(AppsManager.getAppIconUrl(APPS.FILE_EXPLORER, "folder-text")); folder.createFile("text", "txt", (file) => { file.setContent("Hello world!"); - }).createFile("info", "md", (file) => { + }).createFile("Info", "md", (file) => { file.setProtected(true) - .setSource("/documents/info.md") + .setSource("/documents/Info.md") .setIconUrl(AppsManager.getAppIconUrl(APPS.FILE_EXPLORER, "file-info")); linkedPaths.info = file.path; - }).createFile("links", "md", (file) => { + }).createFile("Prozilla", "md", (file) => { file.setProtected(true) - .setSource("/documents/links.md"); + .setSource("/documents/Prozilla.md"); linkedPaths.links = file.path; }); linkedPaths.documents = folder.path; }) .createFolder("Desktop", (folder) => { - folder.createFileLink("info.md", (fileLink: VirtualFileLink) => { + folder.createFileLink("Info.md", (fileLink: VirtualFileLink) => { fileLink.setLinkedPath(linkedPaths.info); - }).createFileLink("links.md", (fileLink: VirtualFileLink) => { + }).createFileLink("Prozilla.md", (fileLink: VirtualFileLink) => { fileLink.setLinkedPath(linkedPaths.links); }).createFolderLink("Pictures", (folderLink: VirtualFolderLink) => { folderLink.setLinkedPath(linkedPaths.images); diff --git a/src/hooks/_utils/scrollWithShadows.ts b/src/hooks/_utils/scrollWithShadows.ts index 707a015..c07aeee 100644 --- a/src/hooks/_utils/scrollWithShadows.ts +++ b/src/hooks/_utils/scrollWithShadows.ts @@ -26,7 +26,7 @@ interface UseScrollWithShadowParams { export function useScrollWithShadow(params: UseScrollWithShadowParams): { boxShadow: string; - onUpdate: (event: Event) => void; + onUpdate: (event: Event | { target: HTMLElement }) => void; } { const [initiated, setInitiated] = useState(false); const [scrollStart, setScrollStart] = useState(0); @@ -67,7 +67,7 @@ export function useScrollWithShadow(params: UseScrollWithShadowParams): { setClientLength(horizontal ? element.clientWidth : element.clientHeight); }, [horizontal]); - const onUpdate = (event: Event) => { + const onUpdate = (event: Event | { target: HTMLElement }) => { updateValues(event.target as HTMLElement); }; diff --git a/src/index.tsx b/src/index.tsx index e9166a1..9f278df 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -20,4 +20,10 @@ root.render( const asciiLogoWidth = ASCII_LOGO.split("\n")[1].length; const welcomeMessage = `Welcome to ${NAME}`; const space = "\n\n" + " ".repeat(Math.ceil((asciiLogoWidth - welcomeMessage.length) / 2)); -console.info(ASCII_LOGO + space + welcomeMessage); \ No newline at end of file +console.info(ASCII_LOGO + space + welcomeMessage); + +// Remove trailing slash +window.onload = () => { + if (window.location.pathname.endsWith("/")) + window.history.pushState({}, null, window.location.pathname.replace(/\/+$/, "")); +}; diff --git a/tsconfig.json b/tsconfig.json index 3e60bc4..5e9e91f 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -28,13 +28,14 @@ }, "include": [ "src/**/*", - "vite.config.ts" + "vite.config.ts", + "scripts/**/*", ], "exclude": [ "./node_modules", - "./build", "./dist", - "./.vscode" + "./.vscode", + "./.github" ], "ts-node": { "experimentalSpecifierResolution": "node", diff --git a/vite.config.ts b/vite.config.ts index 7832c31..a69ead0 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,8 +1,16 @@ import { defineConfig } from "vite"; import react from "@vitejs/plugin-react-swc"; +import { BUILD_DIR } from "./src/config/deploy.config"; // https://vitejs.dev/config/ export default defineConfig({ base: "/", - plugins: [react()] + plugins: [react()], + build: { + outDir: BUILD_DIR + }, + server: { + port: 3000, + host: true + } }); \ No newline at end of file