export interface Axis { min: number max: number } export interface Box { x: Axis y: Axis } export type VariantLabels = string | string[] /** * @public */ export interface AnimatePresenceProps { /** * Determines how to handle entering and exiting elements. * - "sync": Default. Elements animate in and out simultaneously. * - "wait": Wait for exit to finish before entering. * * @public */ mode?: 'sync' | 'wait' /** * By passing `initial={false}`, `AnimatePresence` will disable any initial animations on children * that are present when the component is first rendered. * * ```jsx * * {isVisible && ( * * )} * * ``` * * @public */ initial?: boolean /** * When a component is removed, there's no longer a chance to update its props directly. So if you need to update * a variant for that component as it renders for the exit animation, set `custom` to an object value that * is applied to the animating childrens props before they render once more to determine their final exit styles. * * The custom value must be JSON.stringify-able! * This lets us memoize it and use it across workers for some animationd drivers. * * ```tsx * * {isVisible && } * * * const Child = styled(View, { variants: { direction: ... } }) * ``` * * @public */ custom?: object /** * Fires when all exiting nodes have completed animating out. * * @public */ onExitComplete?: () => void /** * Used in Framer to flag that sibling children *shouldn't* re-render as a result of a * child being removed. * * @internal */ presenceAffectsLayout?: boolean passThrough?: boolean }