peachsim 0.1.1655 → 0.1.1659

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 (235) hide show
  1. package/cli/app-config.ts +4 -0
  2. package/cli/app-stubs.ts +43 -6
  3. package/cli/commands/inspect/shared.ts +5 -2
  4. package/cli/commands/inspect/url.ts +2 -1
  5. package/cli/commands/screenshot.ts +5 -5
  6. package/cli/commands/state.ts +9 -6
  7. package/cli/outbound-endpoints.ts +9 -1
  8. package/cli/output-redaction.ts +49 -0
  9. package/dist-lib/agent-daemon-client.cjs +1 -1
  10. package/dist-lib/agent-events.cjs +1 -1
  11. package/dist-lib/attached-projects.cjs +1 -1
  12. package/dist-lib/auth/shared-session.cjs +1 -1
  13. package/dist-lib/backend-origin.cjs +1 -1
  14. package/dist-lib/beta.cjs +1 -1
  15. package/dist-lib/beta.mjs +1 -1
  16. package/dist-lib/bridge-constants.cjs +1 -1
  17. package/dist-lib/bridge-contract-input.cjs +1 -1
  18. package/dist-lib/bridge-contract-input.mjs +1 -1
  19. package/dist-lib/bridge-contract.cjs +1 -1
  20. package/dist-lib/bridge-contract.mjs +1 -1
  21. package/dist-lib/bundle-channel.cjs +11251 -1123
  22. package/dist-lib/capture-contract.cjs +1 -1
  23. package/dist-lib/capture-contract.mjs +1 -1
  24. package/dist-lib/cloud-contract.cjs +1 -1
  25. package/dist-lib/cloud-contract.mjs +1 -1
  26. package/dist-lib/cloud-test-args.cjs +1 -1
  27. package/dist-lib/cloud-test-args.mjs +1 -1
  28. package/dist-lib/cloud.cjs +1 -1
  29. package/dist-lib/cloud.mjs +1 -1
  30. package/dist-lib/config.cjs +29 -5
  31. package/dist-lib/config.mjs +29 -5
  32. package/dist-lib/detox/index.cjs +19 -5
  33. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  34. package/dist-lib/expo-swift-bundle.cjs +8960 -134
  35. package/dist-lib/expo-swift-metadata.cjs +1 -1
  36. package/dist-lib/expo-swift-metadata.mjs +1 -1
  37. package/dist-lib/home-paths.cjs +1 -1
  38. package/dist-lib/host/bridge-host.cjs +9769 -731
  39. package/dist-lib/host/fetch-proxy-handler.cjs +260 -197
  40. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  41. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  42. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  43. package/dist-lib/host/websocket-proxy.cjs +1 -1
  44. package/dist-lib/index.cjs +653 -338
  45. package/dist-lib/jump-to-source-babel.cjs +1 -1
  46. package/dist-lib/jump-to-source-native.cjs +1 -1
  47. package/dist-lib/kotlin-host.cjs +443 -312
  48. package/dist-lib/menu.cjs +1 -1
  49. package/dist-lib/menu.mjs +1 -1
  50. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  51. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  52. package/dist-lib/metro-production-bundle.cjs +1 -1
  53. package/dist-lib/metro-production-bundle.mjs +1 -1
  54. package/dist-lib/metro.cjs +548 -163
  55. package/dist-lib/native-app-identity-project.cjs +179 -33
  56. package/dist-lib/native-app-identity-project.mjs +179 -33
  57. package/dist-lib/native-app-identity.cjs +1 -1
  58. package/dist-lib/native-app-identity.mjs +1 -1
  59. package/dist-lib/native-firebase-metadata.cjs +1 -1
  60. package/dist-lib/native-firebase-metadata.mjs +1 -1
  61. package/dist-lib/plist.cjs +1 -1
  62. package/dist-lib/plist.mjs +1 -1
  63. package/dist-lib/profiles.cjs +1 -1
  64. package/dist-lib/public-brand.cjs +1 -1
  65. package/dist-lib/public-origins-lib-esm.json +23 -23
  66. package/dist-lib/public-origins-lib.json +96 -63
  67. package/dist-lib/react-native-host-modules.cjs +1 -1
  68. package/dist-lib/react-native-host-modules.mjs +1 -1
  69. package/dist-lib/scripts/dev-server-scanner.cjs +2 -2
  70. package/dist-lib/sdk.cjs +1 -1
  71. package/dist-lib/sdk.mjs +1 -1
  72. package/dist-lib/skills.cjs +10651 -1418
  73. package/dist-lib/swift-compile.cjs +8802 -138
  74. package/dist-lib/swift-compile.mjs +8802 -138
  75. package/dist-lib/swift-package.cjs +1 -1
  76. package/dist-lib/swift-package.mjs +1 -1
  77. package/dist-lib/swift-submit.cjs +1 -1
  78. package/dist-lib/swift-submit.mjs +1 -1
  79. package/dist-lib/swift-toolchain.cjs +1 -1
  80. package/dist-lib/swift.cjs +1 -1
  81. package/dist-lib/vite-swift.cjs +8960 -134
  82. package/dist-lib/vite.cjs +149 -163
  83. package/dist-lib/worklet-executable.cjs +1 -1
  84. package/dist-lib/worklet-executable.mjs +1 -1
  85. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-gesture-handler.d.ts +1 -0
  86. package/dist-types/packages/peach-engine/src/engine/app-font-registry.d.ts +14 -0
  87. package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +8 -0
  88. package/dist-types/packages/peach-engine/src/engine/node.d.ts +3 -0
  89. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +21 -0
  90. package/dist-types/packages/peach-engine/src/render-worker/gesture-seam-protocol.d.ts +2 -1
  91. package/dist-types/packages/peach-engine/src/render-worker/test-bridge-protocol.d.ts +1 -1
  92. package/dist-types/packages/peach-engine/src/rolldown-bundle-inventory.d.ts +1 -0
  93. package/dist-types/packages/peach-globals/src/index.d.ts +25 -0
  94. package/kotlin/README.md +38 -23
  95. package/kotlin/sdk.tar.gz +0 -0
  96. package/package.json +2 -12
  97. package/runtime-companion.json +1 -1
  98. package/src/bundleGlobalFooter.ts +0 -2
  99. package/src/config.ts +54 -2
  100. package/src/configured-bundle-producer.ts +7 -1
  101. package/src/host/fetch-proxy-handler.ts +14 -50
  102. package/src/host/rolldown-bundle-forward.ts +71 -0
  103. package/src/installed-package-versions.ts +54 -2
  104. package/src/kotlin-host.ts +138 -285
  105. package/src/kotlin-module.ts +4 -7
  106. package/src/kotlin-sdk.ts +81 -0
  107. package/src/kotlin-toolchain.ts +152 -0
  108. package/src/kotlin-view-models.ts +1 -1
  109. package/src/kotlinSdkContract.ts +113 -0
  110. package/src/nitro-adapter.lock.json +3 -3
  111. package/src/nitro-bundle.ts +18 -4
  112. package/src/nitro-compile.ts +5 -1
  113. package/src/nitro-source.ts +112 -28
  114. package/src/nitroContract.ts +16 -4
  115. package/src/swift-compile.ts +12 -3
  116. package/src/swift-host.ts +2 -1
  117. package/src/swift-objc-compile.ts +117 -4
  118. package/src/swift-objc-sdk.ts +8792 -135
  119. package/src/swift-objc-standin.ts +1 -0
  120. package/src/vite-plugin-one.ts +73 -134
  121. package/src/worker-system-chunks.ts +14 -4
  122. package/src/xcode-project.ts +261 -34
  123. package/kotlin/AndroidViewSources/android/content/Context.kt +0 -22
  124. package/kotlin/AndroidViewSources/android/content/res/Configuration.kt +0 -25
  125. package/kotlin/AndroidViewSources/android/content/res/Resources.kt +0 -72
  126. package/kotlin/AndroidViewSources/android/graphics/Canvas.kt +0 -22
  127. package/kotlin/AndroidViewSources/android/graphics/Color.kt +0 -13
  128. package/kotlin/AndroidViewSources/android/graphics/Paint.kt +0 -18
  129. package/kotlin/AndroidViewSources/android/util/DisplayMetrics.kt +0 -12
  130. package/kotlin/AndroidViewSources/android/view/View.kt +0 -211
  131. package/kotlin/AndroidViewSources/android/widget/FrameLayout.kt +0 -61
  132. package/kotlin/AndroidViewSources/android/widget/LinearLayout.kt +0 -49
  133. package/kotlin/AndroidViewSources/dev/peach/app/JavaFormat.kt +0 -272
  134. package/kotlin/AppSources/android/app/Activity.kt +0 -174
  135. package/kotlin/AppSources/android/app/Application.kt +0 -11
  136. package/kotlin/AppSources/android/app/UiModeManager.kt +0 -9
  137. package/kotlin/AppSources/android/content/Intent.kt +0 -16
  138. package/kotlin/AppSources/android/os/Bundle.kt +0 -11
  139. package/kotlin/AppSources/android/util/SuperNotCalledException.kt +0 -3
  140. package/kotlin/AppSources/android/view/Window.kt +0 -182
  141. package/kotlin/AppSources/android/view/WindowInsets.kt +0 -9
  142. package/kotlin/AppSources/android/view/WindowInsetsController.kt +0 -17
  143. package/kotlin/AppSources/android/view/WindowManager.kt +0 -16
  144. package/kotlin/AppSources/android/window/BackEvent.kt +0 -24
  145. package/kotlin/AppSources/android/window/OnBackAnimationCallback.kt +0 -7
  146. package/kotlin/AppSources/android/window/OnBackInvokedDispatcher.kt +0 -84
  147. package/kotlin/AppSources/androidx/activity/ActivityFlags.kt +0 -9
  148. package/kotlin/AppSources/androidx/activity/ActivityViewModelLazy.kt +0 -21
  149. package/kotlin/AppSources/androidx/activity/BackEventCompat.kt +0 -43
  150. package/kotlin/AppSources/androidx/activity/ComponentActivity.kt +0 -122
  151. package/kotlin/AppSources/androidx/activity/EdgeToEdge.kt +0 -75
  152. package/kotlin/AppSources/androidx/activity/ExperimentalActivityApi.kt +0 -6
  153. package/kotlin/AppSources/androidx/activity/OnBackPressedCallback.kt +0 -69
  154. package/kotlin/AppSources/androidx/activity/OnBackPressedDispatcher.kt +0 -144
  155. package/kotlin/AppSources/androidx/activity/OnBackPressedDispatcherOwner.kt +0 -7
  156. package/kotlin/AppSources/androidx/activity/compose/BackHandler.kt +0 -86
  157. package/kotlin/AppSources/androidx/activity/compose/ComponentActivity.kt +0 -29
  158. package/kotlin/AppSources/androidx/activity/compose/internal/BackHandlerCompat.kt +0 -38
  159. package/kotlin/AppSources/androidx/activity/compose/internal/BackHandlerDispatcherCompat.kt +0 -27
  160. package/kotlin/AppSources/androidx/compose/foundation/layout/WindowInsets.kt +0 -15
  161. package/kotlin/AppSources/androidx/compose/ui/platform/AndroidCompositionLocals.kt +0 -27
  162. package/kotlin/AppSources/androidx/compose/ui/platform/ComposeView.kt +0 -68
  163. package/kotlin/AppSources/androidx/compose/ui/res/ColorResources.kt +0 -16
  164. package/kotlin/AppSources/androidx/compose/ui/res/PainterResources.kt +0 -70
  165. package/kotlin/AppSources/androidx/compose/ui/res/StringResources.kt +0 -38
  166. package/kotlin/AppSources/androidx/core/view/WindowCompat.kt +0 -32
  167. package/kotlin/AppSources/androidx/lifecycle/AndroidViewModel.kt +0 -10
  168. package/kotlin/AppSources/dev/peach/app/PeachApp.kt +0 -388
  169. package/kotlin/AppSources/dev/peach/app/PeachDrawable.kt +0 -102
  170. package/kotlin/AppSources/dev/peach/app/PeachWindowHost.kt +0 -14
  171. package/kotlin/CompilerSources/META-INF/services/org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar +0 -1
  172. package/kotlin/CompilerSources/PeachJniIncoming.kt +0 -243
  173. package/kotlin/CompilerSources/PeachJniPlugin.kt +0 -116
  174. package/kotlin/ComposeSources/PeachComposeHost.kt +0 -724
  175. package/kotlin/ComposeSources/PeachMagnifier.kt +0 -185
  176. package/kotlin/ComposeSources/PeachSemantics.kt +0 -127
  177. package/kotlin/ExpoComposeSources/PeachAndroidView.kt +0 -103
  178. package/kotlin/ExpoComposeSources/PeachExpoViewMount.kt +0 -24
  179. package/kotlin/ExpoComposeSources/dev/peach/expo/PeachExpoCompose.kt +0 -28
  180. package/kotlin/ExpoComposeSources/expo/modules/kotlin/views/ExpoComposeView.kt +0 -70
  181. package/kotlin/ExpoSources/dev/peach/expo/PeachExpoRuntime.kt +0 -516
  182. package/kotlin/ExpoSources/dev/peach/expo/PeachExpoTypes.kt +0 -173
  183. package/kotlin/ExpoSources/expo/modules/kotlin/AppContext.kt +0 -20
  184. package/kotlin/ExpoSources/expo/modules/kotlin/Promise.kt +0 -19
  185. package/kotlin/ExpoSources/expo/modules/kotlin/classcomponent/ClassComponentBuilder.kt +0 -198
  186. package/kotlin/ExpoSources/expo/modules/kotlin/exception/CodedException.kt +0 -126
  187. package/kotlin/ExpoSources/expo/modules/kotlin/functions/Functions.kt +0 -132
  188. package/kotlin/ExpoSources/expo/modules/kotlin/jni/JavaScriptTypedArray.kt +0 -81
  189. package/kotlin/ExpoSources/expo/modules/kotlin/modules/Module.kt +0 -98
  190. package/kotlin/ExpoSources/expo/modules/kotlin/objects/ObjectDefinitionBuilder.kt +0 -236
  191. package/kotlin/ExpoSources/expo/modules/kotlin/records/Record.kt +0 -12
  192. package/kotlin/ExpoSources/expo/modules/kotlin/runtime/Runtime.kt +0 -9
  193. package/kotlin/ExpoSources/expo/modules/kotlin/sharedobjects/SharedObject.kt +0 -50
  194. package/kotlin/ExpoSources/expo/modules/kotlin/sharedobjects/SharedObjectRegistry.kt +0 -57
  195. package/kotlin/ExpoSources/expo/modules/kotlin/sharedobjects/SharedRef.kt +0 -19
  196. package/kotlin/ExpoSources/expo/modules/kotlin/typedarray/ConcreteTypedArrays.kt +0 -158
  197. package/kotlin/ExpoSources/expo/modules/kotlin/typedarray/GenericTypedArray.kt +0 -8
  198. package/kotlin/ExpoSources/expo/modules/kotlin/typedarray/TypedArray.kt +0 -29
  199. package/kotlin/ExpoSources/expo/modules/kotlin/typedarray/TypedArrayIterator.kt +0 -9
  200. package/kotlin/ExpoSources/expo/modules/kotlin/types/AnyType.kt +0 -155
  201. package/kotlin/ExpoSources/expo/modules/kotlin/types/Either.kt +0 -91
  202. package/kotlin/ExpoSources/expo/modules/kotlin/types/Enumerable.kt +0 -6
  203. package/kotlin/ExpoSources/expo/modules/kotlin/viewevent/ViewEvent.kt +0 -68
  204. package/kotlin/ExpoSources/expo/modules/kotlin/views/ExpoView.kt +0 -20
  205. package/kotlin/ExpoSources/expo/modules/kotlin/views/ViewDefinitionBuilder.kt +0 -72
  206. package/kotlin/ExpoSources/expo/modules/kotlin/views/ViewProps.kt +0 -36
  207. package/kotlin/JniPlatformSources/androidx/annotation/CallSuper.kt +0 -5
  208. package/kotlin/JniPlatformSources/com/facebook/proguard/annotations/DoNotStrip.kt +0 -5
  209. package/kotlin/JniPlatformSources/dalvik/annotation/optimization/FastNative.kt +0 -5
  210. package/kotlin/JniPlatformSources/kotlin/Synchronized.kt +0 -6
  211. package/kotlin/JniPlatformSources/kotlin/jvm/JvmField.kt +0 -5
  212. package/kotlin/JniPlatformSources/kotlin/jvm/JvmStatic.kt +0 -5
  213. package/kotlin/JniSources/com/facebook/jni/HybridData.kt +0 -66
  214. package/kotlin/JniSources/dev/peach/jni/IncomingBindings.kt +0 -157
  215. package/kotlin/JniSources/dev/peach/jni/NativeBindings.kt +0 -77
  216. package/kotlin/JniTransportSources/dev/peach/jni/integration/JniTransport.kt +0 -89
  217. package/kotlin/Sources/android/os/Build.kt +0 -17
  218. package/kotlin/Sources/android/os/Handler.kt +0 -35
  219. package/kotlin/Sources/android/os/Looper.kt +0 -17
  220. package/kotlin/Sources/android/os/MessageQueue.kt +0 -56
  221. package/kotlin/Sources/android/os/SystemClock.kt +0 -14
  222. package/kotlin/Sources/android/util/Log.kt +0 -64
  223. package/kotlin/Sources/androidx/annotation/DrawableRes.kt +0 -14
  224. package/kotlin/Sources/androidx/annotation/Keep.kt +0 -4
  225. package/kotlin/Sources/dev/onejs/one/OneNativeSourceDispatch.kt +0 -7
  226. package/kotlin/Sources/dev/onejs/one/OneNativeSourceViewDispatch.kt +0 -13
  227. package/kotlin/Sources/dev/onejs/one/source/OneModule.kt +0 -4
  228. package/kotlin/Sources/java/lang/Runnable.kt +0 -6
  229. package/kotlin/Sources/java/security/MessageDigest.kt +0 -114
  230. package/kotlin/Sources/java/util/IllegalFormatCodePointException.kt +0 -10
  231. package/kotlin/Sources/java/util/IllegalFormatException.kt +0 -5
  232. package/kotlin/Sources/kotlin/text/StringFormat.kt +0 -9
  233. package/kotlin/Sources/org/json/JSON.kt +0 -307
  234. package/kotlin/tools/abi-classes.main.kts +0 -41
  235. package/kotlin/tools/expo-types.main.kts +0 -127
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1655 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1659 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -36,7 +36,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
36
36
  var runtime_companion_default;
