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.js CHANGED
@@ -3014,7 +3014,13 @@ function extractStaticStateCss(srcDir, options = {}) {
3014
3014
  cssBlocks.push(`/* ${componentName} */`);
3015
3015
  for (const rule of rules) {
3016
3016
  cssBlocks.push(`/* state: ${rule.stateName} */`);
3017
- cssBlocks.push(rule.cssRule);
3017
+ const isUnresolved = rule.declarations.trim().length > 0 && !rule.declarations.includes(":");
3018
+ if (isUnresolved) {
3019
+ const applyClasses = rule.declarations.trim().split(/\s+/).join(" ");
3020
+ cssBlocks.push(`${rule.selector} { @apply ${applyClasses}; }`);
3021
+ } else {
3022
+ cssBlocks.push(rule.cssRule);
3023
+ }
3018
3024
  }
3019
3025
  cssBlocks.push("");
3020
3026
  }
@@ -3031,7 +3037,11 @@ function extractStaticStateCss(srcDir, options = {}) {
3031
3037
  return result;
3032
3038
  }
3033
3039
  function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
3034
- const result = extractStaticStateCss(srcDir, options);
3040
+ const result = extractStaticStateCss(srcDir, {
3041
+ verbose: options.verbose,
3042
+ resolvedCss: options.resolvedCss || ""
3043
+ // ← ensure always passed
3044
+ });
3035
3045
  const twClassesDir = path10__namespace.default.join(path10__namespace.default.dirname(safelistPath), "tw-classes");
3036
3046
  fs9__namespace.default.mkdirSync(twClassesDir, { recursive: true });
3037
3047
  const stateFilePath = path10__namespace.default.join(twClassesDir, TW_STATE_STATIC_FILENAME);