Releases: hanielu/motion-svelte
Releases · hanielu/motion-svelte
motion-sv@0.1.10
Patch Changes
-
Add
use-in-viewanduse-in-page-view -
🐛 Bug Fix: AnimatePresence
mode="wait"now works correctly in SvelteKitFixed
- AnimatePresence
mode="wait"not working on first toggle in SvelteKit - Elements would appear immediately instead of waiting for the exit animation to complete. This was caused by SvelteKit's bundling optimization skipping the intro transition call, making the first outro call incorrectly identified as an intro.
Changes
- Added element exit state tracking via
onoutrostartevent to correctly distinguish between intro and outro transition calls - Used
globalThisfor internal WeakSet storage to ensure state persists across module boundaries in SvelteKit's bundling environment
Details
In SvelteKit, Svelte may optimize away the intro transition call when no animation is needed on mount. This caused the transition function to treat the first outro call as an intro (since the node hadn't been seen before), resulting in a skipped exit animation. The fix marks elements as "exiting" when
onoutrostartfires, allowing the transition function to correctly identify outro calls regardless of whether an intro was previously triggered. - AnimatePresence
motion-sv@0.1.9
Patch Changes
- Ensuring proper animation behavior during exits.
motion-sv@0.1.8
Patch Changes
- Fix lazy motion feature manager
motion-sv@0.1.7
Patch Changes
- fix circular dependencies
motion-sv@0.1.6
Patch Changes:
- Stabilise
nodeRefattachment
motion-sv@0.1.5
Fix:
- drop the null default from the motion component’s bindable ref
motion-sv@0.1.4
Changes:
- Refactored
createLayoutMotionto support calling without abaseargument (e.g.,createLayoutMotion()), defaulting to the standardmotioninstance. - handle elements with void tags
motion-sv@0.1.3
motion-sv@0.1.2
Patch
- handle undefined
exitprop for<AnimatePresence>children
0.1.1
Patch
- Enhance animation transition so that
staggerChildrenworks