import type { VerificationState } from './manifest.ts'; /** The marks, as a person sees them. */ export declare const MARKS: { readonly bundle: '🌳'; readonly signature: '🔐'; readonly attestation: '✍️'; }; export type Mark = keyof typeof MARKS; export interface Style { /** Is anyone looking? False is a pipe, a file, or a test: plain text, exactly. */ readonly people: boolean; /** `text` marked as being about a bundle, a signature or an attestation. */ bundle(text: string): string; signature(text: string): string; attestation(text: string): string; mark(mark: Mark | undefined, text: string): string; bold(text: string): string; dim(text: string): string; green(text: string): string; yellow(text: string): string; red(text: string): string; cyan(text: string): string; /** A step, or a fact on the way: `* text` plainly, the mark or a `›` for people. */ note(text: string, mark?: Mark | undefined): string; /** Something worth a second look: `! text`. */ warn(text: string): string; /** The command failed: `error: text`. */ error(text: string): string; /** A verification state, as `STATES` labels it, in the colour it deserves. */ state(state: VerificationState, label: string): string; /** * A line some other module wrote for the log — `* fetching …`, `! …`, * ` identity: …` — with its leading marker made into the one people see. * The words are left alone: they are the other module's. */ line(text: string): string; } /** The style of a pipe: plain text, byte for byte. */ export declare const PLAIN: Style; /** What decides a stream's style: whether it is a terminal, and what that terminal can show. */ export interface Terminal { isTTY?: boolean | undefined; hasColors?: ((env?: NodeJS.ProcessEnv) => boolean) | undefined; } /** * The style for one stream. A terminal gets people's formatting; anything * else gets `PLAIN`. Colour follows the terminal's own answer, which is where * `NO_COLOR`, `FORCE_COLOR` and `TERM=dumb` are honoured. Emoji follow the * terminal too: a Windows console that predates Windows Terminal draws them as * boxes, so there the marks are left out unless something says it is newer. */ export declare function styleFor(stream: Terminal, env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): Style; /** People's formatting — exported so tests, and anyone embedding the CLI, can ask for it. */ export declare function fancy({ color, emoji }?: { color?: boolean; emoji?: boolean; }): Style; /** A size as a person reads it: `4.2 MB`. */ export declare function bytes(size: number): string; /** `count` things, with the noun agreeing: `1 member`, `3 members`. */ export declare function plural(count: number, noun: string, many?: string): string; /** * Text someone else wrote, made safe to print on one line: control * characters (escape sequences that could rewrite the terminal, line breaks * that could pass for output of this tool's own) and the marks that reorder * text right to left are dropped, and runs of whitespace become one space. * An attestation's note is anyone's words, and is shown as such. */ export declare function untrusted(text: string): string; //# sourceMappingURL=style.d.ts.map