@tamagui/static 3.1.3 → 3.1.5

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.
@@ -70,7 +70,7 @@ const esbuildLoaderConfig = {
70
70
  };
71
71
  const dataExtensions = Object.keys(esbuildLoaderConfig).filter((k) => esbuildLoaderConfig[k] === "file" || esbuildLoaderConfig[k] === "dataurl").map((k) => k.slice(1));
72
72
  const esbuildIgnoreFilesRegex = new RegExp(`.(${dataExtensions.join("|")})$`, "i");
73
- function getESBuildConfig({ entryPoints, resolvePlatformSpecificEntries, dangerouslyIgnoreStaticEvaluationModules = [], define: callerDefine, conditions: callerConditions = [], ...options }, platform, aliases) {
73
+ function getESBuildConfig({ entryPoints, resolvePlatformSpecificEntries, dangerouslyIgnoreStaticEvaluationModules = [], nativePlatform, define: callerDefine, conditions: callerConditions = [], ...options }, platform, aliases) {
74
74
  if (process.env.DEBUG?.startsWith("tamagui")) {
75
75
  console.info(`Building`, entryPoints);
76
76
  }
@@ -169,6 +169,22 @@ function getESBuildConfig({ entryPoints, resolvePlatformSpecificEntries, dangero
169
169
  {
170
170
  name: "external",
171
171
  setup(build) {
172
+ if (platform === "native") {
173
+ build.onResolve({ filter: /^react-native$/ }, () => ({
174
+ path: "react-native",
175
+ namespace: "tamagui-native-evaluation"
176
+ }));
177
+ build.onLoad({
178
+ filter: /.*/,
179
+ namespace: "tamagui-native-evaluation"
180
+ }, () => ({
181
+ contents: `export * from ${JSON.stringify(nodeRequire.resolve("@tamagui/react-native-web-lite"))}
182
+ import { getNativeColorFactories } from ${JSON.stringify(nodeRequire.resolve("@tamagui/react-native-web-lite/nativeColors"))}
183
+ export const { PlatformColor, DynamicColorIOS } = getNativeColorFactories(${JSON.stringify(nativePlatform || process.env.EXPO_OS || "ios")})`,
184
+ loader: "js",
185
+ resolveDir: build.initialOptions.absWorkingDir || process.cwd()
186
+ }));
187
+ }
172
188
  build.onResolve({ filter: /^@tamagui\/(core|web)$/ }, (args) => {
173
189
  if (args.kind === "entry-point") {
174
190
  return null;
@@ -182,6 +182,7 @@ function getBundleKey(props) {
182
182
  components: props.components,
183
183
  config: props.config,
184
184
  platform: props.platform,
185
+ nativePlatform: props.nativePlatform,
185
186
  dangerouslyIgnoreStaticEvaluationModules: props.dangerouslyIgnoreStaticEvaluationModules
186
187
  });
187
188
  }
@@ -277,7 +278,7 @@ async function bundleConfig(props, rebuild = false) {
277
278
  isBundling = true;
278
279
  const rootRequire = (0, import_node_module.createRequire)((0, import_node_path.join)(root, "package.json"));
279
280
  const tmpDir = (0, import_node_path.join)(root, ".tamagui");
280
- const platformSuffix = (props.platform || "web") === "native" ? ".native" : ".web";
281
+ const platformSuffix = props.platform === "native" ? `.native${props.nativePlatform ? `.${props.nativePlatform}` : ""}` : ".web";
281
282
  const configFormat = configEntry ? (0, import_detectModuleFormat.detectModuleFormat)(configEntry) : "cjs";
282
283
  const configExt = configFormat === "esm" ? ".mjs" : ".cjs";
283
284
  const configOutPath = (0, import_node_path.join)(tmpDir, `tamagui.config${platformSuffix}${configExt}`);
@@ -330,6 +331,7 @@ async function bundleConfig(props, rebuild = false) {
330
331
  absWorkingDir: root,
331
332
  metafile: true,
332
333
  dangerouslyIgnoreStaticEvaluationModules: props.dangerouslyIgnoreStaticEvaluationModules,
334
+ nativePlatform: props.nativePlatform,
333
335
  ...esbuildExtraOptions
334
336
  }, props.platform || "web") : null, ...baseComponents.map((componentModule, i) => {
335
337
  return (0, import_bundle.esbundleTamaguiConfig)({
@@ -342,6 +344,7 @@ async function bundleConfig(props, rebuild = false) {
342
344
  absWorkingDir: root,
343
345
  metafile: true,
344
346
  dangerouslyIgnoreStaticEvaluationModules: props.dangerouslyIgnoreStaticEvaluationModules,
347
+ nativePlatform: props.nativePlatform,
345
348
  ...esbuildExtraOptions
346
349
  }, props.platform || "web");
347
350
  })]);
@@ -488,7 +491,10 @@ async function evaluateComponentModule(props, id) {
488
491
  const previousIsServer = process.env.TAMAGUI_IS_SERVER;
489
492
  process.env.IS_STATIC = "is_static";
490
493
  process.env.TAMAGUI_IS_SERVER = "true";
491
- const { unregister } = (0, import_registerRequire.registerRequire)(props.platform || "web", { ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules });
494
+ const { unregister } = (0, import_registerRequire.registerRequire)(props.platform || "web", {
495
+ ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,
496
+ nativePlatform: props.nativePlatform
497
+ });
492
498
  try {
493
499
  try {
494
500
  return nodeRequire(id);
@@ -527,13 +533,17 @@ async function loadComponentsInner(props, forceExports = false) {
527
533
  const componentsModules = props.components || [];
528
534
  const key = JSON.stringify([
529
535
  props.platform,
536
+ props.nativePlatform,
530
537
  componentsModules,
531
538
  props.dangerouslyIgnoreStaticEvaluationModules
532
539
  ]);
533
540
  if (!forceExports && cacheComponents[key]) {
534
541
  return cacheComponents[key];
535
542
  }
536
- const { unregister } = (0, import_registerRequire.registerRequire)(props.platform || "web", { ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules });
543
+ const { unregister } = (0, import_registerRequire.registerRequire)(props.platform || "web", {
544
+ ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,
545
+ nativePlatform: props.nativePlatform
546
+ });
537
547
  try {
538
548
  const results = [];
539
549
  for (const name of componentsModules) {
@@ -632,13 +642,17 @@ function loadComponentsInnerSync(props, forceExports = false) {
632
642
  const componentsModules = props.components || [];
633
643
  const key = JSON.stringify([
634
644
  props.platform,
645
+ props.nativePlatform,
635
646
  componentsModules,
636
647
  props.dangerouslyIgnoreStaticEvaluationModules
637
648
  ]);
638
649
  if (!forceExports && cacheComponents[key]) {
639
650
  return cacheComponents[key];
640
651
  }
641
- const { unregister } = (0, import_registerRequire.registerRequire)(props.platform || "web", { ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules });
652
+ const { unregister } = (0, import_registerRequire.registerRequire)(props.platform || "web", {
653
+ ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,
654
+ nativePlatform: props.nativePlatform
655
+ });
642
656
  try {
643
657
  const info = componentsModules.flatMap((name) => {
644
658
  const extension = (0, import_node_path.extname)(name);
@@ -248,7 +248,10 @@ function loadTamaguiSync({ forceExports, cacheKey, ...propsIn }) {
248
248
  const previousDev = globalThis["__DEV__"];
249
249
  process.env.IS_STATIC = "is_static";
250
250
  process.env.TAMAGUI_IS_SERVER = "true";
251
- const { unregister } = (0, import_registerRequire.registerRequire)(props.platform || "web", { ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules });
251
+ const { unregister } = (0, import_registerRequire.registerRequire)(props.platform || "web", {
252
+ ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,
253
+ nativePlatform: props.nativePlatform
254
+ });
252
255
  try {
253
256
  globalThis["__DEV__"] = process.env.NODE_ENV === "development";
254
257
  let tamaguiConfig = null;
@@ -22,6 +22,7 @@ var registerRequire_exports = {};
22
22
  __export(registerRequire_exports, {
23
23
  getNameToPaths: () => getNameToPaths,
24
24
  registerRequire: () => registerRequire,
25
+ requireNativeEvaluationModule: () => requireNativeEvaluationModule,
25
26
  setRequireResult: () => setRequireResult
26
27
  });
27
28
  module.exports = __toCommonJS(registerRequire_exports);
@@ -31,6 +32,7 @@ var import_node = require("esbuild-register/dist/node");
31
32
  var import_node_module = require("node:module");
32
33
  var import_bundle = require("./extractor/bundle.cjs");
33
34
  var import_requireTamaguiCore = require("./helpers/requireTamaguiCore.cjs");
35
+ var import_nativeColors = require("@tamagui/react-native-web-lite/nativeColors");
34
36
  var import_staticEvaluationIgnoredModules = require("./staticEvaluationIgnoredModules.cjs");
35
37
  const import_meta = {};
36
38
  const nameToPaths = {};
@@ -59,6 +61,14 @@ const compiled = {};
59
61
  function setRequireResult(name, result) {
60
62
  compiled[name] = result;
61
63
  }
64
+ function requireNativeEvaluationModule(modulePath, nativePlatform) {
65
+ const registration = registerRequire("native", { nativePlatform });
66
+ try {
67
+ return nodeRequire(modulePath);
68
+ } finally {
69
+ registration.unregister();
70
+ }
71
+ }
62
72
  function getStaticExtractionStub(path) {
63
73
  switch (path) {
64
74
  case "expo-constants": return {
@@ -112,7 +122,7 @@ function getStaticExtractionStub(path) {
112
122
  default: return null;
113
123
  }
114
124
  }
115
- function registerRequire(platform, { ignoredModules = [] } = { ignoredModules: [] }) {
125
+ function registerRequire(platform, { ignoredModules = [], nativePlatform } = { ignoredModules: [] }) {
116
126
  if (isRegistered) {
117
127
  return {
118
128
  tamaguiRequire: nodeRequire,
@@ -141,6 +151,7 @@ function registerRequire(platform, { ignoredModules = [] } = { ignoredModules: [
141
151
  }
142
152
  isRegistered = true;
143
153
  Module.prototype.require = tamaguiRequire;
154
+ let nativeModule;
144
155
  function tamaguiRequire(path) {
145
156
  const staticExtractionStub = getStaticExtractionStub(path);
146
157
  if (staticExtractionStub) {
@@ -188,6 +199,12 @@ function registerRequire(platform, { ignoredModules = [] } = { ignoredModules: [
188
199
  if (path === "react-native/package.json") {
189
200
  return og.apply(this, ["react-native-web/package.json"]);
190
201
  }
202
+ if (platform === "native" && path === "react-native") {
203
+ return nativeModule ||= {
204
+ ...og.apply(this, ["@tamagui/react-native-web-lite"]),
205
+ ...(0, import_nativeColors.getNativeColorFactories)(nativePlatform || process.env.EXPO_OS || "ios")
206
+ };
207
+ }
191
208
  if (path === "@tamagui/react-native-web-lite" || path === "react-native" || path.startsWith("react-native/") || path === "react-native-web" || path.startsWith("react-native-web/")) {
192
209
  try {
193
210
  return og.apply("react-native");
@@ -37,7 +37,7 @@ const esbuildLoaderConfig = {
37
37
  };
38
38
  const dataExtensions = Object.keys(esbuildLoaderConfig).filter((k) => esbuildLoaderConfig[k] === "file" || esbuildLoaderConfig[k] === "dataurl").map((k) => k.slice(1));
39
39
  const esbuildIgnoreFilesRegex = new RegExp(`.(${dataExtensions.join("|")})$`, "i");
40
- function getESBuildConfig({ entryPoints, resolvePlatformSpecificEntries, dangerouslyIgnoreStaticEvaluationModules = [], define: callerDefine, conditions: callerConditions = [], ...options }, platform, aliases) {
40
+ function getESBuildConfig({ entryPoints, resolvePlatformSpecificEntries, dangerouslyIgnoreStaticEvaluationModules = [], nativePlatform, define: callerDefine, conditions: callerConditions = [], ...options }, platform, aliases) {
41
41
  if (process.env.DEBUG?.startsWith("tamagui")) {
42
42
  console.info(`Building`, entryPoints);
43
43
  }
@@ -136,6 +136,22 @@ function getESBuildConfig({ entryPoints, resolvePlatformSpecificEntries, dangero
136
136
  {
137
137
  name: "external",
138
138
  setup(build) {
139
+ if (platform === "native") {
140
+ build.onResolve({ filter: /^react-native$/ }, () => ({
141
+ path: "react-native",
142
+ namespace: "tamagui-native-evaluation"
143
+ }));
144
+ build.onLoad({
145
+ filter: /.*/,
146
+ namespace: "tamagui-native-evaluation"
147
+ }, () => ({
148
+ contents: `export * from ${JSON.stringify(nodeRequire.resolve("@tamagui/react-native-web-lite"))}
149
+ import { getNativeColorFactories } from ${JSON.stringify(nodeRequire.resolve("@tamagui/react-native-web-lite/nativeColors"))}
150
+ export const { PlatformColor, DynamicColorIOS } = getNativeColorFactories(${JSON.stringify(nativePlatform || process.env.EXPO_OS || "ios")})`,
151
+ loader: "js",
152
+ resolveDir: build.initialOptions.absWorkingDir || process.cwd()
153
+ }));
154
+ }
139
155
  build.onResolve({ filter: /^@tamagui\/(core|web)$/ }, (args) => {
140
156
  if (args.kind === "entry-point") {
141
157
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"bundle.js","names":[],"sources":["esm/extractor/bundle.js"],"sourcesContent":["import { randomBytes } from \"node:crypto\";\nimport { readFileSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport esbuild from \"esbuild\";\nimport FS from \"fs-extra\";\nimport { staticEvaluationIgnorePlugin } from \"../staticEvaluationIgnoredModules\";\nimport { detectModuleFormat } from \"./detectModuleFormat\";\nimport { esbuildAliasPlugin } from \"./esbuildAliasPlugin\";\nimport { resolveWebOrNativeSpecificEntry } from \"./loadTamagui\";\nimport { TsconfigPathsPlugin } from \"./esbuildTsconfigPaths\";\nconst nodeRequire = createRequire(\n typeof __filename === \"string\" ? __filename : import.meta.url\n);\nconst esbuildLoaderConfig = {\n \".js\": \"jsx\",\n \".png\": \"dataurl\",\n \".jpg\": \"dataurl\",\n \".jpeg\": \"dataurl\",\n \".svg\": \"dataurl\",\n \".gif\": \"dataurl\",\n \".webp\": \"dataurl\",\n \".woff2\": \"dataurl\",\n \".woff\": \"dataurl\",\n \".eot\": \"dataurl\",\n \".otf\": \"dataurl\",\n \".ttf\": \"dataurl\",\n \".mp4\": \"file\",\n \".mpeg4\": \"file\",\n \".mov\": \"file\",\n \".avif\": \"file\",\n \".wmv\": \"file\",\n \".webm\": \"file\",\n \".wav\": \"file\",\n \".aac\": \"file\",\n \".ogg\": \"file\",\n \".flac\": \"file\",\n \".node\": \"empty\"\n};\nconst dataExtensions = Object.keys(esbuildLoaderConfig).filter(\n (k) => esbuildLoaderConfig[k] === \"file\" || esbuildLoaderConfig[k] === \"dataurl\"\n).map((k) => k.slice(1));\nconst esbuildIgnoreFilesRegex = new RegExp(`.(${dataExtensions.join(\"|\")})$`, \"i\");\nfunction getESBuildConfig({\n entryPoints,\n resolvePlatformSpecificEntries,\n dangerouslyIgnoreStaticEvaluationModules = [],\n define: callerDefine,\n conditions: callerConditions = [],\n ...options\n}, platform, aliases) {\n if (process.env.DEBUG?.startsWith(\"tamagui\")) {\n console.info(`Building`, entryPoints);\n }\n const resolvedEntryPoints = !resolvePlatformSpecificEntries ? entryPoints : entryPoints.map((entry) => resolveWebOrNativeSpecificEntry(entry, platform));\n const detectedFormat = options.format || detectEntryFormat(resolvedEntryPoints[0]);\n const platformDefines = platform === \"web\" ? {\n \"process.env.TAMAGUI_TARGET\": '\"web\"',\n \"process.env.EXPO_OS\": '\"web\"'\n } : {\n \"process.env.TAMAGUI_TARGET\": '\"native\"'\n // EXPO_OS doesn't have a useful \"native\" value (it's ios/android),\n // so leave it alone here and let the consumer set it if needed.\n };\n const res = {\n bundle: true,\n entryPoints: resolvedEntryPoints,\n format: detectedFormat,\n define: {\n ...platformDefines,\n ...callerDefine\n },\n conditions: [\n \"tamagui-compiler\",\n ...platform === \"native\" ? [\"react-native\"] : [],\n ...callerConditions\n ],\n ...platform === \"native\" ? {\n mainFields: [\"react-native\", \"module\", \"main\"]\n } : {},\n // for ESM: prefer \"module\" field for resolution, add require() shim for bundled CJS deps\n ...detectedFormat === \"esm\" ? {\n ...platform === \"web\" ? { mainFields: [\"module\", \"main\"] } : {},\n banner: {\n js: 'import { createRequire as __cr } from \"module\"; const require = __cr(import.meta.url);'\n }\n } : {},\n target: \"node24\",\n jsx: \"transform\",\n jsxFactory: \"react\",\n allowOverwrite: true,\n keepNames: true,\n resolveExtensions: [\n ...platform === \"web\" ? [\".web.tsx\", \".web.ts\", \".web.jsx\", \".web.js\"] : [\".native.tsx\", \".native.ts\", \".native.jsx\", \".native.js\"],\n \".tsx\",\n \".ts\",\n \".jsx\",\n \".js\"\n ],\n platform: \"node\",\n tsconfigRaw: {\n compilerOptions: {\n jsx: \"react-jsx\"\n }\n },\n loader: esbuildLoaderConfig,\n logLevel: \"warning\",\n plugins: [\n TsconfigPathsPlugin(),\n staticEvaluationIgnorePlugin(dangerouslyIgnoreStaticEvaluationModules),\n // handle ESM-only features that can't be used with CJS output\n {\n name: \"handle-esm-features\",\n setup(build) {\n const isCjs = build.initialOptions.format === \"cjs\" || !build.initialOptions.format;\n build.onLoad({ filter: /\\.(ts|tsx|js|jsx|mjs)$/ }, (args) => {\n if (!isCjs) {\n return null;\n }\n if (args.path.includes(\"node_modules\") && !args.path.includes(\"@tamagui\")) {\n return null;\n }\n let contents = readFileSync(args.path, \"utf8\");\n let modified = false;\n if (contents.includes(\"import.meta.env\")) {\n contents = contents.replace(/import\\.meta\\.env/g, \"process.env\");\n modified = true;\n }\n if (contents.includes(\"import.meta.url\")) {\n contents = contents.replace(/import\\.meta\\.url/g, '\"\"');\n modified = true;\n }\n if (contents.includes(\"import.meta.main\")) {\n contents = contents.replace(/import\\.meta\\.main/g, \"false\");\n modified = true;\n }\n if (modified) {\n return {\n contents,\n loader: args.path.endsWith(\".tsx\") ? \"tsx\" : args.path.endsWith(\".ts\") ? \"ts\" : args.path.endsWith(\".jsx\") ? \"jsx\" : \"js\"\n };\n }\n return null;\n });\n }\n },\n {\n name: \"external\",\n setup(build) {\n build.onResolve({ filter: /^@tamagui\\/(core|web)$/ }, (args) => {\n if (args.kind === \"entry-point\") {\n return null;\n }\n return {\n path: platform === \"native\" ? \"@tamagui/core/native\" : args.path,\n external: true\n };\n });\n build.onResolve({ filter: /react-native\\/package.json$/ }, () => {\n return {\n path: \"react-native/package.json\",\n external: true\n };\n });\n build.onResolve({ filter: /^(react-native|react-native\\/.*)$/ }, (args) => {\n return {\n path: args.path.replace(/^react-native/, \"@tamagui/react-native-web-lite\"),\n external: true\n };\n });\n build.onResolve({ filter: /^(framer-motion|motion)/ }, (args) => {\n return {\n path: args.path,\n external: true\n };\n });\n }\n },\n esbuildAliasPlugin({\n ...aliases\n })\n ],\n ...options\n };\n return res;\n}\nfunction detectEntryFormat(entryPoint) {\n if (entryPoint.startsWith(\"/\") || entryPoint.startsWith(\".\")) {\n return detectModuleFormat(entryPoint);\n }\n try {\n const pkgJsonPath = nodeRequire.resolve(entryPoint + \"/package.json\");\n const pkg = JSON.parse(readFileSync(pkgJsonPath, \"utf-8\"));\n return pkg.type === \"module\" ? \"esm\" : \"cjs\";\n } catch {\n return \"cjs\";\n }\n}\nasync function esbundleTamaguiConfig(props, platform, aliases) {\n const config = getESBuildConfig(props, platform, aliases);\n const tmpFile = `${props.outfile}.tmp.${process.pid}-${randomBytes(6).toString(\"hex\")}`;\n const result = await esbuild.build({\n ...config,\n outfile: tmpFile\n }).catch(async (err) => {\n await FS.remove(tmpFile).catch(() => {\n });\n throw err;\n });\n await FS.rename(tmpFile, props.outfile);\n return result;\n}\nexport {\n esbuildIgnoreFilesRegex,\n esbuildLoaderConfig,\n esbundleTamaguiConfig\n};\n//# sourceMappingURL=bundle.js.map\n"],"mappings":";;;;;;;;;;;;AAUA,MAAM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QAAQ,MAAM;EACjC,GAAG;EACH,SAAS;CACX,CAAC,CAAC,CAAC,MAAM,OAAO,QAAQ;EACtB,MAAM,GAAG,OAAO,OAAO,CAAC,CAAC,YAAY,CACrC,CAAC;EACD,MAAM;CACR,CAAC;CACD,MAAM,GAAG,OAAO,SAAS,MAAM,OAAO;CACtC,OAAO;AACT"}
1
+ {"version":3,"file":"bundle.js","names":[],"sources":["esm/extractor/bundle.js"],"sourcesContent":["import { randomBytes } from \"node:crypto\";\nimport { readFileSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport esbuild from \"esbuild\";\nimport FS from \"fs-extra\";\nimport { staticEvaluationIgnorePlugin } from \"../staticEvaluationIgnoredModules\";\nimport { detectModuleFormat } from \"./detectModuleFormat\";\nimport { esbuildAliasPlugin } from \"./esbuildAliasPlugin\";\nimport { resolveWebOrNativeSpecificEntry } from \"./loadTamagui\";\nimport { TsconfigPathsPlugin } from \"./esbuildTsconfigPaths\";\nconst nodeRequire = createRequire(\n typeof __filename === \"string\" ? __filename : import.meta.url\n);\nconst esbuildLoaderConfig = {\n \".js\": \"jsx\",\n \".png\": \"dataurl\",\n \".jpg\": \"dataurl\",\n \".jpeg\": \"dataurl\",\n \".svg\": \"dataurl\",\n \".gif\": \"dataurl\",\n \".webp\": \"dataurl\",\n \".woff2\": \"dataurl\",\n \".woff\": \"dataurl\",\n \".eot\": \"dataurl\",\n \".otf\": \"dataurl\",\n \".ttf\": \"dataurl\",\n \".mp4\": \"file\",\n \".mpeg4\": \"file\",\n \".mov\": \"file\",\n \".avif\": \"file\",\n \".wmv\": \"file\",\n \".webm\": \"file\",\n \".wav\": \"file\",\n \".aac\": \"file\",\n \".ogg\": \"file\",\n \".flac\": \"file\",\n \".node\": \"empty\"\n};\nconst dataExtensions = Object.keys(esbuildLoaderConfig).filter(\n (k) => esbuildLoaderConfig[k] === \"file\" || esbuildLoaderConfig[k] === \"dataurl\"\n).map((k) => k.slice(1));\nconst esbuildIgnoreFilesRegex = new RegExp(`.(${dataExtensions.join(\"|\")})$`, \"i\");\nfunction getESBuildConfig({\n entryPoints,\n resolvePlatformSpecificEntries,\n dangerouslyIgnoreStaticEvaluationModules = [],\n nativePlatform,\n define: callerDefine,\n conditions: callerConditions = [],\n ...options\n}, platform, aliases) {\n if (process.env.DEBUG?.startsWith(\"tamagui\")) {\n console.info(`Building`, entryPoints);\n }\n const resolvedEntryPoints = !resolvePlatformSpecificEntries ? entryPoints : entryPoints.map((entry) => resolveWebOrNativeSpecificEntry(entry, platform));\n const detectedFormat = options.format || detectEntryFormat(resolvedEntryPoints[0]);\n const platformDefines = platform === \"web\" ? {\n \"process.env.TAMAGUI_TARGET\": '\"web\"',\n \"process.env.EXPO_OS\": '\"web\"'\n } : {\n \"process.env.TAMAGUI_TARGET\": '\"native\"'\n // EXPO_OS doesn't have a useful \"native\" value (it's ios/android),\n // so leave it alone here and let the consumer set it if needed.\n };\n const res = {\n bundle: true,\n entryPoints: resolvedEntryPoints,\n format: detectedFormat,\n define: {\n ...platformDefines,\n ...callerDefine\n },\n conditions: [\n \"tamagui-compiler\",\n ...platform === \"native\" ? [\"react-native\"] : [],\n ...callerConditions\n ],\n ...platform === \"native\" ? {\n mainFields: [\"react-native\", \"module\", \"main\"]\n } : {},\n // for ESM: prefer \"module\" field for resolution, add require() shim for bundled CJS deps\n ...detectedFormat === \"esm\" ? {\n ...platform === \"web\" ? { mainFields: [\"module\", \"main\"] } : {},\n banner: {\n js: 'import { createRequire as __cr } from \"module\"; const require = __cr(import.meta.url);'\n }\n } : {},\n target: \"node24\",\n jsx: \"transform\",\n jsxFactory: \"react\",\n allowOverwrite: true,\n keepNames: true,\n resolveExtensions: [\n ...platform === \"web\" ? [\".web.tsx\", \".web.ts\", \".web.jsx\", \".web.js\"] : [\".native.tsx\", \".native.ts\", \".native.jsx\", \".native.js\"],\n \".tsx\",\n \".ts\",\n \".jsx\",\n \".js\"\n ],\n platform: \"node\",\n tsconfigRaw: {\n compilerOptions: {\n jsx: \"react-jsx\"\n }\n },\n loader: esbuildLoaderConfig,\n logLevel: \"warning\",\n plugins: [\n TsconfigPathsPlugin(),\n staticEvaluationIgnorePlugin(dangerouslyIgnoreStaticEvaluationModules),\n // handle ESM-only features that can't be used with CJS output\n {\n name: \"handle-esm-features\",\n setup(build) {\n const isCjs = build.initialOptions.format === \"cjs\" || !build.initialOptions.format;\n build.onLoad({ filter: /\\.(ts|tsx|js|jsx|mjs)$/ }, (args) => {\n if (!isCjs) {\n return null;\n }\n if (args.path.includes(\"node_modules\") && !args.path.includes(\"@tamagui\")) {\n return null;\n }\n let contents = readFileSync(args.path, \"utf8\");\n let modified = false;\n if (contents.includes(\"import.meta.env\")) {\n contents = contents.replace(/import\\.meta\\.env/g, \"process.env\");\n modified = true;\n }\n if (contents.includes(\"import.meta.url\")) {\n contents = contents.replace(/import\\.meta\\.url/g, '\"\"');\n modified = true;\n }\n if (contents.includes(\"import.meta.main\")) {\n contents = contents.replace(/import\\.meta\\.main/g, \"false\");\n modified = true;\n }\n if (modified) {\n return {\n contents,\n loader: args.path.endsWith(\".tsx\") ? \"tsx\" : args.path.endsWith(\".ts\") ? \"ts\" : args.path.endsWith(\".jsx\") ? \"jsx\" : \"js\"\n };\n }\n return null;\n });\n }\n },\n {\n name: \"external\",\n setup(build) {\n if (platform === \"native\") {\n build.onResolve({ filter: /^react-native$/ }, () => ({\n path: \"react-native\",\n namespace: \"tamagui-native-evaluation\"\n }));\n build.onLoad(\n { filter: /.*/, namespace: \"tamagui-native-evaluation\" },\n () => ({\n // resolve from the compiler and bundle only the pure native color helper.\n contents: `export * from ${JSON.stringify(nodeRequire.resolve(\"@tamagui/react-native-web-lite\"))}\nimport { getNativeColorFactories } from ${JSON.stringify(nodeRequire.resolve(\"@tamagui/react-native-web-lite/nativeColors\"))}\nexport const { PlatformColor, DynamicColorIOS } = getNativeColorFactories(${JSON.stringify(nativePlatform || process.env.EXPO_OS || \"ios\")})`,\n loader: \"js\",\n resolveDir: build.initialOptions.absWorkingDir || process.cwd()\n })\n );\n }\n build.onResolve({ filter: /^@tamagui\\/(core|web)$/ }, (args) => {\n if (args.kind === \"entry-point\") {\n return null;\n }\n return {\n path: platform === \"native\" ? \"@tamagui/core/native\" : args.path,\n external: true\n };\n });\n build.onResolve({ filter: /react-native\\/package.json$/ }, () => {\n return {\n path: \"react-native/package.json\",\n external: true\n };\n });\n build.onResolve({ filter: /^(react-native|react-native\\/.*)$/ }, (args) => {\n return {\n path: args.path.replace(/^react-native/, \"@tamagui/react-native-web-lite\"),\n external: true\n };\n });\n build.onResolve({ filter: /^(framer-motion|motion)/ }, (args) => {\n return {\n path: args.path,\n external: true\n };\n });\n }\n },\n esbuildAliasPlugin({\n ...aliases\n })\n ],\n ...options\n };\n return res;\n}\nfunction detectEntryFormat(entryPoint) {\n if (entryPoint.startsWith(\"/\") || entryPoint.startsWith(\".\")) {\n return detectModuleFormat(entryPoint);\n }\n try {\n const pkgJsonPath = nodeRequire.resolve(entryPoint + \"/package.json\");\n const pkg = JSON.parse(readFileSync(pkgJsonPath, \"utf-8\"));\n return pkg.type === \"module\" ? \"esm\" : \"cjs\";\n } catch {\n return \"cjs\";\n }\n}\nasync function esbundleTamaguiConfig(props, platform, aliases) {\n const config = getESBuildConfig(props, platform, aliases);\n const tmpFile = `${props.outfile}.tmp.${process.pid}-${randomBytes(6).toString(\"hex\")}`;\n const result = await esbuild.build({\n ...config,\n outfile: tmpFile\n }).catch(async (err) => {\n await FS.remove(tmpFile).catch(() => {\n });\n throw err;\n });\n await FS.rename(tmpFile, props.outfile);\n return result;\n}\nexport {\n esbuildIgnoreFilesRegex,\n esbuildLoaderConfig,\n esbundleTamaguiConfig\n};\n//# sourceMappingURL=bundle.js.map\n"],"mappings":";;;;;;;;;;;;AAUA,MAAM,cAAc,cAClB,OAAO,eAAe,WAAW,aAAa,YAAY,GAC5D;AACA,MAAM,sBAAsB;CAC1B,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,QAAQ;CACR,Q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AC;EACzD,OAAO,IAAI,SAAS,WAAW,QAAQ;CACzC,QAAQ;EACN,OAAO;CACT;AACF;AACA,eAAe,sBAAsB,OAAO,UAAU,SAAS;CAC7D,MAAM,SAAS,iBAAiB,OAAO,UAAU,OAAO;CACxD,MAAM,UAAU,GAAG,MAAM,QAAQ,OAAO,QAAQ,IAAI,GAAG,YAAY,CAAC,CAAC,CAAC,SAAS,KAAK;CACpF,MAAM,SAAS,MAAM,QAAQ,MAAM;EACjC,GAAG;EACH,SAAS;CACX,CAAC,CAAC,CAAC,MAAM,OAAO,QAAQ;EACtB,MAAM,GAAG,OAAO,OAAO,CAAC,CAAC,YAAY,CACrC,CAAC;EACD,MAAM;CACR,CAAC;CACD,MAAM,GAAG,OAAO,SAAS,MAAM,OAAO;CACtC,OAAO;AACT"}
@@ -138,6 +138,7 @@ function getBundleKey(props) {
138
138
  components: props.components,
139
139
  config: props.config,
140
140
  platform: props.platform,
141
+ nativePlatform: props.nativePlatform,
141
142
  dangerouslyIgnoreStaticEvaluationModules: props.dangerouslyIgnoreStaticEvaluationModules
142
143
  });
143
144
  }
@@ -233,7 +234,7 @@ async function bundleConfig(props, rebuild = false) {
233
234
  isBundling = true;
234
235
  const rootRequire = createRequire(join(root, "package.json"));
235
236
  const tmpDir = join(root, ".tamagui");
236
- const platformSuffix = (props.platform || "web") === "native" ? ".native" : ".web";
237
+ const platformSuffix = props.platform === "native" ? `.native${props.nativePlatform ? `.${props.nativePlatform}` : ""}` : ".web";
237
238
  const configFormat = configEntry ? detectModuleFormat(configEntry) : "cjs";
238
239
  const configExt = configFormat === "esm" ? ".mjs" : ".cjs";
239
240
  const configOutPath = join(tmpDir, `tamagui.config${platformSuffix}${configExt}`);
@@ -286,6 +287,7 @@ async function bundleConfig(props, rebuild = false) {
286
287
  absWorkingDir: root,
287
288
  metafile: true,
288
289
  dangerouslyIgnoreStaticEvaluationModules: props.dangerouslyIgnoreStaticEvaluationModules,
290
+ nativePlatform: props.nativePlatform,
289
291
  ...esbuildExtraOptions
290
292
  }, props.platform || "web") : null, ...baseComponents.map((componentModule, i) => {
291
293
  return esbundleTamaguiConfig({
@@ -298,6 +300,7 @@ async function bundleConfig(props, rebuild = false) {
298
300
  absWorkingDir: root,
299
301
  metafile: true,
300
302
  dangerouslyIgnoreStaticEvaluationModules: props.dangerouslyIgnoreStaticEvaluationModules,
303
+ nativePlatform: props.nativePlatform,
301
304
  ...esbuildExtraOptions
302
305
  }, props.platform || "web");
303
306
  })]);
@@ -444,7 +447,10 @@ async function evaluateComponentModule(props, id) {
444
447
  const previousIsServer = process.env.TAMAGUI_IS_SERVER;
445
448
  process.env.IS_STATIC = "is_static";
446
449
  process.env.TAMAGUI_IS_SERVER = "true";
447
- const { unregister } = registerRequire(props.platform || "web", { ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules });
450
+ const { unregister } = registerRequire(props.platform || "web", {
451
+ ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,
452
+ nativePlatform: props.nativePlatform
453
+ });
448
454
  try {
449
455
  try {
450
456
  return nodeRequire(id);
@@ -483,13 +489,17 @@ async function loadComponentsInner(props, forceExports = false) {
483
489
  const componentsModules = props.components || [];
484
490
  const key = JSON.stringify([
485
491
  props.platform,
492
+ props.nativePlatform,
486
493
  componentsModules,
487
494
  props.dangerouslyIgnoreStaticEvaluationModules
488
495
  ]);
489
496
  if (!forceExports && cacheComponents[key]) {
490
497
  return cacheComponents[key];
491
498
  }
492
- const { unregister } = registerRequire(props.platform || "web", { ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules });
499
+ const { unregister } = registerRequire(props.platform || "web", {
500
+ ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,
501
+ nativePlatform: props.nativePlatform
502
+ });
493
503
  try {
494
504
  const results = [];
495
505
  for (const name of componentsModules) {
@@ -588,13 +598,17 @@ function loadComponentsInnerSync(props, forceExports = false) {
588
598
  const componentsModules = props.components || [];
589
599
  const key = JSON.stringify([
590
600
  props.platform,
601
+ props.nativePlatform,
591
602
  componentsModules,
592
603
  props.dangerouslyIgnoreStaticEvaluationModules
593
604
  ]);
594
605
  if (!forceExports && cacheComponents[key]) {
595
606
  return cacheComponents[key];
596
607
  }
597
- const { unregister } = registerRequire(props.platform || "web", { ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules });
608
+ const { unregister } = registerRequire(props.platform || "web", {
609
+ ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,
610
+ nativePlatform: props.nativePlatform
611
+ });
598
612
  try {
599
613
  const info = componentsModules.flatMap((name) => {
600
614
  const extension = extname(name);
@@ -1 +1 @@
1
- {"version":3,"file":"bundleConfig.js","names":[],"sources":["esm/extractor/bundleConfig.js"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { createRequire } from \"node:module\";\nimport { existsSync, readFileSync, unlinkSync } from \"node:fs\";\nimport {\n basename,\n dirname,\n extname,\n isAbsolute,\n join,\n relative,\n resolve,\n sep\n} from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { Color, colorLog } from \"@tamagui/cli-color\";\nimport esbuild from \"esbuild\";\nimport FS from \"fs-extra\";\nimport { readFile } from \"node:fs/promises\";\nimport { registerRequire, setRequireResult } from \"../registerRequire\";\nimport { addLocalExports } from \"./addLocalExports\";\nimport { esbuildLoaderConfig, esbundleTamaguiConfig } from \"./bundle\";\nimport { getTamaguiConfigPathFromOptionsConfig } from \"./getTamaguiConfigPathFromOptionsConfig\";\nimport { requireTamaguiCore } from \"../helpers/requireTamaguiCore\";\nimport { detectModuleFormat } from \"./detectModuleFormat\";\nimport { staticEvaluationIgnorePlugin } from \"../staticEvaluationIgnoredModules\";\nconst nodeRequire = createRequire(\n typeof __filename === \"string\" ? __filename : import.meta.url\n);\nconst componentDisplayName = /* @__PURE__ */ Symbol.for(\"tamagui.componentDisplayName\");\nconst activeTempFiles = /* @__PURE__ */ new Set();\nfunction getDynamicEvalOutfile(name, format, contents) {\n const ext = format === \"esm\" ? \"mjs\" : \"cjs\";\n const hash = createHash(\"sha1\").update(name).update(\"\\0\").update(format).update(\"\\0\").update(contents).digest(\"hex\").slice(0, 10);\n return join(process.cwd(), \".tamagui\", `dynamic-eval-${hash}-${basename(name)}.${ext}`);\n}\nfunction getEsbuildStdinLoader(filePath) {\n if (filePath.endsWith(\".tsx\")) return \"tsx\";\n if (filePath.endsWith(\".ts\")) return \"ts\";\n if (filePath.endsWith(\".jsx\")) return \"jsx\";\n return \"js\";\n}\nfunction resolvePackageEntry(packageName, format) {\n if (format === \"cjs\") {\n return nodeRequire.resolve(packageName);\n }\n const packageJsonPath = nodeRequire.resolve(`${packageName}/package.json`);\n const packageJson = JSON.parse(readFileSync(packageJsonPath, \"utf-8\"));\n const packageRoot = dirname(packageJsonPath);\n const exportEntry = packageJson.exports?.[\".\"];\n const esmEntry = exportEntry?.import || exportEntry?.module || exportEntry?.browser || packageJson.module;\n if (typeof esmEntry === \"string\") {\n return join(packageRoot, esmEntry);\n }\n return nodeRequire.resolve(packageName);\n}\nfunction cleanupTempFiles() {\n for (const f of activeTempFiles) {\n try {\n unlinkSync(f);\n } catch {\n }\n }\n activeTempFiles.clear();\n}\nprocess.on(\"exit\", cleanupTempFiles);\nprocess.on(\"SIGINT\", () => {\n cleanupTempFiles();\n process.exit();\n});\nprocess.on(\"SIGTERM\", () => {\n cleanupTempFiles();\n process.exit();\n});\nconst external = [\n \"@tamagui/core\",\n \"@tamagui/web\",\n \"react\",\n \"react-dom\",\n \"react-native-svg\"\n];\nconst esbuildExtraOptions = {\n define: {\n __DEV__: `${process.env.NODE_ENV === \"development\"}`\n }\n};\nconst handleEsmFeaturesPlugin = {\n name: \"handle-esm-features\",\n setup(build) {\n const isCjs = build.initialOptions.format === \"cjs\" || !build.initialOptions.format;\n build.onLoad({ filter: /\\.(ts|tsx|js|jsx|mjs)$/ }, (args) => {\n if (!isCjs) {\n return null;\n }\n if (args.path.includes(\"node_modules\") && !args.path.includes(\"@tamagui\")) {\n return null;\n }\n let contents = readFileSync(args.path, \"utf8\");\n let modified = false;\n if (contents.includes(\"import.meta.env\")) {\n contents = contents.replace(/import\\.meta\\.env/g, \"process.env\");\n modified = true;\n }\n if (contents.includes(\"import.meta.url\")) {\n contents = contents.replace(/import\\.meta\\.url/g, '\"\"');\n modified = true;\n }\n if (contents.includes(\"import.meta.main\")) {\n contents = contents.replace(/import\\.meta\\.main/g, \"false\");\n modified = true;\n }\n if (modified) {\n return {\n contents,\n loader: args.path.endsWith(\".tsx\") ? \"tsx\" : args.path.endsWith(\".ts\") ? \"ts\" : args.path.endsWith(\".jsx\") ? \"jsx\" : \"js\"\n };\n }\n return null;\n });\n }\n};\nconst esbuildTransformOptions = {\n target: \"es2022\",\n format: \"cjs\",\n jsx: \"automatic\",\n platform: \"node\",\n ...esbuildExtraOptions\n};\nconst esbuildOptions = {\n ...esbuildTransformOptions\n};\nconst esbuildOptionsWithPlugins = {\n ...esbuildTransformOptions,\n plugins: [handleEsmFeaturesPlugin]\n};\nlet currentBundle = null;\nlet currentBundleKey = \"\";\nlet isBundling = false;\nlet lastBundle = null;\nconst waitForBundle = /* @__PURE__ */ new Set();\nfunction hasBundledConfigChanged() {\n if (lastBundle === currentBundle) {\n return false;\n }\n lastBundle = currentBundle;\n return true;\n}\nlet loadedConfig = null;\nconst getLoadedConfig = () => loadedConfig;\nconst setLoadedConfig = (config) => {\n loadedConfig = config;\n};\nfunction getBundleKey(props) {\n return JSON.stringify({\n root: props.root,\n components: props.components,\n config: props.config,\n platform: props.platform,\n dangerouslyIgnoreStaticEvaluationModules: props.dangerouslyIgnoreStaticEvaluationModules\n });\n}\nfunction getPackageNameFromPath(modulePath) {\n const normalized = modulePath.split(sep).join(\"/\");\n const nodeModulesIndex = normalized.lastIndexOf(\"/node_modules/\");\n if (nodeModulesIndex === -1) {\n return normalized.startsWith(\".\") || isAbsolute(normalized) ? void 0 : normalized;\n }\n const packagePath = normalized.slice(nodeModulesIndex + \"/node_modules/\".length);\n const parts = packagePath.split(\"/\");\n return parts[0]?.startsWith(\"@\") ? parts.slice(0, 2).join(\"/\") : parts[0];\n}\nfunction findStaticEvaluationError(error) {\n let current = error;\n while (current instanceof Error) {\n if (\"code\" in current && current.code === \"TAMAGUI_STATIC_EVALUATION_ERROR\" && \"moduleName\" in current && \"importer\" in current && \"failedModule\" in current && \"reason\" in current) {\n return current;\n }\n current = current.cause;\n }\n}\nasync function getBundledConfig(props, rebuild = false) {\n const bundleKey = getBundleKey(props);\n if (isBundling) {\n await new Promise((res) => {\n waitForBundle.add(res);\n });\n }\n if (!currentBundle || currentBundleKey !== bundleKey || rebuild) {\n return await bundleConfig(props, rebuild);\n }\n return currentBundle;\n}\nglobal.tamaguiLastLoaded ||= 0;\nfunction updateLastLoaded(config, bundleKey) {\n global.tamaguiLastLoaded = Date.now();\n global.tamaguiLastBundledConfig = config;\n global.tamaguiLastBundledConfigKey = bundleKey;\n}\nlet hasBundledOnce = false;\nlet hasLoggedBuild = false;\nconst packageNameByDirectory = /* @__PURE__ */ new Map();\nfunction owningPackageName(file) {\n let directory = dirname(file);\n const walked = [];\n while (true) {\n const known = packageNameByDirectory.get(directory);\n if (known !== void 0) {\n for (const step of walked) packageNameByDirectory.set(step, known);\n return known;\n }\n walked.push(directory);\n const manifest = join(directory, \"package.json\");\n if (existsSync(manifest)) {\n let name = null;\n try {\n name = JSON.parse(readFileSync(manifest, \"utf-8\")).name ?? null;\n } catch {\n name = null;\n }\n for (const step of walked) packageNameByDirectory.set(step, name);\n return name;\n }\n const parent = dirname(directory);\n if (parent === directory) {\n for (const step of walked) packageNameByDirectory.set(step, null);\n return null;\n }\n directory = parent;\n }\n}\nfunction requiredTamaguiPackageFiles() {\n const found = [];\n for (const file of Object.keys(nodeRequire.cache)) {\n if (!file.includes(\".\")) continue;\n const name = owningPackageName(file);\n if (name === \"tamagui\" || name?.startsWith(\"@tamagui/\")) found.push(file);\n }\n return found;\n}\nasync function bundleConfig(props, rebuild = false) {\n const bundleKey = getBundleKey(props);\n const root = props.root || process.cwd();\n const configEntry = props.config ? getTamaguiConfigPathFromOptionsConfig(props.config, root) : \"\";\n const baseComponents = (props.components || []).filter((x) => x !== \"@tamagui/core\");\n let componentOutPaths = [];\n let componentImports = [];\n if (!rebuild && global.tamaguiLastBundledConfig && global.tamaguiLastBundledConfigKey === bundleKey && Date.now() - global.tamaguiLastLoaded < 3e3) {\n return global.tamaguiLastBundledConfig;\n }\n try {\n isBundling = true;\n const rootRequire = createRequire(join(root, \"package.json\"));\n const tmpDir = join(root, \".tamagui\");\n const platformSuffix = (props.platform || \"web\") === \"native\" ? \".native\" : \".web\";\n const configFormat = configEntry ? detectModuleFormat(configEntry) : \"cjs\";\n const configExt = configFormat === \"esm\" ? \".mjs\" : \".cjs\";\n const configOutPath = join(tmpDir, `tamagui.config${platformSuffix}${configExt}`);\n const componentFormats = baseComponents.map((mod) => {\n try {\n let packageRoot = dirname(rootRequire.resolve(mod));\n while (!existsSync(join(packageRoot, \"package.json\"))) {\n const parent = dirname(packageRoot);\n if (parent === packageRoot) {\n return \"cjs\";\n }\n packageRoot = parent;\n }\n const pkg = JSON.parse(readFileSync(join(packageRoot, \"package.json\"), \"utf-8\"));\n return pkg.type === \"module\" ? \"esm\" : \"cjs\";\n } catch {\n return \"cjs\";\n }\n });\n componentOutPaths = baseComponents.map((componentModule, i) => {\n const ext = componentFormats[i] === \"esm\" ? \".mjs\" : \".cjs\";\n return join(\n tmpDir,\n `${componentModule.split(sep).join(\"-\").replace(/[^a-z0-9]+/gi, \"\")}-components.config${platformSuffix}${ext}`\n );\n });\n let compilerDependencies = currentBundle?.dependencies ?? [];\n if (process.env.NODE_ENV === \"development\" && process.env.DEBUG?.startsWith(\"tamagui\")) {\n console.info(`Building config entry`, configEntry);\n }\n let shouldBuild = rebuild || !props.disableInitialBuild;\n if (shouldBuild && props.config && !rebuild) {\n const allOutFiles = [configOutPath, ...componentOutPaths];\n try {\n const stats = await Promise.all(\n allOutFiles.map((f) => FS.stat(f).catch(() => null))\n );\n const allExistAndRecent = stats.every(\n (s) => s !== null && Date.now() - s.mtimeMs < 3e3\n );\n if (allExistAndRecent) {\n shouldBuild = false;\n }\n } catch {\n }\n }\n if (shouldBuild) {\n try {\n await FS.ensureDir(tmpDir);\n } catch {\n }\n const start = Date.now();\n const buildResults = await Promise.all([\n props.config ? esbundleTamaguiConfig(\n {\n entryPoints: [configEntry],\n external,\n outfile: configOutPath,\n target: \"node24\",\n format: configFormat,\n absWorkingDir: root,\n metafile: true,\n dangerouslyIgnoreStaticEvaluationModules: props.dangerouslyIgnoreStaticEvaluationModules,\n ...esbuildExtraOptions\n },\n props.platform || \"web\"\n ) : null,\n ...baseComponents.map((componentModule, i) => {\n return esbundleTamaguiConfig(\n {\n entryPoints: [componentModule],\n // bare packages must stay bare so esbuild can select their\n // react-native conditional export; local files still use siblings\n resolvePlatformSpecificEntries: props.platform !== \"native\" || componentModule.startsWith(\".\") || isAbsolute(componentModule),\n external,\n outfile: componentOutPaths[i],\n target: \"node24\",\n format: componentFormats[i],\n absWorkingDir: root,\n metafile: true,\n dangerouslyIgnoreStaticEvaluationModules: props.dangerouslyIgnoreStaticEvaluationModules,\n ...esbuildExtraOptions\n },\n props.platform || \"web\"\n );\n })\n ]);\n compilerDependencies = buildResults.flatMap(\n (result) => result?.metafile ? Object.keys(result.metafile.inputs).map((input) => resolve(root, input)) : []\n );\n componentImports = buildResults.slice(1).map((result) => {\n if (!result?.metafile) {\n return [];\n }\n const entryPoint = Object.values(result.metafile.outputs).find(\n (output) => output.entryPoint\n )?.entryPoint;\n if (!entryPoint) {\n return [];\n }\n return [\n ...new Set(\n result.metafile.inputs[entryPoint]?.imports.map((item) => getPackageNameFromPath(item.path)).filter((moduleName) => Boolean(moduleName)) || []\n )\n ];\n });\n if (!hasLoggedBuild && !props[\"_skipBuildLog\"]) {\n hasLoggedBuild = true;\n colorLog(\n Color.FgYellow,\n `\n \\u27A1 [tamagui] built config, components, prompt (${Date.now() - start}ms)`\n );\n if (process.env.DEBUG?.startsWith(\"tamagui\")) {\n colorLog(\n Color.Dim,\n `\n Config .${sep}${relative(root, configOutPath)}\n Components ${componentOutPaths.map((p) => `.${sep}${relative(root, p)}`).join(\"\\n \")}\n `\n );\n }\n }\n }\n if (hasBundledOnce) {\n try {\n delete nodeRequire.cache[nodeRequire.resolve(configOutPath)];\n } catch {\n }\n for (const p of componentOutPaths) {\n try {\n delete nodeRequire.cache[nodeRequire.resolve(p)];\n } catch {\n }\n }\n } else {\n hasBundledOnce = true;\n }\n let out;\n if (configFormat === \"esm\") {\n out = await import(`${pathToFileURL(configOutPath).href}?v=${FS.statSync(configOutPath).mtimeMs}`);\n } else {\n out = nodeRequire(configOutPath);\n }\n let config = out.default || out || out.config;\n if (config && config.config && !config.tokens) {\n config = config.config;\n }\n if (!config) {\n throw new Error(`No config: ${config}`);\n }\n loadedConfig = config;\n if (!config.parsed) {\n const { createTamagui } = requireTamaguiCore(props.platform || \"web\");\n config = createTamagui(config);\n } else {\n const { installTamaguiConfig } = requireTamaguiCore(props.platform || \"web\");\n installTamaguiConfig(config);\n }\n if (props.outputCSS) {\n await writeTamaguiCSS(props.outputCSS, config);\n }\n if (rebuild) {\n delete cacheComponents[componentOutPaths.join(\"\\0\")];\n }\n let components = await loadComponents({\n ...props,\n components: componentOutPaths\n });\n if (!components) {\n throw new Error(`No components found: ${componentOutPaths.join(\", \")}`);\n }\n for (const component of components) {\n component.moduleName = baseComponents[componentOutPaths.indexOf(component.moduleName)] || component.moduleName;\n if (!component.moduleName) {\n if (process.env.DEBUG?.includes(\"tamagui\") || process.env.IS_TAMAGUI_DEV) {\n console.warn(\n `\\u26A0\\uFE0F no module name found: ${component.moduleName} ${JSON.stringify(\n baseComponents\n )} in ${JSON.stringify(componentOutPaths)}`\n );\n }\n }\n }\n if (process.env.NODE_ENV === \"development\" && process.env.DEBUG?.startsWith(\"tamagui\")) {\n console.info(\"Loaded components\", components);\n }\n const res = {\n components,\n nameToPaths: {},\n tamaguiConfig: config,\n dependencies: compilerDependencies,\n // the generated bundles inline every source they were built from,\n // including the component packages resolved out of node_modules, so their\n // bytes are a complete description of what the compiler host will read\n stampSources: [\n ...configEntry ? [configOutPath] : [],\n ...componentOutPaths,\n // The generated bundles inline the user's config and components, but\n // `external` keeps @tamagui/core and @tamagui/web out of them, and\n // everything reached only through those two is left out with them.\n // Those packages hold the staticConfig and style engine every lowering\n // is computed against, so without their bytes an in-place engine edit at\n // the same version - exactly what `bun run watch` and\n // `bun release --into` produce - would serve plans built by the\n // previous engine.\n ...requiredTamaguiPackageFiles()\n ]\n };\n currentBundle = res;\n currentBundleKey = bundleKey;\n updateLastLoaded(res, bundleKey);\n return res;\n } catch (err) {\n const failure = findStaticEvaluationError(err);\n const componentIndex = failure ? componentOutPaths.findIndex(\n (outputPath) => outputPath === failure.moduleName || outputPath === failure.importer\n ) : -1;\n const configuredComponent = baseComponents[componentIndex];\n if (failure && configuredComponent) {\n const configuredImport = configuredComponent.startsWith(\".\") || isAbsolute(configuredComponent) ? componentImports[componentIndex]?.[0] || configuredComponent : configuredComponent;\n throw new Error(\n `[tamagui] Static evaluation could not proceed for configured component \"${configuredComponent}\".\nThe import \"${configuredImport}\" reached module \"${failure.failedModule}\", which failed during Node evaluation.\nReason: ${failure.reason}\nFix the failing module so it can run in Node during the build. If \"${configuredImport}\" is runtime-only and none of its exports create your Tamagui config or components, add \"${configuredImport}\" to dangerouslyIgnoreStaticEvaluationModules in tamagui.build.ts.`,\n { cause: err }\n );\n }\n throw new Error(\n `[tamagui] Static evaluation could not proceed for configured Tamagui config \"${configEntry || \"<default config>\"}\".\nReason: ${err instanceof Error ? err.message : String(err)}\nFix the failing import so it can run in Node during the build. If it is runtime-only and none of its exports create your Tamagui config or components, add its exact module name to dangerouslyIgnoreStaticEvaluationModules in tamagui.build.ts.`,\n { cause: err }\n );\n } finally {\n isBundling = false;\n waitForBundle.forEach((cb) => cb());\n waitForBundle.clear();\n }\n}\nasync function writeTamaguiCSS(outputCSS, config) {\n const flush = async () => {\n colorLog(Color.FgYellow, ` \\u27A1 [tamagui] output css: ${outputCSS}`);\n await FS.mkdirp(dirname(outputCSS));\n await FS.writeFile(outputCSS, css);\n };\n const css = config.getCSS();\n if (typeof css !== \"string\") {\n throw new Error(`Invalid CSS: ${typeof css} ${css}`);\n }\n try {\n if (existsSync(outputCSS) && await readFile(outputCSS, \"utf8\") === css) {\n } else {\n await flush();\n }\n } catch (err) {\n console.info(\"Error writing themes\", err);\n }\n}\nasync function loadComponents(props, forceExports = false) {\n const coreComponents = getCoreComponentsSync(props);\n const otherComponents = await loadComponentsInner(props, forceExports);\n return [...coreComponents, ...otherComponents];\n}\nasync function evaluateComponentModule(props, id) {\n const previousIsStatic = process.env.IS_STATIC;\n const previousIsServer = process.env.TAMAGUI_IS_SERVER;\n process.env.IS_STATIC = \"is_static\";\n process.env.TAMAGUI_IS_SERVER = \"true\";\n const { unregister } = registerRequire(props.platform || \"web\", {\n ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules\n });\n try {\n try {\n return nodeRequire(id);\n } catch (error) {\n const code = error?.code;\n if (code !== \"ERR_REQUIRE_ESM\" && code !== \"ERR_REQUIRE_ASYNC_MODULE\") throw error;\n }\n } finally {\n unregister();\n if (previousIsStatic === void 0) delete process.env.IS_STATIC;\n else process.env.IS_STATIC = previousIsStatic;\n if (previousIsServer === void 0) delete process.env.TAMAGUI_IS_SERVER;\n else process.env.TAMAGUI_IS_SERVER = previousIsServer;\n }\n return import(`${pathToFileURL(id).href}?v=${FS.statSync(id).mtimeMs}`);\n}\nfunction loadComponentsSync(props, forceExports = false) {\n const coreComponents = getCoreComponentsSync(props);\n const otherComponents = loadComponentsInnerSync(props, forceExports);\n return [...coreComponents, ...otherComponents];\n}\nfunction getCoreComponentsSync(props) {\n const loaded = loadComponentsInnerSync({\n ...props,\n components: [\"@tamagui/core\"]\n });\n if (!loaded[0]) {\n throw new Error(`Core should always load`);\n }\n return [\n {\n ...loaded[0],\n moduleName: \"@tamagui/core\"\n }\n ];\n}\nasync function loadComponentsInner(props, forceExports = false) {\n const componentsModules = props.components || [];\n const key = JSON.stringify([\n props.platform,\n componentsModules,\n props.dangerouslyIgnoreStaticEvaluationModules\n ]);\n if (!forceExports && cacheComponents[key]) {\n return cacheComponents[key];\n }\n const { unregister } = registerRequire(props.platform || \"web\", {\n ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules\n });\n try {\n const results = [];\n for (const name of componentsModules) {\n const extension = extname(name);\n const isLocal = Boolean(extension);\n const isDynamic = isLocal && forceExports;\n const format = isLocal ? detectModuleFormat(name) : \"cjs\";\n const fileContents = isDynamic ? readFileSync(name, \"utf-8\") : \"\";\n let loadModule = name;\n let writtenContents = fileContents;\n const attemptLoad = async ({ forceExports: forceExports2 = false } = {}) => {\n if (isDynamic) {\n writtenContents = forceExports2 ? addLocalExports(esbuildit(fileContents, \"modern\"), name) : fileContents;\n loadModule = getDynamicEvalOutfile(name, format, writtenContents);\n FS.ensureDirSync(dirname(loadModule));\n activeTempFiles.add(loadModule);\n await esbuild.build({\n ...esbuildOptionsWithPlugins,\n plugins: [\n ...esbuildOptionsWithPlugins.plugins || [],\n staticEvaluationIgnorePlugin(\n props.dangerouslyIgnoreStaticEvaluationModules\n )\n ],\n format,\n outfile: loadModule,\n stdin: {\n contents: writtenContents,\n resolveDir: dirname(name),\n sourcefile: name,\n loader: getEsbuildStdinLoader(name)\n },\n alias: {\n \"react-native\": resolvePackageEntry(\n \"@tamagui/react-native-web-lite\",\n format\n ),\n \"@tamagui/react-native-web-lite\": resolvePackageEntry(\n \"@tamagui/react-native-web-lite\",\n format\n ),\n \"@tamagui/react-native-web-internals\": resolvePackageEntry(\n \"@tamagui/react-native-web-internals\",\n format\n )\n },\n bundle: true,\n packages: \"external\",\n allowOverwrite: true,\n sourcemap: false,\n loader: esbuildLoaderConfig\n });\n }\n if (process.env.DEBUG === \"tamagui\") {\n console.info(`loadModule`, loadModule, format);\n }\n let moduleResult;\n if (format === \"esm\") {\n moduleResult = await import(`${pathToFileURL(loadModule).href}?v=${FS.statSync(loadModule).mtimeMs}`);\n } else {\n moduleResult = nodeRequire(loadModule);\n }\n if (!forceExports2) {\n setRequireResult(name, moduleResult);\n }\n const nameToInfo = getComponentStaticConfigByName(\n name,\n interopDefaultExport(moduleResult)\n );\n return {\n moduleName: name,\n nameToInfo\n };\n };\n const dispose = () => {\n if (isDynamic) {\n FS.removeSync(loadModule);\n activeTempFiles.delete(loadModule);\n }\n };\n let loaded;\n try {\n loaded = await attemptLoad({ forceExports: isDynamic });\n } catch (err) {\n if (!isDynamic) {\n throw new Error(\n `[tamagui] Failed to statically evaluate configured component module \"${name}\". ${err instanceof Error ? err.message : String(err)}`,\n { cause: err }\n );\n }\n writtenContents = fileContents;\n if (process.env.DEBUG?.startsWith(\"tamagui\")) {\n console.info(`Error adding local component exports`, err);\n }\n try {\n loaded = await attemptLoad({ forceExports: false });\n } catch (err2) {\n throw new Error(\n `[tamagui] Failed to statically evaluate configured component module \"${name}\" at \"${loadModule}\". ${err2 instanceof Error ? err2.message : String(err2)}`,\n { cause: err2 }\n );\n }\n } finally {\n dispose();\n }\n if (Array.isArray(loaded)) {\n results.push(...loaded);\n } else if (loaded) {\n results.push(loaded);\n }\n }\n cacheComponents[key] = results;\n return results;\n } finally {\n unregister();\n }\n}\nfunction loadComponentsInnerSync(props, forceExports = false) {\n const componentsModules = props.components || [];\n const key = JSON.stringify([\n props.platform,\n componentsModules,\n props.dangerouslyIgnoreStaticEvaluationModules\n ]);\n if (!forceExports && cacheComponents[key]) {\n return cacheComponents[key];\n }\n const { unregister } = registerRequire(props.platform || \"web\", {\n ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules\n });\n try {\n const info = componentsModules.flatMap((name) => {\n const extension = extname(name);\n const isLocal = Boolean(extension);\n const isDynamic = isLocal && forceExports;\n const fileContents = isDynamic ? readFileSync(name, \"utf-8\") : \"\";\n let loadModule = name;\n let writtenContents = fileContents;\n function attemptLoad({ forceExports: forceExports2 = false } = {}) {\n if (isDynamic) {\n writtenContents = forceExports2 ? addLocalExports(esbuildit(fileContents, \"modern\"), name) : fileContents;\n loadModule = getDynamicEvalOutfile(name, \"cjs\", writtenContents);\n FS.ensureDirSync(dirname(loadModule));\n activeTempFiles.add(loadModule);\n esbuild.buildSync({\n ...esbuildOptions,\n outfile: loadModule,\n stdin: {\n contents: writtenContents,\n resolveDir: dirname(name),\n sourcefile: name,\n loader: getEsbuildStdinLoader(name)\n },\n alias: {\n \"react-native\": resolvePackageEntry(\n \"@tamagui/react-native-web-lite\",\n \"esm\"\n ),\n \"@tamagui/react-native-web-lite\": resolvePackageEntry(\n \"@tamagui/react-native-web-lite\",\n \"esm\"\n ),\n \"@tamagui/react-native-web-internals\": resolvePackageEntry(\n \"@tamagui/react-native-web-internals\",\n \"esm\"\n )\n },\n bundle: true,\n packages: \"external\",\n allowOverwrite: true,\n sourcemap: false,\n loader: esbuildLoaderConfig\n });\n }\n if (process.env.DEBUG === \"tamagui\") {\n console.info(`loadModule`, loadModule, nodeRequire.resolve(loadModule));\n }\n const moduleResult = nodeRequire(loadModule);\n if (!forceExports2) {\n setRequireResult(name, moduleResult);\n }\n const nameToInfo = getComponentStaticConfigByName(\n name,\n interopDefaultExport(moduleResult)\n );\n return {\n moduleName: name,\n nameToInfo\n };\n }\n const dispose = () => {\n if (isDynamic) {\n FS.removeSync(loadModule);\n activeTempFiles.delete(loadModule);\n }\n };\n try {\n const res = attemptLoad({ forceExports: isDynamic });\n return res;\n } catch (err) {\n if (!isDynamic) {\n throw new Error(\n `[tamagui] Failed to statically evaluate configured component module \"${name}\". ${err instanceof Error ? err.message : String(err)}`,\n { cause: err }\n );\n }\n writtenContents = fileContents;\n if (process.env.DEBUG?.startsWith(\"tamagui\")) {\n console.info(`Error adding local component exports`, err);\n }\n } finally {\n dispose();\n }\n try {\n return attemptLoad({ forceExports: false });\n } catch (err) {\n throw new Error(\n `[tamagui] Failed to statically evaluate configured component module \"${name}\" at \"${loadModule}\". ${err instanceof Error ? err.message : String(err)}`,\n { cause: err }\n );\n } finally {\n dispose();\n }\n });\n cacheComponents[key] = info;\n return info;\n } finally {\n unregister();\n }\n}\nconst esbuildit = (src, target) => {\n return esbuild.transformSync(src, {\n ...esbuildTransformOptions,\n ...target === \"modern\" && {\n target: \"es2022\",\n jsx: \"automatic\",\n loader: \"tsx\",\n platform: \"neutral\",\n format: \"esm\"\n }\n }).code;\n};\nfunction getComponentStaticConfigByName(name, exported) {\n const components = {};\n if (!exported || typeof exported !== \"object\" || Array.isArray(exported)) {\n throw new Error(`Invalid export from package ${name}: ${typeof exported}`);\n }\n for (const key in exported) {\n const found = getTamaguiComponent(key, exported[key]);\n if (found) {\n const { Component, ...sc } = found.staticConfig;\n components[key] = {\n staticConfig: sc,\n ...found.displayName && { displayName: found.displayName }\n };\n }\n }\n return components;\n}\nfunction getTamaguiComponent(name, Component) {\n if (name[0].toUpperCase() !== name[0]) {\n return;\n }\n const staticConfig = Component?.staticConfig;\n if (staticConfig) {\n return {\n staticConfig,\n displayName: Component[componentDisplayName]\n };\n }\n}\nfunction interopDefaultExport(mod) {\n return mod?.default ?? mod;\n}\nconst cacheComponents = {};\nexport {\n bundleConfig,\n esbuildOptions,\n esbuildOptionsWithPlugins,\n evaluateComponentModule,\n getBundledConfig,\n getComponentStaticConfigByName,\n getLoadedConfig,\n hasBundledConfigChanged,\n loadComponents,\n loadComponentsInner,\n loadComponentsInnerSync,\n loadComponentsSync,\n setLoadedConfig,\n writeTamaguiCSS\n};\n//# sourceMappingURL=bundleConfig.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyBA,MAAM,cAAc,cAClB,OAAO,eAAe,WAAW,aAAa,YAAY,GAC5D;AACA,MAAM,uBAAuC,uBAAO,IAAI,8BAA8B;AACtF,MAAM,kCAAkC,IAAI,IAAI;AAChD,SAAS,sBAAsB,MAAM,QAAQ,UAAU;CACrD,MAAM,MAAM,WAAW,QAAQ,QAAQ;CACvC,MAAM,OAAO,WAAW,MAAM,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC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aAAa,YAAY,MAAM,QAAQ,QAAQ,GAAG;EACxE,MAAM,IAAI,MAAM,+BAA+B,KAAK,IAAI,OAAO,UAAU;CAC3E;CACA,KAAK,MAAM,OAAO,UAAU;EAC1B,MAAM,QAAQ,oBAAoB,KAAK,SAAS,IAAI;EACpD,IAAI,OAAO;GACT,MAAM,EAAE,WAAW,GAAG,OAAO,MAAM;GACnC,WAAW,OAAO;IAChB,cAAc;IACd,GAAG,MAAM,eAAe,EAAE,aAAa,MAAM,YAAY;GAC3D;EACF;CACF;CACA,OAAO;AACT;AACA,SAAS,oBAAoB,MAAM,WAAW;CAC5C,IAAI,KAAK,EAAE,CAAC,YAAY,MAAM,KAAK,IAAI;EACrC;CACF;CACA,MAAM,eAAe,WAAW;CAChC,IAAI,cAAc;EAChB,OAAO;GACL;GACA,aAAa,UAAU;EACzB;CACF;AACF;AACA,SAAS,qBAAqB,KAAK;CACjC,OAAO,KAAK,WAAW;AACzB;AACA,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"bundleConfig.js","names":[],"sources":["esm/extractor/bundleConfig.js"],"sourcesContent":["import { createHash } from \"node:crypto\";\nimport { createRequire } from \"node:module\";\nimport { existsSync, readFileSync, unlinkSync } from \"node:fs\";\nimport {\n basename,\n dirname,\n extname,\n isAbsolute,\n join,\n relative,\n resolve,\n sep\n} from \"node:path\";\nimport { pathToFileURL } from \"node:url\";\nimport { Color, colorLog } from \"@tamagui/cli-color\";\nimport esbuild from \"esbuild\";\nimport FS from \"fs-extra\";\nimport { readFile } from \"node:fs/promises\";\nimport { registerRequire, setRequireResult } from \"../registerRequire\";\nimport { addLocalExports } from \"./addLocalExports\";\nimport { esbuildLoaderConfig, esbundleTamaguiConfig } from \"./bundle\";\nimport { getTamaguiConfigPathFromOptionsConfig } from \"./getTamaguiConfigPathFromOptionsConfig\";\nimport { requireTamaguiCore } from \"../helpers/requireTamaguiCore\";\nimport { detectModuleFormat } from \"./detectModuleFormat\";\nimport { staticEvaluationIgnorePlugin } from \"../staticEvaluationIgnoredModules\";\nconst nodeRequire = createRequire(\n typeof __filename === \"string\" ? __filename : import.meta.url\n);\nconst componentDisplayName = /* @__PURE__ */ Symbol.for(\"tamagui.componentDisplayName\");\nconst activeTempFiles = /* @__PURE__ */ new Set();\nfunction getDynamicEvalOutfile(name, format, contents) {\n const ext = format === \"esm\" ? \"mjs\" : \"cjs\";\n const hash = createHash(\"sha1\").update(name).update(\"\\0\").update(format).update(\"\\0\").update(contents).digest(\"hex\").slice(0, 10);\n return join(process.cwd(), \".tamagui\", `dynamic-eval-${hash}-${basename(name)}.${ext}`);\n}\nfunction getEsbuildStdinLoader(filePath) {\n if (filePath.endsWith(\".tsx\")) return \"tsx\";\n if (filePath.endsWith(\".ts\")) return \"ts\";\n if (filePath.endsWith(\".jsx\")) return \"jsx\";\n return \"js\";\n}\nfunction resolvePackageEntry(packageName, format) {\n if (format === \"cjs\") {\n return nodeRequire.resolve(packageName);\n }\n const packageJsonPath = nodeRequire.resolve(`${packageName}/package.json`);\n const packageJson = JSON.parse(readFileSync(packageJsonPath, \"utf-8\"));\n const packageRoot = dirname(packageJsonPath);\n const exportEntry = packageJson.exports?.[\".\"];\n const esmEntry = exportEntry?.import || exportEntry?.module || exportEntry?.browser || packageJson.module;\n if (typeof esmEntry === \"string\") {\n return join(packageRoot, esmEntry);\n }\n return nodeRequire.resolve(packageName);\n}\nfunction cleanupTempFiles() {\n for (const f of activeTempFiles) {\n try {\n unlinkSync(f);\n } catch {\n }\n }\n activeTempFiles.clear();\n}\nprocess.on(\"exit\", cleanupTempFiles);\nprocess.on(\"SIGINT\", () => {\n cleanupTempFiles();\n process.exit();\n});\nprocess.on(\"SIGTERM\", () => {\n cleanupTempFiles();\n process.exit();\n});\nconst external = [\n \"@tamagui/core\",\n \"@tamagui/web\",\n \"react\",\n \"react-dom\",\n \"react-native-svg\"\n];\nconst esbuildExtraOptions = {\n define: {\n __DEV__: `${process.env.NODE_ENV === \"development\"}`\n }\n};\nconst handleEsmFeaturesPlugin = {\n name: \"handle-esm-features\",\n setup(build) {\n const isCjs = build.initialOptions.format === \"cjs\" || !build.initialOptions.format;\n build.onLoad({ filter: /\\.(ts|tsx|js|jsx|mjs)$/ }, (args) => {\n if (!isCjs) {\n return null;\n }\n if (args.path.includes(\"node_modules\") && !args.path.includes(\"@tamagui\")) {\n return null;\n }\n let contents = readFileSync(args.path, \"utf8\");\n let modified = false;\n if (contents.includes(\"import.meta.env\")) {\n contents = contents.replace(/import\\.meta\\.env/g, \"process.env\");\n modified = true;\n }\n if (contents.includes(\"import.meta.url\")) {\n contents = contents.replace(/import\\.meta\\.url/g, '\"\"');\n modified = true;\n }\n if (contents.includes(\"import.meta.main\")) {\n contents = contents.replace(/import\\.meta\\.main/g, \"false\");\n modified = true;\n }\n if (modified) {\n return {\n contents,\n loader: args.path.endsWith(\".tsx\") ? \"tsx\" : args.path.endsWith(\".ts\") ? \"ts\" : args.path.endsWith(\".jsx\") ? \"jsx\" : \"js\"\n };\n }\n return null;\n });\n }\n};\nconst esbuildTransformOptions = {\n target: \"es2022\",\n format: \"cjs\",\n jsx: \"automatic\",\n platform: \"node\",\n ...esbuildExtraOptions\n};\nconst esbuildOptions = {\n ...esbuildTransformOptions\n};\nconst esbuildOptionsWithPlugins = {\n ...esbuildTransformOptions,\n plugins: [handleEsmFeaturesPlugin]\n};\nlet currentBundle = null;\nlet currentBundleKey = \"\";\nlet isBundling = false;\nlet lastBundle = null;\nconst waitForBundle = /* @__PURE__ */ new Set();\nfunction hasBundledConfigChanged() {\n if (lastBundle === currentBundle) {\n return false;\n }\n lastBundle = currentBundle;\n return true;\n}\nlet loadedConfig = null;\nconst getLoadedConfig = () => loadedConfig;\nconst setLoadedConfig = (config) => {\n loadedConfig = config;\n};\nfunction getBundleKey(props) {\n return JSON.stringify({\n root: props.root,\n components: props.components,\n config: props.config,\n platform: props.platform,\n nativePlatform: props.nativePlatform,\n dangerouslyIgnoreStaticEvaluationModules: props.dangerouslyIgnoreStaticEvaluationModules\n });\n}\nfunction getPackageNameFromPath(modulePath) {\n const normalized = modulePath.split(sep).join(\"/\");\n const nodeModulesIndex = normalized.lastIndexOf(\"/node_modules/\");\n if (nodeModulesIndex === -1) {\n return normalized.startsWith(\".\") || isAbsolute(normalized) ? void 0 : normalized;\n }\n const packagePath = normalized.slice(nodeModulesIndex + \"/node_modules/\".length);\n const parts = packagePath.split(\"/\");\n return parts[0]?.startsWith(\"@\") ? parts.slice(0, 2).join(\"/\") : parts[0];\n}\nfunction findStaticEvaluationError(error) {\n let current = error;\n while (current instanceof Error) {\n if (\"code\" in current && current.code === \"TAMAGUI_STATIC_EVALUATION_ERROR\" && \"moduleName\" in current && \"importer\" in current && \"failedModule\" in current && \"reason\" in current) {\n return current;\n }\n current = current.cause;\n }\n}\nasync function getBundledConfig(props, rebuild = false) {\n const bundleKey = getBundleKey(props);\n if (isBundling) {\n await new Promise((res) => {\n waitForBundle.add(res);\n });\n }\n if (!currentBundle || currentBundleKey !== bundleKey || rebuild) {\n return await bundleConfig(props, rebuild);\n }\n return currentBundle;\n}\nglobal.tamaguiLastLoaded ||= 0;\nfunction updateLastLoaded(config, bundleKey) {\n global.tamaguiLastLoaded = Date.now();\n global.tamaguiLastBundledConfig = config;\n global.tamaguiLastBundledConfigKey = bundleKey;\n}\nlet hasBundledOnce = false;\nlet hasLoggedBuild = false;\nconst packageNameByDirectory = /* @__PURE__ */ new Map();\nfunction owningPackageName(file) {\n let directory = dirname(file);\n const walked = [];\n while (true) {\n const known = packageNameByDirectory.get(directory);\n if (known !== void 0) {\n for (const step of walked) packageNameByDirectory.set(step, known);\n return known;\n }\n walked.push(directory);\n const manifest = join(directory, \"package.json\");\n if (existsSync(manifest)) {\n let name = null;\n try {\n name = JSON.parse(readFileSync(manifest, \"utf-8\")).name ?? null;\n } catch {\n name = null;\n }\n for (const step of walked) packageNameByDirectory.set(step, name);\n return name;\n }\n const parent = dirname(directory);\n if (parent === directory) {\n for (const step of walked) packageNameByDirectory.set(step, null);\n return null;\n }\n directory = parent;\n }\n}\nfunction requiredTamaguiPackageFiles() {\n const found = [];\n for (const file of Object.keys(nodeRequire.cache)) {\n if (!file.includes(\".\")) continue;\n const name = owningPackageName(file);\n if (name === \"tamagui\" || name?.startsWith(\"@tamagui/\")) found.push(file);\n }\n return found;\n}\nasync function bundleConfig(props, rebuild = false) {\n const bundleKey = getBundleKey(props);\n const root = props.root || process.cwd();\n const configEntry = props.config ? getTamaguiConfigPathFromOptionsConfig(props.config, root) : \"\";\n const baseComponents = (props.components || []).filter((x) => x !== \"@tamagui/core\");\n let componentOutPaths = [];\n let componentImports = [];\n if (!rebuild && global.tamaguiLastBundledConfig && global.tamaguiLastBundledConfigKey === bundleKey && Date.now() - global.tamaguiLastLoaded < 3e3) {\n return global.tamaguiLastBundledConfig;\n }\n try {\n isBundling = true;\n const rootRequire = createRequire(join(root, \"package.json\"));\n const tmpDir = join(root, \".tamagui\");\n const platformSuffix = props.platform === \"native\" ? `.native${props.nativePlatform ? `.${props.nativePlatform}` : \"\"}` : \".web\";\n const configFormat = configEntry ? detectModuleFormat(configEntry) : \"cjs\";\n const configExt = configFormat === \"esm\" ? \".mjs\" : \".cjs\";\n const configOutPath = join(tmpDir, `tamagui.config${platformSuffix}${configExt}`);\n const componentFormats = baseComponents.map((mod) => {\n try {\n let packageRoot = dirname(rootRequire.resolve(mod));\n while (!existsSync(join(packageRoot, \"package.json\"))) {\n const parent = dirname(packageRoot);\n if (parent === packageRoot) {\n return \"cjs\";\n }\n packageRoot = parent;\n }\n const pkg = JSON.parse(readFileSync(join(packageRoot, \"package.json\"), \"utf-8\"));\n return pkg.type === \"module\" ? \"esm\" : \"cjs\";\n } catch {\n return \"cjs\";\n }\n });\n componentOutPaths = baseComponents.map((componentModule, i) => {\n const ext = componentFormats[i] === \"esm\" ? \".mjs\" : \".cjs\";\n return join(\n tmpDir,\n `${componentModule.split(sep).join(\"-\").replace(/[^a-z0-9]+/gi, \"\")}-components.config${platformSuffix}${ext}`\n );\n });\n let compilerDependencies = currentBundle?.dependencies ?? [];\n if (process.env.NODE_ENV === \"development\" && process.env.DEBUG?.startsWith(\"tamagui\")) {\n console.info(`Building config entry`, configEntry);\n }\n let shouldBuild = rebuild || !props.disableInitialBuild;\n if (shouldBuild && props.config && !rebuild) {\n const allOutFiles = [configOutPath, ...componentOutPaths];\n try {\n const stats = await Promise.all(\n allOutFiles.map((f) => FS.stat(f).catch(() => null))\n );\n const allExistAndRecent = stats.every(\n (s) => s !== null && Date.now() - s.mtimeMs < 3e3\n );\n if (allExistAndRecent) {\n shouldBuild = false;\n }\n } catch {\n }\n }\n if (shouldBuild) {\n try {\n await FS.ensureDir(tmpDir);\n } catch {\n }\n const start = Date.now();\n const buildResults = await Promise.all([\n props.config ? esbundleTamaguiConfig(\n {\n entryPoints: [configEntry],\n external,\n outfile: configOutPath,\n target: \"node24\",\n format: configFormat,\n absWorkingDir: root,\n metafile: true,\n dangerouslyIgnoreStaticEvaluationModules: props.dangerouslyIgnoreStaticEvaluationModules,\n nativePlatform: props.nativePlatform,\n ...esbuildExtraOptions\n },\n props.platform || \"web\"\n ) : null,\n ...baseComponents.map((componentModule, i) => {\n return esbundleTamaguiConfig(\n {\n entryPoints: [componentModule],\n // bare packages must stay bare so esbuild can select their\n // react-native conditional export; local files still use siblings\n resolvePlatformSpecificEntries: props.platform !== \"native\" || componentModule.startsWith(\".\") || isAbsolute(componentModule),\n external,\n outfile: componentOutPaths[i],\n target: \"node24\",\n format: componentFormats[i],\n absWorkingDir: root,\n metafile: true,\n dangerouslyIgnoreStaticEvaluationModules: props.dangerouslyIgnoreStaticEvaluationModules,\n nativePlatform: props.nativePlatform,\n ...esbuildExtraOptions\n },\n props.platform || \"web\"\n );\n })\n ]);\n compilerDependencies = buildResults.flatMap(\n (result) => result?.metafile ? Object.keys(result.metafile.inputs).map((input) => resolve(root, input)) : []\n );\n componentImports = buildResults.slice(1).map((result) => {\n if (!result?.metafile) {\n return [];\n }\n const entryPoint = Object.values(result.metafile.outputs).find(\n (output) => output.entryPoint\n )?.entryPoint;\n if (!entryPoint) {\n return [];\n }\n return [\n ...new Set(\n result.metafile.inputs[entryPoint]?.imports.map((item) => getPackageNameFromPath(item.path)).filter((moduleName) => Boolean(moduleName)) || []\n )\n ];\n });\n if (!hasLoggedBuild && !props[\"_skipBuildLog\"]) {\n hasLoggedBuild = true;\n colorLog(\n Color.FgYellow,\n `\n \\u27A1 [tamagui] built config, components, prompt (${Date.now() - start}ms)`\n );\n if (process.env.DEBUG?.startsWith(\"tamagui\")) {\n colorLog(\n Color.Dim,\n `\n Config .${sep}${relative(root, configOutPath)}\n Components ${componentOutPaths.map((p) => `.${sep}${relative(root, p)}`).join(\"\\n \")}\n `\n );\n }\n }\n }\n if (hasBundledOnce) {\n try {\n delete nodeRequire.cache[nodeRequire.resolve(configOutPath)];\n } catch {\n }\n for (const p of componentOutPaths) {\n try {\n delete nodeRequire.cache[nodeRequire.resolve(p)];\n } catch {\n }\n }\n } else {\n hasBundledOnce = true;\n }\n let out;\n if (configFormat === \"esm\") {\n out = await import(`${pathToFileURL(configOutPath).href}?v=${FS.statSync(configOutPath).mtimeMs}`);\n } else {\n out = nodeRequire(configOutPath);\n }\n let config = out.default || out || out.config;\n if (config && config.config && !config.tokens) {\n config = config.config;\n }\n if (!config) {\n throw new Error(`No config: ${config}`);\n }\n loadedConfig = config;\n if (!config.parsed) {\n const { createTamagui } = requireTamaguiCore(props.platform || \"web\");\n config = createTamagui(config);\n } else {\n const { installTamaguiConfig } = requireTamaguiCore(props.platform || \"web\");\n installTamaguiConfig(config);\n }\n if (props.outputCSS) {\n await writeTamaguiCSS(props.outputCSS, config);\n }\n if (rebuild) {\n delete cacheComponents[componentOutPaths.join(\"\\0\")];\n }\n let components = await loadComponents({\n ...props,\n components: componentOutPaths\n });\n if (!components) {\n throw new Error(`No components found: ${componentOutPaths.join(\", \")}`);\n }\n for (const component of components) {\n component.moduleName = baseComponents[componentOutPaths.indexOf(component.moduleName)] || component.moduleName;\n if (!component.moduleName) {\n if (process.env.DEBUG?.includes(\"tamagui\") || process.env.IS_TAMAGUI_DEV) {\n console.warn(\n `\\u26A0\\uFE0F no module name found: ${component.moduleName} ${JSON.stringify(\n baseComponents\n )} in ${JSON.stringify(componentOutPaths)}`\n );\n }\n }\n }\n if (process.env.NODE_ENV === \"development\" && process.env.DEBUG?.startsWith(\"tamagui\")) {\n console.info(\"Loaded components\", components);\n }\n const res = {\n components,\n nameToPaths: {},\n tamaguiConfig: config,\n dependencies: compilerDependencies,\n // the generated bundles inline every source they were built from,\n // including the component packages resolved out of node_modules, so their\n // bytes are a complete description of what the compiler host will read\n stampSources: [\n ...configEntry ? [configOutPath] : [],\n ...componentOutPaths,\n // The generated bundles inline the user's config and components, but\n // `external` keeps @tamagui/core and @tamagui/web out of them, and\n // everything reached only through those two is left out with them.\n // Those packages hold the staticConfig and style engine every lowering\n // is computed against, so without their bytes an in-place engine edit at\n // the same version - exactly what `bun run watch` and\n // `bun release --into` produce - would serve plans built by the\n // previous engine.\n ...requiredTamaguiPackageFiles()\n ]\n };\n currentBundle = res;\n currentBundleKey = bundleKey;\n updateLastLoaded(res, bundleKey);\n return res;\n } catch (err) {\n const failure = findStaticEvaluationError(err);\n const componentIndex = failure ? componentOutPaths.findIndex(\n (outputPath) => outputPath === failure.moduleName || outputPath === failure.importer\n ) : -1;\n const configuredComponent = baseComponents[componentIndex];\n if (failure && configuredComponent) {\n const configuredImport = configuredComponent.startsWith(\".\") || isAbsolute(configuredComponent) ? componentImports[componentIndex]?.[0] || configuredComponent : configuredComponent;\n throw new Error(\n `[tamagui] Static evaluation could not proceed for configured component \"${configuredComponent}\".\nThe import \"${configuredImport}\" reached module \"${failure.failedModule}\", which failed during Node evaluation.\nReason: ${failure.reason}\nFix the failing module so it can run in Node during the build. If \"${configuredImport}\" is runtime-only and none of its exports create your Tamagui config or components, add \"${configuredImport}\" to dangerouslyIgnoreStaticEvaluationModules in tamagui.build.ts.`,\n { cause: err }\n );\n }\n throw new Error(\n `[tamagui] Static evaluation could not proceed for configured Tamagui config \"${configEntry || \"<default config>\"}\".\nReason: ${err instanceof Error ? err.message : String(err)}\nFix the failing import so it can run in Node during the build. If it is runtime-only and none of its exports create your Tamagui config or components, add its exact module name to dangerouslyIgnoreStaticEvaluationModules in tamagui.build.ts.`,\n { cause: err }\n );\n } finally {\n isBundling = false;\n waitForBundle.forEach((cb) => cb());\n waitForBundle.clear();\n }\n}\nasync function writeTamaguiCSS(outputCSS, config) {\n const flush = async () => {\n colorLog(Color.FgYellow, ` \\u27A1 [tamagui] output css: ${outputCSS}`);\n await FS.mkdirp(dirname(outputCSS));\n await FS.writeFile(outputCSS, css);\n };\n const css = config.getCSS();\n if (typeof css !== \"string\") {\n throw new Error(`Invalid CSS: ${typeof css} ${css}`);\n }\n try {\n if (existsSync(outputCSS) && await readFile(outputCSS, \"utf8\") === css) {\n } else {\n await flush();\n }\n } catch (err) {\n console.info(\"Error writing themes\", err);\n }\n}\nasync function loadComponents(props, forceExports = false) {\n const coreComponents = getCoreComponentsSync(props);\n const otherComponents = await loadComponentsInner(props, forceExports);\n return [...coreComponents, ...otherComponents];\n}\nasync function evaluateComponentModule(props, id) {\n const previousIsStatic = process.env.IS_STATIC;\n const previousIsServer = process.env.TAMAGUI_IS_SERVER;\n process.env.IS_STATIC = \"is_static\";\n process.env.TAMAGUI_IS_SERVER = \"true\";\n const { unregister } = registerRequire(props.platform || \"web\", {\n ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,\n nativePlatform: props.nativePlatform\n });\n try {\n try {\n return nodeRequire(id);\n } catch (error) {\n const code = error?.code;\n if (code !== \"ERR_REQUIRE_ESM\" && code !== \"ERR_REQUIRE_ASYNC_MODULE\") throw error;\n }\n } finally {\n unregister();\n if (previousIsStatic === void 0) delete process.env.IS_STATIC;\n else process.env.IS_STATIC = previousIsStatic;\n if (previousIsServer === void 0) delete process.env.TAMAGUI_IS_SERVER;\n else process.env.TAMAGUI_IS_SERVER = previousIsServer;\n }\n return import(`${pathToFileURL(id).href}?v=${FS.statSync(id).mtimeMs}`);\n}\nfunction loadComponentsSync(props, forceExports = false) {\n const coreComponents = getCoreComponentsSync(props);\n const otherComponents = loadComponentsInnerSync(props, forceExports);\n return [...coreComponents, ...otherComponents];\n}\nfunction getCoreComponentsSync(props) {\n const loaded = loadComponentsInnerSync({\n ...props,\n components: [\"@tamagui/core\"]\n });\n if (!loaded[0]) {\n throw new Error(`Core should always load`);\n }\n return [\n {\n ...loaded[0],\n moduleName: \"@tamagui/core\"\n }\n ];\n}\nasync function loadComponentsInner(props, forceExports = false) {\n const componentsModules = props.components || [];\n const key = JSON.stringify([\n props.platform,\n props.nativePlatform,\n componentsModules,\n props.dangerouslyIgnoreStaticEvaluationModules\n ]);\n if (!forceExports && cacheComponents[key]) {\n return cacheComponents[key];\n }\n const { unregister } = registerRequire(props.platform || \"web\", {\n ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,\n nativePlatform: props.nativePlatform\n });\n try {\n const results = [];\n for (const name of componentsModules) {\n const extension = extname(name);\n const isLocal = Boolean(extension);\n const isDynamic = isLocal && forceExports;\n const format = isLocal ? detectModuleFormat(name) : \"cjs\";\n const fileContents = isDynamic ? readFileSync(name, \"utf-8\") : \"\";\n let loadModule = name;\n let writtenContents = fileContents;\n const attemptLoad = async ({ forceExports: forceExports2 = false } = {}) => {\n if (isDynamic) {\n writtenContents = forceExports2 ? addLocalExports(esbuildit(fileContents, \"modern\"), name) : fileContents;\n loadModule = getDynamicEvalOutfile(name, format, writtenContents);\n FS.ensureDirSync(dirname(loadModule));\n activeTempFiles.add(loadModule);\n await esbuild.build({\n ...esbuildOptionsWithPlugins,\n plugins: [\n ...esbuildOptionsWithPlugins.plugins || [],\n staticEvaluationIgnorePlugin(\n props.dangerouslyIgnoreStaticEvaluationModules\n )\n ],\n format,\n outfile: loadModule,\n stdin: {\n contents: writtenContents,\n resolveDir: dirname(name),\n sourcefile: name,\n loader: getEsbuildStdinLoader(name)\n },\n alias: {\n \"react-native\": resolvePackageEntry(\n \"@tamagui/react-native-web-lite\",\n format\n ),\n \"@tamagui/react-native-web-lite\": resolvePackageEntry(\n \"@tamagui/react-native-web-lite\",\n format\n ),\n \"@tamagui/react-native-web-internals\": resolvePackageEntry(\n \"@tamagui/react-native-web-internals\",\n format\n )\n },\n bundle: true,\n packages: \"external\",\n allowOverwrite: true,\n sourcemap: false,\n loader: esbuildLoaderConfig\n });\n }\n if (process.env.DEBUG === \"tamagui\") {\n console.info(`loadModule`, loadModule, format);\n }\n let moduleResult;\n if (format === \"esm\") {\n moduleResult = await import(`${pathToFileURL(loadModule).href}?v=${FS.statSync(loadModule).mtimeMs}`);\n } else {\n moduleResult = nodeRequire(loadModule);\n }\n if (!forceExports2) {\n setRequireResult(name, moduleResult);\n }\n const nameToInfo = getComponentStaticConfigByName(\n name,\n interopDefaultExport(moduleResult)\n );\n return {\n moduleName: name,\n nameToInfo\n };\n };\n const dispose = () => {\n if (isDynamic) {\n FS.removeSync(loadModule);\n activeTempFiles.delete(loadModule);\n }\n };\n let loaded;\n try {\n loaded = await attemptLoad({ forceExports: isDynamic });\n } catch (err) {\n if (!isDynamic) {\n throw new Error(\n `[tamagui] Failed to statically evaluate configured component module \"${name}\". ${err instanceof Error ? err.message : String(err)}`,\n { cause: err }\n );\n }\n writtenContents = fileContents;\n if (process.env.DEBUG?.startsWith(\"tamagui\")) {\n console.info(`Error adding local component exports`, err);\n }\n try {\n loaded = await attemptLoad({ forceExports: false });\n } catch (err2) {\n throw new Error(\n `[tamagui] Failed to statically evaluate configured component module \"${name}\" at \"${loadModule}\". ${err2 instanceof Error ? err2.message : String(err2)}`,\n { cause: err2 }\n );\n }\n } finally {\n dispose();\n }\n if (Array.isArray(loaded)) {\n results.push(...loaded);\n } else if (loaded) {\n results.push(loaded);\n }\n }\n cacheComponents[key] = results;\n return results;\n } finally {\n unregister();\n }\n}\nfunction loadComponentsInnerSync(props, forceExports = false) {\n const componentsModules = props.components || [];\n const key = JSON.stringify([\n props.platform,\n props.nativePlatform,\n componentsModules,\n props.dangerouslyIgnoreStaticEvaluationModules\n ]);\n if (!forceExports && cacheComponents[key]) {\n return cacheComponents[key];\n }\n const { unregister } = registerRequire(props.platform || \"web\", {\n ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,\n nativePlatform: props.nativePlatform\n });\n try {\n const info = componentsModules.flatMap((name) => {\n const extension = extname(name);\n const isLocal = Boolean(extension);\n const isDynamic = isLocal && forceExports;\n const fileContents = isDynamic ? readFileSync(name, \"utf-8\") : \"\";\n let loadModule = name;\n let writtenContents = fileContents;\n function attemptLoad({ forceExports: forceExports2 = false } = {}) {\n if (isDynamic) {\n writtenContents = forceExports2 ? addLocalExports(esbuildit(fileContents, \"modern\"), name) : fileContents;\n loadModule = getDynamicEvalOutfile(name, \"cjs\", writtenContents);\n FS.ensureDirSync(dirname(loadModule));\n activeTempFiles.add(loadModule);\n esbuild.buildSync({\n ...esbuildOptions,\n outfile: loadModule,\n stdin: {\n contents: writtenContents,\n resolveDir: dirname(name),\n sourcefile: name,\n loader: getEsbuildStdinLoader(name)\n },\n alias: {\n \"react-native\": resolvePackageEntry(\n \"@tamagui/react-native-web-lite\",\n \"esm\"\n ),\n \"@tamagui/react-native-web-lite\": resolvePackageEntry(\n \"@tamagui/react-native-web-lite\",\n \"esm\"\n ),\n \"@tamagui/react-native-web-internals\": resolvePackageEntry(\n \"@tamagui/react-native-web-internals\",\n \"esm\"\n )\n },\n bundle: true,\n packages: \"external\",\n allowOverwrite: true,\n sourcemap: false,\n loader: esbuildLoaderConfig\n });\n }\n if (process.env.DEBUG === \"tamagui\") {\n console.info(`loadModule`, loadModule, nodeRequire.resolve(loadModule));\n }\n const moduleResult = nodeRequire(loadModule);\n if (!forceExports2) {\n setRequireResult(name, moduleResult);\n }\n const nameToInfo = getComponentStaticConfigByName(\n name,\n interopDefaultExport(moduleResult)\n );\n return {\n moduleName: name,\n nameToInfo\n };\n }\n const dispose = () => {\n if (isDynamic) {\n FS.removeSync(loadModule);\n activeTempFiles.delete(loadModule);\n }\n };\n try {\n const res = attemptLoad({ forceExports: isDynamic });\n return res;\n } catch (err) {\n if (!isDynamic) {\n throw new Error(\n `[tamagui] Failed to statically evaluate configured component module \"${name}\". ${err instanceof Error ? err.message : String(err)}`,\n { cause: err }\n );\n }\n writtenContents = fileContents;\n if (process.env.DEBUG?.startsWith(\"tamagui\")) {\n console.info(`Error adding local component exports`, err);\n }\n } finally {\n dispose();\n }\n try {\n return attemptLoad({ forceExports: false });\n } catch (err) {\n throw new Error(\n `[tamagui] Failed to statically evaluate configured component module \"${name}\" at \"${loadModule}\". ${err instanceof Error ? err.message : String(err)}`,\n { cause: err }\n );\n } finally {\n dispose();\n }\n });\n cacheComponents[key] = info;\n return info;\n } finally {\n unregister();\n }\n}\nconst esbuildit = (src, target) => {\n return esbuild.transformSync(src, {\n ...esbuildTransformOptions,\n ...target === \"modern\" && {\n target: \"es2022\",\n jsx: \"automatic\",\n loader: \"tsx\",\n platform: \"neutral\",\n format: \"esm\"\n }\n }).code;\n};\nfunction getComponentStaticConfigByName(name, exported) {\n const components = {};\n if (!exported || typeof exported !== \"object\" || Array.isArray(exported)) {\n throw new Error(`Invalid export from package ${name}: ${typeof exported}`);\n }\n for (const key in exported) {\n const found = getTamaguiComponent(key, exported[key]);\n if (found) {\n const { Component, ...sc } = found.staticConfig;\n components[key] = {\n staticConfig: sc,\n ...found.displayName && { displayName: found.displayName }\n };\n }\n }\n return components;\n}\nfunction getTamaguiComponent(name, Component) {\n if (name[0].toUpperCase() !== name[0]) {\n return;\n }\n const staticConfig = Component?.staticConfig;\n if (staticConfig) {\n return {\n staticConfig,\n displayName: Component[componentDisplayName]\n };\n }\n}\nfunction interopDefaultExport(mod) {\n return mod?.default ?? mod;\n}\nconst cacheComponents = {};\nexport {\n bundleConfig,\n esbuildOptions,\n esbuildOptionsWithPlugins,\n evaluateComponentModule,\n getBundledConfig,\n getComponentStaticConfigByName,\n getLoadedConfig,\n hasBundledConfigChanged,\n loadComponents,\n loadComponentsInner,\n loadComponentsInnerSync,\n loadComponentsSync,\n setLoadedConfig,\n writeTamaguiCSS\n};\n//# sourceMappingURL=bundleConfig.js.map\n"],"mappings":";;;;;;;;;;;;;;;;;;AAyBA,MAAM,cAAc,cAClB,OAAO,eAAe,WAAW,aAAa,YAAY,GAC5D;AACA,MAAM,uBAAuC,uBAAO,IAAI,8BAA8B;AACtF,MAAM,kCAAkC,IAAI,IAAI;AAChD,SAAS,sBAAsB,MAAM,QAAQ,UAAU;CACrD,MAAM,MAAM,WAAW,QAAQ,QAAQ;CACvC,MAAM,OAAO,WAAW,MAAM,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,MAAM,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,OAAO,QAAQ,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,GAAG,EAAE;CAChI,OAAO,KAAK,QAAQ,IAAI,GAAG,YAAY,gBAAgB,KAAK,GAAG,SAAS,IAAI,EAAE,GAAG,KAAK;AACxF;AACA,SAAS,sBAAsB,UAAU;CACvC,IAAI,SAAS,SAAS,MAAM,GAAG,OAAO;CACtC,IAAI,SAAS,SAAS,KAAK,GAAG,OAAO;CACrC,IAAI,SAAS,SAAS,MAAM,GAAG,OAAO;CACtC,OAAO;AACT;AACA,SAAS,oBAAoB,aAAa,QAAQ;CAChD,IAAI,WAAW,OAAO;EACpB,OAAO,YAAY,QAAQ,WAAW;CACxC;CACA,MAAM,kBAAkB,YAAY,QAAQ,GAAG,YAAY,cAAc;CACzE,MAAM,cAAc,KAAK,MAAM,aAAa,iBAAiB,OAAO,CAAC;CACrE,MAAM,cAAc,QAAQ,eAAe;CAC3C,MAAM,cAAc,YAAY,UAAU;CAC1C,MAAM,WAAW,aAAa,UAAU,aAAa,UAAU,aAAa,WAAW,YAAY;CACnG,IAAI,OAAO,aAAa,UAAU;EAChC,OAAO,KAAK,aAAa,QAAQ;CACnC;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 +208,10 @@ function loadTamaguiSync({ forceExports, cacheKey, ...propsIn }) {
208
208
  const previousDev = globalThis["__DEV__"];
209
209
  process.env.IS_STATIC = "is_static";
210
210
  process.env.TAMAGUI_IS_SERVER = "true";
211
- const { unregister } = registerRequire(props.platform || "web", { ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules });
211
+ const { unregister } = registerRequire(props.platform || "web", {
212
+ ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,
213
+ nativePlatform: props.nativePlatform
214
+ });
212
215
  try {
213
216
  globalThis["__DEV__"] = process.env.NODE_ENV === "development";
214
217
  let tamaguiConfig = null;
@@ -1 +1 @@
1
- {"version":3,"file":"loadTamagui.js","names":[],"sources":["esm/extractor/loadTamagui.js"],"sourcesContent":["import { basename, dirname, extname, join, relative, resolve } from \"node:path\";\nimport { createRequire } from \"node:module\";\nimport { Color, colorLog } from \"@tamagui/cli-color\";\nimport esbuild from \"esbuild\";\nimport fsExtra from \"fs-extra\";\nimport { requireTamaguiCore } from \"../helpers/requireTamaguiCore\";\nimport { getNameToPaths, registerRequire, setRequireResult } from \"../registerRequire\";\nimport {\n getComponentStaticConfigByName,\n getBundledConfig,\n getLoadedConfig,\n hasBundledConfigChanged,\n loadComponentsSync,\n setLoadedConfig,\n writeTamaguiCSS\n} from \"./bundleConfig\";\nimport { getTamaguiConfigPathFromOptionsConfig } from \"./getTamaguiConfigPathFromOptionsConfig\";\nimport {\n generateTamaguiThemes,\n regenerateConfig,\n regenerateConfigSync\n} from \"./regenerateConfig\";\nconst nodeRequire = createRequire(\n typeof __filename === \"string\" ? __filename : import.meta.url\n);\nconst getFilledOptions = (propsIn) => ({\n // defaults\n platform: process.env.TAMAGUI_TARGET || \"web\",\n config: \"tamagui.config.ts\",\n components: [\"tamagui\"],\n ...propsIn\n});\nlet isLoadingPromise;\nasync function loadTamagui(propsIn, rebuild = false) {\n if (isLoadingPromise) return await isLoadingPromise;\n isLoadingPromise = (async () => {\n const props = getFilledOptions(propsIn);\n const bundleInfo = await getBundledConfig(props, rebuild);\n if (!bundleInfo) {\n throw new Error(\n `[tamagui] The config and component bundle completed without a project result`\n );\n }\n await generateThemesAndLog(props, rebuild);\n const maybeTamaguiConfig = bundleInfo.tamaguiConfig;\n if (maybeTamaguiConfig && !maybeTamaguiConfig.parsed) {\n const { createTamagui } = requireTamaguiCore(props.platform || \"web\");\n bundleInfo.tamaguiConfig = createTamagui(bundleInfo.tamaguiConfig);\n }\n if (!hasBundledConfigChanged()) {\n return bundleInfo;\n }\n await regenerateConfig(props, bundleInfo);\n return bundleInfo;\n })();\n try {\n return await isLoadingPromise;\n } finally {\n isLoadingPromise = null;\n }\n}\nasync function loadTamaguiFromModules(propsIn, evaluated) {\n const props = getFilledOptions(propsIn);\n await generateThemesAndLog(props);\n const configModule = evaluated.config;\n let tamaguiConfig = configModule.default || configModule.config || configModule;\n if (\"config\" in tamaguiConfig && tamaguiConfig.config && !(\"tokens\" in tamaguiConfig)) {\n tamaguiConfig = tamaguiConfig.config;\n }\n if (!tamaguiConfig) {\n throw new Error(`The Vite module runner did not return a valid Tamagui config`);\n }\n const hostCore = requireTamaguiCore(props.platform || \"web\");\n if (!tamaguiConfig.parsed) {\n tamaguiConfig = hostCore.createTamagui(tamaguiConfig);\n } else {\n hostCore.installTamaguiConfig(tamaguiConfig);\n }\n setLoadedConfig(tamaguiConfig);\n const components = evaluated.components.map(({ moduleName, module }) => {\n setRequireResult(moduleName, module);\n return {\n moduleName,\n nameToInfo: getComponentStaticConfigByName(moduleName, module.default ?? module)\n };\n });\n const projectInfo = {\n components,\n nameToPaths: {},\n tamaguiConfig,\n stampSources: evaluated.stampSources\n };\n if (props.outputCSS) {\n await writeTamaguiCSS(props.outputCSS, projectInfo.tamaguiConfig);\n }\n await regenerateConfig(props, projectInfo);\n return projectInfo;\n}\nlet waiting = false;\nconst generateThemesAndLog = async (options, force = false) => {\n if (waiting) return;\n if (!options.themeBuilder) return;\n try {\n waiting = true;\n await new Promise((res) => setTimeout(res, 30));\n const didGenerate = await generateTamaguiThemes(options, force);\n if (didGenerate) {\n const whitespaceBefore = ` `;\n colorLog(\n Color.FgYellow,\n `${whitespaceBefore}\\u27A1 [tamagui] generated themes: ${relative(\n options.root || process.cwd(),\n options.themeBuilder.output\n )}`\n );\n if (options.outputCSS) {\n const loadedConfig = getLoadedConfig();\n if (loadedConfig) {\n await writeTamaguiCSS(options.outputCSS, loadedConfig);\n }\n }\n }\n } finally {\n waiting = false;\n }\n};\nconst last = {};\nconst lastVersion = {};\nconst buildConfigDependencies = /* @__PURE__ */ new WeakMap();\nfunction getTamaguiBuildConfigDependencies(options) {\n return buildConfigDependencies.get(options) ?? [];\n}\nconst esbuildBuildConfigLoader = async (absolutePath, root) => {\n const result = await esbuild.build({\n entryPoints: [absolutePath],\n absWorkingDir: root,\n bundle: true,\n packages: \"external\",\n platform: \"node\",\n format: \"cjs\",\n target: \"node18\",\n write: false,\n metafile: true\n });\n const code = result.outputFiles[0]?.text;\n if (!code) throw new Error(`No output generated for ${absolutePath}`);\n const module = { exports: {} };\n const projectRequire = createRequire(absolutePath);\n const fn = new Function(\"module\", \"exports\", \"require\", \"process\", code);\n fn(module, module.exports, projectRequire, process);\n return {\n exports: module.exports,\n dependencies: Object.keys(result.metafile.inputs)\n };\n};\nasync function loadTamaguiBuildConfigAsync(tamaguiOptions, loadBuildConfigModule = esbuildBuildConfigLoader) {\n const buildFilePath = tamaguiOptions?.buildFile ?? \"./tamagui.build.ts\";\n const root = tamaguiOptions?.root || process.cwd();\n const absolutePath = resolve(root, buildFilePath);\n if (fsExtra.existsSync(absolutePath)) {\n try {\n const evaluated = await loadBuildConfigModule(absolutePath, root);\n const out = evaluated.exports.default || evaluated.exports;\n if (!out || typeof out !== \"object\") {\n throw new Error(`No default export found in ${buildFilePath}: ${out}`);\n }\n const loadedOptions = {\n ...tamaguiOptions,\n ...out\n };\n const dependencies2 = evaluated.dependencies.map((file) => resolve(root, file));\n buildConfigDependencies.set(loadedOptions, dependencies2);\n tamaguiOptions = loadedOptions;\n } catch (err) {\n console.error(`[tamagui] Error loading ${buildFilePath}:`, err);\n throw err;\n }\n }\n if (!tamaguiOptions) {\n throw new Error(\n `No tamagui build options found either via input props or at tamagui.build.ts`\n );\n }\n const options = {\n config: \"tamagui.config.ts\",\n components: [\"tamagui\", \"@tamagui/core\"],\n ...tamaguiOptions\n };\n const dependencies = buildConfigDependencies.get(tamaguiOptions);\n if (dependencies) buildConfigDependencies.set(options, dependencies);\n return options;\n}\nfunction loadTamaguiBuildConfigSync(tamaguiOptions) {\n const buildFilePath = tamaguiOptions?.buildFile ?? \"./tamagui.build.ts\";\n const root = tamaguiOptions?.root || process.cwd();\n const absolutePath = resolve(root, buildFilePath);\n if (fsExtra.existsSync(absolutePath)) {\n const registered = registerRequire(\"web\", {\n ignoredModules: tamaguiOptions?.dangerouslyIgnoreStaticEvaluationModules\n });\n try {\n const out = nodeRequire(absolutePath).default;\n if (!out) {\n throw new Error(`No default export found in ${buildFilePath}: ${out}`);\n }\n tamaguiOptions = {\n ...tamaguiOptions,\n ...out\n };\n } finally {\n registered.unregister();\n }\n }\n if (!tamaguiOptions) {\n throw new Error(\n `No tamagui build options found either via input props or at tamagui.build.ts`\n );\n }\n return {\n config: \"tamagui.config.ts\",\n components: [\"tamagui\", \"@tamagui/core\"],\n ...tamaguiOptions\n };\n}\nfunction loadTamaguiSync({\n forceExports,\n cacheKey,\n ...propsIn\n}) {\n const key = JSON.stringify(propsIn);\n if (last[key] && !hasBundledConfigChanged()) {\n if (!lastVersion[key] || lastVersion[key] === cacheKey) {\n return last[key];\n }\n }\n lastVersion[key] = cacheKey || \"\";\n const props = getFilledOptions(propsIn);\n const previousIsStatic = process.env.IS_STATIC;\n const previousIsServer = process.env.TAMAGUI_IS_SERVER;\n const previousDev = globalThis[\"__DEV__\"];\n process.env.IS_STATIC = \"is_static\";\n process.env.TAMAGUI_IS_SERVER = \"true\";\n const { unregister } = registerRequire(props.platform || \"web\", {\n ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules\n });\n try {\n globalThis[\"__DEV__\"] = process.env.NODE_ENV === \"development\";\n let tamaguiConfig = null;\n if (propsIn.config) {\n const configPath = getTamaguiConfigPathFromOptionsConfig(\n propsIn.config,\n propsIn.root\n );\n const exp = nodeRequire(configPath);\n if (!exp) {\n throw new Error(`The Tamagui config module did not export a value`);\n }\n tamaguiConfig = exp[\"default\"] || exp[\"config\"] || exp;\n if (!tamaguiConfig || !tamaguiConfig.parsed) {\n const confPath = nodeRequire.resolve(configPath);\n throw new Error(`Can't find valid config in ${confPath}:\n \n Be sure you \"export default\" or \"export const config\" the config.`);\n }\n if (tamaguiConfig) {\n const { createTamagui } = requireTamaguiCore(props.platform || \"web\");\n createTamagui(tamaguiConfig);\n }\n }\n const components = loadComponentsSync(props, forceExports);\n if (!components) {\n throw new Error(`No components loaded`);\n }\n if (process.env.DEBUG === \"tamagui\") {\n console.info(`components`, components);\n }\n const info = {\n components,\n tamaguiConfig,\n nameToPaths: getNameToPaths()\n };\n if (tamaguiConfig) {\n const { outputCSS } = props;\n if (outputCSS) {\n writeTamaguiCSS(outputCSS, tamaguiConfig);\n }\n regenerateConfigSync(props, info);\n }\n last[key] = {\n ...info,\n cached: true\n };\n return info;\n } finally {\n if (previousIsStatic === void 0) delete process.env.IS_STATIC;\n else process.env.IS_STATIC = previousIsStatic;\n if (previousIsServer === void 0) delete process.env.TAMAGUI_IS_SERVER;\n else process.env.TAMAGUI_IS_SERVER = previousIsServer;\n globalThis[\"__DEV__\"] = previousDev;\n unregister();\n }\n}\nasync function getOptions({\n root = process.cwd(),\n tsconfigPath = \"tsconfig.json\",\n tamaguiOptions,\n host,\n debug\n} = {}) {\n const dotDir = join(root, \".tamagui\");\n let pkgJson = {};\n try {\n pkgJson = await fsExtra.readJSON(join(root, \"package.json\"));\n } catch (err) {\n }\n return {\n mode: process.env.NODE_ENV === \"production\" ? \"production\" : \"development\",\n root,\n host: host || \"127.0.0.1\",\n pkgJson,\n debug,\n tsconfigPath,\n tamaguiOptions: {\n platform: process.env.TAMAGUI_TARGET || \"web\",\n components: [\"tamagui\"],\n ...tamaguiOptions,\n config: tamaguiOptions?.config ?? await getDefaultTamaguiConfigPath(root, tamaguiOptions?.config)\n },\n paths: {\n root,\n dotDir,\n conf: join(dotDir, \"tamagui.config.json\"),\n types: join(dotDir, \"types.json\")\n }\n };\n}\nfunction resolveWebOrNativeSpecificEntry(entry, platform) {\n const workspaceRoot = resolve();\n const resolved = nodeRequire.resolve(entry, { paths: [workspaceRoot] });\n const ext = extname(resolved);\n const fileName = basename(resolved).replace(ext, \"\");\n const target = platform || process.env.TAMAGUI_TARGET || \"web\";\n const specificExt = target === \"web\" ? \"web\" : \"native\";\n const specificFile = join(dirname(resolved), fileName + \".\" + specificExt + ext);\n if (fsExtra.existsSync(specificFile)) {\n return specificFile;\n }\n return entry;\n}\nconst defaultPaths = [\"tamagui.config.ts\", join(\"src\", \"tamagui.config.ts\")];\nlet hasWarnedOnce = false;\nasync function getDefaultTamaguiConfigPath(root, configPath) {\n const searchPaths = [\n ...new Set(\n [configPath, ...defaultPaths].filter(Boolean).map((p) => join(root, p))\n )\n ];\n for (const path of searchPaths) {\n if (await fsExtra.pathExists(path)) {\n return path;\n }\n }\n if (!hasWarnedOnce) {\n hasWarnedOnce = true;\n console.warn(`Warning: couldn't find tamagui.config.ts in the following paths given configuration \"${configPath}\":\n ${searchPaths.join(`\n `)}\n `);\n }\n}\nasync function esbuildWatchFiles(entry, onChanged) {\n let hasRunOnce = false;\n const context = await esbuild.context({\n bundle: true,\n entryPoints: [entry],\n resolveExtensions: [\".ts\", \".tsx\", \".js\", \".mjs\"],\n logLevel: \"silent\",\n write: false,\n alias: {\n \"react-native-web\": \"@tamagui/react-native-web-lite\",\n \"react-native\": \"@tamagui/react-native-web-lite\"\n },\n plugins: [\n // to log what its watching:\n // {\n // name: 'test',\n // setup({ onResolve }) {\n // onResolve({ filter: /.*/ }, (args) => {\n // console.log('wtf', args.path)\n // })\n // },\n // },\n {\n name: `on-rebuild`,\n setup({ onEnd, onResolve }) {\n let filter = /^[^./]|^\\.[^./]|^\\.\\.[^/]/;\n onResolve({ filter }, (args) => ({ path: args.path, external: true }));\n onEnd(() => {\n if (!hasRunOnce) {\n hasRunOnce = true;\n } else {\n onChanged();\n }\n });\n }\n }\n ]\n });\n void context.watch();\n return () => {\n context.dispose();\n };\n}\nexport {\n esbuildWatchFiles,\n generateThemesAndLog,\n getOptions,\n getTamaguiBuildConfigDependencies,\n loadTamagui,\n loadTamaguiBuildConfigAsync,\n loadTamaguiBuildConfigSync,\n loadTamaguiFromModules,\n loadTamaguiSync,\n resolveWebOrNativeSpecificEntry\n};\n//# sourceMappingURL=loadTamagui.js.map\n"],"mappings":";;;;;;;;;;;;AAsBA,MAAM,cAAc,cAClB,OAAO,eAAe,WAAW,aAAa,YAAY,GAC5D;AACA,MAAM,oBAAoB,aAAa;CAErC,UAAU,QAAQ,IAAI,kBAAkB;CACxC,QAAQ;CACR,YAAY,CAAC,SAAS;CACtB,GAAG;AACL;AACA,IAAI;AACJ,eAAe,YAAY,SAAS,UAAU,OAAO;CACnD,IAAI,kBAAkB,OAAO,MAAM;CACnC,oBAAoB,YAAY;EAC9B,MAAM,QAAQ,iBAAiB,OAAO;EACtC,MAAM,aAAa,MAAM,iBAAiB,OAAO,OAAO;EACxD,IAAI,CAAC,YAAY;GACf,MAAM,IAAI,MACR,8EACF;EACF;EACA,MAAM,qBAAqB,OAAO,OAAO;EACzC,MAAM,qBAAqB,WAAW;EACtC,IAAI,sBAAsB,CAAC,mBAAmB,QAAQ;GACpD,MAAM,EAAE,kBAAkB,mBAAmB,MAAM,YAAY,KAAK;GACpE,WAAW,gBAAgB,cAAc,WAAW,aAAa;EACnE;EACA,IAAI,CAAC,wBAAwB,GAAG;GAC9B,OAAO;EACT;EACA,MAAM,iBAAiB,OAAO,UAAU;EACxC,OAAO;CACT,EAAC,CAAE;CACH,IAAI;EACF,OAAO,MAAM;CACf,UAAU;EACR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AAG;CAC/E,IAAI,QAAQ,WAAW,YAAY,GAAG;EACpC,OAAO;CACT;CACA,OAAO;AACT;AACA,MAAM,eAAe,CAAC,qBAAqB,KAAK,OAAO,mBAAmB,CAAC;AAC3E,IAAI,gBAAgB;AACpB,eAAe,4BAA4B,MAAM,YAAY;CAC3D,MAAM,cAAc,CAClB,GAAG,IAAI,IACL,CAAC,YAAY,GAAG,YAAY,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,MAAM,KAAK,MAAM,CAAC,CAAC,CACxE,CACF;CACA,KAAK,MAAM,QAAQ,aAAa;EAC9B,IAAI,MAAM,QAAQ,WAAW,IAAI,GAAG;GAClC,OAAO;EACT;CACF;CACA,IAAI,CAAC,eAAe;EAClB,gBAAgB;EAChB,QAAQ,KAAK,wFAAwF,WAAW;MAC9G,YAAY,KAAK;GACpB,EAAE;GACF;CACD;AACF;AACA,eAAe,kBAAkB,OAAO,WAAW;CACjD,IAAI,aAAa;CACjB,MAAM,UAAU,MAAM,QAAQ,QAAQ;EACpC,QAAQ;EACR,aAAa,CAAC,KAAK;EACnB,mBAAmB;GAAC;GAAO;GAAQ;GAAO;EAAM;EAChD,UAAU;EACV,OAAO;EACP,OAAO;GACL,oBAAoB;GACpB,gBAAgB;EAClB;EACA,SAAS,CAUP;GACE,MAAM;GACN,MAAM,EAAE,OAAO,aAAa;IAC1B,IAAI,SAAS;IACb,UAAU,EAAE,OAAO,IAAI,UAAU;KAAE,MAAM,KAAK;KAAM,UAAU;IAAK,EAAE;IACrE,YAAY;KACV,IAAI,CAAC,YAAY;MACf,aAAa;KACf,OAAO;MACL,UAAU;KACZ;IACF,CAAC;GACH;EACF,CACF;CACF,CAAC;CACD,KAAK,QAAQ,MAAM;CACnB,aAAa;EACX,QAAQ,QAAQ;CAClB;AACF"}
1
+ {"version":3,"file":"loadTamagui.js","names":[],"sources":["esm/extractor/loadTamagui.js"],"sourcesContent":["import { basename, dirname, extname, join, relative, resolve } from \"node:path\";\nimport { createRequire } from \"node:module\";\nimport { Color, colorLog } from \"@tamagui/cli-color\";\nimport esbuild from \"esbuild\";\nimport fsExtra from \"fs-extra\";\nimport { requireTamaguiCore } from \"../helpers/requireTamaguiCore\";\nimport { getNameToPaths, registerRequire, setRequireResult } from \"../registerRequire\";\nimport {\n getComponentStaticConfigByName,\n getBundledConfig,\n getLoadedConfig,\n hasBundledConfigChanged,\n loadComponentsSync,\n setLoadedConfig,\n writeTamaguiCSS\n} from \"./bundleConfig\";\nimport { getTamaguiConfigPathFromOptionsConfig } from \"./getTamaguiConfigPathFromOptionsConfig\";\nimport {\n generateTamaguiThemes,\n regenerateConfig,\n regenerateConfigSync\n} from \"./regenerateConfig\";\nconst nodeRequire = createRequire(\n typeof __filename === \"string\" ? __filename : import.meta.url\n);\nconst getFilledOptions = (propsIn) => ({\n // defaults\n platform: process.env.TAMAGUI_TARGET || \"web\",\n config: \"tamagui.config.ts\",\n components: [\"tamagui\"],\n ...propsIn\n});\nlet isLoadingPromise;\nasync function loadTamagui(propsIn, rebuild = false) {\n if (isLoadingPromise) return await isLoadingPromise;\n isLoadingPromise = (async () => {\n const props = getFilledOptions(propsIn);\n const bundleInfo = await getBundledConfig(props, rebuild);\n if (!bundleInfo) {\n throw new Error(\n `[tamagui] The config and component bundle completed without a project result`\n );\n }\n await generateThemesAndLog(props, rebuild);\n const maybeTamaguiConfig = bundleInfo.tamaguiConfig;\n if (maybeTamaguiConfig && !maybeTamaguiConfig.parsed) {\n const { createTamagui } = requireTamaguiCore(props.platform || \"web\");\n bundleInfo.tamaguiConfig = createTamagui(bundleInfo.tamaguiConfig);\n }\n if (!hasBundledConfigChanged()) {\n return bundleInfo;\n }\n await regenerateConfig(props, bundleInfo);\n return bundleInfo;\n })();\n try {\n return await isLoadingPromise;\n } finally {\n isLoadingPromise = null;\n }\n}\nasync function loadTamaguiFromModules(propsIn, evaluated) {\n const props = getFilledOptions(propsIn);\n await generateThemesAndLog(props);\n const configModule = evaluated.config;\n let tamaguiConfig = configModule.default || configModule.config || configModule;\n if (\"config\" in tamaguiConfig && tamaguiConfig.config && !(\"tokens\" in tamaguiConfig)) {\n tamaguiConfig = tamaguiConfig.config;\n }\n if (!tamaguiConfig) {\n throw new Error(`The Vite module runner did not return a valid Tamagui config`);\n }\n const hostCore = requireTamaguiCore(props.platform || \"web\");\n if (!tamaguiConfig.parsed) {\n tamaguiConfig = hostCore.createTamagui(tamaguiConfig);\n } else {\n hostCore.installTamaguiConfig(tamaguiConfig);\n }\n setLoadedConfig(tamaguiConfig);\n const components = evaluated.components.map(({ moduleName, module }) => {\n setRequireResult(moduleName, module);\n return {\n moduleName,\n nameToInfo: getComponentStaticConfigByName(moduleName, module.default ?? module)\n };\n });\n const projectInfo = {\n components,\n nameToPaths: {},\n tamaguiConfig,\n stampSources: evaluated.stampSources\n };\n if (props.outputCSS) {\n await writeTamaguiCSS(props.outputCSS, projectInfo.tamaguiConfig);\n }\n await regenerateConfig(props, projectInfo);\n return projectInfo;\n}\nlet waiting = false;\nconst generateThemesAndLog = async (options, force = false) => {\n if (waiting) return;\n if (!options.themeBuilder) return;\n try {\n waiting = true;\n await new Promise((res) => setTimeout(res, 30));\n const didGenerate = await generateTamaguiThemes(options, force);\n if (didGenerate) {\n const whitespaceBefore = ` `;\n colorLog(\n Color.FgYellow,\n `${whitespaceBefore}\\u27A1 [tamagui] generated themes: ${relative(\n options.root || process.cwd(),\n options.themeBuilder.output\n )}`\n );\n if (options.outputCSS) {\n const loadedConfig = getLoadedConfig();\n if (loadedConfig) {\n await writeTamaguiCSS(options.outputCSS, loadedConfig);\n }\n }\n }\n } finally {\n waiting = false;\n }\n};\nconst last = {};\nconst lastVersion = {};\nconst buildConfigDependencies = /* @__PURE__ */ new WeakMap();\nfunction getTamaguiBuildConfigDependencies(options) {\n return buildConfigDependencies.get(options) ?? [];\n}\nconst esbuildBuildConfigLoader = async (absolutePath, root) => {\n const result = await esbuild.build({\n entryPoints: [absolutePath],\n absWorkingDir: root,\n bundle: true,\n packages: \"external\",\n platform: \"node\",\n format: \"cjs\",\n target: \"node18\",\n write: false,\n metafile: true\n });\n const code = result.outputFiles[0]?.text;\n if (!code) throw new Error(`No output generated for ${absolutePath}`);\n const module = { exports: {} };\n const projectRequire = createRequire(absolutePath);\n const fn = new Function(\"module\", \"exports\", \"require\", \"process\", code);\n fn(module, module.exports, projectRequire, process);\n return {\n exports: module.exports,\n dependencies: Object.keys(result.metafile.inputs)\n };\n};\nasync function loadTamaguiBuildConfigAsync(tamaguiOptions, loadBuildConfigModule = esbuildBuildConfigLoader) {\n const buildFilePath = tamaguiOptions?.buildFile ?? \"./tamagui.build.ts\";\n const root = tamaguiOptions?.root || process.cwd();\n const absolutePath = resolve(root, buildFilePath);\n if (fsExtra.existsSync(absolutePath)) {\n try {\n const evaluated = await loadBuildConfigModule(absolutePath, root);\n const out = evaluated.exports.default || evaluated.exports;\n if (!out || typeof out !== \"object\") {\n throw new Error(`No default export found in ${buildFilePath}: ${out}`);\n }\n const loadedOptions = {\n ...tamaguiOptions,\n ...out\n };\n const dependencies2 = evaluated.dependencies.map((file) => resolve(root, file));\n buildConfigDependencies.set(loadedOptions, dependencies2);\n tamaguiOptions = loadedOptions;\n } catch (err) {\n console.error(`[tamagui] Error loading ${buildFilePath}:`, err);\n throw err;\n }\n }\n if (!tamaguiOptions) {\n throw new Error(\n `No tamagui build options found either via input props or at tamagui.build.ts`\n );\n }\n const options = {\n config: \"tamagui.config.ts\",\n components: [\"tamagui\", \"@tamagui/core\"],\n ...tamaguiOptions\n };\n const dependencies = buildConfigDependencies.get(tamaguiOptions);\n if (dependencies) buildConfigDependencies.set(options, dependencies);\n return options;\n}\nfunction loadTamaguiBuildConfigSync(tamaguiOptions) {\n const buildFilePath = tamaguiOptions?.buildFile ?? \"./tamagui.build.ts\";\n const root = tamaguiOptions?.root || process.cwd();\n const absolutePath = resolve(root, buildFilePath);\n if (fsExtra.existsSync(absolutePath)) {\n const registered = registerRequire(\"web\", {\n ignoredModules: tamaguiOptions?.dangerouslyIgnoreStaticEvaluationModules\n });\n try {\n const out = nodeRequire(absolutePath).default;\n if (!out) {\n throw new Error(`No default export found in ${buildFilePath}: ${out}`);\n }\n tamaguiOptions = {\n ...tamaguiOptions,\n ...out\n };\n } finally {\n registered.unregister();\n }\n }\n if (!tamaguiOptions) {\n throw new Error(\n `No tamagui build options found either via input props or at tamagui.build.ts`\n );\n }\n return {\n config: \"tamagui.config.ts\",\n components: [\"tamagui\", \"@tamagui/core\"],\n ...tamaguiOptions\n };\n}\nfunction loadTamaguiSync({\n forceExports,\n cacheKey,\n ...propsIn\n}) {\n const key = JSON.stringify(propsIn);\n if (last[key] && !hasBundledConfigChanged()) {\n if (!lastVersion[key] || lastVersion[key] === cacheKey) {\n return last[key];\n }\n }\n lastVersion[key] = cacheKey || \"\";\n const props = getFilledOptions(propsIn);\n const previousIsStatic = process.env.IS_STATIC;\n const previousIsServer = process.env.TAMAGUI_IS_SERVER;\n const previousDev = globalThis[\"__DEV__\"];\n process.env.IS_STATIC = \"is_static\";\n process.env.TAMAGUI_IS_SERVER = \"true\";\n const { unregister } = registerRequire(props.platform || \"web\", {\n ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,\n nativePlatform: props.nativePlatform\n });\n try {\n globalThis[\"__DEV__\"] = process.env.NODE_ENV === \"development\";\n let tamaguiConfig = null;\n if (propsIn.config) {\n const configPath = getTamaguiConfigPathFromOptionsConfig(\n propsIn.config,\n propsIn.root\n );\n const exp = nodeRequire(configPath);\n if (!exp) {\n throw new Error(`The Tamagui config module did not export a value`);\n }\n tamaguiConfig = exp[\"default\"] || exp[\"config\"] || exp;\n if (!tamaguiConfig || !tamaguiConfig.parsed) {\n const confPath = nodeRequire.resolve(configPath);\n throw new Error(`Can't find valid config in ${confPath}:\n \n Be sure you \"export default\" or \"export const config\" the config.`);\n }\n if (tamaguiConfig) {\n const { createTamagui } = requireTamaguiCore(props.platform || \"web\");\n createTamagui(tamaguiConfig);\n }\n }\n const components = loadComponentsSync(props, forceExports);\n if (!components) {\n throw new Error(`No components loaded`);\n }\n if (process.env.DEBUG === \"tamagui\") {\n console.info(`components`, components);\n }\n const info = {\n components,\n tamaguiConfig,\n nameToPaths: getNameToPaths()\n };\n if (tamaguiConfig) {\n const { outputCSS } = props;\n if (outputCSS) {\n writeTamaguiCSS(outputCSS, tamaguiConfig);\n }\n regenerateConfigSync(props, info);\n }\n last[key] = {\n ...info,\n cached: true\n };\n return info;\n } finally {\n if (previousIsStatic === void 0) delete process.env.IS_STATIC;\n else process.env.IS_STATIC = previousIsStatic;\n if (previousIsServer === void 0) delete process.env.TAMAGUI_IS_SERVER;\n else process.env.TAMAGUI_IS_SERVER = previousIsServer;\n globalThis[\"__DEV__\"] = previousDev;\n unregister();\n }\n}\nasync function getOptions({\n root = process.cwd(),\n tsconfigPath = \"tsconfig.json\",\n tamaguiOptions,\n host,\n debug\n} = {}) {\n const dotDir = join(root, \".tamagui\");\n let pkgJson = {};\n try {\n pkgJson = await fsExtra.readJSON(join(root, \"package.json\"));\n } catch (err) {\n }\n return {\n mode: process.env.NODE_ENV === \"production\" ? \"production\" : \"development\",\n root,\n host: host || \"127.0.0.1\",\n pkgJson,\n debug,\n tsconfigPath,\n tamaguiOptions: {\n platform: process.env.TAMAGUI_TARGET || \"web\",\n components: [\"tamagui\"],\n ...tamaguiOptions,\n config: tamaguiOptions?.config ?? await getDefaultTamaguiConfigPath(root, tamaguiOptions?.config)\n },\n paths: {\n root,\n dotDir,\n conf: join(dotDir, \"tamagui.config.json\"),\n types: join(dotDir, \"types.json\")\n }\n };\n}\nfunction resolveWebOrNativeSpecificEntry(entry, platform) {\n const workspaceRoot = resolve();\n const resolved = nodeRequire.resolve(entry, { paths: [workspaceRoot] });\n const ext = extname(resolved);\n const fileName = basename(resolved).replace(ext, \"\");\n const target = platform || process.env.TAMAGUI_TARGET || \"web\";\n const specificExt = target === \"web\" ? \"web\" : \"native\";\n const specificFile = join(dirname(resolved), fileName + \".\" + specificExt + ext);\n if (fsExtra.existsSync(specificFile)) {\n return specificFile;\n }\n return entry;\n}\nconst defaultPaths = [\"tamagui.config.ts\", join(\"src\", \"tamagui.config.ts\")];\nlet hasWarnedOnce = false;\nasync function getDefaultTamaguiConfigPath(root, configPath) {\n const searchPaths = [\n ...new Set(\n [configPath, ...defaultPaths].filter(Boolean).map((p) => join(root, p))\n )\n ];\n for (const path of searchPaths) {\n if (await fsExtra.pathExists(path)) {\n return path;\n }\n }\n if (!hasWarnedOnce) {\n hasWarnedOnce = true;\n console.warn(`Warning: couldn't find tamagui.config.ts in the following paths given configuration \"${configPath}\":\n ${searchPaths.join(`\n `)}\n `);\n }\n}\nasync function esbuildWatchFiles(entry, onChanged) {\n let hasRunOnce = false;\n const context = await esbuild.context({\n bundle: true,\n entryPoints: [entry],\n resolveExtensions: [\".ts\", \".tsx\", \".js\", \".mjs\"],\n logLevel: \"silent\",\n write: false,\n alias: {\n \"react-native-web\": \"@tamagui/react-native-web-lite\",\n \"react-native\": \"@tamagui/react-native-web-lite\"\n },\n plugins: [\n // to log what its watching:\n // {\n // name: 'test',\n // setup({ onResolve }) {\n // onResolve({ filter: /.*/ }, (args) => {\n // console.log('wtf', args.path)\n // })\n // },\n // },\n {\n name: `on-rebuild`,\n setup({ onEnd, onResolve }) {\n let filter = /^[^./]|^\\.[^./]|^\\.\\.[^/]/;\n onResolve({ filter }, (args) => ({ path: args.path, external: true }));\n onEnd(() => {\n if (!hasRunOnce) {\n hasRunOnce = true;\n } else {\n onChanged();\n }\n });\n }\n }\n ]\n });\n void context.watch();\n return () => {\n context.dispose();\n };\n}\nexport {\n esbuildWatchFiles,\n generateThemesAndLog,\n getOptions,\n getTamaguiBuildConfigDependencies,\n loadTamagui,\n loadTamaguiBuildConfigAsync,\n loadTamaguiBuildConfigSync,\n loadTamaguiFromModules,\n loadTamaguiSync,\n resolveWebOrNativeSpecificEntry\n};\n//# sourceMappingURL=loadTamagui.js.map\n"],"mappings":";;;;;;;;;;;;AAsBA,MAAM,cAAc,cACl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QAAQ,KAAK,wFAAwF,WAAW;MAC9G,YAAY,KAAK;GACpB,EAAE;GACF;CACD;AACF;AACA,eAAe,kBAAkB,OAAO,WAAW;CACjD,IAAI,aAAa;CACjB,MAAM,UAAU,MAAM,QAAQ,QAAQ;EACpC,QAAQ;EACR,aAAa,CAAC,KAAK;EACnB,mBAAmB;GAAC;GAAO;GAAQ;GAAO;EAAM;EAChD,UAAU;EACV,OAAO;EACP,OAAO;GACL,oBAAoB;GACpB,gBAAgB;EAClB;EACA,SAAS,CAUP;GACE,MAAM;GACN,MAAM,EAAE,OAAO,aAAa;IAC1B,IAAI,SAAS;IACb,UAAU,EAAE,OAAO,IAAI,UAAU;KAAE,MAAM,KAAK;KAAM,UAAU;IAAK,EAAE;IACrE,YAAY;KACV,IAAI,CAAC,YAAY;MACf,aAAa;KACf,OAAO;MACL,UAAU;KACZ;IACF,CAAC;GACH;EACF,CACF;CACF,CAAC;CACD,KAAK,QAAQ,MAAM;CACnB,aAAa;EACX,QAAQ,QAAQ;CAClB;AACF"}
@@ -4,6 +4,7 @@ import { register } from "esbuild-register/dist/node";
4
4
  import { createRequire } from "node:module";
5
5
  import { esbuildIgnoreFilesRegex } from "./extractor/bundle.mjs";
6
6
  import { requireTamaguiCore } from "./helpers/requireTamaguiCore.mjs";
7
+ import { getNativeColorFactories } from "@tamagui/react-native-web-lite/nativeColors";
7
8
  import { getStaticEvaluationModuleReplacement, isIgnoredStaticEvaluationModule } from "./staticEvaluationIgnoredModules.mjs";
8
9
 
9
10
  const nameToPaths = {};
@@ -32,6 +33,14 @@ const compiled = {};
32
33
  function setRequireResult(name, result) {
33
34
  compiled[name] = result;
34
35
  }
36
+ function requireNativeEvaluationModule(modulePath, nativePlatform) {
37
+ const registration = registerRequire("native", { nativePlatform });
38
+ try {
39
+ return nodeRequire(modulePath);
40
+ } finally {
41
+ registration.unregister();
42
+ }
43
+ }
35
44
  function getStaticExtractionStub(path) {
36
45
  switch (path) {
37
46
  case "expo-constants": return {
@@ -85,7 +94,7 @@ function getStaticExtractionStub(path) {
85
94
  default: return null;
86
95
  }
87
96
  }
88
- function registerRequire(platform, { ignoredModules = [] } = { ignoredModules: [] }) {
97
+ function registerRequire(platform, { ignoredModules = [], nativePlatform } = { ignoredModules: [] }) {
89
98
  if (isRegistered) {
90
99
  return {
91
100
  tamaguiRequire: nodeRequire,
@@ -114,6 +123,7 @@ function registerRequire(platform, { ignoredModules = [] } = { ignoredModules: [
114
123
  }
115
124
  isRegistered = true;
116
125
  Module.prototype.require = tamaguiRequire;
126
+ let nativeModule;
117
127
  function tamaguiRequire(path) {
118
128
  const staticExtractionStub = getStaticExtractionStub(path);
119
129
  if (staticExtractionStub) {
@@ -161,6 +171,12 @@ function registerRequire(platform, { ignoredModules = [] } = { ignoredModules: [
161
171
  if (path === "react-native/package.json") {
162
172
  return og.apply(this, ["react-native-web/package.json"]);
163
173
  }
174
+ if (platform === "native" && path === "react-native") {
175
+ return nativeModule ||= {
176
+ ...og.apply(this, ["@tamagui/react-native-web-lite"]),
177
+ ...getNativeColorFactories(nativePlatform || process.env.EXPO_OS || "ios")
178
+ };
179
+ }
164
180
  if (path === "@tamagui/react-native-web-lite" || path === "react-native" || path.startsWith("react-native/") || path === "react-native-web" || path.startsWith("react-native-web/")) {
165
181
  try {
166
182
  return og.apply("react-native");
@@ -191,5 +207,5 @@ function registerRequire(platform, { ignoredModules = [] } = { ignoredModules: [
191
207
  };
192
208
  }
193
209
 
194
- export { getNameToPaths, registerRequire, setRequireResult };
210
+ export { getNameToPaths, registerRequire, requireNativeEvaluationModule, setRequireResult };
195
211
  //# sourceMappingURL=registerRequire.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"registerRequire.js","names":[],"sources":["esm/registerRequire.js"],"sourcesContent":["import { dirname } from \"node:path\";\nimport { buildSync } from \"esbuild\";\nimport { register } from \"esbuild-register/dist/node\";\nimport { createRequire } from \"node:module\";\nimport { esbuildIgnoreFilesRegex } from \"./extractor/bundle\";\nimport { requireTamaguiCore } from \"./helpers/requireTamaguiCore\";\nimport {\n getStaticEvaluationModuleReplacement,\n isIgnoredStaticEvaluationModule\n} from \"./staticEvaluationIgnoredModules\";\nconst nameToPaths = {};\nconst nodeRequire = createRequire(\n typeof __filename === \"string\" ? __filename : import.meta.url\n);\nconst getNameToPaths = () => nameToPaths;\nconst Module = nodeRequire(\"node:module\");\nlet isRegistered = false;\nlet og;\nclass StaticEvaluationError extends Error {\n constructor(moduleName, importer, failedModule, reason, options) {\n super(\n `[tamagui] Failed to evaluate module \"${failedModule}\" imported from \"${importer}\" while loading the Tamagui config and configured components.\nReason: ${reason}\nFix the module so it can run in Node during the build. If it is runtime-only and none of its exports create your Tamagui config or components, add \"${moduleName}\" to dangerouslyIgnoreStaticEvaluationModules in tamagui.build.ts.`,\n options\n );\n this.moduleName = moduleName;\n this.importer = importer;\n this.failedModule = failedModule;\n this.reason = reason;\n }\n moduleName;\n importer;\n failedModule;\n reason;\n code = \"TAMAGUI_STATIC_EVALUATION_ERROR\";\n}\nconst compiled = {};\nfunction setRequireResult(name, result) {\n compiled[name] = result;\n}\nfunction getStaticExtractionStub(path) {\n switch (path) {\n case \"expo-constants\":\n return {\n __esModule: true,\n default: {\n executionEnvironment: null\n },\n ExecutionEnvironment: {\n Bare: \"bare\",\n Standalone: \"standalone\",\n StoreClient: \"storeClient\"\n }\n };\n case \"expo-updates\":\n return {\n __esModule: true,\n default: {\n isEnabled: false,\n isUsingEmbeddedAssets: true\n },\n checkForUpdateAsync: async () => ({ isAvailable: false }),\n fetchUpdateAsync: async () => ({ isNew: false }),\n reloadAsync: async () => {\n }\n };\n case \"react-native-reanimated\": {\n const identity = (value) => value;\n const sharedValue = (value) => ({\n value,\n get: () => value,\n set: (next) => {\n value = typeof next === \"function\" ? next(value) : next;\n }\n });\n const Animated = {\n createAnimatedComponent: identity,\n View: () => null,\n Text: () => null\n };\n return {\n __esModule: true,\n default: Animated,\n cancelAnimation: () => {\n },\n runOnJS: identity,\n runOnUI: identity,\n useAnimatedReaction: () => {\n },\n useAnimatedStyle: (callback) => callback(),\n useDerivedValue: (callback) => sharedValue(callback()),\n useSharedValue: sharedValue,\n withDelay: (_delay, animation) => animation,\n withSpring: identity,\n withTiming: identity\n };\n }\n default:\n return null;\n }\n}\nfunction registerRequire(platform, { ignoredModules = [] } = {\n ignoredModules: []\n}) {\n if (isRegistered) {\n return {\n tamaguiRequire: nodeRequire,\n unregister: () => {\n }\n };\n }\n const originalResolveFilename = Module._resolveFilename;\n const { unregister } = register({\n hookIgnoreNodeModules: false,\n // don't transform @tamagui packages - they have pre-built dist files\n hookMatcher: (filename) => {\n if (filename.includes(\"@tamagui\") || /\\/tamagui\\/code\\/(core|ui|packages)\\//.test(filename)) {\n return false;\n }\n return true;\n }\n });\n const tsconfigPatchedResolve = Module._resolveFilename;\n Module._resolveFilename = function(request, ...args) {\n if (request.startsWith(\"@tamagui/\")) {\n return originalResolveFilename.call(this, request, ...args);\n }\n return tsconfigPatchedResolve.call(this, request, ...args);\n };\n if (!og) {\n og = Module.prototype.require;\n }\n isRegistered = true;\n Module.prototype.require = tamaguiRequire;\n function tamaguiRequire(path) {\n const staticExtractionStub = getStaticExtractionStub(path);\n if (staticExtractionStub) {\n return staticExtractionStub;\n }\n if (path === \"tamagui\" && platform === \"native\") {\n return og.apply(this, [\"tamagui/native\"]);\n }\n if (path === \"@tamagui/core\") {\n return requireTamaguiCore(platform, (path2) => {\n return og.apply(this, [path2]);\n });\n }\n const staticEvaluationReplacement = getStaticEvaluationModuleReplacement(path);\n if (staticEvaluationReplacement) {\n if (!(path in compiled)) {\n const replacementPath = nodeRequire.resolve(staticEvaluationReplacement);\n const output = buildSync({\n entryPoints: [replacementPath],\n bundle: true,\n format: \"cjs\",\n platform: \"node\",\n write: false\n }).outputFiles[0].text;\n const replacementModule = new Module(replacementPath, this);\n replacementModule.filename = replacementPath;\n replacementModule.paths = Module._nodeModulePaths(dirname(replacementPath));\n replacementModule._compile(output, replacementPath);\n compiled[path] = replacementModule.exports;\n }\n return compiled[path];\n }\n if (staticEvaluationReplacement === null || isIgnoredStaticEvaluationModule(path, ignoredModules)) {\n return {};\n }\n if (esbuildIgnoreFilesRegex.test(path)) {\n return {};\n }\n if (path in compiled) {\n return compiled[path];\n }\n if (path === \"react-native-svg\") {\n return og.apply(this, [\"@tamagui/react-native-svg\"]);\n }\n if (path === \"react-native/package.json\") {\n return og.apply(this, [\"react-native-web/package.json\"]);\n }\n if (path === \"@tamagui/react-native-web-lite\" || path === \"react-native\" || path.startsWith(\"react-native/\") || path === \"react-native-web\" || path.startsWith(\"react-native-web/\")) {\n try {\n return og.apply(\"react-native\");\n } catch {\n return og.apply(this, [\"@tamagui/react-native-web-lite\"]);\n }\n }\n try {\n const out = og.apply(this, arguments);\n return out;\n } catch (err) {\n if (err?.code === \"TAMAGUI_STATIC_EVALUATION_ERROR\") {\n throw err;\n }\n const importer = this?.filename || this?.id || \"<unknown module>\";\n const reason = err instanceof Error ? err.message : String(err);\n const failedModule = reason.match(/Cannot find native module ['\"]([^'\"]+)['\"]/)?.[1] || path;\n throw new StaticEvaluationError(path, importer, failedModule, reason, {\n cause: err\n });\n }\n }\n return {\n tamaguiRequire,\n unregister: () => {\n unregister();\n isRegistered = false;\n Module.prototype.require = og;\n }\n };\n}\nexport {\n getNameToPaths,\n registerRequire,\n setRequireResult\n};\n//# sourceMappingURL=registerRequire.js.map\n"],"mappings":";;;;;;;;;AAUA,MAAM,cAAc,CAAC;AACrB,MAAM,cAAc,cAClB,OAAO,eAAe,WAAW,aAAa,YAAY,GAC5D;AACA,MAAM,uBAAuB;AAC7B,MAAM,SAAS,YAAY,aAAa;AACxC,IAAI,eAAe;AACnB,IAAI;AACJ,IAAM,wBAAN,cAAoC,MAAM;CACxC,YAAY,YAAY,UAAU,cAAc,QAAQ,SAAS;EAC/D,MACE,wCAAwC,aAAa,mBAAmB,SAAS;UAC7E,OAAO;sJACqI,WAAW,qEAC3J,OACF;EACA,KAAK,aAAa;EAClB,KAAK,WAAW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,gCAAgC,QAAQ,gCAAgC,MAAM,cAAc,GAAG;GACjG,OAAO,CAAC;EACV;EACA,IAAI,wBAAwB,KAAK,IAAI,GAAG;GACtC,OAAO,CAAC;EACV;EACA,IAAI,QAAQ,UAAU;GACpB,OAAO,SAAS;EAClB;EACA,IAAI,SAAS,oBAAoB;GAC/B,OAAO,GAAG,MAAM,MAAM,CAAC,2BAA2B,CAAC;EACrD;EACA,IAAI,SAAS,6BAA6B;GACxC,OAAO,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC;EACzD;EACA,IAAI,SAAS,oCAAoC,SAAS,kBAAkB,KAAK,WAAW,eAAe,KAAK,SAAS,sBAAsB,KAAK,WAAW,mBAAmB,GAAG;GACnL,IAAI;IACF,OAAO,GAAG,MAAM,cAAc;GAChC,QAAQ;IACN,OAAO,GAAG,MAAM,MAAM,CAAC,gCAAgC,CAAC;GAC1D;EACF;EACA,IAAI;GACF,MAAM,MAAM,GAAG,MAAM,MAAM,SAAS;GACpC,OAAO;EACT,SAAS,KAAK;GACZ,IAAI,KAAK,SAAS,mCAAmC;IACnD,MAAM;GACR;GACA,MAAM,WAAW,MAAM,YAAY,MAAM,MAAM;GAC/C,MAAM,SAAS,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;GAC9D,MAAM,eAAe,OAAO,MAAM,4CAA4C,CAAC,GAAG,MAAM;GACxF,MAAM,IAAI,sBAAsB,MAAM,UAAU,cAAc,QAAQ,EACpE,OAAO,IACT,CAAC;EACH;CACF;CACA,OAAO;EACL;EACA,kBAAkB;GAChB,WAAW;GACX,eAAe;GACf,OAAO,UAAU,UAAU;EAC7B;CACF;AACF"}
1
+ {"version":3,"file":"registerRequire.js","names":[],"sources":["esm/registerRequire.js"],"sourcesContent":["import { dirname } from \"node:path\";\nimport { buildSync } from \"esbuild\";\nimport { register } from \"esbuild-register/dist/node\";\nimport { createRequire } from \"node:module\";\nimport { esbuildIgnoreFilesRegex } from \"./extractor/bundle\";\nimport { requireTamaguiCore } from \"./helpers/requireTamaguiCore\";\nimport { getNativeColorFactories } from \"@tamagui/react-native-web-lite/nativeColors\";\nimport {\n getStaticEvaluationModuleReplacement,\n isIgnoredStaticEvaluationModule\n} from \"./staticEvaluationIgnoredModules\";\nconst nameToPaths = {};\nconst nodeRequire = createRequire(\n typeof __filename === \"string\" ? __filename : import.meta.url\n);\nconst getNameToPaths = () => nameToPaths;\nconst Module = nodeRequire(\"node:module\");\nlet isRegistered = false;\nlet og;\nclass StaticEvaluationError extends Error {\n constructor(moduleName, importer, failedModule, reason, options) {\n super(\n `[tamagui] Failed to evaluate module \"${failedModule}\" imported from \"${importer}\" while loading the Tamagui config and configured components.\nReason: ${reason}\nFix the module so it can run in Node during the build. If it is runtime-only and none of its exports create your Tamagui config or components, add \"${moduleName}\" to dangerouslyIgnoreStaticEvaluationModules in tamagui.build.ts.`,\n options\n );\n this.moduleName = moduleName;\n this.importer = importer;\n this.failedModule = failedModule;\n this.reason = reason;\n }\n moduleName;\n importer;\n failedModule;\n reason;\n code = \"TAMAGUI_STATIC_EVALUATION_ERROR\";\n}\nconst compiled = {};\nfunction setRequireResult(name, result) {\n compiled[name] = result;\n}\nfunction requireNativeEvaluationModule(modulePath, nativePlatform) {\n const registration = registerRequire(\"native\", { nativePlatform });\n try {\n return nodeRequire(modulePath);\n } finally {\n registration.unregister();\n }\n}\nfunction getStaticExtractionStub(path) {\n switch (path) {\n case \"expo-constants\":\n return {\n __esModule: true,\n default: {\n executionEnvironment: null\n },\n ExecutionEnvironment: {\n Bare: \"bare\",\n Standalone: \"standalone\",\n StoreClient: \"storeClient\"\n }\n };\n case \"expo-updates\":\n return {\n __esModule: true,\n default: {\n isEnabled: false,\n isUsingEmbeddedAssets: true\n },\n checkForUpdateAsync: async () => ({ isAvailable: false }),\n fetchUpdateAsync: async () => ({ isNew: false }),\n reloadAsync: async () => {\n }\n };\n case \"react-native-reanimated\": {\n const identity = (value) => value;\n const sharedValue = (value) => ({\n value,\n get: () => value,\n set: (next) => {\n value = typeof next === \"function\" ? next(value) : next;\n }\n });\n const Animated = {\n createAnimatedComponent: identity,\n View: () => null,\n Text: () => null\n };\n return {\n __esModule: true,\n default: Animated,\n cancelAnimation: () => {\n },\n runOnJS: identity,\n runOnUI: identity,\n useAnimatedReaction: () => {\n },\n useAnimatedStyle: (callback) => callback(),\n useDerivedValue: (callback) => sharedValue(callback()),\n useSharedValue: sharedValue,\n withDelay: (_delay, animation) => animation,\n withSpring: identity,\n withTiming: identity\n };\n }\n default:\n return null;\n }\n}\nfunction registerRequire(platform, {\n ignoredModules = [],\n nativePlatform\n} = {\n ignoredModules: []\n}) {\n if (isRegistered) {\n return {\n tamaguiRequire: nodeRequire,\n unregister: () => {\n }\n };\n }\n const originalResolveFilename = Module._resolveFilename;\n const { unregister } = register({\n hookIgnoreNodeModules: false,\n // don't transform @tamagui packages - they have pre-built dist files\n hookMatcher: (filename) => {\n if (filename.includes(\"@tamagui\") || /\\/tamagui\\/code\\/(core|ui|packages)\\//.test(filename)) {\n return false;\n }\n return true;\n }\n });\n const tsconfigPatchedResolve = Module._resolveFilename;\n Module._resolveFilename = function(request, ...args) {\n if (request.startsWith(\"@tamagui/\")) {\n return originalResolveFilename.call(this, request, ...args);\n }\n return tsconfigPatchedResolve.call(this, request, ...args);\n };\n if (!og) {\n og = Module.prototype.require;\n }\n isRegistered = true;\n Module.prototype.require = tamaguiRequire;\n let nativeModule;\n function tamaguiRequire(path) {\n const staticExtractionStub = getStaticExtractionStub(path);\n if (staticExtractionStub) {\n return staticExtractionStub;\n }\n if (path === \"tamagui\" && platform === \"native\") {\n return og.apply(this, [\"tamagui/native\"]);\n }\n if (path === \"@tamagui/core\") {\n return requireTamaguiCore(platform, (path2) => {\n return og.apply(this, [path2]);\n });\n }\n const staticEvaluationReplacement = getStaticEvaluationModuleReplacement(path);\n if (staticEvaluationReplacement) {\n if (!(path in compiled)) {\n const replacementPath = nodeRequire.resolve(staticEvaluationReplacement);\n const output = buildSync({\n entryPoints: [replacementPath],\n bundle: true,\n format: \"cjs\",\n platform: \"node\",\n write: false\n }).outputFiles[0].text;\n const replacementModule = new Module(replacementPath, this);\n replacementModule.filename = replacementPath;\n replacementModule.paths = Module._nodeModulePaths(dirname(replacementPath));\n replacementModule._compile(output, replacementPath);\n compiled[path] = replacementModule.exports;\n }\n return compiled[path];\n }\n if (staticEvaluationReplacement === null || isIgnoredStaticEvaluationModule(path, ignoredModules)) {\n return {};\n }\n if (esbuildIgnoreFilesRegex.test(path)) {\n return {};\n }\n if (path in compiled) {\n return compiled[path];\n }\n if (path === \"react-native-svg\") {\n return og.apply(this, [\"@tamagui/react-native-svg\"]);\n }\n if (path === \"react-native/package.json\") {\n return og.apply(this, [\"react-native-web/package.json\"]);\n }\n if (platform === \"native\" && path === \"react-native\") {\n return nativeModule ||= {\n ...og.apply(this, [\"@tamagui/react-native-web-lite\"]),\n ...getNativeColorFactories(nativePlatform || process.env.EXPO_OS || \"ios\")\n };\n }\n if (path === \"@tamagui/react-native-web-lite\" || path === \"react-native\" || path.startsWith(\"react-native/\") || path === \"react-native-web\" || path.startsWith(\"react-native-web/\")) {\n try {\n return og.apply(\"react-native\");\n } catch {\n return og.apply(this, [\"@tamagui/react-native-web-lite\"]);\n }\n }\n try {\n const out = og.apply(this, arguments);\n return out;\n } catch (err) {\n if (err?.code === \"TAMAGUI_STATIC_EVALUATION_ERROR\") {\n throw err;\n }\n const importer = this?.filename || this?.id || \"<unknown module>\";\n const reason = err instanceof Error ? err.message : String(err);\n const failedModule = reason.match(/Cannot find native module ['\"]([^'\"]+)['\"]/)?.[1] || path;\n throw new StaticEvaluationError(path, importer, failedModule, reason, {\n cause: err\n });\n }\n }\n return {\n tamaguiRequire,\n unregister: () => {\n unregister();\n isRegistered = false;\n Module.prototype.require = og;\n }\n };\n}\nexport {\n getNameToPaths,\n registerRequire,\n requireNativeEvaluationModule,\n setRequireResult\n};\n//# sourceMappingURL=registerRequire.js.map\n"],"mappings":";;;;;;;;;;AAWA,MAAM,cAA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,CAAC;GAC1D;EACF;EACA,IAAI;GACF,MAAM,MAAM,GAAG,MAAM,MAAM,SAAS;GACpC,OAAO;EACT,SAAS,KAAK;GACZ,IAAI,KAAK,SAAS,mCAAmC;IACnD,MAAM;GACR;GACA,MAAM,WAAW,MAAM,YAAY,MAAM,MAAM;GAC/C,MAAM,SAAS,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;GAC9D,MAAM,eAAe,OAAO,MAAM,4CAA4C,CAAC,GAAG,MAAM;GACxF,MAAM,IAAI,sBAAsB,MAAM,UAAU,cAAc,QAAQ,EACpE,OAAO,IACT,CAAC;EACH;CACF;CACA,OAAO;EACL;EACA,kBAAkB;GAChB,WAAW;GACX,eAAe;GACf,OAAO,UAAU,UAAU;EAC7B;CACF;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/static",
3
- "version": "3.1.3",
3
+ "version": "3.1.5",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "license": "MIT",
6
6
  "source": "src/index.ts",
@@ -45,22 +45,22 @@
45
45
  "clean:build": "tamagui-build clean:build"
46
46
  },
47
47
  "dependencies": {
48
- "@tamagui/animation-helpers": "3.1.3",
49
- "@tamagui/cli-color": "3.1.3",
50
- "@tamagui/compiler-core": "3.1.3",
51
- "@tamagui/config-default": "3.1.3",
52
- "@tamagui/core": "3.1.3",
53
- "@tamagui/dom": "3.1.3",
54
- "@tamagui/fake-react-native": "3.1.3",
55
- "@tamagui/generate-themes": "3.1.3",
56
- "@tamagui/helpers": "3.1.3",
57
- "@tamagui/helpers-node": "3.1.3",
58
- "@tamagui/react-native-web-internals": "3.1.3",
59
- "@tamagui/react-native-web-lite": "3.1.3",
60
- "@tamagui/shorthands": "3.1.3",
61
- "@tamagui/style-grammar": "3.1.3",
62
- "@tamagui/types": "3.1.3",
63
- "@tamagui/web": "3.1.3",
48
+ "@tamagui/animation-helpers": "3.1.5",
49
+ "@tamagui/cli-color": "3.1.5",
50
+ "@tamagui/compiler-core": "3.1.5",
51
+ "@tamagui/config-default": "3.1.5",
52
+ "@tamagui/core": "3.1.5",
53
+ "@tamagui/dom": "3.1.5",
54
+ "@tamagui/fake-react-native": "3.1.5",
55
+ "@tamagui/generate-themes": "3.1.5",
56
+ "@tamagui/helpers": "3.1.5",
57
+ "@tamagui/helpers-node": "3.1.5",
58
+ "@tamagui/react-native-web-internals": "3.1.5",
59
+ "@tamagui/react-native-web-lite": "3.1.5",
60
+ "@tamagui/shorthands": "3.1.5",
61
+ "@tamagui/style-grammar": "3.1.5",
62
+ "@tamagui/types": "3.1.5",
63
+ "@tamagui/web": "3.1.5",
64
64
  "browserslist": "^4.28.1",
65
65
  "check-dependency-version-consistency": "^4.1.0",
66
66
  "esbuild": "0.28.1",
@@ -73,7 +73,7 @@
73
73
  "react-native-web": "~0.21.4"
74
74
  },
75
75
  "devDependencies": {
76
- "@tamagui/build": "3.1.3",
76
+ "@tamagui/build": "3.1.5",
77
77
  "@types/find-root": "^1.1.2",
78
78
  "@types/node": "^22.1.0",
79
79
  "@types/webpack": "^4.41.26",
@@ -94,5 +94,5 @@
94
94
  "url": "git+https://github.com/tamagui/tamagui.git",
95
95
  "directory": "code/compiler/static"
96
96
  },
97
- "releaseSourceCommit": "c95f4998d3859dcc34f1ce4026e434ad864e1422"
97
+ "releaseSourceCommit": "11f32458a825e58f6c5038491924c399c4439c51"
98
98
  }
@@ -57,6 +57,7 @@ type Props = Omit<Partial<esbuild.BuildOptions>, 'entryPoints'> & {
57
57
  entryPoints: string[]
58
58
  resolvePlatformSpecificEntries?: boolean
59
59
  dangerouslyIgnoreStaticEvaluationModules?: string[]
60
+ nativePlatform?: 'ios' | 'android' | 'macos'
60
61
  }
61
62
 
62
63
  function getESBuildConfig(
@@ -64,6 +65,7 @@ function getESBuildConfig(
64
65
  entryPoints,
65
66
  resolvePlatformSpecificEntries,
66
67
  dangerouslyIgnoreStaticEvaluationModules = [],
68
+ nativePlatform,
67
69
  define: callerDefine,
68
70
  conditions: callerConditions = [],
69
71
  ...options
@@ -216,6 +218,23 @@ function getESBuildConfig(
216
218
  {
217
219
  name: 'external',
218
220
  setup(build) {
221
+ if (platform === 'native') {
222
+ build.onResolve({ filter: /^react-native$/ }, () => ({
223
+ path: 'react-native',
224
+ namespace: 'tamagui-native-evaluation',
225
+ }))
226
+ build.onLoad(
227
+ { filter: /.*/, namespace: 'tamagui-native-evaluation' },
228
+ () => ({
229
+ // resolve from the compiler and bundle only the pure native color helper.
230
+ contents: `export * from ${JSON.stringify(nodeRequire.resolve('@tamagui/react-native-web-lite'))}
231
+ import { getNativeColorFactories } from ${JSON.stringify(nodeRequire.resolve('@tamagui/react-native-web-lite/nativeColors'))}
232
+ export const { PlatformColor, DynamicColorIOS } = getNativeColorFactories(${JSON.stringify(nativePlatform || process.env.EXPO_OS || 'ios')})`,
233
+ loader: 'js',
234
+ resolveDir: build.initialOptions.absWorkingDir || process.cwd(),
235
+ })
236
+ )
237
+ }
219
238
  // only externalize @tamagui/core and @tamagui/web - these are provided at runtime
220
239
  // other @tamagui/* packages (like @tamagui/config/v6) must be bundled in to avoid
221
240
  // ESM race conditions when multiple threads require() them concurrently
@@ -249,6 +249,7 @@ function getBundleKey(props: TamaguiOptions) {
249
249
  components: props.components,
250
250
  config: props.config,
251
251
  platform: props.platform,
252
+ nativePlatform: props.nativePlatform,
252
253
  dangerouslyIgnoreStaticEvaluationModules:
253
254
  props.dangerouslyIgnoreStaticEvaluationModules,
254
255
  })
@@ -402,7 +403,10 @@ export async function bundleConfig(props: TamaguiOptions, rebuild = false) {
402
403
  // so their contents are platform-specific. keep web and native on separate paths:
403
404
  // sharing one path let a native bundle be picked up as the web config (and vice
404
405
  // versa) by the mtime reuse check below, emitting web classes with no CSS variables.
405
- const platformSuffix = (props.platform || 'web') === 'native' ? '.native' : '.web'
406
+ const platformSuffix =
407
+ props.platform === 'native'
408
+ ? `.native${props.nativePlatform ? `.${props.nativePlatform}` : ''}`
409
+ : '.web'
406
410
  // detect module format from config entry point
407
411
  const configFormat = configEntry ? detectModuleFormat(configEntry) : 'cjs'
408
412
  const configExt = configFormat === 'esm' ? '.mjs' : '.cjs'
@@ -489,6 +493,7 @@ export async function bundleConfig(props: TamaguiOptions, rebuild = false) {
489
493
  metafile: true,
490
494
  dangerouslyIgnoreStaticEvaluationModules:
491
495
  props.dangerouslyIgnoreStaticEvaluationModules,
496
+ nativePlatform: props.nativePlatform,
492
497
  ...esbuildExtraOptions,
493
498
  },
494
499
  props.platform || 'web'
@@ -512,6 +517,7 @@ export async function bundleConfig(props: TamaguiOptions, rebuild = false) {
512
517
  metafile: true,
513
518
  dangerouslyIgnoreStaticEvaluationModules:
514
519
  props.dangerouslyIgnoreStaticEvaluationModules,
520
+ nativePlatform: props.nativePlatform,
515
521
  ...esbuildExtraOptions,
516
522
  },
517
523
  props.platform || 'web'
@@ -763,6 +769,7 @@ export async function evaluateComponentModule(
763
769
  process.env.TAMAGUI_IS_SERVER = 'true'
764
770
  const { unregister } = registerRequire(props.platform || 'web', {
765
771
  ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,
772
+ nativePlatform: props.nativePlatform,
766
773
  })
767
774
  try {
768
775
  try {
@@ -814,6 +821,7 @@ export async function loadComponentsInner(
814
821
 
815
822
  const key = JSON.stringify([
816
823
  props.platform,
824
+ props.nativePlatform,
817
825
  componentsModules,
818
826
  props.dangerouslyIgnoreStaticEvaluationModules,
819
827
  ])
@@ -824,6 +832,7 @@ export async function loadComponentsInner(
824
832
 
825
833
  const { unregister } = registerRequire(props.platform || 'web', {
826
834
  ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,
835
+ nativePlatform: props.nativePlatform,
827
836
  })
828
837
 
829
838
  try {
@@ -974,6 +983,7 @@ export function loadComponentsInnerSync(
974
983
 
975
984
  const key = JSON.stringify([
976
985
  props.platform,
986
+ props.nativePlatform,
977
987
  componentsModules,
978
988
  props.dangerouslyIgnoreStaticEvaluationModules,
979
989
  ])
@@ -984,6 +994,7 @@ export function loadComponentsInnerSync(
984
994
 
985
995
  const { unregister } = registerRequire(props.platform || 'web', {
986
996
  ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,
997
+ nativePlatform: props.nativePlatform,
987
998
  })
988
999
 
989
1000
  try {
@@ -374,6 +374,7 @@ export function loadTamaguiSync({
374
374
 
375
375
  const { unregister } = registerRequire(props.platform || 'web', {
376
376
  ignoredModules: props.dangerouslyIgnoreStaticEvaluationModules,
377
+ nativePlatform: props.nativePlatform,
377
378
  })
378
379
 
379
380
  try {
@@ -5,6 +5,7 @@ import { createRequire } from 'node:module'
5
5
 
6
6
  import { esbuildIgnoreFilesRegex } from './extractor/bundle'
7
7
  import { requireTamaguiCore } from './helpers/requireTamaguiCore'
8
+ import { getNativeColorFactories } from '@tamagui/react-native-web-lite/nativeColors'
8
9
  import {
9
10
  getStaticEvaluationModuleReplacement,
10
11
  isIgnoredStaticEvaluationModule,
@@ -45,6 +46,20 @@ export function setRequireResult(name: string, result: any) {
45
46
  compiled[name] = result
46
47
  }
47
48
 
49
+ // evaluate the whole native dependency graph under the compiler's require hook.
50
+ // both export discovery and generated vite facades use this boundary.
51
+ export function requireNativeEvaluationModule(
52
+ modulePath: string,
53
+ nativePlatform?: 'ios' | 'android' | 'macos'
54
+ ) {
55
+ const registration = registerRequire('native', { nativePlatform })
56
+ try {
57
+ return nodeRequire(modulePath)
58
+ } finally {
59
+ registration.unregister()
60
+ }
61
+ }
62
+
48
63
  function getStaticExtractionStub(path: string) {
49
64
  switch (path) {
50
65
  case 'expo-constants':
@@ -106,7 +121,13 @@ function getStaticExtractionStub(path: string) {
106
121
 
107
122
  export function registerRequire(
108
123
  platform: TamaguiPlatform,
109
- { ignoredModules = [] }: { ignoredModules?: string[] } = {
124
+ {
125
+ ignoredModules = [],
126
+ nativePlatform,
127
+ }: {
128
+ ignoredModules?: string[]
129
+ nativePlatform?: 'ios' | 'android' | 'macos'
130
+ } = {
110
131
  ignoredModules: [],
111
132
  }
112
133
  ) {
@@ -157,6 +178,8 @@ export function registerRequire(
157
178
 
158
179
  Module.prototype.require = tamaguiRequire
159
180
 
181
+ let nativeModule: Record<string, unknown> | undefined
182
+
160
183
  function tamaguiRequire(this: any, path: string) {
161
184
  const staticExtractionStub = getStaticExtractionStub(path)
162
185
  if (staticExtractionStub) {
@@ -216,6 +239,13 @@ export function registerRequire(
216
239
  return og.apply(this, ['react-native-web/package.json'])
217
240
  }
218
241
 
242
+ if (platform === 'native' && path === 'react-native') {
243
+ return (nativeModule ||= {
244
+ ...og.apply(this, ['@tamagui/react-native-web-lite']),
245
+ ...getNativeColorFactories(nativePlatform || process.env.EXPO_OS || 'ios'),
246
+ })
247
+ }
248
+
219
249
  if (
220
250
  path === '@tamagui/react-native-web-lite' ||
221
251
  path === 'react-native' ||
@@ -34,6 +34,7 @@ type Props = Omit<Partial<esbuild.BuildOptions>, 'entryPoints'> & {
34
34
  entryPoints: string[];
35
35
  resolvePlatformSpecificEntries?: boolean;
36
36
  dangerouslyIgnoreStaticEvaluationModules?: string[];
37
+ nativePlatform?: 'ios' | 'android' | 'macos';
37
38
  };
38
39
  export declare function esbundleTamaguiConfig(props: Props, platform: TamaguiPlatform, aliases?: Record<string, string>): Promise<esbuild.BuildResult<{
39
40
  sourcemap?: boolean | 'linked' | 'inline' | 'external' | 'both';
@@ -1 +1 @@
1
- {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../src/extractor/bundle.ts"],"names":[],"mappings":"AAGA,OAAO,OAAO,MAAM,SAAS,CAAA;AAE7B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAW/C,eAAO,MAAM,mBAAmB;aAC9B,KAAK,EAAE,KAAK;aACZ,MAAM,EAAE,SAAS;aACjB,MAAM,EAAE,SAAS;aACjB,OAAO,EAAE,SAAS;aAClB,MAAM,EAAE,SAAS;aACjB,MAAM,EAAE,SAAS;aACjB,OAAO,EAAE,SAAS;aAClB,QAAQ,EAAE,SA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M,KACT,OAAO,CAAC,0BAA0B,CAAC,CAAA;AAgCxC;;GAEG;AACH,wBAAsB,2BAA2B,CAC/C,cAAc,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,SAAS,EACnD,qBAAqB,GAAE,iBAA4C,GAClE,OAAO,CAAC,cAAc,CAAC,CAyCzB;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,SAAS,GAgC9C,cAAc,CACpB;AAGD,wBAAgB,eAAe,CAAC,EAC9B,YAAY,EACZ,QAAQ,EACR,GAAG,OAAO,EACX,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,GAAG,kBAAkB,CA+FrB;AAED,wBAAsB,UAAU,CAAC,EAC/B,IAAoB,EACpB,YAA8B,EAC9B,cAAc,EACd,IAAI,EACJ,KAAK,GACN,GAAE,OAAO,CAAC,cAAc,CAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAgC5D;AAED,wBAAgB,+BAA+B,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,UAY/E;AA0BD,YAAY,EAAE,kBAAkB,EAAE,CAAA;AAElC,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,IAAI,uBAwD3E"}
@@ -1,8 +1,10 @@
1
1
  import type { TamaguiPlatform } from './types';
2
2
  export declare const getNameToPaths: () => {};
3
3
  export declare function setRequireResult(name: string, result: any): void;
4
- export declare function registerRequire(platform: TamaguiPlatform, { ignoredModules }?: {
4
+ export declare function requireNativeEvaluationModule(modulePath: string, nativePlatform?: 'ios' | 'android' | 'macos'): any;
5
+ export declare function registerRequire(platform: TamaguiPlatform, { ignoredModules, nativePlatform, }?: {
5
6
  ignoredModules?: string[];
7
+ nativePlatform?: 'ios' | 'android' | 'macos';
6
8
  }): {
7
9
  tamaguiRequire: (this: any, path: string) => any;
8
10
  unregister: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"registerRequire.d.ts","sourceRoot":"","sources":["../src/registerRequire.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAO9C,eAAO,MAAM,cAAc,UAAoB,CAAA;AAyB/C,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,QAEzD;AA6DD,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,eAAe,EACzB,EAAE,cAAmB,EAAE,GAAE;IAAE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAEnD;2BAiD6B,GAAG,QAAQ,MAAM;;EAkGhD"}
1
+ {"version":3,"file":"registerRequire.d.ts","sourceRoot":"","sources":["../src/registerRequire.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAO9C,eAAO,MAAM,cAAc,UAAoB,CAAA;AAyB/C,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,QAEzD;AAID,wBAAgB,6BAA6B,CAC3C,UAAU,EAAE,MAAM,EAClB,cAAc,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,OAAO,OAQ7C;AA6DD,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,eAAe,EACzB,EACE,cAAmB,EACnB,cAAc,GACf,GAAE;IACD,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB,cAAc,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,OAAO,CAAA;CAG7C;2BAmD6B,GAAG,QAAQ,MAAM;;EAyGhD"}