The flip animation function from svelte/animate calculates and animates element position changes between two DOMRect states.