import type { TerminalRegion } from './region.js'; /** * RenderContext provides information needed for rendering */ export interface RenderContext { availableWidth: number; region: TerminalRegion; columnIndex: number; rowIndex: number; onUpdate?: () => void; onCleanup?: (callback: () => void) => void; } /** * Component type: can be a function or an object with a render method */ export type Component = ((ctx: RenderContext) => string | string[] | null) | { render: (ctx: RenderContext) => string | string[] | null; }; /** * Helper to call a component (handles both function and object forms) */ export declare function callComponent(component: Component, ctx: RenderContext): string | string[] | null; /** * Create a child RenderContext from a parent, with optional overrides * This ensures all properties from the parent are passed through, including onUpdate */ export declare function createChildContext(parent: RenderContext, overrides: Partial): RenderContext; /** * Render children components and return flattened lines * Handles null returns, array flattening, and rowIndex tracking automatically * Inspired by React's children rendering pattern */ export declare function renderChildren(children: Component[], ctx: RenderContext): string[]; //# sourceMappingURL=component.d.ts.map