Merge branch 'master' of github.com:bigskysoftware/htmx

This commit is contained in:
Carson Gross 2022-11-04 19:14:19 -06:00
commit 5f2e19df3f
5 changed files with 36 additions and 8 deletions

View File

@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/v2-preview/web-types.json",
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
"name": "htmx",
"version": "0.0.0",
"version": "1.0.0",
"js-types-syntax": "typescript",
"description-markup": "markdown",
"contributions": {
@ -248,8 +248,35 @@
"doc-url": "https://htmx.org/attributes/hx-ws"
}
]
},
"css": {
"classes": [
{
"name": "htmx-added",
"description": "Applied to a new piece of content before it is swapped, removed after it is settled.",
"doc-url": "https://htmx.org/reference/#classes"
},
{
"name": "htmx-indicator",
"description": "A dynamically generated class that will toggle visible (opacity:1) when a `htmx-request` class is present.",
"doc-url": "https://htmx.org/reference/#classes"
},
{
"name": "htmx-request",
"description": "Applied to either the element or the element specified with `hx-indicator` while a request is ongoing.",
"doc-url": "https://htmx.org/reference/#classes"
},
{
"name": "htmx-settling",
"description": "Applied to a target after content is swapped, removed after it is settled. The duration can be modified via `hx-swap`.",
"doc-url": "https://htmx.org/reference/#classes"
},
{
"name": "htmx-swapping",
"description": "Applied to a target before any content is swapped, removed after it is swapped. The duration can be modified via `hx-swap`.",
"doc-url": "https://htmx.org/reference/#classes"
}
]
}
}
}
| [`hx-ws`](/extensions/websockets) | has been moved to an extension. [Documentation for older versions](/attributes/hx-ws)

View File

@ -22,6 +22,7 @@
"main": "dist/htmx.min.js",
"types": "src/htmx.d.ts",
"unpkg": "dist/htmx.min.js",
"web-types": "editors/jetbrains/htmx.web-types.json",
"scripts": {
"test": "mocha-chrome test/index.html",
"test-types": "tsc --project ./jsconfig.json",

View File

@ -17,7 +17,7 @@ We start with a search input and an empty table:
</h3>
<input class="form-control" type="search"
name="search" placeholder="Begin Typing To Search Users..."
hx-get="/search"
hx-post="/search"
hx-trigger="keyup changed delay:500ms, search"
hx-target="#search-results"
hx-indicator=".htmx-indicator">

View File

@ -10,7 +10,7 @@ This response header can be used to trigger a client side redirection without re
A sample response would be:
```
```html
HX-Location: /test
```
@ -19,7 +19,7 @@ Which would push the client to test as if the user had clicked on `<a href="/tes
If you want to redirect to a specific target on the page rather than the default of document.body, you can pass more details along with the event, by using JSON for the value of the header:
```
```html
HX-Location: {"path":"/test2", "target":"#testdiv"}
```
Path is required and is url to load the response from. The rest of the data mirrors the [`ajax` api](/api#ajax) context, which is:

View File

@ -63,7 +63,7 @@ The table below lists all other attributes available in htmx.
| [`hx-replace-url`](/attributes/hx-replace-url) | replace the URL in the browser location bar
| [`hx-request`](/attributes/hx-request) | configures various aspects of the request
| [`hx-sse`](/extensions/server-sent-events) | has been moved to an extension. [Documentation for older versions](/attributes/hx-sse)
| [`hx-sync`](/attributes/hx-sync) | control how requests made be different elements are synchronized
| [`hx-sync`](/attributes/hx-sync) | control how requests made by different elements are synchronized
| [`hx-vars`](/attributes/hx-vars) | adds values dynamically to the parameters to submit with the request (deprecated, please use [`hx-vals`](/attributes/hx-vals))
| [`hx-ws`](/extensions/web-sockets) | has been moved to an extension. [Documentation for older versions](/attributes/hx-ws)