peachsim 0.1.2305 → 0.1.2306

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 (84) 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 +149 -26
  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 +148 -25
  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 +149 -26
  31. package/dist-lib/host/fetch-proxy-handler.cjs +5 -4
  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 +5 -4
  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 +5 -4
  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 +149 -26
  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 +4 -4
  77. package/dist-lib/vite.cjs +5 -4
  78. package/dist-lib/worklet-executable.cjs +1 -1
  79. package/dist-lib/worklet-executable.mjs +1 -1
  80. package/kotlin/sdk.tar.gz +0 -0
  81. package/package.json +1 -1
  82. package/sdk/ios/System/Library/Frameworks/QuickLook.framework/Headers/QLPreviewController.h +1 -1
  83. package/src/native-static-libraries.ts +1 -1
  84. package/src/turbo-source.ts +148 -22
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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;
@@ -32357,7 +32357,7 @@ int EXUpdatesApplyBSDiffPatch(const char * _Nonnull oldFilePath,
32357
32357
  REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
32358
32358
  MULTI_MANIFEST_VERSION = 68;
32359
32359
  SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
32360
- compilerSourceDigest = true ? "38c735ffbd31a005ec0e9662f0fa716aaed8b65aeec0d1592bde2e835f179458" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
32360
+ compilerSourceDigest = true ? "dda8eea414f224c24308031855c896c38101ab0d31acbc7060436bc1d4aadf0d" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname);
32361
32361
  nativeCxxCompilerFlags = ["-fno-cxx-modules"];
32362
32362
  cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
32363
32363
  cxxFlagArray = (flags) => JSON.stringify([...nativeCxxCompilerFlags, ...withoutGlogModuleMap(flags)]);
@@ -41376,7 +41376,7 @@ var init_native_static_libraries = __esm({
41376
41376
  nativeSha256: "b91cd08892ebe0cdd39e1336594bb66cd79fc639a894303805792047d24f468b",
41377
41377
  upstream: "ed59cc48e37ac33ac15b252fc5ad7af4b9ecd51d",
41378
41378
  // updated with the native producer script and port patches.
41379
- recipe: "cea231f8139cf2b44a3f2b309ce8a99b9ee3e3ff52b5120780bc5969a22f8059",
41379
+ recipe: "7914af52f8a3694215d7422b01209490237921826e18438d5f1004775769ab63",
41380
41380
  archive: "libessentia.a"
41381
41381
  },
41382
41382
  {
@@ -45236,7 +45236,7 @@ var init_swift_standin_digest = __esm({
45236
45236
  STANDIN_DIGEST_ENTRYPOINTS = ["swift-standins.ts", "swift-objc-compile.ts"];
45237
45237
  SPECIFIER = /from\s*['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
45238
45238
  standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS);
45239
- STANDIN_SOURCE_DIGEST = true ? "c966f6f04b2d8f65009c3eb2db2a2a55ee09bd8540da3797fb0eabe22c59a351" : standinSourceDigest();
45239
+ STANDIN_SOURCE_DIGEST = true ? "0ffa2547ef06e12d293047c1e51c99b46325d43c9a029d4d9a9586b75f24b39b" : standinSourceDigest();
45240
45240
  }
45241
45241
  });
45242
45242
 
@@ -55591,15 +55591,17 @@ async function collectTurboSources(options) {
55591
55591
  flattensPublicHeaders: false,
55592
55592
  bridgingHeader: null,
55593
55593
  prefixHeader,
55594
- headerSearchPaths: [
55595
- `${targetPath(targetName)}/include`,
55596
- `${targetPath(TURBO_CORE_TARGET)}/include`
55597
- ],
55594
+ headerSearchPaths: [`${targetPath(targetName)}/include`],
55598
55595
  userHeaderSearchPaths: [],
55599
55596
  frameworkSearchPaths: [],
55600
55597
  headerMaps: [],
55601
55598
  productHeaders: {},
55602
- flags: [],
55599
+ // TurboCore's aliased React headers compile the units but never reach
55600
+ // a Swift importer, whose React module is the app's own
55601
+ flags: [
55602
+ "-I",
55603
+ `${SWIFT_NATIVE_INPUT_ROOT}/${targetPath(TURBO_CORE_TARGET)}/include`
55604
+ ],
55603
55605
  importerFlags: [],
55604
55606
  cxxFlags: [],
55605
55607
  fileFlags: {},
@@ -56983,7 +56985,8 @@ ${moduleProviders ? `- (id<RCTModuleProvider>)getModuleProvider:(const char *)na
56983
56985
  @end
56984
56986
 
56985
56987
  // an app's Fabric component views, which its own Fabric host defines
56986
- extern "C" void peachInstallFabricViews(facebook::jsi::Runtime &runtime) __attribute__((weak));
56988
+ void peachInstallFabricViews(facebook::jsi::Runtime &runtime, std::shared_ptr<facebook::react::CallInvoker> invoker) __attribute__((weak));
56989
+ void peachTeardownFabricViews() __attribute__((weak));
56987
56990
 
56988
56991
  // UIKitCore: the key window and root view controller an app delegate makes at launch
56989
56992
  extern "C" void PeachLaunchReactNativeWindow(void);
@@ -57005,6 +57008,7 @@ extern "C" void peachTurboInitialize() {
57005
57008
  auto& runtime = peach::jsi_runtime::create(
57006
57009
  [] { invoker->drain(); },
57007
57010
  [] {
57011
+ if (peachTeardownFabricViews) peachTeardownFabricViews();
57008
57012
  [manager invalidate];
57009
57013
  manager = nil;
57010
57014
  delegate = nil;
@@ -57062,7 +57066,7 @@ ${bridgeProxy ? ` // as RCTInstance does: the proxy modules reach as their brid
57062
57066
  }];
57063
57067
  [decorator.moduleRegistry setTurboModuleRegistry:manager];
57064
57068
  [manager installJSBindings:runtime];
57065
- if (peachInstallFabricViews) peachInstallFabricViews(runtime);
57069
+ if (peachInstallFabricViews) peachInstallFabricViews(runtime, invoker);
57066
57070
  }
