v4.1.3

juliangarnier/animev4.1.3Aug 12, 2025by juliangarnier

AI Summary

Increases spring stiffness and velocity limits, fixes draggable axis callbacks, and adds extensive TypeScript type exports.

Key Highlights

  • Increased spring stiffness and velocity limits
  • Fix Draggable `onUpdate` and `onSettle` for single-axis updates
  • Extensive TypeScript type exports added

New Features

  • Spring parameter adjustments
  • Draggable container removal error prevention
  • New type exports (SpringParams, TimelinePosition, etc.)

Full Release Notes

## Improvements
- Increase spring stiffness and velocity limits (#1039, #1040) @lixiaolin94

## Bug fixes
- [Scroll] Fixes threshold with transforms on parent (#1059) @almirbi
- [Targets, Text] Fix non-browser usage (#1056) @ClassicOldSong
- [Draggable] Fix Draggable's `onUpdate` and `onSettle` callbacks not triggered when only updating the x axis (#1045)
- [Draggable] Prevents error when removing the draggable container element from the DOM (#1064)
- [Animatable] Fix callbacks triggered multiple times by setting the callbacks to a dedicated Animation instead of applying them to each individual property animations
- [Animation] Fix tweens composition inconsistencies on tweens with `composition: 'replace'` not controlled by a Timeline
- [Animation] Fix some time calculation inconsistencies when using seconds `engine.timeUnit = 's'` that affected tweens composition

## Types

- [WAAPI] Added missing `WAAPIAnimation` type to the `Revertible` type
- [Stagger] The `stagger()` function return type is now inferred from the input value type
- [Eases] Fix the error "A rest parameter must be of an array type." of the linear easing type (#972)
- Export the following missing types (#1051, #1010):
  - `SpringParams`
  - `TimelinePosition`
  - `TimelineAnimationPosition`
  - `WAAPITweenValue`
  - `WAAPIFunctionValue`
  - `WAAPIKeyframeValue`
  - `WAAPICallback`
  - `WAAPITweenOptions`
  - `WAAPIAnimationOptions`
  - `WAAPIAnimationParams`
  - `ScrollThresholdValue`
  - `ScrollThresholdParam`
  - `ScrollObserverAxisCallback`
  - `ScrollThresholdCallback`
  - `ScrollObserverParams`