-
1.8.0 Stable
released this
2022-07-14 13:24:49 +00:00 | 46 commits to main since this releaseThis release brings support for new headers and attributes added in htmx v1.8.0.
Giraffe.Htmx(server-side)- Adds
withHxReplaceUrlto send anHX-Replace-Urlresponse header; this takes either a specific URL, the stringtrueto replace with the response's URL, or the stringfalseto explicitly not replace the browser's URL - Adds
withHxNoReplaceUrlto send anHX-Replace-Urlresponse header with the value offalse - Adds
withHxReswapto send anHX-Reswapresponse header; valid values are in theHxSwapmodule, which is visible whenGiraffe.Htmxis opened - Adds
withHxPushUrlto send anHX-Push-Urlresponse header; this works aswithHxReplaceUrldoes, but for pushing a new URL into the history stack instead of replacing the current one - Adds
withHxNoPushUrlto send anHX-Push-Urlresponse header with the value offalse - Obsoletes
withHxPushandwithHxNoPush, as these were changed towithHxPushUrlandwithHxNoPushUrl. The former functions will set the new header, so they will continue to function without breaking; however, they should be replaced, as they will eventually be removed from this library (likely at v2).
Giraffe.ViewEngine.Htmx(client-side views)- Updates
Script.minifiedandScript.unminifiednodes to load version 1.8.0. - Adds
_hxReplaceUrlto generate anhx-replace-urlattribute; valid values are "true", "false", or a URL - Adds
_hxSelectOobto generate anhx-select-oobattribute; it takes a string with the selector for the content you wish to select from the out-of-band response - BREAKING CHANGE: Changed
_hxPushUrlto be a standard attribute rather than a flag (attribute with no value); it now takes "true", "false", or a URL. To get the same functionality as v1.7.0, change_hxPushUrlto_hxPushUrl "true". - BREAKING CHANGE: The
HxSwapsupport module now requires you toopen Giraffe.Htmxbefore it is accessible. (It was moved to a common project, so that the same values could be visible from server-side and client-side. You do not need to install theGiraffe.Htmxpackage, just open the namespace.)
Downloads
- Adds