import type React from 'react'; import { type MouseEventInfo } from '../mouse.js'; import type { AnimationStyle } from './animation-style.js'; import { type ComposerStatus } from './composer-status-chip.js'; export declare const DEFAULT_INPUT_PROMPT: string; /** Columns available to input tokens inside the two-sided composer rail. */ export declare function inputContentWidth(termColumns: number): number; export interface InputProps { prompt?: string | undefined; value: string; cursor: number; disabled?: boolean | undefined; hint?: string | undefined; /** Label embedded in the composer's top rail. */ title?: string | undefined; /** * Right-aligned live status descriptor for the composer's top rail. Renders * as an animated {@link ComposerStatusChip} (the thinking word while working, * flat `idle`/`CONFIRM`/… otherwise). Defaults to idle when omitted. */ status?: ComposerStatus | undefined; /** Animation style for the working-state chip (`'cycle'` rotates variants). */ animationStyle?: AnimationStyle | 'cycle' | undefined; /** * Working time in ms — total time the agent has been actively running/streaming. * Displayed on the composer top rail as a dimmed time chip after the version. * Only visible when > 0; ticks up only while the agent is working. */ workingTime?: number | undefined; /** Stable bottom-rail help; a non-empty `hint` temporarily replaces it. */ footerHint?: string | undefined; /** * When true the visible prompt rows are replaced by an empty placeholder of * `placeholderHeight` rows, but BOTH keyboard listeners (the Ink `useInput` * and the raw-stdin parser that produces F-keys / Home / End / wheel) stay * mounted. This is what keeps the central `handleKey` router — and therefore * the F-key/Esc toggles that open and CLOSE the monitor overlays — alive * while an overlay occupies the bottom region. Unmounting the Input here is * what previously left overlays (e.g. the F3 agents monitor) un-closable. */ hidden?: boolean | undefined; /** Row count for the hidden placeholder so the bottom region never resizes. */ placeholderHeight?: number | undefined; onKey: (input: string, key: KeyEvent) => void; /** * Optional cap on the column width used for wrapping and frame sizing. * When set, the input area treats this as its effective terminal width * instead of `stdout.columns` — needed when the input sits in a column * narrower than the full terminal (e.g. beside a sidebar). */ maxWidth?: number | undefined; } export interface KeyEvent { upArrow: boolean; downArrow: boolean; leftArrow: boolean; rightArrow: boolean; return: boolean; escape: boolean; ctrl: boolean; meta: boolean; shift: boolean; tab: boolean; backspace: boolean; delete: boolean; pageUp: boolean; pageDown: boolean; home: boolean; end: boolean; /** Mouse wheel scroll: positive = up (away from user), negative = down. */ wheelDeltaY?: number | undefined; /** * Full mouse report (click/release/drag/hover/wheel) when terminal mouse * tracking is enabled. `wheelDeltaY` above is the back-compat shorthand for * `mouse.wheel`; consumers wanting clicks/coords should read `mouse`. */ mouse?: MouseEventInfo | undefined; /** Function-key number 1–12 when a plain F-key was pressed, else undefined. * Ink's useInput does not decode F-keys, so these are caught from raw stdin * (same mechanism as Home/End) and surfaced here. F-keys are terminal-safe * aliases for chords some terminals intercept (e.g. Windows Terminal eats * Ctrl+F for "Find"). */ fn?: number | undefined; } export declare const EMPTY_KEY: KeyEvent; export declare const Input: React.MemoExoticComponent<({ prompt, value, cursor, disabled, hint, title, status, animationStyle, workingTime, footerHint, hidden, placeholderHeight, onKey, maxWidth, }: InputProps) => React.ReactElement>; //# sourceMappingURL=input.d.ts.map