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/next.mjs CHANGED
@@ -2992,7 +2992,13 @@ function extractStaticStateCss(srcDir, options = {}) {
2992
2992
  cssBlocks.push(`/* ${componentName} */`);
2993
2993
  for (const rule of rules) {
2994
2994
  cssBlocks.push(`/* state: ${rule.stateName} */`);
2995
- cssBlocks.push(rule.cssRule);
2995
+ const isUnresolved = rule.declarations.trim().length > 0 && !rule.declarations.includes(":");
2996
+ if (isUnresolved) {
2997
+ const applyClasses = rule.declarations.trim().split(/\s+/).join(" ");
2998
+ cssBlocks.push(`${rule.selector} { @apply ${applyClasses}; }`);
2999
+ } else {
3000
+ cssBlocks.push(rule.cssRule);
3001
+ }
2996
3002
  }
2997
3003
  cssBlocks.push("");
2998
3004
  }
@@ -3009,7 +3015,11 @@ function extractStaticStateCss(srcDir, options = {}) {
3009
3015
  return result;
3010
3016
  }
3011
3017
  function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
3012
- const result = extractStaticStateCss(srcDir, options);
3018
+ const result = extractStaticStateCss(srcDir, {
3019
+ verbose: options.verbose,
3020
+ resolvedCss: options.resolvedCss || ""
3021
+ // ← ensure always passed
3022
+ });
3013
3023
  const twClassesDir = path10__default.join(path10__default.dirname(safelistPath), "tw-classes");
3014
3024
  fs9__default.mkdirSync(twClassesDir, { recursive: true });
3015
3025
  const stateFilePath = path10__default.join(twClassesDir, TW_STATE_STATIC_FILENAME);