/** * xterm.js wrapper component. * * Encapsulates xterm.js initialization, addon loading, * and cleanup following React best practices with proper * ref management and effect hooks. * * @module components/devenv/terminal/xterm */ import { Terminal } from '@xterm/xterm'; import type { ITerminalOptions, ITerminalTheme } from './Terminal.types'; import '@xterm/xterm/css/xterm.css'; /** * Props for the XTermWrapper component. */ export interface IXTermWrapperProps { /** Terminal initialization options */ options: ITerminalOptions; /** Terminal theme (defaults to Synthwave if not provided) */ theme?: ITerminalTheme; /** Callback when user types data in interactive mode */ onData?: (data: string) => void; /** Callback when terminal is ready for interaction */ onReady?: (terminal: Terminal) => void; /** Callback when terminal resizes */ onResize?: (cols: number, rows: number) => void; /** Custom class name for the container */ className?: string; } /** * xterm.js wrapper component. * * Manages xterm.js lifecycle including initialization, addon loading, * WebSocket/SSE connections, and cleanup. Provides auto-resize via * FitAddon and clickable URLs via WebLinksAddon. * * @example * ```tsx * console.log('User input:', data)} * onReady={(terminal) => console.log('Terminal ready')} * /> * ``` */ export declare function XTermWrapper({ options, theme, onData, onReady, onResize, className, }: IXTermWrapperProps): import("react/jsx-runtime").JSX.Element; /** * Export search addon reference for external access. * * Allows parent components to trigger search in the terminal buffer. */ export declare function useTerminalSearch(terminalRef: React.RefObject): { search: (_term: string, _options?: { caseSensitive?: boolean; regex?: boolean; }) => false; }; //# sourceMappingURL=TerminalXterm.d.ts.map