• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1interface UIOptions {
2    width: number;
3    wrap?: boolean;
4    rows?: string[];
5}
6interface Column {
7    text: string;
8    width?: number;
9    align?: "right" | "left" | "center";
10    padding: number[];
11    border?: boolean;
12}
13interface ColumnArray extends Array<Column> {
14    span: boolean;
15}
16interface Line {
17    hidden?: boolean;
18    text: string;
19    span?: boolean;
20}
21declare class UI {
22    width: number;
23    wrap: boolean;
24    rows: ColumnArray[];
25    constructor(opts: UIOptions);
26    span(...args: ColumnArray): void;
27    resetOutput(): void;
28    div(...args: (Column | string)[]): ColumnArray;
29    private shouldApplyLayoutDSL;
30    private applyLayoutDSL;
31    private colFromString;
32    private measurePadding;
33    toString(): string;
34    rowToString(row: ColumnArray, lines: Line[]): Line[];
35    // if the full 'source' can render in
36    // the target line, do so.
37    private renderInline;
38    private rasterize;
39    private negatePadding;
40    private columnWidths;
41}
42declare function ui(opts: UIOptions): UI;
43export { ui as default };
44