import HeaderObject, { Accessor } from "../types/HeaderObject"; /** * Find all leaf headers (headers without children) in a header tree * Takes collapsed state into account - when a header is collapsed, only returns * children that are visible when parent is collapsed (showWhen is 'parentCollapsed' or 'always') */ export declare const findLeafHeaders: (header: HeaderObject, collapsedHeaders?: Set) => HeaderObject[]; /** Default pixel width for 1fr when converting before container width is known */ export declare const DEFAULT_FR_PX = 150; /** Default total table width used when normalizing fr/% if container width unknown */ export declare const DEFAULT_TABLE_WIDTH = 800; /** * Normalize header widths so that fr and % are converted to pixels. * Call this as soon as headers are received so the rest of the code can assume numeric widths. * If totalWidth is not provided, a reasonable total is computed from fixed widths + default for fr columns. * If options.containerWidth is provided, all fr/% columns are resolved against the full container width, * so pinned and non-pinned fr columns share the same proportional pool. */ export declare function normalizeHeaderWidths(headers: HeaderObject[], totalWidthOrOptions?: number | { containerWidth: number; }): HeaderObject[]; /** * Get actual width of a header in pixels */ export declare const getHeaderWidthInPixels: (header: HeaderObject) => number; /** * Convert fractional widths to pixel values */ export declare const removeAllFractionalWidths: (header: HeaderObject) => void; /** * Calculate the minimum width for a header */ export declare const getHeaderMinWidth: (header: HeaderObject) => number; /** * Get all visible leaf headers from an array of headers */ export declare const getAllVisibleLeafHeaders: (headers: HeaderObject[], collapsedHeaders?: Set) => HeaderObject[]; /** * Convert pixel-based widths to proportional fr units * This is used when autoExpandColumns is enabled */ export declare const convertPixelWidthsToFr: (headers: HeaderObject[], collapsedHeaders?: Set) => HeaderObject[]; /** * Calculate the optimal width for a column by measuring both header and cell content * This is used for auto-sizing columns to fit their content (like Excel/Google Sheets) * * @param accessor - The accessor of the header to measure * @param options - Configuration options * @returns The optimal width in pixels */ export declare const calculateHeaderContentWidth: (accessor: Accessor, options?: { rows?: any[]; header?: HeaderObject; maxWidth?: number; sampleSize?: number; /** Scope `.st-cell-content` font/padding sampling to this table instance */ styleRoot?: ParentNode | null; }) => number;