├── .gitattributes ├── .github ├── dependabot.yml └── workflows │ ├── check.yml │ ├── publish.yml │ ├── scheduled.yml │ ├── site-deploy.yml │ └── test.yml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── Justfile ├── LICENSE ├── README.md ├── build ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── rust-analyzer.json ├── src │ ├── dirs.rs │ ├── fs.rs │ ├── fs │ │ ├── cargo_toml.rs │ │ ├── lib_rs.rs │ │ ├── readme_md.rs │ │ └── src_dir.rs │ ├── git.rs │ ├── icon │ │ ├── mod.rs │ │ └── svg.rs │ ├── main.rs │ ├── package │ │ ├── mod.rs │ │ └── reader.rs │ ├── path.rs │ └── sem_ver.rs └── templates │ ├── icon_index │ └── lib.rs │ ├── icon_lib │ ├── Cargo.toml │ ├── README.md │ └── lib.rs │ └── main_lib │ ├── Cargo.toml │ ├── README.md │ └── lib.rs ├── icon_index ├── .cargo │ └── config.toml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── Trunk.toml ├── index.html ├── input.css ├── output.css ├── src │ ├── alert.rs │ ├── app.rs │ ├── header.rs │ ├── icons.rs │ ├── lib.rs │ ├── main.rs │ └── searchbar.rs └── tailwind.config.js ├── icondata ├── Cargo.lock ├── Cargo.toml └── src │ └── lib.rs ├── icondata_ai ├── Cargo.lock ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_bi ├── Cargo.lock ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_bs ├── Cargo.lock ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_cg ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_ch ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_core ├── Cargo.lock ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_fa ├── Cargo.lock ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_fi ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_hi ├── Cargo.lock ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_im ├── Cargo.lock ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_io ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_lu ├── Cargo.lock ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_mdi ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_oc ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_ri ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_si ├── Cargo.lock ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_tb ├── Cargo.lock ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_ti ├── Cargo.lock ├── Cargo.toml ├── README.md └── src │ └── lib.rs ├── icondata_vs ├── Cargo.toml ├── README.md └── src │ └── lib.rs └── icondata_wi ├── Cargo.toml ├── README.md └── src └── lib.rs /.gitattributes: -------------------------------------------------------------------------------- 1 | # Using template from: https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings 2 | 3 | # Set the default behavior, in case people don't have core.autocrlf set. 4 | * text=auto 5 | 6 | # Explicitly declare text files you want to always be normalized and converted 7 | # to native line endings on checkout. 8 | *.rs text eol=lf 9 | 10 | # Declare files that will always have CRLF line endings on checkout. 11 | # *.sln text eol=crlf 12 | 13 | # Denote all files that are truly binary and should not be modified. 14 | # *.png binary 15 | # *.jpg binary 16 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: / 5 | schedule: 6 | interval: daily 7 | - package-ecosystem: cargo 8 | directory: / 9 | schedule: 10 | interval: daily 11 | ignore: 12 | - dependency-name: "*" 13 | # patch and minor updates don't matter for libraries 14 | # remove this ignore rule if your package has binaries 15 | update-types: 16 | - "version-update:semver-patch" 17 | - "version-update:semver-minor" 18 | -------------------------------------------------------------------------------- /.github/workflows/check.yml: -------------------------------------------------------------------------------- 1 | permissions: 2 | contents: read 3 | on: 4 | pull_request: 5 | # Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 6 | concurrency: 7 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 8 | cancel-in-progress: true 9 | name: check 10 | jobs: 11 | fmt: 12 | runs-on: ubuntu-latest 13 | name: stable / fmt 14 | steps: 15 | - uses: actions/checkout@v4 16 | with: 17 | submodules: true 18 | - name: Install stable 19 | uses: dtolnay/rust-toolchain@stable 20 | with: 21 | components: rustfmt 22 | - name: cargo fmt --check 23 | run: cargo fmt --check 24 | clippy: # Let's not use clippy on icondata files because they are autogenerated. 25 | runs-on: ubuntu-latest 26 | name: ${{ matrix.toolchain }} / clippy 27 | permissions: 28 | contents: read 29 | checks: write 30 | strategy: 31 | fail-fast: false 32 | matrix: 33 | toolchain: [stable, beta] 34 | steps: 35 | - uses: actions/checkout@v4 36 | with: 37 | submodules: true 38 | - name: Install ${{ matrix.toolchain }} 39 | uses: dtolnay/rust-toolchain@master 40 | with: 41 | toolchain: ${{ matrix.toolchain }} 42 | components: clippy 43 | - name: cd build 44 | run: cd build 45 | - name: cargo clippy 46 | uses: actions-rs/clippy-check@v1 47 | with: 48 | token: ${{ secrets.GITHUB_TOKEN }} 49 | doc: 50 | runs-on: ubuntu-latest 51 | name: nightly / doc 52 | steps: 53 | - uses: actions/checkout@v4 54 | with: 55 | submodules: true 56 | - name: Install nightly 57 | uses: dtolnay/rust-toolchain@nightly 58 | - name: cargo doc 59 | run: cargo doc --no-deps --all-features 60 | env: 61 | RUSTDOCFLAGS: --cfg docsrs 62 | msrv: 63 | runs-on: ubuntu-latest 64 | # we use a matrix here just because env can't be used in job names 65 | # https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability 66 | strategy: 67 | matrix: 68 | msrv: ["1.67.0"] # 2021 edition requires 1.56 69 | name: ubuntu / ${{ matrix.msrv }} 70 | steps: 71 | - uses: actions/checkout@v4 72 | with: 73 | submodules: true 74 | - name: Install ${{ matrix.msrv }} 75 | uses: dtolnay/rust-toolchain@master 76 | with: 77 | toolchain: ${{ matrix.msrv }} 78 | - name: cargo +${{ matrix.msrv }} check 79 | run: cargo check 80 | -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | publish_crate: 3 | runs-on: ubuntu-latest 4 | steps: 5 | - name: Checkout code 6 | uses: actions/checkout@v4 7 | - name: Install nightly with wasm 8 | uses: ThexXTURBOXx/toolchain@master 9 | with: 10 | override: true 11 | profile: minimal 12 | target: wasm32-unknown-unknown 13 | toolchain: nightly 14 | - env: 15 | CRATES_IO_TOKEN: ${{ secrets.CARGO_LOGIN }} 16 | name: Publish all Crates 17 | run: > 18 | find . -maxdepth 1 -type d -name 'icondata_*' -print0 19 | | xargs -0 -I {} sh -c 20 | 'cd {} && cargo publish --token $CRATES_IO_TOKEN 21 | || (exit_code=$?; [ $exit_code -eq 101 ] && true || exit $exit_code)' 22 | && cd icondata 23 | && cargo publish --token $CRATES_IO_TOKEN || (exit_code=$?; [ $exit_code -eq 101 ] && true || exit $exit_code) 24 | 25 | name: Publish Crates 26 | on: 27 | release: 28 | types: 29 | - published 30 | workflow_dispatch: 31 | 32 | permissions: 33 | contents: read 34 | -------------------------------------------------------------------------------- /.github/workflows/scheduled.yml: -------------------------------------------------------------------------------- 1 | permissions: 2 | contents: read 3 | on: 4 | pull_request: 5 | schedule: 6 | - cron: '7 7 * * *' 7 | # Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 8 | concurrency: 9 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 10 | cancel-in-progress: true 11 | name: rolling 12 | jobs: 13 | # https://twitter.com/mycoliza/status/1571295690063753218 14 | nightly: 15 | runs-on: ubuntu-latest 16 | name: ubuntu / nightly 17 | steps: 18 | - uses: actions/checkout@v4 19 | with: 20 | submodules: true 21 | - name: Install nightly 22 | uses: dtolnay/rust-toolchain@nightly 23 | - name: cargo generate-lockfile 24 | if: hashFiles('Cargo.lock') == '' 25 | run: cargo generate-lockfile 26 | - name: cargo test --locked 27 | run: cargo test --locked --all-features --all-targets 28 | # https://twitter.com/alcuadrado/status/1571291687837732873 29 | update: 30 | runs-on: ubuntu-latest 31 | name: ubuntu / beta / updated 32 | # There's no point running this if no Cargo.lock was checked in in the 33 | # first place, since we'd just redo what happened in the regular test job. 34 | # Unfortunately, hashFiles only works in if on steps, so we reepeat it. 35 | # if: hashFiles('Cargo.lock') != '' 36 | steps: 37 | - uses: actions/checkout@v4 38 | with: 39 | submodules: true 40 | - name: Install beta 41 | if: hashFiles('Cargo.lock') != '' 42 | uses: dtolnay/rust-toolchain@beta 43 | - name: cargo update 44 | if: hashFiles('Cargo.lock') != '' 45 | run: cargo update 46 | - name: cargo test 47 | if: hashFiles('Cargo.lock') != '' 48 | run: cargo test --locked --all-features --all-targets 49 | env: 50 | RUSTFLAGS: -D deprecated 51 | -------------------------------------------------------------------------------- /.github/workflows/site-deploy.yml: -------------------------------------------------------------------------------- 1 | jobs: 2 | deploy-site: 3 | runs-on: ubuntu-latest 4 | permissions: 5 | contents: write 6 | steps: 7 | - name: Checkout code 8 | uses: actions/checkout@v4 9 | - name: Install rust with wasm 10 | uses: dtolnay/rust-toolchain@stable 11 | with: 12 | components: rust-src 13 | target: wasm32-unknown-unknown 14 | - name: Install Binstall 15 | uses: cargo-bins/cargo-binstall@main 16 | - name: Install trunk 17 | run: "cargo binstall --no-confirm trunk" 18 | - name: Build website 19 | run: "cd icon_index && trunk build" 20 | - name: Deploy 🚀 21 | uses: JamesIves/github-pages-deploy-action@v4 22 | with: 23 | folder: site 24 | 25 | name: Build & Deploy Site 26 | on: 27 | release: 28 | types: 29 | - published 30 | workflow_dispatch: 31 | -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- 1 | permissions: 2 | contents: read 3 | on: 4 | pull_request: 5 | # Spend CI time only on latest ref: https://github.com/jonhoo/rust-ci-conf/pull/5 6 | concurrency: 7 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} 8 | cancel-in-progress: true 9 | name: test 10 | jobs: 11 | required: 12 | runs-on: ubuntu-latest 13 | name: ubuntu / ${{ matrix.toolchain }} 14 | strategy: 15 | matrix: 16 | toolchain: [stable, beta] 17 | steps: 18 | - uses: actions/checkout@v4 19 | with: 20 | submodules: true 21 | - name: Install ${{ matrix.toolchain }} 22 | uses: dtolnay/rust-toolchain@master 23 | with: 24 | toolchain: ${{ matrix.toolchain }} 25 | - name: cargo generate-lockfile 26 | if: hashFiles('Cargo.lock') == '' 27 | run: cargo generate-lockfile 28 | # https://twitter.com/jonhoo/status/1571290371124260865 29 | - name: cargo test --locked 30 | run: cargo test --locked --all-features --all-targets 31 | # https://github.com/rust-lang/cargo/issues/6669 32 | - name: cargo test --doc 33 | run: cargo test --locked --all-features --doc 34 | minimal: 35 | runs-on: ubuntu-latest 36 | name: ubuntu / stable / minimal-versions 37 | steps: 38 | - uses: actions/checkout@v4 39 | with: 40 | submodules: true 41 | - name: Install stable 42 | uses: dtolnay/rust-toolchain@stable 43 | - name: Install nightly for -Zminimal-versions 44 | uses: dtolnay/rust-toolchain@nightly 45 | - name: rustup default stable 46 | run: rustup default stable 47 | - name: cargo update -Zminimal-versions 48 | run: cargo +nightly update -Zminimal-versions 49 | - name: cargo test 50 | run: cargo test --locked --all-features --all-targets 51 | os-check: 52 | runs-on: ${{ matrix.os }} 53 | name: ${{ matrix.os }} / stable 54 | strategy: 55 | fail-fast: false 56 | matrix: 57 | os: [macos-latest, windows-latest] 58 | steps: 59 | # if your project needs OpenSSL, uncommment this to fix Windows builds. 60 | # it's commented out by default as tthe install command takes 5-10m. 61 | # - run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append 62 | # if: runner.os == 'Windows' 63 | # - run: vcpkg install openssl:x64-windows-static-md 64 | # if: runner.os == 'Windows' 65 | - uses: actions/checkout@v4 66 | with: 67 | submodules: true 68 | - name: Install stable 69 | uses: dtolnay/rust-toolchain@stable 70 | - name: cargo generate-lockfile 71 | if: hashFiles('Cargo.lock') == '' 72 | run: cargo generate-lockfile 73 | - name: cargo test 74 | run: cargo test --locked --all-features --all-targets 75 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.vscode 2 | **/target 3 | .DS_Store 4 | /site 5 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "icondata" 7 | version = "0.5.0" 8 | dependencies = [ 9 | "icondata_ai", 10 | "icondata_bi", 11 | "icondata_bs", 12 | "icondata_cg", 13 | "icondata_ch", 14 | "icondata_core", 15 | "icondata_fa", 16 | "icondata_fi", 17 | "icondata_hi", 18 | "icondata_im", 19 | "icondata_io", 20 | "icondata_lu", 21 | "icondata_mdi", 22 | "icondata_oc", 23 | "icondata_ri", 24 | "icondata_si", 25 | "icondata_tb", 26 | "icondata_ti", 27 | "icondata_vs", 28 | "icondata_wi", 29 | ] 30 | 31 | [[package]] 32 | name = "icondata_ai" 33 | version = "0.0.10" 34 | dependencies = [ 35 | "icondata_core", 36 | ] 37 | 38 | [[package]] 39 | name = "icondata_bi" 40 | version = "0.0.10" 41 | dependencies = [ 42 | "icondata_core", 43 | ] 44 | 45 | [[package]] 46 | name = "icondata_bs" 47 | version = "0.0.10" 48 | dependencies = [ 49 | "icondata_core", 50 | ] 51 | 52 | [[package]] 53 | name = "icondata_cg" 54 | version = "0.0.10" 55 | dependencies = [ 56 | "icondata_core", 57 | ] 58 | 59 | [[package]] 60 | name = "icondata_ch" 61 | version = "0.0.10" 62 | dependencies = [ 63 | "icondata_core", 64 | ] 65 | 66 | [[package]] 67 | name = "icondata_core" 68 | version = "0.1.0" 69 | dependencies = [ 70 | "serde", 71 | ] 72 | 73 | [[package]] 74 | name = "icondata_fa" 75 | version = "0.0.10" 76 | dependencies = [ 77 | "icondata_core", 78 | ] 79 | 80 | [[package]] 81 | name = "icondata_fi" 82 | version = "0.0.10" 83 | dependencies = [ 84 | "icondata_core", 85 | ] 86 | 87 | [[package]] 88 | name = "icondata_hi" 89 | version = "0.0.10" 90 | dependencies = [ 91 | "icondata_core", 92 | ] 93 | 94 | [[package]] 95 | name = "icondata_im" 96 | version = "0.0.10" 97 | dependencies = [ 98 | "icondata_core", 99 | ] 100 | 101 | [[package]] 102 | name = "icondata_io" 103 | version = "0.0.10" 104 | dependencies = [ 105 | "icondata_core", 106 | ] 107 | 108 | [[package]] 109 | name = "icondata_lu" 110 | version = "0.0.11" 111 | dependencies = [ 112 | "icondata_core", 113 | ] 114 | 115 | [[package]] 116 | name = "icondata_mdi" 117 | version = "0.0.10" 118 | dependencies = [ 119 | "icondata_core", 120 | ] 121 | 122 | [[package]] 123 | name = "icondata_oc" 124 | version = "0.0.10" 125 | dependencies = [ 126 | "icondata_core", 127 | ] 128 | 129 | [[package]] 130 | name = "icondata_ri" 131 | version = "0.0.10" 132 | dependencies = [ 133 | "icondata_core", 134 | ] 135 | 136 | [[package]] 137 | name = "icondata_si" 138 | version = "0.0.10" 139 | dependencies = [ 140 | "icondata_core", 141 | ] 142 | 143 | [[package]] 144 | name = "icondata_tb" 145 | version = "0.0.10" 146 | dependencies = [ 147 | "icondata_core", 148 | ] 149 | 150 | [[package]] 151 | name = "icondata_ti" 152 | version = "0.0.10" 153 | dependencies = [ 154 | "icondata_core", 155 | ] 156 | 157 | [[package]] 158 | name = "icondata_vs" 159 | version = "0.0.10" 160 | dependencies = [ 161 | "icondata_core", 162 | ] 163 | 164 | [[package]] 165 | name = "icondata_wi" 166 | version = "0.0.10" 167 | dependencies = [ 168 | "icondata_core", 169 | ] 170 | 171 | [[package]] 172 | name = "proc-macro2" 173 | version = "1.0.86" 174 | source = "registry+https://github.com/rust-lang/crates.io-index" 175 | checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" 176 | dependencies = [ 177 | "unicode-ident", 178 | ] 179 | 180 | [[package]] 181 | name = "quote" 182 | version = "1.0.36" 183 | source = "registry+https://github.com/rust-lang/crates.io-index" 184 | checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" 185 | dependencies = [ 186 | "proc-macro2", 187 | ] 188 | 189 | [[package]] 190 | name = "serde" 191 | version = "1.0.204" 192 | source = "registry+https://github.com/rust-lang/crates.io-index" 193 | checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" 194 | dependencies = [ 195 | "serde_derive", 196 | ] 197 | 198 | [[package]] 199 | name = "serde_derive" 200 | version = "1.0.204" 201 | source = "registry+https://github.com/rust-lang/crates.io-index" 202 | checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" 203 | dependencies = [ 204 | "proc-macro2", 205 | "quote", 206 | "syn", 207 | ] 208 | 209 | [[package]] 210 | name = "syn" 211 | version = "2.0.72" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" 214 | dependencies = [ 215 | "proc-macro2", 216 | "quote", 217 | "unicode-ident", 218 | ] 219 | 220 | [[package]] 221 | name = "unicode-ident" 222 | version = "1.0.12" 223 | source = "registry+https://github.com/rust-lang/crates.io-index" 224 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 225 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | resolver = "2" 3 | members = [ 4 | "icondata", 5 | "icondata_ai", 6 | "icondata_bi", 7 | "icondata_bs", 8 | "icondata_cg", 9 | "icondata_ch", 10 | "icondata_fa", 11 | "icondata_fi", 12 | "icondata_hi", 13 | "icondata_im", 14 | "icondata_io", 15 | "icondata_lu", 16 | "icondata_mdi", 17 | "icondata_oc", 18 | "icondata_ri", 19 | "icondata_si", 20 | "icondata_tb", 21 | "icondata_ti", 22 | "icondata_vs", 23 | "icondata_wi", 24 | "icondata_core", 25 | ] 26 | exclude = ["build", "icon_index", "size-test"] 27 | 28 | [workspace.dependencies] 29 | serde = "^1.0.103" 30 | -------------------------------------------------------------------------------- /Justfile: -------------------------------------------------------------------------------- 1 | # Lists all available commands. 2 | list: 3 | just --list 4 | 5 | # Enable nightly, add wasm target, update... 6 | setup-rust: 7 | rustup default nightly 8 | rustup target add wasm32-unknown-unknown 9 | rustup update 10 | 11 | # Install dependencies for building, running examples, profiling and possibly more... 12 | install-tools: 13 | cargo install trunk 14 | cargo install twiggy 15 | cargo install cargo-expand 16 | 17 | # Build website 18 | build-site: 19 | cd icon_index && trunk build 20 | 21 | # Build all libraries 22 | build: 23 | cd build && cargo run --release 24 | 25 | # Build all libraries, forcing new downloads of icon packages 26 | build-clean: 27 | cd build && cargo run -- --clean 28 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2023 Charles Edward Gagnon 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Icondata 2 | This crate provides SVG icon data from popular and free icon libraries. 3 | 4 | A [site](https://carloskiki.github.io/icondata) referencing every icon is available! 5 | 6 | ## Table of Contents 7 | - [Icondata](#icondata) 8 | - [Table of Contents](#table-of-contents) 9 | - [Usage](#usage) 10 | - [Icon Packages](#icon-packages) 11 | - [Developing](#developing) 12 | - [Contributing](#contributing) 13 | 14 | ## Usage 15 | Every crate is tied to a specific icon package. You can find the name of the crate corresponding to a package in the [Icon Packages](#icon-packages) section. 16 | 17 | Please see the [API documentation](https://docs.rs/icondata/latest/icondata/) to get started. 18 | 19 | ## Icon Packages 20 | Licenses of the icons provided through these libraries were extracted with best intent, 21 | but must only be taken as a hint. Please check the individual icon repositories for up-to-date license information. 22 | 23 | | Icon Library | Version | Source | License | Crate Name | 24 | | ------------ | ------- | ------ | ------- | ---------- | 25 | | Ant Design Icons | 4.3.1 | Git: - Branch: master - Commit: e09efdead14961d3cc9ec0c24a182f66241436de | MIT, | icondata_ai | 26 | | BoxIcons | 2.1.4 | Git: - Branch: master - Commit: 9ffa9136e8681886bb7bd2145cd4098717ce1c11 | MIT, | icondata_bi | 27 | | Bootstrap Icons | 1.11.0 | Git: - Tag: v1.11.0 | MIT, | icondata_bs | 28 | | css.gg | 2.1.1 | Git: - Tag: 2.1.1 | MIT, | icondata_cg | 29 | | Charm | 0.18.0 | Git: - Tag: v0.18.0 | MIT, | icondata_ch | 30 | | Font Awesome | 6.4.2 | Git: - Tag: 6.4.2 | CC BY 4.0, | icondata_fa | 31 | | Feather | 4.29.1 | Git: - Tag: v4.29.1 | MIT, | icondata_fi | 32 | | Heroicons | 2.0.18 | Git: - Tag: v2.0.18 | MIT, | icondata_hi | 33 | | IcoMoon Free | unknown | Git: - Branch: master - Commit: d006795ede82361e1bac1ee76f215cf1dc51e4ca | CC BY 4.0, GPL, | icondata_im | 34 | | Ionicons | 7.1.2 | Git: - Tag: v7.1.2 | MIT, | icondata_io | 35 | | Lucide | 0.510.0 | Git: - Tag: 0.510.0 | ISC, | icondata_lu | 36 | | Material Design Icons | 7.4.47 | Git: - Tag: v7.4.47 | Apache 2.0, | icondata_mdi | 37 | | Github Octicons | 19.7.0 | Git: - Tag: v19.7.0 | MIT, | icondata_oc | 38 | | Remix Icon | 3.5.0 | Git: - Tag: v3.5.0 | Apache 2.0, | icondata_ri | 39 | | Simple Icons | 9.14.0 | Git: - Tag: 9.14.0 | CC0 1.0 Universal, | icondata_si | 40 | | Tabler Icons | 2.34.0 | Git: - Tag: v2.34.0 | MIT, | icondata_tb | 41 | | Typicons | 2.1.2 | Git: - Tag: v2.1.2 | CC BY-SA 3.0, | icondata_ti | 42 | | VS Code Icons | 0.0.33 | Git: - Tag: 0.0.33 | CC BY 4.0, | icondata_vs | 43 | | Weather Icons | 2.0.12 | Git: - Tag: 2.0.12 | SIL OFL 1.1, | icondata_wi | 44 | 45 | ## Developing 46 | This repository uses Just 47 | 48 | Simply call 49 | ```bash 50 | just 51 | ``` 52 | to see a list of available commands. 53 | 54 | You may need to install just using 55 | 56 | ```bash 57 | cargo install just 58 | ``` 59 | 60 | ## Contributing 61 | Contributions are more than welcomed! 62 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /build/.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /downloads 3 | -------------------------------------------------------------------------------- /build/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata-builder" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | anyhow = "1" 8 | clap = { version = "4", features = ["derive"] } 9 | heck = "0.4" 10 | indoc = "2" 11 | once_cell = "1" 12 | prettyplease = "0.2" 13 | proc-macro2 = "1" 14 | quote = "1" 15 | regex = "1" 16 | serde = { version = "1", features = ["derive"] } 17 | serde_json = "1" 18 | snafu = { version = "0.7", default-features = false, features = ["rust_1_61", "std", "backtraces", "backtraces-impl-std"] } 19 | strum = { version = "0.24", features = ["derive"] } 20 | syn = { version = "2", features = ["full"] } 21 | time = "0.3" 22 | tokio = { version = "1", features = ["full"] } 23 | tracing = "0.1" 24 | tracing-subscriber = "0.3" 25 | url = { version = "2", features = ["serde"] } 26 | xml-rs = "0.8" 27 | askama = "0.12" 28 | 29 | [dev-dependencies] 30 | pretty_assertions = "1" 31 | -------------------------------------------------------------------------------- /build/README.md: -------------------------------------------------------------------------------- 1 | # Build 2 | 3 | This crate is the **generator** of the `icondata` library living alongside this crate. 4 | 5 | ## Usage 6 | 7 | Once inside this directory, trigger a build with 8 | 9 | cargo run 10 | 11 | This will use the downloaded icon packages from the previous run, updating them when necessary, and generate the `icondata` library crate along with individual icon crates (i.e. `icondata-*`). 12 | 13 | Note that this is the default as this may greatly reduces the runtime of this crate. 14 | 15 | If you want to run a clean build, removing previously downloaded content, preferred when generating a new release, use 16 | 17 | cargo run -- --clean 18 | 19 | This is the only possible argument right now. You can always check for other arguments with 20 | 21 | cargo run -- --help 22 | 23 | ## Notes 24 | 25 | Each crate is not generated completely from scratch. The following files and directories are touched within each crate. 26 | 27 | | Path | Changes | 28 | | --- | --- | 29 | | src/\* | Replaced | 30 | | Cargo.toml | Replaced | 31 | | README.md | Replaced | 32 | | ICONS.md | Replaced | 33 | -------------------------------------------------------------------------------- /build/rust-analyzer.json: -------------------------------------------------------------------------------- 1 | { 2 | "cargo": { 3 | "buildScripts": { 4 | "enable": true 5 | } 6 | }, 7 | "procMacro": { 8 | "enable": true 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /build/src/dirs.rs: -------------------------------------------------------------------------------- 1 | use std::path::PathBuf; 2 | 3 | use anyhow::Result; 4 | use tokio::io::AsyncWriteExt; 5 | use tracing::{error, instrument, trace}; 6 | 7 | use crate::{ 8 | fs::{cargo_toml::CargoToml, lib_rs::LibRs, readme_md::Readme}, 9 | package::{Downloaded, Package}, 10 | }; 11 | 12 | #[derive(Debug)] 13 | pub struct Library<'a> { 14 | cargo_toml: Option, 15 | lib_rs: Option, 16 | readme: Option, 17 | ty: LibType<'a>, 18 | } 19 | 20 | impl<'a> Library<'a> { 21 | pub fn new(mut path: PathBuf, ty: LibType<'a>) -> Self { 22 | let cargo_path = path.join("Cargo.toml"); 23 | let lib_rs_path = path.join("src/lib.rs"); 24 | let readme_path = path.join("README.md"); 25 | match &ty { 26 | LibType::IconLib(_) => Library { 27 | cargo_toml: Some(CargoToml { path: cargo_path }), 28 | lib_rs: Some(LibRs { path: lib_rs_path }), 29 | readme: Some(Readme { path: readme_path }), 30 | ty, 31 | }, 32 | 33 | LibType::MainLib => { 34 | path.pop(); 35 | let readme_path = path.join("README.md"); 36 | 37 | Library { 38 | cargo_toml: Some(CargoToml { path: cargo_path }), 39 | lib_rs: Some(LibRs { path: lib_rs_path }), 40 | readme: Some(Readme { path: readme_path }), 41 | ty, 42 | } 43 | } 44 | 45 | LibType::IconIndex => Library { 46 | cargo_toml: None, 47 | lib_rs: Some(LibRs { path: lib_rs_path }), 48 | ty, 49 | readme: None, 50 | }, 51 | } 52 | } 53 | 54 | pub async fn generate(&self) -> Result<()> { 55 | if let Some(cargo_toml) = &self.cargo_toml { 56 | let contents = CargoToml::contents(&self.ty)?; 57 | write_to_file(&cargo_toml.path, contents).await?; 58 | }; 59 | if let Some(lib_rs) = &self.lib_rs { 60 | let contents = LibRs::contents(&self.ty)?; 61 | write_to_file(&lib_rs.path, contents).await?; 62 | }; 63 | if let Some(readme) = &self.readme { 64 | let contents = Readme::contents(&self.ty)?; 65 | write_to_file(&readme.path, contents).await?; 66 | }; 67 | Ok(()) 68 | } 69 | } 70 | 71 | #[derive(Debug)] 72 | pub enum LibType<'a> { 73 | IconLib(&'a Package), 74 | MainLib, 75 | IconIndex, 76 | } 77 | 78 | #[instrument(level = "info", skip(contents))] 79 | pub async fn write_to_file(path: &PathBuf, contents: String) -> Result<()> { 80 | trace!(?path, "Making sure full path exists."); 81 | tokio::fs::create_dir_all(path.parent().unwrap()).await?; 82 | 83 | if path.exists() { 84 | trace!("Removing existing file."); 85 | tokio::fs::remove_file(&path).await?; 86 | } 87 | 88 | let mut file = tokio::fs::OpenOptions::new() 89 | .create(true) 90 | .write(true) 91 | .open(path) 92 | .await?; 93 | 94 | trace!(?path, "Writing contents to file."); 95 | file.write_all(contents.as_bytes()).await?; 96 | file.flush().await.map_err(|err| { 97 | error!(?err, "Could not flush file."); 98 | err 99 | })?; 100 | Ok(()) 101 | } 102 | -------------------------------------------------------------------------------- /build/src/fs.rs: -------------------------------------------------------------------------------- 1 | pub(crate) mod cargo_toml; 2 | pub(crate) mod lib_rs; 3 | pub(crate) mod readme_md; 4 | pub(crate) mod src_dir; 5 | -------------------------------------------------------------------------------- /build/src/fs/cargo_toml.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Result; 2 | use askama::Template; 3 | use std::path::PathBuf; 4 | use heck::ToKebabCase; 5 | 6 | use crate::dirs::LibType; 7 | 8 | #[derive(Debug)] 9 | pub struct CargoToml { 10 | /// Path to the library's Cargo.toml file. 11 | pub path: PathBuf, 12 | } 13 | 14 | impl CargoToml { 15 | pub fn contents(lib_type: &LibType) -> Result { 16 | match lib_type { 17 | LibType::IconLib(pkg) => { 18 | #[derive(Template)] 19 | #[template(path = "icon_lib/Cargo.toml", escape = "none")] 20 | struct Template<'a> { 21 | short_name: &'a str, 22 | crate_version: String, 23 | icon_package_name: &'a str, 24 | } 25 | 26 | Ok(Template { 27 | crate_version: pkg.meta.crate_version.to_string(), 28 | short_name: &pkg.meta.short_name, 29 | icon_package_name: &pkg.meta.package_name, 30 | } 31 | .render()?) 32 | } 33 | 34 | LibType::MainLib => { 35 | #[derive(Template)] 36 | #[template(path = "main_lib/Cargo.toml", escape = "none")] 37 | struct Template<'a> { 38 | short_name_version: Vec<(&'a str, String)>, 39 | short_name_feature_name: Vec<(&'a str, String)>, 40 | } 41 | 42 | let short_name_version: Vec<_> = crate::Packages::get()? 43 | .iter() 44 | .map(|package| { 45 | ( 46 | &*package.meta.short_name, 47 | package.meta.crate_version.to_string(), 48 | ) 49 | }) 50 | .collect(); 51 | 52 | let short_name_feature_name: Vec<_> = crate::Packages::get()? 53 | .iter() 54 | .map(|package| (&*package.meta.short_name, package.meta.package_name.to_kebab_case())) 55 | .collect(); 56 | 57 | Ok(Template { short_name_version, short_name_feature_name }.render()?) 58 | } 59 | 60 | LibType::IconIndex => unimplemented!("IconIndex does not generate a Cargo.toml file."), 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /build/src/fs/lib_rs.rs: -------------------------------------------------------------------------------- 1 | use std::path::PathBuf; 2 | 3 | use anyhow::Result; 4 | use askama::Template; 5 | use heck::ToKebabCase; 6 | 7 | use crate::{dirs::LibType, icon::svg::ParsedSvg, package::PackageSource, Packages}; 8 | 9 | #[derive(Debug)] 10 | pub struct LibRs { 11 | pub path: PathBuf, 12 | } 13 | 14 | impl LibRs { 15 | pub fn contents(lib_type: &LibType) -> Result { 16 | match lib_type { 17 | LibType::IconLib(pkg) => { 18 | #[derive(Template)] 19 | #[template(path = "icon_lib/lib.rs", escape = "none")] 20 | struct Template<'a> { 21 | name_svg: Vec<(&'a str, &'a ParsedSvg)>, 22 | url: String, 23 | long_name: String, 24 | } 25 | 26 | let icons = pkg.icons(); 27 | let name_svg = icons 28 | .iter() 29 | .map(|icon| (icon.name.as_ref(), &icon.svg)) 30 | .collect::>(); 31 | let long_name = pkg.meta.package_name.to_string(); 32 | let url = match &pkg.meta.source { 33 | PackageSource::Git { url, .. } => url.to_string(), 34 | }; 35 | 36 | Ok(Template { 37 | name_svg, 38 | url, 39 | long_name, 40 | } 41 | .render()?) 42 | } 43 | LibType::MainLib => { 44 | #[derive(Template)] 45 | #[template(path = "main_lib/lib.rs", escape = "none")] 46 | struct Template<'a> { 47 | short_name_feature_name: Vec<(&'a str, String)>, 48 | } 49 | 50 | let short_name_feature_name = Packages::get()? 51 | .iter() 52 | .map(|package| (package.meta.short_name.as_ref(), package.meta.package_name.to_kebab_case())) 53 | .collect::>(); 54 | 55 | Ok(Template { short_name_feature_name }.render()?) 56 | } 57 | LibType::IconIndex => { 58 | #[derive(Template)] 59 | #[template(path = "icon_index/lib.rs", escape = "none")] 60 | struct Template<'a> { 61 | icons: Vec<&'a str>, 62 | } 63 | 64 | let icons = Packages::get()? 65 | .iter() 66 | .flat_map(|package| package.icons().iter().map(|icon| icon.name.as_ref())) 67 | .collect(); 68 | 69 | Ok(Template { icons }.render()?) 70 | } 71 | } 72 | } 73 | } 74 | 75 | mod filters { 76 | use xml::attribute::OwnedAttribute; 77 | pub fn attribute_value(opt: &Option) -> ::askama::Result { 78 | Ok(format!("{:?}", opt.as_ref().map(|attr| &attr.value))) 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /build/src/fs/readme_md.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Result; 2 | use askama::Template; 3 | use std::path::PathBuf; 4 | 5 | use crate::{ 6 | dirs::LibType, 7 | package::{GitTarget, PackageSource}, 8 | Packages, 9 | }; 10 | 11 | #[derive(Debug)] 12 | pub struct Readme { 13 | pub path: PathBuf, 14 | } 15 | 16 | impl Readme { 17 | pub fn contents(ty: &LibType) -> Result { 18 | match ty { 19 | LibType::IconLib(pkg) => { 20 | #[derive(Template)] 21 | #[template(path = "icon_lib/README.md")] 22 | struct ReadmeTemplate<'a> { 23 | short_name: &'a str, 24 | package_name: &'a str, 25 | } 26 | 27 | Ok(ReadmeTemplate { 28 | short_name: &pkg.meta.short_name, 29 | package_name: &pkg.meta.package_name, 30 | } 31 | .render()?) 32 | } 33 | 34 | LibType::MainLib => { 35 | #[derive(Template)] 36 | #[template(path = "main_lib/README.md")] 37 | struct ReadmeTemplate<'a> { 38 | packages: Vec<(&'a str, String, String, String, &'a str)>, 39 | } 40 | 41 | let packages = Packages::get()? 42 | .iter() 43 | .map(|pkg| { 44 | let version = match &pkg.meta.source { 45 | PackageSource::Git { target, .. } => match &target { 46 | GitTarget::Branch { version_hint, .. } => version_hint 47 | .as_ref() 48 | .map(|version| version.to_string()) 49 | .unwrap_or("unknown".to_owned()), 50 | GitTarget::Tag { version, .. } => version.to_string(), 51 | }, 52 | }; 53 | let source = match &pkg.meta.source { 54 | PackageSource::Git { url, target } => match &target { 55 | GitTarget::Branch { 56 | name, commit_ref, .. 57 | } => { 58 | format!("Git: <{url}> - Branch: {name} - Commit: {commit_ref}") 59 | } 60 | GitTarget::Tag { name, version: _ } => { 61 | format!("Git: <{url}> - Tag: {name}") 62 | } 63 | }, 64 | }; 65 | let license = pkg.meta.licenses.iter().fold(String::new(), |mut acc, s| { 66 | acc.push_str(s); 67 | acc.push_str(", "); 68 | acc 69 | }); 70 | 71 | ( 72 | pkg.meta.package_name.as_ref(), 73 | version, 74 | source, 75 | license, 76 | pkg.meta.short_name.as_ref(), 77 | ) 78 | }) 79 | .collect(); 80 | 81 | Ok(ReadmeTemplate { packages }.render()?) 82 | } 83 | LibType::IconIndex => unreachable!("IconIndex does not have a README.md file"), 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /build/src/fs/src_dir.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/carloskiki/icondata/592efd6b847f2996ab4038ae6386e6d1ef7ad9a3/build/src/fs/src_dir.rs -------------------------------------------------------------------------------- /build/src/git.rs: -------------------------------------------------------------------------------- 1 | use std::{ 2 | io, 3 | path::PathBuf, 4 | process::{Command, ExitStatus}, 5 | }; 6 | 7 | use snafu::{prelude::*, Backtrace}; 8 | use tracing::{debug, info, instrument, warn}; 9 | 10 | use crate::{ 11 | package::{self, GitTarget}, 12 | path, 13 | }; 14 | 15 | #[derive(Debug, Snafu)] 16 | pub(crate) enum Error { 17 | #[snafu(display("Could not execute command {cmd}"))] 18 | ExecCommand { 19 | source: io::Error, 20 | cmd: String, 21 | backtrace: Backtrace, 22 | }, 23 | #[snafu(display("Command exited with error. status_code: {exit_status}, std_out:{std_out}, std_err:{std_err}"))] 24 | Command { 25 | exit_status: ExitStatus, 26 | std_out: String, 27 | std_err: String, 28 | backtrace: Backtrace, 29 | }, 30 | } 31 | 32 | /// Clone the given repository at a specific commit ref or tag. 33 | #[instrument(level = "info")] 34 | pub(crate) fn clone( 35 | git_url: &str, 36 | git_target: &GitTarget, 37 | target_dir: &PathBuf, 38 | ) -> Result<(), Error> { 39 | let mut cmd = Command::new("git"); 40 | cmd.args(["clone", "--depth", "1", "--branch"]); 41 | 42 | match git_target { 43 | package::GitTarget::Branch { 44 | name: _, 45 | commit_ref, 46 | version_hint: _, 47 | } => { 48 | // NOTE: The hash alone is enough here. We do not also need to specify a branch! 49 | cmd.arg(commit_ref.as_ref()); 50 | } 51 | package::GitTarget::Tag { name, version: _ } => { 52 | // NOTE: The tag-name alone is enough here. We do not need to prepend it with "tags/"! 53 | //&format!("tags/{}", name.as_ref()); 54 | cmd.arg(name.as_ref()); 55 | } 56 | } 57 | 58 | // Adding the repository url. 59 | cmd.arg(git_url); 60 | 61 | // Adding the destination path. 62 | cmd.arg(target_dir); 63 | 64 | debug!( 65 | ?cmd, 66 | "Constructed command to directly clone GIT repository." 67 | ); 68 | 69 | let output = cmd 70 | .current_dir(path::build_crate("")) 71 | .output() 72 | .context(ExecCommandSnafu { 73 | cmd: format!("{cmd:?}"), 74 | })?; 75 | 76 | ensure!(output.status.success(), { 77 | let std_out = String::from_utf8_lossy(&output.stdout).into_owned(); 78 | let std_err = String::from_utf8_lossy(&output.stderr).into_owned(); 79 | warn!( 80 | exit_code = output.status.code(), 81 | ?std_out, 82 | ?std_err, 83 | "Direct clone failed." 84 | ); 85 | CommandSnafu { 86 | exit_status: output.status, 87 | std_out, 88 | std_err, 89 | } 90 | }); 91 | 92 | info!("Direct clone successful."); 93 | Ok(()) 94 | } 95 | 96 | /// Clone the given repository without checking out any specific commit or tag. 97 | /// This might be used in conjunction with `git::checkout()` if a simple `git::clone()` fails. 98 | /// You have to call `git::checkout()` after this was successful. 99 | #[instrument(level = "info")] 100 | pub(crate) fn clone_without_checkout(git_url: &str, target_dir: &PathBuf) -> Result<(), Error> { 101 | let clone_output = { 102 | let mut cmd = Command::new("git"); 103 | cmd.args(["clone", "--no-checkout", "--single-branch", git_url]); 104 | cmd.arg(target_dir); 105 | debug!( 106 | ?cmd, 107 | "Constructed command to clone GIT repository using --no-checkout strategy." 108 | ); 109 | cmd.current_dir(path::build_crate("")) 110 | .output() 111 | .context(ExecCommandSnafu { 112 | cmd: format!("{cmd:?}"), 113 | }) 114 | }?; 115 | 116 | ensure!(clone_output.status.success(), { 117 | let std_out = String::from_utf8_lossy(&clone_output.stdout).into_owned(); 118 | let std_err = String::from_utf8_lossy(&clone_output.stderr).into_owned(); 119 | warn!( 120 | exit_code = clone_output.status.code(), 121 | ?std_out, 122 | ?std_err, 123 | "Clone failed." 124 | ); 125 | CommandSnafu { 126 | exit_status: clone_output.status, 127 | std_out, 128 | std_err, 129 | } 130 | }); 131 | 132 | info!("Clone with --no-checkout successful."); 133 | Ok(()) 134 | } 135 | 136 | /// Checkout a specific tag or commit. `target_dir` must point to a directory containing a cloned git repository.v 137 | #[instrument(level = "info")] 138 | pub(crate) fn checkout(git_target: &GitTarget, target_dir: &PathBuf) -> Result<(), Error> { 139 | let checkout_output = { 140 | let mut cmd = Command::new("git"); 141 | cmd.args([ 142 | "checkout", 143 | match git_target { 144 | package::GitTarget::Branch { 145 | name: _, 146 | commit_ref, 147 | version_hint: _, 148 | } => commit_ref.as_ref(), 149 | package::GitTarget::Tag { name, version: _ } => name.as_ref(), 150 | }, 151 | ]); 152 | cmd.arg(target_dir); 153 | debug!(?cmd, "Constructed command to checkout specific branch."); 154 | cmd.current_dir(target_dir) 155 | .output() 156 | .context(ExecCommandSnafu { 157 | cmd: format!("{cmd:?}"), 158 | }) 159 | }?; 160 | 161 | ensure!(checkout_output.status.success(), { 162 | let std_out = String::from_utf8_lossy(&checkout_output.stdout).into_owned(); 163 | let std_err = String::from_utf8_lossy(&checkout_output.stderr).into_owned(); 164 | warn!( 165 | exit_code = checkout_output.status.code(), 166 | ?std_out, 167 | ?std_err, 168 | "Checkout failed." 169 | ); 170 | CommandSnafu { 171 | exit_status: checkout_output.status, 172 | std_out, 173 | std_err, 174 | } 175 | }); 176 | 177 | info!("Checkout successful."); 178 | Ok(()) 179 | } 180 | -------------------------------------------------------------------------------- /build/src/icon/mod.rs: -------------------------------------------------------------------------------- 1 | use std::{fmt::Display, path::Path, str::FromStr}; 2 | 3 | use anyhow::{Context, Result}; 4 | use heck::ToPascalCase; 5 | 6 | use crate::package::{Package, PackageType, Unknown}; 7 | 8 | use self::svg::ParsedSvg; 9 | 10 | pub mod svg; 11 | 12 | #[derive(Debug, Clone)] 13 | pub struct SvgIcon { 14 | pub svg: svg::ParsedSvg, 15 | pub name: String, 16 | } 17 | 18 | impl SvgIcon { 19 | pub async fn new( 20 | package: &Package, 21 | path: &Path, 22 | size: Option, 23 | mut categories: Vec, 24 | ) -> Result { 25 | let file_stem = path.file_stem().unwrap().to_string_lossy(); // TODO: Error handling\ 26 | 27 | let (raw_name, size_from_name, cats_from_name) = 28 | parse_raw_icon_name(package.ty, &file_stem); 29 | 30 | if let Some(mut cats_from_name) = cats_from_name { 31 | categories.append(&mut cats_from_name); 32 | } 33 | 34 | let name = feature_name( 35 | raw_name, 36 | size_from_name.or(size), 37 | &categories, 38 | &package.meta.short_name, 39 | ); 40 | 41 | let svg = tokio::fs::read_to_string(path).await?; 42 | 43 | Ok(SvgIcon { 44 | svg: ParsedSvg::parse( 45 | svg.as_bytes(), 46 | categories.contains(&Category("twotone".to_string())), 47 | ) 48 | .with_context(|| { 49 | format!( 50 | "Error parsing icon: {} from package: {}, with path: {:?}", 51 | &name, 52 | package.meta.short_name, 53 | path.to_str() 54 | ) 55 | })?, 56 | name, 57 | }) 58 | } 59 | } 60 | 61 | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone)] 62 | pub struct Category(pub String); 63 | 64 | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Clone, Copy)] 65 | pub enum IconSize { 66 | Xs, 67 | Sm, 68 | Md, 69 | Lg, 70 | Xl, 71 | Xxl, 72 | } 73 | 74 | impl IconSize { 75 | fn as_str(&self) -> &'static str { 76 | match self { 77 | IconSize::Xs => "xs", 78 | IconSize::Sm => "sm", 79 | IconSize::Md => "md", 80 | IconSize::Lg => "lg", 81 | IconSize::Xl => "xl", 82 | IconSize::Xxl => "xxl", 83 | } 84 | } 85 | } 86 | 87 | impl Display for IconSize { 88 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 89 | f.write_str(self.as_str()) 90 | } 91 | } 92 | 93 | impl FromStr for IconSize { 94 | type Err = anyhow::Error; 95 | 96 | fn from_str(str: &str) -> Result { 97 | match str { 98 | "12" => Ok(IconSize::Xs), 99 | "16" => Ok(IconSize::Sm), 100 | "20" => Ok(IconSize::Md), 101 | "24" => Ok(IconSize::Lg), 102 | "48" => Ok(IconSize::Xl), 103 | "96" => Ok(IconSize::Xxl), 104 | other => Err(anyhow::anyhow!( 105 | "Icon size '{other}' could not be recognized!" 106 | )), 107 | } 108 | } 109 | } 110 | 111 | pub(crate) fn feature_name( 112 | raw_name: &str, 113 | size: Option, 114 | categories: &[Category], 115 | package_short_name: &str, 116 | ) -> String { 117 | let mut name = String::with_capacity( 118 | package_short_name.len() 119 | + 1 120 | + raw_name.len() 121 | + categories.iter().map(|it| it.0.len() + 1).sum::() 122 | + size.map(|it| it.as_str().len() + 1).unwrap_or(0), 123 | ); 124 | 125 | name.push_str(package_short_name.as_ref()); 126 | name.push(' '); 127 | 128 | name.push_str(raw_name); 129 | name.push(' '); 130 | 131 | categories.iter().for_each(|category| { 132 | name.push_str(&category.0); 133 | name.push(' '); 134 | }); 135 | 136 | if let Some(size) = size { 137 | name.push_str(size.as_str()); 138 | name.push(' '); 139 | }; 140 | 141 | name.to_pascal_case() 142 | } 143 | 144 | pub(crate) fn parse_raw_icon_name( 145 | package: PackageType, 146 | file_stem: &str, 147 | ) -> (&str, Option, Option>) { 148 | match package { 149 | // octoicons: size suffix e.g: '-24.svg' 150 | PackageType::GithubOcticons => { 151 | let size = IconSize::from_str(&file_stem[(file_stem.len() - 2)..]).ok(); 152 | let name = file_stem 153 | .trim_end_matches(char::is_numeric) 154 | .trim_end_matches('-'); 155 | (name, size, None) 156 | } 157 | // Weather icons: 'wi-' prefix 158 | PackageType::WeatherIcons => { 159 | let name = file_stem.trim_start_matches("wi-"); 160 | (name, None, None) 161 | } 162 | // Box icons: logos: 'bxl-', regular: 'bx-', solid: 'bxs-' prefixes 163 | PackageType::BoxIcons => { 164 | let name = file_stem 165 | .trim_start_matches("bxl-") 166 | .trim_start_matches("bx-") 167 | .trim_start_matches("bxs-"); 168 | (name, None, None) 169 | } 170 | // Icomoon icons: numbered '001-xxxxxx' 171 | PackageType::IcoMoonFree => { 172 | let name = file_stem.trim_start_matches(char::is_numeric); 173 | (name, None, None) 174 | } 175 | PackageType::RemixIcon => { 176 | let mut name = file_stem; 177 | let mut cats = vec![]; 178 | if name.ends_with("-fill") { 179 | name = name.trim_end_matches("-fill"); 180 | cats.push(Category("fill".to_string())); 181 | } else if name.ends_with("-line") { 182 | name = name.trim_end_matches("-line"); 183 | cats.push(Category("line".to_string())); 184 | } 185 | (name, None, if cats.is_empty() { None } else { Some(cats) }) 186 | } 187 | _ => (file_stem, None, None), 188 | } 189 | } 190 | -------------------------------------------------------------------------------- /build/src/icon/svg.rs: -------------------------------------------------------------------------------- 1 | use anyhow::{anyhow, Result}; 2 | use std::str::from_utf8; 3 | use std::{borrow::Cow, collections::HashMap}; 4 | use tracing::warn; 5 | use xml::attribute::Attribute; 6 | use xml::common::XmlVersion; 7 | use xml::name::Name; 8 | use xml::namespace::Namespace; 9 | use xml::{attribute::OwnedAttribute, EmitterConfig, ParserConfig}; 10 | 11 | #[derive(Debug, Clone)] 12 | pub struct ParsedSvg { 13 | pub content: String, 14 | #[allow(unused)] 15 | pub xml_attributes: XmlAttributes, 16 | pub svg_attributes: SvgAttributes, 17 | } 18 | 19 | impl ParsedSvg { 20 | pub fn svg_attributes(&self) -> &SvgAttributes { 21 | &self.svg_attributes 22 | } 23 | } 24 | 25 | /// Parsed attributes of the xml root element. 26 | #[derive(Debug, Clone)] 27 | pub struct XmlAttributes { 28 | #[allow(unused)] 29 | pub version: XmlVersion, 30 | #[allow(unused)] 31 | pub encoding: String, 32 | } 33 | 34 | /// Parsed attributes of the svg element. 35 | #[derive(Debug, Clone)] 36 | pub struct SvgAttributes { 37 | #[allow(unused)] 38 | pub namespace: Namespace, 39 | #[allow(unused)] 40 | pub version: Option, 41 | #[allow(unused)] 42 | pub class: Option, 43 | pub x: Option, 44 | pub y: Option, 45 | #[allow(unused)] 46 | pub width: Option, 47 | #[allow(unused)] 48 | pub height: Option, 49 | pub view_box: Option, 50 | pub stroke_linecap: Option, 51 | pub stroke_linejoin: Option, 52 | pub stroke_width: Option, 53 | pub stroke: Option, 54 | pub fill: Option, 55 | pub style: Option, 56 | #[allow(unused)] 57 | pub role: Option, 58 | #[allow(unused)] 59 | pub unknown_attributes: Vec, 60 | } 61 | 62 | impl ParsedSvg { 63 | pub(crate) fn parse(icon_content: R, twotone: bool) -> Result { 64 | let parser_config = ParserConfig { 65 | trim_whitespace: true, 66 | whitespace_to_characters: false, 67 | cdata_to_characters: false, 68 | ignore_comments: true, 69 | coalesce_characters: false, 70 | extra_entities: HashMap::new(), 71 | ignore_end_of_stream: false, 72 | replace_unknown_entity_references: true, 73 | ignore_root_level_whitespace: true, 74 | }; 75 | 76 | let emitter_config = EmitterConfig { 77 | line_separator: "\n".into(), 78 | indent_string: " ".into(), 79 | perform_indent: true, 80 | perform_escaping: true, 81 | write_document_declaration: false, 82 | normalize_empty_elements: true, 83 | cdata_to_characters: false, 84 | keep_element_names_stack: true, 85 | autopad_comments: true, 86 | pad_self_closing: true, 87 | }; 88 | 89 | let reader = parser_config.create_reader(icon_content); 90 | let mut writer = emitter_config.create_writer(Vec::new()); 91 | 92 | let mut xml_attributes = None; 93 | let mut svg_version = None; 94 | let mut svg_class = None; 95 | let mut svg_x = None; 96 | let mut svg_y = None; 97 | let mut svg_width = None; 98 | let mut svg_height = None; 99 | let mut svg_view_box = None; 100 | let mut svg_stroke_linecap = None; 101 | let mut svg_stroke_linejoin = None; 102 | let mut svg_stroke_width = None; 103 | let mut svg_stroke = None; 104 | let mut svg_fill = None; 105 | let mut svg_style = None; 106 | let mut svg_role = None; 107 | let mut svg_namespace = None; 108 | let mut unknown_svg_attributes: Vec = Vec::new(); 109 | 110 | let mut is_title = false; 111 | let mut in_content = false; 112 | 113 | for event in reader.into_iter() { 114 | let event = event.map_err(|err| anyhow!("Error reading XML event: {err}"))?; 115 | match event { 116 | xml::reader::XmlEvent::StartDocument { 117 | version, 118 | encoding, 119 | standalone: _, 120 | } => { 121 | xml_attributes = Some(XmlAttributes { version, encoding }); 122 | } 123 | xml::reader::XmlEvent::EndDocument => {} 124 | xml::reader::XmlEvent::StartElement { name, .. } if name.local_name == "title" => { 125 | is_title = true; 126 | } 127 | xml::reader::XmlEvent::StartElement { 128 | name, 129 | attributes, 130 | namespace, 131 | } if name.local_name == "svg" => { 132 | svg_namespace = Some(namespace); 133 | for attr in attributes { 134 | match attr.name.local_name.as_ref() { 135 | "version" => svg_version = Some(attr), 136 | // We explicitly ignore any id attribute, as ids must be unique and we cannot ensure that. Users should provide an id if required. 137 | "id" => {} 138 | // As to https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/xml:space, we explicitly ignore any "space" attribute. 139 | "space" => {} 140 | // As to https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/baseProfile, we explicitly ignore any "baseProfile" attribute. 141 | "baseProfile" => {} 142 | // This is an unrecognizable attribute which we can safely ignore. 143 | "t" => {} 144 | // This is an unrecognizable attribute which we can safely ignore. 145 | "p-id" => {} 146 | "class" => svg_class = Some(attr), 147 | // TODO; As to https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/x, the default for x and y on svg elements is 0. We could safely ignore them then. Use regex? 148 | "x" => svg_x = Some(attr), 149 | "y" => svg_y = Some(attr), 150 | "width" => svg_width = Some(attr), 151 | "height" => svg_height = Some(attr), 152 | "viewBox" => svg_view_box = Some(attr), 153 | "stroke-linecap" => svg_stroke_linecap = Some(attr), 154 | "stroke-linejoin" => svg_stroke_linejoin = Some(attr), 155 | "stroke-width" => svg_stroke_width = Some(attr), 156 | "stroke" => svg_stroke = Some(attr), 157 | "fill" => svg_fill = Some(attr), 158 | "style" => svg_style = Some(attr), 159 | "role" => svg_role = Some(attr), 160 | _ => { 161 | warn!(?attr, "Encountered an unexpected svg attribute"); 162 | unknown_svg_attributes.push(attr) 163 | } 164 | }; 165 | } 166 | in_content = true; 167 | } 168 | xml::reader::XmlEvent::EndElement { name } if name.local_name == "svg" => { 169 | break; 170 | } 171 | xml::reader::XmlEvent::EndElement { name } if name.local_name == "title" => { 172 | is_title = false; 173 | } 174 | event => { 175 | if is_title || !in_content { 176 | continue; 177 | } 178 | let event = event.as_writer_event().unwrap(); 179 | match event { 180 | xml::writer::XmlEvent::StartElement { 181 | name, 182 | attributes, 183 | namespace: _, 184 | } => { 185 | let mut is_twotone_light_element = false; 186 | 187 | let mut attributes = attributes 188 | .iter() 189 | .filter_map(|attr| { 190 | if attr.name.local_name != "fill" { 191 | return Some(Ok(*attr)); 192 | } 193 | match is_light(attr.value) { 194 | Ok(fill_contents) => match fill_contents { 195 | FillContents::Dark => None, 196 | FillContents::Unknown => Some(Ok(*attr)), 197 | FillContents::Light => { 198 | if twotone { 199 | is_twotone_light_element = true; 200 | } else { 201 | warn!(?attr, "Encountered a light fill attribute on a non twotone icon."); 202 | } 203 | Some(Ok(*attr)) 204 | }, 205 | }, 206 | Err(err) => Some(Err(err)), 207 | } 208 | }) 209 | .collect::>>()?; 210 | 211 | if is_twotone_light_element { 212 | attributes.push(Attribute { 213 | name: Name::local("class"), 214 | value: "twotone-icon-secondary-color", 215 | }); 216 | }; 217 | 218 | writer 219 | .write(xml::writer::XmlEvent::StartElement { 220 | name, 221 | attributes: attributes.into(), 222 | // namespace will be non empty, when the initially read svg element contained that information. 223 | // We are only writing the inner parts of an svg (we reconstruct an element around that later) 224 | // and therefore do not want namespace information to be emitted on any child element. 225 | namespace: Cow::Owned(Namespace::empty()), 226 | }) 227 | .map_err(|err| anyhow!("Error writing XML event: {err}"))? 228 | } 229 | other => writer 230 | .write(other) 231 | .map_err(|err| anyhow!("Error writing XML event: {err}"))?, 232 | } 233 | } 234 | } 235 | } 236 | 237 | Ok(ParsedSvg { 238 | // On Windows systems, a small percentage of icons might be rendered with " " instead of " ". 239 | // This seems to happens when the svg file contained windows-style line breaks. 240 | // TODO: Find a better way of ensuring consistent output across different system architectures. 241 | // TODO: We are using `EmitterConfig::default().line_separator("\n")`, which does not help on its own. Why? 242 | content: from_utf8(writer.inner_mut())? 243 | .to_owned() 244 | .replace(" ", "\n") 245 | .replace(" ", "\n"), 246 | xml_attributes: xml_attributes.expect("present"), 247 | svg_attributes: SvgAttributes { 248 | namespace: svg_namespace.expect("present"), 249 | version: svg_version, 250 | class: svg_class, 251 | x: svg_x, 252 | y: svg_y, 253 | width: svg_width, 254 | height: svg_height, 255 | view_box: svg_view_box, 256 | stroke_linecap: svg_stroke_linecap, 257 | stroke_linejoin: svg_stroke_linejoin, 258 | stroke_width: svg_stroke_width, 259 | stroke: svg_stroke, 260 | fill: svg_fill, 261 | style: svg_style, 262 | role: svg_role, 263 | unknown_attributes: unknown_svg_attributes, 264 | }, 265 | }) 266 | } 267 | } 268 | 269 | enum FillContents { 270 | Light, 271 | Dark, 272 | Unknown, 273 | } 274 | 275 | fn is_light(color: &str) -> Result { 276 | if !color.starts_with('#') { 277 | return Ok(FillContents::Unknown); 278 | } 279 | 280 | let (r, g, b) = if color.len() == 4 { 281 | let r = u8::from_str_radix(&color[1..2].repeat(2), 16)?; 282 | let g = u8::from_str_radix(&color[2..3].repeat(2), 16)?; 283 | let b = u8::from_str_radix(&color[3..4].repeat(2), 16)?; 284 | (r, g, b) 285 | } else if color.len() == 7 { 286 | let r = u8::from_str_radix(&color[1..3], 16)?; 287 | let g = u8::from_str_radix(&color[3..5], 16)?; 288 | let b = u8::from_str_radix(&color[5..7], 16)?; 289 | (r, g, b) 290 | } else { 291 | return Err(anyhow!("Hex value without 3 or 6 digits.")); 292 | }; 293 | match r.saturating_add(g).saturating_add(b) > 0xE0 { 294 | true => Ok(FillContents::Light), 295 | false => Ok(FillContents::Dark), 296 | } 297 | } 298 | 299 | #[cfg(test)] 300 | mod test { 301 | use super::ParsedSvg; 302 | 303 | #[test] 304 | fn parse_content() { 305 | // Let's assume we have an icon file which is using windows-style line breaks (`/r/n`, `crlf`)! 306 | // NOTE: This is the icon "ColorWand" icon from the "ionicons" package, which has `/r/n` newlines. 307 | // We have to enforce this here with an explicit .replace, as all .rs files are git-committed with an enforced `lf`-style! 308 | let original = indoc::indoc! { r#" 309 | 310 | 311 | 313 | 314 | 316 | 317 | 319 | 321 | 323 | 325 | 326 | "# }.replace("\n", "\r\n"); 327 | 328 | // When parsing such a file. 329 | let out = ParsedSvg::parse(original.as_bytes(), false).expect("no errors"); 330 | 331 | // We expect all conversions to be made to just " " (representing \n) instead of " " (representing \r\n). 332 | pretty_assertions::assert_eq!( 333 | indoc::indoc! { r#" 334 | 335 | 337 | 338 | 340 | 342 | 344 | "# }, 346 | out.content, 347 | ) 348 | } 349 | 350 | #[test] 351 | fn parse_twotone() { 352 | let original = indoc::indoc! { r###" 353 | 354 | 355 | 356 | 357 | 358 | "### }; 359 | 360 | let out = ParsedSvg::parse(original.as_bytes(), true).expect("no errors"); 361 | 362 | // We expect all conversions to be made to just " " (representing \n) instead of " " (representing \r\n). 363 | pretty_assertions::assert_eq!( 364 | indoc::indoc! { r##" 365 | 366 | 367 | "## }, 368 | out.content, 369 | ) 370 | } 371 | } 372 | -------------------------------------------------------------------------------- /build/src/main.rs: -------------------------------------------------------------------------------- 1 | use anyhow::{anyhow, Result}; 2 | use clap::{command, Parser}; 3 | use icon::SvgIcon; 4 | use package::Downloaded; 5 | use std::sync::Arc; 6 | use tokio::sync::Mutex; 7 | use tracing::{error, info}; 8 | use tracing_subscriber::filter::Targets; 9 | use tracing_subscriber::fmt::format::{Format, Pretty}; 10 | use tracing_subscriber::prelude::__tracing_subscriber_SubscriberExt; 11 | use tracing_subscriber::util::SubscriberInitExt; 12 | use tracing_subscriber::{Layer, Registry}; 13 | 14 | use crate::dirs::{LibType, Library}; 15 | use crate::package::Package; 16 | use once_cell::sync::OnceCell; 17 | 18 | mod dirs; 19 | mod fs; 20 | mod git; 21 | mod icon; 22 | mod package; 23 | mod path; 24 | mod sem_ver; 25 | 26 | #[derive(Debug, Parser)] 27 | #[command(author, version, about, long_about = None)] 28 | struct BuildArgs { 29 | /// Clear downloads and re-download. 30 | #[arg(long, default_value_t = false)] 31 | clean: bool, 32 | } 33 | 34 | static PACKAGES: OnceCell = OnceCell::new(); 35 | 36 | pub struct Packages { 37 | packages: Vec>, 38 | } 39 | 40 | impl Packages { 41 | pub fn get() -> Result<&'static [Package]> { 42 | PACKAGES 43 | .get() 44 | .ok_or(anyhow!("Packages not initialized yet.")) 45 | .map(|packages| packages.packages.as_ref()) 46 | } 47 | 48 | pub fn get_icons() -> Result> { 49 | Ok(Self::get()?.iter().flat_map(|package| package.icons().iter())) 50 | } 51 | 52 | pub fn set(packages: Vec>) -> Result<()> { 53 | PACKAGES.set(Packages { packages }).or(Err(anyhow!( 54 | "Could not set value because it was already set." 55 | ))) 56 | } 57 | } 58 | 59 | #[tokio::main] 60 | async fn main() -> Result<()> { 61 | init_tracing(tracing::level_filters::LevelFilter::INFO); 62 | 63 | assert_paths(); 64 | 65 | let args: BuildArgs = BuildArgs::parse(); 66 | info!(?args, "Parsed program arguments."); 67 | 68 | let start = time::OffsetDateTime::now_utc(); 69 | 70 | let packages: Arc>>> = Arc::new(Mutex::new(Vec::new())); 71 | 72 | info!("Downloading all packages."); 73 | let handles = Package::all() 74 | .into_iter() 75 | .map(|package| { 76 | let packages = Arc::clone(&packages); 77 | 78 | tokio::spawn(async move { 79 | if args.clean { 80 | package.remove().await?; 81 | } 82 | 83 | // Download the package. 84 | let package_type = package.ty; 85 | let package = package.download().await.map_err(|err| { 86 | error!( 87 | ?package_type, 88 | ?err, 89 | "Downloading the package failed unexpectedly." 90 | ); 91 | err 92 | })?; 93 | 94 | info!("Generating icon crate."); 95 | let lib = Library::new( 96 | path::library_crate(format!("icondata_{}", package.meta.short_name)), 97 | LibType::IconLib(&package), 98 | ); 99 | lib.generate().await?; 100 | 101 | packages.lock().await.push(package); 102 | 103 | Ok::<(), anyhow::Error>(()) 104 | }) 105 | }) 106 | .collect::>(); 107 | for handle in handles { 108 | match handle.await.unwrap() { 109 | Ok(()) => (), 110 | Err(err) => { 111 | error!(?err, "Could not process package successfully."); 112 | return Err(err); 113 | } 114 | } 115 | } 116 | 117 | info!("Setting the package global variable."); 118 | let mut packages = Arc::try_unwrap(packages) 119 | .or(Err(anyhow!("More than one hold of packages ARC.")))? 120 | .into_inner(); 121 | packages.sort_by(|a, b| a.meta.short_name.cmp(&b.meta.short_name)); 122 | Packages::set(packages)?; 123 | 124 | info!("Generating main library."); 125 | let main_lib = Library::new(path::library_crate("icondata"), LibType::MainLib); 126 | main_lib.generate().await?; 127 | 128 | info!("Generating icon index."); 129 | let icon_index = Library::new(path::library_crate("icon_index"), LibType::IconIndex); 130 | icon_index.generate().await?; 131 | 132 | let num_libs = Packages::get()?.len(); 133 | let end = time::OffsetDateTime::now_utc(); 134 | info!( 135 | took = format!("{}ms", (end - start).whole_milliseconds()), 136 | num_libs, "Build successful!" 137 | ); 138 | 139 | Ok(()) 140 | } 141 | 142 | fn init_tracing(level: tracing::level_filters::LevelFilter) { 143 | fn build_log_filter(default_log_level: tracing::level_filters::LevelFilter) -> Targets { 144 | Targets::new().with_default(default_log_level) 145 | } 146 | 147 | fn build_tracing_subscriber_fmt_layer( 148 | ) -> tracing_subscriber::fmt::Layer> { 149 | tracing_subscriber::fmt::layer() 150 | .pretty() 151 | .with_file(true) 152 | .with_line_number(true) 153 | .with_ansi(true) 154 | .with_thread_names(false) 155 | .with_thread_ids(false) 156 | } 157 | 158 | let fmt_layer_filtered = 159 | build_tracing_subscriber_fmt_layer().with_filter(build_log_filter(level)); 160 | 161 | Registry::default().with(fmt_layer_filtered).init(); 162 | } 163 | 164 | /// Simply tests that from the assumed repository root, both the "build" and "icondata" directories are visible. 165 | /// This may prevent unwanted file operations in wrong directories. 166 | fn assert_paths() { 167 | let build_crate_root = path::build_crate(""); 168 | let icondata_crate_root = path::library_crate("icondata"); 169 | info!(?build_crate_root, "Using"); 170 | info!(?icondata_crate_root, "Using"); 171 | 172 | assert_eq!( 173 | Some("build"), 174 | build_crate_root.file_name().and_then(|it| it.to_str()) 175 | ); 176 | assert_eq!( 177 | Some("icondata"), 178 | icondata_crate_root.file_name().and_then(|it| it.to_str()) 179 | ); 180 | } 181 | -------------------------------------------------------------------------------- /build/src/package/mod.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Result; 2 | use snafu::{prelude::*, Backtrace}; 3 | use std::{borrow::Cow, marker::PhantomData, path::PathBuf}; 4 | use strum::{EnumIter, IntoEnumIterator}; 5 | use tracing::{info, instrument}; 6 | 7 | use crate::{git, icon::SvgIcon, path, sem_ver::SemVer}; 8 | 9 | mod reader; 10 | 11 | /// Name of the directory, relative to the root of this crate, to which all icon packages should be downloaded. 12 | const DOWNLOAD_DIR: &str = "downloads"; 13 | 14 | #[derive(Debug, Snafu)] 15 | pub(crate) enum Error { 16 | #[snafu(display("Could not perform 'git checkout' {path:?}"))] 17 | GitCheckout { 18 | source: git::Error, 19 | target: GitTarget, 20 | path: PathBuf, 21 | backtrace: Backtrace, 22 | }, 23 | #[snafu(display("Could not perform 'git clone' {path:?}"))] 24 | GitClone { 25 | source: git::Error, 26 | url: String, 27 | target: GitTarget, 28 | path: PathBuf, 29 | backtrace: Backtrace, 30 | }, 31 | #[snafu(display("Could not perform 'git clone --no-checkout' {path:?}"))] 32 | GitCloneWithoutCheckout { 33 | source: git::Error, 34 | url: String, 35 | path: PathBuf, 36 | backtrace: Backtrace, 37 | }, 38 | #[snafu(display("Could not read icon data from {path:?}"))] 39 | IconRead { 40 | source: anyhow::Error, 41 | path: PathBuf, 42 | backtrace: Backtrace, 43 | }, 44 | } 45 | 46 | #[derive(Debug, Clone)] 47 | pub struct Package { 48 | pub ty: PackageType, 49 | pub meta: PackageMetadata, 50 | icons: Vec, 51 | phantom_data: PhantomData, 52 | } 53 | 54 | /// It is not guaranteed that the package was downloaded to the exact version specified. 55 | #[derive(Debug, Clone)] 56 | pub struct Unknown {} 57 | 58 | /// The package was successfully downloaded, and Icon data was read successfully. 59 | #[derive(Debug, Clone)] 60 | pub struct Downloaded {} 61 | 62 | impl Package { 63 | pub fn download_path(&self) -> PathBuf { 64 | path::build_crate(DOWNLOAD_DIR).join(self.meta.download_dir.as_ref()) 65 | } 66 | } 67 | 68 | impl Package { 69 | pub fn all() -> Vec> { 70 | Package::::of_types(PackageType::iter()) 71 | } 72 | 73 | fn of_types>(types: I) -> Vec> { 74 | types 75 | .map(|ty| Package:: { 76 | ty, 77 | meta: ty.metadata(), 78 | icons: Vec::new(), 79 | phantom_data: PhantomData {}, 80 | }) 81 | .collect() 82 | } 83 | 84 | #[instrument(level = "info", fields(package = self.meta.package_name.as_ref()))] 85 | pub async fn remove(&self) -> Result<()> { 86 | let download_path = self.download_path(); 87 | if download_path.exists() { 88 | info!(?download_path, "Removing..."); 89 | tokio::fs::remove_dir_all(&download_path).await?; 90 | } 91 | Ok(()) 92 | } 93 | 94 | #[instrument(level = "info", skip_all)] 95 | pub(crate) async fn download(self) -> Result> { 96 | let download_path = self.download_path(); 97 | info!(?download_path, "Downloading..."); 98 | 99 | match &self.meta.source { 100 | PackageSource::Git { url, target } => { 101 | if download_path.exists() { 102 | info!(?download_path, "Directory exists. Assuming git repository."); 103 | git::checkout(target, &download_path).with_context(|_| GitCheckoutSnafu { 104 | target: target.clone(), 105 | path: download_path.clone(), 106 | })?; 107 | } else { 108 | info!( 109 | ?download_path, 110 | "Directory does not exist. Cloning the repository." 111 | ); 112 | git::clone(url, target, &download_path) 113 | .with_context(|_| GitCloneSnafu { 114 | url: url.clone(), 115 | target: target.clone(), 116 | path: download_path.clone(), 117 | }) 118 | .or_else(|_err| { 119 | info!("Direct clone unsuccessful. Trying clone with checkout..."); 120 | git::clone_without_checkout(url, &download_path).with_context( 121 | |_| GitCloneWithoutCheckoutSnafu { 122 | url: url.clone(), 123 | path: download_path.clone(), 124 | }, 125 | )?; 126 | git::checkout(target, &download_path).with_context(|_| { 127 | GitCheckoutSnafu { 128 | target: target.clone(), 129 | path: download_path.clone(), 130 | } 131 | }) 132 | })?; 133 | } 134 | } 135 | }; 136 | 137 | let icons_path = self.download_path().join(self.meta.svg_dir.as_ref()); 138 | let mut icons = reader::read_icons(&self, icons_path.clone()).await?; 139 | icons.sort_by(|a, b| a.name.cmp(&b.name)); 140 | 141 | Ok(Package:: { 142 | ty: self.ty, 143 | meta: self.meta, 144 | icons, 145 | phantom_data: PhantomData {}, 146 | }) 147 | } 148 | } 149 | 150 | impl Package { 151 | pub fn icons(&self) -> &[SvgIcon] { 152 | &self.icons 153 | } 154 | } 155 | 156 | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, EnumIter, Clone, Copy)] 157 | pub enum PackageType { 158 | AntDesignIcons, 159 | FontAwesome, 160 | WeatherIcons, 161 | Feather, 162 | VSCodeIcons, 163 | BootstrapIcons, 164 | BoxIcons, 165 | IcoMoonFree, 166 | Ionicons, 167 | RemixIcon, 168 | SimpleIcons, 169 | Typicons, 170 | Heroicons, 171 | CssGg, 172 | TablerIcons, 173 | GithubOcticons, 174 | Lucide, 175 | Charm, 176 | MaterialDesignIcons, 177 | } 178 | 179 | #[derive(Debug, Clone)] 180 | pub struct PackageMetadata { 181 | /// Two-character identifier like "fa" for "Font Awesome". 182 | pub short_name: Cow<'static, str>, 183 | /// Full human readable name of this icon package. 184 | pub package_name: Cow<'static, str>, 185 | /// Licenses of the icon package. 186 | pub licenses: &'static [Cow<'static, str>], 187 | /// The source of this icon package. 188 | pub source: PackageSource, 189 | /// Directory to which the source should be downloaded. 190 | pub download_dir: Cow<'static, str>, 191 | /// Directory relative to download_dir under which raw SVG files can be found. 192 | pub svg_dir: Cow<'static, str>, // TODO: PathBuf? 193 | pub crate_version: SemVer, 194 | } 195 | 196 | #[derive(Debug, Clone)] 197 | pub enum PackageSource { 198 | Git { 199 | url: Cow<'static, str>, // TODO use url type? 200 | target: GitTarget, 201 | }, 202 | } 203 | 204 | #[derive(Debug, Clone)] 205 | pub enum GitTarget { 206 | Branch { 207 | name: Cow<'static, str>, 208 | commit_ref: Cow<'static, str>, 209 | version_hint: Option, 210 | }, 211 | Tag { 212 | name: Cow<'static, str>, 213 | version: SemVer, 214 | }, 215 | } 216 | 217 | impl PackageType { 218 | /// Test whether a particular string represents a category of this icon package. 219 | pub fn is_category(&self, str: &str) -> bool { 220 | // We avoid using all-numeric directories as categories, 221 | // as they most likely state the size of the icons contained and not an actual category. 222 | if str.chars().all(char::is_numeric) { 223 | return false; 224 | } 225 | match self { 226 | // SVG's located in the "logos" directory are distinct from files in the "regular" and "solid" directories. We may not use that as a category. 227 | PackageType::BoxIcons => str != "logos", 228 | _ => true, 229 | } 230 | } 231 | 232 | fn metadata(&self) -> PackageMetadata { 233 | match self { 234 | PackageType::AntDesignIcons => PackageMetadata { 235 | short_name: Cow::Borrowed("ai"), 236 | package_name: Cow::Borrowed("Ant Design Icons"), 237 | licenses: &[Cow::Borrowed("MIT")], 238 | source: PackageSource::Git { 239 | url: Cow::Borrowed("https://github.com/ant-design/ant-design-icons"), 240 | target: GitTarget::Branch { 241 | name: Cow::Borrowed("master"), 242 | commit_ref: Cow::Borrowed("e09efdead14961d3cc9ec0c24a182f66241436de"), 243 | version_hint: Some(SemVer { 244 | major: 4, 245 | minor: 3, 246 | patch: 1, 247 | prerelease: None, 248 | build: None, 249 | }), 250 | }, 251 | }, 252 | download_dir: "ant-design-icons".into(), 253 | svg_dir: Cow::Borrowed("packages/icons-svg/svg"), 254 | crate_version: SemVer { 255 | major: 0, 256 | minor: 0, 257 | patch: 10, 258 | prerelease: None, 259 | build: None, 260 | }, 261 | }, 262 | PackageType::FontAwesome => PackageMetadata { 263 | short_name: Cow::Borrowed("fa"), 264 | package_name: Cow::Borrowed("Font Awesome"), 265 | licenses: &[Cow::Borrowed("CC BY 4.0")], 266 | source: PackageSource::Git { 267 | url: Cow::Borrowed("https://github.com/FortAwesome/Font-Awesome"), 268 | target: GitTarget::Tag { 269 | name: Cow::Borrowed("6.4.2"), 270 | version: SemVer { 271 | major: 6, 272 | minor: 4, 273 | patch: 2, 274 | prerelease: None, 275 | build: None, 276 | }, 277 | }, 278 | }, 279 | download_dir: Cow::Borrowed("font-awesome"), 280 | svg_dir: Cow::Borrowed("svgs"), 281 | crate_version: SemVer { 282 | major: 0, 283 | minor: 0, 284 | patch: 10, 285 | prerelease: None, 286 | build: None, 287 | }, 288 | }, 289 | PackageType::WeatherIcons => PackageMetadata { 290 | short_name: Cow::Borrowed("wi"), 291 | package_name: Cow::Borrowed("Weather Icons"), 292 | licenses: &[Cow::Borrowed("SIL OFL 1.1")], 293 | source: PackageSource::Git { 294 | url: Cow::Borrowed("https://github.com/erikflowers/weather-icons"), 295 | target: GitTarget::Tag { 296 | name: Cow::Borrowed("2.0.12"), 297 | version: SemVer { 298 | major: 2, 299 | minor: 0, 300 | patch: 12, 301 | prerelease: None, 302 | build: None, 303 | }, 304 | }, 305 | }, 306 | download_dir: Cow::Borrowed("weather-icons"), 307 | svg_dir: Cow::Borrowed("svg"), 308 | crate_version: SemVer { 309 | major: 0, 310 | minor: 0, 311 | patch: 10, 312 | prerelease: None, 313 | build: None, 314 | }, 315 | }, 316 | PackageType::Feather => PackageMetadata { 317 | short_name: Cow::Borrowed("fi"), 318 | package_name: Cow::Borrowed("Feather"), 319 | licenses: &[Cow::Borrowed("MIT")], 320 | source: PackageSource::Git { 321 | url: Cow::Borrowed("https://github.com/feathericons/feather"), 322 | target: GitTarget::Tag { 323 | name: Cow::Borrowed("v4.29.1"), 324 | version: SemVer { 325 | major: 4, 326 | minor: 29, 327 | patch: 1, 328 | prerelease: None, 329 | build: None, 330 | }, 331 | }, 332 | }, 333 | download_dir: Cow::Borrowed("feather"), 334 | svg_dir: Cow::Borrowed("icons"), 335 | crate_version: SemVer { 336 | major: 0, 337 | minor: 0, 338 | patch: 10, 339 | prerelease: None, 340 | build: None, 341 | }, 342 | }, 343 | PackageType::VSCodeIcons => PackageMetadata { 344 | short_name: Cow::Borrowed("vs"), 345 | package_name: Cow::Borrowed("VS Code Icons"), 346 | licenses: &[Cow::Borrowed("CC BY 4.0")], 347 | source: PackageSource::Git { 348 | url: Cow::Borrowed("https://github.com/microsoft/vscode-codicons"), 349 | target: GitTarget::Tag { 350 | name: Cow::Borrowed("0.0.33"), 351 | version: SemVer { 352 | major: 0, 353 | minor: 0, 354 | patch: 33, 355 | prerelease: None, 356 | build: None, 357 | }, 358 | }, 359 | }, 360 | download_dir: Cow::Borrowed("vscode-codicons"), 361 | svg_dir: Cow::Borrowed("src/icons"), 362 | crate_version: SemVer { 363 | major: 0, 364 | minor: 0, 365 | patch: 10, 366 | prerelease: None, 367 | build: None, 368 | }, 369 | }, 370 | PackageType::BootstrapIcons => PackageMetadata { 371 | short_name: Cow::Borrowed("bs"), 372 | package_name: Cow::Borrowed("Bootstrap Icons"), 373 | licenses: &[Cow::Borrowed("MIT")], 374 | source: PackageSource::Git { 375 | url: Cow::Borrowed("https://github.com/twbs/icons"), 376 | target: GitTarget::Tag { 377 | name: Cow::Borrowed("v1.11.0"), 378 | version: SemVer { 379 | major: 1, 380 | minor: 11, 381 | patch: 0, 382 | prerelease: None, 383 | build: None, 384 | }, 385 | }, 386 | }, 387 | download_dir: Cow::Borrowed("bootstrap-icons"), 388 | svg_dir: Cow::Borrowed("icons"), 389 | crate_version: SemVer { 390 | major: 0, 391 | minor: 0, 392 | patch: 10, 393 | prerelease: None, 394 | build: None, 395 | }, 396 | }, 397 | PackageType::BoxIcons => PackageMetadata { 398 | short_name: Cow::Borrowed("bi"), 399 | package_name: Cow::Borrowed("BoxIcons"), 400 | licenses: &[Cow::Borrowed("MIT")], 401 | source: PackageSource::Git { 402 | url: Cow::Borrowed("https://github.com/atisawd/boxicons"), 403 | target: GitTarget::Branch { 404 | name: Cow::Borrowed("master"), 405 | commit_ref: Cow::Borrowed("9ffa9136e8681886bb7bd2145cd4098717ce1c11"), 406 | version_hint: Some(SemVer { 407 | major: 2, 408 | minor: 1, 409 | patch: 4, 410 | prerelease: None, 411 | build: None, 412 | }), 413 | }, 414 | }, 415 | download_dir: Cow::Borrowed("boxicons"), 416 | svg_dir: Cow::Borrowed("svg"), 417 | crate_version: SemVer { 418 | major: 0, 419 | minor: 0, 420 | patch: 10, 421 | prerelease: None, 422 | build: None, 423 | }, 424 | }, 425 | PackageType::IcoMoonFree => PackageMetadata { 426 | short_name: Cow::Borrowed("im"), 427 | package_name: Cow::Borrowed("IcoMoon Free"), 428 | licenses: &[Cow::Borrowed("CC BY 4.0"), Cow::Borrowed("GPL")], 429 | source: PackageSource::Git { 430 | url: Cow::Borrowed("https://github.com/Keyamoon/IcoMoon-Free"), 431 | target: GitTarget::Branch { 432 | name: Cow::Borrowed("master"), 433 | commit_ref: Cow::Borrowed("d006795ede82361e1bac1ee76f215cf1dc51e4ca"), 434 | version_hint: None, 435 | }, 436 | }, 437 | download_dir: Cow::Borrowed("icomoon-free"), 438 | svg_dir: Cow::Borrowed("SVG"), 439 | crate_version: SemVer { 440 | major: 0, 441 | minor: 0, 442 | patch: 10, 443 | prerelease: None, 444 | build: None, 445 | }, 446 | }, 447 | PackageType::Ionicons => PackageMetadata { 448 | short_name: Cow::Borrowed("io"), 449 | package_name: Cow::Borrowed("Ionicons"), 450 | licenses: &[Cow::Borrowed("MIT")], 451 | source: PackageSource::Git { 452 | url: Cow::Borrowed("https://github.com/ionic-team/ionicons"), 453 | target: GitTarget::Tag { 454 | name: Cow::Borrowed("v7.1.2"), 455 | version: SemVer { 456 | major: 7, 457 | minor: 1, 458 | patch: 2, 459 | prerelease: None, 460 | build: None, 461 | }, 462 | }, 463 | }, 464 | download_dir: Cow::Borrowed("ionicons"), 465 | svg_dir: Cow::Borrowed("src/svg"), 466 | crate_version: SemVer { 467 | major: 0, 468 | minor: 0, 469 | patch: 10, 470 | prerelease: None, 471 | build: None, 472 | }, 473 | }, 474 | PackageType::RemixIcon => PackageMetadata { 475 | short_name: Cow::Borrowed("ri"), 476 | package_name: Cow::Borrowed("Remix Icon"), 477 | licenses: &[Cow::Borrowed("Apache 2.0")], 478 | source: PackageSource::Git { 479 | url: Cow::Borrowed("https://github.com/Remix-Design/RemixIcon"), 480 | target: GitTarget::Tag { 481 | name: Cow::Borrowed("v3.5.0"), 482 | version: SemVer { 483 | major: 3, 484 | minor: 5, 485 | patch: 0, 486 | prerelease: None, 487 | build: None, 488 | }, 489 | }, 490 | }, 491 | download_dir: Cow::Borrowed("RemixIcon"), 492 | svg_dir: Cow::Borrowed("icons"), 493 | crate_version: SemVer { 494 | major: 0, 495 | minor: 0, 496 | patch: 10, 497 | prerelease: None, 498 | build: None, 499 | }, 500 | }, 501 | PackageType::SimpleIcons => PackageMetadata { 502 | short_name: Cow::Borrowed("si"), 503 | package_name: Cow::Borrowed("Simple Icons"), 504 | licenses: &[Cow::Borrowed("CC0 1.0 Universal")], 505 | source: PackageSource::Git { 506 | url: Cow::Borrowed("https://github.com/simple-icons/simple-icons"), 507 | target: GitTarget::Tag { 508 | name: Cow::Borrowed("9.14.0"), 509 | version: SemVer { 510 | major: 9, 511 | minor: 14, 512 | patch: 0, 513 | prerelease: None, 514 | build: None, 515 | }, 516 | }, 517 | }, 518 | download_dir: Cow::Borrowed("simple-icons"), 519 | svg_dir: Cow::Borrowed("icons"), 520 | crate_version: SemVer { 521 | major: 0, 522 | minor: 0, 523 | patch: 10, 524 | prerelease: None, 525 | build: None, 526 | }, 527 | }, 528 | PackageType::Typicons => PackageMetadata { 529 | short_name: Cow::Borrowed("ti"), 530 | package_name: Cow::Borrowed("Typicons"), 531 | licenses: &[Cow::Borrowed("CC BY-SA 3.0")], 532 | source: PackageSource::Git { 533 | url: Cow::Borrowed("https://github.com/stephenhutchings/typicons.font"), 534 | target: GitTarget::Tag { 535 | name: Cow::Borrowed("v2.1.2"), 536 | version: SemVer { 537 | major: 2, 538 | minor: 1, 539 | patch: 2, 540 | prerelease: None, 541 | build: None, 542 | }, 543 | }, 544 | }, 545 | download_dir: Cow::Borrowed("typicons"), 546 | svg_dir: Cow::Borrowed("src/svg"), 547 | crate_version: SemVer { 548 | major: 0, 549 | minor: 0, 550 | patch: 10, 551 | prerelease: None, 552 | build: None, 553 | }, 554 | }, 555 | PackageType::Heroicons => PackageMetadata { 556 | short_name: Cow::Borrowed("hi"), 557 | package_name: Cow::Borrowed("Heroicons"), 558 | licenses: &[Cow::Borrowed("MIT")], 559 | source: PackageSource::Git { 560 | url: Cow::Borrowed("https://github.com/refactoringui/heroicons"), 561 | target: GitTarget::Tag { 562 | name: Cow::Borrowed("v2.0.18"), 563 | version: SemVer { 564 | major: 2, 565 | minor: 0, 566 | patch: 18, 567 | prerelease: None, 568 | build: None, 569 | }, 570 | }, 571 | }, 572 | download_dir: Cow::Borrowed("heroicons"), 573 | svg_dir: Cow::Borrowed("src"), 574 | crate_version: SemVer { 575 | major: 0, 576 | minor: 0, 577 | patch: 10, 578 | prerelease: None, 579 | build: None, 580 | }, 581 | }, 582 | // NOTE: we cannot update to a version later than 2.1.1 because of the non-permissive 583 | // license of the newer versions. 584 | PackageType::CssGg => PackageMetadata { 585 | short_name: Cow::Borrowed("cg"), 586 | package_name: Cow::Borrowed("css.gg"), 587 | licenses: &[Cow::Borrowed("MIT")], 588 | source: PackageSource::Git { 589 | url: Cow::Borrowed("https://github.com/astrit/css.gg"), 590 | target: GitTarget::Tag { 591 | name: Cow::Borrowed("2.1.1"), 592 | version: SemVer { 593 | major: 2, 594 | minor: 1, 595 | patch: 1, 596 | prerelease: None, 597 | build: None, 598 | }, 599 | }, 600 | }, 601 | download_dir: Cow::Borrowed("css.gg"), 602 | svg_dir: Cow::Borrowed("icons/svg"), 603 | crate_version: SemVer { 604 | major: 0, 605 | minor: 0, 606 | patch: 10, 607 | prerelease: None, 608 | build: None, 609 | }, 610 | }, 611 | PackageType::TablerIcons => PackageMetadata { 612 | short_name: Cow::Borrowed("tb"), 613 | package_name: Cow::Borrowed("Tabler Icons"), 614 | licenses: &[Cow::Borrowed("MIT")], 615 | source: PackageSource::Git { 616 | url: Cow::Borrowed("https://github.com/tabler/tabler-icons"), 617 | target: GitTarget::Tag { 618 | name: Cow::Borrowed("v2.34.0"), 619 | version: SemVer { 620 | major: 2, 621 | minor: 34, 622 | patch: 0, 623 | prerelease: None, 624 | build: None, 625 | }, 626 | }, 627 | }, 628 | download_dir: Cow::Borrowed("tabler-icons"), 629 | svg_dir: Cow::Borrowed("icons"), 630 | crate_version: SemVer { 631 | major: 0, 632 | minor: 0, 633 | patch: 10, 634 | prerelease: None, 635 | build: None, 636 | }, 637 | }, 638 | PackageType::GithubOcticons => PackageMetadata { 639 | short_name: Cow::Borrowed("oc"), 640 | package_name: Cow::Borrowed("Github Octicons"), 641 | licenses: &[Cow::Borrowed("MIT")], 642 | source: PackageSource::Git { 643 | url: Cow::Borrowed("https://github.com/primer/octicons"), 644 | target: GitTarget::Tag { 645 | name: Cow::Borrowed("v19.7.0"), 646 | version: SemVer { 647 | major: 19, 648 | minor: 7, 649 | patch: 0, 650 | prerelease: None, 651 | build: None, 652 | }, 653 | }, 654 | }, 655 | download_dir: Cow::Borrowed("octicons"), 656 | svg_dir: Cow::Borrowed("icons"), 657 | crate_version: SemVer { 658 | major: 0, 659 | minor: 0, 660 | patch: 10, 661 | prerelease: None, 662 | build: None, 663 | }, 664 | }, 665 | PackageType::Lucide => PackageMetadata { 666 | short_name: Cow::Borrowed("lu"), 667 | package_name: Cow::Borrowed("Lucide"), 668 | licenses: &[Cow::Borrowed("ISC")], 669 | source: PackageSource::Git { 670 | url: Cow::Borrowed("https://github.com/lucide-icons/lucide"), 671 | target: GitTarget::Tag { 672 | name: Cow::Borrowed("0.510.0"), 673 | version: SemVer { 674 | major: 0, 675 | minor: 510, 676 | patch: 0, 677 | prerelease: None, 678 | build: None, 679 | }, 680 | }, 681 | }, 682 | download_dir: Cow::Borrowed("lucide"), 683 | svg_dir: Cow::Borrowed("icons"), 684 | crate_version: SemVer { 685 | major: 0, 686 | minor: 0, 687 | patch: 11, 688 | prerelease: None, 689 | build: None, 690 | }, 691 | }, 692 | PackageType::Charm => PackageMetadata { 693 | short_name: Cow::Borrowed("ch"), 694 | package_name: Cow::Borrowed("Charm"), 695 | licenses: &[Cow::Borrowed("MIT")], 696 | source: PackageSource::Git { 697 | url: Cow::Borrowed("https://github.com/jaynewey/charm-icons"), 698 | target: GitTarget::Tag { 699 | name: Cow::Borrowed("v0.18.0"), 700 | version: SemVer { 701 | major: 0, 702 | minor: 18, 703 | patch: 0, 704 | prerelease: None, 705 | build: None, 706 | }, 707 | }, 708 | }, 709 | download_dir: Cow::Borrowed("charm"), 710 | svg_dir: Cow::Borrowed("icons"), 711 | crate_version: SemVer { 712 | major: 0, 713 | minor: 0, 714 | patch: 10, 715 | prerelease: None, 716 | build: None, 717 | }, 718 | }, 719 | PackageType::MaterialDesignIcons => PackageMetadata { 720 | short_name: Cow::Borrowed("mdi"), 721 | package_name: Cow::Borrowed("Material Design Icons"), 722 | licenses: &[Cow::Borrowed("Apache 2.0")], 723 | source: PackageSource::Git { 724 | url: Cow::Borrowed("https://github.com/Templarian/MaterialDesign-SVG"), 725 | target: GitTarget::Tag { 726 | name: Cow::Borrowed("v7.4.47"), 727 | version: SemVer { 728 | major: 7, 729 | minor: 4, 730 | patch: 47, 731 | prerelease: None, 732 | build: None, 733 | }, 734 | }, 735 | }, 736 | download_dir: "MaterialDesign-SVG".into(), 737 | svg_dir: Cow::Borrowed("svg"), 738 | crate_version: SemVer { 739 | major: 0, 740 | minor: 0, 741 | patch: 10, 742 | prerelease: None, 743 | build: None, 744 | }, 745 | }, 746 | } 747 | } 748 | } 749 | -------------------------------------------------------------------------------- /build/src/package/reader.rs: -------------------------------------------------------------------------------- 1 | use anyhow::Result; 2 | use std::{path::PathBuf, str::FromStr}; 3 | use tracing::{debug, instrument, trace, warn}; 4 | 5 | use crate::{ 6 | icon::{Category, IconSize, SvgIcon}, 7 | package::Package, 8 | }; 9 | 10 | use super::Unknown; 11 | 12 | /// A directory to be searched, combined with: 13 | /// - a list of categories valid for the contents of that directory and 14 | /// - an icon size valid for icons inside the directory 15 | #[derive(Debug)] 16 | struct SearchDir { 17 | path: PathBuf, 18 | categories: Vec, 19 | icon_size: Option, 20 | } 21 | 22 | #[instrument(level = "info", skip(package), fields(package = ?package.ty))] 23 | pub(crate) async fn read_icons( 24 | package: &Package, 25 | icons_path: PathBuf, 26 | ) -> Result> { 27 | trace!("Reading icon data..."); 28 | let mut icons = Vec::new(); 29 | 30 | let mut search_dirs = Vec::::new(); 31 | 32 | search_dirs.push(SearchDir { 33 | path: icons_path, 34 | categories: Vec::new(), 35 | icon_size: None, 36 | }); 37 | 38 | while let Some(SearchDir { 39 | path, 40 | categories, 41 | icon_size, 42 | }) = search_dirs.pop() 43 | { 44 | let mut dir_stream = tokio::fs::read_dir(&path).await?; 45 | while let Some(entry) = dir_stream.next_entry().await? { 46 | let entry_path = entry.path(); 47 | 48 | // We found a nested directory which should also be searched. 49 | if entry.file_type().await?.is_dir() { 50 | debug!(additional_dir = ?entry_path, "Found additional directory."); 51 | 52 | let file_name = entry_path 53 | .file_name() 54 | .unwrap() 55 | .to_string_lossy() 56 | .to_string(); 57 | 58 | // The first directory being parsable as an IconSize counts. 59 | let icon_size = icon_size.or_else(|| IconSize::from_str(&file_name).ok()); 60 | 61 | // The new directory needs all categories from the current directory. 62 | // We may consider the dir name as being a "category" for all items contained in it. 63 | let mut entry_cats = categories.clone(); 64 | if package.ty.is_category(&file_name) { 65 | entry_cats.push(Category(file_name)); 66 | } 67 | 68 | search_dirs.push(SearchDir { 69 | path: path.join(&entry_path), 70 | categories: entry_cats, 71 | icon_size, 72 | }); 73 | 74 | continue; 75 | }; 76 | 77 | // We found a file and can check its extension. 78 | match entry_path.extension() { 79 | Some(file_extension) => match file_extension.to_str() { 80 | Some(file_extension) => match file_extension { 81 | "svg" => icons.push( 82 | SvgIcon::new(package, &entry_path, icon_size, categories.clone()) 83 | .await?, 84 | ), 85 | _ => trace!( 86 | ?entry_path, 87 | file_extension, 88 | "Found file without svg extension. Ignoring it." 89 | ), 90 | }, 91 | None => { 92 | warn!( 93 | ?entry_path, 94 | ?file_extension, 95 | "Found file whose file_extension (&OsStr) could not be converted to a &str. Ignoring it." 96 | ); 97 | } 98 | }, 99 | None => warn!(?entry_path, "Found file without extension. Ignoring it."), 100 | }; 101 | } 102 | } 103 | 104 | trace!(num_icons = icons.len(), "Finished retrieving icon names."); 105 | Ok(icons) 106 | } 107 | -------------------------------------------------------------------------------- /build/src/path.rs: -------------------------------------------------------------------------------- 1 | use std::path::{Path, PathBuf}; 2 | 3 | pub(crate) fn build_crate>(relative_path: P) -> PathBuf { 4 | Path::new(env!("CARGO_MANIFEST_DIR")).join(relative_path) 5 | } 6 | 7 | pub(crate) fn library_crate>( 8 | name: P, 9 | ) -> PathBuf { 10 | let mut current = build_crate(""); 11 | current.pop(); 12 | current.join(name) 13 | } 14 | -------------------------------------------------------------------------------- /build/src/sem_ver.rs: -------------------------------------------------------------------------------- 1 | use std::fmt::Display; 2 | 3 | #[derive(Debug, PartialEq, Eq, Clone)] 4 | pub struct SemVer { 5 | pub major: u32, 6 | pub minor: u32, 7 | pub patch: u32, 8 | pub prerelease: Option, 9 | pub build: Option, 10 | } 11 | 12 | impl Display for SemVer { 13 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 14 | let major = self.major; 15 | let minor = self.minor; 16 | let patch = self.patch; 17 | match (&self.prerelease, &self.build) { 18 | (None, None) => f.write_fmt(format_args!("{major}.{minor}.{patch}")), 19 | (None, Some(build)) => f.write_fmt(format_args!("{major}.{minor}.{patch}+{build}")), 20 | (Some(pre), None) => f.write_fmt(format_args!("{major}.{minor}.{patch}-{pre}")), 21 | (Some(pre), Some(build)) => { 22 | f.write_fmt(format_args!("{major}.{minor}.{patch}-{pre}+{build}")) 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /build/templates/icon_index/lib.rs: -------------------------------------------------------------------------------- 1 | use icondata::*; 2 | 3 | pub static ICONS: &[(&str, &str, icondata::Icon)] = &[ 4 | {%- for icon in icons %} 5 | ("{{ icon }}", "{{ icon|lowercase }}", {{ icon }}), 6 | {%- endfor ~%} 7 | ]; 8 | -------------------------------------------------------------------------------- /build/templates/icon_lib/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_{{short_name}}" 3 | version = "{{crate_version}}" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"{{icon_package_name}}\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } 16 | -------------------------------------------------------------------------------- /build/templates/icon_lib/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - {{short_name}} 2 | 3 | Icon data from the *{{package_name}}* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. 11 | -------------------------------------------------------------------------------- /build/templates/icon_lib/lib.rs: -------------------------------------------------------------------------------- 1 | //! This crate provides a collection of icons in the form of SVG data 2 | //! from the [__{{ long_name }}__]({{ url }}) icon set. 3 | 4 | {% for (name, svg) in name_svg.iter() -%} 5 | #[allow(non_upper_case_globals)] 6 | #[doc(hidden)] 7 | pub static {{ name }}: &icondata_core::IconData = &icondata_core::IconData { 8 | {% let attributes = svg.svg_attributes() -%} 9 | style: {{ attributes.style|attribute_value }}, 10 | x: {{ attributes.x|attribute_value }}, 11 | y: {{ attributes.y|attribute_value }}, 12 | width: {{ attributes.width|attribute_value }}, 13 | height: {{ attributes.height|attribute_value }}, 14 | view_box: {{ attributes.view_box|attribute_value }}, 15 | stroke_linecap: {{ attributes.stroke_linecap|attribute_value }}, 16 | stroke_linejoin: {{ attributes.stroke_linejoin|attribute_value }}, 17 | stroke_width: {{ attributes.stroke_width|attribute_value }}, 18 | stroke: {{ attributes.stroke|attribute_value }}, 19 | fill: {{ attributes.fill|attribute_value }}, 20 | data: r###"{{ svg.content.as_str() }}"### 21 | }; 22 | {% endfor %} 23 | -------------------------------------------------------------------------------- /build/templates/main_lib/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata" 3 | version = "0.5.0" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Icon data from free icon libraries." 7 | readme = "../README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["leptos", "icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { version = "0.1.0", path = "../icondata_core" } 16 | 17 | {% for (short_name, version) in short_name_version -%} 18 | icondata_{{short_name}} = { path = "../icondata_{{short_name}}", version = "{{version}}", optional = true } 19 | {% endfor %} 20 | 21 | [features] 22 | serde = ["icondata_core/serde"] 23 | 24 | default = [ 25 | {% for (_, feature_name) in short_name_feature_name -%} 26 | "{{feature_name}}", 27 | {% endfor -%} 28 | ] 29 | 30 | {% for (short_name, feature_name) in short_name_feature_name -%} 31 | {{feature_name}} = ["dep:icondata_{{short_name}}"] 32 | {% endfor -%} 33 | -------------------------------------------------------------------------------- /build/templates/main_lib/README.md: -------------------------------------------------------------------------------- 1 | # Icondata 2 | This crate provides SVG icon data from popular and free icon libraries. 3 | 4 | A [site](https://carloskiki.github.io/icondata) referencing every icon is available! 5 | 6 | ## Table of Contents 7 | - [Icondata](#icondata) 8 | - [Table of Contents](#table-of-contents) 9 | - [Usage](#usage) 10 | - [Icon Packages](#icon-packages) 11 | - [Developing](#developing) 12 | - [Contributing](#contributing) 13 | 14 | ## Usage 15 | Every crate is tied to a specific icon package. You can find the name of the crate corresponding to a package in the [Icon Packages](#icon-packages) section. 16 | 17 | Please see the [API documentation](https://docs.rs/icondata/latest/icondata/) to get started. 18 | 19 | ## Icon Packages 20 | Licenses of the icons provided through these libraries were extracted with best intent, 21 | but must only be taken as a hint. Please check the individual icon repositories for up-to-date license information. 22 | 23 | | Icon Library | Version | Source | License | Crate Name | 24 | | ------------ | ------- | ------ | ------- | ---------- | 25 | {% for (pack_name, version, source, license, short_name) in packages -%} 26 | | {{pack_name}} | {{version}} | {{source}} | {{license}} | icondata_{{short_name}} | 27 | {% endfor %} 28 | ## Developing 29 | This repository uses Just 30 | 31 | Simply call 32 | ```bash 33 | just 34 | ``` 35 | to see a list of available commands. 36 | 37 | You may need to install just using 38 | 39 | ```bash 40 | cargo install just 41 | ``` 42 | 43 | ## Contributing 44 | Contributions are more than welcomed! 45 | Do not hesitate add icon libraries, features, etc. 46 | -------------------------------------------------------------------------------- /build/templates/main_lib/lib.rs: -------------------------------------------------------------------------------- 1 | //! This crate provides a collection of icons in the form of SVG data. 2 | //! It re-exports all icon libraries from the icondata_* crates. 3 | //! 4 | //! The [`Icon`] type alias refers to an [`IconData`] struct, which contains the SVG data 5 | //! used by a component library. 6 | //! 7 | //! __Available icons can be searched and seleted [here](https://carloskiki.github.io/icondata/).__ 8 | //! 9 | //! [`IconData`]: icondata_core::IconData 10 | //! 11 | //! # Getting Started 12 | //! 13 | //! 1. Add the latest version of this crate to your `Cargo.toml`: 14 | //! ```toml 15 | //! [dependencies] 16 | //! icondata = "..." 17 | //! ``` 18 | //! 19 | //! 2. Import and use the icons in your code: 20 | //! ```rust 21 | //! let icon = icondata::BsBuildingDown; 22 | //! let icon = icondata::AiAlertFilled; 23 | //! ``` 24 | //! 25 | //! __Note:__ importing `icondata::*` will import all icons, which can heavily slow down rust-analyzer. 26 | //! This can be avoided by importing only the icons you need: `use icondata::{..., ...};`, or by 27 | //! using the qualified path as above. 28 | //! 29 | //! If you only need one or a few icon packs, you can enable only the features you need: 30 | //! ```toml 31 | //! [dependencies] 32 | //! icondata = { version = "...", default-features = false, features = ["lu", "bi"] } 33 | //! ``` 34 | {% for (short_name, feature_name) in short_name_feature_name %} 35 | #[cfg(feature = "{{feature_name}}")] 36 | pub use icondata_{{short_name}}::*; 37 | {%- endfor %} 38 | 39 | /// An Icon from any of the icondata_* crates. 40 | /// 41 | /// The underlying type of this type alias implements many useful traits such as `Eq`, `Hash`, 42 | /// `Serialize`, `Deserialize`, etc. See the [`IconData`](icondata_core::IconData) struct for more information. 43 | pub use icondata_core::Icon; 44 | -------------------------------------------------------------------------------- /icon_index/.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | rustflags = ["--cfg=web_sys_unstable_apis"] 3 | 4 | # [unstable] 5 | # build-std = ["std", "panic_abort", "core", "alloc"] 6 | # build-std-features = ["panic_immediate_abort"] 7 | -------------------------------------------------------------------------------- /icon_index/.gitignore: -------------------------------------------------------------------------------- 1 | /dist 2 | /node_modules 3 | -------------------------------------------------------------------------------- /icon_index/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icon_index" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [profile.release] 7 | opt-level = 'z' 8 | lto = true 9 | codegen-units = 1 10 | 11 | [dependencies] 12 | leptos = { version = "0.5", features = ["csr"] } 13 | leptos_meta = { version = "0.5", features = ["csr"] } 14 | console_error_panic_hook = "0.1" 15 | console_log = "1" 16 | log = "0.4" 17 | web-sys = { version = "0.3.66", features = [ 18 | "Window", 19 | "Navigator", 20 | "Clipboard", 21 | "Storage", 22 | "DomRect", 23 | "ScrollToOptions", 24 | "ScrollBehavior", 25 | "KeyboardEvent", 26 | ] } 27 | leptos_icons = "0.2.1" 28 | icondata = "0.5" 29 | -------------------------------------------------------------------------------- /icon_index/Trunk.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | # The index HTML file to drive the bundling process. 3 | target = "index.html" 4 | # Build in release mode. 5 | release = true 6 | # The output dir for all final assets. 7 | dist = "../site/" 8 | # The public URL from which assets are to be served. 9 | public_url = "/icondata/" 10 | 11 | [[hooks]] 12 | stage = "pre_build" 13 | command = "sh" 14 | command_arguments = ["-c", "npx tailwindcss -m -i input.css -o output.css"] 15 | -------------------------------------------------------------------------------- /icon_index/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /icon_index/input.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | 3 | @tailwind components; 4 | 5 | @tailwind utilities; 6 | 7 | @layer base { 8 | :root { 9 | --color-primary: 241 242 238; 10 | --color-secondary: 221 161 94; 11 | --color-emphasis: 67 188 205; 12 | --color-primary-dark: 30 30 36; 13 | --color-secondary-dark: 140 163 207; 14 | --color-emphasis-dark: 224 248 119; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /icon_index/output.css: -------------------------------------------------------------------------------- 1 | *,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.15 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}:root{--color-primary:241 242 238;--color-secondary:221 161 94;--color-emphasis:67 188 205;--color-primary-dark:30 30 36;--color-secondary-dark:140 163 207;--color-emphasis-dark:224 248 119}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.left-0{left:0}.right-0{right:0}.right-6{right:1.5rem}.top-0{top:0}.top-32{top:8rem}.z-50{z-index:50}.order-last{order:9999}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.mr-4{margin-right:1rem}.mt-3{margin-top:.75rem}.line-clamp-1{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.flex{display:flex}.hidden{display:none}.h-10{height:2.5rem}.h-14{height:3.5rem}.h-32{height:8rem}.w-32{width:8rem}.w-72{width:18rem}.w-screen{width:100vw}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-around{justify-content:space-around}.gap-2{gap:.5rem}.space-x-6>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.5rem*var(--tw-space-x-reverse))}.break-all{word-break:break-all}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border-2{border-width:2px}.border-4{border-width:4px}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-gray-400{--tw-border-opacity:1;border-color:rgb(156 163 175/var(--tw-border-opacity,1))}.border-secondary{border-color:rgb(var(--color-secondary)/1)}.bg-green-300{--tw-bg-opacity:1;background-color:rgb(134 239 172/var(--tw-bg-opacity,1))}.bg-primary{background-color:rgb(var(--color-primary)/1)}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.p-2{padding:.5rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.pr-16{padding-right:4rem}.text-\[0\.5rem\]{font-size:.5rem}.text-\[0\.6rem\]{font-size:.6rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-extrabold{font-weight:800}.text-black{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.text-emphasis{color:rgb(var(--color-emphasis)/1)}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.delay-75{transition-delay:75ms}.duration-200{transition-duration:.2s}.duration-500{transition-duration:.5s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\:cursor-pointer:hover{cursor:pointer}.hover\:border-primary-dark:hover{border-color:rgb(var(--color-primary-dark)/1)}.hover\:border-secondary:hover{border-color:rgb(var(--color-secondary)/1)}.hover\:bg-secondary-dark:hover{background-color:rgb(var(--color-secondary-dark)/1)}.hover\:text-emphasis:hover{color:rgb(var(--color-emphasis)/1)}.hover\:text-transparent:hover{color:transparent}.hover\:text-white:hover{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.group:hover .group-hover\:text-emphasis{color:rgb(var(--color-emphasis)/1)}.dark\:border-gray-200:is(.dark *){--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.dark\:border-secondary-dark:is(.dark *){border-color:rgb(var(--color-secondary-dark)/1)}.dark\:bg-green-600:is(.dark *){--tw-bg-opacity:1;background-color:rgb(22 163 74/var(--tw-bg-opacity,1))}.dark\:bg-primary-dark:is(.dark *){background-color:rgb(var(--color-primary-dark)/1)}.dark\:text-emphasis-dark:is(.dark *){color:rgb(var(--color-emphasis-dark)/1)}.dark\:text-gray-300:is(.dark *){--tw-text-opacity:1;color:rgb(209 213 219/var(--tw-text-opacity,1))}.dark\:text-white:is(.dark *){--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.hover\:dark\:border-primary:is(.dark *):hover{border-color:rgb(var(--color-primary)/1)}.hover\:dark\:border-secondary-dark:is(.dark *):hover{border-color:rgb(var(--color-secondary-dark)/1)}.hover\:dark\:bg-secondary:is(.dark *):hover{background-color:rgb(var(--color-secondary)/1)}.dark\:hover\:text-emphasis-dark:hover:is(.dark *){color:rgb(var(--color-emphasis-dark)/1)}.hover\:dark\:text-black:is(.dark *):hover{--tw-text-opacity:1;color:rgb(0 0 0/var(--tw-text-opacity,1))}.focus\:dark\:border-secondary-dark:is(.dark *):focus{border-color:rgb(var(--color-secondary-dark)/1)}.group:hover .group-hover\:dark\:text-emphasis-dark:is(.dark *){color:rgb(var(--color-emphasis-dark)/1)}@media (min-width:640px){.sm\:absolute{position:absolute}.sm\:order-first{order:-9999}.sm\:block{display:block}.sm\:appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.sm\:px-16{padding-left:4rem;padding-right:4rem}.sm\:text-2xl{font-size:1.5rem;line-height:2rem}} -------------------------------------------------------------------------------- /icon_index/src/alert.rs: -------------------------------------------------------------------------------- 1 | use std::collections::VecDeque; 2 | 3 | use leptos::*; 4 | use leptos_icons::Icon; 5 | 6 | #[derive(Copy, Clone, Debug)] 7 | pub struct AlertManager { 8 | pub alerts: RwSignal>, 9 | } 10 | 11 | impl AlertManager { 12 | pub fn new() -> AlertManager { 13 | Self { 14 | alerts: create_rw_signal(VecDeque::new()), 15 | } 16 | } 17 | 18 | pub fn add_alert(self, alert: Alert, duration: std::time::Duration) { 19 | self.alerts.update(|alerts| alerts.push_back(alert)); 20 | set_timeout(move || self.alerts.update(|alerts| { alerts.pop_front(); }), duration); 21 | } 22 | } 23 | 24 | #[component] 25 | pub fn Alerts(alert_manager: AlertManager) -> impl IntoView { 26 | let rendered_alerts = move || { 27 | let alerts = alert_manager 28 | .alerts 29 | .get() 30 | .into_iter() 31 | .map(|alert| alert.render()) 32 | .collect::>(); 33 | alerts 34 | }; 35 | 36 | view! { 37 |
38 | {rendered_alerts} 39 |
40 | } 41 | } 42 | 43 | #[derive(Clone, Debug)] 44 | pub struct Alert { 45 | pub text: String, 46 | } 47 | 48 | impl Alert { 49 | fn render(&self) -> impl IntoView { 50 | view! { 51 |
52 |

