/** * Data table columns: the authored column schema and the resolved column * model the cell renderers read. * * A column names one data field (`key`) and a semantic `type`; the type picks * the default value format and alignment, so an author states meaning and the * compiler decides presentation. When no columns are authored they are derived * from the data's fields. */ import { type FormatSpec } from '../../data/format-value.js'; import type { IrNode } from '../../ir.js'; import { type JsonValue } from '../../json.js'; import type { PropSchema } from '../../registry/prop-schema.js'; export declare const COLUMN_TYPES: readonly ["text", "number", "percent", "currency", "date", "badge", "link", "progress", "sparkline"]; export type ColumnType = (typeof COLUMN_TYPES)[number]; export declare const BADGE_TONES: readonly ["success", "danger", "warning", "info", "neutral"]; export declare const COLUMN_ALIGNS: readonly ["start", "end", "center"]; export type ColumnAlign = (typeof COLUMN_ALIGNS)[number]; /** Columns shown when none are authored. */ export declare const DERIVED_COLUMN_LIMIT = 8; export declare const MAX_COLUMNS = 12; export declare const COLUMN_SCHEMA: PropSchema; export interface DataColumn { key: string; label: string; type: ColumnType; format: FormatSpec; align: ColumnAlign; /** link: the field that holds each row's URL. */ hrefField: string; /** progress: the scale maximum. */ max: number; /** sparkline: the series fields. */ fields: string[]; /** badge: exact value to tone. */ tones: Record; } export declare function columnType(value: JsonValue | undefined): ColumnType; /** The authored columns, or columns derived from the first fields of the data. */ export declare function resolveColumns(node: IrNode): DataColumn[]; //# sourceMappingURL=data-table-columns.d.ts.map