[
    {
        "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\n",
        "unions": [],
        "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"
            },
            {
                "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, 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\n",
                "args": [],
                "type": "{ lines : Array Line, position : CursorPosition, savedPosition : Maybe CursorPosition, style : Style, remainder : String }"
            }
        ],
        "values": [
            {
                "name": "init",
                "comment": " Construct an empty model.\n",
                "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`.\n",
                "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, 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"
                        ]
                    ],
                    [
                        "SetInverted",
                        [
                            "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": []
    }
]