{&self.text}

53 | 54 |
55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /icon_index/src/app.rs: -------------------------------------------------------------------------------- 1 | use leptos::*; 2 | use leptos_meta::*; 3 | 4 | use crate::icons::*; 5 | use crate::header::*; 6 | use crate::alert::*; 7 | use crate::searchbar::*; 8 | 9 | #[derive(Clone, Copy)] 10 | pub struct DarkModeRw(pub RwSignal); 11 | 12 | #[component] 13 | pub fn App() -> impl IntoView { 14 | let dark_mode = create_rw_signal(get_theme_mode().unwrap_or_default()); 15 | provide_context(DarkModeRw(dark_mode)); 16 | let alert_manager = AlertManager::new(); 17 | provide_context(alert_manager); 18 | provide_context(SearchContent(create_rw_signal(String::new()))); 19 | 20 | create_effect(move |_| { 21 | set_theme_mode(dark_mode.get()) 22 | .unwrap_or_else(|| log::debug!("could not set theme preference")); 23 | }); 24 | 25 | view! { 26 | 32 | 33 |
34 | 35 | 36 | } 37 | } 38 | 39 | fn get_theme_mode() -> Option { 40 | window() 41 | .local_storage() 42 | .ok() 43 | .flatten()? 44 | .get_item("dark_mode") 45 | .ok() 46 | .flatten() 47 | .and_then(|value| match value.as_str() { 48 | "true" => Some(true), 49 | "false" => Some(false), 50 | _ => None, 51 | }) 52 | } 53 | 54 | /// Returns `Some(())` if operation succeeded, `None` otherwise 55 | fn set_theme_mode(mode: bool) -> Option<()> { 56 | window() 57 | .local_storage() 58 | .ok() 59 | .flatten()? 60 | .set_item("dark_mode", &mode.to_string()) 61 | .ok() 62 | } 63 | -------------------------------------------------------------------------------- /icon_index/src/header.rs: -------------------------------------------------------------------------------- 1 | use leptos::{ev::MouseEvent, *}; 2 | use leptos_icons::Icon; 3 | use web_sys::{HtmlHeadingElement, ScrollBehavior, ScrollToOptions}; 4 | 5 | use crate::searchbar::*; 6 | use crate::DarkModeRw; 7 | 8 | #[component] 9 | pub fn Header() -> impl IntoView { 10 | view! { 11 | 19 | } 20 | } 21 | 22 | #[component] 23 | pub fn HeaderLogo() -> impl IntoView { 24 | let (pos, set_pos) = create_signal((0, 0)); 25 | let DarkModeRw(dark_mode) = use_context::().unwrap(); 26 | 27 | let logo_animation = move |ev: MouseEvent| { 28 | let target = event_target::(&ev); 29 | let dom_rect: web_sys::DomRect = target.get_bounding_client_rect(); 30 | 31 | let x = (ev.client_x() as f64 - dom_rect.left()) as i32; 32 | let y = (ev.client_y() as f64 - dom_rect.top()) as i32; 33 | 34 | set_pos.set((x, y)); 35 | }; 36 | 37 | let logo_style = move || { 38 | let (gradient_suffix, text_color) = match dark_mode.get() { 39 | true => ("-dark", "white"), 40 | false => ("", "gray"), 41 | }; 42 | 43 | format!( 44 | "background: radial-gradient( 45 | 200px circle at {}px {}px, 46 | rgb(var(--color-secondary{gradient_suffix})), 47 | {text_color} 90% 48 | ); 49 | -webkit-background-clip: text; 50 | background-clip: text; 51 | ", 52 | pos.get().0, 53 | pos.get().1 54 | ) 55 | }; 56 | 57 | let scroll_to_top = move |_: MouseEvent| { 58 | let mut options = ScrollToOptions::new(); 59 | options.top(0f64).behavior(ScrollBehavior::Smooth); 60 | 61 | window().scroll_to_with_scroll_to_options(&options); 62 | }; 63 | 64 | view! { 65 |

