motion 13.0.0-alpha.0 → 13.0.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
@@ -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</h1>
3
2
  <h3 align="center">
4
3
  An open source animation library<br />for JavaScript, React and Vue
@@ -9,38 +8,39 @@
9
8
  <a href="https://www.npmjs.com/package/motion" rel="noopener noreferrer nofollow" ><img src="https://img.shields.io/npm/dm/framer-motion?color=8D30FF&label=npm" alt="npm downloads per month"></a>
10
9
  <a target="_blank" rel="noopener noreferrer nofollow" href="https://www.jsdelivr.com/package/npm/motion"><img alt="jsDelivr hits (npm)" src="https://img.shields.io/jsdelivr/npm/hm/framer-motion?logo=jsdeliver&color=FF4FBA"></a>
11
10
  <img alt="NPM License" src="https://img.shields.io/npm/l/motion?color=FF2B6E">
11
+ <a target="_blank" rel="noopener noreferrer nofollow" href="https://score.motion.dev/site/motion.dev?utm_source=github&utm_medium=readme-badge"><img height="20" alt="MotionScore grade" src="https://api.motion.dev/score/badge?url=motion.dev"></a>
12
12
  </p>
13
13
 
14
-
15
14
  ```bash
15
+ # React / JavaScript
16
16
  npm install motion
17
+
18
+ # Vue
19
+ npm install motion-v
17
20
  ```
18
21
 
19
22
  ## Table of Contents
20
23
 
