/** * External dependencies */ import type { PropsWithChildren } from 'react'; /** * Internal dependencies */ import type { AnimationPart } from '../parts'; import type { AMPEffectTiming, Element, ElementId, Keyframes, StoryAnimation } from '../types'; export type { ElementId }; export type ElementAnimationHoister = (elementAnimation: WAAPIElementAnimation) => () => void; export type AnimationHoister = (animation: Animation) => () => void; export interface AnimationProviderState { state: { providerId: string; animationTargets: ElementId[]; }; actions: { getAnimationParts: (target: ElementId) => AnimationPart[]; hoistWAAPIAnimation: ElementAnimationHoister; WAAPIAnimationMethods: { play: () => void; pause: () => void; setCurrentTime: (time: number | 'end') => void; reset: () => void; }; }; } export type AnimationProviderProps = PropsWithChildren<{ animations?: StoryAnimation[]; elements?: Element[]; onWAAPIFinish?: () => void; selectedElementIds?: string[]; }>; export type StoryAnimationMap = Map; export type ElementAnimationPartsMap = Map; export interface WAAPIElementAnimation { animation: Animation; elementId: ElementId; } export type WAAPIElementAnimationMap = Map; export type ElementMap = Map; export type WAAPIAnimationWrapperProps = PropsWithChildren<{ keyframes: Keyframes; timings: AMPEffectTiming; hoistAnimation: AnimationHoister; targetLeafElement?: boolean; }>; export type WrapperProps = PropsWithChildren<{ target: ElementId; }>; export declare enum AnimationMachineState { Idle = "idle", Complete = "complete" } export declare enum AnimationMachineTransition { Complete = "complete", Reset = "reset" } //# sourceMappingURL=types.d.ts.map