"Icondata"

71 | } 72 | } 73 | 74 | #[component] 75 | pub fn ThemeButton() -> impl IntoView { 76 | let DarkModeRw(dark_mode) = use_context::().unwrap(); 77 | let icon_size = "1.75rem"; 78 | let trigger_theme = move |_| { 79 | dark_mode.update(|dark| *dark = !*dark); 80 | }; 81 | 82 | let icon = Signal::derive(move || { 83 | if dark_mode.get() { 84 | icondata::BsSun 85 | } else { 86 | icondata::BsMoonStars 87 | } 88 | }); 89 | 90 | view! { 91 |
104 | 105 |
106 | } 107 | } 108 | -------------------------------------------------------------------------------- /icon_index/src/icons.rs: -------------------------------------------------------------------------------- 1 | use std::{ 2 | cmp::{max, min}, 3 | time::Duration, 4 | }; 5 | 6 | use icon_index::ICONS; 7 | use leptos::{html::Main, *}; 8 | use leptos_icons::Icon; 9 | use web_sys::MouseEvent; 10 | 11 | use crate::{ 12 | alert::{Alert, AlertManager}, 13 | searchbar::SearchContent, 14 | }; 15 | 16 | // TODO: Test overscroll behaivor 17 | #[component] 18 | pub fn Icons() -> impl IntoView { 19 | let SearchContent(search_content) = use_context::().unwrap(); 20 | let container_ref: NodeRef
= create_node_ref(); 21 | let (window_size, set_window_size) = create_signal(fetch_window_size()); 22 | let (scroll_pos, set_scroll_pos) = create_signal(0); 23 | 24 | // Set event listener for the resize of the window, to update the number of columns 25 | window_event_listener(ev::resize, move |_| { 26 | set_window_size.set(fetch_window_size()); 27 | }); 28 | // Set event listener for the scrolling of the window 29 | window_event_listener(ev::scroll, move |_| { 30 | let scroll_y = window().scroll_y().unwrap() as u32; 31 | 32 | set_scroll_pos.set(scroll_y); 33 | }); 34 | 35 | let search_content_memo = create_memo(move |_| { 36 | search_content.get() 37 | }); 38 | let filtered_search = Memo::new(move |_| { 39 | log::debug!("Filtering icons"); 40 | ICONS 41 | .into_iter() 42 | .filter_map(|(name, lower_name, icon)| { 43 | lower_name 44 | .contains(&search_content_memo.get()) 45 | .then(|| (*name, *icon)) 46 | }) 47 | .collect::>() 48 | }); 49 | 50 | let item_rem_size = 10; 51 | let base_font = base_font(); 52 | let item_size = item_rem_size * base_font; 53 | 54 | let col_count = Memo::new(move |_| max(window_size.get().0 / item_size, 1)); 55 | let row_count = Memo::new(move |_| window_size.get().1 / item_size); 56 | 57 | let skipped_items = Memo::new(move |_| scroll_pos.get() / item_size * col_count.get()); 58 | 59 | let items = create_memo(move |_| { 60 | filtered_search.with(|icons: &Vec<(&str, icondata::Icon)>| { 61 | let end = skipped_items.get() + col_count.get() * (row_count.get() + 1); 62 | let show_range = (min(skipped_items.get() as usize, icons.len()))..(min(end as usize, icons.len())); 63 | 64 | icons[show_range] 65 | .iter() 66 | .enumerate() 67 | .map(move |(pos, icon)| { 68 | let top = (skipped_items.get() + pos as u32) / col_count.get() * item_size; 69 | let gap_size = (window_size.get().0 - col_count.get() * item_size) 70 | / max(col_count.get() - 1, 1); 71 | let left = (skipped_items.get() + pos as u32) % col_count.get() 72 | * (item_size + gap_size); 73 | 74 | view! { 75 | 76 | } 77 | }) 78 | .collect_view() 79 | }) 80 | }); 81 | 82 | // 0. Get rem conversion 83 | // 1. Get the number of columns 84 | // 2. Get the number of rows 85 | // 3. Get the number of icons in window + 2 rows on top and bottom 86 | // 4. Every icon should have its own pos 87 | let container_height = move || { 88 | let item_count = filtered_search.with(|icons| icons.len()); 89 | let height = (item_count as u32 / col_count.get() + 1) * item_size; 90 | let styles = format!("height: {height}px;"); 91 | styles 92 | }; 93 | 94 | view! { 95 |
99 | {items} 100 |
101 | } 102 | } 103 | 104 | fn fetch_window_size() -> (u32, u32) { 105 | let html = document().document_element().unwrap(); 106 | let width = html.client_width(); 107 | let height = html.client_height(); 108 | (width as u32, height as u32) 109 | } 110 | 111 | // TODO: Error handling 112 | fn base_font() -> u32 { 113 | let base_font: u32 = window() 114 | .get_computed_style(&document().body().unwrap()) 115 | .unwrap() 116 | .unwrap() 117 | .get_property_value("font-size") 118 | .expect("could not get base font size") 119 | .strip_suffix("px") 120 | .unwrap() 121 | .parse() 122 | .unwrap(); 123 | base_font 124 | } 125 | 126 | #[component] 127 | pub fn IconItem(icon: icondata::Icon, name: &'static str, top: u32, left: u32) -> impl IntoView { 128 | let text_size = match name.len() { 129 | 0..=16 => "text-xs", 130 | 17..=22 => "text-[0.6rem]", 131 | _ => "text-[0.5rem]", 132 | }; 133 | 134 | let alert_manager = use_context::().unwrap(); 135 | 136 | let copy_name = move |_: MouseEvent| { 137 | let clipboard = window().navigator().clipboard().unwrap(); 138 | let _ = clipboard.write_text(name); 139 | 140 | let alert = Alert { 141 | text: format!("Copied! {}", name), 142 | }; 143 | 144 | alert_manager.add_alert(alert, Duration::from_secs(2)); 145 | }; 146 | 147 | view! { 148 |
156 | 159 |

