The DynamicCLI itself
new
DynamicCLI(options?: DynamicCliOptions)
readonly
currentPage: undefined | string
interface: undefined | readline.Interface
interval: any
readonly
options: DynamicCliOptions
private
_layout: any[]
private
_listeners: { [key: string]: Listener; }
private
_oldRenderContent: string[]
private
_options: DynamicCliOptions
private
_callEvent(type: string,data: any,): void
Call an event
private
_handleInput(key: Buffer): void
Handle user input
private
_renderComponent(component: any): string[]
Render a component
private
_sperateColor(text: string): { sequence?: string; text: string; }[]
Seperate the color from the text
Create a page
deletePage(id: string): void
Delete a page
listen(): void
Listen to an event
listen(type: "input" | "keydown",callback: (key: Buffer) => any,): void
removeAllListeners(): void
Remove all listeners
removeListener(id: string): void
Remove a listener
setLayout(layout: { [key: string]: any; type: "blank"
| "text"
| "pageTabs"
| "pageContent"
| "input"; }[]): DynamicCLI
Set the layout of the CLI
Set the size of the CLI
setStyle(style: Style): DynamicCLI
Set the style of the CLI
simulateInput(key: Buffer): void
Simulate user input
stop(): void
Stop the CLI
switchPage(id: string): void
Switch the page