Skip to content

Latest commit

 

History

History
944 lines (820 loc) · 32.7 KB

framer-motion.api.md

File metadata and controls

944 lines (820 loc) · 32.7 KB

API Report File for "framer-motion"

Do not edit this file. It is a report generated by API Extractor.

import * as CSS from 'csstype';
import { CSSProperties } from 'react';
import { DetailedHTMLFactory } from 'react';
import { Easing as Easing_2 } from 'popmotion';
import { ForwardRefExoticComponent } from 'react';
import { HTMLAttributes } from 'react';
import { PropsWithoutRef } from 'react';
import * as PropTypes from 'prop-types';
import * as React from 'react';
import { ReactHTML } from 'react';
import { Ref } from 'react';
import { RefAttributes } from 'react';
import { RefObject } from 'react';
import { SpringOptions } from 'popmotion';
import { SVGAttributes } from 'react';

// Warning: (ae-forgotten-export) The symbol "ScaleCorrectionDefinitionMap" needs to be exported by the entry point index.d.ts
// Warning: (ae-internal-missing-underscore) The name "addScaleCorrection" should be prefixed with an underscore because the declaration is marked as @internal
// 
// @internal (undocumented)
export function addScaleCorrection(correctors: ScaleCorrectionDefinitionMap): void;

// Warning: (ae-forgotten-export) The symbol "AnimationOptions" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "PlaybackControls" needs to be exported by the entry point index.d.ts
// 
// @public
export function animate<V>(from: MotionValue<V> | V, to: V | V[], transition?: AnimationOptions<V>): PlaybackControls;

// @public (undocumented)
export const AnimateLayoutFeature: MotionFeature;

// @public
export const AnimatePresence: React.FunctionComponent<AnimatePresenceProps>;

// @public (undocumented)
export interface AnimatePresenceProps {
    custom?: any;
    // @beta
    exitBeforeEnter?: boolean;
    initial?: boolean;
    onExitComplete?: () => void;
    // @internal
    presenceAffectsLayout?: boolean;
}

// @public (undocumented)
export class AnimateSharedLayout extends React.Component<SharedLayoutProps> {
    // (undocumented)
    addChild(child: HTMLVisualElement): void;
    // (undocumented)
    addToStack(child: HTMLVisualElement): void;
    // (undocumented)
    componentDidMount(): void;
    // (undocumented)
    componentDidUpdate(): void;
    // Warning: (ae-forgotten-export) The symbol "LayoutStack" needs to be exported by the entry point index.d.ts
    getStack(id?: string): LayoutStack | undefined;
    // (undocumented)
    removeChild(child: HTMLVisualElement): void;
    // (undocumented)
    removeFromStack(child: HTMLVisualElement): void;
    // (undocumented)
    render(): JSX.Element;
    // (undocumented)
    scheduleUpdate(force?: boolean): void;
    // (undocumented)
    shouldComponentUpdate(): boolean;
    // (undocumented)
    startLayoutAnimation(): void;
    syncContext: SharedLayoutSyncMethods;
    // (undocumented)
    updateStacks(): void;
}

// @public
export class AnimationControls {
    // @internal
    mount(): void;
    set(definition: AnimationDefinition): void;
    // Warning: (ae-forgotten-export) The symbol "AnimationDefinition" needs to be exported by the entry point index.d.ts
    start(definition: AnimationDefinition, transitionOverride?: Transition): Promise<any>;
    stop(): void;
    // Warning: (ae-forgotten-export) The symbol "VisualElement" needs to be exported by the entry point index.d.ts
    // 
    // @internal
    subscribe(visualElement: VisualElement): () => boolean;
    // @internal
    unmount(): void;
}

// Warning: (ae-internal-missing-underscore) The name "animationControls" should be prefixed with an underscore because the declaration is marked as @internal
// 
// @internal (undocumented)
export const animationControls: () => AnimationControls;

// @public (undocumented)
export const AnimationFeature: MotionFeature;

