@tamagui/core 1.126.15 → 1.126.16

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.
@@ -11793,15 +11793,20 @@ if (import_constants.isClient && rAF) {
11793
11793
  }
11794
11794
  }
11795
11795
  }, layoutOnAnimationFrame = function() {
11796
- status !== "inactive" && Nodes.forEach(updateLayoutIfChanged), rAF(layoutOnAnimationFrame);
11796
+ var now = Date.now(), timeSinceLastFrame = now - lastFrameAt;
11797
+ if (lastFrameAt = now, status !== "inactive") {
11798
+ var expectedFrameTime = 16.67, hasRecentSyncWork = timeSinceLastFrame > expectedFrameTime * numDroppedFramesUntilPause;
11799
+ hasRecentSyncWork || Nodes.forEach(updateLayoutIfChanged);
11800
+ }
11801
+ rAF(layoutOnAnimationFrame);
11797
11802
  };
11798
- updateLayoutIfChanged2 = updateLayoutIfChanged, layoutOnAnimationFrame2 = layoutOnAnimationFrame, avoidUpdates = !0, queuedUpdates = /* @__PURE__ */ new Map(), (0, import_web.___onDidFinishClientRender)(function() {
11803
+ updateLayoutIfChanged2 = updateLayoutIfChanged, layoutOnAnimationFrame2 = layoutOnAnimationFrame, avoidUpdates = !0, queuedUpdates = /* @__PURE__ */ new Map(), lastFrameAt = Date.now(), numDroppedFramesUntilPause = 2, (0, import_web.___onDidFinishClientRender)(function() {
11799
11804
  avoidUpdates = !1, queuedUpdates && (queuedUpdates.forEach(function(cb) {
11800
11805
  return cb();
11801
11806
  }), queuedUpdates.clear());
11802
11807
  }), rAF(layoutOnAnimationFrame);
11803
11808
  }
11804
- var avoidUpdates, queuedUpdates, updateLayoutIfChanged2, layoutOnAnimationFrame2, getElementLayoutEvent = function(target) {
11809
+ var avoidUpdates, queuedUpdates, lastFrameAt, numDroppedFramesUntilPause, updateLayoutIfChanged2, layoutOnAnimationFrame2, getElementLayoutEvent = function(target) {
11805
11810
  var res = null;
11806
11811
  if (measureLayout(target, null, function(x, y, width, height, left, top) {
11807
11812
  res = {