[{"name":"HtmlHelpers","comment":" Convenient helper functions for working with\n[`Html`](http://package.elm-lang.org/packages/elm-lang/html/latest/Html#Html)\n\n@docs contentList, lazyContentList, wrapToSingleNode, nothing, maybeContentList\n\n","unions":[],"aliases":[],"values":[{"name":"contentList","comment":" This function makes it easier to conditionally render Html.nodes.\nThe most obvious usecase is similar to that of Attributes.classList,\nbut for content rather than classes. Each entry in the list will be added\nand removed depending on the boolean value it is paired with.\n\nFor example, maybe we want to render a few animals:\n\n    viewAnimals : Animal -> Animal -> Animal -> Html msg\n    viewAnimals dog cat mouse =\n        Html.section [ Attributes.id \"animals\" ] <|\n            contentList\n                [ ( Html.text dog.name, dog.visible ) -- dog will be rendered if dog.visible is True\n                , ( Html.text cat.name, cat.visible ) -- etc\n                , ( Html.text mouse.name, mouse.visible ) -- etc\n                ]\n\n","type":"List.List ( Html.Html msg, Basics.Bool ) -> List.List (Html.Html msg)"},{"name":"lazyContentList","comment":" A lazy version of contentList. This version takes a list of thunks paired with\nboolean values. The thunks are only evaluated for items that will be rendered\n(when their bool is True).\n\nThis is useful when the Html nodes are expensive to compute but the conditions are cheap.\n\nFor example:\n\n    viewAnimals : List Animal -> Html msg\n    viewAnimals animals =\n        Html.section [ Attributes.id \"animals\" ] <|\n            lazyContentList\n                [ ( \\_ -> expensiveRenderFunction animal1, animal1.visible )\n                , ( \\_ -> expensiveRenderFunction animal2, animal2.visible )\n                , ( \\_ -> expensiveRenderFunction animal3, animal3.visible )\n                ]\n\n","type":"List.List ( () -> Html.Html msg, Basics.Bool ) -> List.List (Html.Html msg)"},{"name":"maybeContentList","comment":" This function works similar to lazyContentList but for Maybe values.\nIt will only render items that have a Just value (of any type) associated with them.\n\nExample usage:\n\n    myView =\n        maybeContentList\n            [ ( \\text -> Html.text text, Just \"this will render\" )\n            , ( \\text -> Html.text text, Nothing ) -- this will not render\n            ]\n\n","type":"List.List ( a -> Html.Html msg, Maybe.Maybe a ) -> List.List (Html.Html msg)"},{"name":"nothing","comment":" nothing is a convenience function for the most idiomatic and common way to render nothing,\nnamely an empty Html.text.\n","type":"Html.Html msg"},{"name":"wrapToSingleNode","comment":" wrapToSingleNode turns a list of Html nodes into a single node, using the following logic:\n\n  - if the list is empty, return `nothing`\n  - if the list contains only one element, simply return that element\n  - if the list contains multiple elements, wrap them with a plain div with `display: contents`\n\nMore on `display: contents` here: <https://developer.mozilla.org/en-US/docs/Web/CSS/display#contents>\n\n","type":"List.List (Html.Html msg) -> Html.Html msg"}],"binops":[]}]