mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-19 05:02:41 +00:00
- Set up npm workspaces for three packages: pi-tui, pi-agent, and pi (pods) - Implemented dual TypeScript configuration: - Root tsconfig.json with path mappings for development and type checking - Package-specific tsconfig.build.json for clean production builds - Configured lockstep versioning with sync script for inter-package dependencies - Added comprehensive documentation for development and publishing workflows - All packages at version 0.5.0 ready for npm publishing
24 lines
622 B
TypeScript
24 lines
622 B
TypeScript
import type { Component, ComponentRenderResult } from "./tui.js";
|
|
|
|
/**
|
|
* A simple component that renders blank lines for spacing
|
|
*/
|
|
export class WhitespaceComponent implements Component {
|
|
private lines: string[] = [];
|
|
private lineCount: number;
|
|
private firstRender: boolean = true;
|
|
|
|
constructor(lineCount: number = 1) {
|
|
this.lineCount = Math.max(0, lineCount); // Ensure non-negative
|
|
this.lines = new Array(this.lineCount).fill("");
|
|
}
|
|
|
|
render(_width: number): ComponentRenderResult {
|
|
const result = {
|
|
lines: this.lines,
|
|
changed: this.firstRender,
|
|
};
|
|
this.firstRender = false;
|
|
return result;
|
|
}
|
|
}
|