21
24
  1. [Why Motion?](#why-motion)
22
- 2. [🍦 Flavours](#-flavours)
25
+ 2. [🍦 Platforms](#-platforms)
23
26
  3. [🎓 Examples](#-examples)
24
- 4. [🎨 Studio](#-studio)
25
- 5. [⚡️ Motion+](#-motion)
26
- 6. [👩🏻‍⚖️ License](#-license)
27
- 7. [💎 Contribute](#-contribute)
28
- 8. [✨ Sponsors](#-sponsors)
27
+ 4. [⚡️ Motion+](#-motion)
28
+ 5. [👩🏻‍⚖️ License](#-license)
29
+ 6. [💎 Contribute](#-contribute)
30
+ 7. [ Sponsors](#-sponsors)
29
31
 
30
32
  ## Why Motion?
31
33
 
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.
34
+ - **Simple API:** First-class React, JavaScript, and Vue packages.
35
+ - **Hybrid engine:** Power of JavaScript combined with native browser APIs for 120fps, GPU-accelerated animations.
36
+ - **Production-ready:** TypeScript, extensive test suite, tree-shakable, tiny footprint.
37
+ **Batteries included:** Gestures, springs, layout transitions, scroll-linked effects, timelines.
37
38
 
38
- ## 🍦 Flavours
39
+ ## 🍦 Platforms
39
40
 
40
41
  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
42
 
42
- <details>
43
- <summary>React ⬇</summary>
43
+ ### React
44
44
 
45
45
  ```jsx
46
46
  import { motion } from "motion/react"
@@ -52,10 +52,9 @@ function Component() {
52
52
 
53
53
  Get started with [Motion for React](https://motion.dev/docs/react).
54
54
 
55
- </details>
55
+ **Note:** Framer Motion is now Motion. Import from `motion/react` instead of `framer-motion`.
56
56
 
57
- <details>
58
- <summary>JavaScript ⬇</summary>
57
+ ### JS
59
58
 
60
59
  ```javascript
61
60
  import { animate } from "motion"
@@ -65,10 +64,7 @@ animate("#box", { x: 100 })
65
64
 
66
65
  Get started with [JavaScript](https://motion.dev/docs/quick-start).
67
66
 
68
- </details>
69
-
70
- <details>
71
- <summary>Vue ⬇</summary>
67
+ ### Vue
72
68
 
73
69
  ```html
74
70
  <script>
@@ -80,34 +76,25 @@ Get started with [JavaScript](https://motion.dev/docs/quick-start).
80
76
 
81
77
  Get started with [Motion for Vue](https://motion.dev/docs/vue).
82
78
 
83
- </details>
79
+ ## 🎓 Examples & tutorials
84
80
 
85
- ## 🎓 Examples
81
+ Browse 330+ [official examples](https://motion.dev/examples), with copy-paste code that'll level-up your animations whether you're a beginner or an expert.
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
+ Over 100 examples come with a full step-by-step [tutorial](https://motion.dev/tutorials).
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)
99
-
100
- ## 🎨 Studio
87
+ A one-time payment, lifetime-updates membership:
101
88
 
102
- ![Video of bezier curve editing](https://framerusercontent.com/images/KO5dnHOUSNGb9S73p1J7nLhoFI.gif)
89
+ - **330+ examples**
90
+ - **100+ tutorials**
91
+ - **Premium APIs** like [Cursor](https://motion.dev/docs/cursor) and [Ticker](https://motion.dev/docs/react-ticker)
92
+ - **Transition editor** for Cursor and VS Code
93
+ - **AI skills**
94
+ - **Private Discord**
95
+ - **Early access content**
103
96
 
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).
97
+ [Get Motion+](https://motion.dev/plus)
111
98
 
112
99
  ## 👩🏻‍⚖️ License
113
100
 
@@ -121,31 +108,34 @@ Get started with [Motion Studio](https://motion.dev/docs/tools-quick-start).
121
108
 
122
109
  Motion is sustainable thanks to the kind support of its sponsors.
123
110
 
111
+ [Become a sponsor](https://motion.dev/sponsor)
112
+
124
113
  ### Partners
125
114
 
126
- #### Framer
115
+ Motion powers the animations for all websites built with Framer, the web builder for creative pros. The Motion website itself is built on Framer, for its delightful canvas-based editing and powerful CMS features.
127
116
 
128
- Motion powers Framer animations, the web builder for creative pros. Design and ship your dream site. Zero code, maximum speed.
117
+ <a href="https://framer.link/FlnUbQY">
118
+ <img alt="Framer" src="https://github.com/user-attachments/assets/22a79be7-672e-4336-bfb7-5d55d1deb917" width="250px" height="150px">
119
+ </a>
120
+
121
+ Motion drives the animations on the Cursor homepage, and is working with Cursor to bring powerful AI workflows to the Motion examples and docs.
129
122
 
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">
123
+ <a href="https://cursor.com">
124
+ <img alt="Cursor" src="https://github.com/user-attachments/assets/81c482d3-c2c2-4b35-bbcf-933b28d5b448" width="250px" height="150px" />
132
125
  </a>
133
126
 
134
127
  ### Platinum
135
128
 
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>
129
+ <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> <a href="https://animations.dev"><img alt="Sanity" src="https://github.com/user-attachments/assets/7c5ab87d-c7d9-44b4-9c7e-f9e6a9f3ba3b" width="250px" height="150px"></a> <a href="https://clerk.com?utm_campaign=motion"><img alt="Clerk" src="https://github.com/user-attachments/assets/16789f85-eaf4-46fb-9961-b3e66d33afbc" width="250px" height="150px"></a>
137
130
 
138
131
  ### Gold
139
132
 
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>
141
-
142
133
  ### Silver
143
134
 
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>
135
+ <a href="https://liveblocks.io"><img alt="Liveblocks" src="https://github.com/user-attachments/assets/28eddbe5-1617-4e74-969d-2eb6fcd481af" width="150px" height="100px"></a> <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://bolt.new"><img alt="Bolt.new" src="https://github.com/user-attachments/assets/7932d4b2-bb6c-422e-82b9-6ad78a7e3090" width="150px" height="100px"></a>
145
136
 
146
137
  ### Personal
147
138
 
148
139
  - [OlegWock](https://sinja.io)
149
140
  - [Lambert Weller](https://github.com/l-mbert)
150
141
  - [Jake LeBoeuf](https://jklb.wf)
151
- - [Han Lee](https://github.com/hahnlee)
package/dist/cjs/react.js CHANGED
@@ -2,13 +2,45 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var framerMotion = require('framer-motion');
5
+ var fm = require('framer-motion');
6
6
 
7
+ function _interopNamespaceDefault(e) {
8
+ var n = Object.create(null);
9
+ if (e) {
10
+ Object.keys(e).forEach(function (k) {
11
+ if (k !== 'default') {
12
+ var d = Object.getOwnPropertyDescriptor(e, k);
13
+ Object.defineProperty(n, k, d.get ? d : {
14
+ enumerable: true,
15
+ get: function () { return e[k]; }
16
+ });
17
+ }
18
+ });
19
+ }
20
+ n.default = e;
21
+ return Object.freeze(n);
22
+ }
7
23
 
24
+ var fm__namespace = /*#__PURE__*/_interopNamespaceDefault(fm);
8
25
 
9
- Object.keys(framerMotion).forEach(function (k) {
26
+ // Re-export everything from framer-motion.
27
+ //
28
+ // `motion` and `m` are aliased through local bindings so the module has
29
+ // explicit named exports for IDE auto-import (see #3432). The previous
30
+ // `export { motion, m } from "framer-motion"` line — sitting alongside
31
+ // `export * from "framer-motion"` — was a duplicate-source re-export pattern
32
+ // that caused Next.js Turbopack to OOM during module-graph analysis (#3741).
33
+ // Local declarations shadow the wildcard re-export per the ES spec, so
34
+ // `motion` and `m` come from the explicit bindings below and the rest from
35
+ // `export *`.
36
+ const motion = fm__namespace.motion;
37
+ const m = fm__namespace.m;
38
+
39
+ exports.m = m;
40
+ exports.motion = motion;
41
+ Object.keys(fm).forEach(function (k) {
10
42
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
11
43
  enumerable: true,
12
- get: function () { return framerMotion[k]; }
44
+ get: function () { return fm[k]; }
13
45
  });
14
46
  });
package/dist/es/react.mjs CHANGED
@@ -1 +1,17 @@
1
+ import * as fm from 'framer-motion';
1
2
  export * from 'framer-motion';
3
+
4
+ // Re-export everything from framer-motion.
5
+ //
6
+ // `motion` and `m` are aliased through local bindings so the module has
7
+ // explicit named exports for IDE auto-import (see #3432). The previous
8
+ // `export { motion, m } from "framer-motion"` line — sitting alongside
9
+ // `export * from "framer-motion"` — was a duplicate-source re-export pattern
10
+ // that caused Next.js Turbopack to OOM during module-graph analysis (#3741).
11
+ // Local declarations shadow the wildcard re-export per the ES spec, so
12
+ // `motion` and `m` come from the explicit bindings below and the rest from
13
+ // `export *`.
14
+ const motion = fm.motion;
15
+ const m = fm.m;
16
+
17
+ export { m, motion };