// @public (undocumented)
export interface AnimationProps {
    animate?: AnimationControls | TargetAndTransition | VariantLabels | boolean;
    // Warning: (ae-forgotten-export) The symbol "TargetResolver" needs to be exported by the entry point index.d.ts
    exit?: TargetAndTransition | VariantLabels | TargetResolver;
    transition?: Transition;
    variants?: Variants;
}

// @public
export interface Axis {
    // (undocumented)
    max: number;
    // (undocumented)
    min: number;
}

// @public
export interface AxisBox2D {
    // (undocumented)
    x: Axis;
    // (undocumented)
    y: Axis;
}

// @public (undocumented)
export interface AxisBox3D extends AxisBox2D {
    // (undocumented)
    z: Axis;
}

// @public
export interface AxisDelta {
    // (undocumented)
    origin: number;
    // (undocumented)
    originPoint: number;
    // (undocumented)
    scale: number;
    // (undocumented)
    translate: number;
}

// @public
export interface BoundingBox2D {
    // (undocumented)
    bottom: number;
    // (undocumented)
    left: number;
    // (undocumented)
    right: number;
    // (undocumented)
    top: number;
}

// @public
export interface BoundingBox3D extends BoundingBox2D {
    // (undocumented)
    back: number;
    // (undocumented)
    front: number;
}

// @public
export interface BoxDelta {
    // (undocumented)
    x: AxisDelta;
    // (undocumented)
    y: AxisDelta;
}

// Warning: (ae-forgotten-export) The symbol "SyncLayoutBatcher" needs to be exported by the entry point index.d.ts
// 
// @public
export function createBatcher(): SyncLayoutBatcher;

// @public
export function createDomMotionComponent(key: string): React.ForwardRefExoticComponent<MotionProps & React.RefAttributes<unknown>>;

// Warning: (ae-forgotten-export) The symbol "MotionComponentConfig" needs to be exported by the entry point index.d.ts
// Warning: (ae-internal-missing-underscore) The name "createMotionComponent" should be prefixed with an underscore because the declaration is marked as @internal
// 
// @internal
export function createMotionComponent<P extends {}, E>(Component: string | React.ComponentType<P>, { defaultFeatures, useVisualElement, render }: MotionComponentConfig<E>): React.ForwardRefExoticComponent<React.PropsWithoutRef<P & MotionProps> & React.RefAttributes<E>>;

// @public
export type CustomDomComponent<Props> = React.ForwardRefExoticComponent<React.PropsWithoutRef<Props & MotionProps> & React.RefAttributes<SVGElement | HTMLElement>>;

// @public (undocumented)
export interface CustomValueType {
    // (undocumented)
    mix: (from: any, to: any) => (p: number) => number | string;
    // (undocumented)
    toValue: () => number | string;
}

// @public
export class DragControls {
    // Warning: (ae-forgotten-export) The symbol "DragControlOptions" needs to be exported by the entry point index.d.ts
    start(event: React.MouseEvent | React.TouchEvent | React.PointerEvent | MouseEvent | TouchEvent | PointerEvent, options?: DragControlOptions): void;
    // Warning: (ae-forgotten-export) The symbol "VisualElementDragControls" needs to be exported by the entry point index.d.ts
    // 
    // @internal
    subscribe(controls: VisualElementDragControls): () => void;
    // (undocumented)
    updateConstraints(): void;
}

// @public (undocumented)
export const DragFeature: MotionFeature;

// @public (undocumented)
export interface DraggableProps extends DragHandlers {
    drag?: boolean | "x" | "y";
    dragConstraints?: false | Partial<BoundingBox2D> | RefObject<Element>;
    dragControls?: DragControls;
    dragDirectionLock?: boolean;
    dragElastic?: boolean | number;
    dragListener?: boolean;
    dragMomentum?: boolean;
    dragPropagation?: boolean;
    // Warning: (ae-forgotten-export) The symbol "InertiaOptions" needs to be exported by the entry point index.d.ts
    dragTransition?: InertiaOptions;
    _dragX?: MotionValue<number>;
    _dragY?: MotionValue<number>;
    onMeasureDragConstraints?: (constraints: BoundingBox2D) => BoundingBox2D | void;
}

