peachsim 0.1.2242 → 0.1.2244

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.
Files changed (105) hide show
  1. package/cli/binary-sidecar.ts +89 -0
  2. package/cli/bridge-flow-runner.ts +2 -2
  3. package/cli/cloud-client.ts +2 -0
  4. package/cli/commands/control.ts +16 -0
  5. package/cli/commands/device.ts +1 -1
  6. package/cli/commands/flow.ts +6 -2
  7. package/cli/commands/inspect/core.ts +0 -20
  8. package/cli/commands/inspect/settling.ts +15 -2
  9. package/cli/commands/inspect.ts +5 -5
  10. package/cli/commands/preview.ts +12 -5
  11. package/cli/commands/shell-boolean-mode.ts +1 -1
  12. package/cli/commands/slides.ts +1 -1
  13. package/dist-lib/agent-daemon-client.cjs +1 -1
  14. package/dist-lib/agent-events.cjs +1 -1
  15. package/dist-lib/attached-projects.cjs +1 -1
  16. package/dist-lib/auth/shared-session.cjs +1 -1
  17. package/dist-lib/backend-origin.cjs +1 -1
  18. package/dist-lib/beta.cjs +1 -1
  19. package/dist-lib/beta.mjs +1 -1
  20. package/dist-lib/bridge-constants.cjs +1 -1
  21. package/dist-lib/bridge-contract-input.cjs +1 -1
  22. package/dist-lib/bridge-contract-input.mjs +1 -1
  23. package/dist-lib/bridge-contract.cjs +1 -1
  24. package/dist-lib/bridge-contract.mjs +1 -1
  25. package/dist-lib/bundle-channel.cjs +94 -15
  26. package/dist-lib/capture-contract.cjs +1 -1
  27. package/dist-lib/capture-contract.mjs +1 -1
  28. package/dist-lib/cloud-contract.cjs +1 -1
  29. package/dist-lib/cloud-contract.mjs +1 -1
  30. package/dist-lib/cloud-test-args.cjs +1 -1
  31. package/dist-lib/cloud-test-args.mjs +1 -1
  32. package/dist-lib/cloud.cjs +1 -1
  33. package/dist-lib/cloud.mjs +1 -1
  34. package/dist-lib/config.cjs +1 -1
  35. package/dist-lib/config.mjs +1 -1
  36. package/dist-lib/detox/index.cjs +16 -5
  37. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  38. package/dist-lib/expo-swift-bundle.cjs +93 -14
  39. package/dist-lib/expo-swift-metadata.cjs +1 -1
  40. package/dist-lib/expo-swift-metadata.mjs +1 -1
  41. package/dist-lib/home-paths.cjs +1 -1
  42. package/dist-lib/host/bridge-host.cjs +121 -28
  43. package/dist-lib/host/fetch-proxy-handler.cjs +3 -3
  44. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  45. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  46. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  47. package/dist-lib/host/websocket-proxy.cjs +1 -1
  48. package/dist-lib/index.cjs +18 -7
  49. package/dist-lib/jump-to-source-babel.cjs +1 -1
  50. package/dist-lib/jump-to-source-native.cjs +1 -1
  51. package/dist-lib/kotlin-host.cjs +1 -1
  52. package/dist-lib/menu.cjs +11 -2
  53. package/dist-lib/menu.mjs +11 -2
  54. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  55. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  56. package/dist-lib/metro-production-bundle.cjs +1 -1
  57. package/dist-lib/metro-production-bundle.mjs +1 -1
  58. package/dist-lib/metro.cjs +3 -3
  59. package/dist-lib/native-app-identity-project.cjs +2 -2
  60. package/dist-lib/native-app-identity-project.mjs +2 -2
  61. package/dist-lib/native-app-identity.cjs +1 -1
  62. package/dist-lib/native-app-identity.mjs +1 -1
  63. package/dist-lib/native-firebase-metadata.cjs +1 -1
  64. package/dist-lib/native-firebase-metadata.mjs +1 -1
  65. package/dist-lib/pdfium-raster.cjs +1 -1
  66. package/dist-lib/pdfium-raster.mjs +1 -1
  67. package/dist-lib/plist.cjs +1 -1
  68. package/dist-lib/plist.mjs +1 -1
  69. package/dist-lib/profiles.cjs +1 -1
  70. package/dist-lib/public-brand.cjs +1 -1
  71. package/dist-lib/public-origins-lib-esm.json +24 -24
  72. package/dist-lib/public-origins-lib.json +55 -53
  73. package/dist-lib/react-native-host-modules.cjs +1 -1
  74. package/dist-lib/react-native-host-modules.mjs +1 -1
  75. package/dist-lib/reap-browser.cjs +1 -1
  76. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  77. package/dist-lib/sdk.cjs +16 -24
  78. package/dist-lib/sdk.mjs +16 -22
  79. package/dist-lib/skills.cjs +973 -755
  80. package/dist-lib/swift-compile.cjs +4 -3
  81. package/dist-lib/swift-compile.mjs +4 -3
  82. package/dist-lib/swift-package.cjs +1 -1
  83. package/dist-lib/swift-package.mjs +1 -1
  84. package/dist-lib/swift-submit.cjs +2 -2
  85. package/dist-lib/swift-submit.mjs +2 -2
  86. package/dist-lib/swift-toolchain.cjs +1 -1
  87. package/dist-lib/swift.cjs +1 -1
  88. package/dist-lib/vite-swift.cjs +485 -405
  89. package/dist-lib/vite.cjs +3 -3
  90. package/dist-lib/worklet-executable.cjs +1 -1
  91. package/dist-lib/worklet-executable.mjs +1 -1
  92. package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +1 -0
  93. package/dist-types/packages/peach-engine/src/engine/native-layout.d.ts +1 -1
  94. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +1 -0
  95. package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -1
  96. package/kotlin/sdk.tar.gz +0 -0
  97. package/package.json +1 -1
  98. package/src/binarySidecarContract.ts +45 -0
  99. package/src/host/bridge-host.ts +12 -13
  100. package/src/menu.ts +14 -0
  101. package/src/native-static-libraries.ts +82 -1
  102. package/src/swift-host.ts +6 -7
  103. package/src/swift-standins.ts +11 -4
  104. package/src/swift-submit.ts +3 -1
  105. package/src/swift-wasm-prune.ts +23 -0
