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