framer-motion 6.5.1 → 7.0.2

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.
Files changed (31) hide show
  1. package/README.md +14 -11
  2. package/dist/cjs/index.js +19 -25
  3. package/dist/es/components/AnimatePresence/PresenceChild.mjs +1 -2
  4. package/dist/es/components/AnimatePresence/use-presence.mjs +1 -2
  5. package/dist/es/context/MotionContext/create.mjs +1 -1
  6. package/dist/es/gestures/PanSession.mjs +1 -1
  7. package/dist/es/gestures/drag/VisualElementDragControls.mjs +2 -1
  8. package/dist/es/gestures/drag/utils/constraints.mjs +1 -1
  9. package/dist/es/projection/animation/mix-values.mjs +2 -2
  10. package/dist/es/projection/node/create-projection-node.mjs +1 -1
  11. package/dist/es/render/dom/utils/unit-conversion.mjs +1 -1
  12. package/dist/es/render/html/visual-element.mjs +1 -1
  13. package/dist/es/render/utils/motion-values.mjs +1 -1
  14. package/dist/es/utils/use-animation-frame.mjs +5 -7
  15. package/dist/es/value/index.mjs +1 -1
  16. package/dist/es/value/scroll/use-element-scroll.mjs +3 -0
  17. package/dist/es/value/scroll/use-viewport-scroll.mjs +3 -0
  18. package/dist/framer-motion.dev.js +51 -80
  19. package/dist/framer-motion.js +1 -1
  20. package/dist/index.d.ts +23 -7
  21. package/dist/projection.dev.js +7 -7
  22. package/dist/size-rollup-dom-animation.js +1 -1
  23. package/dist/size-rollup-dom-max.js +1 -1
  24. package/dist/size-webpack-dom-animation.js +1 -1
  25. package/dist/size-webpack-dom-max.js +1 -2
  26. package/dist/size-webpack-m.js +0 -1
  27. package/dist/three-entry.d.ts +2 -2
  28. package/package.json +17 -24
  29. package/dist/es/utils/use-id.mjs +0 -15
  30. package/dist/size-webpack-dom-max.js.LICENSE.txt +0 -14
  31. package/dist/size-webpack-m.js.LICENSE.txt +0 -14
package/package.json CHANGED
@@ -1,16 +1,14 @@
1
1
  {
2
2
  "name": "framer-motion",
3
- "version": "6.5.1",
3
+ "version": "7.0.2",
4
4
  "description": "A simple and powerful React animation library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/es/index.mjs",
7
7
  "exports": {
8
8
  ".": {
9
+ "types": "./dist/index.d.ts",
9
10
  "require": "./dist/cjs/index.js",
10
- "import": {
11
- "types": "./dist/index.d.ts",
12
- "default": "./dist/es/index.mjs"
13
- },
11
+ "import": "./dist/es/index.mjs",
14
12
  "default": "./dist/cjs/index.js"
15
13
  },
16
14
  "./package.json": "./package.json"
@@ -41,7 +39,7 @@
41
39
  "clean": "rm -rf types dist lib",
42
40
  "test": "yarn test-server && yarn test-client",
43
41
  "test-ci": "yarn test",
44
- "test-client": "jest --coverage --config jest.config.json --max-workers=2",
42
+ "test-client": "jest --config jest.config.json --max-workers=2",
45
43
  "test-server": "jest --config jest.config.ssr.json",
46
44
  "test-watch": "jest --watch --coverage --coverageReporters=lcov --config jest.config.json",
47
45
  "test-projection": "yarn run collect-projection-tests && start-server-and-test 'pushd ../../; python -m SimpleHTTPServer; popd' http://0.0.0.0:8000 'cypress run -s cypress/integration/projection.chrome.ts --config baseUrl=http://localhost:8000/'",
@@ -58,50 +56,45 @@
58
56
  "start-dev-server": "webpack serve --config ../../dev/webpack/config.js --hot"
59
57
  },
60
58
  "peerDependencies": {
61
- "react": ">=16.8 || ^17.0.0 || ^18.0.0",
62
- "react-dom": ">=16.8 || ^17.0.0 || ^18.0.0"
59
+ "react": "^18.0.0",
60
+ "react-dom": "^18.0.0"
63
61
  },
64
62
  "dependencies": {
65
- "@motionone/dom": "10.12.0",
66
- "framesync": "6.0.1",
63
+ "@motionone/dom": "10.13.1",
64
+ "framesync": "6.1.1",
67
65
  "hey-listen": "^1.0.8",
68
- "popmotion": "11.0.3",
69
- "style-value-types": "5.0.0",
66
+ "popmotion": "11.0.4",
67
+ "style-value-types": "5.1.1",
70
68
  "tslib": "^2.1.0"
71
69
  },
72
- "devDependencies": {
73
- "jest": "^27.4.7",
74
- "jest-dom": "^3.5.0",
75
- "styled-components": "^4.1.1"
76
- },
77
70
  "optionalDependencies": {
78
71
  "@emotion/is-prop-valid": "^0.8.2"
79
72
  },
80
73
  "bundlesize": [
81
74
  {
82
75
  "path": "./dist/size-rollup-m.js",
83
- "maxSize": "6.5 kB"
76
+ "maxSize": "6.0 kB"
84
77
  },
85
78
  {
86
79
  "path": "./dist/size-rollup-dom-animation.js",
87
- "maxSize": "17.3 kB"
80
+ "maxSize": "17.7 kB"
88
81
  },
89
82
  {
90
83
  "path": "./dist/size-rollup-dom-max.js",
91
- "maxSize": "28.5 kB"
84
+ "maxSize": "28.9 kB"
92
85
  },
93
86
  {
94
87
  "path": "./dist/size-webpack-m.js",
95
- "maxSize": "6.7 kB"
88
+ "maxSize": "6.1 kB"
96
89
  },
97
90
  {
98
91
  "path": "./dist/size-webpack-dom-animation.js",
99
- "maxSize": "19.7 kB"
92
+ "maxSize": "20.1 kB"
100
93
  },
101
94
  {
102
95
  "path": "./dist/size-webpack-dom-max.js",
103
- "maxSize": "31.7 kB"
96
+ "maxSize": "32.4 kB"
104
97
  }
105
98
  ],
106
- "gitHead": "487d9ac1327306e63d2425d811b324879c74c619"
99
+ "gitHead": "c1c8d83dd6d254b44c6ea3cd6f50414340b75f25"
107
100
  }
@@ -1,15 +0,0 @@
1
- import { useConstant } from './use-constant.mjs';
2
-
3
- var counter = 0;
4
- var incrementId = function () { return counter++; };
5
- var useId = function () { return useConstant(incrementId); };
6
- /**
7
- * Ideally we'd use the following code to support React 18 optionally.
8
- * But this fairly fails in Webpack (otherwise treeshaking wouldn't work at all).
9
- * Need to come up with a different way of figuring this out.
10
- */
11
- // export const useId = (React as any).useId
12
- // ? (React as any).useId
13
- // : () => useConstant(incrementId)
14
-
15
- export { useId };
@@ -1,14 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */
@@ -1,14 +0,0 @@
1
- /*! *****************************************************************************
2
- Copyright (c) Microsoft Corporation.
3
-
4
- Permission to use, copy, modify, and/or distribute this software for any
5
- purpose with or without fee is hereby granted.
6
-
7
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
8
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
10
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
11
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
12
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
13
- PERFORMANCE OF THIS SOFTWARE.
14
- ***************************************************************************** */