import { ElementType, ForwardRefExoticComponent, ComponentPropsWithRef } from 'react'; import { FluidValue } from '@react-spring/shared'; import * as Zdog from 'react-zdog'; export * from '@react-spring/core'; type ZdogExports = typeof Zdog; type ZdogElements = { [P in keyof ZdogExports]: P extends 'Illustration' ? never : ZdogExports[P] extends ElementType ? P : never; }[keyof ZdogExports]; declare const primitives: { [key in ZdogElements]: ElementType; }; type Primitives = typeof primitives; type AnimatedPrimitives = { [P in keyof Primitives]: AnimatedComponent; }; /** The type of the `animated()` function */ type WithAnimated = { (wrappedComponent: T): AnimatedComponent; } & AnimatedPrimitives; /** The type of an `animated()` component */ type AnimatedComponent = ForwardRefExoticComponent>>; /** The props of an `animated()` component */ type AnimatedProps = { [P in keyof Props]: P extends 'ref' | 'key' ? Props[P] : AnimatedProp; }; type AnimatedProp = [T, T] extends [infer T, infer DT] ? [DT] extends [never] ? never : DT extends void ? undefined : DT extends object ? AnimatedStyle : DT | AnimatedLeaf : never; type AnimatedStyle = [T, T] extends [infer T, infer DT] ? DT extends void ? undefined : [DT] extends [never] ? never : DT extends object ? { [P in keyof DT]: AnimatedStyle; } : DT | AnimatedLeaf : never; type AnimatedLeaf = Exclude | Extract> extends infer U ? [U] extends [never] ? never : FluidValue> : never; declare const animated: WithAnimated; export { type AnimatedComponent, type AnimatedProps, type WithAnimated, animated as a, animated };