[{"name":"Component","comment":" Build custom elements with Elm.\n\nThe host passes values through attributes and listens for events. The component\nkeeps its interaction state private and renders its own view. When an attribute\nchanges, `receive` can send a message to `update`. An update can send an event\nback to the host.\n\nThe build tool reads the component's `Input` and `Output` types. It generates\nthe code that reads attributes, sends events, and connects the component to the\nbrowser. See the disclosure example for a complete component.\n\n# Define a component\n@docs Component, define, Event\n\n# Browser integration\n@docs program\n\n","unions":[{"name":"Component","comment":" The state changes, view, and events for one component.\n\nCreate one with `define`.\n","args":["input","state","msg","output"],"cases":[]}],"aliases":[{"name":"Event","comment":" An event sent to the host. `name` becomes the DOM event type. `detail`\nbecomes `CustomEvent.detail`. The event bubbles across the shadow boundary.\n","args":[],"type":"{ name : String.String, detail : Json.Encode.Value }"}],"values":[{"name":"define","comment":" Define a component. `init` receives the initial input. When an attribute\nchanges, `receive` gets the new input. Return `Nothing` to ignore the change,\nor `Just msg` to handle it through `update`. Keep any input that `view` needs in\nthe component's state.\n\nThe build tool reads an `Input` record alias and an `Output` union from the\ncomponent module. It generates the attribute and event handling, so this\ndefinition needs neither a decoder nor an encoder.\n\n`update` returns the next state, a command for component messages, and events\nfor the host. Return an empty list when there are no events.\n\n    component =\n        Component.define\n            { init = init\n            , receive = Just << Received\n            , update = update\n            , view = view\n            , subscriptions = always Sub.none\n            }\n\n","type":"{ init : input -> ( state, Platform.Cmd.Cmd msg ), receive : input -> Maybe.Maybe msg, update : msg -> state -> ( state, Platform.Cmd.Cmd msg, List.List output ), view : state -> Html.Html msg, subscriptions : state -> Platform.Sub.Sub msg } -> Component.Component input state msg output"},{"name":"program","comment":" Connect a component to the generated ports and codecs. The build tool calls\nthis from a generated Elm entry point. Component modules use `define`.\n\nAn element keeps its Elm state when it leaves the page and returns. Its\nsubscriptions pause while it is detached.\n\n","type":"Json.Decode.Decoder input -> (output -> Component.Event) -> { inputChanged : (Json.Decode.Value -> Component.Msg msg) -> Platform.Sub.Sub (Component.Msg msg), connectionChanged : (Basics.Bool -> Component.Msg msg) -> Platform.Sub.Sub (Component.Msg msg), outputSent : Json.Encode.Value -> Platform.Cmd.Cmd (Component.Msg msg) } -> Component.Component input state msg output -> Platform.Program Json.Decode.Value (Component.Model state) (Component.Msg msg)"}],"binops":[]}]