tailwind-styled-v4 5.0.18 → 5.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/dist/{analyzeWorkspace-CopJNGmi.d.ts → analyzeWorkspace-B1_XRfdl.d.ts} +1 -0
  2. package/dist/{analyzeWorkspace-DpVPccjz.d.mts → analyzeWorkspace-hYfu4Hg3.d.mts} +1 -0
  3. package/dist/analyzer.d.mts +2 -2
  4. package/dist/analyzer.d.ts +2 -2
  5. package/dist/analyzer.js +5 -4
  6. package/dist/analyzer.js.map +1 -1
  7. package/dist/analyzer.mjs +5 -4
  8. package/dist/analyzer.mjs.map +1 -1
  9. package/dist/animate.js +3 -3
  10. package/dist/animate.js.map +1 -1
  11. package/dist/animate.mjs +3 -3
  12. package/dist/animate.mjs.map +1 -1
  13. package/dist/atomic.js +38 -2
  14. package/dist/atomic.js.map +1 -1
  15. package/dist/atomic.mjs +38 -2
  16. package/dist/atomic.mjs.map +1 -1
  17. package/dist/cli.js +43 -6
  18. package/dist/cli.js.map +1 -1
  19. package/dist/cli.mjs +43 -6
  20. package/dist/cli.mjs.map +1 -1
  21. package/dist/compiler.d.mts +177 -2
  22. package/dist/compiler.d.ts +177 -2
  23. package/dist/compiler.js +172 -10
  24. package/dist/compiler.js.map +1 -1
  25. package/dist/compiler.mjs +159 -11
  26. package/dist/compiler.mjs.map +1 -1
  27. package/dist/engine.d.mts +3 -3
  28. package/dist/engine.d.ts +3 -3
  29. package/dist/engine.js +177 -13
  30. package/dist/engine.js.map +1 -1
  31. package/dist/engine.mjs +177 -13
  32. package/dist/engine.mjs.map +1 -1
  33. package/dist/{index-DJv28Uzq.d.mts → index-DQI6O24n.d.mts} +1 -1
  34. package/dist/{index-BDQw13kn.d.ts → index-UkYbyBkR.d.ts} +1 -1
  35. package/dist/index.d.mts +2 -2
  36. package/dist/index.d.ts +2 -2
  37. package/dist/index.js +177 -13
  38. package/dist/index.js.map +1 -1
  39. package/dist/index.mjs +177 -13
  40. package/dist/index.mjs.map +1 -1
  41. package/dist/next.js +188 -10
  42. package/dist/next.js.map +1 -1
  43. package/dist/next.mjs +188 -10
  44. package/dist/next.mjs.map +1 -1
  45. package/dist/shared.js +172 -9
  46. package/dist/shared.js.map +1 -1
  47. package/dist/shared.mjs +172 -9
  48. package/dist/shared.mjs.map +1 -1
  49. package/dist/turbopackLoader.js +172 -9
  50. package/dist/turbopackLoader.js.map +1 -1
  51. package/dist/turbopackLoader.mjs +172 -9
  52. package/dist/turbopackLoader.mjs.map +1 -1
  53. package/dist/tw.js +43 -6
  54. package/dist/tw.js.map +1 -1
  55. package/dist/tw.mjs +43 -6
  56. package/dist/tw.mjs.map +1 -1
  57. package/dist/vite.js +310 -146
  58. package/dist/vite.js.map +1 -1
  59. package/dist/vite.mjs +310 -146
  60. package/dist/vite.mjs.map +1 -1
  61. package/dist/webpackLoader.js +38 -2
  62. package/dist/webpackLoader.js.map +1 -1
  63. package/dist/webpackLoader.mjs +38 -2
  64. package/dist/webpackLoader.mjs.map +1 -1
  65. package/native/tailwind-styled-native.node +0 -0
  66. package/package.json +1 -1
package/dist/vite.mjs CHANGED
@@ -1001,8 +1001,8 @@ async function generateCssNative(classes, options) {
1001
1001
  return css;
1002
1002
  }
