import { ColumnOrderState, Table, VisibilityState } from '@tanstack/react-table'; /** * The leaf column ids of the table's current column definitions, in definition order (group columns * flattened). Read live on every call: the column definitions may change while the table stays mounted, so * a default captured once would go stale (ASMA-8597, trap A). */ export declare const getDefinitionColumnOrder: (table: Table) => string[]; /** The leaf column ids as the table shows them now, with the saved column order applied. */ export declare const getEffectiveColumnOrder: (table: Table) => string[]; /** * The order the table shows for a `columnOrder` state, the way TanStack applies it: the listed columns that exist, in the * listed order, then every other column in definition order. `[]` is the definition order. */ export declare const effectiveColumnOrder: (order: ColumnOrderState, definitionIds: readonly string[]) => string[]; /** * ASMA-8695, DEC-03: puts every column that a saved order does not list at its definition position, not at the end, which is * where TanStack puts it. Each missing column goes right after the closest column before it in the definition that the order * lists; with none before it, right before the closest one after it; with none at all, at the end. Ids that no column has are * kept, so an order saved for columns that are not there at the moment survives (ASMA-8597, DEC-W). */ export declare const insertMissingColumns: (order: readonly string[], definitionIds: readonly string[]) => string[]; /** * The order a table with `persistColumnLayout` opens with when the user has saved none: its `initialState.columnOrder`, with * the columns that list does not name at their definition position (DEC-03), as in a saved order; `[]` stays `[]`, the * definition order. Used for every comparison with "the default" (the dot, the storage rule, Reset), so the same list is the * default everywhere (ASMA-8695, audit round 2). */ export declare const normalizeDefaultColumnOrder: (order: ColumnOrderState, definitionIds: readonly string[]) => string[]; /** * What a `columnVisibility` state changes from the defaults: only the columns whose visibility differs, never an internal * column (the select column is hidden unless the app shows it, and is not the user's to change). This is what a table saves * (ASMA-8695, DEC-02), and a state with no difference is the default. */ export declare const diffColumnVisibility: (state: VisibilityState, defaults: VisibilityState) => Record; /** Same differences in any key order count as the same visibility. */ export declare const columnVisibilitySignature: (state: VisibilityState, defaults: VisibilityState) => string; /** `true` when no column has been moved away from its definition position. */ export declare const isDefaultColumnOrder: (table: Table) => boolean; /** * `true` when the user has moved a column the popover lists. It compares the popover's columns in their * effective order with the same columns in the default order, so a stored order that matches the current * definitions shows nothing, and a column that disappeared from `columns` does not count as a move. The default order is the * definition order, or on a table with `persistColumnLayout` the one its `initialState.columnOrder` declares (ASMA-8695). */ export declare const hasReorderedColumns: (table: Table) => boolean; /** * `true` when the user's visibility is not the default. A table with `persistColumnLayout` knows its defaults, so a column * hidden by default is no change, while showing it, or hiding a column that is shown by default, is (ASMA-8695, Q10, * DEC-05). Any other table has no known defaults, so a hidden column the user may hide is the change, as before. Internal * columns and columns fixed visible never count. */ export declare const hasHiddenColumns: (table: Table) => boolean; /** * Whether the user's column layout differs from the table's defaults: a hidden column or a moved one. This * is what the dot on the column settings pin shows (ASMA-8597, Q9, Q10). Widths and sorting never count. */ export declare const hasChangedColumnLayout: (table: Table) => boolean;