import type { InkTheme } from "../render/ink-theme.js"; import { type PanelFrameInput } from "./panel-frame.js"; import { type PanelKeyResult } from "./panel-effect.js"; export type PagerFormat = "formatted" | "raw"; export type PagerMarkdownMode = "auto" | "force" | "plain"; export interface PagerPanelState { readonly caret: number; readonly top: number; readonly format: PagerFormat; readonly follow: boolean; readonly finding: boolean; readonly draft: string; readonly query: string; readonly matchIndex: number; } export declare const PAGER_INITIAL_STATE: PagerPanelState; export declare function resolvePagerMarkdownMode(body: string, requested: PagerMarkdownMode | undefined): "force" | "plain"; /** * Prepare pager rows for the exact body width. Number gutters consume two * columns plus their digit width, so wrapping is iterated until the gutter * width and resulting line count agree. */ export declare function pagerLines(body: string, columns: number, rows?: number, format?: PagerFormat): readonly string[]; export interface PagerViewModel { readonly lines: readonly string[]; readonly searchLines: readonly string[]; } export declare function pagerViewModel(body: string, columns: number, rows?: number, format?: PagerFormat): PagerViewModel; export interface PagerKeyInput { readonly state: PagerPanelState; readonly chord: string; readonly text?: string | undefined; readonly lines: readonly string[]; readonly searchLines?: readonly string[] | undefined; readonly rows: number; readonly live: boolean; readonly body: string; } export declare function pagerKey(input: PagerKeyInput): PanelKeyResult; export interface PagerViewInput { readonly ink: InkTheme; readonly columns: number; readonly rows: number; readonly title: string; readonly lines: readonly string[]; readonly searchLines?: readonly string[] | undefined; readonly state: PagerPanelState; readonly live?: boolean | undefined; } export declare function pagerView(input: PagerViewInput): PanelFrameInput;