peachsim 0.1.2300 → 0.1.2301

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 (99) hide show
  1. package/cli/commands/control.ts +1 -0
  2. package/cli/commands/shell-url.ts +5 -0
  3. package/dist-lib/agent-daemon-client.cjs +1 -1
  4. package/dist-lib/agent-events.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 +307 -68
  16. package/dist-lib/capture-contract.cjs +1 -1
  17. package/dist-lib/capture-contract.mjs +1 -1
  18. package/dist-lib/cloud-contract.cjs +1 -1
  19. package/dist-lib/cloud-contract.mjs +1 -1
  20. package/dist-lib/cloud-test-args.cjs +1 -1
  21. package/dist-lib/cloud-test-args.mjs +1 -1
  22. package/dist-lib/cloud.cjs +1 -1
  23. package/dist-lib/cloud.mjs +1 -1
  24. package/dist-lib/config.cjs +1 -1
  25. package/dist-lib/config.mjs +1 -1
  26. package/dist-lib/detox/index.cjs +2 -1
  27. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  28. package/dist-lib/expo-swift-bundle.cjs +306 -67
  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 +2523 -71
  33. package/dist-lib/host/fetch-proxy-handler.cjs +5 -5
  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 +13 -8
  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 +12 -8
  49. package/dist-lib/native-app-identity-project.cjs +9 -5
  50. package/dist-lib/native-app-identity-project.mjs +9 -5
  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/pdfium-raster.cjs +1 -1
  56. package/dist-lib/pdfium-raster.mjs +1 -1
  57. package/dist-lib/plist.cjs +1 -1
  58. package/dist-lib/plist.mjs +1 -1
  59. package/dist-lib/profiles.cjs +1 -1
  60. package/dist-lib/public-brand.cjs +1 -1
  61. package/dist-lib/public-origins-lib-esm.json +24 -24
  62. package/dist-lib/public-origins-lib.json +56 -53
  63. package/dist-lib/react-native-host-modules.cjs +1 -1
  64. package/dist-lib/react-native-host-modules.mjs +1 -1
  65. package/dist-lib/reap-browser.cjs +1 -1
  66. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  67. package/dist-lib/sdk.cjs +2 -1
  68. package/dist-lib/sdk.mjs +2 -1
  69. package/dist-lib/skills.cjs +368 -78
  70. package/dist-lib/swift-compile.cjs +15 -7
  71. package/dist-lib/swift-compile.mjs +15 -7
  72. package/dist-lib/swift-package.cjs +1 -1
  73. package/dist-lib/swift-package.mjs +1 -1
  74. package/dist-lib/swift-submit.cjs +1 -1
  75. package/dist-lib/swift-submit.mjs +1 -1
  76. package/dist-lib/swift-toolchain.cjs +1 -1
  77. package/dist-lib/swift.cjs +1 -1
  78. package/dist-lib/vite-swift.cjs +23 -11
  79. package/dist-lib/vite.cjs +5 -5
  80. package/dist-lib/worklet-executable.cjs +1 -1
  81. package/dist-lib/worklet-executable.mjs +1 -1
  82. package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +1 -0
  83. package/dist-types/packages/peach-engine/src/engine/scene-table.d.ts +2 -0
  84. package/dist-types/packages/peach-engine/src/render-worker/activitykit-activityContract.d.ts +17 -0
  85. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +1 -0
  86. package/dist-types/packages/peach-engine/src/render-worker/native-ui-protocol.d.ts +4 -0
  87. package/dist-types/packages/peach-engine/src/render-worker/native-widgetContract.d.ts +3 -1
  88. package/package.json +1 -1
  89. package/src/expo-discovery-cache.ts +6 -6
  90. package/src/expo-swift-host.ts +19 -4
  91. package/src/host/bridge-host.ts +9 -0
  92. package/src/launchMetadataContract.ts +1 -0
  93. package/src/swift-guest-compile.ts +19 -3
  94. package/src/swift-guest-source-plan.ts +7 -2
  95. package/src/swiftContract.ts +3 -0
  96. package/src/turbo-compile.ts +60 -4
  97. package/src/turbo-source.ts +239 -35
  98. package/src/widget-extension-bundle.ts +48 -0
  99. package/src/xcode-project.ts +22 -3
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2300 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2301 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -12144,7 +12144,7 @@ var swiftCoverageProvenance;
12144
12144
  var init_provenance = __esm({
12145
12145
  "src/swift-coverage/provenance.ts"() {
12146
12146
  "use strict";
12147
- swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"bfde06f157f52d3dd76577b3c6059c95c0393180b054ced773624ea89558992b","swift-package.ts":"338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb","swift-source-file.ts":"93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94","swift-toolchain.ts":"b60efa4eb7516378344cb7c48216aea5fa36590ace91a698655b48cfd0db96fe","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1","xcode-project.ts":"96a57d4b999e75658683d635d3522d6c7ae30b4c8bc38a8114af353bce5162ff","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
12147
+ swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"bfde06f157f52d3dd76577b3c6059c95c0393180b054ced773624ea89558992b","swift-package.ts":"338cfef9a34a930206ac2e1a8a90b85c8d61f776d9a41e6445dc18e0c5385cdb","swift-source-file.ts":"93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94","swift-toolchain.ts":"b60efa4eb7516378344cb7c48216aea5fa36590ace91a698655b48cfd0db96fe","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1","xcode-project.ts":"f0e86caccf203fa58395cbac9fed64577bb98a061efdf24f85a289c4e5996db9","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
12148
12148
  }
12149
12149
  });
12150
12150
 
