rnxsim 0.1.339 → 0.1.340

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 (167) hide show
  1. package/cli/app-config.ts +21 -1
  2. package/dist-cli/bin.js +5 -5
  3. package/dist-cli/chunks/{agent-HYXEA2DF.js → agent-DZRALHKK.js} +2 -2
  4. package/dist-cli/chunks/{agent-wrapper-XJKNKJGD.js → agent-wrapper-FFCII533.js} +2 -2
  5. package/dist-cli/chunks/{app-fonts-ECYIB477.js → app-fonts-P5TIE2BI.js} +2 -2
  6. package/dist-cli/chunks/{assert-XVYWL4OL.js → assert-L6YWZZH7.js} +2 -2
  7. package/dist-cli/chunks/{auth-RP5LJWFS.js → auth-2QUOSD3D.js} +2 -2
  8. package/dist-cli/chunks/{beta-VBVPDQZD.js → beta-DSQASQV7.js} +2 -2
  9. package/dist-cli/chunks/{camera-YVDG77OW.js → camera-KONNW6GF.js} +2 -2
  10. package/dist-cli/chunks/{chunk-37CF2HGR.js → chunk-2C7MJXES.js} +1 -1
  11. package/dist-cli/chunks/{chunk-44PQEV6X.js → chunk-2FT3GZ2P.js} +2 -2
  12. package/dist-cli/chunks/{chunk-PTDAFVH5.js → chunk-3KDMR5FE.js} +2 -2
  13. package/dist-cli/chunks/{chunk-2AZOL3UF.js → chunk-52LBSDBQ.js} +3 -3
  14. package/dist-cli/chunks/{chunk-VCYL5IR3.js → chunk-5JKZGU2L.js} +1 -1
  15. package/dist-cli/chunks/{chunk-ST4IRWA6.js → chunk-5ULMLFND.js} +1 -1
  16. package/dist-cli/chunks/{chunk-42UB5N4I.js → chunk-6HQ2CUG5.js} +1 -1
  17. package/dist-cli/chunks/{chunk-UMNOLET5.js → chunk-7IBTDBHW.js} +2 -2
  18. package/dist-cli/chunks/{chunk-VYMD42C2.js → chunk-AV323BT6.js} +2 -2
  19. package/dist-cli/chunks/{chunk-KTL2LUE5.js → chunk-AVGWPMGX.js} +1 -1
  20. package/dist-cli/chunks/{chunk-IWXDWYP4.js → chunk-AZWECMXO.js} +2 -2
  21. package/dist-cli/chunks/{chunk-3T22NM6B.js → chunk-BCGO3XWB.js} +2 -2
  22. package/dist-cli/chunks/{chunk-ZE44MQ4K.js → chunk-CA3D6BWR.js} +2 -2
  23. package/dist-cli/chunks/{chunk-XIEY6RUY.js → chunk-CKK6IEZD.js} +1 -1
  24. package/dist-cli/chunks/{chunk-QKMCPABX.js → chunk-CKKJUPAA.js} +1 -1
  25. package/dist-cli/chunks/{chunk-3R7KVPQ6.js → chunk-CYAEO7E3.js} +2 -2
  26. package/dist-cli/chunks/{chunk-Z2RU7GLW.js → chunk-DB4DBTM2.js} +2 -2
  27. package/dist-cli/chunks/{chunk-7WQGK44R.js → chunk-DEK47I44.js} +3 -3
  28. package/dist-cli/chunks/{chunk-CNFXAL6Z.js → chunk-DMAUBOZ2.js} +1 -1
  29. package/dist-cli/chunks/{chunk-76QEJTAT.js → chunk-EZ2WX6EK.js} +3 -3
  30. package/dist-cli/chunks/{chunk-KW3TVLRH.js → chunk-F4SGYRAP.js} +1 -1
  31. package/dist-cli/chunks/chunk-HWIUC6SX.js +4 -0
  32. package/dist-cli/chunks/{chunk-PRNSZ6B2.js → chunk-J2EHW26I.js} +2 -2
  33. package/dist-cli/chunks/{chunk-KAO5CST7.js → chunk-JJKRVEA6.js} +1 -1
  34. package/dist-cli/chunks/{chunk-NG7EAN4Z.js → chunk-JRJDACNV.js} +2 -2
  35. package/dist-cli/chunks/{chunk-GGDZMFEK.js → chunk-JX5LGYG2.js} +2 -2
  36. package/dist-cli/chunks/{chunk-FPQ4EECQ.js → chunk-L6FANSWV.js} +1 -1
  37. package/dist-cli/chunks/{chunk-5TECC5CJ.js → chunk-LQIMPJRD.js} +2 -2
  38. package/dist-cli/chunks/{chunk-VAR4NG7B.js → chunk-LXED7YNR.js} +1 -1
  39. package/dist-cli/chunks/{chunk-GESUHR5O.js → chunk-M76E72WP.js} +2 -2
  40. package/dist-cli/chunks/{chunk-7H5BVBSN.js → chunk-MKFOWHFO.js} +1 -1
  41. package/dist-cli/chunks/{chunk-IV4EVQFA.js → chunk-MXXR5IDW.js} +3 -3
  42. package/dist-cli/chunks/{chunk-AVK2JHMK.js → chunk-MYTUISZ3.js} +2 -2
  43. package/dist-cli/chunks/{chunk-NZ4MVNIE.js → chunk-NAG3Y5BF.js} +1 -1
  44. package/dist-cli/chunks/{chunk-OGSAZBRR.js → chunk-NZVA5ZGD.js} +1 -1
  45. package/dist-cli/chunks/{chunk-7F3ZRIVD.js → chunk-PH37P7G2.js} +2 -2
  46. package/dist-cli/chunks/{chunk-SS6FV24V.js → chunk-PYZHCZFD.js} +2 -2
  47. package/dist-cli/chunks/{chunk-RBB3BPRM.js → chunk-QRHLTYK7.js} +2 -2
  48. package/dist-cli/chunks/{chunk-FN3MYVOI.js → chunk-RYXIRFY2.js} +2 -2
  49. package/dist-cli/chunks/{chunk-KPN5X2PV.js → chunk-TAPZRN4C.js} +1 -1
  50. package/dist-cli/chunks/{chunk-ZVHDLFW6.js → chunk-TRGIXJN4.js} +2 -2
  51. package/dist-cli/chunks/{chunk-ROODJ6RF.js → chunk-U4ZHMDGL.js} +1 -1
  52. package/dist-cli/chunks/{chunk-QCDZI56P.js → chunk-UH2S5SLV.js} +2 -2
  53. package/dist-cli/chunks/{chunk-4NYMUV5O.js → chunk-UKKT5KM4.js} +2 -2
  54. package/dist-cli/chunks/{chunk-CIKEBWPF.js → chunk-UOK37RTL.js} +1 -1
  55. package/dist-cli/chunks/{chunk-M3SKRWFU.js → chunk-VP7D322G.js} +1 -1
  56. package/dist-cli/chunks/{chunk-WR3HAW34.js → chunk-W34ZT5MF.js} +2 -2
  57. package/dist-cli/chunks/{chunk-BISFMRD6.js → chunk-WRNCAZIB.js} +2 -2
  58. package/dist-cli/chunks/{chunk-HAPZCL5D.js → chunk-WRPLAFZP.js} +2 -2
  59. package/dist-cli/chunks/{chunk-76MUKN6C.js → chunk-X5C3SLYU.js} +1 -1
  60. package/dist-cli/chunks/{chunk-GFHGRBLQ.js → chunk-YNS55EN5.js} +2 -2
  61. package/dist-cli/chunks/{chunk-SWW36H42.js → chunk-Z7ILCEXG.js} +2 -2
  62. package/dist-cli/chunks/{chunk-QLIPEQVL.js → chunk-ZEU5RFAH.js} +2 -2
  63. package/dist-cli/chunks/{cleanup-4FUIYEXZ.js → cleanup-BPGPA6WN.js} +2 -2
  64. package/dist-cli/chunks/cli-version-GJ55D3JI.js +4 -0
  65. package/dist-cli/chunks/{compat-N6MLQSAE.js → compat-2L5FPDKU.js} +2 -2
  66. package/dist-cli/chunks/{config-VJQMQ2LP.js → config-NRXBYFB7.js} +2 -2
  67. package/dist-cli/chunks/{control-ONWYYQK6.js → control-G5SMCB2U.js} +2 -2
  68. package/dist-cli/chunks/daemon-HDNSS5A3.js +4 -0
  69. package/dist-cli/chunks/{debug-7WASIHHQ.js → debug-CTYLINPI.js} +3 -3
  70. package/dist-cli/chunks/{desktop-TAX4UBZU.js → desktop-JNYUDHX5.js} +3 -3
  71. package/dist-cli/chunks/{detox-GUWYLR7G.js → detox-ZWP5MUPJ.js} +2 -2
  72. package/dist-cli/chunks/{device-4CJWN2NQ.js → device-Y7ANIQJY.js} +2 -2
  73. package/dist-cli/chunks/{diagnose-PE6E6FIJ.js → diagnose-GFPN44ER.js} +2 -2
  74. package/dist-cli/chunks/{disk-cleanup-NCNDW6UG.js → disk-cleanup-OUHB2MKC.js} +2 -2
  75. package/dist-cli/chunks/drivers-3PUAZF6B.js +4 -0
  76. package/dist-cli/chunks/{film-3S5BWVCE.js → film-RNPYZHQA.js} +3 -3
  77. package/dist-cli/chunks/flow-XQUTMOQZ.js +4 -0
  78. package/dist-cli/chunks/help-C7Y5IENX.js +4 -0
  79. package/dist-cli/chunks/{hidden-runtime-alias-5NJA6RDT.js → hidden-runtime-alias-DGMIDDY6.js} +2 -2
  80. package/dist-cli/chunks/{home-paths-JEJ5BS23.js → home-paths-YEFW63N5.js} +2 -2
  81. package/dist-cli/chunks/inspect-4NF3PPRZ.js +4 -0
  82. package/dist-cli/chunks/install-desktop-66LPKLQI.js +4 -0
  83. package/dist-cli/chunks/{login-WXWIBQ5C.js → login-ASAFHSEL.js} +4 -4
  84. package/dist-cli/chunks/{logout-WYOZ64JT.js → logout-F3B5TUCU.js} +2 -2
  85. package/dist-cli/chunks/{maestro-VG64BSNR.js → maestro-MJD54Z7R.js} +3 -3
  86. package/dist-cli/chunks/{maestro-generate-7ILUVQKH.js → maestro-generate-PQZ33V42.js} +3 -3
  87. package/dist-cli/chunks/{mode-AWVXLR3D.js → mode-TKOOHJNS.js} +2 -2
  88. package/dist-cli/chunks/{optional-demo-registry-RRH3SRSJ.js → optional-demo-registry-VX3WVJXT.js} +2 -2
  89. package/dist-cli/chunks/{perf-IDLWGRFE.js → perf-JRREHJB6.js} +2 -2
  90. package/dist-cli/chunks/{permissions-YQOMEBOQ.js → permissions-RQZLGYVF.js} +2 -2
  91. package/dist-cli/chunks/{record-S76THKKB.js → record-LBNBJ6U4.js} +3 -3
  92. package/dist-cli/chunks/{report-issue-76TVGJYX.js → report-issue-O63Z4GXO.js} +2 -2
  93. package/dist-cli/chunks/reset-734HPURU.js +4 -0
  94. package/dist-cli/chunks/runtime-PRF4VZAB.js +4 -0
  95. package/dist-cli/chunks/{screenshot-command-LLEQWW3R.js → screenshot-command-OLZIGKZR.js} +3 -3
  96. package/dist-cli/chunks/{screenshot-layers-327WK2L3.js → screenshot-layers-ZCKD62ME.js} +2 -2
  97. package/dist-cli/chunks/{screenshots-capture-LHIBYR3R.js → screenshots-capture-CJFJACD7.js} +2 -2
  98. package/dist-cli/chunks/serve-L6QW4B55.js +118 -0
  99. package/dist-cli/chunks/{setup-H5EUUEOX.js → setup-CHUHRWKS.js} +2 -2
  100. package/dist-cli/chunks/{skills-3KH5KUN4.js → skills-J44O4CRY.js} +2 -2
  101. package/dist-cli/chunks/{state-RZCVH5FJ.js → state-MSTCUB5E.js} +2 -2
  102. package/dist-cli/chunks/{storage-RRCXZVON.js → storage-23Y5YSD3.js} +2 -2
  103. package/dist-cli/chunks/store-IK5DQZ2G.js +4 -0
  104. package/dist-cli/chunks/telemetry-SCC2A4KF.js +4 -0
  105. package/dist-cli/chunks/{timeline-KE7BJKM5.js → timeline-R7VNARZ5.js} +2 -2
  106. package/dist-cli/chunks/{upgrade-AE5U2CWH.js → upgrade-YUASBYYN.js} +2 -2
  107. package/dist-cli/chunks/upload-BFCTC54P.js +4 -0
  108. package/dist-cli/chunks/{version-C5QGOCDN.js → version-FSV3NQBN.js} +2 -2
  109. package/dist-cli/chunks/{web-GV7JJUAJ.js → web-LZH2QIJ5.js} +2 -2
  110. package/dist-cli/chunks/{what-happened-D6WMLM2M.js → what-happened-F45IZ34K.js} +2 -2
  111. package/dist-lib/agent-daemon-client.cjs +1 -1
  112. package/dist-lib/agent-events.cjs +1 -1
  113. package/dist-lib/agent-identity.cjs +1 -1
  114. package/dist-lib/agent-sessions.cjs +1 -1
  115. package/dist-lib/attached-projects.cjs +1 -1
  116. package/dist-lib/auth/shared-session.cjs +1 -1
  117. package/dist-lib/backend-origin.cjs +1 -1
  118. package/dist-lib/beta.cjs +1 -1
  119. package/dist-lib/beta.mjs +1 -1
  120. package/dist-lib/bridge-constants.cjs +1 -1
  121. package/dist-lib/bridge-contract.cjs +1 -1
  122. package/dist-lib/cli-constants.cjs +1 -1
  123. package/dist-lib/config.cjs +1 -1
  124. package/dist-lib/detox/index.cjs +1 -1
  125. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  126. package/dist-lib/home-paths.cjs +1 -1
  127. package/dist-lib/host/bridge-host.cjs +203 -8
  128. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  129. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  130. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  131. package/dist-lib/host/replacement-module-handler.cjs +236 -0
  132. package/dist-lib/host/websocket-proxy.cjs +1 -1
  133. package/dist-lib/index.cjs +195 -8
  134. package/dist-lib/jump-to-source-babel.cjs +1 -1
  135. package/dist-lib/menu.cjs +1 -1
  136. package/dist-lib/menu.mjs +1 -1
  137. package/dist-lib/metro-production-bundle.cjs +1 -1
  138. package/dist-lib/metro-production-bundle.mjs +1 -1
  139. package/dist-lib/metro.cjs +1 -1
  140. package/dist-lib/profiles.cjs +1 -1
  141. package/dist-lib/public-brand.cjs +1 -1
  142. package/dist-lib/react-native-host-modules.cjs +1 -1
  143. package/dist-lib/react-native-host-modules.mjs +1 -1
  144. package/dist-lib/render-mode.cjs +1 -1
  145. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  146. package/dist-lib/sdk.cjs +1 -1
  147. package/dist-lib/sdk.mjs +1 -1
  148. package/dist-lib/skills.cjs +371 -155
  149. package/dist-lib/vite.cjs +188 -1
  150. package/package.json +6 -2
  151. package/src/host/bridge-host.ts +9 -0
  152. package/src/host/replacement-module-handler.ts +220 -0
  153. package/src/vite-plugin-one.ts +7 -0
  154. package/dist-cli/chunks/chunk-K3JRFYYJ.js +0 -4
  155. package/dist-cli/chunks/cli-version-KVDXKEHT.js +0 -4
  156. package/dist-cli/chunks/daemon-XG3O4723.js +0 -4
  157. package/dist-cli/chunks/drivers-F73P7O5K.js +0 -4
  158. package/dist-cli/chunks/flow-7EO3TWAY.js +0 -4
  159. package/dist-cli/chunks/help-3GA4GYV6.js +0 -4
  160. package/dist-cli/chunks/inspect-VUH3UOVP.js +0 -4
  161. package/dist-cli/chunks/install-desktop-YFWELRMN.js +0 -4
  162. package/dist-cli/chunks/reset-TTWH3EGL.js +0 -4
  163. package/dist-cli/chunks/runtime-R6XCSUO7.js +0 -4
  164. package/dist-cli/chunks/serve-AI6WHUKJ.js +0 -44
  165. package/dist-cli/chunks/store-N6YWP4XP.js +0 -4
  166. package/dist-cli/chunks/telemetry-MI5XEML5.js +0 -4
  167. package/dist-cli/chunks/upload-THUL2TQZ.js +0 -4
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -2884,6 +2884,188 @@ var import_fs4 = __toESM(require("fs"), 1);
2884
2884
  var import_path3 = __toESM(require("path"), 1);
