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

@ -1,5 +1,5 @@
import type { Component } from "@mariozechner/pi-tui";
import chalk from "chalk";
import { theme } from "../theme/theme.js";
/**
* Dynamic border component that adjusts to viewport width
@ -7,10 +7,14 @@ import chalk from "chalk";
export class DynamicBorder implements Component {
private color: (str: string) => string;
constructor(color: (str: string) => string = chalk.blue) {
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)))];
}