Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ Motion adheres to [Semantic Versioning](http://semver.org/).

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

## [12.27.0] 2026-01-18
## [12.27.1] 2026-01-19

### Fixed

- Improving projection node cleanup.

## [12.27.0] 2026-01-18

### Added

- Adding new exports for internal use.

## [12.26.2] 2026-01-13
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.27.0",
"version": "12.27.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -10,9 +10,9 @@
"preview": "vite preview"
},
"dependencies": {
"framer-motion": "^12.27.0",
"motion": "^12.27.0",
"motion-dom": "^12.27.0",
"framer-motion": "^12.27.1",
"motion": "^12.27.1",
"motion-dom": "^12.27.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
Expand Down
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.27.0",
"version": "12.27.1",
"type": "module",
"scripts": {
"dev": "next dev",
Expand All @@ -10,7 +10,7 @@
"build": "next build"
},
"dependencies": {
"motion": "^12.27.0",
"motion": "^12.27.1",
"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.27.0",
"version": "12.27.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand All @@ -11,7 +11,7 @@
"preview": "vite preview"
},
"dependencies": {
"motion": "^12.27.0",
"motion": "^12.27.1",
"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.27.0",
"version": "12.27.1",
"type": "module",
"scripts": {
"dev": "yarn vite",
Expand All @@ -11,7 +11,7 @@
"preview": "yarn vite preview"
},
"dependencies": {
"framer-motion": "^12.27.0",
"framer-motion": "^12.27.1",
"react": "^18.3.1",
"react-dom": "^18.3.1"
},
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "12.27.0",
"version": "12.27.1",
"packages": [
"packages/*",
"dev/*"
Expand Down
4 changes: 2 additions & 2 deletions packages/framer-motion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "framer-motion",
"version": "12.27.0",
"version": "12.27.1",
"description": "A simple and powerful JavaScript animation library",
"main": "dist/cjs/index.js",
"module": "dist/es/index.mjs",
Expand Down Expand Up @@ -88,7 +88,7 @@
"measure": "rollup -c ./rollup.size.config.mjs"
},
"dependencies": {
"motion-dom": "^12.27.0",
"motion-dom": "^12.27.1",
"motion-utils": "^12.24.10",
"tslib": "^2.4.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/motion-dom/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "motion-dom",
"version": "12.27.0",
"version": "12.27.1",
"author": "Matt Perry",
"license": "MIT",
"repository": "https://github.com/motiondivision/motion",
Expand Down
11 changes: 10 additions & 1 deletion packages/motion-dom/src/layout/LayoutAnimationBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,16 @@ export class LayoutAnimationBuilder implements PromiseLike<GroupAnimation> {
const groupAnimation = new GroupAnimation(animations)

groupAnimation.finished.then(() => {
cleanupProjectionTree(context!)
// Only clean up nodes for elements no longer in the document.
// Elements still in DOM keep their nodes so subsequent animations
// can use the stored position snapshots (A→B→A pattern).
const elementsToCleanup = new Set<HTMLElement>()
for (const element of context!.nodes.keys()) {
if (!document.contains(element)) {
elementsToCleanup.add(element)
}
}
cleanupProjectionTree(context!, elementsToCleanup)
})

this.notifyReady(groupAnimation)
Expand Down
4 changes: 2 additions & 2 deletions packages/motion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "motion",
"version": "12.27.0",
"version": "12.27.1",
"description": "An animation library for JavaScript and React.",
"main": "dist/cjs/index.js",
"module": "dist/es/index.mjs",
Expand Down Expand Up @@ -76,7 +76,7 @@
"postpublish": "git push --tags"
},
"dependencies": {
"framer-motion": "^12.27.0",
"framer-motion": "^12.27.1",
"tslib": "^2.4.0"
},
"peerDependencies": {
Expand Down
22 changes: 11 additions & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7420,14 +7420,14 @@ __metadata:
languageName: node
linkType: hard

"framer-motion@^12.27.0, framer-motion@workspace:packages/framer-motion":
"framer-motion@^12.27.1, framer-motion@workspace:packages/framer-motion":
version: 0.0.0-use.local
resolution: "framer-motion@workspace:packages/framer-motion"
dependencies:
"@radix-ui/react-dialog": ^1.1.15
"@thednp/dommatrix": ^2.0.11
"@types/three": 0.137.0
motion-dom: ^12.27.0
motion-dom: ^12.27.1
motion-utils: ^12.24.10
three: 0.137.0
tslib: ^2.4.0
Expand Down Expand Up @@ -8192,9 +8192,9 @@ __metadata:
version: 0.0.0-use.local
resolution: "html-env@workspace:dev/html"
dependencies:
framer-motion: ^12.27.0
motion: ^12.27.0
motion-dom: ^12.27.0
framer-motion: ^12.27.1
motion: ^12.27.1
motion-dom: ^12.27.1
react: ^18.3.1
react-dom: ^18.3.1
vite: ^5.2.0
Expand Down Expand Up @@ -10936,7 +10936,7 @@ __metadata:
languageName: node
linkType: hard

"motion-dom@^12.27.0, motion-dom@workspace:packages/motion-dom":
"motion-dom@^12.27.1, motion-dom@workspace:packages/motion-dom":
version: 0.0.0-use.local
resolution: "motion-dom@workspace:packages/motion-dom"
dependencies:
Expand Down Expand Up @@ -11013,11 +11013,11 @@ __metadata:
languageName: unknown
linkType: soft

"motion@^12.27.0, motion@workspace:packages/motion":
"motion@^12.27.1, motion@workspace:packages/motion":
version: 0.0.0-use.local
resolution: "motion@workspace:packages/motion"
dependencies:
framer-motion: ^12.27.0
framer-motion: ^12.27.1
tslib: ^2.4.0
peerDependencies:
"@emotion/is-prop-valid": "*"
Expand Down Expand Up @@ -11134,7 +11134,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "next-env@workspace:dev/next"
dependencies:
motion: ^12.27.0
motion: ^12.27.1
next: 15.4.10
react: 19.0.0
react-dom: 19.0.0
Expand Down Expand Up @@ -12599,7 +12599,7 @@ __metadata:
"@typescript-eslint/parser": ^7.2.0
"@vitejs/plugin-react-swc": ^3.5.0
eslint-plugin-react-refresh: ^0.4.6
motion: ^12.27.0
motion: ^12.27.1
react: ^19.0.0
react-dom: ^19.0.0
vite: ^5.2.0
Expand Down Expand Up @@ -12683,7 +12683,7 @@ __metadata:
"@typescript-eslint/parser": ^7.2.0
"@vitejs/plugin-react-swc": ^3.5.0
eslint-plugin-react-refresh: ^0.4.6
framer-motion: ^12.27.0
framer-motion: ^12.27.1
react: ^18.3.1
react-dom: ^18.3.1
vite: ^5.2.0
Expand Down
Loading