@@ -23492,8 +23492,8 @@ function swiftPackageLinkage(target) {
23492
23492
  function guestSourceImages(graph) {
23493
23493
  const targets = new Map(graph.targets.map((target) => [target.id, target]));
23494
23494
  const entry = targets.get(graph.entry);
23495
- if (!entry || entry.productType !== "com.apple.product-type.application")
23496
- throw new Error("source graph has no application entry");
23495
+ if (!entry || entry.productType !== "com.apple.product-type.application" && entry.productType !== "com.apple.product-type.app-extension")
23496
+ throw new Error("source graph has no application or app extension entry");
23497
23497
  const images = [
23498
23498
  { id: 0, owner: entry.id, members: [] }
23499
23499
  ];
@@ -26006,6 +26006,12 @@ async function compileGuestLink(options) {
26006
26006
  (target) => target.productName.endsWith(".framework") ? [target.productName.slice(0, -10)] : []
26007
26007
  )
26008
26008
  );
26009
+ const sourceLibraries = new Set(
26010
+ options.graph.targets.flatMap((target) => {
26011
+ const library = /^lib(.+)\.(?:a|dylib)$/.exec(target.productName);
26012
+ return library ? [library[1]] : [];
26013
+ })
26014
+ );
26009
26015
  const entry = targets.get(options.graph.entry);
26010
26016
  if (!entry) throw new Error("guest source graph has no entry");
26011
26017
  const imageBuildVersion = (value) => {
@@ -26175,10 +26181,12 @@ async function compileGuestLink(options) {
26175
26181
  images: sourceImages.map((image) => ({
26176
26182
  id: image.id,
26177
26183
  objects: selectedSource.filter((artifact) => artifact.image === image.id).map((artifact) => artifact.path),
26178
- // a `-framework Name` for a framework the source graph builds links
26179
- // that framework's own image, which the plan already depends on
26184
+ // a `-framework Name` or `-lname` for a product the source graph
26185
+ // builds links that product's own target, which the plan already holds
26180
26186
  linkerFlags: image.members.flatMap((id) => targets.get(id).linkerFlags).filter(
26181
- (flag, index, flags) => !sourceFrameworks.has(flags[index - 1] === "-framework" ? flag : "") && !(flag === "-framework" && sourceFrameworks.has(flags[index + 1] ?? ""))
26187
+ (flag, index, flags) => !sourceFrameworks.has(flags[index - 1] === "-framework" ? flag : "") && !(flag === "-framework" && sourceFrameworks.has(flags[index + 1] ?? "")) && !sourceLibraries.has(
26188
+ flag.startsWith("-l") && flag.length > 2 ? flag.slice(2) : flags[index - 1] === "-l" ? flag : ""
26189
+ ) && !(flag === "-l" && sourceLibraries.has(flags[index + 1] ?? ""))
26182
26190
  ),
26183
26191
  clangLinkOptions: selectedSource.filter((artifact) => artifact.image === image.id).map((artifact) => ({
26184
26192
  object: import_node_path32.default.resolve(rewritten.get(artifact.path) ?? artifact.path),
@@ -32277,7 +32285,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
32277
32285
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
32278
32286
  MULTI_MANIFEST_VERSION = 68;
32279
32287
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
32280
- compilerSourceDigest = true ? "3c645ce8a5442f60dce1735912506ad6fa5d09cb92da26cff3950c374b371e2b" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
32288
+ compilerSourceDigest = true ? "ad311d7f868d4920f32f2ed00502f49f84fb83ae19817180a70ef5f799334169" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
32281
32289
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
32282
32290
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
32283
32291
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -35519,7 +35527,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
35519
35527
  options.installedPods
35520
35528
  );
35521
35529
  const allTargets = projects2.flatMap(projectTargets);
35522
- const appTargets = allTargets.filter((ref) => isIosAppTarget(ref, options));
35530
+ const appTargets = allTargets.filter(
35531
+ (ref) => isIosAppTarget(ref, options) || targetName !== void 0 && ref.target.name === targetName && ref.target.productType === APP_EXTENSION
35532
+ );
35523
35533
  const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
35524
35534
  const container = import_node_path45.default.basename(xcodeprojOrWorkspace);
35525
35535
  const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
@@ -35583,7 +35593,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
35583
35593
  const words2 = settingList(flags);
35584
35594
  const linked = new Set(linkedTargets(ref).map((link) => link.target));
35585
35595
  return words2.flatMap((word, index) => {
35586
- const target = words2[index - 1] === "-framework" ? byProduct.get(`${word}.framework`) : void 0;
35596
+ const library = word.startsWith("-l") && word.length > 2 ? word.slice(2) : words2[index - 1] === "-l" ? word : void 0;
35597
+ const target = words2[index - 1] === "-framework" ? byProduct.get(`${word}.framework`) : library ? byProduct.get(`lib${library}.a`) ?? byProduct.get(`lib${library}.dylib`) : void 0;
35587
35598
  if (!target || target === ref || linked.has(target)) return [];
35588
35599
  linked.add(target);
35589
35600
  return [{ target, attributes: [] }];
@@ -36585,7 +36596,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
36585
36596
  cocoapods
36586
36597
  };
36587
36598
  }
36588
- var import_node_child_process26, import_node_crypto22, import_node_fs45, import_node_path45, import_plist2, XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET, runScriptTimeoutMs, CXX_STANDARD_ALIASES, PRE_CXX20_STANDARDS, APPLICATION, RESOURCE_BUNDLE, PRODUCT_MACH_O_TYPES, FRAMEWORK_PRODUCTS, HEADER_FILE, MODULE_PRODUCTS, CONDITIONS, isDirectory, loaded2, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
36599
+ var import_node_child_process26, import_node_crypto22, import_node_fs45, import_node_path45, import_plist2, XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET, runScriptTimeoutMs, CXX_STANDARD_ALIASES, PRE_CXX20_STANDARDS, APPLICATION, APP_EXTENSION, RESOURCE_BUNDLE, PRODUCT_MACH_O_TYPES, FRAMEWORK_PRODUCTS, HEADER_FILE, MODULE_PRODUCTS, CONDITIONS, isDirectory, loaded2, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
36589
36600
  var init_xcode_project = __esm({
36590
36601
  "src/xcode-project.ts"() {
36591
36602
  "use strict";
@@ -36624,6 +36635,7 @@ var init_xcode_project = __esm({
36624
36635
  "compiler-default"
36625
36636
  ]);
36626
36637
  APPLICATION = "com.apple.product-type.application";
36638
+ APP_EXTENSION = "com.apple.product-type.app-extension";
36627
36639
  RESOURCE_BUNDLE = "com.apple.product-type.bundle";
36628
36640
  PRODUCT_MACH_O_TYPES = {
36629
36641
  "com.apple.product-type.application": "mh_execute",
@@ -45031,7 +45043,7 @@ var init_swift_standin_digest = __esm({
45031
45043
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
45032
45044
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
45033
45045
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
45034
- STANDIN_SOURCE_DIGEST = true ? "8a800a5151c426f07ff690c34df9a6d538c005318051ef52635fc568c44736f6" : standinSourceDigest();
45046
+ STANDIN_SOURCE_DIGEST = true ? "7dd2fef3ceef6be07d22cfa2f397bda7721d34bc2ef8764f78e05b9637849f09" : standinSourceDigest();
45035
45047
  }
45036
45048
  });
45037
45049
 
@@ -55303,7 +55315,8 @@ async function collectTurboSources(options) {
55303
55315
  reactNative,
55304
55316
  sources: [],
55305
55317
  externalPodSources: [],
55306
- rendererSwiftTargets: []
55318
+ rendererSwiftTargets: [],
55319
+ fabricComponents: []
55307
55320
  };
55308
55321
  const sharedLibrary = [...options.installedPods?.values() ?? []].find(
55309
55322
  (pod) => pod.sharedLibrary
@@ -55750,6 +55763,9 @@ async function collectTurboSources(options) {
55750
55763
  };
55751
55764
  let objc = Boolean(options.reactNativeProvider);
55752
55765
  let fabric = Boolean(options.reactNativeProvider);
55766
+ const fabricPackages = /* @__PURE__ */ new Set();
55767
+ const fabricViews = [];
55768
+ let fabricTarget = null;
55753
55769
  let legacyBridge = false;
55754
55770
  let hermesHeaders = null;
55755
55771
  const objcClasses = /* @__PURE__ */ new Set();
@@ -55773,7 +55789,11 @@ async function collectTurboSources(options) {
55773
55789
  { tool: "cxx", flags: pod.installed.preprocessorFlags.cxx }
55774
55790
  ];
55775
55791
  const root = pod.root;
55776
- fabric ||= fabricComponents(provider.root);
55792
+ if (fabricComponents(provider.root)) {
55793
+ fabric = true;
55794
+ fabricPackages.add(provider.name);
55795
+ fabricTarget ??= { targetName, label, root: provider.root };
55796
+ }
55777
55797
  if (pod.installed?.library) {
55778
55798
  result.libraries ??= {};
55779
55799
  result.libraries[targetName] = import_node_fs86.default.readFileSync(pod.installed.library).toString("base64");
@@ -56046,6 +56066,17 @@ async function collectTurboSources(options) {
56046
56066
  const owned = /* @__PURE__ */ new Set();
56047
56067
  walkFiles2(generated, "", owned);
56048
56068
  const spec = codegenConfig.name;
56069
+ let definedComponentNames;
56070
+ const getDefinedComponentNames = () => {
56071
+ if (definedComponentNames) return definedComponentNames;
56072
+ definedComponentNames = /* @__PURE__ */ new Set();
56073
+ const pattern = /\b(?:const\s+char|char\s+const)\s+(\w+ComponentName)\s*\[\s*\]\s*=/g;
56074
+ for (const sourceFile of sources) {
56075
+ const text6 = readPackageFile(root, import_node_path85.default.join(root, sourceFile), Infinity).toString("utf8").replace(/\/\/[^\n]*/g, "");
56076
+ for (const match of text6.matchAll(pattern)) definedComponentNames.add(match[1]);
56077
+ }
56078
+ return definedComponentNames;
56079
+ };
56049
56080
  for (const file of [...owned].sort()) {
56050
56081
  const base = import_node_path85.default.posix.basename(file);
56051
56082
  const objcSpec = providerObjC && file.startsWith(`${spec}/`);
@@ -56067,7 +56098,32 @@ async function collectTurboSources(options) {
56067
56098
  relative: file
56068
56099
  }
56069
56100
  );
56070
- else original(targetName, "ReactCodegen", generated, file);
56101
+ else {
56102
+ if (component && base === "ShadowNodes.cpp") {
56103
+ const defined = getDefinedComponentNames();
56104
+ if (defined.size) {
56105
+ const source = readPackageFile(
56106
+ generated,
56107
+ import_node_path85.default.join(generated, file),
56108
+ Infinity
56109
+ ).toString("utf8");
56110
+ const filtered = source.replace(
56111
+ /^[ \t]*(?:extern[ \t]+)?(?:const[ \t]+char|char[ \t]+const)[ \t]+(\w+ComponentName)[ \t]*\[[ \t]*\][ \t]*=[^;]*;[ \t]*\r?\n?/gm,
56112
+ (line, name3) => defined.has(name3) ? "" : line
56113
+ );
56114
+ if (filtered !== source) {
56115
+ if (!/\b(?:const\s+char|char\s+const)\s+\w+ComponentName\s*\[\s*\]\s*=/.test(
56116
+ filtered
56117
+ ))
56118
+ continue;
56119
+ const key2 = original(targetName, "ReactCodegen", generated, file);
56120
+ result.files[key2] = filtered;
56121
+ continue;
56122
+ }
56123
+ }
56124
+ }
56125
+ original(targetName, "ReactCodegen", generated, file);
56126
+ }
56071
56127
  }
56072
56128
  }
56073
56129
  for (const file of sources) original(targetName, label, root, file);
@@ -56128,7 +56184,7 @@ ${declared.map((symbol2) => `extern "C" void ${symbol2}();
56128
56184
  add(`${core}/include/PeachJsiRuntime.hpp`, TURBO_RUNTIME_HEADER);
56129
56185
  add(
56130
56186
  `${core}/${TURBO_CORE_PUBLIC_HEADERS}/${TURBO_ENTRY_HEADER}`,
56131
- '#pragma once\nextern "C" void peachTurboInitialize();\n'
56187
+ '#pragma once\nextern "C" void peachTurboInitialize();\n// the +1 Fabric component view a root of the process shows, in an app with one\nextern "C" void *peach_fabric_view_content(int tag);\n'
56132
56188
  );
56133
56189
  add(
56134
56190
  `${core}/${TURBO_CORE_PUBLIC_HEADERS}/module.modulemap`,
@@ -56254,6 +56310,21 @@ ${declared.map((symbol2) => `extern "C" void ${symbol2}();
56254
56310
  original(TURBO_CORE_TARGET, "ReactCodegen", generated, "RCTModuleProviders.h")
56255
56311
  );
56256
56312
  }
56313
+ const thirdParty = import_node_path85.default.join(generated, "RCTThirdPartyComponentsProvider.mm");
56314
+ if (fabricPackages.size > 0 && import_node_fs86.default.existsSync(thirdParty)) {
56315
+ for (const [, name3, className2, owner] of import_node_fs86.default.readFileSync(thirdParty, "utf8").matchAll(/@"([^"]+)": NSClassFromString\(@"([^"]+)"\), \/\/ (\S+)/g))
56316
+ if (fabricPackages.has(owner))
56317
+ fabricViews.push({ name: name3, className: className2 });
56318
+ }
56319
+ if (fabricViews.length > 0 && fabricTarget) {
56320
+ result.fabricComponents = fabricViews.map(({ name: name3 }) => name3);
56321
+ const unit2 = `${targetPath(fabricTarget.targetName)}/PeachFabricHost.mm`;
56322
+ add(unit2, fabricHostSource(fabricViews));
56323
+ scanText(
56324
+ { key: unit2, ...fabricTarget, relative: "PeachFabricHost.mm" },
56325
+ result.files[unit2]
56326
+ );
56327
+ }
56257
56328
  }
56258
56329
  if (fabric || legacyBridge) {
56259
56330
  if (legacyBridge) {
@@ -56597,38 +56668,6 @@ void dispatchToJSThread(dispatch_block_t block) {
56597
56668
  }
56598
56669
  } // namespace
56599
56670
 
56600
- static CGFloat peachScreenBrightness = 0.5;
56601
-
56602
- @implementation UIScreen (PeachTurboRuntime)
56603
- + (UIScreen *)mainScreen {
56604
- static UIScreen *screen = nil;
56605
- if (!screen) screen = [[UIScreen alloc] init];
56606
- return screen;
56607
- }
56608
- - (CGFloat)brightness {
56609
- return peachScreenBrightness;
56610
- }
56611
- - (void)setBrightness:(CGFloat)value {
56612
- peachScreenBrightness = value;
56613
- }
56614
- @end
56615
-
56616
- static BOOL peachIdleTimerDisabled = NO;
56617
-
56618
- @implementation UIApplication (PeachTurboRuntime)
56619
- + (UIApplication *)sharedApplication {
56620
- static UIApplication *app = nil;
56621
- if (!app) app = [[UIApplication alloc] init];
56622
- return app;
56623
- }
56624
- - (BOOL)isIdleTimerDisabled {
56625
- return peachIdleTimerDisabled;
56626
- }
56627
- - (void)setIdleTimerDisabled:(BOOL)disabled {
56628
- peachIdleTimerDisabled = disabled;
56629
- }
56630
- @end
56631
-
56632
56671
  // React Native's own modules register before any provider's, and RCTBridge.mm
56633
56672
  // creates the registry's queue in the first RCTRegisterModule. the engine
56634
56673
  // supplies those modules, so a process whose providers register none (codegen
@@ -56745,6 +56784,12 @@ ${moduleProviders ? `- (id<RCTModuleProvider>)getModuleProvider:(const char *)na
56745
56784
 
56746
56785
  @end
56747
56786
 
56787
+ // an app's Fabric component views, which its own Fabric host defines
56788
+ extern "C" void peachInstallFabricViews(facebook::jsi::Runtime &runtime) __attribute__((weak));
56789
+
56790
+ // UIKitCore: the key window and root view controller an app delegate makes at launch
56791
+ extern "C" void PeachLaunchReactNativeWindow(void);
56792
+
56748
56793
  extern "C" void peachTurboInitialize() {
56749
56794
  objc_create_block_classes_as_subclasses_of([NSObject class]);
56750
56795
  if (Class blockClass = NSClassFromString(@"_NSBlock")) {
@@ -56758,6 +56803,7 @@ extern "C" void peachTurboInitialize() {
56758
56803
  static_cast<uint32_t *>((__bridge void *)mainQueueClass)[4] &= ~2048u;
56759
56804
  *reinterpret_cast<void **>(&_dispatch_main_q) = (__bridge void *)mainQueueClass;
56760
56805
  }
56806
+ PeachLaunchReactNativeWindow();
56761
56807
  auto& runtime = peach::jsi_runtime::create(
56762
56808
  [] { invoker->drain(); },
56763
56809
  [] {
@@ -56818,6 +56864,7 @@ ${bridgeProxy ? ` // as RCTInstance does: the proxy modules reach as their brid
56818
56864
  }];
56819
56865
  [decorator.moduleRegistry setTurboModuleRegistry:manager];
56820
56866
  [manager installJSBindings:runtime];
56867
+ if (peachInstallFabricViews) peachInstallFabricViews(runtime);
56821
56868
  }
56822
56869
 
56823
56870
  // the screenshot the device took, as UIKit posts it to every observer in the
@@ -56863,7 +56910,129 @@ ${moduleProviders ? " [found addObjectsFromArray:RCTModuleProviders.moduleProvi
56863
56910
  }
56864
56911
  `;
56865
56912
  }
56866
- var import_node_child_process46, import_node_crypto44, import_node_fs86, import_node_path85, import_node_util14, execFileAsync3, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER3, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, versionParts, iosOf, JS_CALL_INVOKER;
56913
+ function fabricHostSource(views) {
56914
+ const entries = views.map(
56915
+ ({ name: name3, className: className2 }) => `@${JSON.stringify(name3)}: NSClassFromString(@${JSON.stringify(className2)})`
56916
+ ).join(", ");
56917
+ return `${FABRIC_HOST_INCLUDES}
56918
+ @interface PeachFabricComponents : NSObject <RCTComponentViewFactoryComponentProvider>
56919
+ @end
56920
+
56921
+ @implementation PeachFabricComponents
56922
+ - (NSDictionary<NSString *, Class<RCTComponentViewProtocol>> *)thirdPartyFabricComponents
56923
+ {
56924
+ return @{${entries}};
56925
+ }
56926
+ @end
56927
+
56928
+ namespace {
56929
+ struct PeachFabricView {
56930
+ react::ComponentHandle handle;
56931
+ const react::ComponentDescriptor *descriptor;
56932
+ react::Props::Shared props;
56933
+ react::LayoutMetrics layoutMetrics;
56934
+ };
56935
+ PeachFabricComponents *fabricComponents;
56936
+ RCTComponentViewRegistry *fabricRegistry;
56937
+ std::shared_ptr<const react::ContextContainer> fabricContext;
56938
+ react::ComponentDescriptorRegistry::Shared fabricDescriptors;
56939
+ std::unordered_map<int, PeachFabricView> fabricViews;
56940
+ int nextFabricView = 1;
56941
+ std::string fabricNames = ${JSON.stringify(views.map(({ name: name3 }) => name3).join("\n"))};
56942
+
56943
+ PeachFabricView &fabricView(int tag) {
56944
+ auto found = fabricViews.find(tag);
56945
+ if (found == fabricViews.end()) {
56946
+ std::fprintf(stderr, "no mounted Fabric view %d\\n", tag);
56947
+ std::abort();
56948
+ }
56949
+ return found->second;
56950
+ }
56951
+
56952
+ react::Props::Shared fabricCloneProps(jsi::Runtime &rt, const PeachFabricView &view, const jsi::Value &props) {
56953
+ react::PropsParserContext context{-1, *fabricContext};
56954
+ return view.descriptor->cloneProps(context, view.props, react::RawProps(rt, props));
56955
+ }
56956
+
56957
+ } // namespace
56958
+
56959
+ extern "C" void peachInstallFabricViews(jsi::Runtime &rt) {
56960
+ fabricComponents = [PeachFabricComponents new];
56961
+ RCTComponentViewFactory *factory = [RCTComponentViewFactory currentComponentViewFactory];
56962
+ factory.thirdPartyFabricComponentsProvider = fabricComponents;
56963
+ fabricRegistry = [RCTComponentViewRegistry new];
56964
+ fabricContext = std::make_shared<const react::ContextContainer>();
56965
+ react::ComponentDescriptorParameters parameters{{}, fabricContext, nullptr};
56966
+ fabricDescriptors = [factory createComponentDescriptorRegistryWithParameters:parameters];
56967
+ auto views = jsi::Object(rt);
56968
+ auto method = [&](const char *name, unsigned count, jsi::HostFunctionType body) {
56969
+ views.setProperty(rt, name, jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, name), count, std::move(body)));
56970
+ };
56971
+ // Create then Insert: the first props, no event emitter or state, and the
56972
+ // layout the view has before the engine measures it
56973
+ method("create", 2, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
56974
+ const auto &descriptor = fabricDescriptors->at(args[0].asString(rt).utf8(rt));
56975
+ int tag = nextFabricView++;
56976
+ auto &view = fabricViews.emplace(tag, PeachFabricView{descriptor.getComponentHandle(), &descriptor, nullptr, {}}).first->second;
56977
+ view.props = fabricCloneProps(rt, view, args[1]);
56978
+ UIView<RCTComponentViewProtocol> *componentView =
56979
+ [fabricRegistry dequeueComponentViewWithComponentHandle:view.handle tag:tag].view;
56980
+ [componentView updateProps:view.props oldProps:nullptr];
56981
+ [componentView updateEventEmitter:nullptr];
56982
+ [componentView updateState:nullptr oldState:nullptr];
56983
+ [componentView updateLayoutMetrics:view.layoutMetrics oldLayoutMetrics:react::EmptyLayoutMetrics];
56984
+ [componentView finalizeUpdates:RNComponentViewUpdateMaskAll];
56985
+ return jsi::Value(tag);
56986
+ });
56987
+ // Update with the props React changed since the last commit
56988
+ method("update", 2, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
56989
+ int tag = static_cast<int>(args[0].asNumber());
56990
+ auto &view = fabricView(tag);
56991
+ auto oldProps = view.props;
56992
+ view.props = fabricCloneProps(rt, view, args[1]);
56993
+ UIView<RCTComponentViewProtocol> *componentView = [fabricRegistry componentViewDescriptorWithTag:tag].view;
56994
+ [componentView updateProps:view.props oldProps:oldProps];
56995
+ [componentView finalizeUpdates:RNComponentViewUpdateMaskProps];
56996
+ return jsi::Value::undefined();
56997
+ });
56998
+ // Update with the size and scale the engine laid the view out at
56999
+ method("layout", 4, [](jsi::Runtime &, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
57000
+ int tag = static_cast<int>(args[0].asNumber());
57001
+ auto &view = fabricView(tag);
57002
+ auto metrics = view.layoutMetrics;
57003
+ metrics.frame = react::Rect{{0, 0}, {static_cast<react::Float>(args[1].asNumber()), static_cast<react::Float>(args[2].asNumber())}};
57004
+ metrics.pointScaleFactor = static_cast<react::Float>(args[3].asNumber());
57005
+ if (metrics == view.layoutMetrics) return jsi::Value::undefined();
57006
+ UIView<RCTComponentViewProtocol> *componentView = [fabricRegistry componentViewDescriptorWithTag:tag].view;
57007
+ [componentView updateLayoutMetrics:metrics oldLayoutMetrics:view.layoutMetrics];
57008
+ view.layoutMetrics = metrics;
57009
+ [componentView finalizeUpdates:RNComponentViewUpdateMaskLayoutMetrics];
57010
+ return jsi::Value::undefined();
57011
+ });
57012
+ // Remove then Delete: the registry recycles the view
57013
+ method("drop", 1, [](jsi::Runtime &, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
57014
+ int tag = static_cast<int>(args[0].asNumber());
57015
+ auto &view = fabricView(tag);
57016
+ RCTComponentViewDescriptor descriptor = [fabricRegistry componentViewDescriptorWithTag:tag];
57017
+ [descriptor.view removeFromSuperview];
57018
+ [fabricRegistry enqueueComponentViewWithComponentHandle:view.handle tag:tag componentViewDescriptor:descriptor];
57019
+ fabricViews.erase(tag);
57020
+ return jsi::Value::undefined();
57021
+ });
57022
+ rt.global().setProperty(rt, "peachFabricViews", std::move(views));
57023
+ }
57024
+
57025
+ extern "C" void *peach_fabric_view_content(int tag) {
57026
+ return (__bridge_retained void *)[fabricRegistry componentViewDescriptorWithTag:tag].view;
57027
+ }
57028
+
57029
+ // the component names the host registers as views, newline separated
57030
+ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const char *peachFabricComponentNames() {
57031
+ return fabricNames.c_str();
57032
+ }
57033
+ `;
57034
+ }
57035
+ var import_node_child_process46, import_node_crypto44, import_node_fs86, import_node_path85, import_node_util14, execFileAsync3, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER3, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_HOST_INCLUDES;
56867
57036
  var init_turbo_source = __esm({
56868
57037
  "src/turbo-source.ts"() {
56869
57038
  "use strict";
@@ -57026,6 +57195,22 @@ class JsCallInvoker final : public react::CallInvoker {
57026
57195
  std::deque<react::CallFunc> pending;
57027
57196
  };
57028
57197
 
57198
+ `;
57199
+ FABRIC_HOST_INCLUDES = `#import <Foundation/Foundation.h>
57200
+ #import <React/RCTComponentViewFactory.h>
57201
+ #import <React/RCTComponentViewProtocol.h>
57202
+ #import <React/RCTComponentViewRegistry.h>
57203
+ #include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
57204
+ #include <react/renderer/core/LayoutMetrics.h>
57205
+ #include <react/renderer/core/PropsParserContext.h>
57206
+ #include <react/renderer/core/RawProps.h>
57207
+ #include <react/utils/ContextContainer.h>
57208
+ #include <cstdio>
57209
+ #include <cstdlib>
57210
+ #include <unordered_map>
57211
+ #include <jsi/jsi.h>
57212
+
57213
+ using namespace facebook;
57029
57214
  `;
57030
57215
  }
57031
57216
  });
@@ -57355,7 +57540,7 @@ var init_react_native_core = __esm({
57355
57540
  init_swift_distribution();
57356
57541
  init_swift_package();
57357
57542
  init_swiftContract();
57358
- recipe = true ? "f30840269a1f4be9434de5fb0adcd21490990ef2b55e4f3e6c159fcb6752a29d" : reactNativeCoreDigest(__sootsim_import_meta_dirname);
57543
+ recipe = true ? "96416de7238919b274266f095ef4213211a2a26c133d0df7ab5e0459ded52ef1" : reactNativeCoreDigest(__sootsim_import_meta_dirname);
57359
57544
  strings3 = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
57360
57545
  building = /* @__PURE__ */ new Map();
57361
57546
  }
@@ -57412,7 +57597,7 @@ function collectTurboCompileInput(collection, runtime, iosDeploymentTarget, depe
57412
57597
  dependencyTargets = dependencyTargets.filter(
57413
57598
  (_, index) => !providerNames.has(parsedTargets[index].name)
57414
57599
  );
57415
- const swift = Object.keys(files2).some((file) => file.endsWith(".swift"));
57600
+ const swift = collection.coreMode === "turbo" || Object.keys(files2).some((file) => file.endsWith(".swift"));
57416
57601
  const entry = `Sources/PeachTurboApp/main.${swift ? "swift" : "cpp"}`;
57417
57602
  const targetNames = targets.map(({ name: name3 }) => name3);
57418
57603
  const loadTargetNames = new Set(collection.loads.map(({ target }) => target));
@@ -57421,10 +57606,56 @@ function collectTurboCompileInput(collection, runtime, iosDeploymentTarget, depe
57421
57606
  (file) => file.startsWith(`${target.path}/`) && file.endsWith(".swift")
57422
57607
  )
57423
57608
  ).map(({ name: name3 }) => name3);
57424
- files2[entry] = swift ? "@_spi(Peach) import PeachFoundation\n" + swiftImportedTargetNames.map((target) => `import ${target}
57425
- `).join("") + `PeachHostDriver.installExecutor()
57426
- ${collection.loads.map(({ symbol: symbol2 }) => `${symbol2}()
57427
- `).join("")}${runtime ? "peachTurboInitialize()\n" : ""}` : [
57609
+ const initialize = [
57610
+ "_PeachReactNativeWindow.launch()",
57611
+ ...collection.loads.map(({ symbol: symbol2 }) => `${symbol2}()`),
57612
+ ...runtime ? ["peachTurboInitialize()"] : []
57613
+ ];
57614
+ const fabric = collection.fabricComponents.length > 0;
57615
+ files2[entry] = swift ? [
57616
+ "import SwiftUI",
57617
+ "import UIKit",
57618
+ "import PeachJSON",
57619
+ ...swiftImportedTargetNames.map((target) => `import ${target}`),
57620
+ "",
57621
+ "@main struct PeachTurboApp: PeachPackage {",
57622
+ ` init() { ${initialize.join("; ")} }`,
57623
+ ...fabric ? [
57624
+ " func view(props: JSON) -> PeachTurboRoot { PeachTurboRoot(props: props) }",
57625
+ "}",
57626
+ "",
57627
+ "struct PeachTurboRoot: View {",
57628
+ " let fabric: Int32?",
57629
+ "",
57630
+ " init(props: JSON) {",
57631
+ ' guard case .object(let fields) = props, let field = fields.first(where: { $0.0 == "fabric" }), case .number(let tag) = field.1 else {',
57632
+ " fabric = nil",
57633
+ " return",
57634
+ " }",
57635
+ " fabric = Int32(tag)",
57636
+ " }",
57637
+ "",
57638
+ " var body: some View {",
57639
+ " if let fabric { PeachFabricComponent(tag: fabric) } else { _PeachReactNativeWindow() }",
57640
+ " }",
57641
+ "}",
57642
+ "",
57643
+ "struct PeachFabricComponent: UIViewRepresentable {",
57644
+ " let tag: Int32",
57645
+ "",
57646
+ " func makeUIView(context: Context) -> UIView {",
57647
+ ' guard let view = peach_fabric_view_content(tag) else { fatalError("Fabric view \\(tag) is not mounted") }',
57648
+ " return Unmanaged<UIView>.fromOpaque(view).takeRetainedValue()",
57649
+ " }",
57650
+ "",
57651
+ " func updateUIView(_ view: UIView, context: Context) {}",
57652
+ "}"
57653
+ ] : [
57654
+ " func view(props: JSON) -> _PeachReactNativeWindow { _PeachReactNativeWindow() }",
57655
+ "}"
57656
+ ],
57657
+ ""
57658
+ ].join("\n") : [
57428
57659
  'extern "C" void peachTurboInitialize();',
57429
57660
  ...collection.loads.map(({ symbol: symbol2 }) => `extern "C" void ${symbol2}();`),
57430
57661
  "int main(int argc, char **argv) {",
@@ -58398,7 +58629,7 @@ var init_nitro_superset = __esm({
58398
58629
  init_nitroContract();
58399
58630
  init_swift_standin_digest();
58400
58631
  NITRO_SUPERSET_ENTRY_NAME = "superset";
58401
- NITRO_COMPILER_DIGEST = true ? "9393367a8c7442a5ce3f6e81f9ff408f0afdbf5eeadaeed359561a348a6b1818" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
58632
+ NITRO_COMPILER_DIGEST = true ? "3f4226b3727dae50227ba7f4fd8d517c59939e4f4d2f56ef11e1dafd09705f5c" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
58402
58633
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
58403
58634
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
58404
58635
  published = /* @__PURE__ */ new Map();
@@ -59190,7 +59421,7 @@ async function expoDiscoveryKey(options) {
59190
59421
  const key2 = (0, import_node_crypto50.createHash)("sha256").update(`${peachPin()}\0${hash}\0`).update(`${stable2(JSON.parse(options.searchText))}\0`).update(`${stable2(options.configuration)}\0`).update(stable2(JSON.parse(options.resolveText))).digest("hex");
59191
59422
  return { key: key2, root };
59192
59423
  }
59193
- function sharedDir() {
59424
+ function expoDiscoveryCacheDir() {
59194
59425
  return import_node_path94.default.join(sharedCacheDir(import_node_path94.default.join(ambientHomeDir(), "cache")), "expo-discovery");
59195
59426
  }
59196
59427
  function vanished2(error) {
@@ -59227,7 +59458,7 @@ function isStoredUnit(value) {
59227
59458
  }
59228
59459
  function readExpoDiscovery(key2) {
59229
59460
  let parsed;
59230
- const record3 = import_node_path94.default.join(sharedDir(), `${key2}.json`);
59461
+ const record3 = import_node_path94.default.join(expoDiscoveryCacheDir(), `${key2}.json`);
59231
59462
  try {
59232
59463
  parsed = JSON.parse(import_node_fs96.default.readFileSync(record3, "utf8"));
59233
59464
  } catch {
@@ -59256,7 +59487,7 @@ function readExpoDiscovery(key2) {
59256
59487
  const read = (digest4) => {
59257
59488
  const known = blobs.get(digest4);
59258
59489
  if (known !== void 0) return known;
59259
- const blob = import_node_path94.default.join(sharedDir(), "blobs", digest4);
59490
+ const blob = import_node_path94.default.join(expoDiscoveryCacheDir(), "blobs", digest4);
59260
59491
  const body = import_node_fs96.default.readFileSync(blob, "utf8");
59261
59492
  if ((0, import_node_crypto50.createHash)("sha256").update(body).digest("hex") !== digest4)
59262
59493
  throw new Error("discovery blob differs from its digest");
@@ -59300,7 +59531,7 @@ function readExpoDiscovery(key2) {
59300
59531
  }
59301
59532
  }
59302
59533
  function fileHashesPath() {
59303
- return import_node_path94.default.join(sharedDir(), "framework-file-hashes.json");
59534
+ return import_node_path94.default.join(expoDiscoveryCacheDir(), "framework-file-hashes.json");
59304
59535
  }
59305
59536
  function stampedFileHash(file) {
59306
59537
  if (!fileHashesLoaded) {
@@ -59478,7 +59709,7 @@ function rewritePreparedPaths(options) {
59478
59709
  frameworkDependencies[sourceDir] = sourceDigest;
59479
59710
  let portableDir = sourceDir;
59480
59711
  if (preparedDigest !== sourceDigest) {
59481
- const parent = import_node_path94.default.join(sharedDir(), "frameworks", preparedDigest);
59712
+ const parent = import_node_path94.default.join(expoDiscoveryCacheDir(), "frameworks", preparedDigest);
59482
59713
  portableDir = import_node_path94.default.join(parent, import_node_path94.default.basename(dir));
59483
59714
  if (!import_node_fs96.default.existsSync(portableDir)) {
59484
59715
  import_node_fs96.default.mkdirSync(parent, { recursive: true });
@@ -59509,7 +59740,7 @@ function rewritePreparedPaths(options) {
59509
59740
  }
59510
59741
  function writeExpoDiscovery(options) {
59511
59742
  try {
59512
- const dir = sharedDir();
59743
+ const dir = expoDiscoveryCacheDir();
59513
59744
  import_node_fs96.default.mkdirSync(dir, { recursive: true });
59514
59745
  const tmp = import_node_path94.default.join(dir, `.${options.key}.${process.pid}.${(0, import_node_crypto50.randomUUID)()}.tmp`);
59515
59746
  if (options.units === null) {
@@ -59657,7 +59888,7 @@ var init_expo_native_compiler_digest = __esm({
59657
59888
 
59658
59889
  // src/expo-native-prebuilt.ts
59659
59890
  function expoNativeCompilerDigestValue() {
59660
- return true ? "14d88f98100ab2aa1697716b744e5a82c52ac4b234218a17662b547201295088" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
59891
+ return true ? "064dc6aa590b7937e7499edee9ff07b0ef387a59a35ed48a2d820ab27209917a" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
59661
59892
  }
59662
59893
  function readSources(value) {
59663
59894
  const sources = isRecord(value) ? value.sources : null;
@@ -60582,7 +60813,9 @@ function installSwiftInputTrace() {
60582
60813
  import_node_path97.default.join(swiftCacheDir(), "swift-builds"),
60583
60814
  import_node_path97.default.join(swiftCacheDir(), "swift-sdk-views"),
60584
60815
  swiftRootLocksDir(),
60585
- import_node_path97.default.join(cacheDir(), "swift-tmp")
60816
+ import_node_path97.default.join(cacheDir(), "swift-tmp"),
60817
+ // content-addressed records whose reads renew their timestamps for expiry.
60818
+ expoDiscoveryCacheDir()
60586
60819
  ].filter((prefix, index, all) => all.indexOf(prefix) === index);
60587
60820
  ignoredRoots = prefixes.flatMap((root) => {
60588
60821
  try {
@@ -60688,11 +60921,13 @@ async function witnessMatches(witness) {
60688
60921
  return true;
60689
60922
  }
60690
60923
  async function discoveryKey(root, installedWorkspace, prepareNative, iosTarget, moduleRoot) {
60691
- const [config, expoConfig] = await Promise.all([
60924
+ const preparesWorkspace = prepareNative && !installedWorkspace && nativeWorkspaceAvailable();
60925
+ const [config, expoConfig, workspace] = await Promise.all([
60692
60926
  loadRNXAppConfig(resolveAppProject(root)),
60693
- readExpoConfigAsync(root)
60927
+ readExpoConfigAsync(root),
60928
+ preparesWorkspace ? traceStore.exit(() => hashExpoWorkspace(root)) : null
60694
60929
  ]);
60695
- return `${import_node_fs99.default.realpathSync(root)}\0${installedWorkspace ?? ""}\0${iosTarget ?? ""}\0${moduleRoot ?? ""}\0${prepareNative ? "1" : "0"}\0${JSON.stringify(config)}\0${JSON.stringify(expoConfig)}`;
60930
+ return `${import_node_fs99.default.realpathSync(root)}\0${installedWorkspace ?? ""}\0${iosTarget ?? ""}\0${moduleRoot ?? ""}\0${prepareNative ? "1" : "0"}\0${JSON.stringify(config)}\0${JSON.stringify(expoConfig)}\0${workspace?.hash ?? ""}`;
60696
60931
  }
60697
60932
  function cloneNativeTarget(target) {
60698
60933
  return {
@@ -61975,7 +62210,11 @@ function expoEntry(units, oneSDK = false) {
61975
62210
  (unit2) => Object.keys(unit2.files).some((file) => file.startsWith(`Sources/${namespace}/`))
61976
62211
  )
61977
62212
  );
61978
- const bridgeModules = units.flatMap((unit2) => unit2.bridgeModules);
62213
+ const bridgeModules = units.flatMap(
62214
+ (unit2) => unit2.bridgeModules.map(
62215
+ (registration) => registration === `${unit2.namespace}.__peachReactModule_${unit2.namespace}()` ? registration.slice(unit2.namespace.length + 1) : registration
62216
+ )
62217
+ );
61979
62218
  const subscribers = units.flatMap((unit2) => unit2.appDelegateSubscribers);
61980
62219
  const handlers = units.flatMap((unit2) => unit2.reactDelegateHandlers);
61981
62220
  const delegates = subscribers.length + handlers.length > 0 ? `; PeachExpoRuntime.registerDelegates(subscribers: [${subscribers.join(", ")}], handlers: [${handlers.join(", ")}])` : "";
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2300 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2301 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2300 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2301 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/capture-contract.ts
4
4
  var RNX_SCREEN_CAPTURE_VERSION = 1;