framer-motion 12.24.0 → 12.24.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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var featureBundle = require('./feature-bundle-DhbxBqkJ.js');
5
+ var featureBundle = require('./feature-bundle-DBjkFz2c.js');
6
6
  require('react');
7
7
  require('motion-dom');
8
8
  require('motion-utils');
package/dist/cjs/dom.js CHANGED
@@ -1676,6 +1676,15 @@ function buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true
1676
1676
  attrs[keys.array] = `${pathLength} ${pathSpacing}`;
1677
1677
  }
1678
1678
 
1679
+ /**
1680
+ * CSS Motion Path properties that should remain as CSS styles on SVG elements.
1681
+ */
1682
+ const cssMotionPathProperties = [
1683
+ "offsetDistance",
1684
+ "offsetPath",
1685
+ "offsetRotate",
1686
+ "offsetAnchor",
1687
+ ];
1679
1688
  /**
1680
1689
  * Build SVG visual attributes, like cx and style.transform
1681
1690
  */
@@ -1716,6 +1725,12 @@ function buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing
1716
1725
  style.transformBox = styleProp?.transformBox ?? "fill-box";
1717
1726
  delete attrs.transformBox;
1718
1727
  }
1728
+ for (const key of cssMotionPathProperties) {
1729
+ if (attrs[key] !== undefined) {
1730
+ style[key] = attrs[key];
1731
+ delete attrs[key];
1732
+ }
1733
+ }
1719
1734
  // Render attrX/attrY/attrScale as attributes
1720
1735
  if (attrX !== undefined)
1721
1736
  attrs.x = attrX;