import type { IAnimationOrchestratorAPI, IAnimationOrchestratorConfig } from './types'; /** * Main animation orchestrator hook. * Composes useElementRegistry, usePositionCapture, and useFLIPAnimation * into a full FLIP exit/enter pipeline. * * Handles the full exit animation sequence: * 1. Capture positions of remaining elements (FIRST) * 2. Apply position:absolute to exiting element * 3. Force synchronous reflow * 4. Capture AFTER positions (LAST) * 5. Calculate INVERT deltas and PLAY FLIP animations * 6. Run exit animation (per-token stagger or whole-element) * 7. Wait for all animations to complete * 8. Cleanup and notify completion * * @param config - Optional orchestrator configuration * @returns Full orchestrator API * * @example * ```tsx * const orchestrator = useAnimationOrchestrator({ * onExitComplete: (id) => removeFromList(id) * }); * *