peachsim 0.1.687 → 0.1.688
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/cli/cloud-client.ts +3 -3
- package/cli/command-registry.ts +2 -0
- package/cli/commands/control.ts +1 -0
- package/cli/commands/debug.ts +10 -33
- package/cli/commands/do-chain.ts +56 -6
- package/cli/commands/inspect/core.ts +2 -0
- package/cli/commands/inspect/list.ts +2 -1
- package/cli/commands/inspect/settling.ts +17 -3
- package/cli/commands/inspect/shared.ts +2 -0
- package/cli/commands/inspect/wait-idle.ts +2 -2
- package/cli/commands/inspect/wait-ready.ts +3 -3
- package/cli/commands/inspect.ts +33 -7
- package/cli/commands/location.ts +164 -0
- package/cli/commands/platform.ts +1 -1
- package/cli/drivers/playwright-sim-host.ts +46 -25
- package/cli/main.ts +6 -0
- package/detox/index.ts +13 -8
- 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 +4 -3
- package/dist-lib/bridge-contract-input.cjs +12 -1
- package/dist-lib/bridge-contract-input.mjs +12 -1
- package/dist-lib/bridge-contract.cjs +4 -3
- package/dist-lib/bridge-contract.mjs +4 -3
- 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 +2 -1
- package/dist-lib/cloud-contract.mjs +2 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +2 -1
- package/dist-lib/cloud.mjs +2 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/detox/index.cjs +1197 -65
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +362 -108
- package/dist-lib/host/fetch-proxy-handler.cjs +50 -40
- package/dist-lib/host/fetch-proxy-overrides.cjs +50 -6
- package/dist-lib/host/fetch-proxy-overrides.mjs +48 -5
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +29 -11
- 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 +89 -13
- 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 +5 -3
- package/dist-lib/native-app-identity.cjs +8 -3
- package/dist-lib/native-app-identity.mjs +8 -3
- 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 +2 -2
- package/dist-lib/sdk.cjs +21 -6
- package/dist-lib/sdk.mjs +21 -6
- package/dist-lib/skills.cjs +401 -130
- package/dist-lib/swift-compile.cjs +277 -22
- package/dist-lib/swift-compile.mjs +275 -22
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +10 -10
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +280 -44
- package/dist-lib/vite.cjs +1 -1
- package/kotlin/AppSources/android/content/res/Configuration.kt +2 -0
- package/kotlin/AppSources/android/content/res/Resources.kt +6 -3
- package/kotlin/AppSources/android/util/DisplayMetrics.kt +12 -0
- package/kotlin/AppSources/androidx/compose/ui/res/PainterResources.kt +70 -0
- package/kotlin/AppSources/dev/peach/app/PeachApp.kt +12 -10
- package/kotlin/AppSources/dev/peach/app/PeachDrawable.kt +95 -0
- package/kotlin/fixtures/kotlin-app-variants/Bitmaps.kt +50 -0
- package/kotlin/fixtures/kotlin-app-variants/Drawables.kt +53 -0
- package/package.json +2 -2
- package/scripts/dev-server-scanner.ts +3 -1
- package/skills/contrast/SKILL.md +1 -0
- package/src/android-drawables.ts +315 -0
- package/src/android-theme.ts +9 -0
- package/src/bridge-constants.ts +3 -2
- package/src/bridge-contract-input.ts +11 -0
- package/src/bridge-contract.ts +45 -3
- package/src/cloud-contract.ts +1 -0
- package/src/host/fetch-proxy-handler.ts +13 -49
- package/src/host/fetch-proxy-overrides.ts +69 -12
- package/src/kotlin-app.ts +6 -0
- package/src/kotlin-host.ts +103 -15
- package/src/native-app-identity.ts +16 -3
- package/src/swift-compile.ts +366 -24
- package/src/swift-distribution-contract.ts +11 -4
- package/src/swift-distribution.lock.json +11 -9
- package/src/swift-distribution.ts +4 -4
- package/src/swift-icu.ts +8 -11
- package/src/swift-submit.ts +13 -1
- package/src/swift-toolchain.ts +17 -9
- package/src/vite-plugin.ts +86 -34
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.688 | (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;
|
|
@@ -50,6 +50,8 @@ function isNativeAppIdentity(value) {
|
|
|
50
50
|
if (platform !== "ios" && platform !== "android") return false;
|
|
51
51
|
const applicationName = value.applicationName;
|
|
52
52
|
if (applicationName !== null && nonEmptyString(applicationName) === null) return false;
|
|
53
|
+
if (value.bundleName !== void 0 && nonEmptyString(value.bundleName) === null)
|
|
54
|
+
return false;
|
|
53
55
|
if (nonEmptyString(value.appVersion) === null) return false;
|
|
54
56
|
if (nonEmptyString(value.bundleIdentifier) === null) return false;
|
|
55
57
|
const buildVersion = nonEmptyString(value.buildVersion);
|
|
@@ -64,6 +66,7 @@ function readNativeAppIdentity(value) {
|
|
|
64
66
|
}
|
|
65
67
|
return {
|
|
66
68
|
applicationName: value.applicationName,
|
|
69
|
+
...value.bundleName === void 0 ? {} : { bundleName: value.bundleName },
|
|
67
70
|
appVersion: value.appVersion,
|
|
68
71
|
buildVersion: value.buildVersion,
|
|
69
72
|
bundleIdentifier: value.bundleIdentifier,
|
|
@@ -252,12 +255,13 @@ function nativeAppIdentityFromIos(files, parseInfoPlist) {
|
|
|
252
255
|
settings.CURRENT_PROJECT_VERSION
|
|
253
256
|
);
|
|
254
257
|
if (!appVersion || !buildVersion) return null;
|
|
255
|
-
const
|
|
258
|
+
const bundleName = identityFieldFrom(
|
|
256
259
|
settings,
|
|
257
260
|
plistString(plist, "CFBundleName"),
|
|
258
261
|
settings.PRODUCT_NAME
|
|
259
262
|
) ?? resolvedIdentityField(resolveBuildSetting(settings.PRODUCT_NAME ?? "", settings)) ?? resolvedIdentityField(targetName);
|
|
260
|
-
if (!
|
|
263
|
+
if (!bundleName) return null;
|
|
264
|
+
const applicationName = identityFieldFrom(settings, plistString(plist, "CFBundleDisplayName"), void 0) ?? bundleName;
|
|
261
265
|
const dictionary = parseInfoPlist(plist);
|
|
262
266
|
if (!isRecord(dictionary)) throw new Error("native app Info.plist is not a dictionary");
|
|
263
267
|
const permissionUsageDescriptions = {};
|
|
@@ -283,6 +287,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist) {
|
|
|
283
287
|
}
|
|
284
288
|
return {
|
|
285
289
|
applicationName,
|
|
290
|
+
bundleName,
|
|
286
291
|
appVersion,
|
|
287
292
|
buildVersion,
|
|
288
293
|
bundleIdentifier,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.688 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
|
|
3
3
|
// src/native-app-identity.ts
|
|
4
4
|
var NATIVE_APP_IDENTITY_PREFIX = "globalThis.__sootsimNativeAppIdentity=";
|
|
@@ -17,6 +17,8 @@ function isNativeAppIdentity(value) {
|
|
|
17
17
|
if (platform !== "ios" && platform !== "android") return false;
|
|
18
18
|
const applicationName = value.applicationName;
|
|
19
19
|
if (applicationName !== null && nonEmptyString(applicationName) === null) return false;
|
|
20
|
+
if (value.bundleName !== void 0 && nonEmptyString(value.bundleName) === null)
|
|
21
|
+
return false;
|
|
20
22
|
if (nonEmptyString(value.appVersion) === null) return false;
|
|
21
23
|
if (nonEmptyString(value.bundleIdentifier) === null) return false;
|
|
22
24
|
const buildVersion = nonEmptyString(value.buildVersion);
|
|
@@ -31,6 +33,7 @@ function readNativeAppIdentity(value) {
|
|
|
31
33
|
}
|
|
32
34
|
return {
|
|
33
35
|
applicationName: value.applicationName,
|
|
36
|
+
...value.bundleName === void 0 ? {} : { bundleName: value.bundleName },
|
|
34
37
|
appVersion: value.appVersion,
|
|
35
38
|
buildVersion: value.buildVersion,
|
|
36
39
|
bundleIdentifier: value.bundleIdentifier,
|
|
@@ -219,12 +222,13 @@ function nativeAppIdentityFromIos(files, parseInfoPlist) {
|
|
|
219
222
|
settings.CURRENT_PROJECT_VERSION
|
|
220
223
|
);
|
|
221
224
|
if (!appVersion || !buildVersion) return null;
|
|
222
|
-
const
|
|
225
|
+
const bundleName = identityFieldFrom(
|
|
223
226
|
settings,
|
|
224
227
|
plistString(plist, "CFBundleName"),
|
|
225
228
|
settings.PRODUCT_NAME
|
|
226
229
|
) ?? resolvedIdentityField(resolveBuildSetting(settings.PRODUCT_NAME ?? "", settings)) ?? resolvedIdentityField(targetName);
|
|
227
|
-
if (!
|
|
230
|
+
if (!bundleName) return null;
|
|
231
|
+
const applicationName = identityFieldFrom(settings, plistString(plist, "CFBundleDisplayName"), void 0) ?? bundleName;
|
|
228
232
|
const dictionary = parseInfoPlist(plist);
|
|
229
233
|
if (!isRecord(dictionary)) throw new Error("native app Info.plist is not a dictionary");
|
|
230
234
|
const permissionUsageDescriptions = {};
|
|
@@ -250,6 +254,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist) {
|
|
|
250
254
|
}
|
|
251
255
|
return {
|
|
252
256
|
applicationName,
|
|
257
|
+
bundleName,
|
|
253
258
|
appVersion,
|
|
254
259
|
buildVersion,
|
|
255
260
|
bundleIdentifier,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.688 | (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/plist.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.688 | (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/plist.mjs
CHANGED
package/dist-lib/profiles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.688 | (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.688 | (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.688 | (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/render-mode.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.688 | (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.688 | (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;
|
|
@@ -1403,7 +1403,7 @@ async function scanDevServers(opts = {}) {
|
|
|
1403
1403
|
for (const pid of [...cwdByPid.keys()]) {
|
|
1404
1404
|
if (!livePids.has(pid)) cwdByPid.delete(pid);
|
|
1405
1405
|
}
|
|
1406
|
-
return results.filter((r) => !isSootSimSelfServer(r));
|
|
1406
|
+
return results.filter((r) => !isSootSimSelfServer(r)).sort((a, b) => a.port - b.port);
|
|
1407
1407
|
}
|
|
1408
1408
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1409
1409
|
0 && (module.exports = {
|
package/dist-lib/sdk.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.688 | (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;
|
|
@@ -111,10 +111,10 @@ var SEMANTIC_READY_CONTENT_NODE_FLOOR = 100;
|
|
|
111
111
|
var PUBLIC_NO_NETWORK_MARKER = "public Peach Cloud simulators have no network";
|
|
112
112
|
var HEADLESS_TENANT_FETCH_HUNG_MARKER = "headless tenant fetch hung";
|
|
113
113
|
function readyProbeHasContent(probe) {
|
|
114
|
-
return probe.liveFrameActive || probe.targets > 0 || probe.nodes >= SEMANTIC_READY_CONTENT_NODE_FLOOR;
|
|
114
|
+
return (probe.browserSurfaceCount ?? 0) > 0 || probe.liveFrameActive || probe.targets > 0 || probe.nodes >= SEMANTIC_READY_CONTENT_NODE_FLOOR;
|
|
115
115
|
}
|
|
116
116
|
function readyProbeHasTargetContent(probe) {
|
|
117
|
-
return probe.liveFrameActive || probe.targets > 0;
|
|
117
|
+
return (probe.browserSurfaceCount ?? 0) > 0 || probe.liveFrameActive || probe.targets > 0;
|
|
118
118
|
}
|
|
119
119
|
function readyProbeIsReady(probe) {
|
|
120
120
|
return (probe.flag === true ? readyProbeHasContent(probe) : readyProbeHasTargetContent(probe)) && probe.externalReady !== false && !probe.externalError && !probe.loadingText;
|
|
@@ -903,6 +903,7 @@ function waitReadyStatus(result, ready) {
|
|
|
903
903
|
nodes: probe?.nodes ?? 0,
|
|
904
904
|
targets: probe?.targets ?? 0,
|
|
905
905
|
liveFrameActive: probe?.liveFrameActive ?? false,
|
|
906
|
+
browserSurfaceCount: probe?.browserSurfaceCount ?? 0,
|
|
906
907
|
liveFrameChannels: probe?.liveFrameChannels ?? 0,
|
|
907
908
|
liveFramePublishes: probe?.liveFramePublishes ?? 0,
|
|
908
909
|
flag: probe?.flag,
|
|
@@ -1564,6 +1565,16 @@ async function waitForSootsimIdle({
|
|
|
1564
1565
|
let requestInFlight = 0
|
|
1565
1566
|
let renderStatsAvailable = false
|
|
1566
1567
|
let frameCount = -1
|
|
1568
|
+
let shellAnimating = false
|
|
1569
|
+
// strict also waits out shell motion: a system alert, sheet or menu
|
|
1570
|
+
// animates in the shell worker while the app's own stats read still,
|
|
1571
|
+
// so its presentation is complete only once the shell's list empties.
|
|
1572
|
+
if (strict) {
|
|
1573
|
+
try {
|
|
1574
|
+
const motion = await window.__sootsimTest?.listAnimations?.()
|
|
1575
|
+
shellAnimating = Array.isArray(motion) && motion.some((anim) => anim.realm === 'shell')
|
|
1576
|
+
} catch {}
|
|
1577
|
+
}
|
|
1567
1578
|
try {
|
|
1568
1579
|
const stats = await window.__sootsimRenderHost?.queryStats?.()
|
|
1569
1580
|
if (stats) {
|
|
@@ -1601,7 +1612,7 @@ async function waitForSootsimIdle({
|
|
|
1601
1612
|
}
|
|
1602
1613
|
walk(root)
|
|
1603
1614
|
}
|
|
1604
|
-
return { layout: nodes.join(';'), frameCount, animating, layoutDirty, pendingFetches, renderStatsAvailable, requestTotal, requestInFlight }
|
|
1615
|
+
return { layout: nodes.join(';'), frameCount, animating, shellAnimating, layoutDirty, pendingFetches, renderStatsAvailable, requestTotal, requestInFlight }
|
|
1605
1616
|
}
|
|
1606
1617
|
|
|
1607
1618
|
// how long generic background network is allowed to keep us waiting AFTER
|
|
@@ -1632,13 +1643,16 @@ async function waitForSootsimIdle({
|
|
|
1632
1643
|
const snapshot = await readSnapshot()
|
|
1633
1644
|
polls++
|
|
1634
1645
|
if (snapshot.layoutDirty) dirtyPolls++
|
|
1635
|
-
if (snapshot.animating) animatingPolls++
|
|
1646
|
+
if (snapshot.animating || snapshot.shellAnimating) animatingPolls++
|
|
1636
1647
|
if (polls > 1 && snapshot.layout !== lastLayout) layoutChangedPolls++
|
|
1637
1648
|
const painted = paintStill && snapshot.frameCount !== lastFrameCount
|
|
1638
1649
|
if (polls > 1 && painted) paintedPolls++
|
|
1639
1650
|
const strictOk =
|
|
1640
1651
|
!strict ||
|
|
1641
|
-
(snapshot.renderStatsAvailable &&
|
|
1652
|
+
(snapshot.renderStatsAvailable &&
|
|
1653
|
+
!snapshot.animating &&
|
|
1654
|
+
!snapshot.shellAnimating &&
|
|
1655
|
+
!snapshot.layoutDirty)
|
|
1642
1656
|
// visually settled: no animations, no image content loading, layout
|
|
1643
1657
|
// unchanged since the last poll.
|
|
1644
1658
|
const visuallyStill =
|
|
@@ -1674,6 +1688,7 @@ async function waitForSootsimIdle({
|
|
|
1674
1688
|
const blockers = []
|
|
1675
1689
|
if (strict && !last.renderStatsAvailable) blockers.push('render stats unavailable')
|
|
1676
1690
|
if (last.animating) blockers.push('animations still running')
|
|
1691
|
+
if (last.shellAnimating) blockers.push('shell animations still running')
|
|
1677
1692
|
if (last.layoutDirty) blockers.push('layout still dirty')
|
|
1678
1693
|
if (last.pendingFetches > 0) blockers.push(last.pendingFetches + ' image fetches pending')
|
|
1679
1694
|
if (last.layout !== lastLayout) blockers.push('layout still changing')
|
package/dist-lib/sdk.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! rnx v0.1.
|
|
1
|
+
/*! rnx v0.1.688 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
@@ -8,10 +8,10 @@ var SEMANTIC_READY_CONTENT_NODE_FLOOR = 100;
|
|
|
8
8
|
var PUBLIC_NO_NETWORK_MARKER = "public Peach Cloud simulators have no network";
|
|
9
9
|
var HEADLESS_TENANT_FETCH_HUNG_MARKER = "headless tenant fetch hung";
|
|
10
10
|
function readyProbeHasContent(probe) {
|
|
11
|
-
return probe.liveFrameActive || probe.targets > 0 || probe.nodes >= SEMANTIC_READY_CONTENT_NODE_FLOOR;
|
|
11
|
+
return (probe.browserSurfaceCount ?? 0) > 0 || probe.liveFrameActive || probe.targets > 0 || probe.nodes >= SEMANTIC_READY_CONTENT_NODE_FLOOR;
|
|
12
12
|
}
|
|
13
13
|
function readyProbeHasTargetContent(probe) {
|
|
14
|
-
return probe.liveFrameActive || probe.targets > 0;
|
|
14
|
+
return (probe.browserSurfaceCount ?? 0) > 0 || probe.liveFrameActive || probe.targets > 0;
|
|
15
15
|
}
|
|
16
16
|
function readyProbeIsReady(probe) {
|
|
17
17
|
return (probe.flag === true ? readyProbeHasContent(probe) : readyProbeHasTargetContent(probe)) && probe.externalReady !== false && !probe.externalError && !probe.loadingText;
|
|
@@ -800,6 +800,7 @@ function waitReadyStatus(result, ready) {
|
|
|
800
800
|
nodes: probe?.nodes ?? 0,
|
|
801
801
|
targets: probe?.targets ?? 0,
|
|
802
802
|
liveFrameActive: probe?.liveFrameActive ?? false,
|
|
803
|
+
browserSurfaceCount: probe?.browserSurfaceCount ?? 0,
|
|
803
804
|
liveFrameChannels: probe?.liveFrameChannels ?? 0,
|
|
804
805
|
liveFramePublishes: probe?.liveFramePublishes ?? 0,
|
|
805
806
|
flag: probe?.flag,
|
|
@@ -1461,6 +1462,16 @@ async function waitForSootsimIdle({
|
|
|
1461
1462
|
let requestInFlight = 0
|
|
1462
1463
|
let renderStatsAvailable = false
|
|
1463
1464
|
let frameCount = -1
|
|
1465
|
+
let shellAnimating = false
|
|
1466
|
+
// strict also waits out shell motion: a system alert, sheet or menu
|
|
1467
|
+
// animates in the shell worker while the app's own stats read still,
|
|
1468
|
+
// so its presentation is complete only once the shell's list empties.
|
|
1469
|
+
if (strict) {
|
|
1470
|
+
try {
|
|
1471
|
+
const motion = await window.__sootsimTest?.listAnimations?.()
|
|
1472
|
+
shellAnimating = Array.isArray(motion) && motion.some((anim) => anim.realm === 'shell')
|
|
1473
|
+
} catch {}
|
|
1474
|
+
}
|
|
1464
1475
|
try {
|
|
1465
1476
|
const stats = await window.__sootsimRenderHost?.queryStats?.()
|
|
1466
1477
|
if (stats) {
|
|
@@ -1498,7 +1509,7 @@ async function waitForSootsimIdle({
|
|
|
1498
1509
|
}
|
|
1499
1510
|
walk(root)
|
|
1500
1511
|
}
|
|
1501
|
-
return { layout: nodes.join(';'), frameCount, animating, layoutDirty, pendingFetches, renderStatsAvailable, requestTotal, requestInFlight }
|
|
1512
|
+
return { layout: nodes.join(';'), frameCount, animating, shellAnimating, layoutDirty, pendingFetches, renderStatsAvailable, requestTotal, requestInFlight }
|
|
1502
1513
|
}
|
|
1503
1514
|
|
|
1504
1515
|
// how long generic background network is allowed to keep us waiting AFTER
|
|
@@ -1529,13 +1540,16 @@ async function waitForSootsimIdle({
|
|
|
1529
1540
|
const snapshot = await readSnapshot()
|
|
1530
1541
|
polls++
|
|
1531
1542
|
if (snapshot.layoutDirty) dirtyPolls++
|
|
1532
|
-
if (snapshot.animating) animatingPolls++
|
|
1543
|
+
if (snapshot.animating || snapshot.shellAnimating) animatingPolls++
|
|
1533
1544
|
if (polls > 1 && snapshot.layout !== lastLayout) layoutChangedPolls++
|
|
1534
1545
|
const painted = paintStill && snapshot.frameCount !== lastFrameCount
|
|
1535
1546
|
if (polls > 1 && painted) paintedPolls++
|
|
1536
1547
|
const strictOk =
|
|
1537
1548
|
!strict ||
|
|
1538
|
-
(snapshot.renderStatsAvailable &&
|
|
1549
|
+
(snapshot.renderStatsAvailable &&
|
|
1550
|
+
!snapshot.animating &&
|
|
1551
|
+
!snapshot.shellAnimating &&
|
|
1552
|
+
!snapshot.layoutDirty)
|
|
1539
1553
|
// visually settled: no animations, no image content loading, layout
|
|
1540
1554
|
// unchanged since the last poll.
|
|
1541
1555
|
const visuallyStill =
|
|
@@ -1571,6 +1585,7 @@ async function waitForSootsimIdle({
|
|
|
1571
1585
|
const blockers = []
|
|
1572
1586
|
if (strict && !last.renderStatsAvailable) blockers.push('render stats unavailable')
|
|
1573
1587
|
if (last.animating) blockers.push('animations still running')
|
|
1588
|
+
if (last.shellAnimating) blockers.push('shell animations still running')
|
|
1574
1589
|
if (last.layoutDirty) blockers.push('layout still dirty')
|
|
1575
1590
|
if (last.pendingFetches > 0) blockers.push(last.pendingFetches + ' image fetches pending')
|
|
1576
1591
|
if (last.layout !== lastLayout) blockers.push('layout still changing')
|