@principal-ade/industry-themed-terminal
Version:
Industry-themed terminal wrapper with integrated theming for xterm.js
71 lines • 2.29 kB
TypeScript
import type { ISearchOptions } from '@xterm/addon-search';
import type { Terminal } from '@xterm/xterm';
export interface TerminalOverlayState {
message: string;
subtitle?: string;
actions?: Array<{
label: string;
onClick: () => void;
primary?: boolean;
icon?: React.ReactNode;
}>;
opacity?: number;
}
export interface TerminalHeaderBadge {
label: string;
color?: string;
}
export interface TerminalScrollPosition {
isAtTop: boolean;
isAtBottom: boolean;
isScrollLocked: boolean;
}
export interface ThemedTerminalProps {
onData?: (data: string) => void;
onResize?: (cols: number, rows: number) => void;
onReady?: (cols: number, rows: number) => void;
onLinkClick?: (url: string, isLocalhost: boolean) => void;
onScrollPositionChange?: (position: TerminalScrollPosition) => void;
className?: string;
hideHeader?: boolean;
headerTitle?: string;
headerSubtitle?: string;
headerBadge?: TerminalHeaderBadge;
autoFocus?: boolean;
isVisible?: boolean;
scrollbarStyle?: 'overlay' | 'thin' | 'hidden' | 'auto-hide';
onClose?: () => void;
onDestroy?: () => void;
onPopOut?: () => void;
overlayState?: TerminalOverlayState;
convertEol?: boolean;
cursorBlink?: boolean;
cursorStyle?: 'block' | 'underline' | 'bar';
scrollback?: number;
fontFamily?: string;
fontSize?: number;
enableWebGL?: boolean;
enableUnicode11?: boolean;
enableSearch?: boolean;
enableWebLinks?: boolean;
}
export interface ThemedTerminalRef {
write: (data: string | Uint8Array) => void;
writeln: (data: string) => void;
scrollToBottom: () => void;
focus: () => void;
blur: () => void;
clear: () => void;
reset: () => void;
getTerminal: () => Terminal | null;
fit: () => void;
resize: (cols: number, rows: number) => void;
selectAll: () => void;
clearSelection: () => void;
findNext: (searchTerm: string, searchOptions?: ISearchOptions) => boolean;
findPrevious: (searchTerm: string, searchOptions?: ISearchOptions) => boolean;
clearSearch: () => void;
isScrollLocked: () => boolean;
getScrollPosition: () => TerminalScrollPosition;
}
//# sourceMappingURL=terminal.types.d.ts.map