/** * FieldRenderer — generic Ink component that renders one schema-driven field. * * Stateless except for an ephemeral edit buffer used while editing text-like * inputs (text/number/path). Edit-mode is parent-controlled via the `editing` * prop; ALL persistent value state lives in the parent's settings-store. * * Field kinds handled: * - select — left/right arrows cycle options; wraps at ends * - multiselect — list of checkboxes; space toggles focused option, enter * commits buffer via onChange(string[]) + onEditDone, esc * cancels. Options come pre-computed by the parent — each * may carry a `hint` (e.g. 'installed') that renders dimmed. * - toggle — enter flips boolean * - text — typed input; enter commits, esc cancels * - number — typed input; enter commits if in [min,max]; esc cancels * - path — same as text, with display-only ~/ for homedir prefix * - readonly — never focusable, never fires onChange * - masked — secret display (`****`); `r` replace / `x` remove; * edit mode buffer never round-trips through props (typed * value flows out via onChange on enter). */ import React from 'react'; import type { FieldDef } from '../schema/types.js'; export interface FieldRendererProps { field: FieldDef; value: unknown; current?: unknown; focused: boolean; editing: boolean; onChange: (next: unknown) => void; onEditStart: () => void; onEditDone: () => void; onEditCancel: () => void; /** * When non-null, the field shows a transient ✓ for SAVED_CHECK_TTL ms. * Parent sets this to Date.now() on each successful save; null clears it. * Ignored when reducedMotion() returns true. */ savedAt?: number | null; } export declare function FieldRenderer(props: FieldRendererProps): React.ReactElement; //# sourceMappingURL=FieldRenderer.d.ts.map