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.mjs CHANGED
@@ -3509,7 +3509,13 @@ function extractStaticStateCss(srcDir, options = {}) {
3509
3509
  cssBlocks.push(`/* ${componentName} */`);
3510
3510
  for (const rule of rules) {
3511
3511
  cssBlocks.push(`/* state: ${rule.stateName} */`);
3512
- cssBlocks.push(rule.cssRule);
3512
+ const isUnresolved = rule.declarations.trim().length > 0 && !rule.declarations.includes(":");
3513
+ if (isUnresolved) {
3514
+ const applyClasses = rule.declarations.trim().split(/\s+/).join(" ");
3515
+ cssBlocks.push(`${rule.selector} { @apply ${applyClasses}; }`);
3516
+ } else {
3517
+ cssBlocks.push(rule.cssRule);
3518
+ }
3513
3519
  }
3514
3520
  cssBlocks.push("");
3515
3521
  }
@@ -3526,7 +3532,11 @@ function extractStaticStateCss(srcDir, options = {}) {
3526
3532
  return result;
3527
3533
  }
3528
3534
  function appendStaticStateCssToSafelist(srcDir, safelistPath, options = {}) {
3529
- const result = extractStaticStateCss(srcDir, options);
3535
+ const result = extractStaticStateCss(srcDir, {
3536
+ verbose: options.verbose,
3537
+ resolvedCss: options.resolvedCss || ""
3538
+ // ← ensure always passed
3539
+ });
3530
3540
  const twClassesDir = path9__default.join(path9__default.dirname(safelistPath), "tw-classes");
3531
3541
  fs3__default.mkdirSync(twClassesDir, { recursive: true });
3532
3542
  const stateFilePath = path9__default.join(twClassesDir, TW_STATE_STATIC_FILENAME);