/** * dsh-widgets — the magnification wave's placement geometry. * * Pure maths over the deck's inputs: given the installed items and the resolved * grid (side / pad / columns / railW), it answers three questions — how far each * card scales for a focus point, where every card ends up at a given scale array, * and where the add button parks. * * Moved out of `client/index.ts` (Phase 2.7) with its body unchanged: `RailWave` * RECEIVES these functions as props (the wave component owns the interaction, the * caller owns the layout), so the maths is the natural seam between them. */ import type { WidgetSize } from '../../lib/contract/types'; /** One card in a laid-out deck: scale and the resulting box, right-edge anchored. */ export interface RailPlace { s: number; top: number; right: number; w: number; h: number; } /** What the geometry needs from the deck it describes. */ export interface WaveGeometryInput { items: ReadonlyArray<{ size: WidgetSize; baseW: number; }>; side: number; pad: number; columns: number; railW: number; multi: boolean; /** Peak magnification factor (prefs.magnify). */ magnify: number; /** Real-time (pointer-continuous) magnification (prefs.realTime). */ realTime: boolean; } /** Everything the deck and the wave read out of the geometry. */ export interface WaveGeometry { rows: number; active: boolean; deckBottom: number; staticLayout: RailPlace[]; stepScale: (d: number) => number; scaleFor: (fx: number, fy: number) => number[]; placeCards: (sc: number[]) => RailPlace[]; nearest: (v: number, pts: number[]) => number; xPts: number[]; yPts: number[]; addSlotFor: (layout: RailPlace[]) => { top: number; right: number; }; } export declare function createWaveGeometry(input: WaveGeometryInput): WaveGeometry;