import * as React from 'react'; import { InlineStyles } from '../Collector'; import { ExtractProps, Omit } from '../lib/types'; export interface VisibilityManagerProps extends InjectedProps { /** * Children as function which passes down style, * add this to the elements you want to hide until all child animations have finished. */ children: (props: { style: InlineStyles; }) => React.ReactNode; /** * Optional name to target a specific child Animator. */ name?: string; /** * Set to "true" if should be shown immediately on mount. * "false" if should wait for an animation first. * Defaults to false. */ isInitiallyVisible?: boolean; } export interface State { style: InlineStyles; } export interface InjectedProps { /** * Internal context, ignore this. */ context?: VisibilityManagerContext; } export declare type Handler = (opts: { name: string; }) => void; export interface VisibilityManagerContext { onFinish: Handler; onStart: Handler; } export declare const AnimatorContext: React.Context; export default class VisibilityManager extends React.Component { state: State; onStart: Handler; onFinish: Handler; render(): JSX.Element; } export declare const withVisibilityManagerContext: >>(WrappedComponent: TComponent) => { new (props: Readonly>, "context">>): { render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>, "context">>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callBack?: (() => void) | undefined): void; readonly props: Readonly>, "context">> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; }; new (props: Omit>, "context">, context?: any): { render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>, "context">>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callBack?: (() => void) | undefined): void; readonly props: Readonly>, "context">> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; }; displayName: string; contextType?: React.Context | undefined; }; export declare const WrappedVisibilityManager: { new (props: Readonly>): { render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callBack?: (() => void) | undefined): void; readonly props: Readonly> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; }; new (props: Pick, context?: any): { render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callBack?: (() => void) | undefined): void; readonly props: Readonly> & Readonly<{ children?: React.ReactNode; }>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; }; displayName: string; contextType?: React.Context | undefined; };