framer-motion 12.19.1 → 12.19.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 create = require('./create-lTyurnU-.js');
5
+ var create = require('./create-C4jfsA_8.js');
6
6
  require('motion-dom');
7
7
  require('motion-utils');
8
8
  require('react/jsx-runtime');
@@ -957,6 +957,7 @@ function createProjectionNode$1({ attachResizeListener, defaultParent, measureSc
957
957
  * An id that represents a unique session instigated by startUpdate.
958
958
  */
959
959
  this.animationId = 0;
960
+ this.animationCommitId = 0;
960
961
  /**
961
962
  * A Set containing all this component's children. This is used to iterate
962
963
  * through the children.
@@ -1315,9 +1316,17 @@ function createProjectionNode$1({ attachResizeListener, defaultParent, measureSc
1315
1316
  this.nodes.forEach(clearMeasurements);
1316
1317
  return;
1317
1318
  }
1319
+ /**
1320
+ * If this is a repeat of didUpdate then ignore the animation.
1321
+ */
1322
+ if (this.animationId <= this.animationCommitId) {
1323
+ this.nodes.forEach(clearIsLayoutDirty);
1324
+ return;
1325
+ }
1318
1326
  if (!this.isUpdating) {
1319
1327
  this.nodes.forEach(clearIsLayoutDirty);
1320
1328
  }
1329
+ this.animationCommitId = this.animationId;
1321
1330
  this.isUpdating = false;
1322
1331
  /**
1323
1332
  * Write
package/dist/cjs/index.js CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var React = require('react');
7
- var create = require('./create-lTyurnU-.js');
7
+ var create = require('./create-C4jfsA_8.js');
8
8
  var motionDom = require('motion-dom');
9
9
  var motionUtils = require('motion-utils');
10
10
 
@@ -71,6 +71,7 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
71
71
  * An id that represents a unique session instigated by startUpdate.
72
72
  */
73
73
  this.animationId = 0;
74
+ this.animationCommitId = 0;
74
75
  /**
75
76
  * A Set containing all this component's children. This is used to iterate
76
77
  * through the children.
@@ -429,9 +430,17 @@ function createProjectionNode({ attachResizeListener, defaultParent, measureScro
429
430
  this.nodes.forEach(clearMeasurements);
430
431
  return;
431
432
  }
433
+ /**
434
+ * If this is a repeat of didUpdate then ignore the animation.
435
+ */
436
+ if (this.animationId <= this.animationCommitId) {
437
+ this.nodes.forEach(clearIsLayoutDirty);
438
+ return;
439
+ }
432
440
  if (!this.isUpdating) {
433
441
  this.nodes.forEach(clearIsLayoutDirty);
434
442
  }
443
+ this.animationCommitId = this.animationId;
435
444
  this.isUpdating = false;
436
445
  /**
437
446
  * Write
@@ -6244,6 +6244,7 @@
6244
6244
  * An id that represents a unique session instigated by startUpdate.
6245
6245
  */
6246
6246
  this.animationId = 0;
6247
+ this.animationCommitId = 0;
6247
6248
  /**
6248
6249
  * A Set containing all this component's children. This is used to iterate
6249
6250
  * through the children.
@@ -6602,9 +6603,17 @@
6602
6603
  this.nodes.forEach(clearMeasurements);
6603
6604
  return;
6604
6605
  }
6606
+ /**
6607
+ * If this is a repeat of didUpdate then ignore the animation.
6608
+ */
6609
+ if (this.animationId <= this.animationCommitId) {
6610
+ this.nodes.forEach(clearIsLayoutDirty);
6611
+ return;
6612
+ }
6605
6613
  if (!this.isUpdating) {
6606
6614
  this.nodes.forEach(clearIsLayoutDirty);
6607
6615
  }
6616
+ this.animationCommitId = this.animationId;
6608
6617
  this.isUpdating = false;
6609
6618
  /**
6610
6619
  * Write