├── .github ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── report-a-bug.md ├── README_content │ ├── README_Banner.ai │ ├── README_Banner.jpg │ ├── electro_base.png │ ├── electro_example.gif │ ├── electro_terminal.png │ └── electro_terminal_help.png └── workflows │ ├── manual-publish-to-beta.yml │ └── manual-publish-to-full-release.yml ├── .gitignore ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── biome.json ├── index.html ├── package-lock.json ├── package.json ├── src-tauri ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── build.rs ├── capabilities │ ├── default.json │ └── desktop.json ├── icons │ ├── 128x128.png │ ├── 128x128@2x.png │ ├── 32x32.png │ ├── icon.icns │ ├── icon.ico │ └── icon.png ├── src │ ├── lib.rs │ └── main.rs ├── tauri.conf.json └── windows │ └── hooks.nsi ├── src ├── App.tsx ├── assets │ └── electro-default.jpg ├── commands │ ├── CLICommand.ts │ ├── CLICommandCategory.ts │ └── CommandRegistry.ts ├── components │ ├── canvas │ │ ├── Canvas.tsx │ │ ├── ImageTransform.ts │ │ └── canvasUtils.ts │ └── terminal │ │ ├── Terminal.tsx │ │ ├── commands │ │ ├── electroCommands.tsx │ │ ├── imageCommands.tsx │ │ └── terminalCommands.tsx │ │ └── styles.css ├── keybinds │ ├── Keybind.ts │ ├── KeybindRegistry.ts │ └── keybinds │ │ ├── imageKeybinds.ts │ │ └── terminalKeybinds.ts ├── main.tsx ├── stores │ ├── useImageStore.ts │ └── useTerminalStore.ts ├── styles │ ├── global.css │ └── normalize.css └── utils │ ├── CircularFileList.ts │ ├── normalizeFilePaths.ts │ └── parseCommandInput.ts ├── tsconfig.json ├── utils └── vb.js ├── vite-env.d.ts └── vite.config.ts /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: 'FEAT: Your title here' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/report-a-bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Report a bug 3 | about: Noticed something wrong? Raise an issue to get it fixed! 4 | title: 'BUG: Title goes here' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. Windows] 28 | - OS Version: [e.g. 11] 29 | - Electro Version: [e.g. 0.5.2; This can be obtained by running the `version` command in the Electro terminal] 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /.github/README_content/README_Banner.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pTinosq/Electro/bd122b17713de7fe2aa95945d14748186fe3ad4d/.github/README_content/README_Banner.ai -------------------------------------------------------------------------------- /.github/README_content/README_Banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pTinosq/Electro/bd122b17713de7fe2aa95945d14748186fe3ad4d/.github/README_content/README_Banner.jpg -------------------------------------------------------------------------------- /.github/README_content/electro_base.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pTinosq/Electro/bd122b17713de7fe2aa95945d14748186fe3ad4d/.github/README_content/electro_base.png -------------------------------------------------------------------------------- /.github/README_content/electro_example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pTinosq/Electro/bd122b17713de7fe2aa95945d14748186fe3ad4d/.github/README_content/electro_example.gif -------------------------------------------------------------------------------- /.github/README_content/electro_terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pTinosq/Electro/bd122b17713de7fe2aa95945d14748186fe3ad4d/.github/README_content/electro_terminal.png -------------------------------------------------------------------------------- /.github/README_content/electro_terminal_help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pTinosq/Electro/bd122b17713de7fe2aa95945d14748186fe3ad4d/.github/README_content/electro_terminal_help.png -------------------------------------------------------------------------------- /.github/workflows/manual-publish-to-beta.yml: -------------------------------------------------------------------------------- 1 | name: "publish" 2 | 3 | on: 4 | push: 5 | branches: 6 | - beta 7 | 8 | jobs: 9 | create-release: 10 | permissions: 11 | contents: write 12 | runs-on: ubuntu-latest 13 | outputs: 14 | release_id: ${{ steps.create-release.outputs.result }} 15 | 16 | steps: 17 | - uses: actions/checkout@v4 18 | 19 | - name: setup node 20 | uses: actions/setup-node@v4 21 | with: 22 | node-version: lts/* 23 | 24 | - name: get version 25 | run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV 26 | 27 | - name: create release 28 | id: create-release 29 | uses: actions/github-script@v6 30 | with: 31 | script: | 32 | const { data } = await github.rest.repos.createRelease({ 33 | owner: context.repo.owner, 34 | repo: context.repo.repo, 35 | tag_name: `v${process.env.PACKAGE_VERSION}-beta`, 36 | name: `🧪 Electro v${process.env.PACKAGE_VERSION} Beta`, 37 | body: '', 38 | draft: true, 39 | prerelease: true 40 | }) 41 | return data.id 42 | 43 | build-tauri: 44 | needs: create-release 45 | permissions: 46 | contents: write 47 | strategy: 48 | fail-fast: false 49 | matrix: 50 | include: 51 | - platform: "windows-latest" 52 | args: "" 53 | 54 | runs-on: ${{ matrix.platform }} 55 | steps: 56 | - uses: actions/checkout@v4 57 | 58 | - name: setup node 59 | uses: actions/setup-node@v4 60 | with: 61 | node-version: lts/* 62 | 63 | - name: install Rust stable 64 | uses: dtolnay/rust-toolchain@stable 65 | with: 66 | # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. 67 | targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} 68 | 69 | - name: install dependencies (ubuntu only) 70 | if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. 71 | run: | 72 | sudo apt-get update 73 | sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf 74 | 75 | - name: install frontend dependencies 76 | run: npm install # change this to npm, pnpm or bun depending on which one you use. 77 | 78 | - uses: tauri-apps/tauri-action@v0 79 | env: 80 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 81 | with: 82 | releaseId: ${{ needs.create-release.outputs.release_id }} 83 | args: ${{ matrix.args }} 84 | 85 | publish-release: 86 | permissions: 87 | contents: write 88 | runs-on: ubuntu-latest 89 | needs: [create-release, build-tauri] 90 | 91 | steps: 92 | - name: publish release 93 | id: publish-release 94 | uses: actions/github-script@v6 95 | env: 96 | release_id: ${{ needs.create-release.outputs.release_id }} 97 | with: 98 | script: | 99 | github.rest.repos.updateRelease({ 100 | owner: context.repo.owner, 101 | repo: context.repo.repo, 102 | release_id: process.env.release_id, 103 | }) 104 | -------------------------------------------------------------------------------- /.github/workflows/manual-publish-to-full-release.yml: -------------------------------------------------------------------------------- 1 | name: "publish" 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | create-release: 10 | permissions: 11 | contents: write 12 | runs-on: ubuntu-latest 13 | outputs: 14 | release_id: ${{ steps.create-release.outputs.result }} 15 | 16 | steps: 17 | - uses: actions/checkout@v4 18 | 19 | - name: setup node 20 | uses: actions/setup-node@v4 21 | with: 22 | node-version: lts/* 23 | 24 | - name: get version 25 | run: echo "PACKAGE_VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_ENV 26 | 27 | - name: create release 28 | id: create-release 29 | uses: actions/github-script@v6 30 | with: 31 | script: | 32 | const { data } = await github.rest.repos.createRelease({ 33 | owner: context.repo.owner, 34 | repo: context.repo.repo, 35 | tag_name: `v${process.env.PACKAGE_VERSION}`, 36 | name: `⚡Electro v${process.env.PACKAGE_VERSION}`, 37 | body: '', 38 | draft: true, 39 | prerelease: false 40 | }) 41 | return data.id 42 | 43 | build-tauri: 44 | needs: create-release 45 | permissions: 46 | contents: write 47 | strategy: 48 | fail-fast: false 49 | matrix: 50 | include: 51 | - platform: "windows-latest" 52 | args: "" 53 | 54 | runs-on: ${{ matrix.platform }} 55 | steps: 56 | - uses: actions/checkout@v4 57 | 58 | - name: setup node 59 | uses: actions/setup-node@v4 60 | with: 61 | node-version: lts/* 62 | 63 | - name: install Rust stable 64 | uses: dtolnay/rust-toolchain@stable 65 | with: 66 | # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds. 67 | targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} 68 | 69 | - name: install dependencies (ubuntu only) 70 | if: matrix.platform == 'ubuntu-22.04' # This must match the platform value defined above. 71 | run: | 72 | sudo apt-get update 73 | sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf 74 | 75 | - name: install frontend dependencies 76 | run: npm install # change this to npm, pnpm or bun depending on which one you use. 77 | 78 | - uses: tauri-apps/tauri-action@v0 79 | env: 80 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 81 | with: 82 | releaseId: ${{ needs.create-release.outputs.release_id }} 83 | args: ${{ matrix.args }} 84 | 85 | publish-release: 86 | permissions: 87 | contents: write 88 | runs-on: ubuntu-latest 89 | needs: [create-release, build-tauri] 90 | 91 | steps: 92 | - name: publish release 93 | id: publish-release 94 | uses: actions/github-script@v6 95 | env: 96 | release_id: ${{ needs.create-release.outputs.release_id }} 97 | with: 98 | script: | 99 | github.rest.repos.updateRelease({ 100 | owner: context.repo.owner, 101 | repo: context.repo.repo, 102 | release_id: process.env.release_id, 103 | }) 104 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Electro 2 | 3 | Thank you for your interest in contributing to Electro! This project is designed to be a great place for developers of all skill levels to get involved, whether you are just starting out or an experienced contributor. 4 | 5 | ## Getting Started 6 | 7 | 1. **Fork the Repository** – Click the 'Fork' button on the Electro repository to create your own copy. 8 | 2. **Clone Your Fork** – Clone the forked repository to your local machine: 9 | 10 | ```sh 11 | git clone https://github.com/your-username/Electro.git 12 | ``` 13 | 14 | 3. **Set Upstream Remote** – Add the original Electro repository as an upstream remote: 15 | 16 | ```sh 17 | git remote add upstream https://github.com/pTinosq/Electro.git 18 | ``` 19 | 20 | 4. **Create a Branch** – Work on your changes in a feature branch: 21 | 22 | ```sh 23 | git checkout -b feature/your-feature-name 24 | ``` 25 | 26 | ## Branching Strategy 27 | 28 | Electro follows a structured branching model to ensure stability across different versions: 29 | 30 | - **`main`** – The production branch containing stable, tested releases. 31 | - **`beta`** – The pre-release branch for features that have been sufficiently tested in `dev`. 32 | - **`dev`** – The active development branch where all changes are initially merged. Once changes are tested and stable, they move to `beta`. When `beta` is confirmed to be issue-free, it gets merged into `main`. 33 | 34 | ### Where to Target Your PR 35 | 36 | - All changes should be based on `dev`. 37 | - Once tested and confirmed stable, changes from `dev` will be merged into `beta`. 38 | - `main` only receives changes after they have been verified in `beta`. 39 | 40 | ## Submitting a Pull Request 41 | 42 | 1. **Ensure Your Code is Up-to-Date** 43 | 44 | ```sh 45 | git fetch upstream 46 | git checkout dev 47 | git merge upstream/dev 48 | ``` 49 | 50 | 2. **Commit Your Changes** 51 | 52 | ```sh 53 | git commit -m "Add feature: description here" 54 | ``` 55 | 56 | 3. **Push Your Changes** 57 | 58 | ```sh 59 | git push origin feature/your-feature-name 60 | ``` 61 | 62 | 4. **Open a Pull Request** – Navigate to the Electro repository, and open a pull request against `dev`. 63 | 64 | ## Code Guidelines 65 | 66 | - Keep your code clean and well-documented. 67 | - Follow the existing code style and structure. 68 | - Ensure your changes do not break existing functionality. 69 | 70 | ## Feedback & Discussion 71 | 72 | If you are unsure about anything, feel free to open a discussion or issue before making changes. We encourage collaboration and want to make contributing as smooth as possible! 73 | 74 | Thank you for your interest in Electro! We look forward to your contributions. 🚀 75 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . 675 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | 5 | # Electro - A lightweight & blazingly-fast image viewer 6 | 7 | ![GitHub release](https://img.shields.io/github/v/release/pTinosq/Electro) 8 | ![GitHub release date](https://img.shields.io/github/release-date/pTinosq/Electro) 9 | ![GitHub last commit](https://img.shields.io/github/last-commit/pTinosq/Electro) 10 | ![GitHub issues](https://img.shields.io/github/issues/pTinosq/Electro) 11 | ![GitHub pull requests](https://img.shields.io/github/issues-pr/pTinosq/Electro) 12 | 13 | 14 | ## Features 15 | 16 | ### 👀 Overview 17 | 18 | | Feature | Electro | Default Image Viewer | 19 | | ------------------------------------------- | ------- | -------------------- | 20 | | ⚡ Ultra-fast performance | ✅ | ❌ | 21 | | 🧑‍💻 Developer-first experience | ✅ | ❌ | 22 | | 🚀 Built-in command terminal | ✅ | ❌ | 23 | | 🌍 Open-source | ✅ | ❌ (probably) | 24 | | ⛓️‍💥 View local & web-hosted images instantly | ✅ | ❌ | 25 | 26 | ### ⚡ Ultra-fast performance 27 | 28 | Electro is built with Rust, and designed with sheer performance in mind. Everything is designed to be as fast as possible, so you can view images without any loading times or lag. 29 | 30 | ### 🧑‍💻 Developer-first experience 31 | 32 | Built by developers for developers; Electro is extremely lightweight, fast, and has a terminal built-in! 33 | 34 | ### 🚀 Built-in command terminal 35 | 36 | Electro includes a custom built-in terminal with custom commands to ensure 10x productivity. (Press `t` to open the terminal!) 37 | 38 | ### 🌍 Open-source 39 | 40 | Electro is open-source, and will always be open-source. You can view the source code, contribute, and even build your own version of Electro! 41 | 42 | ### ⛓️‍💥 View local & web-hosted images instantly 43 | 44 | No need to download images to view them! Electro supports loading images from the web, so you can view them without needing to download anything. 45 | 46 | ## Installation 47 | 48 | 1. Download the latest release from the [releases page](https://github.com/pTinosq/Electro/releases) 49 | 2. Run the installer 50 | 3. That's it! You're ready to go - just open an image with Electro! 51 | 52 | ## Getting Started 53 | 54 | When running the installer, Electro should automatically set itself as the default image viewer. Open an image with Electro to get started! 55 | 56 | The most helpful keybind of all is `t`, which opens the terminal. From there, you can begin exploring the terminal commands with `help`. 57 | 58 | ## Screenshots 59 | 60 | ℹ️ **Screenshots may not reflect the latest version.** 61 | ⚠️ **GIFs do not capture Electro's full performance - expect even smoother results in real use.** 62 | 63 | ![Electro Terminal Help Screenshot](./.github/README_content/electro_terminal_help.png) 64 | ![Electro Example GIF](./.github/README_content/electro_example.gif) 65 | 66 | ## Contributing 67 | 68 | Want to improve Electro? Contributions are welcome! 69 | 70 | - **Report bugs** or suggest features on the [issues page](https://github.com/pTinosq/Electro/issues). 71 | - **Submit a pull request** with your improvements. 72 | 73 | Developers might find the following information useful: 74 | 75 | | Tech stack | Technology | 76 | | ------------------ | ----------------- | 77 | | Frontend framework | Preact (ts) | 78 | | Backend framework | Tauri v2.0 (Rust) | 79 | | Package manager | npm | 80 | | State management | Zustand | 81 | | Styling | Vanilla CSS | 82 | 83 | 84 | ## License 85 | 86 | Electro is licensed under the GPL-3.0 license. See the [LICENSE](./LICENSE) file for more information. 87 | -------------------------------------------------------------------------------- /biome.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", 3 | "vcs": { 4 | "enabled": false, 5 | "clientKind": "git", 6 | "useIgnoreFile": false 7 | }, 8 | "files": { 9 | "ignoreUnknown": false, 10 | "ignore": [] 11 | }, 12 | "formatter": { 13 | "enabled": true, 14 | "indentStyle": "tab" 15 | }, 16 | "organizeImports": { 17 | "enabled": true 18 | }, 19 | "linter": { 20 | "enabled": true, 21 | "rules": { 22 | "recommended": true, 23 | "a11y": { 24 | "all": false 25 | } 26 | } 27 | }, 28 | "javascript": { 29 | "formatter": { 30 | "quoteStyle": "double" 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Electro 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Electro", 3 | "version": "0.6.3", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "Electro", 9 | "version": "0.6.3", 10 | "dependencies": { 11 | "@reduxjs/toolkit": "^2.5.0", 12 | "@tauri-apps/api": "^2", 13 | "@tauri-apps/plugin-cli": "^2.0.0", 14 | "@tauri-apps/plugin-fs": "^2.2.0", 15 | "@tauri-apps/plugin-shell": "^2", 16 | "preact": "^10.26.2", 17 | "redux": "^5.0.1", 18 | "zustand": "^5.0.3" 19 | }, 20 | "devDependencies": { 21 | "@babel/plugin-transform-react-jsx": "^7.25.9", 22 | "@biomejs/biome": "1.9.4", 23 | "@preact/preset-vite": "^2.10.1", 24 | "@tauri-apps/cli": "^2", 25 | "typescript": "^5.2.2", 26 | "vite": "^5.3.1" 27 | } 28 | }, 29 | "node_modules/@ampproject/remapping": { 30 | "version": "2.3.0", 31 | "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", 32 | "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", 33 | "dev": true, 34 | "license": "Apache-2.0", 35 | "dependencies": { 36 | "@jridgewell/gen-mapping": "^0.3.5", 37 | "@jridgewell/trace-mapping": "^0.3.24" 38 | }, 39 | "engines": { 40 | "node": ">=6.0.0" 41 | } 42 | }, 43 | "node_modules/@babel/code-frame": { 44 | "version": "7.26.2", 45 | "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", 46 | "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", 47 | "dev": true, 48 | "license": "MIT", 49 | "dependencies": { 50 | "@babel/helper-validator-identifier": "^7.25.9", 51 | "js-tokens": "^4.0.0", 52 | "picocolors": "^1.0.0" 53 | }, 54 | "engines": { 55 | "node": ">=6.9.0" 56 | } 57 | }, 58 | "node_modules/@babel/compat-data": { 59 | "version": "7.26.8", 60 | "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.8.tgz", 61 | "integrity": "sha512-oH5UPLMWR3L2wEFLnFJ1TZXqHufiTKAiLfqw5zkhS4dKXLJ10yVztfil/twG8EDTA4F/tvVNw9nOl4ZMslB8rQ==", 62 | "dev": true, 63 | "license": "MIT", 64 | "engines": { 65 | "node": ">=6.9.0" 66 | } 67 | }, 68 | "node_modules/@babel/core": { 69 | "version": "7.26.9", 70 | "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.9.tgz", 71 | "integrity": "sha512-lWBYIrF7qK5+GjY5Uy+/hEgp8OJWOD/rpy74GplYRhEauvbHDeFB8t5hPOZxCZ0Oxf4Cc36tK51/l3ymJysrKw==", 72 | "dev": true, 73 | "license": "MIT", 74 | "dependencies": { 75 | "@ampproject/remapping": "^2.2.0", 76 | "@babel/code-frame": "^7.26.2", 77 | "@babel/generator": "^7.26.9", 78 | "@babel/helper-compilation-targets": "^7.26.5", 79 | "@babel/helper-module-transforms": "^7.26.0", 80 | "@babel/helpers": "^7.26.9", 81 | "@babel/parser": "^7.26.9", 82 | "@babel/template": "^7.26.9", 83 | "@babel/traverse": "^7.26.9", 84 | "@babel/types": "^7.26.9", 85 | "convert-source-map": "^2.0.0", 86 | "debug": "^4.1.0", 87 | "gensync": "^1.0.0-beta.2", 88 | "json5": "^2.2.3", 89 | "semver": "^6.3.1" 90 | }, 91 | "engines": { 92 | "node": ">=6.9.0" 93 | }, 94 | "funding": { 95 | "type": "opencollective", 96 | "url": "https://opencollective.com/babel" 97 | } 98 | }, 99 | "node_modules/@babel/generator": { 100 | "version": "7.26.9", 101 | "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.9.tgz", 102 | "integrity": "sha512-kEWdzjOAUMW4hAyrzJ0ZaTOu9OmpyDIQicIh0zg0EEcEkYXZb2TjtBhnHi2ViX7PKwZqF4xwqfAm299/QMP3lg==", 103 | "dev": true, 104 | "license": "MIT", 105 | "dependencies": { 106 | "@babel/parser": "^7.26.9", 107 | "@babel/types": "^7.26.9", 108 | "@jridgewell/gen-mapping": "^0.3.5", 109 | "@jridgewell/trace-mapping": "^0.3.25", 110 | "jsesc": "^3.0.2" 111 | }, 112 | "engines": { 113 | "node": ">=6.9.0" 114 | } 115 | }, 116 | "node_modules/@babel/helper-annotate-as-pure": { 117 | "version": "7.25.9", 118 | "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz", 119 | "integrity": "sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==", 120 | "dev": true, 121 | "license": "MIT", 122 | "dependencies": { 123 | "@babel/types": "^7.25.9" 124 | }, 125 | "engines": { 126 | "node": ">=6.9.0" 127 | } 128 | }, 129 | "node_modules/@babel/helper-compilation-targets": { 130 | "version": "7.26.5", 131 | "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.26.5.tgz", 132 | "integrity": "sha512-IXuyn5EkouFJscIDuFF5EsiSolseme1s0CZB+QxVugqJLYmKdxI1VfIBOst0SUu4rnk2Z7kqTwmoO1lp3HIfnA==", 133 | "dev": true, 134 | "license": "MIT", 135 | "dependencies": { 136 | "@babel/compat-data": "^7.26.5", 137 | "@babel/helper-validator-option": "^7.25.9", 138 | "browserslist": "^4.24.0", 139 | "lru-cache": "^5.1.1", 140 | "semver": "^6.3.1" 141 | }, 142 | "engines": { 143 | "node": ">=6.9.0" 144 | } 145 | }, 146 | "node_modules/@babel/helper-module-imports": { 147 | "version": "7.25.9", 148 | "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", 149 | "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", 150 | "dev": true, 151 | "license": "MIT", 152 | "dependencies": { 153 | "@babel/traverse": "^7.25.9", 154 | "@babel/types": "^7.25.9" 155 | }, 156 | "engines": { 157 | "node": ">=6.9.0" 158 | } 159 | }, 160 | "node_modules/@babel/helper-module-transforms": { 161 | "version": "7.26.0", 162 | "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", 163 | "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", 164 | "dev": true, 165 | "license": "MIT", 166 | "dependencies": { 167 | "@babel/helper-module-imports": "^7.25.9", 168 | "@babel/helper-validator-identifier": "^7.25.9", 169 | "@babel/traverse": "^7.25.9" 170 | }, 171 | "engines": { 172 | "node": ">=6.9.0" 173 | }, 174 | "peerDependencies": { 175 | "@babel/core": "^7.0.0" 176 | } 177 | }, 178 | "node_modules/@babel/helper-plugin-utils": { 179 | "version": "7.26.5", 180 | "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.26.5.tgz", 181 | "integrity": "sha512-RS+jZcRdZdRFzMyr+wcsaqOmld1/EqTghfaBGQQd/WnRdzdlvSZ//kF7U8VQTxf1ynZ4cjUcYgjVGx13ewNPMg==", 182 | "dev": true, 183 | "license": "MIT", 184 | "engines": { 185 | "node": ">=6.9.0" 186 | } 187 | }, 188 | "node_modules/@babel/helper-string-parser": { 189 | "version": "7.25.9", 190 | "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", 191 | "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", 192 | "dev": true, 193 | "license": "MIT", 194 | "engines": { 195 | "node": ">=6.9.0" 196 | } 197 | }, 198 | "node_modules/@babel/helper-validator-identifier": { 199 | "version": "7.25.9", 200 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", 201 | "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", 202 | "dev": true, 203 | "license": "MIT", 204 | "engines": { 205 | "node": ">=6.9.0" 206 | } 207 | }, 208 | "node_modules/@babel/helper-validator-option": { 209 | "version": "7.25.9", 210 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", 211 | "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", 212 | "dev": true, 213 | "license": "MIT", 214 | "engines": { 215 | "node": ">=6.9.0" 216 | } 217 | }, 218 | "node_modules/@babel/helpers": { 219 | "version": "7.26.9", 220 | "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.9.tgz", 221 | "integrity": "sha512-Mz/4+y8udxBKdmzt/UjPACs4G3j5SshJJEFFKxlCGPydG4JAHXxjWjAwjd09tf6oINvl1VfMJo+nB7H2YKQ0dA==", 222 | "dev": true, 223 | "license": "MIT", 224 | "dependencies": { 225 | "@babel/template": "^7.26.9", 226 | "@babel/types": "^7.26.9" 227 | }, 228 | "engines": { 229 | "node": ">=6.9.0" 230 | } 231 | }, 232 | "node_modules/@babel/parser": { 233 | "version": "7.26.9", 234 | "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.9.tgz", 235 | "integrity": "sha512-81NWa1njQblgZbQHxWHpxxCzNsa3ZwvFqpUg7P+NNUU6f3UU2jBEg4OlF/J6rl8+PQGh1q6/zWScd001YwcA5A==", 236 | "dev": true, 237 | "license": "MIT", 238 | "dependencies": { 239 | "@babel/types": "^7.26.9" 240 | }, 241 | "bin": { 242 | "parser": "bin/babel-parser.js" 243 | }, 244 | "engines": { 245 | "node": ">=6.0.0" 246 | } 247 | }, 248 | "node_modules/@babel/plugin-syntax-jsx": { 249 | "version": "7.25.9", 250 | "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.25.9.tgz", 251 | "integrity": "sha512-ld6oezHQMZsZfp6pWtbjaNDF2tiiCYYDqQszHt5VV437lewP9aSi2Of99CK0D0XB21k7FLgnLcmQKyKzynfeAA==", 252 | "dev": true, 253 | "license": "MIT", 254 | "dependencies": { 255 | "@babel/helper-plugin-utils": "^7.25.9" 256 | }, 257 | "engines": { 258 | "node": ">=6.9.0" 259 | }, 260 | "peerDependencies": { 261 | "@babel/core": "^7.0.0-0" 262 | } 263 | }, 264 | "node_modules/@babel/plugin-transform-react-jsx": { 265 | "version": "7.25.9", 266 | "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.25.9.tgz", 267 | "integrity": "sha512-s5XwpQYCqGerXl+Pu6VDL3x0j2d82eiV77UJ8a2mDHAW7j9SWRqQ2y1fNo1Z74CdcYipl5Z41zvjj4Nfzq36rw==", 268 | "dev": true, 269 | "license": "MIT", 270 | "dependencies": { 271 | "@babel/helper-annotate-as-pure": "^7.25.9", 272 | "@babel/helper-module-imports": "^7.25.9", 273 | "@babel/helper-plugin-utils": "^7.25.9", 274 | "@babel/plugin-syntax-jsx": "^7.25.9", 275 | "@babel/types": "^7.25.9" 276 | }, 277 | "engines": { 278 | "node": ">=6.9.0" 279 | }, 280 | "peerDependencies": { 281 | "@babel/core": "^7.0.0-0" 282 | } 283 | }, 284 | "node_modules/@babel/plugin-transform-react-jsx-development": { 285 | "version": "7.25.9", 286 | "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.25.9.tgz", 287 | "integrity": "sha512-9mj6rm7XVYs4mdLIpbZnHOYdpW42uoiBCTVowg7sP1thUOiANgMb4UtpRivR0pp5iL+ocvUv7X4mZgFRpJEzGw==", 288 | "dev": true, 289 | "license": "MIT", 290 | "dependencies": { 291 | "@babel/plugin-transform-react-jsx": "^7.25.9" 292 | }, 293 | "engines": { 294 | "node": ">=6.9.0" 295 | }, 296 | "peerDependencies": { 297 | "@babel/core": "^7.0.0-0" 298 | } 299 | }, 300 | "node_modules/@babel/template": { 301 | "version": "7.26.9", 302 | "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.26.9.tgz", 303 | "integrity": "sha512-qyRplbeIpNZhmzOysF/wFMuP9sctmh2cFzRAZOn1YapxBsE1i9bJIY586R/WBLfLcmcBlM8ROBiQURnnNy+zfA==", 304 | "dev": true, 305 | "license": "MIT", 306 | "dependencies": { 307 | "@babel/code-frame": "^7.26.2", 308 | "@babel/parser": "^7.26.9", 309 | "@babel/types": "^7.26.9" 310 | }, 311 | "engines": { 312 | "node": ">=6.9.0" 313 | } 314 | }, 315 | "node_modules/@babel/traverse": { 316 | "version": "7.26.9", 317 | "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.9.tgz", 318 | "integrity": "sha512-ZYW7L+pL8ahU5fXmNbPF+iZFHCv5scFak7MZ9bwaRPLUhHh7QQEMjZUg0HevihoqCM5iSYHN61EyCoZvqC+bxg==", 319 | "dev": true, 320 | "license": "MIT", 321 | "dependencies": { 322 | "@babel/code-frame": "^7.26.2", 323 | "@babel/generator": "^7.26.9", 324 | "@babel/parser": "^7.26.9", 325 | "@babel/template": "^7.26.9", 326 | "@babel/types": "^7.26.9", 327 | "debug": "^4.3.1", 328 | "globals": "^11.1.0" 329 | }, 330 | "engines": { 331 | "node": ">=6.9.0" 332 | } 333 | }, 334 | "node_modules/@babel/types": { 335 | "version": "7.26.9", 336 | "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.9.tgz", 337 | "integrity": "sha512-Y3IR1cRnOxOCDvMmNiym7XpXQ93iGDDPHx+Zj+NM+rg0fBaShfQLkg+hKPaZCEvg5N/LeCo4+Rj/i3FuJsIQaw==", 338 | "dev": true, 339 | "license": "MIT", 340 | "dependencies": { 341 | "@babel/helper-string-parser": "^7.25.9", 342 | "@babel/helper-validator-identifier": "^7.25.9" 343 | }, 344 | "engines": { 345 | "node": ">=6.9.0" 346 | } 347 | }, 348 | "node_modules/@biomejs/biome": { 349 | "version": "1.9.4", 350 | "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.9.4.tgz", 351 | "integrity": "sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==", 352 | "dev": true, 353 | "hasInstallScript": true, 354 | "license": "MIT OR Apache-2.0", 355 | "bin": { 356 | "biome": "bin/biome" 357 | }, 358 | "engines": { 359 | "node": ">=14.21.3" 360 | }, 361 | "funding": { 362 | "type": "opencollective", 363 | "url": "https://opencollective.com/biome" 364 | }, 365 | "optionalDependencies": { 366 | "@biomejs/cli-darwin-arm64": "1.9.4", 367 | "@biomejs/cli-darwin-x64": "1.9.4", 368 | "@biomejs/cli-linux-arm64": "1.9.4", 369 | "@biomejs/cli-linux-arm64-musl": "1.9.4", 370 | "@biomejs/cli-linux-x64": "1.9.4", 371 | "@biomejs/cli-linux-x64-musl": "1.9.4", 372 | "@biomejs/cli-win32-arm64": "1.9.4", 373 | "@biomejs/cli-win32-x64": "1.9.4" 374 | } 375 | }, 376 | "node_modules/@biomejs/cli-darwin-arm64": { 377 | "version": "1.9.4", 378 | "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.9.4.tgz", 379 | "integrity": "sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==", 380 | "cpu": [ 381 | "arm64" 382 | ], 383 | "dev": true, 384 | "license": "MIT OR Apache-2.0", 385 | "optional": true, 386 | "os": [ 387 | "darwin" 388 | ], 389 | "engines": { 390 | "node": ">=14.21.3" 391 | } 392 | }, 393 | "node_modules/@biomejs/cli-darwin-x64": { 394 | "version": "1.9.4", 395 | "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.9.4.tgz", 396 | "integrity": "sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==", 397 | "cpu": [ 398 | "x64" 399 | ], 400 | "dev": true, 401 | "license": "MIT OR Apache-2.0", 402 | "optional": true, 403 | "os": [ 404 | "darwin" 405 | ], 406 | "engines": { 407 | "node": ">=14.21.3" 408 | } 409 | }, 410 | "node_modules/@biomejs/cli-linux-arm64": { 411 | "version": "1.9.4", 412 | "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.9.4.tgz", 413 | "integrity": "sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==", 414 | "cpu": [ 415 | "arm64" 416 | ], 417 | "dev": true, 418 | "license": "MIT OR Apache-2.0", 419 | "optional": true, 420 | "os": [ 421 | "linux" 422 | ], 423 | "engines": { 424 | "node": ">=14.21.3" 425 | } 426 | }, 427 | "node_modules/@biomejs/cli-linux-arm64-musl": { 428 | "version": "1.9.4", 429 | "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.9.4.tgz", 430 | "integrity": "sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==", 431 | "cpu": [ 432 | "arm64" 433 | ], 434 | "dev": true, 435 | "license": "MIT OR Apache-2.0", 436 | "optional": true, 437 | "os": [ 438 | "linux" 439 | ], 440 | "engines": { 441 | "node": ">=14.21.3" 442 | } 443 | }, 444 | "node_modules/@biomejs/cli-linux-x64": { 445 | "version": "1.9.4", 446 | "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.9.4.tgz", 447 | "integrity": "sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==", 448 | "cpu": [ 449 | "x64" 450 | ], 451 | "dev": true, 452 | "license": "MIT OR Apache-2.0", 453 | "optional": true, 454 | "os": [ 455 | "linux" 456 | ], 457 | "engines": { 458 | "node": ">=14.21.3" 459 | } 460 | }, 461 | "node_modules/@biomejs/cli-linux-x64-musl": { 462 | "version": "1.9.4", 463 | "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.9.4.tgz", 464 | "integrity": "sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==", 465 | "cpu": [ 466 | "x64" 467 | ], 468 | "dev": true, 469 | "license": "MIT OR Apache-2.0", 470 | "optional": true, 471 | "os": [ 472 | "linux" 473 | ], 474 | "engines": { 475 | "node": ">=14.21.3" 476 | } 477 | }, 478 | "node_modules/@biomejs/cli-win32-arm64": { 479 | "version": "1.9.4", 480 | "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.9.4.tgz", 481 | "integrity": "sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==", 482 | "cpu": [ 483 | "arm64" 484 | ], 485 | "dev": true, 486 | "license": "MIT OR Apache-2.0", 487 | "optional": true, 488 | "os": [ 489 | "win32" 490 | ], 491 | "engines": { 492 | "node": ">=14.21.3" 493 | } 494 | }, 495 | "node_modules/@biomejs/cli-win32-x64": { 496 | "version": "1.9.4", 497 | "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.9.4.tgz", 498 | "integrity": "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==", 499 | "cpu": [ 500 | "x64" 501 | ], 502 | "dev": true, 503 | "license": "MIT OR Apache-2.0", 504 | "optional": true, 505 | "os": [ 506 | "win32" 507 | ], 508 | "engines": { 509 | "node": ">=14.21.3" 510 | } 511 | }, 512 | "node_modules/@esbuild/aix-ppc64": { 513 | "version": "0.21.5", 514 | "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", 515 | "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", 516 | "cpu": [ 517 | "ppc64" 518 | ], 519 | "dev": true, 520 | "license": "MIT", 521 | "optional": true, 522 | "os": [ 523 | "aix" 524 | ], 525 | "engines": { 526 | "node": ">=12" 527 | } 528 | }, 529 | "node_modules/@esbuild/android-arm": { 530 | "version": "0.21.5", 531 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", 532 | "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", 533 | "cpu": [ 534 | "arm" 535 | ], 536 | "dev": true, 537 | "license": "MIT", 538 | "optional": true, 539 | "os": [ 540 | "android" 541 | ], 542 | "engines": { 543 | "node": ">=12" 544 | } 545 | }, 546 | "node_modules/@esbuild/android-arm64": { 547 | "version": "0.21.5", 548 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", 549 | "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", 550 | "cpu": [ 551 | "arm64" 552 | ], 553 | "dev": true, 554 | "license": "MIT", 555 | "optional": true, 556 | "os": [ 557 | "android" 558 | ], 559 | "engines": { 560 | "node": ">=12" 561 | } 562 | }, 563 | "node_modules/@esbuild/android-x64": { 564 | "version": "0.21.5", 565 | "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", 566 | "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", 567 | "cpu": [ 568 | "x64" 569 | ], 570 | "dev": true, 571 | "license": "MIT", 572 | "optional": true, 573 | "os": [ 574 | "android" 575 | ], 576 | "engines": { 577 | "node": ">=12" 578 | } 579 | }, 580 | "node_modules/@esbuild/darwin-arm64": { 581 | "version": "0.21.5", 582 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", 583 | "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", 584 | "cpu": [ 585 | "arm64" 586 | ], 587 | "dev": true, 588 | "license": "MIT", 589 | "optional": true, 590 | "os": [ 591 | "darwin" 592 | ], 593 | "engines": { 594 | "node": ">=12" 595 | } 596 | }, 597 | "node_modules/@esbuild/darwin-x64": { 598 | "version": "0.21.5", 599 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", 600 | "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", 601 | "cpu": [ 602 | "x64" 603 | ], 604 | "dev": true, 605 | "license": "MIT", 606 | "optional": true, 607 | "os": [ 608 | "darwin" 609 | ], 610 | "engines": { 611 | "node": ">=12" 612 | } 613 | }, 614 | "node_modules/@esbuild/freebsd-arm64": { 615 | "version": "0.21.5", 616 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", 617 | "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", 618 | "cpu": [ 619 | "arm64" 620 | ], 621 | "dev": true, 622 | "license": "MIT", 623 | "optional": true, 624 | "os": [ 625 | "freebsd" 626 | ], 627 | "engines": { 628 | "node": ">=12" 629 | } 630 | }, 631 | "node_modules/@esbuild/freebsd-x64": { 632 | "version": "0.21.5", 633 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", 634 | "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", 635 | "cpu": [ 636 | "x64" 637 | ], 638 | "dev": true, 639 | "license": "MIT", 640 | "optional": true, 641 | "os": [ 642 | "freebsd" 643 | ], 644 | "engines": { 645 | "node": ">=12" 646 | } 647 | }, 648 | "node_modules/@esbuild/linux-arm": { 649 | "version": "0.21.5", 650 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", 651 | "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", 652 | "cpu": [ 653 | "arm" 654 | ], 655 | "dev": true, 656 | "license": "MIT", 657 | "optional": true, 658 | "os": [ 659 | "linux" 660 | ], 661 | "engines": { 662 | "node": ">=12" 663 | } 664 | }, 665 | "node_modules/@esbuild/linux-arm64": { 666 | "version": "0.21.5", 667 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", 668 | "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", 669 | "cpu": [ 670 | "arm64" 671 | ], 672 | "dev": true, 673 | "license": "MIT", 674 | "optional": true, 675 | "os": [ 676 | "linux" 677 | ], 678 | "engines": { 679 | "node": ">=12" 680 | } 681 | }, 682 | "node_modules/@esbuild/linux-ia32": { 683 | "version": "0.21.5", 684 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", 685 | "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", 686 | "cpu": [ 687 | "ia32" 688 | ], 689 | "dev": true, 690 | "license": "MIT", 691 | "optional": true, 692 | "os": [ 693 | "linux" 694 | ], 695 | "engines": { 696 | "node": ">=12" 697 | } 698 | }, 699 | "node_modules/@esbuild/linux-loong64": { 700 | "version": "0.21.5", 701 | "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", 702 | "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", 703 | "cpu": [ 704 | "loong64" 705 | ], 706 | "dev": true, 707 | "license": "MIT", 708 | "optional": true, 709 | "os": [ 710 | "linux" 711 | ], 712 | "engines": { 713 | "node": ">=12" 714 | } 715 | }, 716 | "node_modules/@esbuild/linux-mips64el": { 717 | "version": "0.21.5", 718 | "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", 719 | "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", 720 | "cpu": [ 721 | "mips64el" 722 | ], 723 | "dev": true, 724 | "license": "MIT", 725 | "optional": true, 726 | "os": [ 727 | "linux" 728 | ], 729 | "engines": { 730 | "node": ">=12" 731 | } 732 | }, 733 | "node_modules/@esbuild/linux-ppc64": { 734 | "version": "0.21.5", 735 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", 736 | "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", 737 | "cpu": [ 738 | "ppc64" 739 | ], 740 | "dev": true, 741 | "license": "MIT", 742 | "optional": true, 743 | "os": [ 744 | "linux" 745 | ], 746 | "engines": { 747 | "node": ">=12" 748 | } 749 | }, 750 | "node_modules/@esbuild/linux-riscv64": { 751 | "version": "0.21.5", 752 | "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", 753 | "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", 754 | "cpu": [ 755 | "riscv64" 756 | ], 757 | "dev": true, 758 | "license": "MIT", 759 | "optional": true, 760 | "os": [ 761 | "linux" 762 | ], 763 | "engines": { 764 | "node": ">=12" 765 | } 766 | }, 767 | "node_modules/@esbuild/linux-s390x": { 768 | "version": "0.21.5", 769 | "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", 770 | "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", 771 | "cpu": [ 772 | "s390x" 773 | ], 774 | "dev": true, 775 | "license": "MIT", 776 | "optional": true, 777 | "os": [ 778 | "linux" 779 | ], 780 | "engines": { 781 | "node": ">=12" 782 | } 783 | }, 784 | "node_modules/@esbuild/linux-x64": { 785 | "version": "0.21.5", 786 | "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", 787 | "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", 788 | "cpu": [ 789 | "x64" 790 | ], 791 | "dev": true, 792 | "license": "MIT", 793 | "optional": true, 794 | "os": [ 795 | "linux" 796 | ], 797 | "engines": { 798 | "node": ">=12" 799 | } 800 | }, 801 | "node_modules/@esbuild/netbsd-x64": { 802 | "version": "0.21.5", 803 | "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", 804 | "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", 805 | "cpu": [ 806 | "x64" 807 | ], 808 | "dev": true, 809 | "license": "MIT", 810 | "optional": true, 811 | "os": [ 812 | "netbsd" 813 | ], 814 | "engines": { 815 | "node": ">=12" 816 | } 817 | }, 818 | "node_modules/@esbuild/openbsd-x64": { 819 | "version": "0.21.5", 820 | "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", 821 | "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", 822 | "cpu": [ 823 | "x64" 824 | ], 825 | "dev": true, 826 | "license": "MIT", 827 | "optional": true, 828 | "os": [ 829 | "openbsd" 830 | ], 831 | "engines": { 832 | "node": ">=12" 833 | } 834 | }, 835 | "node_modules/@esbuild/sunos-x64": { 836 | "version": "0.21.5", 837 | "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", 838 | "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", 839 | "cpu": [ 840 | "x64" 841 | ], 842 | "dev": true, 843 | "license": "MIT", 844 | "optional": true, 845 | "os": [ 846 | "sunos" 847 | ], 848 | "engines": { 849 | "node": ">=12" 850 | } 851 | }, 852 | "node_modules/@esbuild/win32-arm64": { 853 | "version": "0.21.5", 854 | "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", 855 | "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", 856 | "cpu": [ 857 | "arm64" 858 | ], 859 | "dev": true, 860 | "license": "MIT", 861 | "optional": true, 862 | "os": [ 863 | "win32" 864 | ], 865 | "engines": { 866 | "node": ">=12" 867 | } 868 | }, 869 | "node_modules/@esbuild/win32-ia32": { 870 | "version": "0.21.5", 871 | "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", 872 | "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", 873 | "cpu": [ 874 | "ia32" 875 | ], 876 | "dev": true, 877 | "license": "MIT", 878 | "optional": true, 879 | "os": [ 880 | "win32" 881 | ], 882 | "engines": { 883 | "node": ">=12" 884 | } 885 | }, 886 | "node_modules/@esbuild/win32-x64": { 887 | "version": "0.21.5", 888 | "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", 889 | "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", 890 | "cpu": [ 891 | "x64" 892 | ], 893 | "dev": true, 894 | "license": "MIT", 895 | "optional": true, 896 | "os": [ 897 | "win32" 898 | ], 899 | "engines": { 900 | "node": ">=12" 901 | } 902 | }, 903 | "node_modules/@jridgewell/gen-mapping": { 904 | "version": "0.3.8", 905 | "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.8.tgz", 906 | "integrity": "sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==", 907 | "dev": true, 908 | "license": "MIT", 909 | "dependencies": { 910 | "@jridgewell/set-array": "^1.2.1", 911 | "@jridgewell/sourcemap-codec": "^1.4.10", 912 | "@jridgewell/trace-mapping": "^0.3.24" 913 | }, 914 | "engines": { 915 | "node": ">=6.0.0" 916 | } 917 | }, 918 | "node_modules/@jridgewell/resolve-uri": { 919 | "version": "3.1.2", 920 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", 921 | "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", 922 | "dev": true, 923 | "license": "MIT", 924 | "engines": { 925 | "node": ">=6.0.0" 926 | } 927 | }, 928 | "node_modules/@jridgewell/set-array": { 929 | "version": "1.2.1", 930 | "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", 931 | "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", 932 | "dev": true, 933 | "license": "MIT", 934 | "engines": { 935 | "node": ">=6.0.0" 936 | } 937 | }, 938 | "node_modules/@jridgewell/sourcemap-codec": { 939 | "version": "1.5.0", 940 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", 941 | "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", 942 | "dev": true, 943 | "license": "MIT" 944 | }, 945 | "node_modules/@jridgewell/trace-mapping": { 946 | "version": "0.3.25", 947 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", 948 | "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", 949 | "dev": true, 950 | "license": "MIT", 951 | "dependencies": { 952 | "@jridgewell/resolve-uri": "^3.1.0", 953 | "@jridgewell/sourcemap-codec": "^1.4.14" 954 | } 955 | }, 956 | "node_modules/@preact/preset-vite": { 957 | "version": "2.10.1", 958 | "resolved": "https://registry.npmjs.org/@preact/preset-vite/-/preset-vite-2.10.1.tgz", 959 | "integrity": "sha512-59lyGBXNfZIr5OOuBUB4/IB8AqF/ULbvYnyItgK/2BJnsGJqaeaJobRVtMp1129obHQuj8oZ/dVxB9inmH8Xig==", 960 | "dev": true, 961 | "license": "MIT", 962 | "dependencies": { 963 | "@babel/plugin-transform-react-jsx": "^7.22.15", 964 | "@babel/plugin-transform-react-jsx-development": "^7.22.5", 965 | "@prefresh/vite": "^2.4.1", 966 | "@rollup/pluginutils": "^4.1.1", 967 | "babel-plugin-transform-hook-names": "^1.0.2", 968 | "debug": "^4.3.4", 969 | "kolorist": "^1.8.0", 970 | "vite-prerender-plugin": "^0.5.3" 971 | }, 972 | "peerDependencies": { 973 | "@babel/core": "7.x", 974 | "vite": "2.x || 3.x || 4.x || 5.x || 6.x" 975 | } 976 | }, 977 | "node_modules/@prefresh/babel-plugin": { 978 | "version": "0.5.1", 979 | "resolved": "https://registry.npmjs.org/@prefresh/babel-plugin/-/babel-plugin-0.5.1.tgz", 980 | "integrity": "sha512-uG3jGEAysxWoyG3XkYfjYHgaySFrSsaEb4GagLzYaxlydbuREtaX+FTxuIidp241RaLl85XoHg9Ej6E4+V1pcg==", 981 | "dev": true, 982 | "license": "MIT" 983 | }, 984 | "node_modules/@prefresh/core": { 985 | "version": "1.5.3", 986 | "resolved": "https://registry.npmjs.org/@prefresh/core/-/core-1.5.3.tgz", 987 | "integrity": "sha512-nDzxj0tA1/M6APNAWqaxkZ+3sTdPHESa+gol4+Bw7rMc2btWdkLoNH7j9rGhUb8SThC0Vz0VoXtq+U+9azGLHg==", 988 | "dev": true, 989 | "license": "MIT", 990 | "peerDependencies": { 991 | "preact": "^10.0.0" 992 | } 993 | }, 994 | "node_modules/@prefresh/utils": { 995 | "version": "1.2.0", 996 | "resolved": "https://registry.npmjs.org/@prefresh/utils/-/utils-1.2.0.tgz", 997 | "integrity": "sha512-KtC/fZw+oqtwOLUFM9UtiitB0JsVX0zLKNyRTA332sqREqSALIIQQxdUCS1P3xR/jT1e2e8/5rwH6gdcMLEmsQ==", 998 | "dev": true, 999 | "license": "MIT" 1000 | }, 1001 | "node_modules/@prefresh/vite": { 1002 | "version": "2.4.7", 1003 | "resolved": "https://registry.npmjs.org/@prefresh/vite/-/vite-2.4.7.tgz", 1004 | "integrity": "sha512-zmCEDWSFHl5A7PciXa/fe+OUjoGi4iiCQclpWfpIg7LjxwWrtlUT4DfxDBcQwHfTyipS/XDm8x7WYrkiTW0q+w==", 1005 | "dev": true, 1006 | "license": "MIT", 1007 | "dependencies": { 1008 | "@babel/core": "^7.22.1", 1009 | "@prefresh/babel-plugin": "0.5.1", 1010 | "@prefresh/core": "^1.5.1", 1011 | "@prefresh/utils": "^1.2.0", 1012 | "@rollup/pluginutils": "^4.2.1" 1013 | }, 1014 | "peerDependencies": { 1015 | "preact": "^10.4.0", 1016 | "vite": ">=2.0.0" 1017 | } 1018 | }, 1019 | "node_modules/@reduxjs/toolkit": { 1020 | "version": "2.5.0", 1021 | "resolved": "https://registry.npmjs.org/@reduxjs/toolkit/-/toolkit-2.5.0.tgz", 1022 | "integrity": "sha512-awNe2oTodsZ6LmRqmkFhtb/KH03hUhxOamEQy411m3Njj3BbFvoBovxo4Q1cBWnV1ErprVj9MlF0UPXkng0eyg==", 1023 | "license": "MIT", 1024 | "dependencies": { 1025 | "immer": "^10.0.3", 1026 | "redux": "^5.0.1", 1027 | "redux-thunk": "^3.1.0", 1028 | "reselect": "^5.1.0" 1029 | }, 1030 | "peerDependencies": { 1031 | "react": "^16.9.0 || ^17.0.0 || ^18 || ^19", 1032 | "react-redux": "^7.2.1 || ^8.1.3 || ^9.0.0" 1033 | }, 1034 | "peerDependenciesMeta": { 1035 | "react": { 1036 | "optional": true 1037 | }, 1038 | "react-redux": { 1039 | "optional": true 1040 | } 1041 | } 1042 | }, 1043 | "node_modules/@rollup/pluginutils": { 1044 | "version": "4.2.1", 1045 | "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-4.2.1.tgz", 1046 | "integrity": "sha512-iKnFXr7NkdZAIHiIWE+BX5ULi/ucVFYWD6TbAV+rZctiRTY2PL6tsIKhoIOaoskiWAkgu+VsbXgUVDNLHf+InQ==", 1047 | "dev": true, 1048 | "license": "MIT", 1049 | "dependencies": { 1050 | "estree-walker": "^2.0.1", 1051 | "picomatch": "^2.2.2" 1052 | }, 1053 | "engines": { 1054 | "node": ">= 8.0.0" 1055 | } 1056 | }, 1057 | "node_modules/@rollup/rollup-android-arm-eabi": { 1058 | "version": "4.28.0", 1059 | "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.28.0.tgz", 1060 | "integrity": "sha512-wLJuPLT6grGZsy34g4N1yRfYeouklTgPhH1gWXCYspenKYD0s3cR99ZevOGw5BexMNywkbV3UkjADisozBmpPQ==", 1061 | "cpu": [ 1062 | "arm" 1063 | ], 1064 | "dev": true, 1065 | "license": "MIT", 1066 | "optional": true, 1067 | "os": [ 1068 | "android" 1069 | ] 1070 | }, 1071 | "node_modules/@rollup/rollup-android-arm64": { 1072 | "version": "4.28.0", 1073 | "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.28.0.tgz", 1074 | "integrity": "sha512-eiNkznlo0dLmVG/6wf+Ifi/v78G4d4QxRhuUl+s8EWZpDewgk7PX3ZyECUXU0Zq/Ca+8nU8cQpNC4Xgn2gFNDA==", 1075 | "cpu": [ 1076 | "arm64" 1077 | ], 1078 | "dev": true, 1079 | "license": "MIT", 1080 | "optional": true, 1081 | "os": [ 1082 | "android" 1083 | ] 1084 | }, 1085 | "node_modules/@rollup/rollup-darwin-arm64": { 1086 | "version": "4.28.0", 1087 | "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.28.0.tgz", 1088 | "integrity": "sha512-lmKx9yHsppblnLQZOGxdO66gT77bvdBtr/0P+TPOseowE7D9AJoBw8ZDULRasXRWf1Z86/gcOdpBrV6VDUY36Q==", 1089 | "cpu": [ 1090 | "arm64" 1091 | ], 1092 | "dev": true, 1093 | "license": "MIT", 1094 | "optional": true, 1095 | "os": [ 1096 | "darwin" 1097 | ] 1098 | }, 1099 | "node_modules/@rollup/rollup-darwin-x64": { 1100 | "version": "4.28.0", 1101 | "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.28.0.tgz", 1102 | "integrity": "sha512-8hxgfReVs7k9Js1uAIhS6zq3I+wKQETInnWQtgzt8JfGx51R1N6DRVy3F4o0lQwumbErRz52YqwjfvuwRxGv1w==", 1103 | "cpu": [ 1104 | "x64" 1105 | ], 1106 | "dev": true, 1107 | "license": "MIT", 1108 | "optional": true, 1109 | "os": [ 1110 | "darwin" 1111 | ] 1112 | }, 1113 | "node_modules/@rollup/rollup-freebsd-arm64": { 1114 | "version": "4.28.0", 1115 | "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.28.0.tgz", 1116 | "integrity": "sha512-lA1zZB3bFx5oxu9fYud4+g1mt+lYXCoch0M0V/xhqLoGatbzVse0wlSQ1UYOWKpuSu3gyN4qEc0Dxf/DII1bhQ==", 1117 | "cpu": [ 1118 | "arm64" 1119 | ], 1120 | "dev": true, 1121 | "license": "MIT", 1122 | "optional": true, 1123 | "os": [ 1124 | "freebsd" 1125 | ] 1126 | }, 1127 | "node_modules/@rollup/rollup-freebsd-x64": { 1128 | "version": "4.28.0", 1129 | "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.28.0.tgz", 1130 | "integrity": "sha512-aI2plavbUDjCQB/sRbeUZWX9qp12GfYkYSJOrdYTL/C5D53bsE2/nBPuoiJKoWp5SN78v2Vr8ZPnB+/VbQ2pFA==", 1131 | "cpu": [ 1132 | "x64" 1133 | ], 1134 | "dev": true, 1135 | "license": "MIT", 1136 | "optional": true, 1137 | "os": [ 1138 | "freebsd" 1139 | ] 1140 | }, 1141 | "node_modules/@rollup/rollup-linux-arm-gnueabihf": { 1142 | "version": "4.28.0", 1143 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.28.0.tgz", 1144 | "integrity": "sha512-WXveUPKtfqtaNvpf0iOb0M6xC64GzUX/OowbqfiCSXTdi/jLlOmH0Ba94/OkiY2yTGTwteo4/dsHRfh5bDCZ+w==", 1145 | "cpu": [ 1146 | "arm" 1147 | ], 1148 | "dev": true, 1149 | "license": "MIT", 1150 | "optional": true, 1151 | "os": [ 1152 | "linux" 1153 | ] 1154 | }, 1155 | "node_modules/@rollup/rollup-linux-arm-musleabihf": { 1156 | "version": "4.28.0", 1157 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.28.0.tgz", 1158 | "integrity": "sha512-yLc3O2NtOQR67lI79zsSc7lk31xjwcaocvdD1twL64PK1yNaIqCeWI9L5B4MFPAVGEVjH5k1oWSGuYX1Wutxpg==", 1159 | "cpu": [ 1160 | "arm" 1161 | ], 1162 | "dev": true, 1163 | "license": "MIT", 1164 | "optional": true, 1165 | "os": [ 1166 | "linux" 1167 | ] 1168 | }, 1169 | "node_modules/@rollup/rollup-linux-arm64-gnu": { 1170 | "version": "4.28.0", 1171 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.28.0.tgz", 1172 | "integrity": "sha512-+P9G9hjEpHucHRXqesY+3X9hD2wh0iNnJXX/QhS/J5vTdG6VhNYMxJ2rJkQOxRUd17u5mbMLHM7yWGZdAASfcg==", 1173 | "cpu": [ 1174 | "arm64" 1175 | ], 1176 | "dev": true, 1177 | "license": "MIT", 1178 | "optional": true, 1179 | "os": [ 1180 | "linux" 1181 | ] 1182 | }, 1183 | "node_modules/@rollup/rollup-linux-arm64-musl": { 1184 | "version": "4.28.0", 1185 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.28.0.tgz", 1186 | "integrity": "sha512-1xsm2rCKSTpKzi5/ypT5wfc+4bOGa/9yI/eaOLW0oMs7qpC542APWhl4A37AENGZ6St6GBMWhCCMM6tXgTIplw==", 1187 | "cpu": [ 1188 | "arm64" 1189 | ], 1190 | "dev": true, 1191 | "license": "MIT", 1192 | "optional": true, 1193 | "os": [ 1194 | "linux" 1195 | ] 1196 | }, 1197 | "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { 1198 | "version": "4.28.0", 1199 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.28.0.tgz", 1200 | "integrity": "sha512-zgWxMq8neVQeXL+ouSf6S7DoNeo6EPgi1eeqHXVKQxqPy1B2NvTbaOUWPn/7CfMKL7xvhV0/+fq/Z/J69g1WAQ==", 1201 | "cpu": [ 1202 | "ppc64" 1203 | ], 1204 | "dev": true, 1205 | "license": "MIT", 1206 | "optional": true, 1207 | "os": [ 1208 | "linux" 1209 | ] 1210 | }, 1211 | "node_modules/@rollup/rollup-linux-riscv64-gnu": { 1212 | "version": "4.28.0", 1213 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.28.0.tgz", 1214 | "integrity": "sha512-VEdVYacLniRxbRJLNtzwGt5vwS0ycYshofI7cWAfj7Vg5asqj+pt+Q6x4n+AONSZW/kVm+5nklde0qs2EUwU2g==", 1215 | "cpu": [ 1216 | "riscv64" 1217 | ], 1218 | "dev": true, 1219 | "license": "MIT", 1220 | "optional": true, 1221 | "os": [ 1222 | "linux" 1223 | ] 1224 | }, 1225 | "node_modules/@rollup/rollup-linux-s390x-gnu": { 1226 | "version": "4.28.0", 1227 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.28.0.tgz", 1228 | "integrity": "sha512-LQlP5t2hcDJh8HV8RELD9/xlYtEzJkm/aWGsauvdO2ulfl3QYRjqrKW+mGAIWP5kdNCBheqqqYIGElSRCaXfpw==", 1229 | "cpu": [ 1230 | "s390x" 1231 | ], 1232 | "dev": true, 1233 | "license": "MIT", 1234 | "optional": true, 1235 | "os": [ 1236 | "linux" 1237 | ] 1238 | }, 1239 | "node_modules/@rollup/rollup-linux-x64-gnu": { 1240 | "version": "4.28.0", 1241 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.28.0.tgz", 1242 | "integrity": "sha512-Nl4KIzteVEKE9BdAvYoTkW19pa7LR/RBrT6F1dJCV/3pbjwDcaOq+edkP0LXuJ9kflW/xOK414X78r+K84+msw==", 1243 | "cpu": [ 1244 | "x64" 1245 | ], 1246 | "dev": true, 1247 | "license": "MIT", 1248 | "optional": true, 1249 | "os": [ 1250 | "linux" 1251 | ] 1252 | }, 1253 | "node_modules/@rollup/rollup-linux-x64-musl": { 1254 | "version": "4.28.0", 1255 | "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.28.0.tgz", 1256 | "integrity": "sha512-eKpJr4vBDOi4goT75MvW+0dXcNUqisK4jvibY9vDdlgLx+yekxSm55StsHbxUsRxSTt3JEQvlr3cGDkzcSP8bw==", 1257 | "cpu": [ 1258 | "x64" 1259 | ], 1260 | "dev": true, 1261 | "license": "MIT", 1262 | "optional": true, 1263 | "os": [ 1264 | "linux" 1265 | ] 1266 | }, 1267 | "node_modules/@rollup/rollup-win32-arm64-msvc": { 1268 | "version": "4.28.0", 1269 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.28.0.tgz", 1270 | "integrity": "sha512-Vi+WR62xWGsE/Oj+mD0FNAPY2MEox3cfyG0zLpotZdehPFXwz6lypkGs5y38Jd/NVSbOD02aVad6q6QYF7i8Bg==", 1271 | "cpu": [ 1272 | "arm64" 1273 | ], 1274 | "dev": true, 1275 | "license": "MIT", 1276 | "optional": true, 1277 | "os": [ 1278 | "win32" 1279 | ] 1280 | }, 1281 | "node_modules/@rollup/rollup-win32-ia32-msvc": { 1282 | "version": "4.28.0", 1283 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.28.0.tgz", 1284 | "integrity": "sha512-kN/Vpip8emMLn/eOza+4JwqDZBL6MPNpkdaEsgUtW1NYN3DZvZqSQrbKzJcTL6hd8YNmFTn7XGWMwccOcJBL0A==", 1285 | "cpu": [ 1286 | "ia32" 1287 | ], 1288 | "dev": true, 1289 | "license": "MIT", 1290 | "optional": true, 1291 | "os": [ 1292 | "win32" 1293 | ] 1294 | }, 1295 | "node_modules/@rollup/rollup-win32-x64-msvc": { 1296 | "version": "4.28.0", 1297 | "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.28.0.tgz", 1298 | "integrity": "sha512-Bvno2/aZT6usSa7lRDL2+hMjVAGjuqaymF1ApZm31JXzniR/hvr14jpU+/z4X6Gt5BPlzosscyJZGUvguXIqeQ==", 1299 | "cpu": [ 1300 | "x64" 1301 | ], 1302 | "dev": true, 1303 | "license": "MIT", 1304 | "optional": true, 1305 | "os": [ 1306 | "win32" 1307 | ] 1308 | }, 1309 | "node_modules/@tauri-apps/api": { 1310 | "version": "2.1.1", 1311 | "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.1.1.tgz", 1312 | "integrity": "sha512-fzUfFFKo4lknXGJq8qrCidkUcKcH2UHhfaaCNt4GzgzGaW2iS26uFOg4tS3H4P8D6ZEeUxtiD5z0nwFF0UN30A==", 1313 | "license": "Apache-2.0 OR MIT", 1314 | "funding": { 1315 | "type": "opencollective", 1316 | "url": "https://opencollective.com/tauri" 1317 | } 1318 | }, 1319 | "node_modules/@tauri-apps/cli": { 1320 | "version": "2.1.0", 1321 | "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.1.0.tgz", 1322 | "integrity": "sha512-K2VhcKqBhAeS5pNOVdnR/xQRU6jwpgmkSL2ejHXcl0m+kaTggT0WRDQnFtPq6NljA7aE03cvwsbCAoFG7vtkJw==", 1323 | "dev": true, 1324 | "license": "Apache-2.0 OR MIT", 1325 | "bin": { 1326 | "tauri": "tauri.js" 1327 | }, 1328 | "engines": { 1329 | "node": ">= 10" 1330 | }, 1331 | "funding": { 1332 | "type": "opencollective", 1333 | "url": "https://opencollective.com/tauri" 1334 | }, 1335 | "optionalDependencies": { 1336 | "@tauri-apps/cli-darwin-arm64": "2.1.0", 1337 | "@tauri-apps/cli-darwin-x64": "2.1.0", 1338 | "@tauri-apps/cli-linux-arm-gnueabihf": "2.1.0", 1339 | "@tauri-apps/cli-linux-arm64-gnu": "2.1.0", 1340 | "@tauri-apps/cli-linux-arm64-musl": "2.1.0", 1341 | "@tauri-apps/cli-linux-x64-gnu": "2.1.0", 1342 | "@tauri-apps/cli-linux-x64-musl": "2.1.0", 1343 | "@tauri-apps/cli-win32-arm64-msvc": "2.1.0", 1344 | "@tauri-apps/cli-win32-ia32-msvc": "2.1.0", 1345 | "@tauri-apps/cli-win32-x64-msvc": "2.1.0" 1346 | } 1347 | }, 1348 | "node_modules/@tauri-apps/cli-darwin-arm64": { 1349 | "version": "2.1.0", 1350 | "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.1.0.tgz", 1351 | "integrity": "sha512-ESc6J6CE8hl1yKH2vJ+ALF+thq4Be+DM1mvmTyUCQObvezNCNhzfS6abIUd3ou4x5RGH51ouiANeT3wekU6dCw==", 1352 | "cpu": [ 1353 | "arm64" 1354 | ], 1355 | "dev": true, 1356 | "license": "Apache-2.0 OR MIT", 1357 | "optional": true, 1358 | "os": [ 1359 | "darwin" 1360 | ], 1361 | "engines": { 1362 | "node": ">= 10" 1363 | } 1364 | }, 1365 | "node_modules/@tauri-apps/cli-darwin-x64": { 1366 | "version": "2.1.0", 1367 | "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.1.0.tgz", 1368 | "integrity": "sha512-TasHS442DFs8cSH2eUQzuDBXUST4ECjCd0yyP+zZzvAruiB0Bg+c8A+I/EnqCvBQ2G2yvWLYG8q/LI7c87A5UA==", 1369 | "cpu": [ 1370 | "x64" 1371 | ], 1372 | "dev": true, 1373 | "license": "Apache-2.0 OR MIT", 1374 | "optional": true, 1375 | "os": [ 1376 | "darwin" 1377 | ], 1378 | "engines": { 1379 | "node": ">= 10" 1380 | } 1381 | }, 1382 | "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": { 1383 | "version": "2.1.0", 1384 | "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.1.0.tgz", 1385 | "integrity": "sha512-aP7ZBGNL4ny07Cbb6kKpUOSrmhcIK2KhjviTzYlh+pPhAptxnC78xQGD3zKQkTi2WliJLPmBYbOHWWQa57lQ9w==", 1386 | "cpu": [ 1387 | "arm" 1388 | ], 1389 | "dev": true, 1390 | "license": "Apache-2.0 OR MIT", 1391 | "optional": true, 1392 | "os": [ 1393 | "linux" 1394 | ], 1395 | "engines": { 1396 | "node": ">= 10" 1397 | } 1398 | }, 1399 | "node_modules/@tauri-apps/cli-linux-arm64-gnu": { 1400 | "version": "2.1.0", 1401 | "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.1.0.tgz", 1402 | "integrity": "sha512-ZTdgD5gLeMCzndMT2f358EkoYkZ5T+Qy6zPzU+l5vv5M7dHVN9ZmblNAYYXmoOuw7y+BY4X/rZvHV9pcGrcanQ==", 1403 | "cpu": [ 1404 | "arm64" 1405 | ], 1406 | "dev": true, 1407 | "license": "Apache-2.0 OR MIT", 1408 | "optional": true, 1409 | "os": [ 1410 | "linux" 1411 | ], 1412 | "engines": { 1413 | "node": ">= 10" 1414 | } 1415 | }, 1416 | "node_modules/@tauri-apps/cli-linux-arm64-musl": { 1417 | "version": "2.1.0", 1418 | "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.1.0.tgz", 1419 | "integrity": "sha512-NzwqjUCilhnhJzusz3d/0i0F1GFrwCQbkwR6yAHUxItESbsGYkZRJk0yMEWkg3PzFnyK4cWTlQJMEU52TjhEzA==", 1420 | "cpu": [ 1421 | "arm64" 1422 | ], 1423 | "dev": true, 1424 | "license": "Apache-2.0 OR MIT", 1425 | "optional": true, 1426 | "os": [ 1427 | "linux" 1428 | ], 1429 | "engines": { 1430 | "node": ">= 10" 1431 | } 1432 | }, 1433 | "node_modules/@tauri-apps/cli-linux-x64-gnu": { 1434 | "version": "2.1.0", 1435 | "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.1.0.tgz", 1436 | "integrity": "sha512-TyiIpMEtZxNOQmuFyfJwaaYbg3movSthpBJLIdPlKxSAB2BW0VWLY3/ZfIxm/G2YGHyREkjJvimzYE0i37PnMA==", 1437 | "cpu": [ 1438 | "x64" 1439 | ], 1440 | "dev": true, 1441 | "license": "Apache-2.0 OR MIT", 1442 | "optional": true, 1443 | "os": [ 1444 | "linux" 1445 | ], 1446 | "engines": { 1447 | "node": ">= 10" 1448 | } 1449 | }, 1450 | "node_modules/@tauri-apps/cli-linux-x64-musl": { 1451 | "version": "2.1.0", 1452 | "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.1.0.tgz", 1453 | "integrity": "sha512-/dQd0TlaxBdJACrR72DhynWftzHDaX32eBtS5WBrNJ+nnNb+znM3gON6nJ9tSE9jgDa6n1v2BkI/oIDtypfUXw==", 1454 | "cpu": [ 1455 | "x64" 1456 | ], 1457 | "dev": true, 1458 | "license": "Apache-2.0 OR MIT", 1459 | "optional": true, 1460 | "os": [ 1461 | "linux" 1462 | ], 1463 | "engines": { 1464 | "node": ">= 10" 1465 | } 1466 | }, 1467 | "node_modules/@tauri-apps/cli-win32-arm64-msvc": { 1468 | "version": "2.1.0", 1469 | "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.1.0.tgz", 1470 | "integrity": "sha512-NdQJO7SmdYqOcE+JPU7bwg7+odfZMWO6g8xF9SXYCMdUzvM2Gv/AQfikNXz5yS7ralRhNFuW32i5dcHlxh4pDg==", 1471 | "cpu": [ 1472 | "arm64" 1473 | ], 1474 | "dev": true, 1475 | "license": "Apache-2.0 OR MIT", 1476 | "optional": true, 1477 | "os": [ 1478 | "win32" 1479 | ], 1480 | "engines": { 1481 | "node": ">= 10" 1482 | } 1483 | }, 1484 | "node_modules/@tauri-apps/cli-win32-ia32-msvc": { 1485 | "version": "2.1.0", 1486 | "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.1.0.tgz", 1487 | "integrity": "sha512-f5h8gKT/cB8s1ticFRUpNmHqkmaLutT62oFDB7N//2YTXnxst7EpMIn1w+QimxTvTk2gcx6EcW6bEk/y2hZGzg==", 1488 | "cpu": [ 1489 | "ia32" 1490 | ], 1491 | "dev": true, 1492 | "license": "Apache-2.0 OR MIT", 1493 | "optional": true, 1494 | "os": [ 1495 | "win32" 1496 | ], 1497 | "engines": { 1498 | "node": ">= 10" 1499 | } 1500 | }, 1501 | "node_modules/@tauri-apps/cli-win32-x64-msvc": { 1502 | "version": "2.1.0", 1503 | "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.1.0.tgz", 1504 | "integrity": "sha512-P/+LrdSSb5Xbho1LRP4haBjFHdyPdjWvGgeopL96OVtrFpYnfC+RctB45z2V2XxqFk3HweDDxk266btjttfjGw==", 1505 | "cpu": [ 1506 | "x64" 1507 | ], 1508 | "dev": true, 1509 | "license": "Apache-2.0 OR MIT", 1510 | "optional": true, 1511 | "os": [ 1512 | "win32" 1513 | ], 1514 | "engines": { 1515 | "node": ">= 10" 1516 | } 1517 | }, 1518 | "node_modules/@tauri-apps/plugin-cli": { 1519 | "version": "2.0.0", 1520 | "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-cli/-/plugin-cli-2.0.0.tgz", 1521 | "integrity": "sha512-glQmlL1IiCGEa1FHYa/PTPSeYhfu56omLRgHXWlJECDt6DbJyRuJWVgtkQfUxtqnVdYnnU+DGIGeiInoEqtjLw==", 1522 | "license": "MIT OR Apache-2.0", 1523 | "dependencies": { 1524 | "@tauri-apps/api": "^2.0.0" 1525 | } 1526 | }, 1527 | "node_modules/@tauri-apps/plugin-fs": { 1528 | "version": "2.2.0", 1529 | "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-fs/-/plugin-fs-2.2.0.tgz", 1530 | "integrity": "sha512-+08mApuONKI8/sCNEZ6AR8vf5vI9DXD4YfrQ9NQmhRxYKMLVhRW164vdW5BSLmMpuevftpQ2FVoL9EFkfG9Z+g==", 1531 | "license": "MIT OR Apache-2.0", 1532 | "dependencies": { 1533 | "@tauri-apps/api": "^2.0.0" 1534 | } 1535 | }, 1536 | "node_modules/@tauri-apps/plugin-shell": { 1537 | "version": "2.0.1", 1538 | "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-shell/-/plugin-shell-2.0.1.tgz", 1539 | "integrity": "sha512-akU1b77sw3qHiynrK0s930y8zKmcdrSD60htjH+mFZqv5WaakZA/XxHR3/sF1nNv9Mgmt/Shls37HwnOr00aSw==", 1540 | "license": "MIT OR Apache-2.0", 1541 | "dependencies": { 1542 | "@tauri-apps/api": "^2.0.0" 1543 | } 1544 | }, 1545 | "node_modules/@types/estree": { 1546 | "version": "1.0.6", 1547 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", 1548 | "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", 1549 | "dev": true, 1550 | "license": "MIT" 1551 | }, 1552 | "node_modules/babel-plugin-transform-hook-names": { 1553 | "version": "1.0.2", 1554 | "resolved": "https://registry.npmjs.org/babel-plugin-transform-hook-names/-/babel-plugin-transform-hook-names-1.0.2.tgz", 1555 | "integrity": "sha512-5gafyjyyBTTdX/tQQ0hRgu4AhNHG/hqWi0ZZmg2xvs2FgRkJXzDNKBZCyoYqgFkovfDrgM8OoKg8karoUvWeCw==", 1556 | "dev": true, 1557 | "license": "MIT", 1558 | "peerDependencies": { 1559 | "@babel/core": "^7.12.10" 1560 | } 1561 | }, 1562 | "node_modules/boolbase": { 1563 | "version": "1.0.0", 1564 | "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", 1565 | "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", 1566 | "dev": true, 1567 | "license": "ISC" 1568 | }, 1569 | "node_modules/browserslist": { 1570 | "version": "4.24.4", 1571 | "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.4.tgz", 1572 | "integrity": "sha512-KDi1Ny1gSePi1vm0q4oxSF8b4DR44GF4BbmS2YdhPLOEqd8pDviZOGH/GsmRwoWJ2+5Lr085X7naowMwKHDG1A==", 1573 | "dev": true, 1574 | "funding": [ 1575 | { 1576 | "type": "opencollective", 1577 | "url": "https://opencollective.com/browserslist" 1578 | }, 1579 | { 1580 | "type": "tidelift", 1581 | "url": "https://tidelift.com/funding/github/npm/browserslist" 1582 | }, 1583 | { 1584 | "type": "github", 1585 | "url": "https://github.com/sponsors/ai" 1586 | } 1587 | ], 1588 | "license": "MIT", 1589 | "dependencies": { 1590 | "caniuse-lite": "^1.0.30001688", 1591 | "electron-to-chromium": "^1.5.73", 1592 | "node-releases": "^2.0.19", 1593 | "update-browserslist-db": "^1.1.1" 1594 | }, 1595 | "bin": { 1596 | "browserslist": "cli.js" 1597 | }, 1598 | "engines": { 1599 | "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" 1600 | } 1601 | }, 1602 | "node_modules/caniuse-lite": { 1603 | "version": "1.0.30001700", 1604 | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001700.tgz", 1605 | "integrity": "sha512-2S6XIXwaE7K7erT8dY+kLQcpa5ms63XlRkMkReXjle+kf6c5g38vyMl+Z5y8dSxOFDhcFe+nxnn261PLxBSQsQ==", 1606 | "dev": true, 1607 | "funding": [ 1608 | { 1609 | "type": "opencollective", 1610 | "url": "https://opencollective.com/browserslist" 1611 | }, 1612 | { 1613 | "type": "tidelift", 1614 | "url": "https://tidelift.com/funding/github/npm/caniuse-lite" 1615 | }, 1616 | { 1617 | "type": "github", 1618 | "url": "https://github.com/sponsors/ai" 1619 | } 1620 | ], 1621 | "license": "CC-BY-4.0" 1622 | }, 1623 | "node_modules/convert-source-map": { 1624 | "version": "2.0.0", 1625 | "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", 1626 | "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", 1627 | "dev": true, 1628 | "license": "MIT" 1629 | }, 1630 | "node_modules/css-select": { 1631 | "version": "5.1.0", 1632 | "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", 1633 | "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", 1634 | "dev": true, 1635 | "license": "BSD-2-Clause", 1636 | "dependencies": { 1637 | "boolbase": "^1.0.0", 1638 | "css-what": "^6.1.0", 1639 | "domhandler": "^5.0.2", 1640 | "domutils": "^3.0.1", 1641 | "nth-check": "^2.0.1" 1642 | }, 1643 | "funding": { 1644 | "url": "https://github.com/sponsors/fb55" 1645 | } 1646 | }, 1647 | "node_modules/css-what": { 1648 | "version": "6.1.0", 1649 | "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", 1650 | "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", 1651 | "dev": true, 1652 | "license": "BSD-2-Clause", 1653 | "engines": { 1654 | "node": ">= 6" 1655 | }, 1656 | "funding": { 1657 | "url": "https://github.com/sponsors/fb55" 1658 | } 1659 | }, 1660 | "node_modules/debug": { 1661 | "version": "4.4.0", 1662 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", 1663 | "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", 1664 | "dev": true, 1665 | "license": "MIT", 1666 | "dependencies": { 1667 | "ms": "^2.1.3" 1668 | }, 1669 | "engines": { 1670 | "node": ">=6.0" 1671 | }, 1672 | "peerDependenciesMeta": { 1673 | "supports-color": { 1674 | "optional": true 1675 | } 1676 | } 1677 | }, 1678 | "node_modules/dom-serializer": { 1679 | "version": "2.0.0", 1680 | "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", 1681 | "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", 1682 | "dev": true, 1683 | "license": "MIT", 1684 | "dependencies": { 1685 | "domelementtype": "^2.3.0", 1686 | "domhandler": "^5.0.2", 1687 | "entities": "^4.2.0" 1688 | }, 1689 | "funding": { 1690 | "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" 1691 | } 1692 | }, 1693 | "node_modules/domelementtype": { 1694 | "version": "2.3.0", 1695 | "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", 1696 | "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", 1697 | "dev": true, 1698 | "funding": [ 1699 | { 1700 | "type": "github", 1701 | "url": "https://github.com/sponsors/fb55" 1702 | } 1703 | ], 1704 | "license": "BSD-2-Clause" 1705 | }, 1706 | "node_modules/domhandler": { 1707 | "version": "5.0.3", 1708 | "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", 1709 | "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", 1710 | "dev": true, 1711 | "license": "BSD-2-Clause", 1712 | "dependencies": { 1713 | "domelementtype": "^2.3.0" 1714 | }, 1715 | "engines": { 1716 | "node": ">= 4" 1717 | }, 1718 | "funding": { 1719 | "url": "https://github.com/fb55/domhandler?sponsor=1" 1720 | } 1721 | }, 1722 | "node_modules/domutils": { 1723 | "version": "3.2.2", 1724 | "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.2.2.tgz", 1725 | "integrity": "sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==", 1726 | "dev": true, 1727 | "license": "BSD-2-Clause", 1728 | "dependencies": { 1729 | "dom-serializer": "^2.0.0", 1730 | "domelementtype": "^2.3.0", 1731 | "domhandler": "^5.0.3" 1732 | }, 1733 | "funding": { 1734 | "url": "https://github.com/fb55/domutils?sponsor=1" 1735 | } 1736 | }, 1737 | "node_modules/electron-to-chromium": { 1738 | "version": "1.5.102", 1739 | "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.102.tgz", 1740 | "integrity": "sha512-eHhqaja8tE/FNpIiBrvBjFV/SSKpyWHLvxuR9dPTdo+3V9ppdLmFB7ZZQ98qNovcngPLYIz0oOBF9P0FfZef5Q==", 1741 | "dev": true, 1742 | "license": "ISC" 1743 | }, 1744 | "node_modules/entities": { 1745 | "version": "4.5.0", 1746 | "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", 1747 | "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", 1748 | "dev": true, 1749 | "license": "BSD-2-Clause", 1750 | "engines": { 1751 | "node": ">=0.12" 1752 | }, 1753 | "funding": { 1754 | "url": "https://github.com/fb55/entities?sponsor=1" 1755 | } 1756 | }, 1757 | "node_modules/esbuild": { 1758 | "version": "0.21.5", 1759 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", 1760 | "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", 1761 | "dev": true, 1762 | "hasInstallScript": true, 1763 | "license": "MIT", 1764 | "bin": { 1765 | "esbuild": "bin/esbuild" 1766 | }, 1767 | "engines": { 1768 | "node": ">=12" 1769 | }, 1770 | "optionalDependencies": { 1771 | "@esbuild/aix-ppc64": "0.21.5", 1772 | "@esbuild/android-arm": "0.21.5", 1773 | "@esbuild/android-arm64": "0.21.5", 1774 | "@esbuild/android-x64": "0.21.5", 1775 | "@esbuild/darwin-arm64": "0.21.5", 1776 | "@esbuild/darwin-x64": "0.21.5", 1777 | "@esbuild/freebsd-arm64": "0.21.5", 1778 | "@esbuild/freebsd-x64": "0.21.5", 1779 | "@esbuild/linux-arm": "0.21.5", 1780 | "@esbuild/linux-arm64": "0.21.5", 1781 | "@esbuild/linux-ia32": "0.21.5", 1782 | "@esbuild/linux-loong64": "0.21.5", 1783 | "@esbuild/linux-mips64el": "0.21.5", 1784 | "@esbuild/linux-ppc64": "0.21.5", 1785 | "@esbuild/linux-riscv64": "0.21.5", 1786 | "@esbuild/linux-s390x": "0.21.5", 1787 | "@esbuild/linux-x64": "0.21.5", 1788 | "@esbuild/netbsd-x64": "0.21.5", 1789 | "@esbuild/openbsd-x64": "0.21.5", 1790 | "@esbuild/sunos-x64": "0.21.5", 1791 | "@esbuild/win32-arm64": "0.21.5", 1792 | "@esbuild/win32-ia32": "0.21.5", 1793 | "@esbuild/win32-x64": "0.21.5" 1794 | } 1795 | }, 1796 | "node_modules/escalade": { 1797 | "version": "3.2.0", 1798 | "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", 1799 | "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", 1800 | "dev": true, 1801 | "license": "MIT", 1802 | "engines": { 1803 | "node": ">=6" 1804 | } 1805 | }, 1806 | "node_modules/estree-walker": { 1807 | "version": "2.0.2", 1808 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", 1809 | "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", 1810 | "dev": true, 1811 | "license": "MIT" 1812 | }, 1813 | "node_modules/fsevents": { 1814 | "version": "2.3.3", 1815 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", 1816 | "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", 1817 | "dev": true, 1818 | "hasInstallScript": true, 1819 | "license": "MIT", 1820 | "optional": true, 1821 | "os": [ 1822 | "darwin" 1823 | ], 1824 | "engines": { 1825 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 1826 | } 1827 | }, 1828 | "node_modules/gensync": { 1829 | "version": "1.0.0-beta.2", 1830 | "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", 1831 | "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", 1832 | "dev": true, 1833 | "license": "MIT", 1834 | "engines": { 1835 | "node": ">=6.9.0" 1836 | } 1837 | }, 1838 | "node_modules/globals": { 1839 | "version": "11.12.0", 1840 | "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", 1841 | "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", 1842 | "dev": true, 1843 | "license": "MIT", 1844 | "engines": { 1845 | "node": ">=4" 1846 | } 1847 | }, 1848 | "node_modules/he": { 1849 | "version": "1.2.0", 1850 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 1851 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 1852 | "dev": true, 1853 | "license": "MIT", 1854 | "bin": { 1855 | "he": "bin/he" 1856 | } 1857 | }, 1858 | "node_modules/immer": { 1859 | "version": "10.1.1", 1860 | "resolved": "https://registry.npmjs.org/immer/-/immer-10.1.1.tgz", 1861 | "integrity": "sha512-s2MPrmjovJcoMaHtx6K11Ra7oD05NT97w1IC5zpMkT6Atjr7H8LjaDd81iIxUYpMKSRRNMJE703M1Fhr/TctHw==", 1862 | "license": "MIT", 1863 | "funding": { 1864 | "type": "opencollective", 1865 | "url": "https://opencollective.com/immer" 1866 | } 1867 | }, 1868 | "node_modules/js-tokens": { 1869 | "version": "4.0.0", 1870 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 1871 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 1872 | "dev": true, 1873 | "license": "MIT" 1874 | }, 1875 | "node_modules/jsesc": { 1876 | "version": "3.1.0", 1877 | "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", 1878 | "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", 1879 | "dev": true, 1880 | "license": "MIT", 1881 | "bin": { 1882 | "jsesc": "bin/jsesc" 1883 | }, 1884 | "engines": { 1885 | "node": ">=6" 1886 | } 1887 | }, 1888 | "node_modules/json5": { 1889 | "version": "2.2.3", 1890 | "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", 1891 | "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", 1892 | "dev": true, 1893 | "license": "MIT", 1894 | "bin": { 1895 | "json5": "lib/cli.js" 1896 | }, 1897 | "engines": { 1898 | "node": ">=6" 1899 | } 1900 | }, 1901 | "node_modules/kolorist": { 1902 | "version": "1.8.0", 1903 | "resolved": "https://registry.npmjs.org/kolorist/-/kolorist-1.8.0.tgz", 1904 | "integrity": "sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ==", 1905 | "dev": true, 1906 | "license": "MIT" 1907 | }, 1908 | "node_modules/lru-cache": { 1909 | "version": "5.1.1", 1910 | "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", 1911 | "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", 1912 | "dev": true, 1913 | "license": "ISC", 1914 | "dependencies": { 1915 | "yallist": "^3.0.2" 1916 | } 1917 | }, 1918 | "node_modules/magic-string": { 1919 | "version": "0.30.17", 1920 | "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", 1921 | "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", 1922 | "dev": true, 1923 | "license": "MIT", 1924 | "dependencies": { 1925 | "@jridgewell/sourcemap-codec": "^1.5.0" 1926 | } 1927 | }, 1928 | "node_modules/ms": { 1929 | "version": "2.1.3", 1930 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 1931 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 1932 | "dev": true, 1933 | "license": "MIT" 1934 | }, 1935 | "node_modules/nanoid": { 1936 | "version": "3.3.8", 1937 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", 1938 | "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", 1939 | "dev": true, 1940 | "funding": [ 1941 | { 1942 | "type": "github", 1943 | "url": "https://github.com/sponsors/ai" 1944 | } 1945 | ], 1946 | "license": "MIT", 1947 | "bin": { 1948 | "nanoid": "bin/nanoid.cjs" 1949 | }, 1950 | "engines": { 1951 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" 1952 | } 1953 | }, 1954 | "node_modules/node-html-parser": { 1955 | "version": "6.1.13", 1956 | "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-6.1.13.tgz", 1957 | "integrity": "sha512-qIsTMOY4C/dAa5Q5vsobRpOOvPfC4pB61UVW2uSwZNUp0QU/jCekTal1vMmbO0DgdHeLUJpv/ARmDqErVxA3Sg==", 1958 | "dev": true, 1959 | "license": "MIT", 1960 | "dependencies": { 1961 | "css-select": "^5.1.0", 1962 | "he": "1.2.0" 1963 | } 1964 | }, 1965 | "node_modules/node-releases": { 1966 | "version": "2.0.19", 1967 | "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz", 1968 | "integrity": "sha512-xxOWJsBKtzAq7DY0J+DTzuz58K8e7sJbdgwkbMWQe8UYB6ekmsQ45q0M/tJDsGaZmbC+l7n57UV8Hl5tHxO9uw==", 1969 | "dev": true, 1970 | "license": "MIT" 1971 | }, 1972 | "node_modules/nth-check": { 1973 | "version": "2.1.1", 1974 | "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", 1975 | "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", 1976 | "dev": true, 1977 | "license": "BSD-2-Clause", 1978 | "dependencies": { 1979 | "boolbase": "^1.0.0" 1980 | }, 1981 | "funding": { 1982 | "url": "https://github.com/fb55/nth-check?sponsor=1" 1983 | } 1984 | }, 1985 | "node_modules/picocolors": { 1986 | "version": "1.1.1", 1987 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", 1988 | "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", 1989 | "dev": true, 1990 | "license": "ISC" 1991 | }, 1992 | "node_modules/picomatch": { 1993 | "version": "2.3.1", 1994 | "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", 1995 | "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", 1996 | "dev": true, 1997 | "license": "MIT", 1998 | "engines": { 1999 | "node": ">=8.6" 2000 | }, 2001 | "funding": { 2002 | "url": "https://github.com/sponsors/jonschlinkert" 2003 | } 2004 | }, 2005 | "node_modules/postcss": { 2006 | "version": "8.4.49", 2007 | "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", 2008 | "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", 2009 | "dev": true, 2010 | "funding": [ 2011 | { 2012 | "type": "opencollective", 2013 | "url": "https://opencollective.com/postcss/" 2014 | }, 2015 | { 2016 | "type": "tidelift", 2017 | "url": "https://tidelift.com/funding/github/npm/postcss" 2018 | }, 2019 | { 2020 | "type": "github", 2021 | "url": "https://github.com/sponsors/ai" 2022 | } 2023 | ], 2024 | "license": "MIT", 2025 | "dependencies": { 2026 | "nanoid": "^3.3.7", 2027 | "picocolors": "^1.1.1", 2028 | "source-map-js": "^1.2.1" 2029 | }, 2030 | "engines": { 2031 | "node": "^10 || ^12 || >=14" 2032 | } 2033 | }, 2034 | "node_modules/preact": { 2035 | "version": "10.26.2", 2036 | "resolved": "https://registry.npmjs.org/preact/-/preact-10.26.2.tgz", 2037 | "integrity": "sha512-0gNmv4qpS9HaN3+40CLBAnKe0ZfyE4ZWo5xKlC1rVrr0ckkEvJvAQqKaHANdFKsGstoxrY4AItZ7kZSGVoVjgg==", 2038 | "license": "MIT", 2039 | "funding": { 2040 | "type": "opencollective", 2041 | "url": "https://opencollective.com/preact" 2042 | } 2043 | }, 2044 | "node_modules/redux": { 2045 | "version": "5.0.1", 2046 | "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", 2047 | "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", 2048 | "license": "MIT" 2049 | }, 2050 | "node_modules/redux-thunk": { 2051 | "version": "3.1.0", 2052 | "resolved": "https://registry.npmjs.org/redux-thunk/-/redux-thunk-3.1.0.tgz", 2053 | "integrity": "sha512-NW2r5T6ksUKXCabzhL9z+h206HQw/NJkcLm1GPImRQ8IzfXwRGqjVhKJGauHirT0DAuyy6hjdnMZaRoAcy0Klw==", 2054 | "license": "MIT", 2055 | "peerDependencies": { 2056 | "redux": "^5.0.0" 2057 | } 2058 | }, 2059 | "node_modules/reselect": { 2060 | "version": "5.1.1", 2061 | "resolved": "https://registry.npmjs.org/reselect/-/reselect-5.1.1.tgz", 2062 | "integrity": "sha512-K/BG6eIky/SBpzfHZv/dd+9JBFiS4SWV7FIujVyJRux6e45+73RaUHXLmIR1f7WOMaQ0U1km6qwklRQxpJJY0w==", 2063 | "license": "MIT" 2064 | }, 2065 | "node_modules/rollup": { 2066 | "version": "4.28.0", 2067 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.28.0.tgz", 2068 | "integrity": "sha512-G9GOrmgWHBma4YfCcX8PjH0qhXSdH8B4HDE2o4/jaxj93S4DPCIDoLcXz99eWMji4hB29UFCEd7B2gwGJDR9cQ==", 2069 | "dev": true, 2070 | "license": "MIT", 2071 | "dependencies": { 2072 | "@types/estree": "1.0.6" 2073 | }, 2074 | "bin": { 2075 | "rollup": "dist/bin/rollup" 2076 | }, 2077 | "engines": { 2078 | "node": ">=18.0.0", 2079 | "npm": ">=8.0.0" 2080 | }, 2081 | "optionalDependencies": { 2082 | "@rollup/rollup-android-arm-eabi": "4.28.0", 2083 | "@rollup/rollup-android-arm64": "4.28.0", 2084 | "@rollup/rollup-darwin-arm64": "4.28.0", 2085 | "@rollup/rollup-darwin-x64": "4.28.0", 2086 | "@rollup/rollup-freebsd-arm64": "4.28.0", 2087 | "@rollup/rollup-freebsd-x64": "4.28.0", 2088 | "@rollup/rollup-linux-arm-gnueabihf": "4.28.0", 2089 | "@rollup/rollup-linux-arm-musleabihf": "4.28.0", 2090 | "@rollup/rollup-linux-arm64-gnu": "4.28.0", 2091 | "@rollup/rollup-linux-arm64-musl": "4.28.0", 2092 | "@rollup/rollup-linux-powerpc64le-gnu": "4.28.0", 2093 | "@rollup/rollup-linux-riscv64-gnu": "4.28.0", 2094 | "@rollup/rollup-linux-s390x-gnu": "4.28.0", 2095 | "@rollup/rollup-linux-x64-gnu": "4.28.0", 2096 | "@rollup/rollup-linux-x64-musl": "4.28.0", 2097 | "@rollup/rollup-win32-arm64-msvc": "4.28.0", 2098 | "@rollup/rollup-win32-ia32-msvc": "4.28.0", 2099 | "@rollup/rollup-win32-x64-msvc": "4.28.0", 2100 | "fsevents": "~2.3.2" 2101 | } 2102 | }, 2103 | "node_modules/semver": { 2104 | "version": "6.3.1", 2105 | "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", 2106 | "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", 2107 | "dev": true, 2108 | "license": "ISC", 2109 | "bin": { 2110 | "semver": "bin/semver.js" 2111 | } 2112 | }, 2113 | "node_modules/simple-code-frame": { 2114 | "version": "1.3.0", 2115 | "resolved": "https://registry.npmjs.org/simple-code-frame/-/simple-code-frame-1.3.0.tgz", 2116 | "integrity": "sha512-MB4pQmETUBlNs62BBeRjIFGeuy/x6gGKh7+eRUemn1rCFhqo7K+4slPqsyizCbcbYLnaYqaoZ2FWsZ/jN06D8w==", 2117 | "dev": true, 2118 | "license": "MIT", 2119 | "dependencies": { 2120 | "kolorist": "^1.6.0" 2121 | } 2122 | }, 2123 | "node_modules/source-map": { 2124 | "version": "0.7.4", 2125 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz", 2126 | "integrity": "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA==", 2127 | "dev": true, 2128 | "license": "BSD-3-Clause", 2129 | "engines": { 2130 | "node": ">= 8" 2131 | } 2132 | }, 2133 | "node_modules/source-map-js": { 2134 | "version": "1.2.1", 2135 | "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", 2136 | "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", 2137 | "dev": true, 2138 | "license": "BSD-3-Clause", 2139 | "engines": { 2140 | "node": ">=0.10.0" 2141 | } 2142 | }, 2143 | "node_modules/stack-trace": { 2144 | "version": "1.0.0-pre2", 2145 | "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-1.0.0-pre2.tgz", 2146 | "integrity": "sha512-2ztBJRek8IVofG9DBJqdy2N5kulaacX30Nz7xmkYF6ale9WBVmIy6mFBchvGX7Vx/MyjBhx+Rcxqrj+dbOnQ6A==", 2147 | "dev": true, 2148 | "license": "MIT", 2149 | "engines": { 2150 | "node": ">=16" 2151 | } 2152 | }, 2153 | "node_modules/typescript": { 2154 | "version": "5.7.2", 2155 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.7.2.tgz", 2156 | "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", 2157 | "dev": true, 2158 | "license": "Apache-2.0", 2159 | "bin": { 2160 | "tsc": "bin/tsc", 2161 | "tsserver": "bin/tsserver" 2162 | }, 2163 | "engines": { 2164 | "node": ">=14.17" 2165 | } 2166 | }, 2167 | "node_modules/update-browserslist-db": { 2168 | "version": "1.1.2", 2169 | "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.2.tgz", 2170 | "integrity": "sha512-PPypAm5qvlD7XMZC3BujecnaOxwhrtoFR+Dqkk5Aa/6DssiH0ibKoketaj9w8LP7Bont1rYeoV5plxD7RTEPRg==", 2171 | "dev": true, 2172 | "funding": [ 2173 | { 2174 | "type": "opencollective", 2175 | "url": "https://opencollective.com/browserslist" 2176 | }, 2177 | { 2178 | "type": "tidelift", 2179 | "url": "https://tidelift.com/funding/github/npm/browserslist" 2180 | }, 2181 | { 2182 | "type": "github", 2183 | "url": "https://github.com/sponsors/ai" 2184 | } 2185 | ], 2186 | "license": "MIT", 2187 | "dependencies": { 2188 | "escalade": "^3.2.0", 2189 | "picocolors": "^1.1.1" 2190 | }, 2191 | "bin": { 2192 | "update-browserslist-db": "cli.js" 2193 | }, 2194 | "peerDependencies": { 2195 | "browserslist": ">= 4.21.0" 2196 | } 2197 | }, 2198 | "node_modules/vite": { 2199 | "version": "5.4.11", 2200 | "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", 2201 | "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", 2202 | "dev": true, 2203 | "license": "MIT", 2204 | "dependencies": { 2205 | "esbuild": "^0.21.3", 2206 | "postcss": "^8.4.43", 2207 | "rollup": "^4.20.0" 2208 | }, 2209 | "bin": { 2210 | "vite": "bin/vite.js" 2211 | }, 2212 | "engines": { 2213 | "node": "^18.0.0 || >=20.0.0" 2214 | }, 2215 | "funding": { 2216 | "url": "https://github.com/vitejs/vite?sponsor=1" 2217 | }, 2218 | "optionalDependencies": { 2219 | "fsevents": "~2.3.3" 2220 | }, 2221 | "peerDependencies": { 2222 | "@types/node": "^18.0.0 || >=20.0.0", 2223 | "less": "*", 2224 | "lightningcss": "^1.21.0", 2225 | "sass": "*", 2226 | "sass-embedded": "*", 2227 | "stylus": "*", 2228 | "sugarss": "*", 2229 | "terser": "^5.4.0" 2230 | }, 2231 | "peerDependenciesMeta": { 2232 | "@types/node": { 2233 | "optional": true 2234 | }, 2235 | "less": { 2236 | "optional": true 2237 | }, 2238 | "lightningcss": { 2239 | "optional": true 2240 | }, 2241 | "sass": { 2242 | "optional": true 2243 | }, 2244 | "sass-embedded": { 2245 | "optional": true 2246 | }, 2247 | "stylus": { 2248 | "optional": true 2249 | }, 2250 | "sugarss": { 2251 | "optional": true 2252 | }, 2253 | "terser": { 2254 | "optional": true 2255 | } 2256 | } 2257 | }, 2258 | "node_modules/vite-prerender-plugin": { 2259 | "version": "0.5.6", 2260 | "resolved": "https://registry.npmjs.org/vite-prerender-plugin/-/vite-prerender-plugin-0.5.6.tgz", 2261 | "integrity": "sha512-ELG0pflVXWNVGaHme8g0rZB7xFnytf1U6fYLep3NUC4knGmOHtEc2R7DIlnCKeYGUGkzfMcvJOasK4C0dulKbQ==", 2262 | "dev": true, 2263 | "license": "MIT", 2264 | "dependencies": { 2265 | "magic-string": "^0.30.6", 2266 | "node-html-parser": "^6.1.12", 2267 | "simple-code-frame": "^1.3.0", 2268 | "source-map": "^0.7.4", 2269 | "stack-trace": "^1.0.0-pre2" 2270 | } 2271 | }, 2272 | "node_modules/yallist": { 2273 | "version": "3.1.1", 2274 | "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", 2275 | "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", 2276 | "dev": true, 2277 | "license": "ISC" 2278 | }, 2279 | "node_modules/zustand": { 2280 | "version": "5.0.3", 2281 | "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.3.tgz", 2282 | "integrity": "sha512-14fwWQtU3pH4dE0dOpdMiWjddcH+QzKIgk1cl8epwSE7yag43k/AD/m4L6+K7DytAOr9gGBe3/EXj9g7cdostg==", 2283 | "license": "MIT", 2284 | "engines": { 2285 | "node": ">=12.20.0" 2286 | }, 2287 | "peerDependencies": { 2288 | "@types/react": ">=18.0.0", 2289 | "immer": ">=9.0.6", 2290 | "react": ">=18.0.0", 2291 | "use-sync-external-store": ">=1.2.0" 2292 | }, 2293 | "peerDependenciesMeta": { 2294 | "@types/react": { 2295 | "optional": true 2296 | }, 2297 | "immer": { 2298 | "optional": true 2299 | }, 2300 | "react": { 2301 | "optional": true 2302 | }, 2303 | "use-sync-external-store": { 2304 | "optional": true 2305 | } 2306 | } 2307 | } 2308 | } 2309 | } 2310 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Electro", 3 | "private": true, 4 | "version": "0.6.3", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "preview": "vite preview", 10 | "tauri": "tauri", 11 | "format": "biome format --write ./src", 12 | "lint": "biome lint ./src", 13 | "vb": "node utils/vb.js" 14 | }, 15 | "dependencies": { 16 | "@reduxjs/toolkit": "^2.5.0", 17 | "@tauri-apps/api": "^2", 18 | "@tauri-apps/plugin-cli": "^2.0.0", 19 | "@tauri-apps/plugin-fs": "^2.2.0", 20 | "@tauri-apps/plugin-shell": "^2", 21 | "preact": "^10.26.2", 22 | "redux": "^5.0.1", 23 | "zustand": "^5.0.3" 24 | }, 25 | "devDependencies": { 26 | "@babel/plugin-transform-react-jsx": "^7.25.9", 27 | "@biomejs/biome": "1.9.4", 28 | "@preact/preset-vite": "^2.10.1", 29 | "@tauri-apps/cli": "^2", 30 | "typescript": "^5.2.2", 31 | "vite": "^5.3.1" 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src-tauri/.gitignore: -------------------------------------------------------------------------------- 1 | # Generated by Cargo 2 | # will have compiled files and executables 3 | /target/ 4 | 5 | # Generated by Tauri 6 | # will have schema files for capabilities auto-completion 7 | /gen/schemas 8 | -------------------------------------------------------------------------------- /src-tauri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "Electro" 3 | version = "0.6.3" 4 | description = "A lightweight & blazingly-fast image viewer with a built-in terminal" 5 | authors = ["pTinosq"] 6 | edition = "2021" 7 | 8 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 9 | 10 | [lib] 11 | # The `_lib` suffix may seem redundant but it is necessary 12 | # to make the lib name unique and wouldn't conflict with the bin name. 13 | # This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519 14 | name = "electro_lib" 15 | crate-type = ["staticlib", "cdylib", "rlib"] 16 | 17 | [build-dependencies] 18 | tauri-build = { version = "2", features = [] } 19 | 20 | [dependencies] 21 | tauri = { version = "2", features = ["protocol-asset"] } 22 | tauri-plugin-shell = "2" 23 | serde = { version = "1", features = ["derive"] } 24 | serde_json = "1" 25 | chrono = "0.4.38" 26 | tauri-plugin-fs = "2" 27 | 28 | [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] 29 | tauri-plugin-cli = "2" 30 | 31 | # Enables dev tools in release mode 32 | # https://github.com/tauri-apps/tauri/discussions/3059#discussioncomment-1793205 33 | [profile.release.package.wry] 34 | debug = true 35 | debug-assertions = true 36 | -------------------------------------------------------------------------------- /src-tauri/build.rs: -------------------------------------------------------------------------------- 1 | fn main() { 2 | tauri_build::build() 3 | } 4 | -------------------------------------------------------------------------------- /src-tauri/capabilities/default.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "../gen/schemas/desktop-schema.json", 3 | "identifier": "default", 4 | "description": "Capability for the main window", 5 | "windows": [ 6 | "main" 7 | ], 8 | "permissions": [ 9 | "core:default", 10 | "shell:allow-open", 11 | "core:resources:default", 12 | "fs:read-all", 13 | "fs:write-all", 14 | { 15 | "identifier": "fs:scope", 16 | "allow": [ 17 | { 18 | "path": "*/**" 19 | } 20 | ] 21 | } 22 | ] 23 | } -------------------------------------------------------------------------------- /src-tauri/capabilities/desktop.json: -------------------------------------------------------------------------------- 1 | { 2 | "identifier": "desktop-capability", 3 | "platforms": [ 4 | "macOS", 5 | "windows", 6 | "linux" 7 | ], 8 | "windows": [ 9 | "main" 10 | ], 11 | "permissions": [ 12 | "cli:default", 13 | "cli:default" 14 | ] 15 | } -------------------------------------------------------------------------------- /src-tauri/icons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pTinosq/Electro/bd122b17713de7fe2aa95945d14748186fe3ad4d/src-tauri/icons/128x128.png -------------------------------------------------------------------------------- /src-tauri/icons/128x128@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pTinosq/Electro/bd122b17713de7fe2aa95945d14748186fe3ad4d/src-tauri/icons/128x128@2x.png -------------------------------------------------------------------------------- /src-tauri/icons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pTinosq/Electro/bd122b17713de7fe2aa95945d14748186fe3ad4d/src-tauri/icons/32x32.png -------------------------------------------------------------------------------- /src-tauri/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pTinosq/Electro/bd122b17713de7fe2aa95945d14748186fe3ad4d/src-tauri/icons/icon.icns -------------------------------------------------------------------------------- /src-tauri/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pTinosq/Electro/bd122b17713de7fe2aa95945d14748186fe3ad4d/src-tauri/icons/icon.ico -------------------------------------------------------------------------------- /src-tauri/icons/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pTinosq/Electro/bd122b17713de7fe2aa95945d14748186fe3ad4d/src-tauri/icons/icon.png -------------------------------------------------------------------------------- /src-tauri/src/lib.rs: -------------------------------------------------------------------------------- 1 | use std::env; 2 | use std::fs; 3 | use std::path::{Path, PathBuf}; 4 | use tauri::{AppHandle, Emitter}; 5 | use tauri_plugin_cli::CliExt; 6 | /* 7 | This file should definitely be abstracted into separate modules but it works for now so I'm leaving it as is. 8 | */ 9 | 10 | #[tauri::command] 11 | fn get_version() -> String { 12 | env!("CARGO_PKG_VERSION").to_string() 13 | } 14 | 15 | // This function will be called by the `tauri` runtime when the application is ready 16 | // Here we will parse the CLI arguments and emit them to the frontend 17 | #[tauri::command] 18 | fn on_image_source_listener_ready(app: AppHandle) { 19 | match app.cli().matches() { 20 | Ok(matches) => { 21 | app.emit("image-source", &matches.args) 22 | .unwrap_or_else(|err| eprintln!("Emit error: {:?}", err)); 23 | } 24 | 25 | Err(_) => { 26 | eprintln!("Error while parsing CLI arguments"); 27 | } 28 | } 29 | } 30 | 31 | #[tauri::command] 32 | fn exit_app() { 33 | std::process::exit(0x0); 34 | } 35 | 36 | #[tauri::command] 37 | fn get_cwd() -> String { 38 | match std::env::current_dir() { 39 | Ok(path) => { 40 | let path_str = path.to_string_lossy().to_string(); 41 | let clean_path = if path_str.starts_with(r"\\?\") { 42 | path_str[4..].to_string() // Remove `\\?\` prefix 43 | } else { 44 | path_str 45 | }; 46 | clean_path 47 | } 48 | Err(_) => "Failed to get current working directory".to_string(), 49 | } 50 | } 51 | 52 | #[tauri::command] 53 | fn open_file_explorer(path: String) { 54 | if cfg!(target_os = "windows") { 55 | std::process::Command::new("explorer") 56 | .arg(path) 57 | .spawn() 58 | .expect("Failed to open explorer"); 59 | } else { 60 | std::process::Command::new("xdg-open") 61 | .arg(path) 62 | .spawn() 63 | .expect("Failed to open file manager"); 64 | } 65 | } 66 | 67 | #[tauri::command] 68 | fn change_cwd(path: String) -> Result { 69 | let new_path = if Path::new(&path).is_absolute() { 70 | PathBuf::from(path) 71 | } else { 72 | match env::current_dir() { 73 | Ok(cwd) => cwd.join(path), 74 | Err(_) => return Err("Failed to get current working directory".to_string()), 75 | } 76 | }; 77 | 78 | // Normalize the path (convert to absolute and resolve "..", ".") 79 | let canonical_path = match new_path.canonicalize() { 80 | Ok(p) => p, 81 | Err(_) => return Err("Invalid directory".to_string()), 82 | }; 83 | 84 | if canonical_path.is_dir() { 85 | if let Err(err) = env::set_current_dir(&canonical_path) { 86 | return Err(format!("Failed to change directory: {:?}", err)); 87 | } 88 | 89 | // Convert to a normal string without Windows `\\?\` prefix 90 | let path_str = canonical_path.to_string_lossy().to_string(); 91 | let clean_path = if path_str.starts_with(r"\\?\") { 92 | // Strip the "\\?\" prefix 93 | path_str[4..].to_string() 94 | } else { 95 | path_str 96 | }; 97 | 98 | Ok(clean_path) 99 | } else { 100 | Err("Invalid directory".to_string()) 101 | } 102 | } 103 | 104 | #[tauri::command] 105 | fn list_directory(path: String) -> Result, String> { 106 | let dir_path = Path::new(&path); 107 | 108 | // Ensure the path exists and is a directory 109 | if !dir_path.exists() { 110 | return Err("Path does not exist".to_string()); 111 | } 112 | if !dir_path.is_dir() { 113 | return Err("Provided path is not a directory".to_string()); 114 | } 115 | 116 | let entries = fs::read_dir(dir_path).map_err(|_| "Failed to read directory".to_string())?; 117 | 118 | let mut files_and_dirs = Vec::new(); 119 | for entry in entries { 120 | if let Ok(entry) = entry { 121 | let file_name = entry.file_name(); 122 | files_and_dirs.push(file_name.to_string_lossy().to_string()); 123 | } 124 | } 125 | 126 | Ok(files_and_dirs) 127 | } 128 | 129 | // Main entry point 130 | #[cfg_attr(mobile, tauri::mobile_entry_point)] 131 | pub fn run() { 132 | tauri::Builder::default() 133 | .plugin(tauri_plugin_fs::init()) 134 | .plugin(tauri_plugin_shell::init()) 135 | .plugin(tauri_plugin_cli::init()) 136 | .invoke_handler(tauri::generate_handler![ 137 | on_image_source_listener_ready, 138 | exit_app, 139 | get_cwd, 140 | open_file_explorer, 141 | change_cwd, 142 | list_directory, 143 | get_version 144 | ]) 145 | .run(tauri::generate_context!()) 146 | .expect("error while running tauri application"); 147 | } 148 | -------------------------------------------------------------------------------- /src-tauri/src/main.rs: -------------------------------------------------------------------------------- 1 | // Prevents additional console window on Windows in release, DO NOT REMOVE!! 2 | #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] 3 | 4 | fn main() { 5 | electro_lib::run() 6 | } 7 | -------------------------------------------------------------------------------- /src-tauri/tauri.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://schema.tauri.app/config/2", 3 | "productName": "Electro", 4 | "version": "0.6.3", 5 | "identifier": "com.pTinosq.electro", 6 | "build": { 7 | "beforeDevCommand": "npm run dev", 8 | "devUrl": "http://localhost:1420", 9 | "beforeBuildCommand": "npm run build", 10 | "frontendDist": "../dist" 11 | }, 12 | "app": { 13 | "withGlobalTauri": true, 14 | "windows": [ 15 | { 16 | "title": "Electro", 17 | "width": 800, 18 | "height": 600 19 | } 20 | ], 21 | "security": { 22 | "csp": "default-src 'self' ipc: http://ipc.localhost; img-src 'self' asset: http://asset.localhost", 23 | "assetProtocol": { 24 | "enable": true, 25 | "scope": [ 26 | "**/*" 27 | ] 28 | } 29 | } 30 | }, 31 | "bundle": { 32 | "active": true, 33 | "targets": "nsis", 34 | "icon": [ 35 | "icons/32x32.png", 36 | "icons/128x128.png", 37 | "icons/128x128@2x.png", 38 | "icons/icon.icns", 39 | "icons/icon.ico" 40 | ], 41 | "windows": { 42 | "nsis": { 43 | "installerHooks": "./windows/hooks.nsi" 44 | } 45 | }, 46 | "resources": { 47 | "../src/assets/electro-default.jpg": "assets/electro-default.jpg" 48 | } 49 | }, 50 | "plugins": { 51 | "cli": { 52 | "args": [ 53 | { 54 | "name": "source", 55 | "index": 1, 56 | "takesValue": true 57 | } 58 | ] 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src-tauri/windows/hooks.nsi: -------------------------------------------------------------------------------- 1 | Function PostInstallHook 2 | MessageBox MB_YESNO "Set Electro as the default image viewer?" IDYES continue_installation IDNO skip_registration 3 | 4 | continue_installation: 5 | DetailPrint "Registering file associations." 6 | 7 | ; The APP_ASSOCIATE macro is comes bundled with Tauri v2.0's `installer.nsi` script. 8 | ; See: https://github.com/tauri-apps/tauri/tree/dev/crates/tauri-bundler/src/bundle/windows/nsis 9 | 10 | !insertmacro APP_ASSOCIATE "png" "Electro.PNGFile" "PNG File" "$INSTDIR\Electro.exe,0" "Open with Electro" '"$INSTDIR\Electro.exe" "%1"' 11 | !insertmacro APP_ASSOCIATE "apng" "Electro.APNGFile" "APNG File" "$INSTDIR\Electro.exe,0" "Open with Electro" '"$INSTDIR\Electro.exe" "%1"' 12 | !insertmacro APP_ASSOCIATE "avif" "Electro.AVIFFile" "AVIF File" "$INSTDIR\Electro.exe,0" "Open with Electro" '"$INSTDIR\Electro.exe" "%1"' 13 | !insertmacro APP_ASSOCIATE "gif" "Electro.GIFFile" "GIF File" "$INSTDIR\Electro.exe,0" "Open with Electro" '"$INSTDIR\Electro.exe" "%1"' 14 | !insertmacro APP_ASSOCIATE "jpg" "Electro.JPGFile" "JPG File" "$INSTDIR\Electro.exe,0" "Open with Electro" '"$INSTDIR\Electro.exe" "%1"' 15 | !insertmacro APP_ASSOCIATE "jpeg" "Electro.JPEGFile" "JPEG File" "$INSTDIR\Electro.exe,0" "Open with Electro" '"$INSTDIR\Electro.exe" "%1"' 16 | !insertmacro APP_ASSOCIATE "jfif" "Electro.JFIFFile" "JFIF File" "$INSTDIR\Electro.exe,0" "Open with Electro" '"$INSTDIR\Electro.exe" "%1"' 17 | !insertmacro APP_ASSOCIATE "pjpeg" "Electro.PJPEGFile" "PJPEG File" "$INSTDIR\Electro.exe,0" "Open with Electro" '"$INSTDIR\Electro.exe" "%1"' 18 | !insertmacro APP_ASSOCIATE "pjp" "Electro.PJPFile" "PJP File" "$INSTDIR\Electro.exe,0" "Open with Electro" '"$INSTDIR\Electro.exe" "%1"' 19 | !insertmacro APP_ASSOCIATE "svg" "Electro.SVGFile" "SVG File" "$INSTDIR\Electro.exe,0" "Open with Electro" '"$INSTDIR\Electro.exe" "%1"' 20 | !insertmacro APP_ASSOCIATE "webp" "Electro.WEBPFile" "WEBP File" "$INSTDIR\Electro.exe,0" "Open with Electro" '"$INSTDIR\Electro.exe" "%1"' 21 | !insertmacro APP_ASSOCIATE "bmp" "Electro.BMPFile" "BMP File" "$INSTDIR\Electro.exe,0" "Open with Electro" '"$INSTDIR\Electro.exe" "%1"' 22 | !insertmacro APP_ASSOCIATE "ico" "Electro.ICOFile" "ICO File" "$INSTDIR\Electro.exe,0" "Open with Electro" '"$INSTDIR\Electro.exe" "%1"' 23 | !insertmacro APP_ASSOCIATE "cur" "Electro.CURFile" "CUR File" "$INSTDIR\Electro.exe,0" "Open with Electro" '"$INSTDIR\Electro.exe" "%1"' 24 | 25 | Goto end_messagebox 26 | 27 | skip_registration: 28 | DetailPrint "Skipping file association registration." 29 | 30 | end_messagebox: 31 | FunctionEnd 32 | 33 | !macro NSIS_HOOK_POSTINSTALL 34 | Call PostInstallHook 35 | !macroend 36 | -------------------------------------------------------------------------------- /src/App.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect } from "preact/hooks"; 2 | import Canvas from "./components/canvas/Canvas"; 3 | import { listen } from "@tauri-apps/api/event"; 4 | import { useImageStore } from "./stores/useImageStore"; 5 | import { convertFileSrc, invoke } from "@tauri-apps/api/core"; 6 | import "./styles/normalize.css"; 7 | import "./styles/global.css"; 8 | import Terminal from "./components/terminal/Terminal"; 9 | import { useTerminalStore } from "./stores/useTerminalStore"; 10 | import { normalizeFilePath } from "./utils/normalizeFilePaths"; 11 | import { resolveResource } from '@tauri-apps/api/path'; 12 | const DEV_DEFAULT_IMAGE_PATH = "/src/assets/electro-default.jpg"; 13 | const DEFAULT_IMAGE_PATH = "assets/electro-default.jpg"; 14 | const IS_DEV_MODE = import.meta.env.DEV; 15 | 16 | interface DragDropEvent { 17 | payload: { 18 | paths: string[]; 19 | position: { 20 | x: number; 21 | y: number; 22 | }; 23 | }; 24 | } 25 | 26 | interface ImageSourceEvent { 27 | payload: { 28 | source: { 29 | value: string; 30 | }; 31 | }; 32 | } 33 | 34 | export default function App() { 35 | const { loadedImage, setLoadedImage, setDefaultSrc, loadSiblingImagePaths } = 36 | useImageStore(); 37 | const { setCwd } = useTerminalStore(); 38 | useEffect(() => { 39 | // Load the default Electro image on mount 40 | const loadImage = async (path: string) => { 41 | const img = new Image(); 42 | img.src = path; 43 | img.onload = () => { 44 | setLoadedImage(img) 45 | }; 46 | }; 47 | 48 | // Load the default image 49 | if (IS_DEV_MODE) { 50 | loadImage(DEV_DEFAULT_IMAGE_PATH); 51 | } else { 52 | resolveResource(DEFAULT_IMAGE_PATH).then((path) => { 53 | loadImage(convertFileSrc(path)); 54 | }); 55 | } 56 | 57 | // Start up the drag-drop listener 58 | listen("tauri://drag-drop", (event) => { 59 | const dragDropEvent = event as DragDropEvent; 60 | const filePath = normalizeFilePath(dragDropEvent.payload.paths[0]); 61 | 62 | const fileDirectory = filePath.split("/").slice(0, -1).join("/"); 63 | loadSiblingImagePaths(fileDirectory); 64 | setCwd(fileDirectory); 65 | 66 | setDefaultSrc(filePath); 67 | loadImage(convertFileSrc(filePath)); 68 | }); 69 | 70 | // This listener is for when Electro is opened from the command line w/ an image path as the argument 71 | listen("image-source", (event: ImageSourceEvent) => { 72 | const filePath = normalizeFilePath(event.payload.source.value); 73 | if (!filePath) return; 74 | 75 | const fileDirectory = filePath.split("/").slice(0, -1).join("/"); 76 | loadSiblingImagePaths(fileDirectory); 77 | 78 | setDefaultSrc(filePath); 79 | loadImage(convertFileSrc(filePath)); 80 | }).then(() => { 81 | invoke("on_image_source_listener_ready"); 82 | }); 83 | }, [setDefaultSrc, setLoadedImage, setCwd, loadSiblingImagePaths]); 84 | 85 | return ( 86 | <> 87 | 88 | 89 | 90 | ); 91 | } 92 | -------------------------------------------------------------------------------- /src/assets/electro-default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pTinosq/Electro/bd122b17713de7fe2aa95945d14748186fe3ad4d/src/assets/electro-default.jpg -------------------------------------------------------------------------------- /src/commands/CLICommand.ts: -------------------------------------------------------------------------------- 1 | export default class CLICommand { 2 | name: string; 3 | description: string; 4 | commandString: string; 5 | callback: (canExecute: boolean, ...args: string[]) => void; 6 | when: () => boolean; 7 | 8 | constructor( 9 | name: string, 10 | description: string, 11 | commandString: string, 12 | callback: (isAllowed: boolean, ...args: string[]) => void, 13 | when: () => boolean, 14 | ) { 15 | this.name = name; 16 | this.description = description; 17 | this.commandString = commandString; 18 | this.callback = callback; 19 | this.when = when; 20 | } 21 | 22 | execute(...args: string[]) { 23 | const isAllowed = this.when(); 24 | this.callback(isAllowed, ...args); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/commands/CLICommandCategory.ts: -------------------------------------------------------------------------------- 1 | import type CLICommand from "./CLICommand"; 2 | 3 | export default class CLICommandCategory { 4 | private category: string; 5 | private commands: CLICommand[]; 6 | 7 | constructor(category: string, commands: CLICommand[]) { 8 | this.category = category; 9 | this.commands = commands; 10 | } 11 | 12 | public getCommands(): CLICommand[] { 13 | return this.commands; 14 | } 15 | 16 | public getCategory(): string { 17 | return this.category; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/commands/CommandRegistry.ts: -------------------------------------------------------------------------------- 1 | import { electroCommandsCategory } from "../components/terminal/commands/electroCommands"; 2 | import { imageCommandsCategory } from "../components/terminal/commands/imageCommands"; 3 | import { terminalCommandsCategory } from "../components/terminal/commands/terminalCommands"; 4 | import type CLICommand from "./CLICommand"; 5 | import type CLICommandCategory from "./CLICommandCategory"; 6 | 7 | export default class CommandRegistry { 8 | private static instance: CommandRegistry; 9 | private commands: Map; 10 | public static allCommands: CLICommandCategory[] = [ 11 | terminalCommandsCategory, 12 | electroCommandsCategory, 13 | imageCommandsCategory, 14 | ]; 15 | 16 | private constructor() { 17 | this.commands = new Map(); 18 | } 19 | 20 | static getInstance(): CommandRegistry { 21 | if (!CommandRegistry.instance) { 22 | CommandRegistry.instance = new CommandRegistry(); 23 | } 24 | return CommandRegistry.instance; 25 | } 26 | 27 | addCommand(command: CLICommand): void { 28 | if (this.commands.has(command.commandString)) { 29 | console.warn( 30 | `Command "${command.commandString}" already exists and will be overwritten.`, 31 | ); 32 | } 33 | this.commands.set(command.commandString, command); 34 | } 35 | 36 | removeCommand(commandString: string): void { 37 | if (!this.commands.has(commandString)) { 38 | throw new Error(`Command "${commandString}" not found.`); 39 | } 40 | this.commands.delete(commandString); 41 | } 42 | 43 | getCommand(commandString: string): CLICommand | undefined { 44 | return this.commands.get(commandString); 45 | } 46 | 47 | listCommands(): CLICommand[] { 48 | return Array.from(this.commands.values()); 49 | } 50 | 51 | autocompleteCommand(commandString: string): string[] { 52 | return Array.from(this.commands.keys()).filter((key) => 53 | key.startsWith(commandString), 54 | ); 55 | } 56 | 57 | public loadCommands() { 58 | for (const commandCategory of CommandRegistry.allCommands) { 59 | for (const command of commandCategory.getCommands()) { 60 | this.addCommand(command); 61 | } 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/components/canvas/Canvas.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useRef, useState, useCallback } from "preact/hooks"; 2 | import { drawImageToCanvas, fitImageToCanvas } from "./canvasUtils"; 3 | import { DEFAULT_IMAGE_TRANSFORM, type ImageTransform } from "./ImageTransform"; 4 | 5 | interface CanvasProps { 6 | image: HTMLImageElement | null; 7 | } 8 | 9 | export default function Canvas({ image }: CanvasProps) { 10 | const canvasRef = useRef(null); 11 | const ZOOM_SENSITIVITY = 0.001; 12 | 13 | const [_transform, setTransform] = useState( 14 | DEFAULT_IMAGE_TRANSFORM, 15 | ); 16 | const [isDragging, setIsDragging] = useState(false); 17 | const lastMousePos = useRef({ x: 0, y: 0 }); 18 | 19 | // Runs once when image changes (initial setup) 20 | useEffect(() => { 21 | const canvas = canvasRef.current; 22 | if (!image || !canvas) return; 23 | 24 | const context = canvas.getContext("2d"); 25 | if (!context) throw new Error("Failed to get canvas rendering context"); 26 | 27 | // Set canvas size to current window dimensions 28 | canvas.width = window.innerWidth; 29 | canvas.height = window.innerHeight; 30 | 31 | // Fit the image and set initial transform state 32 | const initialTransform = fitImageToCanvas(canvas, image); 33 | 34 | // Dynamically adjust zoom limits based on image size 35 | const minSize = Math.min(image.width, image.height, 10); 36 | const maxSize = Math.max(image.width * 50, image.height * 50); 37 | 38 | setTransform({ 39 | ...initialTransform, 40 | minWidth: minSize, 41 | minHeight: minSize, 42 | maxWidth: maxSize, 43 | maxHeight: maxSize, 44 | }); 45 | 46 | // Draw the image with the initial transform 47 | drawImageToCanvas(canvas, image, initialTransform); 48 | }, [image]); 49 | 50 | // Redraw on window resize while preserving current transform 51 | useEffect(() => { 52 | function handleResize() { 53 | if (!canvasRef.current || !image) return; 54 | const canvas = canvasRef.current; 55 | canvas.width = window.innerWidth; 56 | canvas.height = window.innerHeight; 57 | 58 | // Redraw using the existing transform so the image isn’t stretched 59 | setTransform((prev) => { 60 | const newTransform = { ...prev }; 61 | drawImageToCanvas(canvas, image, newTransform); 62 | return newTransform; 63 | }); 64 | } 65 | 66 | window.addEventListener("resize", handleResize); 67 | return () => { 68 | window.removeEventListener("resize", handleResize); 69 | }; 70 | }, [image]); 71 | 72 | // Handle mouse down 73 | const onMouseDown = useCallback( 74 | (event: MouseEvent) => { 75 | switch (event.button) { 76 | case 0: 77 | setIsDragging(true); 78 | lastMousePos.current = { x: event.clientX, y: event.clientY }; 79 | break; 80 | case 1: { 81 | // Reset transform on middle-click 82 | event.preventDefault(); 83 | const canvas = canvasRef.current; 84 | if (!canvas || !image) return; 85 | 86 | const context = canvas.getContext("2d"); 87 | if (!context) 88 | throw new Error("Failed to get canvas rendering context"); 89 | 90 | // Set canvas size 91 | canvas.width = window.innerWidth; 92 | canvas.height = window.innerHeight; 93 | 94 | // Fit the image again 95 | const initialTransform = fitImageToCanvas(canvas, image); 96 | 97 | // Update transform limits 98 | const minSize = Math.min(image.width, image.height, 10); 99 | const maxSize = Math.max(image.width * 50, image.height * 50); 100 | 101 | setTransform({ 102 | ...initialTransform, 103 | minWidth: minSize, 104 | minHeight: minSize, 105 | maxWidth: maxSize, 106 | maxHeight: maxSize, 107 | }); 108 | 109 | drawImageToCanvas(canvas, image, initialTransform); 110 | 111 | break; 112 | } 113 | } 114 | }, 115 | [image], 116 | ); 117 | 118 | // Handle mouse move (panning) 119 | const onMouseMove = useCallback( 120 | (event: MouseEvent) => { 121 | if (!isDragging || !canvasRef.current || !image) return; 122 | 123 | const dx = event.clientX - lastMousePos.current.x; 124 | const dy = event.clientY - lastMousePos.current.y; 125 | lastMousePos.current = { x: event.clientX, y: event.clientY }; 126 | 127 | setTransform((prev) => { 128 | const newTransform = { ...prev, x: prev.x + dx, y: prev.y + dy }; 129 | if (!canvasRef.current) return newTransform; 130 | drawImageToCanvas(canvasRef.current, image, newTransform); 131 | return newTransform; 132 | }); 133 | }, 134 | [isDragging, image], 135 | ); 136 | 137 | const onMouseUp = useCallback(() => setIsDragging(false), []); 138 | 139 | // Handle zoom on scroll 140 | const onWheel = useCallback( 141 | (event: WheelEvent) => { 142 | if (!canvasRef.current || !image) return; 143 | event.preventDefault(); 144 | 145 | const delta = -event.deltaY * ZOOM_SENSITIVITY; 146 | const zoomFactor = Math.exp(delta); 147 | 148 | const rect = canvasRef.current.getBoundingClientRect(); 149 | const mouseX = event.clientX - rect.left; 150 | const mouseY = event.clientY - rect.top; 151 | 152 | setTransform((prev) => { 153 | const newWidth = prev.width * zoomFactor; 154 | const newHeight = prev.height * zoomFactor; 155 | 156 | if ( 157 | newWidth < (prev.minWidth ?? 0) || 158 | newWidth > (prev.maxWidth ?? Number.POSITIVE_INFINITY) 159 | ) { 160 | // Don’t zoom beyond min/max 161 | return prev; 162 | } 163 | 164 | const newX = mouseX - ((mouseX - prev.x) * newWidth) / prev.width; 165 | const newY = mouseY - ((mouseY - prev.y) * newHeight) / prev.height; 166 | 167 | const newTransform = { 168 | ...prev, 169 | x: newX, 170 | y: newY, 171 | width: newWidth, 172 | height: newHeight, 173 | }; 174 | if (!canvasRef.current) return newTransform; 175 | drawImageToCanvas(canvasRef.current, image, newTransform); 176 | return newTransform; 177 | }); 178 | }, 179 | [image], 180 | ); 181 | 182 | // Attach event listeners for mouse and wheel 183 | useEffect(() => { 184 | window.addEventListener("mousemove", onMouseMove); 185 | window.addEventListener("mouseup", onMouseUp); 186 | window.addEventListener("wheel", onWheel, { passive: false }); 187 | 188 | return () => { 189 | window.removeEventListener("mousemove", onMouseMove); 190 | window.removeEventListener("mouseup", onMouseUp); 191 | window.removeEventListener("wheel", onWheel); 192 | }; 193 | }, [onMouseMove, onMouseUp, onWheel]); 194 | 195 | return ; 196 | } 197 | -------------------------------------------------------------------------------- /src/components/canvas/ImageTransform.ts: -------------------------------------------------------------------------------- 1 | export interface ImageTransform { 2 | x: number; 3 | y: number; 4 | width: number; 5 | height: number; 6 | offsetX: number; 7 | offsetY: number; 8 | minWidth?: number; 9 | minHeight?: number; 10 | maxWidth?: number; 11 | maxHeight?: number; 12 | } 13 | 14 | export const DEFAULT_IMAGE_TRANSFORM: ImageTransform = { 15 | x: 0, 16 | y: 0, 17 | width: 0, 18 | height: 0, 19 | offsetX: 0, 20 | offsetY: 0, 21 | minWidth: 0, 22 | minHeight: 0, 23 | maxWidth: 0, 24 | maxHeight: 0, 25 | }; 26 | -------------------------------------------------------------------------------- /src/components/canvas/canvasUtils.ts: -------------------------------------------------------------------------------- 1 | import type { ImageTransform } from "./ImageTransform"; 2 | 3 | export function drawImageToCanvas( 4 | canvas: HTMLCanvasElement, 5 | image: HTMLImageElement, 6 | transform: ImageTransform, 7 | ) { 8 | const context = canvas.getContext("2d"); 9 | if (!context) throw new Error("Failed to get canvas rendering context"); 10 | 11 | context.imageSmoothingEnabled = false; 12 | context.clearRect(0, 0, canvas.width, canvas.height); 13 | 14 | context.resetTransform(); 15 | context.translate(transform.offsetX, transform.offsetY); 16 | 17 | // Draw the image using the transformed position and size 18 | context.drawImage( 19 | image, 20 | transform.x, 21 | transform.y, 22 | transform.width, 23 | transform.height, 24 | ); 25 | } 26 | 27 | export function fitImageToCanvas( 28 | canvas: HTMLCanvasElement, 29 | image: HTMLImageElement, 30 | ): ImageTransform { 31 | // Calculate scaling factors 32 | const widthScale = canvas.width / image.width; 33 | const heightScale = canvas.height / image.height; 34 | 35 | // Choose the smaller scale to maintain aspect ratio 36 | const scale = Math.min(widthScale, heightScale, 1); 37 | 38 | const width = image.width * scale; 39 | const height = image.height * scale; 40 | 41 | // Center the image on the canvas 42 | const x = (canvas.width - width) / 2; 43 | const y = (canvas.height - height) / 2; 44 | 45 | return { 46 | x, 47 | y, 48 | width, 49 | height, 50 | offsetX: 0, 51 | offsetY: 0, 52 | }; 53 | } 54 | -------------------------------------------------------------------------------- /src/components/terminal/Terminal.tsx: -------------------------------------------------------------------------------- 1 | import { useCallback, useEffect, useRef, useState } from "preact/hooks"; 2 | import "./styles.css"; 3 | import { useTerminalStore } from "../../stores/useTerminalStore"; 4 | import CommandRegistry from "../../commands/CommandRegistry"; 5 | import { parseCommandInput } from "../../utils/parseCommandInput"; 6 | 7 | export default function Terminal() { 8 | const { 9 | addHistory, 10 | history, 11 | isTerminalOpen, 12 | cwd, 13 | setIsTerminalInputFocused, 14 | } = useTerminalStore(); 15 | const [_historyIndex, setHistoryIndex] = useState(-1); 16 | const inputRef = useRef(null); 17 | const terminalHistoryRef = useRef(null); 18 | 19 | useEffect(() => { 20 | if (isTerminalOpen) { 21 | inputRef.current?.focus(); 22 | } 23 | }, [isTerminalOpen]); 24 | 25 | // biome-ignore lint/correctness/useExhaustiveDependencies: we want this to run when history updates (biome is not smart enough to know this) 26 | useEffect(() => { 27 | // Ensure scroll only happens when history updates 28 | if (terminalHistoryRef.current) { 29 | terminalHistoryRef.current.scrollTo({ 30 | top: terminalHistoryRef.current.scrollHeight, 31 | }); 32 | } 33 | }, [history]); 34 | 35 | const handleHistoryNavigation = useCallback( 36 | (direction: "up" | "down") => { 37 | const inputHistory = history.filter((entry) => entry.type === "input"); 38 | 39 | if (inputHistory.length === 0) return; 40 | 41 | setHistoryIndex((prev) => { 42 | const newIndex = 43 | direction === "up" 44 | ? Math.min(prev + 1, inputHistory.length - 1) 45 | : Math.max(prev - 1, -1); 46 | 47 | const historyEntry = inputHistory[inputHistory.length - (newIndex + 1)]; 48 | 49 | if (historyEntry && inputRef.current) { 50 | inputRef.current.value = historyEntry.value.split("> ")[1]; 51 | } else if (newIndex === -1 && inputRef.current) { 52 | inputRef.current.value = ""; 53 | } 54 | 55 | return newIndex; 56 | }); 57 | }, 58 | [history], 59 | ); 60 | 61 | const handleKeyDown = (e: KeyboardEvent) => { 62 | switch (e.key) { 63 | case "Enter": { 64 | const inputValue = inputRef.current?.value.trim(); 65 | const inputTokens = inputValue ? parseCommandInput(inputValue) : []; 66 | 67 | const formattedInputValue = `${cwd}> ${inputValue}`; 68 | addHistory({ type: "input", value: formattedInputValue }); 69 | 70 | if (inputRef.current) { 71 | inputRef.current.value = ""; 72 | } 73 | 74 | const commandToken = inputTokens[0]; 75 | if (commandToken) { 76 | const command = 77 | CommandRegistry.getInstance().getCommand(commandToken); 78 | if (command) { 79 | command.execute(...inputTokens.slice(1)); 80 | } else { 81 | addHistory({ 82 | type: "output", 83 | value: `Command not found: ${commandToken}`, 84 | }); 85 | } 86 | } 87 | break; 88 | } 89 | case "ArrowUp": { 90 | e.preventDefault(); 91 | handleHistoryNavigation("up"); 92 | break; 93 | } 94 | case "ArrowDown": { 95 | e.preventDefault(); 96 | handleHistoryNavigation("down"); 97 | break; 98 | } 99 | case "Tab": { 100 | e.preventDefault(); 101 | // For now we'll only provide autocomplete for the first token 102 | const inputValue = inputRef.current?.value.trim(); 103 | const inputToken = inputValue?.split(" ")[0]; 104 | if (inputToken) { 105 | const commands = 106 | CommandRegistry.getInstance().autocompleteCommand(inputToken); 107 | if (commands.length === 1 && inputRef.current) { 108 | inputRef.current.value = commands[0]; 109 | } else if (commands.length > 1) { 110 | addHistory({ type: "output", value: `${commands.join(", ")}` }); 111 | } 112 | } 113 | } 114 | } 115 | }; 116 | 117 | const handleTerminalClick = (_: MouseEvent) => { 118 | // Prevent focus if text is being selected 119 | if (window.getSelection()?.toString().length) { 120 | return; 121 | } 122 | inputRef.current?.focus(); 123 | }; 124 | 125 | return isTerminalOpen ? ( 126 |
127 |
128 | {history.map((line) => ( 129 |
130 | 131 | {line.value} 132 | 133 |
134 | ))} 135 |
136 |
137 | {cwd}>  138 | setIsTerminalInputFocused(false)} 148 | onFocus={() => setIsTerminalInputFocused(true)} 149 | /> 150 |
151 |
152 | ) : null; 153 | } 154 | -------------------------------------------------------------------------------- /src/components/terminal/commands/electroCommands.tsx: -------------------------------------------------------------------------------- 1 | import { invoke } from "@tauri-apps/api/core"; 2 | import CLICommand from "../../../commands/CLICommand"; 3 | import CommandRegistry from "../../../commands/CommandRegistry"; 4 | import { useTerminalStore } from "../../../stores/useTerminalStore"; 5 | import CLICommandCategory from "../../../commands/CLICommandCategory"; 6 | 7 | // These commands control the Electro app 8 | export const electroCommands = [ 9 | new CLICommand( 10 | "Quit", 11 | "Quits Electro", 12 | "quit", 13 | async () => { 14 | await invoke("exit_app"); 15 | }, 16 | () => true, 17 | ), 18 | new CLICommand( 19 | "Help", 20 | "Displays help information", 21 | "help", 22 | async (_, token) => { 23 | if (token) { 24 | // Return help for a specific command 25 | const command = CommandRegistry.getInstance().getCommand(token); 26 | 27 | if (command) { 28 | useTerminalStore.getState().addHistory({ 29 | type: "output", 30 | value: `${command.name} (${command.commandString})`, 31 | }); 32 | 33 | useTerminalStore.getState().addHistory({ 34 | type: "output", 35 | value: `${command.description}`, 36 | }); 37 | } else { 38 | useTerminalStore.getState().addHistory({ 39 | type: "output", 40 | value: `Command '${token}' not found`, 41 | variant: "error", 42 | }); 43 | } 44 | } else { 45 | // Return a list of all commands 46 | const allCommands = CommandRegistry.allCommands; 47 | 48 | for (const category of allCommands) { 49 | useTerminalStore.getState().addHistory({ 50 | type: "output", 51 | value: `${category.getCategory()} commands`, 52 | variant: "success", 53 | }); 54 | 55 | for (const command of category.getCommands()) { 56 | useTerminalStore.getState().addHistory({ 57 | type: "output", 58 | value: `${command.commandString} - ${command.description}`, 59 | }); 60 | } 61 | } 62 | } 63 | }, 64 | () => true, 65 | ), 66 | new CLICommand( 67 | "Version", 68 | "Displays the version of Electro", 69 | "version", 70 | async () => { 71 | const version = await invoke("get_version"); 72 | useTerminalStore.getState().addHistory({ 73 | type: "output", 74 | value: `Electro version: ${version}`, 75 | }); 76 | }, 77 | () => true, 78 | ), 79 | ]; 80 | 81 | export const electroCommandsCategory = new CLICommandCategory( 82 | "Electro", 83 | electroCommands, 84 | ); 85 | -------------------------------------------------------------------------------- /src/components/terminal/commands/imageCommands.tsx: -------------------------------------------------------------------------------- 1 | import CLICommand from "../../../commands/CLICommand"; 2 | import { useTerminalStore } from "../../../stores/useTerminalStore"; 3 | import { convertFileSrc } from "@tauri-apps/api/core"; 4 | import { useImageStore } from "../../../stores/useImageStore"; 5 | import CLICommandCategory from "../../../commands/CLICommandCategory"; 6 | import { normalizeFilePath } from "../../../utils/normalizeFilePaths"; 7 | 8 | export const imageCommands = [ 9 | new CLICommand( 10 | "Load Image", 11 | "Loads an image from the specified file path. Usage: load ", 12 | "load", 13 | async (_isAllowed, filePath) => { 14 | if (!filePath || filePath.trim() === "") { 15 | useTerminalStore.getState().addHistory({ 16 | type: "output", 17 | value: "Usage: load ", 18 | variant: "warn", 19 | }); 20 | return; 21 | } 22 | 23 | try { 24 | // Determine if the path is a URL or local file 25 | const isRemote = 26 | filePath.startsWith("http://") || filePath.startsWith("https://"); 27 | 28 | // Normalize the file path 29 | let normalizedFilePath: string; 30 | if (isRemote) { 31 | normalizedFilePath = filePath; 32 | } else { 33 | normalizedFilePath = normalizeFilePath(filePath); 34 | } 35 | 36 | const image = new Image(); 37 | 38 | if (isRemote) { 39 | image.src = normalizedFilePath; 40 | } else { 41 | image.src = convertFileSrc(normalizedFilePath); 42 | } 43 | 44 | image.onload = async () => { 45 | useImageStore.getState().setDefaultSrc(normalizedFilePath); 46 | 47 | useTerminalStore.getState().addHistory({ 48 | type: "output", 49 | value: `Image loaded from '${normalizedFilePath}'`, 50 | variant: "success", 51 | }); 52 | useImageStore.getState().setLoadedImage(image); 53 | if (!isRemote) { 54 | // Set the current working directory to the directory of the loaded file 55 | const cwd = normalizedFilePath.split("/").slice(0, -1).join("/"); 56 | 57 | useImageStore.getState().loadSiblingImagePaths(cwd); 58 | 59 | useTerminalStore 60 | .getState() 61 | .setCwd(normalizedFilePath.split("/").slice(0, -1).join("/")); 62 | } 63 | }; 64 | 65 | image.onerror = () => { 66 | useTerminalStore.getState().addHistory({ 67 | type: "output", 68 | value: `Error loading image from '${normalizedFilePath}'`, 69 | variant: "error", 70 | }); 71 | }; 72 | } catch (error) { 73 | if (error instanceof Error) { 74 | useTerminalStore.getState().addHistory({ 75 | type: "output", 76 | value: `Error loading image: ${error.message}`, 77 | variant: "error", 78 | }); 79 | console.error("Error loading image:", error); 80 | } else { 81 | useTerminalStore.getState().addHistory({ 82 | type: "output", 83 | value: "Error loading image: Unknown error", 84 | variant: "error", 85 | }); 86 | console.error("Error loading image: Unknown error", error); 87 | } 88 | } 89 | }, 90 | () => true, 91 | ), 92 | ]; 93 | 94 | export const imageCommandsCategory = new CLICommandCategory( 95 | "Image", 96 | imageCommands, 97 | ); 98 | -------------------------------------------------------------------------------- /src/components/terminal/commands/terminalCommands.tsx: -------------------------------------------------------------------------------- 1 | import CLICommand from "../../../commands/CLICommand"; 2 | import { invoke } from "@tauri-apps/api/core"; 3 | import { useTerminalStore } from "../../../stores/useTerminalStore"; 4 | import CLICommandCategory from "../../../commands/CLICommandCategory"; 5 | import { normalizeFilePath } from "../../../utils/normalizeFilePaths"; 6 | 7 | export const terminalCommands = [ 8 | new CLICommand( 9 | "Close terminal", 10 | "Closes the terminal", 11 | "close", 12 | () => { 13 | useTerminalStore.getState().setIsTerminalOpen(false); 14 | }, 15 | () => { 16 | return useTerminalStore.getState().isTerminalOpen; 17 | }, 18 | ), 19 | new CLICommand( 20 | "Clear terminal", 21 | "Clears all terminal history", 22 | "clear", 23 | () => { 24 | useTerminalStore.getState().clearHistory(); 25 | }, 26 | () => true, 27 | ), 28 | new CLICommand( 29 | "Get current working directory", 30 | "Get the current working directory", 31 | "cwd", 32 | async () => { 33 | const state = useTerminalStore.getState(); 34 | state.addHistory({ 35 | type: "output", 36 | value: `Current working directory: ${state.cwd}`, 37 | }); 38 | }, 39 | () => true, 40 | ), 41 | new CLICommand( 42 | "Launch file explorer", 43 | "Launches the file explorer in the specified directory. Usage: explorer ", 44 | "explorer", 45 | (_, path) => { 46 | invoke("open_file_explorer", { path }); 47 | }, 48 | () => true, 49 | ), 50 | new CLICommand( 51 | "Change directory", 52 | "Changes the current working directory. Usage: cd ", 53 | "cd", 54 | async (_, path) => { 55 | const store = useTerminalStore.getState(); 56 | if (!path) { 57 | store.addHistory({ 58 | type: "output", 59 | value: "Error: No path provided", 60 | }); 61 | return; 62 | } 63 | 64 | try { 65 | const newPath = (await invoke("change_cwd", { path })) as string; 66 | const normalizedNewPath = normalizeFilePath(newPath); 67 | store.setCwd(normalizedNewPath); 68 | } catch (error) { 69 | store.addHistory({ 70 | type: "output", 71 | value: `Error: ${error}`, 72 | variant: "error", 73 | }); 74 | } 75 | }, 76 | () => true, 77 | ), 78 | new CLICommand( 79 | "List directory contents", 80 | "List the contents of the specified directory. Usage: ls ", 81 | "ls", 82 | async (_, path = ".") => { 83 | const dirs = (await invoke("list_directory", { path })) as string[]; 84 | useTerminalStore.getState().addHistory({ 85 | type: "output", 86 | value: dirs.join(", "), 87 | }); 88 | }, 89 | () => true, 90 | ), 91 | ]; 92 | 93 | export const terminalCommandsCategory = new CLICommandCategory( 94 | "Terminal", 95 | terminalCommands, 96 | ); 97 | -------------------------------------------------------------------------------- /src/components/terminal/styles.css: -------------------------------------------------------------------------------- 1 | #terminal { 2 | display: flex; 3 | flex-direction: column; 4 | position: fixed; 5 | height: 200px; 6 | min-height: 75px; 7 | width: 100%; 8 | overflow: auto; 9 | background: black; 10 | color: white; 11 | font-family: monospace; 12 | padding: 10px; 13 | padding-bottom: 0; 14 | box-sizing: border-box; 15 | } 16 | 17 | .terminal-line { 18 | display: flex; 19 | width: 100%; 20 | border-top: 1px dotted white; 21 | } 22 | 23 | #terminal-input { 24 | flex: 1; 25 | border: none; 26 | background: black; 27 | color: white; 28 | outline: none; 29 | margin-top: auto; 30 | font-size: 12px; 31 | } 32 | 33 | #terminal-path { 34 | font-size: 12px; 35 | } 36 | 37 | #terminal-history { 38 | display: flex; 39 | flex-direction: column; 40 | width: 100%; 41 | height: 100%; 42 | overflow: auto; 43 | font-size: 12px; 44 | color: #51ff51; 45 | } 46 | 47 | .terminal-history-default { 48 | color: #e0e0e0; 49 | } 50 | 51 | .terminal-history-success { 52 | color: #51ff51; 53 | } 54 | 55 | .terminal-history-warn { 56 | color: #ffcc51; 57 | } 58 | 59 | .terminal-history-error { 60 | color: #ff5151; 61 | } 62 | 63 | /* If the screen gets too small place the terminal input area 64 | beneath the path */ 65 | @media (max-width: 500px) { 66 | .terminal-line { 67 | flex-direction: column; 68 | align-items: flex-start; 69 | } 70 | 71 | #terminal-input { 72 | width: 100%; 73 | margin-top: 5px; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/keybinds/Keybind.ts: -------------------------------------------------------------------------------- 1 | export default class Keybind { 2 | id: string; 3 | name: string; 4 | shortcut: Uppercase; 5 | callback: ( 6 | canExecute: boolean, 7 | event: KeyboardEvent, 8 | ...args: string[] 9 | ) => void; 10 | when: () => boolean; 11 | 12 | constructor( 13 | id: string, 14 | name: string, 15 | shortcut: Uppercase, 16 | callback: ( 17 | isAllowed: boolean, 18 | event: KeyboardEvent, 19 | ...args: string[] 20 | ) => void, 21 | when: () => boolean, 22 | ) { 23 | this.id = id; 24 | this.name = name; 25 | this.shortcut = shortcut; 26 | this.callback = callback; 27 | this.when = when; 28 | } 29 | 30 | execute(event: KeyboardEvent, ...args: string[]) { 31 | const isAllowed = this.when(); 32 | this.callback(isAllowed, event, ...args); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/keybinds/KeybindRegistry.ts: -------------------------------------------------------------------------------- 1 | import type Keybind from "./Keybind"; 2 | import { imageKeybinds } from "./keybinds/imageKeybinds"; 3 | import { terminalKeybinds } from "./keybinds/terminalKeybinds"; 4 | 5 | export default class KeybindRegistry { 6 | private static instance: KeybindRegistry; 7 | private keybinds: Map; 8 | public static allKeybinds: Keybind[] = [ 9 | ...terminalKeybinds, 10 | ...imageKeybinds, 11 | ]; 12 | 13 | private constructor() { 14 | this.keybinds = new Map(); 15 | } 16 | 17 | static getInstance(): KeybindRegistry { 18 | if (!KeybindRegistry.instance) { 19 | KeybindRegistry.instance = new KeybindRegistry(); 20 | } 21 | return KeybindRegistry.instance; 22 | } 23 | 24 | addKeybind(keybind: Keybind): void { 25 | if (this.keybinds.has(keybind.shortcut)) { 26 | throw new Error(`Keybind "${keybind.shortcut}" already exists.`); 27 | } 28 | this.keybinds.set(keybind.shortcut, keybind); 29 | } 30 | 31 | removeKeybind(shortcut: string): void { 32 | if (!this.keybinds.has(shortcut)) { 33 | throw new Error(`Keybind "${shortcut}" not found.`); 34 | } 35 | this.keybinds.delete(shortcut); 36 | } 37 | 38 | getKeybind(shortcut: string): Keybind | undefined { 39 | return this.keybinds.get(shortcut); 40 | } 41 | 42 | listKeybinds(): Keybind[] { 43 | return Array.from(this.keybinds.values()); 44 | } 45 | 46 | private handleKeyPress(event: KeyboardEvent) { 47 | const shortcut = this.normalizeShortcut(event); 48 | const keybind = this.keybinds.get(shortcut); 49 | if (keybind) { 50 | keybind.execute(event); 51 | } 52 | } 53 | 54 | public registerListener(): void { 55 | window.addEventListener("keydown", (event) => this.handleKeyPress(event)); 56 | } 57 | 58 | public loadKeybinds(): void { 59 | for (const keybind of KeybindRegistry.allKeybinds) { 60 | this.addKeybind(keybind); 61 | } 62 | } 63 | 64 | private normalizeShortcut(event: KeyboardEvent): string { 65 | const keys = []; 66 | if (event.ctrlKey) keys.push("CTRL"); 67 | if (event.shiftKey) keys.push("SHIFT"); 68 | if (event.altKey) keys.push("ALT"); 69 | if (event.metaKey) keys.push("META"); 70 | // all keys are in uppercase 71 | const key = event.key.toUpperCase(); 72 | keys.push(key); 73 | return keys.join("+"); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/keybinds/keybinds/imageKeybinds.ts: -------------------------------------------------------------------------------- 1 | import { convertFileSrc } from "@tauri-apps/api/core"; 2 | import { useImageStore } from "../../stores/useImageStore"; 3 | import Keybind from "../Keybind"; 4 | import { useTerminalStore } from "../../stores/useTerminalStore"; 5 | 6 | export const imageKeybinds = [ 7 | new Keybind( 8 | "image.previous", 9 | "Previous image", 10 | "ARROWLEFT", 11 | (isAllowed) => { 12 | if (!isAllowed) return; 13 | const previousImage = useImageStore 14 | .getState() 15 | .siblingImagePaths.previous(); 16 | 17 | if (previousImage) { 18 | const image = new Image(); 19 | image.src = convertFileSrc(previousImage); 20 | image.onload = () => { 21 | useImageStore.getState().setDefaultSrc(previousImage); 22 | useImageStore.getState().setLoadedImage(image); 23 | }; 24 | } 25 | }, 26 | () => !useTerminalStore.getState().isTerminalInputFocused, 27 | ), 28 | new Keybind( 29 | "image.next", 30 | "Next image", 31 | "ARROWRIGHT", 32 | (isAllowed) => { 33 | if (!isAllowed) return; 34 | const nextImage = useImageStore.getState().siblingImagePaths.next(); 35 | 36 | if (nextImage) { 37 | const image = new Image(); 38 | image.src = convertFileSrc(nextImage); 39 | image.onload = () => { 40 | useImageStore.getState().setDefaultSrc(nextImage); 41 | useImageStore.getState().setLoadedImage(image); 42 | }; 43 | } 44 | }, 45 | () => !useTerminalStore.getState().isTerminalInputFocused, 46 | ), 47 | ]; 48 | -------------------------------------------------------------------------------- /src/keybinds/keybinds/terminalKeybinds.ts: -------------------------------------------------------------------------------- 1 | import { useTerminalStore } from "../../stores/useTerminalStore"; 2 | import Keybind from "../Keybind"; 3 | 4 | export const terminalKeybinds = [ 5 | new Keybind( 6 | "terminal.open", 7 | "Open terminal", 8 | "T", 9 | () => { 10 | useTerminalStore.setState({ isTerminalOpen: true }); 11 | }, 12 | () => { 13 | return !useTerminalStore.getState().isTerminalOpen; 14 | }, 15 | ), 16 | new Keybind( 17 | "terminal.close", 18 | "Close terminal", 19 | "ESCAPE", 20 | () => { 21 | useTerminalStore.setState({ isTerminalOpen: false }); 22 | }, 23 | () => { 24 | return useTerminalStore.getState().isTerminalOpen; 25 | }, 26 | ), 27 | ]; 28 | -------------------------------------------------------------------------------- /src/main.tsx: -------------------------------------------------------------------------------- 1 | import { render } from "preact"; 2 | import App from "./App"; 3 | import CommandRegistry from "./commands/CommandRegistry"; 4 | import { useTerminalStore } from "./stores/useTerminalStore"; 5 | import { homeDir } from "@tauri-apps/api/path"; 6 | import KeybindRegistry from "./keybinds/KeybindRegistry"; 7 | import { normalizeFilePath } from "./utils/normalizeFilePaths"; 8 | 9 | export const SUPPORTED_FILE_EXTENSIONS = [ 10 | "png", 11 | "apng", 12 | "avif", 13 | "gif", 14 | "jpg", 15 | "jpeg", 16 | "jfif", 17 | "pjpeg", 18 | "pjp", 19 | "svg", 20 | "webp", 21 | "bmp", 22 | "ico", 23 | "cur", 24 | ]; 25 | 26 | // Load all CLI commands before rendering 27 | const commandRegistry = CommandRegistry.getInstance(); 28 | commandRegistry.loadCommands(); 29 | 30 | // Load all keybinds before rendering 31 | const keybindRegistry = KeybindRegistry.getInstance(); 32 | keybindRegistry.loadKeybinds(); 33 | keybindRegistry.registerListener(); 34 | 35 | // Set CWD 36 | homeDir().then((homeDir) => { 37 | const normalziedHomeDir = normalizeFilePath(homeDir); 38 | useTerminalStore.getState().setCwd(normalziedHomeDir); 39 | }); 40 | 41 | render(, document.getElementById("app") as HTMLElement); 42 | -------------------------------------------------------------------------------- /src/stores/useImageStore.ts: -------------------------------------------------------------------------------- 1 | import { create } from "zustand"; 2 | import { readDir } from "@tauri-apps/plugin-fs"; 3 | import { CircularFileList } from "../utils/CircularFileList"; 4 | import { SUPPORTED_FILE_EXTENSIONS } from "../main"; 5 | 6 | interface ImageState { 7 | loadedImage: HTMLImageElement | null; 8 | defaultSrc: string | null; 9 | siblingImagePaths: CircularFileList; 10 | 11 | setLoadedImage: (image: HTMLImageElement) => void; 12 | setDefaultSrc: (src: string) => void; 13 | loadSiblingImagePaths: (path: string) => void; 14 | } 15 | 16 | export const useImageStore = create((set) => ({ 17 | loadedImage: null, 18 | defaultSrc: null, 19 | siblingImagePaths: new CircularFileList(), 20 | 21 | setLoadedImage: (image: HTMLImageElement) => set({ loadedImage: image }), 22 | setDefaultSrc: (src: string) => set({ defaultSrc: src }), 23 | loadSiblingImagePaths: (imageDirectory: string) => { 24 | const directoryContents = readDir(imageDirectory); 25 | // Construct circular doubly linked list (CDLL) of image paths 26 | const CDLL = new CircularFileList(); 27 | directoryContents.then((paths) => { 28 | paths 29 | // Only show files 30 | .filter((path) => path.isFile) 31 | // Only show files with supported file extensions 32 | .filter((path) => 33 | SUPPORTED_FILE_EXTENSIONS.includes(path.name.split(".").pop() || ""), 34 | ) 35 | // Push the file paths to the CDLL 36 | .map((path) => CDLL.push(`${imageDirectory}/${path.name}`)); 37 | 38 | set({ siblingImagePaths: CDLL }); 39 | }); 40 | }, 41 | })); 42 | -------------------------------------------------------------------------------- /src/stores/useTerminalStore.ts: -------------------------------------------------------------------------------- 1 | import { invoke } from "@tauri-apps/api/core"; 2 | import { create } from "zustand"; 3 | 4 | export interface TerminalHistoryEntry { 5 | type: "input" | "output"; 6 | value: string; 7 | variant?: "default" | "error" | "warn" | "success"; 8 | } 9 | 10 | interface TerminalState { 11 | // Variables 12 | history: TerminalHistoryEntry[]; 13 | isTerminalOpen: boolean; 14 | isTerminalInputFocused: boolean; 15 | cwd: string; 16 | 17 | // Methods 18 | addHistory: (entry: TerminalHistoryEntry) => void; 19 | setIsTerminalOpen: (isOpen: boolean) => void; 20 | setIsTerminalInputFocused: (isFocused: boolean) => void; 21 | clearHistory: () => void; 22 | setCwd: (cwd: string) => void; 23 | } 24 | 25 | export const useTerminalStore = create((set) => ({ 26 | history: [], 27 | isTerminalOpen: false, 28 | isTerminalInputFocused: false, 29 | cwd: "/", 30 | 31 | addHistory: (entry) => 32 | set((state) => ({ history: [...state.history, entry] })), 33 | setIsTerminalOpen: (isOpen) => set({ isTerminalOpen: isOpen }), 34 | setIsTerminalInputFocused: (isFocused: boolean) => 35 | set({ isTerminalInputFocused: isFocused }), 36 | clearHistory: () => set(() => ({ history: [] })), 37 | setCwd: async (cwd) => { 38 | await invoke("change_cwd", { path: cwd }); 39 | set({ cwd }); 40 | }, 41 | })); 42 | -------------------------------------------------------------------------------- /src/styles/global.css: -------------------------------------------------------------------------------- 1 | html, 2 | body { 3 | margin: 0; 4 | padding: 0; 5 | font-family: monospace; 6 | font-size: 16px; 7 | width: 100%; 8 | height: 100%; 9 | } 10 | 11 | #app { 12 | width: 100%; 13 | height: 100%; 14 | } 15 | 16 | canvas { 17 | display: block; 18 | margin: 0 auto; 19 | width: 100%; 20 | height: 100%; 21 | background-color: gray; 22 | } 23 | -------------------------------------------------------------------------------- /src/styles/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ 2 | 3 | /* Document 4 | ========================================================================== */ 5 | 6 | /** 7 | * 1. Correct the line height in all browsers. 8 | * 2. Prevent adjustments of font size after orientation changes in iOS. 9 | */ 10 | 11 | html { 12 | line-height: 1.15; /* 1 */ 13 | -webkit-text-size-adjust: 100%; /* 2 */ 14 | } 15 | 16 | /* Sections 17 | ========================================================================== */ 18 | 19 | /** 20 | * Remove the margin in all browsers. 21 | */ 22 | 23 | body { 24 | margin: 0; 25 | } 26 | 27 | /** 28 | * Render the `main` element consistently in IE. 29 | */ 30 | 31 | main { 32 | display: block; 33 | } 34 | 35 | /** 36 | * Correct the font size and margin on `h1` elements within `section` and 37 | * `article` contexts in Chrome, Firefox, and Safari. 38 | */ 39 | 40 | h1 { 41 | font-size: 2em; 42 | margin: 0.67em 0; 43 | } 44 | 45 | /* Grouping content 46 | ========================================================================== */ 47 | 48 | /** 49 | * 1. Add the correct box sizing in Firefox. 50 | * 2. Show the overflow in Edge and IE. 51 | */ 52 | 53 | hr { 54 | box-sizing: content-box; /* 1 */ 55 | height: 0; /* 1 */ 56 | overflow: visible; /* 2 */ 57 | } 58 | 59 | /** 60 | * 1. Correct the inheritance and scaling of font size in all browsers. 61 | * 2. Correct the odd `em` font sizing in all browsers. 62 | */ 63 | 64 | pre { 65 | font-family: monospace; /* 1 */ 66 | font-size: 1em; /* 2 */ 67 | } 68 | 69 | /* Text-level semantics 70 | ========================================================================== */ 71 | 72 | /** 73 | * Remove the gray background on active links in IE 10. 74 | */ 75 | 76 | a { 77 | background-color: transparent; 78 | } 79 | 80 | /** 81 | * 1. Remove the bottom border in Chrome 57- 82 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 83 | */ 84 | 85 | abbr[title] { 86 | border-bottom: none; /* 1 */ 87 | text-decoration: underline; /* 2 */ 88 | text-decoration: underline dotted; /* 2 */ 89 | } 90 | 91 | /** 92 | * Add the correct font weight in Chrome, Edge, and Safari. 93 | */ 94 | 95 | b, 96 | strong { 97 | font-weight: bolder; 98 | } 99 | 100 | /** 101 | * 1. Correct the inheritance and scaling of font size in all browsers. 102 | * 2. Correct the odd `em` font sizing in all browsers. 103 | */ 104 | 105 | code, 106 | kbd, 107 | samp { 108 | font-family: monospace; /* 1 */ 109 | font-size: 1em; /* 2 */ 110 | } 111 | 112 | /** 113 | * Add the correct font size in all browsers. 114 | */ 115 | 116 | small { 117 | font-size: 80%; 118 | } 119 | 120 | /** 121 | * Prevent `sub` and `sup` elements from affecting the line height in 122 | * all browsers. 123 | */ 124 | 125 | sub, 126 | sup { 127 | font-size: 75%; 128 | line-height: 0; 129 | position: relative; 130 | vertical-align: baseline; 131 | } 132 | 133 | sub { 134 | bottom: -0.25em; 135 | } 136 | 137 | sup { 138 | top: -0.5em; 139 | } 140 | 141 | /* Embedded content 142 | ========================================================================== */ 143 | 144 | /** 145 | * Remove the border on images inside links in IE 10. 146 | */ 147 | 148 | img { 149 | border-style: none; 150 | } 151 | 152 | /* Forms 153 | ========================================================================== */ 154 | 155 | /** 156 | * 1. Change the font styles in all browsers. 157 | * 2. Remove the margin in Firefox and Safari. 158 | */ 159 | 160 | button, 161 | input, 162 | optgroup, 163 | select, 164 | textarea { 165 | font-family: inherit; /* 1 */ 166 | font-size: 100%; /* 1 */ 167 | line-height: 1.15; /* 1 */ 168 | margin: 0; /* 2 */ 169 | } 170 | 171 | /** 172 | * Show the overflow in IE. 173 | * 1. Show the overflow in Edge. 174 | */ 175 | 176 | button, 177 | input { 178 | /* 1 */ 179 | overflow: visible; 180 | } 181 | 182 | /** 183 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 184 | * 1. Remove the inheritance of text transform in Firefox. 185 | */ 186 | 187 | button, 188 | select { 189 | /* 1 */ 190 | text-transform: none; 191 | } 192 | 193 | /** 194 | * Correct the inability to style clickable types in iOS and Safari. 195 | */ 196 | 197 | button, 198 | [type="button"], 199 | [type="reset"], 200 | [type="submit"] { 201 | -webkit-appearance: button; 202 | } 203 | 204 | /** 205 | * Remove the inner border and padding in Firefox. 206 | */ 207 | 208 | button::-moz-focus-inner, 209 | [type="button"]::-moz-focus-inner, 210 | [type="reset"]::-moz-focus-inner, 211 | [type="submit"]::-moz-focus-inner { 212 | border-style: none; 213 | padding: 0; 214 | } 215 | 216 | /** 217 | * Restore the focus styles unset by the previous rule. 218 | */ 219 | 220 | button:-moz-focusring, 221 | [type="button"]:-moz-focusring, 222 | [type="reset"]:-moz-focusring, 223 | [type="submit"]:-moz-focusring { 224 | outline: 1px dotted ButtonText; 225 | } 226 | 227 | /** 228 | * Correct the padding in Firefox. 229 | */ 230 | 231 | fieldset { 232 | padding: 0.35em 0.75em 0.625em; 233 | } 234 | 235 | /** 236 | * 1. Correct the text wrapping in Edge and IE. 237 | * 2. Correct the color inheritance from `fieldset` elements in IE. 238 | * 3. Remove the padding so developers are not caught out when they zero out 239 | * `fieldset` elements in all browsers. 240 | */ 241 | 242 | legend { 243 | box-sizing: border-box; /* 1 */ 244 | color: inherit; /* 2 */ 245 | display: table; /* 1 */ 246 | max-width: 100%; /* 1 */ 247 | padding: 0; /* 3 */ 248 | white-space: normal; /* 1 */ 249 | } 250 | 251 | /** 252 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 253 | */ 254 | 255 | progress { 256 | vertical-align: baseline; 257 | } 258 | 259 | /** 260 | * Remove the default vertical scrollbar in IE 10+. 261 | */ 262 | 263 | textarea { 264 | overflow: auto; 265 | } 266 | 267 | /** 268 | * 1. Add the correct box sizing in IE 10. 269 | * 2. Remove the padding in IE 10. 270 | */ 271 | 272 | [type="checkbox"], 273 | [type="radio"] { 274 | box-sizing: border-box; /* 1 */ 275 | padding: 0; /* 2 */ 276 | } 277 | 278 | /** 279 | * Correct the cursor style of increment and decrement buttons in Chrome. 280 | */ 281 | 282 | [type="number"]::-webkit-inner-spin-button, 283 | [type="number"]::-webkit-outer-spin-button { 284 | height: auto; 285 | } 286 | 287 | /** 288 | * 1. Correct the odd appearance in Chrome and Safari. 289 | * 2. Correct the outline style in Safari. 290 | */ 291 | 292 | [type="search"] { 293 | -webkit-appearance: textfield; /* 1 */ 294 | outline-offset: -2px; /* 2 */ 295 | } 296 | 297 | /** 298 | * Remove the inner padding in Chrome and Safari on macOS. 299 | */ 300 | 301 | [type="search"]::-webkit-search-decoration { 302 | -webkit-appearance: none; 303 | } 304 | 305 | /** 306 | * 1. Correct the inability to style clickable types in iOS and Safari. 307 | * 2. Change font properties to `inherit` in Safari. 308 | */ 309 | 310 | ::-webkit-file-upload-button { 311 | -webkit-appearance: button; /* 1 */ 312 | font: inherit; /* 2 */ 313 | } 314 | 315 | /* Interactive 316 | ========================================================================== */ 317 | 318 | /* 319 | * Add the correct display in Edge, IE 10+, and Firefox. 320 | */ 321 | 322 | details { 323 | display: block; 324 | } 325 | 326 | /* 327 | * Add the correct display in all browsers. 328 | */ 329 | 330 | summary { 331 | display: list-item; 332 | } 333 | 334 | /* Misc 335 | ========================================================================== */ 336 | 337 | /** 338 | * Add the correct display in IE 10+. 339 | */ 340 | 341 | template { 342 | display: none; 343 | } 344 | 345 | /** 346 | * Add the correct display in IE 10. 347 | */ 348 | 349 | [hidden] { 350 | display: none; 351 | } 352 | -------------------------------------------------------------------------------- /src/utils/CircularFileList.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Implementation of a circular doubly linked list (CDLL) to store file paths. 3 | */ 4 | export class CircularFileList { 5 | private head: FileNode | null = null; 6 | private current: FileNode | null = null; 7 | 8 | push(filePath: string) { 9 | const newNode = new FileNode(filePath); 10 | 11 | if (!this.head) { 12 | // First node in the list 13 | this.head = newNode; 14 | this.head.next = this.head; 15 | this.head.prev = this.head; 16 | this.current = this.head; 17 | } else { 18 | // Insert at the end 19 | const tail = this.head.prev; 20 | if (tail) { 21 | tail.next = newNode; 22 | newNode.prev = tail; 23 | newNode.next = this.head; 24 | this.head.prev = newNode; 25 | } 26 | } 27 | } 28 | 29 | pop() { 30 | if (!this.current) return null; 31 | 32 | const removedFilePath = this.current.filePath; 33 | 34 | if (this.current === this.current.next) { 35 | // Only one element in the list 36 | this.head = null; 37 | this.current = null; 38 | } else { 39 | if (this.current.prev && this.current.next) { 40 | this.current.prev.next = this.current.next; 41 | this.current.next.prev = this.current.prev; 42 | } 43 | if (this.current === this.head) { 44 | this.head = this.current.next; 45 | } 46 | this.current = this.current.next; 47 | } 48 | 49 | return removedFilePath; 50 | } 51 | 52 | next() { 53 | if (this.current) this.current = this.current.next; 54 | return this.current?.filePath ?? null; 55 | } 56 | 57 | previous() { 58 | if (this.current) this.current = this.current.prev; 59 | return this.current?.filePath ?? null; 60 | } 61 | 62 | getCurrent() { 63 | return this.current?.filePath ?? null; 64 | } 65 | 66 | clear() { 67 | this.head = null; 68 | this.current = null; 69 | } 70 | } 71 | 72 | export class FileNode { 73 | filePath: string; 74 | next: FileNode | null = null; 75 | prev: FileNode | null = null; 76 | 77 | constructor(filePath: string) { 78 | this.filePath = filePath; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/utils/normalizeFilePaths.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Normalizes a given file path to use forward slashes (`/`). 3 | * Handles Windows-style (`C:\\path\\to\\file`) and Unix-style (`/path/to/file`). 4 | */ 5 | export function normalizeFilePath(filePath: string): string { 6 | return filePath.replace(/\\/g, "/"); 7 | } 8 | -------------------------------------------------------------------------------- /src/utils/parseCommandInput.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Parses a command-line style input string, correctly handling quoted arguments. 3 | * 4 | * This function splits an input string into arguments, preserving spaces inside 5 | * quoted substrings (both single `'` and double `"` quotes are supported). 6 | * 7 | * Example: 8 | * parseCommandInput('load "C:/Users/Public users/example"') 9 | * -> ['load', 'C:/Users/Public users/example'] 10 | * 11 | * @param input - The raw input string from the terminal. 12 | * @returns An array of parsed arguments, with quotes removed. 13 | */ 14 | export function parseCommandInput(input: string): string[] { 15 | const args: string[] = []; 16 | let currentArg = ""; 17 | let insideQuotes = false; 18 | let quoteChar: string | null = null; 19 | 20 | for (let i = 0; i < input.length; i++) { 21 | const char = input[i]; 22 | 23 | if (char === '"' || char === "'") { 24 | // Toggle quote state if it's the start or end of a quoted section 25 | if (insideQuotes && char === quoteChar) { 26 | insideQuotes = false; 27 | quoteChar = null; 28 | } else if (!insideQuotes) { 29 | insideQuotes = true; 30 | quoteChar = char; 31 | } 32 | } else if (char === " " && !insideQuotes) { 33 | // If we encounter a space outside quotes, push the currentArg and reset 34 | if (currentArg !== "") { 35 | args.push(currentArg); 36 | currentArg = ""; 37 | } 38 | } else { 39 | // Append character to current argument 40 | currentArg += char; 41 | } 42 | } 43 | 44 | // Push the last argument if any 45 | if (currentArg !== "") { 46 | args.push(currentArg); 47 | } 48 | 49 | return args; 50 | } 51 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | 16 | /* Linting */ 17 | "strict": true, 18 | "noUnusedLocals": true, 19 | "noUnusedParameters": true, 20 | "noFallthroughCasesInSwitch": true, 21 | "jsx": "react-jsx", 22 | "jsxImportSource": "preact", 23 | "types": [ 24 | "vite/client" 25 | ] 26 | }, 27 | "include": ["src"] 28 | } 29 | -------------------------------------------------------------------------------- /utils/vb.js: -------------------------------------------------------------------------------- 1 | /* 2 | VB = Version Bump 3 | USAGE: `npm run vb` 4 | 5 | Script that propagates version changes to the package.json and tauri.conf.json files. 6 | */ 7 | 8 | import { readFileSync, writeFileSync } from "node:fs"; 9 | import { createInterface } from "node:readline"; 10 | 11 | const rl = createInterface({ 12 | input: process.stdin, 13 | output: process.stdout 14 | }); 15 | 16 | const askVersion = () => { 17 | return new Promise((resolve) => { 18 | rl.question("Enter new version (e.g. 0.4.2): ", (version) => { 19 | resolve(version.trim()); 20 | }); 21 | }); 22 | }; 23 | 24 | const updateJsonFile = (filePath, updater) => { 25 | try { 26 | const json = JSON.parse(readFileSync(filePath, "utf8")); 27 | updater(json); 28 | writeFileSync(filePath, `${JSON.stringify(json, null, 2)}\n`, "utf8"); 29 | console.log(`Updated ${filePath}`); 30 | } catch (error) { 31 | console.error(`Error updating ${filePath}:`, error); 32 | } 33 | }; 34 | 35 | const updateTomlFile = (filePath, updater) => { 36 | try { 37 | const toml = readFileSync(filePath, "utf8"); 38 | const updatedToml = updater(toml); 39 | writeFileSync(filePath, updatedToml, "utf8"); 40 | console.log(`Updated ${filePath}`); 41 | } catch (error) { 42 | console.error(`Error updating ${filePath}:`, error); 43 | } 44 | } 45 | 46 | (async () => { 47 | const newVersion = await askVersion(); 48 | rl.close(); 49 | 50 | if (!/^\d+\.\d+\.\d+$/.test(newVersion)) { 51 | console.error("Invalid version format."); 52 | process.exit(1); 53 | } 54 | 55 | updateJsonFile("./package.json", (json) => { 56 | json.version = newVersion 57 | }); 58 | updateJsonFile("./src-tauri/tauri.conf.json", (json) => { 59 | json.version = newVersion 60 | }); 61 | updateTomlFile("./src-tauri/Cargo.toml", (toml) => { 62 | return toml.replace(/version = "\d+\.\d+\.\d+"/, `version = "${newVersion 63 | }"`); 64 | }); 65 | 66 | console.log(`Version updated to ${newVersion}`); 67 | })(); 68 | -------------------------------------------------------------------------------- /vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | // Extend Vite's existing ImportMetaEnv instead of redeclaring built-in variables 4 | interface ImportMetaEnv extends Readonly> { 5 | readonly VITE_API_URL?: string; 6 | readonly VITE_SOME_KEY?: string; 7 | } 8 | 9 | // Extend ImportMeta to include env 10 | interface ImportMeta { 11 | readonly env: ImportMetaEnv; 12 | } 13 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import preact from "@preact/preset-vite"; 3 | 4 | // @ts-expect-error process is a Node.js global 5 | const host = process.env.TAURI_DEV_HOST; 6 | 7 | 8 | export default defineConfig(async () => ({ 9 | plugins: [preact()], 10 | clearScreen: false, 11 | server: { 12 | port: 1420, 13 | strictPort: true, 14 | host: host || false, 15 | hmr: host 16 | ? { 17 | protocol: "ws", 18 | host, 19 | port: 1421, 20 | } 21 | : undefined, 22 | watch: { 23 | ignored: ["**/src-tauri/**"], 24 | }, 25 | }, 26 | })); 27 | --------------------------------------------------------------------------------