2885
2885
  var import_url2 = require("url");
2886
2886
 
2887
+ // src/host/replacement-module-handler.ts
2888
+ var import_promises = __toESM(require("node:fs/promises"), 1);
2889
+ var import_node_path3 = __toESM(require("node:path"), 1);
2890
+ var import_esbuild = require("esbuild");
2891
+ var REPLACEMENT_MODULE_ROUTE = "/__sootsim-replacement-module";
2892
+ var REPLACEMENT_RUNTIME_PREFIX = "/__sootsim-replacement-runtime";
2893
+ function getReplacementLoader(filePath) {
2894
+ const ext = import_node_path3.default.extname(filePath).toLowerCase();
2895
+ switch (ext) {
2896
+ case ".js":
2897
+ return "js";
2898
+ case ".jsx":
2899
+ return "jsx";
2900
+ case ".ts":
2901
+ return "ts";
2902
+ case ".tsx":
2903
+ return "tsx";
2904
+ default:
2905
+ return null;
2906
+ }
2907
+ }
2908
+ function reactRuntimeSource(reactBridgeUrl) {
2909
+ if (reactBridgeUrl) {
2910
+ return `export * from ${JSON.stringify(reactBridgeUrl)};
2911
+ import React from ${JSON.stringify(reactBridgeUrl)};
2912
+ export default React;
2913
+ `;
2914
+ }
2915
+ return `const bridge = globalThis.__sootsim_react_bridge
2916
+ if (!bridge) throw new Error('[rnx] replacement React bridge is not ready')
2917
+ export default bridge.default
2918
+ export const Activity = bridge.Activity
2919
+ export const Children = bridge.Children
2920
+ export const Component = bridge.Component
2921
+ export const Fragment = bridge.Fragment
2922
+ export const Profiler = bridge.Profiler
2923
+ export const PureComponent = bridge.PureComponent
2924
+ export const StrictMode = bridge.StrictMode
2925
+ export const Suspense = bridge.Suspense
2926
+ export const __CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = bridge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE
2927
+ export const __COMPILER_RUNTIME = bridge.__COMPILER_RUNTIME
2928
+ export const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = bridge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
2929
+ export const act = bridge.act
2930
+ export const cache = bridge.cache
2931
+ export const cacheSignal = bridge.cacheSignal
2932
+ export const captureOwnerStack = bridge.captureOwnerStack
2933
+ export const cloneElement = bridge.cloneElement
2934
+ export const createContext = bridge.createContext
2935
+ export const createElement = bridge.createElement
2936
+ export const createRef = bridge.createRef
2937
+ export const forwardRef = bridge.forwardRef
2938
+ export const isValidElement = bridge.isValidElement
2939
+ export const lazy = bridge.lazy
2940
+ export const memo = bridge.memo
2941
+ export const startTransition = bridge.startTransition
2942
+ export const unstable_useCacheRefresh = bridge.unstable_useCacheRefresh
2943
+ export const use = bridge.use
2944
+ export const useActionState = bridge.useActionState
2945
+ export const useCallback = bridge.useCallback
2946
+ export const useContext = bridge.useContext
2947
+ export const useDebugValue = bridge.useDebugValue
2948
+ export const useDeferredValue = bridge.useDeferredValue
2949
+ export const useEffect = bridge.useEffect
2950
+ export const useEffectEvent = bridge.useEffectEvent
2951
+ export const useId = bridge.useId
2952
+ export const useImperativeHandle = bridge.useImperativeHandle
2953
+ export const useInsertionEffect = bridge.useInsertionEffect
2954
+ export const useLayoutEffect = bridge.useLayoutEffect
2955
+ export const useMemo = bridge.useMemo
2956
+ export const useOptimistic = bridge.useOptimistic
2957
+ export const useReducer = bridge.useReducer
2958
+ export const useRef = bridge.useRef
2959
+ export const useState = bridge.useState
2960
+ export const useSyncExternalStore = bridge.useSyncExternalStore
2961
+ export const useTransition = bridge.useTransition
2962
+ export const version = bridge.version
2963
+ `;
2964
+ }
2965
+ function reactNativeRuntimeSource() {
2966
+ return `const rn = globalThis.__sootsim_components__ || {}
2967
+ export default rn
2968
+ export const View = rn.View
2969
+ export const Text = rn.Text
2970
+ export const Image = rn.Image
2971
+ export const ScrollView = rn.ScrollView
2972
+ export const FlatList = rn.FlatList
2973
+ export const Pressable = rn.Pressable
2974
+ export const TouchableOpacity = rn.TouchableOpacity
2975
+ export const TouchableWithoutFeedback = rn.TouchableWithoutFeedback
2976
+ export const TouchableHighlight = rn.TouchableHighlight
2977
+ export const TextInput = rn.TextInput
2978
+ export const ActivityIndicator = rn.ActivityIndicator
2979
+ export const KeyboardAvoidingView = rn.KeyboardAvoidingView
2980
+ export const Button = rn.Button
2981
+ export const Modal = rn.Modal
2982
+ export const Switch = rn.Switch
2983
+ export const StyleSheet = rn.StyleSheet
2984
+ export const Platform = rn.Platform
2985
+ export const Keyboard = rn.Keyboard
2986
+ export const Dimensions = rn.Dimensions
2987
+ export const Appearance = rn.Appearance
2988
+ `;
2989
+ }
2990
+ function sendJavaScript(req, res, source) {
2991
+ res.writeHead(200, {
2992
+ "Content-Type": "application/javascript; charset=utf-8",
2993
+ "Cache-Control": "no-cache"
2994
+ });
2995
+ res.end(req.method === "HEAD" ? void 0 : source);
2996
+ }
2997
+ async function handleReplacementModuleRequest(req, res, options = {}) {
2998
+ const rawUrl = req.url || "";
2999
+ let url;
3000
+ try {
3001
+ url = new URL(rawUrl, "http://rnx.local");
3002
+ } catch {
3003
+ return false;
3004
+ }
3005
+ if (url.pathname === `${REPLACEMENT_RUNTIME_PREFIX}/react`) {
3006
+ sendJavaScript(req, res, reactRuntimeSource(options.reactBridgeUrl));
3007
+ return true;
3008
+ }
3009
+ if (url.pathname === `${REPLACEMENT_RUNTIME_PREFIX}/react-native`) {
3010
+ sendJavaScript(req, res, reactNativeRuntimeSource());
3011
+ return true;
3012
+ }
3013
+ if (url.pathname !== REPLACEMENT_MODULE_ROUTE) return false;
3014
+ const targetPath = url.searchParams.get("path");
3015
+ if (!targetPath) {
3016
+ res.writeHead(400, { "Content-Type": "text/plain; charset=utf-8" });
3017
+ res.end("missing path param");
3018
+ return true;
3019
+ }
3020
+ const loader = getReplacementLoader(targetPath);
3021
+ if (!loader) {
3022
+ res.writeHead(400, { "Content-Type": "text/plain; charset=utf-8" });
3023
+ res.end("replacement files must be .js, .jsx, .ts, or .tsx");
3024
+ return true;
3025
+ }
3026
+ try {
3027
+ await import_promises.default.access(targetPath);
3028
+ } catch (error) {
3029
+ const message = error instanceof Error ? error.message : String(error);
3030
+ res.writeHead(404, { "Content-Type": "text/plain; charset=utf-8" });
3031
+ res.end(`replacement file not found: ${message}`);
3032
+ return true;
3033
+ }
3034
+ try {
3035
+ const result = await (0, import_esbuild.build)({
3036
+ entryPoints: [targetPath],
3037
+ bundle: true,
3038
+ write: false,
3039
+ format: "esm",
3040
+ platform: "browser",
3041
+ target: "es2022",
3042
+ jsx: "transform",
3043
+ jsxFactory: "React.createElement",
3044
+ jsxFragment: "React.Fragment",
3045
+ tsconfigRaw: { compilerOptions: { jsx: "react" } },
3046
+ sourcemap: "inline",
3047
+ logLevel: "silent",
3048
+ external: ["react", "react-native"]
3049
+ });
3050
+ const bundledCode = result.outputFiles[0]?.text ?? "";
3051
+ const hasReactBinding = /\bimport\s+(?:\*\s+as\s+React|React(?:\s*,|\s+from)|\{[^}]*\bdefault\s+as\s+React\b)/.test(
3052
+ bundledCode
3053
+ );
3054
+ const reactImport = /\bReact\.(?:createElement|Fragment)\b/.test(bundledCode) && !hasReactBinding ? `import * as React from '${REPLACEMENT_RUNTIME_PREFIX}/react';
3055
+ ` : "";
3056
+ const runtimeCode = (reactImport + bundledCode).replace(
3057
+ /from\s*["']react-native["']/g,
3058
+ `from '${REPLACEMENT_RUNTIME_PREFIX}/react-native'`
3059
+ ).replace(/from\s*["']react["']/g, `from '${REPLACEMENT_RUNTIME_PREFIX}/react'`);
3060
+ sendJavaScript(req, res, runtimeCode);
3061
+ } catch (error) {
3062
+ const message = error instanceof Error ? error.message : String(error);
3063
+ res.writeHead(500, { "Content-Type": "text/plain; charset=utf-8" });
3064
+ res.end(`replacement bundle failed: ${message}`);
3065
+ }
3066
+ return true;
3067
+ }
3068
+
2887
3069
  // src/runtime-assets.ts
2888
3070
  var import_fs3 = __toESM(require("fs"), 1);
2889
3071
  var import_path2 = __toESM(require("path"), 1);
@@ -3077,6 +3259,11 @@ function rnxPlugin(options = {}) {
3077
3259
  ])
3078
3260
  );
3079
3261
  });
