peachsim 0.1.1826 → 0.1.1828

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 (86) hide show
  1. package/cli/commands/inspect/core.ts +5 -1
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +1 -1
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +1 -1
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +1 -1
  14. package/dist-lib/bundle-channel.cjs +64 -37
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +1 -1
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +1 -1
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +1 -1
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +1 -1
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +1 -1
  25. package/dist-lib/detox/index.cjs +2 -1
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/expo-swift-bundle.cjs +16 -10
  28. package/dist-lib/expo-swift-metadata.cjs +1 -1
  29. package/dist-lib/expo-swift-metadata.mjs +1 -1
  30. package/dist-lib/home-paths.cjs +1 -1
  31. package/dist-lib/host/bridge-host.cjs +64 -37
  32. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  33. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  34. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  35. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  36. package/dist-lib/host/websocket-proxy.cjs +1 -1
  37. package/dist-lib/index.cjs +2 -1
  38. package/dist-lib/jump-to-source-babel.cjs +1 -1
  39. package/dist-lib/jump-to-source-native.cjs +1 -1
  40. package/dist-lib/kotlin-host.cjs +1 -1
  41. package/dist-lib/menu.cjs +1 -1
  42. package/dist-lib/menu.mjs +1 -1
  43. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  44. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  45. package/dist-lib/metro-production-bundle.cjs +1 -1
  46. package/dist-lib/metro-production-bundle.mjs +1 -1
  47. package/dist-lib/metro.cjs +1 -1
  48. package/dist-lib/native-app-identity-project.cjs +1 -1
  49. package/dist-lib/native-app-identity-project.mjs +1 -1
  50. package/dist-lib/native-app-identity.cjs +1 -1
  51. package/dist-lib/native-app-identity.mjs +1 -1
  52. package/dist-lib/native-firebase-metadata.cjs +1 -1
  53. package/dist-lib/native-firebase-metadata.mjs +1 -1
  54. package/dist-lib/pdfium-raster.cjs +1 -1
  55. package/dist-lib/pdfium-raster.mjs +1 -1
  56. package/dist-lib/plist.cjs +1 -1
  57. package/dist-lib/plist.mjs +1 -1
  58. package/dist-lib/profiles.cjs +1 -1
  59. package/dist-lib/public-brand.cjs +1 -1
  60. package/dist-lib/public-origins-lib-esm.json +24 -24
  61. package/dist-lib/public-origins-lib.json +53 -53
  62. package/dist-lib/react-native-host-modules.cjs +1 -1
  63. package/dist-lib/react-native-host-modules.mjs +1 -1
  64. package/dist-lib/reap-browser.cjs +1 -1
  65. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  66. package/dist-lib/sdk.cjs +4 -2
  67. package/dist-lib/sdk.mjs +4 -2
  68. package/dist-lib/skills.cjs +65 -37
  69. package/dist-lib/swift-compile.cjs +1 -1
  70. package/dist-lib/swift-compile.mjs +1 -1
  71. package/dist-lib/swift-package.cjs +1 -1
  72. package/dist-lib/swift-package.mjs +1 -1
  73. package/dist-lib/swift-submit.cjs +1 -1
  74. package/dist-lib/swift-submit.mjs +1 -1
  75. package/dist-lib/swift-toolchain.cjs +1 -1
  76. package/dist-lib/swift.cjs +1 -1
  77. package/dist-lib/vite-swift.cjs +1 -1
  78. package/dist-lib/vite.cjs +1 -1
  79. package/dist-lib/worklet-executable.cjs +1 -1
  80. package/dist-lib/worklet-executable.mjs +1 -1
  81. package/dist-types/packages/peach-engine/src/render-worker/compositor-protocol.d.ts +6 -0
  82. package/dist-types/packages/peach-globals/src/nodeContract.d.ts +7 -0
  83. package/package.json +1 -1
  84. package/src/expo-native-workspace.ts +28 -11
  85. package/src/swift-installed-targets.ts +56 -31
  86. package/src/turbo-bundle.ts +1 -1
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1826 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1828 | (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;
@@ -56480,20 +56480,20 @@ function watchRoot(root) {
56480
56480
  watches.set(root, watch2);
56481
56481
  return watch2;
56482
56482
  }
56483
- async function prepareExpoNativeWorkspace(app, signal) {
56483
+ async function prepareExpoNativeWorkspace(app, signal, target) {
56484
56484
  const prepared = await prepare(app, "workspace", signal);
56485
56485
  const ios = import_node_path50.default.join(prepared.app, "ios");
56486
56486
  const workspaces2 = import_node_fs53.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcworkspace"));
56487
56487
  const workspace = selectXcodeWorkspace(ios, workspaces2);
56488
56488
  if (!workspace) throw new Error(`expected one Expo workspace in ${ios}`);
56489
- await resolveXcodeSwiftPackages(workspace, signal);
56489
+ await resolveXcodeSwiftPackages(workspace, signal, target);
56490
56490
  return { ...prepared, workspace };
56491
56491
  }
56492
56492
  function nativeWorkspaceAvailable() {
56493
56493
  return process.platform === "darwin" || Boolean(process.env.PEACH_PREPARED_NATIVE_WORKSPACES);
56494
56494
  }
56495
- async function prepareNativeAppRoot(app, signal) {
56496
- return (nativeWorkspaceAvailable() ? await prepareExpoNativeWorkspace(app, signal) : await prepareExpoNativeProject(app, signal)).app;
56495
+ async function prepareNativeAppRoot(app, signal, target) {
56496
+ return (nativeWorkspaceAvailable() ? await prepareExpoNativeWorkspace(app, signal, target) : await prepareExpoNativeProject(app, signal)).app;
56497
56497
  }
56498
56498
  function prepareExpoNativeProject(app, signal) {
56499
56499
  return prepare(app, "project", signal);
@@ -56669,7 +56669,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
56669
56669
  // npm ci would delete the cloned tree before installing it again
56670
56670
  ["npm", "install", "--no-audit", "--no-fund"]
56671
56671
  );
56672
- const installEnv = { npm_config_ignore_scripts: "false", YARN_ENABLE_SCRIPTS: "true" };
56672
+ const installEnv = { npm_config_ignore_scripts: "false" };
56673
56673
  const execute = async (args, cwd, env = {}) => {
56674
56674
  const command = [...prefix, ...args];
56675
56675
  await run11(command[0], command.slice(1), cwd, env);
@@ -56730,12 +56730,18 @@ async function prepareNativeProject(app, manifest, stage, execute, run11, report
56730
56730
  report("prebuild done");
56731
56731
  }
56732
56732
  if (stage === "project") return;
56733
- await withCocoaPodsCacheLock(
56734
- () => run11("pod", ["install"], import_node_path50.default.join(app, "ios"), {
56735
- ...sourcePodEnv,
56736
- ...declares2("react-native-webgpu") ? {} : { RNSKIA_VENDOR_DAWN: "1" }
56737
- })
56738
- );
56733
+ const iosRoot = import_node_path50.default.join(app, "ios");
56734
+ const bundled = import_node_fs53.default.readFileSync(import_node_path50.default.join(iosRoot, "Podfile"), "utf8").includes("ensure_bundler!");
56735
+ const podEnv = {
56736
+ ...sourcePodEnv,
56737
+ ...declares2("react-native-webgpu") ? {} : { RNSKIA_VENDOR_DAWN: "1" }
56738
+ };
56739
+ await withCocoaPodsCacheLock(async () => {
56740
+ if (bundled) {
56741
+ await run11("bundle", ["install"], iosRoot, podEnv);
56742
+ await run11("bundle", ["exec", "pod", "install"], iosRoot, podEnv);
56743
+ } else await run11("pod", ["install"], iosRoot, podEnv);
56744
+ });
56739
56745
  report("pod install done");
56740
56746
  }
56741
56747
  async function runAdmitted(lease, command, args, cwd, extraEnv) {
@@ -71454,6 +71460,37 @@ function applyInstalledSwiftTargets(collection, snapshot, generatedTargets, root
71454
71460
  collection.libraries[target.name] = library;
71455
71461
  }
71456
71462
  }
71463
+ const dropSuppliedHeaders = (generated, native, copies = "") => {
71464
+ const supplied = /* @__PURE__ */ new Map();
71465
+ for (const [key2, content] of Object.entries(snapshot.input.files))
71466
+ for (const root of native.headerSearchPaths)
71467
+ if (key2.startsWith(`${root}/`)) {
71468
+ const name3 = key2.slice(root.length + 1);
71469
+ supplied.set(name3, [...supplied.get(name3) ?? [], { content, root }]);
71470
+ }
71471
+ const prefix = `${generated.path}/include/`;
71472
+ const moduleHeaders = new Set(
71473
+ [
71474
+ ...(collection.files[`${prefix}module.modulemap`] ?? "").matchAll(
71475
+ /\bheader\s+"([^"]+)"/g
71476
+ )
71477
+ ].map((match) => import_node_path74.default.posix.join(prefix, match[1]))
71478
+ );
71479
+ const roots2 = /* @__PURE__ */ new Set();
71480
+ for (const file of Object.keys(collection.files)) {
71481
+ if (!file.startsWith(prefix) || moduleHeaders.has(file)) continue;
71482
+ const target = /^#\s*include "([^"]+)"/m.exec(collection.files[file])?.[1];
71483
+ const copy = target && import_node_path74.default.posix.normalize(import_node_path74.default.posix.join(import_node_path74.default.posix.dirname(file), target));
71484
+ const source = copy && originalSources.get(copy);
71485
+ if (!source || !copy.includes(copies)) continue;
71486
+ const content = import_node_fs78.default.readFileSync(source, "utf8");
71487
+ const match = supplied.get(file.slice(prefix.length))?.find((candidate) => candidate.content === content);
71488
+ if (!match) continue;
71489
+ roots2.add(match.root);
71490
+ delete collection.files[file];
71491
+ }
71492
+ return roots2;
71493
+ };
71457
71494
  for (const native of nativeTargets) {
71458
71495
  const installedTarget = installedTargets.find(
71459
71496
  (target2) => target2.name === native.name
@@ -71465,6 +71502,18 @@ function applyInstalledSwiftTargets(collection, snapshot, generatedTargets, root
71465
71502
  collection.nativeTargets.push(native);
71466
71503
  for (const [file, source] of Object.entries(snapshot.input.files))
71467
71504
  if (file.startsWith(`${installedTarget.path}/`)) collection.files[file] = source;
71505
+ for (const generated of collection.targets) {
71506
+ if (!generatedTargets.has(generated.name)) continue;
71507
+ const search = [
71508
+ ...dropSuppliedHeaders(generated, native, "/upstream/ReactCodegen/")
71509
+ ].flatMap((root) => ["-I", `$(PEACH_INPUT_ROOT)/${root}`]);
71510
+ if (search.length === 0) continue;
71511
+ generated.clangSettings = [
71512
+ ...generated.clangSettings ?? [],
71513
+ { tool: "c", flags: search },
71514
+ { tool: "cxx", flags: search }
71515
+ ];
71516
+ }
71468
71517
  continue;
71469
71518
  }
71470
71519
  target.cxxInterop = installedTarget.cxxInterop;
@@ -71500,29 +71549,7 @@ function applyInstalledSwiftTargets(collection, snapshot, generatedTargets, root
71500
71549
  const module2 = moduleMapName(snapshot.input.files[file] ?? "");
71501
71550
  return !collection.targets.some((target2) => target2.name === module2);
71502
71551
  });
71503
- const prefix = `${generated.path}/include/`;
71504
- const supplied = /* @__PURE__ */ new Map();
71505
- for (const [key2, content] of Object.entries(snapshot.input.files)) {
71506
- if (!native.headerSearchPaths.includes(import_node_path74.default.posix.dirname(key2))) continue;
71507
- const name3 = import_node_path74.default.posix.basename(key2);
71508
- supplied.set(name3, (supplied.get(name3) ?? /* @__PURE__ */ new Set()).add(content));
71509
- }
71510
- const moduleHeaders = new Set(
71511
- [
71512
- ...(collection.files[`${prefix}module.modulemap`] ?? "").matchAll(
71513
- /\bheader\s+"([^"]+)"/g
71514
- )
71515
- ].map((match) => import_node_path74.default.posix.join(prefix, match[1]))
71516
- );
71517
- for (const file of Object.keys(collection.files)) {
71518
- if (!file.startsWith(prefix) || moduleHeaders.has(file)) continue;
71519
- const target2 = /^#\s*include "([^"]+)"/m.exec(collection.files[file])?.[1];
71520
- const source = target2 && originalSources.get(
71521
- import_node_path74.default.posix.normalize(import_node_path74.default.posix.join(import_node_path74.default.posix.dirname(file), target2))
71522
- );
71523
- if (source && supplied.get(import_node_path74.default.posix.basename(file))?.has(import_node_fs78.default.readFileSync(source, "utf8")))
71524
- delete collection.files[file];
71525
- }
71552
+ dropSuppliedHeaders(generated, native);
71526
71553
  const flags = originalModuleFlags(native.flags);
