import { type Component, type TUI, type TuiMouseEvent, type TuiMouseEventResult } from "@earendil-works/pi-tui"; /** * Fullscreen easter egg shown when the header logo is clicked. The current screen dissolves into braille dust, * spreading out from the logo, while the logo lifts off as a 3D object, flies to the center, grows, and spins. * Leaving plays the same timeline backwards, so the logo lands on the header and the screen reassembles. * * The logo is ray cast per braille dot. A braille cell holds 2x4 dots and roughly square dots, so one logo * pixel (a half block) is exactly 2x2 dots and the header logo (4x2 cells) is 8x8 dots at the start. */ type Rgb = readonly [number, number, number]; export interface PiLogoAnimationOptions { /** The screen to dissolve, as rendered lines. */ screen: readonly string[]; /** Terminal cell of the header logo's top-left corner. */ logoColumn: number; logoRow: number; } /** * Show the animation as a fullscreen overlay until it is dismissed. The overlay takes focus and mouse input and * returns focus when hidden, so the rest of the UI keeps running underneath untouched. */ export declare function playPiLogoAnimation(tui: TUI, options: PiLogoAnimationOptions): Promise; export declare class PiLogoAnimation implements Component { private readonly tui; private readonly options; private readonly foreground; private readonly background; private readonly onDone; private readonly startTime; private lastRender; private timer; private exit; private shuffle; private screenWidth; private screenHeight; /** Star per cell index, or undefined. */ private stars; private cells; private readonly ansiCache; private readonly logo; constructor(tui: TUI, options: PiLogoAnimationOptions, colors: { foreground: Rgb; background: Rgb; }, onDone: () => void); /** Play the exit animation. A second call skips it. */ close(): void; handleInput(data: string): void; handleMouse(event: TuiMouseEvent): TuiMouseEventResult; invalidate(): void; render(width: number): string[]; private elapsed; private exitProgress; private finish; /** Each block's displacement from its place in the logo at `time`, in grid units. */ private blockOffsets; private flyProgress; private starAlpha; private hintAlpha; private pose; private hint; /** A sparse, deterministic starfield: one braille dot in about STAR_DENSITY of all cells. */ private prepareStars; private prepareCells; private pack; private ansi; } export {}; //# sourceMappingURL=pi-logo-animation.d.ts.map