peachsim 0.1.800 → 0.1.809

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 (82) hide show
  1. package/cli/drivers/playwright-sim-host.ts +2 -0
  2. package/cli/outbound-endpoints.ts +0 -4
  3. package/dist-lib/agent-daemon-client.cjs +1 -1
  4. package/dist-lib/agent-events.cjs +1 -1
  5. package/dist-lib/agent-identity.cjs +1 -1
  6. package/dist-lib/agent-sessions.cjs +1 -1
  7. package/dist-lib/attached-projects.cjs +1 -1
  8. package/dist-lib/auth/shared-session.cjs +1 -1
  9. package/dist-lib/backend-origin.cjs +1 -1
  10. package/dist-lib/beta.cjs +1 -1
  11. package/dist-lib/beta.mjs +1 -1
  12. package/dist-lib/bridge-constants.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.cjs +1 -1
  14. package/dist-lib/bridge-contract-input.mjs +1 -1
  15. package/dist-lib/bridge-contract.cjs +1 -1
  16. package/dist-lib/bridge-contract.mjs +1 -1
  17. package/dist-lib/bundle-channel.cjs +132 -10
  18. package/dist-lib/capture-contract.cjs +1 -1
  19. package/dist-lib/capture-contract.mjs +1 -1
  20. package/dist-lib/cli-constants.cjs +1 -1
  21. package/dist-lib/cloud-contract.cjs +1 -1
  22. package/dist-lib/cloud-contract.mjs +1 -1
  23. package/dist-lib/cloud-test-args.cjs +1 -1
  24. package/dist-lib/cloud-test-args.mjs +1 -1
  25. package/dist-lib/cloud.cjs +1 -1
  26. package/dist-lib/cloud.mjs +1 -1
  27. package/dist-lib/config.cjs +1 -1
  28. package/dist-lib/detox/index.cjs +46 -7
  29. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  30. package/dist-lib/expo-swift-bundle.cjs +132 -10
  31. package/dist-lib/expo-swift-metadata.cjs +1 -1
  32. package/dist-lib/expo-swift-metadata.mjs +1 -1
  33. package/dist-lib/home-paths.cjs +1 -1
  34. package/dist-lib/host/bridge-host.cjs +252 -108
  35. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  36. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  37. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  38. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  39. package/dist-lib/host/websocket-proxy.cjs +1 -1
  40. package/dist-lib/index.cjs +1 -1
  41. package/dist-lib/jump-to-source-babel.cjs +1 -1
  42. package/dist-lib/jump-to-source-native.cjs +1 -1
  43. package/dist-lib/kotlin-host.cjs +1 -1
  44. package/dist-lib/menu.cjs +1 -1
  45. package/dist-lib/menu.mjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  47. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  48. package/dist-lib/metro-production-bundle.cjs +1 -1
  49. package/dist-lib/metro-production-bundle.mjs +1 -1
  50. package/dist-lib/metro.cjs +1 -1
  51. package/dist-lib/native-app-identity.cjs +1 -1
  52. package/dist-lib/native-app-identity.mjs +1 -1
  53. package/dist-lib/native-firebase-metadata.cjs +1 -1
  54. package/dist-lib/native-firebase-metadata.mjs +1 -1
  55. package/dist-lib/plist.cjs +1 -1
  56. package/dist-lib/plist.mjs +1 -1
  57. package/dist-lib/profiles.cjs +1 -1
  58. package/dist-lib/public-brand.cjs +1 -1
  59. package/dist-lib/react-native-host-modules.cjs +1 -1
  60. package/dist-lib/react-native-host-modules.mjs +1 -1
  61. package/dist-lib/render-mode.cjs +1 -1
  62. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  63. package/dist-lib/sdk.cjs +1 -1
  64. package/dist-lib/sdk.mjs +1 -1
  65. package/dist-lib/skills.cjs +252 -108
  66. package/dist-lib/swift-compile.cjs +141 -11
  67. package/dist-lib/swift-compile.mjs +140 -11
  68. package/dist-lib/swift-package.cjs +1 -1
  69. package/dist-lib/swift-package.mjs +1 -1
  70. package/dist-lib/swift-submit.cjs +1 -1
  71. package/dist-lib/swift-submit.mjs +1 -1
  72. package/dist-lib/swift-toolchain.cjs +1 -1
  73. package/dist-lib/swift.cjs +1 -1
  74. package/dist-lib/vite-swift.cjs +132 -10
  75. package/dist-lib/vite.cjs +1 -1
  76. package/dist-lib/worklet-executable.cjs +119 -0
  77. package/dist-lib/worklet-executable.mjs +93 -0
  78. package/package.json +9 -1
  79. package/src/swift-compile.ts +160 -11
  80. package/src/vite-plugin.ts +5 -2
  81. package/src/worklet-executable.ts +125 -0
  82. package/src/worklets-babel.ts +47 -6
