@hanzogui/animations-reanimated 3.0.6 → 4.4.0

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.
@@ -1,188 +1,218 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { normalizeTransition, getEffectiveAnimation } from "@hanzogui/animation-helpers";
2
+ import { getEffectiveAnimation, normalizeTransition } from "@hanzogui/animation-helpers";
3
3
  import { getSplitStyles, hooks, isWeb, Text, useComposedRefs, useEvent, useIsomorphicLayoutEffect, useThemeWithState, View } from "@hanzogui/core";
4
4
  import { ResetPresence, usePresence } from "@hanzogui/use-presence";
5
5
  import React, { forwardRef, useMemo, useRef } from "react";
6
- import Animated_, { cancelAnimation, runOnJS, useAnimatedReaction, useAnimatedStyle, useDerivedValue, useSharedValue, withDelay, withSpring, withTiming } from "react-native-reanimated";
6
+ import Animated_, { cancelAnimation, runOnJS, runOnUI, useAnimatedReaction, useAnimatedStyle, useDerivedValue, useSharedValue, withDelay, withSpring, withTiming } from "react-native-reanimated";
7
7
  function _type_of(obj) {
8
8
  "@swc/helpers - typeof";
9
9
 
10
- return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
10
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
11
11
  }
12
12
  var getDefaultExport = function (module) {
13
- var mod = module;
14
- return (mod.__esModule || mod[Symbol.toStringTag] === "Module") && mod.default || mod;
15
- },
16
- Animated = getDefaultExport(Animated_),
17
- resolveDynamicValue = function (value, isDark) {
18
- if (value !== null && (typeof value > "u" ? "undefined" : _type_of(value)) === "object" && "dynamic" in value && _type_of(value.dynamic) === "object") {
19
- var dynamic = value.dynamic;
20
- return isDark ? dynamic.dark : dynamic.light;
21
- }
22
- return value;
23
- },
24
- applyAnimation = function (targetValue, config, callback) {
25
- "worklet";
13
+ var mod = module;
14
+ if (mod.__esModule || mod[Symbol.toStringTag] === "Module") {
15
+ return mod.default || mod;
16
+ }
17
+ return mod;
18
+ };
19
+ var Animated = getDefaultExport(Animated_);
20
+ var resolveDynamicValue = function (value, isDark) {
21
+ if (value !== null && (typeof value === "undefined" ? "undefined" : _type_of(value)) === "object" && "dynamic" in value && _type_of(value.dynamic) === "object") {
22
+ var dynamic = value.dynamic;
23
+ return isDark ? dynamic.dark : dynamic.light;
24
+ }
25
+ return value;
26
+ };
27
+ var applyAnimation = function (targetValue, config, callback) {
28
+ "worklet";
26
29
 
27
- var delay = config.delay,
28
- animatedValue;
29
- return config.type === "timing" ? animatedValue = withTiming(targetValue, config, callback) : animatedValue = withSpring(targetValue, config, callback), delay && delay > 0 && (animatedValue = withDelay(delay, animatedValue)), animatedValue;
30
- },
31
- ANIMATABLE_PROPERTIES = {
32
- // Transform
33
- transform: !0,
34
- // Opacity
35
- opacity: !0,
36
- // Dimensions
37
- height: !0,
38
- width: !0,
39
- minWidth: !0,
40
- minHeight: !0,
41
- maxWidth: !0,
42
- maxHeight: !0,
43
- // Background
44
- backgroundColor: !0,
45
- // Border colors
46
- borderColor: !0,
47
- borderLeftColor: !0,
48
- borderRightColor: !0,
49
- borderTopColor: !0,
50
- borderBottomColor: !0,
51
- // Border radius
52
- borderRadius: !0,
53
- borderTopLeftRadius: !0,
54
- borderTopRightRadius: !0,
55
- borderBottomLeftRadius: !0,
56
- borderBottomRightRadius: !0,
57
- // Border width
58
- borderWidth: !0,
59
- borderLeftWidth: !0,
60
- borderRightWidth: !0,
61
- borderTopWidth: !0,
62
- borderBottomWidth: !0,
63
- // Text
64
- color: !0,
65
- fontSize: !0,
66
- fontWeight: !0,
67
- lineHeight: !0,
68
- letterSpacing: !0,
69
- // Position
70
- left: !0,
71
- right: !0,
72
- top: !0,
73
- bottom: !0,
74
- // Margin
75
- margin: !0,
76
- marginTop: !0,
77
- marginBottom: !0,
78
- marginLeft: !0,
79
- marginRight: !0,
80
- marginHorizontal: !0,
81
- marginVertical: !0,
82
- // Padding
83
- padding: !0,
84
- paddingTop: !0,
85
- paddingBottom: !0,
86
- paddingLeft: !0,
87
- paddingRight: !0,
88
- paddingHorizontal: !0,
89
- paddingVertical: !0,
90
- // Flex/Gap
91
- gap: !0,
92
- rowGap: !0,
93
- columnGap: !0,
94
- flex: !0,
95
- flexGrow: !0,
96
- flexShrink: !0
97
- },
98
- canAnimateProperty = function (key, value, animateOnly) {
99
- return !(!ANIMATABLE_PROPERTIES[key] || value === "auto" || typeof value == "string" && value.startsWith("calc") || animateOnly && !animateOnly.includes(key));
100
- };
30
+ var delay = config.delay;
31
+ var animatedValue;
32
+ if (config.type === "timing") {
33
+ animatedValue = withTiming(targetValue, config, callback);
34
+ } else {
35
+ animatedValue = withSpring(targetValue, config, callback);
36
+ }
37
+ if (delay && delay > 0) {
38
+ animatedValue = withDelay(delay, animatedValue);
39
+ }
40
+ return animatedValue;
41
+ };
42
+ var ANIMATABLE_PROPERTIES = {
43
+ // Transform
44
+ transform: true,
45
+ // Opacity
46
+ opacity: true,
47
+ // Dimensions
48
+ height: true,
49
+ width: true,
50
+ minWidth: true,
51
+ minHeight: true,
52
+ maxWidth: true,
53
+ maxHeight: true,
54
+ // Background
55
+ backgroundColor: true,
56
+ // Border colors
57
+ borderColor: true,
58
+ borderLeftColor: true,
59
+ borderRightColor: true,
60
+ borderTopColor: true,
61
+ borderBottomColor: true,
62
+ // Border radius
63
+ borderRadius: true,
64
+ borderTopLeftRadius: true,
65
+ borderTopRightRadius: true,
66
+ borderBottomLeftRadius: true,
67
+ borderBottomRightRadius: true,
68
+ // Border width
69
+ borderWidth: true,
70
+ borderLeftWidth: true,
71
+ borderRightWidth: true,
72
+ borderTopWidth: true,
73
+ borderBottomWidth: true,
74
+ // Text
75
+ color: true,
76
+ fontSize: true,
77
+ fontWeight: true,
78
+ lineHeight: true,
79
+ letterSpacing: true,
80
+ // Position
81
+ left: true,
82
+ right: true,
83
+ top: true,
84
+ bottom: true,
85
+ // Margin
86
+ margin: true,
87
+ marginTop: true,
88
+ marginBottom: true,
89
+ marginLeft: true,
90
+ marginRight: true,
91
+ marginHorizontal: true,
92
+ marginVertical: true,
93
+ // Padding
94
+ padding: true,
95
+ paddingTop: true,
96
+ paddingBottom: true,
97
+ paddingLeft: true,
98
+ paddingRight: true,
99
+ paddingHorizontal: true,
100
+ paddingVertical: true,
101
+ // Flex/Gap
102
+ gap: true,
103
+ rowGap: true,
104
+ columnGap: true,
105
+ flex: true,
106
+ flexGrow: true,
107
+ flexShrink: true
108
+ };
109
+ var canAnimateProperty = function (key, value, animateOnly) {
110
+ if (!ANIMATABLE_PROPERTIES[key]) return false;
111
+ if (value === "auto") return false;
112
+ if (typeof value === "string" && value.startsWith("calc")) return false;
113
+ if (animateOnly && !animateOnly.includes(key)) return false;
114
+ return true;
115
+ };
101
116
  function createWebAnimatedComponent(defaultTag) {
102
- var isText = defaultTag === "span",
103
- Component = Animated.createAnimatedComponent(/* @__PURE__ */forwardRef(function (propsIn, ref) {
104
- var _hooks_usePropsTransform,
105
- {
106
- forwardedRef,
107
- render = defaultTag,
108
- ...rest
109
- } = propsIn,
110
- hostRef = useRef(null),
111
- composedRefs = useComposedRefs(forwardedRef, ref, hostRef),
112
- stateRef = useRef({
113
- get host() {
114
- return hostRef.current;
115
- }
116
- }),
117
- [, themeState] = useThemeWithState({}),
118
- _themeState_theme,
119
- _themeState_name,
120
- result = getSplitStyles(rest, isText ? Text.staticConfig : View.staticConfig, (_themeState_theme = themeState?.theme) !== null && _themeState_theme !== void 0 ? _themeState_theme : {}, (_themeState_name = themeState?.name) !== null && _themeState_name !== void 0 ? _themeState_name : "", {
121
- unmounted: !1
122
- }, {
123
- isAnimated: !1,
124
- noClass: !0
125
- }),
126
- _result_viewProps,
127
- viewProps = (_result_viewProps = result?.viewProps) !== null && _result_viewProps !== void 0 ? _result_viewProps : {},
128
- Element = render,
129
- transformedProps = (_hooks_usePropsTransform = hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(hooks, render, viewProps, stateRef, !1);
130
- return /* @__PURE__ */_jsx(Element, {
131
- ...transformedProps,
132
- ref: composedRefs
133
- });
134
- }));
135
- return Component.acceptRenderProp = !0, Component;
117
+ var isText = defaultTag === "span";
118
+ var Component = Animated.createAnimatedComponent(/* @__PURE__ */forwardRef(function (propsIn, ref) {
119
+ var _hooks_usePropsTransform;
120
+ var {
121
+ forwardedRef,
122
+ render = defaultTag,
123
+ ...rest
124
+ } = propsIn;
125
+ var hostRef = useRef(null);
126
+ var composedRefs = useComposedRefs(forwardedRef, ref, hostRef);
127
+ var stateRef = useRef({
128
+ get host() {
129
+ return hostRef.current;
130
+ }
131
+ });
132
+ var [, themeState] = useThemeWithState({});
133
+ var _themeState_theme, _themeState_name;
134
+ var result = getSplitStyles(rest, isText ? Text.staticConfig : View.staticConfig, (_themeState_theme = themeState === null || themeState === void 0 ? void 0 : themeState.theme) !== null && _themeState_theme !== void 0 ? _themeState_theme : {}, (_themeState_name = themeState === null || themeState === void 0 ? void 0 : themeState.name) !== null && _themeState_name !== void 0 ? _themeState_name : "", {
135
+ unmounted: false
136
+ }, {
137
+ isAnimated: false,
138
+ noClass: true
139
+ });
140
+ var _result_viewProps;
141
+ var viewProps = (_result_viewProps = result === null || result === void 0 ? void 0 : result.viewProps) !== null && _result_viewProps !== void 0 ? _result_viewProps : {};
142
+ var Element = render;
143
+ var transformedProps = (_hooks_usePropsTransform = hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(hooks, render, viewProps, stateRef, false);
144
+ return /* @__PURE__ */_jsx(Element, {
145
+ ...transformedProps,
146
+ ref: composedRefs
147
+ });
148
+ }));
149
+ Component.acceptRenderProp = true;
150
+ return Component;
136
151
  }
137
- var AnimatedView = createWebAnimatedComponent("div"),
138
- AnimatedText = createWebAnimatedComponent("span");
152
+ var AnimatedView = createWebAnimatedComponent("div");
153
+ var AnimatedText = createWebAnimatedComponent("span");
139
154
  function buildTransitionConfig(transition, animations, animationState, styleKeys) {
140
- var normalized = normalizeTransition(transition),
141
- effectiveKey = getEffectiveAnimation(normalized, animationState),
142
- _animations_effectiveKey,
143
- base = effectiveKey ? (_animations_effectiveKey = animations[effectiveKey]) !== null && _animations_effectiveKey !== void 0 ? _animations_effectiveKey : {
144
- type: "spring"
145
- } : {
146
- type: "spring"
155
+ var normalized = normalizeTransition(transition);
156
+ var effectiveKey = getEffectiveAnimation(normalized, animationState);
157
+ var _animations_effectiveKey;
158
+ var base = effectiveKey ? (_animations_effectiveKey = animations[effectiveKey]) !== null && _animations_effectiveKey !== void 0 ? _animations_effectiveKey : {
159
+ type: "spring"
160
+ } : {
161
+ type: "spring"
162
+ };
163
+ if (normalized.delay) {
164
+ base = {
165
+ ...base,
166
+ delay: normalized.delay
147
167
  };
148
- normalized.delay && (base = {
149
- ...base,
150
- delay: normalized.delay
151
- }), normalized.config && (base = {
152
- ...base,
153
- ...normalized.config
154
- }, base.type !== "timing" && normalized.config.duration !== void 0 && normalized.config.damping === void 0 && normalized.config.stiffness === void 0 && normalized.config.mass === void 0 && (base = {
155
- ...base,
156
- type: "timing"
157
- }));
158
- var propertyConfigs = {},
159
- _iteratorNormalCompletion = !0,
160
- _didIteratorError = !1,
168
+ }
169
+ if (normalized.config) {
170
+ base = {
171
+ ...base,
172
+ ...normalized.config
173
+ };
174
+ if (base.type !== "timing" && normalized.config.duration !== void 0 && normalized.config.damping === void 0 && normalized.config.stiffness === void 0 && normalized.config.mass === void 0) {
175
+ base = {
176
+ ...base,
177
+ type: "timing"
178
+ };
179
+ }
180
+ }
181
+ var propertyConfigs = {};
182
+ var _iteratorNormalCompletion = true,
183
+ _didIteratorError = false,
161
184
  _iteratorError = void 0;
162
185
  try {
163
- for (var _iterator = styleKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
164
- var key = _step.value,
165
- propAnimation = normalized.properties[key];
166
- if (typeof propAnimation == "string") {
186
+ for (var _iterator = styleKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
187
+ var key = _step.value;
188
+ var propAnimation = normalized.properties[key];
189
+ if (typeof propAnimation === "string") {
167
190
  var _animations_propAnimation;
168
191
  propertyConfigs[key] = (_animations_propAnimation = animations[propAnimation]) !== null && _animations_propAnimation !== void 0 ? _animations_propAnimation : base;
169
- } else if (propAnimation && (typeof propAnimation > "u" ? "undefined" : _type_of(propAnimation)) === "object") {
170
- var configType = propAnimation.type,
171
- _animations_configType,
172
- baseForProp = configType && (_animations_configType = animations[configType]) !== null && _animations_configType !== void 0 ? _animations_configType : base;
192
+ } else if (propAnimation && (typeof propAnimation === "undefined" ? "undefined" : _type_of(propAnimation)) === "object") {
193
+ var configType = propAnimation.type;
194
+ var _animations_configType;
195
+ var baseForProp = configType ? (_animations_configType = animations[configType]) !== null && _animations_configType !== void 0 ? _animations_configType : base : base;
173
196
  propertyConfigs[key] = {
174
197
  ...baseForProp,
175
198
  ...propAnimation
176
199
  };
177
- } else propertyConfigs[key] = base;
200
+ } else {
201
+ propertyConfigs[key] = base;
202
+ }
178
203
  }
179
204
  } catch (err) {
180
- _didIteratorError = !0, _iteratorError = err;
205
+ _didIteratorError = true;
206
+ _iteratorError = err;
181
207
  } finally {
182
208
  try {
183
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
209
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
210
+ _iterator.return();
211
+ }
184
212
  } finally {
185
- if (_didIteratorError) throw _iteratorError;
213
+ if (_didIteratorError) {
214
+ throw _iteratorError;
215
+ }
186
216
  }
187
217
  }
188
218
  return {
@@ -193,21 +223,28 @@ function buildTransitionConfig(transition, animations, animationState, styleKeys
193
223
  function getStyleKeys(style) {
194
224
  var keys = new Set(Object.keys(style));
195
225
  if (style.transform && Array.isArray(style.transform)) {
196
- var _iteratorNormalCompletion = !0,
197
- _didIteratorError = !1,
226
+ var _iteratorNormalCompletion = true,
227
+ _didIteratorError = false,
198
228
  _iteratorError = void 0;
199
229
  try {
200
- for (var _iterator = style.transform[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
230
+ for (var _iterator = style.transform[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
201
231
  var t = _step.value;
202
- t && (typeof t > "u" ? "undefined" : _type_of(t)) === "object" && keys.add(Object.keys(t)[0]);
232
+ if (t && (typeof t === "undefined" ? "undefined" : _type_of(t)) === "object") {
233
+ keys.add(Object.keys(t)[0]);
234
+ }
203
235
  }
204
236
  } catch (err) {
205
- _didIteratorError = !0, _iteratorError = err;
237
+ _didIteratorError = true;
238
+ _iteratorError = err;
206
239
  } finally {
207
240
  try {
208
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
241
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
242
+ _iterator.return();
243
+ }
209
244
  } finally {
210
- if (_didIteratorError) throw _iteratorError;
245
+ if (_didIteratorError) {
246
+ throw _iteratorError;
247
+ }
211
248
  }
212
249
  }
213
250
  }
@@ -215,18 +252,20 @@ function getStyleKeys(style) {
215
252
  }
216
253
  function createAnimations(animationsConfig) {
217
254
  var animations = {};
218
- for (var key in animationsConfig) animations[key] = {
219
- type: "spring",
220
- ...animationsConfig[key]
221
- };
255
+ for (var key in animationsConfig) {
256
+ animations[key] = {
257
+ type: "spring",
258
+ ...animationsConfig[key]
259
+ };
260
+ }
222
261
  return {
223
- needsCustomComponent: !0,
262
+ needsCustomComponent: true,
224
263
  View: isWeb ? AnimatedView : Animated.View,
225
264
  Text: isWeb ? AnimatedText : Animated.Text,
226
- isReactNative: !0,
265
+ isReactNative: true,
227
266
  inputStyle: "value",
228
267
  outputStyle: "inline",
229
- avoidReRenders: !0,
268
+ avoidReRenders: true,
230
269
  animations,
231
270
  usePresence,
232
271
  ResetPresence,
@@ -248,22 +287,31 @@ function createAnimations(animationsConfig) {
248
287
  return sharedValue.value;
249
288
  },
250
289
  setValue(next) {
251
- "worklet";
252
-
253
290
  var config = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
254
291
  type: "spring"
255
292
  },
256
- onFinish = arguments.length > 2 ? arguments[2] : void 0,
257
- handleFinish = onFinish ? function () {
293
+ onFinish = arguments.length > 2 ? arguments[2] : void 0;
294
+ if (config.type === "direct") {
295
+ sharedValue.value = next;
296
+ onFinish === null || onFinish === void 0 ? void 0 : onFinish();
297
+ } else {
298
+ var cb = onFinish ? function () {
258
299
  "worklet";
259
300
 
260
301
  runOnJS(onFinish)();
261
302
  } : void 0;
262
- config.type === "direct" ? (sharedValue.value = next, onFinish?.()) : config.type === "spring" ? sharedValue.value = withSpring(next, config, handleFinish) : sharedValue.value = withTiming(next, config, handleFinish);
303
+ if (isWeb) {
304
+ sharedValue.value = config.type === "spring" ? withSpring(next, config, cb) : withTiming(next, config, cb);
305
+ } else {
306
+ runOnUI(function () {
307
+ "worklet";
308
+
309
+ sharedValue.value = config.type === "spring" ? withSpring(next, config, cb) : withTiming(next, config, cb);
310
+ })();
311
+ }
312
+ }
263
313
  },
264
314
  stop() {
265
- "worklet";
266
-
267
315
  cancelAnimation(sharedValue);
268
316
  }
269
317
  };
@@ -274,119 +322,172 @@ function createAnimations(animationsConfig) {
274
322
  // =========================================================================
275
323
  useAnimatedNumberReaction(param, onValue) {
276
324
  var {
277
- value
278
- } = param,
279
- instance = value.getInstance();
325
+ value
326
+ } = param;
327
+ var instance = value.getInstance();
280
328
  return useAnimatedReaction(function () {
281
329
  return instance.value;
282
330
  }, function (next, prev) {
283
- prev !== next && runOnJS(onValue)(next);
331
+ if (prev !== next) {
332
+ runOnJS(onValue)(next);
333
+ }
284
334
  }, [onValue, instance]);
285
335
  },
286
336
  // =========================================================================
287
337
  // useAnimatedNumberStyle - Create animated styles from values
288
338
  // =========================================================================
289
339
  useAnimatedNumberStyle(val, getStyle) {
290
- var instance = val.getInstance(),
291
- derivedValue = useDerivedValue(function () {
292
- return instance.value;
340
+ var instance = val.getInstance();
341
+ if (isWeb) {
342
+ return useAnimatedStyle(function () {
343
+ "worklet";
344
+
345
+ return getStyle(instance.value);
293
346
  }, [instance, getStyle]);
347
+ }
348
+ var styleVal = useDerivedValue(function () {
349
+ "worklet";
350
+
351
+ return getStyle(instance.value);
352
+ });
353
+ return useAnimatedStyle(function () {
354
+ "worklet";
355
+
356
+ return styleVal.value;
357
+ });
358
+ },
359
+ useAnimatedNumbersStyle(vals, getStyle) {
360
+ var instances = vals.map(function (v) {
361
+ return v.getInstance();
362
+ });
294
363
  return useAnimatedStyle(function () {
295
- return getStyle(derivedValue.value);
296
- }, [val, getStyle, derivedValue, instance]);
364
+ "worklet";
365
+
366
+ var currentValues = instances.map(function (inst) {
367
+ return inst.value;
368
+ });
369
+ return getStyle(...currentValues);
370
+ }, isWeb ? [getStyle, ...instances] : void 0);
297
371
  },
298
372
  // =========================================================================
299
373
  // useAnimations - Main animation hook for components
300
374
  // =========================================================================
301
375
  useAnimations(animationProps) {
302
376
  var {
303
- props,
304
- presence,
305
- style,
306
- componentState,
307
- useStyleEmitter,
308
- themeName,
309
- stateRef,
310
- styleState
311
- } = animationProps,
312
- isHydrating = componentState.unmounted === !0,
313
- isMounting = componentState.unmounted === "should-enter",
314
- isEntering = !!componentState.unmounted,
315
- isExiting = presence?.[0] === !1,
316
- wasEnteringRef = useRef(isEntering),
317
- justFinishedEntering = wasEnteringRef.current && !isEntering;
377
+ props,
378
+ presence,
379
+ style,
380
+ componentState,
381
+ useStyleEmitter,
382
+ themeName,
383
+ stateRef,
384
+ styleState
385
+ } = animationProps;
386
+ var isHydrating = componentState.unmounted === true;
387
+ var isMounting = componentState.unmounted === "should-enter";
388
+ var isEntering = !!componentState.unmounted;
389
+ var isExiting = (presence === null || presence === void 0 ? void 0 : presence[0]) === false;
390
+ var wasEnteringRef = useRef(isEntering);
391
+ var justFinishedEntering = wasEnteringRef.current && !isEntering;
318
392
  React.useEffect(function () {
319
393
  wasEnteringRef.current = isEntering;
320
394
  });
321
- var _styleState_effectiveTransition,
322
- effectiveTransition = (_styleState_effectiveTransition = styleState?.effectiveTransition) !== null && _styleState_effectiveTransition !== void 0 ? _styleState_effectiveTransition : props.transition,
323
- normalized = normalizeTransition(effectiveTransition),
324
- animationState = isExiting ? "exit" : isMounting || justFinishedEntering ? "enter" : "default",
325
- animationKey = getEffectiveAnimation(normalized, animationState),
326
- disableAnimation = isHydrating || !animationKey,
327
- isDark = themeName?.startsWith("dark") || !1,
328
- sendExitComplete = presence?.[1],
329
- exitCycleIdRef = useRef(0),
330
- pendingExitKeysRef = useRef(/* @__PURE__ */new Set()),
331
- exitCompletedRef = useRef(!1),
332
- wasExitingRef = useRef(!1),
333
- justStartedExiting = isExiting && !wasExitingRef.current,
334
- justStoppedExiting = !isExiting && wasExitingRef.current,
335
- markExitKeyDone = useEvent(function (key3, cycleId, finished) {
336
- cycleId === exitCycleIdRef.current && (exitCompletedRef.current || (pendingExitKeysRef.current.delete(key3), pendingExitKeysRef.current.size === 0 && (exitCompletedRef.current = !0, sendExitComplete?.())));
337
- }),
338
- isExitingRef = useSharedValue(isExiting),
339
- exitCycleIdShared = useSharedValue(exitCycleIdRef.current);
340
- justStartedExiting && (exitCycleIdRef.current++, exitCompletedRef.current = !1, pendingExitKeysRef.current.clear()), justStoppedExiting && (exitCycleIdRef.current++, pendingExitKeysRef.current.clear()), useIsomorphicLayoutEffect(function () {
341
- isExitingRef.value = isExiting, exitCycleIdShared.value = exitCycleIdRef.current;
342
- }, [isExiting, exitCycleIdRef.current]), React.useEffect(function () {
395
+ var _styleState_effectiveTransition;
396
+ var effectiveTransition = (_styleState_effectiveTransition = styleState === null || styleState === void 0 ? void 0 : styleState.effectiveTransition) !== null && _styleState_effectiveTransition !== void 0 ? _styleState_effectiveTransition : props.transition;
397
+ var normalized = normalizeTransition(effectiveTransition);
398
+ var animationState = isExiting ? "exit" : isMounting || justFinishedEntering ? "enter" : "default";
399
+ var animationKey = getEffectiveAnimation(normalized, animationState);
400
+ var disableAnimation = isHydrating || !animationKey;
401
+ var isDark = (themeName === null || themeName === void 0 ? void 0 : themeName.startsWith("dark")) || false;
402
+ var sendExitComplete = presence === null || presence === void 0 ? void 0 : presence[1];
403
+ var exitCycleIdRef = useRef(0);
404
+ var pendingExitKeysRef = useRef(/* @__PURE__ */new Set());
405
+ var exitCompletedRef = useRef(false);
406
+ var wasExitingRef = useRef(false);
407
+ var justStartedExiting = isExiting && !wasExitingRef.current;
408
+ var justStoppedExiting = !isExiting && wasExitingRef.current;
409
+ var markExitKeyDone = useEvent(function (key3, cycleId, finished) {
410
+ if (cycleId !== exitCycleIdRef.current) return;
411
+ if (exitCompletedRef.current) return;
412
+ pendingExitKeysRef.current.delete(key3);
413
+ if (pendingExitKeysRef.current.size === 0) {
414
+ exitCompletedRef.current = true;
415
+ sendExitComplete === null || sendExitComplete === void 0 ? void 0 : sendExitComplete();
416
+ }
417
+ });
418
+ var isExitingRef = useSharedValue(isExiting);
419
+ var exitCycleIdShared = useSharedValue(exitCycleIdRef.current);
420
+ if (justStartedExiting) {
421
+ exitCycleIdRef.current++;
422
+ exitCompletedRef.current = false;
423
+ pendingExitKeysRef.current.clear();
424
+ }
425
+ if (justStoppedExiting) {
426
+ exitCycleIdRef.current++;
427
+ pendingExitKeysRef.current.clear();
428
+ }
429
+ useIsomorphicLayoutEffect(function () {
430
+ isExitingRef.value = isExiting;
431
+ exitCycleIdShared.value = exitCycleIdRef.current;
432
+ }, [isExiting, exitCycleIdRef.current]);
433
+ React.useEffect(function () {
343
434
  wasExitingRef.current = isExiting;
344
435
  });
345
- var animatedTargetsRef = useSharedValue(null),
346
- staticTargetsRef = useSharedValue(null),
347
- transformTargetsRef = useSharedValue(null),
348
- {
349
- animatedStyles,
350
- staticStyles
351
- } = useMemo(function () {
352
- var animated = {},
353
- staticStyles2 = {},
354
- animateOnly2 = props.animateOnly;
355
- for (var key3 in style) {
356
- var rawValue = style[key3],
357
- value = resolveDynamicValue(rawValue, isDark);
358
- if (value !== void 0) {
359
- if (disableAnimation) {
360
- staticStyles2[key3] = value;
361
- continue;
362
- }
363
- canAnimateProperty(key3, value, animateOnly2) ? animated[key3] = value : staticStyles2[key3] = value;
364
- }
436
+ var animatedTargetsRef = useSharedValue(null);
437
+ var staticTargetsRef = useSharedValue(null);
438
+ var transformTargetsRef = useSharedValue(null);
439
+ var {
440
+ animatedStyles,
441
+ staticStyles
442
+ } = useMemo(function () {
443
+ var animated = {};
444
+ var staticStyles2 = {};
445
+ var animateOnly2 = props.animateOnly;
446
+ for (var key3 in style) {
447
+ var rawValue = style[key3];
448
+ var value = resolveDynamicValue(rawValue, isDark);
449
+ if (value === void 0) continue;
450
+ if (disableAnimation) {
451
+ staticStyles2[key3] = value;
452
+ continue;
453
+ }
454
+ if (canAnimateProperty(key3, value, animateOnly2)) {
455
+ animated[key3] = value;
456
+ } else {
457
+ staticStyles2[key3] = value;
458
+ }
459
+ }
460
+ if (isMounting) {
461
+ for (var key1 in animated) {
462
+ staticStyles2[key1] = animated[key1];
365
463
  }
366
- if (isMounting) for (var key1 in animated) staticStyles2[key1] = animated[key1];
464
+ }
465
+ return {
466
+ animatedStyles: animated,
467
+ staticStyles: staticStyles2
468
+ };
469
+ }, [disableAnimation, style, isDark, isMounting, props.animateOnly]);
470
+ var {
471
+ baseConfig,
472
+ propertyConfigs
473
+ } = useMemo(function () {
474
+ if (isHydrating) {
367
475
  return {
368
- animatedStyles: animated,
369
- staticStyles: staticStyles2
370
- };
371
- }, [disableAnimation, style, isDark, isMounting, props.animateOnly]),
372
- {
373
- baseConfig,
374
- propertyConfigs
375
- } = useMemo(function () {
376
- return isHydrating ? {
377
476
  baseConfig: {
378
477
  type: "timing",
379
478
  duration: 0
380
479
  },
381
480
  propertyConfigs: {}
382
- } : buildTransitionConfig(props.transition, animations, animationState, getStyleKeys(animatedStyles));
383
- }, [isHydrating, props.transition, animatedStyles, animationState]),
384
- configRef = useSharedValue({
385
- baseConfig,
386
- propertyConfigs,
387
- disableAnimation,
388
- isHydrating
389
- });
481
+ };
482
+ }
483
+ return buildTransitionConfig(props.transition, animations, animationState, getStyleKeys(animatedStyles));
484
+ }, [isHydrating, props.transition, animatedStyles, animationState]);
485
+ var configRef = useSharedValue({
486
+ baseConfig,
487
+ propertyConfigs,
488
+ disableAnimation,
489
+ isHydrating
490
+ });
390
491
  useIsomorphicLayoutEffect(function () {
391
492
  configRef.set({
392
493
  baseConfig,
@@ -394,16 +495,17 @@ function createAnimations(animationsConfig) {
394
495
  disableAnimation,
395
496
  isHydrating
396
497
  });
397
- }, [baseConfig, propertyConfigs, disableAnimation, isHydrating]), useStyleEmitter?.(function (nextStyle, effectiveTransition2) {
398
- var animateOnly2 = props.animateOnly,
399
- animated = {},
400
- statics = {},
401
- transforms2 = [],
402
- transitionToUse = effectiveTransition2 ?? props.transition,
403
- {
404
- baseConfig: newBase,
405
- propertyConfigs: newPropertyConfigs
406
- } = buildTransitionConfig(transitionToUse, animations, animationState, getStyleKeys(nextStyle));
498
+ }, [baseConfig, propertyConfigs, disableAnimation, isHydrating]);
499
+ useStyleEmitter === null || useStyleEmitter === void 0 ? void 0 : useStyleEmitter(function (nextStyle, effectiveTransition2) {
500
+ var animateOnly2 = props.animateOnly;
501
+ var animated = {};
502
+ var statics = {};
503
+ var transforms2 = [];
504
+ var transitionToUse = effectiveTransition2 !== null && effectiveTransition2 !== void 0 ? effectiveTransition2 : props.transition;
505
+ var {
506
+ baseConfig: newBase,
507
+ propertyConfigs: newPropertyConfigs
508
+ } = buildTransitionConfig(transitionToUse, animations, animationState, getStyleKeys(nextStyle));
407
509
  configRef.set({
408
510
  baseConfig: newBase,
409
511
  propertyConfigs: newPropertyConfigs,
@@ -411,172 +513,220 @@ function createAnimations(animationsConfig) {
411
513
  isHydrating: configRef.get().isHydrating
412
514
  });
413
515
  for (var key3 in nextStyle) {
414
- var rawValue = nextStyle[key3],
415
- value = resolveDynamicValue(rawValue, isDark);
416
- if (value != null) {
417
- if (configRef.get().disableAnimation) {
418
- statics[key3] = value;
419
- continue;
420
- }
421
- if (key3 === "transform" && Array.isArray(value)) {
422
- var _iteratorNormalCompletion2 = !0,
423
- _didIteratorError2 = !1,
424
- _iteratorError2 = void 0;
425
- try {
426
- for (var _iterator2 = value[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
427
- var t2 = _step2.value;
428
- if (t2 && (typeof t2 > "u" ? "undefined" : _type_of(t2)) === "object") {
429
- var tKey2 = Object.keys(t2)[0],
430
- tVal = t2[tKey2];
431
- (typeof tVal == "number" || typeof tVal == "string") && transforms2.push(t2);
516
+ var rawValue = nextStyle[key3];
517
+ var value = resolveDynamicValue(rawValue, isDark);
518
+ if (value == void 0) continue;
519
+ if (configRef.get().disableAnimation) {
520
+ statics[key3] = value;
521
+ continue;
522
+ }
523
+ if (key3 === "transform" && Array.isArray(value)) {
524
+ var _iteratorNormalCompletion2 = true,
525
+ _didIteratorError2 = false,
526
+ _iteratorError2 = void 0;
527
+ try {
528
+ for (var _iterator2 = value[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
529
+ var t2 = _step2.value;
530
+ if (t2 && (typeof t2 === "undefined" ? "undefined" : _type_of(t2)) === "object") {
531
+ var tKey2 = Object.keys(t2)[0];
532
+ var tVal = t2[tKey2];
533
+ if (typeof tVal === "number" || typeof tVal === "string") {
534
+ transforms2.push(t2);
432
535
  }
433
536
  }
434
- } catch (err) {
435
- _didIteratorError2 = !0, _iteratorError2 = err;
537
+ }
538
+ } catch (err) {
539
+ _didIteratorError2 = true;
540
+ _iteratorError2 = err;
541
+ } finally {
542
+ try {
543
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
544
+ _iterator2.return();
545
+ }
436
546
  } finally {
437
- try {
438
- !_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
439
- } finally {
440
- if (_didIteratorError2) throw _iteratorError2;
547
+ if (_didIteratorError2) {
548
+ throw _iteratorError2;
441
549
  }
442
550
  }
443
- continue;
444
551
  }
445
- canAnimateProperty(key3, value, animateOnly2) ? animated[key3] = value : statics[key3] = value;
552
+ continue;
553
+ }
554
+ if (canAnimateProperty(key3, value, animateOnly2)) {
555
+ animated[key3] = value;
556
+ } else {
557
+ statics[key3] = value;
446
558
  }
447
559
  }
448
- animatedTargetsRef.set(animated), staticTargetsRef.set(statics), transformTargetsRef.set(transforms2), process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && console.info("[animations-reanimated] useStyleEmitter update", {
449
- animated,
450
- statics,
451
- transforms: transforms2
452
- });
560
+ animatedTargetsRef.set(animated);
561
+ staticTargetsRef.set(statics);
562
+ transformTargetsRef.set(transforms2);
563
+ if (process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile") {
564
+ console.info("[animations-reanimated] useStyleEmitter update", {
565
+ animated,
566
+ statics,
567
+ transforms: transforms2
568
+ });
569
+ }
453
570
  });
454
- var exitKeysRegistered = useRef(!1);
571
+ var exitKeysRegistered = useRef(false);
455
572
  if (justStartedExiting && sendExitComplete) {
456
- var exitKeys = [],
457
- animateOnly = props.animateOnly;
458
- for (var key2 in animatedStyles) key2 !== "transform" && canAnimateProperty(key2, animatedStyles[key2], animateOnly) && exitKeys.push(key2);
573
+ var exitKeys = [];
574
+ var animateOnly = props.animateOnly;
575
+ for (var key2 in animatedStyles) {
576
+ if (key2 === "transform") continue;
577
+ if (canAnimateProperty(key2, animatedStyles[key2], animateOnly)) {
578
+ exitKeys.push(key2);
579
+ }
580
+ }
459
581
  var transforms = animatedStyles.transform;
460
582
  if (transforms && Array.isArray(transforms)) {
461
- var _iteratorNormalCompletion = !0,
462
- _didIteratorError = !1,
583
+ var _iteratorNormalCompletion = true,
584
+ _didIteratorError = false,
463
585
  _iteratorError = void 0;
464
586
  try {
465
- for (var _iterator = transforms[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
587
+ for (var _iterator = transforms[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
466
588
  var t = _step.value;
467
- if (t) {
468
- var tKey = Object.keys(t)[0];
469
- if (tKey) {
470
- if (animateOnly && !animateOnly.includes(tKey)) continue;
471
- exitKeys.push(`transform:${tKey}`);
589
+ if (!t) continue;
590
+ var tKey = Object.keys(t)[0];
591
+ if (tKey) {
592
+ if (animateOnly && !animateOnly.includes(tKey)) {
593
+ continue;
472
594
  }
595
+ exitKeys.push(`transform:${tKey}`);
473
596
  }
474
597
  }
475
598
  } catch (err) {
476
- _didIteratorError = !0, _iteratorError = err;
599
+ _didIteratorError = true;
600
+ _iteratorError = err;
477
601
  } finally {
478
602
  try {
479
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
603
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
604
+ _iterator.return();
605
+ }
480
606
  } finally {
481
- if (_didIteratorError) throw _iteratorError;
607
+ if (_didIteratorError) {
608
+ throw _iteratorError;
609
+ }
482
610
  }
483
611
  }
484
612
  }
485
- pendingExitKeysRef.current = new Set(exitKeys), exitKeysRegistered.current = exitKeys.length > 0;
613
+ pendingExitKeysRef.current = new Set(exitKeys);
614
+ exitKeysRegistered.current = exitKeys.length > 0;
486
615
  }
487
616
  React.useEffect(function () {
488
- !justStartedExiting || !sendExitComplete || !exitKeysRegistered.current && pendingExitKeysRef.current.size === 0 && (exitCompletedRef.current || (exitCompletedRef.current = !0, sendExitComplete()));
617
+ if (!justStartedExiting || !sendExitComplete) return;
618
+ if (!exitKeysRegistered.current && pendingExitKeysRef.current.size === 0) {
619
+ if (!exitCompletedRef.current) {
620
+ exitCompletedRef.current = true;
621
+ sendExitComplete();
622
+ }
623
+ }
489
624
  }, [justStartedExiting, sendExitComplete]);
490
625
  var animatedStyle = useAnimatedStyle(function () {
491
626
  "worklet";
492
627
 
493
628
  var _loop = function (key12) {
494
629
  if (key12 === "transform") return "continue";
495
- var targetValue = animatedValues[key12],
496
- _config_propertyConfigs_key,
497
- propConfig = (_config_propertyConfigs_key = config.propertyConfigs[key12]) !== null && _config_propertyConfigs_key !== void 0 ? _config_propertyConfigs_key : config.baseConfig,
498
- callback = void 0;
630
+ var targetValue = animatedValues[key12];
631
+ var _config_propertyConfigs_key;
632
+ var propConfig = (_config_propertyConfigs_key = config.propertyConfigs[key12]) !== null && _config_propertyConfigs_key !== void 0 ? _config_propertyConfigs_key : config.baseConfig;
633
+ var callback = void 0;
499
634
  if (currentlyExiting) {
500
- var capturedKey = key12,
501
- capturedCycleId = currentCycleId;
635
+ var capturedKey = key12;
636
+ var capturedCycleId = currentCycleId;
502
637
  callback = function (finished) {
503
638
  "worklet";
504
639
 
505
- runOnJS(markExitKeyDone)(capturedKey, capturedCycleId, finished ?? !1);
640
+ runOnJS(markExitKeyDone)(capturedKey, capturedCycleId, finished !== null && finished !== void 0 ? finished : false);
506
641
  };
507
642
  }
508
643
  result[key12] = applyAnimation(targetValue, propConfig, callback);
509
644
  };
510
- if (disableAnimation || isHydrating) return {};
511
- var result = {},
512
- config = configRef.get(),
513
- emitterAnimated = animatedTargetsRef.value,
514
- emitterStatic = staticTargetsRef.value,
515
- emitterTransforms = transformTargetsRef.value,
516
- hasEmitterUpdates = emitterAnimated !== null,
517
- animatedValues = hasEmitterUpdates ? emitterAnimated : animatedStyles,
518
- staticValues = hasEmitterUpdates ? emitterStatic : {},
519
- currentlyExiting = isExitingRef.value,
520
- currentCycleId = exitCycleIdShared.value;
521
- for (var key3 in staticValues) result[key3] = staticValues[key3];
645
+ if (disableAnimation || isHydrating) {
646
+ return {};
647
+ }
648
+ var result = {};
649
+ var config = configRef.get();
650
+ var emitterAnimated = animatedTargetsRef.value;
651
+ var emitterStatic = staticTargetsRef.value;
652
+ var emitterTransforms = transformTargetsRef.value;
653
+ var hasEmitterUpdates = emitterAnimated !== null;
654
+ var animatedValues = hasEmitterUpdates ? emitterAnimated : animatedStyles;
655
+ var staticValues = hasEmitterUpdates ? emitterStatic : {};
656
+ var currentlyExiting = isExitingRef.value;
657
+ var currentCycleId = exitCycleIdShared.value;
658
+ for (var key3 in staticValues) {
659
+ result[key3] = staticValues[key3];
660
+ }
522
661
  for (var key1 in animatedValues) _loop(key1);
523
662
  var transforms2 = hasEmitterUpdates ? emitterTransforms : animatedStyles.transform;
524
663
  if (transforms2 && Array.isArray(transforms2)) {
525
- var validTransforms = [],
526
- _iteratorNormalCompletion2 = !0,
527
- _didIteratorError2 = !1,
664
+ var validTransforms = [];
665
+ var _iteratorNormalCompletion2 = true,
666
+ _didIteratorError2 = false,
528
667
  _iteratorError2 = void 0;
529
668
  try {
530
- for (var _loop1 = function () {
531
- var t2 = _step2.value;
532
- if (!t2) return "continue";
533
- var keys = Object.keys(t2);
534
- if (keys.length === 0) return "continue";
535
- var value = t2[keys[0]];
536
- if (typeof value == "number" || typeof value == "string") {
537
- var transformKey = Object.keys(t2)[0],
538
- targetValue = t2[transformKey],
539
- _config_propertyConfigs_transformKey,
540
- propConfig = (_config_propertyConfigs_transformKey = config.propertyConfigs[transformKey]) !== null && _config_propertyConfigs_transformKey !== void 0 ? _config_propertyConfigs_transformKey : config.baseConfig,
541
- callback = void 0;
542
- if (currentlyExiting) {
543
- var capturedKey = `transform:${transformKey}`,
544
- capturedCycleId = currentCycleId;
545
- callback = function (finished) {
546
- "worklet";
669
+ var _loop1 = function () {
670
+ var t2 = _step2.value;
671
+ if (!t2) return "continue";
672
+ var keys = Object.keys(t2);
673
+ if (keys.length === 0) return "continue";
674
+ var value = t2[keys[0]];
675
+ if (typeof value === "number" || typeof value === "string") {
676
+ var transformKey = Object.keys(t2)[0];
677
+ var targetValue = t2[transformKey];
678
+ var _config_propertyConfigs_transformKey;
679
+ var propConfig = (_config_propertyConfigs_transformKey = config.propertyConfigs[transformKey]) !== null && _config_propertyConfigs_transformKey !== void 0 ? _config_propertyConfigs_transformKey : config.baseConfig;
680
+ var callback = void 0;
681
+ if (currentlyExiting) {
682
+ var capturedKey = `transform:${transformKey}`;
683
+ var capturedCycleId = currentCycleId;
684
+ callback = function (finished) {
685
+ "worklet";
547
686
 
548
- runOnJS(markExitKeyDone)(capturedKey, capturedCycleId, finished ?? !1);
549
- };
550
- }
551
- validTransforms.push({
552
- [transformKey]: applyAnimation(targetValue, propConfig, callback)
553
- });
687
+ runOnJS(markExitKeyDone)(capturedKey, capturedCycleId, finished !== null && finished !== void 0 ? finished : false);
688
+ };
554
689
  }
555
- }, _iterator2 = transforms2[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) _loop1();
690
+ validTransforms.push({
691
+ [transformKey]: applyAnimation(targetValue, propConfig, callback)
692
+ });
693
+ }
694
+ };
695
+ for (var _iterator2 = transforms2[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) _loop1();
556
696
  } catch (err) {
557
- _didIteratorError2 = !0, _iteratorError2 = err;
697
+ _didIteratorError2 = true;
698
+ _iteratorError2 = err;
558
699
  } finally {
559
700
  try {
560
- !_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
701
+ if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
702
+ _iterator2.return();
703
+ }
561
704
  } finally {
562
- if (_didIteratorError2) throw _iteratorError2;
705
+ if (_didIteratorError2) {
706
+ throw _iteratorError2;
707
+ }
563
708
  }
564
709
  }
565
- validTransforms.length > 0 && (result.transform = validTransforms);
710
+ if (validTransforms.length > 0) {
711
+ result.transform = validTransforms;
712
+ }
566
713
  }
567
714
  return result;
568
- }, [animatedStyles, baseConfig, propertyConfigs, disableAnimation, isHydrating,
569
- // Pass SharedValues so the mapper watches them on web (see useAnimatedStyle.ts line 470-472)
570
- animatedTargetsRef, staticTargetsRef, transformTargetsRef, isExitingRef, exitCycleIdShared, markExitKeyDone]);
571
- return process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && console.info("[animations-reanimated] useAnimations", {
572
- animationKey,
573
- componentState,
574
- isExiting,
575
- animatedStyles,
576
- staticStyles,
577
- baseConfig,
578
- propertyConfigs
579
- }), {
715
+ }, isWeb ? [animatedStyles, baseConfig, propertyConfigs, disableAnimation, isHydrating,
716
+ // pass SharedValues so the mapper watches them on web (no babel plugin)
717
+ animatedTargetsRef, staticTargetsRef, transformTargetsRef, isExitingRef, exitCycleIdShared, markExitKeyDone] : void 0);
718
+ if (process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile") {
719
+ console.info("[animations-reanimated] useAnimations", {
720
+ animationKey,
721
+ componentState,
722
+ isExiting,
723
+ animatedStyles,
724
+ staticStyles,
725
+ baseConfig,
726
+ propertyConfigs
727
+ });
728
+ }
729
+ return {
580
730
  style: [staticStyles, animatedStyle]
581
731
  };
582
732
  }