import { AcEdPromptKeywordOptions } from '../prompt'; import { AcEdMessageType } from './AcEdMessageType'; /** * AutoCAD-style floating command line with Promise-based execution. * * Features: * - Floating command bar with left terminal glyph + down toggle and right up toggle * - Command history popup * - Message panel above the bar * - Enter repeats last command if input empty * - Esc cancels current command * - Inline clickable options * - Keyboard navigation * - Promise-based execution for async command handling * - Auto-complete popup for matching commands */ export declare class AcEdCommandLine { private container; private history; private historyIndex; private lastExecuted; private isCmdPopupOpen; private isMsgPanelOpen; private minWidth; private widthRatio; private cliContainer; private wrapper; private recentPanel; private bar; private leftGroup; private closeBtn; private downBtn; private centerEl; private promptEl; private textInput; private upBtn; private cmdPopup; private msgPanel; private autoCompleteIndex; private activeSession?; private resizeObserver?; private isPromptActive; private readonly recentMessages; private recentHideTimer?; private isCommandLifecycleBound; constructor(container?: HTMLElement); /** Visibility of the command line */ get visible(): boolean; set visible(val: boolean); setPrompt(message?: string): void; clear(): void; clearPrompt(): void; clearInput(): void; focusInput(): void; setInputReadOnly(readOnly: boolean): void; /** * Displays a message in the command line history panel. * * @param message - Text to append to the command line message panel * @param type - Message severity controlling the rendered style * @param msgKey - Optional localization key stored with the rendered entry */ showMessage(message: string, type?: AcEdMessageType, msgKey?: string): void; cancelActiveSession(): void; getKeywords(options: AcEdPromptKeywordOptions, allowTyping?: boolean): Promise; /** * Localize a text key using AcApI18n.t(). * * This helper centralizes localization calls for the class and makes * it easier to adjust localization behavior in one place if needed. * * @param key - Localization key (flat key style, e.g. "command.placeholder") * @param defaultText - Default English (or fallback) text to use if the key is missing * @returns localized string from AcApI18n or the provided defaultText */ private localize; /** Refresh all messages when locale changes */ private refreshLocale; /** * Execute a command line string. * Returns a Promise that resolves when the command is completed. * @param cmdLine - Command string * @returns Promise */ executeCommand(cmdLine: string): void; /** Inject CSS styles */ private injectCSS; /** Create the command line UI elements */ private createUI; /** Bind event listeners */ private bindEvents; /** Handle Enter/Escape keys */ private handleKeyDown; /** Handle input change to show auto-complete */ private handleInputChange; /** Navigate auto-complete list with arrow keys */ private navigateAutoComplete; /** Navigate command history */ private navigateHistory; /** Get current input text */ private getInputText; /** Set input text */ private setInputText; /** Render prompt message and keyword options in command line */ renderKeywordPrompt(options: AcEdPromptKeywordOptions, onClick: (kw: string) => void): void; /** Bind command lifecycle for auto-hide behavior of recent messages. */ private bindCommandLifecycleEvents; /** Resolve command name */ private resolveCommand; /** Show or hide popups */ private updatePopups; /** Show command history popup */ private showCommandHistoryPopup; /** Position command history popup */ private positionCmdPopup; /** Show message panel */ private showMessagePanel; /** Position message panel */ private positionMsgPanel; /** Remove "no history" placeholder if present */ private clearNoHistoryPlaceholder; /** Appends a typed message to the message panel. */ private appendMessage; /** Print executed command line to history */ private printHistoryLine; /** Handle window resize */ private resizeHandler; /** Store and render up to two latest command-line messages above the bar. */ private recordRecentMessage; /** Refresh the fixed recent-message preview area. */ private renderRecentMessages; /** Start a 2-second timer to hide recent messages after command ends. */ private scheduleRecentAutoHide; /** Cancel current auto-hide timer when a new command starts. */ private cancelRecentAutoHide; /** Show recent message area. */ private showRecentPanel; /** Hide recent message area. */ private hideRecentPanel; private useViewportPositioning; } //# sourceMappingURL=AcEdCommandLine.d.ts.map