peachsim 0.1.1964 → 0.1.1966

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 (85) 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/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +1 -1
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +1 -1
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +1 -1
  13. package/dist-lib/bundle-channel.cjs +162 -31
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +1 -1
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +1 -1
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +1 -1
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +1 -1
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +1 -1
  24. package/dist-lib/detox/index.cjs +1 -1
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/expo-swift-bundle.cjs +160 -30
  27. package/dist-lib/expo-swift-metadata.cjs +1 -1
  28. package/dist-lib/expo-swift-metadata.mjs +1 -1
  29. package/dist-lib/home-paths.cjs +1 -1
  30. package/dist-lib/host/bridge-host.cjs +161 -31
  31. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  32. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  34. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  35. package/dist-lib/host/websocket-proxy.cjs +1 -1
  36. package/dist-lib/index.cjs +2 -2
  37. package/dist-lib/jump-to-source-babel.cjs +1 -1
  38. package/dist-lib/jump-to-source-native.cjs +1 -1
  39. package/dist-lib/kotlin-host.cjs +1 -1
  40. package/dist-lib/menu.cjs +1 -1
  41. package/dist-lib/menu.mjs +1 -1
  42. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  44. package/dist-lib/metro-production-bundle.cjs +1 -1
  45. package/dist-lib/metro-production-bundle.mjs +1 -1
  46. package/dist-lib/metro.cjs +2 -2
  47. package/dist-lib/native-app-identity-project.cjs +2 -2
  48. package/dist-lib/native-app-identity-project.mjs +2 -2
  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/pdfium-raster.cjs +1 -1
  54. package/dist-lib/pdfium-raster.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/public-origins-lib-esm.json +24 -24
  60. package/dist-lib/public-origins-lib.json +53 -53
  61. package/dist-lib/react-native-host-modules.cjs +1 -1
  62. package/dist-lib/react-native-host-modules.mjs +1 -1
  63. package/dist-lib/reap-browser.cjs +1 -1
  64. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  65. package/dist-lib/sdk.cjs +1 -1
  66. package/dist-lib/sdk.mjs +1 -1
  67. package/dist-lib/skills.cjs +162 -31
  68. package/dist-lib/swift-compile.cjs +2 -2
  69. package/dist-lib/swift-compile.mjs +2 -2
  70. package/dist-lib/swift-package.cjs +1 -1
  71. package/dist-lib/swift-package.mjs +1 -1
  72. package/dist-lib/swift-submit.cjs +1 -1
  73. package/dist-lib/swift-submit.mjs +1 -1
  74. package/dist-lib/swift-toolchain.cjs +1 -1
  75. package/dist-lib/swift.cjs +1 -1
  76. package/dist-lib/vite-swift.cjs +159 -29
  77. package/dist-lib/vite.cjs +1 -1
  78. package/dist-lib/worklet-executable.cjs +1 -1
  79. package/dist-lib/worklet-executable.mjs +1 -1
  80. package/dist-types/packages/peach-compat/src/stubs/screen-transition-math.d.ts +15 -1
  81. package/package.json +1 -1
  82. package/src/swift-objc-standin.ts +7 -1
  83. package/src/swift-packages.ts +13 -1
  84. package/src/swift-standin-emit.ts +16 -3
  85. package/src/swift-standins.ts +145 -18
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1964 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1966 | (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;
@@ -6221,7 +6221,12 @@ function splitTopLevel(text5, separator) {
6221
6221
  function emitSwiftStandin(sourceGraphs, options) {
6222
6222
  const imported = new Set(options.imports);
6223
6223
  const importedTypeModules = options.importedTypeModules ?? /* @__PURE__ */ new Map();
6224
- const graphs = sourceGraphs.map(
6224
+ const ownIds = new Set(
6225
+ sourceGraphs.flatMap(
6226
+ (graph) => graph.symbols.map((symbol2) => symbol2.identifier.precise)
6227
+ )
6228
+ );
6229
+ const graphs = [...sourceGraphs, ...options.dependencyGraphs ?? []].map(
6225
6230
  (graph) => qualifyImportedTypes(graph, imported, importedTypeModules)
6226
6231
  );
6227
6232
  const nativeObjcProtocols = objcProtocolsInSwiftSignatures(graphs);
@@ -6805,7 +6810,8 @@ function emitSwiftStandin(sourceGraphs, options) {
6805
6810
  )
6806
6811
  ].filter((name3, at, all2) => all2.indexOf(name3) === at);
6807
6812
  const parentSymbol = superId.has(id) ? byId.get(superId.get(id)) : void 0;
6808
- if (!parentSymbol) list2.push(standinMarker);
6813
+ if (!parentSymbol || !ownIds.has(parentSymbol.identifier.precise))
6814
+ list2.push(standinMarker);
6809
6815
  const open = symbol2.accessLevel === "open" && (!parentSymbol || parentSymbol.accessLevel === "open");
6810
6816
  const objcName = /^c:objc\(cs\)(\w+)$/.exec(id)?.[1];
6811
6817
  emit(
@@ -7155,7 +7161,9 @@ function emitSwiftStandin(sourceGraphs, options) {
7155
7161
  return match ? [`${match[1]}|${LEADING_ATTRS.exec(text(symbol2))[2]}`] : [];
7156
7162
  })
7157
7163
  );
7158
- const roots = [...byId.values()].filter((symbol2) => !owner.has(symbol2.identifier.precise) && !unavailable(symbol2)).filter((symbol2) => {
7164
+ const roots = [...byId.values()].filter(
7165
+ (symbol2) => ownIds.has(symbol2.identifier.precise) && !owner.has(symbol2.identifier.precise) && !unavailable(symbol2)
7166
+ ).filter((symbol2) => {
7159
7167
  const name3 = /^c:@M@[^@]+@F@([^@]+)$/.exec(symbol2.identifier.precise)?.[1];
7160
7168
  return !name3 || !cExports.has(`${name3}|${text(symbol2)}`);
7161
7169
  }).sort((a, b) => pathOf(a).localeCompare(pathOf(b)));
@@ -7167,6 +7175,7 @@ function emitSwiftStandin(sourceGraphs, options) {
7167
7175
  for (const [name3, members2] of [...external].sort(([a], [b]) => a.localeCompare(b))) {
7168
7176
  const seen = /* @__PURE__ */ new Set();
7169
7177
  const kept = members2.filter((member) => {
7178
+ if (!ownIds.has(member.identifier.precise)) return false;
7170
7179
  const key2 = `${member.kind.identifier}|${text(member)}`;
7171
7180
  if (unavailable(member) || seen.has(key2)) return false;
7172
7181
  seen.add(key2);
@@ -7608,7 +7617,10 @@ function objcView(surface, toolchainBin, stdlib, cacheDir5, work, original, vend
7608
7617
  if (name3.endsWith(".swiftinterface"))
7609
7618
  import_node_fs7.default.writeFileSync(
7610
7619
  import_node_path7.default.join(to, name3),
7611
- import_node_fs7.default.readFileSync(import_node_path7.default.join(from, name3), "utf8").replace(/\bCoreFoundation\.(?=CG)/g, "CoreGraphics.").replace(/\bCoreFoundation\.(?=\w)/g, "Foundation.")
7620
+ import_node_fs7.default.readFileSync(import_node_path7.default.join(from, name3), "utf8").replace(/\bCoreFoundation\.(?=CG)/g, "CoreGraphics.").replace(/\bCoreFoundation\.(?=\w)/g, "Foundation.").replace(
7621
+ /\bFoundation\.Data\.(?=Base64(?:En|De)codingOptions\b)/g,
7622
+ "Foundation.NSData."
7623
+ )
7612
7624
  );
7613
7625
  }
7614
7626
  } else {
@@ -16701,7 +16713,7 @@ var darwinRecordsRegion = (quoted) => quoted.length ? ["-Wl,--start-lib", ...quo
16701
16713
  var REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
16702
16714
  var MULTI_MANIFEST_VERSION = 66;
16703
16715
  var SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
16704
- var compilerSourceDigest = true ? "777d4db5d7a8d74f3fc33c50d60c04b62ad2fdce4bce2e2eec8c4e358d61ce92" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
16716
+ var compilerSourceDigest = true ? "43445ac597f2b7673127e43186400d0f6863caf82dafb48c31ce3b516719ce13" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
16705
16717
  function swiftArtifactHash(input, release, moduleRoot) {
16706
16718
  const hash = (0, import_node_crypto13.createHash)("sha256");
16707
16719
  hash.update(`swift-compile
@@ -29311,6 +29323,11 @@ function resolveSwiftPackages(options) {
29311
29323
  if (claimed.has(key2)) return true;
29312
29324
  const target = pkg.manifest.targets.get(name3);
29313
29325
  if (!target || target.type !== "regular" || placeholderPackage(pkg)) return false;
29326
+ const files2 = swiftTargetFiles(pkg.manifest, target);
29327
+ if (files2.every(
29328
+ (file) => file.endsWith(".swift") && import_node_fs38.default.readFileSync(file, "utf8").trim() === ""
29329
+ ))
29330
+ return false;
29314
29331
  claimed.add(key2);
29315
29332
  provided.delete(name3);
29316
29333
  for (const dependency of target.dependencies) {
@@ -29418,7 +29435,7 @@ function resolveSwiftPackages(options) {
29418
29435
  if (provided.has(name3) && placeholderPackage(pkg)) return;
29419
29436
  for (const dependency of pkg.manifest.targets.get(name3)?.dependencies ?? []) {
29420
29437
  if (dependency.kind === "target") visit(pkg, dependency.name);
29421
- else {
29438
+ else if (!provided.has(dependency.name)) {
29422
29439
  const nested = dependencyPackage(pkg, dependency);
29423
29440
  if (nested && typeof nested !== "string")
29424
29441
  for (const root of nested.manifest.products.get(dependency.name)?.targets ?? [])
@@ -29427,6 +29444,7 @@ function resolveSwiftPackages(options) {
29427
29444
  }
29428
29445
  };
29429
29446
  for (const { product, source } of listed) {
29447
+ if (provided.has(product)) continue;
29430
29448
  const pkg = source.kind === "unnamed" ? unnamed(source, product) : packages.get(sourceKey(source));
29431
29449
  if (!pkg || typeof pkg === "string") continue;
29432
29450
  for (const root of pkg.manifest.products.get(product)?.targets ?? [])
@@ -29649,7 +29667,7 @@ function sourceClosureDigest(srcDir, entrypoints) {
29649
29667
  return hash.digest("hex");
29650
29668
  }
29651
29669
  var standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
29652
- var STANDIN_SOURCE_DIGEST = true ? "2c1ec9d203fa5a2da70c4346e1574b582e71d72dbd796d40431f29c4e3aeabad" : standinSourceDigest();
29670
+ var STANDIN_SOURCE_DIGEST = true ? "05087ee542759092b4dbe08e7a7c0a03416fa45a27f3c2e9b633d6d5ce98186a" : standinSourceDigest();
29653
29671
 
29654
29672
  // src/swift-standins.ts
29655
29673
  init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
@@ -30533,11 +30551,11 @@ ${uikit}${body}`
30533
30551
  function binaryHeaderSearchPaths(binary, root, declaredFrameworks) {
30534
30552
  const artifact = xcframework(binary);
30535
30553
  const slice = simulatorSlice(artifact.dir);
30536
- const found = surfaces(artifact.dir, slice);
30554
+ const found = surfaces(artifact.dir, binary.target, slice);
30537
30555
  const frameworks = [
30538
30556
  ...new Set(
30539
30557
  found.flatMap(
30540
- (surface) => "modulemap" in surface && import_node_path47.default.basename(import_node_path47.default.dirname(surface.modulemap)) === "Modules" ? [import_node_path47.default.dirname(import_node_path47.default.dirname(surface.modulemap))] : []
30558
+ (surface) => "modulemap" in surface && import_node_path47.default.basename(import_node_path47.default.dirname(surface.modulemap)) === "Modules" ? [import_node_path47.default.dirname(surface.headers)] : []
30541
30559
  )
30542
30560
  )
30543
30561
  ];
@@ -30602,8 +30620,21 @@ function binaryHeaderSearchPaths(binary, root, declaredFrameworks) {
30602
30620
  import_node_path47.default.join(pending, "frameworks", import_node_path47.default.basename(framework), part),
30603
30621
  { recursive: true, dereference: true }
30604
30622
  );
30623
+ const surface = found.find(
30624
+ (item) => "headers" in item && import_node_path47.default.dirname(item.headers) === framework
30625
+ );
30626
+ if (surface && "modulemap" in surface) {
30627
+ const modules = import_node_path47.default.join(
30628
+ pending,
30629
+ "frameworks",
30630
+ import_node_path47.default.basename(framework),
30631
+ "Modules"
30632
+ );
30633
+ import_node_fs45.default.mkdirSync(modules, { recursive: true });
30634
+ import_node_fs45.default.copyFileSync(surface.modulemap, import_node_path47.default.join(modules, "module.modulemap"));
30635
+ }
30605
30636
  }
30606
- for (const [index, directory] of headers.entries())
30637
+ for (const [index, directory] of headers.entries()) {
30607
30638
  import_node_fs45.default.cpSync(directory, import_node_path47.default.join(pending, "headers", String(index)), {
30608
30639
  recursive: true,
30609
30640
  dereference: true,
@@ -30611,6 +30642,15 @@ function binaryHeaderSearchPaths(binary, root, declaredFrameworks) {
30611
30642
  filter: (source) => import_node_fs45.default.statSync(source).isDirectory() ? import_node_path47.default.dirname(source) !== directory || !import_node_path47.default.basename(source).startsWith("ios-") : !isBinaryLibraryFile(source)
30612
30643
  } : {}
30613
30644
  });
30645
+ const surface = found.find(
30646
+ (item) => "headers" in item && item.headers === directory
30647
+ );
30648
+ if (surface && "modulemap" in surface)
30649
+ import_node_fs45.default.copyFileSync(
30650
+ surface.modulemap,
30651
+ import_node_path47.default.join(pending, "headers", String(index), "module.modulemap")
30652
+ );
30653
+ }
30614
30654
  const contents = (0, import_node_crypto24.createHash)("sha256");
30615
30655
  for (const relative2 of import_node_fs45.default.readdirSync(pending, { recursive: true, encoding: "utf8" }).sort()) {
30616
30656
  const file = import_node_path47.default.join(pending, relative2);
@@ -30666,7 +30706,7 @@ function simulatorSlice(xcframeworkDir) {
30666
30706
  const slice = import_node_fs45.default.readdirSync(xcframeworkDir).filter((name3) => /^ios-.+-simulator$/.test(name3)).sort()[0];
30667
30707
  return slice ? import_node_path47.default.join(xcframeworkDir, slice) : null;
30668
30708
  }
30669
- function surfaces(xcframeworkDir, slice = simulatorSlice(xcframeworkDir)) {
30709
+ function surfaces(xcframeworkDir, target, slice = simulatorSlice(xcframeworkDir)) {
30670
30710
  const standaloneMap = import_node_path47.default.join(xcframeworkDir, "module.modulemap");
30671
30711
  if (import_node_fs45.default.existsSync(standaloneMap)) {
30672
30712
  const module2 = moduleMapName(import_node_fs45.default.readFileSync(standaloneMap, "utf8"));
@@ -30687,7 +30727,16 @@ function surfaces(xcframeworkDir, slice = simulatorSlice(xcframeworkDir)) {
30687
30727
  (name3) => name3.endsWith(".swiftinterface") && !name3.endsWith(".private.swiftinterface") && !name3.endsWith(".package.swiftinterface")
30688
30728
  );
30689
30729
  const chosen = interfaces.find((name3) => name3.startsWith("arm64-")) ?? interfaces[0] ?? null;
30690
- const modulemap = import_node_path47.default.join(framework, "Modules", "module.modulemap");
30730
+ let modulemap = import_node_path47.default.join(framework, "Modules", "module.modulemap");
30731
+ const headers2 = import_node_path47.default.join(framework, "Headers");
30732
+ if (!import_node_fs45.default.existsSync(modulemap) && files(headers2, (name3) => name3.endsWith(".h")).length) {
30733
+ const umbrella = import_node_fs45.default.existsSync(import_node_path47.default.join(headers2, `${module2}.h`)) ? `umbrella header "${module2}.h"` : 'umbrella "Headers"';
30734
+ modulemap = generatedModuleMap(
30735
+ `framework module ${module2} { ${umbrella} export * module * { export * } }
30736
+ `,
30737
+ true
30738
+ );
30739
+ }
30691
30740
  if (chosen) {
30692
30741
  const privateInterface = import_node_path47.default.join(
30693
30742
  swiftmodule,
@@ -30719,8 +30768,33 @@ function surfaces(xcframeworkDir, slice = simulatorSlice(xcframeworkDir)) {
30719
30768
  const module2 = moduleMapName(import_node_fs45.default.readFileSync(modulemap, "utf8"));
30720
30769
  if (module2) found.push(headerSurface(module2, modulemap, import_node_path47.default.dirname(modulemap)));
30721
30770
  }
30771
+ if (found.length === 0 && files(headers, (name3) => name3.endsWith(".h")).length) {
30772
+ const module2 = swiftTargetModuleName(target);
30773
+ const modulemap = generatedModuleMap(
30774
+ `module ${module2} { umbrella "." export * }
30775
+ `,
30776
+ false
30777
+ );
30778
+ found.push(headerSurface(module2, modulemap, headers));
30779
+ }
30722
30780
  return found;
30723
30781
  }
30782
+ function generatedModuleMap(text5, framework) {
30783
+ const dir = import_node_path47.default.join(
30784
+ cacheDir4,
30785
+ "modulemaps",
30786
+ key(text5),
30787
+ framework ? "Modules" : "Headers"
30788
+ );
30789
+ import_node_fs45.default.mkdirSync(dir, { recursive: true });
30790
+ const file = import_node_path47.default.join(dir, "module.modulemap");
30791
+ if (!import_node_fs45.default.existsSync(file)) {
30792
+ const pending = `${file}.${process.pid}.tmp`;
30793
+ import_node_fs45.default.writeFileSync(pending, text5);
30794
+ import_node_fs45.default.renameSync(pending, file);
30795
+ }
30796
+ return file;
30797
+ }
30724
30798
  function peachModuleDirs(toolchain, imports2, sdkIncludes) {
30725
30799
  const { moduleRoot, toolchainBin } = toolchain;
30726
30800
  if (swiftDistributionAt(moduleRoot)) return [import_node_path47.default.join(moduleRoot, "modules")];
@@ -31144,18 +31218,39 @@ function wasmFlags(toolchain, imports2) {
31144
31218
  ...toolchain.standinModules ? ["-I", toolchain.standinModules] : []
31145
31219
  ];
31146
31220
  }
31147
- function objcStandin(surface, binary, toolchain, work, behavior) {
31221
+ function objcStandin(surface, binary, toolchain, work, behavior, frameworks, siblings) {
31148
31222
  const view = objcView(
31149
31223
  surface,
31150
31224
  toolchain.toolchainBin,
31151
31225
  import_node_path47.default.join(toolchain.moduleRoot, "ios-simulator-stdlib"),
31152
31226
  cacheDir4,
31153
- import_node_path47.default.join(work, "objc")
31227
+ import_node_path47.default.join(work, "objc"),
31228
+ void 0,
31229
+ frameworks.dirs
31154
31230
  );
31155
31231
  const provided = new Set(swiftPeachModules(toolchain.moduleRoot));
31156
31232
  const headerModules = view.imports.filter(
31157
- (name3) => !STANDIN_IMPORTS.includes(name3) && provided.has(name3)
31233
+ (name3) => !STANDIN_IMPORTS.includes(name3) && (provided.has(name3) || siblings.has(name3))
31158
31234
  );
31235
+ const dependencyGraphs = headerModules.flatMap((module2) => {
31236
+ const dependency = frameworks.surfaces.get(module2);
31237
+ if (!dependency || module2 === surface.module) return [];
31238
+ return objcView(
31239
+ {
31240
+ module: dependency.module,
31241
+ modulemap: dependency.modulemap,
31242
+ headers: dependency.headers
31243
+ },
31244
+ toolchain.toolchainBin,
31245
+ import_node_path47.default.join(toolchain.moduleRoot, "ios-simulator-stdlib"),
31246
+ cacheDir4,
31247
+ import_node_path47.default.join(work, "dependencies", module2),
31248
+ void 0,
31249
+ frameworks.dirs.filter(
31250
+ (dir) => !import_node_fs45.default.existsSync(import_node_path47.default.join(dir, `${module2}.framework`))
31251
+ )
31252
+ ).graphs;
31253
+ });
31159
31254
  return graphStandin(
31160
31255
  surface.module,
31161
31256
  view.graphs,
@@ -31172,12 +31267,18 @@ function objcStandin(surface, binary, toolchain, work, behavior) {
31172
31267
  (dependency) => swiftTargetModuleName(dependency.module)
31173
31268
  ) ?? []
31174
31269
  ])
31175
- ]
31270
+ ],
31271
+ false,
31272
+ /* @__PURE__ */ new Map(),
31273
+ null,
31274
+ /* @__PURE__ */ new Map(),
31275
+ /* @__PURE__ */ new Map(),
31276
+ dependencyGraphs
31176
31277
  );
31177
31278
  }
31178
31279
  var OBJC_UNREPRESENTABLE = "cannot be marked '@objc' because its type cannot be represented in Objective-C";
31179
31280
  var INERT_VALUE = /missing argument|cannot be constructed|has no member 'init'|no exact matches in call to initializer|cannot convert return expression|does not conform to '|extra argument|takes no arguments|could not be inferred|cannot infer/;
31180
- function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, behavior, imports2 = [], requireSwift = false, objcProperties = /* @__PURE__ */ new Map(), placeholder = null, inheritedConformances = /* @__PURE__ */ new Map(), projections = /* @__PURE__ */ new Map()) {
31281
+ function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, behavior, imports2 = [], requireSwift = false, objcProperties = /* @__PURE__ */ new Map(), placeholder = null, inheritedConformances = /* @__PURE__ */ new Map(), projections = /* @__PURE__ */ new Map(), dependencyGraphs = []) {
31181
31282
  const paths = new Set(
31182
31283
  graphs.flatMap(
31183
31284
  (graph) => graph.symbols.map((symbol2) => symbol2.pathComponents.join("."))
@@ -31233,6 +31334,7 @@ function graphStandin(module2, graphs, values, wasm, binary, toolchain, work, be
31233
31334
  objcProperties,
31234
31335
  inheritedConformances,
31235
31336
  projections,
31337
+ dependencyGraphs,
31236
31338
  ...placeholder ? { exported: placeholder.exported, placeholder: binary.placeholder.gap } : {}
31237
31339
  });
31238
31340
  for (const entry of skipped) {
@@ -31909,6 +32011,11 @@ async function sourceStandins(binaries, toolchain, provided, behavior) {
31909
32011
  }))
31910
32012
  });
31911
32013
  } else {
32014
+ const absent = missingArtifactGap(binary);
32015
+ if (absent !== null) {
32016
+ gaps.set(binary.target, absent);
32017
+ continue;
32018
+ }
31912
32019
  const resolved = xcframework(binary);
31913
32020
  const dir = import_node_path47.default.join(artifact, String(index), import_node_path47.default.basename(resolved.dir));
31914
32021
  import_node_fs45.default.cpSync(resolved.dir, dir, { recursive: true, dereference: true });
@@ -32045,7 +32152,9 @@ function standinGenerationInputs(binaries, toolchain, behavior = {}, sourceDir)
32045
32152
  const modules = new Set(
32046
32153
  binaries.flatMap((binary) => {
32047
32154
  try {
32048
- return binary.publicHeaders !== void 0 || binary.placeholder !== void 0 ? [swiftTargetModuleName(binary.target)] : surfaces(xcframework(binary).dir).map((surface) => surface.module);
32155
+ return binary.publicHeaders !== void 0 || binary.placeholder !== void 0 ? [swiftTargetModuleName(binary.target)] : surfaces(xcframework(binary).dir, binary.target).map(
32156
+ (surface) => surface.module
32157
+ );
32049
32158
  } catch {
32050
32159
  return [];
32051
32160
  }
@@ -32078,7 +32187,9 @@ function standinGenerationInputs(binaries, toolchain, behavior = {}, sourceDir)
32078
32187
  if (binary.publicHeaders !== void 0 && swiftTargetModuleName(binary.target) !== binary.target)
32079
32188
  parts.push(`module/${swiftTargetModuleName(binary.target)}`);
32080
32189
  try {
32081
- if (binary.publicHeaders === void 0 && surfaces(xcframework(binary).dir).some((surface) => surface.kind === "swift"))
32190
+ if (binary.publicHeaders === void 0 && surfaces(xcframework(binary).dir, binary.target).some(
32191
+ (surface) => surface.kind === "swift"
32192
+ ))
32082
32193
  parts.push(`interface-emulation/${WASI_EMULATION.join(",")}`);
32083
32194
  parts.push(
32084
32195
  binary.target,
@@ -32106,10 +32217,14 @@ function standinGenerationInputs(binaries, toolchain, behavior = {}, sourceDir)
32106
32217
  }
32107
32218
  return (0, import_node_crypto24.createHash)("sha256").update(parts.join("\0")).digest("hex");
32108
32219
  }
32220
+ function missingArtifactGap(binary) {
32221
+ if (swiftBinaryOnDisk(binary)) return null;
32222
+ return `${import_node_path47.default.relative(process.cwd(), binary.dir) || binary.dir} is not on disk, and Xcode fails without it too; run the script that downloads or builds it, then run again`;
32223
+ }
32109
32224
  async function binaryStandins(binary, toolchain, provided, behavior, frameworks, siblings) {
32110
32225
  if (provided.has(binary.target)) return [];
32111
- if (!binary.url && !import_node_fs45.default.existsSync(binary.dir))
32112
- return `${import_node_path47.default.relative(process.cwd(), binary.dir) || binary.dir} is not on disk, and Xcode fails without it too; run the script that downloads or builds it, then run again`;
32226
+ const absent = missingArtifactGap(binary);
32227
+ if (absent !== null) return absent;
32113
32228
  import_node_fs45.default.mkdirSync(cacheDir4, { recursive: true });
32114
32229
  const work = import_node_fs45.default.mkdtempSync(import_node_path47.default.join(cacheDir4, "work-"));
32115
32230
  let all;
@@ -32161,7 +32276,7 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
32161
32276
  ].join("\0");
32162
32277
  } else {
32163
32278
  const artifact = xcframework(binary);
32164
- all = surfaces(artifact.dir);
32279
+ all = surfaces(artifact.dir, binary.target);
32165
32280
  digest = artifact.digest;
32166
32281
  }
32167
32282
  } catch (error) {
@@ -32180,7 +32295,8 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
32180
32295
  );
32181
32296
  hash.update(digest);
32182
32297
  hash.update([...siblings].sort().join("\0"));
32183
- if (found.some((surface) => surface.kind === "mixed")) hash.update(frameworks.digest);
32298
+ if (found.some((surface) => surface.kind === "mixed" || surface.kind === "objc"))
32299
+ hash.update(frameworks.digest);
32184
32300
  for (const surface of found) {
32185
32301
  hash.update(`${surface.kind}\0${surface.module}\0`);
32186
32302
  for (const file of surface.kind === "swift" ? [surface.interface] : surface.kind === "source" ? surface.sources : [
@@ -32257,7 +32373,9 @@ ${roots.map((file) => ` header "${file}"`).join("\n")}
32257
32373
  binary,
32258
32374
  toolchain,
32259
32375
  dir,
32260
- new Map(Object.entries(configured.get(surface.module) ?? {}))
32376
+ new Map(Object.entries(configured.get(surface.module) ?? {})),
32377
+ frameworks,
32378
+ siblings
32261
32379
  ) : binary.cxxHeaders ? await cxxStandin(surface, binary, toolchain, dir) : cStandin(surface, binary, toolchain, dir)
32262
32380
  );
32263
32381
  } catch (error) {
@@ -32302,6 +32420,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
32302
32420
  import_node_fs45.default.mkdirSync(cacheDir4, { recursive: true });
32303
32421
  const modules = import_node_fs45.default.mkdtempSync(import_node_path47.default.join(cacheDir4, "modules-"));
32304
32422
  const frameworkDirs = /* @__PURE__ */ new Set();
32423
+ const frameworkSurfaces = /* @__PURE__ */ new Map();
32305
32424
  const frameworkInputs = [];
32306
32425
  const byModule = new Map(
32307
32426
  binaries.map((binary) => [swiftTargetModuleName(binary.target), binary])
@@ -32325,16 +32444,26 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
32325
32444
  frameworkInputs.push(`${binary.target}\0${artifact.digest}`);
32326
32445
  const imports2 = /* @__PURE__ */ new Set();
32327
32446
  interfaceImports.set(binary, imports2);
32328
- for (const surface of surfaces(artifact.dir)) {
32447
+ for (const surface of surfaces(artifact.dir, binary.target)) {
32329
32448
  byModule.set(surface.module, binary);
32330
32449
  if (surface.kind === "swift" || surface.kind === "mixed")
32331
32450
  for (const module2 of swiftImportNames(
32332
32451
  import_node_fs45.default.readFileSync(surface.interface, "utf8")
32333
32452
  ))
32334
32453
  imports2.add(module2);
32454
+ if (surface.kind === "objc" || surface.kind === "mixed")
32455
+ for (const file of files(surface.headers, (name3) => name3.endsWith(".h")))
32456
+ for (const module2 of clangImportNames(
32457
+ import_node_fs45.default.readFileSync(import_node_path47.default.join(surface.headers, file), "utf8")
32458
+ ))
32459
+ imports2.add(module2);
32335
32460
  if (surface.kind === "c") continue;
32461
+ if (surface.kind === "objc" || surface.kind === "mixed")
32462
+ frameworkSurfaces.set(surface.module, surface);
32463
+ if (surface.kind !== "swift" && import_node_path47.default.basename(import_node_path47.default.dirname(surface.modulemap)) !== "Modules")
32464
+ continue;
32336
32465
  frameworkDirs.add(
32337
- surface.kind === "swift" ? import_node_path47.default.resolve(surface.interface, "../../../..") : import_node_path47.default.resolve(surface.modulemap, "../../..")
32466
+ surface.kind === "swift" ? import_node_path47.default.resolve(surface.interface, "../../../..") : import_node_path47.default.resolve(surface.headers, "../..")
32338
32467
  );
32339
32468
  }
32340
32469
  } catch {
@@ -32343,7 +32472,8 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
32343
32472
  const generatedToolchain = { ...toolchain, standinModules: modules };
32344
32473
  const frameworks = {
32345
32474
  dirs: [...frameworkDirs].sort(),
32346
- digest: (0, import_node_crypto24.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex")
32475
+ digest: (0, import_node_crypto24.createHash)("sha256").update(frameworkInputs.sort().join("\0")).digest("hex"),
32476
+ surfaces: frameworkSurfaces
32347
32477
  };
32348
32478
  const siblings = new Map(
32349
32479
  binaries.map((binary) => [
@@ -32387,7 +32517,7 @@ async function buildStandins(binaries, toolchain, provided, behavior) {
32387
32517
  siblings.get(binary)
32388
32518
  );
32389
32519
  console.error(
32390
- `[swift-standins] ${binary.target} ${typeof result === "string" ? `gap: ${result}` : "ready"} in ${Date.now() - started}ms`
32520
+ `[swift-standins] ${binary.target} ${typeof result === "string" ? `gap: ${gapText(result)}` : "ready"} in ${Date.now() - started}ms`
32391
32521
  );
32392
32522
  if (typeof result === "string") {
32393
32523
  gaps.set(binary.target, result);
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1964 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1966 | (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;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1964 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1966 | (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.1964 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1966 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
@@ -54,6 +54,12 @@ export interface ZoomSourceRect {
54
54
  width: number;
55
55
  height: number;
56
56
  cornerRadius?: number;
57
+ alignment?: {
58
+ x: number;
59
+ y: number;
60
+ width: number;
61
+ height: number;
62
+ };
57
63
  }
58
64
  export interface ScreenSlideInput {
59
65
  rtl?: boolean;
@@ -142,6 +148,9 @@ export interface ScreenSlideTransforms {
142
148
  export interface ZoomClip<T = number> {
143
149
  insetX: T;
144
150
  insetY: T;
151
+ contentX: T;
152
+ contentY: T;
153
+ contentScale: T;
145
154
  innerRadii: ScreenTransitionCornerRadii<T>;
146
155
  rect: {
147
156
  x: T;
@@ -150,7 +159,12 @@ export interface ZoomClip<T = number> {
150
159
  height: T;
151
160
  };
152
161
  radii: ScreenTransitionCornerRadii<T>;
153
- sourceFit: 'top-left' | 'cover';
162
+ snapshot: {
163
+ x: T;
164
+ y: T;
165
+ width: T;
166
+ height: T;
167
+ };
154
168
  caster: {
155
169
  translateX: T;
156
170
  translateY: T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.1964",
3
+ "version": "0.1.1966",
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",
@@ -510,7 +510,13 @@ export function objcView(
510
510
  fs
511
511
  .readFileSync(path.join(from, name), 'utf8')
512
512
  .replace(/\bCoreFoundation\.(?=CG)/g, 'CoreGraphics.')
513
- .replace(/\bCoreFoundation\.(?=\w)/g, 'Foundation.'),
513
+ .replace(/\bCoreFoundation\.(?=\w)/g, 'Foundation.')
514
+ // Data's base64 option sets live in the swift overlay; the
515
+ // intake only has their NSData spelling, which Data aliases.
516
+ .replace(
517
+ /\bFoundation\.Data\.(?=Base64(?:En|De)codingOptions\b)/g,
518
+ 'Foundation.NSData.',
519
+ ),
514
520
  )
515
521
  }
516
522
  } else {
@@ -765,6 +765,15 @@ export function resolveSwiftPackages(options: {
765
765
  if (claimed.has(key)) return true
766
766
  const target = pkg.manifest.targets.get(name)
767
767
  if (!target || target.type !== 'regular' || placeholderPackage(pkg)) return false
768
+ // a wrapper target with empty sources only groups binary dependencies,
769
+ // which the module peach ships already covers
770
+ const files = swiftTargetFiles(pkg.manifest, target)
771
+ if (
772
+ files.every(
773
+ (file) => file.endsWith('.swift') && fs.readFileSync(file, 'utf8').trim() === '',
774
+ )
775
+ )
776
+ return false
768
777
  claimed.add(key)
769
778
  provided.delete(name)
770
779
  for (const dependency of target.dependencies) {
@@ -907,7 +916,7 @@ export function resolveSwiftPackages(options: {
907
916
  if (provided.has(name) && placeholderPackage(pkg)) return
908
917
  for (const dependency of pkg.manifest.targets.get(name)?.dependencies ?? []) {
909
918
  if (dependency.kind === 'target') visit(pkg, dependency.name)
910
- else {
919
+ else if (!provided.has(dependency.name)) {
911
920
  const nested = dependencyPackage(pkg, dependency)
912
921
  if (nested && typeof nested !== 'string')
913
922
  for (const root of nested.manifest.products.get(dependency.name)?.targets ??
@@ -916,7 +925,10 @@ export function resolveSwiftPackages(options: {
916
925
  }
917
926
  }
918
927
  }
928
+ // a product peach ships links as its module, so its wrapper targets and
929
+ // their binary dependencies are not part of what compiles
919
930
  for (const { product, source } of listed) {
931
+ if (provided.has(product)) continue
920
932
  const pkg =
921
933
  source.kind === 'unnamed'
922
934
  ? unnamed(source, product)
@@ -168,6 +168,7 @@ export type StandinOptions = {
168
168
  behavior?: ReadonlyMap<string, StandinBehavior>
169
169
  /** modules whose protocols a declaration may conform to, beside its own. */
170
170
  family?: string[]
171
+ dependencyGraphs?: SymbolGraph[]
171
172
  /** paths left out, with why: the compiler rejected their declaration. */
172
173
  omit?: ReadonlyMap<string, string>
173
174
  /** inert paths whose return value the compiler rejected: their bodies trap. */
@@ -638,7 +639,12 @@ export function emitSwiftStandin(
638
639
  ): StandinResult {
639
640
  const imported = new Set(options.imports)
640
641
  const importedTypeModules = options.importedTypeModules ?? new Map<string, string>()
641
- const graphs = sourceGraphs.map((graph) =>
642
+ const ownIds = new Set(
643
+ sourceGraphs.flatMap((graph) =>
644
+ graph.symbols.map((symbol) => symbol.identifier.precise),
645
+ ),
646
+ )
647
+ const graphs = [...sourceGraphs, ...(options.dependencyGraphs ?? [])].map((graph) =>
642
648
  qualifyImportedTypes(graph, imported, importedTypeModules),
643
649
  )
644
650
  const nativeObjcProtocols = objcProtocolsInSwiftSignatures(graphs)
@@ -1453,7 +1459,8 @@ export function emitSwiftStandin(
1453
1459
  ),
1454
1460
  ].filter((name, at, all) => all.indexOf(name) === at)
1455
1461
  const parentSymbol = superId.has(id) ? byId.get(superId.get(id)!) : undefined
1456
- if (!parentSymbol) list.push(standinMarker)
1462
+ if (!parentSymbol || !ownIds.has(parentSymbol.identifier.precise))
1463
+ list.push(standinMarker)
1457
1464
  const open =
1458
1465
  symbol.accessLevel === 'open' &&
1459
1466
  (!parentSymbol || parentSymbol.accessLevel === 'open')
@@ -1936,7 +1943,12 @@ export function emitSwiftStandin(
1936
1943
  }),
1937
1944
  )
1938
1945
  const roots = [...byId.values()]
1939
- .filter((symbol) => !owner.has(symbol.identifier.precise) && !unavailable(symbol))
1946
+ .filter(
1947
+ (symbol) =>
1948
+ ownIds.has(symbol.identifier.precise) &&
1949
+ !owner.has(symbol.identifier.precise) &&
1950
+ !unavailable(symbol),
1951
+ )
1940
1952
  .filter((symbol) => {
1941
1953
  const name = /^c:@M@[^@]+@F@([^@]+)$/.exec(symbol.identifier.precise)?.[1]
1942
1954
  return !name || !cExports.has(`${name}|${text(symbol)}`)
@@ -1950,6 +1962,7 @@ export function emitSwiftStandin(
1950
1962
  for (const [name, members] of [...external].sort(([a], [b]) => a.localeCompare(b))) {
1951
1963
  const seen = new Set<string>()
1952
1964
  const kept = members.filter((member) => {
1965
+ if (!ownIds.has(member.identifier.precise)) return false
1953
1966
  const key = `${member.kind.identifier}|${text(member)}`
1954
1967
  if (unavailable(member) || seen.has(key)) return false
1955
1968
  seen.add(key)