tailwind-styled-v4 5.0.20 → 5.0.22

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/vite.mjs CHANGED
@@ -3035,7 +3035,13 @@ function extractStaticStateCss(srcDir, options = {}) {
3035
3035
  cssBlocks.push(`/* ${componentName} */`);
3036
3036
  for (const rule of rules) {
3037
3037
  cssBlocks.push(`/* state: ${rule.stateName} */`);
3038
- cssBlocks.push(rule.cssRule);
3038
+ const isUnresolved = rule.declarations.trim().length > 0 && !rule.declarations.includes(":");
3039
+ if (isUnresolved) {
3040
+ const applyClasses = rule.declarations.trim().split(/\s+/).join(" ");
3041
+ cssBlocks.push(`${rule.selector} { @apply ${applyClasses}; }`);
3042
+ } else {
3043
+ cssBlocks.push(rule.cssRule);
3044
+ }
3039
3045
  }
3040
3046
  cssBlocks.push("");
3041
3047
  }
@@ -3052,7 +3058,11 @@ function extractStaticStateCss(srcDir, options = {}) {
3052
3058
  return result;
3053
3059
  }
3054
3060
  function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
3055
- const result = extractStaticStateCss(srcDir, options);
3061
+ const result = extractStaticStateCss(srcDir, {
3062
+ verbose: options.verbose,
3063
+ resolvedCss: options.resolvedCss || ""
3064
+ // ← ensure always passed
3065
+ });
3056
3066
  const twClassesDir = path9__default.join(path9__default.dirname(safelistPath), "tw-classes");
3057
3067
  fs13__default.mkdirSync(twClassesDir, { recursive: true });
3058
3068
  const stateFilePath = path9__default.join(twClassesDir, TW_STATE_STATIC_FILENAME);