@@ -28,6 +28,7 @@ import {
28
28
  WEBVIEW_INSTANCE_ATTRIBUTE,
29
29
  WEBVIEW_SCHEME_NAVIGATION_EVENT,
30
30
  WEBVIEW_NETWORK_NAVIGATION_EVENT,
31
+ WEBVIEW_LOAD_EVENT,
31
32
  webViewAutomationHelpersSource,
32
33
  } from '../../../peach-engine/src/webview-automation-host'
33
34
  import { DISPOSABLE_BROWSER_CACHE_DIR_NAMES } from '../../src/browser-cache'
@@ -541,6 +542,7 @@ const cleanupProfile = () => {
541
542
  instanceAttribute: ${JSON.stringify(WEBVIEW_INSTANCE_ATTRIBUTE)},
542
543
  schemeNavigationEvent: ${JSON.stringify(WEBVIEW_SCHEME_NAVIGATION_EVENT)},
543
544
  networkNavigationEvent: ${JSON.stringify(WEBVIEW_NETWORK_NAVIGATION_EVENT)},
545
+ loadEvent: ${JSON.stringify(WEBVIEW_LOAD_EVENT)},
544
546
  configTimingName: webViewTimingName,
545
547
  bootstrapSource: '(' + ${JSON.stringify(WEBVIEW_HOST_BOOTSTRAP_SOURCE)} + ')(' + JSON.stringify(webViewTimingName) + ');',
546
548
  },
@@ -691,10 +691,6 @@ export const DECLARED_OUTBOUND_CALLS: Record<string, OutboundCallDeclaration> =
691
691
  category: 'contrast_user_action',
692
692
  count: 1,
693
693
  },
694
- 'packages/peach-engine/src/components/native-ui/ShellWebViewHost.tsx :: fetch :: url': {
695
- category: 'guest_app_network',
696
- count: 1,
697
- },
698
694
  'packages/peach-engine/src/engine/expo-app-config.ts :: fetch :: `${metroOrigin}/__peach-native-firebase-config`':
699
695
  { category: 'local_development', count: 1 },