37
37
  var init_runtime_companion = __esm({
38
38
  "runtime-companion.json"() {
39
- runtime_companion_default = { abi: 1, sha256: "6f6a55398d832d1703346a258bf9f81bf78fded8cf5d83cdf51e5e15ccd7a1ce", file: "node/cli-6f6a55398d832d1703346a258bf9f81bf78fded8cf5d83cdf51e5e15ccd7a1ce.cjs" };
39
+ runtime_companion_default = { abi: 1, sha256: "59277122bc52023de2774e83d48eb795f32324c06d15d9780c8d827791bea7c6", file: "node/cli-59277122bc52023de2774e83d48eb795f32324c06d15d9780c8d827791bea7c6.cjs" };
40
40
  }
41
41
  });
42
42
 
@@ -403,8 +403,11 @@ __export(vite_plugin_one_exports, {
403
403
  module.exports = __toCommonJS(vite_plugin_one_exports);
404
404
  var import_fs3 = __toESM(require("fs"), 1);
405
405
  var import_node_crypto4 = require("node:crypto");
406
+ var import_node_http = __toESM(require("node:http"), 1);
407
+ var import_node_https = __toESM(require("node:https"), 1);
406
408
  var import_node_url = require("node:url");
407
409
  var import_path3 = __toESM(require("path"), 1);
410
+ var import_promises3 = require("stream/promises");
408
411
  var import_ws = require("ws");
409
412
 
410
413
  // src/simulator-route.ts
@@ -419,54 +422,6 @@ var DEFAULT_SOOTSIM_BRIDGE_URL = `http://localhost:${DEFAULT_SOOTSIM_BRIDGE_PORT
419
422
  var HOSTED_SHELL_PATH = new RegExp(`^(?:${PEACH_SIMULATOR_PATH}|/sootsim)(?:/|$)`);
420
423
  var AUTOMATION_SIM_IDLE_REAP_TTL_MS = 5 * 6e4;
421
424
 
422
- // src/bundleGlobalFooter.ts
423
- function findBundleFooter(source, prefix) {
424
- let end = source.length;
425
- while (end > 0) {
426
- const newline = source.lastIndexOf("\n", end - 1);
427
- if (newline < 0) return -1;
428
- const line = newline + 1;
429
- if (source.startsWith(prefix, line)) return newline;
430
- if (!isFooterBlockLine(source, line, end)) return -1;
431
- end = newline;
432
- }
433
- return -1;
434
- }
435
- function isFooterBlockLine(source, line, end) {
436
- return line === end || source.startsWith("globalThis.", line) || source.startsWith("//", line);
437
- }
438
- function readFooter(source, prefix, suffix, name) {
439
- const start = findBundleFooter(source, prefix);
440
- if (start < 0) return null;
441
- const end = source.indexOf("\n", start + 1);
442
- const line = source.slice(start + 1, end < 0 ? void 0 : end);
443
- if (!line.endsWith(suffix)) throw new Error(`${name} footer is truncated`);
444
- const value = JSON.parse(
445
- line.slice(prefix.length, suffix ? -suffix.length : void 0)
446
- );
447
- if (value === null) throw new Error(`${name} footer has no metadata`);
448
- return value;
449
- }
450
- var ROLLDOWN_INVENTORY_HEADER = "X-Peach-Rolldown-Inventory";
451
- function detachFooter(source, prefix, suffix, name) {
452
- const start = findBundleFooter(source, prefix);
453
- if (start < 0) return { source, value: null };
454
- const value = readFooter(source, prefix, suffix, name);
455
- const end = source.indexOf("\n", start + 1);
456
- return { source: source.slice(0, start) + (end < 0 ? "" : source.slice(end)), value };
457
- }
458
- function insertBundleGlobalFooter(source, name, value) {
459
- return insertFooter(source, `globalThis.${name}=`, ";", name, value);
460
- }
461
- function insertFooter(source, prefix, suffix, name, value) {
462
- source = detachFooter(source, prefix, suffix, name).source;
463
- const json = JSON.stringify(value).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
464
- const footer = `
465
- ${prefix}${json}${suffix}`;
466
- const identity = findBundleFooter(source, "globalThis.__sootsimModulePaths=");
467
- return identity < 0 ? source + footer : source.slice(0, identity) + footer + source.slice(identity);
468
- }
469
-
470
425
  // src/vite-plugin-one.ts
471
426
  init_cli_runtime();
472
427
 
@@ -1008,6 +963,56 @@ async function handleReplacementModuleRequest(req, res, options = {}) {
1008
963
  return true;
1009
964
  }
1010
965
 
966
+ // src/host/rolldown-bundle-forward.ts
967
+ var import_stream = require("stream");
968
+ var import_promises2 = require("stream/promises");
969
+ init_cli_runtime();
970
+ var ROLLDOWN_INVENTORY_HEADER = "x-peach-rolldown-inventory";
971
+ async function forwardRolldownBundleResponse(upstream, res) {
972
+ res.setHeader(ROLLDOWN_INVENTORY_HEADER, "1");
973
+ if (upstream.headers[ROLLDOWN_INVENTORY_HEADER] === "1") {
974
+ await (0, import_promises2.pipeline)(upstream, res);
975
+ return;
976
+ }
977
+ const contentType = typeof upstream.headers["content-type"] === "string" ? upstream.headers["content-type"] : "";
978
+ const inventory = getCliRuntime().rolldown_bundle_inventory;
979
+ res.removeHeader("content-length");
980
+ const annotate = async function* () {
981
+ const decoder = new TextDecoder();
982
+ let payload = "";
983
+ let sent = 0;
984
+ let bundleStarted = false;
985
+ for await (const chunk of upstream) {
986
+ payload += decoder.decode(chunk, { stream: true });
987
+ if (bundleStarted) continue;
988
+ const releasable = inventory.releasableMultipartPrefix(payload, contentType);
989
+ bundleStarted = releasable.bundleStarted;
990
+ if (releasable.length > sent) {
991
+ yield Buffer.from(payload.slice(sent, releasable.length), "utf8");
992
+ sent = releasable.length;
993
+ }
994
+ }
995
+ payload += decoder.decode();
996
+ let annotated;
997
+ try {
998
+ annotated = await inventory.attachRolldownBundleHttpPayload(payload, contentType);
999
+ } catch (error) {
1000
+ const message = `could not attach the rolldown bundle inventory: ${error instanceof Error ? error.message : String(error)}`;
1001
+ console.error(`[peach] ${message}`);
1002
+ if (contentType.toLowerCase().includes("multipart/mixed")) {
1003
+ yield Buffer.from(inventory.multipartFailurePart(contentType, message), "utf8");
1004
+ return;
1005
+ }
1006
+ res.statusCode = 500;
1007
+ res.setHeader("content-type", "application/json");
1008
+ yield Buffer.from(JSON.stringify({ message }), "utf8");
1009
+ return;
1010
+ }
1011
+ yield Buffer.from(annotated.slice(sent), "utf8");
1012
+ };
1013
+ await (0, import_promises2.pipeline)(import_stream.Readable.from(annotate(), { objectMode: false }), res);
1014
+ }
1015
+
1011
1016
  // src/installed-package-versions.ts
1012
1017
  var import_fs2 = __toESM(require("fs"), 1);
1013
1018
  var import_path2 = __toESM(require("path"), 1);
@@ -4241,6 +4246,53 @@ async function configuredOneWidget(appRoot, bundleUrl) {
4241
4246
  };
4242
4247
  }
4243
4248
 
4249
+ // src/bundleGlobalFooter.ts
4250
+ function findBundleFooter(source, prefix) {
4251
+ let end = source.length;
4252
+ while (end > 0) {
4253
+ const newline = source.lastIndexOf("\n", end - 1);
4254
+ if (newline < 0) return -1;
4255
+ const line = newline + 1;
4256
+ if (source.startsWith(prefix, line)) return newline;
4257
+ if (!isFooterBlockLine(source, line, end)) return -1;
4258
+ end = newline;
4259
+ }
4260
+ return -1;
4261
+ }
4262
+ function isFooterBlockLine(source, line, end) {
4263
+ return line === end || source.startsWith("globalThis.", line) || source.startsWith("//", line);
4264
+ }
4265
+ function readFooter(source, prefix, suffix, name) {
4266
+ const start = findBundleFooter(source, prefix);
4267
+ if (start < 0) return null;
4268
+ const end = source.indexOf("\n", start + 1);
4269
+ const line = source.slice(start + 1, end < 0 ? void 0 : end);
4270
+ if (!line.endsWith(suffix)) throw new Error(`${name} footer is truncated`);
4271
+ const value = JSON.parse(
4272
+ line.slice(prefix.length, suffix ? -suffix.length : void 0)
4273
+ );
4274
+ if (value === null) throw new Error(`${name} footer has no metadata`);
4275
+ return value;
4276
+ }
4277
+ function detachFooter(source, prefix, suffix, name) {
4278
+ const start = findBundleFooter(source, prefix);
4279
+ if (start < 0) return { source, value: null };
4280
+ const value = readFooter(source, prefix, suffix, name);
4281
+ const end = source.indexOf("\n", start + 1);
4282
+ return { source: source.slice(0, start) + (end < 0 ? "" : source.slice(end)), value };
4283
+ }
4284
+ function insertBundleGlobalFooter(source, name, value) {
4285
+ return insertFooter(source, `globalThis.${name}=`, ";", name, value);
4286
+ }
4287
+ function insertFooter(source, prefix, suffix, name, value) {
4288
+ source = detachFooter(source, prefix, suffix, name).source;
4289
+ const json = JSON.stringify(value).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/<\//g, "<\\/");
4290
+ const footer = `
4291
+ ${prefix}${json}${suffix}`;
4292
+ const identity = findBundleFooter(source, "globalThis.__sootsimModulePaths=");
4293
+ return identity < 0 ? source + footer : source.slice(0, identity) + footer + source.slice(identity);
4294
+ }
4295
+
4244
4296
  // src/packageVersionsContract.ts
4245
4297
  var PACKAGE_VERSIONS_HEADER = "X-Peach-Package-Versions";
4246
4298
  var FOOTER = "__peachPackageVersions";
@@ -4269,6 +4321,7 @@ function exposeHeader(res, name) {
4269
4321
  if (!names.includes(name))
4270
4322
  res.setHeader("access-control-expose-headers", [...names, name].join(", "));
4271
4323
  }
4324
+ var BUNDLE_SOURCE_REQUEST_HEADER = "x-peach-bundle-source";
4272
4325
  var SWIFT_ROUTE_PREFIX = "/__peach/swift";
4273
4326
  var swiftHost;
4274
4327
  var loadSwiftHost = () => swiftHost ??= import("peachsim/vite-swift");
@@ -4320,122 +4373,52 @@ function peachPlugin(options = {}) {
4320
4373
  JSON.stringify(readInstalledNativePackageVersions(server.config.root))
4321
4374
  );
4322
4375
  exposeHeader(res, PACKAGE_VERSIONS_HEADER);
4323
- res.setHeader(ROLLDOWN_INVENTORY_HEADER, "1");
4324
- exposeHeader(res, ROLLDOWN_INVENTORY_HEADER);
4325
- const origWriteHead = res.writeHead.bind(res);
4326
- const origWrite = res.write.bind(res);
4327
- const origEnd = res.end.bind(res);
4328
- let pendingStatus;
4329
- let pendingMessage;
4330
- const flushHead = () => {
4331
- if (pendingStatus !== void 0 && !res.headersSent) {
4332
- const code = pendingStatus;
4333
- const msg = pendingMessage;
4334
- pendingStatus = void 0;
4335
- pendingMessage = void 0;
4336
- if (typeof msg === "string") origWriteHead(code, msg);
4337
- else origWriteHead(code);
4338
- }
4376
+ if (req.method !== "GET" || req.headers[BUNDLE_SOURCE_REQUEST_HEADER]) {
4377
+ next();
4378
+ return;
4379
+ }
4380
+ const address = server.httpServer?.address();
4381
+ if (!address || typeof address !== "object") {
4382
+ next();
4383
+ return;
4384
+ }
4385
+ const loopback = address.address === "::" || address.address === "0.0.0.0" ? "127.0.0.1" : address.address;
4386
+ const authority = req.headers[":authority"];
4387
+ const options2 = {
4388
+ host: loopback,
4389
+ port: address.port,
4390
+ path: req.url,
4391
+ method: "GET",
4392
+ headers: {
4393
+ ...Object.fromEntries(
4394
+ Object.entries(req.headers).filter(([key]) => !key.startsWith(":"))
4395
+ ),
4396
+ host: req.headers.host ?? (typeof authority === "string" ? authority : void 0),
4397
+ "accept-encoding": "identity",
4398
+ [BUNDLE_SOURCE_REQUEST_HEADER]: "1"
4399
+ },
4400
+ rejectUnauthorized: false
4339
4401
  };
4340
- Reflect.set(
4341
- res,
4342
- "writeHead",
4343
- function(statusCode, statusMessage, headers) {
4344
- pendingStatus = statusCode;
4345
- res.statusCode = statusCode;
4346
- if (typeof statusMessage === "string") pendingMessage = statusMessage;
4347
- const hdrs = typeof statusMessage === "object" && statusMessage !== null ? statusMessage : headers;
4348
- if (hdrs && typeof hdrs === "object" && !Array.isArray(hdrs)) {
4349
- for (const [key, value] of Object.entries(hdrs)) {
4350
- if (key.toLowerCase() === "content-length") continue;
4351
- if (typeof value === "string" || typeof value === "number" || Array.isArray(value)) {
4352
- res.setHeader(key, value);
4353
- }
4354
- }
4402
+ const respond = (upstream) => {
4403
+ res.statusCode = upstream.statusCode ?? 502;
4404
+ for (const [key, value] of Object.entries(upstream.headers)) {
4405
+ const lowerKey = key.toLowerCase();
4406
+ if (value === void 0 || lowerKey === "connection" || lowerKey === "keep-alive" || lowerKey === "transfer-encoding") {
4407
+ continue;
4355
4408
  }
4356
- res.removeHeader("content-length");
4357
- if (statusCode !== 200) res.removeHeader(ROLLDOWN_INVENTORY_HEADER);
4358
- return res;
4409
+ res.setHeader(key, value);
4359
4410
  }
4360
- );
4361
- const chunks = [];
4362
- let buffering = false;
4363
- const isBufferEncoding = (value) => typeof value === "string" && Buffer.isEncoding(value);
4364
- const toBuffer = (chunk, encoding) => {
4365
- if (chunk === void 0 || chunk === null || typeof chunk === "function")
4366
- return null;
4367
- if (Buffer.isBuffer(chunk)) return chunk;
4368
- if (chunk instanceof Uint8Array) return Buffer.from(chunk);
4369
- if (typeof chunk === "string")
4370
- return Buffer.from(chunk, isBufferEncoding(encoding) ? encoding : "utf8");
4371
- return null;
4411
+ const forward = res.statusCode === 200 ? forwardRolldownBundleResponse(upstream, res) : (0, import_promises3.pipeline)(upstream, res);
4412
+ forward.catch(
4413
+ (error) => res.destroy(error instanceof Error ? error : new Error(String(error)))
4414
+ );
4372
4415
  };
4373
- Reflect.set(res, "write", function(chunk, arg1) {
4374
- const buf = toBuffer(chunk, arg1);
4375
- if (!buf) {
4376
- flushHead();
4377
- return origWrite("");
4378
- }
4379
- if (!buffering) {
4380
- const lower = buf.toString("utf8").toLowerCase();
4381
- const contentType = String(res.getHeader("content-type") ?? "").toLowerCase();
4382
- if (!contentType.includes("multipart/mixed") || lower.includes("content-type: text/javascript") || lower.includes("content-type: application/javascript")) {
4383
- buffering = true;
4384
- }
4385
- }
4386
- if (buffering) {
4387
- chunks.push(buf);
4388
- return true;
4389
- }
4390
- flushHead();
4391
- return origWrite(buf);
4416
+ const upstreamReq = server.config.server.https ? import_node_https.default.request(options2, respond) : import_node_http.default.request(options2, respond);
4417
+ upstreamReq.once("error", next);
4418
+ req.once("close", () => {
4419
+ if (!res.writableFinished) upstreamReq.destroy();
4392
4420
  });
4393
- Reflect.set(
4394
- res,
4395
- "end",
4396
- function(chunk, arg1, arg2) {
4397
- const callback = typeof chunk === "function" ? chunk : typeof arg1 === "function" ? arg1 : typeof arg2 === "function" ? arg2 : void 0;
4398
- const finish = () => {
4399
- flushHead();
4400
- if (typeof callback === "function") {
4401
- return origEnd(() => {
4402
- Reflect.apply(callback, res, []);
4403
- });
4404
- }
4405
- return origEnd();
4406
- };
4407
- const buf = toBuffer(chunk, arg1);
4408
- if (buf) chunks.push(buf);
4409
- if (chunks.length === 0 || res.statusCode && res.statusCode !== 200) {
4410
- if (!res.headersSent) res.removeHeader(ROLLDOWN_INVENTORY_HEADER);
4411
- flushHead();
4412
- for (const queued of chunks) origWrite(queued);
4413
- return finish();
4414
- }
4415
- const payload = Buffer.concat(chunks).toString("utf8");
4416
- const contentType = String(res.getHeader("content-type") ?? "");
4417
- void getCliRuntime().rolldown_bundle_inventory.attachRolldownBundleHttpPayload(
4418
- payload,
4419
- contentType
4420
- ).then((annotated) => {
4421
- if (!res.headersSent) res.removeHeader("content-length");
4422
- flushHead();
4423
- origWrite(Buffer.from(annotated, "utf8"));
4424
- finish();
4425
- }).catch((error) => {
4426
- console.error("[peach] failed to attach rolldown bundle inventory", error);
4427
- if (!res.headersSent) {
4428
- res.removeHeader("content-length");
4429
- res.removeHeader(ROLLDOWN_INVENTORY_HEADER);
4430
- }
4431
- flushHead();
4432
- origWrite(Buffer.from(payload, "utf8"));
4433
- finish();
4434
- });
4435
- return res;
4436
- }
4437
- );
4438
- next();
4421
+ upstreamReq.end();
4439
4422
  });
4440
4423
  const bundleLayer = server.middlewares.stack.pop();
4441
4424
  if (bundleLayer) server.middlewares.stack.unshift(bundleLayer);
@@ -4537,8 +4520,11 @@ function peachPlugin(options = {}) {
4537
4520
  if (!pathname.startsWith(KOTLIN_ROUTE_PREFIX)) return next();
4538
4521
  loadKotlinHost().then(async (host) => {
4539
4522
  if (!kotlinModuleRoot) {
4540
- kotlinModuleRoot = host.peachKotlinModuleRoot();
4541
- server.watcher.add(import_path3.default.join(kotlinModuleRoot, "Sources"));
4523
+ const root = host.peachKotlinModuleRoot();
4524
+ kotlinModuleRoot = root;
4525
+ server.watcher.add(
4526
+ ["sdk.tar.gz", "toolchain.json"].map((file) => import_path3.default.join(root, file))
4527
+ );
4542
4528
  }
4543
4529
  const served = await host.serveKotlinRequest(pathname, res, {
4544
4530
  root: server.config.root,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1655 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1659 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1655 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1659 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
@@ -10,6 +10,7 @@ export interface SeamPointerEvent {
10
10
  x: number;
11
11
  y: number;
12
12
  changedTouch: SeamPointerEvent['touches'][number];
13
+ changedTouches: SeamPointerEvent['touches'];
13
14
  pointerType?: number;
14
15
  stylusData?: {
15
16
  tiltX: number;
@@ -39,6 +39,20 @@ export interface AppFontRegisteredSpec {
39
39
  symbols?: readonly number[];
40
40
  materialSymbols?: MaterialSymbolFontMetadata;
41
41
  }
42
+ export type AppFontAttemptStage = 'received' | 'provider-unavailable' | 'buffer-missing' | 'signature-invalid' | 'parse-failed' | 'registered' | 'relayed' | 'relay-failed';
43
+ export interface AppFontAttempt {
44
+ sequence: number;
45
+ family: string | null;
46
+ source: string | null;
47
+ stage: AppFontAttemptStage;
48
+ receivedAtDateNow: number;
49
+ observedAtDateNow: number;
50
+ }
51
+ export declare function beginAppFontAttempt(opts: {
52
+ familyAlias?: string;
53
+ sourceLabel?: string;
54
+ }): number;
55
+ export declare function markAppFontAttempt(sequence: number, stage: AppFontAttemptStage): void;
42
56
  export interface RegisteredAppFontFace {
43
57
  data: ArrayBuffer;
44
58
  families: string[];
@@ -12,6 +12,8 @@ type CachedImageEntry = {
12
12
  version: number;
13
13
  mipmapped?: boolean;
14
14
  decodedScale?: number;
15
+ retainedDecoded?: DecodedImagePixels;
16
+ touchSerial?: number;
15
17
  imageTransforms?: Map<string, CachedImageTransform>;
16
18
  imageTransformBytes?: number;
17
19
  externalSourceKey?: string;
@@ -90,6 +92,9 @@ export interface InspectImageSource {
90
92
  height?: number;
91
93
  scale?: number;
92
94
  }
95
+ export declare function isNodeOwnScreenDetached(node: SootSimNode): boolean;
96
+ export declare function isNodeInDetachedScreen(node: SootSimNode): boolean;
97
+ export declare function isNodeOutsideScrollViewport(node: SootSimNode): boolean;
93
98
  export declare function subscribeLiveFrames(listener: (channelId: string) => void): () => void;
94
99
  export declare function readLiveFrameSource(channelId: string): ImageFrameSource | null;
95
100
  export declare function getLiveFrameChannels(): string[];
@@ -337,6 +342,9 @@ export declare function hasImageLoadInFlight(): boolean;
337
342
  export declare function loadImageForNode(node: SootSimNode, ctx?: RenderContext): void;
338
343
  export declare function drawsLiveImage(node: SootSimNode): boolean;
339
344
  export declare function touchPaintedImage(node: SootSimNode, ctx: RenderContext): void;
345
+ export declare function releaseDetachedSubtreeImages(root: SootSimNode): void;
346
+ export declare function requeueAttachedSubtreeImages(root: SootSimNode, onRequeueNode?: (imgNode: SootSimNode) => void): void;
347
+ export declare function revealScrolledViewportImages(scrollNode: SootSimNode, onRevealNode?: (imgNode: SootSimNode) => void): void;
340
348
  export declare function clearImageRepeatShader(node: SootSimNode): void;
341
349
  export declare function clearImageNodeRepeatShaders(node: SootSimNode): void;
342
350
  export declare function releaseImageNode(node: SootSimNode): void;
@@ -41,12 +41,14 @@ declare class NodeRegistry {
41
41
  }
42
42
  declare const handleToNode: NodeRegistry;
43
43
  export { handleToNode };
44
+ export declare function registerHoistUnlinker(unlinker: (node: SootSimNode) => void): void;
44
45
  export declare function registerLottieNodeDisposer(disposer: (node: SootSimNode) => void): void;
45
46
  export declare const classicLayoutAnimations: Set<SootSimNode>;
46
47
  export declare function releaseDetachedNode(node: SootSimNode | SootSimTextNode): void;
47
48
  export declare function releaseDetachedSubtree(node: SootSimNode | SootSimTextNode): void;
48
49
  export declare function releaseOrphanedNodes(): number;
49
50
  export declare function queueAllImageLoads(): void;
51
+ export declare function syncNodeScreenDetachState(node: SootSimNode, wasDetached: boolean): void;
50
52
  export declare function readTreeVersion(): number;
51
53
  export declare function readLayoutVersion(): number;
52
54
  export declare function readScrollVersion(): number;
@@ -360,6 +362,7 @@ export declare class SootSimNode {
360
362
  get presentedScrollOffsetY(): number;
361
363
  syncScrollPresentation(presentedDisplacement?: number): void;
362
364
  set scrollOffsetY(value: number);
365
+ private _revealScrolledImages;
363
366
  subscribeScrollOffset(listener: () => void): () => void;
364
367
  get _zoomScale(): number | undefined;
365
368
  set _zoomScale(value: number | undefined);
@@ -1071,6 +1071,7 @@ export interface CompositorStats {
1071
1071
  lastReceivedGeneration: number | null;
1072
1072
  lastRuntimeGeneration: number | null;
1073
1073
  active: number;
1074
+ drives: ScreenTransitionDriveStats[];
1074
1075
  lifecycle: ScreenTransitionLifecycleStats;
1075
1076
  };
1076
1077
  promotedLayers: {
@@ -1351,6 +1352,26 @@ export interface CompositorScrollRegistryEntry {
1351
1352
  slotPresentationDisplacementY: number;
1352
1353
  }
1353
1354
  export declare const SCREEN_TRANSITION_DONE_OUTCOMES: readonly ['stale-generation', 'unbound-generation', 'no-claim', 'claim-mismatch', 'no-active-transition', 'completed'];
1355
+ export interface ScreenTransitionDriveStats {
1356
+ surfaceId: string;
1357
+ generation: number;
1358
+ stackId: number;
1359
+ transitionId: number;
1360
+ phase: 'presenting' | 'dismissing' | 'interactive';
1361
+ started: boolean;
1362
+ committing: boolean;
1363
+ startTs: number | null;
1364
+ barItemsStartTs: number | null;
1365
+ animationNow: number;
1366
+ elapsedMs: number;
1367
+ progress: number;
1368
+ completionPending: boolean;
1369
+ landingPending: boolean;
1370
+ landed: boolean;
1371
+ nativeProgram: boolean;
1372
+ objectTags: number;
1373
+ retiredCardTargets: number;
1374
+ }
1354
1375
  export type ScreenTransitionDoneOutcome = (typeof SCREEN_TRANSITION_DONE_OUTCOMES)[number];
1355
1376
  export type ScreenTransitionLifecycleEvent = {
1356
1377
  seq: number;
@@ -128,7 +128,8 @@ export interface GestureSeamTouchEvent {
128
128
  pointerType: number;
129
129
  x: number;
130
130
  y: number;
131
- changedTouch: SeamPointerEvent['changedTouch'];
131
+ state: number;
132
+ changedTouches: SeamPointerEvent['changedTouches'];
132
133
  touches: ReadonlyArray<{
133
134
  pageX: number;
134
135
  pageY: number;
@@ -1,5 +1,5 @@
1
1
  import type { SootSimTestBridge, SootSimTestBridgeArgs, SootSimTestBridgeMethod, SootSimTestBridgeResult } from '../../../peach-globals/src/index.d.ts';
2
- export type ShellTestBridgeMethod = 'debugSnapshot' | 'debugFind' | 'captureAccessibilityTree' | 'dumpAccessibilityTree' | 'dumpTree' | 'findAllByA11yState' | 'findAllByRole' | 'ancestorChainById' | 'ancestorChainByTestId' | 'findByHint' | 'findById' | 'findByLabel' | 'findByTestId' | 'findByText' | 'findByTextOrLabel' | 'findPressable' | 'getNodeCount' | 'getWindowNodeCount' | 'getSurfaceMetricsSnapshot' | 'getTreeQuietMs' | 'getGeometryRevision' | 'getCullStats' | 'getFontDebug' | 'getImageLoaderStats' | 'getPeerStats' | 'getWorkletSlotStats' | 'getShellGestureSeamDebug' | 'getShellPointerDebug' | 'getShellNativeAnimDebug' | 'getShellAnimatedGraphDebug' | 'getShellAuxPresentationDebug' | 'startShellChromeTrajectoryCapture' | 'markShellChromeTrajectoryPhase' | 'getShellChromeTrajectoryCapture' | 'getShellScrollInputDebug' | 'startScrollPerformanceTrace' | 'stopScrollPerformanceTrace' | 'getShellScrollState' | 'getShellCursorState' | 'getShellInspectSchedulingStats' | 'getShellReanimatedTrace' | 'getShellLayoutAnimationDebug' | 'getShellMirrorStyle' | 'getShellBackgroundPlaybackViewTags' | 'getShellChromeLuminance' | 'getShellSnapshotDebug' | 'recordShellPresentationWrites' | 'dispatchShellSensorSample' | 'getScrollMirrorDebug' | 'setShellMapperReleaseTestState' | 'setShellReanimatedTraceEnabled' | 'getShellFeatureFlagsSnapshot' | 'inspectAt' | 'inspectByNodeId' | 'inspectHoverAt' | 'inspectNeighbor' | 'inspectSetStyleOverride' | 'listAnimations' | 'listInspectable' | 'listSemanticInspectable' | 'inspectTree' | 'queryAll' | 'queryMatchingNodes' | 'observeTapTarget' | 'queryMountedShell' | 'queryTextCandidates' | 'replaceTextByTestId' | 'resolveTapTarget' | 'verifyTapTargetAt' | 'stopAnimation' | 'waitForScreenTransitions';
2
+ export type ShellTestBridgeMethod = 'debugSnapshot' | 'debugFind' | 'captureAccessibilityTree' | 'dumpAccessibilityTree' | 'dumpTree' | 'findAllByA11yState' | 'findAllByRole' | 'ancestorChainById' | 'ancestorChainByTestId' | 'findByHint' | 'findById' | 'findByLabel' | 'findByTestId' | 'findByText' | 'findByTextOrLabel' | 'findPressable' | 'getNodeCount' | 'getWindowNodeCount' | 'getSurfaceMetricsSnapshot' | 'getTreeQuietMs' | 'getNodeCountAndQuietMs' | 'getGeometryRevision' | 'getCullStats' | 'getFontDebug' | 'getImageLoaderStats' | 'getPeerStats' | 'getWorkletSlotStats' | 'getShellGestureSeamDebug' | 'getShellPointerDebug' | 'getShellNativeAnimDebug' | 'getShellAnimatedGraphDebug' | 'getShellAuxPresentationDebug' | 'startShellChromeTrajectoryCapture' | 'markShellChromeTrajectoryPhase' | 'getShellChromeTrajectoryCapture' | 'getShellScrollInputDebug' | 'startScrollPerformanceTrace' | 'stopScrollPerformanceTrace' | 'getShellScrollState' | 'getShellCursorState' | 'getShellInspectSchedulingStats' | 'getShellReanimatedTrace' | 'getShellLayoutAnimationDebug' | 'getShellMirrorStyle' | 'getShellBackgroundPlaybackViewTags' | 'getShellChromeLuminance' | 'getShellSnapshotDebug' | 'recordShellPresentationWrites' | 'dispatchShellSensorSample' | 'getScrollMirrorDebug' | 'setShellMapperReleaseTestState' | 'setShellReanimatedTraceEnabled' | 'getShellFeatureFlagsSnapshot' | 'inspectAt' | 'inspectByNodeId' | 'inspectHoverAt' | 'inspectNeighbor' | 'inspectSetStyleOverride' | 'listAnimations' | 'listInspectable' | 'listSemanticInspectable' | 'inspectTree' | 'queryAll' | 'queryMatchingNodes' | 'observeTapTarget' | 'queryMountedShell' | 'queryTextCandidates' | 'replaceTextByTestId' | 'resolveTapTarget' | 'verifyTapTargetAt' | 'stopAnimation' | 'waitForScreenTransitions';
3
3
  export type ShellInspectBridgeMethod = Extract<SootSimTestBridgeMethod, 'inspectAt' | 'inspectHoverAt' | 'inspectByNodeId' | 'inspectNeighbor' | 'inspectSetStyleOverride' | 'inspectSetHandlerLogging' | 'listInspectable' | 'listSemanticInspectable' | 'inspectTree'>;
4
4
  type BridgeRequestType = 'testBridge' | 'shellTestBridge' | 'inspectRequest';
5
5
  type ShellOnlyTestBridgeArgs<Method extends string> = Method extends 'queryMountedShell' ? SootSimTestBridgeArgs<'queryAll'> : Method extends 'setShellMapperReleaseTestState' ? [testID: string, state: 'drive' | 'release'] : Method extends 'replaceTextByTestId' ? [testID: string, text: string] : Method extends 'startScrollPerformanceTrace' ? [limit?: number] : Method extends 'startShellChromeTrajectoryCapture' ? [testID: string, durationMs: number, relatedTestID?: string] : Method extends 'markShellChromeTrajectoryPhase' ? [phase: string] : Method extends 'getFontDebug' ? [family?: string, fontWeight?: unknown] : Method extends 'getShellScrollState' ? [id: string] : Method extends 'getShellMirrorStyle' ? [viewTag: number] : Method extends 'getShellSnapshotDebug' ? [reset?: boolean] : Method extends 'recordShellPresentationWrites' ? [action: 'start' | 'read' | 'drain' | 'stop'] : Method extends 'dispatchShellSensorSample' ? [
@@ -88,6 +88,7 @@ export declare function releasableMultipartPrefix(payload: string, contentType:
88
88
  length: number;
89
89
  bundleStarted: boolean;
90
90
  };
91
+ export declare function multipartFailurePart(contentType: string, message: string): string;
91
92
  export declare function attachRolldownBundleHttpPayload(payload: string, contentType: string | undefined): Promise<string>;
92
93
  export declare function readRolldownBundleInventory(source: string): Promise<RolldownBundleInventory>;
93
94
  export {};
@@ -310,8 +310,23 @@ export interface SootSimTapTargetMatch {
310
310
  coordinateTarget: SootSimReplayTarget;
311
311
  }
312
312
  export type SootSimTapTargetVerification = SootSimTapTargetMatch | SootSimTapRefusal;
313
+ export interface SootSimNativePresentationInfo {
314
+ evaluationId: string;
315
+ ownerGeneration: number | 'unknown';
316
+ presentationId: number;
317
+ state: 'active' | 'closing' | 'removed';
318
+ requestCompleted: boolean | 'unknown';
319
+ storeRevision: number;
320
+ observedAt: {
321
+ clock: 'performance.now';
322
+ ms: number;
323
+ timeOrigin: number | 'unknown';
324
+ };
325
+ }
313
326
  export interface SootSimTapResult extends Partial<Omit<SootSimTapRefusal, 'hit'>> {
314
327
  hit: boolean;
328
+ presentationAtDown?: SootSimNativePresentationInfo;
329
+ presentationAtUp?: SootSimNativePresentationInfo;
315
330
  type?: string;
316
331
  testID?: string;
317
332
  isTextInput?: boolean;
@@ -812,6 +827,10 @@ export interface SootSimTestBridge {
812
827
  getNodeCount(): MaybeAsync<number>;
813
828
  getWindowNodeCount(): MaybeAsync<number>;
814
829
  getTreeQuietMs(): MaybeAsync<number>;
830
+ getNodeCountAndQuietMs(): MaybeAsync<{
831
+ count: number;
832
+ quietMs: number;
833
+ }>;
815
834
  getGeometryRevision(): MaybeAsync<string | null>;
816
835
  getCullStats?(reset?: boolean): MaybeAsync<{
817
836
  examined: number;
@@ -960,6 +979,11 @@ export interface SootSimInteractBridge {
960
979
  captureBoundTap?(token: number, x: number, y: number, nativeWindowRoot?: number): MaybeAsync<SootSimCaptureBoundTapReceipt>;
961
980
  touchDown?(x: number, y: number, pointerId?: number, timestamp?: number): MaybeAsync<boolean>;
962
981
  touchMove?(x: number, y: number, pointerId?: number, timestamp?: number): MaybeAsync<boolean>;
982
+ touchMoveGroup?(points: ReadonlyArray<{
983
+ x: number;
984
+ y: number;
985
+ pointerId: number;
986
+ }>, timestamp?: number): MaybeAsync<boolean>;
963
987
  touchUp?(x: number, y: number, pointerId?: number, timestamp?: number): MaybeAsync<boolean>;
964
988
  touchCancel?(pointerId?: number, timestamp?: number): MaybeAsync<boolean>;
965
989
  }
@@ -2659,6 +2683,7 @@ export interface SootSimNodeInfo {
2659
2683
  nativeTag?: number;
2660
2684
  accessibilityFrame?: SootSimLayout;
2661
2685
  nativeType?: string | null;
2686
+ presentation?: SootSimNativePresentationInfo;
2662
2687
  nodeId: number;
2663
2688
  type: string;
2664
2689
  id: string | null;