@tamagui/static 3.0.0-beta.753.1 → 3.0.0-beta.765.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.
@@ -107,6 +107,9 @@ function cleanId(id) {
107
107
  function externalId(specifier) {
108
108
  return (0, import_compiler_core.resolvedModuleId)(`external://${encodeURIComponent(specifier)}`);
109
109
  }
110
+ function compilerContext(input) {
111
+ return `${input.root}\0${input.target}\0${input.environment ?? ""}\0${input.project.generation}`;
112
+ }
110
113
  function sourceCanBeLinked(root, id) {
111
114
  const clean = cleanId(id);
112
115
  const normalized = clean.replace(/\\/g, "/");
@@ -118,6 +121,8 @@ var CompilerFrontend = class {
118
121
  session = new import_compiler_core.CompilerSession();
119
122
  queue = Promise.resolve();
120
123
  planCaches = /* @__PURE__ */ new Map();
124
+ moduleRecords = /* @__PURE__ */ new Map();
125
+ moduleContext = null;
121
126
  /**
122
127
  * One cache per project root and platform. Absent when the project produced
123
128
  * no content stamp, in which case plans are never persisted rather than
@@ -162,6 +167,7 @@ var CompilerFrontend = class {
162
167
  const invalidated = /* @__PURE__ */ new Set();
163
168
  for (const module2 of modules.values()) {
164
169
  for (const id of await this.session.update(module2)) invalidated.add(id);
170
+ this.moduleRecords.set(module2.id, module2);
165
171
  }
166
172
  return [...invalidated].sort();
167
173
  });
@@ -175,7 +181,13 @@ var CompilerFrontend = class {
175
181
  return this.session.dependentsOf((0, import_compiler_core.resolvedModuleId)(cleanId(id)));
176
182
  }
177
183
  remove(id) {
178
- const operation = this.queue.then(() => this.session.remove((0, import_compiler_core.resolvedModuleId)(cleanId(id))));
184
+ const operation = this.queue.then(async () => {
185
+ const result = await this.session.remove((0, import_compiler_core.resolvedModuleId)(cleanId(id)));
186
+ for (const invalidatedId of result.invalidatedIds) {
187
+ this.moduleRecords.delete(invalidatedId);
188
+ }
189
+ return result;
190
+ });
179
191
  this.queue = operation.catch(() => void 0);
180
192
  return operation;
181
193
  }
@@ -187,6 +199,7 @@ var CompilerFrontend = class {
187
199
  const invalidated = /* @__PURE__ */ new Set();
188
200
  for (const module2 of modules.values()) {
189
201
  for (const id of await this.session.update(module2)) invalidated.add(id);
202
+ this.moduleRecords.set(module2.id, module2);
190
203
  }
191
204
  const projectInfo = input.project.projectInfo;
192
205
  if (!projectInfo.tamaguiConfig || !projectInfo.components) {
@@ -225,13 +238,36 @@ var CompilerFrontend = class {
225
238
  };
226
239
  }
227
240
  async buildTree(input) {
241
+ const moduleContext = compilerContext(input);
242
+ if (this.moduleContext !== moduleContext) {
243
+ this.moduleRecords.clear();
244
+ this.moduleContext = moduleContext;
245
+ }
228
246
  const componentBySpecifier = new Map(input.project.componentModules.map((component) => [component.moduleName, (0, import_compiler_core.resolvedModuleId)(cleanId(component.id))]));
229
247
  const modules = /* @__PURE__ */ new Map();
230
248
  const loading = /* @__PURE__ */ new Set();
249
+ const addInstalledClosure = (module2) => {
250
+ if (modules.has(module2.id) || loading.has(module2.id)) return;
251
+ loading.add(module2.id);
252
+ for (const dependency of module2.imports) {
253
+ if (dependency.external) continue;
254
+ const installedDependency = this.moduleRecords.get(dependency.resolvedId);
255
+ if (installedDependency && this.session.has(dependency.resolvedId)) {
256
+ addInstalledClosure(installedDependency);
257
+ }
258
+ }
259
+ modules.set(module2.id, module2);
260
+ loading.delete(module2.id);
261
+ };
231
262
  const loadModule = async (rawId, source) => {
232
263
  const id = (0, import_compiler_core.resolvedModuleId)(cleanId(rawId));
233
264
  const existing = modules.get(id);
234
265
  if (existing) return existing;
266
+ const installed = this.moduleRecords.get(id);
267
+ if (installed?.source === source && this.session.has(id)) {
268
+ addInstalledClosure(installed);
269
+ return installed;
270
+ }
235
271
  if (loading.has(id)) {
236
272
  return {
237
273
  id,
@@ -261,9 +297,14 @@ var CompilerFrontend = class {
261
297
  external: !canLink
262
298
  });
263
299
  if (canLink && !modules.has(resolvedId) && !loading.has(resolvedId)) {
264
- const dependencySource = await input.load(resolution.id);
265
- if (dependencySource !== null) {
266
- await loadModule(resolution.id, dependencySource);
300
+ const installedDependency = this.moduleRecords.get(resolvedId);
301
+ if (installedDependency && this.session.has(resolvedId)) {
302
+ addInstalledClosure(installedDependency);
303
+ } else {
304
+ const dependencySource = await input.load(resolution.id);
305
+ if (dependencySource !== null) {
306
+ await loadModule(resolution.id, dependencySource);
307
+ }
267
308
  }
268
309
  }
269
310
  }
@@ -35,7 +35,8 @@ function concatClassName(_cn) {
35
35
  propObjects.push(cns);
36
36
  continue;
37
37
  }
38
- const names = Array.isArray(cns) ? cns : cns.split(" ");
38
+ const generatedIdentifiers = Array.isArray(cns);
39
+ const names = generatedIdentifiers ? cns : cns.split(" ");
39
40
  const numNames = names.length;
40
41
  for (let i = numNames - 1; i >= 0; i--) {
41
42
  const name = names[i];
@@ -57,9 +58,12 @@ function concatClassName(_cn) {
57
58
  final = name + " " + final;
58
59
  continue;
59
60
  }
60
- const styleKey = name.slice(1, name.indexOf("-"));
61
- const { mediaKey, pseudoKey } = getClassNameScope(name, splitIndex);
62
- const uid = `${styleKey}${mediaKey ? `@${mediaKey}` : ""}${pseudoKey ? `:${pseudoKey}` : ""}`;
61
+ const styleKey = name.slice(1, splitIndex);
62
+ let uid = name;
63
+ if (!generatedIdentifiers) {
64
+ const { mediaKey, pseudoKey } = getClassNameScope(name, splitIndex);
65
+ uid = `${styleKey}${mediaKey ? `@${mediaKey}` : ""}${pseudoKey ? `:${pseudoKey}` : ""}`;
66
+ }
63
67
  if (usedPrefixes.has(uid)) {
64
68
  continue;
65
69
  }
@@ -74,6 +74,9 @@ function cleanId(id) {
74
74
  function externalId(specifier) {
75
75
  return resolvedModuleId(`external://${encodeURIComponent(specifier)}`);
76
76
  }
77
+ function compilerContext(input) {
78
+ return `${input.root}\0${input.target}\0${input.environment ?? ""}\0${input.project.generation}`;
79
+ }
77
80
  function sourceCanBeLinked(root, id) {
78
81
  const clean = cleanId(id);
79
82
  const normalized = clean.replace(/\\/g, "/");
@@ -85,6 +88,8 @@ var CompilerFrontend = class {
85
88
  session = new CompilerSession();
86
89
  queue = Promise.resolve();
87
90
  planCaches = /* @__PURE__ */ new Map();
91
+ moduleRecords = /* @__PURE__ */ new Map();
92
+ moduleContext = null;
88
93
  /**
89
94
  * One cache per project root and platform. Absent when the project produced
90
95
  * no content stamp, in which case plans are never persisted rather than
@@ -129,6 +134,7 @@ var CompilerFrontend = class {
129
134
  const invalidated = /* @__PURE__ */ new Set();
130
135
  for (const module of modules.values()) {
131
136
  for (const id of await this.session.update(module)) invalidated.add(id);
137
+ this.moduleRecords.set(module.id, module);
132
138
  }
133
139
  return [...invalidated].sort();
134
140
  });
@@ -142,7 +148,13 @@ var CompilerFrontend = class {
142
148
  return this.session.dependentsOf(resolvedModuleId(cleanId(id)));
143
149
  }
144
150
  remove(id) {
145
- const operation = this.queue.then(() => this.session.remove(resolvedModuleId(cleanId(id))));
151
+ const operation = this.queue.then(async () => {
152
+ const result = await this.session.remove(resolvedModuleId(cleanId(id)));
153
+ for (const invalidatedId of result.invalidatedIds) {
154
+ this.moduleRecords.delete(invalidatedId);
155
+ }
156
+ return result;
157
+ });
146
158
  this.queue = operation.catch(() => void 0);
147
159
  return operation;
148
160
  }
@@ -154,6 +166,7 @@ var CompilerFrontend = class {
154
166
  const invalidated = /* @__PURE__ */ new Set();
155
167
  for (const module of modules.values()) {
156
168
  for (const id of await this.session.update(module)) invalidated.add(id);
169
+ this.moduleRecords.set(module.id, module);
157
170
  }
158
171
  const projectInfo = input.project.projectInfo;
159
172
  if (!projectInfo.tamaguiConfig || !projectInfo.components) {
@@ -192,13 +205,36 @@ var CompilerFrontend = class {
192
205
  };
193
206
  }
194
207
  async buildTree(input) {
208
+ const moduleContext = compilerContext(input);
209
+ if (this.moduleContext !== moduleContext) {
210
+ this.moduleRecords.clear();
211
+ this.moduleContext = moduleContext;
212
+ }
195
213
  const componentBySpecifier = new Map(input.project.componentModules.map((component) => [component.moduleName, resolvedModuleId(cleanId(component.id))]));
196
214
  const modules = /* @__PURE__ */ new Map();
197
215
  const loading = /* @__PURE__ */ new Set();
216
+ const addInstalledClosure = (module) => {
217
+ if (modules.has(module.id) || loading.has(module.id)) return;
218
+ loading.add(module.id);
219
+ for (const dependency of module.imports) {
220
+ if (dependency.external) continue;
221
+ const installedDependency = this.moduleRecords.get(dependency.resolvedId);
222
+ if (installedDependency && this.session.has(dependency.resolvedId)) {
223
+ addInstalledClosure(installedDependency);
224
+ }
225
+ }
226
+ modules.set(module.id, module);
227
+ loading.delete(module.id);
228
+ };
198
229
  const loadModule = async (rawId, source) => {
199
230
  const id = resolvedModuleId(cleanId(rawId));
200
231
  const existing = modules.get(id);
201
232
  if (existing) return existing;
233
+ const installed = this.moduleRecords.get(id);
234
+ if (installed?.source === source && this.session.has(id)) {
235
+ addInstalledClosure(installed);
236
+ return installed;
237
+ }
202
238
  if (loading.has(id)) {
203
239
  return {
204
240
  id,
@@ -228,9 +264,14 @@ var CompilerFrontend = class {
228
264
  external: !canLink
229
265
  });
230
266
  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);
267
+ const installedDependency = this.moduleRecords.get(resolvedId);
268
+ if (installedDependency && this.session.has(resolvedId)) {
269
+ addInstalledClosure(installedDependency);
270
+ } else {
271
+ const dependencySource = await input.load(resolution.id);
272
+ if (dependencySource !== null) {
273
+ await loadModule(resolution.id, dependencySource);
274
+ }
234
275
  }
235
276
  }
236
277
  }
@@ -1 +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,CAAC,CAAC;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,I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AM,UAAU,CAAC;GACjB,KAAK,MAAM,aAAa,YAAY,YAAY,IAAI,MAAM,GAAG;IAC3D,MAAM,sBAAsB,qBAAqB,IAAI,SAAS;IAC9D,IAAI,qBAAqB;KACvB,QAAQ,KAAK;MAAE;MAAW,YAAY;MAAqB,UAAU;KAAK,CAAC;KAC3E;IACF;IACA,MAAM,aAAa,MAAM,MAAM,QAAQ,WAAW,EAAE;IACpD,IAAI,CAAC,YAAY;IACjB,MAAM,UAAU,CAAC,WAAW,YAAY,kBAAkB,MAAM,MAAM,WAAW,EAAE;IACnF,MAAM,aAAa,UAAU,iBAAiB,QAAQ,WAAW,EAAE,CAAC,IAAI,KAAK,WAAW,QAAQ,WAAW,EAAE,CAAC,IAAI,iBAAiB,QAAQ,WAAW,EAAE,CAAC,IAAI,WAAW,SAAS;IACjL,QAAQ,KAAK;KAAE;KAAW;KAAY,UAAU,CAAC;IAAQ,CAAC;IAC1D,IAAI,WAAW,CAAC,QAAQ,IAAI,UAAU,KAAK,CAAC,QAAQ,IAAI,UAAU,GAAG;KACnE,MAAM,mBAAmB,MAAM,MAAM,KAAK,WAAW,EAAE;KACvD,IAAI,qBAAqB,MAAM;MAC7B,MAAM,WAAW,WAAW,IAAI,gBAAgB;KAClD;IACF;GACF;GACA,MAAM,SAAS;IAAE;IAAI;IAAQ;GAAQ;GACrC,QAAQ,IAAI,IAAI,MAAM;GACtB,QAAQ,OAAO,EAAE;GACjB,OAAO;EACT;EACA,MAAM,aAAa,MAAM,WAAW,MAAM,IAAI,MAAM,MAAM;EAC1D,OAAO;GAAE;GAAY;EAAQ;CAC/B;AACF"}
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 compilerContext(input) {\n return `${input.root}\\0${input.target}\\0${input.environment ?? \"\"}\\0${input.project.generation}`;\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 moduleRecords = /* @__PURE__ */ new Map();\n moduleContext = null;\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 this.moduleRecords.set(module.id, module);\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(async () => {\n const result = await this.session.remove(resolvedModuleId(cleanId(id)));\n for (const invalidatedId of result.invalidatedIds) {\n this.moduleRecords.delete(invalidatedId);\n }\n return result;\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 this.moduleRecords.set(module.id, module);\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 moduleContext = compilerContext(input);\n if (this.moduleContext !== moduleContext) {\n this.moduleRecords.clear();\n this.moduleContext = moduleContext;\n }\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 addInstalledClosure = (module) => {\n if (modules.has(module.id) || loading.has(module.id)) return;\n loading.add(module.id);\n for (const dependency of module.imports) {\n if (dependency.external) continue;\n const installedDependency = this.moduleRecords.get(dependency.resolvedId);\n if (installedDependency && this.session.has(dependency.resolvedId)) {\n addInstalledClosure(installedDependency);\n }\n }\n modules.set(module.id, module);\n loading.delete(module.id);\n };\n const loadModule = async (rawId, source) => {\n const id = resolvedModuleId(cleanId(rawId));\n const existing = modules.get(id);\n if (existing) return existing;\n const installed = this.moduleRecords.get(id);\n if (installed?.source === source && this.session.has(id)) {\n addInstalledClosure(installed);\n return installed;\n }\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 installedDependency = this.moduleRecords.get(resolvedId);\n if (installedDependency && this.session.has(resolvedId)) {\n addInstalledClosure(installedDependency);\n } else {\n const dependencySource = await input.load(resolution.id);\n if (dependencySource !== null) {\n await loadModule(resolution.id, dependencySource);\n }\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,CAAC,CAAC;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,CAA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I,UAAU,GAAG;KACnE,MAAM,sBAAsB,KAAK,cAAc,IAAI,UAAU;KAC7D,IAAI,uBAAuB,KAAK,QAAQ,IAAI,UAAU,GAAG;MACvD,oBAAoB,mBAAmB;KACzC,OAAO;MACL,MAAM,mBAAmB,MAAM,MAAM,KAAK,WAAW,EAAE;MACvD,IAAI,qBAAqB,MAAM;OAC7B,MAAM,WAAW,WAAW,IAAI,gBAAgB;MAClD;KACF;IACF;GACF;GACA,MAAM,SAAS;IAAE;IAAI;IAAQ;GAAQ;GACrC,QAAQ,IAAI,IAAI,MAAM;GACtB,QAAQ,OAAO,EAAE;GACjB,OAAO;EACT;EACA,MAAM,aAAa,MAAM,WAAW,MAAM,IAAI,MAAM,MAAM;EAC1D,OAAO;GAAE;GAAY;EAAQ;CAC/B;AACF"}
@@ -12,7 +12,8 @@ function concatClassName(_cn) {
12
12
  propObjects.push(cns);
13
13
  continue;
14
14
  }
15
- const names = Array.isArray(cns) ? cns : cns.split(" ");
15
+ const generatedIdentifiers = Array.isArray(cns);
16
+ const names = generatedIdentifiers ? cns : cns.split(" ");
16
17
  const numNames = names.length;
17
18
  for (let i = numNames - 1; i >= 0; i--) {
18
19
  const name = names[i];
@@ -34,9 +35,12 @@ function concatClassName(_cn) {
34
35
  final = name + " " + final;
35
36
  continue;
36
37
  }
37
- const styleKey = name.slice(1, name.indexOf("-"));
38
- const { mediaKey, pseudoKey } = getClassNameScope(name, splitIndex);
39
- const uid = `${styleKey}${mediaKey ? `@${mediaKey}` : ""}${pseudoKey ? `:${pseudoKey}` : ""}`;
38
+ const styleKey = name.slice(1, splitIndex);
39
+ let uid = name;
40
+ if (!generatedIdentifiers) {
41
+ const { mediaKey, pseudoKey } = getClassNameScope(name, splitIndex);
42
+ uid = `${styleKey}${mediaKey ? `@${mediaKey}` : ""}${pseudoKey ? `:${pseudoKey}` : ""}`;
43
+ }
40
44
  if (usedPrefixes.has(uid)) {
41
45
  continue;
42
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"concatClassName.js","names":[],"sources":["esm/extractor/concatClassName.js"],"sourcesContent":["function concatClassName(_cn) {\n const args = arguments;\n const usedPrefixes = /* @__PURE__ */ new Set();\n let final = \"\";\n const len = args.length;\n let propObjects = null;\n for (let x = len; x >= 0; x--) {\n const cns = args[x];\n if (!cns) continue;\n if (!Array.isArray(cns) && typeof cns !== \"string\") {\n propObjects = propObjects || [];\n propObjects.push(cns);\n continue;\n }\n const names = Array.isArray(cns) ? cns : cns.split(\" \");\n const numNames = names.length;\n for (let i = numNames - 1; i >= 0; i--) {\n const name = names[i];\n if (!name || name === \" \") continue;\n if (name.startsWith(\"font_\")) {\n if (usedPrefixes.has(\"fontFamily\")) {\n continue;\n }\n usedPrefixes.add(\"fontFamily\");\n final = name + \" \" + final;\n continue;\n }\n if (name[0] !== \"_\") {\n final = name + \" \" + final;\n continue;\n }\n const splitIndex = name.indexOf(\"-\");\n if (splitIndex < 1) {\n final = name + \" \" + final;\n continue;\n }\n const styleKey = name.slice(1, name.indexOf(\"-\"));\n const { mediaKey, pseudoKey } = getClassNameScope(name, splitIndex);\n const uid = `${styleKey}${mediaKey ? `@${mediaKey}` : \"\"}${pseudoKey ? `:${pseudoKey}` : \"\"}`;\n if (usedPrefixes.has(uid)) {\n continue;\n }\n usedPrefixes.add(uid);\n const propName = styleKey;\n if (propName && propObjects) {\n if (propObjects.some((po) => {\n return po && propName in po && po[propName] !== null;\n })) {\n continue;\n }\n }\n final = name + \" \" + final;\n }\n }\n return final.trim();\n}\nfunction getClassNameScope(name, splitIndex) {\n let mediaKey = \"\";\n let pseudoKey = \"\";\n let valueStart = splitIndex + 1;\n if (name[valueStart] === \"_\") {\n const mediaEnd = name.indexOf(\"_\", valueStart + 1);\n if (mediaEnd > valueStart + 1) {\n mediaKey = name.slice(valueStart + 1, mediaEnd);\n valueStart = mediaEnd + 1;\n }\n }\n if (name[valueStart] === \"0\") {\n const pseudoStart = valueStart + 1;\n for (const nextPseudoKey of pseudoKeys) {\n if (name.startsWith(`${nextPseudoKey}-`, pseudoStart)) {\n pseudoKey = nextPseudoKey;\n break;\n }\n }\n }\n return { mediaKey, pseudoKey };\n}\nconst pseudoKeys = [\n \"focus-visible\",\n \"focus-within\",\n \"focusVisible\",\n \"focusWithin\",\n \"disabled\",\n \"active\",\n \"hover\",\n \"focus\",\n \"enter\",\n \"exit\"\n];\nexport {\n concatClassName\n};\n//# sourceMappingURL=concatClassName.js.map\n"],"mappings":";AAAA,SAAS,gBAAgB,KAAK;CAC5B,MAAM,OAAO;CACb,MAAM,+BAA+B,IAAI,IAAI;CAC7C,IAAI,QAAQ;CACZ,MAAM,MAAM,KAAK;CACjB,IAAI,cAAc;CAClB,KAAK,IAAI,IAAI,KAAK,KAAK,GAAG,KAAK;EAC7B,MAAM,MAAM,KAAK;EACjB,IAAI,CAAC,KAAK;EACV,IAAI,CAAC,MAAM,QAAQ,GAAG,KAAK,OAAO,QAAQ,UAAU;GAClD,cAAc,eAAe,CAAC;GAC9B,YAAY,KAAK,GAAG;GACpB;EACF;EACA,MAAM,QAAQ,MAAM,QAAQ,GAAG,IAAI,MAAM,IAAI,MAAM,GAAG;EACtD,MAAM,WAAW,MAAM;EACvB,KAAK,IAAI,IAAI,WAAW,GAAG,KAAK,GAAG,KAAK;GACtC,MAAM,OAAO,MAAM;GACnB,IAAI,CAAC,QAAQ,SAAS,KAAK;GAC3B,IAAI,KAAK,WAAW,OAAO,GAAG;IAC5B,IAAI,aAAa,IAAI,YAAY,GAAG;KAClC;IACF;IACA,aAAa,IAAI,YAAY;IAC7B,QAAQ,OAAO,MAAM;IACrB;GACF;GACA,IAAI,KAAK,OAAO,KAAK;IACnB,QAAQ,OAAO,MAAM;IACrB;GACF;GACA,MAAM,aAAa,KAAK,QAAQ,GAAG;GACnC,IAAI,aAAa,GAAG;IAClB,QAAQ,OAAO,MAAM;IACrB;GACF;GACA,MAAM,WAAW,KAAK,MAAM,GAAG,KAAK,QAAQ,GAAG,CAAC;GAChD,MAAM,EAAE,UAAU,cAAc,kBAAkB,MAAM,UAAU;GAClE,MAAM,MAAM,GAAG,WAAW,WAAW,IAAI,aAAa,KAAK,YAAY,IAAI,cAAc;GACzF,IAAI,aAAa,IAAI,GAAG,GAAG;IACzB;GACF;GACA,aAAa,IAAI,GAAG;GACpB,MAAM,WAAW;GACjB,IAAI,YAAY,aAAa;IAC3B,IAAI,YAAY,MAAM,OAAO;KAC3B,OAAO,MAAM,YAAY,MAAM,GAAG,cAAc;IAClD,CAAC,GAAG;KACF;IACF;GACF;GACA,QAAQ,OAAO,MAAM;EACvB;CACF;CACA,OAAO,MAAM,KAAK;AACpB;AACA,SAAS,kBAAkB,MAAM,YAAY;CAC3C,IAAI,WAAW;CACf,IAAI,YAAY;CAChB,IAAI,aAAa,aAAa;CAC9B,IAAI,KAAK,gBAAgB,KAAK;EAC5B,MAAM,WAAW,KAAK,QAAQ,KAAK,aAAa,CAAC;EACjD,IAAI,WAAW,aAAa,GAAG;GAC7B,WAAW,KAAK,MAAM,aAAa,GAAG,QAAQ;GAC9C,aAAa,WAAW;EAC1B;CACF;CACA,IAAI,KAAK,gBAAgB,KAAK;EAC5B,MAAM,cAAc,aAAa;EACjC,KAAK,MAAM,iBAAiB,YAAY;GACtC,IAAI,KAAK,WAAW,GAAG,cAAc,IAAI,WAAW,GAAG;IACrD,YAAY;IACZ;GACF;EACF;CACF;CACA,OAAO;EAAE;EAAU;CAAU;AAC/B;AACA,MAAM,aAAa;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
1
+ {"version":3,"file":"concatClassName.js","names":[],"sources":["esm/extractor/concatClassName.js"],"sourcesContent":["function concatClassName(_cn) {\n const args = arguments;\n const usedPrefixes = /* @__PURE__ */ new Set();\n let final = \"\";\n const len = args.length;\n let propObjects = null;\n for (let x = len; x >= 0; x--) {\n const cns = args[x];\n if (!cns) continue;\n if (!Array.isArray(cns) && typeof cns !== \"string\") {\n propObjects = propObjects || [];\n propObjects.push(cns);\n continue;\n }\n const generatedIdentifiers = Array.isArray(cns);\n const names = generatedIdentifiers ? cns : cns.split(\" \");\n const numNames = names.length;\n for (let i = numNames - 1; i >= 0; i--) {\n const name = names[i];\n if (!name || name === \" \") continue;\n if (name.startsWith(\"font_\")) {\n if (usedPrefixes.has(\"fontFamily\")) {\n continue;\n }\n usedPrefixes.add(\"fontFamily\");\n final = name + \" \" + final;\n continue;\n }\n if (name[0] !== \"_\") {\n final = name + \" \" + final;\n continue;\n }\n const splitIndex = name.indexOf(\"-\");\n if (splitIndex < 1) {\n final = name + \" \" + final;\n continue;\n }\n const styleKey = name.slice(1, splitIndex);\n let uid = name;\n if (!generatedIdentifiers) {\n const { mediaKey, pseudoKey } = getClassNameScope(name, splitIndex);\n uid = `${styleKey}${mediaKey ? `@${mediaKey}` : \"\"}${pseudoKey ? `:${pseudoKey}` : \"\"}`;\n }\n if (usedPrefixes.has(uid)) {\n continue;\n }\n usedPrefixes.add(uid);\n const propName = styleKey;\n if (propName && propObjects) {\n if (propObjects.some((po) => {\n return po && propName in po && po[propName] !== null;\n })) {\n continue;\n }\n }\n final = name + \" \" + final;\n }\n }\n return final.trim();\n}\nfunction getClassNameScope(name, splitIndex) {\n let mediaKey = \"\";\n let pseudoKey = \"\";\n let valueStart = splitIndex + 1;\n if (name[valueStart] === \"_\") {\n const mediaEnd = name.indexOf(\"_\", valueStart + 1);\n if (mediaEnd > valueStart + 1) {\n mediaKey = name.slice(valueStart + 1, mediaEnd);\n valueStart = mediaEnd + 1;\n }\n }\n if (name[valueStart] === \"0\") {\n const pseudoStart = valueStart + 1;\n for (const nextPseudoKey of pseudoKeys) {\n if (name.startsWith(`${nextPseudoKey}-`, pseudoStart)) {\n pseudoKey = nextPseudoKey;\n break;\n }\n }\n }\n return { mediaKey, pseudoKey };\n}\nconst pseudoKeys = [\n \"focus-visible\",\n \"focus-within\",\n \"focusVisible\",\n \"focusWithin\",\n \"disabled\",\n \"active\",\n \"hover\",\n \"focus\",\n \"enter\",\n \"exit\"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GACpB,MAAM,WAAW;GACjB,IAAI,YAAY,aAAa;IAC3B,IAAI,YAAY,MAAM,OAAO;KAC3B,OAAO,MAAM,YAAY,MAAM,GAAG,cAAc;IAClD,CAAC,GAAG;KACF;IACF;GACF;GACA,QAAQ,OAAO,MAAM;EACvB;CACF;CACA,OAAO,MAAM,KAAK;AACpB;AACA,SAAS,kBAAkB,MAAM,YAAY;CAC3C,IAAI,WAAW;CACf,IAAI,YAAY;CAChB,IAAI,aAAa,aAAa;CAC9B,IAAI,KAAK,gBAAgB,KAAK;EAC5B,MAAM,WAAW,KAAK,QAAQ,KAAK,aAAa,CAAC;EACjD,IAAI,WAAW,aAAa,GAAG;GAC7B,WAAW,KAAK,MAAM,aAAa,GAAG,QAAQ;GAC9C,aAAa,WAAW;EAC1B;CACF;CACA,IAAI,KAAK,gBAAgB,KAAK;EAC5B,MAAM,cAAc,aAAa;EACjC,KAAK,MAAM,iBAAiB,YAAY;GACtC,IAAI,KAAK,WAAW,GAAG,cAAc,IAAI,WAAW,GAAG;IACrD,YAAY;IACZ;GACF;EACF;CACF;CACA,OAAO;EAAE;EAAU;CAAU;AAC/B;AACA,MAAM,aAAa;CACjB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/static",
3
- "version": "3.0.0-beta.753.1",
3
+ "version": "3.0.0-beta.765.1",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "license": "MIT",
6
6
  "source": "src/index.ts",
@@ -45,21 +45,21 @@
45
45
  "clean:build": "tamagui-build clean:build"
46
46
  },
47
47
  "dependencies": {
48
- "@tamagui/cli-color": "3.0.0-beta.753.1",
49
- "@tamagui/compiler-core": "3.0.0-beta.753.1",
50
- "@tamagui/config-default": "3.0.0-beta.753.1",
51
- "@tamagui/core": "3.0.0-beta.753.1",
52
- "@tamagui/dom": "3.0.0-beta.753.1",
53
- "@tamagui/fake-react-native": "3.0.0-beta.753.1",
54
- "@tamagui/generate-themes": "3.0.0-beta.753.1",
55
- "@tamagui/helpers": "3.0.0-beta.753.1",
56
- "@tamagui/helpers-node": "3.0.0-beta.753.1",
57
- "@tamagui/react-native-web-internals": "3.0.0-beta.753.1",
58
- "@tamagui/react-native-web-lite": "3.0.0-beta.753.1",
59
- "@tamagui/shorthands": "3.0.0-beta.753.1",
60
- "@tamagui/style-grammar": "3.0.0-beta.753.1",
61
- "@tamagui/types": "3.0.0-beta.753.1",
62
- "@tamagui/web": "3.0.0-beta.753.1",
48
+ "@tamagui/cli-color": "3.0.0-beta.765.1",
49
+ "@tamagui/compiler-core": "3.0.0-beta.765.1",
50
+ "@tamagui/config-default": "3.0.0-beta.765.1",
51
+ "@tamagui/core": "3.0.0-beta.765.1",
52
+ "@tamagui/dom": "3.0.0-beta.765.1",
53
+ "@tamagui/fake-react-native": "3.0.0-beta.765.1",
54
+ "@tamagui/generate-themes": "3.0.0-beta.765.1",
55
+ "@tamagui/helpers": "3.0.0-beta.765.1",
56
+ "@tamagui/helpers-node": "3.0.0-beta.765.1",
57
+ "@tamagui/react-native-web-internals": "3.0.0-beta.765.1",
58
+ "@tamagui/react-native-web-lite": "3.0.0-beta.765.1",
59
+ "@tamagui/shorthands": "3.0.0-beta.765.1",
60
+ "@tamagui/style-grammar": "3.0.0-beta.765.1",
61
+ "@tamagui/types": "3.0.0-beta.765.1",
62
+ "@tamagui/web": "3.0.0-beta.765.1",
63
63
  "browserslist": "^4.28.1",
64
64
  "check-dependency-version-consistency": "^4.1.0",
65
65
  "esbuild": "0.28.1",
@@ -71,7 +71,7 @@
71
71
  "react-native-web": "~0.21.0"
72
72
  },
73
73
  "devDependencies": {
74
- "@tamagui/build": "3.0.0-beta.753.1",
74
+ "@tamagui/build": "3.0.0-beta.765.1",
75
75
  "@types/find-root": "^1.1.2",
76
76
  "@types/node": "^22.1.0",
77
77
  "@types/webpack": "^4.41.26",
package/src/compiler.ts CHANGED
@@ -212,12 +212,14 @@ export interface CompilerInput {
212
212
  source: string
213
213
  root: string
214
214
  target: CompilerTarget
215
+ /** Host environment whose resolver produced this module graph. */
216
+ environment?: string
215
217
  project: CompilerProject
216
218
  resolve(specifier: string, importer: string): Promise<CompilerResolution | null>
217
219
  load(id: string): Promise<string | null>
218
220
  }
219
221
 
220
- export type CompilerUpdateInput = Omit<CompilerInput, 'target'>
222
+ export type CompilerUpdateInput = CompilerInput
221
223
 
222
224
  export interface CompilerResult {
223
225
  plan: LoweredModulePlan
@@ -233,6 +235,10 @@ function externalId(specifier: string): ResolvedModuleId {
233
235
  return resolvedModuleId(`external://${encodeURIComponent(specifier)}`)
234
236
  }
235
237
 
238
+ function compilerContext(input: CompilerInput): string {
239
+ return `${input.root}\0${input.target}\0${input.environment ?? ''}\0${input.project.generation}`
240
+ }
241
+
236
242
  function sourceCanBeLinked(root: string, id: string): boolean {
237
243
  const clean = cleanId(id)
238
244
  const normalized = clean.replace(/\\/g, '/')
@@ -249,6 +255,8 @@ export class CompilerFrontend {
249
255
  private readonly session = new CompilerSession()
250
256
  private queue: Promise<unknown> = Promise.resolve()
251
257
  private readonly planCaches = new Map<string, ModulePlanCache>()
258
+ private readonly moduleRecords = new Map<ResolvedModuleId, HostModuleInput>()
259
+ private moduleContext: string | null = null
252
260
 
253
261
  /**
254
262
  * One cache per project root and platform. Absent when the project produced
@@ -292,6 +300,7 @@ export class CompilerFrontend {
292
300
  const invalidated = new Set<ResolvedModuleId>()
293
301
  for (const module of modules.values()) {
294
302
  for (const id of await this.session.update(module)) invalidated.add(id)
303
+ this.moduleRecords.set(module.id, module)
295
304
  }
296
305
  return [...invalidated].sort()
297
306
  })
@@ -308,9 +317,13 @@ export class CompilerFrontend {
308
317
  }
309
318
 
310
319
  remove(id: string) {
311
- const operation = this.queue.then(() =>
312
- this.session.remove(resolvedModuleId(cleanId(id)))
313
- )
320
+ const operation = this.queue.then(async () => {
321
+ const result = await this.session.remove(resolvedModuleId(cleanId(id)))
322
+ for (const invalidatedId of result.invalidatedIds) {
323
+ this.moduleRecords.delete(invalidatedId)
324
+ }
325
+ return result
326
+ })
314
327
  this.queue = operation.catch(() => undefined)
315
328
  return operation
316
329
  }
@@ -324,6 +337,7 @@ export class CompilerFrontend {
324
337
  const invalidated = new Set<ResolvedModuleId>()
325
338
  for (const module of modules.values()) {
326
339
  for (const id of await this.session.update(module)) invalidated.add(id)
340
+ this.moduleRecords.set(module.id, module)
327
341
  }
328
342
  const projectInfo = input.project.projectInfo
329
343
  if (!projectInfo.tamaguiConfig || !projectInfo.components) {
@@ -366,6 +380,12 @@ export class CompilerFrontend {
366
380
  rootModule: HostModuleInput
367
381
  modules: Map<ResolvedModuleId, HostModuleInput>
368
382
  }> {
383
+ const moduleContext = compilerContext(input)
384
+ if (this.moduleContext !== moduleContext) {
385
+ this.moduleRecords.clear()
386
+ this.moduleContext = moduleContext
387
+ }
388
+
369
389
  const componentBySpecifier = new Map(
370
390
  input.project.componentModules.map((component) => [
371
391
  component.moduleName,
@@ -375,6 +395,20 @@ export class CompilerFrontend {
375
395
  const modules = new Map<ResolvedModuleId, HostModuleInput>()
376
396
  const loading = new Set<ResolvedModuleId>()
377
397
 
398
+ const addInstalledClosure = (module: HostModuleInput): void => {
399
+ if (modules.has(module.id) || loading.has(module.id)) return
400
+ loading.add(module.id)
401
+ for (const dependency of module.imports) {
402
+ if (dependency.external) continue
403
+ const installedDependency = this.moduleRecords.get(dependency.resolvedId)
404
+ if (installedDependency && this.session.has(dependency.resolvedId)) {
405
+ addInstalledClosure(installedDependency)
406
+ }
407
+ }
408
+ modules.set(module.id, module)
409
+ loading.delete(module.id)
410
+ }
411
+
378
412
  const loadModule = async (
379
413
  rawId: string,
380
414
  source: string
@@ -382,6 +416,11 @@ export class CompilerFrontend {
382
416
  const id = resolvedModuleId(cleanId(rawId))
383
417
  const existing = modules.get(id)
384
418
  if (existing) return existing
419
+ const installed = this.moduleRecords.get(id)
420
+ if (installed?.source === source && this.session.has(id)) {
421
+ addInstalledClosure(installed)
422
+ return installed
423
+ }
385
424
  if (loading.has(id)) {
386
425
  return { id, source, imports: [] }
387
426
  }
@@ -406,9 +445,14 @@ export class CompilerFrontend {
406
445
  : externalId(specifier)
407
446
  imports.push({ specifier, resolvedId, external: !canLink })
408
447
  if (canLink && !modules.has(resolvedId) && !loading.has(resolvedId)) {
409
- const dependencySource = await input.load(resolution.id)
410
- if (dependencySource !== null) {
411
- await loadModule(resolution.id, dependencySource)
448
+ const installedDependency = this.moduleRecords.get(resolvedId)
449
+ if (installedDependency && this.session.has(resolvedId)) {
450
+ addInstalledClosure(installedDependency)
451
+ } else {
452
+ const dependencySource = await input.load(resolution.id)
453
+ if (dependencySource !== null) {
454
+ await loadModule(resolution.id, dependencySource)
455
+ }
412
456
  }
413
457
  }
414
458
  }
@@ -26,7 +26,8 @@ export function concatClassName(_cn: Record<string, any> | null | undefined): st
26
26
  continue
27
27
  }
28
28
 
29
- const names = Array.isArray(cns) ? cns : cns.split(' ')
29
+ const generatedIdentifiers = Array.isArray(cns)
30
+ const names = generatedIdentifiers ? cns : cns.split(' ')
30
31
  const numNames = names.length
31
32
  for (let i = numNames - 1; i >= 0; i--) {
32
33
  const name = names[i]
@@ -53,9 +54,12 @@ export function concatClassName(_cn: Record<string, any> | null | undefined): st
53
54
  continue
54
55
  }
55
56
 
56
- const styleKey = name.slice(1, name.indexOf('-'))
57
- const { mediaKey, pseudoKey } = getClassNameScope(name, splitIndex)
58
- const uid = `${styleKey}${mediaKey ? `@${mediaKey}` : ''}${pseudoKey ? `:${pseudoKey}` : ''}`
57
+ const styleKey = name.slice(1, splitIndex)
58
+ let uid = name
59
+ if (!generatedIdentifiers) {
60
+ const { mediaKey, pseudoKey } = getClassNameScope(name, splitIndex)
61
+ uid = `${styleKey}${mediaKey ? `@${mediaKey}` : ''}${pseudoKey ? `:${pseudoKey}` : ''}`
62
+ }
59
63
 
60
64
  if (usedPrefixes.has(uid)) {
61
65
  // if (shouldDebug) console.log('debug exclude:', usedPrefixes, name)
@@ -75,11 +75,13 @@ export interface CompilerInput {
75
75
  source: string;
76
76
  root: string;
77
77
  target: CompilerTarget;
78
+ /** Host environment whose resolver produced this module graph. */
79
+ environment?: string;
78
80
  project: CompilerProject;
79
81
  resolve(specifier: string, importer: string): Promise<CompilerResolution | null>;
80
82
  load(id: string): Promise<string | null>;
81
83
  }
82
- export type CompilerUpdateInput = Omit<CompilerInput, 'target'>;
84
+ export type CompilerUpdateInput = CompilerInput;
83
85
  export interface CompilerResult {
84
86
  plan: LoweredModulePlan;
85
87
  output: AppliedLoweredModule;
@@ -93,6 +95,8 @@ export declare class CompilerFrontend {
93
95
  private readonly session;
94
96
  private queue;
95
97
  private readonly planCaches;
98
+ private readonly moduleRecords;
99
+ private moduleContext;
96
100
  /**
97
101
  * One cache per project root and platform. Absent when the project produced
98
102
  * no content stamp, in which case plans are never persisted rather than
@@ -1 +1 @@
1
- {"version":3,"file":"compiler.d.ts","sourceRoot":"","sources":["../src/compiler.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,KAAK,oBAAoB,EACzB,KAAK,cAAc,EAEnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAOpD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAIlE,MAAM,WAAW,8BAA8B;IAC7C,UAAU,EAAE,MAAM,CAAA;IAClB,EAAE,EAAE,MAAM,CAAA;CACX;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,kBAAkB,CAAA;IAC/B,gBAAgB,EAAE,8BAA8B,EAAE,CAAA;IAClD,UAAU,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,wBAAwB,CAAC,EAAE,OAAO,CAAA;IAClC,mEAAmE;IACnE,0BAA0B,CAAC,EAAE,OAAO,CAAA;IACpC,wEAAwE;IACxE,WAAW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