diff --git a/src/Common/README.md b/src/Common/README.md index 0fa5940..ed6ef47 100644 --- a/src/Common/README.md +++ b/src/Common/README.md @@ -2,4 +2,4 @@ This package contains common code shared between [`Giraffe.Htmx`](https://www.nuget.org/packages/Giraffe.Htmx) and [`Giraffe.ViewEngine.Htmx`](https://www.nuget.org/packages/Giraffe.ViewEngine.Htmx), and will be automatically installed when you install either one. -**htmx version: 1.8.4** +**htmx version: 1.8.5** diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 19498f3..82ede31 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,9 +1,9 @@  - net6.0 - 1.8.4 - Support new hx-validate attribute in htmx 1.8.1; add support for fragment rendering + net6.0;net7.0 + 1.8.5 + Support new hx-history attribute in htmx 1.8.5; add .NET 7 support danieljsummers Bit Badger Solutions https://github.com/bit-badger/Giraffe.Htmx diff --git a/src/Htmx/README.md b/src/Htmx/README.md index 1bf8fc8..9874655 100644 --- a/src/Htmx/README.md +++ b/src/Htmx/README.md @@ -2,7 +2,7 @@ This package enables server-side support for [htmx](https://htmx.org) within [Giraffe](https://giraffe.wiki) and ASP.NET's `HttpContext`. -**htmx version: 1.8.4** +**htmx version: 1.8.5** ### Setup diff --git a/src/ViewEngine.Htmx.Tests/Tests.fs b/src/ViewEngine.Htmx.Tests/Tests.fs index 653f8e2..c48cbf2 100644 --- a/src/ViewEngine.Htmx.Tests/Tests.fs +++ b/src/ViewEngine.Htmx.Tests/Tests.fs @@ -333,6 +333,10 @@ module Attributes = figure [ _hxHeaders """{ "X-Special-Header": "some-header" }""" ] [] |> shouldRender """
""" + [] + let ``_hxHistory succeeds`` () = + span [ _hxHistory "false" ] [] |> shouldRender """""" + [] let ``_hxHistoryElt succeeds`` () = table [ _hxHistoryElt ] [] |> shouldRender """
""" @@ -434,14 +438,14 @@ module Script = let ``Script.minified succeeds`` () = let html = RenderView.AsString.htmlNode Script.minified Assert.Equal - ("""""", + ("""""", html) [] let ``Script.unminified succeeds`` () = let html = RenderView.AsString.htmlNode Script.unminified Assert.Equal - ("""""", + ("""""", html) diff --git a/src/ViewEngine.Htmx/Htmx.fs b/src/ViewEngine.Htmx/Htmx.fs index 32aeb7b..9bd8f59 100644 --- a/src/ViewEngine.Htmx/Htmx.fs +++ b/src/ViewEngine.Htmx/Htmx.fs @@ -208,6 +208,9 @@ module HtmxAttrs = /// Adds to the headers that will be submitted with the request let _hxHeaders = attr "hx-headers" + /// Set to "false" to prevent pages with sensitive information from being stored in the history cache + let _hxHistory = attr "hx-history" + /// The element to snapshot and restore during history navigation let _hxHistoryElt = flag "hx-history-elt" @@ -286,14 +289,14 @@ module Script = /// Script tag to load the minified version from unpkg.com let minified = - script [ _src "https://unpkg.com/htmx.org@1.8.4" - _integrity "sha384-wg5Y/JwF7VxGk4zLsJEcAojRtlVp1FKKdGy1qN+OMtdq72WRvX/EdRdqg/LOhYeV" + script [ _src "https://unpkg.com/htmx.org@1.8.5" + _integrity "sha384-7aHh9lqPYGYZ7sTHvzP1t3BAfLhYSTy9ArHdP3Xsr9/3TlGurYgcPBoFmXX2TX/w" _crossorigin "anonymous" ] [] /// Script tag to load the unminified version from unpkg.com let unminified = - script [ _src "https://unpkg.com/htmx.org@1.8.4/dist/htmx.js" - _integrity "sha384-sh63gh7zpjxu153RyKJ06Oy5HxIVl6cchze/dJOHulOI7u0sGZoC/CfQJHPODhFn" + script [ _src "https://unpkg.com/htmx.org@1.8.5/dist/htmx.js" + _integrity "sha384-VgGOQitu5eD5qAdh1QPLvPeTt1X4/Iw9B2sfYw+p3xtTumxaRv+onip7FX+P6q30" _crossorigin "anonymous" ] [] diff --git a/src/ViewEngine.Htmx/README.md b/src/ViewEngine.Htmx/README.md index 6e34f5f..8526e5f 100644 --- a/src/ViewEngine.Htmx/README.md +++ b/src/ViewEngine.Htmx/README.md @@ -2,7 +2,7 @@ This package enables [htmx](https://htmx.org) support within the [Giraffe](https://giraffe.wiki) view engine. -**htmx version: 1.8.4** +**htmx version: 1.8.5** ### Setup