import type { $Transition, MotionStateContext, Options } from "../types/index.js"; import type { AnimateUpdates } from "../features/animation/types.js"; import type { DOMKeyframesDefinition, VisualElement } from "framer-motion"; import type { Feature } from "../features/feature.js"; import type { LazyMotionContext } from "../components/lazy-motion/context.js"; import type { PresenceContext } from "../components/animate-presence/presence.svelte.js"; import type { StateType } from "../features/animation/animation.js"; import { frame } from "framer-motion/dom"; export declare const mountedStates: WeakMap; /** * Core class that manages animation state and orchestrates animations. * Handles component lifecycle methods in the correct order based on component tree position. */ export declare class MotionState { readonly id: string; type: "html" | "svg"; element: HTMLElement | SVGElement | null; parent?: MotionState; options: Options & { animatePresenceContext?: PresenceContext; features?: Feature[]; lazyMotionContext?: LazyMotionContext; }; isSafeToRemove: boolean; private children?; activeStates: Partial>; /** * Current animation process reference * Tracks the ongoing animation process for mount/update animations * Enables delayed animation loading and parent-child animation orchestration * Allows parent variant elements to control child element animations */ currentProcess: ReturnType | null; baseTarget: DOMKeyframesDefinition; target: DOMKeyframesDefinition; /** * The final transition to be applied to the state */ finalTransition: $Transition; private featureManager; visualElement: VisualElement; constructor(options: Options, parent?: MotionState); private _context; get context(): MotionStateContext; private initTarget; updateOptions(options: Options): void; beforeMount(): void; mount(element: HTMLElement | SVGElement, options: Options, notAnimate?: boolean): void; clearAnimation(): void; startAnimation(): void; beforeUnmount(): void; unmount(unMountChildren?: boolean): void; private unmountChild; beforeUpdate(): void; update(options: Options): void; setActive(name: StateType, isActive: boolean, isAnimate?: boolean): void; animateUpdates: AnimateUpdates; isMounted(): boolean; willUpdate(label: string): void; }