[{"name":"ElmSpa.Beta","comment":" Temporarily here to make the v6 release trigger a major release.\n\nWill be removed when the beta is over.\n\n@docs isBeta\n\n","unions":[],"aliases":[],"values":[{"name":"isBeta","comment":" Returns True until full release (v6.x)\n","type":"Basics.Bool"}],"binops":[]},{"name":"ElmSpa.Internals.Page","comment":"\n\n\n# **Pages**\n\n@docs Page, static, sandbox, element, advanced\n\n\n# **User Authentication**\n\n@docs Protected, protected2\n\n\n# For generated code\n\n@docs Bundle, bundle\n\n\n# Deprecated\n\nThis will be removed before release, included to prevent bumping to 6.0.0 during beta!\n\n@docs protected\n\n","unions":[{"name":"Page","comment":" Pages are the building blocks of **elm-spa**.\n\nInstead of importing this module, your project will have a `Page` module with a much simpler type:\n\n    module Page exposing (Page, ...)\n\n    type Page model msg\n\nThis makes all the generic `route`, `effect`, and `view` arguments disappear!\n\n","args":["shared","route","effect","view","model","msg"],"cases":[]},{"name":"Protected","comment":" Actions to take when a user visits a `protected` page\n\n    import Gen.Route as Route exposing (Route)\n\n    beforeProtectedInit : Shared.Model -> Request () -> Protected User Route\n    beforeProtectedInit shared _ =\n        case shared.user of\n            Just user ->\n                Provide user\n\n            Nothing ->\n                RedirectTo Route.SignIn\n\n","args":["user","route"],"cases":[["Provide",["user"]],["RedirectTo",["route"]]]}],"aliases":[{"name":"Bundle","comment":" A convenient function for use within generated code. Makes it easy to handle `init`, `update`, `view`, and `subscriptions` for each page!\n","args":["params","model","msg","shared","effect","pagesModel","pagesMsg","pagesView"],"type":"{ init : params -> shared -> Url.Url -> Browser.Navigation.Key -> ( pagesModel, effect ), update : params -> msg -> model -> shared -> Url.Url -> Browser.Navigation.Key -> ( pagesModel, effect ), view : params -> model -> shared -> Url.Url -> Browser.Navigation.Key -> pagesView, subscriptions : params -> model -> shared -> Url.Url -> Browser.Navigation.Key -> Platform.Sub.Sub pagesMsg }"}],"values":[{"name":"advanced","comment":" A page that can handles **custom** effects like sending a `Shared.Msg` or other general user-defined effects.\n\n    import Effect\n    import Page\n\n    page : Page Model Msg\n    page =\n        Page.advanced\n            { init = init\n            , update = update\n            , view = view\n            , subscriptions = subscriptions\n            }\n\n    -- init : ( Model, Effect Msg )\n    -- update : Msg -> Model -> ( Model, Effect Msg )\n    -- view : Model -> View Msg\n    -- subscriptions : Model -> Sub Msg\n\n","type":"{ init : ( model, effect ), update : msg -> model -> ( model, effect ), view : model -> view, subscriptions : model -> Platform.Sub.Sub msg } -> ElmSpa.Internals.Page.Page shared route effect view model msg"},{"name":"bundle","comment":" This function is used by the generated code to connect your pages together.\n\nIt's big, spooky, and makes writing **elm-spa** pages really nice!\n\n","type":"{ redirecting : { model : pagesModel, view : pagesView }, toRoute : Url.Url -> route, toUrl : route -> String.String, fromCmd : Platform.Cmd.Cmd any -> pagesEffect, mapEffect : effect -> pagesEffect, mapView : view -> pagesView, page : shared -> ElmSpa.Internals.Page.Request route params -> ElmSpa.Internals.Page.Page shared route effect view model msg, toModel : params -> model -> pagesModel, toMsg : msg -> pagesMsg } -> ElmSpa.Internals.Page.Bundle params model msg shared pagesEffect pagesModel pagesMsg pagesView"},{"name":"element","comment":" A page that can handle effects like [HTTP requests or subscriptions](https://guide.elm-lang.org/effects/).\n\n( Inspired by [`Browser.element`](https://package.elm-lang.org/packages/elm/browser/latest/Browser#element) )\n\n    import Page\n\n    page : Page Model Msg\n    page =\n        Page.element\n            { init = init\n            , update = update\n            , view = view\n            , subscriptions = subscriptions\n            }\n\n    -- init : ( Model, Cmd Msg )\n    -- update : Msg -> Model -> ( Model, Cmd Msg )\n    -- view : Model -> View Msg\n    -- subscriptions : Model -> Sub Msg\n\n","type":"(Platform.Cmd.Cmd msg -> effect) -> { init : ( model, Platform.Cmd.Cmd msg ), update : msg -> model -> ( model, Platform.Cmd.Cmd msg ), view : model -> view, subscriptions : model -> Platform.Sub.Sub msg } -> ElmSpa.Internals.Page.Page shared route effect view model msg"},{"name":"protected","comment":" Deprecated! Will be replaced by [protected2](#protected2)\n","type":"{ effectNone : effect, fromCmd : Platform.Cmd.Cmd msg -> effect, user : shared -> ElmSpa.Internals.Page.Request route () -> Maybe.Maybe user, route : route } -> { static : { view : user -> view } -> ElmSpa.Internals.Page.Page shared route effect view () msg, sandbox : { init : user -> model, update : user -> msg -> model -> model, view : user -> model -> view } -> ElmSpa.Internals.Page.Page shared route effect view model msg, element : { init : user -> ( model, Platform.Cmd.Cmd msg ), update : user -> msg -> model -> ( model, Platform.Cmd.Cmd msg ), view : user -> model -> view, subscriptions : user -> model -> Platform.Sub.Sub msg } -> ElmSpa.Internals.Page.Page shared route effect view model msg, advanced : { init : user -> ( model, effect ), update : user -> msg -> model -> ( model, effect ), view : user -> model -> view, subscriptions : user -> model -> Platform.Sub.Sub msg } -> ElmSpa.Internals.Page.Page shared route effect view model msg }"},{"name":"protected2","comment":" **This will become `protected`, and [protected](#protected) will be removed in the v6 release.** Keeping them both to prevent a version bump!\n\nPrefixing any of the four functions above with `protected` will guarantee that the page has access to a user. Here's an example with `sandbox`:\n\n    import Page\n\n    page : Page Model Msg\n    page =\n        Page.protected.sandbox\n            { init = init\n            , update = update\n            , view = view\n            }\n\n    -- init : User -> Model\n    -- update : User -> Msg -> Model -> Model\n    -- update : User -> Model -> View Msg\n\n","type":"{ effectNone : effect, fromCmd : Platform.Cmd.Cmd msg -> effect, beforeInit : shared -> ElmSpa.Internals.Page.Request route () -> ElmSpa.Internals.Page.Protected user route } -> { static : { view : user -> view } -> ElmSpa.Internals.Page.Page shared route effect view () msg, sandbox : { init : user -> model, update : user -> msg -> model -> model, view : user -> model -> view } -> ElmSpa.Internals.Page.Page shared route effect view model msg, element : { init : user -> ( model, Platform.Cmd.Cmd msg ), update : user -> msg -> model -> ( model, Platform.Cmd.Cmd msg ), view : user -> model -> view, subscriptions : user -> model -> Platform.Sub.Sub msg } -> ElmSpa.Internals.Page.Page shared route effect view model msg, advanced : { init : user -> ( model, effect ), update : user -> msg -> model -> ( model, effect ), view : user -> model -> view, subscriptions : user -> model -> Platform.Sub.Sub msg } -> ElmSpa.Internals.Page.Page shared route effect view model msg }"},{"name":"sandbox","comment":" A page that can keep track of application state.\n\n( Inspired by [`Browser.sandbox`](https://package.elm-lang.org/packages/elm/browser/latest/Browser#sandbox) )\n\n    import Page\n\n    page : Page Model Msg\n    page =\n        Page.sandbox\n            { init = init\n            , update = update\n            , view = view\n            }\n\n    -- init : Model\n    -- update : Msg -> Model -> Model\n    -- view : Model -> View Msg\n\n","type":"effect -> { init : model, update : msg -> model -> model, view : model -> view } -> ElmSpa.Internals.Page.Page shared route effect view model msg"},{"name":"static","comment":" A page that only needs to render a static view.\n\n    import Page\n\n    page : Page () Never\n    page =\n        Page.static\n            { view = view\n            }\n\n    -- view : View Never\n\n","type":"effect -> { view : view } -> ElmSpa.Internals.Page.Page shared route effect view () msg"}],"binops":[]},{"name":"ElmSpa.Page","comment":"\n\n\n# **( These docs are for CLI contributors )**\n\n\n### If you are using **elm-spa**, check out [the official guide](https://v6.elm-spa.dev/guide) instead!\n\n---\n\nEvery page in **elm-spa** ultimately becomes one data type: `Page`\n\nThis makes it easy to wire them up in the generated code, because they\nall have the same type signature.\n\n**Note:** You won't use `ElmSpa.Page` directly, instead you'll be using `Page`,\nwhich removes some of the generic type parameters\n\n    type alias Page model msg =\n        { init : ( model, Cmd msg, List Shared.Msg )\n        , update : msg -> model -> ( model, Cmd msg, List Shared.Msg )\n        , view : model -> View msg\n        , subscriptions : model -> Sub msg\n        }\n\n\n## Pages\n\n@docs Page\n@docs static, sandbox, element, shared\n\n","unions":[],"aliases":[{"name":"Page","comment":" The common `Page` type that each of the functions below creates\n\n    Page.static { ... }    -- Page () Never\n    Page.sandbox { ... }   -- Page Model Msg\n    Page.element { ... }   -- Page Model Msg\n    Page.shared { ... }    -- Page Model Msg\n\n","args":["sharedMsg","view","model","msg"],"type":"{ init : () -> ( model, Platform.Cmd.Cmd msg, List.List sharedMsg ), update : msg -> model -> ( model, Platform.Cmd.Cmd msg, List.List sharedMsg ), view : model -> view, subscriptions : model -> Platform.Sub.Sub msg }"}],"values":[{"name":"element","comment":" A page that can send side-effects and subscribe to events.\n\n    Page.element\n        { init = init\n        , update = update\n        , subscriptions = subscriptions\n        , view = view\n        }\n\n    init : (Model, Cmd Msg)\n    update : Msg -> Model -> (Model, Cmd Msg)\n    view : Model -> View Msg\n    subscriptions : Model -> Sub Msg\n\n","type":"{ init : ( model, Platform.Cmd.Cmd msg ), update : msg -> model -> ( model, Platform.Cmd.Cmd msg ), view : model -> view, subscriptions : model -> Platform.Sub.Sub msg } -> ElmSpa.Page.Page sharedMsg view model msg"},{"name":"sandbox","comment":" A page that can track state, and respond to user input.\n\n    Page.sandbox\n        { init = init\n        , update = update\n        , view = view\n        }\n\n    init : Model\n    update : Msg -> Model -> Model\n    view : Model -> View Msg\n\n","type":"{ init : model, update : msg -> model -> model, view : model -> view } -> ElmSpa.Page.Page sharedMsg view model msg"},{"name":"shared","comment":" A page that allows messages to be sent to the `Shared` module.\n\n    Page.shared\n        { init = init\n        , update = update\n        , subscriptions = subscriptions\n        , view = view\n        }\n\n    init : (Model, Cmd Msg, List Shared.Msg )\n    update : Msg -> Model -> (Model, Cmd Msg, List Shared.Msg )\n    view : Model -> View Msg\n    subscriptions : Model -> Sub Msg\n\n","type":"{ init : ( model, Platform.Cmd.Cmd msg, List.List sharedMsg ), update : msg -> model -> ( model, Platform.Cmd.Cmd msg, List.List sharedMsg ), view : model -> view, subscriptions : model -> Platform.Sub.Sub msg } -> ElmSpa.Page.Page sharedMsg view model msg"},{"name":"static","comment":" A page that can track state, and respond to user input.\n\n    Page.static\n        { view = view\n        }\n\n    view : View Never\n\n","type":"{ view : view } -> ElmSpa.Page.Page sharedMsg view () Basics.Never"}],"binops":[]},{"name":"ElmSpa.Request","comment":"\n\n\n# **( These docs are for CLI contributors )**\n\n\n### If you are using **elm-spa**, check out [the official guide](https://v6.elm-spa.dev/guide) instead!\n\n---\n\nEvery page gets access to a **request**, which has information about the\ncurrent URL, route parameters, query parameters etc.\n\n    page : Shared.Model -> Request Params -> Page Model Msg\n    page _ request =\n        Page.element\n            { init = init\n            , update = update\n            , view = view request\n            }\n\nYou can choose to pass this request into `init`,`update`, or any other function\nthat might need access to URL-related information.\n\n\n# Requests\n\n@docs Request, create\n\n","unions":[],"aliases":[{"name":"Request","comment":" Here is an example request for the route `/people/:name`\n\n    -- /people/ryan\n    req.route == Route.People__Detail_ { name = \"ryan\" }\n\n    req.params == { name = \"ryan\" }\n\n    req.params.name == \"ryan\"\n\n    req.query == Dict.empty\n\nAnd another example with a some query parameters:\n\n    -- /people/scott?allowed=false\n    req.route == Route.People__Detail_ { name = \"scott\" }\n\n    req.params == { name = \"scott\" }\n\n    req.params.name == \"scott\"\n\n    Dict.get \"allowed\" req.query == Just \"false\"\n\n","args":["route","params"],"type":"{ url : Url.Url, key : Browser.Navigation.Key, route : route, params : params, query : Dict.Dict String.String String.String }"}],"values":[{"name":"create","comment":" A convenience function for creating requests, used by elm-spa internally.\n\n    request : Request Route { name : String }\n    request =\n        Request.create (Route.fromUrl url)\n            { name = \"ryan\" }\n            url\n            key\n\n","type":"route -> params -> Url.Url -> Browser.Navigation.Key -> ElmSpa.Request.Request route params"}],"binops":[]}]