UNPKG

polyv-live-cli

Version:

CLI tool for managing PolyV live streaming services.

54 lines 1.35 kB
import { EventEmitter } from 'events'; export interface ContextMenuItem { label: string; action: string; enabled?: boolean; shortcut?: string; submenu?: ContextMenuItem[]; separator?: boolean; icon?: string; } export interface ContextMenuConfig { items: ContextMenuItem[]; x: number; y: number; context?: string; componentId?: string | undefined; autoHide?: boolean; style?: { fg?: string; bg?: string; selectedFg?: string; selectedBg?: string; border?: { fg?: string; bg?: string; }; }; } export declare class ContextMenu { private screen; private eventBus; private menuBox; private isVisible; private selectedIndex; private menuItems; private currentConfig?; constructor(screen: any, eventBus: EventEmitter); show(config: ContextMenuConfig): void; hide(): void; navigateUp(): void; navigateDown(): void; selectItem(): void; isContextMenuVisible(): boolean; getSelectedIndex(): number; private createMenuBox; private setupMenuEvents; private generateMenuContent; private updateMenuDisplay; private calculateMenuWidth; private calculatePosition; private executeAction; destroy(): void; } //# sourceMappingURL=context-menu.d.ts.map