motion 11.13.5 → 11.14.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 +1 -4
- package/dist/cjs/index.js +10 -10
- package/dist/cjs/react-client.js +194 -168
- package/dist/es/framer-motion/dist/es/events/event-info.mjs +1 -1
- package/dist/es/framer-motion/dist/es/gestures/pan/PanSession.mjs +2 -2
- package/dist/es/framer-motion/dist/es/gestures/press.mjs +20 -121
- package/dist/es/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/framer-motion/dist/es/utils/get-context-window.mjs +1 -1
- package/dist/es/framer-motion/dist/es/value/index.mjs +1 -1
- package/dist/es/motion-dom/dist/es/gestures/hover.mjs +4 -9
- package/dist/es/motion-dom/dist/es/gestures/press/index.mjs +75 -0
- package/dist/es/motion-dom/dist/es/gestures/press/utils/is-keyboard-accessible.mjs +12 -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/motion.dev.js +10 -10
- package/dist/motion.js +1 -1
- package/package.json +6 -6
- package/.turbo/turbo-build.log +0 -45
- 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 → 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/rollup.config.mjs
DELETED
|
@@ -1,210 +0,0 @@
|
|
|
1
|
-
import resolve from "@rollup/plugin-node-resolve"
|
|
2
|
-
import { terser } from "rollup-plugin-terser"
|
|
3
|
-
import replace from "@rollup/plugin-replace"
|
|
4
|
-
import dts from "rollup-plugin-dts"
|
|
5
|
-
import alias from "@rollup/plugin-alias"
|
|
6
|
-
import path from "node:path"
|
|
7
|
-
import { fileURLToPath } from 'url'
|
|
8
|
-
import pkg from "./package.json" with { type: "json" }
|
|
9
|
-
import tsconfig from "./tsconfig.json" with { type: "json" }
|
|
10
|
-
import preserveDirectives from "rollup-plugin-preserve-directives";
|
|
11
|
-
|
|
12
|
-
const config = {
|
|
13
|
-
input: "lib/index.js",
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const replaceSettings = (env) => {
|
|
17
|
-
const replaceConfig = env
|
|
18
|
-
? {
|
|
19
|
-
"process.env.NODE_ENV": JSON.stringify(env),
|
|
20
|
-
preventAssignment: false,
|
|
21
|
-
}
|
|
22
|
-
: {
|
|
23
|
-
preventAssignment: false,
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
replaceConfig.__VERSION__ = `${pkg.version}`
|
|
27
|
-
|
|
28
|
-
return replace(replaceConfig)
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const external = [
|
|
32
|
-
...Object.keys(pkg.dependencies || {}),
|
|
33
|
-
...Object.keys(pkg.peerDependencies || {}),
|
|
34
|
-
...Object.keys(pkg.optionalDependencies || {}),
|
|
35
|
-
"react/jsx-runtime",
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
const pureClass = {
|
|
39
|
-
transform(code) {
|
|
40
|
-
// Replace TS emitted @class function annotations with PURE so terser
|
|
41
|
-
// can remove them
|
|
42
|
-
return code.replace(/\/\*\* @class \*\//g, "/*@__PURE__*/")
|
|
43
|
-
},
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
47
|
-
const shimReactJSXRuntimePlugin = alias({
|
|
48
|
-
entries: [
|
|
49
|
-
{ find: 'react/jsx-runtime', replacement: path.resolve(__dirname, '../../dev/inc/jsxRuntimeShim.js') }
|
|
50
|
-
]
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
const umd = Object.assign({}, config, {
|
|
54
|
-
output: {
|
|
55
|
-
file: `dist/${pkg.name}.dev.js`,
|
|
56
|
-
format: "umd",
|
|
57
|
-
name: "Motion",
|
|
58
|
-
exports: "named",
|
|
59
|
-
globals: { react: "React", "react/jsx-runtime": "jsxRuntime" },
|
|
60
|
-
},
|
|
61
|
-
external: ["react", "react-dom"],
|
|
62
|
-
plugins: [resolve(), replaceSettings("development"), shimReactJSXRuntimePlugin],
|
|
63
|
-
onwarn(warning, warn) {
|
|
64
|
-
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') {
|
|
65
|
-
return
|
|
66
|
-
}
|
|
67
|
-
warn(warning)
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
const umdProd = Object.assign({}, umd, {
|
|
72
|
-
output: Object.assign({}, umd.output, {
|
|
73
|
-
file: `dist/${pkg.name}.js`,
|
|
74
|
-
}),
|
|
75
|
-
plugins: [
|
|
76
|
-
resolve(),
|
|
77
|
-
replaceSettings("production"),
|
|
78
|
-
pureClass,
|
|
79
|
-
shimReactJSXRuntimePlugin,
|
|
80
|
-
terser({ output: { comments: false } }),
|
|
81
|
-
],
|
|
82
|
-
onwarn(warning, warn) {
|
|
83
|
-
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') {
|
|
84
|
-
return
|
|
85
|
-
}
|
|
86
|
-
warn(warning)
|
|
87
|
-
}
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
const cjs = Object.assign({}, config, {
|
|
91
|
-
input: "lib/index.js",
|
|
92
|
-
output: {
|
|
93
|
-
entryFileNames: `[name].js`,
|
|
94
|
-
dir: "dist/cjs",
|
|
95
|
-
format: "cjs",
|
|
96
|
-
exports: "named",
|
|
97
|
-
esModule: true
|
|
98
|
-
},
|
|
99
|
-
plugins: [resolve(), replaceSettings()],
|
|
100
|
-
external,
|
|
101
|
-
onwarn(warning, warn) {
|
|
102
|
-
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') {
|
|
103
|
-
return
|
|
104
|
-
}
|
|
105
|
-
warn(warning)
|
|
106
|
-
}
|
|
107
|
-
})
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Bundle seperately so bundles don't share common modules
|
|
111
|
-
*/
|
|
112
|
-
const cjsReact = Object.assign({}, cjs, { input : "lib/react.js" })
|
|
113
|
-
const cjsMini = Object.assign({}, cjs, { input : "lib/mini.js" })
|
|
114
|
-
const cjsReactMini = Object.assign({}, cjs, { input : "lib/react-mini.js" })
|
|
115
|
-
const cjsClient = Object.assign({}, cjs, { input : "lib/react-client.js" })
|
|
116
|
-
const cjsM = Object.assign({}, cjs, { input : "lib/react-m.js" })
|
|
117
|
-
|
|
118
|
-
export const es = Object.assign({}, config, {
|
|
119
|
-
input: ["lib/index.js", "lib/mini.js", "lib/react.js", "lib/react-mini.js", "lib/react-client.js", "lib/react-m.js"],
|
|
120
|
-
output: {
|
|
121
|
-
entryFileNames: "[name].mjs",
|
|
122
|
-
format: "es",
|
|
123
|
-
exports: "named",
|
|
124
|
-
preserveModules: true,
|
|
125
|
-
dir: "dist/es",
|
|
126
|
-
},
|
|
127
|
-
plugins: [resolve(), replaceSettings(), preserveDirectives()],
|
|
128
|
-
external: ["react", "react-dom", "react/jsx-runtime"],
|
|
129
|
-
onwarn(warning, warn) {
|
|
130
|
-
if (warning.code === 'MODULE_LEVEL_DIRECTIVE') {
|
|
131
|
-
return
|
|
132
|
-
}
|
|
133
|
-
warn(warning)
|
|
134
|
-
}
|
|
135
|
-
})
|
|
136
|
-
|
|
137
|
-
const typePlugins = [dts({compilerOptions: {...tsconfig, baseUrl:"types"}})]
|
|
138
|
-
|
|
139
|
-
const types = {
|
|
140
|
-
input: "types/index.d.ts",
|
|
141
|
-
output: {
|
|
142
|
-
format: "es",
|
|
143
|
-
file: "dist/index.d.ts",
|
|
144
|
-
},
|
|
145
|
-
plugins: typePlugins,
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
const reactTypes = {
|
|
149
|
-
input: "types/react.d.ts",
|
|
150
|
-
output: {
|
|
151
|
-
format: "es",
|
|
152
|
-
file: "dist/react.d.ts",
|
|
153
|
-
},
|
|
154
|
-
plugins: typePlugins,
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
const miniTypes = {
|
|
158
|
-
input: "types/mini.d.ts",
|
|
159
|
-
output: {
|
|
160
|
-
format: "es",
|
|
161
|
-
file: "dist/mini.d.ts",
|
|
162
|
-
},
|
|
163
|
-
plugins: typePlugins,
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
const mTypes = {
|
|
167
|
-
input: "types/react-m.d.ts",
|
|
168
|
-
output: {
|
|
169
|
-
format: "es",
|
|
170
|
-
file: "dist/react-m.d.ts",
|
|
171
|
-
},
|
|
172
|
-
plugins: typePlugins,
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
const reactMiniTypes = {
|
|
176
|
-
input: "types/react-mini.d.ts",
|
|
177
|
-
output: {
|
|
178
|
-
format: "es",
|
|
179
|
-
file: "dist/react-mini.d.ts",
|
|
180
|
-
},
|
|
181
|
-
plugins: typePlugins,
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
const clientTypes = {
|
|
185
|
-
input: "types/react-client.d.ts",
|
|
186
|
-
output: {
|
|
187
|
-
format: "es",
|
|
188
|
-
file: "dist/react-client.d.ts",
|
|
189
|
-
},
|
|
190
|
-
plugins: typePlugins,
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
// eslint-disable-next-line import/no-default-export
|
|
194
|
-
export default [
|
|
195
|
-
umd,
|
|
196
|
-
umdProd,
|
|
197
|
-
cjs,
|
|
198
|
-
cjsClient,
|
|
199
|
-
cjsReact,
|
|
200
|
-
cjsMini,
|
|
201
|
-
cjsReactMini,
|
|
202
|
-
cjsM,
|
|
203
|
-
es,
|
|
204
|
-
types,
|
|
205
|
-
reactTypes,
|
|
206
|
-
reactMiniTypes,
|
|
207
|
-
mTypes,
|
|
208
|
-
miniTypes,
|
|
209
|
-
clientTypes,
|
|
210
|
-
]
|
package/src/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "framer-motion/dom"
|
package/src/mini.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "framer-motion/dom/mini"
|
package/src/react-client.ts
DELETED
package/src/react-m.ts
DELETED
package/src/react-mini.ts
DELETED
package/src/react.ts
DELETED
package/tsconfig.json
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "config/tsconfig.json",
|
|
3
|
-
"filesGlob": ["./src/**/*.ts"],
|
|
4
|
-
"exclude": [
|
|
5
|
-
"node_modules",
|
|
6
|
-
"build",
|
|
7
|
-
"**/__tests__/*",
|
|
8
|
-
"jest.setup.tsx",
|
|
9
|
-
"dev",
|
|
10
|
-
"types",
|
|
11
|
-
"dev/examples.framer",
|
|
12
|
-
"test",
|
|
13
|
-
"skins",
|
|
14
|
-
"dist",
|
|
15
|
-
"temp",
|
|
16
|
-
"api",
|
|
17
|
-
"cypress"
|
|
18
|
-
],
|
|
19
|
-
"compilerOptions": {
|
|
20
|
-
"baseUrl": "src",
|
|
21
|
-
"declarationDir": "types",
|
|
22
|
-
"outDir": "lib",
|
|
23
|
-
"rootDir": "src"
|
|
24
|
-
}
|
|
25
|
-
}
|
package/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "framer-motion/dom";
|
package/types/mini.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "framer-motion/dom/mini";
|
package/types/react-client.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "framer-motion/client";
|
package/types/react-m.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "framer-motion/m";
|
package/types/react-mini.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "framer-motion/mini";
|
package/types/react.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "framer-motion";
|
|
File without changes
|
|
File without changes
|