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/index.js CHANGED
@@ -3535,7 +3535,13 @@ function extractStaticStateCss(srcDir, options = {}) {
3535
3535
  cssBlocks.push(`/* ${componentName} */`);
3536
3536
  for (const rule of rules) {
3537
3537
  cssBlocks.push(`/* state: ${rule.stateName} */`);
3538
- cssBlocks.push(rule.cssRule);
3538
+ const isUnresolved = rule.declarations.trim().length > 0 && !rule.declarations.includes(":");
3539
+ if (isUnresolved) {
3540
+ const applyClasses = rule.declarations.trim().split(/\s+/).join(" ");
3541
+ cssBlocks.push(`${rule.selector} { @apply ${applyClasses}; }`);
3542
+ } else {
3543
+ cssBlocks.push(rule.cssRule);
3544
+ }
3539
3545
  }
3540
3546
  cssBlocks.push("");
3541
3547
  }
@@ -3552,7 +3558,11 @@ function extractStaticStateCss(srcDir, options = {}) {
3552
3558
  return result;
3553
3559
  }
3554
3560
  function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
3555
- const result = extractStaticStateCss(srcDir, options);
3561
+ const result = extractStaticStateCss(srcDir, {
3562
+ verbose: options.verbose,
3563
+ resolvedCss: options.resolvedCss || ""
3564
+ // ← ensure always passed
3565
+ });
3556
3566
  const twClassesDir = path9__namespace.default.join(path9__namespace.default.dirname(safelistPath), "tw-classes");
3557
3567
  fs3__namespace.default.mkdirSync(twClassesDir, { recursive: true });
3558
3568
  const stateFilePath = path9__namespace.default.join(twClassesDir, TW_STATE_STATIC_FILENAME);