import type { VisualizationOptions } from '../../types'; /** * TableConfig defines the configuration for rendering the table. */ export interface TableConfig { type?: 'table'; data: Record[]; title?: string; theme?: 'default' | 'dark'; } /** * TableInstance represents a table instance with render and destroy methods. */ export interface TableInstance { render: (config: TableConfig) => void; destroy: () => void; } /** * Calculate the minimum width needed for a table based on its data. * This is a pure function that measures text width and returns the calculated min-width. * * @param data - Table data array * @param columns - Column names array * @returns Calculated minimum width in pixels */ export declare const calculateTableMinWidth: (data: Record[], columns: string[]) => number; /** * Table component using pure JavaScript. * * @example * ```ts * const table = Table({ * container: '#container', * width: 600, * height: 400, * }); * * table.render({ * type: 'table', * data: [ * { "Indicator": "经度(°)", "Mean": "104.15°", "Std": "±0.64°" }, * { "Indicator": "纬度(°)", "Mean": "31.60°", "Std": "±0.48°" }, * ], * title: '一个文本标题', * }); * * table.destroy(); * ``` */ export declare const Table: (options: VisualizationOptions) => TableInstance;