57067
57071
 
57068
57072
  // the screenshot the device took, as UIKit posts it to every observer in the
@@ -57127,13 +57131,20 @@ namespace {
57127
57131
  struct PeachFabricView {
57128
57132
  react::ComponentHandle handle;
57129
57133
  const react::ComponentDescriptor *descriptor;
57134
+ react::ShadowNodeFamily::Shared family;
57130
57135
  react::Props::Shared props;
57136
+ react::State::Shared state;
57131
57137
  react::LayoutMetrics layoutMetrics;
57132
57138
  };
57133
57139
  PeachFabricComponents *fabricComponents;
57134
57140
  RCTComponentViewRegistry *fabricRegistry;
57135
- std::shared_ptr<const react::ContextContainer> fabricContext;
57141
+ std::shared_ptr<react::ContextContainer> fabricContext;
57136
57142
  react::ComponentDescriptorRegistry::Shared fabricDescriptors;
57143
+ std::shared_ptr<react::CallInvoker> fabricInvoker;
57144
+ std::shared_ptr<react::RuntimeScheduler> fabricScheduler;
57145
+ std::shared_ptr<const void> fabricOwner;
57146
+ std::shared_ptr<const react::EventDispatcher> fabricDispatcher;
57147
+ std::optional<jsi::Function> fabricEventHandler;
57137
57148
  std::unordered_map<int, PeachFabricView> fabricViews;
57138
57149
  int nextFabricView = 1;
57139
57150
  std::string fabricNames = ${JSON.stringify(views.map(({ name: name3 }) => name3).join("\n"))};
@@ -57152,32 +57163,112 @@ react::Props::Shared fabricCloneProps(jsi::Runtime &rt, const PeachFabricView &v
57152
57163
  return view.descriptor->cloneProps(context, view.props, react::RawProps(rt, props));
57153
57164
  }
57154
57165
 
57166
+ // the beat React Native's run loop observer gives: queued events flush once
57167
+ // the call that queued them returns
57168
+ class PeachFabricEventBeat final : public react::EventBeat {
57169
+ public:
57170
+ PeachFabricEventBeat(std::shared_ptr<OwnerBox> ownerBox, react::RuntimeScheduler &scheduler)
57171
+ : EventBeat(ownerBox, scheduler), box(std::move(ownerBox)) {}
57172
+ void request() const override {
57173
+ EventBeat::request();
57174
+ std::weak_ptr<const void> owner = box->owner;
57175
+ fabricInvoker->invokeAsync([this, owner](jsi::Runtime &) {
57176
+ if (owner.lock()) induce();
57177
+ });
57178
+ }
57179
+
57180
+ private:
57181
+ std::shared_ptr<OwnerBox> box;
57182
+ };
57183
+
57184
+ // UIManager::updateState reads a state's data as State's friend; a member
57185
+ // pointer named through a derived class reaches the same accessor
57186
+ struct PeachStateData : react::State {
57187
+ static constexpr auto data = &PeachStateData::getDataPointer;
57188
+ };
57189
+
57190
+ // UIManager::dispatchEventToJS: the instance handle the engine gave the view,
57191
+ // the event type and its payload with the target tag and timestamp
57192
+ void fabricDispatchEvent(
57193
+ jsi::Runtime &rt,
57194
+ react::EventTarget *target,
57195
+ const std::string &type,
57196
+ react::ReactEventPriority,
57197
+ const react::EventPayload &eventPayload,
57198
+ react::HighResTimeStamp timestamp) {
57199
+ auto payload = eventPayload.asJSIValue(rt);
57200
+ if (payload.isNull() || !fabricEventHandler || !target) return;
57201
+ auto handle = target->getInstanceHandle(rt);
57202
+ if (handle.isUndefined() || handle.isNull()) return;
57203
+ if (payload.isObject()) {
57204
+ auto object = payload.asObject(rt);
57205
+ object.setProperty(rt, "target", target->getTag());
57206
+ if (!object.hasProperty(rt, "timeStamp"))
57207
+ object.setProperty(rt, "timeStamp", timestamp.toDOMHighResTimeStamp());
57208
+ }
57209
+ fabricEventHandler->call(rt, std::move(handle), jsi::String::createFromUtf8(rt, type), std::move(payload));
57210
+ }
57211
+
57212
+ // UIManager::updateState with the engine's tree in place of the shadow tree:
57213
+ // the view's next state, then the update its commit would mount
57214
+ void fabricUpdateState(const react::StateUpdate &update) {
57215
+ int tag = update.family->getTag();
57216
+ auto found = fabricViews.find(tag);
57217
+ if (found == fabricViews.end() || !found->second.state) return;
57218
+ auto &view = found->second;
57219
+ auto data = update.callback(((*view.state).*PeachStateData::data)());
57220
+ if (!data) return;
57221
+ auto oldState = view.state;
57222
+ view.state = view.descriptor->createState(*view.family, data);
57223
+ UIView<RCTComponentViewProtocol> *componentView = [fabricRegistry componentViewDescriptorWithTag:tag].view;
57224
+ [componentView updateState:view.state oldState:oldState];
57225
+ [componentView finalizeUpdates:RNComponentViewUpdateMaskState];
57226
+ }
57227
+
57155
57228
  } // namespace
