import { type Component, type Terminal, type TUI, TuiAltScreen, TuiMainScreen, type WheelScrollLines } from "@earendil-works/pi-tui"; export type InteractiveTui = TuiMainScreen | TuiAltScreen; export declare function isOverlayMounted(tui: TUI, component: Component): boolean; export declare function getFocusedOverlay(tui: InteractiveTui): Component | undefined; export declare function handleFocusedOverlayInternalUiAction(tui: InteractiveTui, url: string): InternalUiActionResult; export type InternalUiActionResult = boolean | undefined | Promise; export interface InteractiveTuiOptions { showHardwareCursor: boolean; logDirectory: string; terminal?: Terminal; copyOnSelect?: boolean; wheelScrollLines?: WheelScrollLines; onRightClickPaste?: () => void; onOverlayInternalUiAction?: (url: string) => InternalUiActionResult; onInternalUiAction?: (url: string) => InternalUiActionResult; /** * Return false to let a focused overlay receive viewport input first. * Mouse input is deferred only while the focused component belongs to an * overlay; non-overlay focus keeps pi-tui's transcript selection path. */ shouldHandleViewportInput?: (data: string, isMouseInput: boolean, focusedIsOverlay: boolean, _focusedIsViewportSearch: boolean) => boolean; /** Handle an unconsumed overlay input before replaying it to the viewport. */ onOverlayUnhandledInput?: (data: string) => boolean; /** * Copy selected text; return true on success, false or a diagnostic on failure. * Defaults to Atomic's clipboard implementation and platform diagnostics. */ copySelection?: (text: string) => Promise; } export interface UrlActivationHandlers { onOverlayInternalUiAction?: (url: string) => InternalUiActionResult; onInternalUiAction?: (url: string) => InternalUiActionResult; openUrl: (url: string) => void; } /** Route OSC 8 activation without allowing unknown internal URLs to escape to a browser. */ export declare function handleUrlActivation(url: string, handlers: UrlActivationHandlers): void; /** Whether every report in a mouse chunk is a vertical wheel event. */ export declare function isMouseWheelInput(data: string): boolean; /** * Build Atomic's fullscreen renderer, `viewportInputGate` included, without * consulting the environment. `createInteractiveTui` calls this whenever * fullscreen applies; fixtures that assert fullscreen behavior call it * directly, because `shouldUseFullscreenTui` returns the main-screen fallback * under `TERM=dumb` even for an injected terminal and would otherwise hand * those tests a renderer with no layout and no gate. */ export declare function createFullscreenTui(options: InteractiveTuiOptions): TuiAltScreen; /** Creates the fullscreen renderer for interactive TTY sessions. */ export declare function createInteractiveTui(options: InteractiveTuiOptions): InteractiveTui; /** Keeps existing components pointed at the renderer selected at runtime. */ export declare function createInteractiveTuiReference(getTui: () => TUI): TUI; //# sourceMappingURL=interactive-tui.d.ts.map