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