@@ -40,23 +40,149 @@ export type {default as AnimatedSubtraction} from './nodes/AnimatedSubtraction';
40
40
export type {WithAnimatedValue} from './createAnimatedComponent';
41
41
export type {AnimatedComponentType as AnimatedComponent} from './createAnimatedComponent';
42
42
43
+ /**
44
+ * Creates a new Animated value composed from two Animated values added
45
+ * together.
46
+ *
47
+ * See https://reactnative.dev/docs/animated#add
48
+ */
43
49
export const add = AnimatedImplementation.add;
50
+
51
+ /**
52
+ * Imperative API to attach an animated value to an event on a view. Prefer
53
+ * using `Animated.event` with `useNativeDrive: true` if possible.
54
+ *
55
+ * See https://reactnative.dev/docs/animated#attachnativeevent
56
+ */
44
57
export const attachNativeEvent = AnimatedImplementation.attachNativeEvent;
58
+
59
+ /**
60
+ * Make any React component Animatable. Used to create `Animated.View`, etc.
61
+ *
62
+ * See https://reactnative.dev/docs/animated#createanimatedcomponent
63
+ */
45
64
export const createAnimatedComponent =
46
65
AnimatedImplementation.createAnimatedComponent;
66
+
67
+ /**
68
+ * Animates a value from an initial velocity to zero based on a decay
69
+ * coefficient.
70
+ *
71
+ * See https://reactnative.dev/docs/animated#decay
72
+ */
47
73
export const decay = AnimatedImplementation.decay;
74
+
75
+ /**
76
+ * Starts an animation after the given delay.
77
+ *
78
+ * See https://reactnative.dev/docs/animated#delay
79
+ */
48
80
export const delay = AnimatedImplementation.delay;
81
+
82
+ /**
83
+ * Create a new Animated value that is limited between 2 values. It uses the
84
+ * difference between the last value so even if the value is far from the
85
+ * bounds it will start changing when the value starts getting closer again.
86
+ *
87
+ * See https://reactnative.dev/docs/animated#diffclamp
88
+ */
49
89
export const diffClamp = AnimatedImplementation.diffClamp;
90
+
91
+ /**
92
+ * Creates a new Animated value composed by dividing the first Animated value
93
+ * by the second Animated value.
94
+ *
95
+ * See https://reactnative.dev/docs/animated#divide
96
+ */
50
97
export const divide = AnimatedImplementation.divide;
98
+
99
+ /**
100
+ * Takes an array of mappings and extracts values from each arg accordingly,
101
+ * then calls `setValue` on the mapped outputs.
102
+ *
103
+ * See https://reactnative.dev/docs/animated#event
104
+ */
51
105
export const event = AnimatedImplementation.event;
106
+
107
+ /**
108
+ * Advanced imperative API for snooping on animated events that are passed in
109
+ * through props. Use values directly where possible.
110
+ *
111
+ * See https://reactnative.dev/docs/animated#forkevent
112
+ */
52
113
export const forkEvent = AnimatedImplementation.forkEvent;
114
+
115
+ /**
116
+ * Loops a given animation continuously, so that each time it reaches the
117
+ * end, it resets and begins again from the start.
118
+ *
119
+ * See https://reactnative.dev/docs/animated#loop
120
+ */
53
121
export const loop = AnimatedImplementation.loop;
122
+
123
+ /**
124
+ * Creates a new Animated value that is the (non-negative) modulo of the
125
+ * provided Animated value.
126
+ *
127
+ * See https://reactnative.dev/docs/animated#modulo
128
+ */
54
129
export const modulo = AnimatedImplementation.modulo;
130
+
131
+ /**
132
+ * Creates a new Animated value composed from two Animated values multiplied
133
+ * together.
134
+ *
135
+ * See https://reactnative.dev/docs/animated#multiply
136
+ */
55
137
export const multiply = AnimatedImplementation.multiply;
138
+
139
+ /**
140
+ * Starts an array of animations all at the same time. By default, if one
141
+ * of the animations is stopped, they will all be stopped. You can override
142
+ * this with the `stopTogether` flag.
143
+ *
144
+ * See https://reactnative.dev/docs/animated#parallel
145
+ */
56
146
export const parallel = AnimatedImplementation.parallel;
147
+
148
+ /**
149
+ * Starts an array of animations in order, waiting for each to complete
150
+ * before starting the next. If the current running animation is stopped, no
151
+ * following animations will be started.
152
+ *
153
+ * See https://reactnative.dev/docs/animated#sequence
154
+ */
57
155
export const sequence = AnimatedImplementation.sequence;
156
+
157
+ /**
158
+ * Animates a value according to an analytical spring model based on
159
+ * damped harmonic oscillation.
160
+ *
161
+ * See https://reactnative.dev/docs/animated#spring
162
+ */
58
163
export const spring = AnimatedImplementation.spring;
164
+
165
+ /**
166
+ * Array of animations may run in parallel (overlap), but are started in
167
+ * sequence with successive delays. Nice for doing trailing effects.
168
+ *
169
+ * See https://reactnative.dev/docs/animated#stagger
170
+ */
59
171
export const stagger = AnimatedImplementation.stagger;
172
+
173
+ /**
174
+ * Creates a new Animated value composed by subtracting the second Animated
175
+ * value from the first Animated value.
176
+ *
177
+ * See https://reactnative.dev/docs/animated#subtract
178
+ */
60
179
export const subtract = AnimatedImplementation.subtract;
180
+
181
+ /**
182
+ * Animates a value along a timed easing curve. The Easing module has tons of
183
+ * predefined curves, or you can use your own function.
184
+ *
185
+ * See https://reactnative.dev/docs/animated#timing
186
+ */
61
187
export const timing = AnimatedImplementation.timing;
62
188
export const unforkEvent = AnimatedImplementation.unforkEvent;
0 commit comments