[
    {
        "name": "DataUrl",
        "comment": " A module to handle [data URLs](https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) ([IETF RFC 2397](https://tools.ietf.org/html/rfc2397)) in type safe manner.\nThe data URL string is supposed to be provided through `port`s.\n\n\n# Types\n\n@docs DataUrl\n@docs Data\n@docs MediaType\n\n\n# Constructors\n\n@docs fromString\n\n\n# Getters\n\n@docs mediaType\n@docs data\n\n\n# Convert functions\n\n@docs toString\n\n\n# Lower level functions\n\n@docs parser\n\n",
        "unions": [],
        "aliases": [
            {
                "name": "Data",
                "comment": " Reexport `Data` type from `DataUrl.Data` for convenience.\n",
                "args": [],
                "type": "Data"
            },
            {
                "name": "DataUrl",
                "comment": " An opaque type representing data url\n",
                "args": [],
                "type": "DataUrl"
            },
            {
                "name": "MediaType",
                "comment": " Reexport `MediaType` type from `DataUrl.MediaType` for convenience.\n",
                "args": [],
                "type": "MediaType"
            }
        ],
        "values": [
            {
                "name": "data",
                "comment": " Take data part from `DataUrl`.\nIt is guaranteed that the data URL has `base64` token when the value is `Base64 someString`, but the `someString` could be illegal base64 string as follows.\n\n    import DataUrl.Data exposing(Data(..))\n\n    Maybe.map data <| fromString \"data:text/plain;base64,This-is?illegal%base64_string\"\n    --> Just <| Base64 \"This-is?illegal%base64_string\"\n\nThe `someString` is only guaranteed to meet `uric` of [RFC 2396](https://tools.ietf.org/html/rfc2396).\n\n",
                "type": "DataUrl -> Data"
            },
            {
                "name": "fromString",
                "comment": " The only way to construct `DataUrl` value.\nIt takes a `String` representation of data URL and parses it as a `DataUrl` value.\nIf the provided `String` argument is illigal as a data URL, it returns `Nothing`.\nNote that it does not accept raw HTML string, though [data URLs page of MDN](https://developer.mozilla.org/docs/data_URIs) has such an example.\n\n    fromString \"data:text/html,<script>alert('hi');</script>\"\n    --> Nothing\n\n",
                "type": "String -> Maybe DataUrl"
            },
            {
                "name": "mediaType",
                "comment": " Take `MediaType` value from `DataUrl` value.\nAs [data URLs page of MDN](https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) says,\nit should be assumed that `text/plain;charset=US-ASCII` is set when the value is `Nothing`.\n",
                "type": "DataUrl -> Maybe MediaType"
            },
            {
                "name": "parser",
                "comment": " A parser for `DataUrl`.\nUse `fromString` for simple usage.\n",
                "type": "Parser DataUrl"
            },
            {
                "name": "toString",
                "comment": " Convert `DataUrl` values to `String`.\n\n    Maybe.map DataUrl.toString <|\n        fromString \"data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D\"\n    --> Just \"data:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D\"\n\n",
                "type": "DataUrl -> String"
            }
        ],
        "binops": []
    },
    {
        "name": "DataUrl.MediaType",
        "comment": " A module to handle media types of [data URLs](https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) ([IETF RFC 2397](https://tools.ietf.org/html/rfc2397)) in type safe manner.\n\nThis module only provides a opaque type and getters, so there are no way to construct new `MediaType`.\nThe only way to get `MediaType` is using `DataUrl.mediaType`, which picks `MediaType` value from `DataUrl` value.\n\n\n# Types\n\n@docs MediaType\n\n\n# Convert functions\n\n@docs toString\n\n\n# Getters\n\n@docs type_\n@docs parameters\n\n",
        "unions": [],
        "aliases": [
            {
                "name": "MediaType",
                "comment": " An opaque type representing the media type part of data urls.\n",
                "args": [],
                "type": "MediaType"
            }
        ],
        "values": [
            {
                "name": "parameters",
                "comment": " Take list of key-value pair of parameters from `MediaType` value.\nThe parameter key and value is guaranteed to meet `attribute` and `value` in [IETF RFC 2045](https://tools.ietf.org/html/rfc2045) respectively, as [IETF RFC 2397](https://tools.ietf.org/html/rfc2397) requires, when created by `DataUrl.fromString`.\n\n    import DataUrl.MediaType.Internal exposing (sampleMediaType)\n\n    parameters sampleMediaType\n    --> [ ( \"charset\", \"iso-8859-7\" ) ]\n\n",
                "type": "MediaType -> List ( String, String )"
            },
            {
                "name": "toString",
                "comment": " Convert `MediaType` value to string representation.\n\n    import DataUrl.MediaType.Internal exposing (sampleMediaType)\n\n    DataUrl.MediaType.toString sampleMediaType\n    --> \"text/plain;charset=iso-8859-7\"\n\n",
                "type": "MediaType -> String"
            },
            {
                "name": "type_",
                "comment": " Take pair of type and subtype from `MediaType` value.\nThe type and subtype is guaranteed to meet `type-name` and `subtype-name` in [IETF RFC 6838](https://tools.ietf.org/html/rfc6838) respectively, which is not as strict as [IETF RFC 2397](https://tools.ietf.org/html/rfc2397) requires, when created by `DataUrl.fromString`.\n\n    import DataUrl.MediaType.Internal exposing (sampleMediaType)\n\n    type_ sampleMediaType\n    --> ( \"text\", \"plain\" )\n\n",
                "type": "MediaType -> ( String, String )"
            }
        ],
        "binops": []
    },
    {
        "name": "DataUrl.Data",
        "comment": " A module for `data` part of [data URLs](https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs).\n\n\n# Types\n\n@docs Data\n\n\n# Convert functions\n\n@docs toString\n\n\n# Helper functions\n\n@docs isBase64\n\n",
        "unions": [
            {
                "name": "Data",
                "comment": " A type representing the `data` part of data urls.\n",
                "args": [],
                "cases": [
                    [
                        "Textual",
                        [
                            "String"
                        ]
                    ],
                    [
                        "Base64",
                        [
                            "String"
                        ]
                    ]
                ]
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "isBase64",
                "comment": "\n\n    isBase64 (Base64 \"any string\")\n    --> True\n\n    isBase64 (Textual \"any string\")\n    --> False\n",
                "type": "Data -> Bool"
            },
            {
                "name": "toString",
                "comment": " Convert `Data` value to `String`.\nDataUrl.Data.toString <| Textual \"foobarbaz\"\n--> \"foobarbaz\"\n\n    DataUrl.Data.toString <| Base64 \"foobarbaz\"\n    --> \"foobarbaz\"\n\n",
                "type": "Data -> String"
            }
        ],
        "binops": []
    }
]