peachsim 0.1.2402 → 0.1.2403

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 (90) hide show
  1. package/cli/catalog/meta.ts +11 -3
  2. package/cli/commands/storage.ts +37 -1
  3. package/cli/native-input.ts +6 -1
  4. package/dist-lib/agent-daemon-client.cjs +1 -1
  5. package/dist-lib/agent-events.cjs +1 -1
  6. package/dist-lib/attached-projects.cjs +1 -1
  7. package/dist-lib/auth/shared-session.cjs +1 -1
  8. package/dist-lib/backend-origin.cjs +1 -1
  9. package/dist-lib/beta.cjs +1 -1
  10. package/dist-lib/beta.mjs +1 -1
  11. package/dist-lib/bridge-constants.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.cjs +1 -1
  13. package/dist-lib/bridge-contract-input.mjs +1 -1
  14. package/dist-lib/bridge-contract.cjs +1 -1
  15. package/dist-lib/bridge-contract.mjs +1 -1
  16. package/dist-lib/bundle-channel.cjs +155 -7
  17. package/dist-lib/capture-contract.cjs +1 -1
  18. package/dist-lib/capture-contract.mjs +1 -1
  19. package/dist-lib/cloud-contract.cjs +1 -1
  20. package/dist-lib/cloud-contract.mjs +1 -1
  21. package/dist-lib/cloud-test-args.cjs +1 -1
  22. package/dist-lib/cloud-test-args.mjs +1 -1
  23. package/dist-lib/cloud.cjs +1 -1
  24. package/dist-lib/cloud.mjs +1 -1
  25. package/dist-lib/config.cjs +1 -1
  26. package/dist-lib/config.mjs +1 -1
  27. package/dist-lib/detox/index.cjs +2 -2
  28. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  29. package/dist-lib/expo-swift-bundle.cjs +153 -5
  30. package/dist-lib/expo-swift-metadata.cjs +1 -1
  31. package/dist-lib/expo-swift-metadata.mjs +1 -1
  32. package/dist-lib/home-paths.cjs +1 -1
  33. package/dist-lib/host/bridge-host.cjs +155 -7
  34. package/dist-lib/host/fetch-proxy-handler.cjs +4 -4
  35. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  36. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  37. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  38. package/dist-lib/host/websocket-proxy.cjs +1 -1
  39. package/dist-lib/index.cjs +4 -4
  40. package/dist-lib/jump-to-source-babel.cjs +1 -1
  41. package/dist-lib/jump-to-source-native.cjs +1 -1
  42. package/dist-lib/kotlin-host.cjs +1 -1
  43. package/dist-lib/menu.cjs +1 -1
  44. package/dist-lib/menu.mjs +1 -1
  45. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  46. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  47. package/dist-lib/metro-production-bundle.cjs +1 -1
  48. package/dist-lib/metro-production-bundle.mjs +1 -1
  49. package/dist-lib/metro.cjs +4 -4
  50. package/dist-lib/native-app-identity-project.cjs +2 -2
  51. package/dist-lib/native-app-identity-project.mjs +2 -2
  52. package/dist-lib/native-app-identity.cjs +1 -1
  53. package/dist-lib/native-app-identity.mjs +1 -1
  54. package/dist-lib/native-firebase-metadata.cjs +1 -1
  55. package/dist-lib/native-firebase-metadata.mjs +1 -1
  56. package/dist-lib/pdfium-raster.cjs +1 -1
  57. package/dist-lib/pdfium-raster.mjs +1 -1
  58. package/dist-lib/plist.cjs +1 -1
  59. package/dist-lib/plist.mjs +1 -1
  60. package/dist-lib/profiles.cjs +1 -1
  61. package/dist-lib/public-brand.cjs +1 -1
  62. package/dist-lib/public-origins-lib-esm.json +24 -24
  63. package/dist-lib/public-origins-lib.json +53 -53
  64. package/dist-lib/react-native-host-modules.cjs +1 -1
  65. package/dist-lib/react-native-host-modules.mjs +1 -1
  66. package/dist-lib/reap-browser.cjs +1 -1
  67. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  68. package/dist-lib/sdk.cjs +1 -1
  69. package/dist-lib/sdk.mjs +1 -1
  70. package/dist-lib/skills.cjs +178 -15
  71. package/dist-lib/swift-compile.cjs +2 -2
  72. package/dist-lib/swift-compile.mjs +2 -2
  73. package/dist-lib/swift-package.cjs +1 -1
  74. package/dist-lib/swift-package.mjs +1 -1
  75. package/dist-lib/swift-submit.cjs +1 -1
  76. package/dist-lib/swift-submit.mjs +1 -1
  77. package/dist-lib/swift-toolchain.cjs +1 -1
  78. package/dist-lib/swift.cjs +1 -1
  79. package/dist-lib/vite-swift.cjs +2 -2
  80. package/dist-lib/vite.cjs +4 -4
  81. package/dist-lib/worklet-executable.cjs +1 -1
  82. package/dist-lib/worklet-executable.mjs +1 -1
  83. package/dist-types/packages/peach-engine/src/engine/webrtcContract.d.ts +6 -1
  84. package/dist-types/packages/peach-engine/src/rolldown-production-fingerprint.d.ts +5 -4
  85. package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +1 -0
  86. package/kotlin/sdk.tar.gz +0 -0
  87. package/package.json +1 -1
  88. package/runtime-companion.json +1 -1
  89. package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIKit.apinotes +4 -2
  90. package/src/turbo-source.ts +149 -1