57156
57229
 
57157
- extern "C" void peachInstallFabricViews(jsi::Runtime &rt) {
57230
+ void peachInstallFabricViews(jsi::Runtime &rt, std::shared_ptr<react::CallInvoker> invoker) {
57231
+ fabricInvoker = std::move(invoker);
57158
57232
  fabricComponents = [PeachFabricComponents new];
57159
57233
  RCTComponentViewFactory *factory = [RCTComponentViewFactory currentComponentViewFactory];
57160
57234
  factory.thirdPartyFabricComponentsProvider = fabricComponents;
57161
57235
  fabricRegistry = [RCTComponentViewRegistry new];
57162
- fabricContext = std::make_shared<const react::ContextContainer>();
57163
- react::ComponentDescriptorParameters parameters{{}, fabricContext, nullptr};
57236
+ fabricContext = std::make_shared<react::ContextContainer>();
57237
+ fabricScheduler = std::make_shared<react::RuntimeScheduler>(
57238
+ [](std::function<void(jsi::Runtime &)> &&work) { fabricInvoker->invokeAsync(std::move(work)); });
57239
+ fabricContext->insert(react::RuntimeSchedulerKey, std::weak_ptr<react::RuntimeScheduler>(fabricScheduler));
57240
+ fabricOwner = std::make_shared<int>(0);
57241
+ auto box = std::make_shared<react::EventBeat::OwnerBox>();
57242
+ box->owner = fabricOwner;
57243
+ auto conclusion = [](jsi::Runtime &rt) { fabricScheduler->callExpiredTasks(rt); };
57244
+ fabricDispatcher = std::make_shared<const react::EventDispatcher>(
57245
+ react::EventQueueProcessor(fabricDispatchEvent, conclusion, fabricUpdateState, std::weak_ptr<react::EventLogger>()),
57246
+ std::make_unique<PeachFabricEventBeat>(box, *fabricScheduler),
57247
+ fabricUpdateState,
57248
+ std::weak_ptr<react::EventLogger>());
57249
+ react::ComponentDescriptorParameters parameters{fabricDispatcher, fabricContext, nullptr};
57164
57250
  fabricDescriptors = [factory createComponentDescriptorRegistryWithParameters:parameters];
57165
57251
  auto views = jsi::Object(rt);
57166
57252
  auto method = [&](const char *name, unsigned count, jsi::HostFunctionType body) {
57167
57253
  views.setProperty(rt, name, jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, name), count, std::move(body)));
57168
57254
  };
