- New TUI implementation with 3-strategy differential rendering - Synchronized output (CSI 2026) for flicker-free updates - New components: Editor, Markdown, Loader, SelectList, Spacer - Editor: file autocomplete, slash commands, large paste markers - Markdown: RGB background colors, caching - Terminal: cursor movement, visibility, clear operations - Chat demo with color-coded messages
25 lines
443 B
TypeScript
25 lines
443 B
TypeScript
import type { Component } from "../tui-new.js";
|
|
|
|
/**
|
|
* Spacer component that renders empty lines
|
|
*/
|
|
export class Spacer implements Component {
|
|
private lines: number;
|
|
|
|
constructor(lines: number = 1) {
|
|
this.lines = lines;
|
|
}
|
|
|
|
setLines(lines: number): void {
|
|
this.lines = lines;
|
|
}
|
|
|
|
render(_width: number): string[] {
|
|
const result: string[] = [];
|
|
for (let i = 0; i < this.lines; i++) {
|
|
result.push("");
|
|
}
|
|
return result;
|
|
}
|
|
}
|