/** * Focus + overlay ownership (V2-033, groundwork for V2-076). * * Single owner for where keyboard input is routed. The base focus is one of * the visible regions; a blocking overlay (picker/modal/secret/search) takes * precedence while open. Only one blocking overlay may be active at a time so * nested actions cannot stack; opening a second is rejected rather than * silently shadowing the first. */ import type { ActionContext } from "../actions/action-id.js"; export type FocusRegion = "composer" | "transcript" | "plan"; export type OverlayContext = "picker" | "modal" | "secret" | "transcript-search" | "pager" | "jobs"; export declare class FocusController { private readonly regionOrder; private currentRegion; private overlay; private captured; private readonly listeners; constructor(initialRegion?: FocusRegion, regionOrder?: readonly FocusRegion[]); activeContext(): ActionContext; region(): FocusRegion; hasOverlay(): boolean; get inputCaptured(): boolean; setInputCaptured(captured: boolean): void; focusRegion(region: FocusRegion): void; /** Move focus to the next visible region, skipping overlays. */ cycleRegion(visible?: readonly FocusRegion[]): FocusRegion; /** Open a blocking overlay; returns a disposer that closes it. */ pushOverlay(context: OverlayContext): () => void; popOverlay(): void; onChange(listener: (context: ActionContext) => void): () => void; private notify; }