@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.
- package/dist/cjs/hooks/useElementLayout.cjs +5 -1
- package/dist/cjs/hooks/useElementLayout.js +4 -1
- package/dist/cjs/hooks/useElementLayout.js.map +1 -1
- package/dist/cjs/hooks/useElementLayout.native.js +7 -2
- package/dist/cjs/hooks/useElementLayout.native.js.map +2 -2
- package/dist/esm/hooks/useElementLayout.js +4 -1
- package/dist/esm/hooks/useElementLayout.js.map +1 -1
- package/dist/esm/hooks/useElementLayout.mjs +5 -1
- package/dist/esm/hooks/useElementLayout.mjs.map +1 -1
- package/dist/esm/hooks/useElementLayout.native.js +11 -2
- package/dist/esm/hooks/useElementLayout.native.js.map +1 -1
- package/dist/native.js +8 -3
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +8 -3
- package/dist/test.native.js.map +2 -2
- package/package.json +7 -7
- package/src/hooks/useElementLayout.tsx +16 -1
- package/types/hooks/useElementLayout.d.ts.map +1 -1
package/dist/test.native.js
CHANGED
|
@@ -11793,15 +11793,20 @@ if (import_constants.isClient && rAF) {
|
|
|
11793
11793
|
}
|
|
11794
11794
|
}
|
|
11795
11795
|
}, layoutOnAnimationFrame = function() {
|
|
11796
|
-
|
|
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 = {
|