// @public (undocumented)
export interface DragHandlers {
    onDirectionLock?(axis: "x" | "y"): void;
    onDrag?(event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo): void;
    onDragEnd?(event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo): void;
    onDragStart?(event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo): void;
    onDragTransitionEnd?(): void;
}

// @public
export type EasingFunction = (v: number) => number;

// @public (undocumented)
export interface EventInfo {
    // (undocumented)
    point: Point2D;
}

// @public (undocumented)
export const ExitFeature: MotionFeature;

// @public (undocumented)
export interface FeatureProps extends MotionProps {
    // (undocumented)
    visualElement: HTMLVisualElement;
}

// @public (undocumented)
export type ForwardRefComponent<T, P> = ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;

// Warning: (ae-internal-missing-underscore) The name "FramerTreeContext" should be prefixed with an underscore because the declaration is marked as @internal
// 
// @internal (undocumented)
export const FramerTreeContext: import("react").Context<SyncLayoutBatcher | SharedLayoutSyncMethods>;

// @public (undocumented)
export type GestureHandlers = PanHandlers & TapHandlers & HoverHandlers;

// @public (undocumented)
export const GesturesFeature: MotionFeature;

// @public (undocumented)
export interface HoverHandlers {
    onHoverEnd?(event: MouseEvent, info: EventInfo): void;
    onHoverStart?(event: MouseEvent, info: EventInfo): void;
    whileHover?: string | TargetAndTransition;
}

// Warning: (ae-forgotten-export) The symbol "HTMLAttributesWithoutMotionProps" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "UnwrapFactoryAttributes" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "UnwrapFactoryElement" needs to be exported by the entry point index.d.ts
// 
// @public (undocumented)
export type HTMLMotionProps<TagName extends keyof ReactHTML> = HTMLAttributesWithoutMotionProps<UnwrapFactoryAttributes<ReactHTML[TagName]>, UnwrapFactoryElement<ReactHTML[TagName]>> & MotionProps;

// @public
export class HTMLVisualElement<E extends HTMLElement | SVGElement = HTMLElement> extends VisualElement<E> {
    // (undocumented)
    addValue(key: string, value: MotionValue): void;
    // Warning: (ae-forgotten-export) The symbol "MotionPoint" needs to be exported by the entry point index.d.ts
    // 
    // (undocumented)
    axisProgress: MotionPoint;
    box: AxisBox2D;
    build(): void;
    clean(): void;
    // (undocumented)
    config: DOMVisualElementConfig;
    // Warning: (ae-forgotten-export) The symbol "DOMVisualElementConfig" needs to be exported by the entry point index.d.ts
    // 
    // (undocumented)
    protected defaultConfig: DOMVisualElementConfig;
    delta: BoxDelta;
    deltaFinal: BoxDelta;
    deltaTransform: string;
    // (undocumented)
    enableLayoutProjection(): void;
    getBoundingBox(): AxisBox2D;
    // (undocumented)
    getBoundingBoxWithoutTransforms(): AxisBox2D;
    getComputedStyle(): CSSStyleDeclaration;
    // (undocumented)
    hide(): void;
    isLayoutProjectionEnabled: boolean;
    // (undocumented)
    isPresent?: boolean;
    // (undocumented)
    isTargetBoxLocked: boolean;
    // (undocumented)
    isVisible?: boolean;
    layoutId?: string;
    layoutReady(config?: SharedLayoutAnimationConfig): void;
    // (undocumented)
    lockTargetBox(): void;
    makeTargetAnimatable({ transition, transitionEnd, ...target }: TargetAndTransition, parseDOMValues?: boolean): TargetAndTransition;
    // (undocumented)
    measureLayout(): void;
    // (undocumented)
    onLayoutMeasure(callback: LayoutUpdateHandler): () => undefined;
    // Warning: (ae-forgotten-export) The symbol "LayoutUpdateHandler" needs to be exported by the entry point index.d.ts
    onLayoutUpdate(callback: LayoutUpdateHandler): () => undefined;
    // Warning: (ae-forgotten-export) The symbol "OnViewportBoxUpdate" needs to be exported by the entry point index.d.ts
    // 
    // (undocumented)
    onViewportBoxUpdate(callback: OnViewportBoxUpdate): () => undefined;
    // Warning: (ae-forgotten-export) The symbol "Presence" needs to be exported by the entry point index.d.ts
    presence?: Presence;
    prevViewportBox?: AxisBox2D;
    reactStyle: ResolvedValues;
    read(key: string): number | string | null;
    readNativeValue(key: string): any;
    // (undocumented)
    rebaseTargetBox(force?: boolean, box?: AxisBox2D): void;
    removeValue(key: string): void;
    render(): void;
    resetTransform(): void;
    setAxisTarget(axis: "x" | "y", min: number, max: number): void;
    // (undocumented)
    show(): void;
    snapshotBoundingBox(): void;
    // (undocumented)
    startLayoutAxisAnimation(axis: "x" | "y", transition: Transition): Promise<void> | undefined;
    // (undocumented)
    stopLayoutAnimation(): void;
    // (undocumented)
    stopLayoutAxisAnimation: {
        x: () => void;
        y: () => void;
    };
    // Warning: (ae-forgotten-export) The symbol "ResolvedValues" needs to be exported by the entry point index.d.ts
    style: ResolvedValues;
    targetBox: AxisBox2D;
    protected targetBoxFinal: AxisBox2D;
    protected transform: ResolvedValues;
    protected transformKeys: string[];
    // Warning: (ae-forgotten-export) The symbol "TransformOrigin" needs to be exported by the entry point index.d.ts
    protected transformOrigin: TransformOrigin;
    treeScale: Point2D;
    // (undocumented)
    unlockTargetBox(): void;
    // (undocumented)
    updateConfig(config?: DOMVisualElementConfig): void;
    // (undocumented)
    updateLayoutDelta: () => void;
    updateLayoutDeltas(): void;
    // (undocumented)
    updateTransformDeltas(): void;
    vars: ResolvedValues;
    viewportScroll: Point2D;
}

