import { CursorType } from '../types/cursor'; import { StorageConfig } from '../types/storage'; import { LogLevel } from '../utils/logger'; export interface CitadelConfig { /** * The time in milliseconds before a command execution fails with a timeout. */ commandTimeoutMs?: number; /** * The color of the cursor. * Accepts any valid CSS color value. */ cursorColor?: string; /** * The speed of the cursor animation in milliseconds. * - For 'blink': Time between blinks (default: 530ms) * - For 'spin' and 'bbs': Time between frame changes (default: 120ms) * - For 'solid': Has no effect */ cursorSpeed?: number; /** * The type of cursor to display. Can be one of 'blink', 'spin', 'solid', or 'bbs'. */ cursorType?: CursorType; /** * Whether to include the default help command in the command registry. */ includeHelpCommand?: boolean; /** * The font family used by the interface. * Accepts any valid CSS `font-family` value. * Example: '"JetBrains Mono", monospace' */ fontFamily?: string; /** * The default font size used by the interface. * Accepts any valid CSS `font-size` value (e.g. '14px', '0.875rem'). */ fontSize?: string; /** * The initial height of the command interface. * Accepts any valid CSS height value. * Example: '400px' or '50vh' */ initialHeight?: string; /** * The log level for Citadel's logger * @default LogLevel.DEBUG in development, LogLevel.ERROR in production */ logLevel?: LogLevel; /** * Optional CSS value for the maximum height of the command interface. * If provided, this value will be set as the `max-height` property of the interface. * * Example: * ``` * * ``` */ maxHeight?: string; minHeight?: string; /** * The font size for command output text. * Accepts any valid CSS `font-size` value (e.g. '14px', '0.875rem'). * If omitted, output uses `fontSize`. */ outputFontSize?: string; /** * Controls whether the output pane is rendered. * Set to `false` when command side effects are rendered elsewhere in the host app. * Defaults to `true`. */ showOutputPane?: boolean; /** * Whether to reset the state when the interface is hidden (via Escape key or other means). */ resetStateOnHide?: boolean; /** * Whether to keep Escape from closing the panel in `displayMode: 'panel'`. * Defaults to `true`. */ closeOnEscape?: boolean; /** * The keyboard key that shows the command interface. */ showCitadelKey?: string; /** * Whether to show the panel immediately on mount when `displayMode: 'panel'`. * Defaults to `false`. */ showOnLoad?: boolean; /** * Presentation mode for rendering the Citadel interface. * - 'panel': Renders as an overlay panel anchored to the viewport bottom and toggled via keyboard shortcuts. * - 'inline': Renders directly within the host container and remains visible at all times. */ displayMode?: 'panel' | 'inline'; /** * Configuration for command history storage */ storage?: StorageConfig; }