@hoddy-ui/next 2.5.73 → 2.5.74

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/index.js CHANGED
@@ -2507,20 +2507,21 @@ var useFloatAnimation = ({
2507
2507
  opacity.value = (0, import_react_native_reanimated5.withDelay)(
2508
2508
  delay,
2509
2509
  (0, import_react_native_reanimated5.withTiming)(1, { duration }, () => {
2510
- startFloating();
2511
- if (closeAfter) {
2512
- opacity.value = (0, import_react_native_reanimated5.withDelay)(
2513
- closeAfter,
2514
- (0, import_react_native_reanimated5.withTiming)(0, { duration: closeDuration })
2515
- );
2516
- translateY.value = (0, import_react_native_reanimated5.withDelay)(
2517
- closeAfter,
2518
- (0, import_react_native_reanimated5.withTiming)(0, { duration: closeDuration })
2519
- );
2520
- isFloating.current = false;
2521
- }
2510
+ "worklet";
2511
+ (0, import_react_native_reanimated5.runOnJS)(startFloating)();
2522
2512
  })
2523
2513
  );
2514
+ if (closeAfter) {
2515
+ const totalDelay = delay + duration + closeAfter;
2516
+ opacity.value = (0, import_react_native_reanimated5.withDelay)(
2517
+ totalDelay,
2518
+ (0, import_react_native_reanimated5.withTiming)(0, { duration: closeDuration })
2519
+ );
2520
+ translateY.value = (0, import_react_native_reanimated5.withDelay)(
2521
+ totalDelay,
2522
+ (0, import_react_native_reanimated5.withTiming)(0, { duration: closeDuration })
2523
+ );
2524
+ }
2524
2525
  return () => {
2525
2526
  opacity.value = 0;
2526
2527
  translateY.value = 0;