framer-motion 7.0.3 → 7.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/dist/cjs/index.js +2090 -2304
  2. package/dist/es/animation/animate.mjs +4 -5
  3. package/dist/es/animation/animation-controls.mjs +22 -24
  4. package/dist/es/animation/use-animated-state.mjs +23 -25
  5. package/dist/es/animation/use-animation.mjs +2 -2
  6. package/dist/es/animation/utils/default-transitions.mjs +13 -14
  7. package/dist/es/animation/utils/easing.mjs +20 -21
  8. package/dist/es/animation/utils/is-animatable.mjs +1 -1
  9. package/dist/es/animation/utils/is-keyframes-target.mjs +1 -1
  10. package/dist/es/animation/utils/transitions.mjs +30 -31
  11. package/dist/es/components/AnimatePresence/PresenceChild.mjs +18 -31
  12. package/dist/es/components/AnimatePresence/index.mjs +33 -35
  13. package/dist/es/components/AnimatePresence/use-presence.mjs +5 -5
  14. package/dist/es/components/AnimateSharedLayout.mjs +4 -5
  15. package/dist/es/components/LayoutGroup/index.mjs +12 -16
  16. package/dist/es/components/LazyMotion/index.mjs +9 -10
  17. package/dist/es/components/MotionConfig/index.mjs +5 -5
  18. package/dist/es/components/Reorder/Group.mjs +16 -16
  19. package/dist/es/components/Reorder/Item.mjs +14 -18
  20. package/dist/es/components/Reorder/index.mjs +3 -3
  21. package/dist/es/components/Reorder/utils/check-reorder.mjs +6 -6
  22. package/dist/es/context/DeprecatedLayoutGroupContext.mjs +1 -1
  23. package/dist/es/context/LayoutGroupContext.mjs +1 -1
  24. package/dist/es/context/LazyContext.mjs +1 -1
  25. package/dist/es/context/MotionConfigContext.mjs +2 -2
  26. package/dist/es/context/MotionContext/create.mjs +2 -2
  27. package/dist/es/context/MotionContext/index.mjs +1 -1
  28. package/dist/es/context/MotionContext/utils.mjs +1 -1
  29. package/dist/es/context/PresenceContext.mjs +1 -1
  30. package/dist/es/context/ReorderContext.mjs +1 -1
  31. package/dist/es/context/SwitchLayoutGroupContext.mjs +1 -1
  32. package/dist/es/events/event-info.mjs +11 -17
  33. package/dist/es/events/use-dom-event.mjs +4 -5
  34. package/dist/es/events/use-pointer-event.mjs +2 -2
  35. package/dist/es/events/utils.mjs +3 -9
  36. package/dist/es/gestures/PanSession.mjs +42 -47
  37. package/dist/es/gestures/drag/VisualElementDragControls.mjs +147 -157
  38. package/dist/es/gestures/drag/use-drag-controls.mjs +10 -12
  39. package/dist/es/gestures/drag/use-drag.mjs +4 -4
  40. package/dist/es/gestures/drag/utils/constraints.mjs +12 -17
  41. package/dist/es/gestures/drag/utils/lock.mjs +17 -17
  42. package/dist/es/gestures/use-focus-gesture.mjs +3 -4
  43. package/dist/es/gestures/use-hover-gesture.mjs +2 -3
  44. package/dist/es/gestures/use-pan-gesture.mjs +9 -10
  45. package/dist/es/gestures/use-tap-gesture.mjs +5 -6
  46. package/dist/es/gestures/utils/event-type.mjs +1 -1
  47. package/dist/es/gestures/utils/is-node-or-child.mjs +1 -1
  48. package/dist/es/index.mjs +1 -0
  49. package/dist/es/motion/features/animations.mjs +9 -11
  50. package/dist/es/motion/features/definitions.mjs +5 -5
  51. package/dist/es/motion/features/drag.mjs +1 -1
  52. package/dist/es/motion/features/gestures.mjs +1 -1
  53. package/dist/es/motion/features/layout/MeasureLayout.mjs +32 -40
  54. package/dist/es/motion/features/layout/index.mjs +1 -1
  55. package/dist/es/motion/features/use-features.mjs +8 -9
  56. package/dist/es/motion/features/use-projection.mjs +10 -11
  57. package/dist/es/motion/features/viewport/observers.mjs +12 -12
  58. package/dist/es/motion/features/viewport/use-viewport.mjs +17 -20
  59. package/dist/es/motion/index.mjs +13 -16
  60. package/dist/es/motion/utils/VisualElementHandler.mjs +10 -16
  61. package/dist/es/motion/utils/is-forced-motion-value.mjs +1 -2
  62. package/dist/es/motion/utils/make-renderless-component.mjs +2 -2
  63. package/dist/es/motion/utils/use-motion-ref.mjs +1 -1
  64. package/dist/es/motion/utils/use-visual-element.mjs +13 -13
  65. package/dist/es/motion/utils/use-visual-state.mjs +26 -31
  66. package/dist/es/motion/utils/valid-prop.mjs +1 -1
  67. package/dist/es/projection/animation/mix-values.mjs +12 -16
  68. package/dist/es/projection/geometry/conversion.mjs +4 -6
  69. package/dist/es/projection/geometry/delta-apply.mjs +14 -20
  70. package/dist/es/projection/geometry/delta-calc.mjs +2 -5
  71. package/dist/es/projection/geometry/delta-remove.mjs +6 -13
  72. package/dist/es/projection/geometry/models.mjs +7 -7
  73. package/dist/es/projection/node/DocumentProjectionNode.mjs +5 -5
  74. package/dist/es/projection/node/HTMLProjectionNode.mjs +8 -10
  75. package/dist/es/projection/node/create-projection-node.mjs +283 -307
  76. package/dist/es/projection/node/group.mjs +6 -8
  77. package/dist/es/projection/node/id.mjs +2 -2
  78. package/dist/es/projection/node/state.mjs +1 -1
  79. package/dist/es/projection/shared/stack.mjs +26 -27
  80. package/dist/es/projection/styles/scale-border-radius.mjs +5 -5
  81. package/dist/es/projection/styles/scale-box-shadow.mjs +18 -19
  82. package/dist/es/projection/styles/scale-correction.mjs +1 -1
  83. package/dist/es/projection/styles/transform.mjs +12 -12
  84. package/dist/es/projection/use-reset-projection.mjs +2 -2
  85. package/dist/es/projection/utils/has-transform.mjs +1 -2
  86. package/dist/es/projection/utils/measure.mjs +2 -2
  87. package/dist/es/render/dom/create-visual-element.mjs +1 -1
  88. package/dist/es/render/dom/features-animation.mjs +1 -2
  89. package/dist/es/render/dom/features-max.mjs +1 -2
  90. package/dist/es/render/dom/motion-minimal.mjs +1 -1
  91. package/dist/es/render/dom/motion-proxy.mjs +3 -4
  92. package/dist/es/render/dom/motion.mjs +2 -5
  93. package/dist/es/render/dom/use-render.mjs +6 -9
  94. package/dist/es/render/dom/utils/camel-to-dash.mjs +3 -5
  95. package/dist/es/render/dom/utils/create-config.mjs +5 -5
  96. package/dist/es/render/dom/utils/css-variables-conversion.mjs +19 -20
  97. package/dist/es/render/dom/utils/filter-props.mjs +4 -6
  98. package/dist/es/render/dom/utils/parse-dom-variant.mjs +2 -2
  99. package/dist/es/render/dom/utils/unit-conversion.mjs +68 -99
  100. package/dist/es/render/dom/value-types/animatable-none.mjs +1 -1
  101. package/dist/es/render/dom/value-types/defaults.mjs +4 -5
  102. package/dist/es/render/dom/value-types/dimensions.mjs +2 -4
  103. package/dist/es/render/dom/value-types/find.mjs +2 -3
  104. package/dist/es/render/dom/value-types/get-as-type.mjs +1 -1
  105. package/dist/es/render/dom/value-types/number.mjs +2 -2
  106. package/dist/es/render/dom/value-types/test.mjs +1 -1
  107. package/dist/es/render/dom/value-types/type-auto.mjs +3 -3
  108. package/dist/es/render/dom/value-types/type-int.mjs +1 -2
  109. package/dist/es/render/html/config-motion.mjs +1 -1
  110. package/dist/es/render/html/use-props.mjs +11 -13
  111. package/dist/es/render/html/utils/build-styles.mjs +8 -8
  112. package/dist/es/render/html/utils/build-transform.mjs +11 -16
  113. package/dist/es/render/html/utils/create-render-state.mjs +2 -2
  114. package/dist/es/render/html/utils/render.mjs +2 -3
  115. package/dist/es/render/html/utils/scrape-motion-values.mjs +3 -3
  116. package/dist/es/render/html/utils/transform.mjs +6 -10
  117. package/dist/es/render/html/visual-element.mjs +22 -23
  118. package/dist/es/render/index.mjs +359 -364
  119. package/dist/es/render/svg/config-motion.mjs +2 -3
  120. package/dist/es/render/svg/lowercase-elements.mjs +1 -1
  121. package/dist/es/render/svg/use-props.mjs +5 -6
  122. package/dist/es/render/svg/utils/build-attrs.mjs +2 -2
  123. package/dist/es/render/svg/utils/camel-case-attrs.mjs +1 -1
  124. package/dist/es/render/svg/utils/create-render-state.mjs +1 -2
  125. package/dist/es/render/svg/utils/path.mjs +7 -10
  126. package/dist/es/render/svg/utils/render.mjs +1 -1
  127. package/dist/es/render/svg/utils/scrape-motion-values.mjs +3 -3
  128. package/dist/es/render/svg/utils/transform-origin.mjs +3 -3
  129. package/dist/es/render/svg/visual-element.mjs +6 -4
  130. package/dist/es/render/utils/animation-state.mjs +71 -87
  131. package/dist/es/render/utils/animation.mjs +48 -60
  132. package/dist/es/render/utils/compare-by-depth.mjs +1 -3
  133. package/dist/es/render/utils/flat-tree.mjs +9 -10
  134. package/dist/es/render/utils/lifecycles.mjs +12 -19
  135. package/dist/es/render/utils/motion-values.mjs +16 -8
  136. package/dist/es/render/utils/setters.mjs +19 -19
  137. package/dist/es/render/utils/variants.mjs +6 -8
  138. package/dist/es/utils/array.mjs +9 -10
  139. package/dist/es/utils/is-browser.mjs +1 -1
  140. package/dist/es/utils/is-numerical-string.mjs +1 -1
  141. package/dist/es/utils/is-zero-value-string.mjs +1 -1
  142. package/dist/es/utils/process.mjs +2 -2
  143. package/dist/es/utils/resolve-value.mjs +2 -2
  144. package/dist/es/utils/shallow-compare.mjs +2 -2
  145. package/dist/es/utils/subscription-manager.mjs +15 -17
  146. package/dist/es/utils/time-conversion.mjs +1 -1
  147. package/dist/es/utils/transform.mjs +10 -15
  148. package/dist/es/utils/use-animation-frame.mjs +5 -6
  149. package/dist/es/utils/use-constant.mjs +1 -1
  150. package/dist/es/utils/use-cycle.mjs +9 -10
  151. package/dist/es/utils/use-force-update.mjs +4 -5
  152. package/dist/es/utils/use-in-view.mjs +7 -9
  153. package/dist/es/utils/use-instant-transition-state.mjs +1 -1
  154. package/dist/es/utils/use-instant-transition.mjs +6 -9
  155. package/dist/es/utils/use-is-mounted.mjs +3 -3
  156. package/dist/es/utils/use-isomorphic-effect.mjs +1 -1
  157. package/dist/es/utils/use-reduced-motion.mjs +8 -11
  158. package/dist/es/utils/use-unmount-effect.mjs +1 -1
  159. package/dist/es/utils/warn-once.mjs +1 -1
  160. package/dist/es/value/index.mjs +53 -59
  161. package/dist/es/value/use-combine-values.mjs +3 -3
  162. package/dist/es/value/use-inverted-scale.mjs +9 -11
  163. package/dist/es/value/use-motion-template.mjs +5 -9
  164. package/dist/es/value/use-motion-value.mjs +4 -5
  165. package/dist/es/value/use-on-change.mjs +4 -4
  166. package/dist/es/value/use-scroll.mjs +9 -11
  167. package/dist/es/value/use-spring.mjs +8 -10
  168. package/dist/es/value/use-time.mjs +2 -2
  169. package/dist/es/value/use-transform.mjs +6 -10
  170. package/dist/es/value/use-velocity.mjs +3 -3
  171. package/dist/es/value/use-will-change/index.mjs +50 -0
  172. package/dist/es/value/use-will-change/is.mjs +7 -0
  173. package/dist/es/value/utils/is-motion-value.mjs +1 -1
  174. package/dist/es/value/utils/resolve-motion-value.mjs +1 -1
  175. package/dist/framer-motion.dev.js +2134 -2414
  176. package/dist/framer-motion.js +1 -1
  177. package/dist/index.d.ts +9 -2
  178. package/dist/projection.dev.js +1154 -1300
  179. package/dist/size-rollup-dom-animation.js +1 -1
  180. package/dist/size-rollup-dom-max.js +1 -1
  181. package/dist/size-rollup-m.js +1 -1
  182. package/dist/size-webpack-dom-animation.js +1 -1
  183. package/dist/size-webpack-dom-max.js +1 -1
  184. package/dist/size-webpack-m.js +1 -1
  185. package/dist/three-entry.d.ts +0 -1
  186. package/package.json +12 -12