71527
71554
  generated.clangSettings = [
71528
71555
  { tool: "c", flags: [...flags, ...ndebug, ...search] },
@@ -76228,7 +76255,7 @@ var init_nitro_superset = __esm({
76228
76255
  init_swift_standin_digest();
76229
76256
  NITRO_SUPERSET_ENTRY_NAME = "superset";
76230
76257
  packageVersion = (root) => JSON.parse((0, import_node_fs84.readFileSync)((0, import_node_path80.join)(root, "package.json"), "utf8")).version;
76231
- NITRO_COMPILER_DIGEST = true ? "59e2169a31c5ae9f2ab9bdd042559c8124f572007ee42b300c429a31cd9128f4" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
76258
+ NITRO_COMPILER_DIGEST = true ? "0a9c7d5ccf2c802fabc921c87641a9af29f266ae314141eb844d99ee3c60b608" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
76232
76259
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
76233
76260
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
76234
76261
  published = /* @__PURE__ */ new Map();
@@ -76942,7 +76969,7 @@ async function compiledTurboProviders(appRoot, projectRoot, iosTarget) {
76942
76969
  );
76943
76970
  }
76944
76971
  async function compileTurboApp(appRoot, origin, moduleRoot, iosTarget) {
76945
- const projectRoot = await prepareNativeAppRoot(appRoot);
76972
+ const projectRoot = await prepareNativeAppRoot(appRoot, void 0, iosTarget);
76946
76973
  const providers = await compiledTurboProviders(appRoot, projectRoot, iosTarget);
76947
76974
  if (providers.length === 0) return null;
76948
76975
  const module2 = moduleRoot ?? await swiftDistributionRoot();
@@ -96351,6 +96378,7 @@ function layoutGetNativeEval(opts = {}) {
96351
96378
  text,
96352
96379
  box: { x: round(abs.x), y: round(abs.y), w: round(layout.width), h: round(layout.height) },
96353
96380
  ...(hitSlop !== undefined ? { hitSlop } : {}),
96381
+ ...(n.disabled === true ? { disabled: true } : {}),
96354
96382
  }
96355
96383
  if (!includeStyle) return base
96356
96384
  // computedStyle has the resolved values; style is the curated subset \u2014
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1826 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1828 | (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.1826 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1828 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/swift-compile.ts
4
4
  import {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1826 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1828 | (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.1826 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1828 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/swift-package.ts
4
4
  function swiftManifestSettings(target) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1826 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1828 | (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.1826 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1828 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/is-record.ts
4
4
  function isRecord(value) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1826 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1828 | (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.1826 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1828 | (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.1826 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1828 | (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;
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.1826 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1828 | (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.1826 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1828 | (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.1826 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.1828 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/worklet-executable.ts
4
4
  import { parse } from "acorn";
@@ -1503,6 +1503,9 @@ export type ShellToCompositorMessage = {
1503
1503
  } | {
1504
1504
  type: 'panRecognized';
1505
1505
  epochMs: number;
1506
+ } | {
1507
+ type: 'presentationFence';
1508
+ requestId: number;
1506
1509
  } | {
1507
1510
  type: 'foldMotion';
1508
1511
  active: boolean;
@@ -1936,6 +1939,9 @@ export type CompositorToShellMessage = {
1936
1939
  epochMs: number;
1937
1940
  } | EngineResourceRequest | {
1938
1941
  type: 'shellInboxAccepted';
1942
+ } | {
1943
+ type: 'presentationFenced';
1944
+ requestId: number;
1939
1945
  } | {
1940
1946
  type: 'keyboardWarm';
1941
1947
  phase: KeyboardWarmCompositorPhase;
@@ -340,6 +340,13 @@ export interface SootSimInspectInfo {
340
340
  label?: string;
341
341
  accessibilityLabel?: string;
342
342
  accessibilityHidden?: true;
343
+ disabled?: true;
344
+ hitSlop?: {
345
+ top: number;
346
+ right: number;
347
+ bottom: number;
348
+ left: number;
349
+ };
343
350
  readsFirst?: true;
344
351
  readsChildren?: true;
345
352
  accessibilityContainer?: true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "peachsim",
3
- "version": "0.1.1826",
3
+ "version": "0.1.1828",
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",
@@ -387,13 +387,17 @@ function watchRoot(root: string) {
387
387
  return watch
388
388
  }
389
389
 
390
- export async function prepareExpoNativeWorkspace(app: string, signal?: AbortSignal) {
390
+ export async function prepareExpoNativeWorkspace(
391
+ app: string,
392
+ signal?: AbortSignal,
393
+ target?: string,
394
+ ) {
391
395
  const prepared = await prepare(app, 'workspace', signal)
392
396
  const ios = path.join(prepared.app, 'ios')
393
397
  const workspaces = fs.readdirSync(ios).filter((name) => name.endsWith('.xcworkspace'))
394
398
  const workspace = selectXcodeWorkspace(ios, workspaces)
395
399
  if (!workspace) throw new Error(`expected one Expo workspace in ${ios}`)
396
- await resolveXcodeSwiftPackages(workspace, signal)
400
+ await resolveXcodeSwiftPackages(workspace, signal, target)
397
401
  return { ...prepared, workspace }
398
402
  }
399
403
 
@@ -409,10 +413,14 @@ export function nativeWorkspaceAvailable(): boolean {
409
413
  /** the app root whose ios directory the native compilers read: with the
410
414
  * installed CocoaPods workspace where one can exist, otherwise the prebuilt
411
415
  * Xcode project alone, which still declares the app's deployment target. */
412
- export async function prepareNativeAppRoot(app: string, signal?: AbortSignal) {
416
+ export async function prepareNativeAppRoot(
417
+ app: string,
418
+ signal?: AbortSignal,
419
+ target?: string,
420
+ ) {
413
421
  return (
414
422
  nativeWorkspaceAvailable()
415
- ? await prepareExpoNativeWorkspace(app, signal)
423
+ ? await prepareExpoNativeWorkspace(app, signal, target)
416
424
  : await prepareExpoNativeProject(app, signal)
417
425
  ).app
418
426
  }
@@ -689,7 +697,7 @@ async function prepareWorkspace(
689
697
  ['npm', 'install', '--no-audit', '--no-fund']
690
698
  // dependencies such as react-native-skia fetch their native binaries in a lifecycle
691
699
  // script, so a host-wide ignore-scripts must not reach the workspace install
692
- const installEnv = { npm_config_ignore_scripts: 'false', YARN_ENABLE_SCRIPTS: 'true' }
700
+ const installEnv = { npm_config_ignore_scripts: 'false' }
693
701
  const execute: NativeExecute = async (args, cwd, env = {}) => {
694
702
  const command = [...prefix, ...args]
695
703
  await run(command[0]!, command.slice(1), cwd, env)
@@ -782,12 +790,21 @@ async function prepareNativeProject(
782
790
  if (stage === 'project') return
783
791
  // react-native-skia leaves Dawn to react-native-webgpu whenever that package
784
792
  // is installed, but autolinking links it only into apps that declare it.
785
- await withCocoaPodsCacheLock(() =>
786
- run('pod', ['install'], path.join(app, 'ios'), {
787
- ...sourcePodEnv,
788
- ...(declares('react-native-webgpu') ? {} : { RNSKIA_VENDOR_DAWN: '1' }),
789
- }),
790
- )
793
+ const iosRoot = path.join(app, 'ios')
794
+ // a Podfile that calls ensure_bundler! refuses a global CocoaPods
795
+ const bundled = fs
796
+ .readFileSync(path.join(iosRoot, 'Podfile'), 'utf8')
797
+ .includes('ensure_bundler!')
798
+ const podEnv = {
799
+ ...sourcePodEnv,
800
+ ...(declares('react-native-webgpu') ? {} : { RNSKIA_VENDOR_DAWN: '1' }),
801
+ }
802
+ await withCocoaPodsCacheLock(async () => {
803
+ if (bundled) {
804
+ await run('bundle', ['install'], iosRoot, podEnv)
805
+ await run('bundle', ['exec', 'pod', 'install'], iosRoot, podEnv)
806
+ } else await run('pod', ['install'], iosRoot, podEnv)
807
+ })
791
808
  report('pod install done')
792
809
  }
793
810
 
@@ -89,6 +89,49 @@ export function applyInstalledSwiftTargets(
89
89
  collection.libraries[target.name] = library
90
90
  }
91
91
  }
92
+ // a header the installed search paths already supply, and its module covers,
93
+ // must not also reach a generated target as a second textual copy. returns the
94
+ // search roots that now supply what the target lost
95
+ const dropSuppliedHeaders = (
96
+ generated: SwiftPackageTarget,
97
+ native: NonNullable<SwiftCompileInput['nativeTargets']>[number],
98
+ // the generated copies this may replace, by path
99
+ copies = '',
100
+ ) => {
101
+ const supplied = new Map<string, { content: string; root: string }[]>()
102
+ for (const [key, content] of Object.entries(snapshot.input.files))
103
+ for (const root of native.headerSearchPaths)
104
+ if (key.startsWith(`${root}/`)) {
105
+ const name = key.slice(root.length + 1)
106
+ supplied.set(name, [...(supplied.get(name) ?? []), { content, root }])
107
+ }
108
+ const prefix = `${generated.path}/include/`
109
+ // a module map resolves its headers beside itself, so the ones it names stay
110
+ const moduleHeaders = new Set(
111
+ [
112
+ ...(collection.files[`${prefix}module.modulemap`] ?? '').matchAll(
113
+ /\bheader\s+"([^"]+)"/g,
114
+ ),
115
+ ].map((match) => path.posix.join(prefix, match[1]!)),
116
+ )
117
+ const roots = new Set<string>()
118
+ for (const file of Object.keys(collection.files)) {
119
+ if (!file.startsWith(prefix) || moduleHeaders.has(file)) continue
120
+ const target = /^#\s*include "([^"]+)"/m.exec(collection.files[file]!)?.[1]
121
+ const copy =
122
+ target && path.posix.normalize(path.posix.join(path.posix.dirname(file), target))
123
+ const source = copy && originalSources.get(copy)
124
+ if (!source || !copy.includes(copies)) continue
125
+ const content = fs.readFileSync(source, 'utf8')
126
+ const match = supplied
127
+ .get(file.slice(prefix.length))
128
+ ?.find((candidate) => candidate.content === content)
129
+ if (!match) continue
130
+ roots.add(match.root)
131
+ delete collection.files[file]
132
+ }
133
+ return roots
134
+ }
92
135
  for (const native of nativeTargets) {
93
136
  const installedTarget = installedTargets.find(
94
137
  (target) => target.name === native.name,
@@ -100,6 +143,18 @@ export function applyInstalledSwiftTargets(
100
143
  collection.nativeTargets.push(native)
101
144
  for (const [file, source] of Object.entries(snapshot.input.files))
102
145
  if (file.startsWith(`${installedTarget.path}/`)) collection.files[file] = source
146
+ for (const generated of collection.targets) {
147
+ if (!generatedTargets.has(generated.name)) continue
148
+ const search = [
149
+ ...dropSuppliedHeaders(generated, native, '/upstream/ReactCodegen/'),
150
+ ].flatMap((root) => ['-I', `$(PEACH_INPUT_ROOT)/${root}`])
151
+ if (search.length === 0) continue
152
+ generated.clangSettings = [
153
+ ...(generated.clangSettings ?? []),
154
+ { tool: 'c', flags: search },
155
+ { tool: 'cxx', flags: search },
156
+ ]
157
+ }
103
158
  continue
104
159
  }
105
160
  target.cxxInterop = installedTarget.cxxInterop
@@ -140,37 +195,7 @@ export function applyInstalledSwiftTargets(
140
195
  const module = moduleMapName(snapshot.input.files[file] ?? '')
141
196
  return !collection.targets.some((target) => target.name === module)
142
197
  })
143
- // a header the installed search paths already supply, and its module covers,
144
- // must not also reach the target as a second textual copy
145
- const prefix = `${generated.path}/include/`
146
- const supplied = new Map<string, Set<string>>()
147
- for (const [key, content] of Object.entries(snapshot.input.files)) {
148
- if (!native.headerSearchPaths.includes(path.posix.dirname(key))) continue
149
- const name = path.posix.basename(key)
150
- supplied.set(name, (supplied.get(name) ?? new Set()).add(content))
151
- }
152
- // a module map resolves its headers beside itself, so the ones it names stay
153
- const moduleHeaders = new Set(
154
- [
155
- ...(collection.files[`${prefix}module.modulemap`] ?? '').matchAll(
156
- /\bheader\s+"([^"]+)"/g,
157
- ),
158
- ].map((match) => path.posix.join(prefix, match[1]!)),
159
- )
160
- for (const file of Object.keys(collection.files)) {
161
- if (!file.startsWith(prefix) || moduleHeaders.has(file)) continue
162
- const target = /^#\s*include "([^"]+)"/m.exec(collection.files[file]!)?.[1]
163
- const source =
164
- target &&
165
- originalSources.get(
166
- path.posix.normalize(path.posix.join(path.posix.dirname(file), target)),
167
- )
168
- if (
169
- source &&
170
- supplied.get(path.posix.basename(file))?.has(fs.readFileSync(source, 'utf8'))
171
- )
172
- delete collection.files[file]
173
- }
198
+ dropSuppliedHeaders(generated, native)
174
199
  const flags = originalModuleFlags(native.flags)
175
200
  generated.clangSettings = [
176
201
  { tool: 'c', flags: [...flags, ...ndebug, ...search] },
@@ -42,7 +42,7 @@ export async function compileTurboApp(
42
42
  ): Promise<{ metadata: TurboCompiledModule; artifact: SwiftArtifact } | null> {
43
43
  // the app's own committed ios directory has no installed pods: discovery and
44
44
  // the compile read the prepared workspace, as the Nitro compile does
45
- const projectRoot = await prepareNativeAppRoot(appRoot)
45
+ const projectRoot = await prepareNativeAppRoot(appRoot, undefined, iosTarget)
46
46
  const providers = await compiledTurboProviders(appRoot, projectRoot, iosTarget)
47
47
  if (providers.length === 0) return null
48
48
  // the runtime archive is built against the published distribution, as the