700
696
  'packages/peach-engine/src/engine/inspect-source-chain.ts :: fetch :: `${origin}/symbolicate`':
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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;
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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;
package/dist-lib/beta.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/beta.ts
4
4
  var IS_BETA = true;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var SIM_LONG_PRESS_MAX_MS = 5e3;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var REFUSED_PERFORM_STEP_TYPES = [
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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;
@@ -643,7 +643,7 @@ function swiftTargetDependencies(files2, targets) {
643
643
  }
644
644
  function swiftArtifactHash(input, release, moduleRoot) {
645
645
  const hash = (0, import_node_crypto2.createHash)("sha256");
646
- hash.update(`swift-compile/v18
646
+ hash.update(`swift-compile/v20
647
647
  ${release}
648
648
  `);
649
649
  if (input.oneModule) hash.update("one-module\n");
@@ -1221,6 +1221,125 @@ function lowerNotificationDelegate(source) {
1221
1221
  result = result.slice(0, at) + text3 + result.slice(at + count);
1222
1222
  return result;
1223
1223
  }
1224
+ function tableProtocolConformances(sources) {
1225
+ const parents = /* @__PURE__ */ new Map();
1226
+ for (const source of sources) {
1227
+ const code = swiftCodeMask(source);
1228
+ for (const owner of code.matchAll(
1229
+ /\b(?:class|extension)\s+([A-Za-z_]\w*)\s*:\s*([^{}]+)\{/g
1230
+ )) {
1231
+ const inherited = parents.get(owner[1]) ?? /* @__PURE__ */ new Set();
1232
+ for (const type of owner[2].matchAll(/\b[A-Za-z_]\w*\b/g)) inherited.add(type[0]);
1233
+ parents.set(owner[1], inherited);
1234
+ }
1235
+ }
1236
+ const result = /* @__PURE__ */ new Map();
1237
+ const protocols = ["UITableViewDataSource", "UITableViewDelegate"];
1238
+ for (const type of parents.keys()) {
1239
+ const pending = [type];
1240
+ const seen = /* @__PURE__ */ new Set();
1241
+ const conformances = /* @__PURE__ */ new Set();
1242
+ while (pending.length) {
1243
+ const next = pending.pop();
1244
+ if (seen.has(next)) continue;
1245
+ seen.add(next);
1246
+ if (protocols.includes(next)) conformances.add(next);
1247
+ for (const parent of parents.get(next) ?? []) pending.push(parent);
1248
+ }
1249
+ if (conformances.size) result.set(type, conformances);
1250
+ }
1251
+ return result;
1252
+ }
1253
+ function lowerTableProtocolMethods(source, conformances) {
1254
+ const code = swiftCodeMask(source);
1255
+ const dataSource = {
1256
+ numberOfRowsInSection: "tableView:numberOfRowsInSection:",
1257
+ cellForRowAt: "tableView:cellForRowAtIndexPath:",
1258
+ titleForHeaderInSection: "tableView:titleForHeaderInSection:",
1259
+ titleForFooterInSection: "tableView:titleForFooterInSection:",
1260
+ canEditRowAt: "tableView:canEditRowAtIndexPath:",
1261
+ commit: "tableView:commitEditingStyle:forRowAtIndexPath:"
1262
+ };
1263
+ const delegate = {
1264
+ willDisplay: "tableView:willDisplayCell:forRowAtIndexPath:",
1265
+ didEndDisplaying: "tableView:didEndDisplayingCell:forRowAtIndexPath:",
1266
+ heightForRowAt: "tableView:heightForRowAtIndexPath:",
1267
+ estimatedHeightForRowAt: "tableView:estimatedHeightForRowAtIndexPath:",
1268
+ heightForHeaderInSection: "tableView:heightForHeaderInSection:",
1269
+ heightForFooterInSection: "tableView:heightForFooterInSection:",
1270
+ estimatedHeightForHeaderInSection: "tableView:estimatedHeightForHeaderInSection:",
1271
+ estimatedHeightForFooterInSection: "tableView:estimatedHeightForFooterInSection:",
1272
+ viewForHeaderInSection: "tableView:viewForHeaderInSection:",
1273
+ viewForFooterInSection: "tableView:viewForFooterInSection:",
1274
+ willDisplayHeaderView: "tableView:willDisplayHeaderView:forSection:",
1275
+ willDisplayFooterView: "tableView:willDisplayFooterView:forSection:",
1276
+ didEndDisplayingHeaderView: "tableView:didEndDisplayingHeaderView:forSection:",
1277
+ didEndDisplayingFooterView: "tableView:didEndDisplayingFooterView:forSection:",
1278
+ shouldHighlightRowAt: "tableView:shouldHighlightRowAtIndexPath:",
1279
+ didHighlightRowAt: "tableView:didHighlightRowAtIndexPath:",
1280
+ didUnhighlightRowAt: "tableView:didUnhighlightRowAtIndexPath:",
1281
+ willSelectRowAt: "tableView:willSelectRowAtIndexPath:",
1282
+ willDeselectRowAt: "tableView:willDeselectRowAtIndexPath:",
1283
+ didSelectRowAt: "tableView:didSelectRowAtIndexPath:",
1284
+ didDeselectRowAt: "tableView:didDeselectRowAtIndexPath:",
1285
+ accessoryButtonTappedForRowWith: "tableView:accessoryButtonTappedForRowWithIndexPath:",
1286
+ editingStyleForRowAt: "tableView:editingStyleForRowAtIndexPath:",
1287
+ leadingSwipeActionsConfigurationForRowAt: "tableView:leadingSwipeActionsConfigurationForRowAtIndexPath:",
1288
+ trailingSwipeActionsConfigurationForRowAt: "tableView:trailingSwipeActionsConfigurationForRowAtIndexPath:",
1289
+ willBeginEditingRowAt: "tableView:willBeginEditingRowAtIndexPath:",
1290
+ didEndEditingRowAt: "tableView:didEndEditingRowAtIndexPath:"
1291
+ };
1292
+ const braces = [...code.matchAll(/[{}]/g)].map((match) => match.index);
1293
+ const edits = [];
1294
+ for (const owner of code.matchAll(/\b(?:class|extension)\s+([A-Za-z_]\w*)[^{}]*\{/g)) {
1295
+ const conforms = conformances.get(owner[1]);
1296
+ if (!conforms) continue;
1297
+ const selectors = {
1298
+ ...conforms.has("UITableViewDataSource") ? dataSource : {},
1299
+ ...conforms.has("UITableViewDelegate") ? delegate : {}
1300
+ };
1301
+ const open = owner.index + owner[0].length - 1;
1302
+ const close = closingBrace(code, braces, open);
1303
+ let depth = 1;
1304
+ let previous = open + 1;
1305
+ for (const token of swiftCodeScan(code.slice(open + 1, close - 1)).tokens) {
1306
+ const at = open + 1 + token;
1307
+ if (code[at] === "{") depth++;
1308
+ else if (code[at] === "}") {
1309
+ depth--;
1310
+ if (depth === 1) previous = at + 1;
1311
+ } else if (depth === 1 && /^func\b/.test(code.slice(at))) {
1312
+ const signature2 = code.slice(at, code.indexOf("{", at));
1313
+ const prefix = code.slice(previous, at);
1314
+ const attributes = /(?:@\w+(?:\([^{}]*\))?\s*|(?:public|open|private|fileprivate|internal|final|override|static|class|nonisolated|dynamic)\s+)*$/.exec(
1315
+ prefix
1316
+ )?.[0] ?? "";
1317
+ if (/\b(?:override|static|class)\b|@(?:objc|ObjC|IBAction)\b/.test(attributes))
1318
+ continue;
1319
+ let selector;
1320
+ if (conforms.has("UITableViewDataSource") && /^func\s+numberOfSections\s*\(\s*in\s+\w+\s*:\s*(?:UIKit\.)?UITableView\s*\)/.test(
1321
+ signature2
1322
+ ))
1323
+ selector = "numberOfSectionsInTableView:";
1324
+ else {
1325
+ const match = /^func\s+tableView\s*\(\s*_\s+\w+\s*:\s*(?:UIKit\.)?UITableView\s*,\s*(\w+)\b/.exec(
1326
+ signature2
1327
+ );
1328
+ if (match) selector = selectors[match[1]];
1329
+ }
1330
+ if (selector)
1331
+ edits.push([
1332
+ at,
1333
+ `${/\bnonisolated\b/.test(attributes) ? "" : "@MainActor "}@ObjC(${JSON.stringify(selector)}) `
1334
+ ]);
1335
+ }
1336
+ }
1337
+ }
1338
+ let result = source;
1339
+ for (const [at, text3] of edits.sort((a, b) => b[0] - a[0]))
1340
+ result = result.slice(0, at) + text3 + result.slice(at);
1341
+ return result;
1342
+ }
1224
1343
  function swiftCodeMask(source) {
1225
1344
  const chars = source.split("");
1226
1345
  const blank = (from, to) => {
@@ -1324,9 +1443,9 @@ function swiftCodeMask(source) {
1324
1443
  scanCode(0, false);
1325
1444
  return chars.join("");
1326
1445
  }
1327
- function swiftSourceAsIOS(original, extraObjCExtensions) {
1446
+ function swiftSourceAsIOS(original, extraObjCExtensions, tableConformances = tableProtocolConformances([original])) {
1328
1447
  const source = liftExtensionOverrides(
1329
- lowerNotificationDelegate(original),
1448
+ lowerTableProtocolMethods(lowerNotificationDelegate(original), tableConformances),
1330
1449
  extraObjCExtensions
1331
1450
  );
1332
1451
  const { lineStarts, tokens } = swiftCodeScan(source);
@@ -1600,15 +1719,15 @@ function writeSwiftProject(layout, input, moduleRoot) {
1600
1719
  // sootsim-swift files ${modulePlan.digest("hex").slice(0, 16)}
1601
1720
  // resource accessors ${resourcePlan}
1602
1721
  `;
1603
- const objcExtensions = objcExtensionMemberIndex(
1604
- Object.entries(input.files).filter(([file]) => file.endsWith(".swift")).map(([, contents]) => contents)
1605
- );
1722
+ const swiftSources = Object.entries(input.files).filter(([file]) => file.endsWith(".swift")).map(([, contents]) => contents);
1723
+ const objcExtensions = objcExtensionMemberIndex(swiftSources);
1724
+ const tableConformances = tableProtocolConformances(swiftSources);
1606
1725
  if (targets.length === 0) {
1607
1726
  for (const [file, contents] of Object.entries(input.files)) {
1608
1727
  if (file === "Package.swift") continue;
1609
1728
  files2.set(
1610
1729
  import_node_path2.default.join(layout.sources, file),
1611
- compiledSource(file, contents, objcExtensions)
1730
+ compiledSource(file, contents, objcExtensions, tableConformances)
1612
1731
  );
1613
1732
  }
1614
1733
  let manifest = (0, import_node_fs2.readFileSync)(
@@ -1655,7 +1774,10 @@ function writeSwiftProject(layout, input, moduleRoot) {
1655
1774
  const base = layout.multi ? layout.root : layout.sources;
1656
1775
  for (const [file, contents] of Object.entries(input.files)) {
1657
1776
  if (file === "Package.swift") continue;
1658
- files2.set(import_node_path2.default.join(base, file), compiledSource(file, contents, objcExtensions));
1777
+ files2.set(
1778
+ import_node_path2.default.join(base, file),
1779
+ compiledSource(file, contents, objcExtensions, tableConformances)
1780
+ );
1659
1781
  }
1660
1782
  files2.set(
1661
1783
  import_node_path2.default.join(layout.root, "Package.swift"),
@@ -1955,7 +2077,7 @@ var init_swift_compile = __esm({
1955
2077
  MODIFIERS = /(?:^|\s)(public|open|internal|fileprivate|private|final|nonisolated|@MainActor)(?=\s)/g;
1956
2078
  OVERRIDE_FUNC = /^override((?:\s+(?:public|open|internal|fileprivate|private|final|nonisolated|dynamic|@\w+))*)\s+func\s+([A-Za-z_]\w*)\s*(<[^>{}]*>)?\s*\(/;
1957
2079
  OVERRIDE_VAR = /^override((?:\s+(?:public|open|internal|fileprivate|private|final|nonisolated|dynamic|@\w+))*)\s+var\s+([A-Za-z_]\w*)\s*:\s*([^{=]+?)\s*\{/;
1958
- compiledSource = (file, contents, extraObjCExtensions) => file.endsWith(".swift") ? swiftSourceAsIOS(contents, extraObjCExtensions) : contents;
2080
+ compiledSource = (file, contents, extraObjCExtensions, tableConformances) => file.endsWith(".swift") ? swiftSourceAsIOS(contents, extraObjCExtensions, tableConformances) : contents;
1959
2081
  ROOT_LOCKS = Symbol.for("peachsim.swiftCompile.rootLocks");
1960
2082
  host = globalThis;
1961
2083
  rootLocks = host[ROOT_LOCKS] ??= /* @__PURE__ */ new Map();
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/capture-contract.ts
4
4
  var RNX_SCREEN_CAPTURE_VERSION = 1;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var RNX_CLOUD_MAX_ARTIFACT_BYTES = 20 * 1024 * 1024;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/cloud-test-args.ts
4
4
  var CLOUD_TEST_ARGS_MAX_COUNT = 32;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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);
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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;
@@ -2247,6 +2247,7 @@ var webKitCookieStorage = {
2247
2247
  var WEBVIEW_INSTANCE_ATTRIBUTE = "data-peach-webview";
2248
2248
  var WEBVIEW_HOST_BINDING = "__peachWebViewHost";
2249
2249
  var WEBVIEW_SCHEME_NAVIGATION_EVENT = "peach:webview-scheme-navigation";
2250
+ var WEBVIEW_LOAD_EVENT = "peach:webview-load";
2250
2251
  var WEBVIEW_NETWORK_NAVIGATION_EVENT = "peach:webview-network-navigation";
2251
2252
  var WEBVIEW_FRAME_NAME_PREFIX = "peach-webview:";
2252
2253
  function readWebViewHostRequest(value) {
@@ -2433,6 +2434,7 @@ function webViewAutomationNames(timingName, bootstrapSource) {
2433
2434
  instanceAttribute: WEBVIEW_INSTANCE_ATTRIBUTE,
2434
2435
  schemeNavigationEvent: WEBVIEW_SCHEME_NAVIGATION_EVENT,
2435
2436
  networkNavigationEvent: WEBVIEW_NETWORK_NAVIGATION_EVENT,
2437
+ loadEvent: WEBVIEW_LOAD_EVENT,
2436
2438
  configTimingName: timingName,
2437
2439
  bootstrapSource: `(${bootstrapSource})(${JSON.stringify(timingName)});`
2438
2440
  };
@@ -2517,7 +2519,20 @@ async function automateWebViewFrames(context, names, helpers) {
2517
2519
  })().catch(() => {
2518
2520
  });
2519
2521
  });
2520
- const watchDocumentCookies = async (session) => {
2522
+ const reportDocumentLoad = async (frameId, url, result) => {
2523
+ const bound = byFrameId.get(frameId);
2524
+ if (!bound || bound.navigation) return;
2525
+ await bound.page.evaluate(
2526
+ ([eventName, detail]) => {
2527
+ window.dispatchEvent(new CustomEvent(eventName, { detail }));
2528
+ },
2529
+ [
2530
+ names.loadEvent,
2531
+ { frameName: bound.frameName, instanceId: bound.instanceId, url, result }
2532
+ ]
2533
+ );
2534
+ };
2535
+ const watchDocumentNetwork = async (session) => {
2521
2536
  const documents = /* @__PURE__ */ new Map();
2522
2537
  session.on(
2523
2538
  "Network.requestWillBeSent",
@@ -2546,19 +2561,42 @@ async function automateWebViewFrames(context, names, helpers) {
2546
2561
  });
2547
2562
  }
2548
2563
  );
2564
+ session.on(
2565
+ "Network.responseReceived",
2566
+ (event) => {
2567
+ const load = documents.get(event.requestId);
2568
+ if (!load) return;
2569
+ const status = event.response.status;
2570
+ if (status >= 300 && status < 400) return;
2571
+ void reportDocumentLoad(
2572
+ load.frameId,
2573
+ event.response.url,
2574
+ status >= 400 ? { kind: "httpError", statusCode: status } : { kind: "ok" }
2575
+ ).catch(() => {
2576
+ });
2577
+ }
2578
+ );
2549
2579
  session.on("Network.loadingFinished", (event) => {
2550
2580
  documents.delete(event.requestId);
2551
2581
  });
2552
- session.on("Network.loadingFailed", (event) => {
2553
- documents.delete(event.requestId);
2554
- });
2582
+ session.on(
2583
+ "Network.loadingFailed",
2584
+ (event) => {
2585
+ const load = documents.get(event.requestId);
2586
+ documents.delete(event.requestId);
2587
+ if (!load || event.canceled) return;
2588
+ const result = event.errorText === "net::ERR_CONNECTION_REFUSED" ? { kind: "refused" } : event.errorText === "net::ERR_UNSAFE_PORT" ? { kind: "restrictedPort" } : { kind: "ok" };
2589
+ void reportDocumentLoad(load.frameId, load.url, result).catch(() => {
2590
+ });
2591
+ }
2592
+ );
2555
2593
  await session.send("Network.enable");
2556
2594
  };
2557
2595
  const watchedPages = /* @__PURE__ */ new Set();
2558
2596
  const followFrameProcesses = async (page) => {
2559
2597
  if (watchedPages.has(page)) return;
2560
2598
  watchedPages.add(page);
2561
- await watchDocumentCookies(await pageSession(page));
2599
+ await watchDocumentNetwork(await pageSession(page));
2562
2600
  page.on("framenavigated", (frame) => {
2563
2601
  if (frame.parentFrame() !== page.mainFrame()) return;
2564
2602
  void (async () => {
@@ -2568,7 +2606,7 @@ async function automateWebViewFrames(context, names, helpers) {
2568
2606
  const session = await context.newCDPSession(frame).catch(() => null);
2569
2607
  if (!session) return;
2570
2608
  bound.frameSession = session;
2571
- await watchDocumentCookies(session);
2609
+ await watchDocumentNetwork(session);
2572
2610
  })().catch(() => {
2573
2611
  });
2574
2612
  });
@@ -2860,6 +2898,7 @@ async function automateWebViewFrames(context, names, helpers) {
2860
2898
  }
2861
2899
  const config = JSON.parse(request.config);
2862
2900
  const bound = {
2901
+ frameName: request.frameName,
2863
2902
  instanceId: request.instanceId,
2864
2903
  page: source.page,
2865
2904
  frameId,
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.800 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.809 | (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;