[{"name":"Neat","comment":" Main module for elm-neat-layout.\n\n\n# Core\n\n@docs View\n@docs toPage\n\n\n# Constructors and Modifiers for View\n\n@docs lift\n@docs none\n@docs empty\n@docs emptyNode\n@docs setMixin\n@docs setMixins\n@docs setAttribute\n@docs setAttributes\n@docs setLayout\n\n\n# Alternatives to Html nodes\n\n@docs div\n@docs text\n\n\n# Keyed\n\n@docs keyed\n\n\n# Primitive\n\n@docs NoPadding\n\n\n# Custom paddings\n\nYou can introduce custom paddings by just declaring their types and `IsPadding` values.\n\n    type MyPadding\n        = MyPadding\n\n    myPadding : IsPadding MyPadding\n    myPadding =\n        IsPadding\n            { rem = 0.6\n            }\n\n@docs IsPadding\n\n\n# Convert between paddings\n\n@docs fromNoPadding\n@docs expand\n@docs setBoundary\n\n\n# Unsafe functions\n\nThese can break neat paddings, so use them carefully.\n\n@docs unsafeFromHtml\n\n\n# Lower level functions for performance optimization\n\nThese are lower level functions, so all you need would be `Neat.Layout.Row.optimized` and `Neat.Layout.Column.optimized`.\n\nDo not worry even if you cannot understand how to use these functions.\n\n@docs optimized\n@docs toProtected\n@docs Protected\n\n","unions":[{"name":"IsPadding","comment":" Information about your custom paddings.\n\n  - rem : padding width in units of `rem`\n\n","args":["p"],"cases":[["IsPadding",["{ rem : Basics.Float }"]]]},{"name":"NoPadding","comment":" Primitive type representing no padding on a view.\n","args":[],"cases":[]},{"name":"Protected","comment":" ","args":["p","a"],"cases":[]},{"name":"View","comment":" Html alternative that has type level padding.\n","args":["padding","msg"],"cases":[]}],"aliases":[],"values":[{"name":"div","comment":" `View` version of `Html.div`.\n","type":"List.List (Mixin.Mixin msg) -> List.List (Neat.View p msg) -> Neat.View p msg"},{"name":"empty","comment":" An alias for `div [] []`.\n","type":"Neat.View Neat.NoPadding a"},{"name":"emptyNode","comment":" An alias for `\\node -> lift node [] []`.\n","type":"(List.List (Html.Attribute msg) -> List.List (Html.Html msg) -> Html.Html msg) -> Neat.View Neat.NoPadding msg"},{"name":"expand","comment":" Expand padding from `p1` to `p2`.\nThe width of `p2` is supposed to be greater than `p1`.\n","type":"Neat.IsPadding p1 -> Neat.IsPadding p2 -> Neat.View p1 msg -> Neat.View p2 msg"},{"name":"fromNoPadding","comment":" ","type":"Neat.IsPadding p -> Neat.View Neat.NoPadding msg -> Neat.View p msg"},{"name":"keyed","comment":" ","type":"String.String -> List.List (Mixin.Mixin msg) -> List.List ( String.String, Neat.View p msg ) -> Neat.View p msg"},{"name":"lift","comment":" Lift `Html` nodes into `View`.\n\n    import Html exposing (div)\n    import Mixin exposing (Mixin)\n    import Neat exposing (View)\n    import Neat.Padding as Padding exposing (NoPadding)\n\n    view1 : View NoPadding msg\n    view1 =\n        Neat.div\n            []\n            [ Neat.text \"view1\"\n            ]\n\n    view2 : View NoPadding msg\n    view2 =\n        Neat.div\n            []\n            [ Neat.text \"view2\"\n            ]\n\n    composed : View NoPadding msg\n    composed =\n        lift div\n            [ Mixin.class \"parent\"\n            ]\n            [ view1\n            , view2\n            ]\n\n","type":"(List.List (Html.Attribute msg) -> List.List (Html.Html msg) -> Html.Html msg) -> List.List (Mixin.Mixin msg) -> List.List (Neat.View p msg) -> Neat.View p msg"},{"name":"none","comment":" View version of `Html.text \"\"`.\n","type":"Neat.View p a"},{"name":"optimized","comment":"\n\n    v1 : View p msg\n    v1 =\n        Debug.todo \"v1\"\n\n    v2 : View p msg\n    v2 =\n        Debug.todo \"v2\"\n\n    child : Int -> View p msg\n    child _ =\n        Debug.todo \"child\"\n\n    child_ : Int -> Html (Protected p msg)\n    child_ =\n        toProtected << child\n\n    v : List Int -> View p msg\n    v =\n        optimized\n            String.fromInt\n            (lazy child_)\n            \"div\"\n            []\n\n","type":"(x -> String.String) -> (x -> Html.Html (Neat.Protected p msg)) -> String.String -> List.List (Mixin.Mixin msg) -> List.List x -> Neat.View p msg"},{"name":"setAttribute","comment":" ","type":"Html.Attribute msg -> Neat.View Neat.NoPadding msg -> Neat.View Neat.NoPadding msg"},{"name":"setAttributes","comment":" ","type":"List.List (Html.Attribute msg) -> Neat.View Neat.NoPadding msg -> Neat.View Neat.NoPadding msg"},{"name":"setBoundary","comment":" Set boundary to convert into `NoPadding`.\n","type":"Neat.IsPadding p -> Neat.View p msg -> Neat.View Neat.NoPadding msg"},{"name":"setLayout","comment":" ","type":"Neat.Layout.Internal.Layout msg -> Neat.View p msg -> Neat.View p msg"},{"name":"setMixin","comment":" ","type":"Mixin.Mixin msg -> Neat.View Neat.NoPadding msg -> Neat.View Neat.NoPadding msg"},{"name":"setMixins","comment":" ","type":"List.List (Mixin.Mixin msg) -> Neat.View Neat.NoPadding msg -> Neat.View Neat.NoPadding msg"},{"name":"text","comment":" `View` version of `\\str -> Html.div [] [ Html.text str ]`.\n","type":"String.String -> Neat.View Neat.NoPadding msg"},{"name":"toPage","comment":" Call this function **only once** on root view function.\nMake sure that your own CSS is partially overwritten by following CSS.\n\n    *,\n    *::before,\n    *::after {\n      margin: 0;\n      padding: 0;\n      box-sizing: border-box;\n    }\n    [data-elm-neat-layout~=flex]{\n        display:-ms-flexbox;\n        display:flex\n    }\n\n","type":"Neat.View Neat.NoPadding msg -> List.List (Html.Html msg)"},{"name":"toProtected","comment":" This is supposed to be used in order to make `Html.Lazy.lazyN` work.\nSee `optimized` for real usage.\n","type":"Neat.View p a -> Html.Html (Neat.Protected p a)"},{"name":"unsafeFromHtml","comment":" ","type":"Html.Html msg -> Neat.View p msg"}],"binops":[]},{"name":"Neat.Layout","comment":" Alignment functions.\n\n\n# Core\n\n@docs Layout\n\n\n# Rows and Columns\n\n@docs row\n@docs rowWith\n@docs column\n@docs columnWith\n\n\n# Fill items in Rows and Columns\n\n@docs fill\n@docs fillBy\n@docs noShrink\n@docs shrinkBy\n\n","unions":[],"aliases":[{"name":"Layout","comment":" ","args":["msg"],"type":"Neat.Layout.Internal.Layout msg"}],"values":[{"name":"column","comment":" Re-exposing of `Neat.Alignment.Column.column`.\n","type":"List.List (Neat.View p msg) -> Neat.View p msg"},{"name":"columnWith","comment":" Re-exposing of `Neat.Alignment.Column.columnWith`.\n\nAn alias for `columnWith Neat.Alignment.Column.default`.\n\n","type":"Neat.Layout.Column.Column -> List.List (Neat.View p msg) -> Neat.View p msg"},{"name":"fill","comment":" Expand the item in row/column.\n\nShorthands for `fillBy 1`.\n\n","type":"Neat.Layout.Layout msg"},{"name":"fillBy","comment":" Specifies how much of the remaining space in the row/column should be assigned to the item.\n","type":"Basics.Int -> Neat.Layout.Layout msg"},{"name":"noShrink","comment":" Prohibit to shrink the item in row/column.\n\nShorthands for `fillBy 0`.\n\n","type":"Neat.Layout.Layout msg"},{"name":"row","comment":" Re-exposing of `Neat.Alignment.Row.row`.\n","type":"List.List (Neat.View p msg) -> Neat.View p msg"},{"name":"rowWith","comment":" Re-exposing of `Neat.Alignment.Row.rowWith`.\n\nAn alias for `rowWith Neat.Alignment.Row.default`.\n\n","type":"Neat.Layout.Row.Row -> List.List (Neat.View p msg) -> Neat.View p msg"},{"name":"shrinkBy","comment":" If the size of all flex items in row/column is larger than the container, items shrink to fit according to `shrinkBy`.\n","type":"Basics.Int -> Neat.Layout.Layout msg"}],"binops":[]},{"name":"Neat.Layout.Column","comment":"\n\n\n# Columns\n\n@docs columnWith\n@docs Column\n@docs defaultColumn\n@docs column\n@docs Vertical\n@docs Horizontal\n\n\n# Optimization\n\n@docs optimized\n@docs toProtected\n\n","unions":[{"name":"Horizontal","comment":" ","args":[],"cases":[["Left",[]],["Right",[]],["HCenter",[]],["Stretch",[]]]},{"name":"Vertical","comment":" ","args":[],"cases":[["Top",[]],["Bottom",[]],["VCenter",[]],["SpaceBetween",[]],["SpaceAround",[]]]}],"aliases":[{"name":"Column","comment":" Configuration about column alignment.\n","args":[],"type":"{ vertical : Neat.Layout.Column.Vertical, horizontal : Neat.Layout.Column.Horizontal, wrap : Basics.Bool, nodeName : String.String }"}],"values":[{"name":"column","comment":" An alias for `columnWith defaultColumn`.\n","type":"List.List (Neat.View p msg) -> Neat.View p msg"},{"name":"columnWith","comment":" ","type":"Neat.Layout.Column.Column -> List.List (Neat.View p msg) -> Neat.View p msg"},{"name":"defaultColumn","comment":" Default `Column` configuration.\n\n    { vertical = Top\n    , horizontal = Left\n    , wrap = False\n    , nodeName = \"div\"\n    }\n\n","type":"Neat.Layout.Column.Column"},{"name":"optimized","comment":" Optimized column.\n\n  - First argument: identifier for each element\n      - the return value must be unique among all elements\n\n  - Second argument: apply `lazyN` on the resulting function of `toProtected`.\n\n```\nv1 : View p msg\nv1 =\n    Debug.todo \"v1\"\n\nv2 : View p msg\nv2 =\n    Debug.todo \"v2\"\n\nchild : Int -> View p msg\nchild _ =\n    Debug.todo \"child\"\n\n-- Make sure to declare this top level in order to `lazy` works well.\nchild_ : Int -> Horizontal -> Html (Protected p msg)\nchild_ n =\n    toProtected <| child n\n\nv : List Int -> View p msg\nv =\n    optimized\n        String.fromInt\n        (\\n -> lazy2 child_ n)\n        defaultColumn\n```\n\n","type":"(x -> String.String) -> (x -> Neat.Layout.Column.Horizontal -> Html.Html (Neat.Protected p msg)) -> Neat.Layout.Column.Column -> List.List x -> Neat.View p msg"},{"name":"toProtected","comment":" This is supposed to be used in order to make `Html.lazy.lazyN` work.\nSee `optimized` for real usage.\n","type":"Neat.View p a -> Neat.Layout.Column.Horizontal -> Html.Html (Neat.Protected p a)"}],"binops":[]},{"name":"Neat.Layout.Row","comment":"\n\n\n# Row\n\n@docs rowWith\n@docs Row\n@docs defaultRow\n@docs row\n@docs Vertical\n@docs Horizontal\n\n\n# Optimization\n\n@docs optimized\n@docs toProtected\n\n","unions":[{"name":"Horizontal","comment":" ","args":[],"cases":[["Left",[]],["Right",[]],["HCenter",[]],["SpaceBetween",[]],["SpaceAround",[]]]},{"name":"Vertical","comment":" ","args":[],"cases":[["Top",[]],["Bottom",[]],["VCenter",[]],["Stretch",[]]]}],"aliases":[{"name":"Row","comment":" Configuration about row alignment.\n","args":[],"type":"{ vertical : Neat.Layout.Row.Vertical, horizontal : Neat.Layout.Row.Horizontal, wrap : Basics.Bool, nodeName : String.String }"}],"values":[{"name":"defaultRow","comment":" Default `Row` configuration.\n\n    { vertical = Top\n    , horizontal = Left\n    , wrap = False\n    , nodeName = \"div\"\n    }\n\n","type":"Neat.Layout.Row.Row"},{"name":"optimized","comment":" Optimized row.\n\n  - First argument: identifier for each element\n      - the return value must be unique among all elements\n\n  - Second argument: apply `lazyN` on the resulting function of `toProtected`.\n\n```\nv1 : View p msg\nv1 =\n    Debug.todo \"v1\"\n\nv2 : View p msg\nv2 =\n    Debug.todo \"v2\"\n\nchild : Int -> View p msg\nchild _ =\n    Debug.todo \"child\"\n\n-- Make sure to declare this top level in order to `lazy` works well.\nchild_ : Int -> Vertical -> Html (Protected p msg)\nchild_ n =\n    toProtected <| child n\n\nv : List Int -> View p msg\nv =\n    optimized\n        String.fromInt\n        (\\n -> lazy2 child_ n)\n        defaultRow\n```\n\n","type":"(x -> String.String) -> (x -> Neat.Layout.Row.Vertical -> Html.Html (Neat.Protected p msg)) -> Neat.Layout.Row.Row -> List.List x -> Neat.View p msg"},{"name":"row","comment":" An alias for `rowWith defaultRow`.\n","type":"List.List (Neat.View p msg) -> Neat.View p msg"},{"name":"rowWith","comment":" ","type":"Neat.Layout.Row.Row -> List.List (Neat.View p msg) -> Neat.View p msg"},{"name":"toProtected","comment":" This is supposed to be used in order to make `Html.lazy.lazyN` work.\nSee `optimized` for real usage.\n","type":"Neat.View p a -> Neat.Layout.Row.Vertical -> Html.Html (Neat.Protected p a)"}],"binops":[]}]