peachsim 0.1.761 → 0.1.763
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/README.md +5 -0
- package/cli/bridge-flow-runner.ts +3 -4
- package/cli/commands/inspect/settling.ts +193 -162
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/agent-identity.cjs +1 -1
- package/dist-lib/agent-sessions.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cli-constants.cjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1 -1
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +44 -37
- package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +191 -159
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +1 -1
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/render-mode.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +191 -159
- package/dist-lib/sdk.mjs +191 -159
- package/dist-lib/skills.cjs +240 -202
- package/dist-lib/swift-compile.cjs +1 -1
- package/dist-lib/swift-compile.mjs +1 -1
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +1 -1
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1 -1
- package/dist-lib/vite.cjs +1 -1
- package/package.json +1 -1
package/dist-lib/home-paths.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1160,6 +1160,43 @@ function iosDevice(spec) {
|
|
|
1160
1160
|
modelName: spec.name
|
|
1161
1161
|
};
|
|
1162
1162
|
}
|
|
1163
|
+
function ipadProDevice(model, name2, width, height, diagonalInches) {
|
|
1164
|
+
return iosDevice({
|
|
1165
|
+
model,
|
|
1166
|
+
name: name2,
|
|
1167
|
+
// iPad Pro 11-inch (M5) 12GB, iOS 27.0, simulator DBD4B183, UIKit probe
|
|
1168
|
+
// scenario `metrics`. portrait UIScreen.bounds 834×1210, scale 2,
|
|
1169
|
+
// nativeBounds 1668×2420. the window matched the screen.
|
|
1170
|
+
width,
|
|
1171
|
+
height,
|
|
1172
|
+
scale: 2,
|
|
1173
|
+
// portrait statusBarFrame was 834×32 at the top, and safeAreaInsets.top
|
|
1174
|
+
// was 32. landscape statusBarFrame stayed 32 tall while safeAreaInsets.top
|
|
1175
|
+
// was 10; this field is the portrait bar.
|
|
1176
|
+
statusBarHeight: 32,
|
|
1177
|
+
landscapeStatusBarHeight: 32,
|
|
1178
|
+
// portrait and landscape safeAreaInsets.bottom were both 20. the probe
|
|
1179
|
+
// has no separate home-indicator height.
|
|
1180
|
+
homeIndicatorHeight: 20,
|
|
1181
|
+
// UIScreen _displayCornerRadius, both orientations. the framebuffer
|
|
1182
|
+
// mask's tangent extent was not measured separately.
|
|
1183
|
+
cornerRadius: cornerRadii(30),
|
|
1184
|
+
continuousCornerRadius: cornerRadii(30),
|
|
1185
|
+
// housing is unsourced. the frame is the display until it is measured.
|
|
1186
|
+
frameInsets: uniformFrameInsets(0),
|
|
1187
|
+
dynamicIsland: null,
|
|
1188
|
+
// portrait safeAreaInsets. landscape was top 10, left 0, bottom 20, right 0.
|
|
1189
|
+
safeAreaInsets: { top: 32, bottom: 20, left: 0, right: 0 },
|
|
1190
|
+
iosVersion: "27.0",
|
|
1191
|
+
// portrait docked keyboard, UIKeyboardFrameEndUserInfoKey
|
|
1192
|
+
// {0, 870, 834, 340}. landscape posted a zero-height frame.
|
|
1193
|
+
keyboardPanelHeights: { qwerty: 333, pad: 333, emoji: 427 },
|
|
1194
|
+
// hypot(1668, 2420) / 11, measured native pixels over the device type's
|
|
1195
|
+
// 11-inch name. not a separate density read.
|
|
1196
|
+
physicalPPI: Math.hypot(width * 2, height * 2) / diagonalInches,
|
|
1197
|
+
hardwareButtons: modernButtons([0, 0], [0, 0], [0, 0], [0, 0])
|
|
1198
|
+
});
|
|
1199
|
+
}
|
|
1163
1200
|
function resolveDevicePosture(model, posture) {
|
|
1164
1201
|
const supported = devices[model].supportedPostures;
|
|
1165
1202
|
return posture && supported?.includes(posture) ? posture : supported?.[0] ?? "closed";
|
|
@@ -1210,7 +1247,7 @@ function rotateDevice(device, side) {
|
|
|
1210
1247
|
const barrelProtrusion = device.housing?.hingeBarrel?.protrusion ?? 0;
|
|
1211
1248
|
if (side === "left") insets.top += barrelProtrusion;
|
|
1212
1249
|
else insets.bottom += barrelProtrusion;
|
|
1213
|
-
const safeArea = device
|
|
1250
|
+
const safeArea = isPadIdiom(device) ? { top: 10, bottom: 20, left: 0, right: 0 } : device.model === "iphone-duo" ? { top: 0, bottom: 34, left: 0, right: 84 } : device.platform === "ios" && device.homeIndicatorHeight > 0 ? {
|
|
1214
1251
|
top: 0,
|
|
1215
1252
|
bottom: 20,
|
|
1216
1253
|
left: device.safeAreaInsets.top,
|
|
@@ -1253,6 +1290,9 @@ function rotateDevice(device, side) {
|
|
|
1253
1290
|
function defaultLandscapeSide(model, posture) {
|
|
1254
1291
|
return model === "iphone-duo" && resolveDevicePosture(model, posture) === "closed" ? "right" : "left";
|
|
1255
1292
|
}
|
|
1293
|
+
function isPadIdiom(spec) {
|
|
1294
|
+
return spec.model === "ipad-pro-11" || spec.model === "ipad-pro-13";
|
|
1295
|
+
}
|
|
1256
1296
|
function getDevice(model, posture, orientation, landscapeSide) {
|
|
1257
1297
|
const device = devices[model];
|
|
1258
1298
|
const side = landscapeSide ?? defaultLandscapeSide(model, posture);
|
|
@@ -1829,42 +1869,9 @@ var init_devices = __esm({
|
|
|
1829
1869
|
// frame and hardware buttons are not sourced yet, so this stays off the
|
|
1830
1870
|
// shipping picker the same way the duo does.
|
|
1831
1871
|
developmentOnly: true,
|
|
1832
|
-
...
|
|
1833
|
-
model: "ipad-pro-11",
|
|
1834
|
-
name: "iPad Pro 11-inch (M5)",
|
|
1835
|
-
// iPad Pro 11-inch (M5) 12GB, iOS 27.0, simulator DBD4B183, UIKit probe
|
|
1836
|
-
// scenario `metrics`. portrait UIScreen.bounds 834×1210, scale 2,
|
|
1837
|
-
// nativeBounds 1668×2420. the window matched the screen.
|
|
1838
|
-
width: 834,
|
|
1839
|
-
height: 1210,
|
|
1840
|
-
scale: 2,
|
|
1841
|
-
// portrait statusBarFrame was 834×32 at the top, and safeAreaInsets.top
|
|
1842
|
-
// was 32. landscape statusBarFrame stayed 32 tall while safeAreaInsets.top
|
|
1843
|
-
// was 10; this field is the portrait bar.
|
|
1844
|
-
statusBarHeight: 32,
|
|
1845
|
-
landscapeStatusBarHeight: 32,
|
|
1846
|
-
// portrait and landscape safeAreaInsets.bottom were both 20. the probe
|
|
1847
|
-
// has no separate home-indicator height.
|
|
1848
|
-
homeIndicatorHeight: 20,
|
|
1849
|
-
// UIScreen _displayCornerRadius, both orientations. the framebuffer
|
|
1850
|
-
// mask's tangent extent was not measured separately.
|
|
1851
|
-
cornerRadius: cornerRadii(30),
|
|
1852
|
-
continuousCornerRadius: cornerRadii(30),
|
|
1853
|
-
// housing is unsourced. the frame is the display until it is measured.
|
|
1854
|
-
frameInsets: uniformFrameInsets(0),
|
|
1855
|
-
dynamicIsland: null,
|
|
1856
|
-
// portrait safeAreaInsets. landscape was top 10, left 0, bottom 20, right 0.
|
|
1857
|
-
safeAreaInsets: { top: 32, bottom: 20, left: 0, right: 0 },
|
|
1858
|
-
iosVersion: "27.0",
|
|
1859
|
-
// portrait docked keyboard, UIKeyboardFrameEndUserInfoKey
|
|
1860
|
-
// {0, 870, 834, 340}. landscape posted a zero-height frame.
|
|
1861
|
-
keyboardPanelHeights: { qwerty: 333, pad: 333, emoji: 427 },
|
|
1862
|
-
// hypot(1668, 2420) / 11, measured native pixels over the device type's
|
|
1863
|
-
// 11-inch name. not a separate density read.
|
|
1864
|
-
physicalPPI: 267.19578360606573,
|
|
1865
|
-
hardwareButtons: modernButtons([0, 0], [0, 0], [0, 0], [0, 0])
|
|
1866
|
-
})
|
|
1872
|
+
...ipadProDevice("ipad-pro-11", "iPad Pro 11-inch (M5)", 834, 1210, 11)
|
|
1867
1873
|
},
|
|
1874
|
+
"ipad-pro-13": ipadProDevice("ipad-pro-13", "iPad Pro 13-inch (M5)", 1032, 1376, 13),
|
|
1868
1875
|
"pixel-8": {
|
|
1869
1876
|
model: "pixel-8",
|
|
1870
1877
|
platform: "android",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -3268,179 +3268,211 @@ async function waitForSootsimIdle({
|
|
|
3268
3268
|
const start = Date.now()
|
|
3269
3269
|
const deadline = start + ${Math.max(0, Math.round(maxMs))}
|
|
3270
3270
|
const pollMs = ${Math.max(1, Math.round(pollMs))}
|
|
3271
|
-
const requiredStillMs = ${Math.max(1, Math.round(stablePolls)) * Math.max(1, Math.round(pollMs))}
|
|
3272
|
-
const minimumStablePolls = ${Math.min(2, Math.max(1, Math.round(stablePolls)))}
|
|
3273
3271
|
const strict = ${strict ? "true" : "false"}
|
|
3274
3272
|
const paintStill = ${paintStill ? "true" : "false"}
|
|
3273
|
+
const requiredStillMs = paintStill ? 0 : ${Math.max(1, Math.round(stablePolls)) * Math.max(1, Math.round(pollMs))}
|
|
3274
|
+
const minimumStablePolls = paintStill ? 1 : ${Math.min(2, Math.max(1, Math.round(stablePolls)))}
|
|
3275
3275
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
//
|
|
3281
|
-
//
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3276
|
+
const composite = paintStill ? window.SootSim?.bridges?.liveComposite : null
|
|
3277
|
+
if (paintStill && !composite) {
|
|
3278
|
+
return { settled: false, elapsed: Date.now() - start, blockedBy: 'screen pixels unavailable' }
|
|
3279
|
+
}
|
|
3280
|
+
// subscribe to presented frames; authoritative screenshots force a
|
|
3281
|
+
// worker render, which changes the very counter we used to inspect.
|
|
3282
|
+
const unsubscribe = composite?.subscribe(() => {})
|
|
3283
|
+
let pixelFrameToken = -1
|
|
3284
|
+
let screenPixels = null
|
|
3285
3285
|
try {
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3286
|
+
|
|
3287
|
+
// route-aware settle: a tap that pushes/pops a screen is async \u2014 the
|
|
3288
|
+
// old screen still renders for a moment, then the new one mounts and
|
|
3289
|
+
// its content loads. a pure layout-hash check reports "idle" on the
|
|
3290
|
+
// outgoing screen or on the incoming skeleton, so a driver re-taps
|
|
3291
|
+
// and stacks duplicate navigations. drain any in-flight screen
|
|
3292
|
+
// transition FIRST, bounded by the overall budget. when no
|
|
3293
|
+
// transition is happening this returns in ~80ms (startWindowMs), so
|
|
3294
|
+
// a plain button tap barely pays for it.
|
|
3295
|
+
try {
|
|
3296
|
+
const wfst = window.__sootsimTest?.waitForScreenTransitions
|
|
3297
|
+
if (typeof wfst === 'function') {
|
|
3298
|
+
const remaining = deadline - Date.now()
|
|
3299
|
+
if (remaining > 120) {
|
|
3300
|
+
await wfst({
|
|
3301
|
+
timeoutMs: Math.min(remaining - 80, 4000),
|
|
3302
|
+
settleMs: 64,
|
|
3303
|
+
startWindowMs: 80,
|
|
3304
|
+
})
|
|
3305
|
+
}
|
|
3295
3306
|
}
|
|
3296
|
-
}
|
|
3297
|
-
} catch {}
|
|
3307
|
+
} catch {}
|
|
3298
3308
|
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3309
|
+
const readSnapshot = async () => {
|
|
3310
|
+
let animating = false
|
|
3311
|
+
let layoutDirty = false
|
|
3312
|
+
let pendingFetches = 0
|
|
3313
|
+
let requestTotal = 0
|
|
3314
|
+
let requestInFlight = 0
|
|
3315
|
+
let renderStatsAvailable = false
|
|
3316
|
+
let shellAnimating = false
|
|
3317
|
+
// strict also waits out shell motion: a system alert, sheet or menu
|
|
3318
|
+
// animates in the shell worker while the app's own stats read still,
|
|
3319
|
+
// so its presentation is complete only once the shell's list empties.
|
|
3320
|
+
if (strict) {
|
|
3321
|
+
try {
|
|
3322
|
+
const motion = await window.__sootsimTest?.listAnimations?.()
|
|
3323
|
+
shellAnimating = Array.isArray(motion) && motion.some((anim) => anim.realm === 'shell')
|
|
3324
|
+
} catch {}
|
|
3325
|
+
}
|
|
3312
3326
|
try {
|
|
3313
|
-
const
|
|
3314
|
-
|
|
3327
|
+
const stats = await window.__sootsimRenderHost?.queryStats?.()
|
|
3328
|
+
if (stats) {
|
|
3329
|
+
renderStatsAvailable = true
|
|
3330
|
+
animating =
|
|
3331
|
+
stats.hasActiveAnims === true ||
|
|
3332
|
+
stats.hasActiveNativeAnimations === true ||
|
|
3333
|
+
stats.hasPendingAnimationFrames === true
|
|
3334
|
+
layoutDirty =
|
|
3335
|
+
stats.layoutDirty === true && stats.renderRequested === true
|
|
3336
|
+
// a freshly-pushed screen showing a skeleton is layout-stable
|
|
3337
|
+
// but not actually settled \u2014 its data/images are still in
|
|
3338
|
+
// flight. treat bounded image-loader fetches as not-idle so
|
|
3339
|
+
// settle waits for real content, capped by the budget.
|
|
3340
|
+
const pf = stats.memory && stats.memory.imageLoader
|
|
3341
|
+
? stats.memory.imageLoader.pendingFetches
|
|
3342
|
+
: 0
|
|
3343
|
+
pendingFetches = typeof pf === 'number' ? pf : 0
|
|
3344
|
+
}
|
|
3315
3345
|
} catch {}
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
// settle waits for real content, capped by the budget.
|
|
3332
|
-
const pf = stats.memory && stats.memory.imageLoader
|
|
3333
|
-
? stats.memory.imageLoader.pendingFetches
|
|
3334
|
-
: 0
|
|
3335
|
-
pendingFetches = typeof pf === 'number' ? pf : 0
|
|
3346
|
+
try {
|
|
3347
|
+
const counts = await window.__sootsimTest?.getRequestCounts?.()
|
|
3348
|
+
requestTotal = typeof counts?.total === 'number' ? counts.total : 0
|
|
3349
|
+
requestInFlight = typeof counts?.inFlight === 'number' ? counts.inFlight : 0
|
|
3350
|
+
} catch {}
|
|
3351
|
+
const root = window.__sootsimRoot
|
|
3352
|
+
const nodes = []
|
|
3353
|
+
if (root) {
|
|
3354
|
+
const walk = (n) => {
|
|
3355
|
+
if (n.layout && n.layout.width > 0) {
|
|
3356
|
+
nodes.push(Math.round(n.layout.x) + ',' + Math.round(n.layout.y) + ',' + Math.round(n.layout.width))
|
|
3357
|
+
}
|
|
3358
|
+
for (const c of n.children || []) walk(c)
|
|
3359
|
+
}
|
|
3360
|
+
walk(root)
|
|
3336
3361
|
}
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
if (n.layout && n.layout.width > 0) {
|
|
3348
|
-
nodes.push(Math.round(n.layout.x) + ',' + Math.round(n.layout.y) + ',' + Math.round(n.layout.width))
|
|
3362
|
+
if (paintStill) {
|
|
3363
|
+
const canvas = composite.getCanvas()
|
|
3364
|
+
const token = composite.getFrameToken()
|
|
3365
|
+
if (!canvas || canvas.width <= 1 || canvas.height <= 1) {
|
|
3366
|
+
screenPixels = null
|
|
3367
|
+
} else if (token !== pixelFrameToken || canvas.width !== screenPixels?.width || canvas.height !== screenPixels?.height) {
|
|
3368
|
+
const context = canvas.getContext('2d')
|
|
3369
|
+
const image = context?.getImageData(0, 0, canvas.width, canvas.height)
|
|
3370
|
+
screenPixels = image ? { width: image.width, height: image.height, data: new Uint32Array(image.data.buffer) } : null
|
|
3371
|
+
pixelFrameToken = token
|
|
3349
3372
|
}
|
|
3350
|
-
for (const c of n.children || []) walk(c)
|
|
3351
3373
|
}
|
|
3352
|
-
|
|
3374
|
+
return { layout: nodes.join(';'), screenPixels, animating, shellAnimating, layoutDirty, pendingFetches, renderStatsAvailable, requestTotal, requestInFlight }
|
|
3353
3375
|
}
|
|
3354
|
-
return { layout: nodes.join(';'), frameCount, animating, shellAnimating, layoutDirty, pendingFetches, renderStatsAvailable, requestTotal, requestInFlight }
|
|
3355
|
-
}
|
|
3356
3376
|
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
if (polls > 1 && snapshot.layout !== lastLayout) layoutChangedPolls++
|
|
3387
|
-
const painted = paintStill && snapshot.frameCount !== lastFrameCount
|
|
3388
|
-
if (polls > 1 && painted) paintedPolls++
|
|
3389
|
-
const strictOk =
|
|
3390
|
-
!strict ||
|
|
3391
|
-
(snapshot.renderStatsAvailable &&
|
|
3392
|
-
!snapshot.animating &&
|
|
3393
|
-
!snapshot.shellAnimating &&
|
|
3394
|
-
!snapshot.layoutDirty)
|
|
3395
|
-
// visually settled: no animations, no image content loading, layout
|
|
3396
|
-
// unchanged since the last poll.
|
|
3397
|
-
const visuallyStill =
|
|
3398
|
-
strictOk &&
|
|
3399
|
-
!painted &&
|
|
3400
|
-
snapshot.pendingFetches === 0 &&
|
|
3401
|
-
snapshot.layout === lastLayout
|
|
3402
|
-
// generic network quiet: nothing in flight and no new requests issued.
|
|
3403
|
-
const networkQuiet =
|
|
3404
|
-
snapshot.requestInFlight === 0 && snapshot.requestTotal === lastRequestTotal
|
|
3405
|
-
if (visuallyStill) {
|
|
3406
|
-
stable++
|
|
3407
|
-
if (visuallyStillSince === 0) visuallyStillSince = Date.now()
|
|
3408
|
-
// settle once the screen has held still long enough AND either the
|
|
3409
|
-
// network is genuinely quiet OR it has refused to quiet within the
|
|
3410
|
-
// grace (continuous background traffic must not block forever).
|
|
3411
|
-
if (
|
|
3412
|
-
stable >= minimumStablePolls &&
|
|
3413
|
-
Date.now() - visuallyStillSince >= requiredStillMs &&
|
|
3414
|
-
(networkQuiet || Date.now() - visuallyStillSince >= networkQuietGraceMs)
|
|
3415
|
-
) {
|
|
3416
|
-
return { settled: true, elapsed: Date.now() - start, blockedBy: '' }
|
|
3377
|
+
// how long generic background network is allowed to keep us waiting AFTER
|
|
3378
|
+
// the screen is otherwise visually settled. apps with continuous traffic
|
|
3379
|
+
// (polling, realtime sockets, a tap that fires 20-50 fetches) never reach
|
|
3380
|
+
// requestInFlight===0 / a stable requestTotal, so requiring full network
|
|
3381
|
+
// quiet burns the ENTIRE budget on every command \u2014 the leading idle that
|
|
3382
|
+
// failed PR-preview recordings for network-heavy apps (3pc fight-pulse).
|
|
3383
|
+
// layout-stability + the image-loader already prove visible content
|
|
3384
|
+
// loaded (a data load changes layout; an image load shows in the loader),
|
|
3385
|
+
// so the generic request counters are a courtesy, not a gate: honor them
|
|
3386
|
+
// only within this grace once the screen is visually still.
|
|
3387
|
+
const networkQuietGraceMs = 1200
|
|
3388
|
+
let lastLayout = ''
|
|
3389
|
+
let lastScreenPixels = null
|
|
3390
|
+
let screenChangedPolls = 0
|
|
3391
|
+
let lastRequestTotal = -1
|
|
3392
|
+
let stable = 0
|
|
3393
|
+
let visuallyStillSince = 0
|
|
3394
|
+
// counts across the whole budget: a flag that is true on every poll is a
|
|
3395
|
+
// different bug from one that is true intermittently, and the two need
|
|
3396
|
+
// opposite fixes (engine vs budget).
|
|
3397
|
+
let polls = 0
|
|
3398
|
+
let dirtyPolls = 0
|
|
3399
|
+
let animatingPolls = 0
|
|
3400
|
+
let layoutChangedPolls = 0
|
|
3401
|
+
const screenUnchanged = (pixels) => {
|
|
3402
|
+
if (!pixels || !lastScreenPixels || pixels.width !== lastScreenPixels.width || pixels.height !== lastScreenPixels.height) return false
|
|
3403
|
+
if (pixels === lastScreenPixels) return true
|
|
3404
|
+
for (let i = 0; i < pixels.data.length; i++) {
|
|
3405
|
+
if (pixels.data[i] !== lastScreenPixels.data[i]) return false
|
|
3417
3406
|
}
|
|
3418
|
-
|
|
3419
|
-
stable = 0
|
|
3420
|
-
visuallyStillSince = 0
|
|
3407
|
+
return true
|
|
3421
3408
|
}
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3409
|
+
while (Date.now() < deadline) {
|
|
3410
|
+
const snapshot = await readSnapshot()
|
|
3411
|
+
polls++
|
|
3412
|
+
if (snapshot.layoutDirty) dirtyPolls++
|
|
3413
|
+
if (snapshot.animating || snapshot.shellAnimating) animatingPolls++
|
|
3414
|
+
if (polls > 1 && snapshot.layout !== lastLayout) layoutChangedPolls++
|
|
3415
|
+
const screenChanged = paintStill && !screenUnchanged(snapshot.screenPixels)
|
|
3416
|
+
if (polls > 1 && screenChanged) screenChangedPolls++
|
|
3417
|
+
const strictOk =
|
|
3418
|
+
!strict ||
|
|
3419
|
+
(snapshot.renderStatsAvailable &&
|
|
3420
|
+
!snapshot.animating &&
|
|
3421
|
+
!snapshot.shellAnimating &&
|
|
3422
|
+
!snapshot.layoutDirty)
|
|
3423
|
+
// visually settled: no animations, no image content loading, layout
|
|
3424
|
+
// unchanged since the last poll.
|
|
3425
|
+
const visuallyStill =
|
|
3426
|
+
strictOk &&
|
|
3427
|
+
!screenChanged &&
|
|
3428
|
+
snapshot.pendingFetches === 0 &&
|
|
3429
|
+
snapshot.layout === lastLayout
|
|
3430
|
+
// generic network quiet: nothing in flight and no new requests issued.
|
|
3431
|
+
const networkQuiet =
|
|
3432
|
+
snapshot.requestInFlight === 0 && snapshot.requestTotal === lastRequestTotal
|
|
3433
|
+
if (visuallyStill) {
|
|
3434
|
+
stable++
|
|
3435
|
+
if (visuallyStillSince === 0) visuallyStillSince = Date.now()
|
|
3436
|
+
// settle once the screen has held still long enough AND either the
|
|
3437
|
+
// network is genuinely quiet OR it has refused to quiet within the
|
|
3438
|
+
// grace (continuous background traffic must not block forever).
|
|
3439
|
+
if (
|
|
3440
|
+
stable >= minimumStablePolls &&
|
|
3441
|
+
Date.now() - visuallyStillSince >= requiredStillMs &&
|
|
3442
|
+
(networkQuiet || Date.now() - visuallyStillSince >= networkQuietGraceMs)
|
|
3443
|
+
) {
|
|
3444
|
+
return { settled: true, elapsed: Date.now() - start, blockedBy: '' }
|
|
3445
|
+
}
|
|
3446
|
+
} else {
|
|
3447
|
+
stable = 0
|
|
3448
|
+
visuallyStillSince = 0
|
|
3449
|
+
}
|
|
3450
|
+
lastLayout = snapshot.layout
|
|
3451
|
+
lastScreenPixels = snapshot.screenPixels
|
|
3452
|
+
lastRequestTotal = snapshot.requestTotal
|
|
3453
|
+
await sleep(pollMs)
|
|
3454
|
+
}
|
|
3455
|
+
const last = await readSnapshot()
|
|
3456
|
+
const blockers = []
|
|
3457
|
+
if (strict && !last.renderStatsAvailable) blockers.push('render stats unavailable')
|
|
3458
|
+
if (last.animating) blockers.push('animations still running')
|
|
3459
|
+
if (last.shellAnimating) blockers.push('shell animations still running')
|
|
3460
|
+
if (last.layoutDirty) blockers.push('layout still dirty')
|
|
3461
|
+
if (last.pendingFetches > 0) blockers.push(last.pendingFetches + ' image fetches pending')
|
|
3462
|
+
if (last.layout !== lastLayout) blockers.push('layout still changing')
|
|
3463
|
+
if (paintStill && !last.screenPixels) blockers.push('screen pixels unavailable')
|
|
3464
|
+
else if (paintStill && !screenUnchanged(last.screenPixels)) blockers.push('screen pixels still changing')
|
|
3465
|
+
if (last.requestInFlight > 0) blockers.push(last.requestInFlight + ' requests in flight')
|
|
3466
|
+
return {
|
|
3467
|
+
settled: false,
|
|
3468
|
+
elapsed: Date.now() - start,
|
|
3469
|
+
blockedBy:
|
|
3470
|
+
(blockers.length ? blockers.join(', ') : 'unknown') +
|
|
3471
|
+
' over ' + polls + ' polls (layout changed ' + layoutChangedPolls +
|
|
3472
|
+
'x, layoutDirty ' + dirtyPolls + 'x, animating ' + animatingPolls + 'x, screen changed ' + screenChangedPolls + 'x)',
|
|
3473
|
+
}
|
|
3474
|
+
} finally {
|
|
3475
|
+
unsubscribe?.()
|
|
3444
3476
|
}
|
|
3445
3477
|
})()`
|
|
3446
3478
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/kotlin-host.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
package/dist-lib/menu.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/menu.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.763 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|