diff --git a/src/Common/README.md b/src/Common/README.md index d62041e..758dfca 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: 2.0.0-alpha1** +**htmx version: 2.0.0-alpha2** diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 0faa2e4..dd35593 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -3,8 +3,8 @@ net6.0;net7.0;net8.0 2.0.0 - alpha1 - Update script tags to pull htmx 2.0.0-alpha1 + alpha2 + Update script tags to pull htmx 2.0.0-alpha2; remove deprecated _hxOn attribute danieljsummers Bit Badger Solutions https://github.com/bit-badger/Giraffe.Htmx diff --git a/src/Htmx/README.md b/src/Htmx/README.md index 3c0d620..2fe74ac 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: 2.0.0-alpha1** +**htmx version: 2.0.0-alpha2** _Note that htmx 2.0 is an ALPHA release. The [migration guide](https://v2-0v2-0.htmx.org/migration-guide-htmx-1/) does not currently specify any request or response header changes. This means that, as of this release, there are no required code changes in moving to this major version._ diff --git a/src/Tests/ViewEngine.fs b/src/Tests/ViewEngine.fs index 7404a14..fa490a4 100644 --- a/src/Tests/ViewEngine.fs +++ b/src/Tests/ViewEngine.fs @@ -820,14 +820,14 @@ let script = let html = RenderView.AsString.htmlNode Script.minified Expect.equal html - """""" + """""" "Minified script tag is incorrect" } test "unminified succeeds" { let html = RenderView.AsString.htmlNode Script.unminified Expect.equal html - """""" + """""" "Unminified script tag is incorrect" } ] @@ -979,18 +979,6 @@ let renderFragment = ] ] -#nowarn "44" - -/// Tests for the HtmxAttrs module -let deprecatedAttributes = - testList "Deprecated Attributes" [ - test "_hxOn succeeds" { - let newLine = "\n" - strong [ _hxOn "submit: alert('oops')\nclick: alert('howdy!')" ] [] - |> shouldRender $"""""" - } - ] - /// All tests in this module let allTests = testList "ViewEngine.Htmx" [ @@ -1004,5 +992,4 @@ let allTests = attributes script renderFragment - deprecatedAttributes ] diff --git a/src/ViewEngine.Htmx/Htmx.fs b/src/ViewEngine.Htmx/Htmx.fs index d3063ea..7148f88 100644 --- a/src/ViewEngine.Htmx/Htmx.fs +++ b/src/ViewEngine.Htmx/Htmx.fs @@ -317,8 +317,6 @@ module HxVals = /// Create values from a list of key/value pairs let From = toJson -open System - /// Attributes and flags for htmx [] module HtmxAttrs = @@ -368,10 +366,6 @@ module HtmxAttrs = /// Overrides a previous `hx-boost` let _hxNoBoost = attr "hx-boost" "false" - /// Attach an event handler for DOM or htmx events - [] - let _hxOn = attr "hx-on" - /// Attach an event handler for DOM events let _hxOnEvent evtName = attr $"hx-on:%s{evtName}" @@ -450,14 +444,14 @@ module Script = /// Script tag to load the minified version from unpkg.com let minified = - script [ _src "https://unpkg.com/htmx.org@2.0.0-alpha1" - _integrity "sha384-KGfWLOUs4pJD2kawhHdm4vgr/cEAofjPPagKWIZ/YnYDQ2bcthCK5LRfBMr7zco+" + script [ _src "https://unpkg.com/htmx.org@2.0.0-alpha2" + _integrity "sha384-291pOdLqD0RmU6d5pyz/xmHmZZPhEv465X4AJDWvc8n0KrWrD65qaf2fk0xmsrJe" _crossorigin "anonymous" ] [] /// Script tag to load the unminified version from unpkg.com let unminified = - script [ _src "https://unpkg.com/htmx.org@2.0.0-alpha1/dist/htmx.js" - _integrity "sha384-2kZGZBH6t8d5fRh0/kvj/fwwVwnnTpwcLOhp0t8F0/mXWF5M5iPbo/ygeFN2cFbG" + script [ _src "https://unpkg.com/htmx.org@2.0.0-alpha2/dist/htmx.js" + _integrity "sha384-4Owd2qj8qFNBZ8QiR2ItYnNuMGgpOxaDT1uuRJXziuB1lvvKGYA/Lxy/oVM6q3h1" _crossorigin "anonymous" ] [] diff --git a/src/ViewEngine.Htmx/README.md b/src/ViewEngine.Htmx/README.md index ca8916c..b93aa86 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: 2.0.0-alpha1** +**htmx version: 2.0.0-alpha2** _Note that this is an ALPHA release of htmx 2.0; see [the migration guide](https://v2-0v2-0.htmx.org/migration-guide-htmx-1/) for changes_