Release v0.8.0

This commit is contained in:
Mario Zechner 2025-11-21 03:12:42 +01:00
parent cc88095140
commit 85adcf22bf
48 changed files with 1530 additions and 608 deletions

View file

@ -20,6 +20,12 @@ export interface Component {
* Optional handler for keyboard input when component has focus
*/
handleInput?(data: string): void;
/**
* Invalidate any cached rendering state.
* Called when theme changes or when component needs to re-render from scratch.
*/
invalidate(): void;
}
export { visibleWidth };
@ -45,6 +51,12 @@ export class Container implements Component {
this.children = [];
}
invalidate(): void {
for (const child of this.children) {
child.invalidate?.();
}
}
render(width: number): string[] {
const lines: string[] = [];
for (const child of this.children) {