57169
- // Create then Insert: the first props, no event emitter or state, and the
57170
- // layout the view has before the engine measures it
57171
- method("create", 2, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
57255
+ // create(name, instanceHandle, props), Create then Insert: the family the
57256
+ // handle's events resolve through, the first props, the initial state, and
57257
+ // the layout the view has before the engine measures it
57258
+ method("create", 3, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
57172
57259
  const auto &descriptor = fabricDescriptors->at(args[0].asString(rt).utf8(rt));
57173
57260
  int tag = nextFabricView++;
57174
- auto &view = fabricViews.emplace(tag, PeachFabricView{descriptor.getComponentHandle(), &descriptor, nullptr, {}}).first->second;
57175
- view.props = fabricCloneProps(rt, view, args[1]);
57261
+ auto family = descriptor.createFamily(
57262
+ {.tag = tag, .surfaceId = -1, .instanceHandle = std::make_shared<const react::InstanceHandle>(rt, args[1], tag)});
57263
+ auto &view = fabricViews.emplace(tag, PeachFabricView{descriptor.getComponentHandle(), &descriptor, family, nullptr, nullptr, {}}).first->second;
57264
+ view.props = fabricCloneProps(rt, view, args[2]);
57265
+ view.state = descriptor.createInitialState(view.props, family);
57266
+ family->getEventEmitter()->setEnabled(true);
57176
57267
  UIView<RCTComponentViewProtocol> *componentView =
57177
57268
  [fabricRegistry dequeueComponentViewWithComponentHandle:view.handle tag:tag].view;
57178
57269
  [componentView updateProps:view.props oldProps:nullptr];
57179
- [componentView updateEventEmitter:nullptr];
57180
- [componentView updateState:nullptr oldState:nullptr];
57270
+ [componentView updateEventEmitter:family->getEventEmitter()];
57271
+ [componentView updateState:view.state oldState:nullptr];
57181
57272
  [componentView updateLayoutMetrics:view.layoutMetrics oldLayoutMetrics:react::EmptyLayoutMetrics];
57182
57273
  [componentView finalizeUpdates:RNComponentViewUpdateMaskAll];
57183
57274
  return jsi::Value(tag);
@@ -57207,19 +57298,41 @@ extern "C" void peachInstallFabricViews(jsi::Runtime &rt) {
57207
57298
  [componentView finalizeUpdates:RNComponentViewUpdateMaskLayoutMetrics];
57208
57299
  return jsi::Value::undefined();
57209
57300
  });
57210
- // Remove then Delete: the registry recycles the view
57301
+ // Remove then Delete: the family's emitter stops at once, as an unmounted
57302
+ // family's does, and the registry recycles the view
57211
57303
  method("drop", 1, [](jsi::Runtime &, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
57212
57304
  int tag = static_cast<int>(args[0].asNumber());
57213
57305
  auto &view = fabricView(tag);
57306
+ view.family->getEventEmitter()->setEnabled(false);
57214
57307
  RCTComponentViewDescriptor descriptor = [fabricRegistry componentViewDescriptorWithTag:tag];
57215
57308
  [descriptor.view removeFromSuperview];
57216
57309
  [fabricRegistry enqueueComponentViewWithComponentHandle:view.handle tag:tag componentViewDescriptor:descriptor];
57217
57310
  fabricViews.erase(tag);
57218
57311
  return jsi::Value::undefined();
57219
57312
  });
57313
+ // RCTMountingManager::dispatchCommand: the view's handleCommand:args:
57314
+ method("command", 3, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
57315
+ int tag = static_cast<int>(args[0].asNumber());
57316
+ fabricView(tag);
57317
+ NSArray *commandArgs = react::TurboModuleConvertUtils::convertJSIValueToObjCObject(rt, args[2], fabricInvoker);
57318
+ [[fabricRegistry componentViewDescriptorWithTag:tag].view handleCommand:@(args[1].asString(rt).utf8(rt).c_str())
57319
+ args:commandArgs];
57320
+ return jsi::Value::undefined();
57321
+ });
57322
+ // the function React's dispatchEvent stands for: (instanceHandle, type, payload)
57323
+ method("setEventHandler", 1, [](jsi::Runtime &rt, const jsi::Value &, const jsi::Value *args, size_t) -> jsi::Value {
57324
+ fabricEventHandler = args[0].asObject(rt).asFunction(rt);
57325
+ return jsi::Value::undefined();
57326
+ });
57220
57327
  rt.global().setProperty(rt, "peachFabricViews", std::move(views));
57221
57328
  }
57222
57329
 
