motion-dom 12.28.1 → 12.29.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/dist/cjs/index.js CHANGED
@@ -3547,7 +3547,6 @@ const numberValueTypes = {
3547
3547
  borderBottomWidth: px,
3548
3548
  borderLeftWidth: px,
3549
3549
  borderRadius: px,
3550
- radius: px,
3551
3550
  borderTopLeftRadius: px,
3552
3551
  borderTopRightRadius: px,
3553
3552
  borderBottomRightRadius: px,
@@ -3591,6 +3590,8 @@ const numberValueTypes = {
3591
3590
  marginInline: px,
3592
3591
  marginInlineStart: px,
3593
3592
  marginInlineEnd: px,
3593
+ // Typography
3594
+ fontSize: px,
3594
3595
  // Misc
3595
3596
  backgroundPositionX: px,
3596
3597
  backgroundPositionY: px,
@@ -3802,7 +3803,6 @@ const pxValues = new Set([
3802
3803
  "borderBottomWidth",
3803
3804
  "borderLeftWidth",
3804
3805
  "borderRadius",
3805
- "radius",
3806
3806
  "borderTopLeftRadius",
3807
3807
  "borderTopRightRadius",
3808
3808
  "borderBottomRightRadius",
@@ -3846,6 +3846,8 @@ const pxValues = new Set([
3846
3846
  "marginInline",
3847
3847
  "marginInlineStart",
3848
3848
  "marginInlineEnd",
3849
+ // Typography
3850
+ "fontSize",
3849
3851
  // Misc
3850
3852
  "backgroundPositionX",
3851
3853
  "backgroundPositionY",
@@ -7338,17 +7340,30 @@ class NodeStack {
7338
7340
  if (prevLead) {
7339
7341
  prevLead.instance && prevLead.scheduleRender();
7340
7342
  node.scheduleRender();
7341
- node.resumeFrom = prevLead;
7342
- if (preserveFollowOpacity) {
7343
- node.resumeFrom.preserveOpacity = true;
7344
- }
7345
- if (prevLead.snapshot) {
7346
- node.snapshot = prevLead.snapshot;
7347
- node.snapshot.latestValues =
7348
- prevLead.animationValues || prevLead.latestValues;
7349
- }
7350
- if (node.root && node.root.isUpdating) {
7351
- node.isLayoutDirty = true;
7343
+ /**
7344
+ * If both the new and previous lead have the same defined layoutDependency,
7345
+ * skip the shared layout animation. This allows components with layoutId
7346
+ * to opt-out of animations when their layoutDependency hasn't changed,
7347
+ * even when the component unmounts and remounts in a different location.
7348
+ */
7349
+ const prevDep = prevLead.options.layoutDependency;
7350
+ const nextDep = node.options.layoutDependency;
7351
+ const dependencyMatches = prevDep !== undefined &&
7352
+ nextDep !== undefined &&
7353
+ prevDep === nextDep;
7354
+ if (!dependencyMatches) {
7355
+ node.resumeFrom = prevLead;
7356
+ if (preserveFollowOpacity) {
7357
+ node.resumeFrom.preserveOpacity = true;
7358
+ }
7359
+ if (prevLead.snapshot) {
7360
+ node.snapshot = prevLead.snapshot;
7361
+ node.snapshot.latestValues =
7362
+ prevLead.animationValues || prevLead.latestValues;
7363
+ }
7364
+ if (node.root && node.root.isUpdating) {
7365
+ node.isLayoutDirty = true;
7366
+ }
7352
7367
  }
7353
7368
  const { crossfade } = node.options;
7354
7369
  if (crossfade === false) {