├── .changeset ├── README.md └── config.json ├── .gitignore ├── .vscodeignore ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── bun.lockb ├── package.json ├── screenshot.png ├── snippets ├── htmx-add-html.json ├── htmx-add-jsx.json ├── htmx-add-templ.json ├── htmx-core-html.json ├── htmx-core-jsx.json └── htmx-core-templ.json ├── tests ├── go.templ ├── rust │ ├── Cargo.lock │ ├── Cargo.toml │ ├── src │ │ └── main.rs │ └── templates │ │ ├── hello.html │ │ └── update.html ├── test.html ├── test.jsx ├── test.php └── tsx.tsx └── tsconfig.json /.changeset/README.md: -------------------------------------------------------------------------------- 1 | # Changesets 2 | 3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works 4 | with multi-package repos, or single-package repos to help you version and publish your code. You can 5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets) 6 | 7 | We have a quick list of common questions to get you started engaging with this project in 8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) 9 | -------------------------------------------------------------------------------- /.changeset/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", 3 | "changelog": "@changesets/cli/changelog", 4 | "commit": false, 5 | "fixed": [], 6 | "linked": [], 7 | "access": "restricted", 8 | "baseBranch": "master", 9 | "updateInternalDependencies": "patch", 10 | "ignore": [] 11 | } 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore 2 | 3 | # Logs 4 | 5 | logs 6 | _.log 7 | npm-debug.log_ 8 | yarn-debug.log* 9 | yarn-error.log* 10 | lerna-debug.log* 11 | .pnpm-debug.log* 12 | 13 | # Caches 14 | 15 | .cache 16 | 17 | # Diagnostic reports (https://nodejs.org/api/report.html) 18 | 19 | report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json 20 | 21 | # Runtime data 22 | 23 | pids 24 | _.pid 25 | _.seed 26 | *.pid.lock 27 | 28 | # Directory for instrumented libs generated by jscoverage/JSCover 29 | 30 | lib-cov 31 | 32 | # Coverage directory used by tools like istanbul 33 | 34 | coverage 35 | *.lcov 36 | 37 | # nyc test coverage 38 | 39 | .nyc_output 40 | 41 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 42 | 43 | .grunt 44 | 45 | # Bower dependency directory (https://bower.io/) 46 | 47 | bower_components 48 | 49 | # node-waf configuration 50 | 51 | .lock-wscript 52 | 53 | # Compiled binary addons (https://nodejs.org/api/addons.html) 54 | 55 | build/Release 56 | 57 | # Dependency directories 58 | 59 | node_modules/ 60 | jspm_packages/ 61 | 62 | # Snowpack dependency directory (https://snowpack.dev/) 63 | 64 | web_modules/ 65 | 66 | # TypeScript cache 67 | 68 | *.tsbuildinfo 69 | 70 | # Optional npm cache directory 71 | 72 | .npm 73 | 74 | # Optional eslint cache 75 | 76 | .eslintcache 77 | 78 | # Optional stylelint cache 79 | 80 | .stylelintcache 81 | 82 | # Microbundle cache 83 | 84 | .rpt2_cache/ 85 | .rts2_cache_cjs/ 86 | .rts2_cache_es/ 87 | .rts2_cache_umd/ 88 | 89 | # Optional REPL history 90 | 91 | .node_repl_history 92 | 93 | # Output of 'npm pack' 94 | 95 | *.tgz 96 | 97 | # Yarn Integrity file 98 | 99 | .yarn-integrity 100 | 101 | # dotenv environment variable files 102 | 103 | .env 104 | .env.development.local 105 | .env.test.local 106 | .env.production.local 107 | .env.local 108 | 109 | # parcel-bundler cache (https://parceljs.org/) 110 | 111 | .parcel-cache 112 | 113 | # Next.js build output 114 | 115 | .next 116 | out 117 | 118 | # Nuxt.js build / generate output 119 | 120 | .nuxt 121 | dist 122 | 123 | # Gatsby files 124 | 125 | # Comment in the public line in if your project uses Gatsby and not Next.js 126 | 127 | # https://nextjs.org/blog/next-9-1#public-directory-support 128 | 129 | # public 130 | 131 | # vuepress build output 132 | 133 | .vuepress/dist 134 | 135 | # vuepress v2.x temp and cache directory 136 | 137 | .temp 138 | 139 | # Docusaurus cache and generated files 140 | 141 | .docusaurus 142 | 143 | # Serverless directories 144 | 145 | .serverless/ 146 | 147 | # FuseBox cache 148 | 149 | .fusebox/ 150 | 151 | # DynamoDB Local files 152 | 153 | .dynamodb/ 154 | 155 | # TernJS port file 156 | 157 | .tern-port 158 | 159 | # Stores VSCode versions used for testing VSCode extensions 160 | 161 | .vscode-test 162 | 163 | # yarn v2 164 | 165 | .yarn/cache 166 | .yarn/unplugged 167 | .yarn/build-state.yml 168 | .yarn/install-state.gz 169 | .pnp.* 170 | 171 | # IntelliJ based IDEs 172 | .idea 173 | 174 | # Finder (MacOS) folder config 175 | .DS_Store 176 | *.vsix 177 | tests/rust/target -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | tests 3 | *.vsix 4 | bun.lockb 5 | package.json 6 | tsconfig.json 7 | .changeset -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # htmx-attributes 2 | 3 | ## 0.8.0 4 | 5 | - Add django-html and jinja-html languages 6 | 7 | ## 0.7.0 8 | 9 | ### Minor Changes 10 | 11 | - hx-swap-oob-support 12 | 13 | ## 0.6.0 14 | 15 | ### Minor Changes 16 | 17 | - correct hx-disable-elt attribute to hx-disabled-elt (Contribution by https://github.com/jpaddeo) 18 | 19 | ## 0.5.0 20 | 21 | ### Minor Changes 22 | 23 | - 600d65b: update hx-vals, hx-disable-elt, hx-headers and hx-include to support parameter selection 24 | 25 | ## 0.4.0 26 | 27 | ### Minor Changes 28 | 29 | - 4924c1c: Add support for Astro 30 | 31 | ## 0.3.0 32 | 33 | ### Minor Changes 34 | 35 | - bb04c62: add placeholders for CRUD attributes, history, and boost 36 | - 8429ef0: Add hx-indicator-class for loading indicator to all languages 37 | 38 | ### Patch Changes 39 | 40 | - 5fe3134: fix spelling in README 41 | 42 | ## 0.2.0 43 | 44 | ### Minor Changes 45 | 46 | - Add support for PHP 47 | 48 | ### Patch Changes 49 | 50 | - 593cabd: Enable support for JSX 51 | 52 | ## 0.1.0 53 | 54 | ### Minor Changes 55 | 56 | - Add support for Go/Templ 57 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Craig R Broughton 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 | # htmx-attributes 2 | 3 | HTMX attribute support for VSCode, enabling your HTMX workflow. HTMX attributes are currently supported in: 4 | 5 | - HTML 6 | - Astro 7 | - JSX 8 | - TSX 9 | - Go (via [Templ](https://github.com/a-h/templ)) 10 | - Rust (have tested with [Warp](https://github.com/seanmonstar/warp) + [Tokio](https://tokio.rs/) + [Askama](https://github.com/djc/askama), see tests folder) 11 | - Gleam (via [Matcha](https://github.com/michaeljones/matcha)) 12 | - PHP (Not extensively tested, but seems to work fine) 13 | - Python via Django/Jinja2 templates (Not personally tested) 14 | 15 | 16 | 17 | ### Contributions 18 | 19 | To contribute a language, do the following: 20 | - Copy over the existing snippet examples: 21 | - The 'core' snippet feature HTMX's core attributes. 22 | - The 'add' snippet features HTMX's additional attributes. 23 | - Rename the files with the language you wish to support (htmx-add-elixir.json as an example) 24 | - Make an entry in the `package.json` file for your language of choice for both snippet files. 25 | - Make any required adjustments to the snippets for your language. 26 | - Create a test file in the `tests` folder; This is purely for manual 27 | testing before you raise a PR. 28 | - Include an appropriate changeset for your modification before raising a PR. 29 | 30 | To install dependencies (ensure you have `vsce` installed): 31 | 32 | ```bash 33 | bun install 34 | ``` 35 | 36 | To build the extension and test it: 37 | 38 | ```bash 39 | bun run build 40 | ``` 41 | 42 | This project was created using `bun init` in bun v1.0.14. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. 43 | -------------------------------------------------------------------------------- /bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CRBroughton/htmx-attributes/843c3501f224e47da3726a7abae358817cc163c6/bun.lockb -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "htmx-attributes", 3 | "displayName": "HTMX Attributes", 4 | "description": "HTMX attribute support for VSCode, enabling your HTMX workflow", 5 | "type": "module", 6 | "version": "0.7.0", 7 | "publisher": "CraigRBroughton", 8 | "engines": { 9 | "vscode": "^1.22.0" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "https://github.com/CRBroughton/htmx-attributes.git" 14 | }, 15 | "scripts": { 16 | "build": "vsce package -o htmx-attributes-$npm_package_version.vsix", 17 | "install": "npm run build && code --install-extension htmx-attributes-$npm_package_version.vsix", 18 | "changeset": "npx changeset", 19 | "changeset:status": "npx changeset status --verbose", 20 | "changeset:version": "npx changeset version" 21 | }, 22 | "keywords": [ 23 | "HTMX", 24 | "HTML", 25 | "Go", 26 | "JSX", 27 | "Snippets", 28 | "Attributes", 29 | "Tags" 30 | ], 31 | "categories": [ 32 | "Snippets" 33 | ], 34 | "contributes": { 35 | "snippets": [ 36 | { 37 | "language": "html", 38 | "path": "./snippets/htmx-core-html.json" 39 | }, 40 | { 41 | "language": "html", 42 | "path": "./snippets/htmx-add-html.json" 43 | }, 44 | { 45 | "language": "django-html", 46 | "path": "./snippets/htmx-core-html.json" 47 | }, 48 | { 49 | "language": "django-html", 50 | "path": "./snippets/htmx-add-html.json" 51 | }, 52 | { 53 | "language": "jinja-html", 54 | "path": "./snippets/htmx-core-html.json" 55 | }, 56 | { 57 | "language": "jinja-html", 58 | "path": "./snippets/htmx-add-html.json" 59 | }, 60 | { 61 | "language": "javascriptreact", 62 | "path": "./snippets/htmx-core-jsx.json" 63 | }, 64 | { 65 | "language": "javascriptreact", 66 | "path": "./snippets/htmx-add-jsx.json" 67 | }, 68 | { 69 | "language": "typescriptreact", 70 | "path": "./snippets/htmx-core-jsx.json" 71 | }, 72 | { 73 | "language": "typescriptreact", 74 | "path": "./snippets/htmx-add-jsx.json" 75 | }, 76 | { 77 | "language": "templ", 78 | "path": "./snippets/htmx-core-templ.json" 79 | }, 80 | { 81 | "language": "templ", 82 | "path": "./snippets/htmx-add-templ.json" 83 | }, 84 | { 85 | "language": "astro", 86 | "path": "./snippets/htmx-core-html.json" 87 | }, 88 | { 89 | "language": "astro", 90 | "path": "./snippets/htmx-add-html.json" 91 | } 92 | ] 93 | }, 94 | "devDependencies": { 95 | "bun-types": "latest" 96 | }, 97 | "peerDependencies": { 98 | "typescript": "^5.0.0" 99 | }, 100 | "dependencies": { 101 | "@changesets/cli": "^2.27.1", 102 | "hono": "^3.11.11" 103 | } 104 | } -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CRBroughton/htmx-attributes/843c3501f224e47da3726a7abae358817cc163c6/screenshot.png -------------------------------------------------------------------------------- /snippets/htmx-add-html.json: -------------------------------------------------------------------------------- 1 | { 2 | "hx-confirm": { 3 | "prefix": "hx-confirm", 4 | "body": [ 5 | "hx-confirm=\"${01}\"" 6 | ], 7 | "description": [ 8 | "shows a confirm() dialog before issuing a request\n", 9 | "https://htmx.org/attributes/hx-confirm/" 10 | ] 11 | }, 12 | "hx-delete": { 13 | "prefix": "hx-delete", 14 | "body": [ 15 | "hx-delete=\"/${1:ENDPOINT}\"" 16 | ], 17 | "description": [ 18 | "issues a DELETE to the specified URL\n", 19 | "https://htmx.org/attributes/hx-delete/" 20 | ] 21 | }, 22 | "hx-disable": { 23 | "prefix": "hx-disable", 24 | "body": [ 25 | "hx-disable" 26 | ], 27 | "description": [ 28 | "disables htmx processing for the given node and any children nodes\n", 29 | "https://htmx.org/attributes/hx-disable/" 30 | ] 31 | }, 32 | "hx-disabled-elt": { 33 | "prefix": "hx-disabled-elt", 34 | "body": [ 35 | "hx-disabled-elt=\"${1:this}\"" 36 | ], 37 | "description": [ 38 | "adds the disabled attribute to the specified elements while a request is in flight\n", 39 | "https://htmx.org/attributes/hx-disabled-elt/" 40 | ] 41 | }, 42 | "hx-disinherit": { 43 | "prefix": "hx-disinherit", 44 | "body": [ 45 | "hx-disinherit=\"*\"" 46 | ], 47 | "description": [ 48 | "control and disable automatic attribute inheritance for child nodes\n", 49 | "https://htmx.org/attributes/hx-disinherit/" 50 | ] 51 | }, 52 | "hx-encoding": { 53 | "prefix": "hx-encoding", 54 | "body": [ 55 | "hx-encoding" 56 | ], 57 | "description": [ 58 | "changes the request encoding type\n", 59 | "https://htmx.org/attributes/hx-encoding/" 60 | ] 61 | }, 62 | "hx-ext": { 63 | "prefix": "hx-ext", 64 | "body": [ 65 | "hx-ext=\"${01}\"" 66 | ], 67 | "description": [ 68 | "extensions to use for this element\n", 69 | "https://htmx.org/attributes/hx-ext/" 70 | ] 71 | }, 72 | "hx-headers": { 73 | "prefix": "hx-headers", 74 | "body": [ 75 | "hx-headers='{\"${1:myHeader}\": \"${2:My Value}\"}'" 76 | ], 77 | "description": [ 78 | "adds to the headers that will be submitted with the request\n", 79 | "https://htmx.org/attributes/hx-headers/" 80 | ] 81 | }, 82 | "hx-history": { 83 | "prefix": "hx-history", 84 | "body": [ 85 | "hx-history=\"${1:false}\"" 86 | ], 87 | "description": [ 88 | "prevent sensitive data being saved to the history cache\n", 89 | "https://htmx.org/attributes/hx-history/" 90 | ] 91 | }, 92 | "hx-history-elt": { 93 | "prefix": "hx-history-elt", 94 | "body": [ 95 | "hx-history-elt" 96 | ], 97 | "description": [ 98 | "the element to snapshot and restore during history navigation\n", 99 | "https://htmx.org/attributes/hx-history-elt/" 100 | ] 101 | }, 102 | "hx-include": { 103 | "prefix": "hx-include", 104 | "body": [ 105 | "hx-include=\"[${1:name}='${2:email}']\"" 106 | ], 107 | "description": [ 108 | "include additional data in requests\n", 109 | "https://htmx.org/attributes/hx-include/" 110 | ] 111 | }, 112 | "hx-indicator": { 113 | "prefix": "hx-indicator", 114 | "body": [ 115 | "hx-indicator=\"${01}\"" 116 | ], 117 | "description": [ 118 | "the element to put the htmx-request class on during the request\n", 119 | "https://htmx.org/attributes/hx-indicator/" 120 | ] 121 | }, 122 | "hx-indicator-class": { 123 | "prefix": "hx-indicator-class", 124 | "body": [ 125 | "class=\"htmx-indicator\"" 126 | ], 127 | "description": [ 128 | "Adds the htmx-indicator class for loading indicators\n", 129 | "https://htmx.org/attributes/hx-indicator/" 130 | ] 131 | }, 132 | "hx-params": { 133 | "prefix": "hx-params", 134 | "body": [ 135 | "hx-params=\"*${01}\"" 136 | ], 137 | "description": [ 138 | "filters the parameters that will be submitted with a request\n", 139 | "https://htmx.org/attributes/hx-params/" 140 | ] 141 | }, 142 | "hx-patch": { 143 | "prefix": "hx-patch", 144 | "body": [ 145 | "hx-patch=\"/${1:ENDPOINT}\"" 146 | ], 147 | "description": [ 148 | "issues a PATCH to the specified URL\n", 149 | "https://htmx.org/attributes/hx-patch/" 150 | ] 151 | }, 152 | "hx-preserve": { 153 | "prefix": "hx-preserve", 154 | "body": [ 155 | "hx-preserve" 156 | ], 157 | "description": [ 158 | "specifies elements to keep unchanged between requests\n", 159 | "https://htmx.org/attributes/hx-preserve/" 160 | ] 161 | }, 162 | "hx-prompt": { 163 | "prefix": "hx-prompt", 164 | "body": [ 165 | "hx-prompt=\"${01}\"" 166 | ], 167 | "description": [ 168 | "shows a prompt() before submitting a request\n", 169 | "https://htmx.org/attributes/hx-prompt/" 170 | ] 171 | }, 172 | "hx-put": { 173 | "prefix": "hx-put", 174 | "body": [ 175 | "hx-put=\"/${1:ENDPOINT}\"" 176 | ], 177 | "description": [ 178 | "issues a PUT to the specified URL\n", 179 | "https://htmx.org/attributes/hx-put/" 180 | ] 181 | }, 182 | "hx-replace-url": { 183 | "prefix": "hx-replace-url", 184 | "body": [ 185 | "hx-replace-url=\"${01}\"" 186 | ], 187 | "description": [ 188 | "replace the URL in the browser location bar\n", 189 | "https://htmx.org/attributes/hx-replace-url/" 190 | ] 191 | }, 192 | "hx-request": { 193 | "prefix": "hx-request", 194 | "body": [ 195 | "hx-request='${01}'" 196 | ], 197 | "description": [ 198 | "configures various aspects of the request\n", 199 | "https://htmx.org/attributes/hx-request/" 200 | ] 201 | }, 202 | "hx-sync": { 203 | "prefix": "hx-sync", 204 | "body": [ 205 | "hx-sync=\"${01}\"" 206 | ], 207 | "description": [ 208 | "control how requests made by different elements are synchronized\n", 209 | "https://htmx.org/attributes/hx-sync/" 210 | ] 211 | }, 212 | "hx-validate": { 213 | "prefix": "hx-validate", 214 | "body": [ 215 | "hx-validate" 216 | ], 217 | "description": [ 218 | "force elements to validate themselves before a request\n", 219 | "https://htmx.org/attributes/hx-validate/" 220 | ] 221 | } 222 | } -------------------------------------------------------------------------------- /snippets/htmx-add-jsx.json: -------------------------------------------------------------------------------- 1 | { 2 | "hx-confirm": { 3 | "prefix": "hx-confirm", 4 | "body": [ 5 | "hx-confirm=\"${01}\"" 6 | ], 7 | "description": [ 8 | "shows a confirm() dialog before issuing a request\n", 9 | "https://htmx.org/attributes/hx-confirm/" 10 | ] 11 | }, 12 | "hx-delete": { 13 | "prefix": "hx-delete", 14 | "body": [ 15 | "hx-delete=\"/${1:ENDPOINT}\"" 16 | ], 17 | "description": [ 18 | "issues a DELETE to the specified URL\n", 19 | "https://htmx.org/attributes/hx-delete/" 20 | ] 21 | }, 22 | "hx-disable": { 23 | "prefix": "hx-disable", 24 | "body": [ 25 | "hx-disable" 26 | ], 27 | "description": [ 28 | "disables htmx processing for the given node and any children nodes\n", 29 | "https://htmx.org/attributes/hx-disable/" 30 | ] 31 | }, 32 | "hx-disabled-elt": { 33 | "prefix": "hx-disabled-elt", 34 | "body": [ 35 | "hx-disabled-elt=\"${1:this}\"" 36 | ], 37 | "description": [ 38 | "adds the disabled attribute to the specified elements while a request is in flight\n", 39 | "https://htmx.org/attributes/hx-disabled-elt/" 40 | ] 41 | }, 42 | "hx-disinherit": { 43 | "prefix": "hx-disinherit", 44 | "body": [ 45 | "hx-disinherit=\"*\"" 46 | ], 47 | "description": [ 48 | "control and disable automatic attribute inheritance for child nodes\n", 49 | "https://htmx.org/attributes/hx-disinherit/" 50 | ] 51 | }, 52 | "hx-encoding": { 53 | "prefix": "hx-encoding", 54 | "body": [ 55 | "hx-encoding" 56 | ], 57 | "description": [ 58 | "changes the request encoding type\n", 59 | "https://htmx.org/attributes/hx-encoding/" 60 | ] 61 | }, 62 | "hx-ext": { 63 | "prefix": "hx-ext", 64 | "body": [ 65 | "hx-ext=\"${01}\"" 66 | ], 67 | "description": [ 68 | "extensions to use for this element\n", 69 | "https://htmx.org/attributes/hx-ext/" 70 | ] 71 | }, 72 | "hx-headers": { 73 | "prefix": "hx-headers", 74 | "body": [ 75 | "hx-headers='{\"${1:myHeader}\": \"${2:My Value}\"}'" 76 | ], 77 | "description": [ 78 | "adds to the headers that will be submitted with the request\n", 79 | "https://htmx.org/attributes/hx-headers/" 80 | ] 81 | }, 82 | "hx-history": { 83 | "prefix": "hx-history", 84 | "body": [ 85 | "hx-history=\"${1:false}\"" 86 | ], 87 | "description": [ 88 | "prevent sensitive data being saved to the history cache\n", 89 | "https://htmx.org/attributes/hx-history/" 90 | ] 91 | }, 92 | "hx-history-elt": { 93 | "prefix": "hx-history-elt", 94 | "body": [ 95 | "hx-history-elt" 96 | ], 97 | "description": [ 98 | "the element to snapshot and restore during history navigation\n", 99 | "https://htmx.org/attributes/hx-history-elt/" 100 | ] 101 | }, 102 | "hx-include": { 103 | "prefix": "hx-include", 104 | "body": [ 105 | "hx-include=\"[${1:name}='${2:email}']\"" 106 | ], 107 | "description": [ 108 | "include additional data in requests\n", 109 | "https://htmx.org/attributes/hx-include/" 110 | ] 111 | }, 112 | "hx-indicator": { 113 | "prefix": "hx-indicator", 114 | "body": [ 115 | "hx-indicator=\"${01}\"" 116 | ], 117 | "description": [ 118 | "the element to put the htmx-request class on during the request\n", 119 | "https://htmx.org/attributes/hx-indicator/" 120 | ] 121 | }, 122 | "hx-indicator-class": { 123 | "prefix": "hx-indicator-class", 124 | "body": [ 125 | "class=\"htmx-indicator\"" 126 | ], 127 | "description": [ 128 | "Adds the htmx-indicator class for loading indicators\n", 129 | "https://htmx.org/attributes/hx-indicator/" 130 | ] 131 | }, 132 | "hx-params": { 133 | "prefix": "hx-params", 134 | "body": [ 135 | "hx-params=\"*${01}\"" 136 | ], 137 | "description": [ 138 | "filters the parameters that will be submitted with a request\n", 139 | "https://htmx.org/attributes/hx-params/" 140 | ] 141 | }, 142 | "hx-patch": { 143 | "prefix": "hx-patch", 144 | "body": [ 145 | "hx-patch=\"/${1:ENDPOINT}\"" 146 | ], 147 | "description": [ 148 | "issues a PATCH to the specified URL\n", 149 | "https://htmx.org/attributes/hx-patch/" 150 | ] 151 | }, 152 | "hx-preserve": { 153 | "prefix": "hx-preserve", 154 | "body": [ 155 | "hx-preserve" 156 | ], 157 | "description": [ 158 | "specifies elements to keep unchanged between requests\n", 159 | "https://htmx.org/attributes/hx-preserve/" 160 | ] 161 | }, 162 | "hx-prompt": { 163 | "prefix": "hx-prompt", 164 | "body": [ 165 | "hx-prompt=\"${01}\"" 166 | ], 167 | "description": [ 168 | "shows a prompt() before submitting a request\n", 169 | "https://htmx.org/attributes/hx-prompt/" 170 | ] 171 | }, 172 | "hx-put": { 173 | "prefix": "hx-put", 174 | "body": [ 175 | "hx-put=\"/${1:ENDPOINT}\"" 176 | ], 177 | "description": [ 178 | "issues a PUT to the specified URL\n", 179 | "https://htmx.org/attributes/hx-put/" 180 | ] 181 | }, 182 | "hx-replace-url": { 183 | "prefix": "hx-replace-url", 184 | "body": [ 185 | "hx-replace-url=\"${01}\"" 186 | ], 187 | "description": [ 188 | "replace the URL in the browser location bar\n", 189 | "https://htmx.org/attributes/hx-replace-url/" 190 | ] 191 | }, 192 | "hx-request": { 193 | "prefix": "hx-request", 194 | "body": [ 195 | "hx-request='${01}'" 196 | ], 197 | "description": [ 198 | "configures various aspects of the request\n", 199 | "https://htmx.org/attributes/hx-request/" 200 | ] 201 | }, 202 | "hx-sync": { 203 | "prefix": "hx-sync", 204 | "body": [ 205 | "hx-sync=\"${01}\"" 206 | ], 207 | "description": [ 208 | "control how requests made by different elements are synchronized\n", 209 | "https://htmx.org/attributes/hx-sync/" 210 | ] 211 | }, 212 | "hx-validate": { 213 | "prefix": "hx-validate", 214 | "body": [ 215 | "hx-validate" 216 | ], 217 | "description": [ 218 | "force elements to validate themselves before a request\n", 219 | "https://htmx.org/attributes/hx-validate/" 220 | ] 221 | } 222 | } -------------------------------------------------------------------------------- /snippets/htmx-add-templ.json: -------------------------------------------------------------------------------- 1 | { 2 | "hx-confirm": { 3 | "prefix": "hx-confirm", 4 | "body": [ 5 | "hx-confirm=\"${01}\"" 6 | ], 7 | "description": [ 8 | "shows a confirm() dialog before issuing a request\n", 9 | "https://htmx.org/attributes/hx-confirm/" 10 | ] 11 | }, 12 | "hx-delete": { 13 | "prefix": "hx-delete", 14 | "body": [ 15 | "hx-delete=\"/${1:ENDPOINT}\"" 16 | ], 17 | "description": [ 18 | "issues a DELETE to the specified URL\n", 19 | "https://htmx.org/attributes/hx-delete/" 20 | ] 21 | }, 22 | "hx-disable": { 23 | "prefix": "hx-disable", 24 | "body": [ 25 | "hx-disable" 26 | ], 27 | "description": [ 28 | "disables htmx processing for the given node and any children nodes\n", 29 | "https://htmx.org/attributes/hx-disable/" 30 | ] 31 | }, 32 | "hx-disabled-elt": { 33 | "prefix": "hx-disabled-elt", 34 | "body": [ 35 | "hx-disabled-elt=\"${1:this}\"" 36 | ], 37 | "description": [ 38 | "adds the disabled attribute to the specified elements while a request is in flight\n", 39 | "https://htmx.org/attributes/hx-disabled-elt/" 40 | ] 41 | }, 42 | "hx-disinherit": { 43 | "prefix": "hx-disinherit", 44 | "body": [ 45 | "hx-disinherit=\"*\"" 46 | ], 47 | "description": [ 48 | "control and disable automatic attribute inheritance for child nodes\n", 49 | "https://htmx.org/attributes/hx-disinherit/" 50 | ] 51 | }, 52 | "hx-encoding": { 53 | "prefix": "hx-encoding", 54 | "body": [ 55 | "hx-encoding" 56 | ], 57 | "description": [ 58 | "changes the request encoding type\n", 59 | "https://htmx.org/attributes/hx-encoding/" 60 | ] 61 | }, 62 | "hx-ext": { 63 | "prefix": "hx-ext", 64 | "body": [ 65 | "hx-ext=\"${01}\"" 66 | ], 67 | "description": [ 68 | "extensions to use for this element\n", 69 | "https://htmx.org/attributes/hx-ext/" 70 | ] 71 | }, 72 | "hx-headers": { 73 | "prefix": "hx-headers", 74 | "body": [ 75 | "hx-headers='{\"${1:myHeader}\": \"${2:My Value}\"}'" 76 | ], 77 | "description": [ 78 | "adds to the headers that will be submitted with the request\n", 79 | "https://htmx.org/attributes/hx-headers/" 80 | ] 81 | }, 82 | "hx-history": { 83 | "prefix": "hx-history", 84 | "body": [ 85 | "hx-history=\"${1:false}\"" 86 | ], 87 | "description": [ 88 | "prevent sensitive data being saved to the history cache\n", 89 | "https://htmx.org/attributes/hx-history/" 90 | ] 91 | }, 92 | "hx-history-elt": { 93 | "prefix": "hx-history-elt", 94 | "body": [ 95 | "hx-history-elt" 96 | ], 97 | "description": [ 98 | "the element to snapshot and restore during history navigation\n", 99 | "https://htmx.org/attributes/hx-history-elt/" 100 | ] 101 | }, 102 | "hx-include": { 103 | "prefix": "hx-include", 104 | "body": [ 105 | "hx-include=\"[${1:name}='${2:email}']\"" 106 | ], 107 | "description": [ 108 | "include additional data in requests\n", 109 | "https://htmx.org/attributes/hx-include/" 110 | ] 111 | }, 112 | "hx-indicator": { 113 | "prefix": "hx-indicator", 114 | "body": [ 115 | "hx-indicator=\"${01}\"" 116 | ], 117 | "description": [ 118 | "the element to put the htmx-request class on during the request\n", 119 | "https://htmx.org/attributes/hx-indicator/" 120 | ] 121 | }, 122 | "hx-indicator-class": { 123 | "prefix": "hx-indicator-class", 124 | "body": [ 125 | "class=\"htmx-indicator\"" 126 | ], 127 | "description": [ 128 | "Adds the htmx-indicator class for loading indicators\n", 129 | "https://htmx.org/attributes/hx-indicator/" 130 | ] 131 | }, 132 | "hx-params": { 133 | "prefix": "hx-params", 134 | "body": [ 135 | "hx-params=\"*${01}\"" 136 | ], 137 | "description": [ 138 | "filters the parameters that will be submitted with a request\n", 139 | "https://htmx.org/attributes/hx-params/" 140 | ] 141 | }, 142 | "hx-patch": { 143 | "prefix": "hx-patch", 144 | "body": [ 145 | "hx-patch=\"/${1:ENDPOINT}\"" 146 | ], 147 | "description": [ 148 | "issues a PATCH to the specified URL\n", 149 | "https://htmx.org/attributes/hx-patch/" 150 | ] 151 | }, 152 | "hx-preserve": { 153 | "prefix": "hx-preserve", 154 | "body": [ 155 | "hx-preserve" 156 | ], 157 | "description": [ 158 | "specifies elements to keep unchanged between requests\n", 159 | "https://htmx.org/attributes/hx-preserve/" 160 | ] 161 | }, 162 | "hx-prompt": { 163 | "prefix": "hx-prompt", 164 | "body": [ 165 | "hx-prompt=\"${01}\"" 166 | ], 167 | "description": [ 168 | "shows a prompt() before submitting a request\n", 169 | "https://htmx.org/attributes/hx-prompt/" 170 | ] 171 | }, 172 | "hx-put": { 173 | "prefix": "hx-put", 174 | "body": [ 175 | "hx-put=\"/${1:ENDPOINT}\"" 176 | ], 177 | "description": [ 178 | "issues a PUT to the specified URL\n", 179 | "https://htmx.org/attributes/hx-put/" 180 | ] 181 | }, 182 | "hx-replace-url": { 183 | "prefix": "hx-replace-url", 184 | "body": [ 185 | "hx-replace-url=\"${01}\"" 186 | ], 187 | "description": [ 188 | "replace the URL in the browser location bar\n", 189 | "https://htmx.org/attributes/hx-replace-url/" 190 | ] 191 | }, 192 | "hx-request": { 193 | "prefix": "hx-request", 194 | "body": [ 195 | "hx-request='${01}'" 196 | ], 197 | "description": [ 198 | "configures various aspects of the request\n", 199 | "https://htmx.org/attributes/hx-request/" 200 | ] 201 | }, 202 | "hx-sync": { 203 | "prefix": "hx-sync", 204 | "body": [ 205 | "hx-sync=\"${01}\"" 206 | ], 207 | "description": [ 208 | "control how requests made by different elements are synchronized\n", 209 | "https://htmx.org/attributes/hx-sync/" 210 | ] 211 | }, 212 | "hx-validate": { 213 | "prefix": "hx-validate", 214 | "body": [ 215 | "hx-validate" 216 | ], 217 | "description": [ 218 | "force elements to validate themselves before a request\n", 219 | "https://htmx.org/attributes/hx-validate/" 220 | ] 221 | } 222 | } -------------------------------------------------------------------------------- /snippets/htmx-core-html.json: -------------------------------------------------------------------------------- 1 | { 2 | "hx-boost": { 3 | "prefix": "hx-boost", 4 | "body": [ 5 | "hx-boost=\"${1:true}\"" 6 | ], 7 | "description": [ 8 | "add or remove progressive enhancement for links and forms\n", 9 | "https://htmx.org/attributes/hx-boost/" 10 | ] 11 | }, 12 | "hx-get": { 13 | "prefix": "hx-get", 14 | "body": [ 15 | "hx-get=\"/${1:ENDPOINT}\"" 16 | ], 17 | "description": [ 18 | "Issues a `GET` to the specified URL\n", 19 | "https://htmx.org/attributes/hx-get\n", 20 | "type: string?" 21 | ] 22 | }, 23 | "hx-post": { 24 | "prefix": "hx-post", 25 | "body": [ 26 | "hx-post=\"/${1:ENDPOINT}\"" 27 | ], 28 | "description": [ 29 | "issues a POST to the specified URL\n", 30 | "https://htmx.org/attributes/hx-post/\n", 31 | "type: string?" 32 | ] 33 | }, 34 | "hx-on": { 35 | "prefix": "hx-on", 36 | "body": [ 37 | "hx-on:$01" 38 | ], 39 | "description": [ 40 | "handle events with a inline scripts on elements\n", 41 | "https://htmx.org/attributes/hx-on/" 42 | ] 43 | }, 44 | "hx-push-url": { 45 | "prefix": "hx-push-url", 46 | "body": [ 47 | "hx-push-url=\"${1:true}\"" 48 | ], 49 | "description": [ 50 | "pushes the URL into the browser location bar, creating a new history entry\n", 51 | "https://htmx.org/attributes/hx-push-url" 52 | ] 53 | }, 54 | "hx-select": { 55 | "prefix": "hx-select", 56 | "body": [ 57 | "hx-select=\"${01}\"" 58 | ], 59 | "description": [ 60 | "select content to swap in from a response\n", 61 | "https://htmx.org/attributes/hx-select/" 62 | ] 63 | }, 64 | "hx-select-oob": { 65 | "prefix": "hx-select-oob", 66 | "body": [ 67 | "hx-select-oob=\"${01}\"" 68 | ], 69 | "description": [ 70 | "select content to swap in from a response, out of band (somewhere other than the target)\n", 71 | "https://htmx.org/attributes/hx-select-oob/" 72 | ] 73 | }, 74 | "hx-swap": { 75 | "prefix": "hx-swap", 76 | "body": [ 77 | "hx-swap=\"${01}\"" 78 | ], 79 | "description": [ 80 | "controls how content is swapped in (outerHTML, beforeend, afterend, …)\n", 81 | "https://htmx.org/attributes/hx-swap/" 82 | ] 83 | }, 84 | "hx-swap-oob": { 85 | "prefix": "hx-swap-oob", 86 | "body": [ 87 | "hx-swap-oob=\"${01}\"" 88 | ], 89 | "description": [ 90 | "controls how content is swapped in (outerHTML, beforeend, afterend, …), out of band (somewhere other than the target)\n", 91 | "https://htmx.org/attributes/hx-swap-oob/" 92 | ] 93 | }, 94 | "hx-target": { 95 | "prefix": "hx-target", 96 | "body": [ 97 | "hx-target=\"${01}\"" 98 | ], 99 | "description": [ 100 | "specifies the target element to be swapped\n", 101 | "https://htmx.org/attributes/hx-target/" 102 | ] 103 | }, 104 | "hx-trigger": { 105 | "prefix": "hx-trigger", 106 | "body": [ 107 | "hx-trigger=\"${01}\"" 108 | ], 109 | "description": [ 110 | "specifies the event that triggers the request\n", 111 | "https://htmx.org/attributes/hx-trigger/" 112 | ] 113 | }, 114 | "hx-vals": { 115 | "prefix": "hx-vals", 116 | "body": [ 117 | "hx-vals='{\"${1:myVal$}\": \"${2:My Value}\"}'" 118 | ], 119 | "description": [ 120 | "adds values to the parameters to submit with the request (JSON-formatted)\n", 121 | "https://htmx.org/attributes/hx-vals/" 122 | ] 123 | } 124 | } -------------------------------------------------------------------------------- /snippets/htmx-core-jsx.json: -------------------------------------------------------------------------------- 1 | { 2 | "hx-boost": { 3 | "prefix": "hx-boost", 4 | "body": [ 5 | "hx-boost=\"${1:true}\"" 6 | ], 7 | "description": [ 8 | "add or remove progressive enhancement for links and forms\n", 9 | "https://htmx.org/attributes/hx-boost/" 10 | ] 11 | }, 12 | "hx-get": { 13 | "prefix": "hx-get", 14 | "body": [ 15 | "hx-get=\"/${1:ENDPOINT}\"" 16 | ], 17 | "description": [ 18 | "Issues a `GET` to the specified URL\n", 19 | "https://htmx.org/attributes/hx-get\n", 20 | "type: string?" 21 | ] 22 | }, 23 | "hx-post": { 24 | "prefix": "hx-post", 25 | "body": [ 26 | "hx-post=\"/${1:ENDPOINT}\"" 27 | ], 28 | "description": [ 29 | "issues a POST to the specified URL\n", 30 | "https://htmx.org/attributes/hx-post/\n", 31 | "type: string?" 32 | ] 33 | }, 34 | "hx-on": { 35 | "prefix": "hx-on", 36 | "body": [ 37 | "hx-on:$01" 38 | ], 39 | "description": [ 40 | "handle events with a inline scripts on elements\n", 41 | "https://htmx.org/attributes/hx-on/" 42 | ] 43 | }, 44 | "hx-push-url": { 45 | "prefix": "hx-push-url", 46 | "body": [ 47 | "hx-push-url=\"${1:true}\"" 48 | ], 49 | "description": [ 50 | "pushes the URL into the browser location bar, creating a new history entry\n", 51 | "https://htmx.org/attributes/hx-push-url" 52 | ] 53 | }, 54 | "hx-select": { 55 | "prefix": "hx-select", 56 | "body": [ 57 | "hx-select=\"${01}\"" 58 | ], 59 | "description": [ 60 | "select content to swap in from a response\n", 61 | "https://htmx.org/attributes/hx-select/" 62 | ] 63 | }, 64 | "hx-select-oob": { 65 | "prefix": "hx-select-oob", 66 | "body": [ 67 | "hx-select-oob=\"${01}\"" 68 | ], 69 | "description": [ 70 | "select content to swap in from a response, out of band (somewhere other than the target)\n", 71 | "https://htmx.org/attributes/hx-select-oob/" 72 | ] 73 | }, 74 | "hx-swap": { 75 | "prefix": "hx-swap", 76 | "body": [ 77 | "hx-swap=\"${01}\"" 78 | ], 79 | "description": [ 80 | "controls how content is swapped in (outerHTML, beforeend, afterend, …)\n", 81 | "https://htmx.org/attributes/hx-swap/" 82 | ] 83 | }, 84 | "hx-swap-oob": { 85 | "prefix": "hx-swap-oob", 86 | "body": [ 87 | "hx-swap-oob=\"${01}\"" 88 | ], 89 | "description": [ 90 | "controls how content is swapped in (outerHTML, beforeend, afterend, …), out of band (somewhere other than the target)\n", 91 | "https://htmx.org/attributes/hx-swap-oob/" 92 | ] 93 | }, 94 | "hx-target": { 95 | "prefix": "hx-target", 96 | "body": [ 97 | "hx-target=\"${01}\"" 98 | ], 99 | "description": [ 100 | "specifies the target element to be swapped\n", 101 | "https://htmx.org/attributes/hx-target/" 102 | ] 103 | }, 104 | "hx-trigger": { 105 | "prefix": "hx-trigger", 106 | "body": [ 107 | "hx-trigger=\"${01}\"" 108 | ], 109 | "description": [ 110 | "specifies the event that triggers the request\n", 111 | "https://htmx.org/attributes/hx-trigger/" 112 | ] 113 | }, 114 | "hx-vals": { 115 | "prefix": "hx-vals", 116 | "body": [ 117 | "hx-vals='{\"${1:myVal$}\": \"${2:My Value}\"}'" 118 | ], 119 | "description": [ 120 | "adds values to the parameters to submit with the request (JSON-formatted)\n", 121 | "https://htmx.org/attributes/hx-vals/" 122 | ] 123 | } 124 | } -------------------------------------------------------------------------------- /snippets/htmx-core-templ.json: -------------------------------------------------------------------------------- 1 | { 2 | "hx-boost": { 3 | "prefix": "hx-boost", 4 | "body": [ 5 | "hx-boost=\"${1:true}\"" 6 | ], 7 | "description": [ 8 | "add or remove progressive enhancement for links and forms\n", 9 | "https://htmx.org/attributes/hx-boost/" 10 | ] 11 | }, 12 | "hx-get": { 13 | "prefix": "hx-get", 14 | "body": [ 15 | "hx-get=\"/${1:ENDPOINT}\"" 16 | ], 17 | "description": [ 18 | "Issues a `GET` to the specified URL\n", 19 | "https://htmx.org/attributes/hx-get\n", 20 | "type: string?" 21 | ] 22 | }, 23 | "hx-post": { 24 | "prefix": "hx-post", 25 | "body": [ 26 | "hx-post=\"/${1:ENDPOINT}\"" 27 | ], 28 | "description": [ 29 | "issues a POST to the specified URL\n", 30 | "https://htmx.org/attributes/hx-post/\n", 31 | "type: string?" 32 | ] 33 | }, 34 | "hx-on": { 35 | "prefix": "hx-on", 36 | "body": [ 37 | "hx-on:$01" 38 | ], 39 | "description": [ 40 | "handle events with a inline scripts on elements\n", 41 | "https://htmx.org/attributes/hx-on/" 42 | ] 43 | }, 44 | "hx-push-url": { 45 | "prefix": "hx-push-url", 46 | "body": [ 47 | "hx-push-url=\"${1:true}\"" 48 | ], 49 | "description": [ 50 | "pushes the URL into the browser location bar, creating a new history entry\n", 51 | "https://htmx.org/attributes/hx-push-url" 52 | ] 53 | }, 54 | "hx-select": { 55 | "prefix": "hx-select", 56 | "body": [ 57 | "hx-select=\"${01}\"" 58 | ], 59 | "description": [ 60 | "select content to swap in from a response\n", 61 | "https://htmx.org/attributes/hx-select/" 62 | ] 63 | }, 64 | "hx-select-oob": { 65 | "prefix": "hx-select-oob", 66 | "body": [ 67 | "hx-select-oob=\"${01}\"" 68 | ], 69 | "description": [ 70 | "select content to swap in from a response, out of band (somewhere other than the target)\n", 71 | "https://htmx.org/attributes/hx-select-oob/" 72 | ] 73 | }, 74 | "hx-swap": { 75 | "prefix": "hx-swap", 76 | "body": [ 77 | "hx-swap=\"${01}\"" 78 | ], 79 | "description": [ 80 | "controls how content is swapped in (outerHTML, beforeend, afterend, …)\n", 81 | "https://htmx.org/attributes/hx-swap/" 82 | ] 83 | }, 84 | "hx-swap-oob": { 85 | "prefix": "hx-swap-oob", 86 | "body": [ 87 | "hx-swap-oob=\"${01}\"" 88 | ], 89 | "description": [ 90 | "controls how content is swapped in (outerHTML, beforeend, afterend, …), out of band (somewhere other than the target)\n", 91 | "https://htmx.org/attributes/hx-swap-oob/" 92 | ] 93 | }, 94 | "hx-target": { 95 | "prefix": "hx-target", 96 | "body": [ 97 | "hx-target=\"${01}\"" 98 | ], 99 | "description": [ 100 | "specifies the target element to be swapped\n", 101 | "https://htmx.org/attributes/hx-target/" 102 | ] 103 | }, 104 | "hx-trigger": { 105 | "prefix": "hx-trigger", 106 | "body": [ 107 | "hx-trigger=\"${01}\"" 108 | ], 109 | "description": [ 110 | "specifies the event that triggers the request\n", 111 | "https://htmx.org/attributes/hx-trigger/" 112 | ] 113 | }, 114 | "hx-vals": { 115 | "prefix": "hx-vals", 116 | "body": [ 117 | "hx-vals='{\"${1:myVal$}\": \"${2:My Value}\"}'" 118 | ], 119 | "description": [ 120 | "adds values to the parameters to submit with the request (JSON-formatted)\n", 121 | "https://htmx.org/attributes/hx-vals/" 122 | ] 123 | } 124 | } -------------------------------------------------------------------------------- /tests/go.templ: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | templ hello(name string) { 4 | 42 | } -------------------------------------------------------------------------------- /tests/rust/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 = "addr2line" 7 | version = "0.21.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler" 16 | version = "1.0.2" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 19 | 20 | [[package]] 21 | name = "askama" 22 | version = "0.12.1" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "b79091df18a97caea757e28cd2d5fda49c6cd4bd01ddffd7ff01ace0c0ad2c28" 25 | dependencies = [ 26 | "askama_derive", 27 | "askama_escape", 28 | "humansize", 29 | "num-traits", 30 | "percent-encoding", 31 | ] 32 | 33 | [[package]] 34 | name = "askama_derive" 35 | version = "0.12.4" 36 | source = "registry+https://github.com/rust-lang/crates.io-index" 37 | checksum = "2ccf09143e56923c12e027b83a9553210a3c58322ed8419a53461b14a4dccd85" 38 | dependencies = [ 39 | "askama_parser", 40 | "basic-toml", 41 | "mime", 42 | "mime_guess", 43 | "proc-macro2", 44 | "quote", 45 | "serde", 46 | "syn", 47 | ] 48 | 49 | [[package]] 50 | name = "askama_escape" 51 | version = "0.10.3" 52 | source = "registry+https://github.com/rust-lang/crates.io-index" 53 | checksum = "619743e34b5ba4e9703bba34deac3427c72507c7159f5fd030aea8cac0cfe341" 54 | 55 | [[package]] 56 | name = "askama_parser" 57 | version = "0.2.0" 58 | source = "registry+https://github.com/rust-lang/crates.io-index" 59 | checksum = "262eb9cf7be51269c5f2951eeda9ccd14d6934e437457f47b4f066bf55a6770d" 60 | dependencies = [ 61 | "nom", 62 | ] 63 | 64 | [[package]] 65 | name = "autocfg" 66 | version = "1.1.0" 67 | source = "registry+https://github.com/rust-lang/crates.io-index" 68 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 69 | 70 | [[package]] 71 | name = "backtrace" 72 | version = "0.3.69" 73 | source = "registry+https://github.com/rust-lang/crates.io-index" 74 | checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" 75 | dependencies = [ 76 | "addr2line", 77 | "cc", 78 | "cfg-if", 79 | "libc", 80 | "miniz_oxide", 81 | "object", 82 | "rustc-demangle", 83 | ] 84 | 85 | [[package]] 86 | name = "base64" 87 | version = "0.21.5" 88 | source = "registry+https://github.com/rust-lang/crates.io-index" 89 | checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" 90 | 91 | [[package]] 92 | name = "basic-toml" 93 | version = "0.1.8" 94 | source = "registry+https://github.com/rust-lang/crates.io-index" 95 | checksum = "2db21524cad41c5591204d22d75e1970a2d1f71060214ca931dc7d5afe2c14e5" 96 | dependencies = [ 97 | "serde", 98 | ] 99 | 100 | [[package]] 101 | name = "bitflags" 102 | version = "1.3.2" 103 | source = "registry+https://github.com/rust-lang/crates.io-index" 104 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 105 | 106 | [[package]] 107 | name = "block-buffer" 108 | version = "0.10.4" 109 | source = "registry+https://github.com/rust-lang/crates.io-index" 110 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 111 | dependencies = [ 112 | "generic-array", 113 | ] 114 | 115 | [[package]] 116 | name = "byteorder" 117 | version = "1.5.0" 118 | source = "registry+https://github.com/rust-lang/crates.io-index" 119 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 120 | 121 | [[package]] 122 | name = "bytes" 123 | version = "1.5.0" 124 | source = "registry+https://github.com/rust-lang/crates.io-index" 125 | checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" 126 | 127 | [[package]] 128 | name = "cc" 129 | version = "1.0.83" 130 | source = "registry+https://github.com/rust-lang/crates.io-index" 131 | checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" 132 | dependencies = [ 133 | "libc", 134 | ] 135 | 136 | [[package]] 137 | name = "cfg-if" 138 | version = "1.0.0" 139 | source = "registry+https://github.com/rust-lang/crates.io-index" 140 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 141 | 142 | [[package]] 143 | name = "cpufeatures" 144 | version = "0.2.12" 145 | source = "registry+https://github.com/rust-lang/crates.io-index" 146 | checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 147 | dependencies = [ 148 | "libc", 149 | ] 150 | 151 | [[package]] 152 | name = "crypto-common" 153 | version = "0.1.6" 154 | source = "registry+https://github.com/rust-lang/crates.io-index" 155 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 156 | dependencies = [ 157 | "generic-array", 158 | "typenum", 159 | ] 160 | 161 | [[package]] 162 | name = "data-encoding" 163 | version = "2.5.0" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" 166 | 167 | [[package]] 168 | name = "digest" 169 | version = "0.10.7" 170 | source = "registry+https://github.com/rust-lang/crates.io-index" 171 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 172 | dependencies = [ 173 | "block-buffer", 174 | "crypto-common", 175 | ] 176 | 177 | [[package]] 178 | name = "encoding_rs" 179 | version = "0.8.33" 180 | source = "registry+https://github.com/rust-lang/crates.io-index" 181 | checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" 182 | dependencies = [ 183 | "cfg-if", 184 | ] 185 | 186 | [[package]] 187 | name = "equivalent" 188 | version = "1.0.1" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 191 | 192 | [[package]] 193 | name = "fnv" 194 | version = "1.0.7" 195 | source = "registry+https://github.com/rust-lang/crates.io-index" 196 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 197 | 198 | [[package]] 199 | name = "form_urlencoded" 200 | version = "1.2.1" 201 | source = "registry+https://github.com/rust-lang/crates.io-index" 202 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 203 | dependencies = [ 204 | "percent-encoding", 205 | ] 206 | 207 | [[package]] 208 | name = "futures-channel" 209 | version = "0.3.30" 210 | source = "registry+https://github.com/rust-lang/crates.io-index" 211 | checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" 212 | dependencies = [ 213 | "futures-core", 214 | "futures-sink", 215 | ] 216 | 217 | [[package]] 218 | name = "futures-core" 219 | version = "0.3.30" 220 | source = "registry+https://github.com/rust-lang/crates.io-index" 221 | checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" 222 | 223 | [[package]] 224 | name = "futures-sink" 225 | version = "0.3.30" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" 228 | 229 | [[package]] 230 | name = "futures-task" 231 | version = "0.3.30" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" 234 | 235 | [[package]] 236 | name = "futures-util" 237 | version = "0.3.30" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" 240 | dependencies = [ 241 | "futures-core", 242 | "futures-sink", 243 | "futures-task", 244 | "pin-project-lite", 245 | "pin-utils", 246 | "slab", 247 | ] 248 | 249 | [[package]] 250 | name = "generic-array" 251 | version = "0.14.7" 252 | source = "registry+https://github.com/rust-lang/crates.io-index" 253 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 254 | dependencies = [ 255 | "typenum", 256 | "version_check", 257 | ] 258 | 259 | [[package]] 260 | name = "getrandom" 261 | version = "0.2.11" 262 | source = "registry+https://github.com/rust-lang/crates.io-index" 263 | checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" 264 | dependencies = [ 265 | "cfg-if", 266 | "libc", 267 | "wasi", 268 | ] 269 | 270 | [[package]] 271 | name = "gimli" 272 | version = "0.28.1" 273 | source = "registry+https://github.com/rust-lang/crates.io-index" 274 | checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" 275 | 276 | [[package]] 277 | name = "h2" 278 | version = "0.3.22" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" 281 | dependencies = [ 282 | "bytes", 283 | "fnv", 284 | "futures-core", 285 | "futures-sink", 286 | "futures-util", 287 | "http", 288 | "indexmap", 289 | "slab", 290 | "tokio", 291 | "tokio-util", 292 | "tracing", 293 | ] 294 | 295 | [[package]] 296 | name = "hashbrown" 297 | version = "0.14.3" 298 | source = "registry+https://github.com/rust-lang/crates.io-index" 299 | checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" 300 | 301 | [[package]] 302 | name = "headers" 303 | version = "0.3.9" 304 | source = "registry+https://github.com/rust-lang/crates.io-index" 305 | checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" 306 | dependencies = [ 307 | "base64", 308 | "bytes", 309 | "headers-core", 310 | "http", 311 | "httpdate", 312 | "mime", 313 | "sha1", 314 | ] 315 | 316 | [[package]] 317 | name = "headers-core" 318 | version = "0.2.0" 319 | source = "registry+https://github.com/rust-lang/crates.io-index" 320 | checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" 321 | dependencies = [ 322 | "http", 323 | ] 324 | 325 | [[package]] 326 | name = "hermit-abi" 327 | version = "0.3.3" 328 | source = "registry+https://github.com/rust-lang/crates.io-index" 329 | checksum = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" 330 | 331 | [[package]] 332 | name = "http" 333 | version = "0.2.11" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" 336 | dependencies = [ 337 | "bytes", 338 | "fnv", 339 | "itoa", 340 | ] 341 | 342 | [[package]] 343 | name = "http-body" 344 | version = "0.4.6" 345 | source = "registry+https://github.com/rust-lang/crates.io-index" 346 | checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" 347 | dependencies = [ 348 | "bytes", 349 | "http", 350 | "pin-project-lite", 351 | ] 352 | 353 | [[package]] 354 | name = "httparse" 355 | version = "1.8.0" 356 | source = "registry+https://github.com/rust-lang/crates.io-index" 357 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 358 | 359 | [[package]] 360 | name = "httpdate" 361 | version = "1.0.3" 362 | source = "registry+https://github.com/rust-lang/crates.io-index" 363 | checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 364 | 365 | [[package]] 366 | name = "humansize" 367 | version = "2.1.3" 368 | source = "registry+https://github.com/rust-lang/crates.io-index" 369 | checksum = "6cb51c9a029ddc91b07a787f1d86b53ccfa49b0e86688c946ebe8d3555685dd7" 370 | dependencies = [ 371 | "libm", 372 | ] 373 | 374 | [[package]] 375 | name = "hyper" 376 | version = "0.14.28" 377 | source = "registry+https://github.com/rust-lang/crates.io-index" 378 | checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" 379 | dependencies = [ 380 | "bytes", 381 | "futures-channel", 382 | "futures-core", 383 | "futures-util", 384 | "h2", 385 | "http", 386 | "http-body", 387 | "httparse", 388 | "httpdate", 389 | "itoa", 390 | "pin-project-lite", 391 | "socket2", 392 | "tokio", 393 | "tower-service", 394 | "tracing", 395 | "want", 396 | ] 397 | 398 | [[package]] 399 | name = "idna" 400 | version = "0.5.0" 401 | source = "registry+https://github.com/rust-lang/crates.io-index" 402 | checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" 403 | dependencies = [ 404 | "unicode-bidi", 405 | "unicode-normalization", 406 | ] 407 | 408 | [[package]] 409 | name = "indexmap" 410 | version = "2.1.0" 411 | source = "registry+https://github.com/rust-lang/crates.io-index" 412 | checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" 413 | dependencies = [ 414 | "equivalent", 415 | "hashbrown", 416 | ] 417 | 418 | [[package]] 419 | name = "itoa" 420 | version = "1.0.10" 421 | source = "registry+https://github.com/rust-lang/crates.io-index" 422 | checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" 423 | 424 | [[package]] 425 | name = "libc" 426 | version = "0.2.151" 427 | source = "registry+https://github.com/rust-lang/crates.io-index" 428 | checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" 429 | 430 | [[package]] 431 | name = "libm" 432 | version = "0.2.8" 433 | source = "registry+https://github.com/rust-lang/crates.io-index" 434 | checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" 435 | 436 | [[package]] 437 | name = "lock_api" 438 | version = "0.4.11" 439 | source = "registry+https://github.com/rust-lang/crates.io-index" 440 | checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" 441 | dependencies = [ 442 | "autocfg", 443 | "scopeguard", 444 | ] 445 | 446 | [[package]] 447 | name = "log" 448 | version = "0.4.20" 449 | source = "registry+https://github.com/rust-lang/crates.io-index" 450 | checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" 451 | 452 | [[package]] 453 | name = "memchr" 454 | version = "2.7.1" 455 | source = "registry+https://github.com/rust-lang/crates.io-index" 456 | checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" 457 | 458 | [[package]] 459 | name = "mime" 460 | version = "0.3.17" 461 | source = "registry+https://github.com/rust-lang/crates.io-index" 462 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 463 | 464 | [[package]] 465 | name = "mime_guess" 466 | version = "2.0.4" 467 | source = "registry+https://github.com/rust-lang/crates.io-index" 468 | checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" 469 | dependencies = [ 470 | "mime", 471 | "unicase", 472 | ] 473 | 474 | [[package]] 475 | name = "minimal-lexical" 476 | version = "0.2.1" 477 | source = "registry+https://github.com/rust-lang/crates.io-index" 478 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 479 | 480 | [[package]] 481 | name = "miniz_oxide" 482 | version = "0.7.1" 483 | source = "registry+https://github.com/rust-lang/crates.io-index" 484 | checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" 485 | dependencies = [ 486 | "adler", 487 | ] 488 | 489 | [[package]] 490 | name = "mio" 491 | version = "0.8.10" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" 494 | dependencies = [ 495 | "libc", 496 | "wasi", 497 | "windows-sys", 498 | ] 499 | 500 | [[package]] 501 | name = "multer" 502 | version = "2.1.0" 503 | source = "registry+https://github.com/rust-lang/crates.io-index" 504 | checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" 505 | dependencies = [ 506 | "bytes", 507 | "encoding_rs", 508 | "futures-util", 509 | "http", 510 | "httparse", 511 | "log", 512 | "memchr", 513 | "mime", 514 | "spin", 515 | "version_check", 516 | ] 517 | 518 | [[package]] 519 | name = "nom" 520 | version = "7.1.3" 521 | source = "registry+https://github.com/rust-lang/crates.io-index" 522 | checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 523 | dependencies = [ 524 | "memchr", 525 | "minimal-lexical", 526 | ] 527 | 528 | [[package]] 529 | name = "num-traits" 530 | version = "0.2.17" 531 | source = "registry+https://github.com/rust-lang/crates.io-index" 532 | checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" 533 | dependencies = [ 534 | "autocfg", 535 | ] 536 | 537 | [[package]] 538 | name = "num_cpus" 539 | version = "1.16.0" 540 | source = "registry+https://github.com/rust-lang/crates.io-index" 541 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 542 | dependencies = [ 543 | "hermit-abi", 544 | "libc", 545 | ] 546 | 547 | [[package]] 548 | name = "object" 549 | version = "0.32.2" 550 | source = "registry+https://github.com/rust-lang/crates.io-index" 551 | checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" 552 | dependencies = [ 553 | "memchr", 554 | ] 555 | 556 | [[package]] 557 | name = "once_cell" 558 | version = "1.19.0" 559 | source = "registry+https://github.com/rust-lang/crates.io-index" 560 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 561 | 562 | [[package]] 563 | name = "parking_lot" 564 | version = "0.12.1" 565 | source = "registry+https://github.com/rust-lang/crates.io-index" 566 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 567 | dependencies = [ 568 | "lock_api", 569 | "parking_lot_core", 570 | ] 571 | 572 | [[package]] 573 | name = "parking_lot_core" 574 | version = "0.9.9" 575 | source = "registry+https://github.com/rust-lang/crates.io-index" 576 | checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" 577 | dependencies = [ 578 | "cfg-if", 579 | "libc", 580 | "redox_syscall", 581 | "smallvec", 582 | "windows-targets", 583 | ] 584 | 585 | [[package]] 586 | name = "percent-encoding" 587 | version = "2.3.1" 588 | source = "registry+https://github.com/rust-lang/crates.io-index" 589 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 590 | 591 | [[package]] 592 | name = "pin-project" 593 | version = "1.1.3" 594 | source = "registry+https://github.com/rust-lang/crates.io-index" 595 | checksum = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" 596 | dependencies = [ 597 | "pin-project-internal", 598 | ] 599 | 600 | [[package]] 601 | name = "pin-project-internal" 602 | version = "1.1.3" 603 | source = "registry+https://github.com/rust-lang/crates.io-index" 604 | checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" 605 | dependencies = [ 606 | "proc-macro2", 607 | "quote", 608 | "syn", 609 | ] 610 | 611 | [[package]] 612 | name = "pin-project-lite" 613 | version = "0.2.13" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" 616 | 617 | [[package]] 618 | name = "pin-utils" 619 | version = "0.1.0" 620 | source = "registry+https://github.com/rust-lang/crates.io-index" 621 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 622 | 623 | [[package]] 624 | name = "ppv-lite86" 625 | version = "0.2.17" 626 | source = "registry+https://github.com/rust-lang/crates.io-index" 627 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 628 | 629 | [[package]] 630 | name = "proc-macro2" 631 | version = "1.0.76" 632 | source = "registry+https://github.com/rust-lang/crates.io-index" 633 | checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" 634 | dependencies = [ 635 | "unicode-ident", 636 | ] 637 | 638 | [[package]] 639 | name = "quote" 640 | version = "1.0.35" 641 | source = "registry+https://github.com/rust-lang/crates.io-index" 642 | checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" 643 | dependencies = [ 644 | "proc-macro2", 645 | ] 646 | 647 | [[package]] 648 | name = "rand" 649 | version = "0.8.5" 650 | source = "registry+https://github.com/rust-lang/crates.io-index" 651 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 652 | dependencies = [ 653 | "libc", 654 | "rand_chacha", 655 | "rand_core", 656 | ] 657 | 658 | [[package]] 659 | name = "rand_chacha" 660 | version = "0.3.1" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 663 | dependencies = [ 664 | "ppv-lite86", 665 | "rand_core", 666 | ] 667 | 668 | [[package]] 669 | name = "rand_core" 670 | version = "0.6.4" 671 | source = "registry+https://github.com/rust-lang/crates.io-index" 672 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 673 | dependencies = [ 674 | "getrandom", 675 | ] 676 | 677 | [[package]] 678 | name = "redox_syscall" 679 | version = "0.4.1" 680 | source = "registry+https://github.com/rust-lang/crates.io-index" 681 | checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" 682 | dependencies = [ 683 | "bitflags", 684 | ] 685 | 686 | [[package]] 687 | name = "rust" 688 | version = "0.1.0" 689 | dependencies = [ 690 | "askama", 691 | "tokio", 692 | "warp", 693 | ] 694 | 695 | [[package]] 696 | name = "rustc-demangle" 697 | version = "0.1.23" 698 | source = "registry+https://github.com/rust-lang/crates.io-index" 699 | checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" 700 | 701 | [[package]] 702 | name = "rustls-pemfile" 703 | version = "1.0.4" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" 706 | dependencies = [ 707 | "base64", 708 | ] 709 | 710 | [[package]] 711 | name = "ryu" 712 | version = "1.0.16" 713 | source = "registry+https://github.com/rust-lang/crates.io-index" 714 | checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" 715 | 716 | [[package]] 717 | name = "scoped-tls" 718 | version = "1.0.1" 719 | source = "registry+https://github.com/rust-lang/crates.io-index" 720 | checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" 721 | 722 | [[package]] 723 | name = "scopeguard" 724 | version = "1.2.0" 725 | source = "registry+https://github.com/rust-lang/crates.io-index" 726 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 727 | 728 | [[package]] 729 | name = "serde" 730 | version = "1.0.195" 731 | source = "registry+https://github.com/rust-lang/crates.io-index" 732 | checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" 733 | dependencies = [ 734 | "serde_derive", 735 | ] 736 | 737 | [[package]] 738 | name = "serde_derive" 739 | version = "1.0.195" 740 | source = "registry+https://github.com/rust-lang/crates.io-index" 741 | checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" 742 | dependencies = [ 743 | "proc-macro2", 744 | "quote", 745 | "syn", 746 | ] 747 | 748 | [[package]] 749 | name = "serde_json" 750 | version = "1.0.111" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" 753 | dependencies = [ 754 | "itoa", 755 | "ryu", 756 | "serde", 757 | ] 758 | 759 | [[package]] 760 | name = "serde_urlencoded" 761 | version = "0.7.1" 762 | source = "registry+https://github.com/rust-lang/crates.io-index" 763 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 764 | dependencies = [ 765 | "form_urlencoded", 766 | "itoa", 767 | "ryu", 768 | "serde", 769 | ] 770 | 771 | [[package]] 772 | name = "sha1" 773 | version = "0.10.6" 774 | source = "registry+https://github.com/rust-lang/crates.io-index" 775 | checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" 776 | dependencies = [ 777 | "cfg-if", 778 | "cpufeatures", 779 | "digest", 780 | ] 781 | 782 | [[package]] 783 | name = "signal-hook-registry" 784 | version = "1.4.1" 785 | source = "registry+https://github.com/rust-lang/crates.io-index" 786 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 787 | dependencies = [ 788 | "libc", 789 | ] 790 | 791 | [[package]] 792 | name = "slab" 793 | version = "0.4.9" 794 | source = "registry+https://github.com/rust-lang/crates.io-index" 795 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 796 | dependencies = [ 797 | "autocfg", 798 | ] 799 | 800 | [[package]] 801 | name = "smallvec" 802 | version = "1.11.2" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" 805 | 806 | [[package]] 807 | name = "socket2" 808 | version = "0.5.5" 809 | source = "registry+https://github.com/rust-lang/crates.io-index" 810 | checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" 811 | dependencies = [ 812 | "libc", 813 | "windows-sys", 814 | ] 815 | 816 | [[package]] 817 | name = "spin" 818 | version = "0.9.8" 819 | source = "registry+https://github.com/rust-lang/crates.io-index" 820 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 821 | 822 | [[package]] 823 | name = "syn" 824 | version = "2.0.48" 825 | source = "registry+https://github.com/rust-lang/crates.io-index" 826 | checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" 827 | dependencies = [ 828 | "proc-macro2", 829 | "quote", 830 | "unicode-ident", 831 | ] 832 | 833 | [[package]] 834 | name = "thiserror" 835 | version = "1.0.56" 836 | source = "registry+https://github.com/rust-lang/crates.io-index" 837 | checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" 838 | dependencies = [ 839 | "thiserror-impl", 840 | ] 841 | 842 | [[package]] 843 | name = "thiserror-impl" 844 | version = "1.0.56" 845 | source = "registry+https://github.com/rust-lang/crates.io-index" 846 | checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" 847 | dependencies = [ 848 | "proc-macro2", 849 | "quote", 850 | "syn", 851 | ] 852 | 853 | [[package]] 854 | name = "tinyvec" 855 | version = "1.6.0" 856 | source = "registry+https://github.com/rust-lang/crates.io-index" 857 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 858 | dependencies = [ 859 | "tinyvec_macros", 860 | ] 861 | 862 | [[package]] 863 | name = "tinyvec_macros" 864 | version = "0.1.1" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 867 | 868 | [[package]] 869 | name = "tokio" 870 | version = "1.35.1" 871 | source = "registry+https://github.com/rust-lang/crates.io-index" 872 | checksum = "c89b4efa943be685f629b149f53829423f8f5531ea21249408e8e2f8671ec104" 873 | dependencies = [ 874 | "backtrace", 875 | "bytes", 876 | "libc", 877 | "mio", 878 | "num_cpus", 879 | "parking_lot", 880 | "pin-project-lite", 881 | "signal-hook-registry", 882 | "socket2", 883 | "tokio-macros", 884 | "windows-sys", 885 | ] 886 | 887 | [[package]] 888 | name = "tokio-macros" 889 | version = "2.2.0" 890 | source = "registry+https://github.com/rust-lang/crates.io-index" 891 | checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" 892 | dependencies = [ 893 | "proc-macro2", 894 | "quote", 895 | "syn", 896 | ] 897 | 898 | [[package]] 899 | name = "tokio-stream" 900 | version = "0.1.14" 901 | source = "registry+https://github.com/rust-lang/crates.io-index" 902 | checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" 903 | dependencies = [ 904 | "futures-core", 905 | "pin-project-lite", 906 | "tokio", 907 | ] 908 | 909 | [[package]] 910 | name = "tokio-tungstenite" 911 | version = "0.20.1" 912 | source = "registry+https://github.com/rust-lang/crates.io-index" 913 | checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" 914 | dependencies = [ 915 | "futures-util", 916 | "log", 917 | "tokio", 918 | "tungstenite", 919 | ] 920 | 921 | [[package]] 922 | name = "tokio-util" 923 | version = "0.7.10" 924 | source = "registry+https://github.com/rust-lang/crates.io-index" 925 | checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" 926 | dependencies = [ 927 | "bytes", 928 | "futures-core", 929 | "futures-sink", 930 | "pin-project-lite", 931 | "tokio", 932 | "tracing", 933 | ] 934 | 935 | [[package]] 936 | name = "tower-service" 937 | version = "0.3.2" 938 | source = "registry+https://github.com/rust-lang/crates.io-index" 939 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 940 | 941 | [[package]] 942 | name = "tracing" 943 | version = "0.1.40" 944 | source = "registry+https://github.com/rust-lang/crates.io-index" 945 | checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" 946 | dependencies = [ 947 | "log", 948 | "pin-project-lite", 949 | "tracing-core", 950 | ] 951 | 952 | [[package]] 953 | name = "tracing-core" 954 | version = "0.1.32" 955 | source = "registry+https://github.com/rust-lang/crates.io-index" 956 | checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" 957 | dependencies = [ 958 | "once_cell", 959 | ] 960 | 961 | [[package]] 962 | name = "try-lock" 963 | version = "0.2.5" 964 | source = "registry+https://github.com/rust-lang/crates.io-index" 965 | checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 966 | 967 | [[package]] 968 | name = "tungstenite" 969 | version = "0.20.1" 970 | source = "registry+https://github.com/rust-lang/crates.io-index" 971 | checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" 972 | dependencies = [ 973 | "byteorder", 974 | "bytes", 975 | "data-encoding", 976 | "http", 977 | "httparse", 978 | "log", 979 | "rand", 980 | "sha1", 981 | "thiserror", 982 | "url", 983 | "utf-8", 984 | ] 985 | 986 | [[package]] 987 | name = "typenum" 988 | version = "1.17.0" 989 | source = "registry+https://github.com/rust-lang/crates.io-index" 990 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 991 | 992 | [[package]] 993 | name = "unicase" 994 | version = "2.7.0" 995 | source = "registry+https://github.com/rust-lang/crates.io-index" 996 | checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" 997 | dependencies = [ 998 | "version_check", 999 | ] 1000 | 1001 | [[package]] 1002 | name = "unicode-bidi" 1003 | version = "0.3.14" 1004 | source = "registry+https://github.com/rust-lang/crates.io-index" 1005 | checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" 1006 | 1007 | [[package]] 1008 | name = "unicode-ident" 1009 | version = "1.0.12" 1010 | source = "registry+https://github.com/rust-lang/crates.io-index" 1011 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 1012 | 1013 | [[package]] 1014 | name = "unicode-normalization" 1015 | version = "0.1.22" 1016 | source = "registry+https://github.com/rust-lang/crates.io-index" 1017 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 1018 | dependencies = [ 1019 | "tinyvec", 1020 | ] 1021 | 1022 | [[package]] 1023 | name = "url" 1024 | version = "2.5.0" 1025 | source = "registry+https://github.com/rust-lang/crates.io-index" 1026 | checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" 1027 | dependencies = [ 1028 | "form_urlencoded", 1029 | "idna", 1030 | "percent-encoding", 1031 | ] 1032 | 1033 | [[package]] 1034 | name = "utf-8" 1035 | version = "0.7.6" 1036 | source = "registry+https://github.com/rust-lang/crates.io-index" 1037 | checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" 1038 | 1039 | [[package]] 1040 | name = "version_check" 1041 | version = "0.9.4" 1042 | source = "registry+https://github.com/rust-lang/crates.io-index" 1043 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1044 | 1045 | [[package]] 1046 | name = "want" 1047 | version = "0.3.1" 1048 | source = "registry+https://github.com/rust-lang/crates.io-index" 1049 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 1050 | dependencies = [ 1051 | "try-lock", 1052 | ] 1053 | 1054 | [[package]] 1055 | name = "warp" 1056 | version = "0.3.6" 1057 | source = "registry+https://github.com/rust-lang/crates.io-index" 1058 | checksum = "c1e92e22e03ff1230c03a1a8ee37d2f89cd489e2e541b7550d6afad96faed169" 1059 | dependencies = [ 1060 | "bytes", 1061 | "futures-channel", 1062 | "futures-util", 1063 | "headers", 1064 | "http", 1065 | "hyper", 1066 | "log", 1067 | "mime", 1068 | "mime_guess", 1069 | "multer", 1070 | "percent-encoding", 1071 | "pin-project", 1072 | "rustls-pemfile", 1073 | "scoped-tls", 1074 | "serde", 1075 | "serde_json", 1076 | "serde_urlencoded", 1077 | "tokio", 1078 | "tokio-stream", 1079 | "tokio-tungstenite", 1080 | "tokio-util", 1081 | "tower-service", 1082 | "tracing", 1083 | ] 1084 | 1085 | [[package]] 1086 | name = "wasi" 1087 | version = "0.11.0+wasi-snapshot-preview1" 1088 | source = "registry+https://github.com/rust-lang/crates.io-index" 1089 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1090 | 1091 | [[package]] 1092 | name = "windows-sys" 1093 | version = "0.48.0" 1094 | source = "registry+https://github.com/rust-lang/crates.io-index" 1095 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 1096 | dependencies = [ 1097 | "windows-targets", 1098 | ] 1099 | 1100 | [[package]] 1101 | name = "windows-targets" 1102 | version = "0.48.5" 1103 | source = "registry+https://github.com/rust-lang/crates.io-index" 1104 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 1105 | dependencies = [ 1106 | "windows_aarch64_gnullvm", 1107 | "windows_aarch64_msvc", 1108 | "windows_i686_gnu", 1109 | "windows_i686_msvc", 1110 | "windows_x86_64_gnu", 1111 | "windows_x86_64_gnullvm", 1112 | "windows_x86_64_msvc", 1113 | ] 1114 | 1115 | [[package]] 1116 | name = "windows_aarch64_gnullvm" 1117 | version = "0.48.5" 1118 | source = "registry+https://github.com/rust-lang/crates.io-index" 1119 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 1120 | 1121 | [[package]] 1122 | name = "windows_aarch64_msvc" 1123 | version = "0.48.5" 1124 | source = "registry+https://github.com/rust-lang/crates.io-index" 1125 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 1126 | 1127 | [[package]] 1128 | name = "windows_i686_gnu" 1129 | version = "0.48.5" 1130 | source = "registry+https://github.com/rust-lang/crates.io-index" 1131 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 1132 | 1133 | [[package]] 1134 | name = "windows_i686_msvc" 1135 | version = "0.48.5" 1136 | source = "registry+https://github.com/rust-lang/crates.io-index" 1137 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 1138 | 1139 | [[package]] 1140 | name = "windows_x86_64_gnu" 1141 | version = "0.48.5" 1142 | source = "registry+https://github.com/rust-lang/crates.io-index" 1143 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 1144 | 1145 | [[package]] 1146 | name = "windows_x86_64_gnullvm" 1147 | version = "0.48.5" 1148 | source = "registry+https://github.com/rust-lang/crates.io-index" 1149 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 1150 | 1151 | [[package]] 1152 | name = "windows_x86_64_msvc" 1153 | version = "0.48.5" 1154 | source = "registry+https://github.com/rust-lang/crates.io-index" 1155 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 1156 | -------------------------------------------------------------------------------- /tests/rust/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | askama = "0.12.1" 10 | tokio = { version = "1", features = ["full"] } 11 | warp = "0.3.6" 12 | -------------------------------------------------------------------------------- /tests/rust/src/main.rs: -------------------------------------------------------------------------------- 1 | use warp::Filter; 2 | use askama::Template; 3 | 4 | #[derive(Template)] 5 | #[template(path = "hello.html")] 6 | struct HelloTemplate { 7 | button_text: &'static str, 8 | } 9 | 10 | #[derive(Template)] 11 | #[template(path = "update.html")] 12 | struct UpdateTemplate {} 13 | 14 | #[tokio::main] 15 | async fn main() { 16 | // Define a simple route that serves an HTML page 17 | let index = warp::path::end() 18 | .map(|| { 19 | let template = HelloTemplate { 20 | button_text: "Update", 21 | }; 22 | warp::reply::html(template.render().unwrap()) 23 | }); 24 | 25 | 26 | // Define a route to handle HTMX updates 27 | let update = warp::path!("update") 28 | .map(|| { 29 | let update_template = UpdateTemplate {}; 30 | warp::reply::html(update_template.render().unwrap()) 31 | }); 32 | 33 | // Combine the routes 34 | let routes = index.or(update); 35 | 36 | // Start the warp server 37 | warp::serve(routes) 38 | .run(([127, 0, 0, 1], 3030)) 39 | .await; 40 | } 41 | -------------------------------------------------------------------------------- /tests/rust/templates/hello.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Rust HTMX Example 8 | 9 | 10 | 11 | 12 | 13 |
14 | Hello, World! 15 | 16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/rust/templates/update.html: -------------------------------------------------------------------------------- 1 |

Update from the server!

-------------------------------------------------------------------------------- /tests/test.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 | 44 | 45 | -------------------------------------------------------------------------------- /tests/test.jsx: -------------------------------------------------------------------------------- 1 | export default function test(test) { 2 | return ( 3 | 40 | ) 41 | } -------------------------------------------------------------------------------- /tests/test.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /tests/tsx.tsx: -------------------------------------------------------------------------------- 1 | export default function test(test: any) { 2 | return ( 3 | 40 | ) 41 | } -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["ESNext"], 4 | "module": "esnext", 5 | "target": "esnext", 6 | "moduleResolution": "bundler", 7 | "moduleDetection": "force", 8 | "allowImportingTsExtensions": true, 9 | "noEmit": true, 10 | "composite": true, 11 | "strict": true, 12 | "downlevelIteration": true, 13 | "skipLibCheck": true, 14 | "jsx": "react-jsx", 15 | "jsxImportSource": "hono/jsx", 16 | "allowSyntheticDefaultImports": true, 17 | "forceConsistentCasingInFileNames": true, 18 | "allowJs": true, 19 | "types": [ 20 | "bun-types" // add Bun global 21 | ] 22 | } 23 | } 24 | --------------------------------------------------------------------------------