// @public
export interface Inertia {
    bounceDamping?: number;
    bounceStiffness?: number;
    // @internal (undocumented)
    delay?: number;
    from?: number | string;
    max?: number;
    min?: number;
    modifyTarget?(v: number): number;
    power?: number;
    restDelta?: number;
    timeConstant?: number;
    type: "inertia";
    velocity?: number;
}

// @public
export function isValidMotionProp(key: string): boolean;

// Warning: (ae-internal-missing-underscore) The name "Keyframes" should be prefixed with an underscore because the declaration is marked as @internal
// 
// @internal
export interface Keyframes {
    // (undocumented)
    delay?: number;
    // @public
    duration?: number;
    // Warning: (ae-forgotten-export) The symbol "Easing" needs to be exported by the entry point index.d.ts
    // 
    // @public
    ease?: Easing | Easing[];
    easings?: Easing | Easing[];
    // (undocumented)
    elapsed?: number;
    // @public
    flip?: number;
    // (undocumented)
    from?: number | string;
    // @public
    loop?: number;
    // @public (undocumented)
    repeatDelay?: number;
    // @public
    times?: number[];
    // (undocumented)
    to?: number | string | ValueTarget;
    // @public
    type: "keyframes";
    values: KeyframesTarget;
    // (undocumented)
    velocity?: number;
    // @public
    yoyo?: number;
}

// @public (undocumented)
export type KeyframesTarget = ResolvedKeyframesTarget | [null, ...CustomValueType[]] | CustomValueType[];

// @public (undocumented)
export interface LayoutProps {
    layout?: boolean | "position";
    layoutId?: string;
    onLayoutAnimationComplete?(): void;
    onViewportBoxUpdate?(box: AxisBox2D, delta: BoxDelta): void;
}

// @public (undocumented)
export const m: import("./types").HTMLMotionComponents & import("./types").SVGMotionComponents & {
    custom: <Props>(Component: string | import("react").ComponentClass<Props, any> | import("react").FunctionComponent<Props>) => import(".").CustomDomComponent<Props>;
};