@@ -1,4 +1,3 @@
1
- import { __read } from 'tslib';
2
1
  import { useContext, useState, useEffect } from 'react';
3
2
  import { motionValue } from './index.mjs';
4
3
  import { MotionConfigContext } from '../context/MotionConfigContext.mjs';
@@ -22,16 +21,16 @@ import { useConstant } from '../utils/use-constant.mjs';
22
21
  * @public
23
22
  */
24
23
  function useMotionValue(initial) {
25
- var value = useConstant(function () { return motionValue(initial); });
24
+ const value = useConstant(() => motionValue(initial));
26
25
  /**
27
26
  * If this motion value is being used in static mode, like on
28
27
  * the Framer canvas, force components to rerender when the motion
29
28
  * value is updated.
30
29
  */
31
- var isStatic = useContext(MotionConfigContext).isStatic;
30
+ const { isStatic } = useContext(MotionConfigContext);
32
31
  if (isStatic) {
33
- var _a = __read(useState(initial), 2), setLatest_1 = _a[1];
34
- useEffect(function () { return value.onChange(setLatest_1); }, []);
32
+ const [, setLatest] = useState(initial);
33
+ useEffect(() => value.onChange(setLatest), []);
35
34
  }
36
35
  return value;
37
36
  }
@@ -2,15 +2,15 @@ import { isMotionValue } from './utils/is-motion-value.mjs';
2
2
  import { useIsomorphicLayoutEffect } from '../utils/use-isomorphic-effect.mjs';
