UNPKG

react-navigation-shared-element

Version:
27 lines (26 loc) 1.56 kB
import { SharedElementNode, SharedElementEventSubscription, SharedElementSceneComponent, SharedElementAnimatedValue, NavigationProp } from "./types"; export declare type SharedElementSceneUpdateHandlerEventType = "ancestor" | "add" | "remove"; export declare type SharedElementSceneUpdateHandler = (eventType: SharedElementSceneUpdateHandlerEventType, node: SharedElementNode | undefined, id: string) => any; export declare type SharedElementSceneEventType = "willFocus" | "didFocus" | "willBlur" | "didBlur"; export default class SharedElementSceneData { private updateSubscribers; private ancestorNode?; private nodes; private animationContextValue; readonly Component: SharedElementSceneComponent; readonly name: string; readonly navigatorId: string; readonly nestingDepth: number; readonly debug: boolean; navigation: NavigationProp; constructor(Component: SharedElementSceneComponent, navigation: NavigationProp, navigatorId: string, nestingDepth: number, debug: boolean); setAnimimationContextValue(value: any): void; getAnimValue(closing: boolean): SharedElementAnimatedValue | undefined; getAncestor(): SharedElementNode | undefined; setAncestor(ancestorNode: SharedElementNode | null): void; addNode(id: string, node: SharedElementNode): void; removeNode(id: string, node: SharedElementNode): void; getNode(id: string): SharedElementNode | undefined; addUpdateListener(handler: SharedElementSceneUpdateHandler): SharedElementEventSubscription; private emitUpdateEvent; }