@tamagui/animations-reanimated 2.0.0-1768586279389 → 2.0.0-1768696252732

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.
@@ -38,8 +38,8 @@ __export(createAnimations_exports, {
38
38
  module.exports = __toCommonJS(createAnimations_exports);
39
39
  var import_jsx_runtime = require("react/jsx-runtime"),
40
40
  import_animation_helpers = require("@tamagui/animation-helpers"),
41
- import_use_presence = require("@tamagui/use-presence"),
42
41
  import_core = require("@tamagui/core"),
42
+ import_use_presence = require("@tamagui/use-presence"),
43
43
  import_react = __toESM(require("react"), 1),
44
44
  import_react_native_reanimated = __toESM(require("react-native-reanimated"), 1);
45
45
  function _type_of(obj) {
@@ -66,29 +66,6 @@ var getDefaultExport = function (module2) {
66
66
  animatedValue;
67
67
  return config.type === "timing" ? animatedValue = (0, import_react_native_reanimated.withTiming)(targetValue, config) : animatedValue = (0, import_react_native_reanimated.withSpring)(targetValue, config), delay && delay > 0 && (animatedValue = (0, import_react_native_reanimated.withDelay)(delay, animatedValue)), animatedValue;
68
68
  },
69
- estimateSpringDuration = function (config) {
70
- var _config_stiffness,
71
- stiffness = (_config_stiffness = config.stiffness) !== null && _config_stiffness !== void 0 ? _config_stiffness : 100,
72
- _config_damping,
73
- damping = (_config_damping = config.damping) !== null && _config_damping !== void 0 ? _config_damping : 10,
74
- _config_mass,
75
- mass = (_config_mass = config.mass) !== null && _config_mass !== void 0 ? _config_mass : 1;
76
- if (mass <= 0 || stiffness <= 0) return 400;
77
- var omega0 = Math.sqrt(stiffness / mass),
78
- zeta = damping / (2 * Math.sqrt(stiffness * mass)),
79
- duration;
80
- return zeta < 1 && zeta > 0 && omega0 > 0 ? duration = 4 / (zeta * omega0) * 1e3 : omega0 > 0 ? duration = 2 / omega0 * 1e3 : duration = 400, Number.isFinite(duration) ? Math.ceil(Math.min(2e3, Math.max(200, duration)) * 1.15) : 400;
81
- },
82
- getAnimationDuration = function (config) {
83
- var _config_delay,
84
- delay = Math.max(0, (_config_delay = config.delay) !== null && _config_delay !== void 0 ? _config_delay : 0);
85
- if (config.type === "timing") {
86
- var _config_duration,
87
- duration = Math.max(0, (_config_duration = config.duration) !== null && _config_duration !== void 0 ? _config_duration : 300);
88
- return duration + delay + 50;
89
- }
90
- return estimateSpringDuration(config) + delay;
91
- },
92
69
  ANIMATABLE_PROPERTIES = {
93
70
  // Transform
94
71
  transform: !0,
@@ -165,7 +142,7 @@ function createWebAnimatedComponent(defaultTag) {
165
142
  var _hooks_usePropsTransform,
166
143
  {
167
144
  forwardedRef,
168
- tag = defaultTag,
145
+ render = defaultTag,
169
146
  ...rest
170
147
  } = propsIn,
171
148
  hostRef = (0, import_react.useRef)(null),
@@ -186,8 +163,8 @@ function createWebAnimatedComponent(defaultTag) {
186
163
  }),
187
164
  _result_viewProps,
188
165
  viewProps = (_result_viewProps = result?.viewProps) !== null && _result_viewProps !== void 0 ? _result_viewProps : {},
189
- Element = tag,
190
- transformedProps = (_hooks_usePropsTransform = import_core.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_core.hooks, tag, viewProps, stateRef, !1);
166
+ Element = render,
167
+ transformedProps = (_hooks_usePropsTransform = import_core.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_core.hooks, render, viewProps, stateRef, !1);
191
168
  return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Element, {
192
169
  ...transformedProps,
193
170
  ref: composedRefs
@@ -281,22 +258,23 @@ function createAnimations(animationsConfig) {
281
258
  // useAnimations - Main animation hook for components
282
259
  // =========================================================================
283
260
  useAnimations(animationProps) {
284
- var _themeState_name,
285
- {
261
+ var {
286
262
  props,
287
263
  presence,
288
264
  style,
289
265
  componentState,
290
- useStyleEmitter
266
+ useStyleEmitter,
267
+ themeName
291
268
  } = animationProps,
292
- animationKey = Array.isArray(props.transition) ? props.transition[0] : props.transition,
269
+ normalized = (0, import_animation_helpers.normalizeTransition)(props.transition),
270
+ animationKey = normalized.default,
293
271
  isHydrating = componentState.unmounted === !0,
294
272
  isMounting = componentState.unmounted === "should-enter",
295
273
  disableAnimation = isHydrating || !animationKey,
296
- [, themeState] = (0, import_core.useThemeWithState)({}),
297
- isDark = themeState?.scheme === "dark" || (themeState == null || (_themeState_name = themeState.name) === null || _themeState_name === void 0 ? void 0 : _themeState_name.startsWith("dark")),
274
+ isDark = themeName?.startsWith("dark") || !1,
298
275
  isExiting = presence?.[0] === !1,
299
276
  sendExitComplete = presence?.[1],
277
+ exitProgress = (0, import_react_native_reanimated.useSharedValue)(0),
300
278
  animatedTargetsRef = (0, import_react_native_reanimated.useSharedValue)(null),
301
279
  staticTargetsRef = (0, import_react_native_reanimated.useSharedValue)(null),
302
280
  transformTargetsRef = (0, import_react_native_reanimated.useSharedValue)(null),
@@ -335,83 +313,70 @@ function createAnimations(animationsConfig) {
335
313
  },
336
314
  propertyConfigs: {}
337
315
  };
338
- var normalized = (0, import_animation_helpers.normalizeTransition)(props.transition),
316
+ var normalized2 = (0, import_animation_helpers.normalizeTransition)(props.transition),
339
317
  _animations_normalized_default,
340
- base = normalized.default ? (_animations_normalized_default = animations[normalized.default]) !== null && _animations_normalized_default !== void 0 ? _animations_normalized_default : {
318
+ base = normalized2.default ? (_animations_normalized_default = animations[normalized2.default]) !== null && _animations_normalized_default !== void 0 ? _animations_normalized_default : {
341
319
  type: "spring"
342
320
  } : {
343
321
  type: "spring"
344
322
  };
345
- normalized.delay && (base = {
323
+ normalized2.delay && (base = {
346
324
  ...base,
347
- delay: normalized.delay
325
+ delay: normalized2.delay
348
326
  });
349
- var overrides = {},
350
- _iteratorNormalCompletion = !0,
351
- _didIteratorError = !1,
352
- _iteratorError = void 0;
353
- try {
354
- for (var _iterator = Object.entries(normalized.properties)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
355
- var [key2, animationNameOrConfig] = _step.value;
356
- if (typeof animationNameOrConfig == "string") {
357
- var _animations_animationNameOrConfig;
358
- overrides[key2] = (_animations_animationNameOrConfig = animations[animationNameOrConfig]) !== null && _animations_animationNameOrConfig !== void 0 ? _animations_animationNameOrConfig : base;
359
- } else if (animationNameOrConfig && (typeof animationNameOrConfig > "u" ? "undefined" : _type_of(animationNameOrConfig)) === "object") {
360
- var configType = animationNameOrConfig.type,
361
- _animations_configType,
362
- baseForProp = configType && (_animations_configType = animations[configType]) !== null && _animations_configType !== void 0 ? _animations_configType : base;
363
- overrides[key2] = {
364
- ...baseForProp,
365
- ...animationNameOrConfig
366
- };
367
- }
368
- }
369
- } catch (err) {
370
- _didIteratorError = !0, _iteratorError = err;
371
- } finally {
372
- try {
373
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
374
- } finally {
375
- if (_didIteratorError) throw _iteratorError;
327
+ var overrides = {};
328
+ for (var key2 in normalized2.properties) {
329
+ var animationNameOrConfig = normalized2.properties[key2];
330
+ if (typeof animationNameOrConfig == "string") {
331
+ var _animations_animationNameOrConfig;
332
+ overrides[key2] = (_animations_animationNameOrConfig = animations[animationNameOrConfig]) !== null && _animations_animationNameOrConfig !== void 0 ? _animations_animationNameOrConfig : base;
333
+ } else if (animationNameOrConfig && (typeof animationNameOrConfig > "u" ? "undefined" : _type_of(animationNameOrConfig)) === "object") {
334
+ var configType = animationNameOrConfig.type,
335
+ _animations_configType,
336
+ baseForProp = configType && (_animations_configType = animations[configType]) !== null && _animations_configType !== void 0 ? _animations_configType : base;
337
+ overrides[key2] = {
338
+ ...baseForProp,
339
+ ...animationNameOrConfig
340
+ };
376
341
  }
377
342
  }
378
343
  var configs = {},
379
344
  allKeys = new Set(Object.keys(animatedStyles));
380
345
  if (animatedStyles.transform && Array.isArray(animatedStyles.transform)) {
381
- var _iteratorNormalCompletion1 = !0,
382
- _didIteratorError1 = !1,
383
- _iteratorError1 = void 0;
346
+ var _iteratorNormalCompletion = !0,
347
+ _didIteratorError = !1,
348
+ _iteratorError = void 0;
384
349
  try {
385
- for (var _iterator1 = animatedStyles.transform[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) {
386
- var t = _step1.value;
350
+ for (var _iterator = animatedStyles.transform[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
351
+ var t = _step.value;
387
352
  allKeys.add(Object.keys(t)[0]);
388
353
  }
389
354
  } catch (err) {
390
- _didIteratorError1 = !0, _iteratorError1 = err;
355
+ _didIteratorError = !0, _iteratorError = err;
391
356
  } finally {
392
357
  try {
393
- !_iteratorNormalCompletion1 && _iterator1.return != null && _iterator1.return();
358
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
394
359
  } finally {
395
- if (_didIteratorError1) throw _iteratorError1;
360
+ if (_didIteratorError) throw _iteratorError;
396
361
  }
397
362
  }
398
363
  }
399
- var _iteratorNormalCompletion2 = !0,
400
- _didIteratorError2 = !1,
401
- _iteratorError2 = void 0;
364
+ var _iteratorNormalCompletion1 = !0,
365
+ _didIteratorError1 = !1,
366
+ _iteratorError1 = void 0;
402
367
  try {
403
- for (var _iterator2 = allKeys[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = !0) {
404
- var key1 = _step2.value,
368
+ for (var _iterator1 = allKeys[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) {
369
+ var key1 = _step1.value,
405
370
  _overrides_key;
406
371
  configs[key1] = (_overrides_key = overrides[key1]) !== null && _overrides_key !== void 0 ? _overrides_key : base;
407
372
  }
408
373
  } catch (err) {
409
- _didIteratorError2 = !0, _iteratorError2 = err;
374
+ _didIteratorError1 = !0, _iteratorError1 = err;
410
375
  } finally {
411
376
  try {
412
- !_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
377
+ !_iteratorNormalCompletion1 && _iterator1.return != null && _iterator1.return();
413
378
  } finally {
414
- if (_didIteratorError2) throw _iteratorError2;
379
+ if (_didIteratorError1) throw _iteratorError1;
415
380
  }
416
381
  }
417
382
  return {
@@ -419,18 +384,20 @@ function createAnimations(animationsConfig) {
419
384
  propertyConfigs: configs
420
385
  };
421
386
  }, [isHydrating, props.transition, animatedStyles]),
422
- configRef = (0, import_react.useRef)({
387
+ configRef = (0, import_react_native_reanimated.useSharedValue)({
423
388
  baseConfig,
424
389
  propertyConfigs,
425
390
  disableAnimation,
426
391
  isHydrating
427
392
  });
428
- configRef.current = {
429
- baseConfig,
430
- propertyConfigs,
431
- disableAnimation,
432
- isHydrating
433
- }, useStyleEmitter?.(function (nextStyle) {
393
+ (0, import_core.useIsomorphicLayoutEffect)(function () {
394
+ configRef.set({
395
+ baseConfig,
396
+ propertyConfigs,
397
+ disableAnimation,
398
+ isHydrating
399
+ });
400
+ }, [baseConfig, propertyConfigs, disableAnimation, isHydrating]), useStyleEmitter?.(function (nextStyle) {
434
401
  var animateOnly = props.animateOnly,
435
402
  animated = {},
436
403
  statics = {},
@@ -438,8 +405,8 @@ function createAnimations(animationsConfig) {
438
405
  for (var key2 in nextStyle) {
439
406
  var rawValue = nextStyle[key2],
440
407
  value = resolveDynamicValue(rawValue, isDark);
441
- if (value !== void 0) {
442
- if (configRef.current.disableAnimation) {
408
+ if (value != null) {
409
+ if (configRef.get().disableAnimation) {
443
410
  statics[key2] = value;
444
411
  continue;
445
412
  }
@@ -470,29 +437,37 @@ function createAnimations(animationsConfig) {
470
437
  canAnimateProperty(key2, value, animateOnly) ? animated[key2] = value : statics[key2] = value;
471
438
  }
472
439
  }
473
- animatedTargetsRef.value = animated, staticTargetsRef.value = statics, transformTargetsRef.value = transforms, process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && console.info("[animations-reanimated] useStyleEmitter update", {
440
+ animatedTargetsRef.set(animated), staticTargetsRef.set(statics), transformTargetsRef.set(transforms), process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && console.info("[animations-reanimated] useStyleEmitter update", {
474
441
  animated,
475
442
  statics,
476
443
  transforms
477
444
  });
478
445
  }), import_react.default.useEffect(function () {
479
446
  if (!(!isExiting || !sendExitComplete)) {
480
- var duration = getAnimationDuration(baseConfig),
481
- timeoutId = setTimeout(sendExitComplete, duration);
482
- return function () {
483
- return clearTimeout(timeoutId);
447
+ var config = configRef.get().baseConfig;
448
+ return config.type === "timing" ? exitProgress.set((0, import_react_native_reanimated.withTiming)(1, config, function (finished) {
449
+ "worklet";
450
+
451
+ finished && (0, import_react_native_reanimated.runOnJS)(sendExitComplete)();
452
+ })) : exitProgress.set((0, import_react_native_reanimated.withSpring)(1, config, function (finished) {
453
+ "worklet";
454
+
455
+ finished && (0, import_react_native_reanimated.runOnJS)(sendExitComplete)();
456
+ })), function () {
457
+ (0, import_react_native_reanimated.cancelAnimation)(exitProgress);
484
458
  };
485
459
  }
486
- }, [isExiting, sendExitComplete, baseConfig]);
460
+ }, [isExiting, sendExitComplete]);
487
461
  var animatedStyle = (0, import_react_native_reanimated.useAnimatedStyle)(function () {
488
462
  "worklet";
489
463
 
490
464
  if (disableAnimation || isHydrating) return {};
491
465
  var result = {},
492
- config = configRef.current,
493
- hasEmitterUpdates = animatedTargetsRef.value !== null,
494
- animatedValues = hasEmitterUpdates ? animatedTargetsRef.value : animatedStyles,
495
- staticValues = hasEmitterUpdates ? staticTargetsRef.value : {};
466
+ config = configRef.get(),
467
+ emitterAnimated = animatedTargetsRef.get(),
468
+ hasEmitterUpdates = emitterAnimated !== null,
469
+ animatedValues = hasEmitterUpdates ? emitterAnimated : animatedStyles,
470
+ staticValues = hasEmitterUpdates ? staticTargetsRef.get() : {};
496
471
  for (var key2 in staticValues) result[key2] = staticValues[key2];
497
472
  for (var key1 in animatedValues) if (key1 !== "transform") {
498
473
  var targetValue = animatedValues[key1],
@@ -500,23 +475,40 @@ function createAnimations(animationsConfig) {
500
475
  propConfig = (_config_propertyConfigs_key = config.propertyConfigs[key1]) !== null && _config_propertyConfigs_key !== void 0 ? _config_propertyConfigs_key : config.baseConfig;
501
476
  result[key1] = applyAnimation(targetValue, propConfig);
502
477
  }
503
- var transforms = hasEmitterUpdates ? transformTargetsRef.value : animatedStyles.transform;
478
+ var transforms = hasEmitterUpdates ? transformTargetsRef.get() : animatedStyles.transform;
504
479
  if (transforms && Array.isArray(transforms)) {
505
- var validTransforms = transforms.filter(function (t) {
506
- if (!t || (typeof t > "u" ? "undefined" : _type_of(t)) !== "object") return !1;
507
- var keys = Object.keys(t);
508
- if (keys.length === 0) return !1;
509
- var value = t[keys[0]];
510
- return typeof value == "number" || typeof value == "string";
511
- }).map(function (t) {
512
- var transformKey = Object.keys(t)[0],
513
- targetValue2 = t[transformKey],
514
- _config_propertyConfigs_transformKey,
515
- propConfig2 = (_config_propertyConfigs_transformKey = config.propertyConfigs[transformKey]) !== null && _config_propertyConfigs_transformKey !== void 0 ? _config_propertyConfigs_transformKey : config.baseConfig;
516
- return {
517
- [transformKey]: applyAnimation(targetValue2, propConfig2)
518
- };
519
- });
480
+ var validTransforms = [],
481
+ _iteratorNormalCompletion = !0,
482
+ _didIteratorError = !1,
483
+ _iteratorError = void 0;
484
+ try {
485
+ for (var _iterator = transforms[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
486
+ var t = _step.value;
487
+ if (t) {
488
+ var keys = Object.keys(t);
489
+ if (keys.length !== 0) {
490
+ var value = t[keys[0]];
491
+ if (typeof value == "number" || typeof value == "string") {
492
+ var transformKey = Object.keys(t)[0],
493
+ targetValue1 = t[transformKey],
494
+ _config_propertyConfigs_transformKey,
495
+ propConfig1 = (_config_propertyConfigs_transformKey = config.propertyConfigs[transformKey]) !== null && _config_propertyConfigs_transformKey !== void 0 ? _config_propertyConfigs_transformKey : config.baseConfig;
496
+ validTransforms.push({
497
+ [transformKey]: applyAnimation(targetValue1, propConfig1)
498
+ });
499
+ }
500
+ }
501
+ }
502
+ }
503
+ } catch (err) {
504
+ _didIteratorError = !0, _iteratorError = err;
505
+ } finally {
506
+ try {
507
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
508
+ } finally {
509
+ if (_didIteratorError) throw _iteratorError;
510
+ }
511
+ }
520
512
  validTransforms.length > 0 && (result.transform = validTransforms);
521
513
  }
522
514
  return result;
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createAnimations_exports","__export","createAnimations","module","exports","import_jsx_runtime","require","import_animation_helpers","import_use_presence","import_core","import_react","__toESM","import_react_native_reanimated","_type_of","obj","Symbol","constructor","getDefaultExport","module2","__esModule","toStringTag","default","Animated","resolveDynamicValue","isDark","dynamic","dark","light","applyAnimation","targetValue","config","delay","animatedValue","type","withTiming","withSpring","withDelay","estimateSpringDuration","_config_stiffness","stiffness","_config_damping","damping","_config_mass","mass","omega0","Math","sqrt","zeta","duration","Number","isFinite","ceil","min","max","getAnimationDuration","_config_delay","_config_duration","ANIMATABLE_PROPERTIES","transform","opacity","height","width","minWidth","minHeight","maxWidth","maxHeight","backgroundColor","borderColor","borderLeftColor","borderRightColor","borderTopColor","borderBottomColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderWidth","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","color","fontSize","fontWeight","lineHeight","letterSpacing","left","right","top","bottom","margin","marginTop","marginBottom","marginLeft","marginRight","marginHorizontal","marginVertical","padding","paddingTop","paddingBottom","paddingLeft","paddingRight","paddingHorizontal","paddingVertical","gap","rowGap","columnGap","flex","flexGrow","flexShrink","canAnimateProperty","key","animateOnly","startsWith","includes","createWebAnimatedComponent","defaultTag","isText","Component","createAnimatedComponent","forwardRef","propsIn","ref","_hooks_usePropsTransform","forwardedRef","tag","rest","hostRef","useRef","composedRefs","useComposedRefs","stateRef","host","current","themeState","useThemeWithState","_themeState_theme","_themeState_name","result","getSplitStyles","Text","staticConfig","View","theme","name","unmounted","isAnimated","noClass","_result_viewProps","viewProps","Element","transformedProps","hooks","usePropsTransform","call","jsx","acceptTagProp","AnimatedView","AnimatedText","animationsConfig","animations","isWeb","isReactNative","supportsCSS","avoidReRenders","usePresence","ResetPresence","useAnimatedNumber","initial","sharedValue","useSharedValue","useMemo","getInstance","getValue","setValue","next","arguments","length","onFinish","handleFinish","runOnJS","stop","cancelAnimation","useAnimatedNumberReaction","param","onValue","instance","useAnimatedReaction","prev","useAnimatedNumberStyle","val","getStyle","derivedValue","useDerivedValue","useAnimatedStyle","useAnimations","animationProps","props","presence","style","componentState","useStyleEmitter","animationKey","Array","isArray","transition","isHydrating","isMounting","disableAnimation","scheme","isExiting","sendExitComplete","animatedTargetsRef","staticTargetsRef","transformTargetsRef","animatedStyles","staticStyles","animated","staticStyles2","key2","rawValue","key1","baseConfig","propertyConfigs","normalized","normalizeTransition","_animations_normalized_default","base","overrides","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","Object","entries","properties","iterator","_step","done","animationNameOrConfig","_animations_animationNameOrConfig","configType","_animations_configType","baseForProp","err","return","configs","allKeys","Set","keys","_iteratorNormalCompletion1","_didIteratorError1","_iteratorError1","_iterator1","_step1","t","add","_iteratorNormalCompletion2","_didIteratorError2","_iteratorError2","_iterator2","_step2","_overrides_key","configRef"],"sources":["../../src/createAnimations.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,wBAAA;AAAAC,QAAA,CAAAD,wBAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAA,CAAAK,wBAAoC;AAqCpC,IAAAK,kBAAM,GAAmBC,OAAK,oBAAkC;EAAAC,wBAAA,GAAAD,OAAA;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Props","__defProp","value","createAnimations_exports","__export","createAnimations","module","exports","import_jsx_runtime","require","import_animation_helpers","import_core","import_use_presence","import_react","__toESM","import_react_native_reanimated","_type_of","obj","Symbol","constructor","getDefaultExport","module2","__esModule","toStringTag","default","Animated","resolveDynamicValue","isDark","dynamic","dark","light","applyAnimation","targetValue","config","delay","animatedValue","type","withTiming","withSpring","withDelay","ANIMATABLE_PROPERTIES","transform","opacity","height","width","minWidth","minHeight","maxWidth","maxHeight","backgroundColor","borderColor","borderLeftColor","borderRightColor","borderTopColor","borderBottomColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","borderWidth","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth","color","fontSize","fontWeight","lineHeight","letterSpacing","left","right","top","bottom","margin","marginTop","marginBottom","marginLeft","marginRight","marginHorizontal","marginVertical","padding","paddingTop","paddingBottom","paddingLeft","paddingRight","paddingHorizontal","paddingVertical","gap","rowGap","columnGap","flex","flexGrow","flexShrink","canAnimateProperty","key","animateOnly","startsWith","includes","createWebAnimatedComponent","defaultTag","isText","Component","createAnimatedComponent","forwardRef","propsIn","ref","_hooks_usePropsTransform","forwardedRef","render","rest","hostRef","useRef","composedRefs","useComposedRefs","stateRef","host","current","themeState","useThemeWithState","_themeState_theme","_themeState_name","result","getSplitStyles","Text","staticConfig","View","theme","name","unmounted","isAnimated","noClass","_result_viewProps","viewProps","Element","transformedProps","hooks","usePropsTransform","call","jsx","acceptTagProp","AnimatedView","AnimatedText","animationsConfig","animations","isWeb","isReactNative","supportsCSS","avoidReRenders","usePresence","ResetPresence","useAnimatedNumber","initial","sharedValue","useSharedValue","useMemo","getInstance","getValue","setValue","next","arguments","length","onFinish","handleFinish","runOnJS","stop","cancelAnimation","useAnimatedNumberReaction","param","onValue","instance","useAnimatedReaction","prev","useAnimatedNumberStyle","val","getStyle","derivedValue","useDerivedValue","useAnimatedStyle","useAnimations","animationProps","props","presence","style","componentState","useStyleEmitter","themeName","normalized","normalizeTransition","transition","animationKey","isHydrating","isMounting","disableAnimation","isExiting","sendExitComplete","exitProgress","animatedTargetsRef","staticTargetsRef","transformTargetsRef","animatedStyles","staticStyles","animated","staticStyles2","key2","rawValue","key1","baseConfig","propertyConfigs","duration","normalized2","_animations_normalized_default","base","overrides","properties","animationNameOrConfig","_animations_animationNameOrConfig","configType","_animations_configType","baseForProp","configs","allKeys","Set","Object","keys","Array","isArray","_iteratorNormalCompletion","_didIteratorError","_iteratorError","_iterator","iterator","_step","done","t","add","err","return","_iteratorNormalCompletion1","_didIteratorError1","_iteratorError1","_iterator1","_step1","_overrides_key","configRef","useIsomorphicLayoutEffect","set","nextStyle","statics","transforms","get","tKey","tVal","push"],"sources":["../../src/createAnimations.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,wBAAA;AAAAC,QAAA,CAAAD,wBAAA;EAAAE,gBAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAA,CAAAK,wBAAoC;AAsCpC,IAAAK,kBAAM,GAAmBC,OAAK,oBAAkC;EAAAC,wBAAA,GAAAD,OAAA;EAAAE,WAAA,GAAAF,OAAA;EAAAG,mBAAA,GAAAH,OAAA;EAAAI,YAAA,GAAAC,OAAA,CAAAL,OAAA;EAAAM,8BAAA,GAAAD,OAAA,CAAAL,OAAA;AAC9D,SAAMO,QAAMA,CAAAC,GAAA;EACZ,uBAAQ;;EAIV,OAEMA,GAAA,IAAW,OAAAC,MAAA,GAAiB,OAAAD,GAAA,CAAAE,WAAA,KAAAD,MAAA,WA8B5B,UAAAD,GAAA;AACJ;AAME,IAAAG,gBAAiB,YAAAA,CAAcC,OAAA;IAC/B,IAAAtB,GAAA,GAAOsB,OAAA;IACT,QAAAtB,GAAA,CA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AAAlB,CAAA,CAAAiB,IAAA;oBACF,QAAAC,IAAA,uBAAAA,IAAA,iBAAAH,UAAA,CAAAI,IAAA,CAAAnB,CAAA;kBACF;gBACF","ignoreList":[]}
@@ -1,14 +1,15 @@
1
1
  import { normalizeTransition } from "@tamagui/animation-helpers";
2
- import { ResetPresence, usePresence } from "@tamagui/use-presence";
3
2
  import {
4
3
  getSplitStyles,
5
4
  hooks,
6
5
  isWeb,
7
6
  Text,
8
7
  useComposedRefs,
8
+ useIsomorphicLayoutEffect,
9
9
  useThemeWithState,
10
10
  View
11
11
  } from "@tamagui/core";
12
+ import { ResetPresence, usePresence } from "@tamagui/use-presence";
12
13
  import React, { forwardRef, useMemo, useRef } from "react";
13
14
  import Animated_, {
14
15
  cancelAnimation,
@@ -36,16 +37,6 @@ const getDefaultExport = (module) => {
36
37
  const delay = config.delay;
37
38
  let animatedValue;
38
39
  return config.type === "timing" ? animatedValue = withTiming(targetValue, config) : animatedValue = withSpring(targetValue, config), delay && delay > 0 && (animatedValue = withDelay(delay, animatedValue)), animatedValue;
39
- }, estimateSpringDuration = (config) => {
40
- const stiffness = config.stiffness ?? 100, damping = config.damping ?? 10, mass = config.mass ?? 1;
41
- if (mass <= 0 || stiffness <= 0)
42
- return 400;
43
- const omega0 = Math.sqrt(stiffness / mass), zeta = damping / (2 * Math.sqrt(stiffness * mass));
44
- let duration;
45
- return zeta < 1 && zeta > 0 && omega0 > 0 ? duration = 4 / (zeta * omega0) * 1e3 : omega0 > 0 ? duration = 2 / omega0 * 1e3 : duration = 400, Number.isFinite(duration) ? Math.ceil(Math.min(2e3, Math.max(200, duration)) * 1.15) : 400;
46
- }, getAnimationDuration = (config) => {
47
- const delay = Math.max(0, config.delay ?? 0);
48
- return config.type === "timing" ? Math.max(0, config.duration ?? 300) + delay + 50 : estimateSpringDuration(config) + delay;
49
40
  }, ANIMATABLE_PROPERTIES = {
50
41
  // Transform
51
42
  transform: !0,
@@ -116,7 +107,7 @@ const getDefaultExport = (module) => {
116
107
  function createWebAnimatedComponent(defaultTag) {
117
108
  const isText = defaultTag === "span", Component = Animated.createAnimatedComponent(
118
109
  forwardRef((propsIn, ref) => {
119
- const { forwardedRef, tag = defaultTag, ...rest } = propsIn, hostRef = useRef(null), composedRefs = useComposedRefs(forwardedRef, ref, hostRef), stateRef = useRef({
110
+ const { forwardedRef, render = defaultTag, ...rest } = propsIn, hostRef = useRef(null), composedRefs = useComposedRefs(forwardedRef, ref, hostRef), stateRef = useRef({
120
111
  get host() {
121
112
  return hostRef.current;
122
113
  }
@@ -127,8 +118,8 @@ function createWebAnimatedComponent(defaultTag) {
127
118
  themeState?.name ?? "",
128
119
  { unmounted: !1 },
129
120
  { isAnimated: !1, noClass: !0 }
130
- )?.viewProps ?? {}, Element = tag, transformedProps = hooks.usePropsTransform?.(
131
- tag,
121
+ )?.viewProps ?? {}, Element = render, transformedProps = hooks.usePropsTransform?.(
122
+ render,
132
123
  viewProps,
133
124
  stateRef,
134
125
  !1
@@ -221,7 +212,7 @@ function createAnimations(animationsConfig) {
221
212
  // useAnimations - Main animation hook for components
222
213
  // =========================================================================
223
214
  useAnimations(animationProps) {
224
- const { props, presence, style, componentState, useStyleEmitter } = animationProps, animationKey = Array.isArray(props.transition) ? props.transition[0] : props.transition, isHydrating = componentState.unmounted === !0, isMounting = componentState.unmounted === "should-enter", disableAnimation = isHydrating || !animationKey, [, themeState] = useThemeWithState({}), isDark = themeState?.scheme === "dark" || themeState?.name?.startsWith("dark"), isExiting = presence?.[0] === !1, sendExitComplete = presence?.[1], animatedTargetsRef = useSharedValue(null), staticTargetsRef = useSharedValue(null), transformTargetsRef = useSharedValue(
215
+ const { props, presence, style, componentState, useStyleEmitter, themeName } = animationProps, animationKey = normalizeTransition(props.transition).default, isHydrating = componentState.unmounted === !0, isMounting = componentState.unmounted === "should-enter", disableAnimation = isHydrating || !animationKey, isDark = themeName?.startsWith("dark") || !1, isExiting = presence?.[0] === !1, sendExitComplete = presence?.[1], exitProgress = useSharedValue(0), animatedTargetsRef = useSharedValue(null), staticTargetsRef = useSharedValue(null), transformTargetsRef = useSharedValue(
225
216
  null
226
217
  ), { animatedStyles, staticStyles } = useMemo(() => {
227
218
  const animated = {}, staticStyles2 = {}, animateOnly = props.animateOnly;
@@ -245,13 +236,12 @@ function createAnimations(animationsConfig) {
245
236
  baseConfig: { type: "timing", duration: 0 },
246
237
  propertyConfigs: {}
247
238
  };
248
- const normalized = normalizeTransition(props.transition);
249
- let base = normalized.default ? animations[normalized.default] ?? { type: "spring" } : { type: "spring" };
250
- normalized.delay && (base = { ...base, delay: normalized.delay });
239
+ const normalized2 = normalizeTransition(props.transition);
240
+ let base = normalized2.default ? animations[normalized2.default] ?? { type: "spring" } : { type: "spring" };
241
+ normalized2.delay && (base = { ...base, delay: normalized2.delay });
251
242
  const overrides = {};
252
- for (const [key, animationNameOrConfig] of Object.entries(
253
- normalized.properties
254
- ))
243
+ for (const key in normalized2.properties) {
244
+ const animationNameOrConfig = normalized2.properties[key];
255
245
  if (typeof animationNameOrConfig == "string")
256
246
  overrides[key] = animations[animationNameOrConfig] ?? base;
257
247
  else if (animationNameOrConfig && typeof animationNameOrConfig == "object") {
@@ -261,6 +251,7 @@ function createAnimations(animationsConfig) {
261
251
  ...animationNameOrConfig
262
252
  };
263
253
  }
254
+ }
264
255
  const configs = {}, allKeys = new Set(Object.keys(animatedStyles));
265
256
  if (animatedStyles.transform && Array.isArray(animatedStyles.transform))
266
257
  for (const t of animatedStyles.transform)
@@ -268,18 +259,20 @@ function createAnimations(animationsConfig) {
268
259
  for (const key of allKeys)
269
260
  configs[key] = overrides[key] ?? base;
270
261
  return { baseConfig: base, propertyConfigs: configs };
271
- }, [isHydrating, props.transition, animatedStyles]), configRef = useRef({
262
+ }, [isHydrating, props.transition, animatedStyles]), configRef = useSharedValue({
272
263
  baseConfig,
273
264
  propertyConfigs,
274
265
  disableAnimation,
275
266
  isHydrating
276
267
  });
277
- configRef.current = { baseConfig, propertyConfigs, disableAnimation, isHydrating }, useStyleEmitter?.((nextStyle) => {
268
+ useIsomorphicLayoutEffect(() => {
269
+ configRef.set({ baseConfig, propertyConfigs, disableAnimation, isHydrating });
270
+ }, [baseConfig, propertyConfigs, disableAnimation, isHydrating]), useStyleEmitter?.((nextStyle) => {
278
271
  const animateOnly = props.animateOnly, animated = {}, statics = {}, transforms = [];
279
272
  for (const key in nextStyle) {
280
273
  const rawValue = nextStyle[key], value = resolveDynamicValue(rawValue, isDark);
281
- if (value !== void 0) {
282
- if (configRef.current.disableAnimation) {
274
+ if (value != null) {
275
+ if (configRef.get().disableAnimation) {
283
276
  statics[key] = value;
284
277
  continue;
285
278
  }
@@ -294,21 +287,33 @@ function createAnimations(animationsConfig) {
294
287
  canAnimateProperty(key, value, animateOnly) ? animated[key] = value : statics[key] = value;
295
288
  }
296
289
  }
297
- animatedTargetsRef.value = animated, staticTargetsRef.value = statics, transformTargetsRef.value = transforms, process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && console.info("[animations-reanimated] useStyleEmitter update", {
290
+ animatedTargetsRef.set(animated), staticTargetsRef.set(statics), transformTargetsRef.set(transforms), process.env.NODE_ENV === "development" && props.debug && props.debug !== "profile" && console.info("[animations-reanimated] useStyleEmitter update", {
298
291
  animated,
299
292
  statics,
300
293
  transforms
301
294
  });
302
295
  }), React.useEffect(() => {
303
296
  if (!isExiting || !sendExitComplete) return;
304
- const duration = getAnimationDuration(baseConfig), timeoutId = setTimeout(sendExitComplete, duration);
305
- return () => clearTimeout(timeoutId);
306
- }, [isExiting, sendExitComplete, baseConfig]);
297
+ const config = configRef.get().baseConfig;
298
+ return config.type === "timing" ? exitProgress.set(
299
+ withTiming(1, config, (finished) => {
300
+ "worklet";
301
+ finished && runOnJS(sendExitComplete)();
302
+ })
303
+ ) : exitProgress.set(
304
+ withSpring(1, config, (finished) => {
305
+ "worklet";
306
+ finished && runOnJS(sendExitComplete)();
307
+ })
308
+ ), () => {
309
+ cancelAnimation(exitProgress);
310
+ };
311
+ }, [isExiting, sendExitComplete]);
307
312
  const animatedStyle = useAnimatedStyle(() => {
308
313
  "worklet";
309
314
  if (disableAnimation || isHydrating)
310
315
  return {};
311
- const result = {}, config = configRef.current, hasEmitterUpdates = animatedTargetsRef.value !== null, animatedValues = hasEmitterUpdates ? animatedTargetsRef.value : animatedStyles, staticValues = hasEmitterUpdates ? staticTargetsRef.value : {};
316
+ const result = {}, config = configRef.get(), emitterAnimated = animatedTargetsRef.get(), hasEmitterUpdates = emitterAnimated !== null, animatedValues = hasEmitterUpdates ? emitterAnimated : animatedStyles, staticValues = hasEmitterUpdates ? staticTargetsRef.get() : {};
312
317
  for (const key in staticValues)
313
318
  result[key] = staticValues[key];
314
319
  for (const key in animatedValues) {
@@ -316,18 +321,21 @@ function createAnimations(animationsConfig) {
316
321
  const targetValue = animatedValues[key], propConfig = config.propertyConfigs[key] ?? config.baseConfig;
317
322
  result[key] = applyAnimation(targetValue, propConfig);
318
323
  }
319
- const transforms = hasEmitterUpdates ? transformTargetsRef.value : animatedStyles.transform;
324
+ const transforms = hasEmitterUpdates ? transformTargetsRef.get() : animatedStyles.transform;
320
325
  if (transforms && Array.isArray(transforms)) {
321
- const validTransforms = transforms.filter((t) => {
322
- if (!t || typeof t != "object") return !1;
326
+ const validTransforms = [];
327
+ for (const t of transforms) {
328
+ if (!t) continue;
323
329
  const keys = Object.keys(t);
324
- if (keys.length === 0) return !1;
330
+ if (keys.length === 0) continue;
325
331
  const value = t[keys[0]];
326
- return typeof value == "number" || typeof value == "string";
327
- }).map((t) => {
328
- const transformKey = Object.keys(t)[0], targetValue = t[transformKey], propConfig = config.propertyConfigs[transformKey] ?? config.baseConfig;
329
- return { [transformKey]: applyAnimation(targetValue, propConfig) };
330
- });
332
+ if (typeof value == "number" || typeof value == "string") {
333
+ const transformKey = Object.keys(t)[0], targetValue = t[transformKey], propConfig = config.propertyConfigs[transformKey] ?? config.baseConfig;
334
+ validTransforms.push({
335
+ [transformKey]: applyAnimation(targetValue, propConfig)
336
+ });
337
+ }
338
+ }
331
339
  validTransforms.length > 0 && (result.transform = validTransforms);
332
340
  }
333
341
  return result;