3
3
 
4
4
  function useOnChange(value, callback) {
5
- useIsomorphicLayoutEffect(function () {
5
+ useIsomorphicLayoutEffect(() => {
6
6
  if (isMotionValue(value))
7
7
  return value.onChange(callback);
8
8
  }, [callback]);
9
9
  }
10
10
  function useMultiOnChange(values, handler) {
11
- useIsomorphicLayoutEffect(function () {
12
- var subscriptions = values.map(function (value) { return value.onChange(handler); });
13
- return function () { return subscriptions.forEach(function (unsubscribe) { return unsubscribe(); }); };
11
+ useIsomorphicLayoutEffect(() => {
12
+ const subscriptions = values.map((value) => value.onChange(handler));
13
+ return () => subscriptions.forEach((unsubscribe) => unsubscribe());
14
14
  });
15
15
  }
16
16
 
@@ -1,27 +1,25 @@
1
- import { __rest, __assign } from 'tslib';
1
+ import { __rest } from 'tslib';
2
2
  import { scroll } from '@motionone/dom';
3
3
  import { motionValue } from './index.mjs';
4
4
  import { useConstant } from '../utils/use-constant.mjs';
5
5
  import { useIsomorphicLayoutEffect } from '../utils/use-isomorphic-effect.mjs';
6
6
 
7
- var createScrollMotionValues = function () { return ({
7
+ const createScrollMotionValues = () => ({
8
8
  scrollX: motionValue(0),
9
9
  scrollY: motionValue(0),
10
10
  scrollXProgress: motionValue(0),
11
11
  scrollYProgress: motionValue(0),
12
- }); };
13
- function useScroll(_a) {
14
- if (_a === void 0) { _a = {}; }
15
- var container = _a.container, target = _a.target, options = __rest(_a, ["container", "target"]);
16
- var values = useConstant(createScrollMotionValues);
17
- useIsomorphicLayoutEffect(function () {
18
- return scroll(function (_a) {
19
- var x = _a.x, y = _a.y;
12
+ });
13
+ function useScroll(_a = {}) {
14
+ var { container, target } = _a, options = __rest(_a, ["container", "target"]);
15
+ const values = useConstant(createScrollMotionValues);
16
+ useIsomorphicLayoutEffect(() => {
17
+ return scroll(({ x, y }) => {
20
18
  values.scrollX.set(x.current);
21
19
  values.scrollXProgress.set(x.progress);
22
20
  values.scrollY.set(y.current);
23
21
  values.scrollYProgress.set(y.progress);
24
- }, __assign(__assign({}, options), { container: (container === null || container === void 0 ? void 0 : container.current) || undefined, target: (target === null || target === void 0 ? void 0 : target.current) || undefined }));
22
+ }, Object.assign(Object.assign({}, options), { container: (container === null || container === void 0 ? void 0 : container.current) || undefined, target: (target === null || target === void 0 ? void 0 : target.current) || undefined }));
25
23
  }, []);
26
24
  return values;
27
25
  }
@@ -1,4 +1,3 @@
1
- import { __assign } from 'tslib';
2
1
  import { useContext, useRef, useMemo } from 'react';
3
2
  import { animate } from 'popmotion';
4
3
  import { isMotionValue } from './utils/is-motion-value.mjs';
@@ -25,13 +24,12 @@ import { MotionConfigContext } from '../context/MotionConfigContext.mjs';
25
24
  *
26
25
  * @public
27
26
  */
28
- function useSpring(source, config) {
29
- if (config === void 0) { config = {}; }
30
- var isStatic = useContext(MotionConfigContext).isStatic;
31
- var activeSpringAnimation = useRef(null);
32
- var value = useMotionValue(isMotionValue(source) ? source.get() : source);
33
- useMemo(function () {
34
- return value.attach(function (v, set) {
27
+ function useSpring(source, config = {}) {
28
+ const { isStatic } = useContext(MotionConfigContext);
29
+ const activeSpringAnimation = useRef(null);
30
+ const value = useMotionValue(isMotionValue(source) ? source.get() : source);
31
+ useMemo(() => {
32
+ return value.attach((v, set) => {
35
33
  /**
36
34
  * A more hollistic approach to this might be to use isStatic to fix VisualElement animations
37
35
  * at that level, but this will work for now
@@ -41,11 +39,11 @@ function useSpring(source, config) {
41
39
  if (activeSpringAnimation.current) {
42
40
  activeSpringAnimation.current.stop();
43
41
  }
44
- activeSpringAnimation.current = animate(__assign(__assign({ from: value.get(), to: v, velocity: value.getVelocity() }, config), { onUpdate: set }));
42
+ activeSpringAnimation.current = animate(Object.assign(Object.assign({ from: value.get(), to: v, velocity: value.getVelocity() }, config), { onUpdate: set }));
45
43
  return value.get();
46
44
  });
47
45
  }, [JSON.stringify(config)]);
48
- useOnChange(source, function (v) { return value.set(parseFloat(v)); });
46
+ useOnChange(source, (v) => value.set(parseFloat(v)));
49
47
  return value;
50
48
  }
51
49
 
@@ -2,8 +2,8 @@ import { useAnimationFrame } from '../utils/use-animation-frame.mjs';
2
2
  import { useMotionValue } from './use-motion-value.mjs';
3
3
 
4
4
  function useTime() {
5
- var time = useMotionValue(0);
6
- useAnimationFrame(function (t) { return time.set(t); });
5
+ const time = useMotionValue(0);
6
+ useAnimationFrame((t) => time.set(t));
7
7
  return time;
8
8
  }
9
9
 
@@ -1,25 +1,21 @@
1
- import { __read } from 'tslib';
2
1
  import { transform } from '../utils/transform.mjs';
3
2
  import { useCombineMotionValues } from './use-combine-values.mjs';
4
3
  import { useConstant } from '../utils/use-constant.mjs';
5
4
 
6
5
  function useTransform(input, inputRangeOrTransformer, outputRange, options) {
7
- var transformer = typeof inputRangeOrTransformer === "function"
6
+ const transformer = typeof inputRangeOrTransformer === "function"
8
7
  ? inputRangeOrTransformer
9
8
  : transform(inputRangeOrTransformer, outputRange, options);
10
9
  return Array.isArray(input)
11
10
  ? useListTransform(input, transformer)
12
- : useListTransform([input], function (_a) {
13
- var _b = __read(_a, 1), latest = _b[0];
14
- return transformer(latest);
15
- });
11
+ : useListTransform([input], ([latest]) => transformer(latest));
16
12
  }
17
13
  function useListTransform(values, transformer) {
18
- var latest = useConstant(function () { return []; });
19
- return useCombineMotionValues(values, function () {
14
+ const latest = useConstant(() => []);
15
+ return useCombineMotionValues(values, () => {
20
16
  latest.length = 0;
21
- var numValues = values.length;
22
- for (var i = 0; i < numValues; i++) {
17
+ const numValues = values.length;
18
+ for (let i = 0; i < numValues; i++) {
23
19
  latest[i] = values[i].get();
24
20
  }
25
21
  return transformer(latest);
@@ -13,9 +13,9 @@ import { useMotionValue } from './use-motion-value.mjs';
13
13
  * @public
14
14
  */
15
15
  function useVelocity(value) {
16
- var velocity = useMotionValue(value.getVelocity());
17
- useEffect(function () {
18
- return value.velocityUpdateSubscribers.add(function (newVelocity) {
16
+ const velocity = useMotionValue(value.getVelocity());
17
+ useEffect(() => {
18
+ return value.velocityUpdateSubscribers.add((newVelocity) => {
19
19
  velocity.set(newVelocity);
20
20
  });
21
21
  }, [value]);
@@ -0,0 +1,50 @@
1
+ import { isCSSVariable } from '../../render/dom/utils/is-css-variable.mjs';
2
+ import { isTransformProp, isTransformOriginProp } from '../../render/html/utils/transform.mjs';
3
+ import { addUniqueItem, removeItem } from '../../utils/array.mjs';
4
+ import { useConstant } from '../../utils/use-constant.mjs';
5
+ import { MotionValue } from '../index.mjs';
6
+ import { camelToDash } from '../../render/dom/utils/camel-to-dash.mjs';
7
+
8
+ class WillChangeMotionValue extends MotionValue {
9
+ constructor() {
10
+ super(...arguments);
11
+ this.members = [];
12
+ this.transforms = new Set();
13
+ }
14
+ add(name) {
15
+ let memberName;
16
+ if (isTransformProp(name)) {
17
+ this.transforms.add(name);
18
+ memberName = "transform";
19
+ }
20
+ else if (!isTransformOriginProp(name) &&
21
+ !isCSSVariable(name) &&
22
+ name !== "willChange") {
23
+ memberName = camelToDash(name);
24
+ }
25
+ if (memberName) {
26
+ addUniqueItem(this.members, memberName);
27
+ this.update();
28
+ }
29
+ }
30
+ remove(name) {
31
+ if (isTransformProp(name)) {
32
+ this.transforms.delete(name);
33
+ if (!this.transforms.size) {
34
+ removeItem(this.members, "transform");
35
+ }
36
+ }
37
+ else {
38
+ removeItem(this.members, camelToDash(name));
39
+ }
40
+ this.update();
41
+ }
42
+ update() {
43
+ this.set(this.members.length ? this.members.join(", ") : "auto");
44
+ }
45
+ }
46
+ function useWillChange() {
47
+ return useConstant(() => new WillChangeMotionValue("auto"));
48
+ }
49
+
50
+ export { WillChangeMotionValue, useWillChange };
@@ -0,0 +1,7 @@
1
+ import { isMotionValue } from '../utils/is-motion-value.mjs';
2
+
3
+ function isWillChangeMotionValue(value) {
4
+ return Boolean(isMotionValue(value) && value.add);
5
+ }
6
+
7
+ export { isWillChangeMotionValue };
@@ -1,4 +1,4 @@
1
- var isMotionValue = function (value) {
1
+ const isMotionValue = (value) => {
2
2
  return Boolean(value !== null && typeof value === "object" && value.getVelocity);
3
3
  };
4
4
 
@@ -7,7 +7,7 @@ import { isMotionValue } from './is-motion-value.mjs';
7
7
  * TODO: Remove and move to library
8
8
  */
9
9
  function resolveMotionValue(value) {
10
- var unwrappedValue = isMotionValue(value) ? value.get() : value;
10
+ const unwrappedValue = isMotionValue(value) ? value.get() : value;
11
11
  return isCustomValue(unwrappedValue)
12
12
  ? unwrappedValue.toValue()
13
13
  : unwrappedValue;