/** * A notification fitted to the terminal before pi draws it: paths tidied, and * each line cut where a reader would cut it, never in the middle of a path. * * pi wraps a line too long for the terminal wherever the room runs out, and a * path is one long word: `/run resume` of a directory with no run in it put * `snapshot.json` on two lines. So every line is cut here first, after a * whole fact or at a space, going on under its own text, with the room pi * takes for itself counted: one column each side, and the `Error: ` or * `Warning: ` it writes before the first line. */ import type { Ui } from "./pi.ts"; /** * A line of a notification, the column its text goes on at when the terminal * is narrower than the line, and whether it is about a refused file. */ export type Row = { readonly text: string; readonly hang: number; readonly refused?: boolean; }; /** How a notification is drawn: pi's own levels. */ export type Level = NonNullable[1]>; /** * `rows` as the lines of a notification at `level`, `width` columns wide, * paths tidied, each row going on under its `hang`. */ export declare function notified(rows: readonly Row[], cwd: string, width?: number, level?: Level): string[]; /** * `message`, a line or several, fitted as a notification at `level`: each * line goes on two columns in from where its own text starts. */ export declare function fitted(message: string, cwd: string, level: Level, width?: number): string; //# sourceMappingURL=notice.d.ts.map