motion 12.16.1-alpha.0 → 12.17.0-alpha.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/dist/cjs/debug.js +7 -294
- package/dist/cjs/index.js +6 -7531
- package/dist/cjs/mini.js +2 -2
- package/dist/cjs/react-client.js +6 -10157
- package/dist/cjs/react-m.js +6 -1780
- package/dist/cjs/react-mini.js +7 -642
- package/dist/es/framer-motion/dist/es/animation/hooks/use-animated-state.mjs +1 -1
- package/dist/es/framer-motion/dist/es/animation/hooks/use-animation.mjs +3 -3
- package/dist/es/framer-motion/dist/es/animation/sequence/create.mjs +1 -1
- package/dist/es/motion-dom/dist/es/animation/waapi/utils/linear.mjs +1 -1
- package/dist/motion.dev.js +2 -2
- package/dist/motion.js +1 -1
- package/package.json +3 -3
package/dist/cjs/react-m.js
CHANGED
|
@@ -2,1787 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var react = require('react');
|
|
5
|
+
var m = require('framer-motion/m');
|
|
7
6
|
|
|
8
|
-
const clamp = (min, max, v) => {
|
|
9
|
-
if (v > max)
|
|
10
|
-
return max;
|
|
11
|
-
if (v < min)
|
|
12
|
-
return min;
|
|
13
|
-
return v;
|
|
14
|
-
};
|
|
15
7
|
|
|
16
|
-
let warning = () => { };
|
|
17
|
-
let invariant = () => { };
|
|
18
|
-
if (process.env.NODE_ENV !== "production") {
|
|
19
|
-
warning = (check, message) => {
|
|
20
|
-
if (!check && typeof console !== "undefined") {
|
|
21
|
-
console.warn(message);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
invariant = (check, message) => {
|
|
25
|
-
if (!check) {
|
|
26
|
-
throw new Error(message);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
8
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* @public
|
|
39
|
-
*/
|
|
40
|
-
const MotionConfigContext = react.createContext({
|
|
41
|
-
transformPagePoint: (p) => p,
|
|
42
|
-
isStatic: false,
|
|
43
|
-
reducedMotion: "never",
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
const MotionContext = /* @__PURE__ */ react.createContext({});
|
|
47
|
-
|
|
48
|
-
function isAnimationControls(v) {
|
|
49
|
-
return (v !== null &&
|
|
50
|
-
typeof v === "object" &&
|
|
51
|
-
typeof v.start === "function");
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Decides if the supplied variable is variant label
|
|
56
|
-
*/
|
|
57
|
-
function isVariantLabel(v) {
|
|
58
|
-
return typeof v === "string" || Array.isArray(v);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
const variantPriorityOrder = [
|
|
62
|
-
"animate",
|
|
63
|
-
"whileInView",
|
|
64
|
-
"whileFocus",
|
|
65
|
-
"whileHover",
|
|
66
|
-
"whileTap",
|
|
67
|
-
"whileDrag",
|
|
68
|
-
"exit",
|
|
69
|
-
];
|
|
70
|
-
const variantProps = ["initial", ...variantPriorityOrder];
|
|
71
|
-
|
|
72
|
-
function isControllingVariants(props) {
|
|
73
|
-
return (isAnimationControls(props.animate) ||
|
|
74
|
-
variantProps.some((name) => isVariantLabel(props[name])));
|
|
75
|
-
}
|
|
76
|
-
function isVariantNode(props) {
|
|
77
|
-
return Boolean(isControllingVariants(props) || props.variants);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
function getCurrentTreeVariants(props, context) {
|
|
81
|
-
if (isControllingVariants(props)) {
|
|
82
|
-
const { initial, animate } = props;
|
|
83
|
-
return {
|
|
84
|
-
initial: initial === false || isVariantLabel(initial)
|
|
85
|
-
? initial
|
|
86
|
-
: undefined,
|
|
87
|
-
animate: isVariantLabel(animate) ? animate : undefined,
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
return props.inherit !== false ? context : {};
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function useCreateMotionContext(props) {
|
|
94
|
-
const { initial, animate } = getCurrentTreeVariants(props, react.useContext(MotionContext));
|
|
95
|
-
return react.useMemo(() => ({ initial, animate }), [variantLabelsAsDependency(initial), variantLabelsAsDependency(animate)]);
|
|
96
|
-
}
|
|
97
|
-
function variantLabelsAsDependency(prop) {
|
|
98
|
-
return Array.isArray(prop) ? prop.join(" ") : prop;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
const isBrowser = typeof window !== "undefined";
|
|
102
|
-
|
|
103
|
-
const featureProps = {
|
|
104
|
-
animation: [
|
|
105
|
-
"animate",
|
|
106
|
-
"variants",
|
|
107
|
-
"whileHover",
|
|
108
|
-
"whileTap",
|
|
109
|
-
"exit",
|
|
110
|
-
"whileInView",
|
|
111
|
-
"whileFocus",
|
|
112
|
-
"whileDrag",
|
|
113
|
-
],
|
|
114
|
-
exit: ["exit"],
|
|
115
|
-
drag: ["drag", "dragControls"],
|
|
116
|
-
focus: ["whileFocus"],
|
|
117
|
-
hover: ["whileHover", "onHoverStart", "onHoverEnd"],
|
|
118
|
-
tap: ["whileTap", "onTap", "onTapStart", "onTapCancel"],
|
|
119
|
-
pan: ["onPan", "onPanStart", "onPanSessionStart", "onPanEnd"],
|
|
120
|
-
inView: ["whileInView", "onViewportEnter", "onViewportLeave"],
|
|
121
|
-
layout: ["layout", "layoutId"],
|
|
122
|
-
};
|
|
123
|
-
const featureDefinitions = {};
|
|
124
|
-
for (const key in featureProps) {
|
|
125
|
-
featureDefinitions[key] = {
|
|
126
|
-
isEnabled: (props) => featureProps[key].some((name) => !!props[name]),
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function loadFeatures(features) {
|
|
131
|
-
for (const key in features) {
|
|
132
|
-
featureDefinitions[key] = {
|
|
133
|
-
...featureDefinitions[key],
|
|
134
|
-
...features[key],
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
const motionComponentSymbol = Symbol.for("motionComponentSymbol");
|
|
140
|
-
|
|
141
|
-
function isRefObject(ref) {
|
|
142
|
-
return (ref &&
|
|
143
|
-
typeof ref === "object" &&
|
|
144
|
-
Object.prototype.hasOwnProperty.call(ref, "current"));
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
/**
|
|
148
|
-
* Creates a ref function that, when called, hydrates the provided
|
|
149
|
-
* external ref and VisualElement.
|
|
150
|
-
*/
|
|
151
|
-
function useMotionRef(visualState, visualElement, externalRef) {
|
|
152
|
-
return react.useCallback((instance) => {
|
|
153
|
-
if (instance) {
|
|
154
|
-
visualState.onMount && visualState.onMount(instance);
|
|
155
|
-
}
|
|
156
|
-
if (visualElement) {
|
|
157
|
-
if (instance) {
|
|
158
|
-
visualElement.mount(instance);
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
visualElement.unmount();
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
if (externalRef) {
|
|
165
|
-
if (typeof externalRef === "function") {
|
|
166
|
-
externalRef(instance);
|
|
167
|
-
}
|
|
168
|
-
else if (isRefObject(externalRef)) {
|
|
169
|
-
externalRef.current = instance;
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
/**
|
|
174
|
-
* Only pass a new ref callback to React if we've received a visual element
|
|
175
|
-
* factory. Otherwise we'll be mounting/remounting every time externalRef
|
|
176
|
-
* or other dependencies change.
|
|
177
|
-
*/
|
|
178
|
-
[visualElement]);
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
const stepsOrder = [
|
|
182
|
-
"setup", // Compute
|
|
183
|
-
"read", // Read
|
|
184
|
-
"resolveKeyframes", // Write/Read/Write/Read
|
|
185
|
-
"preUpdate", // Compute
|
|
186
|
-
"update", // Compute
|
|
187
|
-
"preRender", // Compute
|
|
188
|
-
"render", // Write
|
|
189
|
-
"postRender", // Compute
|
|
190
|
-
];
|
|
191
|
-
|
|
192
|
-
const statsBuffer = {
|
|
193
|
-
value: null,
|
|
194
|
-
addProjectionMetrics: null,
|
|
195
|
-
};
|
|
196
|
-
|
|
197
|
-
function createRenderStep(runNextFrame, stepName) {
|
|
198
|
-
/**
|
|
199
|
-
* We create and reuse two queues, one to queue jobs for the current frame
|
|
200
|
-
* and one for the next. We reuse to avoid triggering GC after x frames.
|
|
201
|
-
*/
|
|
202
|
-
let thisFrame = new Set();
|
|
203
|
-
let nextFrame = new Set();
|
|
204
|
-
/**
|
|
205
|
-
* Track whether we're currently processing jobs in this step. This way
|
|
206
|
-
* we can decide whether to schedule new jobs for this frame or next.
|
|
207
|
-
*/
|
|
208
|
-
let isProcessing = false;
|
|
209
|
-
let flushNextFrame = false;
|
|
210
|
-
/**
|
|
211
|
-
* A set of processes which were marked keepAlive when scheduled.
|
|
212
|
-
*/
|
|
213
|
-
const toKeepAlive = new WeakSet();
|
|
214
|
-
let latestFrameData = {
|
|
215
|
-
delta: 0.0,
|
|
216
|
-
timestamp: 0.0,
|
|
217
|
-
isProcessing: false,
|
|
218
|
-
};
|
|
219
|
-
let numCalls = 0;
|
|
220
|
-
function triggerCallback(callback) {
|
|
221
|
-
if (toKeepAlive.has(callback)) {
|
|
222
|
-
step.schedule(callback);
|
|
223
|
-
runNextFrame();
|
|
224
|
-
}
|
|
225
|
-
numCalls++;
|
|
226
|
-
callback(latestFrameData);
|
|
227
|
-
}
|
|
228
|
-
const step = {
|
|
229
|
-
/**
|
|
230
|
-
* Schedule a process to run on the next frame.
|
|
231
|
-
*/
|
|
232
|
-
schedule: (callback, keepAlive = false, immediate = false) => {
|
|
233
|
-
const addToCurrentFrame = immediate && isProcessing;
|
|
234
|
-
const queue = addToCurrentFrame ? thisFrame : nextFrame;
|
|
235
|
-
if (keepAlive)
|
|
236
|
-
toKeepAlive.add(callback);
|
|
237
|
-
if (!queue.has(callback))
|
|
238
|
-
queue.add(callback);
|
|
239
|
-
return callback;
|
|
240
|
-
},
|
|
241
|
-
/**
|
|
242
|
-
* Cancel the provided callback from running on the next frame.
|
|
243
|
-
*/
|
|
244
|
-
cancel: (callback) => {
|
|
245
|
-
nextFrame.delete(callback);
|
|
246
|
-
toKeepAlive.delete(callback);
|
|
247
|
-
},
|
|
248
|
-
/**
|
|
249
|
-
* Execute all schedule callbacks.
|
|
250
|
-
*/
|
|
251
|
-
process: (frameData) => {
|
|
252
|
-
latestFrameData = frameData;
|
|
253
|
-
/**
|
|
254
|
-
* If we're already processing we've probably been triggered by a flushSync
|
|
255
|
-
* inside an existing process. Instead of executing, mark flushNextFrame
|
|
256
|
-
* as true and ensure we flush the following frame at the end of this one.
|
|
257
|
-
*/
|
|
258
|
-
if (isProcessing) {
|
|
259
|
-
flushNextFrame = true;
|
|
260
|
-
return;
|
|
261
|
-
}
|
|
262
|
-
isProcessing = true;
|
|
263
|
-
[thisFrame, nextFrame] = [nextFrame, thisFrame];
|
|
264
|
-
// Execute this frame
|
|
265
|
-
thisFrame.forEach(triggerCallback);
|
|
266
|
-
/**
|
|
267
|
-
* If we're recording stats then
|
|
268
|
-
*/
|
|
269
|
-
if (stepName && statsBuffer.value) {
|
|
270
|
-
statsBuffer.value.frameloop[stepName].push(numCalls);
|
|
271
|
-
}
|
|
272
|
-
numCalls = 0;
|
|
273
|
-
// Clear the frame so no callbacks remain. This is to avoid
|
|
274
|
-
// memory leaks should this render step not run for a while.
|
|
275
|
-
thisFrame.clear();
|
|
276
|
-
isProcessing = false;
|
|
277
|
-
if (flushNextFrame) {
|
|
278
|
-
flushNextFrame = false;
|
|
279
|
-
step.process(frameData);
|
|
280
|
-
}
|
|
281
|
-
},
|
|
282
|
-
};
|
|
283
|
-
return step;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
const maxElapsed = 40;
|
|
287
|
-
function createRenderBatcher(scheduleNextBatch, allowKeepAlive) {
|
|
288
|
-
let runNextFrame = false;
|
|
289
|
-
let useDefaultElapsed = true;
|
|
290
|
-
const state = {
|
|
291
|
-
delta: 0.0,
|
|
292
|
-
timestamp: 0.0,
|
|
293
|
-
isProcessing: false,
|
|
294
|
-
};
|
|
295
|
-
const flagRunNextFrame = () => (runNextFrame = true);
|
|
296
|
-
const steps = stepsOrder.reduce((acc, key) => {
|
|
297
|
-
acc[key] = createRenderStep(flagRunNextFrame, allowKeepAlive ? key : undefined);
|
|
298
|
-
return acc;
|
|
299
|
-
}, {});
|
|
300
|
-
const { setup, read, resolveKeyframes, preUpdate, update, preRender, render, postRender, } = steps;
|
|
301
|
-
const processBatch = () => {
|
|
302
|
-
const timestamp = MotionGlobalConfig.useManualTiming
|
|
303
|
-
? state.timestamp
|
|
304
|
-
: performance.now();
|
|
305
|
-
runNextFrame = false;
|
|
306
|
-
if (!MotionGlobalConfig.useManualTiming) {
|
|
307
|
-
state.delta = useDefaultElapsed
|
|
308
|
-
? 1000 / 60
|
|
309
|
-
: Math.max(Math.min(timestamp - state.timestamp, maxElapsed), 1);
|
|
310
|
-
}
|
|
311
|
-
state.timestamp = timestamp;
|
|
312
|
-
state.isProcessing = true;
|
|
313
|
-
// Unrolled render loop for better per-frame performance
|
|
314
|
-
setup.process(state);
|
|
315
|
-
read.process(state);
|
|
316
|
-
resolveKeyframes.process(state);
|
|
317
|
-
preUpdate.process(state);
|
|
318
|
-
update.process(state);
|
|
319
|
-
preRender.process(state);
|
|
320
|
-
render.process(state);
|
|
321
|
-
postRender.process(state);
|
|
322
|
-
state.isProcessing = false;
|
|
323
|
-
if (runNextFrame && allowKeepAlive) {
|
|
324
|
-
useDefaultElapsed = false;
|
|
325
|
-
scheduleNextBatch(processBatch);
|
|
326
|
-
}
|
|
327
|
-
};
|
|
328
|
-
const wake = () => {
|
|
329
|
-
runNextFrame = true;
|
|
330
|
-
useDefaultElapsed = true;
|
|
331
|
-
if (!state.isProcessing) {
|
|
332
|
-
scheduleNextBatch(processBatch);
|
|
333
|
-
}
|
|
334
|
-
};
|
|
335
|
-
const schedule = stepsOrder.reduce((acc, key) => {
|
|
336
|
-
const step = steps[key];
|
|
337
|
-
acc[key] = (process, keepAlive = false, immediate = false) => {
|
|
338
|
-
if (!runNextFrame)
|
|
339
|
-
wake();
|
|
340
|
-
return step.schedule(process, keepAlive, immediate);
|
|
341
|
-
};
|
|
342
|
-
return acc;
|
|
343
|
-
}, {});
|
|
344
|
-
const cancel = (process) => {
|
|
345
|
-
for (let i = 0; i < stepsOrder.length; i++) {
|
|
346
|
-
steps[stepsOrder[i]].cancel(process);
|
|
347
|
-
}
|
|
348
|
-
};
|
|
349
|
-
return { schedule, cancel, state, steps };
|
|
350
|
-
}
|
|
351
|
-
|
|
352
|
-
const checkStringStartsWith = (token) => (key) => typeof key === "string" && key.startsWith(token);
|
|
353
|
-
const isCSSVariableName =
|
|
354
|
-
/*@__PURE__*/ checkStringStartsWith("--");
|
|
355
|
-
|
|
356
|
-
const number = {
|
|
357
|
-
test: (v) => typeof v === "number",
|
|
358
|
-
parse: parseFloat,
|
|
359
|
-
transform: (v) => v,
|
|
360
|
-
};
|
|
361
|
-
const alpha = {
|
|
362
|
-
...number,
|
|
363
|
-
transform: (v) => clamp(0, 1, v),
|
|
364
|
-
};
|
|
365
|
-
const scale = {
|
|
366
|
-
...number,
|
|
367
|
-
default: 1,
|
|
368
|
-
};
|
|
369
|
-
|
|
370
|
-
/*#__NO_SIDE_EFFECTS__*/
|
|
371
|
-
const createUnitType = (unit) => ({
|
|
372
|
-
test: (v) => typeof v === "string" && v.endsWith(unit) && v.split(" ").length === 1,
|
|
373
|
-
parse: parseFloat,
|
|
374
|
-
transform: (v) => `${v}${unit}`,
|
|
375
|
-
});
|
|
376
|
-
const degrees = /*@__PURE__*/ createUnitType("deg");
|
|
377
|
-
const percent = /*@__PURE__*/ createUnitType("%");
|
|
378
|
-
const px = /*@__PURE__*/ createUnitType("px");
|
|
379
|
-
const progressPercentage = /*@__PURE__*/ (() => ({
|
|
380
|
-
...percent,
|
|
381
|
-
parse: (v) => percent.parse(v) / 100,
|
|
382
|
-
transform: (v) => percent.transform(v * 100),
|
|
383
|
-
}))();
|
|
384
|
-
|
|
385
|
-
/**
|
|
386
|
-
* Generate a list of every possible transform key.
|
|
387
|
-
*/
|
|
388
|
-
const transformPropOrder = [
|
|
389
|
-
"transformPerspective",
|
|
390
|
-
"x",
|
|
391
|
-
"y",
|
|
392
|
-
"z",
|
|
393
|
-
"translateX",
|
|
394
|
-
"translateY",
|
|
395
|
-
"translateZ",
|
|
396
|
-
"scale",
|
|
397
|
-
"scaleX",
|
|
398
|
-
"scaleY",
|
|
399
|
-
"rotate",
|
|
400
|
-
"rotateX",
|
|
401
|
-
"rotateY",
|
|
402
|
-
"rotateZ",
|
|
403
|
-
"skew",
|
|
404
|
-
"skewX",
|
|
405
|
-
"skewY",
|
|
406
|
-
];
|
|
407
|
-
/**
|
|
408
|
-
* A quick lookup for transform props.
|
|
409
|
-
*/
|
|
410
|
-
const transformProps = /*@__PURE__*/ (() => new Set(transformPropOrder))();
|
|
411
|
-
|
|
412
|
-
const int = {
|
|
413
|
-
...number,
|
|
414
|
-
transform: Math.round,
|
|
415
|
-
};
|
|
416
|
-
|
|
417
|
-
const transformValueTypes = {
|
|
418
|
-
rotate: degrees,
|
|
419
|
-
rotateX: degrees,
|
|
420
|
-
rotateY: degrees,
|
|
421
|
-
rotateZ: degrees,
|
|
422
|
-
scale,
|
|
423
|
-
scaleX: scale,
|
|
424
|
-
scaleY: scale,
|
|
425
|
-
scaleZ: scale,
|
|
426
|
-
skew: degrees,
|
|
427
|
-
skewX: degrees,
|
|
428
|
-
skewY: degrees,
|
|
429
|
-
distance: px,
|
|
430
|
-
translateX: px,
|
|
431
|
-
translateY: px,
|
|
432
|
-
translateZ: px,
|
|
433
|
-
x: px,
|
|
434
|
-
y: px,
|
|
435
|
-
z: px,
|
|
436
|
-
perspective: px,
|
|
437
|
-
transformPerspective: px,
|
|
438
|
-
opacity: alpha,
|
|
439
|
-
originX: progressPercentage,
|
|
440
|
-
originY: progressPercentage,
|
|
441
|
-
originZ: px,
|
|
442
|
-
};
|
|
443
|
-
|
|
444
|
-
const numberValueTypes = {
|
|
445
|
-
// Border props
|
|
446
|
-
borderWidth: px,
|
|
447
|
-
borderTopWidth: px,
|
|
448
|
-
borderRightWidth: px,
|
|
449
|
-
borderBottomWidth: px,
|
|
450
|
-
borderLeftWidth: px,
|
|
451
|
-
borderRadius: px,
|
|
452
|
-
radius: px,
|
|
453
|
-
borderTopLeftRadius: px,
|
|
454
|
-
borderTopRightRadius: px,
|
|
455
|
-
borderBottomRightRadius: px,
|
|
456
|
-
borderBottomLeftRadius: px,
|
|
457
|
-
// Positioning props
|
|
458
|
-
width: px,
|
|
459
|
-
maxWidth: px,
|
|
460
|
-
height: px,
|
|
461
|
-
maxHeight: px,
|
|
462
|
-
top: px,
|
|
463
|
-
right: px,
|
|
464
|
-
bottom: px,
|
|
465
|
-
left: px,
|
|
466
|
-
// Spacing props
|
|
467
|
-
padding: px,
|
|
468
|
-
paddingTop: px,
|
|
469
|
-
paddingRight: px,
|
|
470
|
-
paddingBottom: px,
|
|
471
|
-
paddingLeft: px,
|
|
472
|
-
margin: px,
|
|
473
|
-
marginTop: px,
|
|
474
|
-
marginRight: px,
|
|
475
|
-
marginBottom: px,
|
|
476
|
-
marginLeft: px,
|
|
477
|
-
// Misc
|
|
478
|
-
backgroundPositionX: px,
|
|
479
|
-
backgroundPositionY: px,
|
|
480
|
-
...transformValueTypes,
|
|
481
|
-
zIndex: int,
|
|
482
|
-
// SVG
|
|
483
|
-
fillOpacity: alpha,
|
|
484
|
-
strokeOpacity: alpha,
|
|
485
|
-
numOctaves: int,
|
|
486
|
-
};
|
|
487
|
-
|
|
488
|
-
/**
|
|
489
|
-
* Provided a value and a ValueType, returns the value as that value type.
|
|
490
|
-
*/
|
|
491
|
-
const getValueAsType = (value, type) => {
|
|
492
|
-
return type && typeof value === "number"
|
|
493
|
-
? type.transform(value)
|
|
494
|
-
: value;
|
|
495
|
-
};
|
|
496
|
-
|
|
497
|
-
const { schedule: microtask, cancel: cancelMicrotask } =
|
|
498
|
-
/* @__PURE__ */ createRenderBatcher(queueMicrotask, false);
|
|
499
|
-
|
|
500
|
-
const isMotionValue = (value) => Boolean(value && value.getVelocity);
|
|
501
|
-
|
|
502
|
-
/**
|
|
503
|
-
* Convert camelCase to dash-case properties.
|
|
504
|
-
*/
|
|
505
|
-
const camelToDash = (str) => str.replace(/([a-z])([A-Z])/gu, "$1-$2").toLowerCase();
|
|
506
|
-
|
|
507
|
-
const optimizedAppearDataId = "framerAppearId";
|
|
508
|
-
const optimizedAppearDataAttribute = "data-" + camelToDash(optimizedAppearDataId);
|
|
509
|
-
|
|
510
|
-
/**
|
|
511
|
-
* @public
|
|
512
|
-
*/
|
|
513
|
-
const PresenceContext =
|
|
514
|
-
/* @__PURE__ */ react.createContext(null);
|
|
515
|
-
|
|
516
|
-
/**
|
|
517
|
-
* Internal, exported only for usage in Framer
|
|
518
|
-
*/
|
|
519
|
-
const SwitchLayoutGroupContext = react.createContext({});
|
|
520
|
-
|
|
521
|
-
const useIsomorphicLayoutEffect = isBrowser ? react.useLayoutEffect : react.useEffect;
|
|
522
|
-
|
|
523
|
-
function useVisualElement(Component, visualState, props, createVisualElement, ProjectionNodeConstructor) {
|
|
524
|
-
const { visualElement: parent } = react.useContext(MotionContext);
|
|
525
|
-
const lazyContext = react.useContext(LazyContext);
|
|
526
|
-
const presenceContext = react.useContext(PresenceContext);
|
|
527
|
-
const reducedMotionConfig = react.useContext(MotionConfigContext).reducedMotion;
|
|
528
|
-
const visualElementRef = react.useRef(null);
|
|
529
|
-
/**
|
|
530
|
-
* If we haven't preloaded a renderer, check to see if we have one lazy-loaded
|
|
531
|
-
*/
|
|
532
|
-
createVisualElement = createVisualElement || lazyContext.renderer;
|
|
533
|
-
if (!visualElementRef.current && createVisualElement) {
|
|
534
|
-
visualElementRef.current = createVisualElement(Component, {
|
|
535
|
-
visualState,
|
|
536
|
-
parent,
|
|
537
|
-
props,
|
|
538
|
-
presenceContext,
|
|
539
|
-
blockInitialAnimation: presenceContext
|
|
540
|
-
? presenceContext.initial === false
|
|
541
|
-
: false,
|
|
542
|
-
reducedMotionConfig,
|
|
543
|
-
});
|
|
544
|
-
}
|
|
545
|
-
const visualElement = visualElementRef.current;
|
|
546
|
-
/**
|
|
547
|
-
* Load Motion gesture and animation features. These are rendered as renderless
|
|
548
|
-
* components so each feature can optionally make use of React lifecycle methods.
|
|
549
|
-
*/
|
|
550
|
-
const initialLayoutGroupConfig = react.useContext(SwitchLayoutGroupContext);
|
|
551
|
-
if (visualElement &&
|
|
552
|
-
!visualElement.projection &&
|
|
553
|
-
ProjectionNodeConstructor &&
|
|
554
|
-
(visualElement.type === "html" || visualElement.type === "svg")) {
|
|
555
|
-
createProjectionNode(visualElementRef.current, props, ProjectionNodeConstructor, initialLayoutGroupConfig);
|
|
556
|
-
}
|
|
557
|
-
const isMounted = react.useRef(false);
|
|
558
|
-
react.useInsertionEffect(() => {
|
|
559
|
-
/**
|
|
560
|
-
* Check the component has already mounted before calling
|
|
561
|
-
* `update` unnecessarily. This ensures we skip the initial update.
|
|
562
|
-
*/
|
|
563
|
-
if (visualElement && isMounted.current) {
|
|
564
|
-
visualElement.update(props, presenceContext);
|
|
565
|
-
}
|
|
566
|
-
});
|
|
567
|
-
/**
|
|
568
|
-
* Cache this value as we want to know whether HandoffAppearAnimations
|
|
569
|
-
* was present on initial render - it will be deleted after this.
|
|
570
|
-
*/
|
|
571
|
-
const optimisedAppearId = props[optimizedAppearDataAttribute];
|
|
572
|
-
const wantsHandoff = react.useRef(Boolean(optimisedAppearId) &&
|
|
573
|
-
!window.MotionHandoffIsComplete?.(optimisedAppearId) &&
|
|
574
|
-
window.MotionHasOptimisedAnimation?.(optimisedAppearId));
|
|
575
|
-
useIsomorphicLayoutEffect(() => {
|
|
576
|
-
if (!visualElement)
|
|
577
|
-
return;
|
|
578
|
-
isMounted.current = true;
|
|
579
|
-
window.MotionIsMounted = true;
|
|
580
|
-
visualElement.updateFeatures();
|
|
581
|
-
microtask.render(visualElement.render);
|
|
582
|
-
/**
|
|
583
|
-
* Ideally this function would always run in a useEffect.
|
|
584
|
-
*
|
|
585
|
-
* However, if we have optimised appear animations to handoff from,
|
|
586
|
-
* it needs to happen synchronously to ensure there's no flash of
|
|
587
|
-
* incorrect styles in the event of a hydration error.
|
|
588
|
-
*
|
|
589
|
-
* So if we detect a situtation where optimised appear animations
|
|
590
|
-
* are running, we use useLayoutEffect to trigger animations.
|
|
591
|
-
*/
|
|
592
|
-
if (wantsHandoff.current && visualElement.animationState) {
|
|
593
|
-
visualElement.animationState.animateChanges();
|
|
594
|
-
}
|
|
595
|
-
});
|
|
596
|
-
react.useEffect(() => {
|
|
597
|
-
if (!visualElement)
|
|
598
|
-
return;
|
|
599
|
-
if (!wantsHandoff.current && visualElement.animationState) {
|
|
600
|
-
visualElement.animationState.animateChanges();
|
|
601
|
-
}
|
|
602
|
-
if (wantsHandoff.current) {
|
|
603
|
-
// This ensures all future calls to animateChanges() in this component will run in useEffect
|
|
604
|
-
queueMicrotask(() => {
|
|
605
|
-
window.MotionHandoffMarkAsComplete?.(optimisedAppearId);
|
|
606
|
-
});
|
|
607
|
-
wantsHandoff.current = false;
|
|
608
|
-
}
|
|
609
|
-
});
|
|
610
|
-
return visualElement;
|
|
611
|
-
}
|
|
612
|
-
function createProjectionNode(visualElement, props, ProjectionNodeConstructor, initialPromotionConfig) {
|
|
613
|
-
const { layoutId, layout, drag, dragConstraints, layoutScroll, layoutRoot, layoutCrossfade, } = props;
|
|
614
|
-
visualElement.projection = new ProjectionNodeConstructor(visualElement.latestValues, props["data-framer-portal-id"]
|
|
615
|
-
? undefined
|
|
616
|
-
: getClosestProjectingNode(visualElement.parent));
|
|
617
|
-
visualElement.projection.setOptions({
|
|
618
|
-
layoutId,
|
|
619
|
-
layout,
|
|
620
|
-
alwaysMeasureLayout: Boolean(drag) || (dragConstraints && isRefObject(dragConstraints)),
|
|
621
|
-
visualElement,
|
|
622
|
-
/**
|
|
623
|
-
* TODO: Update options in an effect. This could be tricky as it'll be too late
|
|
624
|
-
* to update by the time layout animations run.
|
|
625
|
-
* We also need to fix this safeToRemove by linking it up to the one returned by usePresence,
|
|
626
|
-
* ensuring it gets called if there's no potential layout animations.
|
|
627
|
-
*
|
|
628
|
-
*/
|
|
629
|
-
animationType: typeof layout === "string" ? layout : "both",
|
|
630
|
-
initialPromotionConfig,
|
|
631
|
-
crossfade: layoutCrossfade,
|
|
632
|
-
layoutScroll,
|
|
633
|
-
layoutRoot,
|
|
634
|
-
});
|
|
635
|
-
}
|
|
636
|
-
function getClosestProjectingNode(visualElement) {
|
|
637
|
-
if (!visualElement)
|
|
638
|
-
return undefined;
|
|
639
|
-
return visualElement.options.allowProjection !== false
|
|
640
|
-
? visualElement.projection
|
|
641
|
-
: getClosestProjectingNode(visualElement.parent);
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
/**
|
|
645
|
-
* Create a `motion` component.
|
|
646
|
-
*
|
|
647
|
-
* This function accepts a Component argument, which can be either a string (ie "div"
|
|
648
|
-
* for `motion.div`), or an actual React component.
|
|
649
|
-
*
|
|
650
|
-
* Alongside this is a config option which provides a way of rendering the provided
|
|
651
|
-
* component "offline", or outside the React render cycle.
|
|
652
|
-
*/
|
|
653
|
-
function createRendererMotionComponent({ preloadedFeatures, createVisualElement, useRender, useVisualState, Component, }) {
|
|
654
|
-
preloadedFeatures && loadFeatures(preloadedFeatures);
|
|
655
|
-
function MotionComponent(props, externalRef) {
|
|
656
|
-
/**
|
|
657
|
-
* If we need to measure the element we load this functionality in a
|
|
658
|
-
* separate class component in order to gain access to getSnapshotBeforeUpdate.
|
|
659
|
-
*/
|
|
660
|
-
let MeasureLayout;
|
|
661
|
-
const configAndProps = {
|
|
662
|
-
...react.useContext(MotionConfigContext),
|
|
663
|
-
...props,
|
|
664
|
-
layoutId: useLayoutId(props),
|
|
665
|
-
};
|
|
666
|
-
const { isStatic } = configAndProps;
|
|
667
|
-
const context = useCreateMotionContext(props);
|
|
668
|
-
const visualState = useVisualState(props, isStatic);
|
|
669
|
-
if (!isStatic && isBrowser) {
|
|
670
|
-
useStrictMode(configAndProps, preloadedFeatures);
|
|
671
|
-
const layoutProjection = getProjectionFunctionality(configAndProps);
|
|
672
|
-
MeasureLayout = layoutProjection.MeasureLayout;
|
|
673
|
-
/**
|
|
674
|
-
* Create a VisualElement for this component. A VisualElement provides a common
|
|
675
|
-
* interface to renderer-specific APIs (ie DOM/Three.js etc) as well as
|
|
676
|
-
* providing a way of rendering to these APIs outside of the React render loop
|
|
677
|
-
* for more performant animations and interactions
|
|
678
|
-
*/
|
|
679
|
-
context.visualElement = useVisualElement(Component, visualState, configAndProps, createVisualElement, layoutProjection.ProjectionNode);
|
|
680
|
-
}
|
|
681
|
-
/**
|
|
682
|
-
* The mount order and hierarchy is specific to ensure our element ref
|
|
683
|
-
* is hydrated by the time features fire their effects.
|
|
684
|
-
*/
|
|
685
|
-
return (jsxRuntime.jsxs(MotionContext.Provider, { value: context, children: [MeasureLayout && context.visualElement ? (jsxRuntime.jsx(MeasureLayout, { visualElement: context.visualElement, ...configAndProps })) : null, useRender(Component, props, useMotionRef(visualState, context.visualElement, externalRef), visualState, isStatic, context.visualElement)] }));
|
|
686
|
-
}
|
|
687
|
-
MotionComponent.displayName = `motion.${typeof Component === "string"
|
|
688
|
-
? Component
|
|
689
|
-
: `create(${Component.displayName ?? Component.name ?? ""})`}`;
|
|
690
|
-
const ForwardRefMotionComponent = react.forwardRef(MotionComponent);
|
|
691
|
-
ForwardRefMotionComponent[motionComponentSymbol] = Component;
|
|
692
|
-
return ForwardRefMotionComponent;
|
|
693
|
-
}
|
|
694
|
-
function useLayoutId({ layoutId }) {
|
|
695
|
-
const layoutGroupId = react.useContext(LayoutGroupContext).id;
|
|
696
|
-
return layoutGroupId && layoutId !== undefined
|
|
697
|
-
? layoutGroupId + "-" + layoutId
|
|
698
|
-
: layoutId;
|
|
699
|
-
}
|
|
700
|
-
function useStrictMode(configAndProps, preloadedFeatures) {
|
|
701
|
-
const isStrict = react.useContext(LazyContext).strict;
|
|
702
|
-
/**
|
|
703
|
-
* If we're in development mode, check to make sure we're not rendering a motion component
|
|
704
|
-
* as a child of LazyMotion, as this will break the file-size benefits of using it.
|
|
705
|
-
*/
|
|
706
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
707
|
-
preloadedFeatures &&
|
|
708
|
-
isStrict) {
|
|
709
|
-
const strictMessage = "You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";
|
|
710
|
-
configAndProps.ignoreStrict
|
|
711
|
-
? warning(false, strictMessage)
|
|
712
|
-
: invariant(false, strictMessage);
|
|
713
|
-
}
|
|
714
|
-
}
|
|
715
|
-
function getProjectionFunctionality(props) {
|
|
716
|
-
const { drag, layout } = featureDefinitions;
|
|
717
|
-
if (!drag && !layout)
|
|
718
|
-
return {};
|
|
719
|
-
const combined = { ...drag, ...layout };
|
|
720
|
-
return {
|
|
721
|
-
MeasureLayout: drag?.isEnabled(props) || layout?.isEnabled(props)
|
|
722
|
-
? combined.MeasureLayout
|
|
723
|
-
: undefined,
|
|
724
|
-
ProjectionNode: combined.ProjectionNode,
|
|
725
|
-
};
|
|
726
|
-
}
|
|
727
|
-
|
|
728
|
-
const scaleCorrectors = {};
|
|
729
|
-
|
|
730
|
-
function isForcedMotionValue(key, { layout, layoutId }) {
|
|
731
|
-
return (transformProps.has(key) ||
|
|
732
|
-
key.startsWith("origin") ||
|
|
733
|
-
((layout || layoutId !== undefined) &&
|
|
734
|
-
(!!scaleCorrectors[key] || key === "opacity")));
|
|
735
|
-
}
|
|
736
|
-
|
|
737
|
-
const translateAlias = {
|
|
738
|
-
x: "translateX",
|
|
739
|
-
y: "translateY",
|
|
740
|
-
z: "translateZ",
|
|
741
|
-
transformPerspective: "perspective",
|
|
742
|
-
};
|
|
743
|
-
const numTransforms = transformPropOrder.length;
|
|
744
|
-
/**
|
|
745
|
-
* Build a CSS transform style from individual x/y/scale etc properties.
|
|
746
|
-
*
|
|
747
|
-
* This outputs with a default order of transforms/scales/rotations, this can be customised by
|
|
748
|
-
* providing a transformTemplate function.
|
|
749
|
-
*/
|
|
750
|
-
function buildTransform(latestValues, transform, transformTemplate) {
|
|
751
|
-
// The transform string we're going to build into.
|
|
752
|
-
let transformString = "";
|
|
753
|
-
let transformIsDefault = true;
|
|
754
|
-
/**
|
|
755
|
-
* Loop over all possible transforms in order, adding the ones that
|
|
756
|
-
* are present to the transform string.
|
|
757
|
-
*/
|
|
758
|
-
for (let i = 0; i < numTransforms; i++) {
|
|
759
|
-
const key = transformPropOrder[i];
|
|
760
|
-
const value = latestValues[key];
|
|
761
|
-
if (value === undefined)
|
|
762
|
-
continue;
|
|
763
|
-
let valueIsDefault = true;
|
|
764
|
-
if (typeof value === "number") {
|
|
765
|
-
valueIsDefault = value === (key.startsWith("scale") ? 1 : 0);
|
|
766
|
-
}
|
|
767
|
-
else {
|
|
768
|
-
valueIsDefault = parseFloat(value) === 0;
|
|
769
|
-
}
|
|
770
|
-
if (!valueIsDefault || transformTemplate) {
|
|
771
|
-
const valueAsType = getValueAsType(value, numberValueTypes[key]);
|
|
772
|
-
if (!valueIsDefault) {
|
|
773
|
-
transformIsDefault = false;
|
|
774
|
-
const transformName = translateAlias[key] || key;
|
|
775
|
-
transformString += `${transformName}(${valueAsType}) `;
|
|
776
|
-
}
|
|
777
|
-
if (transformTemplate) {
|
|
778
|
-
transform[key] = valueAsType;
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
}
|
|
782
|
-
transformString = transformString.trim();
|
|
783
|
-
// If we have a custom `transform` template, pass our transform values and
|
|
784
|
-
// generated transformString to that before returning
|
|
785
|
-
if (transformTemplate) {
|
|
786
|
-
transformString = transformTemplate(transform, transformIsDefault ? "" : transformString);
|
|
787
|
-
}
|
|
788
|
-
else if (transformIsDefault) {
|
|
789
|
-
transformString = "none";
|
|
790
|
-
}
|
|
791
|
-
return transformString;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
function buildHTMLStyles(state, latestValues, transformTemplate) {
|
|
795
|
-
const { style, vars, transformOrigin } = state;
|
|
796
|
-
// Track whether we encounter any transform or transformOrigin values.
|
|
797
|
-
let hasTransform = false;
|
|
798
|
-
let hasTransformOrigin = false;
|
|
799
|
-
/**
|
|
800
|
-
* Loop over all our latest animated values and decide whether to handle them
|
|
801
|
-
* as a style or CSS variable.
|
|
802
|
-
*
|
|
803
|
-
* Transforms and transform origins are kept separately for further processing.
|
|
804
|
-
*/
|
|
805
|
-
for (const key in latestValues) {
|
|
806
|
-
const value = latestValues[key];
|
|
807
|
-
if (transformProps.has(key)) {
|
|
808
|
-
// If this is a transform, flag to enable further transform processing
|
|
809
|
-
hasTransform = true;
|
|
810
|
-
continue;
|
|
811
|
-
}
|
|
812
|
-
else if (isCSSVariableName(key)) {
|
|
813
|
-
vars[key] = value;
|
|
814
|
-
continue;
|
|
815
|
-
}
|
|
816
|
-
else {
|
|
817
|
-
// Convert the value to its default value type, ie 0 -> "0px"
|
|
818
|
-
const valueAsType = getValueAsType(value, numberValueTypes[key]);
|
|
819
|
-
if (key.startsWith("origin")) {
|
|
820
|
-
// If this is a transform origin, flag and enable further transform-origin processing
|
|
821
|
-
hasTransformOrigin = true;
|
|
822
|
-
transformOrigin[key] =
|
|
823
|
-
valueAsType;
|
|
824
|
-
}
|
|
825
|
-
else {
|
|
826
|
-
style[key] = valueAsType;
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
}
|
|
830
|
-
if (!latestValues.transform) {
|
|
831
|
-
if (hasTransform || transformTemplate) {
|
|
832
|
-
style.transform = buildTransform(latestValues, state.transform, transformTemplate);
|
|
833
|
-
}
|
|
834
|
-
else if (style.transform) {
|
|
835
|
-
/**
|
|
836
|
-
* If we have previously created a transform but currently don't have any,
|
|
837
|
-
* reset transform style to none.
|
|
838
|
-
*/
|
|
839
|
-
style.transform = "none";
|
|
840
|
-
}
|
|
841
|
-
}
|
|
842
|
-
/**
|
|
843
|
-
* Build a transformOrigin style. Uses the same defaults as the browser for
|
|
844
|
-
* undefined origins.
|
|
845
|
-
*/
|
|
846
|
-
if (hasTransformOrigin) {
|
|
847
|
-
const { originX = "50%", originY = "50%", originZ = 0, } = transformOrigin;
|
|
848
|
-
style.transformOrigin = `${originX} ${originY} ${originZ}`;
|
|
849
|
-
}
|
|
850
|
-
}
|
|
851
|
-
|
|
852
|
-
const createHtmlRenderState = () => ({
|
|
853
|
-
style: {},
|
|
854
|
-
transform: {},
|
|
855
|
-
transformOrigin: {},
|
|
856
|
-
vars: {},
|
|
857
|
-
});
|
|
858
|
-
|
|
859
|
-
function copyRawValuesOnly(target, source, props) {
|
|
860
|
-
for (const key in source) {
|
|
861
|
-
if (!isMotionValue(source[key]) && !isForcedMotionValue(key, props)) {
|
|
862
|
-
target[key] = source[key];
|
|
863
|
-
}
|
|
864
|
-
}
|
|
865
|
-
}
|
|
866
|
-
function useInitialMotionValues({ transformTemplate }, visualState) {
|
|
867
|
-
return react.useMemo(() => {
|
|
868
|
-
const state = createHtmlRenderState();
|
|
869
|
-
buildHTMLStyles(state, visualState, transformTemplate);
|
|
870
|
-
return Object.assign({}, state.vars, state.style);
|
|
871
|
-
}, [visualState]);
|
|
872
|
-
}
|
|
873
|
-
function useStyle(props, visualState) {
|
|
874
|
-
const styleProp = props.style || {};
|
|
875
|
-
const style = {};
|
|
876
|
-
/**
|
|
877
|
-
* Copy non-Motion Values straight into style
|
|
878
|
-
*/
|
|
879
|
-
copyRawValuesOnly(style, styleProp, props);
|
|
880
|
-
Object.assign(style, useInitialMotionValues(props, visualState));
|
|
881
|
-
return style;
|
|
882
|
-
}
|
|
883
|
-
function useHTMLProps(props, visualState) {
|
|
884
|
-
// The `any` isn't ideal but it is the type of createElement props argument
|
|
885
|
-
const htmlProps = {};
|
|
886
|
-
const style = useStyle(props, visualState);
|
|
887
|
-
if (props.drag && props.dragListener !== false) {
|
|
888
|
-
// Disable the ghost element when a user drags
|
|
889
|
-
htmlProps.draggable = false;
|
|
890
|
-
// Disable text selection
|
|
891
|
-
style.userSelect =
|
|
892
|
-
style.WebkitUserSelect =
|
|
893
|
-
style.WebkitTouchCallout =
|
|
894
|
-
"none";
|
|
895
|
-
// Disable scrolling on the draggable direction
|
|
896
|
-
style.touchAction =
|
|
897
|
-
props.drag === true
|
|
898
|
-
? "none"
|
|
899
|
-
: `pan-${props.drag === "x" ? "y" : "x"}`;
|
|
900
|
-
}
|
|
901
|
-
if (props.tabIndex === undefined &&
|
|
902
|
-
(props.onTap || props.onTapStart || props.whileTap)) {
|
|
903
|
-
htmlProps.tabIndex = 0;
|
|
904
|
-
}
|
|
905
|
-
htmlProps.style = style;
|
|
906
|
-
return htmlProps;
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
const dashKeys = {
|
|
910
|
-
offset: "stroke-dashoffset",
|
|
911
|
-
array: "stroke-dasharray",
|
|
912
|
-
};
|
|
913
|
-
const camelKeys = {
|
|
914
|
-
offset: "strokeDashoffset",
|
|
915
|
-
array: "strokeDasharray",
|
|
916
|
-
};
|
|
917
|
-
/**
|
|
918
|
-
* Build SVG path properties. Uses the path's measured length to convert
|
|
919
|
-
* our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset
|
|
920
|
-
* and stroke-dasharray attributes.
|
|
921
|
-
*
|
|
922
|
-
* This function is mutative to reduce per-frame GC.
|
|
923
|
-
*/
|
|
924
|
-
function buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true) {
|
|
925
|
-
// Normalise path length by setting SVG attribute pathLength to 1
|
|
926
|
-
attrs.pathLength = 1;
|
|
927
|
-
// We use dash case when setting attributes directly to the DOM node and camel case
|
|
928
|
-
// when defining props on a React component.
|
|
929
|
-
const keys = useDashCase ? dashKeys : camelKeys;
|
|
930
|
-
// Build the dash offset
|
|
931
|
-
attrs[keys.offset] = px.transform(-offset);
|
|
932
|
-
// Build the dash array
|
|
933
|
-
const pathLength = px.transform(length);
|
|
934
|
-
const pathSpacing = px.transform(spacing);
|
|
935
|
-
attrs[keys.array] = `${pathLength} ${pathSpacing}`;
|
|
936
|
-
}
|
|
937
|
-
|
|
938
|
-
/**
|
|
939
|
-
* Build SVG visual attrbutes, like cx and style.transform
|
|
940
|
-
*/
|
|
941
|
-
function buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing = 1, pathOffset = 0,
|
|
942
|
-
// This is object creation, which we try to avoid per-frame.
|
|
943
|
-
...latest }, isSVGTag, transformTemplate, styleProp) {
|
|
944
|
-
buildHTMLStyles(state, latest, transformTemplate);
|
|
945
|
-
/**
|
|
946
|
-
* For svg tags we just want to make sure viewBox is animatable and treat all the styles
|
|
947
|
-
* as normal HTML tags.
|
|
948
|
-
*/
|
|
949
|
-
if (isSVGTag) {
|
|
950
|
-
if (state.style.viewBox) {
|
|
951
|
-
state.attrs.viewBox = state.style.viewBox;
|
|
952
|
-
}
|
|
953
|
-
return;
|
|
954
|
-
}
|
|
955
|
-
state.attrs = state.style;
|
|
956
|
-
state.style = {};
|
|
957
|
-
const { attrs, style } = state;
|
|
958
|
-
/**
|
|
959
|
-
* However, we apply transforms as CSS transforms.
|
|
960
|
-
* So if we detect a transform, transformOrigin we take it from attrs and copy it into style.
|
|
961
|
-
*/
|
|
962
|
-
if (attrs.transform) {
|
|
963
|
-
style.transform = attrs.transform;
|
|
964
|
-
delete attrs.transform;
|
|
965
|
-
}
|
|
966
|
-
if (style.transform || attrs.transformOrigin) {
|
|
967
|
-
style.transformOrigin = attrs.transformOrigin ?? "50% 50%";
|
|
968
|
-
delete attrs.transformOrigin;
|
|
969
|
-
}
|
|
970
|
-
if (style.transform) {
|
|
971
|
-
/**
|
|
972
|
-
* SVG's element transform-origin uses its own median as a reference.
|
|
973
|
-
* Therefore, transformBox becomes a fill-box
|
|
974
|
-
*/
|
|
975
|
-
style.transformBox = styleProp?.transformBox ?? "fill-box";
|
|
976
|
-
delete attrs.transformBox;
|
|
977
|
-
}
|
|
978
|
-
// Render attrX/attrY/attrScale as attributes
|
|
979
|
-
if (attrX !== undefined)
|
|
980
|
-
attrs.x = attrX;
|
|
981
|
-
if (attrY !== undefined)
|
|
982
|
-
attrs.y = attrY;
|
|
983
|
-
if (attrScale !== undefined)
|
|
984
|
-
attrs.scale = attrScale;
|
|
985
|
-
// Build SVG path if one has been defined
|
|
986
|
-
if (pathLength !== undefined) {
|
|
987
|
-
buildSVGPath(attrs, pathLength, pathSpacing, pathOffset, false);
|
|
988
|
-
}
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
const createSvgRenderState = () => ({
|
|
992
|
-
...createHtmlRenderState(),
|
|
993
|
-
attrs: {},
|
|
9
|
+
Object.keys(m).forEach(function (k) {
|
|
10
|
+
if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () { return m[k]; }
|
|
13
|
+
});
|
|
994
14
|
});
|
|
995
|
-
|
|
996
|
-
const isSVGTag = (tag) => typeof tag === "string" && tag.toLowerCase() === "svg";
|
|
997
|
-
|
|
998
|
-
function useSVGProps(props, visualState, _isStatic, Component) {
|
|
999
|
-
const visualProps = react.useMemo(() => {
|
|
1000
|
-
const state = createSvgRenderState();
|
|
1001
|
-
buildSVGAttrs(state, visualState, isSVGTag(Component), props.transformTemplate, props.style);
|
|
1002
|
-
return {
|
|
1003
|
-
...state.attrs,
|
|
1004
|
-
style: { ...state.style },
|
|
1005
|
-
};
|
|
1006
|
-
}, [visualState]);
|
|
1007
|
-
if (props.style) {
|
|
1008
|
-
const rawStyles = {};
|
|
1009
|
-
copyRawValuesOnly(rawStyles, props.style, props);
|
|
1010
|
-
visualProps.style = { ...rawStyles, ...visualProps.style };
|
|
1011
|
-
}
|
|
1012
|
-
return visualProps;
|
|
1013
|
-
}
|
|
1014
|
-
|
|
1015
|
-
/**
|
|
1016
|
-
* A list of all valid MotionProps.
|
|
1017
|
-
*
|
|
1018
|
-
* @privateRemarks
|
|
1019
|
-
* This doesn't throw if a `MotionProp` name is missing - it should.
|
|
1020
|
-
*/
|
|
1021
|
-
const validMotionProps = new Set([
|
|
1022
|
-
"animate",
|
|
1023
|
-
"exit",
|
|
1024
|
-
"variants",
|
|
1025
|
-
"initial",
|
|
1026
|
-
"style",
|
|
1027
|
-
"values",
|
|
1028
|
-
"variants",
|
|
1029
|
-
"transition",
|
|
1030
|
-
"transformTemplate",
|
|
1031
|
-
"custom",
|
|
1032
|
-
"inherit",
|
|
1033
|
-
"onBeforeLayoutMeasure",
|
|
1034
|
-
"onAnimationStart",
|
|
1035
|
-
"onAnimationComplete",
|
|
1036
|
-
"onUpdate",
|
|
1037
|
-
"onDragStart",
|
|
1038
|
-
"onDrag",
|
|
1039
|
-
"onDragEnd",
|
|
1040
|
-
"onMeasureDragConstraints",
|
|
1041
|
-
"onDirectionLock",
|
|
1042
|
-
"onDragTransitionEnd",
|
|
1043
|
-
"_dragX",
|
|
1044
|
-
"_dragY",
|
|
1045
|
-
"onHoverStart",
|
|
1046
|
-
"onHoverEnd",
|
|
1047
|
-
"onViewportEnter",
|
|
1048
|
-
"onViewportLeave",
|
|
1049
|
-
"globalTapTarget",
|
|
1050
|
-
"ignoreStrict",
|
|
1051
|
-
"viewport",
|
|
1052
|
-
]);
|
|
1053
|
-
/**
|
|
1054
|
-
* Check whether a prop name is a valid `MotionProp` key.
|
|
1055
|
-
*
|
|
1056
|
-
* @param key - Name of the property to check
|
|
1057
|
-
* @returns `true` is key is a valid `MotionProp`.
|
|
1058
|
-
*
|
|
1059
|
-
* @public
|
|
1060
|
-
*/
|
|
1061
|
-
function isValidMotionProp(key) {
|
|
1062
|
-
return (key.startsWith("while") ||
|
|
1063
|
-
(key.startsWith("drag") && key !== "draggable") ||
|
|
1064
|
-
key.startsWith("layout") ||
|
|
1065
|
-
key.startsWith("onTap") ||
|
|
1066
|
-
key.startsWith("onPan") ||
|
|
1067
|
-
key.startsWith("onLayout") ||
|
|
1068
|
-
validMotionProps.has(key));
|
|
1069
|
-
}
|
|
1070
|
-
|
|
1071
|
-
let shouldForward = (key) => !isValidMotionProp(key);
|
|
1072
|
-
function loadExternalIsValidProp(isValidProp) {
|
|
1073
|
-
if (!isValidProp)
|
|
1074
|
-
return;
|
|
1075
|
-
// Explicitly filter our events
|
|
1076
|
-
shouldForward = (key) => key.startsWith("on") ? !isValidMotionProp(key) : isValidProp(key);
|
|
1077
|
-
}
|
|
1078
|
-
/**
|
|
1079
|
-
* Emotion and Styled Components both allow users to pass through arbitrary props to their components
|
|
1080
|
-
* to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which
|
|
1081
|
-
* of these should be passed to the underlying DOM node.
|
|
1082
|
-
*
|
|
1083
|
-
* However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props
|
|
1084
|
-
* as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props
|
|
1085
|
-
* passed through the `custom` prop so it doesn't *need* the payload or computational overhead of
|
|
1086
|
-
* `@emotion/is-prop-valid`, however to fix this problem we need to use it.
|
|
1087
|
-
*
|
|
1088
|
-
* By making it an optionalDependency we can offer this functionality only in the situations where it's
|
|
1089
|
-
* actually required.
|
|
1090
|
-
*/
|
|
1091
|
-
try {
|
|
1092
|
-
/**
|
|
1093
|
-
* We attempt to import this package but require won't be defined in esm environments, in that case
|
|
1094
|
-
* isPropValid will have to be provided via `MotionContext`. In a 6.0.0 this should probably be removed
|
|
1095
|
-
* in favour of explicit injection.
|
|
1096
|
-
*/
|
|
1097
|
-
loadExternalIsValidProp(require("@emotion/is-prop-valid").default);
|
|
1098
|
-
}
|
|
1099
|
-
catch {
|
|
1100
|
-
// We don't need to actually do anything here - the fallback is the existing `isPropValid`.
|
|
1101
|
-
}
|
|
1102
|
-
function filterProps(props, isDom, forwardMotionProps) {
|
|
1103
|
-
const filteredProps = {};
|
|
1104
|
-
for (const key in props) {
|
|
1105
|
-
/**
|
|
1106
|
-
* values is considered a valid prop by Emotion, so if it's present
|
|
1107
|
-
* this will be rendered out to the DOM unless explicitly filtered.
|
|
1108
|
-
*
|
|
1109
|
-
* We check the type as it could be used with the `feColorMatrix`
|
|
1110
|
-
* element, which we support.
|
|
1111
|
-
*/
|
|
1112
|
-
if (key === "values" && typeof props.values === "object")
|
|
1113
|
-
continue;
|
|
1114
|
-
if (shouldForward(key) ||
|
|
1115
|
-
(forwardMotionProps === true && isValidMotionProp(key)) ||
|
|
1116
|
-
(!isDom && !isValidMotionProp(key)) ||
|
|
1117
|
-
// If trying to use native HTML drag events, forward drag listeners
|
|
1118
|
-
(props["draggable"] &&
|
|
1119
|
-
key.startsWith("onDrag"))) {
|
|
1120
|
-
filteredProps[key] =
|
|
1121
|
-
props[key];
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
return filteredProps;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
/**
|
|
1128
|
-
* We keep these listed separately as we use the lowercase tag names as part
|
|
1129
|
-
* of the runtime bundle to detect SVG components
|
|
1130
|
-
*/
|
|
1131
|
-
const lowercaseSVGElements = [
|
|
1132
|
-
"animate",
|
|
1133
|
-
"circle",
|
|
1134
|
-
"defs",
|
|
1135
|
-
"desc",
|
|
1136
|
-
"ellipse",
|
|
1137
|
-
"g",
|
|
1138
|
-
"image",
|
|
1139
|
-
"line",
|
|
1140
|
-
"filter",
|
|
1141
|
-
"marker",
|
|
1142
|
-
"mask",
|
|
1143
|
-
"metadata",
|
|
1144
|
-
"path",
|
|
1145
|
-
"pattern",
|
|
1146
|
-
"polygon",
|
|
1147
|
-
"polyline",
|
|
1148
|
-
"rect",
|
|
1149
|
-
"stop",
|
|
1150
|
-
"switch",
|
|
1151
|
-
"symbol",
|
|
1152
|
-
"svg",
|
|
1153
|
-
"text",
|
|
1154
|
-
"tspan",
|
|
1155
|
-
"use",
|
|
1156
|
-
"view",
|
|
1157
|
-
];
|
|
1158
|
-
|
|
1159
|
-
function isSVGComponent(Component) {
|
|
1160
|
-
if (
|
|
1161
|
-
/**
|
|
1162
|
-
* If it's not a string, it's a custom React component. Currently we only support
|
|
1163
|
-
* HTML custom React components.
|
|
1164
|
-
*/
|
|
1165
|
-
typeof Component !== "string" ||
|
|
1166
|
-
/**
|
|
1167
|
-
* If it contains a dash, the element is a custom HTML webcomponent.
|
|
1168
|
-
*/
|
|
1169
|
-
Component.includes("-")) {
|
|
1170
|
-
return false;
|
|
1171
|
-
}
|
|
1172
|
-
else if (
|
|
1173
|
-
/**
|
|
1174
|
-
* If it's in our list of lowercase SVG tags, it's an SVG component
|
|
1175
|
-
*/
|
|
1176
|
-
lowercaseSVGElements.indexOf(Component) > -1 ||
|
|
1177
|
-
/**
|
|
1178
|
-
* If it contains a capital letter, it's an SVG component
|
|
1179
|
-
*/
|
|
1180
|
-
/[A-Z]/u.test(Component)) {
|
|
1181
|
-
return true;
|
|
1182
|
-
}
|
|
1183
|
-
return false;
|
|
1184
|
-
}
|
|
1185
|
-
|
|
1186
|
-
function createUseRender(forwardMotionProps = false) {
|
|
1187
|
-
const useRender = (Component, props, ref, { latestValues }, isStatic) => {
|
|
1188
|
-
const useVisualProps = isSVGComponent(Component)
|
|
1189
|
-
? useSVGProps
|
|
1190
|
-
: useHTMLProps;
|
|
1191
|
-
const visualProps = useVisualProps(props, latestValues, isStatic, Component);
|
|
1192
|
-
const filteredProps = filterProps(props, typeof Component === "string", forwardMotionProps);
|
|
1193
|
-
const elementProps = Component !== react.Fragment
|
|
1194
|
-
? { ...filteredProps, ...visualProps, ref }
|
|
1195
|
-
: {};
|
|
1196
|
-
/**
|
|
1197
|
-
* If component has been handed a motion value as its child,
|
|
1198
|
-
* memoise its initial value and render that. Subsequent updates
|
|
1199
|
-
* will be handled by the onChange handler
|
|
1200
|
-
*/
|
|
1201
|
-
const { children } = props;
|
|
1202
|
-
const renderedChildren = react.useMemo(() => (isMotionValue(children) ? children.get() : children), [children]);
|
|
1203
|
-
return react.createElement(Component, {
|
|
1204
|
-
...elementProps,
|
|
1205
|
-
children: renderedChildren,
|
|
1206
|
-
});
|
|
1207
|
-
};
|
|
1208
|
-
return useRender;
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
function getValueState(visualElement) {
|
|
1212
|
-
const state = [{}, {}];
|
|
1213
|
-
visualElement?.values.forEach((value, key) => {
|
|
1214
|
-
state[0][key] = value.get();
|
|
1215
|
-
state[1][key] = value.getVelocity();
|
|
1216
|
-
});
|
|
1217
|
-
return state;
|
|
1218
|
-
}
|
|
1219
|
-
function resolveVariantFromProps(props, definition, custom, visualElement) {
|
|
1220
|
-
/**
|
|
1221
|
-
* If the variant definition is a function, resolve.
|
|
1222
|
-
*/
|
|
1223
|
-
if (typeof definition === "function") {
|
|
1224
|
-
const [current, velocity] = getValueState(visualElement);
|
|
1225
|
-
definition = definition(custom !== undefined ? custom : props.custom, current, velocity);
|
|
1226
|
-
}
|
|
1227
|
-
/**
|
|
1228
|
-
* If the variant definition is a variant label, or
|
|
1229
|
-
* the function returned a variant label, resolve.
|
|
1230
|
-
*/
|
|
1231
|
-
if (typeof definition === "string") {
|
|
1232
|
-
definition = props.variants && props.variants[definition];
|
|
1233
|
-
}
|
|
1234
|
-
/**
|
|
1235
|
-
* At this point we've resolved both functions and variant labels,
|
|
1236
|
-
* but the resolved variant label might itself have been a function.
|
|
1237
|
-
* If so, resolve. This can only have returned a valid target object.
|
|
1238
|
-
*/
|
|
1239
|
-
if (typeof definition === "function") {
|
|
1240
|
-
const [current, velocity] = getValueState(visualElement);
|
|
1241
|
-
definition = definition(custom !== undefined ? custom : props.custom, current, velocity);
|
|
1242
|
-
}
|
|
1243
|
-
return definition;
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
/**
|
|
1247
|
-
* Creates a constant value over the lifecycle of a component.
|
|
1248
|
-
*
|
|
1249
|
-
* Even if `useMemo` is provided an empty array as its final argument, it doesn't offer
|
|
1250
|
-
* a guarantee that it won't re-run for performance reasons later on. By using `useConstant`
|
|
1251
|
-
* you can ensure that initialisers don't execute twice or more.
|
|
1252
|
-
*/
|
|
1253
|
-
function useConstant(init) {
|
|
1254
|
-
const ref = react.useRef(null);
|
|
1255
|
-
if (ref.current === null) {
|
|
1256
|
-
ref.current = init();
|
|
1257
|
-
}
|
|
1258
|
-
return ref.current;
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
|
-
/**
|
|
1262
|
-
* If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself
|
|
1263
|
-
*
|
|
1264
|
-
* TODO: Remove and move to library
|
|
1265
|
-
*/
|
|
1266
|
-
function resolveMotionValue(value) {
|
|
1267
|
-
return isMotionValue(value) ? value.get() : value;
|
|
1268
|
-
}
|
|
1269
|
-
|
|
1270
|
-
function makeState({ scrapeMotionValuesFromProps, createRenderState, }, props, context, presenceContext) {
|
|
1271
|
-
const state = {
|
|
1272
|
-
latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),
|
|
1273
|
-
renderState: createRenderState(),
|
|
1274
|
-
};
|
|
1275
|
-
return state;
|
|
1276
|
-
}
|
|
1277
|
-
const makeUseVisualState = (config) => (props, isStatic) => {
|
|
1278
|
-
const context = react.useContext(MotionContext);
|
|
1279
|
-
const presenceContext = react.useContext(PresenceContext);
|
|
1280
|
-
const make = () => makeState(config, props, context, presenceContext);
|
|
1281
|
-
return isStatic ? make() : useConstant(make);
|
|
1282
|
-
};
|
|
1283
|
-
function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
|
|
1284
|
-
const values = {};
|
|
1285
|
-
const motionValues = scrapeMotionValues(props, {});
|
|
1286
|
-
for (const key in motionValues) {
|
|
1287
|
-
values[key] = resolveMotionValue(motionValues[key]);
|
|
1288
|
-
}
|
|
1289
|
-
let { initial, animate } = props;
|
|
1290
|
-
const isControllingVariants$1 = isControllingVariants(props);
|
|
1291
|
-
const isVariantNode$1 = isVariantNode(props);
|
|
1292
|
-
if (context &&
|
|
1293
|
-
isVariantNode$1 &&
|
|
1294
|
-
!isControllingVariants$1 &&
|
|
1295
|
-
props.inherit !== false) {
|
|
1296
|
-
if (initial === undefined)
|
|
1297
|
-
initial = context.initial;
|
|
1298
|
-
if (animate === undefined)
|
|
1299
|
-
animate = context.animate;
|
|
1300
|
-
}
|
|
1301
|
-
let isInitialAnimationBlocked = presenceContext
|
|
1302
|
-
? presenceContext.initial === false
|
|
1303
|
-
: false;
|
|
1304
|
-
isInitialAnimationBlocked = isInitialAnimationBlocked || initial === false;
|
|
1305
|
-
const variantToSet = isInitialAnimationBlocked ? animate : initial;
|
|
1306
|
-
if (variantToSet &&
|
|
1307
|
-
typeof variantToSet !== "boolean" &&
|
|
1308
|
-
!isAnimationControls(variantToSet)) {
|
|
1309
|
-
const list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];
|
|
1310
|
-
for (let i = 0; i < list.length; i++) {
|
|
1311
|
-
const resolved = resolveVariantFromProps(props, list[i]);
|
|
1312
|
-
if (resolved) {
|
|
1313
|
-
const { transitionEnd, transition, ...target } = resolved;
|
|
1314
|
-
for (const key in target) {
|
|
1315
|
-
let valueTarget = target[key];
|
|
1316
|
-
if (Array.isArray(valueTarget)) {
|
|
1317
|
-
/**
|
|
1318
|
-
* Take final keyframe if the initial animation is blocked because
|
|
1319
|
-
* we want to initialise at the end of that blocked animation.
|
|
1320
|
-
*/
|
|
1321
|
-
const index = isInitialAnimationBlocked
|
|
1322
|
-
? valueTarget.length - 1
|
|
1323
|
-
: 0;
|
|
1324
|
-
valueTarget = valueTarget[index];
|
|
1325
|
-
}
|
|
1326
|
-
if (valueTarget !== null) {
|
|
1327
|
-
values[key] = valueTarget;
|
|
1328
|
-
}
|
|
1329
|
-
}
|
|
1330
|
-
for (const key in transitionEnd) {
|
|
1331
|
-
values[key] = transitionEnd[key];
|
|
1332
|
-
}
|
|
1333
|
-
}
|
|
1334
|
-
}
|
|
1335
|
-
}
|
|
1336
|
-
return values;
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
function scrapeMotionValuesFromProps$1(props, prevProps, visualElement) {
|
|
1340
|
-
const { style } = props;
|
|
1341
|
-
const newValues = {};
|
|
1342
|
-
for (const key in style) {
|
|
1343
|
-
if (isMotionValue(style[key]) ||
|
|
1344
|
-
(prevProps.style &&
|
|
1345
|
-
isMotionValue(prevProps.style[key])) ||
|
|
1346
|
-
isForcedMotionValue(key, props) ||
|
|
1347
|
-
visualElement?.getValue(key)?.liveStyle !== undefined) {
|
|
1348
|
-
newValues[key] = style[key];
|
|
1349
|
-
}
|
|
1350
|
-
}
|
|
1351
|
-
return newValues;
|
|
1352
|
-
}
|
|
1353
|
-
|
|
1354
|
-
const htmlMotionConfig = {
|
|
1355
|
-
useVisualState: makeUseVisualState({
|
|
1356
|
-
scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1,
|
|
1357
|
-
createRenderState: createHtmlRenderState,
|
|
1358
|
-
}),
|
|
1359
|
-
};
|
|
1360
|
-
|
|
1361
|
-
function scrapeMotionValuesFromProps(props, prevProps, visualElement) {
|
|
1362
|
-
const newValues = scrapeMotionValuesFromProps$1(props, prevProps, visualElement);
|
|
1363
|
-
for (const key in props) {
|
|
1364
|
-
if (isMotionValue(props[key]) ||
|
|
1365
|
-
isMotionValue(prevProps[key])) {
|
|
1366
|
-
const targetKey = transformPropOrder.indexOf(key) !== -1
|
|
1367
|
-
? "attr" + key.charAt(0).toUpperCase() + key.substring(1)
|
|
1368
|
-
: key;
|
|
1369
|
-
newValues[targetKey] = props[key];
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
return newValues;
|
|
1373
|
-
}
|
|
1374
|
-
|
|
1375
|
-
const svgMotionConfig = {
|
|
1376
|
-
useVisualState: makeUseVisualState({
|
|
1377
|
-
scrapeMotionValuesFromProps: scrapeMotionValuesFromProps,
|
|
1378
|
-
createRenderState: createSvgRenderState,
|
|
1379
|
-
}),
|
|
1380
|
-
};
|
|
1381
|
-
|
|
1382
|
-
function createMotionComponentFactory(preloadedFeatures, createVisualElement) {
|
|
1383
|
-
return function createMotionComponent(Component, { forwardMotionProps } = { forwardMotionProps: false }) {
|
|
1384
|
-
const baseConfig = isSVGComponent(Component)
|
|
1385
|
-
? svgMotionConfig
|
|
1386
|
-
: htmlMotionConfig;
|
|
1387
|
-
const config = {
|
|
1388
|
-
...baseConfig,
|
|
1389
|
-
preloadedFeatures,
|
|
1390
|
-
useRender: createUseRender(forwardMotionProps),
|
|
1391
|
-
createVisualElement,
|
|
1392
|
-
Component,
|
|
1393
|
-
};
|
|
1394
|
-
return createRendererMotionComponent(config);
|
|
1395
|
-
};
|
|
1396
|
-
}
|
|
1397
|
-
|
|
1398
|
-
const createMinimalMotionComponent =
|
|
1399
|
-
/*@__PURE__*/ createMotionComponentFactory();
|
|
1400
|
-
|
|
1401
|
-
/**
|
|
1402
|
-
* HTML components
|
|
1403
|
-
*/
|
|
1404
|
-
const MotionA = /*@__PURE__*/ createMinimalMotionComponent("a");
|
|
1405
|
-
const MotionAbbr = /*@__PURE__*/ createMinimalMotionComponent("abbr");
|
|
1406
|
-
const MotionAddress =
|
|
1407
|
-
/*@__PURE__*/ createMinimalMotionComponent("address");
|
|
1408
|
-
const MotionArea = /*@__PURE__*/ createMinimalMotionComponent("area");
|
|
1409
|
-
const MotionArticle =
|
|
1410
|
-
/*@__PURE__*/ createMinimalMotionComponent("article");
|
|
1411
|
-
const MotionAside = /*@__PURE__*/ createMinimalMotionComponent("aside");
|
|
1412
|
-
const MotionAudio = /*@__PURE__*/ createMinimalMotionComponent("audio");
|
|
1413
|
-
const MotionB = /*@__PURE__*/ createMinimalMotionComponent("b");
|
|
1414
|
-
const MotionBase = /*@__PURE__*/ createMinimalMotionComponent("base");
|
|
1415
|
-
const MotionBdi = /*@__PURE__*/ createMinimalMotionComponent("bdi");
|
|
1416
|
-
const MotionBdo = /*@__PURE__*/ createMinimalMotionComponent("bdo");
|
|
1417
|
-
const MotionBig = /*@__PURE__*/ createMinimalMotionComponent("big");
|
|
1418
|
-
const MotionBlockquote =
|
|
1419
|
-
/*@__PURE__*/ createMinimalMotionComponent("blockquote");
|
|
1420
|
-
const MotionBody = /*@__PURE__*/ createMinimalMotionComponent("body");
|
|
1421
|
-
const MotionButton = /*@__PURE__*/ createMinimalMotionComponent("button");
|
|
1422
|
-
const MotionCanvas = /*@__PURE__*/ createMinimalMotionComponent("canvas");
|
|
1423
|
-
const MotionCaption =
|
|
1424
|
-
/*@__PURE__*/ createMinimalMotionComponent("caption");
|
|
1425
|
-
const MotionCite = /*@__PURE__*/ createMinimalMotionComponent("cite");
|
|
1426
|
-
const MotionCode = /*@__PURE__*/ createMinimalMotionComponent("code");
|
|
1427
|
-
const MotionCol = /*@__PURE__*/ createMinimalMotionComponent("col");
|
|
1428
|
-
const MotionColgroup =
|
|
1429
|
-
/*@__PURE__*/ createMinimalMotionComponent("colgroup");
|
|
1430
|
-
const MotionData = /*@__PURE__*/ createMinimalMotionComponent("data");
|
|
1431
|
-
const MotionDatalist =
|
|
1432
|
-
/*@__PURE__*/ createMinimalMotionComponent("datalist");
|
|
1433
|
-
const MotionDd = /*@__PURE__*/ createMinimalMotionComponent("dd");
|
|
1434
|
-
const MotionDel = /*@__PURE__*/ createMinimalMotionComponent("del");
|
|
1435
|
-
const MotionDetails =
|
|
1436
|
-
/*@__PURE__*/ createMinimalMotionComponent("details");
|
|
1437
|
-
const MotionDfn = /*@__PURE__*/ createMinimalMotionComponent("dfn");
|
|
1438
|
-
const MotionDialog = /*@__PURE__*/ createMinimalMotionComponent("dialog");
|
|
1439
|
-
const MotionDiv = /*@__PURE__*/ createMinimalMotionComponent("div");
|
|
1440
|
-
const MotionDl = /*@__PURE__*/ createMinimalMotionComponent("dl");
|
|
1441
|
-
const MotionDt = /*@__PURE__*/ createMinimalMotionComponent("dt");
|
|
1442
|
-
const MotionEm = /*@__PURE__*/ createMinimalMotionComponent("em");
|
|
1443
|
-
const MotionEmbed = /*@__PURE__*/ createMinimalMotionComponent("embed");
|
|
1444
|
-
const MotionFieldset =
|
|
1445
|
-
/*@__PURE__*/ createMinimalMotionComponent("fieldset");
|
|
1446
|
-
const MotionFigcaption =
|
|
1447
|
-
/*@__PURE__*/ createMinimalMotionComponent("figcaption");
|
|
1448
|
-
const MotionFigure = /*@__PURE__*/ createMinimalMotionComponent("figure");
|
|
1449
|
-
const MotionFooter = /*@__PURE__*/ createMinimalMotionComponent("footer");
|
|
1450
|
-
const MotionForm = /*@__PURE__*/ createMinimalMotionComponent("form");
|
|
1451
|
-
const MotionH1 = /*@__PURE__*/ createMinimalMotionComponent("h1");
|
|
1452
|
-
const MotionH2 = /*@__PURE__*/ createMinimalMotionComponent("h2");
|
|
1453
|
-
const MotionH3 = /*@__PURE__*/ createMinimalMotionComponent("h3");
|
|
1454
|
-
const MotionH4 = /*@__PURE__*/ createMinimalMotionComponent("h4");
|
|
1455
|
-
const MotionH5 = /*@__PURE__*/ createMinimalMotionComponent("h5");
|
|
1456
|
-
const MotionH6 = /*@__PURE__*/ createMinimalMotionComponent("h6");
|
|
1457
|
-
const MotionHead = /*@__PURE__*/ createMinimalMotionComponent("head");
|
|
1458
|
-
const MotionHeader = /*@__PURE__*/ createMinimalMotionComponent("header");
|
|
1459
|
-
const MotionHgroup = /*@__PURE__*/ createMinimalMotionComponent("hgroup");
|
|
1460
|
-
const MotionHr = /*@__PURE__*/ createMinimalMotionComponent("hr");
|
|
1461
|
-
const MotionHtml = /*@__PURE__*/ createMinimalMotionComponent("html");
|
|
1462
|
-
const MotionI = /*@__PURE__*/ createMinimalMotionComponent("i");
|
|
1463
|
-
const MotionIframe = /*@__PURE__*/ createMinimalMotionComponent("iframe");
|
|
1464
|
-
const MotionImg = /*@__PURE__*/ createMinimalMotionComponent("img");
|
|
1465
|
-
const MotionInput = /*@__PURE__*/ createMinimalMotionComponent("input");
|
|
1466
|
-
const MotionIns = /*@__PURE__*/ createMinimalMotionComponent("ins");
|
|
1467
|
-
const MotionKbd = /*@__PURE__*/ createMinimalMotionComponent("kbd");
|
|
1468
|
-
const MotionKeygen = /*@__PURE__*/ createMinimalMotionComponent("keygen");
|
|
1469
|
-
const MotionLabel = /*@__PURE__*/ createMinimalMotionComponent("label");
|
|
1470
|
-
const MotionLegend = /*@__PURE__*/ createMinimalMotionComponent("legend");
|
|
1471
|
-
const MotionLi = /*@__PURE__*/ createMinimalMotionComponent("li");
|
|
1472
|
-
const MotionLink = /*@__PURE__*/ createMinimalMotionComponent("link");
|
|
1473
|
-
const MotionMain = /*@__PURE__*/ createMinimalMotionComponent("main");
|
|
1474
|
-
const MotionMap = /*@__PURE__*/ createMinimalMotionComponent("map");
|
|
1475
|
-
const MotionMark = /*@__PURE__*/ createMinimalMotionComponent("mark");
|
|
1476
|
-
const MotionMenu = /*@__PURE__*/ createMinimalMotionComponent("menu");
|
|
1477
|
-
const MotionMenuitem =
|
|
1478
|
-
/*@__PURE__*/ createMinimalMotionComponent("menuitem");
|
|
1479
|
-
const MotionMeter = /*@__PURE__*/ createMinimalMotionComponent("meter");
|
|
1480
|
-
const MotionNav = /*@__PURE__*/ createMinimalMotionComponent("nav");
|
|
1481
|
-
const MotionObject = /*@__PURE__*/ createMinimalMotionComponent("object");
|
|
1482
|
-
const MotionOl = /*@__PURE__*/ createMinimalMotionComponent("ol");
|
|
1483
|
-
const MotionOptgroup =
|
|
1484
|
-
/*@__PURE__*/ createMinimalMotionComponent("optgroup");
|
|
1485
|
-
const MotionOption = /*@__PURE__*/ createMinimalMotionComponent("option");
|
|
1486
|
-
const MotionOutput = /*@__PURE__*/ createMinimalMotionComponent("output");
|
|
1487
|
-
const MotionP = /*@__PURE__*/ createMinimalMotionComponent("p");
|
|
1488
|
-
const MotionParam = /*@__PURE__*/ createMinimalMotionComponent("param");
|
|
1489
|
-
const MotionPicture =
|
|
1490
|
-
/*@__PURE__*/ createMinimalMotionComponent("picture");
|
|
1491
|
-
const MotionPre = /*@__PURE__*/ createMinimalMotionComponent("pre");
|
|
1492
|
-
const MotionProgress =
|
|
1493
|
-
/*@__PURE__*/ createMinimalMotionComponent("progress");
|
|
1494
|
-
const MotionQ = /*@__PURE__*/ createMinimalMotionComponent("q");
|
|
1495
|
-
const MotionRp = /*@__PURE__*/ createMinimalMotionComponent("rp");
|
|
1496
|
-
const MotionRt = /*@__PURE__*/ createMinimalMotionComponent("rt");
|
|
1497
|
-
const MotionRuby = /*@__PURE__*/ createMinimalMotionComponent("ruby");
|
|
1498
|
-
const MotionS = /*@__PURE__*/ createMinimalMotionComponent("s");
|
|
1499
|
-
const MotionSamp = /*@__PURE__*/ createMinimalMotionComponent("samp");
|
|
1500
|
-
const MotionScript = /*@__PURE__*/ createMinimalMotionComponent("script");
|
|
1501
|
-
const MotionSection =
|
|
1502
|
-
/*@__PURE__*/ createMinimalMotionComponent("section");
|
|
1503
|
-
const MotionSelect = /*@__PURE__*/ createMinimalMotionComponent("select");
|
|
1504
|
-
const MotionSmall = /*@__PURE__*/ createMinimalMotionComponent("small");
|
|
1505
|
-
const MotionSource = /*@__PURE__*/ createMinimalMotionComponent("source");
|
|
1506
|
-
const MotionSpan = /*@__PURE__*/ createMinimalMotionComponent("span");
|
|
1507
|
-
const MotionStrong = /*@__PURE__*/ createMinimalMotionComponent("strong");
|
|
1508
|
-
const MotionStyle = /*@__PURE__*/ createMinimalMotionComponent("style");
|
|
1509
|
-
const MotionSub = /*@__PURE__*/ createMinimalMotionComponent("sub");
|
|
1510
|
-
const MotionSummary =
|
|
1511
|
-
/*@__PURE__*/ createMinimalMotionComponent("summary");
|
|
1512
|
-
const MotionSup = /*@__PURE__*/ createMinimalMotionComponent("sup");
|
|
1513
|
-
const MotionTable = /*@__PURE__*/ createMinimalMotionComponent("table");
|
|
1514
|
-
const MotionTbody = /*@__PURE__*/ createMinimalMotionComponent("tbody");
|
|
1515
|
-
const MotionTd = /*@__PURE__*/ createMinimalMotionComponent("td");
|
|
1516
|
-
const MotionTextarea =
|
|
1517
|
-
/*@__PURE__*/ createMinimalMotionComponent("textarea");
|
|
1518
|
-
const MotionTfoot = /*@__PURE__*/ createMinimalMotionComponent("tfoot");
|
|
1519
|
-
const MotionTh = /*@__PURE__*/ createMinimalMotionComponent("th");
|
|
1520
|
-
const MotionThead = /*@__PURE__*/ createMinimalMotionComponent("thead");
|
|
1521
|
-
const MotionTime = /*@__PURE__*/ createMinimalMotionComponent("time");
|
|
1522
|
-
const MotionTitle = /*@__PURE__*/ createMinimalMotionComponent("title");
|
|
1523
|
-
const MotionTr = /*@__PURE__*/ createMinimalMotionComponent("tr");
|
|
1524
|
-
const MotionTrack = /*@__PURE__*/ createMinimalMotionComponent("track");
|
|
1525
|
-
const MotionU = /*@__PURE__*/ createMinimalMotionComponent("u");
|
|
1526
|
-
const MotionUl = /*@__PURE__*/ createMinimalMotionComponent("ul");
|
|
1527
|
-
const MotionVideo = /*@__PURE__*/ createMinimalMotionComponent("video");
|
|
1528
|
-
const MotionWbr = /*@__PURE__*/ createMinimalMotionComponent("wbr");
|
|
1529
|
-
const MotionWebview =
|
|
1530
|
-
/*@__PURE__*/ createMinimalMotionComponent("webview");
|
|
1531
|
-
/**
|
|
1532
|
-
* SVG components
|
|
1533
|
-
*/
|
|
1534
|
-
const MotionAnimate =
|
|
1535
|
-
/*@__PURE__*/ createMinimalMotionComponent("animate");
|
|
1536
|
-
const MotionCircle = /*@__PURE__*/ createMinimalMotionComponent("circle");
|
|
1537
|
-
const MotionDefs = /*@__PURE__*/ createMinimalMotionComponent("defs");
|
|
1538
|
-
const MotionDesc = /*@__PURE__*/ createMinimalMotionComponent("desc");
|
|
1539
|
-
const MotionEllipse =
|
|
1540
|
-
/*@__PURE__*/ createMinimalMotionComponent("ellipse");
|
|
1541
|
-
const MotionG = /*@__PURE__*/ createMinimalMotionComponent("g");
|
|
1542
|
-
const MotionImage = /*@__PURE__*/ createMinimalMotionComponent("image");
|
|
1543
|
-
const MotionLine = /*@__PURE__*/ createMinimalMotionComponent("line");
|
|
1544
|
-
const MotionFilter = /*@__PURE__*/ createMinimalMotionComponent("filter");
|
|
1545
|
-
const MotionMarker = /*@__PURE__*/ createMinimalMotionComponent("marker");
|
|
1546
|
-
const MotionMask = /*@__PURE__*/ createMinimalMotionComponent("mask");
|
|
1547
|
-
const MotionMetadata =
|
|
1548
|
-
/*@__PURE__*/ createMinimalMotionComponent("metadata");
|
|
1549
|
-
const MotionPath = /*@__PURE__*/ createMinimalMotionComponent("path");
|
|
1550
|
-
const MotionPattern =
|
|
1551
|
-
/*@__PURE__*/ createMinimalMotionComponent("pattern");
|
|
1552
|
-
const MotionPolygon =
|
|
1553
|
-
/*@__PURE__*/ createMinimalMotionComponent("polygon");
|
|
1554
|
-
const MotionPolyline =
|
|
1555
|
-
/*@__PURE__*/ createMinimalMotionComponent("polyline");
|
|
1556
|
-
const MotionRect = /*@__PURE__*/ createMinimalMotionComponent("rect");
|
|
1557
|
-
const MotionStop = /*@__PURE__*/ createMinimalMotionComponent("stop");
|
|
1558
|
-
const MotionSvg = /*@__PURE__*/ createMinimalMotionComponent("svg");
|
|
1559
|
-
const MotionSymbol = /*@__PURE__*/ createMinimalMotionComponent("symbol");
|
|
1560
|
-
const MotionText = /*@__PURE__*/ createMinimalMotionComponent("text");
|
|
1561
|
-
const MotionTspan = /*@__PURE__*/ createMinimalMotionComponent("tspan");
|
|
1562
|
-
const MotionUse = /*@__PURE__*/ createMinimalMotionComponent("use");
|
|
1563
|
-
const MotionView = /*@__PURE__*/ createMinimalMotionComponent("view");
|
|
1564
|
-
const MotionClipPath =
|
|
1565
|
-
/*@__PURE__*/ createMinimalMotionComponent("clipPath");
|
|
1566
|
-
const MotionFeBlend =
|
|
1567
|
-
/*@__PURE__*/ createMinimalMotionComponent("feBlend");
|
|
1568
|
-
const MotionFeColorMatrix =
|
|
1569
|
-
/*@__PURE__*/ createMinimalMotionComponent("feColorMatrix");
|
|
1570
|
-
const MotionFeComponentTransfer =
|
|
1571
|
-
/*@__PURE__*/ createMinimalMotionComponent("feComponentTransfer");
|
|
1572
|
-
const MotionFeComposite =
|
|
1573
|
-
/*@__PURE__*/ createMinimalMotionComponent("feComposite");
|
|
1574
|
-
const MotionFeConvolveMatrix =
|
|
1575
|
-
/*@__PURE__*/ createMinimalMotionComponent("feConvolveMatrix");
|
|
1576
|
-
const MotionFeDiffuseLighting =
|
|
1577
|
-
/*@__PURE__*/ createMinimalMotionComponent("feDiffuseLighting");
|
|
1578
|
-
const MotionFeDisplacementMap =
|
|
1579
|
-
/*@__PURE__*/ createMinimalMotionComponent("feDisplacementMap");
|
|
1580
|
-
const MotionFeDistantLight =
|
|
1581
|
-
/*@__PURE__*/ createMinimalMotionComponent("feDistantLight");
|
|
1582
|
-
const MotionFeDropShadow =
|
|
1583
|
-
/*@__PURE__*/ createMinimalMotionComponent("feDropShadow");
|
|
1584
|
-
const MotionFeFlood =
|
|
1585
|
-
/*@__PURE__*/ createMinimalMotionComponent("feFlood");
|
|
1586
|
-
const MotionFeFuncA =
|
|
1587
|
-
/*@__PURE__*/ createMinimalMotionComponent("feFuncA");
|
|
1588
|
-
const MotionFeFuncB =
|
|
1589
|
-
/*@__PURE__*/ createMinimalMotionComponent("feFuncB");
|
|
1590
|
-
const MotionFeFuncG =
|
|
1591
|
-
/*@__PURE__*/ createMinimalMotionComponent("feFuncG");
|
|
1592
|
-
const MotionFeFuncR =
|
|
1593
|
-
/*@__PURE__*/ createMinimalMotionComponent("feFuncR");
|
|
1594
|
-
const MotionFeGaussianBlur =
|
|
1595
|
-
/*@__PURE__*/ createMinimalMotionComponent("feGaussianBlur");
|
|
1596
|
-
const MotionFeImage =
|
|
1597
|
-
/*@__PURE__*/ createMinimalMotionComponent("feImage");
|
|
1598
|
-
const MotionFeMerge =
|
|
1599
|
-
/*@__PURE__*/ createMinimalMotionComponent("feMerge");
|
|
1600
|
-
const MotionFeMergeNode =
|
|
1601
|
-
/*@__PURE__*/ createMinimalMotionComponent("feMergeNode");
|
|
1602
|
-
const MotionFeMorphology =
|
|
1603
|
-
/*@__PURE__*/ createMinimalMotionComponent("feMorphology");
|
|
1604
|
-
const MotionFeOffset =
|
|
1605
|
-
/*@__PURE__*/ createMinimalMotionComponent("feOffset");
|
|
1606
|
-
const MotionFePointLight =
|
|
1607
|
-
/*@__PURE__*/ createMinimalMotionComponent("fePointLight");
|
|
1608
|
-
const MotionFeSpecularLighting =
|
|
1609
|
-
/*@__PURE__*/ createMinimalMotionComponent("feSpecularLighting");
|
|
1610
|
-
const MotionFeSpotLight =
|
|
1611
|
-
/*@__PURE__*/ createMinimalMotionComponent("feSpotLight");
|
|
1612
|
-
const MotionFeTile = /*@__PURE__*/ createMinimalMotionComponent("feTile");
|
|
1613
|
-
const MotionFeTurbulence =
|
|
1614
|
-
/*@__PURE__*/ createMinimalMotionComponent("feTurbulence");
|
|
1615
|
-
const MotionForeignObject =
|
|
1616
|
-
/*@__PURE__*/ createMinimalMotionComponent("foreignObject");
|
|
1617
|
-
const MotionLinearGradient =
|
|
1618
|
-
/*@__PURE__*/ createMinimalMotionComponent("linearGradient");
|
|
1619
|
-
const MotionRadialGradient =
|
|
1620
|
-
/*@__PURE__*/ createMinimalMotionComponent("radialGradient");
|
|
1621
|
-
const MotionTextPath =
|
|
1622
|
-
/*@__PURE__*/ createMinimalMotionComponent("textPath");
|
|
1623
|
-
|
|
1624
|
-
exports.a = MotionA;
|
|
1625
|
-
exports.abbr = MotionAbbr;
|
|
1626
|
-
exports.address = MotionAddress;
|
|
1627
|
-
exports.animate = MotionAnimate;
|
|
1628
|
-
exports.area = MotionArea;
|
|
1629
|
-
exports.article = MotionArticle;
|
|
1630
|
-
exports.aside = MotionAside;
|
|
1631
|
-
exports.audio = MotionAudio;
|
|
1632
|
-
exports.b = MotionB;
|
|
1633
|
-
exports.base = MotionBase;
|
|
1634
|
-
exports.bdi = MotionBdi;
|
|
1635
|
-
exports.bdo = MotionBdo;
|
|
1636
|
-
exports.big = MotionBig;
|
|
1637
|
-
exports.blockquote = MotionBlockquote;
|
|
1638
|
-
exports.body = MotionBody;
|
|
1639
|
-
exports.button = MotionButton;
|
|
1640
|
-
exports.canvas = MotionCanvas;
|
|
1641
|
-
exports.caption = MotionCaption;
|
|
1642
|
-
exports.circle = MotionCircle;
|
|
1643
|
-
exports.cite = MotionCite;
|
|
1644
|
-
exports.clipPath = MotionClipPath;
|
|
1645
|
-
exports.code = MotionCode;
|
|
1646
|
-
exports.col = MotionCol;
|
|
1647
|
-
exports.colgroup = MotionColgroup;
|
|
1648
|
-
exports.create = createMinimalMotionComponent;
|
|
1649
|
-
exports.data = MotionData;
|
|
1650
|
-
exports.datalist = MotionDatalist;
|
|
1651
|
-
exports.dd = MotionDd;
|
|
1652
|
-
exports.defs = MotionDefs;
|
|
1653
|
-
exports.del = MotionDel;
|
|
1654
|
-
exports.desc = MotionDesc;
|
|
1655
|
-
exports.details = MotionDetails;
|
|
1656
|
-
exports.dfn = MotionDfn;
|
|
1657
|
-
exports.dialog = MotionDialog;
|
|
1658
|
-
exports.div = MotionDiv;
|
|
1659
|
-
exports.dl = MotionDl;
|
|
1660
|
-
exports.dt = MotionDt;
|
|
1661
|
-
exports.ellipse = MotionEllipse;
|
|
1662
|
-
exports.em = MotionEm;
|
|
1663
|
-
exports.embed = MotionEmbed;
|
|
1664
|
-
exports.feBlend = MotionFeBlend;
|
|
1665
|
-
exports.feColorMatrix = MotionFeColorMatrix;
|
|
1666
|
-
exports.feComponentTransfer = MotionFeComponentTransfer;
|
|
1667
|
-
exports.feComposite = MotionFeComposite;
|
|
1668
|
-
exports.feConvolveMatrix = MotionFeConvolveMatrix;
|
|
1669
|
-
exports.feDiffuseLighting = MotionFeDiffuseLighting;
|
|
1670
|
-
exports.feDisplacementMap = MotionFeDisplacementMap;
|
|
1671
|
-
exports.feDistantLight = MotionFeDistantLight;
|
|
1672
|
-
exports.feDropShadow = MotionFeDropShadow;
|
|
1673
|
-
exports.feFlood = MotionFeFlood;
|
|
1674
|
-
exports.feFuncA = MotionFeFuncA;
|
|
1675
|
-
exports.feFuncB = MotionFeFuncB;
|
|
1676
|
-
exports.feFuncG = MotionFeFuncG;
|
|
1677
|
-
exports.feFuncR = MotionFeFuncR;
|
|
1678
|
-
exports.feGaussianBlur = MotionFeGaussianBlur;
|
|
1679
|
-
exports.feImage = MotionFeImage;
|
|
1680
|
-
exports.feMerge = MotionFeMerge;
|
|
1681
|
-
exports.feMergeNode = MotionFeMergeNode;
|
|
1682
|
-
exports.feMorphology = MotionFeMorphology;
|
|
1683
|
-
exports.feOffset = MotionFeOffset;
|
|
1684
|
-
exports.fePointLight = MotionFePointLight;
|
|
1685
|
-
exports.feSpecularLighting = MotionFeSpecularLighting;
|
|
1686
|
-
exports.feSpotLight = MotionFeSpotLight;
|
|
1687
|
-
exports.feTile = MotionFeTile;
|
|
1688
|
-
exports.feTurbulence = MotionFeTurbulence;
|
|
1689
|
-
exports.fieldset = MotionFieldset;
|
|
1690
|
-
exports.figcaption = MotionFigcaption;
|
|
1691
|
-
exports.figure = MotionFigure;
|
|
1692
|
-
exports.filter = MotionFilter;
|
|
1693
|
-
exports.footer = MotionFooter;
|
|
1694
|
-
exports.foreignObject = MotionForeignObject;
|
|
1695
|
-
exports.form = MotionForm;
|
|
1696
|
-
exports.g = MotionG;
|
|
1697
|
-
exports.h1 = MotionH1;
|
|
1698
|
-
exports.h2 = MotionH2;
|
|
1699
|
-
exports.h3 = MotionH3;
|
|
1700
|
-
exports.h4 = MotionH4;
|
|
1701
|
-
exports.h5 = MotionH5;
|
|
1702
|
-
exports.h6 = MotionH6;
|
|
1703
|
-
exports.head = MotionHead;
|
|
1704
|
-
exports.header = MotionHeader;
|
|
1705
|
-
exports.hgroup = MotionHgroup;
|
|
1706
|
-
exports.hr = MotionHr;
|
|
1707
|
-
exports.html = MotionHtml;
|
|
1708
|
-
exports.i = MotionI;
|
|
1709
|
-
exports.iframe = MotionIframe;
|
|
1710
|
-
exports.image = MotionImage;
|
|
1711
|
-
exports.img = MotionImg;
|
|
1712
|
-
exports.input = MotionInput;
|
|
1713
|
-
exports.ins = MotionIns;
|
|
1714
|
-
exports.kbd = MotionKbd;
|
|
1715
|
-
exports.keygen = MotionKeygen;
|
|
1716
|
-
exports.label = MotionLabel;
|
|
1717
|
-
exports.legend = MotionLegend;
|
|
1718
|
-
exports.li = MotionLi;
|
|
1719
|
-
exports.line = MotionLine;
|
|
1720
|
-
exports.linearGradient = MotionLinearGradient;
|
|
1721
|
-
exports.link = MotionLink;
|
|
1722
|
-
exports.main = MotionMain;
|
|
1723
|
-
exports.map = MotionMap;
|
|
1724
|
-
exports.mark = MotionMark;
|
|
1725
|
-
exports.marker = MotionMarker;
|
|
1726
|
-
exports.mask = MotionMask;
|
|
1727
|
-
exports.menu = MotionMenu;
|
|
1728
|
-
exports.menuitem = MotionMenuitem;
|
|
1729
|
-
exports.metadata = MotionMetadata;
|
|
1730
|
-
exports.meter = MotionMeter;
|
|
1731
|
-
exports.nav = MotionNav;
|
|
1732
|
-
exports.object = MotionObject;
|
|
1733
|
-
exports.ol = MotionOl;
|
|
1734
|
-
exports.optgroup = MotionOptgroup;
|
|
1735
|
-
exports.option = MotionOption;
|
|
1736
|
-
exports.output = MotionOutput;
|
|
1737
|
-
exports.p = MotionP;
|
|
1738
|
-
exports.param = MotionParam;
|
|
1739
|
-
exports.path = MotionPath;
|
|
1740
|
-
exports.pattern = MotionPattern;
|
|
1741
|
-
exports.picture = MotionPicture;
|
|
1742
|
-
exports.polygon = MotionPolygon;
|
|
1743
|
-
exports.polyline = MotionPolyline;
|
|
1744
|
-
exports.pre = MotionPre;
|
|
1745
|
-
exports.progress = MotionProgress;
|
|
1746
|
-
exports.q = MotionQ;
|
|
1747
|
-
exports.radialGradient = MotionRadialGradient;
|
|
1748
|
-
exports.rect = MotionRect;
|
|
1749
|
-
exports.rp = MotionRp;
|
|
1750
|
-
exports.rt = MotionRt;
|
|
1751
|
-
exports.ruby = MotionRuby;
|
|
1752
|
-
exports.s = MotionS;
|
|
1753
|
-
exports.samp = MotionSamp;
|
|
1754
|
-
exports.script = MotionScript;
|
|
1755
|
-
exports.section = MotionSection;
|
|
1756
|
-
exports.select = MotionSelect;
|
|
1757
|
-
exports.small = MotionSmall;
|
|
1758
|
-
exports.source = MotionSource;
|
|
1759
|
-
exports.span = MotionSpan;
|
|
1760
|
-
exports.stop = MotionStop;
|
|
1761
|
-
exports.strong = MotionStrong;
|
|
1762
|
-
exports.style = MotionStyle;
|
|
1763
|
-
exports.sub = MotionSub;
|
|
1764
|
-
exports.summary = MotionSummary;
|
|
1765
|
-
exports.sup = MotionSup;
|
|
1766
|
-
exports.svg = MotionSvg;
|
|
1767
|
-
exports.symbol = MotionSymbol;
|
|
1768
|
-
exports.table = MotionTable;
|
|
1769
|
-
exports.tbody = MotionTbody;
|
|
1770
|
-
exports.td = MotionTd;
|
|
1771
|
-
exports.text = MotionText;
|
|
1772
|
-
exports.textPath = MotionTextPath;
|
|
1773
|
-
exports.textarea = MotionTextarea;
|
|
1774
|
-
exports.tfoot = MotionTfoot;
|
|
1775
|
-
exports.th = MotionTh;
|
|
1776
|
-
exports.thead = MotionThead;
|
|
1777
|
-
exports.time = MotionTime;
|
|
1778
|
-
exports.title = MotionTitle;
|
|
1779
|
-
exports.tr = MotionTr;
|
|
1780
|
-
exports.track = MotionTrack;
|
|
1781
|
-
exports.tspan = MotionTspan;
|
|
1782
|
-
exports.u = MotionU;
|
|
1783
|
-
exports.ul = MotionUl;
|
|
1784
|
-
exports.use = MotionUse;
|
|
1785
|
-
exports.video = MotionVideo;
|
|
1786
|
-
exports.view = MotionView;
|
|
1787
|
-
exports.wbr = MotionWbr;
|
|
1788
|
-
exports.webview = MotionWebview;
|