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

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,9 @@ 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
+ var TAILWIND_V4_MODERN_REGEX = /^\(\(-webkit-hyphens:\s*none\)\s+and\s+\(not\s+\(margin-trim:\s*inline\)\)\)\s+or\s+\(\(-moz-orient:\s*inline\)\s+and\s+\(not\s+\(color:\s*rgb\(from\s+red\s+r\s+g\s+b\)\)\)\)$/;
646
+ function isTailwindcssV4ModernCheck(atRule) {
647
+ return atRule.name === "supports" && TAILWIND_V4_MODERN_REGEX.test(atRule.params);
647
648
  }
648
649
  var postcssWeappTailwindcssPrePlugin = (options) => {
649
650
  const opts = _shared.defu.call(void 0, options, { isMainChunk: true });
@@ -659,7 +660,7 @@ var postcssWeappTailwindcssPrePlugin = (options) => {
659
660
  } else {
660
661
  atRule.remove();
661
662
  }
662
- } else if (isTailwindcssV4ModerCheck(atRule)) {
663
+ } else if (isTailwindcssV4ModernCheck(atRule)) {
663
664
  if (_optionalChain([atRule, 'access', _28 => _28.first, 'optionalAccess', _29 => _29.type]) === "atrule" && atRule.first.name === "layer") {
664
665
  atRule.replaceWith(atRule.first.nodes);
665
666
  }
package/dist/index.mjs CHANGED
@@ -642,8 +642,9 @@ 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
+ var TAILWIND_V4_MODERN_REGEX = /^\(\(-webkit-hyphens:\s*none\)\s+and\s+\(not\s+\(margin-trim:\s*inline\)\)\)\s+or\s+\(\(-moz-orient:\s*inline\)\s+and\s+\(not\s+\(color:\s*rgb\(from\s+red\s+r\s+g\s+b\)\)\)\)$/;
646
+ function isTailwindcssV4ModernCheck(atRule) {
647
+ return atRule.name === "supports" && TAILWIND_V4_MODERN_REGEX.test(atRule.params);
647
648
  }
648
649
  var postcssWeappTailwindcssPrePlugin = (options) => {
649
650
  const opts = defu2(options, { isMainChunk: true });
@@ -659,7 +660,7 @@ var postcssWeappTailwindcssPrePlugin = (options) => {
659
660
  } else {
660
661
  atRule.remove();
661
662
  }
662
- } else if (isTailwindcssV4ModerCheck(atRule)) {
663
+ } else if (isTailwindcssV4ModernCheck(atRule)) {
663
664
  if (atRule.first?.type === "atrule" && atRule.first.name === "layer") {
664
665
  atRule.replaceWith(atRule.first.nodes);
665
666
  }
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.0",
4
4
  "description": "@weapp-tailwindcss/postcss",
5
5
  "author": "ice breaker <1324318532@qq.com>",
6
6
  "license": "MIT",