/** * Static table rendering — column-aligned rows with terminal-width awareness. * * @remarks * Part of the Human Render Contract (Epic T10114, ADR-077). Consumes a typed * {@link TableResponse} (schema + rows + total) and emits an aligned monospace * table that fits within the active terminal width. Wide string columns shrink * proportionally when the total width exceeds the budget; narrow numeric * columns are preserved. * * @epic T10114 * @task T10128 * @subtask T10143 */ import type { TableResponse } from '@cleocode/contracts/render/table.js'; import type { AnimateContext } from '../animate-context.js'; /** Options to {@link renderTable}. */ export interface RenderTableOptions { /** Render gate — primitive returns `''` when `enabled === false`. */ readonly ctx: AnimateContext; /** * Maximum line width. Defaults to `process.stdout.columns` and falls back to * `80` when the column count is unavailable. The renderer never produces a * row longer than this. */ readonly maxWidth?: number; /** * When `true`, force ASCII separator characters. When `false`, force the * Unicode form. When omitted, defer to `ctx.inputs.noColor`. */ readonly asciiBoxDrawing?: boolean; } /** * Render a {@link TableResponse} as an aligned columnar string. * * @param resp - Typed table response (schema + rows + total). * @param opts - Render gate + width / ASCII overrides. * @returns Multi-line aligned table. Empty when `opts.ctx.enabled` is `false`. * * @example * ```ts * renderTable( * { * rows: [{ id: 'T1', title: 'Implement', status: 'done' }], * schema: { * columns: [ * { key: 'id', header: 'ID' }, * { key: 'title', header: 'Title' }, * { key: 'status', header: 'Status' }, * ], * }, * total: 1, * }, * { ctx }, * ); * ``` */ export declare function renderTable(resp: TableResponse, opts: RenderTableOptions): string; //# sourceMappingURL=table.d.ts.map