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

Constructors

Properties

autoCompleteIndex: number
bar: HTMLDivElement
cliContainer: HTMLDivElement
closeBtn: HTMLDivElement
cmdPopup: HTMLDivElement
container: HTMLElement
downBtn: HTMLButtonElement
history: string[]
historyIndex: number
input: HTMLDivElement
isCmdPopupOpen: boolean
isMsgPanelOpen: boolean
lastExecuted: null | string
leftGroup: HTMLDivElement
minWidth: number
msgPanel: HTMLDivElement
upBtn: HTMLButtonElement
widthRatio: number
wrapper: HTMLDivElement

Accessors

Methods

  • Execute a command line string. Returns a Promise that resolves when the command is completed.

    Parameters

    • cmdLine: string

      Command string

    Returns void

    Promise

  • Print error message with optional localization key

    Parameters

    • msg: string
    • OptionalmsgKey: string

    Returns void

  • Print message to message panel with optional localization key

    Parameters

    • msg: string
    • OptionalmsgKey: string

    Returns void

  • Render command line with options

    Parameters

    • cmd: string
    • options: string[] = []

    Returns void

  • Show or hide popups

    Parameters

    • __namedParameters: { showCmd?: boolean; showMsg?: boolean } = {}

    Returns void