import type { Tab, Tree, VisibleRow, SortMode } from './model.js'; import { detectColorCaps, type ColorCaps } from '../../tui/draw.js'; export { detectColorCaps }; export type { ColorCaps }; export declare const PROMPT_LINES = 3; export declare const REPLY_LINES = 3; export declare const PREVIEW_BODY: number; export declare const PREVIEW_HEIGHT: number; export declare function headerHeight(inputLine: boolean): number; export interface RenderState { tree: Tree; visible: VisibleRow[]; tab: Tab; cursor: number; scrollOffset: number; query: string; search: boolean; totalNodes: number; /** Active cwd-scope filter; null = All dirs. Shown on the status line. */ cwdScope: string | null; /** Active profile-scope filter; undefined = All profiles. Shown on the status line. */ profileScope: string | undefined; /** Active ordering — status line + (flat modes) row presentation. */ sort: SortMode; /** Whether the bottom preview panel is drawn. */ preview: boolean; /** Lifecycle filter: when true, `terminal` (one-shot worker) nodes are hidden * — surfaced as a status-line cue. */ residentsOnly: boolean; /** User-starred node ids — drives the ★ row marker + the Pinned tab. */ pinned: Set; /** Inline rename input: when true, the header shows a rename prompt bound to * `renameBuf` and the footer becomes commit/cancel. */ rename?: boolean; renameBuf?: string; /** Inline message input: when true, the header shows a message prompt bound to * `messageBuf` (delivered via `crtr node message send`). */ message?: boolean; messageBuf?: string; /** When true, the whole body is replaced by the keybinding help overlay. */ help?: boolean; /** When set, a close-out (`x`) is awaiting y/n confirmation because the node (or * a descendant) is actively streaming. Holds the node id being confirmed; the * footer becomes the y/n prompt. null/undefined = no pending confirm. */ pendingClose?: string | null; /** Set when the source is a remote canvas: mutation/focus keys (`x`/`K`/Enter) * are disabled, so the footer drops their hints instead of advertising a * dead action. undefined/false = local, byte-identical footer. */ readOnly?: boolean; } /** * Render the whole frame. Returns a single string that, written as-is, repaints * the screen in place. `caps` gates all hue (defaults to a no-color frame so * existing callers / non-TTY paths stay color-free). */ export declare function renderFrame(state: RenderState, size: { cols: number; rows: number; }, caps?: ColorCaps): string;