'use strict'; import type { Ref, Component } from 'react'; import type { StyleProps, BaseAnimationBuilder, ILayoutAnimationBuilder, EntryExitAnimationFunction, SharedTransition, SharedValue, } from '../reanimated2'; import type { ViewDescriptorsSet, ViewRefSet, } from '../reanimated2/ViewDescriptorsSet'; import type { SkipEnteringContext } from '../reanimated2/component/LayoutAnimationConfig'; import type { ShadowNodeWrapper } from '../reanimated2/commonTypes'; import type { ViewConfig } from '../ConfigHelper'; export interface AnimatedProps extends Record { viewDescriptors?: ViewDescriptorsSet; viewsRef?: ViewRefSet; initial?: SharedValue; } export interface ViewInfo { viewTag: number | HTMLElement | null; viewName: string | null; shadowNodeWrapper: ShadowNodeWrapper | null; viewConfig: ViewConfig; } export interface IInlinePropManager { attachInlineProps( animatedComponent: React.Component, viewInfo: ViewInfo ): void; detachInlineProps(): void; } export interface IPropsFilter { filterNonAnimatedProps: ( component: React.Component & IAnimatedComponentInternal ) => Record; } export interface IJSPropsUpdater { addOnJSPropsChangeListener( animatedComponent: React.Component & IAnimatedComponentInternal ): void; removeOnJSPropsChangeListener( animatedComponent: React.Component & IAnimatedComponentInternal ): void; } export type LayoutAnimationStaticContext = { presetName: string; }; export type AnimatedComponentProps

> = P & { forwardedRef?: Ref; style?: NestedArray; animatedProps?: Partial>; animatedStyle?: StyleProps; layout?: ( | BaseAnimationBuilder | ILayoutAnimationBuilder | typeof BaseAnimationBuilder ) & LayoutAnimationStaticContext; entering?: ( | BaseAnimationBuilder | typeof BaseAnimationBuilder | EntryExitAnimationFunction | Keyframe ) & LayoutAnimationStaticContext; exiting?: ( | BaseAnimationBuilder | typeof BaseAnimationBuilder | EntryExitAnimationFunction | Keyframe ) & LayoutAnimationStaticContext; sharedTransitionTag?: string; sharedTransitionStyle?: SharedTransition; }; export interface AnimatedComponentRef extends Component { setNativeProps?: (props: Record) => void; getScrollableNode?: () => AnimatedComponentRef; getAnimatableRef?: () => AnimatedComponentRef; } export interface IAnimatedComponentInternal { _styles: StyleProps[] | null; _animatedProps?: Partial>; _componentViewTag: number; _eventViewTag: number; _isFirstRender: boolean; jestAnimatedStyle: { value: StyleProps }; _component: AnimatedComponentRef | HTMLElement | null; _sharedElementTransition: SharedTransition | null; _jsPropsUpdater: IJSPropsUpdater; _InlinePropManager: IInlinePropManager; _PropsFilter: IPropsFilter; _viewInfo?: ViewInfo; context: React.ContextType; } export type NestedArray = T | NestedArray[]; export interface InitialComponentProps extends Record { ref?: Ref; collapsable?: boolean; }