57330
+ // the runtime's functions go before the runtime does
57331
+ void peachTeardownFabricViews() {
57332
+ fabricOwner.reset();
57333
+ fabricEventHandler.reset();
57334
+ }
57335
+
57223
57336
  extern "C" void *peach_fabric_view_content(int tag) {
57224
57337
  return (__bridge_retained void *)[fabricRegistry componentViewDescriptorWithTag:tag].view;
57225
57338
  }
@@ -57249,6 +57362,7 @@ var init_turbo_source = __esm({
57249
57362
  init_podspec_sources();
57250
57363
  init_swift_source_file();
57251
57364
  init_swift_submit();
57365
+ init_swiftContract();
57252
57366
  init_turbo_codegen_intake();
57253
57367
  init_xcode_project();
57254
57368
  execFileAsync3 = (0, import_node_util14.promisify)(import_node_child_process47.execFile);
@@ -57398,13 +57512,22 @@ class JsCallInvoker final : public react::CallInvoker {
57398
57512
  #import <React/RCTComponentViewFactory.h>
57399
57513
  #import <React/RCTComponentViewProtocol.h>
57400
57514
  #import <React/RCTComponentViewRegistry.h>
57515
+ #import <ReactCommon/RCTTurboModule.h>
57516
+ #include <ReactCommon/CallInvoker.h>
57401
57517
  #include <react/renderer/componentregistry/ComponentDescriptorRegistry.h>
57518
+ #include <react/renderer/core/EventBeat.h>
57519
+ #include <react/renderer/core/EventDispatcher.h>
57520
+ #include <react/renderer/core/EventQueueProcessor.h>
57521
+ #include <react/renderer/core/InstanceHandle.h>
57402
57522
  #include <react/renderer/core/LayoutMetrics.h>
57403
57523
  #include <react/renderer/core/PropsParserContext.h>
57404
57524
  #include <react/renderer/core/RawProps.h>
57525
+ #include <react/renderer/core/StateUpdate.h>
57526
+ #include <react/renderer/runtimescheduler/RuntimeScheduler.h>
57405
57527
  #include <react/utils/ContextContainer.h>
57406
57528
  #include <cstdio>
57407
57529
  #include <cstdlib>
57530
+ #include <optional>
57408
57531
  #include <unordered_map>
57409
57532
  #include <jsi/jsi.h>
57410
57533
 
@@ -57738,7 +57861,7 @@ var init_react_native_core = __esm({
57738
57861
  init_swift_distribution();
57739
57862
  init_swift_package();
57740
57863
  init_swiftContract();
57741
- recipe = true ? "94bdffa4aff4ff16c60f96c0342d7ef854fdf80a49d5fd2cee48a92de5885962" : reactNativeCoreDigest(__sootsim_import_meta_dirname);
57864
+ recipe = true ? "ad6a6672a4c7d5539690da16e5a429437230d138b36c48e3963d5e9f9ddad98e" : reactNativeCoreDigest(__sootsim_import_meta_dirname);
57742
57865
  strings3 = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
57743
57866
  building = /* @__PURE__ */ new Map();
57744
57867
  }
@@ -58827,7 +58950,7 @@ var init_nitro_superset = __esm({
58827
58950
  init_nitroContract();
58828
58951
  init_swift_standin_digest();
58829
58952
  NITRO_SUPERSET_ENTRY_NAME = "superset";
58830
- NITRO_COMPILER_DIGEST = true ? "9bb0e02e20ee1facd9f4347701f5cb7f4df21261355482e06fffcac3270d983c" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
58953
+ NITRO_COMPILER_DIGEST = true ? "32ab9eee82772e66c536ce78e5cb863faf23cdf987bdb5f67e6482fedc999e6f" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
58831
58954
  nitroSupersetLock = parseLock(nitro_superset_lock_default);
58832
58955
  nitroSupersetKey = (inputs) => nativeEntryKey({ ...inputs, compiler: NITRO_COMPILER_DIGEST });
58833
58956
  published = /* @__PURE__ */ new Map();
@@ -60085,7 +60208,7 @@ var init_expo_native_compiler_digest = __esm({
60085
60208
 
60086
60209
  // src/expo-native-prebuilt.ts
60087
60210
  function expoNativeCompilerDigestValue() {
60088
- return true ? "a17d67355c6425b1af01174e300cd39b630bb0a2950d81a6827a6520170700aa" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
60211
+ return true ? "5b7ad1d2620febb7d12f9053396fbc8cf3f6f1e07c8a57f9cbc444527b01cac9" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
60089
60212
  }
60090
60213
  function readSources(value) {
60091
60214
  const sources = isRecord(value) ? value.sources : null;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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.2305 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2306 | (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;