import { OutputStream } from './stream'; /** * User interface layer for command line outputs. */ export declare namespace UI { enum TAB { ZERO = 0, ONE = 1, TWO = 2, THREE = 3, FOUR = 4 } type IOutputBody = string | string[]; type IOutputGrid = (string | number)[][]; class Writer extends OutputStream { /** ivar reference to chalk as 'color' */ color: import("chalk").Chalk & { supportsColor: import("chalk").ColorSupport; }; /** * output a block of text * @param body paragraph text * @param tab indentation */ paragraph(body: IOutputBody, tab?: TAB): Writer; /** * Print a section to the ui with heading. * @param heading section heading * @param body section text */ outputSection(heading: string, body: IOutputBody): Writer; /** * Print a multiline message with specified indentation * @param body message to print * @param tabs indentation tabs (1 tab = 2 spaces) * @param trim whether or not to trim each line's content */ outputLines(body: IOutputBody, tabs?: TAB, trim?: boolean): Writer; /** * Output an aligned grid of the text matrix * @param table matrix of rows/cols * @param spacing spacing between items * @param indent grid indentation */ outputGrid(table: IOutputGrid, spacing?: TAB, indent?: TAB): Writer; /** * Create an aligned grid of the text matrix. Very basic for the time-being * @param table matrix of rows/cols * @param spacing spacing between items */ grid(table: IOutputGrid, spacing?: TAB): string; /** * determine col widths from a rows/colums in a table * @param table a table structure with columns */ private _colWidths; /** * get indent by tabs * @param tabs */ private _indent; /** * format text with same indent for each line */ private _indentLines; /** * Lineify text */ private _lines; } function cleanText(text: string): string; }