[{"name":"Web","comment":" A state-interface program running in the browser\n\n@docs ProgramConfig\n\n\n## as elm/browser Program\n\n@docs program, ProgramState, ProgramEvent\n\n\n## embed\n\nIf you just want to replace a part of your elm app with this architecture. Make sure to wire in all 3:\n\n@docs programInit, programUpdate, programSubscriptions\n\n\n# interface types\n\n@docs Interface, interfaceBatch, interfaceNone, interfaceMap\n\n\n## DOM\n\nTypes used by [`Web.Dom`](Web-Dom)\n\n@docs DomNode, DomElement, DefaultActionHandling\n\n\n## HTTP\n\nTypes used by [`Web.Http`](Web-Http)\n\n@docs HttpRequest, HttpHeader, HttpBody, HttpExpect, HttpError, HttpMetadata\n\n\n## internals, safe to ignore\n\n@docs InterfaceSingle, InterfaceSingleWithReceive, InterfaceSingleWithoutReceive\n@docs InterfaceDiff, InterfaceWithReceiveDiff, InterfaceWithoutReceiveDiff, EditDomDiff, ReplacementInEditDomDiff\n@docs InterfaceSingleKeys, InterfaceSingleIdOrderTag\n@docs InterfaceSingleId, InterfaceSingleWithReceiveId, InterfaceSingleToIdTag, DomElementId, DomNodeId, HttpRequestId, HttpExpectId\n\n","unions":[{"name":"DefaultActionHandling","comment":" Setting for a listen [`Web.Dom.Modifier`](Web-Dom#Modifier) to keep or overwrite the browsers default action.\n","args":[],"cases":[["DefaultActionPrevent",[]],["DefaultActionExecute",[]]]},{"name":"DomNode","comment":" Plain text or a [`DomElement`](#DomElement) for use in an [`Interface`](#Interface).\n","args":["state"],"cases":[["DomText",["String.String"]],["DomElement",["Web.DomElement state"]]]},{"name":"DomNodeId","comment":" Safe to ignore. Identifier for a [`DomNode`](#DomNode)\n","args":[],"cases":[["DomTextId",["String.String"]],["DomElementId",["Web.DomElementId"]]]},{"name":"HttpBody","comment":" Data send in your http request.\n\n  - `HttpBodyEmpty`: Create an empty body for your request.\n    This is useful for `GET` requests and `POST` requests where you are not sending any data.\n\n  - `HttpBodyString`: Put a `String` in the body of your request. Defining `Web.Http.jsonBody` looks like this:\n\n        import Json.Encode\n\n        jsonBody : Json.Encode.Value -> Web.HttpBody\n        jsonBody value =\n            Web.HttpBodyString \"application/json\" (Json.Encode.encode 0 value)\n\n    The first argument is a [MIME type](https://en.wikipedia.org/wiki/Media_type) of the body.\n\n","args":[],"cases":[["HttpBodyEmpty",[]],["HttpBodyString",["{ mimeType : String.String, content : String.String }"]]]},{"name":"HttpError","comment":" A Request can fail in a couple ways:\n\n  - `BadUrl` means you did not provide a valid URL.\n  - `Timeout` means it took too long to get a response.\n  - `NetworkError` means the user turned off their wifi, went in a cave, etc.\n  - `BadStatus` means you got a response back, but the status code indicates failure. Contains:\n      - The response `Metadata`.\n      - The raw response body as a `Json.Decode.Value`.\n  - `BadBody` means you got a response back with a nice status code, but the body of the response was something unexpected. Contains:\n      - The response `Metadata`.\n      - The raw response body as a `Json.Decode.Value`.\n      - The `Json.Decode.Error` that caused the error.\n\n","args":[],"cases":[["HttpBadUrl",["String.String"]],["HttpTimeout",[]],["HttpNetworkError",[]],["HttpBadStatus",["{ metadata : Web.HttpMetadata, body : Json.Decode.Value }"]]]},{"name":"HttpExpect","comment":" Describe what you expect to be returned in an http response body.\n","args":["state"],"cases":[["HttpExpectJson",["Result.Result Web.HttpError Json.Decode.Value -> state"]],["HttpExpectString",["Result.Result Web.HttpError String.String -> state"]],["HttpExpectWhatever",["Result.Result Web.HttpError () -> state"]]]},{"name":"HttpExpectId","comment":" Safe to ignore. Identifier for an [`HttpExpect`](#HttpExpect)\n","args":[],"cases":[["IdHttpExpectJson",[]],["IdHttpExpectString",[]],["IdHttpExpectWhatever",[]]]},{"name":"InterfaceDiff","comment":" Safe to ignore. Individual messages to js. Also used to identify responses with the same part in the interface\n","args":[],"cases":[["InterfaceWithReceiveDiff",["Web.InterfaceWithReceiveDiff"]],["InterfaceWithoutReceiveDiff",["Web.InterfaceWithoutReceiveDiff"]]]},{"name":"InterfaceSingle","comment":" An \"non-batched\" [`Interface`](#Interface).\nTo create one, use the helpers in `Web.Time`, `.Dom`, `.Http` etc.\n","args":["state"],"cases":[["InterfaceWithReceive",["Web.InterfaceSingleWithReceive state"]],["InterfaceWithoutReceive",["Web.InterfaceSingleWithoutReceive"]]]},{"name":"InterfaceSingleId","comment":" Safe to ignore. Identifier for an [`Interface`](#Interface)\n","args":[],"cases":[["IdInterfaceWithReceive",["Web.InterfaceSingleWithReceiveId"]],["IdInterfaceWithoutReceive",["Web.InterfaceSingleWithoutReceive"]]]},{"name":"InterfaceSingleIdOrderTag","comment":" Safe to ignore. Tag for the ordering of an [`InterfaceSingleId`](#InterfaceSingleId)\n","args":[],"cases":[]},{"name":"InterfaceSingleToIdTag","comment":" Safe to ignore. Tag for the identification mapping of an [`InterfaceSingle`](#InterfaceSingle) → [`InterfaceSingleId`](#InterfaceSingleId)\n","args":[],"cases":[]},{"name":"InterfaceSingleWithReceive","comment":" An [`InterfaceSingle`](#InterfaceSingle) that will notify elm some time in the future.\n","args":["state"],"cases":[["TimePosixRequest",["Time.Posix -> state"]],["TimezoneOffsetRequest",["Basics.Int -> state"]],["TimezoneNameRequest",["Time.ZoneName -> state"]],["TimePeriodicallyListen",["{ intervalDurationMilliSeconds : Basics.Int, on : Time.Posix -> state }"]],["RandomUnsignedInt32sRequest",["{ count : Basics.Int, on : List.List Basics.Int -> state }"]],["DocumentEventListen",["{ eventName : String.String, on : Json.Decode.Decoder state }"]],["DomNodeRender",["Web.DomNode state"]],["HttpRequest",["Web.HttpRequest state"]],["WindowSizeRequest",["{ width : Basics.Int, height : Basics.Int } -> state"]],["WindowEventListen",["{ eventName : String.String, on : Json.Decode.Decoder state }"]],["WindowAnimationFrameListen",["Time.Posix -> state"]],["NavigationUrlRequest",["AppUrl.AppUrl -> state"]],["ClipboardRequest",["String.String -> state"]]]},{"name":"InterfaceSingleWithReceiveId","comment":" Safe to ignore. Identifier for an [`InterfaceSingleWithReceive`](#InterfaceSingleWithReceive)\n","args":[],"cases":[["IdTimePosixRequest",[]],["IdTimezoneOffsetRequest",[]],["IdTimezoneNameRequest",[]],["IdTimePeriodicallyListen",["{ milliSeconds : Basics.Int }"]],["IdRandomUnsignedInt32sRequest",["Basics.Int"]],["IdDomNodeRender",[]],["IdHttpRequest",["Web.HttpRequestId"]],["IdWindowSizeRequest",[]],["IdWindowEventListen",["String.String"]],["IdWindowAnimationFrameListen",[]],["IdNavigationUrlRequest",[]],["IdDocumentEventListen",["String.String"]],["IdClipboardRequest",[]]]},{"name":"InterfaceSingleWithoutReceive","comment":" An [`InterfaceSingle`](#InterfaceSingle) that will never notify elm\n","args":[],"cases":[["ConsoleLog",["String.String"]],["ConsoleWarn",["String.String"]],["ConsoleError",["String.String"]],["NavigationReplaceUrl",["AppUrl.AppUrl"]],["NavigationPushUrl",["AppUrl.AppUrl"]],["NavigationGo",["Basics.Int"]],["NavigationLoad",["Url.Url"]],["NavigationReload",[]],["FileDownloadUnsignedInt8s",["{ mimeType : String.String, name : String.String, content : List.List Basics.Int }"]],["ClipboardReplaceBy",["String.String"]]]},{"name":"InterfaceWithReceiveDiff","comment":" Actions that will notify elm some time in the future\n","args":[],"cases":[["AddTimePosixRequest",[]],["AddTimezoneOffsetRequest",[]],["AddTimezoneNameRequest",[]],["AddTimePeriodicallyListen",["{ milliSeconds : Basics.Int }"]],["AddRandomUnsignedInt32sRequest",["Basics.Int"]],["AddDocumentEventListen",["String.String"]],["AddEditDom",["Web.EditDomDiff"]],["AddHttpRequest",["Web.HttpRequestId"]],["AddWindowSizeRequest",[]],["AddWindowEventListen",["String.String"]],["AddWindowAnimationFrameListen",[]],["AddNavigationUrlRequest",[]],["AddClipboardRequest",[]]]},{"name":"InterfaceWithoutReceiveDiff","comment":" Actions that will never notify elm again\n","args":[],"cases":[["AddConsoleLog",["String.String"]],["AddConsoleWarn",["String.String"]],["AddConsoleError",["String.String"]],["AddNavigationReplaceUrl",["AppUrl.AppUrl"]],["AddNavigationPushUrl",["AppUrl.AppUrl"]],["AddNavigationGo",["Basics.Int"]],["AddNavigationLoad",["Url.Url"]],["AddNavigationReload",[]],["AddFileDownloadUnsignedInt8s",["{ mimeType : String.String, name : String.String, content : List.List Basics.Int }"]],["AddClipboardReplaceBy",["String.String"]],["RemoveTimePeriodicallyListen",["{ milliSeconds : Basics.Int }"]],["RemoveHttpRequest",["Web.HttpRequestId"]],["RemoveDom",[]],["RemoveWindowEventListen",["String.String"]],["RemoveWindowAnimationFrameListen",[]],["RemoveDocumentEventListen",["String.String"]]]},{"name":"ProgramEvent","comment":" Ignore the specific variants, this is just exposed so can annotate a program event like in\n\n    main : Program () (Web.State YourState) (Web.Event YourState)\n    main =\n        Web.toProgram ...\n\n","args":["appState"],"cases":[["InterfaceDiffFailedToDecode",["Json.Decode.Error"]],["InterfaceEventDataFailedToDecode",["Json.Decode.Error"]],["InterfaceEventIgnored",[]],["AppEventToNewAppState",["appState"]]]},{"name":"ProgramState","comment":" Ignore the specific fields, this is just exposed so can annotate a program state like in\n\n    main : Program () (Web.State YourState) (Web.Event YourState)\n    main =\n        Web.toProgram ...\n\n","args":["appState"],"cases":[["State",["{ interface : Emptiable.Emptiable (KeysSet.KeysSet (Web.InterfaceSingle appState) (Web.InterfaceSingleKeys appState) N.N1) Possibly.Possibly, appState : appState }"]]]},{"name":"ReplacementInEditDomDiff","comment":" What parts of a node are replaced. Either all modifiers of a certain kind or the whole node\n","args":[],"cases":[["ReplacementDomNode",["Web.DomNodeId"]],["ReplacementDomElementStyles",["Dict.Dict String.String String.String"]],["ReplacementDomElementAttributes",["Dict.Dict String.String String.String"]],["ReplacementDomElementAttributesNamespaced",["Dict.Dict ( String.String, String.String ) String.String"]],["ReplacementDomElementEventListens",["Dict.Dict String.String Web.DefaultActionHandling"]]]}],"aliases":[{"name":"DomElement","comment":" A tagged DOM node that can itself contain child [node](#DomNode)s\n","args":["state"],"type":"RecordWithoutConstructorFunction.RecordWithoutConstructorFunction { namespace : Maybe.Maybe String.String, tag : String.String, styles : Dict.Dict String.String String.String, attributes : Dict.Dict String.String String.String, attributesNamespaced : Dict.Dict ( String.String, String.String ) String.String, eventListens : Dict.Dict String.String { on : Json.Decode.Value -> state, defaultActionHandling : Web.DefaultActionHandling }, subs : Array.Array (Web.DomNode state) }"},{"name":"DomElementId","comment":" Safe to ignore. Identifier for a [`DomElement`](#DomElement)\n","args":[],"type":"RecordWithoutConstructorFunction.RecordWithoutConstructorFunction { namespace : Maybe.Maybe String.String, tag : String.String, styles : Dict.Dict String.String String.String, attributes : Dict.Dict String.String String.String, attributesNamespaced : Dict.Dict ( String.String, String.String ) String.String, eventListens : Dict.Dict String.String Web.DefaultActionHandling, subs : Array.Array Web.DomNodeId }"},{"name":"EditDomDiff","comment":" Change the current node at a given path using a given [`ReplacementInEditDomDiff`](#ReplacementInEditDomDiff)\n","args":[],"type":"RecordWithoutConstructorFunction.RecordWithoutConstructorFunction { path : List.List Basics.Int, replacement : Web.ReplacementInEditDomDiff }"},{"name":"HttpHeader","comment":" An Http header for configuring a request.\n","args":[],"type":"( String.String, String.String )"},{"name":"HttpMetadata","comment":" Extra information about the response:\n\n  - url of the server that actually responded (so you can detect redirects)\n  - statusCode like 200 or 404\n  - statusText describing what the statusCode means a little\n  - headers like Content-Length and Expires\n\nNote: It is possible for a response to have the same header multiple times.\nIn that case, all the values end up in a single entry in the headers dictionary.\nThe values are separated by commas, following the rules outlined [here](https://stackoverflow.com/questions/4371328/are-duplicate-http-response-headers-acceptable).\n\n","args":[],"type":"RecordWithoutConstructorFunction.RecordWithoutConstructorFunction { url : String.String, statusCode : Basics.Int, statusText : String.String, headers : Dict.Dict String.String String.String }"},{"name":"HttpRequest","comment":" An HTTP request for use in an [`Interface`](#Interface).\n\nYou can set custom headers as needed.\nThe `timeout` can be set to a number of milliseconds you are willing to wait before giving up\n\n","args":["state"],"type":"RecordWithoutConstructorFunction.RecordWithoutConstructorFunction { url : String.String, method : String.String, headers : List.List Web.HttpHeader, body : Web.HttpBody, expect : Web.HttpExpect state, timeout : Maybe.Maybe Basics.Int }"},{"name":"HttpRequestId","comment":" Safe to ignore. Identifier for an [`HttpRequest`](#HttpRequest)\n","args":[],"type":"RecordWithoutConstructorFunction.RecordWithoutConstructorFunction { url : String.String, method : String.String, headers : List.List Web.HttpHeader, body : Web.HttpBody, expect : Web.HttpExpectId, timeout : Maybe.Maybe Basics.Int }"},{"name":"Interface","comment":" Incoming and outgoing effects.\nTo create one, use the helpers in `Web.Time`, `.Dom`, `.Http` etc.\n\nTo combine multiple, use [`Web.interfaceBatch`](#interfaceBatch) and [`Web.interfaceNone`](#interfaceNone)\n\n","args":["state"],"type":"Rope.Rope (Web.InterfaceSingle state)"},{"name":"InterfaceSingleKeys","comment":" Safe to ignore. Identification and order of an [`Interface`](#Interface)\n","args":["state"],"type":"Keys.Key (Web.InterfaceSingle state) (Order.By Web.InterfaceSingleToIdTag Web.InterfaceSingleIdOrderTag) Web.InterfaceSingleId N.N1"},{"name":"ProgramConfig","comment":" What's needed to create a state-interface program.\n\n  - `state` is what elm calls the model\n  - An [`Interface`](#Interface) can be created using the helpers in `Web.Time`, `Web.Dom`, `Web.Http` etc.\n\n","args":["state"],"type":"RecordWithoutConstructorFunction.RecordWithoutConstructorFunction { initialState : state, interface : state -> Web.Interface state, ports : { toJs : Json.Encode.Value -> Platform.Cmd.Cmd Basics.Never, fromJs : (Json.Encode.Value -> Web.ProgramEvent state) -> Platform.Sub.Sub (Web.ProgramEvent state) } }"}],"values":[{"name":"interfaceBatch","comment":" Combine multiple [`Interface`](#Interface)s into one.\n","type":"List.List (Web.Interface state) -> Web.Interface state"},{"name":"interfaceMap","comment":" Map the state constructed by the [`Interface`](#Interface).\n\nIn practice, this is sometimes used like a kind of event-config pattern:\n\n    Web.Time.posixRequest\n        |> Web.interfaceMap (\\timeNow -> TimeReceived timeNow)\n\nsometimes like elm's `update`\n\n    ...\n        |> Web.interfaceMap\n            (\\event ->\n                case event of\n                    MouseMovedTo newMousePoint ->\n                        { state | mousePoint = newMousePoint }\n\n                    CounterDecreaseClicked ->\n                        { state | counter = state.counter - 1 }\n\n                    CounterIncreaseClicked ->\n                        { state | counter = state.counter + 1 }\n            )\n\nand sometimes like elm's `Cmd.map/Task.map/Sub.map/...`:\n\n    type State\n        = MenuState Menu.State\n        | PlayingState Playing.State\n\n    interface : State -> Interface State\n    interface state =\n        case state of\n            MenuState menuState ->\n                Web.interfaceMap MenuState (Menu.interface menuState)\n\n            PlayingState playingState ->\n                Web.interfaceMap PlayingState (Playing.interface playingState)\n\nIn all these examples, you end up converting the narrow state representation of part of the interface to a broader representation for\nthe parent interface\n\n","type":"(state -> mappedState) -> Web.Interface state -> Web.Interface mappedState"},{"name":"interfaceNone","comment":" Doing nothing as an [`Interface`](#Interface). These two examples are equivalent:\n\n    Web.interfaceBatch [ a, Web.interfaceNone, b ]\n\nand\n\n    Web.interfaceBatch\n        (List.filterMap identity\n            [ a |> Just, Nothing, b |> Just ]\n        )\n\n","type":"Web.Interface state_"},{"name":"program","comment":" Create an elm [`Program`](https://dark.elm.dmy.fr/packages/elm/core/latest/Platform#Program)\nwith a given [`Web.ProgramConfig`](#ProgramConfig). Short for\n\n    Platform.worker\n        { init = \\() -> Web.programInit yourAppConfig\n        , update = Web.programUpdate yourAppConfig\n        , subscriptions = Web.programSubscriptions yourAppConfig\n        }\n\n","type":"Web.ProgramConfig state -> Platform.Program () (Web.ProgramState state) (Web.ProgramEvent state)"},{"name":"programInit","comment":" The \"init\" part for an embedded program\n","type":"Web.ProgramConfig state -> ( Web.ProgramState state, Platform.Cmd.Cmd (Web.ProgramEvent state) )"},{"name":"programSubscriptions","comment":" The \"subscriptions\" part for an embedded program\n","type":"Web.ProgramConfig state -> Web.ProgramState state -> Platform.Sub.Sub (Web.ProgramEvent state)"},{"name":"programUpdate","comment":" The \"update\" part for an embedded program\n","type":"Web.ProgramConfig state -> Web.ProgramEvent state -> Web.ProgramState state -> ( Web.ProgramState state, Platform.Cmd.Cmd (Web.ProgramEvent state) )"}],"binops":[]},{"name":"Web.Clipboard","comment":" Helpers for clipboard interactions as part of an [`Interface`](Web#Interface)\n\n@docs request, replaceBy\n\nNote: To listen for [copy, cut and paste events](https://developer.mozilla.org/en-US/docs/Web/API/ClipboardEvent),\nuse [`Web.Dom.listenTo`](Web-Dom#listenTo), see\n\n","unions":[],"aliases":[],"values":[{"name":"replaceBy","comment":" An [`Interface`](Web#Interface) for setting the textual contents of the system clipboard.\n\nNote: uses [`navigator.clipboard.writeText`](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText)\n\n","type":"String.String -> Web.Interface state_"},{"name":"request","comment":" An [`Interface`](Web#Interface) for reading the textual contents of the system clipboard.\n\nNote: uses [`navigator.clipboard.readText()`](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/readText)\n\n","type":"Web.Interface String.String"}],"binops":[]},{"name":"Web.Console","comment":" Helpers for console interactions as part of an [`Interface`](Web#Interface)\n\n@docs log, warn, error\n\n","unions":[],"aliases":[],"values":[{"name":"error","comment":" An [`Interface`](Web#Interface) for printing a message that something failed with bad consequences, for example\n\n> ❌ decoding the selected file failed. Please report this bug at ...\n\nNote: uses [`console.error`](https://developer.mozilla.org/en-US/docs/Web/API/console/error_static)\n\n","type":"String.String -> Web.Interface state_"},{"name":"log","comment":" Like [`Debug.log`](https://dark.elm.dmy.fr/packages/elm/core/latest/Debug#log)\nas an [`Interface`](Web#Interface)\n","type":"String.String -> Web.Interface state_"},{"name":"warn","comment":" An [`Interface`](Web#Interface) for printing a message that something didn't succeed, for example\n\n> ⚠️ Unknown device - there may be compatibility issues.\n\n> ⚠️ Recoverable upload failure, will retry. Error was: no status.\n\nNote: uses [`console.warn`](https://developer.mozilla.org/en-US/docs/Web/API/console/warn_static)\n\n","type":"String.String -> Web.Interface state_"}],"binops":[]},{"name":"Web.Dom","comment":" Helpers for [DOM node types](Web#DomNode) as part of an [`Interface`](Web#Interface).\n\nThese are primitives used for svg and html.\nCompare with [`elm/virtual-dom`](https://dark.elm.dmy.fr/packages/elm/virtual-dom/latest/)\n\n@docs documentEventListen\n@docs text\n@docs element, elementNamespaced\n@docs Modifier, ModifierSingle, attribute, attributeNamespaced, style\n@docs listenTo, listenToPreventingDefaultAction\n@docs modifierMap, modifierBatch, modifierNone\n@docs map, render\n\n","unions":[{"name":"ModifierSingle","comment":" An individual [`Modifier`](#Modifier).\nCreate using [`attribute`](#attribute), [`style`](#style), [`listenTo`](#listenTo).\n","args":["state"],"cases":[["Attribute",["{ namespace : Maybe.Maybe String.String, key : String.String, value : String.String }"]],["Style",["{ key : String.String, value : String.String }"]],["Listen",["{ eventName : String.String, on : Json.Decode.Value -> state, defaultActionHandling : Web.DefaultActionHandling }"]]]}],"aliases":[{"name":"Modifier","comment":" Set the behavior of a [`Web.Dom.element`](Web-Dom#element).\nTo create one, use [`attribute`](#attribute), [`style`](#style), [`listenTo`](#listenTo).\nTo combine multiple, use [`Web.Dom.modifierBatch`](#modifierBatch) and [`Web.Dom.modifierNone`](#modifierNone)\n\nFor example to get `<a href=\"https://elm-lang.org\">elm</a>`\n\n    Web.Dom.element \"a\"\n        [ Web.Dom.attribute \"href\" \"https://elm-lang.org\" ]\n        [ Web.Dom.text \"elm\" ]\n\nBtw: If you can think of a nicer name for this like \"customization\", \"characteristic\" or \"aspect\",\nplease [open an issue](https://github.com/lue-bird/elm-state-interface/issues/new)!\n\n","args":["state"],"type":"Rope.Rope (Web.Dom.ModifierSingle state)"}],"values":[{"name":"attribute","comment":" A key-value attribute [`Modifier`](#Modifier)\n","type":"String.String -> String.String -> Web.Dom.Modifier state_"},{"name":"attributeNamespaced","comment":" A namespaced key-value attribute [`Modifier`](#Modifier).\nFor example, you could define an SVG xlink href attribute as\n\n    attributeXlinkHref : String -> Modifier msg\n    attributeXlinkHref value =\n        Web.Dom.attributeNamespaced \"http://www.w3.org/1999/xlink\" \"xlink:href\" value\n\n","type":"String.String -> String.String -> String.String -> Web.Dom.Modifier state_"},{"name":"documentEventListen","comment":" An [`Interface`](Web#Interface) that listens for a specific `document` event\nlike like keypress, keydown, keyup, click, mousemove, mousedown, mouseup\n","type":"String.String -> Web.Interface Json.Decode.Value"},{"name":"element","comment":" Create a DOM element with a given tag, [`Modifier`](#Modifier)s and sub-[node](Web#DomNode)s.\nFor example to get `<p>flying</p>`\n\n    Web.Dom.element \"p\"\n        []\n        [ Web.Dom.text \"flying\" ]\n\n","type":"String.String -> List.List (Web.Dom.Modifier state) -> List.List (Web.DomNode state) -> Web.DomNode state"},{"name":"elementNamespaced","comment":" Create a DOM element with a given namespace, tag, [`Modifier`](#Modifier)s and sub-[node](Web#DomNode)s.\nFor example, [`Web.Svg`](Web-Svg) defines its elements using\n\n    element : String -> List (Modifier state) -> List (DomNode state) -> DomNode state\n    element tag modifiers subs =\n        Web.Dom.elementNamespaced \"http://www.w3.org/2000/svg\" tag modifiers subs\n\n","type":"String.String -> String.String -> List.List (Web.Dom.Modifier state) -> List.List (Web.DomNode state) -> Web.DomNode state"},{"name":"listenTo","comment":" Listen for a specific DOM event on the [`DomElement`](Web#DomElement).\nUse [`modifierMap`](#modifierMap) to wire this to a specific event.\n\nIf you want to override the browser's default behavior for that event,\nuse [`listenToPreventingDefaultAction`](#listenToPreventingDefaultAction)\n\n","type":"String.String -> Web.Dom.Modifier Json.Decode.Value"},{"name":"listenToPreventingDefaultAction","comment":" Like [`listenTo`](#listenTo) but [preventing the browser's default action](https://developer.mozilla.org/en-US/docs/Web/API/Event/preventDefault).\n\nThat's for example how elm's [`Browser.Events.onSubmit`](https://dark.elm.dmy.fr/packages/elm/html/latest/Html-Events#onSubmit)\nprevents the form from changing the page’s location:\n\n    submitListen : Web.Dom.Modifier ()\n    submitListen =\n        Web.Dom.listenToPreventingDefaultAction \"submit\"\n            |> Web.Dom.modifierMap (\\_ -> ())\n\n","type":"String.String -> Web.Dom.Modifier Json.Decode.Value"},{"name":"map","comment":" Wire events from this [`DomNode`](Web#DomNode) to a specific event.\n\n    buttonUi \"start\"\n        |> Web.Dom.map (\\Clicked -> StartButtonClicked)\n\nwith e.g.\n\n    buttonUi : List (Web.DomNode ()) -> Web.DomNode ButtonEvent\n    buttonUi subs =\n        Web.Dom.element \"button\"\n            [ Web.Dom.listenTo \"click\"\n                |> Web.Dom.modifierMap (\\_ -> Clicked)\n            ]\n            [ Web.Dom.text label ]\n\n    type ButtonEvent\n        = Clicked\n\n","type":"(state -> mappedState) -> Web.DomNode state -> Web.DomNode mappedState"},{"name":"modifierBatch","comment":" Combine multiple [`Modifier`](#Modifier)s into one.\n","type":"List.List (Web.Dom.Modifier state) -> Web.Dom.Modifier state"},{"name":"modifierMap","comment":" Wire events from this [`Modifier`](#Modifier) to a specific event.\n\n    Web.Dom.listen \"click\" |> Web.Dom.modifierMap (\\_ -> ButtonClicked)\n\n","type":"(state -> mappedState) -> Web.Dom.Modifier state -> Web.Dom.Modifier mappedState"},{"name":"modifierNone","comment":" Doing nothing as a [`Modifier`](#Modifier). These two examples are equivalent:\n\n    Web.Dom.modifierBatch\n        [ a, Web.Dom.modifierNone, b ]\n\nand\n\n    Web.Dom.modifierBatch\n        (List.filterMap identity\n            [ a |> Just, Nothing, b |> Just ]\n        )\n\n","type":"Web.Dom.Modifier state_"},{"name":"render","comment":" An [`Interface`](Web#Interface) for displaying a given [`DomNode`](Web#DomNode).\n","type":"Web.DomNode state -> Web.Interface state"},{"name":"style","comment":" A key-value style [`Modifier`](#Modifier)\n","type":"String.String -> String.String -> Web.Dom.Modifier state_"},{"name":"text","comment":" Plain text [`DomNode`](Web#DomNode)\n","type":"String.String -> Web.DomNode state_"}],"binops":[]},{"name":"Web.FileDownload","comment":" Helpers for downloading a dynamically generated file as part of an [`Interface`](Web#Interface).\n\nSecurity note: Browsers require downloads to be initiated by a user event.\nSo rather than allowing malicious sites to put files on your computer however they please,\nthe user has to at least click a button first.\nAs a result, the following interfaces only work when they are triggered by some user event.\n\nNote: There's no equivalent module for file select\nsince you can easily replicate the behavior using an input element with type file or file drop area modifiers,\nsee for example [mpizenberg/elm-file](https://dark.elm.dmy.fr/packages/mpizenberg/elm-file/latest/FileValue#load-files-with-an-input).\n\n@docs bytes\n\n","unions":[],"aliases":[],"values":[{"name":"bytes","comment":" An [`Interface`](Web#Interface) for downloading a given file\nwith a list of [`Bit`](https://dark.elm.dmy.fr/packages/lue-bird/elm-bits/latest/)s as its content,\na given type and and a given default name.\n\nReplacement for [`File.Download.bytes`](https://dark.elm.dmy.fr/packages/elm/file/latest/File-Download#bytes)\n\n","type":"{ name : String.String, mimeType : String.String, content : Bytes.Bytes } -> Web.Interface state_"}],"binops":[]},{"name":"Web.Http","comment":" Helpers for [HTTP types](Web#HttpRequest) as part of an [`Interface`](Web#Interface)\n\n@docs expectJson, expectString, expectWhatever\n@docs bodyJson\n@docs get, post\n\n@docs request\n\n","unions":[],"aliases":[],"values":[{"name":"bodyJson","comment":" Put some JSON value in the body of your request. This will automatically add the `Content-Type: application/json` header.\n","type":"Json.Encode.Value -> Web.HttpBody"},{"name":"expectJson","comment":" Expect the response body to be `JSON`, decode it using the supplied decoder.\n","type":"Web.HttpExpect (Result.Result Web.HttpError Json.Decode.Value)"},{"name":"expectString","comment":" Expect the response body to be a `String`.\n","type":"Web.HttpExpect (Result.Result Web.HttpError String.String)"},{"name":"expectWhatever","comment":" Discard the response body.\n","type":"Web.HttpExpect (Result.Result Web.HttpError ())"},{"name":"get","comment":" Create a `GET` [`HttpRequest`](Web#HttpRequest)\n","type":"{ url : String.String, headers : List.List Web.HttpHeader, expect : Web.HttpExpect state, timeout : Maybe.Maybe Basics.Int } -> Web.HttpRequest state"},{"name":"post","comment":" Create a `POST` [`HttpRequest`](Web#HttpRequest)\n","type":"{ url : String.String, headers : List.List Web.HttpHeader, body : Web.HttpBody, expect : Web.HttpExpect state, timeout : Maybe.Maybe Basics.Int } -> Web.HttpRequest state"},{"name":"request","comment":" An [`Interface`](Web#Interface) for handling an [`HttpRequest`](Web#HttpRequest)\nusing the [fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch)\n","type":"Web.HttpRequest state -> Web.Interface state"}],"binops":[]},{"name":"Web.Navigation","comment":" Helpers for `history` interaction as part of an [`Interface`](Web#Interface)\n\n@docs urlRequest\n@docs pushUrl, replaceUrl\n@docs moveForward, moveBack, movementListen\n@docs load, reload\n\n","unions":[],"aliases":[],"values":[{"name":"load","comment":" An [`Interface`](Web#Interface) that leaves the current page and loads the given [URL](https://dark.elm.dmy.fr/packages/elm/url/latest/).\nThis always results in a page load, even if the provided URL is the same as the current one.\n\n    gotoElmWebsite : Web.Interface state_\n    gotoElmWebsite =\n        Web.Navigation.load\n            -- https://elm-lang.org/\n            { protocol = Url.Https\n            , host = \"elm-lang.org\"\n            , port_ = Nothing\n            , path = \"/\"\n            , query = Nothing\n            , fragment = Nothing\n            }\n\nReplacement for [`Browser.Navigation.load`](https://dark.elm.dmy.fr/packages/elm/browser/latest/Browser-Navigation#load)\n\n","type":"Url.Url -> Web.Interface state_"},{"name":"moveBack","comment":" An [`Interface`](Web#Interface) that goes back a given number of pages.\n\nNote: You only manage the browser history that you created.\n\nReplacement for [`Browser.Navigation.back`](https://dark.elm.dmy.fr/packages/elm/browser/latest/Browser-Navigation#back)\n\n","type":"Basics.Int -> Web.Interface state_"},{"name":"moveForward","comment":" An [`Interface`](Web#Interface) that goes forward a given number of pages.\nIf there are no more pages in the future, this will do nothing.\n\nNote: You only manage the browser history that you created.\n\nReplacement for [`Browser.Navigation.forward`](https://dark.elm.dmy.fr/packages/elm/browser/latest/Browser-Navigation#forward)\n\n","type":"Basics.Int -> Web.Interface state_"},{"name":"movementListen","comment":" If you used [`pushUrl`](#pushUrl) to update the URL with new history entries,\nwhen the user clicks ← or → buttons (or you call [`moveForward`](#moveForward) or [`moveBack`](#moveBack) yourself),\nthe URL will change but your UI will not.\n\nUse [`movementListen`](#movementListen) to detect those URL changes and make ui changes as needed.\n\nWhen the app itself initiates a url change with [`pushUrl`](#pushUrl) or [`replaceUrl`](#replaceUrl), no such event is triggered.\n\nNote: This event is called [\"popstate\"](https://developer.mozilla.org/en-US/docs/Web/API/Window/popstate_event) in js\n\n","type":"Web.Interface AppUrl.AppUrl"},{"name":"pushUrl","comment":" An [`Interface`](Web#Interface) that changes the [app-specific URL](https://dark.elm.dmy.fr/packages/lydell/elm-app-url/latest/)\nand adds a new entry to the browser history,\nbut does not trigger a page load.\n\nReplacement for [`Browser.Navigation.pushUrl`](https://dark.elm.dmy.fr/packages/elm/browser/latest/Browser-Navigation#pushUrl)\n\n","type":"AppUrl.AppUrl -> Web.Interface state_"},{"name":"reload","comment":" An [`Interface`](Web#Interface) that reloads the current page.\nThis always results in a page load!\n\nNote: This may grab resources from the browser cache.\n\nReplacement for [`Browser.Navigation.reload`](https://dark.elm.dmy.fr/packages/elm/browser/latest/Browser-Navigation#reload)\n\n","type":"Web.Interface state_"},{"name":"replaceUrl","comment":" An [`Interface`](Web#Interface) that changes the [app-specific URL](https://dark.elm.dmy.fr/packages/lydell/elm-app-url/latest/),\nbut neither triggers a page load nor adds a new entry to the browser history.\n\nThis can be useful if you have search box and you want the ?search=hats in the URL to match without adding a history entry for every single key stroke. Imagine how annoying it would be to click back thirty times and still be on the same page!\n\nReplacement for [`Browser.Navigation.replaceUrl`](https://dark.elm.dmy.fr/packages/elm/browser/latest/Browser-Navigation#replaceUrl)\n\n","type":"AppUrl.AppUrl -> Web.Interface state_"},{"name":"urlRequest","comment":" An [`Interface`](Web#Interface) for getting the current page's [app-specific URL](https://dark.elm.dmy.fr/packages/lydell/elm-app-url/latest/).\nIs usually used while starting up the app.\n\nNote: Uses [`window.location.href`](https://developer.mozilla.org/en-US/docs/Web/API/Window/location)\n\n","type":"Web.Interface AppUrl.AppUrl"}],"binops":[]},{"name":"Web.Random","comment":" Helpers for randomness as part of an [`Interface`](Web#Interface)\n\n@docs unsignedInt32s\n\n","unions":[],"aliases":[],"values":[{"name":"unsignedInt32s","comment":" An [`Interface`](Web#Interface) for generating a given count of cryptographically sound unsigned 32-bit `Int`s.\nYou can use these in all kinds of packages that allow creating an initial seed\nfrom ints like [NoRedInk/elm-random-pcg-extended](https://dark.elm.dmy.fr/packages/NoRedInk/elm-random-pcg-extended/latest/Random-Pcg-Extended#initialSeed)\n\nNote: uses [`window.crypto.getRandomValues`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues)\n\n","type":"Basics.Int -> Web.Interface (List.List Basics.Int)"}],"binops":[]},{"name":"Web.Svg","comment":" Helpers for svg [DOM node types](Web#DomNode)\n\n@docs element\n\nfor text, attributes etc use the re\n\n","unions":[],"aliases":[],"values":[{"name":"element","comment":" Create an SVG element [`DomNode`](Web#DomNode).\nwith a given tag, [`Modifier`](Web-Dom#Modifier)s and sub-nodes.\n","type":"String.String -> List.List (Web.Dom.Modifier state) -> List.List (Web.DomNode state) -> Web.DomNode state"}],"binops":[]},{"name":"Web.Time","comment":" Helpers for [`elm/time`](https://dark.elm.dmy.fr/packages/elm/time/latest/Time) primitives as part of an [`Interface`](Web#Interface)\n\n@docs posixRequest, zoneRequest, zoneNameRequest\n@docs periodicallyListen\n\n","unions":[],"aliases":[],"values":[{"name":"periodicallyListen","comment":" An [`Interface`](Web#Interface) that sends you the current time\nevery time a given [`Duration`](https://dark.elm.dmy.fr/packages/ianmackenzie/elm-units/latest/Duration) has passed.\n\nNote: Do not use it for animations.\n[`Web.Window.animationFrameListen`](Web-Window#animationFrameListen)\nsyncs up with repaints and will end up being much smoother for any moving visuals.\n\n","type":"Duration.Duration -> Web.Interface Time.Posix"},{"name":"posixRequest","comment":" Get the POSIX time at the moment when this interface is added.\n\nReplacement for `elm/time`'s [`Time.now`](https://package.elm-lang.org/packages/elm/time/latest/Time#now).\n\n","type":"Web.Interface Time.Posix"},{"name":"zoneNameRequest","comment":" Intended for package authors.\nUse `Intl.DateTimeFormat().resolvedOptions().timeZone` to try to get names like Europe/Moscow or America/Havana.\nFrom there you can look it up in any [IANA data](https://www.iana.org/time-zones) you loaded yourself.\n\nReplacement for `elm/time`'s [`Time.getZoneName`](https://package.elm-lang.org/packages/elm/time/latest/Time#getZoneName).\n\n","type":"Web.Interface Time.ZoneName"},{"name":"zoneRequest","comment":" Produce a `Zone` based on the current UTC offset.\n\nReplacement for `elm/time`'s [`Time.here`](https://package.elm-lang.org/packages/elm/time/latest/Time#here).\n\n","type":"Web.Interface Time.Zone"}],"binops":[]},{"name":"Web.Window","comment":" Helpers for `window` interaction as part of an [`Interface`](Web#Interface)\n\n@docs animationFrameListen\n@docs sizeRequest, eventListen, resizeListen\n\n","unions":[],"aliases":[],"values":[{"name":"animationFrameListen","comment":" An [`Interface`](Web#Interface) that continuously listens for an animation frame.\nThis will be about 60 times per second, though 75, 120, and 144 are also widely used.\nTo balance this out in your animation, the [current time](https://dark.elm.dmy.fr/packages/elm/time/latest/Time#Posix) is provided each frame.\n\nTo get a delta, you could use [`Web.Time.posixRequest`](Web-Time#posixRequest)\nto get a start time and check with e.g. [`Duration.from`](https://dark.elm.dmy.fr/packages/ianmackenzie/elm-units/latest/Duration#from) how far you've progressed in the timeline.\n\nNote: To improve performance and battery life, most browsers pause these notifications when the app is running in a background tab or a hidden <iframe>.\n\nReplacement for [`Browser.Events.onAnimationFrame`](https://dark.elm.dmy.fr/packages/elm/browser/latest/Browser-Events#onAnimationFrame)\n\nNote: uses [`window.requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame).\n\n","type":"Web.Interface Time.Posix"},{"name":"eventListen","comment":" An [`Interface`](Web#Interface) that listens for a specific `window` event\n","type":"String.String -> Web.Interface Json.Decode.Value"},{"name":"resizeListen","comment":" An [`Interface`](Web#Interface) that listens for changes to the inner window width and height.\n","type":"Web.Interface { width : Basics.Int, height : Basics.Int }"},{"name":"sizeRequest","comment":" An [`Interface`](Web#Interface) for getting the inner window width and height in pixels,\nnot including toolbars/scrollbars.\n","type":"Web.Interface { width : Basics.Int, height : Basics.Int }"}],"binops":[]}]