first commit

This commit is contained in:
douboer@gmail.com
2026-03-03 13:23:14 +08:00
commit 3b7c1d558a
161 changed files with 28120 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
import type { IDisposable, IKeyPress } from "../types";
import type { IOutputInterface } from "../output/interface";
/**
* Interface: Input Component
*/
export interface IInputInterface extends IDisposable {
/**
* Blur the input element
*/
blur(): void;
/**
* Focus the input element
*/
focus(): void;
/**
* Deactivate the component
*/
pause(): void;
/**
* Activate the component
*/
resume(): void;
/**
* Callback function invoked on every key press
*/
onkeypress?: (ev: IKeyPress) => void;
/**
* Bridge the input to the output component: cursor & input
*/
pipe(output: IOutputInterface): void;
/**
* Set the value of the input element, updates the cursor
*/
setValue(str: string): void;
/**
* Clears the value of the input element
*/
clear(): void;
}