/**
 * @file columnUtils.ts
 * @input TableColumn types from types.ts
 * @output Pure utility functions for column width, layout resolution, and auto-generation
 * @position Utility layer; consumed by BaseTable.tsx
 *
 * SYNC: When modified, update these files to stay in sync:
 * - /packages/core/src/Table/Table.doc.mjs (utility descriptions)
 * - /packages/core/src/Table/index.ts (exports if functions change)
 */
import type { CSSProperties, ReactNode } from 'react';
import type { TableColumn, ProportionalWidth, PixelWidth } from './types';
/** Default minimum width (in px) for proportional columns. */
export declare const DEFAULT_MIN_COLUMN_WIDTH = 120;
/**
 * Pre-computed width information for a single column.
 * Produced by `resolveColumnWidths()`, consumed by header cell rendering.
 */
export interface ResolvedColumnWidth {
    /** Inline style to apply on the `<th>` for this column. */
    style: CSSProperties;
}
/**
 * Result of `resolveColumnWidths()` — contains per-column width styles
 * and the aggregate table min-width. Computed once and shared between
 * the table min-width calculation and header cell rendering.
 */
export interface ResolvedColumnWidths {
    /** Per-column width styles, indexed by column key. */
    columns: Map<string, ResolvedColumnWidth>;
    /** Minimum table width (px) to prevent proportional columns from shrinking below their minWidth. */
    tableMinWidth: number;
}
/**
 * Resolve column widths for the entire table in a single pass.
 *
 * Computes:
 * - Per-column inline styles (`width`, `minWidth`) for `<th>` elements
 * - Aggregate `tableMinWidth` for the `<table>` element
 *
 * This consolidates width logic that was previously duplicated between
 * the `tableMinWidth` IIFE and the header cell rendering loop.
 *
 * @param columns - Resolved column definitions (after auto-generation)
 * @returns Pre-computed widths for each column and the table minimum width
 */
export declare function resolveColumnWidths<T extends Record<string, unknown>>(columns: TableColumn<T>[]): ResolvedColumnWidths;
/**
 * Create a proportional column width (fr-like).
 * Columns share available space proportionally.
 * Applies `DEFAULT_MIN_COLUMN_WIDTH` when no explicit minWidth is provided.
 *
 * @example
 * ```
 * proportional(2) // twice as wide as proportional(1)
 * proportional(1, { minWidth: 200 }) // explicit min
 * ```
 */
export declare function proportional(value?: number, options?: {
    minWidth?: number;
}): ProportionalWidth;
/**
 * Create a fixed pixel column width.
 *
 * @example
 * ```
 * pixel(200) // exactly 200px wide
 * ```
 */
export declare function pixel(value: number): PixelWidth;
/**
 * Capitalize the first letter of a string.
 * Used for auto-generating header text from data keys.
 */
export declare function capitalize(str: string): string;
/**
 * Default cell renderer — converts the value at `item[key]` to a string.
 */
export declare function defaultCellRenderer<T extends Record<string, unknown>>(item: T, key: string): ReactNode;
/**
 * Auto-generate column definitions from the keys of the first data item.
 * Derives content-proportional widths by analyzing the header and first
 * few rows of data. Min-width is based on the longer of: header text
 * or the longest single word in values.
 */
export declare function generateColumns<T extends Record<string, unknown>>(data: T[]): TableColumn<T>[];
//# sourceMappingURL=columnUtils.d.ts.map