lucid 2.11.0 → 2.11.1
raw patch · 5 files changed
+41/−11 lines, 5 filesdep −unordered-containersdep ~basedep ~mtl
Dependencies removed: unordered-containers
Dependency ranges changed: base, mtl
Files
- CHANGELOG.md +9/−1
- README.md +10/−2
- lucid.cabal +5/−6
- src/Lucid/Base.hs +5/−2
- src/Lucid/Html5.hs +12/−0
CHANGELOG.md view
@@ -1,10 +1,18 @@+## Upcoming++## 2.11.1++* Use explicit imports for mtl, avoids the mtl-2.3 issue+* Added `minlength` attribute.+* Added `loading` attribute.+ ## 2.11.0 * Change internal attributes to `Seq Attribute`. This preserves ordering. Attributes are merged in a left-biased way, preserving the key order as first encountered. -## 2.9.13+## 2.10.0 * Change internal attributes representation from HashMap to Map. This introduces stable ordering, at a negligible performance cost for
README.md view
@@ -3,9 +3,12 @@ Clear to write, read and edit DSL for writing HTML -[Documentation](http://chrisdone.github.io/lucid/)+**Table of Contents** -[lucid-from-html](https://github.com/dbaynard/lucid-from-html) will convert html to the `lucid` DSL, though it is experimental.+- [Introduction](#introduction)+- [Rendering](#rendering)+- [Good to know](#good-to-know)+- [Transforming](#transforming) ## Introduction @@ -119,6 +122,11 @@ See the documentation for the `Lucid` module for information about using it as a monad transformer.++## Good to know++* Attributes are escaped, so you cannot write arbitrary JavaScript in attributes. Instead, do something like `onclick_ "foo()"`.+* Attributes are rendered in the order that they are written in your Haskell code. ## Transforming
lucid.cabal view
@@ -1,5 +1,5 @@ name: lucid-version: 2.11.0+version: 2.11.1 synopsis: Clear to write, read and edit DSL for HTML description: Clear to write, read and edit DSL for HTML.@@ -15,13 +15,13 @@ license: BSD3 license-file: LICENSE author: Chris Done-maintainer: chrisdone@gmail.com, oleg.grenrus@iki.fi-copyright: 2014-2017 Chris Done+maintainer: chrisdone@gmail.com+copyright: 2014-2021 Chris Done category: Web build-type: Simple cabal-version: >=1.10 extra-source-files: README.md, CHANGELOG.md-tested-with: GHC==7.10.3,GHC==8.0.2,GHC==8.2.2,GHC==8.4.4,GHC==8.6.5,GHC==8.8.4,GHC==8.10.4,GHC==9.0.1+tested-with: GHC==7.10.3,GHC==8.0.2,GHC==8.2.2,GHC==8.4.4,GHC==8.6.5,GHC==8.8.4,GHC==8.10.7,GHC==9.0.1,GHC==9.2.1 library default-language: Haskell2010@@ -33,7 +33,7 @@ Lucid.Bootstrap -- GHC boot libraries- build-depends: base >=4.8 && <4.16+ build-depends: base >=4.8 && <4.17 , bytestring >=0.10.6.0 , containers >=0.5.6.2 , transformers >=0.4.2.0@@ -50,7 +50,6 @@ build-depends: blaze-builder >=0.4.0.0 , hashable >=1.2.3.2 , mmorph >=1.0.3- , unordered-containers >=0.2.5.1 source-repository head type: git
src/Lucid/Base.hs view
@@ -45,8 +45,11 @@ import qualified Blaze.ByteString.Builder.Html.Utf8 as Blaze import Control.Applicative import Control.Monad-import Control.Monad.Morph-import Control.Monad.Reader+import Control.Monad.Morph (MFunctor(..))+import Control.Monad.Reader (MonadReader(..))+import Control.Monad.IO.Class (MonadIO(..))+import Control.Monad.Fix (MonadFix(..))+import Control.Monad.Trans (MonadTrans(..)) import Control.Monad.Error.Class (MonadError(..)) import Control.Monad.State.Class (MonadState(..)) import Control.Monad.Writer.Class (MonadWriter(..))
src/Lucid/Html5.hs view
@@ -679,6 +679,10 @@ list_ :: Text -> Attribute list_ = makeAttribute "list" +-- | The @loading@ attribute.+loading_ :: Text -> Attribute+loading_ = makeAttribute "loading"+ -- | The @loop@ attribute. loop_ :: Text -> Attribute loop_ = makeAttribute "loop"@@ -711,6 +715,10 @@ min_ :: Text -> Attribute min_ = makeAttribute "min" +-- | The @minlength@ attribute.+minlength_ :: Text -> Attribute+minlength_ = makeAttribute "minlength"+ -- | The @multiple@ attribute. multiple_ :: Text -> Attribute multiple_ = makeAttribute "multiple"@@ -998,6 +1006,10 @@ -- | The @placeholder@ attribute. placeholder_ :: Text -> Attribute placeholder_ = makeAttribute "placeholder"++-- | The @poster@ attribute.+poster_ :: Text -> Attribute+poster_ = makeAttribute "poster" -- | The @preload@ attribute. preload_ :: Text -> Attribute