rnxsim 0.1.509 → 0.1.510

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 (56) 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/agent-identity.cjs +1 -1
  4. package/dist-lib/agent-sessions.cjs +1 -1
  5. package/dist-lib/attached-projects.cjs +1 -1
  6. package/dist-lib/auth/shared-session.cjs +1 -1
  7. package/dist-lib/backend-origin.cjs +7 -1
  8. package/dist-lib/beta.cjs +1 -1
  9. package/dist-lib/beta.mjs +1 -1
  10. package/dist-lib/bridge-constants.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.cjs +1 -1
  12. package/dist-lib/bridge-contract-input.mjs +1 -1
  13. package/dist-lib/bridge-contract.cjs +1 -1
  14. package/dist-lib/bridge-contract.mjs +1 -1
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +1 -1
  17. package/dist-lib/cli-constants.cjs +1 -1
  18. package/dist-lib/cloud-contract.cjs +1 -1
  19. package/dist-lib/cloud-contract.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/detox/index.cjs +1 -1
  24. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  25. package/dist-lib/home-paths.cjs +1 -1
  26. package/dist-lib/host/bridge-host.cjs +17 -4
  27. package/dist-lib/host/fetch-proxy-handler.cjs +1 -1
  28. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  29. package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
  30. package/dist-lib/host/replacement-module-handler.cjs +9 -3
  31. package/dist-lib/host/websocket-proxy.cjs +1 -1
  32. package/dist-lib/index.cjs +9 -3
  33. package/dist-lib/jump-to-source-babel.cjs +1 -1
  34. package/dist-lib/jump-to-source-native.cjs +1 -1
  35. package/dist-lib/menu.cjs +1 -1
  36. package/dist-lib/menu.mjs +1 -1
  37. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  38. package/dist-lib/metro-fingerprint-registry.mjs +1 -1
  39. package/dist-lib/metro-production-bundle.cjs +1 -1
  40. package/dist-lib/metro-production-bundle.mjs +1 -1
  41. package/dist-lib/metro.cjs +9 -3
  42. package/dist-lib/profiles.cjs +1 -1
  43. package/dist-lib/public-brand.cjs +1 -1
  44. package/dist-lib/react-native-host-modules.cjs +1 -1
  45. package/dist-lib/react-native-host-modules.mjs +1 -1
  46. package/dist-lib/render-mode.cjs +1 -1
  47. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  48. package/dist-lib/sdk.cjs +1 -1
  49. package/dist-lib/sdk.mjs +1 -1
  50. package/dist-lib/skills.cjs +15 -4
  51. package/dist-lib/swift.cjs +23 -23
  52. package/dist-lib/vite.cjs +9 -3
  53. package/package.json +2 -1
  54. package/src/backend-origin.ts +7 -0
  55. package/src/host/bridge-host.ts +2 -2
  56. package/src/vite-plugin.ts +6 -1
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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;
@@ -24,6 +24,7 @@ var backend_origin_exports = {};
24
24
  __export(backend_origin_exports, {
25
25
  DEFAULT_CONTRAST_BACKEND_ORIGIN: () => DEFAULT_CONTRAST_BACKEND_ORIGIN,
26
26
  LOOPBACK_PROBE_HOSTNAMES: () => LOOPBACK_PROBE_HOSTNAMES,
27
+ buildBrowserAssetProxyUrl: () => buildBrowserAssetProxyUrl,
27
28
  buildLoopbackProbeBaseUrl: () => buildLoopbackProbeBaseUrl,
28
29
  isContrastBackendHost: () => isContrastBackendHost,
29
30
  isContrastBackendOrigin: () => isContrastBackendOrigin,
@@ -46,6 +47,10 @@ function isLoopbackHost(hostname) {
46
47
  const normalized = normalizeHostname(hostname);
47
48
  return normalized === "localhost" || normalized.endsWith(".localhost") || normalized === "0.0.0.0" || normalized === "::1" || /^127(?:\.\d{1,3}){3}$/.test(normalized);
48
49
  }
50
+ function buildBrowserAssetProxyUrl(targetUrl) {
51
+ const proxyPath = isLoopbackHost(new URL(targetUrl).hostname) ? "/__bundle-proxy" : "/__fetch-proxy";
52
+ return `${proxyPath}?url=${encodeURIComponent(targetUrl)}`;
53
+ }
49
54
  function isContrastBackendHost(hostname) {
50
55
  const normalized = normalizeHostname(hostname);
51
56
  return isLoopbackHost(normalized) || normalized === "contrast.dev" || normalized.endsWith(".contrast.dev");
@@ -73,6 +78,7 @@ function resolveContrastBackendOrigin(currentOrigin) {
73
78
  0 && (module.exports = {
74
79
  DEFAULT_CONTRAST_BACKEND_ORIGIN,
75
80
  LOOPBACK_PROBE_HOSTNAMES,
81
+ buildBrowserAssetProxyUrl,
76
82
  buildLoopbackProbeBaseUrl,
77
83
  isContrastBackendHost,
78
84
  isContrastBackendOrigin,
package/dist-lib/beta.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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/beta.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/bridge-contract.ts
4
4
  var SIM_LONG_PRESS_DEFAULT_MS = 500;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/cloud-contract.ts
4
4
  var RNX_CLOUD_MAX_ARTIFACT_BYTES = 20 * 1024 * 1024;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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;
@@ -45,6 +45,10 @@ function isLoopbackHost(hostname) {
45
45
  const normalized = normalizeHostname(hostname);
46
46
  return normalized === "localhost" || normalized.endsWith(".localhost") || normalized === "0.0.0.0" || normalized === "::1" || /^127(?:\.\d{1,3}){3}$/.test(normalized);
47
47
  }
48
+ function buildBrowserAssetProxyUrl(targetUrl) {
49
+ const proxyPath = isLoopbackHost(new URL(targetUrl).hostname) ? "/__bundle-proxy" : "/__fetch-proxy";
50
+ return `${proxyPath}?url=${encodeURIComponent(targetUrl)}`;
51
+ }
48
52
  var LOOPBACK_PROBE_HOSTNAMES;
49
53
  var init_backend_origin = __esm({
50
54
  "src/backend-origin.ts"() {
@@ -5304,6 +5308,9 @@ async function scanDevServers(opts = {}) {
5304
5308
  return results.filter((r) => !isSootSimSelfServer(r));
5305
5309
  }
5306
5310
 
5311
+ // src/host/bridge-host.ts
5312
+ init_backend_origin();
5313
+
5307
5314
  // src/bridge-constants.ts
5308
5315
  var DEFAULT_SOOTSIM_BRIDGE_PORT = 7668;
5309
5316
  var DEFAULT_SOOTSIM_BRIDGE_URL = `http://localhost:${DEFAULT_SOOTSIM_BRIDGE_PORT}/`;
@@ -8141,9 +8148,12 @@ function transformsFor(filePath) {
8141
8148
  );
8142
8149
  }
8143
8150
  }
8151
+ function isContrastKitSpecifier(specifier) {
8152
+ return specifier === "contrast-kit" || specifier.startsWith("contrast-kit/");
8153
+ }
8144
8154
  function unsupportedSpecifier(specifier) {
8145
8155
  return new Error(
8146
- `replacement modules may only import react, react-native, and the packages rnx stubs for this app; '${specifier}' is none of those. vendor the code into the replacement file, or add the package to rnx.config so the simulator bridges it.`
8156
+ `replacement modules may only import react, react-native, contrast-kit, and the packages rnx stubs for this app; '${specifier}' is none of those. vendor the code into the replacement file, or add the package to rnx.config so the simulator bridges it.`
8147
8157
  );
8148
8158
  }
8149
8159
  function bridgeDeclaration(name2, specifier) {
@@ -8154,6 +8164,9 @@ function bridgeDeclaration(name2, specifier) {
8154
8164
  if (specifier === "react-native") {
8155
8165
  return `const ${name2} = ${REACT_NATIVE_BRIDGE}; if (!${name2}) throw new Error(${notReady("React Native")});`;
8156
8166
  }
8167
+ if (isContrastKitSpecifier(specifier)) {
8168
+ return `const ${name2} = (globalThis.__contrast_kit_modules && globalThis.__contrast_kit_modules[${JSON.stringify(specifier)}]) || (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name2}) throw new Error(${JSON.stringify(`[rnx] replacement package bridge ${specifier} is not ready`)});`;
8169
+ }
8157
8170
  if (JSX_RUNTIME_SPECIFIERS.has(specifier)) {
8158
8171
  return `const ${name2} = (() => { const react = ${REACT_BRIDGE}; if (!react) throw new Error(${notReady("React")}); const jsx = (type, props, key) => react.createElement(type, key === undefined ? props : { ...props, key }); return { Fragment: react.Fragment, jsx, jsxs: jsx, jsxDEV: jsx }; })();`;
8159
8172
  }
@@ -8267,7 +8280,7 @@ function compileReplacementModule(input) {
8267
8280
  const specifierToken = tokens[cursor];
8268
8281
  if (!specifierToken) throw new Error("replacement module import is unterminated");
8269
8282
  const specifier = readSpecifier(specifierToken);
8270
- if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !input.runtimePackages.has(specifier)) {
8283
+ if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !isContrastKitSpecifier(specifier) && !input.runtimePackages.has(specifier)) {
8271
8284
  throw unsupportedSpecifier(specifier);
8272
8285
  }
8273
8286
  const bridge = bindings.length > 0 ? bridgeFor(specifier) : null;
@@ -9515,7 +9528,7 @@ var SootSimBridgeHost = class _SootSimBridgeHost {
9515
9528
  const excludePorts = this.effectivePort > 0 ? [this.effectivePort] : [];
9516
9529
  this.inflightScan = scanDevServers({
9517
9530
  excludePorts,
9518
- buildIconProxyUrl: (externalUrl) => `/__bundle-proxy?url=${encodeURIComponent(externalUrl)}`
9531
+ buildIconProxyUrl: buildBrowserAssetProxyUrl
9519
9532
  }).then((results) => {
9520
9533
  this.scanCache = results;
9521
9534
  this.scanCacheAt = Date.now();
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/host/fetch-proxy-overrides.ts
4
4
  var FETCH_PROXY_BROWSER_USER_AGENT = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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;
@@ -166,9 +166,12 @@ function transformsFor(filePath) {
166
166
  );
167
167
  }
168
168
  }
169
+ function isContrastKitSpecifier(specifier) {
170
+ return specifier === "contrast-kit" || specifier.startsWith("contrast-kit/");
171
+ }
169
172
  function unsupportedSpecifier(specifier) {
170
173
  return new Error(
171
- `replacement modules may only import react, react-native, and the packages rnx stubs for this app; '${specifier}' is none of those. vendor the code into the replacement file, or add the package to rnx.config so the simulator bridges it.`
174
+ `replacement modules may only import react, react-native, contrast-kit, and the packages rnx stubs for this app; '${specifier}' is none of those. vendor the code into the replacement file, or add the package to rnx.config so the simulator bridges it.`
172
175
  );
173
176
  }
174
177
  function bridgeDeclaration(name, specifier) {
@@ -179,6 +182,9 @@ function bridgeDeclaration(name, specifier) {
179
182
  if (specifier === "react-native") {
180
183
  return `const ${name} = ${REACT_NATIVE_BRIDGE}; if (!${name}) throw new Error(${notReady("React Native")});`;
181
184
  }
185
+ if (isContrastKitSpecifier(specifier)) {
186
+ return `const ${name} = (globalThis.__contrast_kit_modules && globalThis.__contrast_kit_modules[${JSON.stringify(specifier)}]) || (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name}) throw new Error(${JSON.stringify(`[rnx] replacement package bridge ${specifier} is not ready`)});`;
187
+ }
182
188
  if (JSX_RUNTIME_SPECIFIERS.has(specifier)) {
183
189
  return `const ${name} = (() => { const react = ${REACT_BRIDGE}; if (!react) throw new Error(${notReady("React")}); const jsx = (type, props, key) => react.createElement(type, key === undefined ? props : { ...props, key }); return { Fragment: react.Fragment, jsx, jsxs: jsx, jsxDEV: jsx }; })();`;
184
190
  }
@@ -292,7 +298,7 @@ function compileReplacementModule(input) {
292
298
  const specifierToken = tokens[cursor];
293
299
  if (!specifierToken) throw new Error("replacement module import is unterminated");
294
300
  const specifier = readSpecifier(specifierToken);
295
- if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !input.runtimePackages.has(specifier)) {
301
+ if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !isContrastKitSpecifier(specifier) && !input.runtimePackages.has(specifier)) {
296
302
  throw unsupportedSpecifier(specifier);
297
303
  }
298
304
  const bridge = bindings.length > 0 ? bridgeFor(specifier) : null;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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;
@@ -3441,9 +3441,12 @@ function transformsFor(filePath) {
3441
3441
  );
3442
3442
  }
3443
3443
  }
3444
+ function isContrastKitSpecifier(specifier) {
3445
+ return specifier === "contrast-kit" || specifier.startsWith("contrast-kit/");
3446
+ }
3444
3447
  function unsupportedSpecifier(specifier) {
3445
3448
  return new Error(
3446
- `replacement modules may only import react, react-native, and the packages rnx stubs for this app; '${specifier}' is none of those. vendor the code into the replacement file, or add the package to rnx.config so the simulator bridges it.`
3449
+ `replacement modules may only import react, react-native, contrast-kit, and the packages rnx stubs for this app; '${specifier}' is none of those. vendor the code into the replacement file, or add the package to rnx.config so the simulator bridges it.`
3447
3450
  );
3448
3451
  }
3449
3452
  function bridgeDeclaration(name2, specifier) {
@@ -3454,6 +3457,9 @@ function bridgeDeclaration(name2, specifier) {
3454
3457
  if (specifier === "react-native") {
3455
3458
  return `const ${name2} = ${REACT_NATIVE_BRIDGE}; if (!${name2}) throw new Error(${notReady("React Native")});`;
3456
3459
  }
3460
+ if (isContrastKitSpecifier(specifier)) {
3461
+ return `const ${name2} = (globalThis.__contrast_kit_modules && globalThis.__contrast_kit_modules[${JSON.stringify(specifier)}]) || (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name2}) throw new Error(${JSON.stringify(`[rnx] replacement package bridge ${specifier} is not ready`)});`;
3462
+ }
3457
3463
  if (JSX_RUNTIME_SPECIFIERS.has(specifier)) {
3458
3464
  return `const ${name2} = (() => { const react = ${REACT_BRIDGE}; if (!react) throw new Error(${notReady("React")}); const jsx = (type, props, key) => react.createElement(type, key === undefined ? props : { ...props, key }); return { Fragment: react.Fragment, jsx, jsxs: jsx, jsxDEV: jsx }; })();`;
3459
3465
  }
@@ -3567,7 +3573,7 @@ function compileReplacementModule(input) {
3567
3573
  const specifierToken = tokens[cursor];
3568
3574
  if (!specifierToken) throw new Error("replacement module import is unterminated");
3569
3575
  const specifier = readSpecifier(specifierToken);
3570
- if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !input.runtimePackages.has(specifier)) {
3576
+ if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !isContrastKitSpecifier(specifier) && !input.runtimePackages.has(specifier)) {
3571
3577
  throw unsupportedSpecifier(specifier);
3572
3578
  }
3573
3579
  const bridge = bindings.length > 0 ? bridgeFor(specifier) : null;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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/menu.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/metro-fingerprint-registry.ts
4
4
  var RNX_METRO_FINGERPRINT_SCHEMA_VERSION = 2;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
2
2
 
3
3
  // src/metro-production-bundle.ts
4
4
  var RNXSIM_METRO_MODULE_PATHS_PREFIX = "globalThis.__sootsimModulePaths=";
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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;
@@ -191,9 +191,12 @@ function transformsFor(filePath) {
191
191
  );
192
192
  }
193
193
  }
194
+ function isContrastKitSpecifier(specifier) {
195
+ return specifier === "contrast-kit" || specifier.startsWith("contrast-kit/");
196
+ }
194
197
  function unsupportedSpecifier(specifier) {
195
198
  return new Error(
196
- `replacement modules may only import react, react-native, and the packages rnx stubs for this app; '${specifier}' is none of those. vendor the code into the replacement file, or add the package to rnx.config so the simulator bridges it.`
199
+ `replacement modules may only import react, react-native, contrast-kit, and the packages rnx stubs for this app; '${specifier}' is none of those. vendor the code into the replacement file, or add the package to rnx.config so the simulator bridges it.`
197
200
  );
198
201
  }
199
202
  function bridgeDeclaration(name, specifier) {
@@ -204,6 +207,9 @@ function bridgeDeclaration(name, specifier) {
204
207
  if (specifier === "react-native") {
205
208
  return `const ${name} = ${REACT_NATIVE_BRIDGE}; if (!${name}) throw new Error(${notReady("React Native")});`;
206
209
  }
210
+ if (isContrastKitSpecifier(specifier)) {
211
+ return `const ${name} = (globalThis.__contrast_kit_modules && globalThis.__contrast_kit_modules[${JSON.stringify(specifier)}]) || (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name}) throw new Error(${JSON.stringify(`[rnx] replacement package bridge ${specifier} is not ready`)});`;
212
+ }
207
213
  if (JSX_RUNTIME_SPECIFIERS.has(specifier)) {
208
214
  return `const ${name} = (() => { const react = ${REACT_BRIDGE}; if (!react) throw new Error(${notReady("React")}); const jsx = (type, props, key) => react.createElement(type, key === undefined ? props : { ...props, key }); return { Fragment: react.Fragment, jsx, jsxs: jsx, jsxDEV: jsx }; })();`;
209
215
  }
@@ -317,7 +323,7 @@ function compileReplacementModule(input) {
317
323
  const specifierToken = tokens[cursor];
318
324
  if (!specifierToken) throw new Error("replacement module import is unterminated");
319
325
  const specifier = readSpecifier(specifierToken);
320
- if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !input.runtimePackages.has(specifier)) {
326
+ if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !isContrastKitSpecifier(specifier) && !input.runtimePackages.has(specifier)) {
321
327
  throw unsupportedSpecifier(specifier);
322
328
  }
323
329
  const bridge = bindings.length > 0 ? bridgeFor(specifier) : null;
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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;
@@ -19182,6 +19182,10 @@ function isLoopbackHost(hostname) {
19182
19182
  const normalized = normalizeHostname(hostname);
19183
19183
  return normalized === "localhost" || normalized.endsWith(".localhost") || normalized === "0.0.0.0" || normalized === "::1" || /^127(?:\.\d{1,3}){3}$/.test(normalized);
19184
19184
  }
19185
+ function buildBrowserAssetProxyUrl(targetUrl) {
19186
+ const proxyPath = isLoopbackHost(new URL(targetUrl).hostname) ? "/__bundle-proxy" : "/__fetch-proxy";
19187
+ return `${proxyPath}?url=${encodeURIComponent(targetUrl)}`;
19188
+ }
19185
19189
  var LOOPBACK_PROBE_HOSTNAMES;
19186
19190
  var init_backend_origin = __esm({
19187
19191
  "src/backend-origin.ts"() {
@@ -23926,9 +23930,12 @@ function transformsFor(filePath) {
23926
23930
  );
23927
23931
  }
23928
23932
  }
23933
+ function isContrastKitSpecifier(specifier) {
23934
+ return specifier === "contrast-kit" || specifier.startsWith("contrast-kit/");
23935
+ }
23929
23936
  function unsupportedSpecifier(specifier) {
23930
23937
  return new Error(
23931
- `replacement modules may only import react, react-native, and the packages rnx stubs for this app; '${specifier}' is none of those. vendor the code into the replacement file, or add the package to rnx.config so the simulator bridges it.`
23938
+ `replacement modules may only import react, react-native, contrast-kit, and the packages rnx stubs for this app; '${specifier}' is none of those. vendor the code into the replacement file, or add the package to rnx.config so the simulator bridges it.`
23932
23939
  );
23933
23940
  }
23934
23941
  function bridgeDeclaration(name2, specifier) {
@@ -23939,6 +23946,9 @@ function bridgeDeclaration(name2, specifier) {
23939
23946
  if (specifier === "react-native") {
23940
23947
  return `const ${name2} = ${REACT_NATIVE_BRIDGE}; if (!${name2}) throw new Error(${notReady("React Native")});`;
23941
23948
  }
23949
+ if (isContrastKitSpecifier(specifier)) {
23950
+ return `const ${name2} = (globalThis.__contrast_kit_modules && globalThis.__contrast_kit_modules[${JSON.stringify(specifier)}]) || (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name2}) throw new Error(${JSON.stringify(`[rnx] replacement package bridge ${specifier} is not ready`)});`;
23951
+ }
23942
23952
  if (JSX_RUNTIME_SPECIFIERS.has(specifier)) {
23943
23953
  return `const ${name2} = (() => { const react = ${REACT_BRIDGE}; if (!react) throw new Error(${notReady("React")}); const jsx = (type, props, key) => react.createElement(type, key === undefined ? props : { ...props, key }); return { Fragment: react.Fragment, jsx, jsxs: jsx, jsxDEV: jsx }; })();`;
23944
23954
  }
@@ -24050,7 +24060,7 @@ function compileReplacementModule(input) {
24050
24060
  const specifierToken = tokens[cursor];
24051
24061
  if (!specifierToken) throw new Error("replacement module import is unterminated");
24052
24062
  const specifier = readSpecifier(specifierToken);
24053
- if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !input.runtimePackages.has(specifier)) {
24063
+ if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !isContrastKitSpecifier(specifier) && !input.runtimePackages.has(specifier)) {
24054
24064
  throw unsupportedSpecifier(specifier);
24055
24065
  }
24056
24066
  const bridge = bindings.length > 0 ? bridgeFor(specifier) : null;
@@ -28571,6 +28581,7 @@ var init_bridge_host = __esm({
28571
28581
  import_path3 = __toESM(require("path"), 1);
28572
28582
  import_ws = require("ws");
28573
28583
  init_dev_server_scanner();
28584
+ init_backend_origin();
28574
28585
  init_bridge_constants();
28575
28586
  init_cli_version();
28576
28587
  init_home_paths();
@@ -29382,7 +29393,7 @@ var init_bridge_host = __esm({
29382
29393
  const excludePorts = this.effectivePort > 0 ? [this.effectivePort] : [];
29383
29394
  this.inflightScan = scanDevServers({
29384
29395
  excludePorts,
29385
- buildIconProxyUrl: (externalUrl) => `/__bundle-proxy?url=${encodeURIComponent(externalUrl)}`
29396
+ buildIconProxyUrl: buildBrowserAssetProxyUrl
29386
29397
  }).then((results) => {
29387
29398
  this.scanCache = results;
29388
29399
  this.scanCacheAt = Date.now();
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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;
@@ -27,7 +27,7 @@ __export(swift_exports, {
27
27
  module.exports = __toCommonJS(swift_exports);
28
28
 
29
29
  // ../sootsim-swift/src/mount.tsx
30
- var import_swift_ui = require("@expo/ui/swift-ui");
30
+ var import_ui = require("contrast-kit/ui");
31
31
  var import_react = require("react");
32
32
  var import_react_native = require("react-native");
33
33
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -281,26 +281,26 @@ function resolveModifier(modifier) {
281
281
  return { ...modifier, color: resolveColor(color) };
282
282
  }
283
283
  var NODE_COMPONENTS = {
284
- Button: import_swift_ui.Button,
285
- Capsule: import_swift_ui.Capsule,
286
- Circle: import_swift_ui.Circle,
287
- Divider: import_swift_ui.Divider,
288
- Form: import_swift_ui.Form,
289
- Group: import_swift_ui.Group,
290
- HStack: import_swift_ui.HStack,
291
- Image: import_swift_ui.Image,
292
- List: import_swift_ui.List,
293
- Rectangle: import_swift_ui.Rectangle,
294
- RoundedRectangle: import_swift_ui.RoundedRectangle,
295
- ScrollView: import_swift_ui.ScrollView,
296
- Section: import_swift_ui.Section,
297
- Slider: import_swift_ui.Slider,
298
- Spacer: import_swift_ui.Spacer,
299
- Text: import_swift_ui.Text,
300
- TextField: import_swift_ui.TextField,
301
- Toggle: import_swift_ui.Toggle,
302
- VStack: import_swift_ui.VStack,
303
- ZStack: import_swift_ui.ZStack
284
+ Button: import_ui.Button,
285
+ Capsule: import_ui.Capsule,
286
+ Circle: import_ui.Circle,
287
+ Divider: import_ui.Divider,
288
+ Form: import_ui.Form,
289
+ Group: import_ui.Group,
290
+ HStack: import_ui.HStack,
291
+ Image: import_ui.Image,
292
+ List: import_ui.List,
293
+ Rectangle: import_ui.Rectangle,
294
+ RoundedRectangle: import_ui.RoundedRectangle,
295
+ ScrollView: import_ui.ScrollView,
296
+ Section: import_ui.Section,
297
+ Slider: import_ui.Slider,
298
+ Spacer: import_ui.Spacer,
299
+ Text: import_ui.Text,
300
+ TextField: import_ui.TextField,
301
+ Toggle: import_ui.Toggle,
302
+ VStack: import_ui.VStack,
303
+ ZStack: import_ui.ZStack
304
304
  };
305
305
  var TEXT_STYLE_SIZES = /* @__PURE__ */ new Map([
306
306
  ["largeTitle", 34],
@@ -470,7 +470,7 @@ function createRoot() {
470
470
  if (!instance) throw new Error("swift app received an event before it mounted");
471
471
  publish({ tree: instance.deliver(handlerId2, payload), error: null });
472
472
  };
473
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_swift_ui.Host, { style: { flex: 1 }, children: rendered.tree.map((node) => renderNode(node, deliver)) });
473
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Host, { style: { flex: 1 }, children: rendered.tree.map((node) => renderNode(node, deliver)) });
474
474
  };
475
475
  return {
476
476
  component,
package/dist-lib/vite.cjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! rnx v0.1.509 | (c) 2026 Tamagui LLC | Proprietary — see LICENSE */
1
+ /*! rnx v0.1.510 | (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;
@@ -317,9 +317,12 @@ function transformsFor(filePath) {
317
317
  );
318
318
  }
319
319
  }
320
+ function isContrastKitSpecifier(specifier) {
321
+ return specifier === "contrast-kit" || specifier.startsWith("contrast-kit/");
322
+ }
320
323
  function unsupportedSpecifier(specifier) {
321
324
  return new Error(
322
- `replacement modules may only import react, react-native, and the packages rnx stubs for this app; '${specifier}' is none of those. vendor the code into the replacement file, or add the package to rnx.config so the simulator bridges it.`
325
+ `replacement modules may only import react, react-native, contrast-kit, and the packages rnx stubs for this app; '${specifier}' is none of those. vendor the code into the replacement file, or add the package to rnx.config so the simulator bridges it.`
323
326
  );
324
327
  }
325
328
  function bridgeDeclaration(name, specifier) {
@@ -330,6 +333,9 @@ function bridgeDeclaration(name, specifier) {
330
333
  if (specifier === "react-native") {
331
334
  return `const ${name} = ${REACT_NATIVE_BRIDGE}; if (!${name}) throw new Error(${notReady("React Native")});`;
332
335
  }
336
+ if (isContrastKitSpecifier(specifier)) {
337
+ return `const ${name} = (globalThis.__contrast_kit_modules && globalThis.__contrast_kit_modules[${JSON.stringify(specifier)}]) || (${PACKAGE_BRIDGES} || {})[${JSON.stringify(specifier)}]; if (!${name}) throw new Error(${JSON.stringify(`[rnx] replacement package bridge ${specifier} is not ready`)});`;
338
+ }
333
339
  if (JSX_RUNTIME_SPECIFIERS.has(specifier)) {
334
340
  return `const ${name} = (() => { const react = ${REACT_BRIDGE}; if (!react) throw new Error(${notReady("React")}); const jsx = (type, props, key) => react.createElement(type, key === undefined ? props : { ...props, key }); return { Fragment: react.Fragment, jsx, jsxs: jsx, jsxDEV: jsx }; })();`;
335
341
  }
@@ -443,7 +449,7 @@ function compileReplacementModule(input) {
443
449
  const specifierToken = tokens[cursor];
444
450
  if (!specifierToken) throw new Error("replacement module import is unterminated");
445
451
  const specifier = readSpecifier(specifierToken);
446
- if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !input.runtimePackages.has(specifier)) {
452
+ if (specifier !== "react" && specifier !== "react-native" && !JSX_RUNTIME_SPECIFIERS.has(specifier) && !isContrastKitSpecifier(specifier) && !input.runtimePackages.has(specifier)) {
447
453
  throw unsupportedSpecifier(specifier);
448
454
  }
449
455
  const bridge = bindings.length > 0 ? bridgeFor(specifier) : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rnxsim",
3
- "version": "0.1.509",
3
+ "version": "0.1.510",
4
4
  "description": "Vite and Metro plugins, testing drivers, and SDK exports for rnx.",
5
5
  "author": "Tamagui LLC",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -272,6 +272,7 @@
272
272
  "@rnx/skills": "workspace:*",
273
273
  "@sootsim/compat": "workspace:*",
274
274
  "@types/ws": "^8.5.13",
275
+ "contrast-kit": "workspace:*",
275
276
  "rnx-cloud-box": "workspace:*",
276
277
  "sootsim-engine": "workspace:*",
277
278
  "typescript": "7.0.2",
@@ -29,6 +29,13 @@ export function isLoopbackHost(hostname: string): boolean {
29
29
  )
30
30
  }
31
31
 
32
+ export function buildBrowserAssetProxyUrl(targetUrl: string): string {
33
+ const proxyPath = isLoopbackHost(new URL(targetUrl).hostname)
34
+ ? '/__bundle-proxy'
35
+ : '/__fetch-proxy'
36
+ return `${proxyPath}?url=${encodeURIComponent(targetUrl)}`
37
+ }
38
+
32
39
  export function isContrastBackendHost(hostname: string): boolean {
33
40
  const normalized = normalizeHostname(hostname)
34
41
  return (
@@ -7,6 +7,7 @@ import {
7
7
  scanDevServers,
8
8
  type DiscoveredServer,
9
9
  } from '../../scripts/dev-server-scanner.ts'
10
+ import { buildBrowserAssetProxyUrl } from '../backend-origin.ts'
10
11
  import {
11
12
  DEFAULT_SOOTSIM_BRIDGE_PORT,
12
13
  SOOTSIM_BRIDGE_SIM_CLOSE_CODE,
@@ -1281,8 +1282,7 @@ export class SootSimBridgeHost {
1281
1282
  const excludePorts = this.effectivePort > 0 ? [this.effectivePort] : []
1282
1283
  this.inflightScan = scanDevServers({
1283
1284
  excludePorts,
1284
- buildIconProxyUrl: (externalUrl) =>
1285
- `/__bundle-proxy?url=${encodeURIComponent(externalUrl)}`,
1285
+ buildIconProxyUrl: buildBrowserAssetProxyUrl,
1286
1286
  })
1287
1287
  .then((results) => {
1288
1288
  this.scanCache = results
@@ -58,7 +58,10 @@ const compatRoot = path.resolve(sootsimRoot, '..', 'compat')
58
58
  // renames of either package don't break things.
59
59
  const engineRoot = path.resolve(workspaceRoot, 'packages/sootsim-engine')
60
60
  const rnShimPath = path.resolve(engineRoot, 'src/react-native/index.ts')
61
- const reactBridgePath = path.resolve(compatRoot, 'src/react-bridge.ts')
61
+ const reactBridgePath = path.resolve(
62
+ workspaceRoot,
63
+ 'packages/contrast-kit/src/react-bridge.ts',
64
+ )
62
65
  const sootsimBrowserSourceAliases = [
63
66
  {
64
67
  find: 'rnxsim/backend-origin',
@@ -1271,6 +1274,7 @@ function reactBridgePlugin(): Plugin {
1271
1274
  importer.includes('/sootsim/src/') ||
1272
1275
  importer.includes('/sootsim-engine/src/') ||
1273
1276
  importer.includes('/compat/src/') ||
1277
+ importer.includes('/contrast-kit/src/') ||
1274
1278
  importer.includes('react-reconciler')
1275
1279
 
1276
1280
  if (!shouldRedirect) return null
@@ -1327,6 +1331,7 @@ export function workerReactBridgePlugin(): Plugin {
1327
1331
  importer.includes('/sootsim/src/') ||
1328
1332
  importer.includes('/sootsim-engine/src/') ||
1329
1333
  importer.includes('/compat/src/') ||
1334
+ importer.includes('/contrast-kit/src/') ||
1330
1335
  importer.includes('react-reconciler') ||
1331
1336
  importer.includes('/node_modules/')
1332
1337