import { type TuiPane, type TuiSurface } from "../surfaces/surface-schema.js"; export type Rgb = { r: number; g: number; b: number; }; export interface ZenPainter { cell(x: number, y: number, ch: string, fg: Rgb, bg: Rgb | null, o?: { bold?: boolean; dim?: boolean; underline?: boolean; }): void; } export interface ZenSurfaceRegion { y: number; x1: number; x2: number; /** Action index to fire, or -1 for a plain clickable text row. */ actionIndex: number; /** Plain text of the row (for click-anything fallback). */ text: string; /** Pre-loaded drill-down key (surface.details) — opens instantly on click. */ detailKey?: string; /** Overflow expansion: open this full content in the detail panel. */ expand?: { title: string; body: string; }; } /** Where a pane landed on screen + its scroll window — hosts hit-test wheel * events against these and feed offsets back via opts.scroll. */ export interface ZenPaneRect { id: string; x1: number; y1: number; x2: number; y2: number; /** Total content lines vs lines visible; offset = lines scrolled. */ total: number; visible: number; offset: number; /** "bottom" panes (logs) anchor to the tail — wheel-up increases offset. */ anchor: "top" | "bottom"; } export interface ZenSurfaceResult { height: number; width: number; x: number; regions: ZenSurfaceRegion[]; panes: ZenPaneRect[]; } export declare const WHITE: Rgb; export declare const BRIGHT: Rgb; export declare const DIMTXT: Rgb; export declare const GOOD: Rgb; export declare const ROSE: Rgb; export declare const AMBER: Rgb; export declare const scale: (c: Rgb, f: number) => Rgb; export declare const mix: (a: Rgb, b: Rgb, t: number) => Rgb; export declare function fillRowBg(p: ZenPainter, x: number, y: number, w: number, bg: Rgb): void; export declare function text(p: ZenPainter, x: number, y: number, s: string, fg: Rgb, bg: Rgb | null, o?: { bold?: boolean; dim?: boolean; underline?: boolean; clipAt?: number; }): number; interface Span { t: string; bold?: boolean; code?: boolean; hl?: boolean; } export declare function parseSpans(raw: string): Span[]; /** Marker-stripped text — what the row "says" (widths, clicks, matches). */ export declare function plainOf(raw: string): string; export declare function drawSpans(p: ZenPainter, x: number, y: number, raw: string, base: { fg: Rgb; bg: Rgb; bold?: boolean; underline?: boolean; }, hue: Rgb, clipAt?: number): number; export declare const SPINNER: string[]; /** Layout row: 1 pane full-width, or 2-3 panes side by side. */ export declare function groupPanes(panes: TuiPane[], W: number): TuiPane[][]; export declare function drawZenSurface(basePainter: ZenPainter, surface: TuiSurface, opts: { x?: number; y: number; maxW: number; maxH: number; screenW: number; pointer: { x: number; y: number; }; pressedIndex?: number | null; /** Frame clock (ms) — drives pulses, spinners, glints. */ now?: number; /** When the surface mounted — drives the entrance fade. */ mountT0?: number; /** Per-pane scroll offsets (pane.id → content lines scrolled). */ scroll?: Record; /** * "bare" strips the card chrome — no background block, title band, accent * edge, drop shadow, or row washes. Only the glyphs render (icons, rail * nodes, labels, hairlines) with all their colors and motion intact, so * the activity reads as living text on the stage instead of a boxed UI. * Every chrome element is painted as space-cells-with-bg, so dropping * spaces and background colors removes exactly the box and nothing else. * Meant for text-shaped panes (activity/checklist/diff/log) — bg-drawn * marks like progress/gauge bars would vanish in this mode. */ chrome?: "card" | "bare"; }): ZenSurfaceResult; export {};