motion 13.3.0 → 13.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -54,6 +54,34 @@ Get started with [Motion for React](https://motion.dev/docs/react).
54
54
 
55
55
  **Note:** Framer Motion is now Motion. Import from `motion/react` instead of `framer-motion`.
56
56
 
57
+ #### View transitions
58
+
59
+ `AnimateView` is available from a separate entry point and requires React and React DOM 19.3 or later. Other Motion React APIs continue to support React 18.
60
+
61
+ ```jsx
62
+ import { AnimateView } from "motion/react-animate-view"
63
+ import { startTransition, useState } from "react"
64
+
65
+ function View() {
66
+ const [show, setShow] = useState(false)
67
+
68
+ return (
69
+ <>
70
+ <button onClick={() => startTransition(() => setShow(!show))}>
71
+ Toggle
72
+ </button>
73
+ {show && (
74
+ <AnimateView transition={{ duration: 0.4 }}>
75
+ <div>Hello</div>
76
+ </AnimateView>
77
+ )}
78
+ </>
79
+ )
80
+ }
81
+ ```
82
+
83
+ Existing Motion+ users can replace `motion-plus/animate-view` imports with `motion/react-animate-view`.
84
+
57
85
  ### JS
58
86
 
59
87
  ```javascript
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var animateView = require('framer-motion/animate-view');
6
+
7
+
8
+
9
+ Object.keys(animateView).forEach(function (k) {
10
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
11
+ enumerable: true,
12
+ get: function () { return animateView[k]; }
13
+ });
14
+ });
@@ -0,0 +1,2 @@
1
+ "use client";
2
+ export * from 'framer-motion/animate-view';
@@ -0,0 +1 @@
1
+ export * from 'framer-motion/animate-view';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "motion",
3
- "version": "13.3.0",
3
+ "version": "13.4.0",
4
4
  "description": "An animation library for JavaScript and React.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.mjs",
@@ -59,6 +59,12 @@
59
59
  "import": "./dist/es/react-mini.mjs",
60
60
  "default": "./dist/cjs/react-mini.js"
61
61
  },
62
+ "./react-animate-view": {
63
+ "types": "./dist/react-animate-view.d.ts",
64
+ "require": "./dist/cjs/react-animate-view.js",
65
+ "import": "./dist/es/react-animate-view.mjs",
66
+ "default": "./dist/cjs/react-animate-view.js"
67
+ },
62
68
  "./package.json": "./package.json"
63
69
  },
64
70
  "types": "dist/index.d.ts",
@@ -89,7 +95,7 @@
89
95
  "postpublish": "git push --tags"
90
96
  },
91
97
  "dependencies": {
92
- "framer-motion": "^13.3.0",
98
+ "framer-motion": "^13.4.0",
93
99
  "tslib": "^2.4.0"
94
100
  },
95
101
  "peerDependencies": {
@@ -104,5 +110,5 @@
104
110
  "optional": true
105
111
  }
106
112
  },
107
- "gitHead": "16cf742d9fad846f8b3a91a86d57f6b5757c8c5e"
113
+ "gitHead": "a6ea2f9289e8bdace16b25b8142b9b53d37284a9"
108
114
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "private": true,
3
+ "types": "../dist/react-animate-view.d.ts",
4
+ "main": "../dist/cjs/react-animate-view.js",
5
+ "module": "../dist/es/react-animate-view.mjs"
6
+ }