Reorganize file structure: core/, utils/, modes/interactive/components/, modes/interactive/theme/

This commit is contained in:
Mario Zechner 2025-12-09 00:51:33 +01:00
parent 00982705f2
commit 83a6c26969
56 changed files with 133 additions and 128 deletions

View file

@ -0,0 +1,21 @@
import type { Component } from "@mariozechner/pi-tui";
import { theme } from "../theme/theme.js";
/**
* Dynamic border component that adjusts to viewport width
*/
export class DynamicBorder implements Component {
private color: (str: string) => string;
constructor(color: (str: string) => string = (str) => theme.fg("border", str)) {
this.color = color;
}
invalidate(): void {
// No cached state to invalidate currently
}
render(width: number): string[] {
return [this.color("─".repeat(Math.max(1, width)))];
}
}