1003
1003
  function clearThemeCache() {
1004
+ const native = getNativeBridge();
1004
1005
  try {
1005
- const native = getNativeBridge();
1006
1006
  if (!native?.clearThemeCache) {
1007
1007
  return;
1008
1008
  }
@@ -1010,12 +1010,165 @@ function clearThemeCache() {
1010
1010
  } catch {
1011
1011
  }
1012
1012
  }
1013
+ function resetCacheStats() {
1014
+ const native = getNativeBridge();
1015
+ try {
1016
+ if (!native?.resetCacheStats) {
1017
+ return;
1018
+ }
1019
+ native.resetCacheStats();
1020
+ } catch {
1021
+ }
1022
+ }
1013
1023
  var init_cssGeneratorNative = __esm({
1014
1024
  "packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
1015
1025
  init_nativeBridge();
1016
1026
  }
1017
1027
  });
1018
1028
 
1029
+ // packages/domain/compiler/src/compiler/cssCompilationNative.ts
1030
+ function compileClass(input) {
1031
+ const native = getNativeBridge();
1032
+ if (!native?.compile_class) throw new Error("compile_class not available");
1033
+ const resultJson = native.compile_class(input);
1034
+ try {
1035
+ return JSON.parse(resultJson);
1036
+ } catch {
1037
+ return {
1038
+ selector: "",
1039
+ declarations: "",
1040
+ properties: [],
1041
+ specificity: 0
1042
+ };
1043
+ }
1044
+ }
1045
+ function compileClasses(inputs) {
1046
+ const native = getNativeBridge();
1047
+ if (!native?.compile_classes) throw new Error("compile_classes not available");
1048
+ const resultJson = native.compile_classes(inputs);
1049
+ try {
1050
+ return JSON.parse(resultJson);
1051
+ } catch {
1052
+ return {
1053
+ css: "",
1054
+ resolved_classes: [],
1055
+ unknown_classes: [],
1056
+ size_bytes: 0,
1057
+ duration_ms: 0
1058
+ };
1059
+ }
1060
+ }
1061
+ function compileToCss(input, minify) {
1062
+ const native = getNativeBridge();
1063
+ if (!native?.compile_to_css) throw new Error("compile_to_css not available");
1064
+ return native.compile_to_css(input, minify ?? false);
1065
+ }
1066
+ function compileToCssBatch(inputs, minify) {
1067
+ const native = getNativeBridge();
1068
+ if (!native?.compile_to_css_batch) throw new Error("compile_to_css_batch not available");
1069
+ return native.compile_to_css_batch(inputs, minify ?? false);
1070
+ }
1071
+ function minifyCss(css) {
1072
+ const native = getNativeBridge();
1073
+ if (!native?.minify_css) throw new Error("minify_css not available");
1074
+ return native.minify_css(css);
1075
+ }
1076
+ function generateCss(ruleJson, minify) {
1077
+ const native = getNativeBridge();
1078
+ if (!native?.generate_css) throw new Error("generate_css not available");
1079
+ return native.generate_css(ruleJson, minify);
1080
+ }
1081
+ function generateCssBatch(rulesJson, minify) {
1082
+ const native = getNativeBridge();
1083
+ if (!native?.generate_css_batch) throw new Error("generate_css_batch not available");
1084
+ return native.generate_css_batch(rulesJson, minify);
1085
+ }
1086
+ function compileAnimation(animationName, from, to) {
1087
+ const native = getNativeBridge();
1088
+ if (!native?.compile_animation) throw new Error("compile_animation not available");
1089
+ const resultJson = native.compile_animation(animationName, from, to);
1090
+ try {
1091
+ return JSON.parse(resultJson);
1092
+ } catch {
1093
+ return {
1094
+ animation_id: "",
1095
+ keyframes_css: "",
1096
+ animation_rule: "",
1097
+ duration_ms: 0
1098
+ };
1099
+ }
1100
+ }
1101
+ function compileKeyframes(name, stopsJson) {
1102
+ const native = getNativeBridge();
1103
+ if (!native?.compile_keyframes) throw new Error("compile_keyframes not available");
1104
+ const resultJson = native.compile_keyframes(name, stopsJson);
1105
+ try {
1106
+ return JSON.parse(resultJson);
1107
+ } catch {
1108
+ return {
1109
+ animation_id: "",
1110
+ keyframes_css: "",
1111
+ animation_rule: "",
1112
+ duration_ms: 0
1113
+ };
1114
+ }
1115
+ }
1116
+ function compileTheme(tokensJson, themeName, prefix) {
1117
+ const native = getNativeBridge();
1118
+ if (!native?.compile_theme) throw new Error("compile_theme not available");
1119
+ const resultJson = native.compile_theme(tokensJson, themeName, prefix);
1120
+ try {
1121
+ return JSON.parse(resultJson);
1122
+ } catch {
1123
+ return {
1124
+ selector: ":root",
1125
+ variables: [],
1126
+ variables_css: "",
1127
+ theme_name: themeName
1128
+ };
1129
+ }
1130
+ }
1131
+ function twMerge(classString) {
1132
+ const native = getNativeBridge();
1133
+ if (!native?.tw_merge) throw new Error("tw_merge not available");
1134
+ return native.tw_merge(classString);
1135
+ }
1136
+ function twMergeMany(classStrings) {
1137
+ const native = getNativeBridge();
1138
+ if (!native?.tw_merge_many) throw new Error("tw_merge_many not available");
1139
+ return native.tw_merge_many(classStrings);
1140
+ }
1141
+ function twMergeWithSeparator(classString, options) {
1142
+ const native = getNativeBridge();
1143
+ if (!native?.tw_merge_with_separator)
1144
+ throw new Error("tw_merge_with_separator not available");
1145
+ const opts = {
1146
+ separator: options.separator,
1147
+ debug: options.debug
1148
+ };
1149
+ return native.tw_merge_with_separator(classString, opts);
1150
+ }
1151
+ function twMergeManyWithSeparator(classStrings, options) {
1152
+ const native = getNativeBridge();
1153
+ if (!native?.tw_merge_many_with_separator)
1154
+ throw new Error("tw_merge_many_with_separator not available");
1155
+ const opts = {
1156
+ separator: options.separator,
1157
+ debug: options.debug
1158
+ };
1159
+ return native.tw_merge_many_with_separator(classStrings, opts);
1160
+ }
1161
+ function twMergeRaw(classLists) {
1162
+ const native = getNativeBridge();
1163
+ if (!native?.tw_merge_raw) throw new Error("tw_merge_raw not available");
1164
+ return native.tw_merge_raw(classLists);
1165
+ }
1166
+ var init_cssCompilationNative = __esm({
1167
+ "packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
1168
+ init_nativeBridge();
1169
+ }
1170
+ });
1171
+
1019
1172
  // packages/domain/compiler/src/compiler/tailwindEngine.ts
