UNPKG

@humanspeak/svelte-motion

Version:

Framer Motion for Svelte 5. Declarative motion.<tag> components with AnimatePresence exit animations, gestures (hover, tap, drag, focus, in-view), variants, FLIP layout animations, shared-layout transitions, spring physics, and scroll-linked motion values

23 lines (22 loc) 900 B
import type { ProjectionNode } from '../utils/projection'; /** * Publish a `ProjectionNode` as the projection parent for descendant * motion components. * * @param node The current component's ProjectionNode, or `null` to * explicitly clear (rarely needed — Svelte context auto-clears on * component unmount). */ export declare const setProjectionParent: (node: ProjectionNode | null) => void; /** * Read the ancestor `ProjectionNode` published by the nearest motion * ancestor. Returns `null` when this component is at the root of the * projection tree (or when no motion ancestor exists). * * Must be called BEFORE the current component publishes its own node * via `setProjectionParent` — see the order-of-operations note in this * file's header. * * @returns The parent ProjectionNode, or `null`. */ export declare const getProjectionParent: () => ProjectionNode | null;