peachsim 0.1.687 → 0.1.689

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 (116) hide show
  1. package/cli/cloud-client.ts +3 -3
  2. package/cli/command-registry.ts +2 -0
  3. package/cli/commands/control.ts +1 -0
  4. package/cli/commands/debug.ts +10 -33
  5. package/cli/commands/do-chain.ts +56 -6
  6. package/cli/commands/inspect/core.ts +2 -0
  7. package/cli/commands/inspect/list.ts +2 -1
  8. package/cli/commands/inspect/settling.ts +17 -3
  9. package/cli/commands/inspect/shared.ts +2 -0
  10. package/cli/commands/inspect/wait-idle.ts +2 -2
  11. package/cli/commands/inspect/wait-ready.ts +3 -3
  12. package/cli/commands/inspect.ts +33 -7
  13. package/cli/commands/location.ts +164 -0
  14. package/cli/commands/platform.ts +1 -1
  15. package/cli/drivers/playwright-sim-host.ts +46 -25
  16. package/cli/main.ts +6 -0
  17. package/detox/index.ts +13 -8
  18. package/dist-lib/agent-daemon-client.cjs +1 -1
  19. package/dist-lib/agent-events.cjs +1 -1
  20. package/dist-lib/agent-identity.cjs +1 -1
  21. package/dist-lib/agent-sessions.cjs +1 -1
  22. package/dist-lib/attached-projects.cjs +1 -1
  23. package/dist-lib/auth/shared-session.cjs +1 -1
  24. package/dist-lib/backend-origin.cjs +1 -1
  25. package/dist-lib/beta.cjs +1 -1
  26. package/dist-lib/beta.mjs +1 -1
  27. package/dist-lib/bridge-constants.cjs +4 -3
  28. package/dist-lib/bridge-contract-input.cjs +12 -1
  29. package/dist-lib/bridge-contract-input.mjs +12 -1
  30. package/dist-lib/bridge-contract.cjs +4 -3
  31. package/dist-lib/bridge-contract.mjs +4 -3
  32. package/dist-lib/capture-contract.cjs +1 -1
  33. package/dist-lib/capture-contract.mjs +1 -1
  34. package/dist-lib/cli-constants.cjs +1 -1
  35. package/dist-lib/cloud-contract.cjs +2 -1
  36. package/dist-lib/cloud-contract.mjs +2 -1
  37. package/dist-lib/cloud-test-args.cjs +1 -1
  38. package/dist-lib/cloud-test-args.mjs +1 -1
  39. package/dist-lib/cloud.cjs +2 -1
  40. package/dist-lib/cloud.mjs +2 -1
  41. package/dist-lib/config.cjs +1 -1
  42. package/dist-lib/detox/index.cjs +1197 -65
  43. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  44. package/dist-lib/home-paths.cjs +1 -1
  45. package/dist-lib/host/bridge-host.cjs +362 -108
  46. package/dist-lib/host/fetch-proxy-handler.cjs +50 -40
  47. package/dist-lib/host/fetch-proxy-overrides.cjs +50 -6
  48. package/dist-lib/host/fetch-proxy-overrides.mjs +48 -5
  49. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  50. package/dist-lib/host/websocket-proxy.cjs +1 -1
  51. package/dist-lib/index.cjs +29 -11
  52. package/dist-lib/jump-to-source-babel.cjs +1 -1
  53. package/dist-lib/jump-to-source-native.cjs +1 -1
  54. package/dist-lib/kotlin-host.cjs +89 -13
  55. package/dist-lib/menu.cjs +1 -1
  56. package/dist-lib/menu.mjs +1 -1
  57. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  58. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  59. package/dist-lib/metro-production-bundle.cjs +1 -1
  60. package/dist-lib/metro-production-bundle.mjs +1 -1
  61. package/dist-lib/metro.cjs +5 -3
  62. package/dist-lib/native-app-identity.cjs +8 -3
  63. package/dist-lib/native-app-identity.mjs +8 -3
  64. package/dist-lib/native-firebase-metadata.cjs +1 -1
  65. package/dist-lib/native-firebase-metadata.mjs +1 -1
  66. package/dist-lib/plist.cjs +1 -1
  67. package/dist-lib/plist.mjs +1 -1
  68. package/dist-lib/profiles.cjs +1 -1
  69. package/dist-lib/public-brand.cjs +1 -1
  70. package/dist-lib/react-native-host-modules.cjs +1 -1
  71. package/dist-lib/react-native-host-modules.mjs +1 -1
  72. package/dist-lib/render-mode.cjs +1 -1
  73. package/dist-lib/scripts/dev-server-scanner.cjs +2 -2
  74. package/dist-lib/sdk.cjs +21 -6
  75. package/dist-lib/sdk.mjs +21 -6
  76. package/dist-lib/skills.cjs +401 -130
  77. package/dist-lib/swift-compile.cjs +277 -22
  78. package/dist-lib/swift-compile.mjs +275 -22
  79. package/dist-lib/swift-package.cjs +1 -1
  80. package/dist-lib/swift-package.mjs +1 -1
  81. package/dist-lib/swift-submit.cjs +2 -2
  82. package/dist-lib/swift-submit.mjs +2 -2
  83. package/dist-lib/swift-toolchain.cjs +10 -10
  84. package/dist-lib/swift.cjs +1 -1
  85. package/dist-lib/vite-swift.cjs +280 -44
  86. package/dist-lib/vite.cjs +1 -1
  87. package/kotlin/AppSources/android/content/res/Configuration.kt +2 -0
  88. package/kotlin/AppSources/android/content/res/Resources.kt +6 -3
  89. package/kotlin/AppSources/android/util/DisplayMetrics.kt +12 -0
  90. package/kotlin/AppSources/androidx/compose/ui/res/PainterResources.kt +70 -0
  91. package/kotlin/AppSources/dev/peach/app/PeachApp.kt +12 -10
  92. package/kotlin/AppSources/dev/peach/app/PeachDrawable.kt +95 -0
  93. package/kotlin/fixtures/kotlin-app-variants/Bitmaps.kt +50 -0
  94. package/kotlin/fixtures/kotlin-app-variants/Drawables.kt +53 -0
  95. package/package.json +2 -2
  96. package/scripts/dev-server-scanner.ts +3 -1
  97. package/skills/contrast/SKILL.md +1 -0
  98. package/src/android-drawables.ts +315 -0
  99. package/src/android-theme.ts +9 -0
  100. package/src/bridge-constants.ts +3 -2
  101. package/src/bridge-contract-input.ts +11 -0
  102. package/src/bridge-contract.ts +45 -3
  103. package/src/cloud-contract.ts +1 -0
  104. package/src/host/fetch-proxy-handler.ts +13 -49
  105. package/src/host/fetch-proxy-overrides.ts +69 -12
  106. package/src/kotlin-app.ts +6 -0
  107. package/src/kotlin-host.ts +103 -15
  108. package/src/native-app-identity.ts +16 -3
  109. package/src/swift-compile.ts +366 -24
  110. package/src/swift-distribution-contract.ts +11 -4
  111. package/src/swift-distribution.lock.json +11 -9
  112. package/src/swift-distribution.ts +4 -4
  113. package/src/swift-icu.ts +8 -11
  114. package/src/swift-submit.ts +13 -1
  115. package/src/swift-toolchain.ts +17 -9
  116. package/src/vite-plugin.ts +86 -34
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (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;
@@ -101,23 +101,11 @@ function resolveFetchProxyTargetUrl(requested) {
101
101
  const replacement = PUBLIC_RPC_BY_QUICKNODE_CHAIN[chain];
102
102
  return replacement ? new URL(replacement) : requested;
103
103
  }
104
- function getFetchProxyTargetHeaders(targetUrl, nativeUserAgent) {
105
- const hostOverrides = headerOverridesFor(targetUrl.hostname);
106
- return {
107
- "accept-encoding": "identity",
108
- ...nativeUserAgent ? { "user-agent": nativeUserAgent } : {},
109
- ...hostOverrides?.headers
110
- };
111
- }
112
-
113
- // src/host/fetch-proxy-handler.ts
114
- var fetchProxyHttpAgent = new import_http.default.Agent({ keepAlive: true, maxSockets: 256 });
115
- var fetchProxyHttpsAgent = new import_https.default.Agent({ keepAlive: true, maxSockets: 256 });
116
- function fetchProxyAgentFor(targetUrl) {
117
- return targetUrl.protocol === "https:" ? fetchProxyHttpsAgent : fetchProxyHttpAgent;
118
- }
119
- var STRIP_FETCH_PROXY_HEADERS = /* @__PURE__ */ new Set([
104
+ var STRIP_FETCH_PROXY_REQUEST_HEADERS = /* @__PURE__ */ new Set([
120
105
  "host",
106
+ "x-forwarded",
107
+ "x-real-ip",
108
+ "forwarded",
121
109
  "origin",
122
110
  "referer",
123
111
  "user-agent",
@@ -136,6 +124,40 @@ var STRIP_FETCH_PROXY_HEADERS = /* @__PURE__ */ new Set([
136
124
  "sec-ch-ua-platform",
137
125
  FETCH_PROXY_NATIVE_USER_AGENT_HEADER
138
126
  ]);
127
+ function buildFetchProxyUpstreamHeaders(requestHeaders, targetUrl) {
128
+ const headers = {};
129
+ let nativeUserAgent;
130
+ for (const [rawKey, value] of requestHeaders) {
131
+ const key = rawKey.toLowerCase();
132
+ if (key === FETCH_PROXY_NATIVE_USER_AGENT_HEADER) nativeUserAgent = value;
133
+ if (STRIP_FETCH_PROXY_REQUEST_HEADERS.has(key) || key.startsWith("x-forwarded-")) {
134
+ continue;
135
+ }
136
+ headers[key] = value;
137
+ }
138
+ if (!targetUrl) return headers;
139
+ return {
140
+ ...headers,
141
+ "accept-encoding": "identity",
142
+ ...nativeUserAgent ? { "user-agent": nativeUserAgent } : {},
143
+ ...headerOverridesFor(targetUrl.hostname)?.headers
144
+ };
145
+ }
146
+ function nodeRequestHeaderEntries(headers) {
147
+ const entries = [];
148
+ for (const [key, value] of Object.entries(headers)) {
149
+ if (!value) continue;
150
+ entries.push([key, Array.isArray(value) ? value.join(", ") : value]);
151
+ }
152
+ return entries;
153
+ }
154
+
155
+ // src/host/fetch-proxy-handler.ts
156
+ var fetchProxyHttpAgent = new import_http.default.Agent({ keepAlive: true, maxSockets: 256 });
157
+ var fetchProxyHttpsAgent = new import_https.default.Agent({ keepAlive: true, maxSockets: 256 });
158
+ function fetchProxyAgentFor(targetUrl) {
159
+ return targetUrl.protocol === "https:" ? fetchProxyHttpsAgent : fetchProxyHttpAgent;
160
+ }
139
161
  var FETCH_PROXY_CORS_HEADERS = {
140
162
  "access-control-allow-origin": "*",
141
163
  "access-control-allow-methods": "GET,POST,PUT,DELETE,PATCH,OPTIONS",
@@ -161,19 +183,7 @@ function applyFetchProxyCors(res) {
161
183
  }
162
184
  }
163
185
  function buildFetchProxyHeaders(reqHeaders, targetUrl) {
164
- const headers = {};
165
- for (const [key, value] of Object.entries(reqHeaders)) {
166
- if (!value) continue;
167
- if (STRIP_FETCH_PROXY_HEADERS.has(key.toLowerCase())) continue;
168
- headers[key] = Array.isArray(value) ? value.join(", ") : value;
169
- }
170
- const rawNativeUserAgent = reqHeaders[FETCH_PROXY_NATIVE_USER_AGENT_HEADER];
171
- const nativeUserAgent = Array.isArray(rawNativeUserAgent) ? rawNativeUserAgent[0] : rawNativeUserAgent;
172
- Object.assign(
173
- headers,
174
- targetUrl ? getFetchProxyTargetHeaders(targetUrl, nativeUserAgent) : {}
175
- );
176
- return headers;
186
+ return buildFetchProxyUpstreamHeaders(nodeRequestHeaderEntries(reqHeaders), targetUrl);
177
187
  }
178
188
  function buildAppApiProxyHeaders(reqHeaders, targetUrl) {
179
189
  const headers = {};
@@ -225,16 +235,6 @@ async function handleFetchProxyRequest(req, res) {
225
235
  res.end("invalid url param");
226
236
  return;
227
237
  }
228
- let body;
229
- if (req.method !== "GET" && req.method !== "HEAD") {
230
- const chunks = [];
231
- for await (const chunk of req) {
232
- chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
233
- }
234
- if (chunks.length > 0) {
235
- body = Buffer.concat(chunks);
236
- }
237
- }
238
238
  const originalMethod = req.method || "GET";
239
239
  const proxy = async (targetUrl2, method, nextBody, redirects) => {
240
240
  const transport = targetUrl2.protocol === "https:" ? import_https.default : import_http.default;
@@ -306,7 +306,17 @@ async function handleFetchProxyRequest(req, res) {
306
306
  res.statusCode = status;
307
307
  await (0, import_promises.pipeline)(proxyRes, res);
308
308
  };
309
+ let body;
309
310
  try {
311
+ if (req.method !== "GET" && req.method !== "HEAD") {
312
+ const chunks = [];
313
+ for await (const chunk of req) {
314
+ chunks.push(Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk));
315
+ }
316
+ if (chunks.length > 0) {
317
+ body = Buffer.concat(chunks);
318
+ }
319
+ }
310
320
  await proxy(upstreamUrl, originalMethod, body, 0);
311
321
  } catch (err) {
312
322
  const norm = normalizeHostname(upstreamUrl.hostname);
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (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;
@@ -24,7 +24,8 @@ var fetch_proxy_overrides_exports = {};
24
24
  __export(fetch_proxy_overrides_exports, {
25
25
  FETCH_PROXY_NATIVE_USER_AGENT_HEADER: () => FETCH_PROXY_NATIVE_USER_AGENT_HEADER,
26
26
  PUBLIC_RPC_TENANT: () => PUBLIC_RPC_TENANT,
27
- getFetchProxyTargetHeaders: () => getFetchProxyTargetHeaders,
27
+ buildFetchProxyUpstreamHeaders: () => buildFetchProxyUpstreamHeaders,
28
+ nodeRequestHeaderEntries: () => nodeRequestHeaderEntries,
28
29
  resolveFetchProxyTargetUrl: () => resolveFetchProxyTargetUrl
29
30
  });
30
31
  module.exports = __toCommonJS(fetch_proxy_overrides_exports);
@@ -73,18 +74,61 @@ function resolveFetchProxyTargetUrl(requested) {
73
74
  const replacement = PUBLIC_RPC_BY_QUICKNODE_CHAIN[chain];
74
75
  return replacement ? new URL(replacement) : requested;
75
76
  }
76
- function getFetchProxyTargetHeaders(targetUrl, nativeUserAgent) {
77
- const hostOverrides = headerOverridesFor(targetUrl.hostname);
77
+ var STRIP_FETCH_PROXY_REQUEST_HEADERS = /* @__PURE__ */ new Set([
78
+ "host",
79
+ "x-forwarded",
80
+ "x-real-ip",
81
+ "forwarded",
82
+ "origin",
83
+ "referer",
84
+ "user-agent",
85
+ "accept-encoding",
86
+ "cookie",
87
+ "connection",
88
+ "keep-alive",
89
+ "transfer-encoding",
90
+ "upgrade",
91
+ "content-length",
92
+ "sec-fetch-site",
93
+ "sec-fetch-mode",
94
+ "sec-fetch-dest",
95
+ "sec-ch-ua",
96
+ "sec-ch-ua-mobile",
97
+ "sec-ch-ua-platform",
98
+ FETCH_PROXY_NATIVE_USER_AGENT_HEADER
99
+ ]);
100
+ function buildFetchProxyUpstreamHeaders(requestHeaders, targetUrl) {
101
+ const headers = {};
102
+ let nativeUserAgent;
103
+ for (const [rawKey, value] of requestHeaders) {
104
+ const key = rawKey.toLowerCase();
105
+ if (key === FETCH_PROXY_NATIVE_USER_AGENT_HEADER) nativeUserAgent = value;
106
+ if (STRIP_FETCH_PROXY_REQUEST_HEADERS.has(key) || key.startsWith("x-forwarded-")) {
107
+ continue;
108
+ }
109
+ headers[key] = value;
110
+ }
111
+ if (!targetUrl) return headers;
78
112
  return {
113
+ ...headers,
79
114
  "accept-encoding": "identity",
80
115
  ...nativeUserAgent ? { "user-agent": nativeUserAgent } : {},
81
- ...hostOverrides?.headers
116
+ ...headerOverridesFor(targetUrl.hostname)?.headers
82
117
  };
83
118
  }
119
+ function nodeRequestHeaderEntries(headers) {
120
+ const entries = [];
121
+ for (const [key, value] of Object.entries(headers)) {
122
+ if (!value) continue;
123
+ entries.push([key, Array.isArray(value) ? value.join(", ") : value]);
124
+ }
125
+ return entries;
126
+ }
84
127
  // Annotate the CommonJS export names for ESM import in node:
85
128
  0 && (module.exports = {
86
129
  FETCH_PROXY_NATIVE_USER_AGENT_HEADER,
87
130
  PUBLIC_RPC_TENANT,
88
- getFetchProxyTargetHeaders,
131
+ buildFetchProxyUpstreamHeaders,
132
+ nodeRequestHeaderEntries,
89
133
  resolveFetchProxyTargetUrl
90
134
  });
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/host/fetch-proxy-overrides.ts
4
4
  var FETCH_PROXY_NATIVE_USER_AGENT_HEADER = "x-sootsim-native-user-agent";
@@ -46,17 +46,60 @@ function resolveFetchProxyTargetUrl(requested) {
46
46
  const replacement = PUBLIC_RPC_BY_QUICKNODE_CHAIN[chain];
47
47
  return replacement ? new URL(replacement) : requested;
48
48
  }
49
- function getFetchProxyTargetHeaders(targetUrl, nativeUserAgent) {
50
- const hostOverrides = headerOverridesFor(targetUrl.hostname);
49
+ var STRIP_FETCH_PROXY_REQUEST_HEADERS = /* @__PURE__ */ new Set([
50
+ "host",
51
+ "x-forwarded",
52
+ "x-real-ip",
53
+ "forwarded",
54
+ "origin",
55
+ "referer",
56
+ "user-agent",
57
+ "accept-encoding",
58
+ "cookie",
59
+ "connection",
60
+ "keep-alive",
61
+ "transfer-encoding",
62
+ "upgrade",
63
+ "content-length",
64
+ "sec-fetch-site",
65
+ "sec-fetch-mode",
66
+ "sec-fetch-dest",
67
+ "sec-ch-ua",
68
+ "sec-ch-ua-mobile",
69
+ "sec-ch-ua-platform",
70
+ FETCH_PROXY_NATIVE_USER_AGENT_HEADER
71
+ ]);
72
+ function buildFetchProxyUpstreamHeaders(requestHeaders, targetUrl) {
73
+ const headers = {};
74
+ let nativeUserAgent;
75
+ for (const [rawKey, value] of requestHeaders) {
76
+ const key = rawKey.toLowerCase();
77
+ if (key === FETCH_PROXY_NATIVE_USER_AGENT_HEADER) nativeUserAgent = value;
78
+ if (STRIP_FETCH_PROXY_REQUEST_HEADERS.has(key) || key.startsWith("x-forwarded-")) {
79
+ continue;
80
+ }
81
+ headers[key] = value;
82
+ }
83
+ if (!targetUrl) return headers;
51
84
  return {
85
+ ...headers,
52
86
  "accept-encoding": "identity",
53
87
  ...nativeUserAgent ? { "user-agent": nativeUserAgent } : {},
54
- ...hostOverrides?.headers
88
+ ...headerOverridesFor(targetUrl.hostname)?.headers
55
89
  };
56
90
  }
91
+ function nodeRequestHeaderEntries(headers) {
92
+ const entries = [];
93
+ for (const [key, value] of Object.entries(headers)) {
94
+ if (!value) continue;
95
+ entries.push([key, Array.isArray(value) ? value.join(", ") : value]);
96
+ }
97
+ return entries;
98
+ }
57
99
  export {
58
100
  FETCH_PROXY_NATIVE_USER_AGENT_HEADER,
59
101
  PUBLIC_RPC_TENANT,
60
- getFetchProxyTargetHeaders,
102
+ buildFetchProxyUpstreamHeaders,
103
+ nodeRequestHeaderEntries,
61
104
  resolveFetchProxyTargetUrl
62
105
  };
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (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.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (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.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (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;
@@ -102,6 +102,7 @@ var RNX_CLOUD_COMMAND_SCOPES = {
102
102
  flowStatus: "drive",
103
103
  reset: "reset",
104
104
  camera: "media",
105
+ location: "media",
105
106
  // string evaluation and arbitrary bridge calls are maestro's boundary: the
106
107
  // customer sdk never carries this scope, and the service grants it only to
107
108
  // the account api key caller. close rides along, since ending the page ends
@@ -134,6 +135,11 @@ function rnxCloudScopesAllowCommand(scopes, type) {
134
135
  return scopes.includes(RNX_CLOUD_COMMAND_SCOPES[type]);
135
136
  }
136
137
 
138
+ // src/is-record.ts
139
+ function isRecord(value) {
140
+ return typeof value === "object" && value !== null && !Array.isArray(value);
141
+ }
142
+
137
143
  // src/metro-production-bundle.ts
138
144
  var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
139
145
  var RNX_METRO_MODULE_IDENTITY_VERSION = 2;
@@ -296,11 +302,6 @@ var sinks = new import_node_async_hooks.AsyncLocalStorage();
296
302
  // cli/auth.ts
297
303
  var CHOOSE_ACCOUNT_HINT = "this sign-in belongs to several accounts; run `peach login --account <name>` to choose the one to bill";
298
304
 
299
- // src/is-record.ts
300
- function isRecord(value) {
301
- return typeof value === "object" && value !== null && !Array.isArray(value);
302
- }
303
-
304
305
  // cli/cloud-session.ts
305
306
  var CLOUD_SESSION_VERSION = 3;
306
307
  var MAX_ENCODED_SESSION_BYTES = 32 * 1024;
@@ -1956,6 +1957,7 @@ function waitReadyStatus(result, ready) {
1956
1957
  nodes: probe?.nodes ?? 0,
1957
1958
  targets: probe?.targets ?? 0,
1958
1959
  liveFrameActive: probe?.liveFrameActive ?? false,
1960
+ browserSurfaceCount: probe?.browserSurfaceCount ?? 0,
1959
1961
  liveFrameChannels: probe?.liveFrameChannels ?? 0,
1960
1962
  liveFramePublishes: probe?.liveFramePublishes ?? 0,
1961
1963
  flag: probe?.flag,
@@ -2215,6 +2217,16 @@ async function waitForSootsimIdle({
2215
2217
  let requestInFlight = 0
2216
2218
  let renderStatsAvailable = false
2217
2219
  let frameCount = -1
2220
+ let shellAnimating = false
2221
+ // strict also waits out shell motion: a system alert, sheet or menu
2222
+ // animates in the shell worker while the app's own stats read still,
2223
+ // so its presentation is complete only once the shell's list empties.
2224
+ if (strict) {
2225
+ try {
2226
+ const motion = await window.__sootsimTest?.listAnimations?.()
2227
+ shellAnimating = Array.isArray(motion) && motion.some((anim) => anim.realm === 'shell')
2228
+ } catch {}
2229
+ }
2218
2230
  try {
2219
2231
  const stats = await window.__sootsimRenderHost?.queryStats?.()
2220
2232
  if (stats) {
@@ -2252,7 +2264,7 @@ async function waitForSootsimIdle({
2252
2264
  }
2253
2265
  walk(root)
2254
2266
  }
2255
- return { layout: nodes.join(';'), frameCount, animating, layoutDirty, pendingFetches, renderStatsAvailable, requestTotal, requestInFlight }
2267
+ return { layout: nodes.join(';'), frameCount, animating, shellAnimating, layoutDirty, pendingFetches, renderStatsAvailable, requestTotal, requestInFlight }
2256
2268
  }
2257
2269
 
2258
2270
  // how long generic background network is allowed to keep us waiting AFTER
@@ -2283,13 +2295,16 @@ async function waitForSootsimIdle({
2283
2295
  const snapshot = await readSnapshot()
2284
2296
  polls++
2285
2297
  if (snapshot.layoutDirty) dirtyPolls++
2286
- if (snapshot.animating) animatingPolls++
2298
+ if (snapshot.animating || snapshot.shellAnimating) animatingPolls++
2287
2299
  if (polls > 1 && snapshot.layout !== lastLayout) layoutChangedPolls++
2288
2300
  const painted = paintStill && snapshot.frameCount !== lastFrameCount
2289
2301
  if (polls > 1 && painted) paintedPolls++
2290
2302
  const strictOk =
2291
2303
  !strict ||
2292
- (snapshot.renderStatsAvailable && !snapshot.animating && !snapshot.layoutDirty)
2304
+ (snapshot.renderStatsAvailable &&
2305
+ !snapshot.animating &&
2306
+ !snapshot.shellAnimating &&
2307
+ !snapshot.layoutDirty)
2293
2308
  // visually settled: no animations, no image content loading, layout
2294
2309
  // unchanged since the last poll.
2295
2310
  const visuallyStill =
@@ -2325,6 +2340,7 @@ async function waitForSootsimIdle({
2325
2340
  const blockers = []
2326
2341
  if (strict && !last.renderStatsAvailable) blockers.push('render stats unavailable')
2327
2342
  if (last.animating) blockers.push('animations still running')
2343
+ if (last.shellAnimating) blockers.push('shell animations still running')
2328
2344
  if (last.layoutDirty) blockers.push('layout still dirty')
2329
2345
  if (last.pendingFetches > 0) blockers.push(last.pendingFetches + ' image fetches pending')
2330
2346
  if (last.layout !== lastLayout) blockers.push('layout still changing')
@@ -4736,12 +4752,13 @@ function nativeAppIdentityFromIos(files, parseInfoPlist) {
4736
4752
  settings.CURRENT_PROJECT_VERSION
4737
4753
  );
4738
4754
  if (!appVersion || !buildVersion) return null;
4739
- const applicationName = identityFieldFrom(settings, plistString(plist, "CFBundleDisplayName"), void 0) ?? identityFieldFrom(
4755
+ const bundleName = identityFieldFrom(
4740
4756
  settings,
4741
4757
  plistString(plist, "CFBundleName"),
4742
4758
  settings.PRODUCT_NAME
4743
4759
  ) ?? resolvedIdentityField(resolveBuildSetting(settings.PRODUCT_NAME ?? "", settings)) ?? resolvedIdentityField(targetName);
4744
- if (!applicationName) return null;
4760
+ if (!bundleName) return null;
4761
+ const applicationName = identityFieldFrom(settings, plistString(plist, "CFBundleDisplayName"), void 0) ?? bundleName;
4745
4762
  const dictionary = parseInfoPlist(plist);
4746
4763
  if (!isRecord2(dictionary)) throw new Error("native app Info.plist is not a dictionary");
4747
4764
  const permissionUsageDescriptions = {};
@@ -4767,6 +4784,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist) {
4767
4784
  }
4768
4785
  return {
4769
4786
  applicationName,
4787
+ bundleName,
4770
4788
  appVersion,
4771
4789
  buildVersion,
4772
4790
  bundleIdentifier,
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (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.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (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.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (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;
@@ -455,19 +455,19 @@ async function kotlinAppArtifact(app, moduleRoot, origin) {
455
455
  origin
456
456
  );
457
457
  }
458
+ var escapes = {
459
+ "\\": "\\\\",
460
+ '"': '\\"',
461
+ $: "\\$",
462
+ "\n": "\\n",
463
+ "\r": "\\r",
464
+ " ": "\\t"
465
+ };
466
+ var literal = (value) => `"${value.replace(
467
+ /[\\"$\u0000-\u001f]/g,
468
+ (char) => escapes[char] ?? `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}`
469
+ )}"`;
458
470
  function appResourceSources(app) {
459
- const escapes = {
460
- "\\": "\\\\",
461
- '"': '\\"',
462
- $: "\\$",
463
- "\n": "\\n",
464
- "\r": "\\r",
465
- " ": "\\t"
466
- };
467
- const literal = (value) => `"${value.replace(
468
- /[\\"$\u0000-\u001f]/g,
469
- (char) => escapes[char] ?? `\\u${char.charCodeAt(0).toString(16).padStart(4, "0")}`
470
- )}"`;
471
471
  const field = (name) => `\`${name.replace(/[.-]/g, "_")}\``;
472
472
  const id = (type, entry) => `0x7f${type.toString(16).padStart(2, "0")}${entry.toString(16).padStart(4, "0")}`;
473
473
  const localized = (resources, render) => resources.map((resource) => ({
@@ -500,6 +500,17 @@ function appResourceSources(app) {
500
500
  (items) => `listOf(${items.map(literal).join(", ")})`
501
501
  )
502
502
  },
503
+ {
504
+ type: "drawable",
505
+ table: "peachAppDrawables",
506
+ value: "List<PeachDrawable>",
507
+ entries: app.drawables.map((drawable) => ({
508
+ name: drawable.name,
509
+ init: `listOf(
510
+ ${drawable.files.map((file) => drawableInit(file, import_node_path2.default.relative(app.moduleDir, file.file))).join(",\n")}
511
+ )`
512
+ }))
513
+ },
503
514
  // the day and the night ARGB
504
515
  {
505
516
  type: "color",
@@ -535,6 +546,17 @@ function appResourceSources(app) {
535
546
  "PeachAppResources.kt": [
536
547
  "package dev.peach.app",
537
548
  "",
549
+ ...[
550
+ "androidx.compose.ui.graphics.BlendMode",
551
+ "androidx.compose.ui.graphics.Color",
552
+ "androidx.compose.ui.graphics.PathFillType",
553
+ "androidx.compose.ui.graphics.StrokeCap",
554
+ "androidx.compose.ui.graphics.StrokeJoin",
555
+ "androidx.compose.ui.graphics.vector.ImageVector",
556
+ "androidx.compose.ui.graphics.vector.addPathNodes",
557
+ "androidx.compose.ui.unit.Dp"
558
+ ].map((name) => `import ${name}`),
559
+ "",
538
560
  ...kinds.flatMap((kind) => [
539
561
  `internal val ${kind.table}: Map<Int, ${kind.value}> = mapOf(`,
540
562
  ...kind.entries.map((entry) => ` ${entry.id} to ${entry.init},`),
@@ -544,6 +566,60 @@ function appResourceSources(app) {
544
566
  ].join("\n")
545
567
  };
546
568
  }
569
+ function drawableInit(drawable, file) {
570
+ const where = `${literal(file)}, ${drawable.density}, ${drawable.version}`;
571
+ if (drawable.kind === "xml") return `PeachDrawable.Xml(${where})`;
572
+ if (drawable.kind === "bitmap")
573
+ return `PeachDrawable.Bitmap(${where}, ${drawable.ninePatch}, ${literal(
574
+ import_node_fs.default.readFileSync(drawable.file).toString("base64")
575
+ )})`;
576
+ const vector = drawable.vector;
577
+ const float = (value) => `${value}f`;
578
+ const argb = (value) => `0x${value.toString(16).padStart(8, "0").toUpperCase()}.toInt()`;
579
+ const pick = (value) => value.day === value.night ? argb(value.day) : `if (night) ${argb(value.night)} else ${argb(value.day)}`;
580
+ const nodes = (pathData) => pathData ? `addPathNodes(${literal(pathData)})` : "emptyList()";
581
+ const calls = vector.calls.map((call) => {
582
+ if (call.call === "clear") return ".clearGroup()";
583
+ if (call.call === "clip")
584
+ return `.addGroup(name = ${literal(call.name)}, clipPathData = ${nodes(call.pathData)})`;
585
+ if (call.call === "group")
586
+ return `.addGroup(${[
587
+ literal(call.name),
588
+ ...[
589
+ call.rotate,
590
+ call.pivotX,
591
+ call.pivotY,
592
+ call.scaleX,
593
+ call.scaleY,
594
+ call.translateX,
595
+ call.translateY
596
+ ].map(float)
597
+ ].join(", ")})`;
598
+ return `.addPath(${[
599
+ nodes(call.pathData),
600
+ `PathFillType.${call.fillType}`,
601
+ literal(call.name),
602
+ `peachBrush(${pick(call.fill)})`,
603
+ float(call.fillAlpha),
604
+ `peachBrush(${pick(call.stroke)})`,
605
+ float(call.strokeAlpha),
606
+ float(call.strokeWidth),
607
+ `StrokeCap.${call.cap}`,
608
+ `StrokeJoin.${call.join}`,
609
+ ...[call.miter, call.trimStart, call.trimEnd, call.trimOffset].map(float)
610
+ ].join(", ")})`;
611
+ });
612
+ return [
613
+ `PeachDrawable.Vector(${where}) { night -> ImageVector.Builder(`,
614
+ ` defaultWidth = Dp(${float(vector.width)}), defaultHeight = Dp(${float(vector.height)}),`,
615
+ ` viewportWidth = ${float(vector.viewportWidth)}, viewportHeight = ${float(vector.viewportHeight)},`,
616
+ ` tintColor = ${vector.tint ? `Color(${pick(vector.tint)})` : "Color.Unspecified"},`,
617
+ ` tintBlendMode = BlendMode.${vector.tintMode}, autoMirror = ${vector.autoMirror},`,
618
+ ` )`,
619
+ ...calls.map((call) => ` ${call}`),
620
+ " .build() }"
621
+ ].join("\n");
622
+ }
547
623
  async function compileKotlin(input, origin) {
548
624
  const {
549
625
  root,
package/dist-lib/menu.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/menu.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/public-brand.ts
4
4
  var name = "Peach";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (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.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/is-record.ts
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (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.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/metro-production-bundle.ts
4
4
  var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.687 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.689 | (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;
@@ -723,12 +723,13 @@ function nativeAppIdentityFromIos(files, parseInfoPlist) {
723
723
  settings.CURRENT_PROJECT_VERSION
724
724
  );
725
725
  if (!appVersion || !buildVersion) return null;
726
- const applicationName = identityFieldFrom(settings, plistString(plist, "CFBundleDisplayName"), void 0) ?? identityFieldFrom(
726
+ const bundleName = identityFieldFrom(
727
727
  settings,
728
728
  plistString(plist, "CFBundleName"),
729
729
  settings.PRODUCT_NAME
730
730
  ) ?? resolvedIdentityField(resolveBuildSetting(settings.PRODUCT_NAME ?? "", settings)) ?? resolvedIdentityField(targetName);
731
- if (!applicationName) return null;
731
+ if (!bundleName) return null;
732
+ const applicationName = identityFieldFrom(settings, plistString(plist, "CFBundleDisplayName"), void 0) ?? bundleName;
732
733
  const dictionary = parseInfoPlist(plist);
733
734
  if (!isRecord(dictionary)) throw new Error("native app Info.plist is not a dictionary");
734
735
  const permissionUsageDescriptions = {};
@@ -754,6 +755,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist) {
754
755
  }
755
756
  return {
756
757
  applicationName,
758
+ bundleName,
757
759
  appVersion,
758
760
  buildVersion,
759
761
  bundleIdentifier,