@stacksjs/stx
Version:
A performant UI Framework. Powered by Bun.
34 lines • 1.03 kB
TypeScript
/**
* Print keyboard shortcuts help
*/
export declare function printShortcutsHelp(): void;
/**
* Print server status with URL
*/
export declare function printServerStatus(serverUrl: string): void;
/**
* Open URL in the default browser
*/
export declare function openInBrowser(url: string): void;
/**
* Setup keyboard shortcuts for the server
* Enables raw mode for handling single keystrokes
*
* @param serverUrl - The URL of the dev server
* @param stopServer - Function to call when stopping the server
* @param customHandlers - Optional custom command handlers
*/
export declare function setupKeyboardShortcuts(serverUrl: string, stopServer: () => void, customHandlers?: KeyboardCommandHandlers): void;
/**
* Cleanup keyboard shortcuts (restore terminal state)
*/
export declare function cleanupKeyboardShortcuts(): void;
/**
* Keyboard shortcut command handlers
*/
export declare interface KeyboardCommandHandlers {
onOpen?: () => void
onClear?: () => void
onQuit?: () => void
onHelp?: () => void
}