// Module-level singleton — always reflects latest cursor position. // A single listener is registered once at module load time, shared across all consumers. export const globalMouse = { x: -9999, y: -9999 } if (typeof window !== 'undefined') { window.addEventListener( 'mousemove', (e) => { globalMouse.x = e.clientX globalMouse.y = e.clientY }, { passive: true, capture: true }, ) }