[
    {
        "name": "Ansi.Log",
        "comment": "Log interprets a stream of text and ANSI escape codes.\n\n@docs init, update\n\n@docs Window, Line, Chunk, CursorPosition, Style",
        "unions": [],
        "aliases": [
            {
                "name": "Chunk",
                "comment": "A blob of text paired with the style that was configured at the time.",
                "args": [],
                "type": "{ text : String, style : Style }"
            },
            {
                "name": "CursorPosition",
                "comment": "The coordinate in the window where text will be printed.",
                "args": [],
                "type": "{ row : Int, column : Int }"
            },
            {
                "name": "Line",
                "comment": "A list of arbitrarily-sized chunks of output.",
                "args": [],
                "type": "List Chunk"
            },
            {
                "name": "Style",
                "comment": "The current presentation state for any text that's printed.",
                "args": [],
                "type": "{ foreground : Maybe Color, background : Maybe Color, bold : Bool, faint : Bool, italic : Bool, underline : Bool, inverted : Bool }"
            },
            {
                "name": "Window",
                "comment": "Window 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",
                "args": [],
                "type": "{ lines : Array Line, position : CursorPosition, style : Style, remainder : String }"
            }
        ],
        "values": [
            {
                "name": "init",
                "comment": "Construct an empty model.",
                "type": "Window"
            },
            {
                "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`.",
                "type": "String -> Window -> Window"
            }
        ],
        "binops": []
    },
    {
        "name": "Ansi",
        "comment": "This library primarily exposes the `parse` function and the types that it\nwill yield.\n\n@docs parse\n\n@docs Action, Color",
        "unions": [
            {
                "name": "Action",
                "comment": "The events relevant to interpreting the stream.\n\n* `SetForeground` corresponds to `\\e[3Xm` and `\\e[4Xm` where X is the color\n* `SetBackground` corresponds to `\\e[9Xm` and `\\e[10Xm` where X is the color\n* `SetBold` corresponds to `\\e[1m`\n* `SetFaint` corresponds to `\\e[2m`\n* `SetItalic` corresponds to `\\e[3m`\n* `SetUnderline` corresponds to `\\e[4m`\n* `SetInverted` corresponds to `\\e[7m`\n* `Linebreak` corresponds to a `\\n` character\n* `CarriageReturn` corresponds to a `\\r` character\n* `Print` is a chunk of text which should be interpreted with the style implied\n  by the preceding actions (i.e. `[Bold True, Print \"foo\"]`) should yield a bold\n  `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.",
                "args": [],
                "cases": [
                    [
                        "SetForeground",
                        [
                            "Maybe Color"
                        ]
                    ],
                    [
                        "SetBackground",
                        [
                            "Maybe Color"
                        ]
                    ],
                    [
                        "SetBold",
                        [
                            "Bool"
                        ]
                    ],
                    [
                        "SetFaint",
                        [
                            "Bool"
                        ]
                    ],
                    [
                        "SetItalic",
                        [
                            "Bool"
                        ]
                    ],
                    [
                        "SetUnderline",
                        [
                            "Bool"
                        ]
                    ],
                    [
                        "SetInverted",
                        [
                            "Bool"
                        ]
                    ],
                    [
                        "Linebreak",
                        []
                    ],
                    [
                        "CarriageReturn",
                        []
                    ],
                    [
                        "Print",
                        [
                            "String"
                        ]
                    ],
                    [
                        "Remainder",
                        [
                            "String"
                        ]
                    ]
                ]
            },
            {
                "name": "Color",
                "comment": "The colors applied to the foreground/background.",
                "args": [],
                "cases": [
                    [
                        "Black",
                        []
                    ],
                    [
                        "Red",
                        []
                    ],
                    [
                        "Green",
                        []
                    ],
                    [
                        "Yellow",
                        []
                    ],
                    [
                        "Blue",
                        []
                    ],
                    [
                        "Magenta",
                        []
                    ],
                    [
                        "Cyan",
                        []
                    ],
                    [
                        "White",
                        []
                    ],
                    [
                        "BrightBlack",
                        []
                    ],
                    [
                        "BrightRed",
                        []
                    ],
                    [
                        "BrightGreen",
                        []
                    ],
                    [
                        "BrightYellow",
                        []
                    ],
                    [
                        "BrightBlue",
                        []
                    ],
                    [
                        "BrightMagenta",
                        []
                    ],
                    [
                        "BrightCyan",
                        []
                    ],
                    [
                        "BrightWhite",
                        []
                    ]
                ]
            }
        ],
        "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`.",
                "type": "String -> List Action"
            }
        ],
        "binops": []
    }
]