/** * Calculate optimal label position for a component * @param {Object} component - Component object with label and coordinates * @param {Object} mapData - Map data containing all components, edges, notes, etc. * @param {Object} config - Configuration object * @param {CanvasRenderingContext2D} ctx - Canvas context for text measurement * @param {Array} allLines - Pre-collected lines from edges, evolutions, etc. * @param {Array} noteRects - Pre-collected note rectangles * @param {Array} inertiaRects - Pre-collected inertia rectangles * @returns {Object} Position object with x, y coordinates in pixels */ export function calculateOptimalLabelPosition(component: any, mapData: any, config: any, ctx: CanvasRenderingContext2D, allLines: any[], noteRects: any[], inertiaRects: any[]): any; /** * Collect all lines from edges, evolutions, inertias, and axes */ export function collectAllLines(mapData: any, config: any, componentMap: any): { start: { x: number; y: any; }; end: { x: any; y: any; }; }[]; /** * Collect all note rectangles */ export function collectNoteRects(mapData: any, config: any, ctx: any): any; /** * Collect all inertia rectangles */ export function collectInertiaRects(mapData: any, config: any, componentMap: any): any;