/** * @medicine-wheel/graph-viz — Circular Layout Engine * * Positions nodes in a medicine wheel pattern: * - East (right): 315°–45° * - South (bottom): 45°–135° * - West (left): 135°–225° * - North (top): 225°–315° * * Nodes without a direction are placed in the center. */ import type { DirectionName } from '@medicine-wheel/ontology-core'; import type { MWGraphData, WheelLayoutConfig, QuadrantGeometry } from './types.js'; export declare const DEFAULT_LAYOUT: WheelLayoutConfig; export declare function getQuadrantGeometries(config?: WheelLayoutConfig): QuadrantGeometry[]; /** * Apply medicine wheel circular layout to graph data. * Mutates node x/y positions in place and returns the data. */ export declare function applyWheelLayout(data: MWGraphData, config?: Partial): MWGraphData; /** * Generate an SVG arc path for a quadrant background sector. */ export declare function quadrantArcPath(cx: number, cy: number, outerRadius: number, innerRadius: number, startAngleDeg: number, endAngleDeg: number): string; /** * Generate a curved link path between two nodes. */ export declare function curvedLinkPath(x1: number, y1: number, x2: number, y2: number, curvature?: number): string; /** * Constrain a point to the wheel's geometry, in polar space. * * - Beings with a direction stay in the ring band (innerRadius..radius); * in `sector` mode they also stay inside their direction's quadrant. * - Beings without a direction stay in the heart (within innerRadius). * * Used as a drag/nudge interceptor: the wheel guides the hand instead of * a Cartesian grid fighting it. */ export declare function constrainToWheel(point: { x: number; y: number; }, config?: Partial, direction?: DirectionName, mode?: 'ring' | 'sector'): { x: number; y: number; }; /** * Which direction quadrant a flow-space point falls in. * Useful for quadrant-aware interactions (e.g. "create node here"). */ export declare function directionForPoint(x: number, y: number, config?: Partial): DirectionName; /** * Generate a direction label position (outside the wheel). */ export declare function directionLabelPosition(cx: number, cy: number, radius: number, direction: DirectionName): { x: number; y: number; anchor: 'start' | 'middle' | 'end'; }; //# sourceMappingURL=layout.d.ts.map