2023-07-28 04:23:46 +02:00
# Changelog
2024-05-14 01:06:24 +02:00
## v0.6.0
- Added support for Vary headers in responses via the `VaryHxRequest` , `VaryHxTarget` , `VaryHxTrigger` , and `VaryHxTriggerName` responders. [@imbolc ](https://github.com/imbolc )
- Header names/values are now typed as `HeaderName` and `HeaderValue` instead of
`&str` . [@imbolc ](https://github.com/imbolc )
- `HxError` now implements source on `error::Error` . [@imbolc ](https://github.com/imbolc )
2023-11-28 01:38:23 +01:00
## v0.5.0
2023-12-03 21:47:28 +01:00
There are some several breaking changes in this release. Big thanks to
[@ItsEthra ](https://github.com/ItsEthra ) for their work in several PRs!
- All responders now take an `HxEvent` instead of a `String | HxEvent` . When the
`serde` flag is enabled, it will expose additional data fields.
- `HxResponseTrigger` is now a simple struct containing an `TriggerMode` and a
`Vec<HxEvent>` . There are several methods to make constructing these easier:
`HxResponseTrigger::normal` ,
`HxResponseTrigger::after_settle` , and
`HxResponseTrigger::after_swap` .
2023-12-03 22:47:55 +01:00
- The `HxCurrentUrl` extractor now returns an `Option<axum::http::Uri>` instead
2023-12-03 21:47:28 +01:00
of a `String` . If the Uri cannot be parsed, it will return `None` .
- All Uri-related responders now impl `TryFrom<&str>` .
- `HxError::Serialization` has been renamed to `HxError::Json` .
- The `HxResponseTrigger*` header will not be added to the response if the event
list is empty.
- Added feature flag badges and made additional updates to the docs.rs pages.
2023-12-01 00:33:20 +01:00
- Reduced dependency count / compile time by swapping `axum` out for the
2023-12-03 21:47:28 +01:00
`axum-core` , `async-trait` , and `http` crates.
2023-11-28 01:38:23 +01:00
2023-10-24 04:01:05 +02:00
## v0.4.0
- Added support for all [htmx response
2023-10-24 05:50:47 +02:00
headers](https://htmx.org/reference/#response_headers) via a type implementing
2023-10-24 04:01:05 +02:00
`IntoResponseParts` . These "responders" allow you to simply and safely apply the
2023-10-24 04:05:34 +02:00
HX-* headers to any of your responses. Thanks to
[@pfz4 ](https://github.com/pfz4 ) for the implementation work!
([#5](https://github.com/robertwayne/axum-htmx/pull/5))
2023-10-24 04:01:05 +02:00
2023-08-17 00:59:26 +02:00
## v0.3.1
- Rebuild docs with features enabled so `HxRequestGuardLayer` is visible on
docs.rs.
2023-07-29 23:16:05 +02:00
## v0.3.0
- `HxRequestGuardLayer` now redirects on failures instead of returning a 403. By
default, it will redirect to "/", but you can specify a different route to
redirect to with `HxRequestGuardLayer::new("/your-route-here")` .
2023-07-28 04:28:26 +02:00
## v0.2.0
2023-07-28 04:23:46 +02:00
- Added `HxRequestGuardLayer` , allowing you to protect an entire router from
non-htmx requests.
2023-07-28 04:28:26 +02:00
## v0.1.0
2023-07-28 04:23:46 +02:00
- Initial release.