UNPKG

@workflow-manager/runner

Version:

CLI runner for in-memory and markdown workflow orchestration using ATEP-like envelopes

24 lines (23 loc) 1.32 kB
export declare const ALT_SCREEN_ENTER = "\u001B[?1049h"; export declare const ALT_SCREEN_LEAVE = "\u001B[?1049l"; export declare const CURSOR_HIDE = "\u001B[?25l"; export declare const CURSOR_SHOW = "\u001B[?25h"; export declare const CURSOR_HOME = "\u001B[H"; export declare const CLEAR_SCREEN = "\u001B[2J"; export declare const CLEAR_LINE_END = "\u001B[K"; export declare function stripAnsi(text: string): string; /** ANSI-aware column count (per code unit; see module comment). */ export declare function visibleWidth(text: string): number; /** * Truncates `text` to at most `width` visible columns, appending `ellipsis` * when truncation happens. ANSI escape sequences are copied through intact * (never split) and do not count toward the width. If any escape sequence * was emitted before the cut, a style reset is appended so styling does not * bleed past the truncated text. * * Invariant: visibleWidth(result) <= width. When `width` is smaller than the * ellipsis itself, a slice of the ellipsis is returned to keep the invariant. */ export declare function truncateVisible(text: string, width: number, ellipsis?: string): string; /** Right-pads `text` with spaces up to `width` visible columns (no-op when already wider). */ export declare function padVisible(text: string, width: number): string;