@@ -231,29 +231,37 @@ export const cliCommandMetas: CliCommandMeta[] = [
231
231
  title: 'peach storage',
232
232
  description: 'manage guest app storage and launch profiles',
233
233
  summary:
234
- "Clear the current guest app's local storage through the live reload bridge, or manage persistent storage profiles for the native desktop app, Windows Electron, and Playwright launches. Profiles isolate cookies, localStorage, IndexedDB, cache, permissions, and service workers. Selecting a profile creates a fresh managed sim because storage identity is fixed at launch.",
234
+ "Clear the current guest app's local storage, copy a file into its iOS App Group and print the file URL, or manage persistent storage profiles for the native desktop app, Windows Electron, and Playwright launches. Profiles isolate cookies, localStorage, IndexedDB, cache, permissions, and service workers. Selecting a profile creates a fresh managed sim because storage identity is fixed at launch.",
235
235
  order: 65,
236
236
  usage: [
237
237
  'peach storage clear [--sim <id>] [--json]',
238
+ 'peach storage copy <file> <app-group> [--sim <id>]',
238
239
  'peach storage profile list',
239
240
  'peach storage profile create <id>',
240
241
  'peach storage profile clear <id>',
241
242
  'peach storage profile delete <id>',
242
243
  ],
243
244
  options: [
244
- option('--sim <id>', 'target a specific connected sim for `storage clear`'),
245
+ option(
246
+ '--sim <id>',
247
+ 'target a specific connected sim for `storage clear` or `copy`',
248
+ ),
245
249
  option('--json', 'emit { cleared, ready, reload } for `storage clear`'),
246
250
  option('<id>', 'profile id: letters, numbers, dot, dash, or underscore'),
247
251
  ],
248
252
  examples: [
249
253
  example('peach storage clear'),
250
254
  example('peach storage clear --sim a9 --json'),
255
+ example(
256
+ 'peach storage copy photo.jpg group.com.example.app',
257
+ 'print the copied file URL',
258
+ ),
251
259
  example('peach storage profile list'),
252
260
  example('peach storage profile create qa'),
253
261
  example('peach open 8081 --profile qa --driver playwright'),
254
262
  example('peach storage profile clear qa'),
255
263
  ],
256
- related: ['open', 'desktop'],
264
+ related: ['open', 'desktop', 'defaults'],
257
265
  },
