-
7e0fcae: Fix
AnimatePresence mode="wait"laying the incoming child out while the outgoing one is still exiting.The incoming child was kept out of flow by a
display: noneCSS transition delayed bycontext.remaining(), which reads a duration published by the outgoing child's outro. Svelte builds the incoming keyed block before tearing the outgoing one down, so the intro almost always read0, emitted no CSS at all, and both children shared the layout for the whole exit.The incoming child is now taken out of flow imperatively at intro time and restored once
waitForExit()resolves, which removes the ordering dependency entirely. A finished exit also drops its node out of flow immediately, rather than lingering until Svelte's own outro timer elapses, which previously left a short window where both children were laid out.This applies to
SVGElementchildren as well asHTMLElementones. Children that are already out of flow (position: absolute/fixed) are left alone, since they cannot share layout with a sibling and hiding them would zero out the box read by projection andonLayoutMeasure.mode="sync"andmode="popLayout"are unaffected.
-
e83c2c7: Fix variant staggering and self-resizing
layoutanimations.Sibling motion components shared a context scope
motioncomponents are hand-written component functions rather than compiled.sveltemodules, so Svelte never opened a component context for them andsetContextwrote into the nearest compiled ancestor's context map — which every sibling motion component shares. Contexts leaked sideways in mount order, so a variant parent adopted only its first child and each later child parented to its previous sibling, forming a chain instead of a fan-out.The visible symptom was that
staggerChildrenandstaggerDirectiondid nothing: with one variant child per level there was nothing to stagger across, and every child received the samedelayChildren. Anything relying on parent/child motion relationships between siblings was affected.Plain
layoutanimations snapped instead of animatingFramer-motion takes a pre-commit measurement on every render, so any prop that changes layout is covered. A Svelte effect only re-runs for the sources it reads, and the pre-pass tracked
layoutDependencyalone — so an element that resized itself (for example viastyle) never snapshotted and jumped straight to its new size.layoutDependencyalso absorbed the ambientAnimatePresenceandReorderversion counters. Any element under a presence boundary therefore saw a constant dependency and suppressed its own snapshots entirely. Those counters are now tracked separately and add snapshot opportunities rather than replacing the user's ownlayoutDependency, restoring framer-motion's semantics.layoutIdshared-layout animations, exit animations, andReorderare unaffected.
- ed7a87c: Target
ES2022intsconfig.jsonso packaged output keeps native class fields instead of downlevelledObject.definePropertyassignments, which broke subclass field initialisation in consumers.
-
5013e2b: Rewrite the library against
framer-motion@11.11.11(previously4.0.3) on Svelte 5 runes.New
Reorder.Group/Reorder.Itemfor drag-to-reorder lists.LayoutGroupand the full projection engine, replacingAnimateSharedLayout.AnimatePresencemode(sync|wait|popLayout) andusePresenceData.- WAAPI-accelerated animations,
animate()sequences, andstagger(). - Scroll (
useScroll), viewport (whileInView), anduseInViewsupport. - Motion value hooks:
useTime,useVelocity,useWillChange,useAnimate,useAnimateMini. - Subpath entries:
motion-start/dom,/mini,/m,/client,/projection.
Changed
- Components and hooks are Svelte 5 runes-based; renderless
Use*.sveltewrappers are gone in favour of plain functions and classes. motion/mare proxies, so any element is available asmotion.<tag>.- Gestures rewritten onto the shared
Featurepipeline (hover, press, pan, drag, focus).
Removed
AnimateSharedLayout— useLayoutGroupwithlayoutId.MotionDiv— usemotion.div.
- 39bf8bf: Fix AnimatePresence
presenceAffectsLayoutno-op,isPresentrace condition with framesync batcher, and doublesafeToRemoveguard
-
84d3657: fix: resolve bare dot and extension-less imports in value/ for Svelte REPL
The Svelte playground CDN resolves ESM imports without a bundler, requiring explicit file extensions and no bare directory imports. Bare dot imports like
from '.'compiled to JS caused the REPL to fail resolvingdist/value/as a directory path.Fixed by replacing all
from '.',from '..', and extension-less relative imports within the value/ directory with explicit./index.jspaths and proper.jsextensions.
-
e036a76: Remove
sideEffects: falsefrompackage.jsonto fix module resolution in the Svelte REPL playground.Bundlers honour this flag by tree-shaking modules that are imported only for their side effects. In the Svelte playground this caused the module that resolves the
"."bare specifier to be dropped entirely, producing:error occurred while trying to resolve
.withinnpm://$/motion-start@0.1.18/dist/value/use-motion-template.js
- ff1a37e: add layout animation helper
- 9e4b5cf: fix motion svg
- 456528a: fix motion svg namespace
- f8dd358: allow spreading props
- 1f07118: revert
- a1f2c47: fix svg not appearing with motion use
- 39d3b8b: improve import consistancy and fix svelte repl
- f8ab887: fix svelte repl usage
- 6101a3b: remove main from package.json
- b4fe2aa: correct exports to export svelte and js
- c21ab29: export correct extensions
- 071b96d: move dist files to src for import use
- d8212b9: fix usage in svelte repl
- b6f6602: add all files in dist to files property package.json
- 2996dae: add back style-value-types just incase
- 7f6010b: fix peer deps including melt-ui because of bits-ui dep
- 61bcd64: fix export path for svelte comp
- 25f1b6e: export MotionSSR
- 98cfaba: chore: 🤖 release
- 4f1b2e7: enable layout animation feature
- 9f5a69c: fix layout animations
- passing tests, handle minimal-motion for lazymotion,update API for motion to align more with framer-motion API usage
- fix package source
- 5492e7b: fix animations