framer-motion 12.24.0 → 12.24.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/m.js CHANGED
@@ -369,6 +369,15 @@ function buildSVGPath(attrs, length, spacing = 1, offset = 0, useDashCase = true
369
369
  attrs[keys.array] = `${pathLength} ${pathSpacing}`;
370
370
  }
371
371
 
372
+ /**
373
+ * CSS Motion Path properties that should remain as CSS styles on SVG elements.
374
+ */
375
+ const cssMotionPathProperties = [
376
+ "offsetDistance",
377
+ "offsetPath",
378
+ "offsetRotate",
379
+ "offsetAnchor",
380
+ ];
372
381
  /**
373
382
  * Build SVG visual attributes, like cx and style.transform
374
383
  */
@@ -409,6 +418,12 @@ function buildSVGAttrs(state, { attrX, attrY, attrScale, pathLength, pathSpacing
409
418
  style.transformBox = styleProp?.transformBox ?? "fill-box";
410
419
  delete attrs.transformBox;
411
420
  }
421
+ for (const key of cssMotionPathProperties) {
422
+ if (attrs[key] !== undefined) {
423
+ style[key] = attrs[key];
424
+ delete attrs[key];
425
+ }
426
+ }
412
427
  // Render attrX/attrY/attrScale as attributes
413
428
  if (attrX !== undefined)
414
429
  attrs.x = attrX;