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.js CHANGED
@@ -3057,7 +3057,13 @@ function extractStaticStateCss(srcDir, options = {}) {
3057
3057
  cssBlocks.push(`/* ${componentName} */`);
3058
3058
  for (const rule of rules) {
3059
3059
  cssBlocks.push(`/* state: ${rule.stateName} */`);
3060
- cssBlocks.push(rule.cssRule);
3060
+ const isUnresolved = rule.declarations.trim().length > 0 && !rule.declarations.includes(":");
3061
+ if (isUnresolved) {
3062
+ const applyClasses = rule.declarations.trim().split(/\s+/).join(" ");
3063
+ cssBlocks.push(`${rule.selector} { @apply ${applyClasses}; }`);
3064
+ } else {
3065
+ cssBlocks.push(rule.cssRule);
3066
+ }
3061
3067
  }
3062
3068
  cssBlocks.push("");
3063
3069
  }
@@ -3074,7 +3080,11 @@ function extractStaticStateCss(srcDir, options = {}) {
3074
3080
  return result;
3075
3081
  }
3076
3082
  function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
3077
- const result = extractStaticStateCss(srcDir, options);
3083
+ const result = extractStaticStateCss(srcDir, {
3084
+ verbose: options.verbose,
3085
+ resolvedCss: options.resolvedCss || ""
3086
+ // ← ensure always passed
3087
+ });
3078
3088
  const twClassesDir = path9__namespace.default.join(path9__namespace.default.dirname(safelistPath), "tw-classes");
3079
3089
  fs13__namespace.default.mkdirSync(twClassesDir, { recursive: true });
3080
3090
  const stateFilePath = path9__namespace.default.join(twClassesDir, TW_STATE_STATIC_FILENAME);