import type { Rect } from '@nvidia-elements/core/internal'; import type { DashboardGridGeometry } from './intent.types.js'; import type { DashboardGridPlacement, DashboardLayout, DashboardSpanConstraints } from '../dashboard.types.js'; export interface DashboardMetrics { readonly columnSize: number; readonly rowSize: number; /** Signed separation between outer cell boxes; negative means border overlap. */ readonly gap: number; readonly width: number; readonly height: number; } export declare function transposeDashboardGridGeometry(geometry: DashboardGridGeometry): DashboardGridGeometry; export declare function doDashboardGridGeometriesOverlap(left: DashboardGridGeometry, right: DashboardGridGeometry): boolean; interface DashboardMetricInput { flow: DashboardLayout['grid']['flow']; tracks: number; sizing: 'fit' | 'fixed'; width: number; height: number; columnSize: number; rowSize: number; gap: number; overlap: number; } export declare function resolveDashboardMetrics(input: DashboardMetricInput): DashboardMetrics | undefined; /** CSS-pixel placement measured from the canvas inline start and top. */ export interface DashboardPixelPlacement { readonly inlineStart: number; readonly top: number; readonly width: number; readonly height: number; } export type DashboardReadingDirection = 'ltr' | 'rtl'; export declare function getDashboardPixelPlacement(geometry: DashboardGridGeometry, metrics: DashboardMetrics): DashboardPixelPlacement; /** Projects logical canvas placement into physical client coordinates. */ export declare function getDashboardPlacementClientRect(placement: DashboardPixelPlacement, canvasClientRect: Rect, readingDirection: DashboardReadingDirection): Rect; export declare function getProjectedControlRect(input: { control: Rect; current: Rect; target: Rect; }, anchoredEdges: { right: boolean; bottom: boolean; }): Rect; export declare function getRevealScrollDelta(rect: Rect, viewport: Rect): { x: number; y: number; }; export declare function getDashboardCanvasSize(input: { layout: DashboardLayout; metrics: DashboardMetrics; sizing: 'fit' | 'fixed'; items: readonly DashboardGridPlacement[]; floor?: { width: number; height: number; }; }): { width: number; height: number; }; export type DashboardResizeEdge = 'left' | 'right' | 'top' | 'bottom' | 'bottom-right' | 'bottom-left'; interface ResizeAxisInput { start: number; span: number; pixelStart: number; pixelLength: number; pixelDelta: number; edge: 'minimum' | 'maximum' | 'none'; minimumSpan: number; maximumSpan: number; coordinateLimit: number; /** Cell pitch and signed cell spacing, in CSS pixels. */ pitch: number; gap: number; } /** Physical corner occupied by the panel's resize control. */ export declare function getDashboardResizeCorner(panel: Element): 'bottom-left' | 'bottom-right'; interface ResizeBoundaries { readonly column: ResizeAxisInput['edge']; readonly row: ResizeAxisInput['edge']; } /** Resolves physical edges against the grid's logical column direction. */ export declare function getDashboardResizeBoundaries(edge: DashboardResizeEdge, readingDirection: DashboardReadingDirection): ResizeBoundaries; interface AnchoredResizeInput { source: DashboardGridPlacement; initialPixelPlacement: DashboardPixelPlacement; delta: { inline: number; vertical: number; }; edge: DashboardResizeEdge; grid: DashboardLayout['grid']; limits: DashboardSpanConstraints; readingDirection: DashboardReadingDirection; } /** Keeps the opposite grid boundary fixed while resizing a physical edge. */ export declare function getAnchoredResizeGeometry(input: AnchoredResizeInput, metrics: DashboardMetrics): { geometry: DashboardGridPlacement; canvasPlacement: DashboardPixelPlacement; }; /** Validates resize semantics independently of ordinary movement permissions. */ export declare function preservesDashboardResizeAnchors(source: DashboardGridPlacement, geometry: DashboardGridPlacement, options: { edge: DashboardResizeEdge; readingDirection: DashboardReadingDirection; }): boolean; export declare function isDashboardResizeEdge(value: string | undefined): value is DashboardResizeEdge; export declare function getDashboardClientRect(element: HTMLElement): Rect; export declare function haveSameGridPitch(left: DashboardMetrics | undefined, right: DashboardMetrics | undefined): boolean; export {};