framer-motion 5.3.2 → 5.3.3

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.
@@ -27,7 +27,7 @@ var easingDefinitionToFunction = function (definition) {
27
27
  }
28
28
  else if (typeof definition === "string") {
29
29
  // Else lookup from table
30
- invariant(easingLookup[definition] !== undefined, "Invalid easing type '" + definition + "'");
30
+ invariant(easingLookup[definition] !== undefined, "Invalid easing type '".concat(definition, "'"));
31
31
  return easingLookup[definition];
32
32
  }
33
33
  return definition;
@@ -126,7 +126,7 @@ function getAnimation(key, value, target, transition, onComplete) {
126
126
  target = getZeroUnit(origin);
127
127
  }
128
128
  var isOriginAnimatable = isAnimatable(key, origin);
129
- warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate " + key + " from \"" + origin + "\" to \"" + target + "\". " + origin + " is not an animatable value - to enable this animation set " + origin + " to a value animatable to " + target + " via the `style` property.");
129
+ warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate ".concat(key, " from \"").concat(origin, "\" to \"").concat(target, "\". ").concat(origin, " is not an animatable value - to enable this animation set ").concat(origin, " to a value animatable to ").concat(target, " via the `style` property."));
130
130
  function start() {
131
131
  var options = {
132
132
  from: origin,
@@ -14,7 +14,7 @@ function updateChildLookup(children, allChildren) {
14
14
  var key = getChildKey(child);
15
15
  if (process.env.NODE_ENV !== "production" && seenChildren) {
16
16
  if (seenChildren.has(key)) {
17
- console.warn("Children of AnimatePresence require unique keys. \"" + key + "\" is a duplicate.");
17
+ console.warn("Children of AnimatePresence require unique keys. \"".concat(key, "\" is a duplicate."));
18
18
  }
19
19
  seenChildren.add(key);
20
20
  }
@@ -5,7 +5,7 @@ import { LayoutGroup } from './LayoutGroup/index.mjs';
5
5
  var id = 0;
6
6
  var AnimateSharedLayout = function (_a) {
7
7
  var children = _a.children;
8
- return (React.createElement(LayoutGroup, { id: useConstant(function () { return "asl-" + id++; }) }, children));
8
+ return (React.createElement(LayoutGroup, { id: useConstant(function () { return "asl-".concat(id++); }) }, children));
9
9
  };
10
10
 
11
11
  export { AnimateSharedLayout };
@@ -23,7 +23,7 @@ function ReorderItem(_a, externalRef) {
23
23
  };
24
24
  var zIndex = useTransform([point.x, point.y], function (_a) {
25
25
  var _b = __read(_a, 2), latestX = _b[0], latestY = _b[1];
26
- return latestX || latestY ? 1 : 0;
26
+ return latestX || latestY ? 1 : "unset";
27
27
  });
28
28
  var layout = useRef(null);
29
29
  invariant(Boolean(context), "Reorder.Item must be a child of Reorder.Group");
@@ -18,7 +18,7 @@ function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnl
18
18
  * Mix border radius
19
19
  */
20
20
  for (var i = 0; i < numBorders; i++) {
21
- var borderLabel = "border" + borders[i] + "Radius";
21
+ var borderLabel = "border".concat(borders[i], "Radius");
22
22
  var followRadius = getRadius(follow, borderLabel);
23
23
  var leadRadius = getRadius(lead, borderLabel);
24
24
  if (followRadius === undefined && leadRadius === undefined)
@@ -964,7 +964,7 @@ function createProjectionNode(_a) {
964
964
  styles.transform = transformTemplate(valuesToRender, styles.transform);
965
965
  }
966
966
  var _g = this.projectionDelta, x = _g.x, y = _g.y;
967
- styles.transformOrigin = x.origin * 100 + "% " + y.origin * 100 + "% 0";
967
+ styles.transformOrigin = "".concat(x.origin * 100, "% ").concat(y.origin * 100, "% 0");
968
968
  if (lead.animationValues) {
969
969
  /**
970
970
  * If the lead component is animating, assign this either the entering/leaving
@@ -1170,7 +1170,7 @@ function mountNodeEarly(node, id) {
1170
1170
  }
1171
1171
  }
1172
1172
  var searchElement = searchNode && searchNode !== node.root ? searchNode.instance : document;
1173
- var element = searchElement.querySelector("[data-projection-id=\"" + id + "\"]");
1173
+ var element = searchElement.querySelector("[data-projection-id=\"".concat(id, "\"]"));
1174
1174
  if (element)
1175
1175
  node.mount(element, true);
1176
1176
  }
@@ -34,7 +34,7 @@ var correctBorderRadius = {
34
34
  */
35
35
  var x = pixelsToPercent(latest, node.target.x);
36
36
  var y = pixelsToPercent(latest, node.target.y);
37
- return x + "% " + y + "%";
37
+ return "".concat(x, "% ").concat(y, "%");
38
38
  },
39
39
  };
40
40
 
@@ -8,17 +8,17 @@ function buildProjectionTransform(delta, treeScale, latestTransform) {
8
8
  */
9
9
  var xTranslate = delta.x.translate / treeScale.x;
10
10
  var yTranslate = delta.y.translate / treeScale.y;
11
- var transform = "translate3d(" + xTranslate + "px, " + yTranslate + "px, 0) ";
11
+ var transform = "translate3d(".concat(xTranslate, "px, ").concat(yTranslate, "px, 0) ");
12
12
  if (latestTransform) {
13
13
  var rotate = latestTransform.rotate, rotateX = latestTransform.rotateX, rotateY = latestTransform.rotateY;
14
14
  if (rotate)
15
- transform += "rotate(" + rotate + "deg) ";
15
+ transform += "rotate(".concat(rotate, "deg) ");
16
16
  if (rotateX)
17
- transform += "rotateX(" + rotateX + "deg) ";
17
+ transform += "rotateX(".concat(rotateX, "deg) ");
18
18
  if (rotateY)
19
- transform += "rotateY(" + rotateY + "deg) ";
19
+ transform += "rotateY(".concat(rotateY, "deg) ");
20
20
  }
21
- transform += "scale(" + delta.x.scale + ", " + delta.y.scale + ")";
21
+ transform += "scale(".concat(delta.x.scale, ", ").concat(delta.y.scale, ")");
22
22
  return transform === identityProjection ? "none" : transform;
23
23
  }
24
24
 
@@ -19,6 +19,9 @@ function createMotionProxy(createConfig) {
19
19
  if (customMotionComponentConfig === void 0) { customMotionComponentConfig = {}; }
20
20
  return createMotionComponent(createConfig(Component, customMotionComponentConfig));
21
21
  }
22
+ if (typeof Proxy === "undefined") {
23
+ return custom;
24
+ }
22
25
  /**
23
26
  * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.
24
27
  * Rather than generating them anew every render.
@@ -24,7 +24,7 @@ function parseCSSVariable(current) {
24
24
  var maxDepth = 4;
25
25
  function getVariableValue(current, element, depth) {
26
26
  if (depth === void 0) { depth = 1; }
27
- invariant(depth <= maxDepth, "Max CSS variable fallback depth detected in property \"" + current + "\". This may indicate a circular fallback dependency.");
27
+ invariant(depth <= maxDepth, "Max CSS variable fallback depth detected in property \"".concat(current, "\". This may indicate a circular fallback dependency."));
28
28
  var _a = __read(parseCSSVariable(current), 2), token = _a[0], fallback = _a[1];
29
29
  // No CSS variable detected
30
30
  if (!token)
@@ -51,7 +51,7 @@ function resolveCSSVariables(visualElement, _a, transitionEnd) {
51
51
  var _b;
52
52
  var target = __rest(_a, []);
53
53
  var element = visualElement.getInstance();
54
- if (!(element instanceof HTMLElement))
54
+ if (!(element instanceof Element))
55
55
  return { target: target, transitionEnd: transitionEnd };
56
56
  // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`
57
57
  // only if they change but I think this reads clearer and this isn't a performance-critical path.
@@ -34,7 +34,9 @@ function filterProps(props, isDom, forwardMotionProps) {
34
34
  for (var key in props) {
35
35
  if (shouldForward(key) ||
36
36
  (forwardMotionProps === true && isValidMotionProp(key)) ||
37
- (!isDom && !isValidMotionProp(key))) {
37
+ (!isDom && !isValidMotionProp(key)) ||
38
+ // If trying to use native HTML drag events, forward drag listeners
39
+ (props["draggable"] && key.startsWith("onDrag"))) {
38
40
  filteredProps[key] = props[key];
39
41
  }
40
42
  }
@@ -50,7 +50,7 @@ function useHTMLProps(props, visualState, isStatic) {
50
50
  style.touchAction =
51
51
  props.drag === true
52
52
  ? "none"
53
- : "pan-" + (props.drag === "x" ? "y" : "x");
53
+ : "pan-".concat(props.drag === "x" ? "y" : "x");
54
54
  }
55
55
  htmlProps.style = style;
56
56
  return htmlProps;
@@ -26,7 +26,7 @@ function buildTransform(_a, _b, transformIsDefault, transformTemplate) {
26
26
  var numTransformKeys = transformKeys.length;
27
27
  for (var i = 0; i < numTransformKeys; i++) {
28
28
  var key = transformKeys[i];
29
- transformString += (translateAlias[key] || key) + "(" + transform[key] + ") ";
29
+ transformString += "".concat(translateAlias[key] || key, "(").concat(transform[key], ") ");
30
30
  if (key === "z")
31
31
  transformHasZ = true;
32
32
  }
@@ -52,7 +52,7 @@ function buildTransform(_a, _b, transformIsDefault, transformTemplate) {
52
52
  */
53
53
  function buildTransformOrigin(_a) {
54
54
  var _b = _a.originX, originX = _b === void 0 ? "50%" : _b, _c = _a.originY, originY = _c === void 0 ? "50%" : _c, _d = _a.originZ, originZ = _d === void 0 ? 0 : _d;
55
- return originX + " " + originY + " " + originZ;
55
+ return "".concat(originX, " ").concat(originY, " ").concat(originZ);
56
56
  }
57
57
 
58
58
  export { buildTransform, buildTransformOrigin };
@@ -29,7 +29,7 @@ function buildSVGPath(attrs, length, spacing, offset, useDashCase) {
29
29
  // Build the dash array
30
30
  var pathLength = px.transform(length);
31
31
  var pathSpacing = px.transform(spacing);
32
- attrs[keys.array] = pathLength + " " + pathSpacing;
32
+ attrs[keys.array] = "".concat(pathLength, " ").concat(pathSpacing);
33
33
  }
34
34
 
35
35
  export { buildSVGPath };
@@ -12,7 +12,7 @@ function calcOrigin(origin, offset, size) {
12
12
  function calcSVGTransformOrigin(dimensions, originX, originY) {
13
13
  var pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width);
14
14
  var pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height);
15
- return pxOriginX + " " + pxOriginY;
15
+ return "".concat(pxOriginX, " ").concat(pxOriginY);
16
16
  }
17
17
 
18
18
  export { calcSVGTransformOrigin };
@@ -713,7 +713,7 @@ var easingDefinitionToFunction = function (definition) {
713
713
  }
714
714
  else if (typeof definition === "string") {
715
715
  // Else lookup from table
716
- heyListen.invariant(easingLookup[definition] !== undefined, "Invalid easing type '" + definition + "'");
716
+ heyListen.invariant(easingLookup[definition] !== undefined, "Invalid easing type '".concat(definition, "'"));
717
717
  return easingLookup[definition];
718
718
  }
719
719
  return definition;
@@ -1025,7 +1025,7 @@ function getAnimation(key, value, target, transition, onComplete) {
1025
1025
  target = getZeroUnit(origin);
1026
1026
  }
1027
1027
  var isOriginAnimatable = isAnimatable(key, origin);
1028
- heyListen.warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate " + key + " from \"" + origin + "\" to \"" + target + "\". " + origin + " is not an animatable value - to enable this animation set " + origin + " to a value animatable to " + target + " via the `style` property.");
1028
+ heyListen.warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate ".concat(key, " from \"").concat(origin, "\" to \"").concat(target, "\". ").concat(origin, " is not an animatable value - to enable this animation set ").concat(origin, " to a value animatable to ").concat(target, " via the `style` property."));
1029
1029
  function start() {
1030
1030
  var options = {
1031
1031
  from: origin,
@@ -1161,7 +1161,7 @@ function mixValues(target, follow, lead, progress, shouldCrossfadeOpacity, isOnl
1161
1161
  * Mix border radius
1162
1162
  */
1163
1163
  for (var i = 0; i < numBorders; i++) {
1164
- var borderLabel = "border" + borders[i] + "Radius";
1164
+ var borderLabel = "border".concat(borders[i], "Radius");
1165
1165
  var followRadius = getRadius(follow, borderLabel);
1166
1166
  var leadRadius = getRadius(lead, borderLabel);
1167
1167
  if (followRadius === undefined && leadRadius === undefined)
@@ -1618,17 +1618,17 @@ function buildProjectionTransform(delta, treeScale, latestTransform) {
1618
1618
  */
1619
1619
  var xTranslate = delta.x.translate / treeScale.x;
1620
1620
  var yTranslate = delta.y.translate / treeScale.y;
1621
- var transform = "translate3d(" + xTranslate + "px, " + yTranslate + "px, 0) ";
1621
+ var transform = "translate3d(".concat(xTranslate, "px, ").concat(yTranslate, "px, 0) ");
1622
1622
  if (latestTransform) {
1623
1623
  var rotate = latestTransform.rotate, rotateX = latestTransform.rotateX, rotateY = latestTransform.rotateY;
1624
1624
  if (rotate)
1625
- transform += "rotate(" + rotate + "deg) ";
1625
+ transform += "rotate(".concat(rotate, "deg) ");
1626
1626
  if (rotateX)
1627
- transform += "rotateX(" + rotateX + "deg) ";
1627
+ transform += "rotateX(".concat(rotateX, "deg) ");
1628
1628
  if (rotateY)
1629
- transform += "rotateY(" + rotateY + "deg) ";
1629
+ transform += "rotateY(".concat(rotateY, "deg) ");
1630
1630
  }
1631
- transform += "scale(" + delta.x.scale + ", " + delta.y.scale + ")";
1631
+ transform += "scale(".concat(delta.x.scale, ", ").concat(delta.y.scale, ")");
1632
1632
  return transform === identityProjection ? "none" : transform;
1633
1633
  }
1634
1634
 
@@ -2659,7 +2659,7 @@ function createProjectionNode(_a) {
2659
2659
  styles.transform = transformTemplate(valuesToRender, styles.transform);
2660
2660
  }
2661
2661
  var _g = this.projectionDelta, x = _g.x, y = _g.y;
2662
- styles.transformOrigin = x.origin * 100 + "% " + y.origin * 100 + "% 0";
2662
+ styles.transformOrigin = "".concat(x.origin * 100, "% ").concat(y.origin * 100, "% 0");
2663
2663
  if (lead.animationValues) {
2664
2664
  /**
2665
2665
  * If the lead component is animating, assign this either the entering/leaving
@@ -2865,7 +2865,7 @@ function mountNodeEarly(node, id) {
2865
2865
  }
2866
2866
  }
2867
2867
  var searchElement = searchNode && searchNode !== node.root ? searchNode.instance : document;
2868
- var element = searchElement.querySelector("[data-projection-id=\"" + id + "\"]");
2868
+ var element = searchElement.querySelector("[data-projection-id=\"".concat(id, "\"]"));
2869
2869
  if (element)
2870
2870
  node.mount(element, true);
2871
2871
  }
@@ -3046,6 +3046,9 @@ function createMotionProxy(createConfig) {
3046
3046
  if (customMotionComponentConfig === void 0) { customMotionComponentConfig = {}; }
3047
3047
  return createMotionComponent(createConfig(Component, customMotionComponentConfig));
3048
3048
  }
3049
+ if (typeof Proxy === "undefined") {
3050
+ return custom;
3051
+ }
3049
3052
  /**
3050
3053
  * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.
3051
3054
  * Rather than generating them anew every render.
@@ -3162,7 +3165,7 @@ function buildTransform(_a, _b, transformIsDefault, transformTemplate) {
3162
3165
  var numTransformKeys = transformKeys.length;
3163
3166
  for (var i = 0; i < numTransformKeys; i++) {
3164
3167
  var key = transformKeys[i];
3165
- transformString += (translateAlias[key] || key) + "(" + transform[key] + ") ";
3168
+ transformString += "".concat(translateAlias[key] || key, "(").concat(transform[key], ") ");
3166
3169
  if (key === "z")
3167
3170
  transformHasZ = true;
3168
3171
  }
@@ -3188,7 +3191,7 @@ function buildTransform(_a, _b, transformIsDefault, transformTemplate) {
3188
3191
  */
3189
3192
  function buildTransformOrigin(_a) {
3190
3193
  var _b = _a.originX, originX = _b === void 0 ? "50%" : _b, _c = _a.originY, originY = _c === void 0 ? "50%" : _c, _d = _a.originZ, originZ = _d === void 0 ? 0 : _d;
3191
- return originX + " " + originY + " " + originZ;
3194
+ return "".concat(originX, " ").concat(originY, " ").concat(originZ);
3192
3195
  }
3193
3196
 
3194
3197
  /**
@@ -3322,7 +3325,7 @@ function useHTMLProps(props, visualState, isStatic) {
3322
3325
  style.touchAction =
3323
3326
  props.drag === true
3324
3327
  ? "none"
3325
- : "pan-" + (props.drag === "x" ? "y" : "x");
3328
+ : "pan-".concat(props.drag === "x" ? "y" : "x");
3326
3329
  }
3327
3330
  htmlProps.style = style;
3328
3331
  return htmlProps;
@@ -3437,7 +3440,9 @@ function filterProps(props, isDom, forwardMotionProps) {
3437
3440
  for (var key in props) {
3438
3441
  if (shouldForward(key) ||
3439
3442
  (forwardMotionProps === true && isValidMotionProp(key)) ||
3440
- (!isDom && !isValidMotionProp(key))) {
3443
+ (!isDom && !isValidMotionProp(key)) ||
3444
+ // If trying to use native HTML drag events, forward drag listeners
3445
+ (props["draggable"] && key.startsWith("onDrag"))) {
3441
3446
  filteredProps[key] = props[key];
3442
3447
  }
3443
3448
  }
@@ -3456,7 +3461,7 @@ function calcOrigin$1(origin, offset, size) {
3456
3461
  function calcSVGTransformOrigin(dimensions, originX, originY) {
3457
3462
  var pxOriginX = calcOrigin$1(originX, dimensions.x, dimensions.width);
3458
3463
  var pxOriginY = calcOrigin$1(originY, dimensions.y, dimensions.height);
3459
- return pxOriginX + " " + pxOriginY;
3464
+ return "".concat(pxOriginX, " ").concat(pxOriginY);
3460
3465
  }
3461
3466
 
3462
3467
  var dashKeys = {
@@ -3488,7 +3493,7 @@ function buildSVGPath(attrs, length, spacing, offset, useDashCase) {
3488
3493
  // Build the dash array
3489
3494
  var pathLength = styleValueTypes.px.transform(length);
3490
3495
  var pathSpacing = styleValueTypes.px.transform(spacing);
3491
- attrs[keys.array] = pathLength + " " + pathSpacing;
3496
+ attrs[keys.array] = "".concat(pathLength, " ").concat(pathSpacing);
3492
3497
  }
3493
3498
 
3494
3499
  /**
@@ -6258,7 +6263,7 @@ function parseCSSVariable(current) {
6258
6263
  var maxDepth = 4;
6259
6264
  function getVariableValue(current, element, depth) {
6260
6265
  if (depth === void 0) { depth = 1; }
6261
- heyListen.invariant(depth <= maxDepth, "Max CSS variable fallback depth detected in property \"" + current + "\". This may indicate a circular fallback dependency.");
6266
+ heyListen.invariant(depth <= maxDepth, "Max CSS variable fallback depth detected in property \"".concat(current, "\". This may indicate a circular fallback dependency."));
6262
6267
  var _a = tslib.__read(parseCSSVariable(current), 2), token = _a[0], fallback = _a[1];
6263
6268
  // No CSS variable detected
6264
6269
  if (!token)
@@ -6285,7 +6290,7 @@ function resolveCSSVariables(visualElement, _a, transitionEnd) {
6285
6290
  var _b;
6286
6291
  var target = tslib.__rest(_a, []);
6287
6292
  var element = visualElement.getInstance();
6288
- if (!(element instanceof HTMLElement))
6293
+ if (!(element instanceof Element))
6289
6294
  return { target: target, transitionEnd: transitionEnd };
6290
6295
  // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`
6291
6296
  // only if they change but I think this reads clearer and this isn't a performance-critical path.
@@ -6732,7 +6737,7 @@ var correctBorderRadius = {
6732
6737
  */
6733
6738
  var x = pixelsToPercent(latest, node.target.x);
6734
6739
  var y = pixelsToPercent(latest, node.target.y);
6735
- return x + "% " + y + "%";
6740
+ return "".concat(x, "% ").concat(y, "%");
6736
6741
  },
6737
6742
  };
6738
6743
 
@@ -7064,7 +7069,7 @@ function updateChildLookup(children, allChildren) {
7064
7069
  var key = getChildKey(child);
7065
7070
  if (process.env.NODE_ENV !== "production" && seenChildren) {
7066
7071
  if (seenChildren.has(key)) {
7067
- console.warn("Children of AnimatePresence require unique keys. \"" + key + "\" is a duplicate.");
7072
+ console.warn("Children of AnimatePresence require unique keys. \"".concat(key, "\" is a duplicate."));
7068
7073
  }
7069
7074
  seenChildren.add(key);
7070
7075
  }
@@ -7265,7 +7270,7 @@ var LayoutGroup = function (_a) {
7265
7270
  var id = 0;
7266
7271
  var AnimateSharedLayout = function (_a) {
7267
7272
  var children = _a.children;
7268
- return (React__namespace.createElement(LayoutGroup, { id: useConstant(function () { return "asl-" + id++; }) }, children));
7273
+ return (React__namespace.createElement(LayoutGroup, { id: useConstant(function () { return "asl-".concat(id++); }) }, children));
7269
7274
  };
7270
7275
 
7271
7276
  /**
@@ -7565,7 +7570,7 @@ function ReorderItem(_a, externalRef) {
7565
7570
  };
7566
7571
  var zIndex = useTransform([point.x, point.y], function (_a) {
7567
7572
  var _b = tslib.__read(_a, 2), latestX = _b[0], latestY = _b[1];
7568
- return latestX || latestY ? 1 : 0;
7573
+ return latestX || latestY ? 1 : "unset";
7569
7574
  });
7570
7575
  var layout = React.useRef(null);
7571
7576
  heyListen.invariant(Boolean(context), "Reorder.Item must be a child of Reorder.Group");
@@ -1944,7 +1944,7 @@
1944
1944
  }
1945
1945
  else if (typeof definition === "string") {
1946
1946
  // Else lookup from table
1947
- invariant(easingLookup[definition] !== undefined, "Invalid easing type '" + definition + "'");
1947
+ invariant(easingLookup[definition] !== undefined, "Invalid easing type '".concat(definition, "'"));
1948
1948
  return easingLookup[definition];
1949
1949
  }
1950
1950
  return definition;
@@ -2256,7 +2256,7 @@
2256
2256
  target = getZeroUnit(origin);
2257
2257
  }
2258
2258
  var isOriginAnimatable = isAnimatable(key, origin);
2259
- warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate " + key + " from \"" + origin + "\" to \"" + target + "\". " + origin + " is not an animatable value - to enable this animation set " + origin + " to a value animatable to " + target + " via the `style` property.");
2259
+ warning(isOriginAnimatable === isTargetAnimatable, "You are trying to animate ".concat(key, " from \"").concat(origin, "\" to \"").concat(target, "\". ").concat(origin, " is not an animatable value - to enable this animation set ").concat(origin, " to a value animatable to ").concat(target, " via the `style` property."));
2260
2260
  function start() {
2261
2261
  var options = {
2262
2262
  from: origin,
@@ -2392,7 +2392,7 @@
2392
2392
  * Mix border radius
2393
2393
  */
2394
2394
  for (var i = 0; i < numBorders; i++) {
2395
- var borderLabel = "border" + borders[i] + "Radius";
2395
+ var borderLabel = "border".concat(borders[i], "Radius");
2396
2396
  var followRadius = getRadius(follow, borderLabel);
2397
2397
  var leadRadius = getRadius(lead, borderLabel);
2398
2398
  if (followRadius === undefined && leadRadius === undefined)
@@ -2849,17 +2849,17 @@
2849
2849
  */
2850
2850
  var xTranslate = delta.x.translate / treeScale.x;
2851
2851
  var yTranslate = delta.y.translate / treeScale.y;
2852
- var transform = "translate3d(" + xTranslate + "px, " + yTranslate + "px, 0) ";
2852
+ var transform = "translate3d(".concat(xTranslate, "px, ").concat(yTranslate, "px, 0) ");
2853
2853
  if (latestTransform) {
2854
2854
  var rotate = latestTransform.rotate, rotateX = latestTransform.rotateX, rotateY = latestTransform.rotateY;
2855
2855
  if (rotate)
2856
- transform += "rotate(" + rotate + "deg) ";
2856
+ transform += "rotate(".concat(rotate, "deg) ");
2857
2857
  if (rotateX)
2858
- transform += "rotateX(" + rotateX + "deg) ";
2858
+ transform += "rotateX(".concat(rotateX, "deg) ");
2859
2859
  if (rotateY)
2860
- transform += "rotateY(" + rotateY + "deg) ";
2860
+ transform += "rotateY(".concat(rotateY, "deg) ");
2861
2861
  }
2862
- transform += "scale(" + delta.x.scale + ", " + delta.y.scale + ")";
2862
+ transform += "scale(".concat(delta.x.scale, ", ").concat(delta.y.scale, ")");
2863
2863
  return transform === identityProjection ? "none" : transform;
2864
2864
  }
2865
2865
 
@@ -3890,7 +3890,7 @@
3890
3890
  styles.transform = transformTemplate(valuesToRender, styles.transform);
3891
3891
  }
3892
3892
  var _g = this.projectionDelta, x = _g.x, y = _g.y;
3893
- styles.transformOrigin = x.origin * 100 + "% " + y.origin * 100 + "% 0";
3893
+ styles.transformOrigin = "".concat(x.origin * 100, "% ").concat(y.origin * 100, "% 0");
3894
3894
  if (lead.animationValues) {
3895
3895
  /**
3896
3896
  * If the lead component is animating, assign this either the entering/leaving
@@ -4096,7 +4096,7 @@
4096
4096
  }
4097
4097
  }
4098
4098
  var searchElement = searchNode && searchNode !== node.root ? searchNode.instance : document;
4099
- var element = searchElement.querySelector("[data-projection-id=\"" + id + "\"]");
4099
+ var element = searchElement.querySelector("[data-projection-id=\"".concat(id, "\"]"));
4100
4100
  if (element)
4101
4101
  node.mount(element, true);
4102
4102
  }
@@ -4277,6 +4277,9 @@
4277
4277
  if (customMotionComponentConfig === void 0) { customMotionComponentConfig = {}; }
4278
4278
  return createMotionComponent(createConfig(Component, customMotionComponentConfig));
4279
4279
  }
4280
+ if (typeof Proxy === "undefined") {
4281
+ return custom;
4282
+ }
4280
4283
  /**
4281
4284
  * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.
4282
4285
  * Rather than generating them anew every render.
@@ -4393,7 +4396,7 @@
4393
4396
  var numTransformKeys = transformKeys.length;
4394
4397
  for (var i = 0; i < numTransformKeys; i++) {
4395
4398
  var key = transformKeys[i];
4396
- transformString += (translateAlias[key] || key) + "(" + transform[key] + ") ";
4399
+ transformString += "".concat(translateAlias[key] || key, "(").concat(transform[key], ") ");
4397
4400
  if (key === "z")
4398
4401
  transformHasZ = true;
4399
4402
  }
@@ -4419,7 +4422,7 @@
4419
4422
  */
4420
4423
  function buildTransformOrigin(_a) {
4421
4424
  var _b = _a.originX, originX = _b === void 0 ? "50%" : _b, _c = _a.originY, originY = _c === void 0 ? "50%" : _c, _d = _a.originZ, originZ = _d === void 0 ? 0 : _d;
4422
- return originX + " " + originY + " " + originZ;
4425
+ return "".concat(originX, " ").concat(originY, " ").concat(originZ);
4423
4426
  }
4424
4427
 
4425
4428
  /**
@@ -4553,7 +4556,7 @@
4553
4556
  style.touchAction =
4554
4557
  props.drag === true
4555
4558
  ? "none"
4556
- : "pan-" + (props.drag === "x" ? "y" : "x");
4559
+ : "pan-".concat(props.drag === "x" ? "y" : "x");
4557
4560
  }
4558
4561
  htmlProps.style = style;
4559
4562
  return htmlProps;
@@ -4668,7 +4671,9 @@
4668
4671
  for (var key in props) {
4669
4672
  if (shouldForward(key) ||
4670
4673
  (forwardMotionProps === true && isValidMotionProp(key)) ||
4671
- (!isDom && !isValidMotionProp(key))) {
4674
+ (!isDom && !isValidMotionProp(key)) ||
4675
+ // If trying to use native HTML drag events, forward drag listeners
4676
+ (props["draggable"] && key.startsWith("onDrag"))) {
4672
4677
  filteredProps[key] = props[key];
4673
4678
  }
4674
4679
  }
@@ -4687,7 +4692,7 @@
4687
4692
  function calcSVGTransformOrigin(dimensions, originX, originY) {
4688
4693
  var pxOriginX = calcOrigin$1(originX, dimensions.x, dimensions.width);
4689
4694
  var pxOriginY = calcOrigin$1(originY, dimensions.y, dimensions.height);
4690
- return pxOriginX + " " + pxOriginY;
4695
+ return "".concat(pxOriginX, " ").concat(pxOriginY);
4691
4696
  }
4692
4697
 
4693
4698
  var dashKeys = {
@@ -4719,7 +4724,7 @@
4719
4724
  // Build the dash array
4720
4725
  var pathLength = px.transform(length);
4721
4726
  var pathSpacing = px.transform(spacing);
4722
- attrs[keys.array] = pathLength + " " + pathSpacing;
4727
+ attrs[keys.array] = "".concat(pathLength, " ").concat(pathSpacing);
4723
4728
  }
4724
4729
 
4725
4730
  /**
@@ -7489,7 +7494,7 @@
7489
7494
  var maxDepth = 4;
7490
7495
  function getVariableValue(current, element, depth) {
7491
7496
  if (depth === void 0) { depth = 1; }
7492
- invariant(depth <= maxDepth, "Max CSS variable fallback depth detected in property \"" + current + "\". This may indicate a circular fallback dependency.");
7497
+ invariant(depth <= maxDepth, "Max CSS variable fallback depth detected in property \"".concat(current, "\". This may indicate a circular fallback dependency."));
7493
7498
  var _a = __read(parseCSSVariable(current), 2), token = _a[0], fallback = _a[1];
7494
7499
  // No CSS variable detected
7495
7500
  if (!token)
@@ -7516,7 +7521,7 @@
7516
7521
  var _b;
7517
7522
  var target = __rest(_a, []);
7518
7523
  var element = visualElement.getInstance();
7519
- if (!(element instanceof HTMLElement))
7524
+ if (!(element instanceof Element))
7520
7525
  return { target: target, transitionEnd: transitionEnd };
7521
7526
  // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`
7522
7527
  // only if they change but I think this reads clearer and this isn't a performance-critical path.
@@ -7963,7 +7968,7 @@
7963
7968
  */
7964
7969
  var x = pixelsToPercent(latest, node.target.x);
7965
7970
  var y = pixelsToPercent(latest, node.target.y);
7966
- return x + "% " + y + "%";
7971
+ return "".concat(x, "% ").concat(y, "%");
7967
7972
  },
7968
7973
  };
7969
7974
 
@@ -8295,7 +8300,7 @@
8295
8300
  var key = getChildKey(child);
8296
8301
  if (seenChildren) {
8297
8302
  if (seenChildren.has(key)) {
8298
- console.warn("Children of AnimatePresence require unique keys. \"" + key + "\" is a duplicate.");
8303
+ console.warn("Children of AnimatePresence require unique keys. \"".concat(key, "\" is a duplicate."));
8299
8304
  }
8300
8305
  seenChildren.add(key);
8301
8306
  }
@@ -8495,7 +8500,7 @@
8495
8500
  var id = 0;
8496
8501
  var AnimateSharedLayout = function (_a) {
8497
8502
  var children = _a.children;
8498
- return (React__namespace.createElement(LayoutGroup, { id: useConstant(function () { return "asl-" + id++; }) }, children));
8503
+ return (React__namespace.createElement(LayoutGroup, { id: useConstant(function () { return "asl-".concat(id++); }) }, children));
8499
8504
  };
8500
8505
 
8501
8506
  /**
@@ -8795,7 +8800,7 @@
8795
8800
  };
8796
8801
  var zIndex = useTransform([point.x, point.y], function (_a) {
8797
8802
  var _b = __read(_a, 2), latestX = _b[0], latestY = _b[1];
8798
- return latestX || latestY ? 1 : 0;
8803
+ return latestX || latestY ? 1 : "unset";
8799
8804
  });
8800
8805
  var layout = React.useRef(null);
8801
8806
  invariant(Boolean(context), "Reorder.Item must be a child of Reorder.Group");