@weapp-tailwindcss/postcss 1.0.9 → 1.0.10-alpha.1

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
@@ -642,8 +642,13 @@ function commonChunkPreflight(node, options) {
642
642
  function isAtMediaHover(atRule) {
643
643
  return /media\(\s*hover\s*:\s*hover\s*\)/.test(atRule.name) || atRule.name === "media" && /\(\s*hover\s*:\s*hover\s*\)/.test(atRule.params);
644
644
  }
645
- function isTailwindcssV4ModerCheck(atRule) {
646
- return atRule.name === "supports" && atRule.params === "((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))";
645
+ function isTailwindcssV4ModernCheck(atRule) {
646
+ return atRule.name === "supports" && [
647
+ /-webkit-hyphens\s*:\s*none/,
648
+ /margin-trim\s*:\s*inline/,
649
+ /-moz-orient\s*:\s*inline/,
650
+ /color\s*:\s*rgb\(\s*from\s+red\s+r\s+g\s+b\s*\)/
651
+ ].every((regex) => regex.test(atRule.params));
647
652
  }
648
653
  var postcssWeappTailwindcssPrePlugin = (options) => {
649
654
  const opts = _shared.defu.call(void 0, options, { isMainChunk: true });
@@ -659,7 +664,7 @@ var postcssWeappTailwindcssPrePlugin = (options) => {
659
664
  } else {
660
665
  atRule.remove();
661
666
  }
662
- } else if (isTailwindcssV4ModerCheck(atRule)) {
667
+ } else if (isTailwindcssV4ModernCheck(atRule)) {
663
668
  if (_optionalChain([atRule, 'access', _28 => _28.first, 'optionalAccess', _29 => _29.type]) === "atrule" && atRule.first.name === "layer") {
664
669
  atRule.replaceWith(atRule.first.nodes);
665
670
  }
package/dist/index.mjs CHANGED
@@ -642,8 +642,13 @@ function commonChunkPreflight(node, options) {
642
642
  function isAtMediaHover(atRule) {
643
643
  return /media\(\s*hover\s*:\s*hover\s*\)/.test(atRule.name) || atRule.name === "media" && /\(\s*hover\s*:\s*hover\s*\)/.test(atRule.params);
644
644
  }
645
- function isTailwindcssV4ModerCheck(atRule) {
646
- return atRule.name === "supports" && atRule.params === "((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b))))";
645
+ function isTailwindcssV4ModernCheck(atRule) {
646
+ return atRule.name === "supports" && [
647
+ /-webkit-hyphens\s*:\s*none/,
648
+ /margin-trim\s*:\s*inline/,
649
+ /-moz-orient\s*:\s*inline/,
650
+ /color\s*:\s*rgb\(\s*from\s+red\s+r\s+g\s+b\s*\)/
651
+ ].every((regex) => regex.test(atRule.params));
647
652
  }
648
653
  var postcssWeappTailwindcssPrePlugin = (options) => {
649
654
  const opts = defu2(options, { isMainChunk: true });
@@ -659,7 +664,7 @@ var postcssWeappTailwindcssPrePlugin = (options) => {
659
664
  } else {
660
665
  atRule.remove();
661
666
  }
662
- } else if (isTailwindcssV4ModerCheck(atRule)) {
667
+ } else if (isTailwindcssV4ModernCheck(atRule)) {
663
668
  if (atRule.first?.type === "atrule" && atRule.first.name === "layer") {
664
669
  atRule.replaceWith(atRule.first.nodes);
665
670
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weapp-tailwindcss/postcss",
3
- "version": "1.0.9",
3
+ "version": "1.0.10-alpha.1",
4
4
  "description": "@weapp-tailwindcss/postcss",
5
5
  "author": "ice breaker <1324318532@qq.com>",
6
6
  "license": "MIT",