tailwind-styled-v4 5.0.18 → 5.0.21
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/{analyzeWorkspace-CopJNGmi.d.ts → analyzeWorkspace-B1_XRfdl.d.ts} +1 -0
- package/dist/{analyzeWorkspace-DpVPccjz.d.mts → analyzeWorkspace-hYfu4Hg3.d.mts} +1 -0
- package/dist/analyzer.d.mts +2 -2
- package/dist/analyzer.d.ts +2 -2
- package/dist/analyzer.js +5 -4
- package/dist/analyzer.js.map +1 -1
- package/dist/analyzer.mjs +5 -4
- package/dist/analyzer.mjs.map +1 -1
- package/dist/animate.js +3 -3
- package/dist/animate.js.map +1 -1
- package/dist/animate.mjs +3 -3
- package/dist/animate.mjs.map +1 -1
- package/dist/atomic.js +38 -2
- package/dist/atomic.js.map +1 -1
- package/dist/atomic.mjs +38 -2
- package/dist/atomic.mjs.map +1 -1
- package/dist/cli.js +43 -6
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +43 -6
- package/dist/cli.mjs.map +1 -1
- package/dist/compiler.d.mts +177 -2
- package/dist/compiler.d.ts +177 -2
- package/dist/compiler.js +172 -10
- package/dist/compiler.js.map +1 -1
- package/dist/compiler.mjs +159 -11
- package/dist/compiler.mjs.map +1 -1
- package/dist/engine.d.mts +3 -3
- package/dist/engine.d.ts +3 -3
- package/dist/engine.js +182 -14
- package/dist/engine.js.map +1 -1
- package/dist/engine.mjs +182 -14
- package/dist/engine.mjs.map +1 -1
- package/dist/index-BFqmBxl9.d.mts +102 -0
- package/dist/{index-DJv28Uzq.d.mts → index-DQI6O24n.d.mts} +1 -1
- package/dist/index-DwNErRJ_.d.ts +102 -0
- package/dist/{index-BDQw13kn.d.ts → index-UkYbyBkR.d.ts} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +182 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +182 -14
- package/dist/index.mjs.map +1 -1
- package/dist/next.js +193 -11
- package/dist/next.js.map +1 -1
- package/dist/next.mjs +193 -11
- package/dist/next.mjs.map +1 -1
- package/dist/plugin-api.d.mts +3 -101
- package/dist/plugin-api.d.ts +3 -101
- package/dist/plugin.d.mts +3 -5
- package/dist/plugin.d.ts +3 -5
- package/dist/plugin.js +0 -97
- package/dist/plugin.js.map +1 -1
- package/dist/plugin.mjs +1 -77
- package/dist/plugin.mjs.map +1 -1
- package/dist/shared.js +177 -10
- package/dist/shared.js.map +1 -1
- package/dist/shared.mjs +177 -10
- package/dist/shared.mjs.map +1 -1
- package/dist/turbopackLoader.js +179 -12
- package/dist/turbopackLoader.js.map +1 -1
- package/dist/turbopackLoader.mjs +179 -12
- package/dist/turbopackLoader.mjs.map +1 -1
- package/dist/tw.js +43 -6
- package/dist/tw.js.map +1 -1
- package/dist/tw.mjs +43 -6
- package/dist/tw.mjs.map +1 -1
- package/dist/vite.js +315 -147
- package/dist/vite.js.map +1 -1
- package/dist/vite.mjs +315 -147
- package/dist/vite.mjs.map +1 -1
- package/dist/webpackLoader.js +38 -2
- package/dist/webpackLoader.js.map +1 -1
- package/dist/webpackLoader.mjs +38 -2
- package/dist/webpackLoader.mjs.map +1 -1
- package/native/tailwind-styled-native.node +0 -0
- package/package.json +1 -1
package/dist/next.js
CHANGED
|
@@ -281,8 +281,44 @@ var init_nativeBridge = __esm({
|
|
|
281
281
|
try {
|
|
282
282
|
const binding = _loadNative(result.path);
|
|
283
283
|
if (isValidNativeBridge(binding)) {
|
|
284
|
-
|
|
285
|
-
|
|
284
|
+
const toCamelCase = (str) => {
|
|
285
|
+
return str.replace(/_([a-z0-9])/g, (_, g) => g.toUpperCase());
|
|
286
|
+
};
|
|
287
|
+
nativeBridge = new Proxy(binding, {
|
|
288
|
+
get(target, prop) {
|
|
289
|
+
if (typeof prop === "string") {
|
|
290
|
+
if (prop in target) {
|
|
291
|
+
return target[prop];
|
|
292
|
+
}
|
|
293
|
+
const camelKey = toCamelCase(prop);
|
|
294
|
+
if (camelKey in target) {
|
|
295
|
+
const val = target[camelKey];
|
|
296
|
+
if (typeof val === "function") {
|
|
297
|
+
return val.bind(target);
|
|
298
|
+
}
|
|
299
|
+
return val;
|
|
300
|
+
}
|
|
301
|
+
const napiKey = `${camelKey}Napi`;
|
|
302
|
+
if (napiKey in target) {
|
|
303
|
+
const val = target[napiKey];
|
|
304
|
+
if (typeof val === "function") {
|
|
305
|
+
return val.bind(target);
|
|
306
|
+
}
|
|
307
|
+
return val;
|
|
308
|
+
}
|
|
309
|
+
const napiInnerKey = `${camelKey}NapiInner`;
|
|
310
|
+
if (napiInnerKey in target) {
|
|
311
|
+
const val = target[napiInnerKey];
|
|
312
|
+
if (typeof val === "function") {
|
|
313
|
+
return val.bind(target);
|
|
314
|
+
}
|
|
315
|
+
return val;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
return target[prop];
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
log("Native bridge loaded successfully and proxy-wrapped from:", result.path);
|
|
286
322
|
return nativeBridge;
|
|
287
323
|
}
|
|
288
324
|
} catch (e) {
|
|
@@ -336,8 +372,8 @@ async function generateCssNative(classes, options) {
|
|
|
336
372
|
return css;
|
|
337
373
|
}
|
|
338
374
|
function getCacheStats() {
|
|
375
|
+
const native = getNativeBridge();
|
|
339
376
|
try {
|
|
340
|
-
const native = getNativeBridge();
|
|
341
377
|
if (!native?.getCacheStats) {
|
|
342
378
|
return null;
|
|
343
379
|
}
|
|
@@ -348,8 +384,8 @@ function getCacheStats() {
|
|
|
348
384
|
}
|
|
349
385
|
}
|
|
350
386
|
function clearThemeCache() {
|
|
387
|
+
const native = getNativeBridge();
|
|
351
388
|
try {
|
|
352
|
-
const native = getNativeBridge();
|
|
353
389
|
if (!native?.clearThemeCache) {
|
|
354
390
|
return;
|
|
355
391
|
}
|
|
@@ -357,6 +393,16 @@ function clearThemeCache() {
|
|
|
357
393
|
} catch {
|
|
358
394
|
}
|
|
359
395
|
}
|
|
396
|
+
function resetCacheStats() {
|
|
397
|
+
const native = getNativeBridge();
|
|
398
|
+
try {
|
|
399
|
+
if (!native?.resetCacheStats) {
|
|
400
|
+
return;
|
|
401
|
+
}
|
|
402
|
+
native.resetCacheStats();
|
|
403
|
+
} catch {
|
|
404
|
+
}
|
|
405
|
+
}
|
|
360
406
|
var init_cssGeneratorNative = __esm({
|
|
361
407
|
"packages/domain/compiler/src/compiler/cssGeneratorNative.ts"() {
|
|
362
408
|
init_nativeBridge();
|
|
@@ -482,6 +528,16 @@ function minifyCss(css) {
|
|
|
482
528
|
if (!native?.minify_css) throw new Error("minify_css not available");
|
|
483
529
|
return native.minify_css(css);
|
|
484
530
|
}
|
|
531
|
+
function generateCss(ruleJson, minify) {
|
|
532
|
+
const native = getNativeBridge();
|
|
533
|
+
if (!native?.generate_css) throw new Error("generate_css not available");
|
|
534
|
+
return native.generate_css(ruleJson, minify);
|
|
535
|
+
}
|
|
536
|
+
function generateCssBatch(rulesJson, minify) {
|
|
537
|
+
const native = getNativeBridge();
|
|
538
|
+
if (!native?.generate_css_batch) throw new Error("generate_css_batch not available");
|
|
539
|
+
return native.generate_css_batch(rulesJson, minify);
|
|
540
|
+
}
|
|
485
541
|
function compileAnimation(animationName, from, to) {
|
|
486
542
|
const native = getNativeBridge();
|
|
487
543
|
if (!native?.compile_animation) throw new Error("compile_animation not available");
|
|
@@ -919,7 +975,7 @@ function postProcessWithLightning(rawCss) {
|
|
|
919
975
|
}
|
|
920
976
|
return result.css;
|
|
921
977
|
}
|
|
922
|
-
async function runCssPipeline(classes, cssEntryContent, root, minify = true) {
|
|
978
|
+
async function runCssPipeline(classes, cssEntryContent, root, minify = true, minifier = "lightning") {
|
|
923
979
|
const filtered = classes.filter(Boolean);
|
|
924
980
|
const uniqueMap = /* @__PURE__ */ new Map();
|
|
925
981
|
filtered.forEach((cls) => uniqueMap.set(cls, cls));
|
|
@@ -927,7 +983,7 @@ async function runCssPipeline(classes, cssEntryContent, root, minify = true) {
|
|
|
927
983
|
if (unique.length === 0) {
|
|
928
984
|
return { css: "", classes: [], sizeBytes: 0, optimized: false };
|
|
929
985
|
}
|
|
930
|
-
const cacheKey = _getCacheKey(unique, minify, cssEntryContent, root)
|
|
986
|
+
const cacheKey = _getCacheKey(unique, minify, cssEntryContent, root) + `|${minifier}`;
|
|
931
987
|
const cached = _cssCache.get(cacheKey);
|
|
932
988
|
if (cached) {
|
|
933
989
|
_cacheHits++;
|
|
@@ -944,7 +1000,14 @@ async function runCssPipeline(classes, cssEntryContent, root, minify = true) {
|
|
|
944
1000
|
const theme = getThemeConfig();
|
|
945
1001
|
rawCss = await generateCssNative(unique, { theme });
|
|
946
1002
|
usedRustCompiler = true;
|
|
947
|
-
|
|
1003
|
+
let finalCss = rawCss;
|
|
1004
|
+
if (minify) {
|
|
1005
|
+
if (minifier === "fast") {
|
|
1006
|
+
finalCss = minifyCss(rawCss);
|
|
1007
|
+
} else {
|
|
1008
|
+
finalCss = postProcessWithLightning(rawCss);
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
948
1011
|
if (process.env.DEBUG?.includes("compiler")) {
|
|
949
1012
|
console.log(
|
|
950
1013
|
`[Compiler] Generated CSS from ${unique.length} classes (${usedRustCompiler ? "Rust" : "JavaScript"})`,
|
|
@@ -980,6 +1043,7 @@ var init_tailwindEngine = __esm({
|
|
|
980
1043
|
"packages/domain/compiler/src/compiler/tailwindEngine.ts"() {
|
|
981
1044
|
init_nativeBridge();
|
|
982
1045
|
init_cssGeneratorNative();
|
|
1046
|
+
init_cssCompilationNative();
|
|
983
1047
|
module$1.createRequire((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('next.js', document.baseURI).href)));
|
|
984
1048
|
_cssCache = /* @__PURE__ */ new Map();
|
|
985
1049
|
_cacheHits = 0;
|
|
@@ -1013,9 +1077,10 @@ __export(parser_exports, {
|
|
|
1013
1077
|
mergeClassesStatic: () => mergeClassesStatic,
|
|
1014
1078
|
normalizeAndDedupClasses: () => normalizeAndDedupClasses,
|
|
1015
1079
|
normalizeClasses: () => normalizeClasses,
|
|
1080
|
+
parseClass: () => parseClass,
|
|
1016
1081
|
parseClasses: () => parseClasses
|
|
1017
1082
|
});
|
|
1018
|
-
var parseClasses, extractAllClasses, extractClassesFromSource, astExtractClasses, normalizeClasses, mergeClassesStatic, normalizeAndDedupClasses, extractComponentUsage, batchExtractClasses, checkAgainstSafelist, diffClassLists;
|
|
1083
|
+
var parseClasses, parseClass, extractAllClasses, extractClassesFromSource, astExtractClasses, normalizeClasses, mergeClassesStatic, normalizeAndDedupClasses, extractComponentUsage, batchExtractClasses, checkAgainstSafelist, diffClassLists;
|
|
1019
1084
|
var init_parser = __esm({
|
|
1020
1085
|
"packages/domain/compiler/src/parser/index.ts"() {
|
|
1021
1086
|
init_nativeBridge();
|
|
@@ -1026,6 +1091,14 @@ var init_parser = __esm({
|
|
|
1026
1091
|
}
|
|
1027
1092
|
return native.parseClasses(raw) || [];
|
|
1028
1093
|
};
|
|
1094
|
+
parseClass = (input) => {
|
|
1095
|
+
const native = getNativeBridge();
|
|
1096
|
+
if (!native?.parseClass) {
|
|
1097
|
+
throw new Error("FATAL: Native binding 'parseClass' is required but not available.");
|
|
1098
|
+
}
|
|
1099
|
+
const result = native.parseClass(input);
|
|
1100
|
+
return typeof result === "string" ? JSON.parse(result) : result;
|
|
1101
|
+
};
|
|
1029
1102
|
extractAllClasses = (source) => {
|
|
1030
1103
|
const native = getNativeBridge();
|
|
1031
1104
|
if (!native?.extractAllClasses) {
|
|
@@ -1157,6 +1230,35 @@ function mergeCssDeclarationsNative(cssChunks) {
|
|
|
1157
1230
|
if (!native?.mergeCssDeclarations) throw new Error("mergeCssDeclarations not available");
|
|
1158
1231
|
return native.mergeCssDeclarations(cssChunks);
|
|
1159
1232
|
}
|
|
1233
|
+
function getWeek6FeaturesStatus() {
|
|
1234
|
+
const native = getNativeBridge();
|
|
1235
|
+
if (!native?.getWeek6FeaturesStatus) throw new Error("getWeek6FeaturesStatus not available");
|
|
1236
|
+
const resultJson = native.getWeek6FeaturesStatus();
|
|
1237
|
+
return JSON.parse(resultJson);
|
|
1238
|
+
}
|
|
1239
|
+
function getMemoryStatsNative() {
|
|
1240
|
+
const native = getNativeBridge();
|
|
1241
|
+
if (!native?.getMemoryStatsNative) throw new Error("getMemoryStatsNative not available");
|
|
1242
|
+
const resultJson = native.getMemoryStatsNative();
|
|
1243
|
+
return JSON.parse(resultJson);
|
|
1244
|
+
}
|
|
1245
|
+
function getMemoryRecommendationsNative() {
|
|
1246
|
+
const native = getNativeBridge();
|
|
1247
|
+
if (!native?.getMemoryRecommendationsNative) throw new Error("getMemoryRecommendationsNative not available");
|
|
1248
|
+
const resultJson = native.getMemoryRecommendationsNative();
|
|
1249
|
+
return JSON.parse(resultJson);
|
|
1250
|
+
}
|
|
1251
|
+
function estimateOptimalCacheConfigNative(workloadType, expectedEntries) {
|
|
1252
|
+
const native = getNativeBridge();
|
|
1253
|
+
if (!native?.estimateOptimalCacheConfigNative) throw new Error("estimateOptimalCacheConfigNative not available");
|
|
1254
|
+
const resultJson = native.estimateOptimalCacheConfigNative(workloadType, expectedEntries);
|
|
1255
|
+
return JSON.parse(resultJson);
|
|
1256
|
+
}
|
|
1257
|
+
function resetMemoryStats() {
|
|
1258
|
+
const native = getNativeBridge();
|
|
1259
|
+
if (!native?.resetMemoryStats) throw new Error("resetMemoryStats not available");
|
|
1260
|
+
native.resetMemoryStats();
|
|
1261
|
+
}
|
|
1160
1262
|
var init_analyzerNative = __esm({
|
|
1161
1263
|
"packages/domain/compiler/src/analyzer/analyzerNative.ts"() {
|
|
1162
1264
|
init_nativeBridge();
|
|
@@ -1446,6 +1548,52 @@ function cachePriority(mtimeMs, sizeBytes, hitCount) {
|
|
|
1446
1548
|
if (!native?.cache_priority) throw new Error("cache_priority not available");
|
|
1447
1549
|
return native.cache_priority(mtimeMs, sizeBytes, hitCount);
|
|
1448
1550
|
}
|
|
1551
|
+
function getResolverPoolStats() {
|
|
1552
|
+
const native = getNativeBridge();
|
|
1553
|
+
if (!native?.getResolverPoolStats) throw new Error("getResolverPoolStats not available");
|
|
1554
|
+
const statsJson = native.getResolverPoolStats();
|
|
1555
|
+
try {
|
|
1556
|
+
return JSON.parse(statsJson);
|
|
1557
|
+
} catch {
|
|
1558
|
+
return {
|
|
1559
|
+
hits: 0,
|
|
1560
|
+
misses: 0,
|
|
1561
|
+
total: 0,
|
|
1562
|
+
hit_rate: 0,
|
|
1563
|
+
cached_resolvers: 0
|
|
1564
|
+
};
|
|
1565
|
+
}
|
|
1566
|
+
}
|
|
1567
|
+
function clearResolverPool() {
|
|
1568
|
+
const native = getNativeBridge();
|
|
1569
|
+
if (!native?.clearResolverPool) throw new Error("clearResolverPool not available");
|
|
1570
|
+
const resultJson = native.clearResolverPool();
|
|
1571
|
+
try {
|
|
1572
|
+
return JSON.parse(resultJson);
|
|
1573
|
+
} catch {
|
|
1574
|
+
return { status: "error" };
|
|
1575
|
+
}
|
|
1576
|
+
}
|
|
1577
|
+
function resolveColorCached(themeId, color, configJson) {
|
|
1578
|
+
const native = getNativeBridge();
|
|
1579
|
+
if (!native?.resolveColorCached) throw new Error("resolveColorCached not available");
|
|
1580
|
+
return native.resolveColorCached(themeId, color, configJson);
|
|
1581
|
+
}
|
|
1582
|
+
function resolveSpacingCached(themeId, spacing, configJson) {
|
|
1583
|
+
const native = getNativeBridge();
|
|
1584
|
+
if (!native?.resolveSpacingCached) throw new Error("resolveSpacingCached not available");
|
|
1585
|
+
return native.resolveSpacingCached(themeId, spacing, configJson);
|
|
1586
|
+
}
|
|
1587
|
+
function resolveFontSizeCached(themeId, size, configJson) {
|
|
1588
|
+
const native = getNativeBridge();
|
|
1589
|
+
if (!native?.resolveFontSizeCached) throw new Error("resolveFontSizeCached not available");
|
|
1590
|
+
return native.resolveFontSizeCached(themeId, size, configJson);
|
|
1591
|
+
}
|
|
1592
|
+
function resetResolverPoolStats() {
|
|
1593
|
+
const native = getNativeBridge();
|
|
1594
|
+
if (!native?.resetResolverPoolStats) throw new Error("resetResolverPoolStats not available");
|
|
1595
|
+
native.resetResolverPoolStats();
|
|
1596
|
+
}
|
|
1449
1597
|
var init_cacheNative = __esm({
|
|
1450
1598
|
"packages/domain/compiler/src/cache/cacheNative.ts"() {
|
|
1451
1599
|
init_nativeBridge();
|
|
@@ -1890,6 +2038,7 @@ __export(src_exports, {
|
|
|
1890
2038
|
clearCssGenCache: () => clearCssGenCache,
|
|
1891
2039
|
clearParseCache: () => clearParseCache,
|
|
1892
2040
|
clearResolveCache: () => clearResolveCache,
|
|
2041
|
+
clearResolverPool: () => clearResolverPool,
|
|
1893
2042
|
clearThemeCache: () => clearThemeCache,
|
|
1894
2043
|
collectFiles: () => collectFiles,
|
|
1895
2044
|
compileAnimation: () => compileAnimation,
|
|
@@ -1912,6 +2061,7 @@ __export(src_exports, {
|
|
|
1912
2061
|
eliminateDeadCssNative: () => eliminateDeadCssNative,
|
|
1913
2062
|
emitPluginHook: () => emitPluginHook,
|
|
1914
2063
|
estimateOptimalCacheConfig: () => estimateOptimalCacheConfig,
|
|
2064
|
+
estimateOptimalCacheConfigNative: () => estimateOptimalCacheConfigNative,
|
|
1915
2065
|
extractAllClasses: () => extractAllClasses,
|
|
1916
2066
|
extractAndGenerateStateCss: () => extractAndGenerateStateCss,
|
|
1917
2067
|
extractAndGenerateStateCssNative: () => extractAndGenerateStateCssNative,
|
|
@@ -1925,6 +2075,8 @@ __export(src_exports, {
|
|
|
1925
2075
|
fileToRoute: () => fileToRoute,
|
|
1926
2076
|
findDeadVariants: () => findDeadVariants,
|
|
1927
2077
|
generateAtomicCss: () => generateAtomicCss,
|
|
2078
|
+
generateCss: () => generateCss,
|
|
2079
|
+
generateCssBatch: () => generateCssBatch,
|
|
1928
2080
|
generateCssForClasses: () => generateCssForClasses,
|
|
1929
2081
|
generateCssNative: () => generateCssNative,
|
|
1930
2082
|
generateSafelist: () => generateSafelist,
|
|
@@ -1940,10 +2092,14 @@ __export(src_exports, {
|
|
|
1940
2092
|
getCompilerDiagnostics: () => getCompilerDiagnostics,
|
|
1941
2093
|
getContentPaths: () => getContentPaths,
|
|
1942
2094
|
getIncrementalEngine: () => getIncrementalEngine,
|
|
2095
|
+
getMemoryRecommendationsNative: () => getMemoryRecommendationsNative,
|
|
2096
|
+
getMemoryStatsNative: () => getMemoryStatsNative,
|
|
1943
2097
|
getNativeBridge: () => getNativeBridge,
|
|
1944
2098
|
getPluginHooks: () => getPluginHooks,
|
|
2099
|
+
getResolverPoolStats: () => getResolverPoolStats,
|
|
1945
2100
|
getRouteClasses: () => getRouteClasses,
|
|
1946
2101
|
getWatchStats: () => getWatchStats,
|
|
2102
|
+
getWeek6FeaturesStatus: () => getWeek6FeaturesStatus,
|
|
1947
2103
|
hasTwUsage: () => hasTwUsage,
|
|
1948
2104
|
hashContent: () => hashContent,
|
|
1949
2105
|
hoistComponentsNative: () => hoistComponentsNative,
|
|
@@ -1972,6 +2128,7 @@ __export(src_exports, {
|
|
|
1972
2128
|
normalizeClasses: () => normalizeClasses,
|
|
1973
2129
|
optimizeCssNative: () => optimizeCssNative,
|
|
1974
2130
|
parseAtomicClass: () => parseAtomicClass,
|
|
2131
|
+
parseClass: () => parseClass,
|
|
1975
2132
|
parseClasses: () => parseClasses,
|
|
1976
2133
|
pollWatchEvents: () => pollWatchEvents,
|
|
1977
2134
|
processFileChange: () => processFileChange,
|
|
@@ -2023,13 +2180,19 @@ __export(src_exports, {
|
|
|
2023
2180
|
registerPropertyName: () => registerPropertyName,
|
|
2024
2181
|
registerValueName: () => registerValueName,
|
|
2025
2182
|
resetBucketEngine: () => resetBucketEngine,
|
|
2183
|
+
resetCacheStats: () => resetCacheStats,
|
|
2026
2184
|
resetCompilationMetrics: () => resetCompilationMetrics,
|
|
2027
2185
|
resetIncrementalEngine: () => resetIncrementalEngine,
|
|
2186
|
+
resetMemoryStats: () => resetMemoryStats,
|
|
2028
2187
|
resetNativeBridgeCache: () => resetNativeBridgeCache,
|
|
2188
|
+
resetResolverPoolStats: () => resetResolverPoolStats,
|
|
2029
2189
|
resolveCascade: () => resolveCascade,
|
|
2030
2190
|
resolveClassNames: () => resolveClassNames,
|
|
2191
|
+
resolveColorCached: () => resolveColorCached,
|
|
2031
2192
|
resolveConflictGroup: () => resolveConflictGroup,
|
|
2193
|
+
resolveFontSizeCached: () => resolveFontSizeCached,
|
|
2032
2194
|
resolveSimpleVariants: () => resolveSimpleVariants,
|
|
2195
|
+
resolveSpacingCached: () => resolveSpacingCached,
|
|
2033
2196
|
resolveThemeValue: () => resolveThemeValue,
|
|
2034
2197
|
resolveVariants: () => resolveVariants,
|
|
2035
2198
|
reverseLookupProperty: () => reverseLookupProperty,
|
|
@@ -2303,9 +2466,9 @@ var init_src = __esm({
|
|
|
2303
2466
|
if (normalized.includes("/layout.") || normalized.includes("/loading.") || normalized.includes("/error.")) {
|
|
2304
2467
|
return "__global";
|
|
2305
2468
|
}
|
|
2306
|
-
const pageMatch = normalized.match(
|
|
2469
|
+
const pageMatch = normalized.match(/(?:^|\/)app\/(.+?)\/page\.[tj]sx?$/);
|
|
2307
2470
|
if (pageMatch) return `/${pageMatch[1]}`;
|
|
2308
|
-
const rootPage = normalized.match(
|
|
2471
|
+
const rootPage = normalized.match(/(?:^|\/)app\/page\.[tj]sx?$/);
|
|
2309
2472
|
if (rootPage) return "/";
|
|
2310
2473
|
return null;
|
|
2311
2474
|
};
|
|
@@ -2469,6 +2632,7 @@ __export(internal_exports, {
|
|
|
2469
2632
|
clearCssGenCache: () => clearCssGenCache,
|
|
2470
2633
|
clearParseCache: () => clearParseCache,
|
|
2471
2634
|
clearResolveCache: () => clearResolveCache,
|
|
2635
|
+
clearResolverPool: () => clearResolverPool,
|
|
2472
2636
|
clearThemeCache: () => clearThemeCache,
|
|
2473
2637
|
collectFiles: () => collectFiles,
|
|
2474
2638
|
compileAnimation: () => compileAnimation,
|
|
@@ -2491,6 +2655,7 @@ __export(internal_exports, {
|
|
|
2491
2655
|
eliminateDeadCssNative: () => eliminateDeadCssNative,
|
|
2492
2656
|
emitPluginHook: () => emitPluginHook,
|
|
2493
2657
|
estimateOptimalCacheConfig: () => estimateOptimalCacheConfig,
|
|
2658
|
+
estimateOptimalCacheConfigNative: () => estimateOptimalCacheConfigNative,
|
|
2494
2659
|
extractAllClasses: () => extractAllClasses,
|
|
2495
2660
|
extractAndGenerateStateCss: () => extractAndGenerateStateCss,
|
|
2496
2661
|
extractAndGenerateStateCssNative: () => extractAndGenerateStateCssNative,
|
|
@@ -2504,6 +2669,8 @@ __export(internal_exports, {
|
|
|
2504
2669
|
fileToRoute: () => fileToRoute,
|
|
2505
2670
|
findDeadVariants: () => findDeadVariants,
|
|
2506
2671
|
generateAtomicCss: () => generateAtomicCss,
|
|
2672
|
+
generateCss: () => generateCss,
|
|
2673
|
+
generateCssBatch: () => generateCssBatch,
|
|
2507
2674
|
generateCssForClasses: () => generateCssForClasses,
|
|
2508
2675
|
generateCssNative: () => generateCssNative,
|
|
2509
2676
|
generateSafelist: () => generateSafelist,
|
|
@@ -2519,10 +2686,14 @@ __export(internal_exports, {
|
|
|
2519
2686
|
getCompilerDiagnostics: () => getCompilerDiagnostics,
|
|
2520
2687
|
getContentPaths: () => getContentPaths,
|
|
2521
2688
|
getIncrementalEngine: () => getIncrementalEngine,
|
|
2689
|
+
getMemoryRecommendationsNative: () => getMemoryRecommendationsNative,
|
|
2690
|
+
getMemoryStatsNative: () => getMemoryStatsNative,
|
|
2522
2691
|
getNativeBridge: () => getNativeBridge,
|
|
2523
2692
|
getPluginHooks: () => getPluginHooks,
|
|
2693
|
+
getResolverPoolStats: () => getResolverPoolStats,
|
|
2524
2694
|
getRouteClasses: () => getRouteClasses,
|
|
2525
2695
|
getWatchStats: () => getWatchStats,
|
|
2696
|
+
getWeek6FeaturesStatus: () => getWeek6FeaturesStatus,
|
|
2526
2697
|
hasTwUsage: () => hasTwUsage,
|
|
2527
2698
|
hashContent: () => hashContent,
|
|
2528
2699
|
hoistComponentsNative: () => hoistComponentsNative,
|
|
@@ -2551,6 +2722,7 @@ __export(internal_exports, {
|
|
|
2551
2722
|
normalizeClasses: () => normalizeClasses,
|
|
2552
2723
|
optimizeCssNative: () => optimizeCssNative,
|
|
2553
2724
|
parseAtomicClass: () => parseAtomicClass,
|
|
2725
|
+
parseClass: () => parseClass,
|
|
2554
2726
|
parseClasses: () => parseClasses,
|
|
2555
2727
|
pollWatchEvents: () => pollWatchEvents,
|
|
2556
2728
|
processFileChange: () => processFileChange,
|
|
@@ -2602,12 +2774,18 @@ __export(internal_exports, {
|
|
|
2602
2774
|
registerPropertyName: () => registerPropertyName,
|
|
2603
2775
|
registerValueName: () => registerValueName,
|
|
2604
2776
|
resetBucketEngine: () => resetBucketEngine,
|
|
2777
|
+
resetCacheStats: () => resetCacheStats,
|
|
2605
2778
|
resetCompilationMetrics: () => resetCompilationMetrics,
|
|
2606
2779
|
resetIncrementalEngine: () => resetIncrementalEngine,
|
|
2780
|
+
resetMemoryStats: () => resetMemoryStats,
|
|
2781
|
+
resetResolverPoolStats: () => resetResolverPoolStats,
|
|
2607
2782
|
resolveCascade: () => resolveCascade,
|
|
2608
2783
|
resolveClassNames: () => resolveClassNames,
|
|
2784
|
+
resolveColorCached: () => resolveColorCached,
|
|
2609
2785
|
resolveConflictGroup: () => resolveConflictGroup,
|
|
2786
|
+
resolveFontSizeCached: () => resolveFontSizeCached,
|
|
2610
2787
|
resolveSimpleVariants: () => resolveSimpleVariants,
|
|
2788
|
+
resolveSpacingCached: () => resolveSpacingCached,
|
|
2611
2789
|
resolveThemeValue: () => resolveThemeValue,
|
|
2612
2790
|
resolveVariants: () => resolveVariants,
|
|
2613
2791
|
reverseLookupProperty: () => reverseLookupProperty,
|
|
@@ -2853,7 +3031,11 @@ function extractStaticStateCss(srcDir, options = {}) {
|
|
|
2853
3031
|
return result;
|
|
2854
3032
|
}
|
|
2855
3033
|
function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
|
|
2856
|
-
const result = extractStaticStateCss(srcDir,
|
|
3034
|
+
const result = extractStaticStateCss(srcDir, {
|
|
3035
|
+
verbose: options.verbose,
|
|
3036
|
+
resolvedCss: options.resolvedCss || ""
|
|
3037
|
+
// ← ensure always passed
|
|
3038
|
+
});
|
|
2857
3039
|
const twClassesDir = path10__namespace.default.join(path10__namespace.default.dirname(safelistPath), "tw-classes");
|
|
2858
3040
|
fs9__namespace.default.mkdirSync(twClassesDir, { recursive: true });
|
|
2859
3041
|
const stateFilePath = path10__namespace.default.join(twClassesDir, TW_STATE_STATIC_FILENAME);
|