3262
+ server.middlewares.use((req, res, next) => {
3263
+ void handleReplacementModuleRequest(req, res).then((handled) => {
3264
+ if (!handled) next();
3265
+ });
3266
+ });
3080
3267
  server.middlewares.use((req, res, next) => {
3081
3268
  const url = req.url || "";
3082
3269
  const pathname = url.split("?")[0];
@@ -3357,13 +3544,13 @@ function withRNX(config, options = {}) {
3357
3544
  var metro_plugin_default = withRNX;
3358
3545
 
3359
3546
  // src/jump-to-source-babel.ts
3360
- function normalizeSourcePath(path6) {
3361
- const queryStart = path6.indexOf("?");
3362
- const clean = queryStart >= 0 ? path6.slice(0, queryStart) : path6;
3547
+ function normalizeSourcePath(path7) {
3548
+ const queryStart = path7.indexOf("?");
3549
+ const clean = queryStart >= 0 ? path7.slice(0, queryStart) : path7;
3363
3550
  return clean.replace(/\\/g, "/");
3364
3551
  }
3365
- function matchesPath(path6, matcher) {
3366
- return typeof matcher === "string" ? path6.includes(matcher) : matcher.test(path6);
3552
+ function matchesPath(path7, matcher) {
3553
+ return typeof matcher === "string" ? path7.includes(matcher) : matcher.test(path7);
3367
3554
  }
3368
3555
  function shouldStampFile(filename, options) {
3369
3556
  const normalized = normalizeSourcePath(filename);
@@ -3396,11 +3583,11 @@ function sootsimJumpToSourceBabelPlugin(api, options = {}) {
3396
3583
  return {
3397
3584
  name: "sootsim-jump-to-source",
3398
3585
  visitor: {
3399
- JSXOpeningElement(path6, state) {
3586
+ JSXOpeningElement(path7, state) {
3400
3587
  if (options.enabled === false) return;
3401
3588
  const filename = state.file?.opts?.filename;
3402
3589
  if (!filename || !shouldStampFile(filename, options)) return;
3403
- const node = path6.node;
3590
+ const node = path7.node;
3404
3591
  const tagName = getJSXName(node.name);
3405
3592
  if (!tagName || tagName === "Fragment" || tagName.endsWith(".Fragment")) return;
3406
3593
  if (hasAttribute(node, attrName)) return;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/menu.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/menu.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/public-brand.ts
4
4
  var name = "rnx";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/metro-production-bundle.ts
4
4
  var RNXSIM_METRO_PRODUCTION_BUNDLE_OPTION = "rnxsim";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/react-native-host-modules.ts
4
4
  var REACT_NATIVE_PASSTHROUGH_SPECIFIERS = [
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
package/dist-lib/sdk.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
  let __sootsim_import_meta_url = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; } catch {}
3
3
  "use strict";
4
4
  var __defProp = Object.defineProperty;
package/dist-lib/sdk.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.339 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.340 | (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);