import { View, Size } from '@teaui/core'; import type { Viewport, Screen } from '@teaui/core'; import type { KeyEvent, MouseEvent } from '@teaui/core'; export interface SubprocessProps { command: string; args?: string[]; env?: Record; cwd?: string; onData?: (data: string) => void; onExit?: (exitCode: number, signal?: number) => void; onFocus?: () => void; onBlur?: () => void; width?: number | 'fill' | 'shrink' | 'natural'; height?: number | 'fill' | 'shrink' | 'natural'; } type SubprocessState = { kind: 'idle'; } | { kind: 'starting'; } | { kind: 'running'; } | { kind: 'exited'; exitCode: number; signal?: number; } | { kind: 'error'; message: string; }; export declare class Subprocess extends View { #private; constructor(props: SubprocessProps); get processState(): SubprocessState['kind']; get exitCode(): number | null; didMount(screen: Screen): void; didUnmount(screen: Screen): void; naturalSize(available: Size): Size; render(viewport: Viewport): void; didFocus(): void; didBlur(): void; receiveKey(event: KeyEvent): void; receiveMouse(event: MouseEvent, system: any): void; } export {};