[{"name":"AnimateHeight","comment":" Animate the height of your content.\n\n\n# Set up\n\n@docs Msg, Config, State, Identifier, Transition, init, subscriptions, update\n@docs auto, fixed, fixedAtAuto, cubicBezier, ease, easeIn, easeInOut, easeOut, container, instant, immediate, rapid, fast, height, heightAt\n@docs getViewport, identifier, linear, make, animateOpacity, customTiming, content, state\n\n","unions":[{"name":"Config","comment":" ","args":["msg"],"cases":[]},{"name":"Identifier","comment":" ","args":[],"cases":[]},{"name":"Msg","comment":" ","args":[],"cases":[]},{"name":"State","comment":" ","args":[],"cases":[]},{"name":"Transition","comment":" Transitions that are dispatched in sync with the animation lifecycle.\n\n> TransitionStart - Dispatched when an animation starts.\n\n> TransitionEnd - Dispatched when an animation ends.\n\nThe Float value is the target pixel height at which the animation will end.\n\n> `TransitionStart` 200 -> The animation has started and will end at 200px\n\n> `TransitionEnd` 200 -> The animation has ended at the height of 200px\n\n","args":[],"cases":[["TransitionStart",["Basics.Float"]],["TransitionEnd",["Basics.Float"]]]}],"aliases":[],"values":[{"name":"animateOpacity","comment":" If set to `True` content will fade-in/fade-out while height is animated.\n\n    container\n        (make AnimateHeight\n            |> animateOpacity True\n        )\n\n","type":"Basics.Bool -> AnimateHeight.Config msg -> AnimateHeight.Config msg"},{"name":"auto","comment":" Will transition to the height of the content.\n\nWhen the container reaches the content height it will set the height to `auto`.\n\n    type Model\n        = State\n\n    update : msg -> Model -> ( Model, Cmd msg )\n    update msg model =\n        case msg of\n            SeeContent ->\n                let\n                    state =\n                        height auto model\n                in\n                ( state\n                , Cmd.none\n                )\n\n","type":"Internal.Internal.HeightVariant"},{"name":"container","comment":" The container that wraps your view\n\nThe example shows a container with nothing in it.\n\n    yourView : Html Msg\n    yourView =\n        container (make AnimateHeight)\n\n","type":"AnimateHeight.Config msg -> Html.Html msg"},{"name":"content","comment":" The content the [container](#container) will animate.\n\n    yourView : Html Msg\n    yourView =\n        container\n            (make AnimateHeight\n                |> content [-- your content]\n            )\n\n","type":"List.List (Html.Html msg) -> AnimateHeight.Config msg -> AnimateHeight.Config msg"},{"name":"cubicBezier","comment":" [Cubic bezier timing](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function)\n\n    yourView : Model -> Html Msg\n    yourView model =\n        container\n            (make AnimateHeight\n                |> cubicBezier 0.1 0.7 1 0.1\n            )\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AnimateHeight.Config msg -> AnimateHeight.Config msg"},{"name":"customTiming","comment":" Set a custom duration.\nNegative values will be converted to their positive equivalent.\n\ncustom -333 => 333\n\n    container (make |> customTiming 333)\n\n","type":"Basics.Float -> AnimateHeight.Config msg -> AnimateHeight.Config msg"},{"name":"ease","comment":" [Ease timing](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function)\n\n    yourView : Html Msg\n    yourView =\n        container\n            (make AnimateHeight\n                |> ease\n            )\n\n","type":"AnimateHeight.Config msg -> AnimateHeight.Config msg"},{"name":"easeIn","comment":" [Ease-in timing](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function)\n\n    container\n        (make AnimateHeight\n            |> easeIn\n        )\n\n","type":"AnimateHeight.Config msg -> AnimateHeight.Config msg"},{"name":"easeInOut","comment":" [Ease-in-out timing](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function)\n\n    yourView : Html Msg\n    yourView =\n        container\n            (make AnimateHeight\n                |> easeInOut\n            )\n\n","type":"AnimateHeight.Config msg -> AnimateHeight.Config msg"},{"name":"easeOut","comment":" [Ease-out timing](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function)\n\n    yourView : Html Msg\n    yourView =\n        container\n            (make AnimateHeight\n                |> easeOut\n            )\n\n","type":"AnimateHeight.Config msg -> AnimateHeight.Config msg"},{"name":"fast","comment":" Animation duration of 300ms\n\n    container (make AnimateHeight |> fast)\n\n","type":"AnimateHeight.Config msg -> AnimateHeight.Config msg"},{"name":"fixed","comment":" Will transition to the height you set.\n\nValues translate to px values. e.g. 200 -> 200px\n\n    type Model\n        = State\n\n    update : msg -> Model -> ( Model, Cmd msg )\n    update msg model =\n        case msg of\n            SeeContent ->\n                let\n                    state =\n                        height (fixed 200)\n                in\n                ( state\n                , Cmd.none\n                )\n\n","type":"Basics.Float -> Internal.Internal.HeightVariant"},{"name":"fixedAtAuto","comment":" Will transition to the fixed height of the container.\n\nThis is handy if you want to animate the height of a fixed\ncontainer when adding or removing content.\n\n    type Model\n        = State\n\n    update : msg -> Model -> ( Model, Cmd msg )\n    update msg model =\n        case msg of\n            ContentRemoved ->\n                let\n                    state =\n                        height fixedAtAuto\n                in\n                ( state\n                , Cmd.none\n                )\n\n","type":"Internal.Internal.HeightVariant"},{"name":"getViewport","comment":" A task for the [Viewport](https://package.elm-lang.org/packages/elm/browser/latest/Browser-Dom#getViewport)\ninformation of the [container](#container).\n\n    getViewport state => Task Error Viewport\n\n","type":"AnimateHeight.State -> Platform.Task Browser.Dom.Error Browser.Dom.Viewport"},{"name":"height","comment":" Set the height of the container to animate to.\n\nThis will produce animation events. Checkout [Transition](#Transition)\nto find out how transition events work.\n\n    yourUpdate : Msg -> Model -> ( Model, Cmd Msg )\n    yourUpdate msg model =\n        case msg of\n            ShowTheContent ->\n                let\n                    state =\n                        height auto model\n                in\n                ( state, Cmd.none )\n\n","type":"Internal.Internal.HeightVariant -> AnimateHeight.State -> AnimateHeight.State"},{"name":"heightAt","comment":" Set the height of the container.\n\nThis will not animate or produce animation events. Useful for when you want to set the\nstarting height of the container without animating to it..\n\n    yourInit : Model\n    yourInit =\n        init (identifier \"unique-id\")\n            |> heightAt auto\n\n","type":"Internal.Internal.HeightVariant -> AnimateHeight.State -> AnimateHeight.State"},{"name":"identifier","comment":" The unique id of the container\n\n    yourInit : Model\n    yourInit =\n        init (identifier \"some-unique-id\")\n\n","type":"String.String -> AnimateHeight.Identifier"},{"name":"immediate","comment":" Animation duration of 200ms\n\n    container (make AnimateHeight |> immediate)\n\n","type":"AnimateHeight.Config msg -> AnimateHeight.Config msg"},{"name":"init","comment":" Set up an initial state in your init function.\n\n    type alias Model =\n        State\n\n    yourInit : Model\n    yourInit =\n        init (identifier \"unique-id\")\n\n","type":"AnimateHeight.Identifier -> AnimateHeight.State"},{"name":"instant","comment":" This is like not having an animation at all. Duration maps to 0\n\n    yourView : Html msg\n    yourView =\n        container\n            (make AnimateHeight\n                |> instant\n            )\n\n","type":"AnimateHeight.Config msg -> AnimateHeight.Config msg"},{"name":"linear","comment":" [Linear timing](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function)\n\n    container\n        (make AnimateHeight\n            |> linear\n        )\n\n","type":"AnimateHeight.Config msg -> AnimateHeight.Config msg"},{"name":"make","comment":" A default [Config](#Config)\n\nArgument is a msg that handles [Msg's](#Msg)\n\n    yourView : Html Msg\n    yourView =\n        container (make AnimateMsg)\n\n","type":"(AnimateHeight.Msg -> msg) -> AnimateHeight.Config msg"},{"name":"rapid","comment":" Animation duration of 250ms\n\n    container (make AnimateHeight |> rapid)\n\n","type":"AnimateHeight.Config msg -> AnimateHeight.Config msg"},{"name":"state","comment":" Sets the State value\n\n    type Model\n        = State\n\n    yourView : Model -> Html Msg\n    yourView model =\n        container\n            (make AnimateHeight\n                |> state model\n            )\n\n","type":"AnimateHeight.State -> AnimateHeight.Config msg -> AnimateHeight.Config msg"},{"name":"subscriptions","comment":" The `AnimateHeight` subscriptions.\n\n    type Model\n        = State\n\n    type Msg\n        = AnimatetMsg AnimateHeight.Msg\n\n    yourSubs : Model -> Sub Msg\n    yourSubs model =\n        Sub.map AnimateMsg <|\n            subscriptions model\n\n","type":"AnimateHeight.State -> Platform.Sub.Sub AnimateHeight.Msg"},{"name":"update","comment":" Add a branch in your update to handle the `AnimateHeight` Msg's.\n\n    type Model\n        = State\n\n    yourUpdate : Msg -> Model -> ( Model, Cmd Msg )\n    yourUpdate msg model =\n        case msg of\n            AnimateMsg animMsg ->\n                let\n                    ( transition, newState, cmds ) =\n                        update animMsg model\n                in\n                ( newState, Cmd.map AnimateMsg cmds )\n\n","type":"AnimateHeight.Msg -> AnimateHeight.State -> ( Maybe.Maybe AnimateHeight.Transition, AnimateHeight.State, Platform.Cmd.Cmd AnimateHeight.Msg )"}],"binops":[]},{"name":"AnimateHeight.Variant.Switch","comment":" A slick variant that animates height when switching between your views.\n\n\n# Set up\n\n@docs Msg, Config, State, Identifier, Transition, init, subscriptions, update, make\n@docs cubicBezier, ease, easeIn, easeInOut, easeOut, linear, fixView, toView, view\n@docs identifier\n\n","unions":[{"name":"Config","comment":" ","args":["msg"],"cases":[]},{"name":"Identifier","comment":" ","args":[],"cases":[]},{"name":"Msg","comment":" ","args":[],"cases":[]},{"name":"State","comment":" ","args":["view"],"cases":[]},{"name":"Transition","comment":" Transitions that are dispatched in sync with the animation lifecycle.\n\n`TransitionStart` - Dispatched when an animation starts.\n\n`TransitionEnd` - Dispatched when an animation ends.\n\nThe parameter on each type represents the target view.\n\n`TransitionStart view1` -> The transition has started and will switch from the current view to the `view1` view.\n\n`TransitionEnd view1` -> The transition has ended and the `view1` view is rendered.\n\n    type YourViews\n      = View1\n      | View2\n\n    yourUpdate msg yourModel =\n      case msg of\n        SwitchMsg msg ->\n          let\n              (maybeTransition, updatedState, cmds) =\n                  update msg yourModel.switchState\n\n              handleTransition =\n                case maybeTransition of\n                  Just ( TransitionStart View1 ) ->\n                    -- Do something\n\n                  Just (TransitionEnd View2) ->\n                    -- Do something\n          in\n          ({model | switchState = updatedState}, Cmd.map SwitchMsg cmds)\n\n","args":["view"],"cases":[["TransitionStart",["view"]],["TransitionEnd",["view"]]]}],"aliases":[],"values":[{"name":"cubicBezier","comment":" [Cubic bezier timing](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function)\n\n    make SwitchView\n        |> cubicBezier 0.1 0.7 1 0.1\n\n","type":"Basics.Float -> Basics.Float -> Basics.Float -> Basics.Float -> AnimateHeight.Variant.Switch.Config msg -> AnimateHeight.Variant.Switch.Config msg"},{"name":"ease","comment":" [Ease timing](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function)\n\n     make SwitchView\n          |> ease\n\n","type":"AnimateHeight.Variant.Switch.Config msg -> AnimateHeight.Variant.Switch.Config msg"},{"name":"easeIn","comment":" [Ease-in timing](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function)\n\n    make SwitchView\n        |> easeIn\n\n","type":"AnimateHeight.Variant.Switch.Config msg -> AnimateHeight.Variant.Switch.Config msg"},{"name":"easeInOut","comment":" [Ease-in-out timing](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function)\n\n    make SwitchView\n        |> easeInOut\n\n","type":"AnimateHeight.Variant.Switch.Config msg -> AnimateHeight.Variant.Switch.Config msg"},{"name":"easeOut","comment":" [Ease-out timing](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function)\n\n      make SwitchView\n          |> easeOut\n\n","type":"AnimateHeight.Variant.Switch.Config msg -> AnimateHeight.Variant.Switch.Config msg"},{"name":"fixView","comment":" Set the view without transitions.\n\nUseful for when you want to set an initial view without animating to it.\n\n    type YourView\n        = View1\n        | View2\n\n    yourInit : Model\n    yourInit =\n        init (identifier \"unique-id\")\n            |> fixView View1\n\n","type":"view -> AnimateHeight.Variant.Switch.State view -> AnimateHeight.Variant.Switch.State view"},{"name":"identifier","comment":" A unique indentifier that Switch uses internally.\n\nNOTE: The String passed must be unique.\n\n","type":"String.String -> AnimateHeight.Variant.Switch.Identifier"},{"name":"init","comment":" Initialize a Switch [State](#State)\n\nNOTE: Ensure you store the [State](#State) structure in your model.\n\n    type YourView\n        = View1\n        | View2\n\n    type alias Model =\n        { switchState : State YourView\n        }\n\n    yourInit =\n        { switchState = init (identifier \"some-unique-string\") }\n\n","type":"AnimateHeight.Variant.Switch.Identifier -> AnimateHeight.Variant.Switch.State view"},{"name":"linear","comment":" [Linear timing](https://developer.mozilla.org/en-US/docs/Web/CSS/animation-timing-function)\n\n    make SwitchView\n        |> linear\n\n","type":"AnimateHeight.Variant.Switch.Config msg -> AnimateHeight.Variant.Switch.Config msg"},{"name":"make","comment":" A default [Config](#Config)\n\nArgument is a msg that handles [Msg's](#Msg)\n\n    switchConfig : Config YourViews\n    switchConfig =\n        make SwitchMsg\n\n","type":"(AnimateHeight.Variant.Switch.Msg -> msg) -> AnimateHeight.Variant.Switch.Config msg"},{"name":"subscriptions","comment":" Subcriptions for the switch.\n\n    type alias Model =\n        { switchState : State }\n\n    type Msg\n        = SwitchMsg Switch.Msg\n\n    yourSubs : Model -> Sub Msg\n    yourSubs model =\n        Sub.map SwitchMsg <|\n            subscriptions model.switchState\n\n","type":"AnimateHeight.Variant.Switch.State view -> Platform.Sub.Sub AnimateHeight.Variant.Switch.Msg"},{"name":"toView","comment":" Switch from a current view to a new view.\n\nIf no current view exists the incoming view will still transition in.\n\n    type alias Model =\n        { switchState : State }\n\n    type YourMsg\n        = ChangeView\n\n    yourUpdate model msg =\n        case msg of\n            ChangeView ->\n                let\n                    newState =\n                        toView (Just View2) model.switchState\n                in\n                ( { model | switchState = newState }, Cmd.none )\n\n","type":"Maybe.Maybe view -> AnimateHeight.Variant.Switch.State view -> AnimateHeight.Variant.Switch.State view"},{"name":"update","comment":" Add a branch in your update to handle the `Switch` Msg's.\n\n    type alias Model =\n        { switchState : State }\n\n    type Msg\n        = SwitchMsg\n\n    yourUpdate : Msg -> Model -> ( Model, Cmd Msg )\n    yourUpdate msg model =\n        case msg of\n            SwitchMsg switchMsg ->\n                let\n                    ( transition, newState, cmds ) =\n                        update switchMsg model.switchState\n                in\n                ( { model | switchState = newState }\n                , Cmd.map SwitchMsg cmds\n                )\n\n","type":"AnimateHeight.Variant.Switch.Msg -> AnimateHeight.Variant.Switch.State view -> ( Maybe.Maybe (AnimateHeight.Variant.Switch.Transition view), AnimateHeight.Variant.Switch.State view, Platform.Cmd.Cmd AnimateHeight.Variant.Switch.Msg )"},{"name":"view","comment":" Render the switch view\n\n    type YourView\n        = View1\n        | View2\n        | View3\n\n    viewResolver : YourView -> List (Html msg)\n    viewResolver v =\n        case v of\n            View1 ->\n                [ text \"View 1\" ]\n\n            View2 ->\n                [ text \"View 2\" ]\n\n            View3 ->\n                [ text \"View 3\" ]\n\n    yourView : Model -> Html Msg\n    yourView model =\n        view viewResolver (make SwitchView) model.switchView\n\n","type":"(view -> List.List (Html.Html msg)) -> AnimateHeight.Variant.Switch.Config msg -> AnimateHeight.Variant.Switch.State view -> Html.Html msg"}],"binops":[]}]