258
266
  {
259
267
  id: 'permissions',
@@ -1,3 +1,10 @@
1
+ import { readFile } from 'node:fs/promises'
2
+ import { extname } from 'node:path'
3
+ import {
4
+ callInBridgeWrite,
5
+ createBridgeFromParsed,
6
+ parseBridgeCliArgs,
7
+ } from '../ws-bridge'
1
8
  import { runProfile } from './profile'
2
9
  import { runReset } from './reset'
3
10
 
@@ -7,7 +14,7 @@ interface StorageOptions {
7
14
  }
8
15
 
9
16
  const VALUE_FLAGS = new Set(['--sim', '--port', '-p'])
10
- const SUBCOMMANDS = new Set(['profile', 'clear'])
17
+ const SUBCOMMANDS = new Set(['profile', 'clear', 'copy'])
11
18
 
12
19
  function findSubcommand(args: string[]): { name: string; index: number } | null {
13
20
  for (let i = 0; i < args.length; i++) {
@@ -28,6 +35,7 @@ peach storage — manage sim and app storage
28
35
  usage:
29
36
  peach storage profile <subcommand>
30
37
  peach storage clear [--full] [--sim <id>] [--json]
38
+ peach storage copy <file> <app-group> [--sim <id>]
31
39
 
32
40
  subcommands:
33
41
  profile list
@@ -35,6 +43,7 @@ subcommands:
35
43
  profile clear <id>
36
44
  profile delete <id>
37
45
  clear clear the current guest app data and relaunch it
46
+ copy copy a file into an iOS App Group and print its file URL
38
47
  `)
39
48
  }
40
49
 
@@ -51,6 +60,33 @@ export async function runStorage(args: string[], opts: StorageOptions): Promise<
51
60
  if (sub?.name === 'clear') {
52
61
  return runReset([...args.slice(0, sub.index), ...args.slice(sub.index + 1)], opts)
53
62
  }
63
+ if (sub?.name === 'copy') {
64
+ const parsed = parseBridgeCliArgs(args, { port: opts.port })
65
+ const [, file, group] = parsed.positional
66
+ if (!file || !group || parsed.positional.length !== 3) {
67
+ printHelp()
68
+ return 1
69
+ }
70
+ const bridge = createBridgeFromParsed(parsed)
71
+ try {
72
+ const bytes = await readFile(file)
73
+ const uri = await callInBridgeWrite<string | null>(
74
+ bridge,
75
+ '__sootsimTest.copyAppGroupFile',
76
+ group,
77
+ extname(file),
78
+ bytes.toString('base64'),
79
+ )
80
+ if (!uri) throw new Error('simulator returned no file URL')
81
+ console.log(uri)
82
+ return 0
83
+ } catch (error) {
84
+ console.error(error instanceof Error ? error.message : String(error))
85
+ return 1
86
+ } finally {
87
+ bridge.close()
88
+ }
89
+ }
54
90
 
55
91
  console.error(` unknown storage command: ${sub?.name ?? '(missing)'}`)
56
92
  printHelp()
@@ -10,6 +10,7 @@ import { SWIFT_HMR_PATH, SWIFT_PACKAGE_PATH } from '../src/swift-submit'
10
10
  import { SWIFT_GUEST_PATH } from '../src/swiftDiscoveryContract'
11
11
  import { findXcodeProject, readXcodeScheme } from '../src/xcode-project'
12
12
  import { resolveAppProject } from './app-project'
13
+ import type { SwiftModule } from '../src/swift-distribution'
13
14
  import type { SwiftHostedCompileOptions } from '../src/swift-host'
14
15
 
15
16
  export type NativeInput =
@@ -56,6 +57,7 @@ export async function prepareSwiftInput(
56
57
  target?: string
57
58
  scheme?: string
58
59
  hosted?: SwiftHostedCompileOptions
60
+ swiftModule?: SwiftModule
59
61
  signal?: AbortSignal
60
62
  } = {},
61
63
  ) {
@@ -65,7 +67,9 @@ export async function prepareSwiftInput(
65
67
  )
66
68
  if (opts.target && opts.scheme)
67
69
  throw new Error('--scheme names its own target; pass one of them')
68
- const module = opts.hosted ? null : await resolveSwiftModule({ signal: opts.signal })
70
+ const module = opts.hosted
71
+ ? null
72
+ : (opts.swiftModule ?? (await resolveSwiftModule({ signal: opts.signal })))
69
73
  const host = await import('../src/swift-host')
70
74
  const run = opts.scheme ? readXcodeScheme(input.path, opts.scheme) : null
71
75
  if (input.kind === 'xcode')
@@ -144,6 +148,7 @@ export async function prepareNativeInput(
144
148
  scheme?: string
145
149
  activity?: string
146
150
  variant?: string
151
+ swiftModule?: SwiftModule
147
152
  signal?: AbortSignal
148
153
  },
149
154
  ) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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;
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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;
package/dist-lib/beta.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/beta.ts
4
4
  var IS_BETA = true;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var SIM_LONG_PRESS_MAX_MS = 5e3;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var REFUSED_PERFORM_STEP_TYPES = [
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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;
@@ -35976,7 +35976,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
35976
35976
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
35977
35977
  MULTI_MANIFEST_VERSION = 69;
35978
35978
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
35979
- compilerSourceDigest = true ? "3401ceef036de73ad328223d7bbbc23ebbacba2bd1d1828ccc30bd44955cb161" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
35979
+ compilerSourceDigest = true ? "5f7b13ec00e56a1f8e36b1e4f1688c4eb10836e9afffb80f5e63e4fbf23e9070" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
35980
35980
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
35981
35981
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
35982
35982
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -61476,6 +61476,7 @@ struct PeachFabricView {
61476
61476
  UIView *positionView = nil;
61477
61477
  double windowX = 0;
61478
61478
  double windowY = 0;
61479
+ CGPoint parentOrigin = CGPointZero;
61479
61480
  };
61480
61481
  PeachFabricComponents *fabricComponents;
61481
61482
  RCTComponentViewRegistry *fabricRegistry;
@@ -61488,6 +61489,9 @@ std::shared_ptr<const react::EventDispatcher> fabricDispatcher;
61488
61489
  std::optional<jsi::Function> fabricEventHandler;
61489
61490
  std::unordered_map<int, PeachFabricView> fabricViews;
61490
61491
  std::unordered_map<int, int> fabricTagAliases;
61492
+ using FabricComponentView = UIView<RCTComponentViewProtocol>;
61493
+ std::unordered_map<int, FabricComponentView *> fabricPeers;
61494
+ std::unordered_map<int, std::vector<int>> fabricChildren;
61491
61495
  int nextFabricView = 1;
61492
61496
  UITextField *fabricFocusField = nil;
61493
61497
  bool fabricFocusActive = false;
@@ -61510,6 +61514,36 @@ PeachFabricView &fabricView(int tag) {
61510
61514
  return found->second;
61511
61515
  }
61512
61516
 
61517
+ void detachFabricChildren(int parent) {
61518
+ auto found = fabricChildren.find(parent);
61519
+ if (found == fabricChildren.end()) return;
61520
+ auto *parentView = fabricPeers.at(parent);
61521
+ const auto &children = found->second;
61522
+ for (size_t i = children.size(); i > 0; --i) {
61523
+ [parentView unmountChildComponentView:fabricPeers.at(children[i - 1]) index:i - 1];
61524
+ }
61525
+ fabricChildren.erase(found);
61526
+ }
61527
+
61528
+ void placeFabricView(int tag, CGPoint origin, bool inParent) {
61529
+ auto &view = fabricView(tag);
61530
+ auto *component = [fabricRegistry componentViewDescriptorWithTag:tag].view;
61531
+ view.parentOrigin = origin;
61532
+ auto metrics = view.layoutMetrics;
61533
+ metrics.frame.origin = {static_cast<react::Float>(origin.x), static_cast<react::Float>(origin.y)};
61534
+ if (metrics != view.layoutMetrics) {
61535
+ [component updateLayoutMetrics:metrics oldLayoutMetrics:view.layoutMetrics];
61536
+ view.layoutMetrics = metrics;
61537
+ [component finalizeUpdates:RNComponentViewUpdateMaskLayoutMetrics];
61538
+ }
61539
+ component._peachDrawsInFabricSlot = inParent;
61540
+ component._peachFabricLayoutOrigin = origin;
61541
+ view.positionView._peachFabricSlotContent = inParent ? component : nil;
61542
+ if (!inParent && component.superview != view.positionView) {
61543
+ [view.positionView addSubview:component];
61544
+ }
61545
+ }
61546
+
61513
61547
  void applyFabricFocus() {
61514
61548
  if (!fabricFocusActive) {
61515
61549
  if (fabricFocusField) {
@@ -62013,7 +62047,9 @@ ${paper ? ` // the interop's state carries its coordinator, which only the sh
62013
62047
  view.positionView.frame = CGRectMake(winX, winY, width, height);
62014
62048
  }
62015
62049
  auto metrics = view.layoutMetrics;
62016
- metrics.frame = react::Rect{{0, 0}, {static_cast<react::Float>(width), static_cast<react::Float>(height)}};
62050
+ metrics.frame = react::Rect{
62051
+ {static_cast<react::Float>(view.parentOrigin.x), static_cast<react::Float>(view.parentOrigin.y)},
62052
+ {static_cast<react::Float>(width), static_cast<react::Float>(height)}};
62017
62053
  metrics.pointScaleFactor = static_cast<react::Float>(scale);
62018
62054
  if (metrics == view.layoutMetrics) return jsi::Value::undefined();
62019
62055
  UIView<RCTComponentViewProtocol> *componentView = [fabricRegistry componentViewDescriptorWithTag:tag].view;
@@ -62036,11 +62072,29 @@ ${paper ? ` // the interop's state carries its coordinator, which only the sh
62036
62072
  }
62037
62073
  view.family->getEventEmitter()->setEnabled(false);
62038
62074
  RCTComponentViewDescriptor descriptor = [fabricRegistry componentViewDescriptorWithTag:tag];
62075
+ for (const auto &[hostId, viewTag] : fabricTagAliases) {
62076
+ if (viewTag != tag) continue;
62077
+ detachFabricChildren(hostId);
62078
+ std::optional<int> parentId;
62079
+ for (const auto &[id, children] : fabricChildren) {
62080
+ if (std::find(children.begin(), children.end(), hostId) != children.end()) {
62081
+ parentId = id;
62082
+ break;
62083
+ }
62084
+ }
62085
+ if (parentId) detachFabricChildren(*parentId);
62086
+ fabricPeers.erase(hostId);
62087
+ }
62088
+ descriptor.view._peachDrawsInFabricSlot = NO;
62039
62089
  [descriptor.view removeFromSuperview];
62040
62090
  [view.positionView removeFromSuperview];
62041
62091
  [view.slotView removeFromSuperview];
62042
62092
  [fabricRegistry enqueueComponentViewWithComponentHandle:view.handle tag:tag componentViewDescriptor:descriptor];
62043
62093
  fabricViews.erase(tag);
62094
+ if (fabricViews.empty()) {
62095
+ fabricChildren.clear();
62096
+ fabricPeers.clear();
62097
+ }
62044
62098
  for (auto it = fabricTagAliases.begin(); it != fabricTagAliases.end();) {
62045
62099
  if (it->second == tag) it = fabricTagAliases.erase(it);
62046
62100
  else ++it;
@@ -62053,6 +62107,91 @@ ${paper ? ` // the interop's state carries its coordinator, which only the sh
62053
62107
  fabricTagAliases[nodeTag] = tag;
62054
62108
  return jsi::Value::undefined();
62055
62109
  });
62110
+ method("syncAccessibilityTree", 1, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
62111
+ auto records = args[0].asObject(rt).asArray(rt);
62112
+ std::unordered_map<int, std::vector<int>> next;
62113
+ std::unordered_set<int> active;
62114
+ std::vector<int> roots;
62115
+ std::vector<int> changedParents;
62116
+ std::unordered_map<void *, int> identities;
62117
+ for (size_t i = 0; i < records.size(rt); ++i) {
62118
+ auto row = records.getValueAtIndex(rt, i).asObject(rt).asArray(rt);
62119
+ int id = static_cast<int>(row.getValueAtIndex(rt, 0).asNumber());
62120
+ int parent = static_cast<int>(row.getValueAtIndex(rt, 1).asNumber());
62121
+ int tag = static_cast<int>(row.getValueAtIndex(rt, 2).asNumber());
62122
+ CGRect frame = CGRectMake(
62123
+ row.getValueAtIndex(rt, 3).asNumber(), row.getValueAtIndex(rt, 4).asNumber(),
62124
+ row.getValueAtIndex(rt, 5).asNumber(), row.getValueAtIndex(rt, 6).asNumber());
62125
+ FabricComponentView *peer;
62126
+ if (tag) {
62127
+ peer = [fabricRegistry componentViewDescriptorWithTag:tag].view;
62128
+ } else {
62129
+ auto entry = fabricPeers.find(id);
62130
+ peer = entry == fabricPeers.end()
62131
+ ? [[RCTViewComponentView alloc] initWithFrame:frame]
62132
+ : entry->second;
62133
+ peer._peachDrawsInFabricSlot = YES;
62134
+ peer.frame = frame;
62135
+ peer.isAccessibilityElement = row.getValueAtIndex(rt, 7).getBool();
62136
+ peer.hidden = row.getValueAtIndex(rt, 8).getBool();
62137
+ auto label = row.getValueAtIndex(rt, 9);
62138
+ peer.accessibilityLabel = label.isString() ? @(label.asString(rt).utf8(rt).c_str()) : nil;
62139
+ }
62140
+ fabricPeers[id] = peer;
62141
+ active.insert(id);
62142
+ identities[(__bridge void *)peer] = id;
62143
+ if (parent) next[parent].push_back(id);
62144
+ else roots.push_back(id);
62145
+ }
62146
+ for (const auto &[parent, previous] : fabricChildren) {
62147
+ auto desired = next.find(parent);
62148
+ if (desired == next.end() || previous != desired->second) changedParents.push_back(parent);
62149
+ }
62150
+ for (int parent : changedParents) detachFabricChildren(parent);
62151
+ for (auto it = fabricPeers.begin(); it != fabricPeers.end();) {
62152
+ if (active.count(it->first)) ++it;
62153
+ else it = fabricPeers.erase(it);
62154
+ }
62155
+ for (size_t i = 0; i < records.size(rt); ++i) {
62156
+ auto row = records.getValueAtIndex(rt, i).asObject(rt).asArray(rt);
62157
+ int id = static_cast<int>(row.getValueAtIndex(rt, 0).asNumber());
62158
+ int parent = static_cast<int>(row.getValueAtIndex(rt, 1).asNumber());
62159
+ int tag = static_cast<int>(row.getValueAtIndex(rt, 2).asNumber());
62160
+ auto *peer = fabricPeers.at(id);
62161
+ if (tag) {
62162
+ CGPoint origin = CGPointMake(row.getValueAtIndex(rt, 3).asNumber(), row.getValueAtIndex(rt, 4).asNumber());
62163
+ placeFabricView(tag, origin, parent != 0);
62164
+ }
62165
+ auto desired = next.find(id);
62166
+ if (desired == next.end() || fabricChildren.count(id)) continue;
62167
+ for (size_t index = 0; index < desired->second.size(); ++index) {
62168
+ auto *child = fabricPeers.at(desired->second[index]);
62169
+ [child removeFromSuperview];
62170
+ [peer mountChildComponentView:child index:index];
62171
+ }
62172
+ fabricChildren[id] = std::move(desired->second);
62173
+ }
62174
+ for (int id : roots) [fabricPeers.at(id) layoutIfNeeded];
62175
+ std::vector<jsi::Value> results;
62176
+ for (int hostId : active) {
62177
+ NSArray *elements = fabricPeers.at(hostId).accessibilityElements;
62178
+ if (!elements) continue;
62179
+ std::vector<int> ordered;
62180
+ for (id element in elements) {
62181
+ auto found = identities.find((__bridge void *)element);
62182
+ if (found != identities.end()) ordered.push_back(found->second);
62183
+ }
62184
+ // a standalone UIKit element may have no React counterpart.
62185
+ if (ordered.size() != elements.count) continue;
62186
+ jsi::Array row(rt, 1 + ordered.size());
62187
+ row.setValueAtIndex(rt, 0, jsi::Value(hostId));
62188
+ for (size_t i = 0; i < ordered.size(); ++i) row.setValueAtIndex(rt, i + 1, jsi::Value(ordered[i]));
62189
+ results.emplace_back(std::move(row));
62190
+ }
62191
+ jsi::Array result(rt, results.size());
62192
+ for (size_t i = 0; i < results.size(); ++i) result.setValueAtIndex(rt, i, std::move(results[i]));
62193
+ return result;
62194
+ });
62056
62195
  // RCTMountingManager::dispatchCommand: the view's handleCommand:args:. a
