/** A column's identity and its horizontal offset within its own panel. */ export interface ColumnPosition { colId: string; /** Distance (px) from the panel's left content edge to this column's left edge. */ x: number; } /** * Which change produced the new column layout, so the animator can pick a * duration and decide whether a column that vanished deserves an exit. * * - `'visibility'` — a column was hidden or shown (header context menu, column * chooser, or dragged out of the grid). Survivors slide; a newly-shown column * fades in where it lands. * - `'reorder'` — columns were permuted with the same membership (a programmatic * `moveColumn`, or a drop that committed). Pure slide. */ export type ColumnAnimationType = 'visibility' | 'reorder'; /** * FLIP-based column animation engine — the horizontal counterpart to * `RowAnimator`. * * ### Why this exists * Hiding a column is a *structural* layout change: the renderer tears the * header down and rebuilds every row, so the surviving columns jump to their * new offsets in a single frame. Dragging a column, by contrast, has always * animated (`.pg-grid--col-dragging` shifts neighbours via `--pg-drag-x` on a * 180 ms transition). This class gives the structural path the same motion, so * a column disappearing from the context menu reads exactly like one being * dragged out of the way. * * ### Why a stylesheet, not inline styles * A column's position is expressed once per `colId` and applies to its header * cell, its filter cell, and every rendered body cell in that column — hundreds * of elements. `RowAnimator` writes inline styles because a row *is* a single * element per panel; here the equivalent would be a write per cell. Instead the * animator emits one CSS rule per column into a single `