motion 12.0.0-alpha.2 → 12.0.1
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/LICENSE.md +1 -1
- package/README.md +7 -24
- package/dist/cjs/index.js +2792 -2446
- package/dist/cjs/mini.js +629 -193
- package/dist/cjs/react-client.js +3611 -3416
- package/dist/cjs/react-m.js +397 -351
- package/dist/cjs/react-mini.js +225 -191
- package/dist/es/framer-motion/dist/es/animation/animate/index.mjs +3 -2
- package/dist/es/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +2 -1
- package/dist/es/framer-motion/dist/es/animation/animate/single-value.mjs +1 -1
- package/dist/es/framer-motion/dist/es/animation/animate/subject.mjs +1 -1
- package/dist/es/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +16 -12
- package/dist/es/framer-motion/dist/es/animation/animators/BaseAnimation.mjs +3 -2
- package/dist/es/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +10 -10
- package/dist/es/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +2 -2
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +30 -89
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +4 -4
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-sequence.mjs +14 -0
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +2 -1
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/index.mjs +2 -1
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +2 -1
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +2 -1
- package/dist/es/framer-motion/dist/es/animation/generators/spring/defaults.mjs +27 -0
- package/dist/es/framer-motion/dist/es/animation/generators/spring/find.mjs +10 -13
- package/dist/es/framer-motion/dist/es/animation/generators/spring/index.mjs +57 -18
- package/dist/es/framer-motion/dist/es/animation/hooks/animation-controls.mjs +1 -1
- package/dist/es/framer-motion/dist/es/animation/interfaces/motion-value.mjs +7 -6
- package/dist/es/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +6 -5
- package/dist/es/framer-motion/dist/es/animation/optimized-appear/start.mjs +2 -1
- package/dist/es/framer-motion/dist/es/animation/optimized-appear/store-id.mjs +1 -1
- package/dist/es/framer-motion/dist/es/animation/sequence/create.mjs +32 -6
- package/dist/es/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +5 -0
- package/dist/es/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +13 -0
- package/dist/es/framer-motion/dist/es/animation/utils/default-transitions.mjs +1 -1
- package/dist/es/framer-motion/dist/es/components/AnimatePresence/index.mjs +10 -7
- package/dist/es/framer-motion/dist/es/components/AnimatePresence/use-presence.mjs +6 -3
- package/dist/es/framer-motion/dist/es/components/AnimateSharedLayout.mjs +1 -1
- package/dist/es/framer-motion/dist/es/components/Reorder/Group.mjs +1 -1
- package/dist/es/framer-motion/dist/es/components/Reorder/Item.mjs +1 -1
- package/dist/es/framer-motion/dist/es/easing/cubic-bezier.mjs +2 -1
- package/dist/es/framer-motion/dist/es/easing/utils/map.mjs +6 -6
- package/dist/es/framer-motion/dist/es/events/event-info.mjs +5 -4
- package/dist/es/framer-motion/dist/es/frameloop/frame.mjs +2 -1
- package/dist/es/framer-motion/dist/es/frameloop/render-step.mjs +3 -2
- package/dist/es/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs +12 -15
- package/dist/es/framer-motion/dist/es/gestures/drag/index.mjs +2 -1
- package/dist/es/framer-motion/dist/es/gestures/drag/utils/constraints.mjs +2 -1
- package/dist/es/framer-motion/dist/es/gestures/hover.mjs +20 -22
- package/dist/es/framer-motion/dist/es/gestures/pan/PanSession.mjs +6 -5
- package/dist/es/framer-motion/dist/es/gestures/pan/index.mjs +2 -1
- package/dist/es/framer-motion/dist/es/gestures/press.mjs +20 -119
- package/dist/es/framer-motion/dist/es/motion/index.mjs +11 -7
- package/dist/es/framer-motion/dist/es/motion/utils/is-forced-motion-value.mjs +1 -1
- package/dist/es/framer-motion/dist/es/motion/utils/use-motion-ref.mjs +3 -1
- package/dist/es/framer-motion/dist/es/motion/utils/use-visual-element.mjs +1 -1
- package/dist/es/framer-motion/dist/es/motion/utils/use-visual-state.mjs +11 -5
- package/dist/es/framer-motion/dist/es/projection/animation/mix-values.mjs +3 -2
- package/dist/es/framer-motion/dist/es/projection/node/create-projection-node.mjs +29 -23
- package/dist/es/framer-motion/dist/es/render/VisualElement.mjs +15 -13
- package/dist/es/framer-motion/dist/es/render/dom/DOMKeyframesResolver.mjs +4 -3
- package/dist/es/framer-motion/dist/es/render/dom/DOMVisualElement.mjs +15 -0
- package/dist/es/framer-motion/dist/es/render/dom/resize/handle-element.mjs +2 -1
- package/dist/es/framer-motion/dist/es/render/dom/scroll/index.mjs +4 -4
- package/dist/es/framer-motion/dist/es/render/dom/scroll/info.mjs +2 -1
- package/dist/es/framer-motion/dist/es/render/dom/scroll/offsets/index.mjs +6 -5
- package/dist/es/framer-motion/dist/es/render/dom/utils/css-variables-conversion.mjs +1 -1
- package/dist/es/framer-motion/dist/es/render/dom/utils/unit-conversion.mjs +2 -14
- package/dist/es/framer-motion/dist/es/render/dom/viewport/index.mjs +4 -3
- package/dist/es/framer-motion/dist/es/render/html/HTMLVisualElement.mjs +6 -20
- package/dist/es/framer-motion/dist/es/render/html/utils/build-styles.mjs +2 -2
- package/dist/es/framer-motion/dist/es/render/html/utils/build-transform.mjs +1 -1
- package/dist/es/framer-motion/dist/es/render/html/utils/keys-position.mjs +13 -0
- package/dist/es/framer-motion/dist/es/render/svg/SVGVisualElement.mjs +6 -6
- package/dist/es/framer-motion/dist/es/render/svg/config-motion.mjs +57 -24
- package/dist/es/framer-motion/dist/es/render/svg/utils/build-attrs.mjs +1 -1
- package/dist/es/framer-motion/dist/es/render/svg/utils/scrape-motion-values.mjs +1 -1
- package/dist/es/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/framer-motion/dist/es/utils/delay.mjs +2 -1
- package/dist/es/framer-motion/dist/es/utils/get-context-window.mjs +1 -1
- package/dist/es/framer-motion/dist/es/utils/interpolate.mjs +8 -5
- package/dist/es/framer-motion/dist/es/utils/mix/color.mjs +1 -1
- package/dist/es/framer-motion/dist/es/utils/mix/complex.mjs +1 -1
- package/dist/es/framer-motion/dist/es/utils/offsets/fill.mjs +2 -1
- package/dist/es/framer-motion/dist/es/utils/use-instant-transition.mjs +1 -1
- package/dist/es/framer-motion/dist/es/value/index.mjs +2 -2
- package/dist/es/framer-motion/dist/es/value/use-inverted-scale.mjs +1 -1
- package/dist/es/framer-motion/dist/es/value/use-scroll.mjs +1 -1
- package/dist/es/framer-motion/dist/es/value/use-spring.mjs +3 -3
- package/dist/es/framer-motion/dist/es/value/use-will-change/get-will-change-name.mjs +1 -1
- package/dist/es/motion/lib/index.mjs +12 -7
- package/dist/es/motion/lib/mini.mjs +1 -0
- package/dist/es/motion/lib/react.mjs +41 -37
- package/dist/es/{framer-motion/dist/es/animation/GroupPlaybackControls.mjs → motion-dom/dist/es/animation/controls/BaseGroup.mjs} +7 -6
- package/dist/es/motion-dom/dist/es/animation/controls/Group.mjs +13 -0
- package/dist/es/{framer-motion/dist/es/easing → motion-dom/dist/es/animation/generators}/utils/create-generator-easing.mjs +6 -3
- package/dist/es/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs +85 -0
- package/dist/es/{framer-motion/dist/es/animation/animators/waapi → motion-dom/dist/es/animation/waapi/utils}/easing.mjs +3 -3
- package/dist/es/{framer-motion/dist/es/animation/animators → motion-dom/dist/es/animation}/waapi/utils/linear.mjs +4 -4
- package/dist/es/motion-dom/dist/es/gestures/drag/state/is-active.mjs +9 -0
- package/dist/es/motion-dom/dist/es/gestures/drag/state/set-active.mjs +28 -0
- package/dist/es/motion-dom/dist/es/gestures/hover.mjs +37 -0
- package/dist/es/motion-dom/dist/es/gestures/press/index.mjs +76 -0
- package/dist/es/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +13 -0
- package/dist/es/motion-dom/dist/es/gestures/press/utils/keyboard.mjs +38 -0
- package/dist/es/motion-dom/dist/es/gestures/press/utils/state.mjs +3 -0
- package/dist/es/motion-dom/dist/es/gestures/utils/setup.mjs +15 -0
- package/dist/es/motion-dom/dist/es/utils/resolve-elements.mjs +22 -0
- package/dist/es/{framer-motion/dist/es/animation/animators/waapi/utils/supports-linear-easing.mjs → motion-dom/dist/es/utils/supports/linear-easing.mjs} +1 -1
- package/dist/es/{framer-motion/dist/es/animation/animators/waapi/utils/memo-supports.mjs → motion-dom/dist/es/utils/supports/memo.mjs} +3 -2
- package/dist/es/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +6 -0
- package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/memo.mjs +1 -0
- package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/noop.mjs +1 -0
- package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/progress.mjs +1 -0
- package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/time-conversion.mjs +2 -0
- package/dist/motion.dev.js +2792 -2446
- package/dist/motion.js +1 -1
- package/package.json +6 -6
- package/.turbo/turbo-build.log +0 -47
- package/dist/es/framer-motion/dist/es/gestures/drag/utils/lock.mjs +0 -53
- package/dist/es/framer-motion/dist/es/render/dom/scroll/supports.mjs +0 -5
- package/dist/es/framer-motion/dist/es/render/dom/utils/resolve-element.mjs +0 -28
- package/lib/index.js +0 -2
- package/lib/index.js.map +0 -1
- package/lib/mini.js +0 -2
- package/lib/mini.js.map +0 -1
- package/lib/react-client.js +0 -3
- package/lib/react-client.js.map +0 -1
- package/lib/react-m.js +0 -3
- package/lib/react-m.js.map +0 -1
- package/lib/react-mini.js +0 -3
- package/lib/react-mini.js.map +0 -1
- package/lib/react.js +0 -3
- package/lib/react.js.map +0 -1
- package/rollup.config.mjs +0 -210
- package/src/index.ts +0 -1
- package/src/mini.ts +0 -1
- package/src/react-client.ts +0 -3
- package/src/react-m.ts +0 -3
- package/src/react-mini.ts +0 -3
- package/src/react.ts +0 -3
- package/tsconfig.json +0 -25
- package/types/index.d.ts +0 -1
- package/types/mini.d.ts +0 -1
- package/types/react-client.d.ts +0 -1
- package/types/react-m.d.ts +0 -1
- package/types/react-mini.d.ts +0 -1
- package/types/react.d.ts +0 -1
- /package/dist/es/framer-motion/dist/es/render/html/utils/{transform.mjs → keys-transform.mjs} +0 -0
- /package/dist/es/{framer-motion → motion-dom}/dist/es/animation/generators/utils/calc-duration.mjs +0 -0
- /package/dist/es/{framer-motion → motion-dom}/dist/es/animation/generators/utils/is-generator.mjs +0 -0
- /package/dist/es/{framer-motion → motion-dom}/dist/es/animation/utils/get-value-transition.mjs +0 -0
- /package/dist/es/{framer-motion/dist/es/animation/animators → motion-dom/dist/es/animation}/waapi/utils/attach-timeline.mjs +0 -0
- /package/dist/es/{framer-motion → motion-dom}/dist/es/gestures/utils/is-node-or-child.mjs +0 -0
- /package/dist/es/{framer-motion/dist/es/events → motion-dom/dist/es/gestures}/utils/is-primary-pointer.mjs +0 -0
- /package/dist/es/{framer-motion/dist/es/easing → motion-dom/dist/es}/utils/is-bezier-definition.mjs +0 -0
- /package/dist/es/{framer-motion/dist/es/animation/animators/waapi/utils/supports-flags.mjs → motion-dom/dist/es/utils/supports/flags.mjs} +0 -0
- /package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/errors.mjs +0 -0
package/LICENSE.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c)
|
|
3
|
+
Copyright (c) 2024 [Motion](https://motion.dev) B.V.
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img width="100" height="100" alt="Motion logo" src="https://user-images.githubusercontent.com/7850794/164965523-3eced4c4-6020-467e-acde-f11b7900ad62.png"
|
|
2
|
+
<img width="100" height="100" alt="Motion logo" src="https://user-images.githubusercontent.com/7850794/164965523-3eced4c4-6020-467e-acde-f11b7900ad62.png" />
|
|
3
3
|
</p>
|
|
4
4
|
<h1 align="center">Motion for React</h1>
|
|
5
5
|
|
|
@@ -15,9 +15,6 @@
|
|
|
15
15
|
<a href="https://twitter.com/motiondotdev" target="_blank">
|
|
16
16
|
<img src="https://img.shields.io/twitter/follow/framer.svg?style=social&label=Follow" />
|
|
17
17
|
</a>
|
|
18
|
-
<a href="https://discord.gg/DfkSpYe" target="_blank">
|
|
19
|
-
<img src="https://img.shields.io/discord/308323056592486420.svg?logo=discord&logoColor=white" alt="Chat on Discord">
|
|
20
|
-
</a>
|
|
21
18
|
</p>
|
|
22
19
|
|
|
23
20
|
<br>
|
|
@@ -26,7 +23,7 @@
|
|
|
26
23
|
|
|
27
24
|
Motion for React is an open source, production-ready library that’s designed for all creative developers.
|
|
28
25
|
|
|
29
|
-
It's the only animation library with a hybrid engine, combining the power of JavaScript animations
|
|
26
|
+
It's the only animation library with a hybrid engine, combining the power of JavaScript animations with the performance of native browser APIs.
|
|
30
27
|
|
|
31
28
|
It looks like this:
|
|
32
29
|
|
|
@@ -55,7 +52,7 @@ It does all this:
|
|
|
55
52
|
|
|
56
53
|
### 🐇 Quick start
|
|
57
54
|
|
|
58
|
-
Install `motion`
|
|
55
|
+
Install `motion` via your package manager:
|
|
59
56
|
|
|
60
57
|
```
|
|
61
58
|
npm install motion
|
|
@@ -73,7 +70,7 @@ export function Component({ isVisible }) {
|
|
|
73
70
|
|
|
74
71
|
### 💎 Contribute
|
|
75
72
|
|
|
76
|
-
- Want to contribute to Motion? Our [contributing guide](https://github.com/
|
|
73
|
+
- Want to contribute to Motion? Our [contributing guide](https://github.com/motiondivision/motion/blob/master/CONTRIBUTING.md) has you covered.
|
|
77
74
|
|
|
78
75
|
### 👩🏻⚖️ License
|
|
79
76
|
|
|
@@ -95,29 +92,15 @@ Motion powers Framer animations, the web builder for creative pros. Design and s
|
|
|
95
92
|
|
|
96
93
|
### Platinum
|
|
97
94
|
|
|
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>
|
|
95
|
+
<a href="https://syntax.fm"><img alt="Syntax.fm" src="https://github.com/user-attachments/assets/ab852bfe-b36c-490b-b98d-4061158c4863" width="300px" height="200px"></a> <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://emilkowal.ski"><img alt="Emil Kowalski" src="https://github.com/user-attachments/assets/29f56b1a-37fb-4695-a6a6-151f6c24864f" 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>
|
|
103
96
|
|
|
104
97
|
### Gold
|
|
105
98
|
|
|
106
|
-
<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>
|
|
99
|
+
<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>
|
|
107
100
|
|
|
108
101
|
### Silver
|
|
109
102
|
|
|
110
|
-
<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>
|
|
111
|
-
|
|
112
|
-
<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>
|
|
113
|
-
|
|
114
|
-
<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>
|
|
115
|
-
|
|
116
|
-
<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>
|
|
117
|
-
|
|
118
|
-
<a href="https://buildui.com"><img alt="Build UI" src="https://github.com/user-attachments/assets/024bfcd5-50e8-4b3d-a115-d5c6d6030d1c" width="150px" height="100px"></a>
|
|
119
|
-
|
|
120
|
-
<a href="https://hover.dev"><img alt="Hover" src="https://github.com/user-attachments/assets/4715b555-d2ac-4cb7-9f35-d36d708827b3" width="150px" height="100px"></a>
|
|
103
|
+
<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://statamic.com"><img alt="Statamic" src="https://github.com/user-attachments/assets/5d28f090-bdd9-4b31-b134-fb2b94ca636f" 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> <a href="https://buildui.com"><img alt="Build UI" src="https://github.com/user-attachments/assets/024bfcd5-50e8-4b3d-a115-d5c6d6030d1c" width="150px" height="100px"></a> <a href="https://hover.dev"><img alt="Hover" src="https://github.com/user-attachments/assets/4715b555-d2ac-4cb7-9f35-d36d708827b3" width="150px" height="100px"></a>
|
|
121
104
|
|
|
122
105
|
### Personal
|
|
123
106
|
|