package/dist-lib/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2242 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2244 | (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);
@@ -76,21 +76,6 @@ var INSPECT_PICK_COMMANDS = /* @__PURE__ */ new Set([
76
76
  function isInspectPickCommand(subcommand) {
77
77
  return typeof subcommand === "string" && INSPECT_PICK_COMMANDS.has(subcommand);
78
78
  }
79
- async function isInspectModeActive(bridge) {
80
- const active = await bridge.send({
81
- type: "evaluate",
82
- code: "globalThis.__sootsimEngineState?.inspectActive === true"
83
- });
84
- return active === true;
85
- }
86
- async function shouldSkipAutoSettleForInspectPick(bridge, subcommand) {
87
- if (!isInspectPickCommand(subcommand)) return false;
88
- try {
89
- return await isInspectModeActive(bridge);
90
- } catch {
91
- return false;
92
- }
93
- }
94
79
  async function inspectNodeCount(bridge) {
95
80
  const result = await bridge.send({
96
81
  type: "query",
@@ -1731,10 +1716,14 @@ function renderActivityIdleScript({
1731
1716
  maxMs,
1732
1717
  requiredStillMs,
1733
1718
  transitionStartWindowMs,
1734
- transitionTimeoutMs
1719
+ transitionTimeoutMs,
1720
+ skipIfInspectActive
1735
1721
  }) {
1736
1722
  return `(async () => {
1737
1723
  const start = Date.now()
1724
+ if (${skipIfInspectActive} && globalThis.__sootsimEngineState?.inspectActive === true) {
1725
+ return { settled: true, elapsed: 0, blockedBy: '' }
1726
+ }
1738
1727
  const budgetMs = ${Math.max(0, Math.round(maxMs))}
1739
1728
  const requiredStillMs = ${Math.max(1, Math.round(requiredStillMs))}
1740
1729
  let deadline = start + budgetMs
@@ -1838,6 +1827,7 @@ async function waitForSootsimIdle({
1838
1827
  screenStill = false,
1839
1828
  maestro = false,
1840
1829
  motionOnly = false,
1830
+ skipIfInspectActive = false,
1841
1831
  readyPlayback = false,
1842
1832
  transitionStartWindowMs = 80,
1843
1833
  transitionTimeoutMs = 4e3
@@ -1853,7 +1843,8 @@ async function waitForSootsimIdle({
1853
1843
  maxMs,
1854
1844
  requiredStillMs: Math.max(1, Math.round(stablePolls)) * Math.max(1, Math.round(pollMs)),
1855
1845
  transitionStartWindowMs,
1856
- transitionTimeoutMs
1846
+ transitionTimeoutMs,
1847
+ skipIfInspectActive
1857
1848
  }) : `(async () => {
1858
1849
  const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms))
1859
1850
  // tests inject a virtual clock as globalThis.__sootsimIdleClock ({ now, sleep })
@@ -1947,6 +1938,7 @@ async function waitForSootsimIdle({
1947
1938
  let webViewBlocker = ''
1948
1939
  let visibleMotion = false
1949
1940
  let visibleMotionBy = ''
1941
+ let motionUnavailable = false
1950
1942
  // the reads are independent, so they run concurrently: a loaded sim
1951
1943
  // answers each one late, and a poll that waits for them in turn
1952
1944
  // costs their sum, which fits too few polls in the budget to settle.
@@ -2017,6 +2009,9 @@ async function waitForSootsimIdle({
2017
2009
  .slice(0, 4)
2018
2010
  .map((anim) => anim.source + '/' + anim.kind + '#' + anim.id + ' at ' + anim.current + (anim.loop ? ' loop' : ''))
2019
2011
  .join(', ')
2012
+ } else if (screenStill) {
2013
+ motionUnavailable = true
2014
+ workerBusy = true
2020
2015
  }
2021
2016
  }
2022
2017
  const stats = await statsRead
@@ -2194,7 +2189,7 @@ async function waitForSootsimIdle({
2194
2189
  }
2195
2190
  }
2196
2191
  }
2197
- return { layout: nodes.join(';'), nodeRows, nativeHierarchy, visibleMotion, visibleMotionBy, animating, animatingBy, shellAnimating, shellBlockers, layoutDirty, pendingFetches, workerBusy, webViewStarting, webViewBlocker, renderStatsAvailable, requestTotal, requestInFlight, appCommits, nodeCount }
2192
+ return { layout: nodes.join(';'), nodeRows, nativeHierarchy, visibleMotion, visibleMotionBy, animating, animatingBy, shellAnimating, shellBlockers, layoutDirty, pendingFetches, workerBusy, motionUnavailable, webViewStarting, webViewBlocker, renderStatsAvailable, requestTotal, requestInFlight, appCommits, nodeCount }
2198
2193
  }
2199
2194
 
2200
2195
  // how long generic background network is allowed to keep us waiting AFTER
@@ -2384,7 +2379,8 @@ async function waitForSootsimIdle({
2384
2379
  if (!maestro && last.appCommits !== null && report.appCommits !== null && last.appCommits !== report.appCommits) blockers.push('layout commits still landing')
2385
2380
  if (!maestro && last.nodeCount !== null && report.nodeCount !== null && last.nodeCount !== report.nodeCount) blockers.push('node count still changing')
2386
2381
  if (last.pendingFetches > 0) blockers.push(last.pendingFetches + ' image fetches pending')
2387
- if (last.workerBusy) blockers.push('a render worker too busy to report')
2382
+ if (last.motionUnavailable) blockers.push('animation reporting unavailable')
2383
+ if (last.workerBusy && !last.motionUnavailable) blockers.push('a render worker too busy to report')
2388
2384
  if (last.webViewStarting) blockers.push(last.webViewBlocker || 'webView still starting')
2389
2385
  if (!maestro && last.layout !== report.layout) blockers.push('layout still changing')
2390
2386
  if (maestro && !hierarchyUnchanged(last.nativeHierarchy, report.nativeHierarchy)) blockers.push(last.nativeHierarchy === null ? 'native accessibility hierarchy unavailable' : 'native accessibility hierarchy still changing')
@@ -3422,7 +3418,6 @@ export {
3422
3418
  inspectWaitReady,
3423
3419
  inspectWaitSelector,
3424
3420
  inspectWarnings,
3425
- isInspectModeActive,
3426
3421
  isInspectPickCommand,
3427
3422
  isPeachAccessibilityTree,
3428
3423
  isResolvedTapPayload,
@@ -3440,7 +3435,6 @@ export {
3440
3435
  scoreInteractive,
3441
3436
  scoreLayoutTextContrast,
3442
3437
  setDebugChannels,
3443
- shouldSkipAutoSettleForInspectPick,
3444
3438
  tapBest,
3445
3439
  tapById,
3446
3440
  tapByQuery,