Skip to content

[pull] main from motiondivision:main#210

Merged
pull[bot] merged 45 commits intocode:mainfrom
motiondivision:main
Feb 5, 2026
Merged

[pull] main from motiondivision:main#210
pull[bot] merged 45 commits intocode:mainfrom
motiondivision:main

Conversation

@pull
Copy link

@pull pull bot commented Feb 5, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

mattgperry and others added 18 commits February 4, 2026 14:14
…h-and-release

Fix velocity calculation for hold-then-flick gestures by skipping stale
pointer-down origin points in PanSession.getVelocity(). Fix momentum
resuming after catch-and-release by stopping animations on pointer down
instead of pausing, and starting fresh constraint animations on release
instead of resuming paused momentum.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add Cypress E2E test verifying that elements with layoutId inside a
React Fragment animate from the correct starting position.

Closes #1681

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… to PointerEvent

The hover gesture uses pointerenter/pointerleave events, which produce
PointerEvent objects at runtime. The type definitions incorrectly declared
the callback parameter as MouseEvent.

Fixes #2286

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When a motion element suspends mid-animation via React Suspense and
remounts, the VisualElement instance is preserved (via useRef) but
motion values retain intermediate animation values. This causes
animations to start from stuck intermediate states instead of replaying
from initial.

Track whether mount() has been called before via hasBeenMounted flag,
and on remount, jump all motion values back to their initialValues
before binding to the new DOM element.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add opt-in `inheritTransition` prop to MotionConfig that shallow-merges
its transition with the parent MotionConfig's transition instead of
replacing it. This lets users set global defaults (duration, ease) via a
parent MotionConfig while nested MotionConfigs add properties like delay
without losing the parent's settings.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…fragment

Add shared layout Fragment animation test
fix(types): Change hover event type from MouseEvent to PointerEvent
…nimations

Always render PopChild wrapper in PresenceChild to keep the React tree
stable when AnimatePresence's mode prop changes dynamically (e.g.,
"wait" → "popLayout"). Add a `pop` prop to PopChild that controls
whether measurement and CSS injection are active, preventing tree
structure changes that cause React to unmount/remount inner components.

Fixes #1717

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…g ends (#2316)

When both whileHover and drag are used, hover state could get stuck after
dragging if the pointer left the element during drag. The browser's
pointerleave was blocked by isDragActive(), and after drag ended no new
pointerleave would fire to clear hover.

Use setPointerCapture during drag so the browser suppresses boundary
events. On pointerup, capture is implicitly released and the browser
re-evaluates pointer position, firing pointerleave if needed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…dlers from firing

Fixes #2277. The documented workaround using onPointerDownCapture + stopPropagation
is broken in React 17+ because React intercepts native events at the root. This adds
a Motion-native mechanism using a WeakSet to track claimed pointerdown events, allowing
child elements to prevent ancestor tap gesture handlers without affecting other listeners.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a Cypress test and dev app test page that verify motion values are
reset to initial after a Suspense unmount/remount cycle. The test runs
against both React 18 (port 9990) and React 19 (port 9991).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
fix(drag): Fix whileHover persisting after drag ends
The for..in loop is a no-op when initialValues is empty, so the
length check is unnecessary.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…mode

fix(AnimatePresence): Support dynamic mode changes
Move transition merging from a MotionConfig prop to a field on the
transition object itself. This enables merging at two levels:
MotionConfig nesting and value-specific overrides (e.g. opacity).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@pull pull bot locked and limited conversation to collaborators Feb 5, 2026
@pull pull bot added the ⤵️ pull label Feb 5, 2026
mattgperry and others added 10 commits February 5, 2026 11:34
…g before drag starts

The previous pointer capture approach in the drag system didn't cover the
window between pointerdown and drag start. Move the protection into
hover() itself by tracking press state per-element and deferring
pointerleave processing while the pointer is pressed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
fix(hover): Defer pointerleave during press to prevent whileHover flash
When all animations are instant (shouldSkip), Promise.all([]) resolves
as a microtask, deferring the transitionEnd frame.update callback until
after the new variant's callbacks are already queued. The stale
transitionEnd then fires last, overriding the new variant's values.

Fix: when animations array is empty, queue transitionEnd synchronously
via frame.update instead of through Promise.all, so it's ordered
correctly in the same frame batch as the animation callbacks. Fixes #1668.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
… drags

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
mattgperry and others added 17 commits February 5, 2026 14:07
…uspence

fix: Reset motion values to initial on remount after Suspense
…n animate

Extract shared resolveTransition function that handles inherit merging,
and reuse it in MotionConfig, getValueTransition, and animateTarget.
This enables animate.transition to merge with the component/context
transition via inherit: true.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
fix: transitionEnd stuck with stale values after rapid variant switching
fix(drag): Fix slow flick velocity and catch-and-release momentum
…lse }}

Avoids double negative naming and makes the API extensible for other
gesture types (hover, drag, etc.). Also adds Playwright E2E tests
verifying the stopPropagation option works at the motion-dom press() level.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…sition

Add `transition.inherit` to allow transition composition
feat(gestures): Add propagate prop for tap event propagation control (#2277)
@pull pull bot merged commit fde47ac into code:main Feb 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant