motion 11.11.14 → 11.11.16
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/.turbo/turbo-build.log +27 -12
- package/README.md +24 -14
- package/dist/cjs/index.js +34 -8
- package/dist/cjs/mini.js +564 -0
- package/dist/cjs/react-client.js +16 -2
- package/dist/cjs/react-mini.js +596 -0
- package/dist/cjs/react.js +14 -0
- package/dist/es/framer-motion/dist/es/animation/GroupPlaybackControls.mjs +3 -0
- package/dist/es/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +4 -0
- package/dist/es/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +7 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +6 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/index.mjs +13 -6
- package/dist/es/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/framer-motion/dist/es/value/index.mjs +1 -1
- package/dist/es/motion/lib/mini.mjs +1 -0
- package/dist/es/motion/lib/react-mini.mjs +2 -0
- package/dist/mini.d.ts +1 -0
- package/dist/motion.dev.js +34 -8
- package/dist/motion.js +1 -1
- package/dist/react-mini.d.ts +1 -0
- package/lib/mini.js +2 -0
- package/lib/mini.js.map +1 -0
- package/lib/react-mini.js +3 -0
- package/lib/react-mini.js.map +1 -0
- package/mini/package.json +6 -0
- package/package.json +15 -3
- package/rollup.config.mjs +27 -1
- package/src/mini.ts +1 -0
- package/src/react-mini.ts +3 -0
- package/types/mini.d.ts +1 -0
- package/types/react-mini.d.ts +1 -0
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,32 +1,47 @@
|
|
|
1
|
-
(node:
|
|
1
|
+
(node:75899) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
|
|
2
2
|
(Use `node --trace-warnings ...` to show where the warning was created)
|
|
3
3
|
[36m
|
|
4
4
|
[1mlib/index.js[22m → [1mdist/motion.dev.js[22m...[39m
|
|
5
|
-
[32mcreated [1mdist/motion.dev.js[22m in [
|
|
5
|
+
[32mcreated [1mdist/motion.dev.js[22m in [1m844ms[22m[39m
|
|
6
6
|
[36m
|
|
7
7
|
[1mlib/index.js[22m → [1mdist/motion.js[22m...[39m
|
|
8
|
-
[32mcreated [1mdist/motion.js[22m in [
|
|
8
|
+
[32mcreated [1mdist/motion.js[22m in [1m978ms[22m[39m
|
|
9
9
|
[36m
|
|
10
10
|
[1mlib/index.js[22m → [1mdist/cjs[22m...[39m
|
|
11
|
-
[32mcreated [1mdist/cjs[22m in [
|
|
11
|
+
[32mcreated [1mdist/cjs[22m in [1m306ms[22m[39m
|
|
12
12
|
[36m
|
|
13
13
|
[1mlib/react-client.js[22m → [1mdist/cjs[22m...[39m
|
|
14
|
-
[32mcreated [1mdist/cjs[22m in [
|
|
14
|
+
[32mcreated [1mdist/cjs[22m in [1m365ms[22m[39m
|
|
15
|
+
[36m
|
|
16
|
+
[1mlib/react.js[22m → [1mdist/cjs[22m...[39m
|
|
17
|
+
[32mcreated [1mdist/cjs[22m in [1m8ms[22m[39m
|
|
18
|
+
[36m
|
|
19
|
+
[1mlib/mini.js[22m → [1mdist/cjs[22m...[39m
|
|
20
|
+
[32mcreated [1mdist/cjs[22m in [1m37ms[22m[39m
|
|
21
|
+
[36m
|
|
22
|
+
[1mlib/react-mini.js[22m → [1mdist/cjs[22m...[39m
|
|
23
|
+
[32mcreated [1mdist/cjs[22m in [1m36ms[22m[39m
|
|
15
24
|
[36m
|
|
16
25
|
[1mlib/react-m.js[22m → [1mdist/cjs[22m...[39m
|
|
17
|
-
[32mcreated [1mdist/cjs[22m in [
|
|
26
|
+
[32mcreated [1mdist/cjs[22m in [1m63ms[22m[39m
|
|
18
27
|
[36m
|
|
19
|
-
[1mlib/index.js, lib/react.js, lib/react-client.js, lib/react-m.js[22m → [1mdist/es[22m...[39m
|
|
20
|
-
[32mcreated [1mdist/es[22m in [
|
|
28
|
+
[1mlib/index.js, lib/mini.js, lib/react.js, lib/react-mini.js, lib/react-client.js, lib/react-m.js[22m → [1mdist/es[22m...[39m
|
|
29
|
+
[32mcreated [1mdist/es[22m in [1m772ms[22m[39m
|
|
21
30
|
[36m
|
|
22
31
|
[1mtypes/index.d.ts[22m → [1mdist/index.d.ts[22m...[39m
|
|
23
|
-
[32mcreated [1mdist/index.d.ts[22m in [
|
|
32
|
+
[32mcreated [1mdist/index.d.ts[22m in [1m23ms[22m[39m
|
|
24
33
|
[36m
|
|
25
34
|
[1mtypes/react.d.ts[22m → [1mdist/react.d.ts[22m...[39m
|
|
26
|
-
[32mcreated [1mdist/react.d.ts[22m in [
|
|
35
|
+
[32mcreated [1mdist/react.d.ts[22m in [1m9ms[22m[39m
|
|
36
|
+
[36m
|
|
37
|
+
[1mtypes/react-mini.d.ts[22m → [1mdist/react-mini.d.ts[22m...[39m
|
|
38
|
+
[32mcreated [1mdist/react-mini.d.ts[22m in [1m5ms[22m[39m
|
|
27
39
|
[36m
|
|
28
40
|
[1mtypes/react-m.d.ts[22m → [1mdist/react-m.d.ts[22m...[39m
|
|
29
|
-
[32mcreated [1mdist/react-m.d.ts[22m in [
|
|
41
|
+
[32mcreated [1mdist/react-m.d.ts[22m in [1m2ms[22m[39m
|
|
42
|
+
[36m
|
|
43
|
+
[1mtypes/mini.d.ts[22m → [1mdist/mini.d.ts[22m...[39m
|
|
44
|
+
[32mcreated [1mdist/mini.d.ts[22m in [1m4ms[22m[39m
|
|
30
45
|
[36m
|
|
31
46
|
[1mtypes/react-client.d.ts[22m → [1mdist/react-client.d.ts[22m...[39m
|
|
32
|
-
[32mcreated [1mdist/react-client.d.ts[22m in [
|
|
47
|
+
[32mcreated [1mdist/react-client.d.ts[22m in [1m3ms[22m[39m
|
package/README.md
CHANGED
|
@@ -79,27 +79,37 @@ export function Component({ isVisible }) {
|
|
|
79
79
|
|
|
80
80
|
- Motion for React is MIT licensed.
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
## ✨ Sponsors
|
|
83
83
|
|
|
84
84
|
Motion is sustainable thanks to the kind support of its sponsors.
|
|
85
85
|
|
|
86
|
+
### Partners
|
|
87
|
+
|
|
86
88
|
#### Framer
|
|
87
89
|
|
|
88
90
|
Motion powers Framer animations, the web builder for creative pros. Design and ship your dream site. Zero code, maximum speed.
|
|
89
|
-
<br/>
|
|
90
91
|
|
|
91
|
-
<
|
|
92
|
-
<
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
92
|
+
<a href="https://www.framer.com?utm_source=motion-readme">
|
|
93
|
+
<img alt="Framer" src="https://github.com/user-attachments/assets/0404c7a1-c29d-4785-89ae-aae315f3c759" width="300px" height="200px">
|
|
94
|
+
</a>
|
|
95
|
+
|
|
96
|
+
### Platinum
|
|
97
|
+
|
|
98
|
+
<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>
|
|
99
|
+
|
|
100
|
+
<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>
|
|
101
|
+
|
|
102
|
+
<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>
|
|
102
103
|
|
|
103
104
|
### Silver
|
|
104
105
|
|
|
105
|
-
|
|
106
|
+
<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>
|
|
107
|
+
|
|
108
|
+
<a href="https://www.frontend.fyi/?utm_source=motion"><img alt="Statamic" src="https://github.com/user-attachments/assets/5d28f090-bdd9-4b31-b134-fb2b94ca636f" width="150px" height="100px"></a>
|
|
109
|
+
|
|
110
|
+
<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>
|
|
111
|
+
|
|
112
|
+
### Personal
|
|
113
|
+
|
|
114
|
+
- [Nusu](https://x.com/nusualabuga)
|
|
115
|
+
- [OlegWock](https://sinja.io)
|
package/dist/cjs/index.js
CHANGED
|
@@ -279,7 +279,7 @@ class MotionValue {
|
|
|
279
279
|
* This will be replaced by the build step with the latest version number.
|
|
280
280
|
* When MotionValues are provided to motion components, warn if versions are mixed.
|
|
281
281
|
*/
|
|
282
|
-
this.version = "11.11.
|
|
282
|
+
this.version = "11.11.16";
|
|
283
283
|
/**
|
|
284
284
|
* Tracks whether this value can output a velocity. Currently this is only true
|
|
285
285
|
* if the value is numerical, but we might be able to widen the scope here and support
|
|
@@ -630,6 +630,9 @@ class GroupPlaybackControls {
|
|
|
630
630
|
runAll(methodName) {
|
|
631
631
|
this.animations.forEach((controls) => controls[methodName]());
|
|
632
632
|
}
|
|
633
|
+
flatten() {
|
|
634
|
+
this.runAll("flatten");
|
|
635
|
+
}
|
|
633
636
|
play() {
|
|
634
637
|
this.runAll("play");
|
|
635
638
|
}
|
|
@@ -2479,6 +2482,10 @@ class BaseAnimation {
|
|
|
2479
2482
|
then(resolve, reject) {
|
|
2480
2483
|
return this.currentFinishedPromise.then(resolve, reject);
|
|
2481
2484
|
}
|
|
2485
|
+
flatten() {
|
|
2486
|
+
this.options.type = "keyframes";
|
|
2487
|
+
this.options.ease = "linear";
|
|
2488
|
+
}
|
|
2482
2489
|
updateFinishedPromise() {
|
|
2483
2490
|
this.currentFinishedPromise = new Promise((resolve) => {
|
|
2484
2491
|
this.resolveFinishedPromise = resolve;
|
|
@@ -2993,6 +3000,13 @@ class MainThreadAnimation extends BaseAnimation {
|
|
|
2993
3000
|
this.resolver = new KeyframeResolver$1(keyframes, onResolved, name, motionValue, element);
|
|
2994
3001
|
this.resolver.scheduleResolve();
|
|
2995
3002
|
}
|
|
3003
|
+
flatten() {
|
|
3004
|
+
super.flatten();
|
|
3005
|
+
// If we've already resolved the animation, re-initialise it
|
|
3006
|
+
if (this._resolved) {
|
|
3007
|
+
Object.assign(this._resolved, this.initPlayback(this._resolved.keyframes));
|
|
3008
|
+
}
|
|
3009
|
+
}
|
|
2996
3010
|
initPlayback(keyframes$1) {
|
|
2997
3011
|
const { type = "keyframes", repeat = 0, repeatDelay = 0, repeatType, velocity = 0, } = this.options;
|
|
2998
3012
|
const generatorFactory = isGenerator(type)
|
|
@@ -4089,7 +4103,7 @@ function updateMotionValuesFromProps(element, next, prev) {
|
|
|
4089
4103
|
* and warn against mismatches.
|
|
4090
4104
|
*/
|
|
4091
4105
|
if (process.env.NODE_ENV === "development") {
|
|
4092
|
-
warnOnce(nextValue.version === "11.11.
|
|
4106
|
+
warnOnce(nextValue.version === "11.11.16", `Attempting to mix Motion versions ${nextValue.version} with 11.11.16 may not work as expected.`);
|
|
4093
4107
|
}
|
|
4094
4108
|
}
|
|
4095
4109
|
else if (isMotionValue(prevValue)) {
|
|
@@ -5298,6 +5312,12 @@ class NativeAnimation {
|
|
|
5298
5312
|
get startTime() {
|
|
5299
5313
|
return this.animation ? this.animation.startTime : null;
|
|
5300
5314
|
}
|
|
5315
|
+
flatten() {
|
|
5316
|
+
var _a;
|
|
5317
|
+
if (!this.animation)
|
|
5318
|
+
return;
|
|
5319
|
+
(_a = this.animation.effect) === null || _a === void 0 ? void 0 : _a.updateTiming({ easing: "linear" });
|
|
5320
|
+
}
|
|
5301
5321
|
play() {
|
|
5302
5322
|
if (this.state === "finished") {
|
|
5303
5323
|
this.updateFinishedPromise();
|
|
@@ -5914,6 +5934,7 @@ function scrollFunction(onScroll, options) {
|
|
|
5914
5934
|
}
|
|
5915
5935
|
}
|
|
5916
5936
|
function scrollAnimation(animation, options) {
|
|
5937
|
+
animation.flatten();
|
|
5917
5938
|
if (needsElementTracking(options)) {
|
|
5918
5939
|
animation.pause();
|
|
5919
5940
|
return scrollInfo((info) => {
|
|
@@ -5922,12 +5943,17 @@ function scrollAnimation(animation, options) {
|
|
|
5922
5943
|
}
|
|
5923
5944
|
else {
|
|
5924
5945
|
const timeline = getTimeline(options);
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5946
|
+
if (animation.attachTimeline) {
|
|
5947
|
+
return animation.attachTimeline(timeline, (valueAnimation) => {
|
|
5948
|
+
valueAnimation.pause();
|
|
5949
|
+
return observeTimeline((progress) => {
|
|
5950
|
+
valueAnimation.time = valueAnimation.duration * progress;
|
|
5951
|
+
}, timeline);
|
|
5952
|
+
});
|
|
5953
|
+
}
|
|
5954
|
+
else {
|
|
5955
|
+
return noop;
|
|
5956
|
+
}
|
|
5931
5957
|
}
|
|
5932
5958
|
}
|
|
5933
5959
|
function scroll(onScroll, { axis = "y", ...options } = {}) {
|