@hanzogui/animations-react-native 8.3.1 → 8.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/createAnimations.js +634 -0
- package/dist/cjs/createAnimations.js.map +1 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/polyfill.js +7 -0
- package/dist/cjs/polyfill.js.map +1 -0
- package/dist/esm/createAnimations.js +625 -0
- package/dist/esm/createAnimations.js.map +1 -0
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/polyfill.js +7 -0
- package/dist/esm/polyfill.js.map +1 -0
- package/package.json +24 -19
- package/src/index.ts +2 -2
- package/types/createAnimations.d.ts +9 -8
- package/types/createAnimations.d.ts.map +1 -11
- package/types/index.d.ts +2 -3
- package/types/index.d.ts.map +1 -11
- package/types/polyfill.d.ts +0 -1
- package/types/polyfill.d.ts.map +1 -11
- package/dist/cjs/createAnimations.cjs +0 -566
- package/dist/cjs/createAnimations.native.js +0 -648
- package/dist/cjs/createAnimations.native.js.map +0 -1
- package/dist/cjs/index.cjs +0 -21
- package/dist/cjs/index.native.js +0 -24
- package/dist/cjs/index.native.js.map +0 -1
- package/dist/cjs/polyfill.cjs +0 -3
- package/dist/cjs/polyfill.native.js +0 -6
- package/dist/cjs/polyfill.native.js.map +0 -1
- package/dist/esm/createAnimations.mjs +0 -524
- package/dist/esm/createAnimations.mjs.map +0 -1
- package/dist/esm/createAnimations.native.js +0 -603
- package/dist/esm/createAnimations.native.js.map +0 -1
- package/dist/esm/index.mjs +0 -3
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js +0 -3
- package/dist/esm/index.native.js.map +0 -1
- package/dist/esm/polyfill.mjs +0 -4
- package/dist/esm/polyfill.mjs.map +0 -1
- package/dist/esm/polyfill.native.js +0 -4
- package/dist/esm/polyfill.native.js.map +0 -1
|
@@ -0,0 +1,625 @@
|
|
|
1
|
+
import { getEffectiveAnimation, normalizeTransition } from '@hanzogui/animation-helpers';
|
|
2
|
+
import { isWeb, useIsomorphicLayoutEffect } from '@hanzogui/constants';
|
|
3
|
+
import { ResetPresence, usePresence } from '@hanzogui/use-presence';
|
|
4
|
+
import { useEvent, useThemeWithState } from '@hanzogui/web';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { Animated } from 'react-native';
|
|
7
|
+
// detect Fabric (New Architecture) — Paper doesn't support native driver for all style keys
|
|
8
|
+
const isFabric = !isWeb && typeof global !== 'undefined' && !!global.__nativeFabricUIManager;
|
|
9
|
+
// Helper to resolve dynamic theme values like {dynamic: {dark: "value", light: undefined}}
|
|
10
|
+
const resolveDynamicValue = (value, isDark) => {
|
|
11
|
+
if (value && typeof value === 'object' && 'dynamic' in value) {
|
|
12
|
+
const dynamicValue = isDark ? value.dynamic.dark : value.dynamic.light;
|
|
13
|
+
return dynamicValue;
|
|
14
|
+
}
|
|
15
|
+
return value;
|
|
16
|
+
};
|
|
17
|
+
const animatedStyleKey = {
|
|
18
|
+
transform: true,
|
|
19
|
+
opacity: true,
|
|
20
|
+
};
|
|
21
|
+
const colorStyleKey = {
|
|
22
|
+
backgroundColor: true,
|
|
23
|
+
color: true,
|
|
24
|
+
borderColor: true,
|
|
25
|
+
borderLeftColor: true,
|
|
26
|
+
borderRightColor: true,
|
|
27
|
+
borderTopColor: true,
|
|
28
|
+
borderBottomColor: true,
|
|
29
|
+
};
|
|
30
|
+
// layout dimension keys. these must run on the JS driver (useNativeDriver:false)
|
|
31
|
+
// because the native animated module can't drive layout props.
|
|
32
|
+
const layoutStyleKey = {
|
|
33
|
+
height: true,
|
|
34
|
+
width: true,
|
|
35
|
+
minHeight: true,
|
|
36
|
+
maxHeight: true,
|
|
37
|
+
minWidth: true,
|
|
38
|
+
maxWidth: true,
|
|
39
|
+
};
|
|
40
|
+
function hasAnimatedLayoutKey(style, isDark, animateOnly) {
|
|
41
|
+
for (const key in layoutStyleKey) {
|
|
42
|
+
if (animateOnly && !animateOnly.includes(key))
|
|
43
|
+
continue;
|
|
44
|
+
if (typeof resolveDynamicValue(style[key], isDark) === 'number')
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
// a color string that RN's color interpolation can actually parse. var(...),
|
|
50
|
+
// calc(...) and empty strings reach createInterpolationFromStringOutputRange /
|
|
51
|
+
// mapStringToNumericComponents and throw ('.map of null' / 'outputRange must
|
|
52
|
+
// contain color or value with numeric component'). those must be applied as a
|
|
53
|
+
// static style instead of entering interpolation.
|
|
54
|
+
function isAnimatableColor(value) {
|
|
55
|
+
if (typeof value !== 'string')
|
|
56
|
+
return false;
|
|
57
|
+
if (value === '')
|
|
58
|
+
return false;
|
|
59
|
+
if (value.includes('var(') || value.includes('calc('))
|
|
60
|
+
return false;
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
// these style keys are costly to animate and only work with native driver on Fabric
|
|
64
|
+
const costlyToAnimateStyleKey = {
|
|
65
|
+
borderRadius: true,
|
|
66
|
+
borderTopLeftRadius: true,
|
|
67
|
+
borderTopRightRadius: true,
|
|
68
|
+
borderBottomLeftRadius: true,
|
|
69
|
+
borderBottomRightRadius: true,
|
|
70
|
+
borderWidth: true,
|
|
71
|
+
borderLeftWidth: true,
|
|
72
|
+
borderRightWidth: true,
|
|
73
|
+
borderTopWidth: true,
|
|
74
|
+
borderBottomWidth: true,
|
|
75
|
+
...colorStyleKey,
|
|
76
|
+
};
|
|
77
|
+
export const AnimatedView = Animated.View;
|
|
78
|
+
export const AnimatedText = Animated.Text;
|
|
79
|
+
export function useAnimatedNumber(initial) {
|
|
80
|
+
const state = React.useRef(null);
|
|
81
|
+
if (!state.current) {
|
|
82
|
+
state.current = {
|
|
83
|
+
composite: null,
|
|
84
|
+
val: new Animated.Value(initial),
|
|
85
|
+
strategy: { type: 'spring' },
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
getInstance() {
|
|
90
|
+
return state.current.val;
|
|
91
|
+
},
|
|
92
|
+
getValue() {
|
|
93
|
+
return state.current.val['_value'];
|
|
94
|
+
},
|
|
95
|
+
stop() {
|
|
96
|
+
state.current.composite?.stop();
|
|
97
|
+
state.current.composite = null;
|
|
98
|
+
},
|
|
99
|
+
setValue(next, { type, ...config } = { type: 'spring' }, onFinish) {
|
|
100
|
+
const val = state.current.val;
|
|
101
|
+
const handleFinish = onFinish
|
|
102
|
+
? ({ finished }) => (finished ? onFinish() : null)
|
|
103
|
+
: undefined;
|
|
104
|
+
if (type === 'direct') {
|
|
105
|
+
val.setValue(next);
|
|
106
|
+
}
|
|
107
|
+
else if (type === 'spring') {
|
|
108
|
+
state.current.composite?.stop();
|
|
109
|
+
const composite = Animated.spring(val, {
|
|
110
|
+
...config,
|
|
111
|
+
toValue: next,
|
|
112
|
+
useNativeDriver: isFabric,
|
|
113
|
+
});
|
|
114
|
+
composite.start(handleFinish);
|
|
115
|
+
state.current.composite = composite;
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
state.current.composite?.stop();
|
|
119
|
+
const composite = Animated.timing(val, {
|
|
120
|
+
...config,
|
|
121
|
+
toValue: next,
|
|
122
|
+
useNativeDriver: isFabric,
|
|
123
|
+
});
|
|
124
|
+
composite.start(handleFinish);
|
|
125
|
+
state.current.composite = composite;
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
export const useAnimatedNumberReaction = ({ value }, onValue) => {
|
|
131
|
+
const onChange = useEvent((current) => {
|
|
132
|
+
onValue(current.value);
|
|
133
|
+
});
|
|
134
|
+
React.useEffect(() => {
|
|
135
|
+
const id = value.getInstance().addListener(onChange);
|
|
136
|
+
return () => {
|
|
137
|
+
value.getInstance().removeListener(id);
|
|
138
|
+
};
|
|
139
|
+
}, [value, onChange]);
|
|
140
|
+
};
|
|
141
|
+
export const useAnimatedNumberStyle = (value, getStyle) => {
|
|
142
|
+
return getStyle(value.getInstance());
|
|
143
|
+
};
|
|
144
|
+
export const useAnimatedNumbersStyle = (vals, getStyle) => {
|
|
145
|
+
return getStyle(...vals.map((v) => v.getInstance()));
|
|
146
|
+
};
|
|
147
|
+
export function createAnimations(animations, options) {
|
|
148
|
+
const nativeDriver = options?.useNativeDriver ?? isFabric;
|
|
149
|
+
return {
|
|
150
|
+
isReactNative: true,
|
|
151
|
+
inputStyle: 'value',
|
|
152
|
+
outputStyle: 'inline',
|
|
153
|
+
avoidReRenders: true,
|
|
154
|
+
animations,
|
|
155
|
+
needsCustomComponent: true,
|
|
156
|
+
View: AnimatedView,
|
|
157
|
+
Text: AnimatedText,
|
|
158
|
+
useAnimatedNumber,
|
|
159
|
+
useAnimatedNumberReaction,
|
|
160
|
+
useAnimatedNumberStyle,
|
|
161
|
+
useAnimatedNumbersStyle,
|
|
162
|
+
usePresence,
|
|
163
|
+
ResetPresence,
|
|
164
|
+
useAnimations: ({ props, onDidAnimate, style, componentState, presence, stateRef, useStyleEmitter, }) => {
|
|
165
|
+
const isDisabled = isWeb && componentState.unmounted === true;
|
|
166
|
+
const isExiting = presence?.[0] === false;
|
|
167
|
+
const sendExitComplete = presence?.[1];
|
|
168
|
+
const [, themeState] = useThemeWithState({});
|
|
169
|
+
// Check scheme first, then fall back to checking theme name for 'dark'
|
|
170
|
+
const isDark = themeState?.scheme === 'dark' || themeState?.name?.startsWith('dark');
|
|
171
|
+
/** store Animated value of each key e.g: color: AnimatedValue */
|
|
172
|
+
const animateStyles = React.useRef({});
|
|
173
|
+
const animatedTranforms = React.useRef([]);
|
|
174
|
+
const animationsState = React.useRef(new WeakMap());
|
|
175
|
+
const pseudoActiveRef = React.useRef(false);
|
|
176
|
+
// exit cycle guards to prevent stale/duplicate completion
|
|
177
|
+
const exitCycleIdRef = React.useRef(0);
|
|
178
|
+
const exitCompletedRef = React.useRef(false);
|
|
179
|
+
const wasExitingRef = React.useRef(false);
|
|
180
|
+
// detect transition into/out of exiting state
|
|
181
|
+
const justStartedExiting = isExiting && !wasExitingRef.current;
|
|
182
|
+
const justStoppedExiting = !isExiting && wasExitingRef.current;
|
|
183
|
+
// start new exit cycle only on transition INTO exiting
|
|
184
|
+
if (justStartedExiting) {
|
|
185
|
+
exitCycleIdRef.current++;
|
|
186
|
+
exitCompletedRef.current = false;
|
|
187
|
+
}
|
|
188
|
+
// invalidate pending callbacks when exit is canceled/interrupted
|
|
189
|
+
if (justStoppedExiting) {
|
|
190
|
+
exitCycleIdRef.current++;
|
|
191
|
+
}
|
|
192
|
+
const animateOnly = props.animateOnly || [];
|
|
193
|
+
const hasTransitionOnly = !!props.animateOnly;
|
|
194
|
+
// Track if we just finished entering (transition from entering to not entering)
|
|
195
|
+
// must be declared before args array that uses justFinishedEntering
|
|
196
|
+
const isEntering = !!componentState.unmounted;
|
|
197
|
+
const wasEnteringRef = React.useRef(isEntering);
|
|
198
|
+
const justFinishedEntering = wasEnteringRef.current && !isEntering;
|
|
199
|
+
React.useEffect(() => {
|
|
200
|
+
wasEnteringRef.current = isEntering;
|
|
201
|
+
});
|
|
202
|
+
const args = [
|
|
203
|
+
JSON.stringify(style),
|
|
204
|
+
componentState,
|
|
205
|
+
isExiting,
|
|
206
|
+
!!onDidAnimate,
|
|
207
|
+
isDark,
|
|
208
|
+
justFinishedEntering,
|
|
209
|
+
hasTransitionOnly,
|
|
210
|
+
];
|
|
211
|
+
const res = React.useMemo(() => {
|
|
212
|
+
const runners = [];
|
|
213
|
+
const completions = [];
|
|
214
|
+
// Determine animation state for enter/exit transitions
|
|
215
|
+
// Use 'enter' if we're entering OR if we just finished entering
|
|
216
|
+
const animationState = isExiting
|
|
217
|
+
? 'exit'
|
|
218
|
+
: isEntering || justFinishedEntering
|
|
219
|
+
? 'enter'
|
|
220
|
+
: 'default';
|
|
221
|
+
const nonAnimatedStyle = {};
|
|
222
|
+
// animatedStyle owns every Animated.Value on the node. Fabric cannot mix
|
|
223
|
+
// native- and JS-driven values inside that shared graph, so one layout
|
|
224
|
+
// animation makes the whole node use the JS driver.
|
|
225
|
+
const useNativeDriverForNode = nativeDriver &&
|
|
226
|
+
!hasAnimatedLayoutKey(style, isDark, hasTransitionOnly ? animateOnly : undefined);
|
|
227
|
+
// track which animated keys/transforms the incoming style actually
|
|
228
|
+
// carries this pass, so entries that left the style can be dropped
|
|
229
|
+
// below (an Animated.Value that persisted forever would keep painting
|
|
230
|
+
// a stale pixel value, e.g. a released-to-auto accordion height)
|
|
231
|
+
const seenAnimateKeys = new Set();
|
|
232
|
+
let sawTransform = false;
|
|
233
|
+
let transformCount = 0;
|
|
234
|
+
for (const key in style) {
|
|
235
|
+
const rawVal = style[key];
|
|
236
|
+
// Resolve dynamic theme values (like $theme-dark)
|
|
237
|
+
const val = resolveDynamicValue(rawVal, isDark);
|
|
238
|
+
if (val === undefined)
|
|
239
|
+
continue;
|
|
240
|
+
if (isDisabled) {
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
if (animatedStyleKey[key] == null &&
|
|
244
|
+
!costlyToAnimateStyleKey[key] &&
|
|
245
|
+
!layoutStyleKey[key]) {
|
|
246
|
+
nonAnimatedStyle[key] = val;
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
if (hasTransitionOnly && !animateOnly.includes(key)) {
|
|
250
|
+
nonAnimatedStyle[key] = val;
|
|
251
|
+
continue;
|
|
252
|
+
}
|
|
253
|
+
// layout dimension keys only animate numbers — 'auto' (an open
|
|
254
|
+
// accordion at rest) and percent strings apply as static styles
|
|
255
|
+
if (layoutStyleKey[key] && typeof val !== 'number') {
|
|
256
|
+
nonAnimatedStyle[key] = val;
|
|
257
|
+
continue;
|
|
258
|
+
}
|
|
259
|
+
// unparseable themed colors (var(), calc(), empty) crash RN
|
|
260
|
+
// interpolation — apply them as a static style instead
|
|
261
|
+
if (colorStyleKey[key] && !isAnimatableColor(val)) {
|
|
262
|
+
nonAnimatedStyle[key] = val;
|
|
263
|
+
continue;
|
|
264
|
+
}
|
|
265
|
+
if (key !== 'transform') {
|
|
266
|
+
animateStyles.current[key] = update(key, animateStyles.current[key], val);
|
|
267
|
+
seenAnimateKeys.add(key);
|
|
268
|
+
continue;
|
|
269
|
+
}
|
|
270
|
+
// key: 'transform'
|
|
271
|
+
// for now just support one transform key
|
|
272
|
+
if (!val)
|
|
273
|
+
continue;
|
|
274
|
+
if (typeof val === 'string') {
|
|
275
|
+
console.warn(`Warning: Gui can't animate string transforms yet!`);
|
|
276
|
+
continue;
|
|
277
|
+
}
|
|
278
|
+
sawTransform = true;
|
|
279
|
+
for (const transform of val) {
|
|
280
|
+
if (!transform)
|
|
281
|
+
continue;
|
|
282
|
+
const index = transformCount++;
|
|
283
|
+
// tkey: e.g: 'translateX'
|
|
284
|
+
const tkey = Object.keys(transform)[0];
|
|
285
|
+
const currentTransform = animatedTranforms.current[index]?.[tkey];
|
|
286
|
+
animatedTranforms.current[index] = {
|
|
287
|
+
[tkey]: update(tkey, currentTransform, transform[tkey]),
|
|
288
|
+
};
|
|
289
|
+
animatedTranforms.current = [...animatedTranforms.current];
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
// drop stale Animated.Values whose keys left the incoming style, so the
|
|
293
|
+
// key genuinely leaves the rendered style object (a released height goes
|
|
294
|
+
// back to auto instead of staying pinned at its last pixel value). skip
|
|
295
|
+
// while exiting (presence still animates the leaving keys) and while
|
|
296
|
+
// disabled (the loop above intentionally skips every key). an active
|
|
297
|
+
// pseudo owns the current emitted style until its matching release.
|
|
298
|
+
if (!isExiting && !isDisabled && !pseudoActiveRef.current) {
|
|
299
|
+
for (const k in animateStyles.current) {
|
|
300
|
+
if (!seenAnimateKeys.has(k))
|
|
301
|
+
delete animateStyles.current[k];
|
|
302
|
+
}
|
|
303
|
+
if (!sawTransform) {
|
|
304
|
+
if (animatedTranforms.current.length)
|
|
305
|
+
animatedTranforms.current = [];
|
|
306
|
+
}
|
|
307
|
+
else if (animatedTranforms.current.length > transformCount) {
|
|
308
|
+
animatedTranforms.current = animatedTranforms.current.slice(0, transformCount);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
const animatedTransformStyle = animatedTranforms.current.length > 0
|
|
312
|
+
? {
|
|
313
|
+
transform: animatedTranforms.current.map((r) => {
|
|
314
|
+
const key = Object.keys(r)[0];
|
|
315
|
+
const val = animationsState.current.get(r[key])?.interpolation || r[key];
|
|
316
|
+
return { [key]: val };
|
|
317
|
+
}),
|
|
318
|
+
}
|
|
319
|
+
: {};
|
|
320
|
+
const animatedStyle = {
|
|
321
|
+
...Object.fromEntries(Object.entries(animateStyles.current).map(([k, v]) => [
|
|
322
|
+
k,
|
|
323
|
+
animationsState.current.get(v)?.interpolation || v,
|
|
324
|
+
])),
|
|
325
|
+
...animatedTransformStyle,
|
|
326
|
+
};
|
|
327
|
+
return {
|
|
328
|
+
runners,
|
|
329
|
+
completions,
|
|
330
|
+
style: [nonAnimatedStyle, animatedStyle],
|
|
331
|
+
};
|
|
332
|
+
function update(key, animated, valIn) {
|
|
333
|
+
const isColorStyleKey = colorStyleKey[key];
|
|
334
|
+
const [val, type] = isColorStyleKey ? [0, undefined] : getValue(valIn);
|
|
335
|
+
let animateToValue = val;
|
|
336
|
+
const value = animated || new Animated.Value(val);
|
|
337
|
+
const curInterpolation = animationsState.current.get(value);
|
|
338
|
+
let interpolateArgs;
|
|
339
|
+
if (type) {
|
|
340
|
+
interpolateArgs = getInterpolated(curInterpolation?.current ?? value['_value'], val, type);
|
|
341
|
+
animationsState.current.set(value, {
|
|
342
|
+
interpolation: value.interpolate(interpolateArgs),
|
|
343
|
+
current: val,
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
if (isColorStyleKey) {
|
|
347
|
+
animateToValue = curInterpolation?.animateToValue ? 0 : 1;
|
|
348
|
+
interpolateArgs = getColorInterpolated(curInterpolation?.current,
|
|
349
|
+
// valIn is the next color
|
|
350
|
+
valIn, animateToValue);
|
|
351
|
+
animationsState.current.set(value, {
|
|
352
|
+
current: valIn,
|
|
353
|
+
interpolation: value.interpolate(interpolateArgs),
|
|
354
|
+
animateToValue: curInterpolation?.animateToValue ? 0 : 1,
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
if (value) {
|
|
358
|
+
const animationConfig = getAnimationConfig(key, animations, props.transition, animationState);
|
|
359
|
+
let resolve;
|
|
360
|
+
const promise = new Promise((res) => {
|
|
361
|
+
resolve = res;
|
|
362
|
+
});
|
|
363
|
+
completions.push(promise);
|
|
364
|
+
runners.push(() => {
|
|
365
|
+
value.stopAnimation();
|
|
366
|
+
function getAnimation() {
|
|
367
|
+
return Animated[animationConfig.type || 'spring'](value, {
|
|
368
|
+
toValue: animateToValue,
|
|
369
|
+
...animationConfig,
|
|
370
|
+
useNativeDriver: useNativeDriverForNode,
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
const animation = animationConfig.delay
|
|
374
|
+
? Animated.sequence([
|
|
375
|
+
Animated.delay(animationConfig.delay),
|
|
376
|
+
getAnimation(),
|
|
377
|
+
])
|
|
378
|
+
: getAnimation();
|
|
379
|
+
animation.start(({ finished }) => {
|
|
380
|
+
// always resolve during exit (element is leaving anyway)
|
|
381
|
+
// for non-exit, only resolve on successful completion
|
|
382
|
+
if (finished || isExiting) {
|
|
383
|
+
resolve();
|
|
384
|
+
}
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
}
|
|
388
|
+
if (process.env.NODE_ENV === 'development') {
|
|
389
|
+
if (props['debug'] === 'verbose') {
|
|
390
|
+
// prettier-ignore
|
|
391
|
+
console.info(' 💠 animate', key, `from (${value['_value']}) to`, valIn, `(${val})`, 'type', type, 'interpolate', interpolateArgs);
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
return value;
|
|
395
|
+
}
|
|
396
|
+
}, args);
|
|
397
|
+
// track previous exiting state
|
|
398
|
+
React.useEffect(() => {
|
|
399
|
+
wasExitingRef.current = isExiting;
|
|
400
|
+
});
|
|
401
|
+
useIsomorphicLayoutEffect(() => {
|
|
402
|
+
res.runners.forEach((r) => r());
|
|
403
|
+
// capture current cycle id
|
|
404
|
+
const cycleId = exitCycleIdRef.current;
|
|
405
|
+
// handle zero-completion case immediately
|
|
406
|
+
if (res.completions.length === 0) {
|
|
407
|
+
onDidAnimate?.();
|
|
408
|
+
if (isExiting && !exitCompletedRef.current) {
|
|
409
|
+
exitCompletedRef.current = true;
|
|
410
|
+
sendExitComplete?.();
|
|
411
|
+
}
|
|
412
|
+
return;
|
|
413
|
+
}
|
|
414
|
+
let cancel = false;
|
|
415
|
+
Promise.all(res.completions).then(() => {
|
|
416
|
+
if (cancel)
|
|
417
|
+
return;
|
|
418
|
+
// guard against stale cycle completion
|
|
419
|
+
if (isExiting && cycleId !== exitCycleIdRef.current)
|
|
420
|
+
return;
|
|
421
|
+
if (isExiting && exitCompletedRef.current)
|
|
422
|
+
return;
|
|
423
|
+
onDidAnimate?.();
|
|
424
|
+
if (isExiting) {
|
|
425
|
+
exitCompletedRef.current = true;
|
|
426
|
+
sendExitComplete?.();
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
return () => {
|
|
430
|
+
cancel = true;
|
|
431
|
+
};
|
|
432
|
+
}, args);
|
|
433
|
+
// avoidReRenders: receive style changes imperatively from hanzogui
|
|
434
|
+
// and update Animated.Values directly without React re-renders
|
|
435
|
+
// reuses the same update() + runner pattern as the useMemo path
|
|
436
|
+
useStyleEmitter?.((nextStyle, _effectiveTransition, pseudoActive) => {
|
|
437
|
+
pseudoActiveRef.current = pseudoActive === true;
|
|
438
|
+
const runners = [];
|
|
439
|
+
const seenAnimateKeys = new Set();
|
|
440
|
+
let transformCount = 0;
|
|
441
|
+
let animatedShapeChanged = false;
|
|
442
|
+
// nextStyle is the complete style for this node, so the emitter makes
|
|
443
|
+
// the same single driver decision as the render path. include the
|
|
444
|
+
// currently rendered graph because its stale keys are not removed until
|
|
445
|
+
// the structural-change commit below.
|
|
446
|
+
const useNativeDriverForNode = nativeDriver &&
|
|
447
|
+
!hasAnimatedLayoutKey(nextStyle, isDark) &&
|
|
448
|
+
!Object.keys(animateStyles.current).some((key) => layoutStyleKey[key]);
|
|
449
|
+
for (const key in nextStyle) {
|
|
450
|
+
const rawVal = nextStyle[key];
|
|
451
|
+
const val = resolveDynamicValue(rawVal, isDark);
|
|
452
|
+
if (val === undefined)
|
|
453
|
+
continue;
|
|
454
|
+
if (key === 'transform' && Array.isArray(val)) {
|
|
455
|
+
for (const transform of val) {
|
|
456
|
+
if (!transform)
|
|
457
|
+
continue;
|
|
458
|
+
const index = transformCount++;
|
|
459
|
+
const tkey = Object.keys(transform)[0];
|
|
460
|
+
const currentTransform = animatedTranforms.current[index]?.[tkey];
|
|
461
|
+
if (!currentTransform)
|
|
462
|
+
animatedShapeChanged = true;
|
|
463
|
+
animatedTranforms.current[index] = {
|
|
464
|
+
[tkey]: update(tkey, currentTransform, transform[tkey]),
|
|
465
|
+
};
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
else if (animatedStyleKey[key] != null ||
|
|
469
|
+
costlyToAnimateStyleKey[key] ||
|
|
470
|
+
layoutStyleKey[key]) {
|
|
471
|
+
// layout keys only animate numbers ('auto'/percents are static);
|
|
472
|
+
// unparseable themed colors can't be interpolated — skip both and
|
|
473
|
+
// let the next render apply them statically
|
|
474
|
+
if (layoutStyleKey[key] && typeof val !== 'number')
|
|
475
|
+
continue;
|
|
476
|
+
if (colorStyleKey[key] && !isAnimatableColor(val))
|
|
477
|
+
continue;
|
|
478
|
+
if (!animateStyles.current[key])
|
|
479
|
+
animatedShapeChanged = true;
|
|
480
|
+
animateStyles.current[key] = update(key, animateStyles.current[key], val);
|
|
481
|
+
seenAnimateKeys.add(key);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
// the emitter receives a complete style. keep the Animated style graph
|
|
485
|
+
// equally complete, including a pseudo release that omits a pseudo-only
|
|
486
|
+
// key. React Native needs a commit when that graph's shape changes.
|
|
487
|
+
for (const key in animateStyles.current) {
|
|
488
|
+
if (!seenAnimateKeys.has(key)) {
|
|
489
|
+
delete animateStyles.current[key];
|
|
490
|
+
animatedShapeChanged = true;
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
if (animatedTranforms.current.length > transformCount) {
|
|
494
|
+
animatedTranforms.current = animatedTranforms.current.slice(0, transformCount);
|
|
495
|
+
animatedShapeChanged = true;
|
|
496
|
+
}
|
|
497
|
+
// run the queued animations immediately
|
|
498
|
+
runners.forEach((r) => r());
|
|
499
|
+
// pseudo state normally stays on the avoidReRenders path. adding or
|
|
500
|
+
// removing a style key cannot be expressed by an existing Animated.Value,
|
|
501
|
+
// so commit the pending state only for that structural change.
|
|
502
|
+
if (animatedShapeChanged && stateRef.current.nextState) {
|
|
503
|
+
stateRef.current.baseSetStateShallow?.(stateRef.current.nextState);
|
|
504
|
+
}
|
|
505
|
+
function update(key, animated, valIn) {
|
|
506
|
+
const isColor = colorStyleKey[key];
|
|
507
|
+
const [numVal, type] = isColor ? [0, undefined] : getValue(valIn);
|
|
508
|
+
let animateToValue = numVal;
|
|
509
|
+
const value = animated || new Animated.Value(numVal);
|
|
510
|
+
const curInterpolation = animationsState.current.get(value);
|
|
511
|
+
if (type) {
|
|
512
|
+
animationsState.current.set(value, {
|
|
513
|
+
interpolation: value.interpolate(getInterpolated(curInterpolation?.current ?? value['_value'], numVal, type)),
|
|
514
|
+
current: numVal,
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
if (isColor) {
|
|
518
|
+
animateToValue = curInterpolation?.animateToValue ? 0 : 1;
|
|
519
|
+
animationsState.current.set(value, {
|
|
520
|
+
current: valIn,
|
|
521
|
+
interpolation: value.interpolate(getColorInterpolated(curInterpolation?.current, valIn, animateToValue)),
|
|
522
|
+
animateToValue: curInterpolation?.animateToValue ? 0 : 1,
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
const animationConfig = getAnimationConfig(key, animations, props.transition, 'default');
|
|
526
|
+
runners.push(() => {
|
|
527
|
+
value.stopAnimation();
|
|
528
|
+
const anim = Animated[animationConfig.type || 'spring'](value, {
|
|
529
|
+
toValue: animateToValue,
|
|
530
|
+
...animationConfig,
|
|
531
|
+
useNativeDriver: useNativeDriverForNode,
|
|
532
|
+
});
|
|
533
|
+
(animationConfig.delay
|
|
534
|
+
? Animated.sequence([Animated.delay(animationConfig.delay), anim])
|
|
535
|
+
: anim).start();
|
|
536
|
+
});
|
|
537
|
+
return value;
|
|
538
|
+
}
|
|
539
|
+
});
|
|
540
|
+
if (process.env.NODE_ENV === 'development') {
|
|
541
|
+
if (props['debug'] === 'verbose') {
|
|
542
|
+
console.info(`Animated`, { response: res, inputStyle: style, isExiting });
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
return res;
|
|
546
|
+
},
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
function getColorInterpolated(currentColor, nextColor, animateToValue) {
|
|
550
|
+
const inputRange = [0, 1];
|
|
551
|
+
const outputRange = [currentColor ? currentColor : nextColor, nextColor];
|
|
552
|
+
if (animateToValue === 0) {
|
|
553
|
+
// because we are animating from value 1 to 0, we need to put target color at the beginning
|
|
554
|
+
outputRange.reverse();
|
|
555
|
+
}
|
|
556
|
+
return {
|
|
557
|
+
inputRange,
|
|
558
|
+
outputRange,
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
function getInterpolated(current, next, postfix = 'deg') {
|
|
562
|
+
if (next === current) {
|
|
563
|
+
current = next - 0.000000001;
|
|
564
|
+
}
|
|
565
|
+
const inputRange = [current, next];
|
|
566
|
+
const outputRange = [`${current}${postfix}`, `${next}${postfix}`];
|
|
567
|
+
if (next < current) {
|
|
568
|
+
inputRange.reverse();
|
|
569
|
+
outputRange.reverse();
|
|
570
|
+
}
|
|
571
|
+
return {
|
|
572
|
+
inputRange,
|
|
573
|
+
outputRange,
|
|
574
|
+
};
|
|
575
|
+
}
|
|
576
|
+
function getAnimationConfig(key, animations, transition, animationState = 'default') {
|
|
577
|
+
const normalized = normalizeTransition(transition);
|
|
578
|
+
const shortKey = transformShorthands[key];
|
|
579
|
+
// Check for property-specific animation
|
|
580
|
+
const propAnimation = normalized.properties[key] ?? normalized.properties[shortKey];
|
|
581
|
+
let animationType = null;
|
|
582
|
+
let extraConf = {};
|
|
583
|
+
if (typeof propAnimation === 'string') {
|
|
584
|
+
// Direct animation name: { x: 'quick' }
|
|
585
|
+
animationType = propAnimation;
|
|
586
|
+
}
|
|
587
|
+
else if (propAnimation && typeof propAnimation === 'object') {
|
|
588
|
+
// Config object: { x: { type: 'quick', delay: 100 } }
|
|
589
|
+
// Use effective animation based on state if no explicit type in config
|
|
590
|
+
animationType =
|
|
591
|
+
propAnimation.type || getEffectiveAnimation(normalized, animationState);
|
|
592
|
+
extraConf = propAnimation;
|
|
593
|
+
}
|
|
594
|
+
else {
|
|
595
|
+
// Fall back to effective animation based on state (enter/exit/default)
|
|
596
|
+
animationType = getEffectiveAnimation(normalized, animationState);
|
|
597
|
+
}
|
|
598
|
+
// Apply global delay if no property-specific delay
|
|
599
|
+
if (normalized.delay && !extraConf.delay) {
|
|
600
|
+
extraConf = { ...extraConf, delay: normalized.delay };
|
|
601
|
+
}
|
|
602
|
+
const found = animationType ? animations[animationType] : {};
|
|
603
|
+
return {
|
|
604
|
+
...found,
|
|
605
|
+
// Apply global spring config overrides (from transition={['bouncy', { stiffness: 1000 }]})
|
|
606
|
+
...normalized.config,
|
|
607
|
+
// Property-specific config takes highest precedence
|
|
608
|
+
...extraConf,
|
|
609
|
+
};
|
|
610
|
+
}
|
|
611
|
+
// try both combos
|
|
612
|
+
const transformShorthands = {
|
|
613
|
+
x: 'translateX',
|
|
614
|
+
y: 'translateY',
|
|
615
|
+
translateX: 'x',
|
|
616
|
+
translateY: 'y',
|
|
617
|
+
};
|
|
618
|
+
function getValue(input, isColor = false) {
|
|
619
|
+
if (typeof input !== 'string') {
|
|
620
|
+
return [input];
|
|
621
|
+
}
|
|
622
|
+
const [_, number, after] = input.match(/([-0-9]+)(deg|%|px)/) ?? [];
|
|
623
|
+
return [+number, after];
|
|
624
|
+
}
|
|
625
|
+
//# sourceMappingURL=createAnimations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createAnimations.js","sourceRoot":"","sources":["../../src/createAnimations.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AACxF,OAAO,EAAE,KAAK,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAA;AACtE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AASnE,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAwB,MAAM,cAAc,CAAA;AAE7D,4FAA4F;AAC5F,MAAM,QAAQ,GACZ,CAAC,KAAK,IAAI,OAAO,MAAM,KAAK,WAAW,IAAI,CAAC,CAAC,MAAM,CAAC,uBAAuB,CAAA;AAE7E,2FAA2F;AAC3F,MAAM,mBAAmB,GAAG,CAAC,KAAU,EAAE,MAAe,EAAO,EAAE;IAC/D,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,IAAI,KAAK,EAAE,CAAC;QAC7D,MAAM,YAAY,GAAG,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAA;QACtE,OAAO,YAAY,CAAA;IACrB,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAwBD,MAAM,gBAAgB,GAAG;IACvB,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,IAAI;CACd,CAAA;AAED,MAAM,aAAa,GAAG;IACpB,eAAe,EAAE,IAAI;IACrB,KAAK,EAAE,IAAI;IACX,WAAW,EAAE,I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