// Warning: (ae-forgotten-export) The symbol "HTMLMotionComponents" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "SVGMotionComponents" needs to be exported by the entry point index.d.ts
// 
// @public
export const motion: HTMLMotionComponents & SVGMotionComponents & {
    custom: <Props>(Component: string | React.ComponentClass<Props, any> | React.FunctionComponent<Props>) => CustomDomComponent<Props>;
};

// @public (undocumented)
export interface MotionAdvancedProps {
    custom?: any;
    inherit?: boolean;
}

// @public (undocumented)
export interface MotionCallbacks {
    onAnimationComplete?(): void;
    onAnimationStart?(): void;
    onUpdate?(latest: {
        [key: string]: string | number;
    }): void;
}

// Warning: (ae-forgotten-export) The symbol "MotionConfigProps" needs to be exported by the entry point index.d.ts
// 
// @public
export function MotionConfig({ children, features, ...props }: MotionConfigProps): JSX.Element;

// @public (undocumented)
export interface MotionConfigContext {
    features: MotionFeature[];
    // @internal
    isStatic: boolean;
    // @internal (undocumented)
    transformPagePoint: TransformPoint2D;
}

// @public (undocumented)
export const MotionConfigContext: React.Context<MotionConfigContext>;

// @public (undocumented)
export interface MotionFeature {
    // (undocumented)
    getComponent: (props: MotionProps) => React.ComponentType<FeatureProps> | undefined;
    // (undocumented)
    key: string;
    // (undocumented)
    shouldRender: (props: MotionProps) => boolean;
}

// @public
export interface MotionProps extends AnimationProps, MotionCallbacks, GestureHandlers, DraggableProps, LayoutProps, MotionAdvancedProps {
    initial?: boolean | Target | VariantLabels;
    style?: MotionStyle;
    // Warning: (ae-forgotten-export) The symbol "TransformProperties" needs to be exported by the entry point index.d.ts
    transformTemplate?(transform: TransformProperties, generatedTransform: string): string;
    // @internal
    transformValues?<V extends ResolvedValues>(values: V): V;
}

// Warning: (ae-forgotten-export) The symbol "MotionCSS" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "MakeMotion" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "SVGPathProperties" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "MakeCustomValueType" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "CustomStyles" needs to be exported by the entry point index.d.ts
// 
// @public (undocumented)
export type MotionStyle = MotionCSS & MotionTransform & MakeMotion<SVGPathProperties> & MakeCustomValueType<CustomStyles>;

// @public (undocumented)
export type MotionTransform = MakeMotion<TransformProperties>;

// @public
export class MotionValue<V = any> {
    // @internal
    constructor(init: V);
    // @internal
    attach(passiveEffect: PassiveEffect<V>): void;
    // (undocumented)
    clearListeners(): void;
    destroy(): void;
    get(): V;
    // (undocumented)
    getPrevious(): V;
    getVelocity(): number;
    isAnimating(): boolean;
    onChange(subscription: Subscriber<V>): () => void;
    // @internal
    onRenderRequest(subscription: Subscriber<V>): () => undefined;
    set(v: V, render?: boolean): void;
    // Warning: (ae-forgotten-export) The symbol "StartAnimation" needs to be exported by the entry point index.d.ts
    // 
    // @internal
    start(animation: StartAnimation): Promise<void>;
    stop(): void;
    // (undocumented)
    updateAndNotify: (v: V, render?: boolean) => void;
    // Warning: (ae-forgotten-export) The symbol "SubscriptionManager" needs to be exported by the entry point index.d.ts
    // 
    // @internal
    updateSubscribers: SubscriptionManager<Subscriber<V>>;
    }

// Warning: (ae-internal-missing-underscore) The name "motionValue" should be prefixed with an underscore because the declaration is marked as @internal
// 
// @internal (undocumented)
export function motionValue<V>(init: V): MotionValue<V>;

// @public (undocumented)
export interface None {
    // @internal (undocumented)
    delay?: number;
    // @internal (undocumented)
    from?: number | string;
    type: false;
    // @internal (undocumented)
    velocity?: number;
}

