import type { ChartModel, ChartModelPatch } from '../model/chart-model'; import type { ChartToolPanelName } from '../../types/grid.types'; /** A column offered to the Set Up tab for category / series roles. */ export interface ChartColumnOption { readonly colId: string; readonly header: string; readonly isMeasure: boolean; readonly isDimension: boolean; } /** * Controller behind a {@link ChartToolPanel}. Supplies the current model and the * available columns, and applies model patches produced by the controls. */ export interface ChartToolPanelHost { getModel(): ChartModel; updateModel(patch: ChartModelPatch): void; getColumnOptions(): ChartColumnOption[]; getPanels(): ChartToolPanelName[]; getDefaultPanel(): ChartToolPanelName; } /** * The docked chart configuration panel. Renders the Chart / Set Up / Customize * tabs from the current {@link ChartModel} and forwards every edit back to the * host as a model patch. Purely presentational — it holds no chart state. */ export declare class ChartToolPanel { private readonly containerEl; private readonly host; /** Notified with the drawer's width on open and 0 on close, so the host can * reflow the chart beside the drawer instead of behind it. */ private readonly onReserveChange?; private rootEl; private tabsEl; private bodyEl; private activeTab; /** Live renderers backing the Chart-tab preview thumbnails; disposed on rebuild. */ private thumbRenderers; /** Pending slide-in RAF handle, so an immediate destroy can cancel it. */ private openRaf; /** Pending slide-out timer, cleared if the panel is reopened or destroyed. */ private closeTimer; constructor(containerEl: HTMLElement, host: ChartToolPanelHost, /** Notified with the drawer's width on open and 0 on close, so the host can * reflow the chart beside the drawer instead of behind it. */ onReserveChange?: ((px: number) => void) | undefined); /** Whether the panel is currently mounted. */ isOpen(): boolean; /** Mounts the drawer (optionally on a specific tab), rendering and sliding it in. */ open(tab?: ChartToolPanelName): void; /** * Slides the drawer out (left → right) and unmounts it once the transition * ends. The instance is retained so a later {@link open} rebuilds cleanly. */ close(): void; /** Immediately unmounts and disposes the drawer with no exit animation. */ destroy(): void; /** Removes the DOM and releases the preview renderers. */ private teardown; /** Adds the open modifier on the next frame so the slide-in transition runs. */ private slideIn; /** Rebuilds the tab strip and active tab body from the current model. */ render(): void; private build; private renderTabs; private renderBody; private renderChartTab; /** * Builds one gallery cell: a real, full-bleed mini-chart of {@link PREVIEW_DATA} * rendered in the entry's type. Clicking applies the type to the model, which * updates the live chart in real time. The canvas is queued in `pending` for * rendering after DOM insertion (so it has a measured size and theme tokens). */ private buildGalleryItem; /** * Draws a static, full-bleed preview of a chart type into a thumbnail canvas. * The backing store is sized to the canvas's measured display size × DPR for a * crisp, undistorted image; `compact` collapses the axis gutters so the chart * fills the cell edge-to-edge. */ private renderThumbnail; /** Disposes every preview renderer created for the Chart tab. */ private disposeThumbnails; private renderSetupTab; private renderCustomizeTab; } //# sourceMappingURL=chart-tool-panel.d.ts.map