{move || name}

160 |
161 | } 162 | } 163 | -------------------------------------------------------------------------------- /icon_index/src/main.rs: -------------------------------------------------------------------------------- 1 | use leptos::*; 2 | 3 | use app::*; 4 | 5 | mod icons; 6 | mod app; 7 | mod header; 8 | mod searchbar; 9 | mod alert; 10 | // mod virtual_view; 11 | 12 | pub fn main() { 13 | _ = console_log::init_with_level(log::Level::Debug); 14 | console_error_panic_hook::set_once(); 15 | mount_to_body(|| { 16 | view! { 17 | 18 | } 19 | }) 20 | } 21 | -------------------------------------------------------------------------------- /icon_index/src/searchbar.rs: -------------------------------------------------------------------------------- 1 | use leptos::*; 2 | use leptos_icons::Icon; 3 | use web_sys::KeyboardEvent; 4 | 5 | #[derive(Clone, Debug)] 6 | pub struct SearchContent(pub RwSignal); 7 | 8 | #[component] 9 | pub fn SearchBar() -> impl IntoView { 10 | let SearchContent(search_content) = use_context::().unwrap(); 11 | 12 | let key_pressed = move |event: KeyboardEvent| { 13 | let input_string = event_target_value(&event); 14 | search_content.set(input_string.to_lowercase()); 15 | }; 16 | 17 | view! { 18 |
19 | 22 | 23 |
24 | } 25 | } 26 | -------------------------------------------------------------------------------- /icon_index/tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | content: [ 3 | "./src/**/*.rs", 4 | "./index.html", 5 | ], 6 | darkMode: "class", 7 | theme: { 8 | extend: { 9 | colors: { 10 | primary: "rgb(var(--color-primary) / 1)", 11 | secondary: "rgb(var(--color-secondary) / 1)", 12 | emphasis: "rgb(var(--color-emphasis) / 1)", 13 | 'primary-dark': "rgb(var(--color-primary-dark) / 1)", 14 | 'secondary-dark': "rgb(var(--color-secondary-dark) / 1)", 15 | 'emphasis-dark': "rgb(var(--color-emphasis-dark) / 1)", 16 | } 17 | } 18 | }, 19 | } 20 | -------------------------------------------------------------------------------- /icondata/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "heck" 7 | version = "0.4.1" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 10 | 11 | [[package]] 12 | name = "icondata" 13 | version = "0.0.8" 14 | dependencies = [ 15 | "icondata_ai", 16 | "icondata_bi", 17 | "icondata_bs", 18 | "icondata_cg", 19 | "icondata_ch", 20 | "icondata_core", 21 | "icondata_fa", 22 | "icondata_fi", 23 | "icondata_hi", 24 | "icondata_im", 25 | "icondata_io", 26 | "icondata_lu", 27 | "icondata_macros", 28 | "icondata_oc", 29 | "icondata_ri", 30 | "icondata_si", 31 | "icondata_tb", 32 | "icondata_ti", 33 | "icondata_vs", 34 | "icondata_wi", 35 | "serde", 36 | ] 37 | 38 | [[package]] 39 | name = "icondata_ai" 40 | version = "0.0.8" 41 | source = "registry+https://github.com/rust-lang/crates.io-index" 42 | checksum = "5c8fe5fa2eed7715d5388e046d97f09d3baddd155b487454eb9cda3168c79d4b" 43 | dependencies = [ 44 | "icondata_core", 45 | "serde", 46 | "strum", 47 | ] 48 | 49 | [[package]] 50 | name = "icondata_bi" 51 | version = "0.0.8" 52 | source = "registry+https://github.com/rust-lang/crates.io-index" 53 | checksum = "c0953768d0b9cdd2da0b85b5ef44a0b43078d59411282b8da8fe6c13b123e01f" 54 | dependencies = [ 55 | "icondata_core", 56 | "serde", 57 | "strum", 58 | ] 59 | 60 | [[package]] 61 | name = "icondata_bs" 62 | version = "0.0.8" 63 | source = "registry+https://github.com/rust-lang/crates.io-index" 64 | checksum = "3a1eeaedae6788b08308e1b050eeddaffa62dd5f2368469ef980c8e0e75837e3" 65 | dependencies = [ 66 | "icondata_core", 67 | "serde", 68 | "strum", 69 | ] 70 | 71 | [[package]] 72 | name = "icondata_cg" 73 | version = "0.0.8" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "b90cda35aa524761219a8dbd006513734e08a4cf92ee05820b01749e76435462" 76 | dependencies = [ 77 | "icondata_core", 78 | "serde", 79 | "strum", 80 | ] 81 | 82 | [[package]] 83 | name = "icondata_ch" 84 | version = "0.0.8" 85 | source = "registry+https://github.com/rust-lang/crates.io-index" 86 | checksum = "80ec6aec272bdbadfd83f0f3b61ae4bd4ba5a4aa4cea1b6759923fe3bfb26ff5" 87 | dependencies = [ 88 | "icondata_core", 89 | "serde", 90 | "strum", 91 | ] 92 | 93 | [[package]] 94 | name = "icondata_core" 95 | version = "0.0.2" 96 | source = "registry+https://github.com/rust-lang/crates.io-index" 97 | checksum = "1640a4c1d5ddd08ab1d9854ffa7a2fa3dc52339492676b6d3031e77ca579f434" 98 | 99 | [[package]] 100 | name = "icondata_fa" 101 | version = "0.0.8" 102 | source = "registry+https://github.com/rust-lang/crates.io-index" 103 | checksum = "a515ecda53468cf4a383409da1708da2e4c00253561873c46304cd7f412e9414" 104 | dependencies = [ 105 | "icondata_core", 106 | "serde", 107 | "strum", 108 | ] 109 | 110 | [[package]] 111 | name = "icondata_fi" 112 | version = "0.0.8" 113 | source = "registry+https://github.com/rust-lang/crates.io-index" 114 | checksum = "a68806fd5abc6bcf395fc54f6193b0f9085aa2a6c740d72825e7e43be4d6a366" 115 | dependencies = [ 116 | "icondata_core", 117 | "serde", 118 | "strum", 119 | ] 120 | 121 | [[package]] 122 | name = "icondata_hi" 123 | version = "0.0.8" 124 | source = "registry+https://github.com/rust-lang/crates.io-index" 125 | checksum = "bdc832ba990aac731425064fbb94bd8a8a26e8af6b0622154645b8df38c8e619" 126 | dependencies = [ 127 | "icondata_core", 128 | "serde", 129 | "strum", 130 | ] 131 | 132 | [[package]] 133 | name = "icondata_im" 134 | version = "0.0.8" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | checksum = "7819397102c0d80a4ad7514e704e06c9c4a43a87007ea523c21ef62e11e31b2b" 137 | dependencies = [ 138 | "icondata_core", 139 | "serde", 140 | "strum", 141 | ] 142 | 143 | [[package]] 144 | name = "icondata_io" 145 | version = "0.0.8" 146 | source = "registry+https://github.com/rust-lang/crates.io-index" 147 | checksum = "134d9fb91cdd0e7ac971199e2c8c8eb917a975faeeee54b227a0068c4f70c886" 148 | dependencies = [ 149 | "icondata_core", 150 | "serde", 151 | "strum", 152 | ] 153 | 154 | [[package]] 155 | name = "icondata_lu" 156 | version = "0.0.8" 157 | source = "registry+https://github.com/rust-lang/crates.io-index" 158 | checksum = "0736406ccda9e60aa7328091258dda8b0cfb75c296cd6513c16bd4c0e47c64b2" 159 | dependencies = [ 160 | "icondata_core", 161 | "serde", 162 | "strum", 163 | ] 164 | 165 | [[package]] 166 | name = "icondata_macros" 167 | version = "0.1.2" 168 | source = "registry+https://github.com/rust-lang/crates.io-index" 169 | checksum = "764e3608a0f21fa9f43f9d9237c524a9e10316d97d89b413a9c45e5dddb9b162" 170 | 171 | [[package]] 172 | name = "icondata_oc" 173 | version = "0.0.8" 174 | source = "registry+https://github.com/rust-lang/crates.io-index" 175 | checksum = "667cb0b74516ec3d4ce357b9ec94189eab6e1bfe5a4a28b5e36579028a8075b1" 176 | dependencies = [ 177 | "icondata_core", 178 | "serde", 179 | "strum", 180 | ] 181 | 182 | [[package]] 183 | name = "icondata_ri" 184 | version = "0.0.8" 185 | source = "registry+https://github.com/rust-lang/crates.io-index" 186 | checksum = "1b1d3adc5b64b22d10ab23a7b1a005f4cb52f3d08909f578fbaa09af9f9c0b7b" 187 | dependencies = [ 188 | "icondata_core", 189 | "serde", 190 | "strum", 191 | ] 192 | 193 | [[package]] 194 | name = "icondata_si" 195 | version = "0.0.8" 196 | source = "registry+https://github.com/rust-lang/crates.io-index" 197 | checksum = "49619d1d1260b5d8b6774c7b11f7d3f8670013b9de902e1e086266d2e3cd7482" 198 | dependencies = [ 199 | "icondata_core", 200 | "serde", 201 | "strum", 202 | ] 203 | 204 | [[package]] 205 | name = "icondata_tb" 206 | version = "0.0.8" 207 | source = "registry+https://github.com/rust-lang/crates.io-index" 208 | checksum = "5b8a3cb60c645909aa6041f11e5713a4a25f9a161c4d2798e415d4433f502d1d" 209 | dependencies = [ 210 | "icondata_core", 211 | "serde", 212 | "strum", 213 | ] 214 | 215 | [[package]] 216 | name = "icondata_ti" 217 | version = "0.0.8" 218 | source = "registry+https://github.com/rust-lang/crates.io-index" 219 | checksum = "ec37afd0e078afcf79dff04d6742d4c542dc29860629b228c2baca0c2f7ddf93" 220 | dependencies = [ 221 | "icondata_core", 222 | "serde", 223 | "strum", 224 | ] 225 | 226 | [[package]] 227 | name = "icondata_vs" 228 | version = "0.0.8" 229 | source = "registry+https://github.com/rust-lang/crates.io-index" 230 | checksum = "23b82ee337916a89f53d20656ff46fa1cbdeeb89e0f42283831301ed2a275cf3" 231 | dependencies = [ 232 | "icondata_core", 233 | "serde", 234 | "strum", 235 | ] 236 | 237 | [[package]] 238 | name = "icondata_wi" 239 | version = "0.0.8" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "51b4dd468959cd64184546573d7e67d62607a6b70d6c05951b3426e733821ed8" 242 | dependencies = [ 243 | "icondata_core", 244 | "serde", 245 | "strum", 246 | ] 247 | 248 | [[package]] 249 | name = "proc-macro2" 250 | version = "1.0.58" 251 | source = "registry+https://github.com/rust-lang/crates.io-index" 252 | checksum = "fa1fb82fc0c281dd9671101b66b771ebbe1eaf967b96ac8740dcba4b70005ca8" 253 | dependencies = [ 254 | "unicode-ident", 255 | ] 256 | 257 | [[package]] 258 | name = "quote" 259 | version = "1.0.27" 260 | source = "registry+https://github.com/rust-lang/crates.io-index" 261 | checksum = "8f4f29d145265ec1c483c7c654450edde0bfe043d3938d6972630663356d9500" 262 | dependencies = [ 263 | "proc-macro2", 264 | ] 265 | 266 | [[package]] 267 | name = "rustversion" 268 | version = "1.0.12" 269 | source = "registry+https://github.com/rust-lang/crates.io-index" 270 | checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" 271 | 272 | [[package]] 273 | name = "serde" 274 | version = "1.0.163" 275 | source = "registry+https://github.com/rust-lang/crates.io-index" 276 | checksum = "2113ab51b87a539ae008b5c6c02dc020ffa39afd2d83cffcb3f4eb2722cebec2" 277 | dependencies = [ 278 | "serde_derive", 279 | ] 280 | 281 | [[package]] 282 | name = "serde_derive" 283 | version = "1.0.163" 284 | source = "registry+https://github.com/rust-lang/crates.io-index" 285 | checksum = "8c805777e3930c8883389c602315a24224bcc738b63905ef87cd1420353ea93e" 286 | dependencies = [ 287 | "proc-macro2", 288 | "quote", 289 | "syn 2.0.16", 290 | ] 291 | 292 | [[package]] 293 | name = "strum" 294 | version = "0.24.1" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" 297 | dependencies = [ 298 | "strum_macros", 299 | ] 300 | 301 | [[package]] 302 | name = "strum_macros" 303 | version = "0.24.3" 304 | source = "registry+https://github.com/rust-lang/crates.io-index" 305 | checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" 306 | dependencies = [ 307 | "heck", 308 | "proc-macro2", 309 | "quote", 310 | "rustversion", 311 | "syn 1.0.109", 312 | ] 313 | 314 | [[package]] 315 | name = "syn" 316 | version = "1.0.109" 317 | source = "registry+https://github.com/rust-lang/crates.io-index" 318 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 319 | dependencies = [ 320 | "proc-macro2", 321 | "quote", 322 | "unicode-ident", 323 | ] 324 | 325 | [[package]] 326 | name = "syn" 327 | version = "2.0.16" 328 | source = "registry+https://github.com/rust-lang/crates.io-index" 329 | checksum = "a6f671d4b5ffdb8eadec19c0ae67fe2639df8684bd7bc4b83d986b8db549cf01" 330 | dependencies = [ 331 | "proc-macro2", 332 | "quote", 333 | "unicode-ident", 334 | ] 335 | 336 | [[package]] 337 | name = "unicode-ident" 338 | version = "1.0.8" 339 | source = "registry+https://github.com/rust-lang/crates.io-index" 340 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 341 | -------------------------------------------------------------------------------- /icondata/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata" 3 | version = "0.5.0" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Icon data from free icon libraries." 7 | readme = "../README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["leptos", "icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { version = "0.1.0", path = "../icondata_core" } 16 | 17 | icondata_ai = { path = "../icondata_ai", version = "0.0.10", optional = true } 18 | icondata_bi = { path = "../icondata_bi", version = "0.0.10", optional = true } 19 | icondata_bs = { path = "../icondata_bs", version = "0.0.10", optional = true } 20 | icondata_cg = { path = "../icondata_cg", version = "0.0.10", optional = true } 21 | icondata_ch = { path = "../icondata_ch", version = "0.0.10", optional = true } 22 | icondata_fa = { path = "../icondata_fa", version = "0.0.10", optional = true } 23 | icondata_fi = { path = "../icondata_fi", version = "0.0.10", optional = true } 24 | icondata_hi = { path = "../icondata_hi", version = "0.0.10", optional = true } 25 | icondata_im = { path = "../icondata_im", version = "0.0.10", optional = true } 26 | icondata_io = { path = "../icondata_io", version = "0.0.10", optional = true } 27 | icondata_lu = { path = "../icondata_lu", version = "0.0.11", optional = true } 28 | icondata_mdi = { path = "../icondata_mdi", version = "0.0.10", optional = true } 29 | icondata_oc = { path = "../icondata_oc", version = "0.0.10", optional = true } 30 | icondata_ri = { path = "../icondata_ri", version = "0.0.10", optional = true } 31 | icondata_si = { path = "../icondata_si", version = "0.0.10", optional = true } 32 | icondata_tb = { path = "../icondata_tb", version = "0.0.10", optional = true } 33 | icondata_ti = { path = "../icondata_ti", version = "0.0.10", optional = true } 34 | icondata_vs = { path = "../icondata_vs", version = "0.0.10", optional = true } 35 | icondata_wi = { path = "../icondata_wi", version = "0.0.10", optional = true } 36 | 37 | 38 | [features] 39 | serde = ["icondata_core/serde"] 40 | 41 | default = [ 42 | "ant-design-icons", 43 | "box-icons", 44 | "bootstrap-icons", 45 | "css-gg", 46 | "charm", 47 | "font-awesome", 48 | "feather", 49 | "heroicons", 50 | "ico-moon-free", 51 | "ionicons", 52 | "lucide", 53 | "material-design-icons", 54 | "github-octicons", 55 | "remix-icon", 56 | "simple-icons", 57 | "tabler-icons", 58 | "typicons", 59 | "vs-code-icons", 60 | "weather-icons", 61 | ] 62 | 63 | ant-design-icons = ["dep:icondata_ai"] 64 | box-icons = ["dep:icondata_bi"] 65 | bootstrap-icons = ["dep:icondata_bs"] 66 | css-gg = ["dep:icondata_cg"] 67 | charm = ["dep:icondata_ch"] 68 | font-awesome = ["dep:icondata_fa"] 69 | feather = ["dep:icondata_fi"] 70 | heroicons = ["dep:icondata_hi"] 71 | ico-moon-free = ["dep:icondata_im"] 72 | ionicons = ["dep:icondata_io"] 73 | lucide = ["dep:icondata_lu"] 74 | material-design-icons = ["dep:icondata_mdi"] 75 | github-octicons = ["dep:icondata_oc"] 76 | remix-icon = ["dep:icondata_ri"] 77 | simple-icons = ["dep:icondata_si"] 78 | tabler-icons = ["dep:icondata_tb"] 79 | typicons = ["dep:icondata_ti"] 80 | vs-code-icons = ["dep:icondata_vs"] 81 | weather-icons = ["dep:icondata_wi"] 82 | -------------------------------------------------------------------------------- /icondata/src/lib.rs: -------------------------------------------------------------------------------- 1 | //! This crate provides a collection of icons in the form of SVG data. 2 | //! It re-exports all icon libraries from the icondata_* crates. 3 | //! 4 | //! The [`Icon`] type alias refers to an [`IconData`] struct, which contains the SVG data 5 | //! used by a component library. 6 | //! 7 | //! __Available icons can be searched and seleted [here](https://carloskiki.github.io/icondata/).__ 8 | //! 9 | //! [`IconData`]: icondata_core::IconData 10 | //! 11 | //! # Getting Started 12 | //! 13 | //! 1. Add the latest version of this crate to your `Cargo.toml`: 14 | //! ```toml 15 | //! [dependencies] 16 | //! icondata = "..." 17 | //! ``` 18 | //! 19 | //! 2. Import and use the icons in your code: 20 | //! ```rust 21 | //! let icon = icondata::BsBuildingDown; 22 | //! let icon = icondata::AiAlertFilled; 23 | //! ``` 24 | //! 25 | //! __Note:__ importing `icondata::*` will import all icons, which can heavily slow down rust-analyzer. 26 | //! This can be avoided by importing only the icons you need: `use icondata::{..., ...};`, or by 27 | //! using the qualified path as above. 28 | //! 29 | //! If you only need one or a few icon packs, you can enable only the features you need: 30 | //! ```toml 31 | //! [dependencies] 32 | //! icondata = { version = "...", default-features = false, features = ["lu", "bi"] } 33 | //! ``` 34 | 35 | #[cfg(feature = "ant-design-icons")] 36 | pub use icondata_ai::*; 37 | #[cfg(feature = "box-icons")] 38 | pub use icondata_bi::*; 39 | #[cfg(feature = "bootstrap-icons")] 40 | pub use icondata_bs::*; 41 | #[cfg(feature = "css-gg")] 42 | pub use icondata_cg::*; 43 | #[cfg(feature = "charm")] 44 | pub use icondata_ch::*; 45 | #[cfg(feature = "font-awesome")] 46 | pub use icondata_fa::*; 47 | #[cfg(feature = "feather")] 48 | pub use icondata_fi::*; 49 | #[cfg(feature = "heroicons")] 50 | pub use icondata_hi::*; 51 | #[cfg(feature = "ico-moon-free")] 52 | pub use icondata_im::*; 53 | #[cfg(feature = "ionicons")] 54 | pub use icondata_io::*; 55 | #[cfg(feature = "lucide")] 56 | pub use icondata_lu::*; 57 | #[cfg(feature = "material-design-icons")] 58 | pub use icondata_mdi::*; 59 | #[cfg(feature = "github-octicons")] 60 | pub use icondata_oc::*; 61 | #[cfg(feature = "remix-icon")] 62 | pub use icondata_ri::*; 63 | #[cfg(feature = "simple-icons")] 64 | pub use icondata_si::*; 65 | #[cfg(feature = "tabler-icons")] 66 | pub use icondata_tb::*; 67 | #[cfg(feature = "typicons")] 68 | pub use icondata_ti::*; 69 | #[cfg(feature = "vs-code-icons")] 70 | pub use icondata_vs::*; 71 | #[cfg(feature = "weather-icons")] 72 | pub use icondata_wi::*; 73 | 74 | /// An Icon from any of the icondata_* crates. 75 | /// 76 | /// The underlying type of this type alias implements many useful traits such as `Eq`, `Hash`, 77 | /// `Serialize`, `Deserialize`, etc. See the [`IconData`](icondata_core::IconData) struct for more information. 78 | pub use icondata_core::Icon; -------------------------------------------------------------------------------- /icondata_ai/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "heck" 7 | version = "0.4.1" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 10 | 11 | [[package]] 12 | name = "icondata_ai" 13 | version = "0.0.8" 14 | dependencies = [ 15 | "icondata_core", 16 | "serde", 17 | "strum", 18 | ] 19 | 20 | [[package]] 21 | name = "icondata_core" 22 | version = "0.0.2" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "1640a4c1d5ddd08ab1d9854ffa7a2fa3dc52339492676b6d3031e77ca579f434" 25 | 26 | [[package]] 27 | name = "proc-macro2" 28 | version = "1.0.56" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" 31 | dependencies = [ 32 | "unicode-ident", 33 | ] 34 | 35 | [[package]] 36 | name = "quote" 37 | version = "1.0.26" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" 40 | dependencies = [ 41 | "proc-macro2", 42 | ] 43 | 44 | [[package]] 45 | name = "rustversion" 46 | version = "1.0.12" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" 49 | 50 | [[package]] 51 | name = "serde" 52 | version = "1.0.160" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" 55 | dependencies = [ 56 | "serde_derive", 57 | ] 58 | 59 | [[package]] 60 | name = "serde_derive" 61 | version = "1.0.160" 62 | source = "registry+https://github.com/rust-lang/crates.io-index" 63 | checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" 64 | dependencies = [ 65 | "proc-macro2", 66 | "quote", 67 | "syn 2.0.15", 68 | ] 69 | 70 | [[package]] 71 | name = "strum" 72 | version = "0.24.1" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" 75 | dependencies = [ 76 | "strum_macros", 77 | ] 78 | 79 | [[package]] 80 | name = "strum_macros" 81 | version = "0.24.3" 82 | source = "registry+https://github.com/rust-lang/crates.io-index" 83 | checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" 84 | dependencies = [ 85 | "heck", 86 | "proc-macro2", 87 | "quote", 88 | "rustversion", 89 | "syn 1.0.109", 90 | ] 91 | 92 | [[package]] 93 | name = "syn" 94 | version = "1.0.109" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 97 | dependencies = [ 98 | "proc-macro2", 99 | "quote", 100 | "unicode-ident", 101 | ] 102 | 103 | [[package]] 104 | name = "syn" 105 | version = "2.0.15" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" 108 | dependencies = [ 109 | "proc-macro2", 110 | "quote", 111 | "unicode-ident", 112 | ] 113 | 114 | [[package]] 115 | name = "unicode-ident" 116 | version = "1.0.8" 117 | source = "registry+https://github.com/rust-lang/crates.io-index" 118 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 119 | -------------------------------------------------------------------------------- /icondata_ai/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_ai" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Ant Design Icons\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_ai/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - ai 2 | 3 | Icon data from the *Ant Design Icons* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_bi/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "heck" 7 | version = "0.4.1" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 10 | 11 | [[package]] 12 | name = "icondata_bi" 13 | version = "0.0.6" 14 | dependencies = [ 15 | "icondata_core", 16 | "serde", 17 | "strum", 18 | ] 19 | 20 | [[package]] 21 | name = "icondata_core" 22 | version = "0.0.2" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "1640a4c1d5ddd08ab1d9854ffa7a2fa3dc52339492676b6d3031e77ca579f434" 25 | 26 | [[package]] 27 | name = "proc-macro2" 28 | version = "1.0.56" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" 31 | dependencies = [ 32 | "unicode-ident", 33 | ] 34 | 35 | [[package]] 36 | name = "quote" 37 | version = "1.0.26" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" 40 | dependencies = [ 41 | "proc-macro2", 42 | ] 43 | 44 | [[package]] 45 | name = "rustversion" 46 | version = "1.0.12" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" 49 | 50 | [[package]] 51 | name = "serde" 52 | version = "1.0.160" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" 55 | dependencies = [ 56 | "serde_derive", 57 | ] 58 | 59 | [[package]] 60 | name = "serde_derive" 61 | version = "1.0.160" 62 | source = "registry+https://github.com/rust-lang/crates.io-index" 63 | checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" 64 | dependencies = [ 65 | "proc-macro2", 66 | "quote", 67 | "syn 2.0.15", 68 | ] 69 | 70 | [[package]] 71 | name = "strum" 72 | version = "0.24.1" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" 75 | dependencies = [ 76 | "strum_macros", 77 | ] 78 | 79 | [[package]] 80 | name = "strum_macros" 81 | version = "0.24.3" 82 | source = "registry+https://github.com/rust-lang/crates.io-index" 83 | checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" 84 | dependencies = [ 85 | "heck", 86 | "proc-macro2", 87 | "quote", 88 | "rustversion", 89 | "syn 1.0.109", 90 | ] 91 | 92 | [[package]] 93 | name = "syn" 94 | version = "1.0.109" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 97 | dependencies = [ 98 | "proc-macro2", 99 | "quote", 100 | "unicode-ident", 101 | ] 102 | 103 | [[package]] 104 | name = "syn" 105 | version = "2.0.15" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" 108 | dependencies = [ 109 | "proc-macro2", 110 | "quote", 111 | "unicode-ident", 112 | ] 113 | 114 | [[package]] 115 | name = "unicode-ident" 116 | version = "1.0.8" 117 | source = "registry+https://github.com/rust-lang/crates.io-index" 118 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 119 | -------------------------------------------------------------------------------- /icondata_bi/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_bi" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"BoxIcons\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_bi/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - bi 2 | 3 | Icon data from the *BoxIcons* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_bs/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "icondata_bs" 7 | version = "0.0.1" 8 | dependencies = [ 9 | "icondata_core", 10 | "serde", 11 | ] 12 | 13 | [[package]] 14 | name = "icondata_core" 15 | version = "0.0.1" 16 | 17 | [[package]] 18 | name = "proc-macro2" 19 | version = "1.0.56" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" 22 | dependencies = [ 23 | "unicode-ident", 24 | ] 25 | 26 | [[package]] 27 | name = "quote" 28 | version = "1.0.26" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" 31 | dependencies = [ 32 | "proc-macro2", 33 | ] 34 | 35 | [[package]] 36 | name = "serde" 37 | version = "1.0.160" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" 40 | dependencies = [ 41 | "serde_derive", 42 | ] 43 | 44 | [[package]] 45 | name = "serde_derive" 46 | version = "1.0.160" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" 49 | dependencies = [ 50 | "proc-macro2", 51 | "quote", 52 | "syn", 53 | ] 54 | 55 | [[package]] 56 | name = "syn" 57 | version = "2.0.15" 58 | source = "registry+https://github.com/rust-lang/crates.io-index" 59 | checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" 60 | dependencies = [ 61 | "proc-macro2", 62 | "quote", 63 | "unicode-ident", 64 | ] 65 | 66 | [[package]] 67 | name = "unicode-ident" 68 | version = "1.0.8" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 71 | -------------------------------------------------------------------------------- /icondata_bs/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_bs" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Bootstrap Icons\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_bs/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - bs 2 | 3 | Icon data from the *Bootstrap Icons* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_cg/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_cg" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"css.gg\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_cg/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - cg 2 | 3 | Icon data from the *css.gg* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_ch/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_ch" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Charm\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_ch/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - ch 2 | 3 | Icon data from the *Charm* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_core/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "icondata_core" 7 | version = "0.0.2" 8 | -------------------------------------------------------------------------------- /icondata_core/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_core" 3 | version = "0.1.0" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Provides a common struct for representing svg icon data" 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | 13 | [dependencies] 14 | serde = { version = "1", optional = true, features = ["derive"] } 15 | 16 | [features] 17 | serde = ["dep:serde"] 18 | -------------------------------------------------------------------------------- /icondata_core/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - core 2 | 3 | A simple struct representing svg icon data. Meant to be used with the `icondata` crate. 4 | -------------------------------------------------------------------------------- /icondata_core/src/lib.rs: -------------------------------------------------------------------------------- 1 | #[derive(Debug, PartialEq, Eq, Clone, Copy, Hash)] 2 | #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] 3 | pub struct IconData { 4 | pub style: Option<&'static str>, 5 | pub x: Option<&'static str>, 6 | pub y: Option<&'static str>, 7 | pub width: Option<&'static str>, 8 | pub height: Option<&'static str>, 9 | pub view_box: Option<&'static str>, 10 | pub stroke_linecap: Option<&'static str>, 11 | pub stroke_linejoin: Option<&'static str>, 12 | pub stroke_width: Option<&'static str>, 13 | pub stroke: Option<&'static str>, 14 | pub fill: Option<&'static str>, 15 | pub data: &'static str, 16 | } 17 | 18 | pub type Icon = &'static IconData; 19 | -------------------------------------------------------------------------------- /icondata_fa/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "enum-iterator" 7 | version = "1.4.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "706d9e7cf1c7664859d79cd524e4e53ea2b67ea03c98cc2870c5e539695d597e" 10 | dependencies = [ 11 | "enum-iterator-derive", 12 | ] 13 | 14 | [[package]] 15 | name = "enum-iterator-derive" 16 | version = "1.2.0" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "355f93763ef7b0ae1c43c4d8eccc9d5848d84ad1a1d8ce61c421d1ac85a19d05" 19 | dependencies = [ 20 | "proc-macro2", 21 | "quote", 22 | "syn 1.0.109", 23 | ] 24 | 25 | [[package]] 26 | name = "icondata_core" 27 | version = "0.0.1" 28 | source = "registry+https://github.com/rust-lang/crates.io-index" 29 | checksum = "6c8064b9ba0d5959d06f211b8a98135e2fad9862e88d746908ba6b715489c662" 30 | 31 | [[package]] 32 | name = "icondata_fa" 33 | version = "0.0.2" 34 | dependencies = [ 35 | "enum-iterator", 36 | "icondata_core", 37 | "serde", 38 | ] 39 | 40 | [[package]] 41 | name = "proc-macro2" 42 | version = "1.0.56" 43 | source = "registry+https://github.com/rust-lang/crates.io-index" 44 | checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" 45 | dependencies = [ 46 | "unicode-ident", 47 | ] 48 | 49 | [[package]] 50 | name = "quote" 51 | version = "1.0.26" 52 | source = "registry+https://github.com/rust-lang/crates.io-index" 53 | checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" 54 | dependencies = [ 55 | "proc-macro2", 56 | ] 57 | 58 | [[package]] 59 | name = "serde" 60 | version = "1.0.160" 61 | source = "registry+https://github.com/rust-lang/crates.io-index" 62 | checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" 63 | dependencies = [ 64 | "serde_derive", 65 | ] 66 | 67 | [[package]] 68 | name = "serde_derive" 69 | version = "1.0.160" 70 | source = "registry+https://github.com/rust-lang/crates.io-index" 71 | checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" 72 | dependencies = [ 73 | "proc-macro2", 74 | "quote", 75 | "syn 2.0.15", 76 | ] 77 | 78 | [[package]] 79 | name = "syn" 80 | version = "1.0.109" 81 | source = "registry+https://github.com/rust-lang/crates.io-index" 82 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 83 | dependencies = [ 84 | "proc-macro2", 85 | "quote", 86 | "unicode-ident", 87 | ] 88 | 89 | [[package]] 90 | name = "syn" 91 | version = "2.0.15" 92 | source = "registry+https://github.com/rust-lang/crates.io-index" 93 | checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" 94 | dependencies = [ 95 | "proc-macro2", 96 | "quote", 97 | "unicode-ident", 98 | ] 99 | 100 | [[package]] 101 | name = "unicode-ident" 102 | version = "1.0.8" 103 | source = "registry+https://github.com/rust-lang/crates.io-index" 104 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 105 | -------------------------------------------------------------------------------- /icondata_fa/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_fa" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Font Awesome\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_fa/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - fa 2 | 3 | Icon data from the *Font Awesome* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_fi/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_fi" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Feather\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_fi/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - fi 2 | 3 | Icon data from the *Feather* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_hi/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "heck" 7 | version = "0.4.1" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 10 | 11 | [[package]] 12 | name = "icondata_core" 13 | version = "0.0.2" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "1640a4c1d5ddd08ab1d9854ffa7a2fa3dc52339492676b6d3031e77ca579f434" 16 | 17 | [[package]] 18 | name = "icondata_hi" 19 | version = "0.0.8" 20 | dependencies = [ 21 | "icondata_core", 22 | "serde", 23 | "strum", 24 | ] 25 | 26 | [[package]] 27 | name = "proc-macro2" 28 | version = "1.0.56" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" 31 | dependencies = [ 32 | "unicode-ident", 33 | ] 34 | 35 | [[package]] 36 | name = "quote" 37 | version = "1.0.26" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" 40 | dependencies = [ 41 | "proc-macro2", 42 | ] 43 | 44 | [[package]] 45 | name = "rustversion" 46 | version = "1.0.12" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" 49 | 50 | [[package]] 51 | name = "serde" 52 | version = "1.0.160" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" 55 | dependencies = [ 56 | "serde_derive", 57 | ] 58 | 59 | [[package]] 60 | name = "serde_derive" 61 | version = "1.0.160" 62 | source = "registry+https://github.com/rust-lang/crates.io-index" 63 | checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" 64 | dependencies = [ 65 | "proc-macro2", 66 | "quote", 67 | "syn 2.0.15", 68 | ] 69 | 70 | [[package]] 71 | name = "strum" 72 | version = "0.24.1" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" 75 | dependencies = [ 76 | "strum_macros", 77 | ] 78 | 79 | [[package]] 80 | name = "strum_macros" 81 | version = "0.24.3" 82 | source = "registry+https://github.com/rust-lang/crates.io-index" 83 | checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" 84 | dependencies = [ 85 | "heck", 86 | "proc-macro2", 87 | "quote", 88 | "rustversion", 89 | "syn 1.0.109", 90 | ] 91 | 92 | [[package]] 93 | name = "syn" 94 | version = "1.0.109" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 97 | dependencies = [ 98 | "proc-macro2", 99 | "quote", 100 | "unicode-ident", 101 | ] 102 | 103 | [[package]] 104 | name = "syn" 105 | version = "2.0.15" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" 108 | dependencies = [ 109 | "proc-macro2", 110 | "quote", 111 | "unicode-ident", 112 | ] 113 | 114 | [[package]] 115 | name = "unicode-ident" 116 | version = "1.0.8" 117 | source = "registry+https://github.com/rust-lang/crates.io-index" 118 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 119 | -------------------------------------------------------------------------------- /icondata_hi/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_hi" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Heroicons\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_hi/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - hi 2 | 3 | Icon data from the *Heroicons* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_im/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "icondata_core" 7 | version = "0.0.1" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "6c8064b9ba0d5959d06f211b8a98135e2fad9862e88d746908ba6b715489c662" 10 | 11 | [[package]] 12 | name = "icondata_im" 13 | version = "0.0.1" 14 | dependencies = [ 15 | "icondata_core", 16 | "serde", 17 | ] 18 | 19 | [[package]] 20 | name = "proc-macro2" 21 | version = "1.0.56" 22 | source = "registry+https://github.com/rust-lang/crates.io-index" 23 | checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" 24 | dependencies = [ 25 | "unicode-ident", 26 | ] 27 | 28 | [[package]] 29 | name = "quote" 30 | version = "1.0.26" 31 | source = "registry+https://github.com/rust-lang/crates.io-index" 32 | checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" 33 | dependencies = [ 34 | "proc-macro2", 35 | ] 36 | 37 | [[package]] 38 | name = "serde" 39 | version = "1.0.160" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" 42 | dependencies = [ 43 | "serde_derive", 44 | ] 45 | 46 | [[package]] 47 | name = "serde_derive" 48 | version = "1.0.160" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" 51 | dependencies = [ 52 | "proc-macro2", 53 | "quote", 54 | "syn", 55 | ] 56 | 57 | [[package]] 58 | name = "syn" 59 | version = "2.0.15" 60 | source = "registry+https://github.com/rust-lang/crates.io-index" 61 | checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" 62 | dependencies = [ 63 | "proc-macro2", 64 | "quote", 65 | "unicode-ident", 66 | ] 67 | 68 | [[package]] 69 | name = "unicode-ident" 70 | version = "1.0.8" 71 | source = "registry+https://github.com/rust-lang/crates.io-index" 72 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 73 | -------------------------------------------------------------------------------- /icondata_im/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_im" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"IcoMoon Free\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_im/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - im 2 | 3 | Icon data from the *IcoMoon Free* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_io/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_io" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Ionicons\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_io/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - io 2 | 3 | Icon data from the *Ionicons* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_lu/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "heck" 7 | version = "0.4.1" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 10 | 11 | [[package]] 12 | name = "icondata_core" 13 | version = "0.0.2" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "1640a4c1d5ddd08ab1d9854ffa7a2fa3dc52339492676b6d3031e77ca579f434" 16 | 17 | [[package]] 18 | name = "icondata_lu" 19 | version = "0.0.6" 20 | dependencies = [ 21 | "icondata_core", 22 | "serde", 23 | "strum", 24 | ] 25 | 26 | [[package]] 27 | name = "proc-macro2" 28 | version = "1.0.56" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" 31 | dependencies = [ 32 | "unicode-ident", 33 | ] 34 | 35 | [[package]] 36 | name = "quote" 37 | version = "1.0.26" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" 40 | dependencies = [ 41 | "proc-macro2", 42 | ] 43 | 44 | [[package]] 45 | name = "rustversion" 46 | version = "1.0.12" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" 49 | 50 | [[package]] 51 | name = "serde" 52 | version = "1.0.160" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" 55 | dependencies = [ 56 | "serde_derive", 57 | ] 58 | 59 | [[package]] 60 | name = "serde_derive" 61 | version = "1.0.160" 62 | source = "registry+https://github.com/rust-lang/crates.io-index" 63 | checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" 64 | dependencies = [ 65 | "proc-macro2", 66 | "quote", 67 | "syn 2.0.15", 68 | ] 69 | 70 | [[package]] 71 | name = "strum" 72 | version = "0.24.1" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" 75 | dependencies = [ 76 | "strum_macros", 77 | ] 78 | 79 | [[package]] 80 | name = "strum_macros" 81 | version = "0.24.3" 82 | source = "registry+https://github.com/rust-lang/crates.io-index" 83 | checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" 84 | dependencies = [ 85 | "heck", 86 | "proc-macro2", 87 | "quote", 88 | "rustversion", 89 | "syn 1.0.109", 90 | ] 91 | 92 | [[package]] 93 | name = "syn" 94 | version = "1.0.109" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 97 | dependencies = [ 98 | "proc-macro2", 99 | "quote", 100 | "unicode-ident", 101 | ] 102 | 103 | [[package]] 104 | name = "syn" 105 | version = "2.0.15" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" 108 | dependencies = [ 109 | "proc-macro2", 110 | "quote", 111 | "unicode-ident", 112 | ] 113 | 114 | [[package]] 115 | name = "unicode-ident" 116 | version = "1.0.8" 117 | source = "registry+https://github.com/rust-lang/crates.io-index" 118 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 119 | -------------------------------------------------------------------------------- /icondata_lu/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_lu" 3 | version = "0.0.11" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Lucide\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_lu/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - lu 2 | 3 | Icon data from the *Lucide* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_mdi/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_mdi" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Material Design Icons\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_mdi/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - mdi 2 | 3 | Icon data from the *Material Design Icons* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_oc/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_oc" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Github Octicons\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_oc/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - oc 2 | 3 | Icon data from the *Github Octicons* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_ri/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_ri" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Remix Icon\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_ri/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - ri 2 | 3 | Icon data from the *Remix Icon* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_si/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "heck" 7 | version = "0.4.1" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 10 | 11 | [[package]] 12 | name = "icondata_core" 13 | version = "0.0.2" 14 | source = "registry+https://github.com/rust-lang/crates.io-index" 15 | checksum = "1640a4c1d5ddd08ab1d9854ffa7a2fa3dc52339492676b6d3031e77ca579f434" 16 | 17 | [[package]] 18 | name = "icondata_si" 19 | version = "0.0.6" 20 | dependencies = [ 21 | "icondata_core", 22 | "serde", 23 | "strum", 24 | ] 25 | 26 | [[package]] 27 | name = "proc-macro2" 28 | version = "1.0.56" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" 31 | dependencies = [ 32 | "unicode-ident", 33 | ] 34 | 35 | [[package]] 36 | name = "quote" 37 | version = "1.0.26" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" 40 | dependencies = [ 41 | "proc-macro2", 42 | ] 43 | 44 | [[package]] 45 | name = "rustversion" 46 | version = "1.0.12" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" 49 | 50 | [[package]] 51 | name = "serde" 52 | version = "1.0.160" 53 | source = "registry+https://github.com/rust-lang/crates.io-index" 54 | checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" 55 | dependencies = [ 56 | "serde_derive", 57 | ] 58 | 59 | [[package]] 60 | name = "serde_derive" 61 | version = "1.0.160" 62 | source = "registry+https://github.com/rust-lang/crates.io-index" 63 | checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" 64 | dependencies = [ 65 | "proc-macro2", 66 | "quote", 67 | "syn 2.0.15", 68 | ] 69 | 70 | [[package]] 71 | name = "strum" 72 | version = "0.24.1" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" 75 | dependencies = [ 76 | "strum_macros", 77 | ] 78 | 79 | [[package]] 80 | name = "strum_macros" 81 | version = "0.24.3" 82 | source = "registry+https://github.com/rust-lang/crates.io-index" 83 | checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" 84 | dependencies = [ 85 | "heck", 86 | "proc-macro2", 87 | "quote", 88 | "rustversion", 89 | "syn 1.0.109", 90 | ] 91 | 92 | [[package]] 93 | name = "syn" 94 | version = "1.0.109" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 97 | dependencies = [ 98 | "proc-macro2", 99 | "quote", 100 | "unicode-ident", 101 | ] 102 | 103 | [[package]] 104 | name = "syn" 105 | version = "2.0.15" 106 | source = "registry+https://github.com/rust-lang/crates.io-index" 107 | checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" 108 | dependencies = [ 109 | "proc-macro2", 110 | "quote", 111 | "unicode-ident", 112 | ] 113 | 114 | [[package]] 115 | name = "unicode-ident" 116 | version = "1.0.8" 117 | source = "registry+https://github.com/rust-lang/crates.io-index" 118 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 119 | -------------------------------------------------------------------------------- /icondata_si/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_si" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Simple Icons\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_si/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - si 2 | 3 | Icon data from the *Simple Icons* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_tb/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "icondata_core" 7 | version = "0.0.1" 8 | 9 | [[package]] 10 | name = "icondata_tb" 11 | version = "0.0.1" 12 | dependencies = [ 13 | "icondata_core", 14 | "serde", 15 | ] 16 | 17 | [[package]] 18 | name = "proc-macro2" 19 | version = "1.0.56" 20 | source = "registry+https://github.com/rust-lang/crates.io-index" 21 | checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" 22 | dependencies = [ 23 | "unicode-ident", 24 | ] 25 | 26 | [[package]] 27 | name = "quote" 28 | version = "1.0.26" 29 | source = "registry+https://github.com/rust-lang/crates.io-index" 30 | checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" 31 | dependencies = [ 32 | "proc-macro2", 33 | ] 34 | 35 | [[package]] 36 | name = "serde" 37 | version = "1.0.160" 38 | source = "registry+https://github.com/rust-lang/crates.io-index" 39 | checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" 40 | dependencies = [ 41 | "serde_derive", 42 | ] 43 | 44 | [[package]] 45 | name = "serde_derive" 46 | version = "1.0.160" 47 | source = "registry+https://github.com/rust-lang/crates.io-index" 48 | checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" 49 | dependencies = [ 50 | "proc-macro2", 51 | "quote", 52 | "syn", 53 | ] 54 | 55 | [[package]] 56 | name = "syn" 57 | version = "2.0.15" 58 | source = "registry+https://github.com/rust-lang/crates.io-index" 59 | checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" 60 | dependencies = [ 61 | "proc-macro2", 62 | "quote", 63 | "unicode-ident", 64 | ] 65 | 66 | [[package]] 67 | name = "unicode-ident" 68 | version = "1.0.8" 69 | source = "registry+https://github.com/rust-lang/crates.io-index" 70 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 71 | -------------------------------------------------------------------------------- /icondata_tb/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_tb" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Tabler Icons\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_tb/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - tb 2 | 3 | Icon data from the *Tabler Icons* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_ti/Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "icondata_core" 7 | version = "0.0.1" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "6c8064b9ba0d5959d06f211b8a98135e2fad9862e88d746908ba6b715489c662" 10 | 11 | [[package]] 12 | name = "icondata_ti" 13 | version = "0.0.2" 14 | dependencies = [ 15 | "icondata_core", 16 | "serde", 17 | ] 18 | 19 | [[package]] 20 | name = "proc-macro2" 21 | version = "1.0.56" 22 | source = "registry+https://github.com/rust-lang/crates.io-index" 23 | checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" 24 | dependencies = [ 25 | "unicode-ident", 26 | ] 27 | 28 | [[package]] 29 | name = "quote" 30 | version = "1.0.26" 31 | source = "registry+https://github.com/rust-lang/crates.io-index" 32 | checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" 33 | dependencies = [ 34 | "proc-macro2", 35 | ] 36 | 37 | [[package]] 38 | name = "serde" 39 | version = "1.0.160" 40 | source = "registry+https://github.com/rust-lang/crates.io-index" 41 | checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" 42 | dependencies = [ 43 | "serde_derive", 44 | ] 45 | 46 | [[package]] 47 | name = "serde_derive" 48 | version = "1.0.160" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" 51 | dependencies = [ 52 | "proc-macro2", 53 | "quote", 54 | "syn", 55 | ] 56 | 57 | [[package]] 58 | name = "syn" 59 | version = "2.0.15" 60 | source = "registry+https://github.com/rust-lang/crates.io-index" 61 | checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" 62 | dependencies = [ 63 | "proc-macro2", 64 | "quote", 65 | "unicode-ident", 66 | ] 67 | 68 | [[package]] 69 | name = "unicode-ident" 70 | version = "1.0.8" 71 | source = "registry+https://github.com/rust-lang/crates.io-index" 72 | checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" 73 | -------------------------------------------------------------------------------- /icondata_ti/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_ti" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Typicons\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_ti/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - ti 2 | 3 | Icon data from the *Typicons* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_vs/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_vs" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"VS Code Icons\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_vs/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - vs 2 | 3 | Icon data from the *VS Code Icons* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. -------------------------------------------------------------------------------- /icondata_wi/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "icondata_wi" 3 | version = "0.0.10" 4 | authors = ["Charles Edward Gagnon"] 5 | edition = "2021" 6 | description = "Library providing SVG and corresponding metadata for \"Weather Icons\"." 7 | readme = "./README.md" 8 | repository = "https://github.com/Carlosted/icondata" 9 | license = "MIT" 10 | keywords = ["icons"] 11 | categories = ["web-programming"] 12 | rust-version = "1.67.0" 13 | 14 | [dependencies] 15 | icondata_core = { path = "../icondata_core", version = "0.1.0" } -------------------------------------------------------------------------------- /icondata_wi/README.md: -------------------------------------------------------------------------------- 1 | # Icondata - wi 2 | 3 | Icon data from the *Weather Icons* library. 4 | 5 | Visit this [repository](https://github.com/Carlosted/icondata) for in-depth information. 6 | 7 | ## Contributing 8 | 9 | Contributions are more than welcomed! 10 | Do not hesitate add icon libraries, features, etc. --------------------------------------------------------------------------------