62057
62196
  // Paper command arrives as the index its view config's Commands gave it
62058
62197
  method("command", 3, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
@@ -62316,6 +62455,7 @@ class JsCallInvoker final : public react::CallInvoker {
62316
62455
  #import <React/RCTComponentViewFactory.h>
62317
62456
  #import <React/RCTComponentViewProtocol.h>
62318
62457
  #import <React/RCTComponentViewRegistry.h>
62458
+ #import <React/RCTViewComponentView.h>
62319
62459
  #import <ReactCommon/RCTTurboModule.h>
62320
62460
  #include <ReactCommon/CallInvoker.h>
62321
62461
  #include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
@@ -62329,14 +62469,22 @@ class JsCallInvoker final : public react::CallInvoker {
62329
62469
  #include <react/renderer/core/StateUpdate.h>
62330
62470
  #include <react/renderer/runtimescheduler/RuntimeScheduler.h>
62331
62471
  #include <react/utils/ContextContainer.h>
62472
+ #include <algorithm>
62332
62473
  #include <cstdio>
62333
62474
  #include <cstdlib>
62334
62475
  #include <optional>
62335
62476
  #include <unordered_map>
62477
+ #include <unordered_set>
62336
62478
  #include <vector>
62337
62479
  #include <jsi/jsi.h>
62338
62480
 
62339
62481
  using namespace facebook;
62482
+
62483
+ @interface UIView (PeachFabricRendering)
62484
+ @property(nonatomic) BOOL _peachDrawsInFabricSlot;
62485
+ @property(nonatomic, weak) UIView *_peachFabricSlotContent;
62486
+ @property(nonatomic) CGPoint _peachFabricLayoutOrigin;
62487
+ @end
62340
62488
  `;
62341
62489
  FABRIC_HOST_PAPER_INCLUDES = `#import <UIKit/UIKit.h>
62342
62490
  #import <objc/message.h>
@@ -63592,7 +63740,7 @@ var init_react_native_core = __esm({
63592
63740
  init_swift_distribution();
63593
63741
  init_swift_package();
63594
63742
  init_swiftContract();
63595
- recipe = true ? "87bfef7f0e28d8a323a1069ee1002e9d9344e3b78b1f991164d392cacd10bde5" : reactNativeCoreDigest(__sootsim_import_meta_dirname);
63743
+ recipe = true ? "6425ef9cf485d8d9b2637bfd86f1dadd809b8afa3b62c607c10e5bc1882e0741" : reactNativeCoreDigest(__sootsim_import_meta_dirname);
63596
63744
  strings3 = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
63597
63745
  building = /* @__PURE__ */ new Map();
63598
63746
  }
@@ -64867,7 +65015,7 @@ var init_nitro_superset = __esm({
64867
65015
  init_nitroContract();
64868
65016
  init_swift_standin_digest();
64869
65017
  NITRO_SUPERSET_ENTRY_NAME = "superset";
64870
- NITRO_COMPILER_DIGEST = true ? "c840c6202230ee95c8e443b102832414a640fd6a4cd154c9fb37066bc04ee1ca" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
65018
+ NITRO_COMPILER_DIGEST = true ? "2e5b44e9dc857aa080b0fdbc25e3098d25f9ca1deb9250bdd5e7c10f2f96bffc" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
64871
65019
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
64872
65020
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
64873
65021
  published = /* @__PURE__ */ new Map();
@@ -66106,7 +66254,7 @@ var init_expo_native_compiler_digest = __esm({
66106
66254
 
66107
66255
  // src/expo-native-prebuilt.ts
66108
66256
  function expoNativeCompilerDigestValue() {
66109
- return true ? "903a32e876518f60ddcd8a8fec71fb21d601687c3bb626fd2be3a5826a07f5e8" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
66257
+ return true ? "a21e70334c74419c8ca0427886adcfb457911bc210711ce2210c3f98b2dabf6b" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
66110
66258
  }
66111
66259
  function readSources(value) {
66112
66260
  const sources = isRecord(value) ? value.sources : null;
@@ -73001,7 +73149,7 @@ var import_node_path5 = require("node:path");
73001
73149
  init_src();
73002
73150
 
73003
73151
  // runtime-companion.json
73004
- var runtime_companion_default = { abi: 1, sha256: "658636e3bce6510e61148e4524fbf697d8e84481cb366d81dd9c8f439b654c85", file: "node/cli-658636e3bce6510e61148e4524fbf697d8e84481cb366d81dd9c8f439b654c85.cjs" };
73152
+ var runtime_companion_default = { abi: 1, sha256: "0c8fd2e718b1b95d6f7a99350e741823ac5d885c7bc97aa3062ae81603bc987d", file: "node/cli-0c8fd2e718b1b95d6f7a99350e741823ac5d885c7bc97aa3062ae81603bc987d.cjs" };
73005
73153
 
73006
73154
  // src/cli-runtime.ts
73007
73155
  init_answeredNativePackages();
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/capture-contract.ts
4
4
  var RNX_SCREEN_CAPTURE_VERSION = 1;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var RNX_CLOUD_MAX_ARTIFACT_BYTES = 40761776;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/cloud-test-args.ts
4
4
  var CLOUD_TEST_ARGS_MAX_COUNT = 32;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  var __defProp = Object.defineProperty;
3
3
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
4
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // ../contrast-runtime-delivery/src/version.ts
4
4
  function isValidRuntimeVersion(value) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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;
@@ -2476,7 +2476,7 @@ function isValidRuntimeVersion(value) {
2476
2476
  }
2477
2477
 
2478
2478
  // runtime-companion.json
2479
- var runtime_companion_default = { abi: 1, sha256: "658636e3bce6510e61148e4524fbf697d8e84481cb366d81dd9c8f439b654c85", file: "node/cli-658636e3bce6510e61148e4524fbf697d8e84481cb366d81dd9c8f439b654c85.cjs" };
2479
+ var runtime_companion_default = { abi: 1, sha256: "0c8fd2e718b1b95d6f7a99350e741823ac5d885c7bc97aa3062ae81603bc987d", file: "node/cli-0c8fd2e718b1b95d6f7a99350e741823ac5d885c7bc97aa3062ae81603bc987d.cjs" };
2480
2480
 
2481
2481
  // src/answeredNativePackages.ts
2482
2482
  var import_node_async_hooks = require("node:async_hooks");
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2402 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2403 | (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;