peachsim 0.1.822 → 0.1.823

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 (77) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/agent-identity.cjs +1 -1
  4. package/dist-lib/agent-sessions.cjs +1 -1
  5. package/dist-lib/attached-projects.cjs +1 -1
  6. package/dist-lib/auth/shared-session.cjs +1 -1
  7. package/dist-lib/backend-origin.cjs +1 -1
  8. package/dist-lib/beta.cjs +1 -1
  9. package/dist-lib/beta.mjs +1 -1
  10. package/dist-lib/bridge-constants.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.mjs +1 -1
  13. package/dist-lib/bridge-contract.cjs +1 -1
  14. package/dist-lib/bridge-contract.mjs +1 -1
  15. package/dist-lib/bundle-channel.cjs +169 -44
  16. package/dist-lib/capture-contract.cjs +1 -1
  17. package/dist-lib/capture-contract.mjs +1 -1
  18. package/dist-lib/cli-constants.cjs +1 -1
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +1 -1
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +1 -1
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +1 -1
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/detox/index.cjs +1 -1
  27. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  28. package/dist-lib/expo-swift-bundle.cjs +169 -44
  29. package/dist-lib/expo-swift-metadata.cjs +1 -1
  30. package/dist-lib/expo-swift-metadata.mjs +1 -1
  31. package/dist-lib/home-paths.cjs +1 -1
  32. package/dist-lib/host/bridge-host.cjs +169 -44
  33. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  35. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  36. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  37. package/dist-lib/host/websocket-proxy.cjs +1 -1
  38. package/dist-lib/index.cjs +1 -1
  39. package/dist-lib/jump-to-source-babel.cjs +1 -1
  40. package/dist-lib/jump-to-source-native.cjs +1 -1
  41. package/dist-lib/kotlin-host.cjs +1 -1
  42. package/dist-lib/menu.cjs +1 -1
  43. package/dist-lib/menu.mjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  46. package/dist-lib/metro-production-bundle.cjs +1 -1
  47. package/dist-lib/metro-production-bundle.mjs +1 -1
  48. package/dist-lib/metro.cjs +1 -1
  49. package/dist-lib/native-app-identity.cjs +1 -1
  50. package/dist-lib/native-app-identity.mjs +1 -1
  51. package/dist-lib/native-firebase-metadata.cjs +1 -1
  52. package/dist-lib/native-firebase-metadata.mjs +1 -1
  53. package/dist-lib/plist.cjs +1 -1
  54. package/dist-lib/plist.mjs +1 -1
  55. package/dist-lib/profiles.cjs +1 -1
  56. package/dist-lib/public-brand.cjs +1 -1
  57. package/dist-lib/react-native-host-modules.cjs +1 -1
  58. package/dist-lib/react-native-host-modules.mjs +1 -1
  59. package/dist-lib/render-mode.cjs +1 -1
  60. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  61. package/dist-lib/sdk.cjs +1 -1
  62. package/dist-lib/sdk.mjs +1 -1
  63. package/dist-lib/skills.cjs +169 -44
  64. package/dist-lib/swift-compile.cjs +169 -44
  65. package/dist-lib/swift-compile.mjs +169 -44
  66. package/dist-lib/swift-package.cjs +1 -1
  67. package/dist-lib/swift-package.mjs +1 -1
  68. package/dist-lib/swift-submit.cjs +1 -1
  69. package/dist-lib/swift-submit.mjs +1 -1
  70. package/dist-lib/swift-toolchain.cjs +1 -1
  71. package/dist-lib/swift.cjs +1 -1
  72. package/dist-lib/vite-swift.cjs +169 -44
  73. package/dist-lib/vite.cjs +1 -1
  74. package/dist-lib/worklet-executable.cjs +1 -1
  75. package/dist-lib/worklet-executable.mjs +1 -1
  76. package/package.json +1 -1
  77. package/src/swift-compile.ts +183 -48
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.822 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.823 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import { execFile as execFile2, execFileSync } from "node:child_process";
@@ -1199,10 +1199,25 @@ function tableProtocolConformances(sources) {
1199
1199
  for (const source of sources) {
1200
1200
  const code = swiftCodeMask(source);
1201
1201
  for (const owner of code.matchAll(
1202
- /\b(?:class|extension)\s+([A-Za-z_]\w*)\s*:\s*([^{}]+)\{/g
1202
+ /\b(?:class|extension|protocol)\s+(?!(?:func|var)\b)([A-Za-z_]\w*)([^{}]*)\{/g
1203
1203
  )) {
1204
+ const header = owner[2];
1205
+ let depth = 0;
1206
+ let colon = -1;
1207
+ for (let at = 0; at < header.length; at++) {
1208
+ if (header[at] === "<") depth++;
1209
+ else if (header[at] === ">") depth--;
1210
+ else if (header[at] === ":" && depth === 0) {
1211
+ colon = at;
1212
+ break;
1213
+ }
1214
+ }
1215
+ if (colon === -1) continue;
1204
1216
  const inherited = parents.get(owner[1]) ?? /* @__PURE__ */ new Set();
1205
- for (const type of owner[2].matchAll(/\b[A-Za-z_]\w*\b/g)) inherited.add(type[0]);
1217
+ for (const type of splitTopLevel(header.slice(colon + 1).split(/\bwhere\b/)[0])) {
1218
+ const name = /^\s*(?:[A-Za-z_]\w*\.)*([A-Za-z_]\w*)/.exec(type)?.[1];
1219
+ if (name && !type.includes("<")) inherited.add(name);
1220
+ }
1206
1221
  parents.set(owner[1], inherited);
1207
1222
  }
1208
1223
  }
@@ -1226,47 +1241,148 @@ function tableProtocolConformances(sources) {
1226
1241
  function lowerTableProtocolMethods(source, conformances) {
1227
1242
  const code = swiftCodeMask(source);
1228
1243
  const dataSource = {
1229
- numberOfRowsInSection: "tableView:numberOfRowsInSection:",
1230
- cellForRowAt: "tableView:cellForRowAtIndexPath:",
1231
- titleForHeaderInSection: "tableView:titleForHeaderInSection:",
1232
- titleForFooterInSection: "tableView:titleForFooterInSection:",
1233
- canEditRowAt: "tableView:canEditRowAtIndexPath:",
1234
- commit: "tableView:commitEditingStyle:forRowAtIndexPath:"
1244
+ numberOfRowsInSection: [
1245
+ "tableView:numberOfRowsInSection:",
1246
+ "_:UITableView,numberOfRowsInSection:Int->Int"
1247
+ ],
1248
+ cellForRowAt: [
1249
+ "tableView:cellForRowAtIndexPath:",
1250
+ "_:UITableView,cellForRowAt:IndexPath->UITableViewCell"
1251
+ ],
1252
+ titleForHeaderInSection: [
1253
+ "tableView:titleForHeaderInSection:",
1254
+ "_:UITableView,titleForHeaderInSection:Int->String?"
1255
+ ],
1256
+ titleForFooterInSection: [
1257
+ "tableView:titleForFooterInSection:",
1258
+ "_:UITableView,titleForFooterInSection:Int->String?"
1259
+ ],
1260
+ canEditRowAt: [
1261
+ "tableView:canEditRowAtIndexPath:",
1262
+ "_:UITableView,canEditRowAt:IndexPath->Bool"
1263
+ ],
1264
+ commit: [
1265
+ "tableView:commitEditingStyle:forRowAtIndexPath:",
1266
+ "_:UITableView,commit:UITableViewCell.EditingStyle,forRowAt:IndexPath->Void"
1267
+ ]
1235
1268
  };
1236
1269
  const delegate = {
1237
- willDisplay: "tableView:willDisplayCell:forRowAtIndexPath:",
1238
- didEndDisplaying: "tableView:didEndDisplayingCell:forRowAtIndexPath:",
1239
- heightForRowAt: "tableView:heightForRowAtIndexPath:",
1240
- estimatedHeightForRowAt: "tableView:estimatedHeightForRowAtIndexPath:",
1241
- heightForHeaderInSection: "tableView:heightForHeaderInSection:",
1242
- heightForFooterInSection: "tableView:heightForFooterInSection:",
1243
- estimatedHeightForHeaderInSection: "tableView:estimatedHeightForHeaderInSection:",
1244
- estimatedHeightForFooterInSection: "tableView:estimatedHeightForFooterInSection:",
1245
- viewForHeaderInSection: "tableView:viewForHeaderInSection:",
1246
- viewForFooterInSection: "tableView:viewForFooterInSection:",
1247
- willDisplayHeaderView: "tableView:willDisplayHeaderView:forSection:",
1248
- willDisplayFooterView: "tableView:willDisplayFooterView:forSection:",
1249
- didEndDisplayingHeaderView: "tableView:didEndDisplayingHeaderView:forSection:",
1250
- didEndDisplayingFooterView: "tableView:didEndDisplayingFooterView:forSection:",
1251
- shouldHighlightRowAt: "tableView:shouldHighlightRowAtIndexPath:",
1252
- didHighlightRowAt: "tableView:didHighlightRowAtIndexPath:",
1253
- didUnhighlightRowAt: "tableView:didUnhighlightRowAtIndexPath:",
1254
- willSelectRowAt: "tableView:willSelectRowAtIndexPath:",
1255
- willDeselectRowAt: "tableView:willDeselectRowAtIndexPath:",
1256
- didSelectRowAt: "tableView:didSelectRowAtIndexPath:",
1257
- didDeselectRowAt: "tableView:didDeselectRowAtIndexPath:",
1258
- accessoryButtonTappedForRowWith: "tableView:accessoryButtonTappedForRowWithIndexPath:",
1259
- editingStyleForRowAt: "tableView:editingStyleForRowAtIndexPath:",
1260
- leadingSwipeActionsConfigurationForRowAt: "tableView:leadingSwipeActionsConfigurationForRowAtIndexPath:",
1261
- trailingSwipeActionsConfigurationForRowAt: "tableView:trailingSwipeActionsConfigurationForRowAtIndexPath:",
1262
- willBeginEditingRowAt: "tableView:willBeginEditingRowAtIndexPath:",
1263
- didEndEditingRowAt: "tableView:didEndEditingRowAtIndexPath:"
1270
+ willDisplay: [
1271
+ "tableView:willDisplayCell:forRowAtIndexPath:",
1272
+ "_:UITableView,willDisplay:UITableViewCell,forRowAt:IndexPath->Void"
1273
+ ],
1274
+ didEndDisplaying: [
1275
+ "tableView:didEndDisplayingCell:forRowAtIndexPath:",
1276
+ "_:UITableView,didEndDisplaying:UITableViewCell,forRowAt:IndexPath->Void"
1277
+ ],
1278
+ heightForRowAt: [
1279
+ "tableView:heightForRowAtIndexPath:",
1280
+ "_:UITableView,heightForRowAt:IndexPath->CGFloat"
1281
+ ],
1282
+ estimatedHeightForRowAt: [
1283
+ "tableView:estimatedHeightForRowAtIndexPath:",
1284
+ "_:UITableView,estimatedHeightForRowAt:IndexPath->CGFloat"
1285
+ ],
1286
+ heightForHeaderInSection: [
1287
+ "tableView:heightForHeaderInSection:",
1288
+ "_:UITableView,heightForHeaderInSection:Int->CGFloat"
1289
+ ],
1290
+ heightForFooterInSection: [
1291
+ "tableView:heightForFooterInSection:",
1292
+ "_:UITableView,heightForFooterInSection:Int->CGFloat"
1293
+ ],
1294
+ estimatedHeightForHeaderInSection: [
1295
+ "tableView:estimatedHeightForHeaderInSection:",
1296
+ "_:UITableView,estimatedHeightForHeaderInSection:Int->CGFloat"
1297
+ ],
1298
+ estimatedHeightForFooterInSection: [
1299
+ "tableView:estimatedHeightForFooterInSection:",
1300
+ "_:UITableView,estimatedHeightForFooterInSection:Int->CGFloat"
1301
+ ],
1302
+ viewForHeaderInSection: [
1303
+ "tableView:viewForHeaderInSection:",
1304
+ "_:UITableView,viewForHeaderInSection:Int->UIView?"
1305
+ ],
1306
+ viewForFooterInSection: [
1307
+ "tableView:viewForFooterInSection:",
1308
+ "_:UITableView,viewForFooterInSection:Int->UIView?"
1309
+ ],
1310
+ willDisplayHeaderView: [
1311
+ "tableView:willDisplayHeaderView:forSection:",
1312
+ "_:UITableView,willDisplayHeaderView:UIView,forSection:Int->Void"
1313
+ ],
1314
+ willDisplayFooterView: [
1315
+ "tableView:willDisplayFooterView:forSection:",
1316
+ "_:UITableView,willDisplayFooterView:UIView,forSection:Int->Void"
1317
+ ],
1318
+ didEndDisplayingHeaderView: [
1319
+ "tableView:didEndDisplayingHeaderView:forSection:",
1320
+ "_:UITableView,didEndDisplayingHeaderView:UIView,forSection:Int->Void"
1321
+ ],
1322
+ didEndDisplayingFooterView: [
1323
+ "tableView:didEndDisplayingFooterView:forSection:",
1324
+ "_:UITableView,didEndDisplayingFooterView:UIView,forSection:Int->Void"
1325
+ ],
1326
+ shouldHighlightRowAt: [
1327
+ "tableView:shouldHighlightRowAtIndexPath:",
1328
+ "_:UITableView,shouldHighlightRowAt:IndexPath->Bool"
1329
+ ],
1330
+ didHighlightRowAt: [
1331
+ "tableView:didHighlightRowAtIndexPath:",
1332
+ "_:UITableView,didHighlightRowAt:IndexPath->Void"
1333
+ ],
1334
+ didUnhighlightRowAt: [
1335
+ "tableView:didUnhighlightRowAtIndexPath:",
1336
+ "_:UITableView,didUnhighlightRowAt:IndexPath->Void"
1337
+ ],
1338
+ willSelectRowAt: [
1339
+ "tableView:willSelectRowAtIndexPath:",
1340
+ "_:UITableView,willSelectRowAt:IndexPath->IndexPath?"
1341
+ ],
1342
+ willDeselectRowAt: [
1343
+ "tableView:willDeselectRowAtIndexPath:",
1344
+ "_:UITableView,willDeselectRowAt:IndexPath->IndexPath?"
1345
+ ],
1346
+ didSelectRowAt: [
1347
+ "tableView:didSelectRowAtIndexPath:",
1348
+ "_:UITableView,didSelectRowAt:IndexPath->Void"
1349
+ ],
1350
+ didDeselectRowAt: [
1351
+ "tableView:didDeselectRowAtIndexPath:",
1352
+ "_:UITableView,didDeselectRowAt:IndexPath->Void"
1353
+ ],
1354
+ accessoryButtonTappedForRowWith: [
1355
+ "tableView:accessoryButtonTappedForRowWithIndexPath:",
1356
+ "_:UITableView,accessoryButtonTappedForRowWith:IndexPath->Void"
1357
+ ],
1358
+ editingStyleForRowAt: [
1359
+ "tableView:editingStyleForRowAtIndexPath:",
1360
+ "_:UITableView,editingStyleForRowAt:IndexPath->UITableViewCell.EditingStyle"
1361
+ ],
1362
+ leadingSwipeActionsConfigurationForRowAt: [
1363
+ "tableView:leadingSwipeActionsConfigurationForRowAtIndexPath:",
1364
+ "_:UITableView,leadingSwipeActionsConfigurationForRowAt:IndexPath->UISwipeActionsConfiguration?"
1365
+ ],
1366
+ trailingSwipeActionsConfigurationForRowAt: [
1367
+ "tableView:trailingSwipeActionsConfigurationForRowAtIndexPath:",
1368
+ "_:UITableView,trailingSwipeActionsConfigurationForRowAt:IndexPath->UISwipeActionsConfiguration?"
1369
+ ],
1370
+ willBeginEditingRowAt: [
1371
+ "tableView:willBeginEditingRowAtIndexPath:",
1372
+ "_:UITableView,willBeginEditingRowAt:IndexPath->Void"
1373
+ ],
1374
+ didEndEditingRowAt: [
1375
+ "tableView:didEndEditingRowAtIndexPath:",
1376
+ "_:UITableView,didEndEditingRowAt:IndexPath?->Void"
1377
+ ]
1264
1378
  };
1265
1379
  const braces = [...code.matchAll(/[{}]/g)].map((match) => match.index);
1266
1380
  const edits = [];
1267
1381
  for (const owner of code.matchAll(/\b(?:class|extension)\s+([A-Za-z_]\w*)[^{}]*\{/g)) {
1268
1382
  const conforms = conformances.get(owner[1]);
1269
1383
  if (!conforms) continue;
1384
+ if (/^\s*</.test(owner[0].slice(owner[0].indexOf(owner[1]) + owner[1].length)))
1385
+ continue;
1270
1386
  const selectors = {
1271
1387
  ...conforms.has("UITableViewDataSource") ? dataSource : {},
1272
1388
  ...conforms.has("UITableViewDelegate") ? delegate : {}
@@ -1290,15 +1406,24 @@ function lowerTableProtocolMethods(source, conformances) {
1290
1406
  if (/\b(?:override|static|class)\b|@(?:objc|ObjC|IBAction)\b/.test(attributes))
1291
1407
  continue;
1292
1408
  let selector;
1293
- if (conforms.has("UITableViewDataSource") && /^func\s+numberOfSections\s*\(\s*in\s+\w+\s*:\s*(?:UIKit\.)?UITableView\s*\)/.test(
1409
+ const method = /^func\s+(tableView|numberOfSections)\s*\(([^()]*)\)\s*(?:->\s*([\w.?!]+|\(\s*\)))?\s*$/.exec(
1294
1410
  signature
1295
- ))
1296
- selector = "numberOfSectionsInTableView:";
1297
- else {
1298
- const match = /^func\s+tableView\s*\(\s*_\s+\w+\s*:\s*(?:UIKit\.)?UITableView\s*,\s*(\w+)\b/.exec(
1299
- signature
1300
- );
1301
- if (match) selector = selectors[match[1]];
1411
+ );
1412
+ if (method) {
1413
+ const parameters = splitTopLevel(method[2]).map((parameter) => {
1414
+ const match = /^(?:(\w+)\s+)?(\w+)\s*:\s*([\w.?]+)\s*$/.exec(parameter);
1415
+ return match ? `${match[1] ?? match[2]}:${match[3]}` : "";
1416
+ }).join(",").replace(/\b(?:UIKit|UIKitCore|Foundation|CoreGraphics|Swift)\./g, "");
1417
+ const result2 = (method[3] ?? "Void").replace(/\(\s*\)/, "Void").replaceAll("!", "?").replace(/\b(?:UIKit|UIKitCore|Foundation|CoreGraphics|Swift)\./g, "");
1418
+ if (method[1] === "numberOfSections") {
1419
+ if (conforms.has("UITableViewDataSource") && parameters === "in:UITableView" && result2 === "Int")
1420
+ selector = "numberOfSectionsInTableView:";
1421
+ } else {
1422
+ const label = /^_:UITableView,(\w+):/.exec(parameters)?.[1];
1423
+ const requirement = label ? selectors[label] : void 0;
1424
+ if (requirement && `${parameters}->${result2}` === requirement[1])
1425
+ selector = requirement[0];
1426
+ }
1302
1427
  }
1303
1428
  if (selector)
1304
1429
  edits.push([
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.822 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.823 | (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.822 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.823 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function isSwiftManifestFile(file) {
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.822 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.823 | (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.822 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.823 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/swift-submit.ts
4
4
  var SWIFT_COMPILE_PATH = "/api/swift-compile";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.822 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.823 | (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.822 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.823 | (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.822 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.823 | (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;
@@ -2645,10 +2645,25 @@ function tableProtocolConformances(sources) {
2645
2645
  for (const source of sources) {
2646
2646
  const code = swiftCodeMask(source);
2647
2647
  for (const owner of code.matchAll(
2648
- /\b(?:class|extension)\s+([A-Za-z_]\w*)\s*:\s*([^{}]+)\{/g
2648
+ /\b(?:class|extension|protocol)\s+(?!(?:func|var)\b)([A-Za-z_]\w*)([^{}]*)\{/g
2649
2649
  )) {
2650
+ const header = owner[2];
2651
+ let depth = 0;
2652
+ let colon = -1;
2653
+ for (let at = 0; at < header.length; at++) {
2654
+ if (header[at] === "<") depth++;
2655
+ else if (header[at] === ">") depth--;
2656
+ else if (header[at] === ":" && depth === 0) {
2657
+ colon = at;
2658
+ break;
2659
+ }
2660
+ }
2661
+ if (colon === -1) continue;
2650
2662
  const inherited = parents.get(owner[1]) ?? /* @__PURE__ */ new Set();
2651
- for (const type of owner[2].matchAll(/\b[A-Za-z_]\w*\b/g)) inherited.add(type[0]);
2663
+ for (const type of splitTopLevel(header.slice(colon + 1).split(/\bwhere\b/)[0])) {
2664
+ const name2 = /^\s*(?:[A-Za-z_]\w*\.)*([A-Za-z_]\w*)/.exec(type)?.[1];
2665
+ if (name2 && !type.includes("<")) inherited.add(name2);
2666
+ }
2652
2667
  parents.set(owner[1], inherited);
2653
2668
  }
2654
2669
  }
@@ -2672,47 +2687,148 @@ function tableProtocolConformances(sources) {
2672
2687
  function lowerTableProtocolMethods(source, conformances) {
2673
2688
  const code = swiftCodeMask(source);
2674
2689
  const dataSource = {
2675
- numberOfRowsInSection: "tableView:numberOfRowsInSection:",
2676
- cellForRowAt: "tableView:cellForRowAtIndexPath:",
2677
- titleForHeaderInSection: "tableView:titleForHeaderInSection:",
2678
- titleForFooterInSection: "tableView:titleForFooterInSection:",
2679
- canEditRowAt: "tableView:canEditRowAtIndexPath:",
2680
- commit: "tableView:commitEditingStyle:forRowAtIndexPath:"
2690
+ numberOfRowsInSection: [
2691
+ "tableView:numberOfRowsInSection:",
2692
+ "_:UITableView,numberOfRowsInSection:Int->Int"
2693
+ ],
2694
+ cellForRowAt: [
2695
+ "tableView:cellForRowAtIndexPath:",
2696
+ "_:UITableView,cellForRowAt:IndexPath->UITableViewCell"
2697
+ ],
2698
+ titleForHeaderInSection: [
2699
+ "tableView:titleForHeaderInSection:",
2700
+ "_:UITableView,titleForHeaderInSection:Int->String?"
2701
+ ],
2702
+ titleForFooterInSection: [
2703
+ "tableView:titleForFooterInSection:",
2704
+ "_:UITableView,titleForFooterInSection:Int->String?"
2705
+ ],
2706
+ canEditRowAt: [
2707
+ "tableView:canEditRowAtIndexPath:",
2708
+ "_:UITableView,canEditRowAt:IndexPath->Bool"
2709
+ ],
2710
+ commit: [
2711
+ "tableView:commitEditingStyle:forRowAtIndexPath:",
2712
+ "_:UITableView,commit:UITableViewCell.EditingStyle,forRowAt:IndexPath->Void"
2713
+ ]
2681
2714
  };
2682
2715
  const delegate = {
2683
- willDisplay: "tableView:willDisplayCell:forRowAtIndexPath:",
2684
- didEndDisplaying: "tableView:didEndDisplayingCell:forRowAtIndexPath:",
2685
- heightForRowAt: "tableView:heightForRowAtIndexPath:",
2686
- estimatedHeightForRowAt: "tableView:estimatedHeightForRowAtIndexPath:",
2687
- heightForHeaderInSection: "tableView:heightForHeaderInSection:",
2688
- heightForFooterInSection: "tableView:heightForFooterInSection:",
2689
- estimatedHeightForHeaderInSection: "tableView:estimatedHeightForHeaderInSection:",
2690
- estimatedHeightForFooterInSection: "tableView:estimatedHeightForFooterInSection:",
2691
- viewForHeaderInSection: "tableView:viewForHeaderInSection:",
2692
- viewForFooterInSection: "tableView:viewForFooterInSection:",
2693
- willDisplayHeaderView: "tableView:willDisplayHeaderView:forSection:",
2694
- willDisplayFooterView: "tableView:willDisplayFooterView:forSection:",
2695
- didEndDisplayingHeaderView: "tableView:didEndDisplayingHeaderView:forSection:",
2696
- didEndDisplayingFooterView: "tableView:didEndDisplayingFooterView:forSection:",
2697
- shouldHighlightRowAt: "tableView:shouldHighlightRowAtIndexPath:",
2698
- didHighlightRowAt: "tableView:didHighlightRowAtIndexPath:",
2699
- didUnhighlightRowAt: "tableView:didUnhighlightRowAtIndexPath:",
2700
- willSelectRowAt: "tableView:willSelectRowAtIndexPath:",
2701
- willDeselectRowAt: "tableView:willDeselectRowAtIndexPath:",
2702
- didSelectRowAt: "tableView:didSelectRowAtIndexPath:",
2703
- didDeselectRowAt: "tableView:didDeselectRowAtIndexPath:",
2704
- accessoryButtonTappedForRowWith: "tableView:accessoryButtonTappedForRowWithIndexPath:",
2705
- editingStyleForRowAt: "tableView:editingStyleForRowAtIndexPath:",
2706
- leadingSwipeActionsConfigurationForRowAt: "tableView:leadingSwipeActionsConfigurationForRowAtIndexPath:",
2707
- trailingSwipeActionsConfigurationForRowAt: "tableView:trailingSwipeActionsConfigurationForRowAtIndexPath:",
2708
- willBeginEditingRowAt: "tableView:willBeginEditingRowAtIndexPath:",
2709
- didEndEditingRowAt: "tableView:didEndEditingRowAtIndexPath:"
2716
+ willDisplay: [
2717
+ "tableView:willDisplayCell:forRowAtIndexPath:",
2718
+ "_:UITableView,willDisplay:UITableViewCell,forRowAt:IndexPath->Void"
2719
+ ],
2720
+ didEndDisplaying: [
2721
+ "tableView:didEndDisplayingCell:forRowAtIndexPath:",
2722
+ "_:UITableView,didEndDisplaying:UITableViewCell,forRowAt:IndexPath->Void"
2723
+ ],
2724
+ heightForRowAt: [
2725
+ "tableView:heightForRowAtIndexPath:",
2726
+ "_:UITableView,heightForRowAt:IndexPath->CGFloat"
2727
+ ],
2728
+ estimatedHeightForRowAt: [
2729
+ "tableView:estimatedHeightForRowAtIndexPath:",
2730
+ "_:UITableView,estimatedHeightForRowAt:IndexPath->CGFloat"
2731
+ ],
2732
+ heightForHeaderInSection: [
2733
+ "tableView:heightForHeaderInSection:",
2734
+ "_:UITableView,heightForHeaderInSection:Int->CGFloat"
2735
+ ],
2736
+ heightForFooterInSection: [
2737
+ "tableView:heightForFooterInSection:",
2738
+ "_:UITableView,heightForFooterInSection:Int->CGFloat"
2739
+ ],
2740
+ estimatedHeightForHeaderInSection: [
2741
+ "tableView:estimatedHeightForHeaderInSection:",
2742
+ "_:UITableView,estimatedHeightForHeaderInSection:Int->CGFloat"
2743
+ ],
2744
+ estimatedHeightForFooterInSection: [
2745
+ "tableView:estimatedHeightForFooterInSection:",
2746
+ "_:UITableView,estimatedHeightForFooterInSection:Int->CGFloat"
2747
+ ],
2748
+ viewForHeaderInSection: [
2749
+ "tableView:viewForHeaderInSection:",
2750
+ "_:UITableView,viewForHeaderInSection:Int->UIView?"
2751
+ ],
2752
+ viewForFooterInSection: [
2753
+ "tableView:viewForFooterInSection:",
2754
+ "_:UITableView,viewForFooterInSection:Int->UIView?"
2755
+ ],
2756
+ willDisplayHeaderView: [
2757
+ "tableView:willDisplayHeaderView:forSection:",
2758
+ "_:UITableView,willDisplayHeaderView:UIView,forSection:Int->Void"
2759
+ ],
2760
+ willDisplayFooterView: [
2761
+ "tableView:willDisplayFooterView:forSection:",
2762
+ "_:UITableView,willDisplayFooterView:UIView,forSection:Int->Void"
2763
+ ],
2764
+ didEndDisplayingHeaderView: [
2765
+ "tableView:didEndDisplayingHeaderView:forSection:",
2766
+ "_:UITableView,didEndDisplayingHeaderView:UIView,forSection:Int->Void"
2767
+ ],
2768
+ didEndDisplayingFooterView: [
2769
+ "tableView:didEndDisplayingFooterView:forSection:",
2770
+ "_:UITableView,didEndDisplayingFooterView:UIView,forSection:Int->Void"
2771
+ ],
2772
+ shouldHighlightRowAt: [
2773
+ "tableView:shouldHighlightRowAtIndexPath:",
2774
+ "_:UITableView,shouldHighlightRowAt:IndexPath->Bool"
2775
+ ],
2776
+ didHighlightRowAt: [
2777
+ "tableView:didHighlightRowAtIndexPath:",
2778
+ "_:UITableView,didHighlightRowAt:IndexPath->Void"
2779
+ ],
2780
+ didUnhighlightRowAt: [
2781
+ "tableView:didUnhighlightRowAtIndexPath:",
2782
+ "_:UITableView,didUnhighlightRowAt:IndexPath->Void"
2783
+ ],
2784
+ willSelectRowAt: [
2785
+ "tableView:willSelectRowAtIndexPath:",
2786
+ "_:UITableView,willSelectRowAt:IndexPath->IndexPath?"
2787
+ ],
2788
+ willDeselectRowAt: [
2789
+ "tableView:willDeselectRowAtIndexPath:",
2790
+ "_:UITableView,willDeselectRowAt:IndexPath->IndexPath?"
2791
+ ],
2792
+ didSelectRowAt: [
2793
+ "tableView:didSelectRowAtIndexPath:",
2794
+ "_:UITableView,didSelectRowAt:IndexPath->Void"
2795
+ ],
2796
+ didDeselectRowAt: [
2797
+ "tableView:didDeselectRowAtIndexPath:",
2798
+ "_:UITableView,didDeselectRowAt:IndexPath->Void"
2799
+ ],
2800
+ accessoryButtonTappedForRowWith: [
2801
+ "tableView:accessoryButtonTappedForRowWithIndexPath:",
2802
+ "_:UITableView,accessoryButtonTappedForRowWith:IndexPath->Void"
2803
+ ],
2804
+ editingStyleForRowAt: [
2805
+ "tableView:editingStyleForRowAtIndexPath:",
2806
+ "_:UITableView,editingStyleForRowAt:IndexPath->UITableViewCell.EditingStyle"
2807
+ ],
2808
+ leadingSwipeActionsConfigurationForRowAt: [
2809
+ "tableView:leadingSwipeActionsConfigurationForRowAtIndexPath:",
2810
+ "_:UITableView,leadingSwipeActionsConfigurationForRowAt:IndexPath->UISwipeActionsConfiguration?"
2811
+ ],
2812
+ trailingSwipeActionsConfigurationForRowAt: [
2813
+ "tableView:trailingSwipeActionsConfigurationForRowAtIndexPath:",
2814
+ "_:UITableView,trailingSwipeActionsConfigurationForRowAt:IndexPath->UISwipeActionsConfiguration?"
2815
+ ],
2816
+ willBeginEditingRowAt: [
2817
+ "tableView:willBeginEditingRowAtIndexPath:",
2818
+ "_:UITableView,willBeginEditingRowAt:IndexPath->Void"
2819
+ ],
2820
+ didEndEditingRowAt: [
2821
+ "tableView:didEndEditingRowAtIndexPath:",
2822
+ "_:UITableView,didEndEditingRowAt:IndexPath?->Void"
2823
+ ]
2710
2824
  };
2711
2825
  const braces = [...code.matchAll(/[{}]/g)].map((match) => match.index);
2712
2826
  const edits = [];
2713
2827
  for (const owner of code.matchAll(/\b(?:class|extension)\s+([A-Za-z_]\w*)[^{}]*\{/g)) {
2714
2828
  const conforms = conformances.get(owner[1]);
2715
2829
  if (!conforms) continue;
2830
+ if (/^\s*</.test(owner[0].slice(owner[0].indexOf(owner[1]) + owner[1].length)))
2831
+ continue;
2716
2832
  const selectors = {
2717
2833
  ...conforms.has("UITableViewDataSource") ? dataSource : {},
2718
2834
  ...conforms.has("UITableViewDelegate") ? delegate : {}
@@ -2736,15 +2852,24 @@ function lowerTableProtocolMethods(source, conformances) {
2736
2852
  if (/\b(?:override|static|class)\b|@(?:objc|ObjC|IBAction)\b/.test(attributes))
2737
2853
  continue;
2738
2854
  let selector;
2739
- if (conforms.has("UITableViewDataSource") && /^func\s+numberOfSections\s*\(\s*in\s+\w+\s*:\s*(?:UIKit\.)?UITableView\s*\)/.test(
2855
+ const method = /^func\s+(tableView|numberOfSections)\s*\(([^()]*)\)\s*(?:->\s*([\w.?!]+|\(\s*\)))?\s*$/.exec(
2740
2856
  signature
2741
- ))
2742
- selector = "numberOfSectionsInTableView:";
2743
- else {
2744
- const match = /^func\s+tableView\s*\(\s*_\s+\w+\s*:\s*(?:UIKit\.)?UITableView\s*,\s*(\w+)\b/.exec(
2745
- signature
2746
- );
2747
- if (match) selector = selectors[match[1]];
2857
+ );
2858
+ if (method) {
2859
+ const parameters = splitTopLevel(method[2]).map((parameter) => {
2860
+ const match = /^(?:(\w+)\s+)?(\w+)\s*:\s*([\w.?]+)\s*$/.exec(parameter);
2861
+ return match ? `${match[1] ?? match[2]}:${match[3]}` : "";
2862
+ }).join(",").replace(/\b(?:UIKit|UIKitCore|Foundation|CoreGraphics|Swift)\./g, "");
2863
+ const result2 = (method[3] ?? "Void").replace(/\(\s*\)/, "Void").replaceAll("!", "?").replace(/\b(?:UIKit|UIKitCore|Foundation|CoreGraphics|Swift)\./g, "");
2864
+ if (method[1] === "numberOfSections") {
2865
+ if (conforms.has("UITableViewDataSource") && parameters === "in:UITableView" && result2 === "Int")
2866
+ selector = "numberOfSectionsInTableView:";
2867
+ } else {
2868
+ const label = /^_:UITableView,(\w+):/.exec(parameters)?.[1];
2869
+ const requirement = label ? selectors[label] : void 0;
2870
+ if (requirement && `${parameters}->${result2}` === requirement[1])
2871
+ selector = requirement[0];
2872
+ }
2748
2873
  }
2749
2874
  if (selector)
2750
2875
  edits.push([
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.822 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.823 | (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.822 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.823 | (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.822 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.823 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.822",
3
+ "version": "0.1.823",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for peach.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",