/** based on framer-motion@4.1.17, Copyright (c) 2018 Framer B.V. */ import { ResolvedValues } from "../types"; import { DetailedHTMLFactory, ForwardRefExoticComponent, HTMLAttributes, PropsWithoutRef, ReactHTML, RefAttributes } from "react"; import { MotionProps } from "../../motion/types"; import { HTMLElements } from "./supported-elements"; export interface TransformOrigin { originX?: number | string; originY?: number | string; originZ?: number | string; } export interface HTMLRenderState { /** * A mutable record of transforms we want to apply directly to the rendered Element * every frame. We use a mutable data structure to reduce GC during animations. */ transform: ResolvedValues; /** * A mutable record of transform keys we want to apply to the rendered Element. We order * this to order transforms in the desired order. We use a mutable data structure to reduce GC during animations. */ transformKeys: string[]; /** * A mutable record of transform origins we want to apply directly to the rendered Element * every frame. We use a mutable data structure to reduce GC during animations. */ transformOrigin: TransformOrigin; /** * A mutable record of styles we want to apply directly to the rendered Element * every frame. We use a mutable data structure to reduce GC during animations. */ style: ResolvedValues; /** * A mutable record of CSS variables we want to apply directly to the rendered Element * every frame. We use a mutable data structure to reduce GC during animations. */ vars: ResolvedValues; } /** * @public */ export declare type ForwardRefComponent = ForwardRefExoticComponent & RefAttributes>; /** * Support for React component props */ declare type UnwrapFactoryAttributes = F extends DetailedHTMLFactory ? P : never; declare type UnwrapFactoryElement = F extends DetailedHTMLFactory ? P : never; declare type HTMLAttributesWithoutMotionProps, Element extends HTMLElement> = { [K in Exclude]?: Attributes[K]; }; /** * @public */ export declare type HTMLMotionProps = HTMLAttributesWithoutMotionProps, UnwrapFactoryElement> & MotionProps; /** * Motion-optimised versions of React's HTML components. * * @public */ export declare type HTMLMotionComponents = { [K in HTMLElements]: ForwardRefComponent, HTMLMotionProps>; }; export {};