motion 11.14.4 → 11.16.0
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/README.md +3 -19
- package/dist/cjs/index.js +1795 -1724
- package/dist/cjs/mini.js +215 -185
- package/dist/cjs/react-client.js +3713 -3699
- package/dist/cjs/react-m.js +3 -2
- package/dist/cjs/react-mini.js +215 -185
- package/dist/es/framer-motion/dist/es/animation/animate/index.mjs +2 -1
- package/dist/es/framer-motion/dist/es/animation/animate/resolve-subjects.mjs +1 -0
- package/dist/es/framer-motion/dist/es/animation/animate/single-value.mjs +1 -1
- package/dist/es/framer-motion/dist/es/animation/animators/AcceleratedAnimation.mjs +7 -7
- package/dist/es/framer-motion/dist/es/animation/animators/MainThreadAnimation.mjs +8 -8
- package/dist/es/framer-motion/dist/es/animation/animators/utils/can-animate.mjs +1 -1
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/NativeAnimation.mjs +26 -89
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-elements.mjs +3 -3
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/animate-style.mjs +2 -1
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/index.mjs +2 -1
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/supports-partial-keyframes.mjs +2 -1
- package/dist/es/framer-motion/dist/es/animation/animators/waapi/utils/supports-waapi.mjs +2 -1
- package/dist/es/framer-motion/dist/es/animation/generators/spring/find.mjs +1 -1
- package/dist/es/framer-motion/dist/es/animation/generators/spring/index.mjs +9 -6
- package/dist/es/framer-motion/dist/es/animation/interfaces/motion-value.mjs +7 -6
- package/dist/es/framer-motion/dist/es/animation/interfaces/visual-element-target.mjs +4 -3
- package/dist/es/framer-motion/dist/es/animation/sequence/create.mjs +32 -6
- package/dist/es/framer-motion/dist/es/animation/sequence/utils/calc-repeat-duration.mjs +5 -0
- package/dist/es/framer-motion/dist/es/animation/sequence/utils/normalize-times.mjs +13 -0
- package/dist/es/framer-motion/dist/es/easing/utils/map.mjs +4 -4
- package/dist/es/framer-motion/dist/es/events/event-info.mjs +1 -0
- package/dist/es/framer-motion/dist/es/frameloop/render-step.mjs +3 -2
- package/dist/es/framer-motion/dist/es/gestures/drag/utils/constraints.mjs +2 -1
- package/dist/es/framer-motion/dist/es/gestures/hover.mjs +1 -0
- package/dist/es/framer-motion/dist/es/gestures/pan/PanSession.mjs +5 -4
- package/dist/es/framer-motion/dist/es/gestures/press.mjs +1 -0
- package/dist/es/framer-motion/dist/es/projection/animation/mix-values.mjs +3 -3
- package/dist/es/framer-motion/dist/es/projection/node/create-projection-node.mjs +15 -15
- package/dist/es/framer-motion/dist/es/render/dom/resize/handle-element.mjs +1 -0
- package/dist/es/framer-motion/dist/es/render/dom/scroll/index.mjs +3 -3
- package/dist/es/framer-motion/dist/es/render/dom/scroll/info.mjs +2 -1
- package/dist/es/framer-motion/dist/es/render/dom/viewport/index.mjs +1 -0
- package/dist/es/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/framer-motion/dist/es/utils/delay.mjs +2 -1
- package/dist/es/framer-motion/dist/es/utils/interpolate.mjs +3 -3
- package/dist/es/framer-motion/dist/es/utils/offsets/fill.mjs +2 -1
- package/dist/es/framer-motion/dist/es/value/index.mjs +2 -2
- package/dist/es/framer-motion/dist/es/value/use-spring.mjs +3 -3
- package/dist/es/motion/lib/index.mjs +8 -8
- package/dist/es/motion/lib/react.mjs +8 -8
- package/dist/es/{framer-motion/dist/es/animation/GroupPlaybackControls.mjs → motion-dom/dist/es/animation/controls/BaseGroup.mjs} +6 -5
- package/dist/es/motion-dom/dist/es/animation/controls/Group.mjs +13 -0
- package/dist/es/{framer-motion/dist/es/easing → motion-dom/dist/es/animation/generators}/utils/create-generator-easing.mjs +6 -3
- package/dist/es/motion-dom/dist/es/animation/waapi/NativeAnimationControls.mjs +85 -0
- package/dist/es/{framer-motion/dist/es/animation/animators/waapi → motion-dom/dist/es/animation/waapi/utils}/easing.mjs +3 -3
- package/dist/es/{framer-motion/dist/es/animation/animators → motion-dom/dist/es/animation}/waapi/utils/linear.mjs +2 -1
- package/dist/es/{framer-motion/dist/es/animation/animators/waapi/utils/supports-linear-easing.mjs → motion-dom/dist/es/utils/supports/linear-easing.mjs} +1 -1
- package/dist/es/{framer-motion/dist/es/animation/animators/waapi/utils/memo-supports.mjs → motion-dom/dist/es/utils/supports/memo.mjs} +3 -2
- package/dist/es/motion-dom/dist/es/utils/supports/scroll-timeline.mjs +6 -0
- package/dist/motion.dev.js +1795 -1724
- package/dist/motion.js +1 -1
- package/package.json +3 -3
- package/dist/es/framer-motion/dist/es/render/dom/scroll/supports.mjs +0 -5
- /package/dist/es/{framer-motion → motion-dom}/dist/es/animation/generators/utils/calc-duration.mjs +0 -0
- /package/dist/es/{framer-motion → motion-dom}/dist/es/animation/generators/utils/is-generator.mjs +0 -0
- /package/dist/es/{framer-motion → motion-dom}/dist/es/animation/utils/get-value-transition.mjs +0 -0
- /package/dist/es/{framer-motion/dist/es/animation/animators → motion-dom/dist/es/animation}/waapi/utils/attach-timeline.mjs +0 -0
- /package/dist/es/{framer-motion/dist/es/easing → motion-dom/dist/es}/utils/is-bezier-definition.mjs +0 -0
- /package/dist/es/{framer-motion/dist/es/animation/animators/waapi/utils/supports-flags.mjs → motion-dom/dist/es/utils/supports/flags.mjs} +0 -0
- /package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/memo.mjs +0 -0
- /package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/progress.mjs +0 -0
- /package/dist/es/{framer-motion/dist/es/utils → motion-utils/dist/es}/time-conversion.mjs +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useContext, useRef, useInsertionEffect } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { useMotionValue } from './use-motion-value.mjs';
|
|
2
|
+
import { animateValue } from '../animation/animators/MainThreadAnimation.mjs';
|
|
4
3
|
import { MotionConfigContext } from '../context/MotionConfigContext.mjs';
|
|
5
4
|
import { useIsomorphicLayoutEffect } from '../utils/use-isomorphic-effect.mjs';
|
|
6
|
-
import {
|
|
5
|
+
import { useMotionValue } from './use-motion-value.mjs';
|
|
6
|
+
import { isMotionValue } from './utils/is-motion-value.mjs';
|
|
7
7
|
import { frame, frameData } from '../frameloop/frame.mjs';
|
|
8
8
|
|
|
9
9
|
function toNumber(v) {
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
+
export { isDragActive } from '../../motion-dom/dist/es/gestures/drag/state/is-active.mjs';
|
|
1
2
|
export { invariant } from '../../motion-utils/dist/es/errors.mjs';
|
|
2
3
|
export { noop } from '../../motion-utils/dist/es/noop.mjs';
|
|
3
|
-
export {
|
|
4
|
-
export { MotionValue, motionValue } from '../../framer-motion/dist/es/value/index.mjs';
|
|
4
|
+
export { progress } from '../../motion-utils/dist/es/progress.mjs';
|
|
5
5
|
export { animate, createScopedAnimate } from '../../framer-motion/dist/es/animation/animate/index.mjs';
|
|
6
6
|
export { animateMini } from '../../framer-motion/dist/es/animation/animators/waapi/animate-style.mjs';
|
|
7
7
|
export { scroll } from '../../framer-motion/dist/es/render/dom/scroll/index.mjs';
|
|
8
8
|
export { scrollInfo } from '../../framer-motion/dist/es/render/dom/scroll/track.mjs';
|
|
9
9
|
export { inView } from '../../framer-motion/dist/es/render/dom/viewport/index.mjs';
|
|
10
|
+
export { MotionValue, motionValue } from '../../framer-motion/dist/es/value/index.mjs';
|
|
10
11
|
export { anticipate } from '../../framer-motion/dist/es/easing/anticipate.mjs';
|
|
11
12
|
export { backIn, backInOut, backOut } from '../../framer-motion/dist/es/easing/back.mjs';
|
|
12
13
|
export { circIn, circInOut, circOut } from '../../framer-motion/dist/es/easing/circ.mjs';
|
|
13
|
-
export { easeIn, easeInOut, easeOut } from '../../framer-motion/dist/es/easing/ease.mjs';
|
|
14
14
|
export { cubicBezier } from '../../framer-motion/dist/es/easing/cubic-bezier.mjs';
|
|
15
|
-
export {
|
|
15
|
+
export { easeIn, easeInOut, easeOut } from '../../framer-motion/dist/es/easing/ease.mjs';
|
|
16
16
|
export { mirrorEasing } from '../../framer-motion/dist/es/easing/modifiers/mirror.mjs';
|
|
17
17
|
export { reverseEasing } from '../../framer-motion/dist/es/easing/modifiers/reverse.mjs';
|
|
18
|
-
export {
|
|
18
|
+
export { steps } from '../../framer-motion/dist/es/easing/steps.mjs';
|
|
19
19
|
export { inertia } from '../../framer-motion/dist/es/animation/generators/inertia.mjs';
|
|
20
20
|
export { keyframes } from '../../framer-motion/dist/es/animation/generators/keyframes.mjs';
|
|
21
|
+
export { spring } from '../../framer-motion/dist/es/animation/generators/spring/index.mjs';
|
|
21
22
|
export { stagger } from '../../framer-motion/dist/es/animation/utils/stagger.mjs';
|
|
22
|
-
export {
|
|
23
|
+
export { time } from '../../framer-motion/dist/es/frameloop/sync-time.mjs';
|
|
23
24
|
export { clamp } from '../../framer-motion/dist/es/utils/clamp.mjs';
|
|
24
25
|
export { delayInSeconds as delay } from '../../framer-motion/dist/es/utils/delay.mjs';
|
|
25
26
|
export { distance, distance2D } from '../../framer-motion/dist/es/utils/distance.mjs';
|
|
26
27
|
export { interpolate } from '../../framer-motion/dist/es/utils/interpolate.mjs';
|
|
27
28
|
export { mix } from '../../framer-motion/dist/es/utils/mix/index.mjs';
|
|
28
29
|
export { pipe } from '../../framer-motion/dist/es/utils/pipe.mjs';
|
|
29
|
-
export {
|
|
30
|
+
export { transform } from '../../framer-motion/dist/es/utils/transform.mjs';
|
|
30
31
|
export { wrap } from '../../framer-motion/dist/es/utils/wrap.mjs';
|
|
31
|
-
export { time } from '../../framer-motion/dist/es/frameloop/sync-time.mjs';
|
|
32
32
|
export { cancelSync, sync } from '../../framer-motion/dist/es/frameloop/index-legacy.mjs';
|
|
33
33
|
export { cancelFrame, frame, frameData, frameSteps } from '../../framer-motion/dist/es/frameloop/frame.mjs';
|
|
@@ -65,37 +65,37 @@ export { useAnimatedState as useDeprecatedAnimatedState } from '../../framer-mot
|
|
|
65
65
|
export { useInvertedScale as useDeprecatedInvertedScale } from '../../framer-motion/dist/es/value/use-inverted-scale.mjs';
|
|
66
66
|
export { AnimateSharedLayout } from '../../framer-motion/dist/es/components/AnimateSharedLayout.mjs';
|
|
67
67
|
export { delay } from '../../framer-motion/dist/es/utils/delay.mjs';
|
|
68
|
+
export { isDragActive } from '../../motion-dom/dist/es/gestures/drag/state/is-active.mjs';
|
|
68
69
|
export { invariant } from '../../motion-utils/dist/es/errors.mjs';
|
|
69
70
|
export { noop } from '../../motion-utils/dist/es/noop.mjs';
|
|
70
|
-
export {
|
|
71
|
-
export { MotionValue, motionValue } from '../../framer-motion/dist/es/value/index.mjs';
|
|
71
|
+
export { progress } from '../../motion-utils/dist/es/progress.mjs';
|
|
72
72
|
export { animate, createScopedAnimate } from '../../framer-motion/dist/es/animation/animate/index.mjs';
|
|
73
73
|
export { animateMini } from '../../framer-motion/dist/es/animation/animators/waapi/animate-style.mjs';
|
|
74
74
|
export { scroll } from '../../framer-motion/dist/es/render/dom/scroll/index.mjs';
|
|
75
75
|
export { scrollInfo } from '../../framer-motion/dist/es/render/dom/scroll/track.mjs';
|
|
76
76
|
export { inView } from '../../framer-motion/dist/es/render/dom/viewport/index.mjs';
|
|
77
|
+
export { MotionValue, motionValue } from '../../framer-motion/dist/es/value/index.mjs';
|
|
77
78
|
export { inertia } from '../../framer-motion/dist/es/animation/generators/inertia.mjs';
|
|
78
79
|
export { keyframes } from '../../framer-motion/dist/es/animation/generators/keyframes.mjs';
|
|
79
80
|
export { stagger } from '../../framer-motion/dist/es/animation/utils/stagger.mjs';
|
|
80
|
-
export {
|
|
81
|
+
export { time } from '../../framer-motion/dist/es/frameloop/sync-time.mjs';
|
|
81
82
|
export { clamp } from '../../framer-motion/dist/es/utils/clamp.mjs';
|
|
82
83
|
export { mix } from '../../framer-motion/dist/es/utils/mix/index.mjs';
|
|
83
84
|
export { pipe } from '../../framer-motion/dist/es/utils/pipe.mjs';
|
|
84
|
-
export {
|
|
85
|
+
export { transform } from '../../framer-motion/dist/es/utils/transform.mjs';
|
|
85
86
|
export { wrap } from '../../framer-motion/dist/es/utils/wrap.mjs';
|
|
86
|
-
export { time } from '../../framer-motion/dist/es/frameloop/sync-time.mjs';
|
|
87
87
|
export { cancelSync, sync } from '../../framer-motion/dist/es/frameloop/index-legacy.mjs';
|
|
88
88
|
export { anticipate } from '../../framer-motion/dist/es/easing/anticipate.mjs';
|
|
89
89
|
export { backIn, backInOut, backOut } from '../../framer-motion/dist/es/easing/back.mjs';
|
|
90
90
|
export { circIn, circInOut, circOut } from '../../framer-motion/dist/es/easing/circ.mjs';
|
|
91
|
-
export { easeIn, easeInOut, easeOut } from '../../framer-motion/dist/es/easing/ease.mjs';
|
|
92
91
|
export { cubicBezier } from '../../framer-motion/dist/es/easing/cubic-bezier.mjs';
|
|
93
|
-
export {
|
|
92
|
+
export { easeIn, easeInOut, easeOut } from '../../framer-motion/dist/es/easing/ease.mjs';
|
|
94
93
|
export { mirrorEasing } from '../../framer-motion/dist/es/easing/modifiers/mirror.mjs';
|
|
95
94
|
export { reverseEasing } from '../../framer-motion/dist/es/easing/modifiers/reverse.mjs';
|
|
95
|
+
export { steps } from '../../framer-motion/dist/es/easing/steps.mjs';
|
|
96
|
+
export { cancelFrame, frame, frameData, frameSteps } from '../../framer-motion/dist/es/frameloop/frame.mjs';
|
|
96
97
|
export { distance, distance2D } from '../../framer-motion/dist/es/utils/distance.mjs';
|
|
97
98
|
export { interpolate } from '../../framer-motion/dist/es/utils/interpolate.mjs';
|
|
98
|
-
export { cancelFrame, frame, frameData, frameSteps } from '../../framer-motion/dist/es/frameloop/frame.mjs';
|
|
99
99
|
export { animations } from '../../framer-motion/dist/es/motion/features/animations.mjs';
|
|
100
100
|
export { createBox } from '../../framer-motion/dist/es/projection/geometry/models.mjs';
|
|
101
101
|
export { calcLength } from '../../framer-motion/dist/es/projection/geometry/delta-calc.mjs';
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { supportsScrollTimeline } from '
|
|
1
|
+
import { supportsScrollTimeline } from '../../utils/supports/scroll-timeline.mjs';
|
|
2
2
|
|
|
3
|
-
class
|
|
3
|
+
class BaseGroupPlaybackControls {
|
|
4
4
|
constructor(animations) {
|
|
5
5
|
// Bound to accomodate common `return animation.stop` pattern
|
|
6
6
|
this.stop = () => this.runAll("stop");
|
|
7
7
|
this.animations = animations.filter(Boolean);
|
|
8
8
|
}
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
get finished() {
|
|
10
|
+
// Support for new finished Promise and legacy thennable API
|
|
11
|
+
return Promise.all(this.animations.map((animation) => "finished" in animation ? animation.finished : animation));
|
|
11
12
|
}
|
|
12
13
|
/**
|
|
13
14
|
* TODO: Filter out cancelled or stopped animations before returning
|
|
@@ -78,4 +79,4 @@ class GroupPlaybackControls {
|
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
|
|
81
|
-
export {
|
|
82
|
+
export { BaseGroupPlaybackControls };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BaseGroupPlaybackControls } from './BaseGroup.mjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* TODO: This is a temporary class to support the legacy
|
|
5
|
+
* thennable API
|
|
6
|
+
*/
|
|
7
|
+
class GroupPlaybackControls extends BaseGroupPlaybackControls {
|
|
8
|
+
then(onResolve, onReject) {
|
|
9
|
+
return Promise.all(this.animations).then(onResolve).catch(onReject);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { GroupPlaybackControls };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { millisecondsToSeconds } from '
|
|
1
|
+
import '../../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
|
+
import { millisecondsToSeconds } from '../../../../../../motion-utils/dist/es/time-conversion.mjs';
|
|
3
|
+
import { calcGeneratorDuration, maxGeneratorDuration } from './calc-duration.mjs';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Create a progress => progress easing function from a generator.
|
|
@@ -9,7 +10,9 @@ function createGeneratorEasing(options, scale = 100, createGenerator) {
|
|
|
9
10
|
const duration = Math.min(calcGeneratorDuration(generator), maxGeneratorDuration);
|
|
10
11
|
return {
|
|
11
12
|
type: "keyframes",
|
|
12
|
-
ease: (progress) =>
|
|
13
|
+
ease: (progress) => {
|
|
14
|
+
return generator.next(duration * progress).value / scale;
|
|
15
|
+
},
|
|
13
16
|
duration: millisecondsToSeconds(duration),
|
|
14
17
|
};
|
|
15
18
|
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
|
+
import { noop } from '../../../../../motion-utils/dist/es/noop.mjs';
|
|
3
|
+
import { millisecondsToSeconds, secondsToMilliseconds } from '../../../../../motion-utils/dist/es/time-conversion.mjs';
|
|
4
|
+
import { attachTimeline } from './utils/attach-timeline.mjs';
|
|
5
|
+
|
|
6
|
+
class NativeAnimationControls {
|
|
7
|
+
constructor(animation) {
|
|
8
|
+
this.animation = animation;
|
|
9
|
+
}
|
|
10
|
+
get duration() {
|
|
11
|
+
var _a, _b, _c;
|
|
12
|
+
const durationInMs = ((_b = (_a = this.animation) === null || _a === void 0 ? void 0 : _a.effect) === null || _b === void 0 ? void 0 : _b.getComputedTiming().duration) ||
|
|
13
|
+
((_c = this.options) === null || _c === void 0 ? void 0 : _c.duration) ||
|
|
14
|
+
300;
|
|
15
|
+
return millisecondsToSeconds(Number(durationInMs));
|
|
16
|
+
}
|
|
17
|
+
get time() {
|
|
18
|
+
var _a;
|
|
19
|
+
if (this.animation) {
|
|
20
|
+
return millisecondsToSeconds(((_a = this.animation) === null || _a === void 0 ? void 0 : _a.currentTime) || 0);
|
|
21
|
+
}
|
|
22
|
+
return 0;
|
|
23
|
+
}
|
|
24
|
+
set time(newTime) {
|
|
25
|
+
if (this.animation) {
|
|
26
|
+
this.animation.currentTime = secondsToMilliseconds(newTime);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
get speed() {
|
|
30
|
+
return this.animation ? this.animation.playbackRate : 1;
|
|
31
|
+
}
|
|
32
|
+
set speed(newSpeed) {
|
|
33
|
+
if (this.animation) {
|
|
34
|
+
this.animation.playbackRate = newSpeed;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
get state() {
|
|
38
|
+
return this.animation ? this.animation.playState : "finished";
|
|
39
|
+
}
|
|
40
|
+
get startTime() {
|
|
41
|
+
return this.animation ? this.animation.startTime : null;
|
|
42
|
+
}
|
|
43
|
+
get finished() {
|
|
44
|
+
return this.animation ? this.animation.finished : Promise.resolve();
|
|
45
|
+
}
|
|
46
|
+
play() {
|
|
47
|
+
this.animation && this.animation.play();
|
|
48
|
+
}
|
|
49
|
+
pause() {
|
|
50
|
+
this.animation && this.animation.pause();
|
|
51
|
+
}
|
|
52
|
+
stop() {
|
|
53
|
+
if (!this.animation ||
|
|
54
|
+
this.state === "idle" ||
|
|
55
|
+
this.state === "finished") {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (this.animation.commitStyles) {
|
|
59
|
+
this.animation.commitStyles();
|
|
60
|
+
}
|
|
61
|
+
this.cancel();
|
|
62
|
+
}
|
|
63
|
+
flatten() {
|
|
64
|
+
var _a;
|
|
65
|
+
if (!this.animation)
|
|
66
|
+
return;
|
|
67
|
+
(_a = this.animation.effect) === null || _a === void 0 ? void 0 : _a.updateTiming({ easing: "linear" });
|
|
68
|
+
}
|
|
69
|
+
attachTimeline(timeline) {
|
|
70
|
+
if (this.animation)
|
|
71
|
+
attachTimeline(this.animation, timeline);
|
|
72
|
+
return noop;
|
|
73
|
+
}
|
|
74
|
+
complete() {
|
|
75
|
+
this.animation && this.animation.finish();
|
|
76
|
+
}
|
|
77
|
+
cancel() {
|
|
78
|
+
try {
|
|
79
|
+
this.animation && this.animation.cancel();
|
|
80
|
+
}
|
|
81
|
+
catch (e) { }
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export { NativeAnimationControls };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { isBezierDefinition } from '../../../
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { isBezierDefinition } from '../../../utils/is-bezier-definition.mjs';
|
|
2
|
+
import { supportsLinearEasing } from '../../../utils/supports/linear-easing.mjs';
|
|
3
|
+
import { generateLinearEasing } from './linear.mjs';
|
|
4
4
|
|
|
5
5
|
function isWaapiSupportedEasing(easing) {
|
|
6
6
|
return Boolean((typeof easing === "function" && supportsLinearEasing()) ||
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import '../../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
|
+
import { progress } from '../../../../../../motion-utils/dist/es/progress.mjs';
|
|
2
3
|
|
|
3
4
|
const generateLinearEasing = (easing, duration, // as milliseconds
|
|
4
5
|
resolution = 10 // as milliseconds
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import '../../../../../motion-utils/dist/es/errors.mjs';
|
|
2
|
+
import { memo } from '../../../../../motion-utils/dist/es/memo.mjs';
|
|
3
|
+
import { supportsFlags } from './flags.mjs';
|
|
3
4
|
|
|
4
5
|
function memoSupports(callback, supportsFlag) {
|
|
5
6
|
const memoized = memo(callback);
|