[
    {
        "name": "Toasty.Defaults",
        "comment": " This package lets you easily show customizable toast notifications in your Elm apps. You\nwill be able to trigger toasts as a side-effect of model updates by piping your update function\nreturn value through this library 'addToast' function.\n\n# Definition\n@docs Toast, config, view\n",
        "unions": [
            {
                "name": "Toast",
                "comment": " This theme defines toasts of three variants: \"Success\", \"Warning\" and \"Error\".\nEach of them accepts a title and an optional secondary message.\n",
                "args": [],
                "cases": [
                    [
                        "Success",
                        [
                            "String",
                            "String"
                        ]
                    ],
                    [
                        "Warning",
                        [
                            "String",
                            "String"
                        ]
                    ],
                    [
                        "Error",
                        [
                            "String",
                            "String"
                        ]
                    ]
                ]
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "config",
                "comment": " Default theme configuration.\n",
                "type": "Config msg"
            },
            {
                "name": "view",
                "comment": " Default theme view handling the three toast variants.\n",
                "type": "Toast -> Html msg"
            }
        ],
        "binops": []
    },
    {
        "name": "Toasty",
        "comment": " This package lets you easily show customizable toast notifications in your\nElm apps following The Elm Architecture. You will be able to trigger toasts as\na side-effect of model updates by piping your update function return value\nthrough this library `addToast` function.\n\nWhile this package lets you configure each part of the rendering and behaviour\nof the notification stack, you can use the nice default theme configuration in `Toasty.Defaults`.\n\n\n## Example\n\n### Setting things up\n\nTo use the package, let's look at an example that shows a simple text notification.\n\nFirst you add the toast stack to your model, wrapping the toast model you want in `Stack`.\nYou must do it in a field called `toasties`:\n\n``` elm\ntype alias Model =\n    { toasties : Toasty.Stack String }\n```\n\nAdd the stack initial state in your `init` function:\n\n```elm\ninit : ( Model, Cmd Msg)\ninit =\n    ( { toasties = Toasty.initialState } , Cmd.none )\n```\n\nThen add in a message that will handle toasts messages:\n\n```elm\ntype alias Msg\n    = ToastyMsg (Toasty.Msg String)\n```\n\nYou can use the default configuration as-is or tweak it to your needs by piping configuration helpers:\n\n```elm\n-- Create a custom configuration to make toasts visible for 8 seconds.\nmyConfig : Toasty.Config msg\nmyConfig =\n    Toasty.config\n        |> Toasty.transitionOutDuration 100\n        |> Toasty.delay 8000\n```\n\nHandle the toasts message in your app update function using the library `update`\nfunction:\n\n```elm\nupdate msg model =\n    case msg of\n        ToastyMsg subMsg ->\n            Toasty.update myConfig ToastyMsg subMsg model\n```\n\nAs a last step, render the toast stack in you `view` function. You will need to\nprovide an special view function that knows how to render your toast model:\n\n```elm\nview : Model -> Html Msg\nview model =\n    div []\n        [ h1 [] [ text \"Toasty example\" ]\n        , Toasty.view myConfig renderToast ToastyMsg model.toasties\n        ]\n\nrenderToast : String -> Html Msg\nrenderToast toast =\n    div [] [ text toast ]\n```\n\n### Triggering toasts\nMost of the times you will want to trigger toasts as side-effect of some other app event,\ne.g. show a message when an asynchronous response was received. In order to do that, just\npipe your update function returned value through the `addToast` function passing your\nconfiguration, tag and toast.\n\n```elm\n    update msg model =\n        case msg of\n            SomeAppMsg ->\n                ( newModel, Cmd.none )\n                    |> Toasty.addToast myConfig ToastyMsg \"Entity successfully created!\"\n```\n\nThat's all!\n\n# Definition\n@docs Stack, Msg\n\n# Configuration\nThe notifications appearance and behaviour can be fully customized. To do this,\nyou need to import the default configuration and tweak it by piping the provided\nhelper functions.\n\nNote that as you can set container and items HTML attributes the library remains\nagnostic about how to style your toasts, enabling you to use inline styles or\nclasses.\n\n```elm\nmyConfig : Toasty.Config msg\nmyConfig =\n    Toasty.config\n        |> Toasty.transitionOutDuration 700\n        |> Toasty.delay 8000\n        |> Toasty.containerAttrs containerAttrs\n\ncontainerAttrs =\n    [ style\n        [ ( \"max-width\", \"300px\" )\n        , ( \"position\", \"fixed\" )\n        , ( \"right\", \"0\" )\n        , ( \"top\", \"0\" )\n        ]\n    ]\n```\n@docs config, delay, transitionOutDuration, containerAttrs, itemAttrs, transitionInAttrs, transitionOutAttrs, Config\n\n# Other functions\n@docs view, update, addToast, initialState\n",
        "unions": [
            {
                "name": "Config",
                "comment": " The base configuration type.\n",
                "args": [
                    "msg"
                ],
                "cases": []
            },
            {
                "name": "Msg",
                "comment": " The internal message type used by the library. You need to tag and add it to your app messages.\n\n    type Msg\n        = ToastyMsg (Toasty.Msg MyToast)\n",
                "args": [
                    "a"
                ],
                "cases": []
            },
            {
                "name": "Stack",
                "comment": " Represents the stack of current toasts notifications. You can model a toast\nto be as complex or simple as you want.\n\n    type alias Model =\n        { toasties : Toasty.Stack MyToast\n        }\n\n    -- Defines a toast model that has three different variants\n    type MyToast\n        = Success String\n        | Warning String\n        | Error String String\n",
                "args": [
                    "a"
                ],
                "cases": []
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "addToast",
                "comment": " Adds a toast to the stack and schedules its removal. It receives and returns\na tuple of type '(model, Cmd msg)' so that you can easily pipe it to your app\nupdate function branches.\n\n    update msg model =\n        case msg of\n            SomeAppMsg ->\n                ( newModel, Cmd.none )\n                    |> Toasty.addToast myConfig ToastyMsg (MyToast \"Entity successfully created!\")\n            ToastyMsg subMsg ->\n                Toasty.update myConfig ToastyMsg subMsg model\n",
                "type": "Config msg -> (Msg a -> msg) -> a -> ( { m | toasties : Stack a }, Cmd msg ) -> ( { m | toasties : Stack a }, Cmd msg )"
            },
            {
                "name": "config",
                "comment": " Some basic configuration defaults: Toasts are visible for 5 seconds with\nno animations or special styling.\n",
                "type": "Config msg"
            },
            {
                "name": "containerAttrs",
                "comment": " Lets you set the HTML attributes to add to the toasts stack container. This will help\nyou style and position the toast stack however you like by adding classes or inline styles.\n",
                "type": "List (Attribute msg) -> Config msg -> Config msg"
            },
            {
                "name": "delay",
                "comment": " Changes the amount of time (in milliseconds) the toast will be visible.\nAfter this time, the transition out begins.\n",
                "type": "Float -> Config msg -> Config msg"
            },
            {
                "name": "initialState",
                "comment": " An empty stack of toasts to initialize your model with.\n",
                "type": "Stack a"
            },
            {
                "name": "itemAttrs",
                "comment": " Lets you set the HTML attributes to add to each toast container. This will help\nyou style and arrange the toasts however you like by adding classes or inline styles.\n",
                "type": "List (Attribute msg) -> Config msg -> Config msg"
            },
            {
                "name": "transitionInAttrs",
                "comment": " Lets you set the HTML attributes to add to the toast container when transitioning in.\n",
                "type": "List (Attribute msg) -> Config msg -> Config msg"
            },
            {
                "name": "transitionOutAttrs",
                "comment": " Lets you set the HTML attributes to add to the toast container when transitioning out.\n",
                "type": "List (Attribute msg) -> Config msg -> Config msg"
            },
            {
                "name": "transitionOutDuration",
                "comment": " Changes the amount of time (in milliseconds) to wait after transition out\nbegins and before actually removing the toast node from the DOM. This lets you\nauthor fancy animations when a toast is removed.\n",
                "type": "Float -> Config msg -> Config msg"
            },
            {
                "name": "update",
                "comment": " Handles the internal messages. You need to wire it to your app update function\n\n    update msg model =\n        case msg of\n            ToastyMsg subMsg ->\n                Toasty.update Toasty.config ToastyMsg subMsg model\n",
                "type": "Config msg -> (Msg a -> msg) -> Msg a -> { m | toasties : Stack a } -> ( { m | toasties : Stack a }, Cmd msg )"
            },
            {
                "name": "view",
                "comment": " Renders the stack of toasts. You need to add it to your app view function and\ngive it a function that knows how to render your toasts model.\n\n    view model =\n        div []\n            [ h1 [] [ text \"Toasty example\" ]\n            , Toasty.view myConfig (\\txt -> div [] [text txt]) ToastyMsg model.toasties\n            ]\n",
                "type": "Config msg -> (a -> Html msg) -> (Msg a -> msg) -> Stack a -> Html msg"
            }
        ],
        "binops": []
    }
]