1020
1173
  var tailwindEngine_exports = {};
1021
1174
  __export(tailwindEngine_exports, {
@@ -1127,7 +1280,7 @@ function postProcessWithLightning(rawCss) {
1127
1280
  }
1128
1281
  return result.css;
1129
1282
  }
1130
- async function runCssPipeline(classes, cssEntryContent, root, minify = true) {
1283
+ async function runCssPipeline(classes, cssEntryContent, root, minify = true, minifier = "lightning") {
1131
1284
  const filtered = classes.filter(Boolean);
1132
1285
  const uniqueMap = /* @__PURE__ */ new Map();
1133
1286
  filtered.forEach((cls) => uniqueMap.set(cls, cls));
@@ -1135,7 +1288,7 @@ async function runCssPipeline(classes, cssEntryContent, root, minify = true) {
1135
1288
  if (unique.length === 0) {
1136
1289
  return { css: "", classes: [], sizeBytes: 0, optimized: false };
1137
1290
  }
1138
- const cacheKey = _getCacheKey(unique, minify, cssEntryContent, root);
1291
+ const cacheKey = _getCacheKey(unique, minify, cssEntryContent, root) + `|${minifier}`;
1139
1292
  const cached = _cssCache.get(cacheKey);
1140
1293
  if (cached) {
1141
1294
  _cacheHits++;
@@ -1152,7 +1305,14 @@ async function runCssPipeline(classes, cssEntryContent, root, minify = true) {
1152
1305
  const theme = getThemeConfig();
1153
1306
  rawCss = await generateCssNative(unique, { theme });
1154
1307
  usedRustCompiler = true;
1155
- const finalCss = minify ? postProcessWithLightning(rawCss) : rawCss;
1308
+ let finalCss = rawCss;
1309
+ if (minify) {
1310
+ if (minifier === "fast") {
1311
+ finalCss = minifyCss(rawCss);
1312
+ } else {
1313
+ finalCss = postProcessWithLightning(rawCss);
1314
+ }
1315
+ }
1156
1316
  if (process.env.DEBUG?.includes("compiler")) {
1157
1317
  console.log(
1158
1318
  `[Compiler] Generated CSS from ${unique.length} classes (${usedRustCompiler ? "Rust" : "JavaScript"})`,
@@ -1188,6 +1348,7 @@ var init_tailwindEngine = __esm({
1188
1348
  "packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
1189
1349
  init_nativeBridge();
1190
1350
  init_cssGeneratorNative();
1351
+ init_cssCompilationNative();
1191
1352
  createRequire(import.meta.url);
1192
1353
  _cssCache = /* @__PURE__ */ new Map();
1193
1354
  _cacheHits = 0;
@@ -1268,139 +1429,6 @@ var init_compilationNative = __esm({
1268
1429
  }
1269
1430
  });
1270
1431
 
1271
- // packages/domain/compiler/src/compiler/cssCompilationNative.ts
1272
- function compileClass(input) {
1273
- const native = getNativeBridge();
1274
- if (!native?.compile_class) throw new Error("compile_class not available");
1275
- const resultJson = native.compile_class(input);
1276
- try {
1277
- return JSON.parse(resultJson);
1278
- } catch {
1279
- return {
1280
- selector: "",
1281
- declarations: "",
1282
- properties: [],
1283
- specificity: 0
1284
- };
1285
- }
1286
- }
1287
- function compileClasses(inputs) {
1288
- const native = getNativeBridge();
1289
- if (!native?.compile_classes) throw new Error("compile_classes not available");
1290
- const resultJson = native.compile_classes(inputs);
1291
- try {
1292
- return JSON.parse(resultJson);
1293
- } catch {
1294
- return {
1295
- css: "",
1296
- resolved_classes: [],
1297
- unknown_classes: [],
1298
- size_bytes: 0,
1299
- duration_ms: 0
1300
- };
1301
- }
1302
- }
1303
- function compileToCss(input, minify) {
1304
- const native = getNativeBridge();
1305
- if (!native?.compile_to_css) throw new Error("compile_to_css not available");
1306
- return native.compile_to_css(input, minify ?? false);
1307
- }
1308
- function compileToCssBatch(inputs, minify) {
1309
- const native = getNativeBridge();
1310
- if (!native?.compile_to_css_batch) throw new Error("compile_to_css_batch not available");
1311
- return native.compile_to_css_batch(inputs, minify ?? false);
1312
- }
1313
- function minifyCss(css) {
1314
- const native = getNativeBridge();
1315
- if (!native?.minify_css) throw new Error("minify_css not available");
1316
- return native.minify_css(css);
1317
- }
1318
- function compileAnimation(animationName, from, to) {
1319
- const native = getNativeBridge();
1320
- if (!native?.compile_animation) throw new Error("compile_animation not available");
1321
- const resultJson = native.compile_animation(animationName, from, to);
1322
- try {
1323
- return JSON.parse(resultJson);
1324
- } catch {
1325
- return {
1326
- animation_id: "",
1327
- keyframes_css: "",
1328
- animation_rule: "",
1329
- duration_ms: 0
1330
- };
1331
- }
1332
- }
1333
- function compileKeyframes(name, stopsJson) {
1334
- const native = getNativeBridge();
1335
- if (!native?.compile_keyframes) throw new Error("compile_keyframes not available");
1336
- const resultJson = native.compile_keyframes(name, stopsJson);
1337
- try {
1338
- return JSON.parse(resultJson);
1339
- } catch {
1340
- return {
1341
- animation_id: "",
1342
- keyframes_css: "",
1343
- animation_rule: "",
1344
- duration_ms: 0
1345
- };
1346
- }
1347
- }
1348
- function compileTheme(tokensJson, themeName, prefix) {
1349
- const native = getNativeBridge();
1350
- if (!native?.compile_theme) throw new Error("compile_theme not available");
1351
- const resultJson = native.compile_theme(tokensJson, themeName, prefix);
1352
- try {
1353
- return JSON.parse(resultJson);
1354
- } catch {
1355
- return {
1356
- selector: ":root",
1357
- variables: [],
1358
- variables_css: "",
1359
- theme_name: themeName
1360
- };
1361
- }
1362
- }
1363
- function twMerge(classString) {
1364
- const native = getNativeBridge();
1365
- if (!native?.tw_merge) throw new Error("tw_merge not available");
1366
- return native.tw_merge(classString);
1367
- }
1368
- function twMergeMany(classStrings) {
1369
- const native = getNativeBridge();
1370
- if (!native?.tw_merge_many) throw new Error("tw_merge_many not available");
1371
- return native.tw_merge_many(classStrings);
1372
- }
1373
- function twMergeWithSeparator(classString, options) {
1374
- const native = getNativeBridge();
1375
- if (!native?.tw_merge_with_separator)
1376
- throw new Error("tw_merge_with_separator not available");
1377
- const opts = {
1378
- separator: options.separator,
1379
- debug: options.debug
1380
- };
1381
- return native.tw_merge_with_separator(classString, opts);
1382
- }
1383
- function twMergeManyWithSeparator(classStrings, options) {
1384
- const native = getNativeBridge();
1385
- if (!native?.tw_merge_many_with_separator)
1386
- throw new Error("tw_merge_many_with_separator not available");
1387
- const opts = {
1388
- separator: options.separator,
1389
- debug: options.debug
1390
- };
1391
- return native.tw_merge_many_with_separator(classStrings, opts);
1392
- }
1393
- function twMergeRaw(classLists) {
1394
- const native = getNativeBridge();
1395
- if (!native?.tw_merge_raw) throw new Error("tw_merge_raw not available");
1396
- return native.tw_merge_raw(classLists);
1397
- }
1398
- var init_cssCompilationNative = __esm({
1399
- "packages/domain/compiler/src/compiler/cssCompilationNative.ts"() {
1400
- init_nativeBridge();
1401
- }
1402
- });
1403
-
1404
1432
  // packages/domain/compiler/src/compiler/idRegistryNative.ts
1405
1433
  function idRegistryCreate() {
1406
1434
  const native = getNativeBridge();
@@ -1665,9 +1693,10 @@ __export(parser_exports, {
1665
1693
  mergeClassesStatic: () => mergeClassesStatic,
1666
1694
  normalizeAndDedupClasses: () => normalizeAndDedupClasses,
1667
1695
  normalizeClasses: () => normalizeClasses,
1696
+ parseClass: () => parseClass,
1668
1697
  parseClasses: () => parseClasses
1669
1698
  });
1670
- var parseClasses, extractAllClasses, extractClassesFromSource, astExtractClasses, normalizeClasses, mergeClassesStatic, normalizeAndDedupClasses, extractComponentUsage, batchExtractClasses, checkAgainstSafelist, diffClassLists;
1699
+ var parseClasses, parseClass, extractAllClasses, extractClassesFromSource, astExtractClasses, normalizeClasses, mergeClassesStatic, normalizeAndDedupClasses, extractComponentUsage, batchExtractClasses, checkAgainstSafelist, diffClassLists;
1671
1700
  var init_parser = __esm({
1672
1701
  "packages/domain/compiler/src/parser/index.ts"() {
1673
1702
  init_nativeBridge();
@@ -1678,6 +1707,14 @@ var init_parser = __esm({
1678
1707
  }
1679
1708
  return native.parseClasses(raw) || [];
1680
1709
  };
1710
+ parseClass = (input) => {
1711
+ const native = getNativeBridge();
1712
+ if (!native?.parseClass) {
1713
+ throw new Error("FATAL: Native binding 'parseClass' is required but not available.");
1714
+ }
1715
+ const result = native.parseClass(input);
1716
+ return typeof result === "string" ? JSON.parse(result) : result;
1717
+ };
1681
1718
  extractAllClasses = (source) => {
1682
1719
  const native = getNativeBridge();
1683
1720
  if (!native?.extractAllClasses) {
@@ -1809,6 +1846,35 @@ function mergeCssDeclarationsNative(cssChunks) {
1809
1846
  if (!native?.mergeCssDeclarations) throw new Error("mergeCssDeclarations not available");
1810
1847
  return native.mergeCssDeclarations(cssChunks);
1811
1848
  }
1849
+ function getWeek6FeaturesStatus() {
1850
+ const native = getNativeBridge();
1851
+ if (!native?.getWeek6FeaturesStatus) throw new Error("getWeek6FeaturesStatus not available");
1852
+ const resultJson = native.getWeek6FeaturesStatus();
1853
+ return JSON.parse(resultJson);
1854
+ }
1855
+ function getMemoryStatsNative() {
1856
+ const native = getNativeBridge();
1857
+ if (!native?.getMemoryStatsNative) throw new Error("getMemoryStatsNative not available");
1858
+ const resultJson = native.getMemoryStatsNative();
1859
+ return JSON.parse(resultJson);
1860
+ }
1861
+ function getMemoryRecommendationsNative() {
1862
+ const native = getNativeBridge();
1863
+ if (!native?.getMemoryRecommendationsNative) throw new Error("getMemoryRecommendationsNative not available");
1864
+ const resultJson = native.getMemoryRecommendationsNative();
1865
+ return JSON.parse(resultJson);
1866
+ }
1867
+ function estimateOptimalCacheConfigNative(workloadType, expectedEntries) {
1868
+ const native = getNativeBridge();
1869
+ if (!native?.estimateOptimalCacheConfigNative) throw new Error("estimateOptimalCacheConfigNative not available");
1870
+ const resultJson = native.estimateOptimalCacheConfigNative(workloadType, expectedEntries);
1871
+ return JSON.parse(resultJson);
1872
+ }
1873
+ function resetMemoryStats() {
1874
+ const native = getNativeBridge();
1875
+ if (!native?.resetMemoryStats) throw new Error("resetMemoryStats not available");
1876
+ native.resetMemoryStats();
1877
+ }
1812
1878
  var init_analyzerNative = __esm({
1813
1879
  "packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
1814
1880
  init_nativeBridge();
@@ -2098,6 +2164,52 @@ function cachePriority(mtimeMs, sizeBytes, hitCount) {
2098
2164
  if (!native?.cache_priority) throw new Error("cache_priority not available");
2099
2165
  return native.cache_priority(mtimeMs, sizeBytes, hitCount);
2100
2166
  }
2167
+ function getResolverPoolStats() {
2168
+ const native = getNativeBridge();
2169
+ if (!native?.getResolverPoolStats) throw new Error("getResolverPoolStats not available");
2170
+ const statsJson = native.getResolverPoolStats();
2171
+ try {
2172
+ return JSON.parse(statsJson);
2173
+ } catch {
2174
+ return {
2175
+ hits: 0,
2176
+ misses: 0,
2177
+ total: 0,
2178
+ hit_rate: 0,
2179
+ cached_resolvers: 0
2180
+ };
2181
+ }
2182
+ }
2183
+ function clearResolverPool() {
2184
+ const native = getNativeBridge();
2185
+ if (!native?.clearResolverPool) throw new Error("clearResolverPool not available");
2186
+ const resultJson = native.clearResolverPool();
2187
+ try {
2188
+ return JSON.parse(resultJson);
2189
+ } catch {
2190
+ return { status: "error" };
2191
+ }
2192
+ }
2193
+ function resolveColorCached(themeId, color, configJson) {
2194
+ const native = getNativeBridge();
2195
+ if (!native?.resolveColorCached) throw new Error("resolveColorCached not available");
2196
+ return native.resolveColorCached(themeId, color, configJson);
2197
+ }
2198
+ function resolveSpacingCached(themeId, spacing, configJson) {
2199
+ const native = getNativeBridge();
2200
+ if (!native?.resolveSpacingCached) throw new Error("resolveSpacingCached not available");
2201
+ return native.resolveSpacingCached(themeId, spacing, configJson);
2202
+ }
2203
+ function resolveFontSizeCached(themeId, size, configJson) {
2204
+ const native = getNativeBridge();
2205
+ if (!native?.resolveFontSizeCached) throw new Error("resolveFontSizeCached not available");
2206
+ return native.resolveFontSizeCached(themeId, size, configJson);
2207
+ }
2208
+ function resetResolverPoolStats() {
2209
+ const native = getNativeBridge();
2210
+ if (!native?.resetResolverPoolStats) throw new Error("resetResolverPoolStats not available");
2211
+ native.resetResolverPoolStats();
2212
+ }
2101
2213
  var init_cacheNative = __esm({
2102
2214
  "packages/domain/compiler/src/cache/cacheNative.ts"() {
2103
2215
  init_nativeBridge();
@@ -2541,6 +2653,7 @@ __export(internal_exports, {
2541
2653
  clearCssGenCache: () => clearCssGenCache,
2542
2654
  clearParseCache: () => clearParseCache,
2543
2655
  clearResolveCache: () => clearResolveCache,
2656
+ clearResolverPool: () => clearResolverPool,
2544
2657
  clearThemeCache: () => clearThemeCache,
2545
2658
  collectFiles: () => collectFiles,
2546
2659
  compileAnimation: () => compileAnimation,
@@ -2563,6 +2676,7 @@ __export(internal_exports, {
2563
2676
  eliminateDeadCssNative: () => eliminateDeadCssNative,
2564
2677
  emitPluginHook: () => emitPluginHook,
2565
2678
  estimateOptimalCacheConfig: () => estimateOptimalCacheConfig,
2679
+ estimateOptimalCacheConfigNative: () => estimateOptimalCacheConfigNative,
2566
2680
  extractAllClasses: () => extractAllClasses,
2567
2681
  extractAndGenerateStateCss: () => extractAndGenerateStateCss,
2568
2682
  extractAndGenerateStateCssNative: () => extractAndGenerateStateCssNative,
@@ -2576,6 +2690,8 @@ __export(internal_exports, {
2576
2690
  fileToRoute: () => fileToRoute,
2577
2691
  findDeadVariants: () => findDeadVariants,
2578
2692
  generateAtomicCss: () => generateAtomicCss,
2693
+ generateCss: () => generateCss,
2694
+ generateCssBatch: () => generateCssBatch,
2579
2695
  generateCssForClasses: () => generateCssForClasses,
2580
2696
  generateCssNative: () => generateCssNative,
2581
2697
  generateSafelist: () => generateSafelist,
@@ -2591,10 +2707,14 @@ __export(internal_exports, {
2591
2707
  getCompilerDiagnostics: () => getCompilerDiagnostics,
2592
2708
  getContentPaths: () => getContentPaths,
2593
2709
  getIncrementalEngine: () => getIncrementalEngine,
2710
+ getMemoryRecommendationsNative: () => getMemoryRecommendationsNative,
2711
+ getMemoryStatsNative: () => getMemoryStatsNative,
2594
2712
  getNativeBridge: () => getNativeBridge,
2595
2713
  getPluginHooks: () => getPluginHooks,
2714
+ getResolverPoolStats: () => getResolverPoolStats,
2596
2715
  getRouteClasses: () => getRouteClasses,
2597
2716
  getWatchStats: () => getWatchStats,
2717
+ getWeek6FeaturesStatus: () => getWeek6FeaturesStatus,
2598
2718
  hasTwUsage: () => hasTwUsage,
2599
2719
  hashContent: () => hashContent,
2600
2720
  hoistComponentsNative: () => hoistComponentsNative,
@@ -2623,6 +2743,7 @@ __export(internal_exports, {
2623
2743
  normalizeClasses: () => normalizeClasses,
2624
2744
  optimizeCssNative: () => optimizeCssNative,
2625
2745
  parseAtomicClass: () => parseAtomicClass,
2746
+ parseClass: () => parseClass,
2626
2747
  parseClasses: () => parseClasses,
2627
2748
  pollWatchEvents: () => pollWatchEvents,
2628
2749
  processFileChange: () => processFileChange,
@@ -2674,12 +2795,18 @@ __export(internal_exports, {
2674
2795
  registerPropertyName: () => registerPropertyName,
2675
2796
  registerValueName: () => registerValueName,
2676
2797
  resetBucketEngine: () => resetBucketEngine,
2798
+ resetCacheStats: () => resetCacheStats,
2677
2799
  resetCompilationMetrics: () => resetCompilationMetrics,
2678
2800
  resetIncrementalEngine: () => resetIncrementalEngine,
2801
+ resetMemoryStats: () => resetMemoryStats,
2802
+ resetResolverPoolStats: () => resetResolverPoolStats,
2679
2803
  resolveCascade: () => resolveCascade,
2680
2804
  resolveClassNames: () => resolveClassNames,
2805
+ resolveColorCached: () => resolveColorCached,
2681
2806
  resolveConflictGroup: () => resolveConflictGroup,
2807
+ resolveFontSizeCached: () => resolveFontSizeCached,
2682
2808
  resolveSimpleVariants: () => resolveSimpleVariants,
2809
+ resolveSpacingCached: () => resolveSpacingCached,
2683
2810
  resolveThemeValue: () => resolveThemeValue,
2684
2811
  resolveVariants: () => resolveVariants,
2685
2812
  reverseLookupProperty: () => reverseLookupProperty,
@@ -3363,8 +3490,44 @@ var init_nativeBridge = __esm({
3363
3490
  try {
3364
3491
  const binding = _loadNative(result.path);
3365
3492
  if (isValidNativeBridge(binding)) {
3366
- nativeBridge = binding;
3367
- log("Native bridge loaded successfully from:", result.path);
3493
+ const toCamelCase = (str) => {
3494
+ return str.replace(/_([a-z0-9])/g, (_, g) => g.toUpperCase());
3495
+ };
3496
+ nativeBridge = new Proxy(binding, {
3497
+ get(target, prop) {
3498
+ if (typeof prop === "string") {
3499
+ if (prop in target) {
3500
+ return target[prop];
3501
+ }
3502
+ const camelKey = toCamelCase(prop);
3503
+ if (camelKey in target) {
3504
+ const val = target[camelKey];
3505
+ if (typeof val === "function") {
3506
+ return val.bind(target);
3507
+ }
3508
+ return val;
3509
+ }
3510
+ const napiKey = `${camelKey}Napi`;
3511
+ if (napiKey in target) {
3512
+ const val = target[napiKey];
3513
+ if (typeof val === "function") {
3514
+ return val.bind(target);
3515
+ }
3516
+ return val;
3517
+ }
3518
+ const napiInnerKey = `${camelKey}NapiInner`;
3519
+ if (napiInnerKey in target) {
3520
+ const val = target[napiInnerKey];
3521
+ if (typeof val === "function") {
3522
+ return val.bind(target);
3523
+ }
3524
+ return val;
3525
+ }
3526
+ }
3527
+ return target[prop];
3528
+ }
3529
+ });
3530
+ log("Native bridge loaded successfully and proxy-wrapped from:", result.path);
3368
3531
  return nativeBridge;
3369
3532
  }
3370
3533
  } catch (e) {
@@ -3633,9 +3796,9 @@ var init_src2 = __esm({
3633
3796
  if (normalized.includes("/layout.") || normalized.includes("/loading.") || normalized.includes("/error.")) {
3634
3797
  return "__global";
3635
3798
  }
3636
- const pageMatch = normalized.match(/\/app\/(.+?)\/page\.[tj]sx?$/);
3799
+ const pageMatch = normalized.match(/(?:^|\/)app\/(.+?)\/page\.[tj]sx?$/);
3637
3800
  if (pageMatch) return `/${pageMatch[1]}`;
3638
- const rootPage = normalized.match(/\/app\/page\.[tj]sx?$/);
3801
+ const rootPage = normalized.match(/(?:^|\/)app\/page\.[tj]sx?$/);
3639
3802
  if (rootPage) return "/";
3640
3803
  return null;
3641
3804
  };
@@ -4811,7 +4974,7 @@ function sanitizeFrequentThreshold(value) {
4811
4974
  // packages/domain/analyzer/src/binding.ts
4812
4975
  var isAnalyzerModule = (module) => {
4813
4976
  const candidate = module;
4814
- return typeof candidate?.analyzeClasses === "function";
4977
+ return typeof candidate?.analyzeClasses === "function" || typeof candidate?.analyzeClassesWorkspace === "function";
4815
4978
  };
4816
4979
  var createAnalyzerBindingLoader = () => {
4817
4980
  const _state = { bindingPromise: null };
@@ -4830,7 +4993,7 @@ var createAnalyzerBindingLoader = () => {
4830
4993
  runtimeDir,
4831
4994
  candidates,
4832
4995
  isValid: isAnalyzerModule,
4833
- invalidExportMessage: "Module loaded but missing `analyzeClasses` export."
4996
+ invalidExportMessage: "Module loaded but missing `analyzeClasses` or `analyzeClassesWorkspace` export."
4834
4997
  });
4835
4998
  if (binding) {
4836
4999
  debugLog(`native binding loaded from: ${loadedPath}`);
@@ -4873,7 +5036,7 @@ async function requireNativeBinding() {
4873
5036
  runtimeDir,
4874
5037
  candidates,
4875
5038
  isValid: isAnalyzerModule,
4876
- invalidExportMessage: "Module loaded but missing `analyzeClasses` export."
5039
+ invalidExportMessage: "Module loaded but missing `analyzeClasses` or `analyzeClassesWorkspace` export."
4877
5040
  });
4878
5041
  const lines = [
4879
5042
  "Native analyzer binding not found. Ensure `tailwind_styled_parser.node` is built."
@@ -5293,7 +5456,8 @@ async function analyzeWorkspace(root, options = {}) {
5293
5456
  );
5294
5457
  const nativeReport = (() => {
5295
5458
  try {
5296
- const report = binding.analyzeClasses(filesJson, resolvedRoot, topLimit);
5459
+ const fn = binding.analyzeClassesWorkspace || binding.analyzeClasses;
5460
+ const report = fn(filesJson, resolvedRoot, topLimit);
5297
5461
  if (!report) {
5298
5462
  throw new Error(`Native analyzer returned no report for "${resolvedRoot}".`);
5299
5463
  }