UNPKG

2.31 kBJavaScriptView Raw
1import { Image, ScrollView, Text, View } from 'react-native';
2import Easing from './Easing';
3import AnimatedClock from './core/AnimatedClock';
4import AnimatedValue from './core/AnimatedValue';
5import AnimatedNode from './core/AnimatedNode';
6import AnimatedCode from './core/AnimatedCode';
7import * as base from './base';
8import * as derived from './derived';
9import createAnimatedComponent from './createAnimatedComponent';
10import decay from './animations/decay';
11import timing from './animations/timing';
12import spring from './animations/spring';
13import TimingAnimation from './animations/TimingAnimation';
14import SpringAnimation from './animations/SpringAnimation';
15import DecayAnimation from './animations/DecayAnimation';
16import {
17 addWhitelistedNativeProps,
18 addWhitelistedUIProps,
19} from './ConfigHelper';
20import backwardCompatibleAnimWrapper from './animations/backwardCompatibleAnimWrapper';
21import {
22 Transition,
23 Transitioning,
24 createTransitioningComponent,
25} from './Transitioning';
26import SpringUtils from './animations/SpringUtils';
27import useValue from './useValue';
28
29
30const decayWrapper = backwardCompatibleAnimWrapper(decay, DecayAnimation);
31const timingWrapper = backwardCompatibleAnimWrapper(timing, TimingAnimation);
32const springWrapper = backwardCompatibleAnimWrapper(spring, SpringAnimation);
33const Animated = {
34 // components
35 View: createAnimatedComponent(View),
36 Text: createAnimatedComponent(Text),
37 Image: createAnimatedComponent(Image),
38 ScrollView: createAnimatedComponent(ScrollView),
39 Code: AnimatedCode,
40 createAnimatedComponent,
41
42 // classes
43 Clock: AnimatedClock,
44 Value: AnimatedValue,
45 Node: AnimatedNode,
46
47 // operations
48 ...base,
49 ...derived,
50
51 // animations
52 decay: decayWrapper,
53 timing: timingWrapper,
54 spring: springWrapper,
55 SpringUtils,
56
57 // configuration
58 addWhitelistedNativeProps,
59 addWhitelistedUIProps,
60
61 // hooks
62 useValue,
63};
64
65export default Animated;
66
67// operations
68export * from './base';
69export * from './derived';
70
71export {
72 Easing,
73 Transitioning,
74 Transition,
75 createTransitioningComponent,
76
77 // classes
78 AnimatedClock as Clock,
79 AnimatedValue as Value,
80 AnimatedNode as Node,
81
82 // animations
83 decayWrapper as decay,
84 timingWrapper as timing,
85 springWrapper as spring,
86 SpringUtils,
87
88 // hooks
89 useValue,
90};