Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
9f22839
fix(drag): Fix slow flick velocity and momentum carry-over after catc…
mattgperry Feb 4, 2026
cca2305
test: Add shared layout animation Fragment test
mattgperry Feb 4, 2026
7323452
fix(types): Change onHoverStart/onHoverEnd event type from MouseEvent…
mattgperry Feb 4, 2026
1fb784e
fix: Reset motion values to initial on remount after Suspense
mattgperry Feb 4, 2026
5587cb5
feat(MotionConfig): Add inheritTransition prop for transition merging
mattgperry Feb 4, 2026
ad64693
Merge pull request #3533 from motiondivision/shared-layout-animation-…
mattgperry Feb 5, 2026
d9e9dc6
Merge pull request #3534 from motiondivision/hover-types
mattgperry Feb 5, 2026
e3bf501
fix(AnimatePresence): Support dynamic mode changes without breaking a…
mattgperry Feb 4, 2026
8073386
fix(drag): Use pointer capture to fix whileHover persisting after dra…
mattgperry Feb 4, 2026
ba85e4c
feat(gestures): Add stopTapPropagation prop to prevent parent tap han…
mattgperry Feb 4, 2026
f3404e5
test: Add Cypress E2E test for Suspense animation resume
mattgperry Feb 5, 2026
34f5496
Merge pull request #3537 from motiondivision/while-hover-drag
mattgperry Feb 5, 2026
6f072c5
Updating changelog
mattgperry Feb 5, 2026
158ed76
refactor: Remove redundant Object.keys check in mount()
mattgperry Feb 5, 2026
60da777
refactor: Use optional chaining for value.jump()
mattgperry Feb 5, 2026
f69a9ff
Merge pull request #3531 from motiondivision/change-animate-presence-…
mattgperry Feb 5, 2026
95642b2
feat(transition): Replace inheritTransition prop with transition.inherit
mattgperry Feb 5, 2026
a242924
docs: Add file size and optional chaining guidance to CLAUDE.md
mattgperry Feb 5, 2026
4830aba
fix(hover): Defer pointerleave during press to fix whileHover droppin…
mattgperry Feb 5, 2026
f81d462
Merge pull request #3540 from motiondivision/drag-while-hover
mattgperry Feb 5, 2026
a18894c
Update CHANGELOG.md
mattgperry Feb 5, 2026
09fd2ea
v12.31.2
mattgperry Feb 5, 2026
5d1fd4e
Trying xlarge resource class
mattgperry Feb 5, 2026
7b57730
Reverting to large resource class
mattgperry Feb 5, 2026
719e552
Updating circleci workflow
mattgperry Feb 5, 2026
2025d92
Updating workflow
mattgperry Feb 5, 2026
c429439
fix: transitionEnd stuck with stale values after rapid variant switching
mattgperry Feb 4, 2026
67a484b
fix(drag): Update test fixture to tall vertical element with vertical…
mattgperry Feb 5, 2026
9b148df
Merge pull request #3536 from motiondivision/animation-resume-after-s…
mattgperry Feb 5, 2026
4380dbf
refactor(transition): Extract resolveTransition and support inherit i…
mattgperry Feb 5, 2026
a244a28
fix(drag): Add force:true to all triggers for oversized element
mattgperry Feb 5, 2026
374c8b7
Merge pull request #3532 from motiondivision/variants-stuck
mattgperry Feb 5, 2026
0d5d244
Merge pull request #3530 from motiondivision/drag-scroll
mattgperry Feb 5, 2026
4cd97b4
Update CHANGELOG.md
mattgperry Feb 5, 2026
06c0883
Updating changelog
mattgperry Feb 5, 2026
461273f
Updating changelog
mattgperry Feb 5, 2026
cd4ec23
v12.31.3
mattgperry Feb 5, 2026
d4c0bcd
refactor(gestures): Rename stopTapPropagation to propagate={{ tap: fa…
mattgperry Feb 5, 2026
972e556
Merge pull request #3538 from motiondivision/motion-config-merge-tran…
mattgperry Feb 5, 2026
69b1c97
Updating changelog
mattgperry Feb 5, 2026
b962d09
v12.32.0
mattgperry Feb 5, 2026
0fec416
Adding changelog updates
mattgperry Feb 5, 2026
6a1edd6
Merge pull request #3539 from motiondivision/event-propagation
mattgperry Feb 5, 2026
4849b3a
Updating changelog
mattgperry Feb 5, 2026
fde47ac
v12.33.0
mattgperry Feb 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 49 additions & 109 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
jobs:
test:
setup:
docker:
- image: cimg/node:20.11.1-browsers
working_directory: ~/repo
resource_class: large
environment:
CYPRESS_CACHE_FOLDER: ~/repo/.cache/Cypress
steps:
- checkout

- run:
name: Yarn version
command: yarn --version

# Download and cache dependencies (Yarn artifacts, not node_modules)
- restore_cache:
keys:
- v3-yarn-{{ checksum "yarn.lock" }}
Expand All @@ -29,6 +26,24 @@ jobs:
- .yarn/patches
key: v3-yarn-{{ checksum "yarn.lock" }}

- run:
name: Build
command: yarn build

- persist_to_workspace:
root: .
paths:
- .

test:
docker:
- image: cimg/node:20.11.1-browsers
working_directory: ~/repo
resource_class: large
steps:
- attach_workspace:
at: ~/repo

- run:
name: Test Jest
command: make test-jest
Expand All @@ -40,29 +55,13 @@ jobs:
docker:
- image: cimg/node:20.11.1-browsers
working_directory: ~/repo
parallelism: 6
parallelism: 4
resource_class: large
environment:
CYPRESS_CACHE_FOLDER: ~/repo/.cache/Cypress
steps:
- checkout

- run:
name: Yarn version
command: yarn --version

- restore_cache:
keys:
- v3-yarn-{{ checksum "yarn.lock" }}
- v3-yarn-
- run:
name: Install dependencies (immutable)
command: yarn install --immutable
- save_cache:
paths:
- .yarn/cache
- .yarn/releases
- .yarn/plugins
- .yarn/patches
key: v3-yarn-{{ checksum "yarn.lock" }}
- attach_workspace:
at: ~/repo

- run:
name: React tests
Expand All @@ -77,32 +76,16 @@ jobs:
docker:
- image: cimg/node:20.11.1-browsers
working_directory: ~/repo
parallelism: 6
parallelism: 4
resource_class: large
environment:
CYPRESS_CACHE_FOLDER: ~/repo/.cache/Cypress
steps:
- checkout

- run:
name: Yarn version
command: yarn --version

- restore_cache:
keys:
- v3-yarn-{{ checksum "yarn.lock" }}
- v3-yarn-
- run:
name: Install dependencies (immutable)
command: yarn install --immutable
- save_cache:
paths:
- .yarn/cache
- .yarn/releases
- .yarn/plugins
- .yarn/patches
key: v3-yarn-{{ checksum "yarn.lock" }}
- attach_workspace:
at: ~/repo

- run:
name: React tests
name: React 19 tests
command: make test-react-19
environment:
JEST_JUNIT_OUTPUT: test_reports/framer-motion-react-19.xml
Expand All @@ -115,27 +98,11 @@ jobs:
- image: cimg/node:20.11.1-browsers
resource_class: large
working_directory: ~/repo
environment:
CYPRESS_CACHE_FOLDER: ~/repo/.cache/Cypress
steps:
- checkout

- run:
name: Yarn version
command: yarn --version

- restore_cache:
keys:
- v3-yarn-{{ checksum "yarn.lock" }}
- v3-yarn-
- run:
name: Install dependencies (immutable)
command: yarn install --immutable
- save_cache:
paths:
- .yarn/cache
- .yarn/releases
- .yarn/plugins
- .yarn/patches
key: v3-yarn-{{ checksum "yarn.lock" }}
- attach_workspace:
at: ~/repo

- run:
name: HTML tests
Expand All @@ -152,47 +119,20 @@ jobs:
- store_test_results:
path: test_reports

test-playwright:
docker:
- image: mcr.microsoft.com/playwright:v1.51.1-noble
resource_class: large
working_directory: ~/repo
steps:
- checkout

- run:
name: Yarn version
command: yarn --version

- restore_cache:
keys:
- v3-yarn-{{ checksum "yarn.lock" }}
- v3-yarn-
- run:
name: Install dependencies (immutable)
command: yarn install --immutable
- save_cache:
paths:
- .yarn/cache
- .yarn/releases
- .yarn/plugins
- .yarn/patches
key: v3-yarn-{{ checksum "yarn.lock" }}

- run:
name: Playwright tests
command: yarn test-playwright
environment:
JEST_JUNIT_OUTPUT: test_reports/framer-motion-playwright.xml

- store_test_results:
path: test_reports

workflows:
version: 2
build:
jobs:
- test
- test-react
- test-react-19
- test-html
- setup
- test:
requires:
- setup
- test-react:
requires:
- setup
- test-react-19:
requires:
- setup
- test-html:
requires:
- setup
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ Motion adheres to [Semantic Versioning](http://semver.org/).

Undocumented APIs should be considered internal and may change without warning.

## [12.33.0] 2026-02-05

### Added

- `<motion />`: New `propagate.tap` prop prevents tap gestures from propagating to parents.

## [12.32.0] 2026-02-05

### Added

- `transition.inherit`: When `true`, inherit transition values from less-specific transitions.

## [12.31.3] 2026-02-05

### Fixed

- `<motion />`: Ensure animation state is reset after being re-suspended.
- Prevent stale values when mixing `transitionEnd` and `transition.type: false`.
- Drag: Fix "sticky" throw velocity on initial interaciton.
- Drag: Ensure catching a thrown element kills its velocity.

## [12.31.2] 2026-02-05

### Fixed

- `onHoverStart` and `onHoverEnd` first argument now correctly typed as `PointerEvent`.
- `whileHover`: No longer persists after drag end.
- `AnimatePresence`: Allow changing `mode` prop.

## [12.31.1] 2026-02-04

### Added
Expand Down
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ async function nextFrame() {

## Code Style

- **Prioritise small file size** — this is a library shipped to end users. Prefer concise patterns that minimise output bytes.
- Prefer optional chaining (`value?.jump()`) over explicit `if` statements
- Use `interface` for type definitions (enforced by ESLint)
- No default exports (use named exports)
- Prefer arrow callbacks
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ test-e2e: test-nextjs test-html test-react test-react-19
yarn test-playwright

test-single: build test-mkdir
yarn start-server-and-test "yarn dev-server" http://localhost:9991 "cd packages/framer-motion && cypress run --config-file=cypress.react.json --headed --spec cypress/integration/drag-nested.ts"
yarn start-server-and-test "yarn dev-server" http://localhost:9990 "cd packages/framer-motion && cypress run --config-file=cypress.json --headed --spec cypress/integration/drag-momentum.ts"

lint: bootstrap
yarn lint
Expand Down
8 changes: 4 additions & 4 deletions dev/html/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "html-env",
"private": true,
"version": "12.31.1",
"version": "12.33.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -10,9 +10,9 @@
"preview": "vite preview"
},
"dependencies": {
"framer-motion": "^12.31.1",
"motion": "^12.31.1",
"motion-dom": "^12.30.1",
"framer-motion": "^12.33.0",
"motion": "^12.33.0",
"motion-dom": "^12.33.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
Expand Down
19 changes: 19 additions & 0 deletions dev/html/public/playwright/gestures/press.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
<div class="box" id="press-div-nested">
<button id="press-click-button">click</button>
</div>
<div class="box" id="propagate-parent">
<div class="box" id="propagate-child" style="width: 50px; height: 50px">child</div>
</div>
<input type="text" id="propagate-output" value="" />
<script type="module" src="/src/inc.js"></script>
<script type="module">
const { press } = window.MotionDOM
Expand Down Expand Up @@ -100,6 +104,21 @@
: "cancel"
}
})

// Propagation test: child with stopPropagation prevents parent press
const propagateOutput = document.getElementById("propagate-output")
press("#propagate-parent", () => {
propagateOutput.value += "parent-start,"
return (_, { success }) => {
propagateOutput.value += success ? "parent-end," : "parent-cancel,"
}
})
press("#propagate-child", () => {
propagateOutput.value += "child-start,"
return (_, { success }) => {
propagateOutput.value += success ? "child-end," : "child-cancel,"
}
}, { stopPropagation: true })
</script>
</body>
</html>
4 changes: 2 additions & 2 deletions dev/next/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "next-env",
"private": true,
"version": "12.31.1",
"version": "12.33.0",
"type": "module",
"scripts": {
"dev": "next dev",
Expand All @@ -10,7 +10,7 @@
"build": "next build"
},
"dependencies": {
"motion": "^12.31.1",
"motion": "^12.33.0",
"next": "15.4.10",
"react": "19.0.0",
"react-dom": "19.0.0"
Expand Down
4 changes: 2 additions & 2 deletions dev/react-19/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-19-env",
"private": true,
"version": "12.31.1",
"version": "12.33.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -11,7 +11,7 @@
"preview": "vite preview"
},
"dependencies": {
"motion": "^12.31.1",
"motion": "^12.33.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions dev/react/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-env",
"private": true,
"version": "12.31.1",
"version": "12.33.0",
"type": "module",
"scripts": {
"dev": "yarn vite",
Expand All @@ -11,7 +11,7 @@
"preview": "yarn vite preview"
},
"dependencies": {
"framer-motion": "^12.31.1",
"framer-motion": "^12.33.0",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
Expand Down
21 changes: 21 additions & 0 deletions dev/react/src/tests/drag-momentum.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { motion } from "framer-motion"

export const App = () => {
return (
<div style={{ height: 2000, paddingTop: 100 }}>
<motion.div
id="box"
data-testid="draggable"
drag
dragMomentum={true}
initial={{
width: 50,
height: 1000,
background: "red",
x: 0,
y: 0,
}}
/>
</div>
)
}
Loading