[{"name":"CustomElement.CodeEditor","comment":" The Elm interface to the `code-editor` custom element.\n\nInspired by [Luke Westby](https://github.com/lukewestby)'s [Elm Europe\ntalk](https://youtu.be/tyFe9Pw6TVE). The JavaScript custom element\ncode is almost a verbatim copy.\n\nThis code won't do anything unless `site/js/code-editor.js` is loaded,\nand its CodeMirror files from `site/lib`.\n\n\n# Html Elements\n\n@docs codeEditor\n\n\n# Attributes\n\n@docs editorValue\n\n\n# Events\n\n@docs onEditorChanged\n\n","unions":[],"aliases":[],"values":[{"name":"codeEditor","comment":" Create a code editor Html element.\n","type":"List.List (Html.Attribute msg) -> List.List (Html.Html msg) -> Html.Html msg"},{"name":"editorValue","comment":" This is how you set the contents of the code editor.\n","type":"String.String -> Html.Attribute msg"},{"name":"onEditorChanged","comment":" This is how you receive changes to the contents of the code editor.\n","type":"(String.String -> msg) -> Html.Attribute msg"}],"binops":[]},{"name":"CustomElement.FileListener","comment":" The Elm interface to the `file-listener` custom element.\n\nThis code won't do anything unless `site/js/file-listener.js` is loaded.\n\n\n# Types\n\n@docs File, Id\n\n\n# HTML Elements\n\n@docs fileListener, fileInput\n\n\n# Attributes\n\n@docs fileId\n\n\n# Events\n\n@docs onLoad\n\n\n# Convenience Functions\n\n@docs multipartFormContentType, multipartFormData, crlf\n\n","unions":[],"aliases":[{"name":"File","comment":" `onLoad` receives a `File` instance from the JS code.\n\n`data` is a binary string, containing the file contents.\n\n`dataUrl` is a `data:` URL that you can use as the `src` of an `img` element to display the image.\n\n","args":[],"type":"{ name : String.String, lastModified : Basics.Int, mimeType : String.String, size : Basics.Int, data : String.String, dataUrl : String.String }"},{"name":"Id","comment":" Convenience type.\n","args":[],"type":"String.String"}],"values":[{"name":"crlf","comment":" Two-character string: carriage return, line feed\n","type":"String.String"},{"name":"fileId","comment":" You need to set the `fileId` attribute to the `id` of an `input` of type `file`.\n\nNot necessary if you use `fileInput` to create the two elements, since it will connect the `file-listener` element to the `input` element for you.\n\n","type":"String.String -> Html.Attribute msg"},{"name":"fileInput","comment":" Create a `input` element of `type` `file` with the given `Id` and the first list of attributes.\n\nConnect a `file-listener` element to it, with the second list of attributes.\n\nAll bundled up in an enclosing `span` element.\n\n","type":"CustomElement.FileListener.Id -> List.List (Html.Attribute msg) -> List.List (Html.Attribute msg) -> Html.Html msg"},{"name":"fileListener","comment":" The custom `file-listener` element.\n\nIt's invisible, but it adds an event listener to the asociated `<input type='file' id='fileId' />` element to fetch the contents of the file, and generate a `\"load\"` event containing the contents and other information.\n\n","type":"List.List (Html.Attribute msg) -> List.List (Html.Html msg) -> Html.Html msg"},{"name":"multipartFormContentType","comment":" Turn a `boundary` string into a `multipart/form-data` mime type.\n\nThis is suitable as the first parameter to `Http.stringBody`.\n\n","type":"String.String -> String.String"},{"name":"multipartFormData","comment":" Turn a `boundary` string and a `File` into the body of a multipart form post.\n\nThis is suitable as the second parameter to `Http.stringBody`.\n\n","type":"String.String -> CustomElement.FileListener.File -> String.String"},{"name":"onLoad","comment":" This is how you receive file content and other information.\n","type":"(CustomElement.FileListener.File -> msg) -> Html.Attribute msg"}],"binops":[]}]