interface.d.ts 1.2 KB

1234567891011121314151617181920212223
  1. /// <reference types="react" />
  2. export declare const STATUS_NONE: "none";
  3. export declare const STATUS_APPEAR: "appear";
  4. export declare const STATUS_ENTER: "enter";
  5. export declare const STATUS_LEAVE: "leave";
  6. export type MotionStatus = typeof STATUS_NONE | typeof STATUS_APPEAR | typeof STATUS_ENTER | typeof STATUS_LEAVE;
  7. export declare const STEP_NONE: "none";
  8. export declare const STEP_PREPARE: "prepare";
  9. export declare const STEP_START: "start";
  10. export declare const STEP_ACTIVE: "active";
  11. export declare const STEP_ACTIVATED: "end";
  12. /**
  13. * Used for disabled motion case.
  14. * Prepare stage will still work but start & active will be skipped.
  15. */
  16. export declare const STEP_PREPARED: "prepared";
  17. export type StepStatus = typeof STEP_NONE | typeof STEP_PREPARE | typeof STEP_START | typeof STEP_ACTIVE | typeof STEP_ACTIVATED | typeof STEP_PREPARED;
  18. export type MotionEvent = (TransitionEvent | AnimationEvent) & {
  19. deadline?: boolean;
  20. };
  21. export type MotionPrepareEventHandler = (element: HTMLElement) => Promise<any> | void;
  22. export type MotionEventHandler = (element: HTMLElement, event: MotionEvent) => React.CSSProperties | void;
  23. export type MotionEndEventHandler = (element: HTMLElement, event: MotionEvent) => boolean | void;