peachsim 0.1.2247 → 0.1.2249
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/bin.ts +5 -0
- package/cli/bridge-flow-runner.ts +28 -2
- package/cli/cloud-dispatch.ts +2 -0
- package/cli/commands/control.ts +2 -2
- package/cli/commands/coverage-swift.ts +3 -3
- package/cli/commands/inspect/settling.ts +35 -4
- package/cli/commands/shell-url.ts +6 -0
- package/cli/commands/skills.ts +6 -3
- package/cli/drivers/playwright.ts +2 -0
- package/dist-lib/agent-daemon-client.cjs +1 -29
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -10
- 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/bundle-channel.cjs +4300 -4531
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +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/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +32 -315
- package/dist-lib/dev-bundle-resolution.cjs +1 -12
- package/dist-lib/expo-swift-bundle.cjs +3579 -3864
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +1 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +4376 -4682
- package/dist-lib/host/fetch-proxy-handler.cjs +97 -713
- 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 +669 -1116
- 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 +3 -24
- 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 -10
- package/dist-lib/metro-production-bundle.mjs +1 -12
- package/dist-lib/metro.cjs +546 -975
- package/dist-lib/native-app-identity-project.cjs +299 -592
- package/dist-lib/native-app-identity-project.mjs +11 -232
- 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/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.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/public-origins-lib-esm.json +28 -96
- package/dist-lib/public-origins-lib.json +172 -1058
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -34
- package/dist-lib/sdk.cjs +31 -7
- package/dist-lib/sdk.mjs +31 -7
- package/dist-lib/skills.cjs +4960 -5345
- package/dist-lib/swift-compile.cjs +1185 -1107
- package/dist-lib/swift-compile.mjs +137 -54
- 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 +1568 -1672
- package/dist-lib/vite.cjs +173 -763
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +3 -0
- package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +4 -0
- package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/render-worker/webview-capture-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/settings/duo-fold-bus.d.ts +10 -2
- package/dist-types/packages/peach-globals/src/globalsContract.d.ts +5 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/wasm/include/math.h +1 -1
- package/sdk/ios/wasm/include/pthread.h +1 -1
- package/src/assetCatalogContract.ts +6 -0
- package/src/kotlin-module.ts +3 -3
- package/src/sfSymbolMetricsContract.ts +73 -37
- package/src/swift-compile.ts +99 -7
- package/src/swift-coverage/provenance.ts +4 -4
- package/src/swift-guest-image-ledger.ts +10 -5
- package/src/swift-guest-link.ts +20 -14
- package/src/swift-objc-sdk.ts +34 -21
- package/src/swift-objc-standin.ts +7 -7
- package/src/swift-standins.ts +11 -8
- package/src/swift-wasm-prune.ts +30 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2249 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2249 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2249 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -32,12 +32,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
));
|
|
33
33
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
34
34
|
|
|
35
|
-
// <define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>
|
|
36
|
-
var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
|
|
37
|
-
"<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
|
|
41
35
|
// src/node-http-fetch.ts
|
|
42
36
|
var node_http_fetch_exports = {};
|
|
43
37
|
__export(node_http_fetch_exports, {
|
|
@@ -132,7 +126,6 @@ var import_node_http, import_node_https, import_node_stream, import_node_zlib, B
|
|
|
132
126
|
var init_node_http_fetch = __esm({
|
|
133
127
|
"src/node-http-fetch.ts"() {
|
|
134
128
|
"use strict";
|
|
135
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
136
129
|
import_node_http = __toESM(require("node:http"), 1);
|
|
137
130
|
import_node_https = __toESM(require("node:https"), 1);
|
|
138
131
|
import_node_stream = require("node:stream");
|
|
@@ -162,7 +155,6 @@ __export(dev_server_scanner_exports, {
|
|
|
162
155
|
scanListeningProcesses: () => scanListeningProcesses
|
|
163
156
|
});
|
|
164
157
|
module.exports = __toCommonJS(dev_server_scanner_exports);
|
|
165
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
166
158
|
var import_child_process = require("child_process");
|
|
167
159
|
var import_promises2 = require("fs/promises");
|
|
168
160
|
var import_http = __toESM(require("http"), 1);
|
|
@@ -172,7 +164,6 @@ var import_node_os = require("node:os");
|
|
|
172
164
|
var import_node_path3 = require("node:path");
|
|
173
165
|
|
|
174
166
|
// src/backend-origin.ts
|
|
175
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
176
167
|
var NativeURL = globalThis.URL;
|
|
177
168
|
var LOOPBACK_PROBE_HOSTNAMES = ["127.0.0.1", "::1"];
|
|
178
169
|
function normalizeHostname(hostname) {
|
|
@@ -188,24 +179,11 @@ function isLoopbackHost(hostname) {
|
|
|
188
179
|
return normalized === "localhost" || normalized.endsWith(".localhost") || normalized === "0.0.0.0" || normalized === "::1" || /^127(?:\.\d{1,3}){3}$/.test(normalized);
|
|
189
180
|
}
|
|
190
181
|
|
|
191
|
-
// src/config.ts
|
|
192
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
193
|
-
|
|
194
|
-
// ../contrast-runtime-delivery/src/version.ts
|
|
195
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
196
|
-
|
|
197
|
-
// ../peach-globals/src/bundle-global-footer.ts
|
|
198
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
199
|
-
|
|
200
182
|
// src/is-record.ts
|
|
201
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
202
183
|
function isRecord(value) {
|
|
203
184
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
204
185
|
}
|
|
205
186
|
|
|
206
|
-
// src/nativeViewSourceContract.ts
|
|
207
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
208
|
-
|
|
209
187
|
// src/config.ts
|
|
210
188
|
var PEACH_CONFIG_QUERY_PARAM = "peachConfig";
|
|
211
189
|
function hasOwnKeys(value) {
|
|
@@ -225,11 +203,7 @@ function applyPeachConfigToUrl(url, config) {
|
|
|
225
203
|
return parsed.toString();
|
|
226
204
|
}
|
|
227
205
|
|
|
228
|
-
// src/dev-bundle-resolution.ts
|
|
229
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
230
|
-
|
|
231
206
|
// src/expo-manifest-body.ts
|
|
232
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
233
207
|
function parseExpoManifestBody(body) {
|
|
234
208
|
const opening = /^(--[^\r\n]+)\r?\n/.exec(body);
|
|
235
209
|
if (!opening) return JSON.parse(body);
|
|
@@ -251,7 +225,6 @@ function readExpoManifestFields(manifest) {
|
|
|
251
225
|
}
|
|
252
226
|
|
|
253
227
|
// src/native-dev-bundle-url.ts
|
|
254
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
255
228
|
function isAbsoluteHttpUrl(url) {
|
|
256
229
|
return /^https?:\/\//i.test(url);
|
|
257
230
|
}
|
|
@@ -381,7 +354,6 @@ async function fetchDevManifest(baseUrl, pageOrigin, options = {}) {
|
|
|
381
354
|
}
|
|
382
355
|
|
|
383
356
|
// src/kotlinDiscoveryContract.ts
|
|
384
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
385
357
|
var KOTLIN_DISCOVERY_PATH = "/__peach/kotlin-host";
|
|
386
358
|
var KOTLIN_GUEST_PATH = "/__peach/kotlin-guest.js";
|
|
387
359
|
function parseKotlinHostDiscovery(value) {
|
|
@@ -396,7 +368,6 @@ function parseKotlinHostDiscovery(value) {
|
|
|
396
368
|
}
|
|
397
369
|
|
|
398
370
|
// src/oneWidgetContract.ts
|
|
399
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
400
371
|
var HOME_WIDGET_FAMILIES = [
|
|
401
372
|
"systemSmall",
|
|
402
373
|
"systemMedium",
|
|
@@ -480,12 +451,10 @@ function configuredWidgetFromScan(value, bundleUrl) {
|
|
|
480
451
|
}
|
|
481
452
|
|
|
482
453
|
// src/settings-bundle.ts
|
|
483
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
484
454
|
var import_promises = require("node:fs/promises");
|
|
485
455
|
var import_node_path = require("node:path");
|
|
486
456
|
|
|
487
457
|
// src/plist.ts
|
|
488
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
489
458
|
var import_plist = __toESM(require("plist"), 1);
|
|
490
459
|
function parsePlistSource(source) {
|
|
491
460
|
return import_plist.default.parse(source);
|
|
@@ -809,7 +778,6 @@ function __resetAppSettingsBundleCacheForTests() {
|
|
|
809
778
|
}
|
|
810
779
|
|
|
811
780
|
// src/swiftDiscoveryContract.ts
|
|
812
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
813
781
|
var SWIFT_DISCOVERY_PATH = "/__peach/swift-host";
|
|
814
782
|
var SWIFT_GUEST_PATH = "/__peach/swift-guest.js";
|
|
815
783
|
var SWIFT_ICON_PATH = "/__peach/swift-icon";
|
|
@@ -826,7 +794,6 @@ function parseSwiftHostDiscovery(value) {
|
|
|
826
794
|
}
|
|
827
795
|
|
|
828
796
|
// scripts/optional-demo-registry.ts
|
|
829
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
830
797
|
var import_node_fs = require("node:fs");
|
|
831
798
|
var import_node_path2 = require("node:path");
|
|
832
799
|
var import_node_url = require("node:url");
|
package/dist-lib/sdk.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2249 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
@@ -1941,7 +1941,8 @@ async function waitForSootsimIdle({
|
|
|
1941
1941
|
skipIfInspectActive = false,
|
|
1942
1942
|
readyPlayback = false,
|
|
1943
1943
|
transitionStartWindowMs = 80,
|
|
1944
|
-
transitionTimeoutMs = 4e3
|
|
1944
|
+
transitionTimeoutMs = 4e3,
|
|
1945
|
+
stillSince = null
|
|
1945
1946
|
}) {
|
|
1946
1947
|
let result;
|
|
1947
1948
|
const observationStartedAt = Date.now();
|
|
@@ -1980,6 +1981,7 @@ async function waitForSootsimIdle({
|
|
|
1980
1981
|
const accessibilityBounds = ${accessibilityBounds.toString()}
|
|
1981
1982
|
const sameNativeAccessibilityShape = ${sameNativeAccessibilityShape.toString()}
|
|
1982
1983
|
const readyPlayback = ${readyPlayback ? "true" : "false"}
|
|
1984
|
+
const stillSince = ${JSON.stringify(stillSince)}
|
|
1983
1985
|
// full mounted-geometry observation needs at least two hierarchy reads
|
|
1984
1986
|
// plus the stillness window, which a sub-second budget cannot afford:
|
|
1985
1987
|
// tight budgets (auto-wait) settle on worker stillness plus root
|
|
@@ -1998,7 +2000,7 @@ async function waitForSootsimIdle({
|
|
|
1998
2000
|
// those that began after it drained still can. a loaded host runs a
|
|
1999
2001
|
// push past a tap's budget, so the transition gets its own timeout and
|
|
2000
2002
|
// the budget restarts once it drains.
|
|
2001
|
-
|
|
2003
|
+
const watchTransition = async () => {
|
|
2002
2004
|
try {
|
|
2003
2005
|
const wfst = globalThis.__sootsimTest?.waitForScreenTransitions
|
|
2004
2006
|
if (typeof wfst === 'function' && budgetMs > 120) {
|
|
@@ -2018,7 +2020,9 @@ async function waitForSootsimIdle({
|
|
|
2018
2020
|
}
|
|
2019
2021
|
} catch {}
|
|
2020
2022
|
return false
|
|
2021
|
-
}
|
|
2023
|
+
}
|
|
2024
|
+
// a wait that may settle on its first poll watches only once that poll does not
|
|
2025
|
+
let transitionWait = stillSince === null ? watchTransition() : null
|
|
2022
2026
|
|
|
2023
2027
|
// a worker that cannot answer within the remaining budget is busy, not
|
|
2024
2028
|
// idle: its poll reads as unsettled. bounding each read by the budget
|
|
@@ -2370,6 +2374,9 @@ async function waitForSootsimIdle({
|
|
|
2370
2374
|
if (clockNow() >= deadline) break
|
|
2371
2375
|
}
|
|
2372
2376
|
const pollStarted = clockNow()
|
|
2377
|
+
const readRevision = () =>
|
|
2378
|
+
answer(() => globalThis.__sootsimTest?.getGeometryRevision?.()).catch(() => null)
|
|
2379
|
+
const pollRevision = readRevision()
|
|
2373
2380
|
const snapshot = await readSnapshot()
|
|
2374
2381
|
if (snapshot.runtimeUnsupported) return snapshot.runtimeUnsupported
|
|
2375
2382
|
// a read the deadline cut short observed nothing: the last full poll
|
|
@@ -2377,6 +2384,18 @@ async function waitForSootsimIdle({
|
|
|
2377
2384
|
// the loop head drains a transition still in flight before it ends.
|
|
2378
2385
|
if (snapshot.workerBusy && clockNow() >= deadline && report) continue
|
|
2379
2386
|
polls++
|
|
2387
|
+
if (
|
|
2388
|
+
polls === 1 && stillSince !== null &&
|
|
2389
|
+
!snapshot.workerBusy && snapshot.pendingFetches === 0 && snapshot.requestInFlight === 0 &&
|
|
2390
|
+
!snapshot.webViewStarting && !snapshot.animating && !snapshot.shellAnimating &&
|
|
2391
|
+
!snapshot.layoutDirty && !snapshot.visibleMotion
|
|
2392
|
+
) {
|
|
2393
|
+
const [proving, replying] = await Promise.all([pollRevision, readRevision()])
|
|
2394
|
+
if (proving === stillSince && replying === stillSince) {
|
|
2395
|
+
return { settled: true, elapsed: clockNow() - start, blockedBy: '', stillRevision: stillSince }
|
|
2396
|
+
}
|
|
2397
|
+
}
|
|
2398
|
+
if (polls === 1 && stillSince !== null) transitionWait = watchTransition()
|
|
2380
2399
|
report = { snapshot, nativeHierarchy: lastNativeHierarchy, layout: lastLayout, requestTotal: lastRequestTotal, appCommits: lastAppCommits, nodeCount: lastNodeCount }
|
|
2381
2400
|
if (snapshot.layoutDirty) dirtyPolls++
|
|
2382
2401
|
if (snapshot.animating || snapshot.shellAnimating) animatingPolls++
|
|
@@ -2461,7 +2480,11 @@ async function waitForSootsimIdle({
|
|
|
2461
2480
|
await transitionWait
|
|
2462
2481
|
transitionWait = null
|
|
2463
2482
|
}
|
|
2464
|
-
if (stillProven())
|
|
2483
|
+
if (stillProven()) {
|
|
2484
|
+
const [proving, replying] = await Promise.all([pollRevision, readRevision()])
|
|
2485
|
+
const stillRevision = typeof proving === 'string' && proving === replying ? proving : undefined
|
|
2486
|
+
return { settled: true, elapsed: clockNow() - start, blockedBy: '', stillRevision }
|
|
2487
|
+
}
|
|
2465
2488
|
}
|
|
2466
2489
|
} else {
|
|
2467
2490
|
stillPolls = []
|
|
@@ -2526,11 +2549,12 @@ async function waitForSootsimIdle({
|
|
|
2526
2549
|
result.missingFields
|
|
2527
2550
|
);
|
|
2528
2551
|
}
|
|
2529
|
-
const { elapsed, settled, blockedBy } = result ?? {};
|
|
2552
|
+
const { elapsed, settled, blockedBy, stillRevision } = result ?? {};
|
|
2530
2553
|
return {
|
|
2531
2554
|
elapsed: typeof elapsed === "number" ? elapsed : maxMs,
|
|
2532
2555
|
settled: settled === true,
|
|
2533
|
-
blockedBy: typeof blockedBy === "string" ? blockedBy : "unknown"
|
|
2556
|
+
blockedBy: typeof blockedBy === "string" ? blockedBy : "unknown",
|
|
2557
|
+
...settled === true && typeof stillRevision === "string" ? { stillRevision } : {}
|
|
2534
2558
|
};
|
|
2535
2559
|
}
|
|
2536
2560
|
async function waitReadyAndSettle(bridge, timeoutMs, options = {}) {
|
package/dist-lib/sdk.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2249 | (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);
|
|
@@ -1830,7 +1830,8 @@ async function waitForSootsimIdle({
|
|
|
1830
1830
|
skipIfInspectActive = false,
|
|
1831
1831
|
readyPlayback = false,
|
|
1832
1832
|
transitionStartWindowMs = 80,
|
|
1833
|
-
transitionTimeoutMs = 4e3
|
|
1833
|
+
transitionTimeoutMs = 4e3,
|
|
1834
|
+
stillSince = null
|
|
1834
1835
|
}) {
|
|
1835
1836
|
let result;
|
|
1836
1837
|
const observationStartedAt = Date.now();
|
|
@@ -1869,6 +1870,7 @@ async function waitForSootsimIdle({
|
|
|
1869
1870
|
const accessibilityBounds = ${accessibilityBounds.toString()}
|
|
1870
1871
|
const sameNativeAccessibilityShape = ${sameNativeAccessibilityShape.toString()}
|
|
1871
1872
|
const readyPlayback = ${readyPlayback ? "true" : "false"}
|
|
1873
|
+
const stillSince = ${JSON.stringify(stillSince)}
|
|
1872
1874
|
// full mounted-geometry observation needs at least two hierarchy reads
|
|
1873
1875
|
// plus the stillness window, which a sub-second budget cannot afford:
|
|
1874
1876
|
// tight budgets (auto-wait) settle on worker stillness plus root
|
|
@@ -1887,7 +1889,7 @@ async function waitForSootsimIdle({
|
|
|
1887
1889
|
// those that began after it drained still can. a loaded host runs a
|
|
1888
1890
|
// push past a tap's budget, so the transition gets its own timeout and
|
|
1889
1891
|
// the budget restarts once it drains.
|
|
1890
|
-
|
|
1892
|
+
const watchTransition = async () => {
|
|
1891
1893
|
try {
|
|
1892
1894
|
const wfst = globalThis.__sootsimTest?.waitForScreenTransitions
|
|
1893
1895
|
if (typeof wfst === 'function' && budgetMs > 120) {
|
|
@@ -1907,7 +1909,9 @@ async function waitForSootsimIdle({
|
|
|
1907
1909
|
}
|
|
1908
1910
|
} catch {}
|
|
1909
1911
|
return false
|
|
1910
|
-
}
|
|
1912
|
+
}
|
|
1913
|
+
// a wait that may settle on its first poll watches only once that poll does not
|
|
1914
|
+
let transitionWait = stillSince === null ? watchTransition() : null
|
|
1911
1915
|
|
|
1912
1916
|
// a worker that cannot answer within the remaining budget is busy, not
|
|
1913
1917
|
// idle: its poll reads as unsettled. bounding each read by the budget
|
|
@@ -2259,6 +2263,9 @@ async function waitForSootsimIdle({
|
|
|
2259
2263
|
if (clockNow() >= deadline) break
|
|
2260
2264
|
}
|
|
2261
2265
|
const pollStarted = clockNow()
|
|
2266
|
+
const readRevision = () =>
|
|
2267
|
+
answer(() => globalThis.__sootsimTest?.getGeometryRevision?.()).catch(() => null)
|
|
2268
|
+
const pollRevision = readRevision()
|
|
2262
2269
|
const snapshot = await readSnapshot()
|
|
2263
2270
|
if (snapshot.runtimeUnsupported) return snapshot.runtimeUnsupported
|
|
2264
2271
|
// a read the deadline cut short observed nothing: the last full poll
|
|
@@ -2266,6 +2273,18 @@ async function waitForSootsimIdle({
|
|
|
2266
2273
|
// the loop head drains a transition still in flight before it ends.
|
|
2267
2274
|
if (snapshot.workerBusy && clockNow() >= deadline && report) continue
|
|
2268
2275
|
polls++
|
|
2276
|
+
if (
|
|
2277
|
+
polls === 1 && stillSince !== null &&
|
|
2278
|
+
!snapshot.workerBusy && snapshot.pendingFetches === 0 && snapshot.requestInFlight === 0 &&
|
|
2279
|
+
!snapshot.webViewStarting && !snapshot.animating && !snapshot.shellAnimating &&
|
|
2280
|
+
!snapshot.layoutDirty && !snapshot.visibleMotion
|
|
2281
|
+
) {
|
|
2282
|
+
const [proving, replying] = await Promise.all([pollRevision, readRevision()])
|
|
2283
|
+
if (proving === stillSince && replying === stillSince) {
|
|
2284
|
+
return { settled: true, elapsed: clockNow() - start, blockedBy: '', stillRevision: stillSince }
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
if (polls === 1 && stillSince !== null) transitionWait = watchTransition()
|
|
2269
2288
|
report = { snapshot, nativeHierarchy: lastNativeHierarchy, layout: lastLayout, requestTotal: lastRequestTotal, appCommits: lastAppCommits, nodeCount: lastNodeCount }
|
|
2270
2289
|
if (snapshot.layoutDirty) dirtyPolls++
|
|
2271
2290
|
if (snapshot.animating || snapshot.shellAnimating) animatingPolls++
|
|
@@ -2350,7 +2369,11 @@ async function waitForSootsimIdle({
|
|
|
2350
2369
|
await transitionWait
|
|
2351
2370
|
transitionWait = null
|
|
2352
2371
|
}
|
|
2353
|
-
if (stillProven())
|
|
2372
|
+
if (stillProven()) {
|
|
2373
|
+
const [proving, replying] = await Promise.all([pollRevision, readRevision()])
|
|
2374
|
+
const stillRevision = typeof proving === 'string' && proving === replying ? proving : undefined
|
|
2375
|
+
return { settled: true, elapsed: clockNow() - start, blockedBy: '', stillRevision }
|
|
2376
|
+
}
|
|
2354
2377
|
}
|
|
2355
2378
|
} else {
|
|
2356
2379
|
stillPolls = []
|
|
@@ -2415,11 +2438,12 @@ async function waitForSootsimIdle({
|
|
|
2415
2438
|
result.missingFields
|
|
2416
2439
|
);
|
|
2417
2440
|
}
|
|
2418
|
-
const { elapsed, settled, blockedBy } = result ?? {};
|
|
2441
|
+
const { elapsed, settled, blockedBy, stillRevision } = result ?? {};
|
|
2419
2442
|
return {
|
|
2420
2443
|
elapsed: typeof elapsed === "number" ? elapsed : maxMs,
|
|
2421
2444
|
settled: settled === true,
|
|
2422
|
-
blockedBy: typeof blockedBy === "string" ? blockedBy : "unknown"
|
|
2445
|
+
blockedBy: typeof blockedBy === "string" ? blockedBy : "unknown",
|
|
2446
|
+
...settled === true && typeof stillRevision === "string" ? { stillRevision } : {}
|
|
2423
2447
|
};
|
|
2424
2448
|
}
|
|
2425
2449
|
async function waitReadyAndSettle(bridge, timeoutMs, options = {}) {
|