declare const viewLayoutBrand: unique symbol; /** An opaque, deterministic placement plan for named chart views. */ export interface ViewLayout { readonly [viewLayoutBrand]: { readonly placed: TPlaced; readonly referenced: TReferenced; }; } export type ViewLayoutPlaced> = TLayout extends ViewLayout ? TPlaced : never; export type ViewLayoutReferenced> = TLayout extends ViewLayout ? TReferenced : never; export type ViewTrack = { readonly id: TId; readonly size: number; readonly grow?: never; readonly min?: never; readonly max?: never; } | { readonly id: TId; readonly grow: number; readonly min?: number; readonly max?: number; readonly size?: never; }; export type ViewAnchor = 'top-left' | 'top' | 'top-right' | 'right' | 'bottom-right' | 'bottom' | 'bottom-left' | 'left' | 'center'; export interface ViewInsetOptions { relativeTo: TReference; anchor: ViewAnchor; width: number; height: number; /** Distance from the referenced view's edges. Shrinks with the inset. */ offset?: number; } export interface ViewGridCell { readonly row: TRow; readonly column: TColumn; } export interface ViewLayoutBounds { x: number; y: number; width: number; height: number; } export interface ResolvedViewFrame extends ViewLayoutBounds { id: string; /** Paint and focus order, starting at zero. */ order: number; } export interface ViewLayoutMetadata { placed: readonly string[]; referenced: readonly string[]; } type AnyViewLayout = ViewLayout; type NonEmpty = readonly [T, ...T[]]; type TrackId = TTracks[number]['id']; /** Fills the current layout bounds with one complete chart view. */ export declare function fill(view: TView): ViewLayout; /** Places one chart view inside a previously resolved view frame. */ export declare function inset(view: TView, options: ViewInsetOptions): ViewLayout; /** Resolves child layouts in paint order against the same outer bounds. */ export declare function layer>(...layouts: TLayouts): ViewLayout, ViewLayoutReferenced>; type CheckedCells>> = { readonly [TView in keyof TCells]: ViewGridCell, TrackId>; }; /** Places named chart views in non-overlapping fixed and flexible tracks. */ export declare function grid, const TColumns extends NonEmpty, const TCells extends Readonly>>(options: { rows: TRows; columns: TColumns; cells: TCells & CheckedCells, NoInfer, TCells> & (keyof TCells extends never ? never : unknown); gap?: number; rowGap?: number; columnGap?: number; }): ViewLayout, never>; /** @internal Returns authored placement and dependency IDs without resolving frames. */ export declare function getViewLayoutMetadataInternal(layout: AnyViewLayout): ViewLayoutMetadata; /** @internal Resolves all named views to absolute frames in paint order. */ export declare function resolveViewLayoutInternal(layout: AnyViewLayout, bounds: ViewLayoutBounds): readonly ResolvedViewFrame[]; export {};