// @public
export interface Orchestration {
    delay?: number;
    delayChildren?: number;
    staggerChildren?: number;
    staggerDirection?: number;
    when?: false | "beforeChildren" | "afterChildren" | string;
}

// @public (undocumented)
export interface PanHandlers {
    onPan?(event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo): void;
    onPanEnd?(event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo): void;
    onPanSessionStart?(event: MouseEvent | TouchEvent | PointerEvent, info: EventInfo): void;
    onPanStart?(event: MouseEvent | TouchEvent | PointerEvent, info: PanInfo): void;
}

// @public
export interface PanInfo {
    delta: Point2D;
    offset: Point2D;
    point: Point2D;
    velocity: Point2D;
}

// @public (undocumented)
export type PassiveEffect<T> = (v: T, safeSetter: (v: T) => void) => void;

// @public
export interface Point2D {
    // (undocumented)
    x: number;
    // (undocumented)
    y: number;
}

// @public
export interface Point3D extends Point2D {
    // (undocumented)
    z: number;
}

// Warning: (ae-forgotten-export) The symbol "PresenceContextProps" needs to be exported by the entry point index.d.ts
// 
// @public (undocumented)
export const PresenceContext: import("react").Context<PresenceContextProps | null>;

// @public (undocumented)
export interface RelayoutInfo {
    // (undocumented)
    delta: {
        x: number;
        y: number;
        width: number;
        height: number;
    };
}

// @public (undocumented)
export interface Repeat {
    repeat?: number;
    repeatDelay?: number;
    repeatType?: "loop" | "reverse" | "mirror";
}

// @public (undocumented)
export type ResolvedKeyframesTarget = [null, ...number[]] | number[] | [null, ...string[]] | string[];

// @public (undocumented)
export type ResolvedSingleTarget = string | number;

// @public (undocumented)
export type ResolvedValueTarget = ResolvedSingleTarget | ResolvedKeyframesTarget;

// @public (undocumented)
export type ResolveLayoutTransition = (info: RelayoutInfo) => Transition | boolean;

// Warning: (ae-internal-missing-underscore) The name "resolveMotionValue" should be prefixed with an underscore because the declaration is marked as @internal
// 
// @internal
export function resolveMotionValue(value?: string | number | CustomValueType | MotionValue): string | number;

// @public (undocumented)
export interface ScrollMotionValues {
    // (undocumented)
    scrollX: MotionValue<number>;
    // (undocumented)
    scrollXProgress: MotionValue<number>;
    // (undocumented)
    scrollY: MotionValue<number>;
    // (undocumented)
    scrollYProgress: MotionValue<number>;
}

// @public (undocumented)
export interface SharedLayoutAnimationConfig {
    // (undocumented)
    crossfadeOpacity?: MotionValue<number>;
    // (undocumented)
    originBox?: AxisBox2D;
    // (undocumented)
    shouldStackAnimate?: boolean;
    // (undocumented)
    targetBox?: AxisBox2D;
    // (undocumented)
    transition?: Transition;
    // (undocumented)
    visibilityAction?: VisibilityAction;
}

// @public (undocumented)
export const SharedLayoutContext: import("react").Context<SyncLayoutBatcher | SharedLayoutSyncMethods>;

// @public (undocumented)
export interface SharedLayoutProps {
    // Warning: (ae-forgotten-export) The symbol "React" needs to be exported by the entry point index.d.ts
    // 
    // (undocumented)
    children: React_2.ReactNode;
    // @internal
    _dependency?: any;
    // @internal
    _supportRotate?: boolean;
    // @internal
    _transition?: Transition;
    type?: "switch" | "crossfade";
}

// @public
export interface SharedLayoutSyncMethods extends SyncLayoutBatcher {
    // (undocumented)
    forceUpdate: () => void;
    // (undocumented)
    register: (child: HTMLVisualElement) => void;
    // (undocumented)
    remove: (child: HTMLVisualElement) => void;
    // (undocumented)
    syncUpdate: (force?: boolean) => void;
}

// @public (undocumented)
export type SingleTarget = ResolvedSingleTarget | CustomValueType;

