@tamagui/static 2.7.7 → 3.0.0-beta.643.1
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.
- package/dist/cjs/check-dep-versions.cjs +355 -0
- package/dist/cjs/checkDeps.cjs +302 -0
- package/dist/cjs/compiler.cjs +286 -0
- package/dist/cjs/compilerHost.cjs +1695 -0
- package/dist/cjs/constants.cjs +33 -0
- package/dist/cjs/domStructuralPass.cjs +112 -0
- package/dist/cjs/exports.cjs +42 -0
- package/dist/cjs/extractor/addLocalExports.cjs +64 -0
- package/dist/cjs/extractor/bundle.cjs +203 -0
- package/dist/cjs/extractor/bundleConfig.cjs +747 -0
- package/dist/cjs/extractor/concatClassName.cjs +117 -0
- package/dist/cjs/extractor/detectModuleFormat.cjs +54 -0
- package/dist/cjs/extractor/esbuildAliasPlugin.cjs +47 -0
- package/dist/cjs/extractor/esbuildTsconfigPaths.cjs +92 -0
- package/dist/cjs/extractor/getTamaguiConfigPathFromOptionsConfig.cjs +38 -0
- package/dist/cjs/extractor/loadTamagui.cjs +344 -0
- package/dist/cjs/extractor/regenerateConfig.cjs +161 -0
- package/dist/cjs/extractor/watchTamaguiConfig.cjs +64 -0
- package/dist/cjs/getPragmaOptions.cjs +67 -0
- package/dist/cjs/helpers/memoize.cjs +42 -0
- package/dist/cjs/helpers/requireTamaguiCore.cjs +40 -0
- package/dist/cjs/index.cjs +34 -0
- package/dist/cjs/registerRequire.cjs +220 -0
- package/dist/cjs/server.cjs +66 -0
- package/dist/cjs/staticEvaluationIgnoredModules.cjs +86 -0
- package/dist/cjs/types.cjs +17 -0
- package/dist/cjs/zero/artifact.cjs +145 -0
- package/dist/cjs/zero/graph.cjs +209 -0
- package/dist/cjs/zero/identity.cjs +61 -0
- package/dist/cjs/zero/index.cjs +26 -0
- package/dist/cjs/zero/islands.cjs +232 -0
- package/dist/cjs/zero/options.cjs +163 -0
- package/dist/cjs/zero/ownership.cjs +79 -0
- package/dist/cjs/zero/theme.cjs +328 -0
- package/dist/cjs/zero/transform.cjs +203 -0
- package/dist/esm/check-dep-versions.mjs +329 -0
- package/dist/esm/check-dep-versions.mjs.map +1 -0
- package/dist/esm/checkDeps.mjs +279 -0
- package/dist/esm/checkDeps.mjs.map +1 -0
- package/dist/esm/compiler.mjs +255 -0
- package/dist/esm/compiler.mjs.map +1 -0
- package/dist/esm/compilerHost.mjs +1675 -0
- package/dist/esm/compilerHost.mjs.map +1 -0
- package/dist/esm/constants.mjs +7 -0
- package/dist/esm/constants.mjs.map +1 -0
- package/dist/esm/domStructuralPass.mjs +92 -0
- package/dist/esm/domStructuralPass.mjs.map +1 -0
- package/dist/esm/exports.mjs +26 -0
- package/dist/esm/extractor/addLocalExports.mjs +44 -0
- package/dist/esm/extractor/addLocalExports.mjs.map +1 -0
- package/dist/esm/extractor/bundle.mjs +173 -0
- package/dist/esm/extractor/bundle.mjs.map +1 -0
- package/dist/esm/extractor/bundleConfig.mjs +706 -0
- package/dist/esm/extractor/bundleConfig.mjs.map +1 -0
- package/dist/esm/extractor/concatClassName.mjs +96 -0
- package/dist/esm/extractor/concatClassName.mjs.map +1 -0
- package/dist/esm/extractor/detectModuleFormat.mjs +31 -0
- package/dist/esm/extractor/detectModuleFormat.mjs.map +1 -0
- package/dist/esm/extractor/esbuildAliasPlugin.mjs +26 -0
- package/dist/esm/extractor/esbuildAliasPlugin.mjs.map +1 -0
- package/dist/esm/extractor/esbuildTsconfigPaths.mjs +63 -0
- package/dist/esm/extractor/esbuildTsconfigPaths.mjs.map +1 -0
- package/dist/esm/extractor/getTamaguiConfigPathFromOptionsConfig.mjs +18 -0
- package/dist/esm/extractor/getTamaguiConfigPathFromOptionsConfig.mjs.map +1 -0
- package/dist/esm/extractor/loadTamagui.mjs +306 -0
- package/dist/esm/extractor/loadTamagui.mjs.map +1 -0
- package/dist/esm/extractor/regenerateConfig.mjs +131 -0
- package/dist/esm/extractor/regenerateConfig.mjs.map +1 -0
- package/dist/esm/extractor/watchTamaguiConfig.mjs +43 -0
- package/dist/esm/extractor/watchTamaguiConfig.mjs.map +1 -0
- package/dist/esm/getPragmaOptions.mjs +46 -0
- package/dist/esm/getPragmaOptions.mjs.map +1 -0
- package/dist/esm/helpers/memoize.mjs +21 -0
- package/dist/esm/helpers/memoize.mjs.map +1 -0
- package/dist/esm/helpers/requireTamaguiCore.mjs +19 -0
- package/dist/esm/helpers/requireTamaguiCore.mjs.map +1 -0
- package/dist/esm/index.mjs +8 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/registerRequire.mjs +195 -0
- package/dist/esm/registerRequire.mjs.map +1 -0
- package/dist/esm/server.mjs +40 -0
- package/dist/esm/server.mjs.map +1 -0
- package/dist/esm/setup.mjs +0 -0
- package/dist/esm/staticEvaluationIgnoredModules.mjs +61 -0
- package/dist/esm/staticEvaluationIgnoredModules.mjs.map +1 -0
- package/dist/esm/types.mjs +0 -0
- package/dist/esm/zero/artifact.mjs +119 -0
- package/dist/esm/zero/artifact.mjs.map +1 -0
- package/dist/esm/zero/graph.mjs +170 -0
- package/dist/esm/zero/graph.mjs.map +1 -0
- package/dist/esm/zero/identity.mjs +36 -0
- package/dist/esm/zero/identity.mjs.map +1 -0
- package/dist/esm/zero/index.mjs +15 -0
- package/dist/esm/zero/islands.mjs +197 -0
- package/dist/esm/zero/islands.mjs.map +1 -0
- package/dist/esm/zero/options.mjs +129 -0
- package/dist/esm/zero/options.mjs.map +1 -0
- package/dist/esm/zero/ownership.mjs +48 -0
- package/dist/esm/zero/ownership.mjs.map +1 -0
- package/dist/esm/zero/theme.mjs +303 -0
- package/dist/esm/zero/theme.mjs.map +1 -0
- package/dist/esm/zero/transform.mjs +177 -0
- package/dist/esm/zero/transform.mjs.map +1 -0
- package/package.json +33 -43
- package/src/check-dep-versions.ts +2 -2
- package/src/checkDeps.ts +3 -2
- package/src/compiler.ts +425 -0
- package/src/compilerHost.ts +3125 -0
- package/src/constants.ts +0 -5
- package/src/domStructuralPass.ts +170 -0
- package/src/exports.ts +3 -6
- package/src/extractor/addLocalExports.ts +49 -0
- package/src/extractor/bundle.ts +20 -35
- package/src/extractor/bundleConfig.ts +334 -187
- package/src/extractor/concatClassName.ts +13 -20
- package/src/extractor/getTamaguiConfigPathFromOptionsConfig.ts +5 -4
- package/src/extractor/loadTamagui.ts +196 -143
- package/src/extractor/regenerateConfig.ts +65 -13
- package/src/extractor/watchTamaguiConfig.ts +6 -1
- package/src/helpers/requireTamaguiCore.ts +6 -1
- package/src/registerRequire.ts +94 -132
- package/src/staticEvaluationIgnoredModules.ts +74 -0
- package/src/types.ts +2 -107
- package/src/zero/artifact.ts +142 -0
- package/src/zero/graph.ts +359 -0
- package/src/zero/identity.ts +73 -0
- package/src/zero/index.ts +8 -0
- package/src/zero/islands.ts +262 -0
- package/src/zero/options.ts +239 -0
- package/src/zero/ownership.ts +113 -0
- package/src/zero/theme.ts +478 -0
- package/src/zero/transform.ts +320 -0
- package/types/check-dep-versions.d.ts.map +1 -1
- package/types/checkDeps.d.ts.map +1 -1
- package/types/compiler.d.ts +117 -0
- package/types/compiler.d.ts.map +1 -0
- package/types/compilerHost.d.ts +25 -0
- package/types/compilerHost.d.ts.map +1 -0
- package/types/constants.d.ts +0 -1
- package/types/constants.d.ts.map +1 -1
- package/types/domStructuralPass.d.ts +3 -0
- package/types/domStructuralPass.d.ts.map +1 -0
- package/types/exports.d.ts +3 -6
- package/types/exports.d.ts.map +1 -1
- package/types/extractor/addLocalExports.d.ts +3 -0
- package/types/extractor/addLocalExports.d.ts.map +1 -0
- package/types/extractor/bundle.d.ts +66 -65
- package/types/extractor/bundle.d.ts.map +1 -1
- package/types/extractor/bundleConfig.d.ts +19 -4
- package/types/extractor/bundleConfig.d.ts.map +1 -1
- package/types/extractor/esbuildAliasPlugin.d.ts.map +1 -1
- package/types/extractor/getTamaguiConfigPathFromOptionsConfig.d.ts +1 -1
- package/types/extractor/getTamaguiConfigPathFromOptionsConfig.d.ts.map +1 -1
- package/types/extractor/loadTamagui.d.ts +26 -3
- package/types/extractor/loadTamagui.d.ts.map +1 -1
- package/types/extractor/regenerateConfig.d.ts +1 -1
- package/types/extractor/regenerateConfig.d.ts.map +1 -1
- package/types/extractor/watchTamaguiConfig.d.ts.map +1 -1
- package/types/getPragmaOptions.d.ts +1 -1
- package/types/helpers/memoize.d.ts +1 -1
- package/types/helpers/memoize.d.ts.map +1 -1
- package/types/helpers/requireTamaguiCore.d.ts.map +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/registerRequire.d.ts +2 -2
- package/types/registerRequire.d.ts.map +1 -1
- package/types/staticEvaluationIgnoredModules.d.ts +9 -0
- package/types/staticEvaluationIgnoredModules.d.ts.map +1 -0
- package/types/types.d.ts +2 -90
- package/types/types.d.ts.map +1 -1
- package/types/zero/artifact.d.ts +44 -0
- package/types/zero/artifact.d.ts.map +1 -0
- package/types/zero/graph.d.ts +139 -0
- package/types/zero/graph.d.ts.map +1 -0
- package/types/zero/identity.d.ts +33 -0
- package/types/zero/identity.d.ts.map +1 -0
- package/types/zero/index.d.ts +9 -0
- package/types/zero/index.d.ts.map +1 -0
- package/types/zero/islands.d.ts +56 -0
- package/types/zero/islands.d.ts.map +1 -0
- package/types/zero/options.d.ts +58 -0
- package/types/zero/options.d.ts.map +1 -0
- package/types/zero/ownership.d.ts +51 -0
- package/types/zero/ownership.d.ts.map +1 -0
- package/types/zero/theme.d.ts +83 -0
- package/types/zero/theme.d.ts.map +1 -0
- package/types/zero/transform.d.ts +53 -0
- package/types/zero/transform.d.ts.map +1 -0
- package/dist/check-dep-versions.cjs +0 -372
- package/dist/checkDeps.cjs +0 -271
- package/dist/constants.cjs +0 -51
- package/dist/exports.cjs +0 -48
- package/dist/extractor/accessSafe.cjs +0 -48
- package/dist/extractor/babelParse.cjs +0 -56
- package/dist/extractor/buildClassName.cjs +0 -86
- package/dist/extractor/bundle.cjs +0 -234
- package/dist/extractor/bundleConfig.cjs +0 -729
- package/dist/extractor/concatClassName.cjs +0 -129
- package/dist/extractor/createEvaluator.cjs +0 -88
- package/dist/extractor/createExtractor.cjs +0 -1968
- package/dist/extractor/createLogger.cjs +0 -50
- package/dist/extractor/detectModuleFormat.cjs +0 -55
- package/dist/extractor/ensureImportingConcat.cjs +0 -54
- package/dist/extractor/errors.cjs +0 -28
- package/dist/extractor/esbuildAliasPlugin.cjs +0 -56
- package/dist/extractor/esbuildTsconfigPaths.cjs +0 -108
- package/dist/extractor/evaluateAstNode.cjs +0 -128
- package/dist/extractor/extractHelpers.cjs +0 -182
- package/dist/extractor/extractMediaStyle.cjs +0 -169
- package/dist/extractor/extractToClassNames.cjs +0 -475
- package/dist/extractor/extractToNative.cjs +0 -369
- package/dist/extractor/findTopmostFunction.cjs +0 -43
- package/dist/extractor/generatedUid.cjs +0 -58
- package/dist/extractor/getPrefixLogs.cjs +0 -31
- package/dist/extractor/getPropValueFromAttributes.cjs +0 -85
- package/dist/extractor/getSourceModule.cjs +0 -100
- package/dist/extractor/getStaticBindingsForScope.cjs +0 -213
- package/dist/extractor/getTamaguiConfigPathFromOptionsConfig.cjs +0 -41
- package/dist/extractor/hasTopLevelAwait.cjs +0 -62
- package/dist/extractor/hoistClassNames.cjs +0 -76
- package/dist/extractor/literalToAst.cjs +0 -109
- package/dist/extractor/loadFile.cjs +0 -17
- package/dist/extractor/loadTamagui.cjs +0 -373
- package/dist/extractor/logLines.cjs +0 -43
- package/dist/extractor/normalizeTernaries.cjs +0 -100
- package/dist/extractor/propsToFontFamilyCache.cjs +0 -42
- package/dist/extractor/regenerateConfig.cjs +0 -178
- package/dist/extractor/removeUnusedHooks.cjs +0 -108
- package/dist/extractor/timer.cjs +0 -52
- package/dist/extractor/validHTMLAttributes.cjs +0 -79
- package/dist/extractor/watchTamaguiConfig.cjs +0 -70
- package/dist/getPragmaOptions.cjs +0 -73
- package/dist/helpers/memoize.cjs +0 -45
- package/dist/helpers/requireTamaguiCore.cjs +0 -40
- package/dist/index.cjs +0 -42
- package/dist/registerRequire.cjs +0 -209
- package/dist/server.cjs +0 -82
- package/dist/types.cjs +0 -18
- package/dist/worker.cjs +0 -111
- package/src/extractor/accessSafe.ts +0 -22
- package/src/extractor/babelParse.ts +0 -38
- package/src/extractor/buildClassName.ts +0 -76
- package/src/extractor/createEvaluator.ts +0 -82
- package/src/extractor/createExtractor.ts +0 -2970
- package/src/extractor/createLogger.ts +0 -41
- package/src/extractor/ensureImportingConcat.ts +0 -36
- package/src/extractor/errors.ts +0 -1
- package/src/extractor/evaluateAstNode.ts +0 -136
- package/src/extractor/extractHelpers.ts +0 -211
- package/src/extractor/extractMediaStyle.ts +0 -194
- package/src/extractor/extractToClassNames.ts +0 -733
- package/src/extractor/extractToNative.ts +0 -506
- package/src/extractor/findTopmostFunction.ts +0 -24
- package/src/extractor/generatedUid.ts +0 -41
- package/src/extractor/getPrefixLogs.ts +0 -9
- package/src/extractor/getPropValueFromAttributes.ts +0 -95
- package/src/extractor/getSourceModule.ts +0 -96
- package/src/extractor/getStaticBindingsForScope.ts +0 -237
- package/src/extractor/hasTopLevelAwait.ts +0 -28
- package/src/extractor/hoistClassNames.ts +0 -52
- package/src/extractor/literalToAst.ts +0 -85
- package/src/extractor/loadFile.ts +0 -17
- package/src/extractor/logLines.ts +0 -16
- package/src/extractor/normalizeTernaries.ts +0 -89
- package/src/extractor/propsToFontFamilyCache.ts +0 -18
- package/src/extractor/removeUnusedHooks.ts +0 -83
- package/src/extractor/timer.ts +0 -25
- package/src/extractor/validHTMLAttributes.ts +0 -52
- package/src/worker.ts +0 -142
- package/types/extractor/accessSafe.d.ts +0 -3
- package/types/extractor/accessSafe.d.ts.map +0 -1
- package/types/extractor/babelParse.d.ts +0 -5
- package/types/extractor/babelParse.d.ts.map +0 -1
- package/types/extractor/buildClassName.d.ts +0 -7
- package/types/extractor/buildClassName.d.ts.map +0 -1
- package/types/extractor/createEvaluator.d.ts +0 -12
- package/types/extractor/createEvaluator.d.ts.map +0 -1
- package/types/extractor/createExtractor.d.ts +0 -32
- package/types/extractor/createExtractor.d.ts.map +0 -1
- package/types/extractor/createLogger.d.ts +0 -3
- package/types/extractor/createLogger.d.ts.map +0 -1
- package/types/extractor/ensureImportingConcat.d.ts +0 -4
- package/types/extractor/ensureImportingConcat.d.ts.map +0 -1
- package/types/extractor/errors.d.ts +0 -3
- package/types/extractor/errors.d.ts.map +0 -1
- package/types/extractor/evaluateAstNode.d.ts +0 -3
- package/types/extractor/evaluateAstNode.d.ts.map +0 -1
- package/types/extractor/extractHelpers.d.ts +0 -28
- package/types/extractor/extractHelpers.d.ts.map +0 -1
- package/types/extractor/extractMediaStyle.d.ts +0 -11
- package/types/extractor/extractMediaStyle.d.ts.map +0 -1
- package/types/extractor/extractToClassNames.d.ts +0 -25
- package/types/extractor/extractToClassNames.d.ts.map +0 -1
- package/types/extractor/extractToNative.d.ts +0 -13
- package/types/extractor/extractToNative.d.ts.map +0 -1
- package/types/extractor/findTopmostFunction.d.ts +0 -4
- package/types/extractor/findTopmostFunction.d.ts.map +0 -1
- package/types/extractor/generatedUid.d.ts +0 -5
- package/types/extractor/generatedUid.d.ts.map +0 -1
- package/types/extractor/getPrefixLogs.d.ts +0 -3
- package/types/extractor/getPrefixLogs.d.ts.map +0 -1
- package/types/extractor/getPropValueFromAttributes.d.ts +0 -19
- package/types/extractor/getPropValueFromAttributes.d.ts.map +0 -1
- package/types/extractor/getSourceModule.d.ts +0 -16
- package/types/extractor/getSourceModule.d.ts.map +0 -1
- package/types/extractor/getStaticBindingsForScope.d.ts +0 -5
- package/types/extractor/getStaticBindingsForScope.d.ts.map +0 -1
- package/types/extractor/hasTopLevelAwait.d.ts +0 -2
- package/types/extractor/hasTopLevelAwait.d.ts.map +0 -1
- package/types/extractor/hoistClassNames.d.ts +0 -6
- package/types/extractor/hoistClassNames.d.ts.map +0 -1
- package/types/extractor/literalToAst.d.ts +0 -4
- package/types/extractor/literalToAst.d.ts.map +0 -1
- package/types/extractor/loadFile.d.ts +0 -1
- package/types/extractor/loadFile.d.ts.map +0 -1
- package/types/extractor/logLines.d.ts +0 -2
- package/types/extractor/logLines.d.ts.map +0 -1
- package/types/extractor/normalizeTernaries.d.ts +0 -5
- package/types/extractor/normalizeTernaries.d.ts.map +0 -1
- package/types/extractor/propsToFontFamilyCache.d.ts +0 -4
- package/types/extractor/propsToFontFamilyCache.d.ts.map +0 -1
- package/types/extractor/removeUnusedHooks.d.ts +0 -3
- package/types/extractor/removeUnusedHooks.d.ts.map +0 -1
- package/types/extractor/timer.d.ts +0 -5
- package/types/extractor/timer.d.ts.map +0 -1
- package/types/extractor/validHTMLAttributes.d.ts +0 -52
- package/types/extractor/validHTMLAttributes.d.ts.map +0 -1
- package/types/worker.d.ts +0 -46
- package/types/worker.d.ts.map +0 -1
- /package/dist/{setup.cjs → cjs/setup.cjs} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkDeps.js","names":[],"sources":["esm/checkDeps.js"],"sourcesContent":["import { existsSync, readFileSync, readdirSync, realpathSync } from \"node:fs\";\nimport { join, relative } from \"node:path\";\nimport { CDVC } from \"./check-dep-versions\";\nvar DEPENDENCY_TYPE = /* @__PURE__ */ ((DEPENDENCY_TYPE2) => {\n DEPENDENCY_TYPE2[\"dependencies\"] = \"dependencies\";\n DEPENDENCY_TYPE2[\"devDependencies\"] = \"devDependencies\";\n DEPENDENCY_TYPE2[\"optionalDependencies\"] = \"optionalDependencies\";\n DEPENDENCY_TYPE2[\"peerDependencies\"] = \"peerDependencies\";\n DEPENDENCY_TYPE2[\"resolutions\"] = \"resolutions\";\n return DEPENDENCY_TYPE2;\n})(DEPENDENCY_TYPE || {});\nconst CRITICAL_PACKAGES = [\"@tamagui/web\", \"@tamagui/core\", \"tamagui\"];\nfunction checkDuplicateInstalls(root) {\n const nodeModules = join(root, \"node_modules\");\n if (!existsSync(nodeModules)) return \"\";\n const duplicates = /* @__PURE__ */ new Map();\n for (const pkg of CRITICAL_PACKAGES) {\n const locations = findAllInstances(nodeModules, pkg);\n if (locations.length > 1) {\n const realPaths = /* @__PURE__ */ new Set();\n const distinctLocations = [];\n for (const loc of locations) {\n try {\n const real = realpathSync(loc);\n if (!realPaths.has(real)) {\n realPaths.add(real);\n distinctLocations.push(relative(root, loc));\n }\n } catch {\n distinctLocations.push(relative(root, loc));\n }\n }\n if (distinctLocations.length > 1) {\n duplicates.set(pkg, distinctLocations);\n }\n }\n }\n if (duplicates.size === 0) return \"\";\n const lines = [\n \"Found duplicate tamagui installations in node_modules:\",\n \"\",\n \"This causes multiple runtime instances, which breaks theme/config detection.\",\n \"\"\n ];\n for (const [pkg, locations] of duplicates) {\n lines.push(` ${pkg}:`);\n for (const loc of locations) {\n const pkgJsonPath = join(root, loc, \"package.json\");\n let version = \"?\";\n try {\n version = JSON.parse(readFileSync(pkgJsonPath, \"utf8\")).version;\n } catch {\n }\n lines.push(` ${version} at ${loc}`);\n }\n lines.push(\"\");\n }\n lines.push(\"Fix: run your package manager's dedupe command:\");\n lines.push(\" bun install (bun auto-dedupes)\");\n lines.push(\" npx yarn-deduplicate && yarn install\");\n lines.push(\" npm dedupe\");\n lines.push(\"\");\n lines.push(\"If that doesn't help, delete node_modules and lockfile, then reinstall.\");\n return lines.join(\"\\n\");\n}\nfunction findAllInstances(nodeModulesDir, packageName, found = [], depth = 0) {\n if (depth > 4 || !existsSync(nodeModulesDir)) return found;\n const pkgDir = join(nodeModulesDir, ...packageName.split(\"/\"));\n if (existsSync(join(pkgDir, \"package.json\"))) {\n found.push(pkgDir);\n }\n try {\n const entries = readdirSync(nodeModulesDir);\n for (const entry of entries) {\n if (entry.startsWith(\".\")) continue;\n if (entry.startsWith(\"@\")) {\n const scopeDir = join(nodeModulesDir, entry);\n try {\n const scopeEntries = readdirSync(scopeDir);\n for (const scopeEntry of scopeEntries) {\n const nested = join(scopeDir, scopeEntry, \"node_modules\");\n if (existsSync(nested)) {\n findAllInstances(nested, packageName, found, depth + 1);\n }\n }\n } catch {\n }\n } else {\n const nested = join(nodeModulesDir, entry, \"node_modules\");\n if (existsSync(nested)) {\n findAllInstances(nested, packageName, found, depth + 1);\n }\n }\n }\n } catch {\n }\n return found;\n}\nfunction checkLockfileDuplicates(root) {\n const bunLock = join(root, \"bun.lock\");\n const yarnLock = join(root, \"yarn.lock\");\n const npmLock = join(root, \"package-lock.json\");\n if (existsSync(bunLock)) return checkBunLockDuplicates(bunLock);\n if (existsSync(yarnLock)) return checkYarnLockDuplicates(yarnLock);\n if (existsSync(npmLock)) return checkNpmLockDuplicates(npmLock);\n return \"\";\n}\nfunction checkBunLockDuplicates(lockPath) {\n try {\n const content = readFileSync(lockPath, \"utf8\");\n const duplicates = /* @__PURE__ */ new Map();\n const criticalSet = new Set(CRITICAL_PACKAGES);\n const packagePattern = /[\"'](@tamagui\\/[\\w-]+|tamagui)@([^\"'\\s,]+)[\"']/g;\n let match;\n while ((match = packagePattern.exec(content)) !== null) {\n const name = match[1];\n const version = match[2];\n if (version.startsWith(\"workspace:\")) continue;\n if (!criticalSet.has(name)) continue;\n if (!duplicates.has(name)) duplicates.set(name, /* @__PURE__ */ new Set());\n duplicates.get(name).add(version);\n }\n return formatLockfileDuplicates(duplicates, \"bun.lock\");\n } catch {\n return \"\";\n }\n}\nfunction checkYarnLockDuplicates(lockPath) {\n try {\n const content = readFileSync(lockPath, \"utf8\");\n const duplicates = /* @__PURE__ */ new Map();\n const criticalSet = new Set(CRITICAL_PACKAGES);\n const entryPattern = /^\"?(@tamagui\\/[\\w-]+|tamagui)@[^\":\\n]+[\":]?\\s*$/gm;\n const versionPattern = /^\\s+version\\s+\"([^\"]+)\"/gm;\n let entryMatch;\n while ((entryMatch = entryPattern.exec(content)) !== null) {\n const name = entryMatch[1];\n if (!criticalSet.has(name)) continue;\n versionPattern.lastIndex = entryMatch.index;\n const verMatch = versionPattern.exec(content);\n if (verMatch) {\n if (!duplicates.has(name)) duplicates.set(name, /* @__PURE__ */ new Set());\n duplicates.get(name).add(verMatch[1]);\n }\n }\n return formatLockfileDuplicates(duplicates, \"yarn.lock\");\n } catch {\n return \"\";\n }\n}\nfunction checkNpmLockDuplicates(lockPath) {\n try {\n const lock = JSON.parse(readFileSync(lockPath, \"utf8\"));\n const duplicates = /* @__PURE__ */ new Map();\n const criticalSet = new Set(CRITICAL_PACKAGES);\n const packages = lock.packages || {};\n for (const [path, info] of Object.entries(packages)) {\n if (!path) continue;\n const name = info.name || path.split(\"node_modules/\").pop();\n if (!name) continue;\n if (!criticalSet.has(name)) continue;\n const version = info.version;\n if (version) {\n if (!duplicates.has(name)) duplicates.set(name, /* @__PURE__ */ new Set());\n duplicates.get(name).add(version);\n }\n }\n return formatLockfileDuplicates(duplicates, \"package-lock.json\");\n } catch {\n return \"\";\n }\n}\nfunction formatLockfileDuplicates(duplicates, lockfileName) {\n const multiVersion = /* @__PURE__ */ new Map();\n for (const [name, versions] of duplicates) {\n if (versions.size > 1) {\n multiVersion.set(name, [...versions].sort());\n }\n }\n if (multiVersion.size === 0) return \"\";\n const lines = [`Found multiple resolved versions in ${lockfileName}:`, \"\"];\n for (const [name, versions] of multiVersion) {\n lines.push(` ${name}: ${versions.join(\", \")}`);\n }\n lines.push(\"\");\n lines.push(\n \"Multiple versions cause duplicate runtime instances, breaking config/theme detection.\"\n );\n lines.push(\"Fix: ensure all tamagui packages use the same version range, then dedupe.\");\n return lines.join(\"\\n\");\n}\nfunction checkConfigExists(root) {\n const configNames = [\n \"tamagui.config.ts\",\n \"tamagui.config.tsx\",\n \"tamagui.config.js\",\n \"tamagui.config.mjs\",\n \"tamagui.config.cjs\"\n ];\n const searchDirs = [root, join(root, \"src\"), join(root, \"app\"), join(root, \"config\")];\n for (const dir of searchDirs) {\n for (const name of configNames) {\n if (existsSync(join(dir, name))) {\n return \"\";\n }\n }\n }\n const buildConfigNames = [\n \"tamagui.build.ts\",\n \"tamagui.build.js\",\n \"tamagui.build.mjs\",\n \"tamagui.build.cjs\"\n ];\n for (const name of buildConfigNames) {\n const buildPath = join(root, name);\n if (existsSync(buildPath)) {\n try {\n const content = readFileSync(buildPath, \"utf8\");\n const match = content.match(/config\\s*:\\s*['\"`]([^'\"`]+)['\"`]/);\n if (match) {\n const configPath = join(root, match[1]);\n if (existsSync(configPath)) return \"\";\n }\n } catch {\n }\n }\n }\n const pkgJsonPath = join(root, \"package.json\");\n if (existsSync(pkgJsonPath)) {\n try {\n const pkg = JSON.parse(readFileSync(pkgJsonPath, \"utf8\"));\n if (pkg.tamagui?.config) {\n const configPath = join(root, pkg.tamagui.config);\n if (existsSync(configPath)) return \"\";\n }\n } catch {\n }\n }\n if (existsSync(pkgJsonPath)) {\n try {\n const pkg = JSON.parse(readFileSync(pkgJsonPath, \"utf8\"));\n if (pkg.workspaces) return \"\";\n } catch {\n }\n }\n return [\n \"No tamagui.config file found.\",\n \"\",\n \"Tamagui requires a config file (e.g. tamagui.config.ts) that calls createTamagui().\",\n `Without it, components will throw \"Can't find Tamagui configuration\" at runtime.`,\n \"\",\n \"See: https://tamagui.dev/docs/core/configuration\"\n ].join(\"\\n\");\n}\nasync function checkDeps(root) {\n const issues = [];\n const workspaceMismatchSummary = new CDVC(root).toMismatchSummary();\n if (workspaceMismatchSummary) issues.push(workspaceMismatchSummary);\n const lockfileSummary = checkLockfileDuplicates(root);\n if (lockfileSummary) issues.push(lockfileSummary);\n const duplicatesSummary = checkDuplicateInstalls(root);\n if (duplicatesSummary) issues.push(duplicatesSummary);\n const configSummary = checkConfigExists(root);\n if (configSummary) issues.push(configSummary);\n if (issues.length === 0) {\n console.info(`Tamagui dependencies look good \\u2705`);\n return;\n }\n for (let i = 0; i < issues.length; i++) {\n if (i > 0) console.error(\"\");\n console.error(issues[i]);\n }\n process.exitCode = 1;\n}\nexport {\n DEPENDENCY_TYPE,\n checkDeps\n};\n//# sourceMappingURL=checkDeps.js.map\n"],"mappings":";;;;;AAGA,IAAI,kBAAkC,kBAAE,qBAAqB;CAC3D,iBAAiB,kBAAkB;CACnC,iBAAiB,qBAAqB;CACtC,iBAAiB,0BAA0B;CAC3C,iBAAiB,sBAAsB;CACvC,iBAAiB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IAAI;CACpD,IAAI,iBAAiB,OAAO,KAAK,eAAe;CAChD,MAAM,oBAAoB,uBAAuB,IAAI;CACrD,IAAI,mBAAmB,OAAO,KAAK,iBAAiB;CACpD,MAAM,gBAAgB,kBAAkB,IAAI;CAC5C,IAAI,eAAe,OAAO,KAAK,aAAa;CAC5C,IAAI,OAAO,WAAW,GAAG;EACvB,QAAQ,KAAK,uCAAuC;EACpD;CACF;CACA,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,QAAQ,KAAK;EACtC,IAAI,IAAI,GAAG,QAAQ,MAAM,EAAE;EAC3B,QAAQ,MAAM,OAAO,EAAE;CACzB;CACA,QAAQ,WAAW;AACrB"}
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
import { CompilerSession, LOWERED_MODULE_PLAN_VERSION, ModulePlanCache, PLAN_CACHE_SCHEMA_VERSION, contentHash, defaultPlanCacheRoot, resolvedModuleId, stableStringify, yukuFactory } from "@tamagui/compiler-core";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { createRequire } from "node:module";
|
|
4
|
+
import path from "node:path";
|
|
5
|
+
import { createTamaguiCompilerHost } from "./compilerHost.mjs";
|
|
6
|
+
import { domStructuralPass } from "./domStructuralPass.mjs";
|
|
7
|
+
import { loadTamagui } from "./extractor/loadTamagui.mjs";
|
|
8
|
+
import { resolveZeroRuntimeSync } from "./zero/options.mjs";
|
|
9
|
+
|
|
10
|
+
async function loadCompilerProject({ root, target, options: optionsIn, generation, rebuild = false, hostVersions = [], missingProjectMessage = "Unable to load the Tamagui compiler project", load = loadTamagui, resolveComponents }) {
|
|
11
|
+
const components = [.../* @__PURE__ */ new Set(["@tamagui/core", ...optionsIn.components || ["tamagui"]])];
|
|
12
|
+
const options = {
|
|
13
|
+
...optionsIn,
|
|
14
|
+
root,
|
|
15
|
+
platform: target,
|
|
16
|
+
components
|
|
17
|
+
};
|
|
18
|
+
const zeroRuntime = resolveZeroRuntimeSync(options, root).mode;
|
|
19
|
+
if (zeroRuntime === "enforce") options.outputCSS = void 0;
|
|
20
|
+
const projectInfo = await load(options, rebuild);
|
|
21
|
+
if (!projectInfo?.tamaguiConfig || !projectInfo.components) {
|
|
22
|
+
throw new Error(missingProjectMessage);
|
|
23
|
+
}
|
|
24
|
+
const componentModules = resolveComponents ? await resolveComponents(components, projectInfo, options) : [];
|
|
25
|
+
const disablePartialExtraction = !!options.disablePartialExtraction;
|
|
26
|
+
const experimentalNativeFastPath = target === "native" && options.experimental?.nativeFastPath === true;
|
|
27
|
+
return {
|
|
28
|
+
projectInfo,
|
|
29
|
+
componentModules,
|
|
30
|
+
generation: typeof generation === "function" ? generation(projectInfo, componentModules, options) : generation,
|
|
31
|
+
disablePartialExtraction,
|
|
32
|
+
experimentalNativeFastPath,
|
|
33
|
+
zeroRuntime: zeroRuntime !== "off",
|
|
34
|
+
cacheStamp: compilerProjectStamp({
|
|
35
|
+
stampSources: projectInfo.stampSources ?? [],
|
|
36
|
+
hostVersions,
|
|
37
|
+
target,
|
|
38
|
+
componentModules,
|
|
39
|
+
disablePartialExtraction,
|
|
40
|
+
experimentalNativeFastPath,
|
|
41
|
+
zeroRuntime: zeroRuntime !== "off",
|
|
42
|
+
development: process.env.NODE_ENV === "development"
|
|
43
|
+
})
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
const requireFromCompiler = createRequire(typeof __filename === "string" ? __filename : import.meta.url);
|
|
47
|
+
const compilerPackageVersions = ["@tamagui/compiler-core", "@tamagui/static"].map((name) => `${name}@${requireFromCompiler(`${name}/package.json`).version}`);
|
|
48
|
+
function compilerProjectStamp(input) {
|
|
49
|
+
if (!input.stampSources.length) return null;
|
|
50
|
+
const sources = [];
|
|
51
|
+
for (const file of [...new Set(input.stampSources)].sort()) {
|
|
52
|
+
try {
|
|
53
|
+
sources.push([file, contentHash(readFileSync(file))]);
|
|
54
|
+
} catch {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return contentHash(stableStringify({
|
|
59
|
+
schema: PLAN_CACHE_SCHEMA_VERSION,
|
|
60
|
+
plan: LOWERED_MODULE_PLAN_VERSION,
|
|
61
|
+
packages: [...compilerPackageVersions, ...input.hostVersions].sort(),
|
|
62
|
+
target: input.target,
|
|
63
|
+
development: input.development,
|
|
64
|
+
componentModules: input.componentModules.map(({ moduleName, id }) => [moduleName, cleanId(id)]),
|
|
65
|
+
disablePartialExtraction: input.disablePartialExtraction,
|
|
66
|
+
experimentalNativeFastPath: input.experimentalNativeFastPath,
|
|
67
|
+
zeroRuntime: input.zeroRuntime,
|
|
68
|
+
sources
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
function cleanId(id) {
|
|
72
|
+
return id.split(/[?#]/, 1)[0];
|
|
73
|
+
}
|
|
74
|
+
function externalId(specifier) {
|
|
75
|
+
return resolvedModuleId(`external://${encodeURIComponent(specifier)}`);
|
|
76
|
+
}
|
|
77
|
+
function sourceCanBeLinked(root, id) {
|
|
78
|
+
const clean = cleanId(id);
|
|
79
|
+
const normalized = clean.replace(/\\/g, "/");
|
|
80
|
+
if (!path.isAbsolute(clean) || normalized.includes("/node_modules/")) return false;
|
|
81
|
+
const relative = path.relative(root, clean);
|
|
82
|
+
return relative === "" || relative !== ".." && !relative.startsWith(`..${path.sep}`);
|
|
83
|
+
}
|
|
84
|
+
var CompilerFrontend = class {
|
|
85
|
+
session = new CompilerSession();
|
|
86
|
+
queue = Promise.resolve();
|
|
87
|
+
planCaches = /* @__PURE__ */ new Map();
|
|
88
|
+
/**
|
|
89
|
+
* One cache per project root and platform. Absent when the project produced
|
|
90
|
+
* no content stamp, in which case plans are never persisted rather than
|
|
91
|
+
* persisted under an identity that cannot see a config change.
|
|
92
|
+
*/
|
|
93
|
+
planCacheFor(input) {
|
|
94
|
+
const stamp = input.project.cacheStamp;
|
|
95
|
+
if (!stamp) return void 0;
|
|
96
|
+
const root = defaultPlanCacheRoot(input.root, input.target);
|
|
97
|
+
let store = this.planCaches.get(root);
|
|
98
|
+
if (!store) {
|
|
99
|
+
store = new ModulePlanCache(root);
|
|
100
|
+
this.planCaches.set(root, store);
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
store,
|
|
104
|
+
stamp
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/** Hits, misses and writes across every plan cache this frontend has used. */
|
|
108
|
+
get planCacheStats() {
|
|
109
|
+
const total = {
|
|
110
|
+
hits: 0,
|
|
111
|
+
misses: 0,
|
|
112
|
+
writes: 0
|
|
113
|
+
};
|
|
114
|
+
for (const store of this.planCaches.values()) {
|
|
115
|
+
total.hits += store.stats.hits;
|
|
116
|
+
total.misses += store.stats.misses;
|
|
117
|
+
total.writes += store.stats.writes;
|
|
118
|
+
}
|
|
119
|
+
return total;
|
|
120
|
+
}
|
|
121
|
+
compile(input) {
|
|
122
|
+
const operation = this.queue.then(() => this.compileNow(input));
|
|
123
|
+
this.queue = operation.catch(() => void 0);
|
|
124
|
+
return operation;
|
|
125
|
+
}
|
|
126
|
+
update(input) {
|
|
127
|
+
const operation = this.queue.then(async () => {
|
|
128
|
+
const { modules } = await this.buildTree(input);
|
|
129
|
+
const invalidated = /* @__PURE__ */ new Set();
|
|
130
|
+
for (const module of modules.values()) {
|
|
131
|
+
for (const id of await this.session.update(module)) invalidated.add(id);
|
|
132
|
+
}
|
|
133
|
+
return [...invalidated].sort();
|
|
134
|
+
});
|
|
135
|
+
this.queue = operation.catch(() => void 0);
|
|
136
|
+
return operation;
|
|
137
|
+
}
|
|
138
|
+
has(id) {
|
|
139
|
+
return this.session.has(resolvedModuleId(cleanId(id)));
|
|
140
|
+
}
|
|
141
|
+
dependentsOf(id) {
|
|
142
|
+
return this.session.dependentsOf(resolvedModuleId(cleanId(id)));
|
|
143
|
+
}
|
|
144
|
+
remove(id) {
|
|
145
|
+
const operation = this.queue.then(() => this.session.remove(resolvedModuleId(cleanId(id))));
|
|
146
|
+
this.queue = operation.catch(() => void 0);
|
|
147
|
+
return operation;
|
|
148
|
+
}
|
|
149
|
+
parseCount(id) {
|
|
150
|
+
return this.session.parseCount(resolvedModuleId(cleanId(id)));
|
|
151
|
+
}
|
|
152
|
+
async compileNow(input) {
|
|
153
|
+
const { rootModule, modules } = await this.buildTree(input);
|
|
154
|
+
const invalidated = /* @__PURE__ */ new Set();
|
|
155
|
+
for (const module of modules.values()) {
|
|
156
|
+
for (const id of await this.session.update(module)) invalidated.add(id);
|
|
157
|
+
}
|
|
158
|
+
const projectInfo = input.project.projectInfo;
|
|
159
|
+
if (!projectInfo.tamaguiConfig || !projectInfo.components) {
|
|
160
|
+
throw new Error("The compiler requires evaluated Tamagui config and components");
|
|
161
|
+
}
|
|
162
|
+
const host = createTamaguiCompilerHost({
|
|
163
|
+
target: input.target,
|
|
164
|
+
tamaguiConfig: projectInfo.tamaguiConfig,
|
|
165
|
+
components: projectInfo.components,
|
|
166
|
+
componentModules: input.project.componentModules.map((component) => ({
|
|
167
|
+
moduleName: component.moduleName,
|
|
168
|
+
resolvedId: cleanId(component.id)
|
|
169
|
+
})),
|
|
170
|
+
disablePartialExtraction: input.project.disablePartialExtraction,
|
|
171
|
+
experimentalNativeFastPath: input.project.experimentalNativeFastPath,
|
|
172
|
+
zeroRuntime: input.project.zeroRuntime
|
|
173
|
+
});
|
|
174
|
+
const result = await this.session.compile({
|
|
175
|
+
module: rootModule,
|
|
176
|
+
adapter: {
|
|
177
|
+
target: input.target,
|
|
178
|
+
projectGeneration: input.project.generation,
|
|
179
|
+
host,
|
|
180
|
+
planCache: this.planCacheFor(input),
|
|
181
|
+
async load(id) {
|
|
182
|
+
return modules.get(id) ?? null;
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
structuralPass: domStructuralPass
|
|
186
|
+
});
|
|
187
|
+
for (const id of result.invalidatedIds) invalidated.add(id);
|
|
188
|
+
return {
|
|
189
|
+
plan: result.plan,
|
|
190
|
+
output: result.output,
|
|
191
|
+
invalidatedIds: [...invalidated].sort()
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
async buildTree(input) {
|
|
195
|
+
const componentBySpecifier = new Map(input.project.componentModules.map((component) => [component.moduleName, resolvedModuleId(cleanId(component.id))]));
|
|
196
|
+
const modules = /* @__PURE__ */ new Map();
|
|
197
|
+
const loading = /* @__PURE__ */ new Set();
|
|
198
|
+
const loadModule = async (rawId, source) => {
|
|
199
|
+
const id = resolvedModuleId(cleanId(rawId));
|
|
200
|
+
const existing = modules.get(id);
|
|
201
|
+
if (existing) return existing;
|
|
202
|
+
if (loading.has(id)) {
|
|
203
|
+
return {
|
|
204
|
+
id,
|
|
205
|
+
source,
|
|
206
|
+
imports: []
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
loading.add(id);
|
|
210
|
+
const imports = [];
|
|
211
|
+
for (const specifier of yukuFactory.scanImports(id, source)) {
|
|
212
|
+
const configuredComponent = componentBySpecifier.get(specifier);
|
|
213
|
+
if (configuredComponent) {
|
|
214
|
+
imports.push({
|
|
215
|
+
specifier,
|
|
216
|
+
resolvedId: configuredComponent,
|
|
217
|
+
external: true
|
|
218
|
+
});
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
const resolution = await input.resolve(specifier, id);
|
|
222
|
+
if (!resolution) continue;
|
|
223
|
+
const canLink = !resolution.external && sourceCanBeLinked(input.root, resolution.id);
|
|
224
|
+
const resolvedId = canLink ? resolvedModuleId(cleanId(resolution.id)) : path.isAbsolute(cleanId(resolution.id)) ? resolvedModuleId(cleanId(resolution.id)) : externalId(specifier);
|
|
225
|
+
imports.push({
|
|
226
|
+
specifier,
|
|
227
|
+
resolvedId,
|
|
228
|
+
external: !canLink
|
|
229
|
+
});
|
|
230
|
+
if (canLink && !modules.has(resolvedId) && !loading.has(resolvedId)) {
|
|
231
|
+
const dependencySource = await input.load(resolution.id);
|
|
232
|
+
if (dependencySource !== null) {
|
|
233
|
+
await loadModule(resolution.id, dependencySource);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
const module = {
|
|
238
|
+
id,
|
|
239
|
+
source,
|
|
240
|
+
imports
|
|
241
|
+
};
|
|
242
|
+
modules.set(id, module);
|
|
243
|
+
loading.delete(id);
|
|
244
|
+
return module;
|
|
245
|
+
};
|
|
246
|
+
const rootModule = await loadModule(input.id, input.source);
|
|
247
|
+
return {
|
|
248
|
+
rootModule,
|
|
249
|
+
modules
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
export { CompilerFrontend, compilerProjectStamp, loadCompilerProject };
|
|
255
|
+
//# sourceMappingURL=compiler.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compiler.js","names":[],"sources":["esm/compiler.js"],"sourcesContent":["import {\n CompilerSession,\n LOWERED_MODULE_PLAN_VERSION,\n ModulePlanCache,\n PLAN_CACHE_SCHEMA_VERSION,\n contentHash,\n defaultPlanCacheRoot,\n resolvedModuleId,\n stableStringify,\n yukuFactory\n} from \"@tamagui/compiler-core\";\nimport { readFileSync } from \"node:fs\";\nimport { createRequire } from \"node:module\";\nimport path from \"node:path\";\nimport { createTamaguiCompilerHost } from \"./compilerHost\";\nimport { domStructuralPass } from \"./domStructuralPass\";\nimport { loadTamagui } from \"./extractor/loadTamagui\";\nimport { resolveZeroRuntimeSync } from \"./zero/options\";\nasync function loadCompilerProject({\n root,\n target,\n options: optionsIn,\n generation,\n rebuild = false,\n hostVersions = [],\n missingProjectMessage = \"Unable to load the Tamagui compiler project\",\n load = loadTamagui,\n resolveComponents\n}) {\n const components = [\n .../* @__PURE__ */ new Set([\"@tamagui/core\", ...optionsIn.components || [\"tamagui\"]])\n ];\n const options = {\n ...optionsIn,\n root,\n platform: target,\n components\n };\n const zeroRuntime = resolveZeroRuntimeSync(options, root).mode;\n if (zeroRuntime === \"enforce\") options.outputCSS = void 0;\n const projectInfo = await load(options, rebuild);\n if (!projectInfo?.tamaguiConfig || !projectInfo.components) {\n throw new Error(missingProjectMessage);\n }\n const componentModules = resolveComponents ? await resolveComponents(components, projectInfo, options) : [];\n const disablePartialExtraction = !!options.disablePartialExtraction;\n const experimentalNativeFastPath = target === \"native\" && options.experimental?.nativeFastPath === true;\n return {\n projectInfo,\n componentModules,\n generation: typeof generation === \"function\" ? generation(projectInfo, componentModules, options) : generation,\n disablePartialExtraction,\n experimentalNativeFastPath,\n zeroRuntime: zeroRuntime !== \"off\",\n cacheStamp: compilerProjectStamp({\n stampSources: projectInfo.stampSources ?? [],\n hostVersions,\n target,\n componentModules,\n disablePartialExtraction,\n experimentalNativeFastPath,\n zeroRuntime: zeroRuntime !== \"off\",\n development: process.env.NODE_ENV === \"development\"\n })\n };\n}\nconst requireFromCompiler = createRequire(\n typeof __filename === \"string\" ? __filename : import.meta.url\n);\nconst compilerPackageVersions = [\"@tamagui/compiler-core\", \"@tamagui/static\"].map(\n (name) => `${name}@${requireFromCompiler(`${name}/package.json`).version}`\n);\nfunction compilerProjectStamp(input) {\n if (!input.stampSources.length) return null;\n const sources = [];\n for (const file of [...new Set(input.stampSources)].sort()) {\n try {\n sources.push([file, contentHash(readFileSync(file))]);\n } catch {\n return null;\n }\n }\n return contentHash(\n stableStringify({\n schema: PLAN_CACHE_SCHEMA_VERSION,\n plan: LOWERED_MODULE_PLAN_VERSION,\n packages: [...compilerPackageVersions, ...input.hostVersions].sort(),\n target: input.target,\n development: input.development,\n componentModules: input.componentModules.map(({ moduleName, id }) => [\n moduleName,\n cleanId(id)\n ]),\n disablePartialExtraction: input.disablePartialExtraction,\n experimentalNativeFastPath: input.experimentalNativeFastPath,\n zeroRuntime: input.zeroRuntime,\n sources\n })\n );\n}\nfunction cleanId(id) {\n return id.split(/[?#]/, 1)[0];\n}\nfunction externalId(specifier) {\n return resolvedModuleId(`external://${encodeURIComponent(specifier)}`);\n}\nfunction sourceCanBeLinked(root, id) {\n const clean = cleanId(id);\n const normalized = clean.replace(/\\\\/g, \"/\");\n if (!path.isAbsolute(clean) || normalized.includes(\"/node_modules/\")) return false;\n const relative = path.relative(root, clean);\n return relative === \"\" || relative !== \"..\" && !relative.startsWith(`..${path.sep}`);\n}\nclass CompilerFrontend {\n session = new CompilerSession();\n queue = Promise.resolve();\n planCaches = /* @__PURE__ */ new Map();\n /**\n * One cache per project root and platform. Absent when the project produced\n * no content stamp, in which case plans are never persisted rather than\n * persisted under an identity that cannot see a config change.\n */\n planCacheFor(input) {\n const stamp = input.project.cacheStamp;\n if (!stamp) return void 0;\n const root = defaultPlanCacheRoot(input.root, input.target);\n let store = this.planCaches.get(root);\n if (!store) {\n store = new ModulePlanCache(root);\n this.planCaches.set(root, store);\n }\n return { store, stamp };\n }\n /** Hits, misses and writes across every plan cache this frontend has used. */\n get planCacheStats() {\n const total = { hits: 0, misses: 0, writes: 0 };\n for (const store of this.planCaches.values()) {\n total.hits += store.stats.hits;\n total.misses += store.stats.misses;\n total.writes += store.stats.writes;\n }\n return total;\n }\n compile(input) {\n const operation = this.queue.then(() => this.compileNow(input));\n this.queue = operation.catch(() => void 0);\n return operation;\n }\n update(input) {\n const operation = this.queue.then(async () => {\n const { modules } = await this.buildTree(input);\n const invalidated = /* @__PURE__ */ new Set();\n for (const module of modules.values()) {\n for (const id of await this.session.update(module)) invalidated.add(id);\n }\n return [...invalidated].sort();\n });\n this.queue = operation.catch(() => void 0);\n return operation;\n }\n has(id) {\n return this.session.has(resolvedModuleId(cleanId(id)));\n }\n dependentsOf(id) {\n return this.session.dependentsOf(resolvedModuleId(cleanId(id)));\n }\n remove(id) {\n const operation = this.queue.then(\n () => this.session.remove(resolvedModuleId(cleanId(id)))\n );\n this.queue = operation.catch(() => void 0);\n return operation;\n }\n parseCount(id) {\n return this.session.parseCount(resolvedModuleId(cleanId(id)));\n }\n async compileNow(input) {\n const { rootModule, modules } = await this.buildTree(input);\n const invalidated = /* @__PURE__ */ new Set();\n for (const module of modules.values()) {\n for (const id of await this.session.update(module)) invalidated.add(id);\n }\n const projectInfo = input.project.projectInfo;\n if (!projectInfo.tamaguiConfig || !projectInfo.components) {\n throw new Error(\"The compiler requires evaluated Tamagui config and components\");\n }\n const host = createTamaguiCompilerHost({\n target: input.target,\n tamaguiConfig: projectInfo.tamaguiConfig,\n components: projectInfo.components,\n componentModules: input.project.componentModules.map((component) => ({\n moduleName: component.moduleName,\n resolvedId: cleanId(component.id)\n })),\n disablePartialExtraction: input.project.disablePartialExtraction,\n experimentalNativeFastPath: input.project.experimentalNativeFastPath,\n zeroRuntime: input.project.zeroRuntime\n });\n const result = await this.session.compile({\n module: rootModule,\n adapter: {\n target: input.target,\n projectGeneration: input.project.generation,\n host,\n planCache: this.planCacheFor(input),\n async load(id) {\n return modules.get(id) ?? null;\n }\n },\n structuralPass: domStructuralPass\n });\n for (const id of result.invalidatedIds) invalidated.add(id);\n return {\n plan: result.plan,\n output: result.output,\n invalidatedIds: [...invalidated].sort()\n };\n }\n async buildTree(input) {\n const componentBySpecifier = new Map(\n input.project.componentModules.map((component) => [\n component.moduleName,\n resolvedModuleId(cleanId(component.id))\n ])\n );\n const modules = /* @__PURE__ */ new Map();\n const loading = /* @__PURE__ */ new Set();\n const loadModule = async (rawId, source) => {\n const id = resolvedModuleId(cleanId(rawId));\n const existing = modules.get(id);\n if (existing) return existing;\n if (loading.has(id)) {\n return { id, source, imports: [] };\n }\n loading.add(id);\n const imports = [];\n for (const specifier of yukuFactory.scanImports(id, source)) {\n const configuredComponent = componentBySpecifier.get(specifier);\n if (configuredComponent) {\n imports.push({ specifier, resolvedId: configuredComponent, external: true });\n continue;\n }\n const resolution = await input.resolve(specifier, id);\n if (!resolution) continue;\n const canLink = !resolution.external && sourceCanBeLinked(input.root, resolution.id);\n const resolvedId = canLink ? resolvedModuleId(cleanId(resolution.id)) : path.isAbsolute(cleanId(resolution.id)) ? resolvedModuleId(cleanId(resolution.id)) : externalId(specifier);\n imports.push({ specifier, resolvedId, external: !canLink });\n if (canLink && !modules.has(resolvedId) && !loading.has(resolvedId)) {\n const dependencySource = await input.load(resolution.id);\n if (dependencySource !== null) {\n await loadModule(resolution.id, dependencySource);\n }\n }\n }\n const module = { id, source, imports };\n modules.set(id, module);\n loading.delete(id);\n return module;\n };\n const rootModule = await loadModule(input.id, input.source);\n return { rootModule, modules };\n }\n}\nexport {\n CompilerFrontend,\n compilerProjectStamp,\n loadCompilerProject\n};\n//# sourceMappingURL=compiler.js.map\n"],"mappings":";;;;;;;;;;AAkBA,eAAe,oBAAoB,EACjC,MACA,QACA,SAAS,WACT,YACA,UAAU,OACV,eAAe,CAAC,GAChB,wBAAwB,+CACxB,OAAO,aACP,qBACC;CACD,MAAM,aAAa,CACjB,mBAAmB,IAAI,IAAI,CAAC,iBAAiB,GAAG,UAAU,cAAc,CAAC,SAAS,CAAC,CAAC,CACtF;CACA,MAAM,UAAU;EACd,GAAG;EACH;EACA,UAAU;EACV;CACF;CACA,MAAM,cAAc,uBAAuB,SAAS,IAAI,EAAE;CAC1D,IAAI,gBAAgB,WAAW,QAAQ,YAAY,KAAK;CACxD,MAAM,cAAc,MAAM,KAAK,SAAS,OAAO;CAC/C,IAAI,CAAC,aAAa,iBAAiB,CAAC,YAAY,YAAY;EAC1D,MAAM,IAAI,MAAM,qBAAqB;CACvC;CACA,MAAM,mBAAmB,oBAAoB,MAAM,kBAAkB,YAAY,aAAa,OAAO,IAAI,CAAC;CAC1G,MAAM,2BAA2B,CAAC,CAAC,QAAQ;CAC3C,MAAM,6BAA6B,WAAW,YAAY,QAAQ,cAAc,mBAAmB;CACnG,OAAO;EACL;EACA;EACA,YAAY,OAAO,eAAe,aAAa,WAAW,aAAa,kBAAkB,OAAO,IAAI;EACpG;EACA;EACA,aAAa,gBAAgB;EAC7B,YAAY,qBAAqB;GAC/B,cAAc,YAAY,gBAAgB,CAAC;GAC3C;GACA;GACA;GACA;GACA;GACA,aAAa,gBAAgB;GAC7B,aAAa,QAAQ,IAAI,aAAa;EACxC,CAAC;CACH;AACF;AACA,MAAM,sBAAsB,cAC1B,OAAO,eAAe,WAAW,aAAa,OAAO,KAAK,G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