[
    {
        "name": "Ansi.Log",
        "comment": " Log interprets a stream of text and ANSI escape codes.\n\n@docs init, update, view, viewLine\n\n@docs Model, LineDiscipline, Line, Chunk, CursorPosition, Style\n\n",
        "unions": [
            {
                "name": "LineDiscipline",
                "comment": " How to interpret linebreaks.\n\n  - `Raw`: interpret `\\n` as just `\\n`, i.e. move down a line, retaining the\n    cursor column\n  - `Cooked`: interpret `\\n` as `\\r\\n`, i.e. move down a line and go to the first\n    column\n\n",
                "args": [],
                "cases": [
                    [
                        "Raw",
                        []
                    ],
                    [
                        "Cooked",
                        []
                    ]
                ]
            }
        ],
        "aliases": [
            {
                "name": "Chunk",
                "comment": " A blob of text paired with the style that was configured at the time.\n",
                "args": [],
                "type": "{ text : String, style : Style }"
            },
            {
                "name": "CursorPosition",
                "comment": " The coordinate in the window where text will be printed.\n",
                "args": [],
                "type": "{ row : Int, column : Int }"
            },
            {
                "name": "Line",
                "comment": " A list of arbitrarily-sized chunks of output.\n",
                "args": [],
                "type": "( List Chunk, Int )"
            },
            {
                "name": "Model",
                "comment": " Model is populated by parsing ANSI character sequences and escape codes\nvia `update`.\n\n  - `lines` contains all of the output that's been parsed\n  - `position` is the current position of the cursor\n  - `style` is the style to be applied to any text that's printed\n  - `remainder` is a partial ANSI escape sequence left around from an incomplete\n    segment from the stream\n\n",
                "args": [],
                "type": "{ lineDiscipline : LineDiscipline, lines : Array Line, position : CursorPosition, savedPosition : Maybe CursorPosition, style : Style, remainder : String }"
            },
            {
                "name": "Style",
                "comment": " The current presentation state for any text that's printed.\n",
                "args": [],
                "type": "{ foreground : Maybe Color, background : Maybe Color, bold : Bool, faint : Bool, italic : Bool, underline : Bool, blink : Bool, inverted : Bool, fraktur : Bool, framed : Bool }"
            }
        ],
        "values": [
            {
                "name": "init",
                "comment": " Construct an empty model.\n",
                "type": "LineDiscipline -> Model"
            },
            {
                "name": "update",
                "comment": " Parse and interpret a chunk of ANSI output.\n\nTrailing partial ANSI escape codes will be prepended to the chunk in the next\ncall to `update`.\n\n",
                "type": "String -> Model -> Model"
            },
            {
                "name": "view",
                "comment": " Render the model's logs as HTML.\n\nWraps a <pre> around the the result of calling `viewLine` for each line.\n\nAs a cheap optimization, each line is rendered lazily.\n\n",
                "type": "Model -> Html x"
            },
            {
                "name": "viewLine",
                "comment": " Render an individual line as HTML.\n\nThe line is rendered as a <div> containing <span> elements with styling and\nclasses for each Chunk.\n\nThe `span` elements will have the following attributes:\n\n  - `style=\"font-weight: bold|normal\"`\n  - `class=\"ansi-COLOR-fg ansi-COLOR-bg ansi-bold\"`\n\n...where each class is optional, and `COLOR` is one of:\n\n  - `black`\n  - `red`\n  - `green`\n  - `yellow`\n  - `blue`\n  - `magenta`\n  - `cyan`\n  - `white`\n  - `bright-black`\n  - `bright-red`\n  - `bright-green`\n  - `bright-yellow`\n  - `bright-blue`\n  - `bright-magenta`\n  - `bright-cyan`\n  - `bright-white`\n\nIf the chunk is inverted, the `-fg` and `-bg` classes will have their colors\nswapped. If the chunk is bold, the `ansi-bold` class will be present.\n\n",
                "type": "Line -> Html x"
            }
        ],
        "binops": []
    },
    {
        "name": "Ansi",
        "comment": " This library primarily exposes the `parse` function and the types that it\nwill yield.\n\n@docs parse, parseInto\n\n@docs Action, Color, EraseMode\n",
        "unions": [
            {
                "name": "Action",
                "comment": " The events relevant to interpreting the stream.\n\n* `Print` is a chunk of text which should be interpreted with the style implied\n  by the preceding actions (i.e. `[SetBold True, Print \"foo\"]`) should yield a\n  bold `foo`\n* `Remainder` is a partial ANSI escape sequence, returned at the end of the\n  actions if it was cut off. The next string passed to `parse` should have this\n  prepended to it.\n* The rest are derived from their respective ANSI escape sequences.\n",
                "args": [],
                "cases": [
                    [
                        "Print",
                        [
                            "String"
                        ]
                    ],
                    [
                        "Remainder",
                        [
                            "String"
                        ]
                    ],
                    [
                        "SetForeground",
                        [
                            "Maybe Color"
                        ]
                    ],
                    [
                        "SetBackground",
                        [
                            "Maybe Color"
                        ]
                    ],
                    [
                        "SetBold",
                        [
                            "Bool"
                        ]
                    ],
                    [
                        "SetFaint",
                        [
                            "Bool"
                        ]
                    ],
                    [
                        "SetItalic",
                        [
                            "Bool"
                        ]
                    ],
                    [
                        "SetUnderline",
                        [
                            "Bool"
                        ]
                    ],
                    [
                        "SetBlink",
                        [
                            "Bool"
                        ]
                    ],
                    [
                        "SetInverted",
                        [
                            "Bool"
                        ]
                    ],
                    [
                        "SetFraktur",
                        [
                            "Bool"
                        ]
                    ],
                    [
                        "SetFramed",
                        [
                            "Bool"
                        ]
                    ],
                    [
                        "Linebreak",
                        []
                    ],
                    [
                        "CarriageReturn",
                        []
                    ],
                    [
                        "CursorUp",
                        [
                            "Int"
                        ]
                    ],
                    [
                        "CursorDown",
                        [
                            "Int"
                        ]
                    ],
                    [
                        "CursorForward",
                        [
                            "Int"
                        ]
                    ],
                    [
                        "CursorBack",
                        [
                            "Int"
                        ]
                    ],
                    [
                        "CursorPosition",
                        [
                            "Int",
                            "Int"
                        ]
                    ],
                    [
                        "CursorColumn",
                        [
                            "Int"
                        ]
                    ],
                    [
                        "EraseDisplay",
                        [
                            "EraseMode"
                        ]
                    ],
                    [
                        "EraseLine",
                        [
                            "EraseMode"
                        ]
                    ],
                    [
                        "SaveCursorPosition",
                        []
                    ],
                    [
                        "RestoreCursorPosition",
                        []
                    ]
                ]
            },
            {
                "name": "Color",
                "comment": " The colors applied to the foreground/background.\n",
                "args": [],
                "cases": [
                    [
                        "Black",
                        []
                    ],
                    [
                        "Red",
                        []
                    ],
                    [
                        "Green",
                        []
                    ],
                    [
                        "Yellow",
                        []
                    ],
                    [
                        "Blue",
                        []
                    ],
                    [
                        "Magenta",
                        []
                    ],
                    [
                        "Cyan",
                        []
                    ],
                    [
                        "White",
                        []
                    ],
                    [
                        "BrightBlack",
                        []
                    ],
                    [
                        "BrightRed",
                        []
                    ],
                    [
                        "BrightGreen",
                        []
                    ],
                    [
                        "BrightYellow",
                        []
                    ],
                    [
                        "BrightBlue",
                        []
                    ],
                    [
                        "BrightMagenta",
                        []
                    ],
                    [
                        "BrightCyan",
                        []
                    ],
                    [
                        "BrightWhite",
                        []
                    ]
                ]
            },
            {
                "name": "EraseMode",
                "comment": " Method to erase the display or line.\n",
                "args": [],
                "cases": [
                    [
                        "EraseToBeginning",
                        []
                    ],
                    [
                        "EraseToEnd",
                        []
                    ],
                    [
                        "EraseAll",
                        []
                    ]
                ]
            }
        ],
        "aliases": [],
        "values": [
            {
                "name": "parse",
                "comment": " Convert an arbitrary String of text into a sequence of actions.\n\nIf the input string ends with a partial ANSI escape sequence, it will be\nyielded as a `Remainder` action, which should then be prepended to the next\ncall to `parse`.\n",
                "type": "String -> List Action"
            },
            {
                "name": "parseInto",
                "comment": " Update a structure with actions parsed out of the given string.\n",
                "type": "a -> (Action -> a -> a) -> String -> a"
            }
        ],
        "binops": []
    }
]