// @public
export interface Spring extends Repeat {
    bounce?: number;
    damping?: number;
    // @internal (undocumented)
    delay?: number;
    duration?: number;
    from?: number | string;
    mass?: number;
    restDelta?: number;
    restSpeed?: number;
    stiffness?: number;
    // @internal (undocumented)
    to?: number | string | ValueTarget;
    type: "spring";
    velocity?: number;
}

// Warning: (ae-internal-missing-underscore) The name "startAnimation" should be prefixed with an underscore because the declaration is marked as @internal
// 
// @internal
export function startAnimation(key: string, value: MotionValue, target: ResolvedValueTarget, transition?: Transition): Promise<void>;

// Warning: (ae-forgotten-export) The symbol "AnimationOptions" needs to be exported by the entry point index.d.ts
// Warning: (ae-internal-missing-underscore) The name "startVisualElementAnimation" should be prefixed with an underscore because the declaration is marked as @internal
// 
// @internal (undocumented)
export function startVisualElementAnimation(visualElement: VisualElement, definition: AnimationDefinition, opts?: AnimationOptions_2): Promise<void>;

// @public (undocumented)
export type Subscriber<T> = (v: T) => void;

// Warning: (ae-forgotten-export) The symbol "SVGAttributesWithoutMotionProps" needs to be exported by the entry point index.d.ts
// 
// @public
export type SVGAttributesAsMotionValues<T> = MakeMotion<SVGAttributesWithoutMotionProps<T>>;

// @public (undocumented)
export interface SVGMotionProps<T> extends SVGAttributesAsMotionValues<T>, MotionProps {
}

// @public
export interface SyncLayoutLifecycles {
    // (undocumented)
    layoutReady: (child: HTMLVisualElement) => void;
    // (undocumented)
    measureLayout: (child: HTMLVisualElement) => void;
}

// @public (undocumented)
export interface TapHandlers {
    onTap?(event: MouseEvent | TouchEvent | PointerEvent, info: TapInfo): void;
    onTapCancel?(event: MouseEvent | TouchEvent | PointerEvent, info: TapInfo): void;
    onTapStart?(event: MouseEvent | TouchEvent | PointerEvent, info: TapInfo): void;
    whileTap?: string | TargetAndTransition;
}

// @public
export interface TapInfo {
    point: Point2D;
}

// Warning: (ae-forgotten-export) The symbol "TargetProperties" needs to be exported by the entry point index.d.ts
// 
// @public (undocumented)
export type Target = MakeCustomValueType<TargetProperties>;

// Warning: (ae-forgotten-export) The symbol "TargetWithKeyframes" needs to be exported by the entry point index.d.ts
// 
// @public
export type TargetAndTransition = TargetWithKeyframes & {
    transition?: Transition;
    transitionEnd?: Target;
};

// Warning: (ae-forgotten-export) The symbol "TransformOptions" needs to be exported by the entry point index.d.ts
// 
// @public
export function transform<T>(inputValue: number, inputRange: number[], outputRange: T[], options?: TransformOptions<T>): T;

// @public
export function transform<T>(inputRange: number[], outputRange: T[], options?: TransformOptions<T>): (inputValue: number) => T;

// @public
export type TransformPoint2D = (point: Point2D) => Point2D;

// Warning: (ae-forgotten-export) The symbol "TransitionDefinition" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "TransitionMap" needs to be exported by the entry point index.d.ts
// 
// @public
export type Transition = (Orchestration & Repeat & TransitionDefinition) | (Orchestration & Repeat & TransitionMap);

// @public
export interface Tween extends Repeat {
    // @internal (undocumented)
    delay?: number;
    duration?: number;
    ease?: Easing | Easing[];
    easings?: Easing[];
    // @internal
    elapsed?: number;
    // @deprecated
    flip?: number;
    from?: number | string;
    // @deprecated
    loop?: number;
    times?: number[];
    // @internal (undocumented)
    to?: number | string | ValueTarget;
    type?: "tween";
    // @internal (undocumented)
    velocity?: number;
    // @deprecated
    yoyo?: number;
}

