framer-motion 12.23.12 → 12.23.13

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
@@ -1,4 +1,3 @@
1
-
2
1
  <h1 align="center"> <img width="35" height="35" alt="Motion logo" src="https://github.com/user-attachments/assets/00d6d1c3-72c4-4c2f-a664-69da13182ffc" /><br />Motion for React</h1>
3
2
  <h3 align="center">
4
3
  An open source animation library<br />for React
@@ -11,7 +10,6 @@
11
10
  <img alt="NPM License" src="https://img.shields.io/npm/l/motion?color=FF2B6E">
12
11
  </p>
13
12
 
14
-
15
13
  ```bash
16
14
  npm install motion
17
15
  ```
@@ -19,28 +17,26 @@ npm install motion
19
17
  ## Table of Contents
20
18
 
21
19
  1. [Why Motion?](#why-motion)
22
- 2. [🍦 Flavours](#-flavours)
20
+ 2. [🍦 Platforms](#-platforms)
23
21
  3. [🎓 Examples](#-examples)
24
- 4. [🎨 Studio](#-studio)
25
- 5. [⚡️ Motion+](#-motion)
26
- 6. [👩🏻‍⚖️ License](#-license)
27
- 7. [💎 Contribute](#-contribute)
28
- 8. [✨ Sponsors](#-sponsors)
22
+ 4. [⚡️ Motion+](#-motion)
23
+ 5. [👩🏻‍⚖️ License](#-license)
24
+ 6. [💎 Contribute](#-contribute)
25
+ 7. [ Sponsors](#-sponsors)
29
26
 
30
27
  ## Why Motion?
31
28
 
32
- Motion is an animation library for making beautiful animations.
33
-
34
- * The **only** library with first‑class APIs for React, JavaScript, **and** Vue.
35
- * Powered by a **hybrid engine** that blends JavaScript flexibility with native browser APIs for **120fps GPU‑accelerated** motion.
36
- * Tiny footprint, tree‑shakable, and fully TypeScript‑typed.
29
+ - **Simple API:** First-class React, JavaScript, and Vue packages.
30
+ - **Hybrid engine:** Power of JavaScript combined with native browser APIs for 120fps, GPU-accelerated animations.
31
+ - **Production-ready:** TypeScript, extensive test suite, tree-shakable, tiny footprint.
32
+ **Batteries included:** Gestures, springs, layout transitions, scroll-linked effects, timelines.
37
33
 
38
- ## 🍦 Flavours
34
+ ## 🍦 Platforms
39
35
 
40
36
  Motion is available for [React](https://motion.dev/docs/react), [JavaScript](https://motion.dev/docs/quick-start) and [Vue](https://motion.dev/docs/vue).
41
37
 
42
38
  <details>
43
- <summary>React ⬇</summary>
39
+ <summary>React</summary>
44
40
 
45
41
  ```jsx
46
42
  import { motion } from "motion/react"
@@ -55,7 +51,7 @@ Get started with [Motion for React](https://motion.dev/docs/react).
55
51
  </details>
56
52
 
57
53
  <details>
58
- <summary>JavaScript ⬇</summary>
54
+ <summary>JavaScript</summary>
59
55
 
60
56
  ```javascript
61
57
  import { animate } from "motion"
@@ -68,7 +64,7 @@ Get started with [JavaScript](https://motion.dev/docs/quick-start).
68
64
  </details>
69
65
 
70
66
  <details>
71
- <summary>Vue ⬇</summary>
67
+ <summary>Vue</summary>
72
68
 
73
69
  ```html
74
70
  <script>
@@ -84,30 +80,19 @@ Get started with [Motion for Vue](https://motion.dev/docs/vue).
84
80
 
85
81
  ## 🎓 Examples
86
82
 
87
- [Motion Examples](https://motion.dev/examples) offers 100s of free and Motion+ examples for beginners and advanced users alike. Easy copy/paste code to kick‑start your next project.
83
+ Browse 100+ free and 180+ premium [Motion Examples](https://motion.dev/examples), with copy-paste code that'll level-up your animations whether you're a beginner or an expert.
88
84
 
89
85
  ## ⚡️ Motion+
90
86
 
91
- Learn, Design, Build. [Motion+](https://motion.dev/plus) is a one-time fee, lifetime update membership that provides:
92
- - 160+ premium Motion Examples
93
- - Motion UI features like Cursor and Ticker
94
- - Motion Studio animation editing for VS Code `alpha`
95
- - Early access content
96
- - Private Discord
97
-
98
- [Get Motion+](https://motion.dev/plus)
87
+ A one-time payment, lifetime-updates membership:
99
88
 
100
- ## 🎨 Studio
89
+ - **180+ premium examples**
90
+ - **Premium APIs** like [Cursor](https://motion.dev/docs/cursor) and [Ticker](https://motion.dev/docs/react-ticker)
91
+ - **Visual editing** for VS Code (alpha)
92
+ - **Private Discord**
93
+ - **Early access content**
101
94
 
102
- ![Video of bezier curve editing](https://framerusercontent.com/images/KO5dnHOUSNGb9S73p1J7nLhoFI.gif)
103
-
104
- Motion Studio is a versatile suite of developer tools allowing you to:
105
-
106
- - Visually edit CSS and Motion easing curves in VS Code
107
- - Generate CSS springs with LLMs
108
- - Load Motion docs into your LLM
109
-
110
- Get started with [Motion Studio](https://motion.dev/docs/tools-quick-start).
95
+ [Get Motion+](https://motion.dev/plus)
111
96
 
112
97
  ## 👩🏻‍⚖️ License
113
98
 
@@ -121,27 +106,27 @@ Get started with [Motion Studio](https://motion.dev/docs/tools-quick-start).
121
106
 
122
107
  Motion is sustainable thanks to the kind support of its sponsors.
123
108
 
124
- ### Partners
109
+ [Become a sponsor](https://motion.dev/sponsor)
125
110
 
126
- #### Framer
111
+ ### Partner
127
112
 
128
113
  Motion powers Framer animations, the web builder for creative pros. Design and ship your dream site. Zero code, maximum speed.
129
114
 
130
- <a href="https://www.framer.com?utm_source=motion-readme">
131
- <img alt="Framer" src="https://github.com/user-attachments/assets/0404c7a1-c29d-4785-89ae-aae315f3c759" width="300px" height="200px">
115
+ <a href="https://framer.link/FlnUbQY">
116
+ <img alt="Framer" src="https://github.com/user-attachments/assets/22a79be7-672e-4336-bfb7-5d55d1deb917" width="250px" height="150px">
132
117
  </a>
133
118
 
134
119
  ### Platinum
135
120
 
136
- <a href="https://tailwindcss.com"><img alt="Tailwind" src="https://github.com/user-attachments/assets/c0496f09-b8ee-4bc4-85ab-83a071bbbdec" width="300px" height="200px"></a> <a href="https://linear.app"><img alt="Linear" src="https://github.com/user-attachments/assets/a93710bb-d8ed-40e3-b0fb-1c5b3e2b16bb" width="300px" height="200px"></a>
121
+ <a href="https://linear.app"><img alt="Linear" src="https://github.com/user-attachments/assets/f9ce44b4-af28-4770-bb6e-9515b474bfb2" width="250px" height="150px"></a> <a href="https://figma.com"><img alt="Figma" src="https://github.com/user-attachments/assets/1077d0ab-4305-4a1f-81c8-d5be8c4c6717" width="250px" height="150px"></a> <a href="https://sanity.io"><img alt="Sanity" src="https://github.com/user-attachments/assets/80134088-f456-483f-8edd-940593c120ce" width="250px" height="150px"></a>
137
122
 
138
123
  ### Gold
139
124
 
140
- <a href="https://vercel.com"><img alt="Vercel" src="https://github.com/user-attachments/assets/23cb1e37-fa67-49ad-8f77-7f4b8eaba325" width="225px" height="150px"></a> <a href="https://liveblocks.io"><img alt="Liveblocks" src="https://github.com/user-attachments/assets/31436a47-951e-4eab-9a68-bdd54ccf9444" width="225px" height="150px"></a> <a href="https://lu.ma"><img alt="Luma" src="https://github.com/user-attachments/assets/4fae0c9d-de0f-4042-9cd6-e07885d028a9" width="225px" height="150px"></a> <a href="https://emilkowal.ski"><img alt="Emil Kowalski" src="https://github.com/user-attachments/assets/29f56b1a-37fb-4695-a6a6-151f6c24864f" width="300px" height="200px"></a>
125
+ <a href="https://tailwindcss.com"><img alt="Tailwind" src="https://github.com/user-attachments/assets/1d5f2571-8bc3-4367-9fec-14d291168ff0" width="200px" height="120px"></a> <a href="https://emilkowal.ski"><img alt="Emil Kowalski" src="https://github.com/user-attachments/assets/33d1cb98-238a-4eed-a0df-9c7ab097d65b" width="200px" height="120px"></a> <a href="https://liveblocks.io"><img alt="Liveblocks" src="https://github.com/user-attachments/assets/28eddbe5-1617-4e74-969d-2eb6fcd481af" width="200px" height="120px"></a> <a href="https://vercel.com"><img alt="Vercel" src="https://github.com/user-attachments/assets/abc473bd-07ae-4a7d-9833-efe9dadb3773" width="200px" height="120px"></a> <a href="https://lu.ma"><img alt="Luma" src="https://github.com/user-attachments/assets/ac282433-6adb-4ad2-9fd2-5c6ee513c14b" width="200px" height="120px"></a>
141
126
 
142
127
  ### Silver
143
128
 
144
- <a href="https://www.frontend.fyi/?utm_source=motion"><img alt="Frontend.fyi" src="https://github.com/user-attachments/assets/07d23aa5-69db-44a0-849d-90177e6fc817" width="150px" height="100px"></a> <a href="https://firecrawl.dev"><img alt="Firecrawl" src="https://github.com/user-attachments/assets/cba90e54-1329-4353-8fba-85beef4d2ee9" width="150px" height="100px"></a> <a href="https://puzzmo.com"><img alt="Puzzmo" src="https://github.com/user-attachments/assets/aa2d5586-e5e2-43b9-8446-db456e4b0758" width="150px" height="100px"></a>
129
+ <a href="https://www.frontend.fyi/?utm_source=motion"><img alt="Frontend.fyi" src="https://github.com/user-attachments/assets/f16e3eb9-f0bd-4ad1-8049-f079a3d65c69" width="150px" height="100px"></a> <a href="https://firecrawl.dev"><img alt="Firecrawl" src="https://github.com/user-attachments/assets/2c44e7f4-5c2a-4714-9050-1570538665ff" width="150px" height="100px"></a> <a href="https://puzzmo.com"><img alt="Puzzmo" src="https://github.com/user-attachments/assets/e32205a7-3ab1-41ec-8729-a794058fd655" width="150px" height="100px"></a> <a href="https://bolt.new"><img alt="Bolt.new" src="https://github.com/user-attachments/assets/7932d4b2-bb6c-422e-82b9-6ad78a7e3090" width="150px" height="100px"></a>
145
130
 
146
131
  ### Personal
147
132
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var featureBundle = require('./feature-bundle-PNQ-8QDo.js');
5
+ var featureBundle = require('./feature-bundle-CEbtLyJA.js');
6
6
  require('react');
7
7
  require('motion-dom');
8
8
  require('motion-utils');
@@ -4091,11 +4091,10 @@ function useMotionRef(visualState, visualElement, externalRef) {
4091
4091
  }
4092
4092
  },
4093
4093
  /**
4094
- * Only pass a new ref callback to React if we've received a visual element
4095
- * factory. Otherwise we'll be mounting/remounting every time externalRef
4096
- * or other dependencies change.
4094
+ * Include externalRef in dependencies to ensure the callback updates
4095
+ * when the ref changes, allowing proper ref forwarding.
4097
4096
  */
4098
- [visualElement]);
4097
+ [visualElement, externalRef]);
4099
4098
  }
4100
4099
 
4101
4100
  /**
package/dist/cjs/index.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var React = require('react');
7
- var featureBundle = require('./feature-bundle-PNQ-8QDo.js');
7
+ var featureBundle = require('./feature-bundle-CEbtLyJA.js');
8
8
  var motionDom = require('motion-dom');
9
9
  var motionUtils = require('motion-utils');
10
10
 
package/dist/cjs/m.js CHANGED
@@ -799,11 +799,10 @@ function useMotionRef(visualState, visualElement, externalRef) {
799
799
  }
800
800
  },
801
801
  /**
802
- * Only pass a new ref callback to React if we've received a visual element
803
- * factory. Otherwise we'll be mounting/remounting every time externalRef
804
- * or other dependencies change.
802
+ * Include externalRef in dependencies to ensure the callback updates
803
+ * when the ref changes, allowing proper ref forwarding.
805
804
  */
806
- [visualElement]);
805
+ [visualElement, externalRef]);
807
806
  }
808
807
 
809
808
  /**
@@ -28,11 +28,10 @@ function useMotionRef(visualState, visualElement, externalRef) {
28
28
  }
29
29
  },
30
30
  /**
31
- * Only pass a new ref callback to React if we've received a visual element
32
- * factory. Otherwise we'll be mounting/remounting every time externalRef
33
- * or other dependencies change.
31
+ * Include externalRef in dependencies to ensure the callback updates
32
+ * when the ref changes, allowing proper ref forwarding.
34
33
  */
35
- [visualElement]);
34
+ [visualElement, externalRef]);
36
35
  }
37
36
 
38
37
  export { useMotionRef };
@@ -9568,11 +9568,10 @@
9568
9568
  }
9569
9569
  },
9570
9570
  /**
9571
- * Only pass a new ref callback to React if we've received a visual element
9572
- * factory. Otherwise we'll be mounting/remounting every time externalRef
9573
- * or other dependencies change.
9571
+ * Include externalRef in dependencies to ensure the callback updates
9572
+ * when the ref changes, allowing proper ref forwarding.
9574
9573
  */
9575
- [visualElement]);
9574
+ [visualElement, externalRef]);
9576
9575
  }
9577
9576
 
9578
9577
  /**