// Warning: (ae-internal-missing-underscore) The name "useAnimatedState" should be prefixed with an underscore because the declaration is marked as @internal
// 
// @internal
export function useAnimatedState(initialState: any): any[];

// @public
export function useAnimation(): AnimationControls;

// Warning: (ae-forgotten-export) The symbol "CycleState" needs to be exported by the entry point index.d.ts
// 
// @public
export function useCycle<T>(...items: T[]): CycleState<T>;

// @public
export function useDomEvent(ref: RefObject<EventTarget>, eventName: string, handler?: EventListener | undefined, options?: AddEventListenerOptions): void;

// @public
export function useDragControls(): DragControls;

// @public
export function useElementScroll(ref: RefObject<HTMLElement>): ScrollMotionValues;

// Warning: (ae-internal-missing-underscore) The name "useExternalRef" should be prefixed with an underscore because the declaration is marked as @internal
// 
// @internal
export function useExternalRef<E = Element>(externalRef?: Ref<E>): RefObject<E>;

// @public
export function useGestures<GestureHandlers>(props: GestureHandlers, visualElement: VisualElement): void;

// Warning: (ae-forgotten-export) The symbol "ScaleMotionValues" needs to be exported by the entry point index.d.ts
// 
// @public @deprecated
export function useInvertedScale(scale?: Partial<ScaleMotionValues>): ScaleMotionValues;

// @public
export function useIsPresent(): boolean;

// @public
export function useMotionTemplate(fragments: TemplateStringsArray, ...values: MotionValue[]): MotionValue<string>;

// @public
export function useMotionValue<T>(initial: T): MotionValue<T>;

// Warning: (ae-internal-missing-underscore) The name "usePanGesture" should be prefixed with an underscore because the declaration is marked as @internal
// 
// @internal (undocumented)
export function usePanGesture({ onPan, onPanStart, onPanEnd, onPanSessionStart }: PanHandlers, ref: RefObject<Element> | VisualElement): void;

// Warning: (ae-forgotten-export) The symbol "AlwaysPresent" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "Present" needs to be exported by the entry point index.d.ts
// Warning: (ae-forgotten-export) The symbol "NotPresent" needs to be exported by the entry point index.d.ts
// 
// @public
export function usePresence(): AlwaysPresent | Present | NotPresent;

// @public
export function useReducedMotion(): boolean | null;

// @public
export function useSpring(source: MotionValue | number, config?: SpringOptions): MotionValue<any>;

// Warning: (ae-internal-missing-underscore) The name "useTapGesture" should be prefixed with an underscore because the declaration is marked as @internal
// 
// @internal (undocumented)
export function useTapGesture({ onTap, onTapStart, onTapCancel, whileTap }: TapHandlers, visualElement: VisualElement): void;

// Warning: (ae-forgotten-export) The symbol "InputRange" needs to be exported by the entry point index.d.ts
// 
// @public
export function useTransform<I, O>(value: MotionValue<number>, inputRange: InputRange, outputRange: O[], options?: TransformOptions<O>): MotionValue<O>;

// Warning: (ae-forgotten-export) The symbol "SingleTransformer" needs to be exported by the entry point index.d.ts
// 
// @public
export function useTransform<I, O>(input: MotionValue<I>, transformer: SingleTransformer<I, O>): MotionValue<O>;

// Warning: (ae-forgotten-export) The symbol "MultiTransformer" needs to be exported by the entry point index.d.ts
// 
// @public
export function useTransform<I, O>(input: MotionValue<string | number>[], transformer: MultiTransformer<I, O>): MotionValue<O>;

// @public
export function useViewportScroll(): ScrollMotionValues;

// @public (undocumented)
export type ValueTarget = SingleTarget | KeyframesTarget;

// @public (undocumented)
export type Variant = TargetAndTransition | TargetResolver;

// @public
export type VariantLabels = string | string[];

// @public (undocumented)
export type Variants = {
    [key: string]: Variant;
};

// @public (undocumented)
export enum VisibilityAction {
    // (undocumented)
    Hide = 0,
    // (undocumented)
    Show = 1
}


// (No @packageDocumentation comment for this package)