tailwindcss 3.3.1 → 3.3.3

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.
Files changed (148) hide show
  1. package/CHANGELOG.md +47 -6
  2. package/lib/cli/build/deps.js +17 -9
  3. package/lib/cli/build/index.js +10 -8
  4. package/lib/cli/build/plugin.js +29 -27
  5. package/lib/cli/build/utils.js +18 -8
  6. package/lib/cli/build/watching.js +12 -10
  7. package/lib/cli/help/index.js +6 -4
  8. package/lib/cli/index.js +4 -4
  9. package/lib/cli/init/index.js +8 -6
  10. package/lib/cli-peer-dependencies.js +12 -4
  11. package/lib/cli.js +1 -1
  12. package/lib/corePluginList.js +3 -1
  13. package/lib/corePlugins.js +52 -42
  14. package/lib/css/preflight.css +9 -0
  15. package/lib/featureFlags.js +14 -9
  16. package/lib/index.js +1 -5
  17. package/lib/lib/cacheInvalidation.js +7 -5
  18. package/lib/lib/collapseAdjacentRules.js +3 -1
  19. package/lib/lib/collapseDuplicateDeclarations.js +10 -8
  20. package/lib/lib/content.js +18 -14
  21. package/lib/lib/defaultExtractor.js +6 -4
  22. package/lib/lib/detectNesting.js +3 -1
  23. package/lib/lib/evaluateTailwindFunctions.js +20 -16
  24. package/lib/lib/expandApplyAtRules.js +37 -40
  25. package/lib/lib/expandTailwindAtRules.js +19 -17
  26. package/lib/lib/findAtConfigPath.js +6 -4
  27. package/lib/lib/generateRules.js +52 -38
  28. package/lib/lib/getModuleDependencies.js +10 -8
  29. package/lib/lib/load-config.js +5 -3
  30. package/lib/lib/normalizeTailwindDirectives.js +5 -3
  31. package/lib/lib/offsets.js +7 -5
  32. package/lib/lib/partitionApplyAtRules.js +3 -1
  33. package/lib/lib/regex.js +21 -7
  34. package/lib/lib/remap-bitfield.js +3 -1
  35. package/lib/lib/resolveDefaultsAtRules.js +24 -20
  36. package/lib/lib/setupContextUtils.js +91 -63
  37. package/lib/lib/setupTrackingContext.js +27 -24
  38. package/lib/lib/sharedState.js +28 -24
  39. package/lib/lib/substituteScreenAtRules.js +5 -3
  40. package/lib/oxide/cli/build/deps.js +16 -8
  41. package/lib/oxide/cli/build/index.js +6 -4
  42. package/lib/oxide/cli/build/plugin.js +19 -17
  43. package/lib/oxide/cli/build/utils.js +18 -8
  44. package/lib/oxide/cli/build/watching.js +10 -8
  45. package/lib/oxide/cli/help/index.js +6 -4
  46. package/lib/oxide/cli/index.js +4 -4
  47. package/lib/oxide/cli/init/index.js +6 -4
  48. package/lib/plugin.js +9 -9
  49. package/lib/postcss-plugins/nesting/index.js +3 -1
  50. package/lib/postcss-plugins/nesting/plugin.js +8 -6
  51. package/lib/processTailwindFeatures.js +16 -14
  52. package/lib/public/colors.js +5 -3
  53. package/lib/public/create-plugin.js +5 -3
  54. package/lib/public/default-config.js +6 -4
  55. package/lib/public/default-theme.js +6 -4
  56. package/lib/public/load-config.js +5 -3
  57. package/lib/public/resolve-config.js +6 -4
  58. package/lib/util/applyImportantSelector.js +9 -10
  59. package/lib/util/bigSign.js +3 -1
  60. package/lib/util/buildMediaQuery.js +3 -1
  61. package/lib/util/cloneDeep.js +3 -1
  62. package/lib/util/cloneNodes.js +3 -1
  63. package/lib/util/color.js +10 -6
  64. package/lib/util/colorNames.js +752 -0
  65. package/lib/util/configurePlugins.js +3 -1
  66. package/lib/util/createPlugin.js +3 -1
  67. package/lib/util/createUtilityPlugin.js +5 -3
  68. package/lib/util/dataTypes.js +59 -21
  69. package/lib/util/defaults.js +6 -4
  70. package/lib/util/escapeClassName.js +7 -5
  71. package/lib/util/escapeCommas.js +3 -1
  72. package/lib/util/flattenColorPalette.js +3 -1
  73. package/lib/util/formatVariantSelector.js +30 -110
  74. package/lib/util/getAllConfigs.js +6 -4
  75. package/lib/util/hashConfig.js +6 -4
  76. package/lib/util/isKeyframeRule.js +3 -1
  77. package/lib/util/isPlainObject.js +3 -1
  78. package/lib/util/isSyntacticallyValidPropertyValue.js +3 -1
  79. package/lib/util/log.js +8 -4
  80. package/lib/util/nameClass.js +12 -6
  81. package/lib/util/negateValue.js +3 -1
  82. package/lib/util/normalizeConfig.js +7 -5
  83. package/lib/util/normalizeScreens.js +12 -4
  84. package/lib/util/parseAnimationValue.js +3 -1
  85. package/lib/util/parseBoxShadowValue.js +6 -2
  86. package/lib/util/parseDependency.js +3 -1
  87. package/lib/util/parseGlob.js +6 -4
  88. package/lib/util/parseObjectStyles.js +9 -7
  89. package/lib/util/pluginUtils.js +30 -18
  90. package/lib/util/prefixSelector.js +6 -4
  91. package/lib/util/pseudoElements.js +209 -0
  92. package/lib/util/removeAlphaVariables.js +3 -1
  93. package/lib/util/resolveConfig.js +10 -8
  94. package/lib/util/resolveConfigPath.js +9 -5
  95. package/lib/util/responsive.js +6 -4
  96. package/lib/util/splitAtTopLevelOnly.js +3 -1
  97. package/lib/util/tap.js +3 -1
  98. package/lib/util/toColorValue.js +3 -1
  99. package/lib/util/toPath.js +3 -1
  100. package/lib/util/transformThemeValue.js +6 -4
  101. package/lib/util/validateConfig.js +5 -3
  102. package/lib/util/validateFormalSyntax.js +3 -1
  103. package/lib/util/withAlphaVariable.js +6 -2
  104. package/lib/value-parser/LICENSE +22 -0
  105. package/lib/value-parser/README.md +3 -0
  106. package/lib/value-parser/index.d.js +2 -0
  107. package/lib/value-parser/index.js +22 -0
  108. package/lib/value-parser/parse.js +259 -0
  109. package/lib/value-parser/stringify.js +38 -0
  110. package/lib/value-parser/unit.js +86 -0
  111. package/lib/value-parser/walk.js +16 -0
  112. package/package.json +30 -35
  113. package/peers/index.js +65828 -48819
  114. package/src/cli/build/plugin.js +3 -3
  115. package/src/cli.js +1 -1
  116. package/src/corePlugins.js +29 -24
  117. package/src/css/preflight.css +9 -0
  118. package/src/featureFlags.js +2 -3
  119. package/src/index.js +1 -5
  120. package/src/lib/defaultExtractor.js +1 -1
  121. package/src/lib/evaluateTailwindFunctions.js +4 -1
  122. package/src/lib/expandApplyAtRules.js +2 -8
  123. package/src/lib/expandTailwindAtRules.js +12 -10
  124. package/src/lib/generateRules.js +15 -8
  125. package/src/lib/setupContextUtils.js +18 -5
  126. package/src/lib/setupTrackingContext.js +2 -4
  127. package/src/lib/sharedState.js +0 -15
  128. package/src/oxide/cli/build/plugin.ts +1 -1
  129. package/src/plugin.js +4 -4
  130. package/src/processTailwindFeatures.js +3 -2
  131. package/src/util/applyImportantSelector.js +2 -5
  132. package/src/util/color.js +1 -1
  133. package/src/util/colorNames.js +150 -0
  134. package/src/util/dataTypes.js +17 -6
  135. package/src/util/formatVariantSelector.js +4 -126
  136. package/src/util/pluginUtils.js +1 -5
  137. package/src/util/prefixSelector.js +1 -0
  138. package/src/util/pseudoElements.js +167 -0
  139. package/src/value-parser/LICENSE +22 -0
  140. package/src/value-parser/README.md +3 -0
  141. package/src/value-parser/index.d.ts +177 -0
  142. package/src/value-parser/index.js +28 -0
  143. package/src/value-parser/parse.js +303 -0
  144. package/src/value-parser/stringify.js +41 -0
  145. package/src/value-parser/unit.js +118 -0
  146. package/src/value-parser/walk.js +18 -0
  147. package/stubs/config.full.js +1 -0
  148. package/types/generated/default-theme.d.ts +1 -0
@@ -9,30 +9,34 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- variantPlugins: ()=>variantPlugins,
13
- corePlugins: ()=>corePlugins
12
+ variantPlugins: function() {
13
+ return variantPlugins;
14
+ },
15
+ corePlugins: function() {
16
+ return corePlugins;
17
+ }
14
18
  });
15
- const _fs = /*#__PURE__*/ _interopRequireDefault(require("fs"));
16
- const _path = /*#__PURE__*/ _interopRequireWildcard(require("path"));
17
- const _postcss = /*#__PURE__*/ _interopRequireDefault(require("postcss"));
18
- const _sharedState = require("./lib/sharedState");
19
- const _createUtilityPlugin = /*#__PURE__*/ _interopRequireDefault(require("./util/createUtilityPlugin"));
20
- const _buildMediaQuery = /*#__PURE__*/ _interopRequireDefault(require("./util/buildMediaQuery"));
21
- const _escapeClassName = /*#__PURE__*/ _interopRequireDefault(require("./util/escapeClassName"));
22
- const _parseAnimationValue = /*#__PURE__*/ _interopRequireDefault(require("./util/parseAnimationValue"));
23
- const _flattenColorPalette = /*#__PURE__*/ _interopRequireDefault(require("./util/flattenColorPalette"));
24
- const _withAlphaVariable = /*#__PURE__*/ _interopRequireWildcard(require("./util/withAlphaVariable"));
25
- const _toColorValue = /*#__PURE__*/ _interopRequireDefault(require("./util/toColorValue"));
26
- const _isPlainObject = /*#__PURE__*/ _interopRequireDefault(require("./util/isPlainObject"));
27
- const _transformThemeValue = /*#__PURE__*/ _interopRequireDefault(require("./util/transformThemeValue"));
28
- const _packageJson = require("../package.json");
29
- const _log = /*#__PURE__*/ _interopRequireDefault(require("./util/log"));
19
+ const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
20
+ const _path = /*#__PURE__*/ _interop_require_wildcard(require("path"));
21
+ const _postcss = /*#__PURE__*/ _interop_require_default(require("postcss"));
22
+ const _createUtilityPlugin = /*#__PURE__*/ _interop_require_default(require("./util/createUtilityPlugin"));
23
+ const _buildMediaQuery = /*#__PURE__*/ _interop_require_default(require("./util/buildMediaQuery"));
24
+ const _escapeClassName = /*#__PURE__*/ _interop_require_default(require("./util/escapeClassName"));
25
+ const _parseAnimationValue = /*#__PURE__*/ _interop_require_default(require("./util/parseAnimationValue"));
26
+ const _flattenColorPalette = /*#__PURE__*/ _interop_require_default(require("./util/flattenColorPalette"));
27
+ const _withAlphaVariable = /*#__PURE__*/ _interop_require_wildcard(require("./util/withAlphaVariable"));
28
+ const _toColorValue = /*#__PURE__*/ _interop_require_default(require("./util/toColorValue"));
29
+ const _isPlainObject = /*#__PURE__*/ _interop_require_default(require("./util/isPlainObject"));
30
+ const _transformThemeValue = /*#__PURE__*/ _interop_require_default(require("./util/transformThemeValue"));
31
+ const _packagejson = require("../package.json");
32
+ const _log = /*#__PURE__*/ _interop_require_default(require("./util/log"));
30
33
  const _normalizeScreens = require("./util/normalizeScreens");
31
34
  const _parseBoxShadowValue = require("./util/parseBoxShadowValue");
32
35
  const _removeAlphaVariables = require("./util/removeAlphaVariables");
33
36
  const _featureFlags = require("./featureFlags");
34
37
  const _dataTypes = require("./util/dataTypes");
35
- function _interopRequireDefault(obj) {
38
+ const _setupContextUtils = require("./lib/setupContextUtils");
39
+ function _interop_require_default(obj) {
36
40
  return obj && obj.__esModule ? obj : {
37
41
  default: obj
38
42
  };
@@ -45,7 +49,7 @@ function _getRequireWildcardCache(nodeInterop) {
45
49
  return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
46
50
  })(nodeInterop);
47
51
  }
48
- function _interopRequireWildcard(obj, nodeInterop) {
52
+ function _interop_require_wildcard(obj, nodeInterop) {
49
53
  if (!nodeInterop && obj && obj.__esModule) {
50
54
  return obj;
51
55
  }
@@ -132,7 +136,7 @@ let variantPlugins = {
132
136
  return "&::after";
133
137
  });
134
138
  },
135
- pseudoClassVariants: ({ addVariant , matchVariant , config })=>{
139
+ pseudoClassVariants: ({ addVariant , matchVariant , config , prefix })=>{
136
140
  let pseudoVariants = [
137
141
  // Positional
138
142
  [
@@ -213,17 +217,17 @@ let variantPlugins = {
213
217
  }
214
218
  let variants = {
215
219
  group: (_, { modifier })=>modifier ? [
216
- `:merge(.group\\/${(0, _escapeClassName.default)(modifier)})`,
220
+ `:merge(${prefix(".group")}\\/${(0, _escapeClassName.default)(modifier)})`,
217
221
  " &"
218
222
  ] : [
219
- `:merge(.group)`,
223
+ `:merge(${prefix(".group")})`,
220
224
  " &"
221
225
  ],
222
226
  peer: (_, { modifier })=>modifier ? [
223
- `:merge(.peer\\/${(0, _escapeClassName.default)(modifier)})`,
227
+ `:merge(${prefix(".peer")}\\/${(0, _escapeClassName.default)(modifier)})`,
224
228
  " ~ &"
225
229
  ] : [
226
- `:merge(.peer)`,
230
+ `:merge(${prefix(".peer")})`,
227
231
  " ~ &"
228
232
  ]
229
233
  };
@@ -252,7 +256,10 @@ let variantPlugins = {
252
256
  // result.replace(/&(\S+)?/g, (_, pseudo = '') => a + pseudo + b)
253
257
  return result.slice(0, start) + a + result.slice(start + 1, end) + b + result.slice(end);
254
258
  }, {
255
- values: Object.fromEntries(pseudoVariants)
259
+ values: Object.fromEntries(pseudoVariants),
260
+ [_setupContextUtils.INTERNAL_FEATURES]: {
261
+ respectPrefix: false
262
+ }
256
263
  });
257
264
  }
258
265
  },
@@ -378,11 +385,11 @@ let variantPlugins = {
378
385
  });
379
386
  // screens and min-* are sorted together when they can be
380
387
  let id = "min-screens";
381
- for (let screen1 of screens){
382
- addVariant(screen1.name, `@media ${(0, _buildMediaQuery.default)(screen1)}`, {
388
+ for (let screen of screens){
389
+ addVariant(screen.name, `@media ${(0, _buildMediaQuery.default)(screen)}`, {
383
390
  id,
384
391
  sort: areSimpleScreens && screensUseConsistentUnits ? minSort : undefined,
385
- value: screen1
392
+ value: screen
386
393
  });
387
394
  }
388
395
  matchVariant("min", buildScreenVariant("min"), {
@@ -484,7 +491,7 @@ let corePlugins = {
484
491
  let preflightStyles = _postcss.default.parse(_fs.default.readFileSync(_path.join(__dirname, "./css/preflight.css"), "utf8"));
485
492
  addBase([
486
493
  _postcss.default.comment({
487
- text: `! tailwindcss v${_packageJson.version} | MIT License | https://tailwindcss.com`
494
+ text: `! tailwindcss v${_packagejson.version} | MIT License | https://tailwindcss.com`
488
495
  }),
489
496
  ...preflightStyles.nodes
490
497
  ]);
@@ -1280,7 +1287,7 @@ let corePlugins = {
1280
1287
  });
1281
1288
  },
1282
1289
  animation: ({ matchUtilities , theme , config })=>{
1283
- let prefixName = (name)=>`${config("prefix")}${(0, _escapeClassName.default)(name)}`;
1290
+ let prefixName = (name)=>(0, _escapeClassName.default)(config("prefix") + name);
1284
1291
  var _theme;
1285
1292
  let keyframes = Object.fromEntries(Object.entries((_theme = theme("keyframes")) !== null && _theme !== void 0 ? _theme : {}).map(([key, value])=>{
1286
1293
  return [
@@ -1936,7 +1943,7 @@ let corePlugins = {
1936
1943
  matchUtilities({
1937
1944
  "space-x": (value)=>{
1938
1945
  value = value === "0" ? "0px" : value;
1939
- if (_sharedState.env.OXIDE) {
1946
+ if (false) {
1940
1947
  return {
1941
1948
  "& > :not([hidden]) ~ :not([hidden])": {
1942
1949
  "--tw-space-x-reverse": "0",
@@ -1980,7 +1987,7 @@ let corePlugins = {
1980
1987
  matchUtilities({
1981
1988
  "divide-x": (value)=>{
1982
1989
  value = value === "0" ? "0px" : value;
1983
- if (_sharedState.env.OXIDE) {
1990
+ if (false) {
1984
1991
  return {
1985
1992
  "& > :not([hidden]) ~ :not([hidden])": {
1986
1993
  "@defaults border-width": {},
@@ -2732,7 +2739,12 @@ let corePlugins = {
2732
2739
  function transparentTo(value) {
2733
2740
  return (0, _withAlphaVariable.withAlphaValue)(value, 0, "rgb(255 255 255 / 0)");
2734
2741
  }
2735
- return function({ matchUtilities , theme }) {
2742
+ return function({ matchUtilities , theme , addDefaults }) {
2743
+ addDefaults("gradient-color-stops", {
2744
+ "--tw-gradient-from-position": " ",
2745
+ "--tw-gradient-via-position": " ",
2746
+ "--tw-gradient-to-position": " "
2747
+ });
2736
2748
  let options = {
2737
2749
  values: (0, _flattenColorPalette.default)(theme("gradientColorStops")),
2738
2750
  type: [
@@ -2751,10 +2763,9 @@ let corePlugins = {
2751
2763
  from: (value)=>{
2752
2764
  let transparentToValue = transparentTo(value);
2753
2765
  return {
2754
- "--tw-gradient-from": `${(0, _toColorValue.default)(value, "from")} var(--tw-gradient-from-position)`,
2755
- "--tw-gradient-from-position": " ",
2756
- "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-from-position)`,
2757
- "--tw-gradient-to-position": " ",
2766
+ "@defaults gradient-color-stops": {},
2767
+ "--tw-gradient-from": `${(0, _toColorValue.default)(value)} var(--tw-gradient-from-position)`,
2768
+ "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-to-position)`,
2758
2769
  "--tw-gradient-stops": `var(--tw-gradient-from), var(--tw-gradient-to)`
2759
2770
  };
2760
2771
  }
@@ -2770,10 +2781,9 @@ let corePlugins = {
2770
2781
  via: (value)=>{
2771
2782
  let transparentToValue = transparentTo(value);
2772
2783
  return {
2773
- "--tw-gradient-via-position": " ",
2784
+ "@defaults gradient-color-stops": {},
2774
2785
  "--tw-gradient-to": `${transparentToValue} var(--tw-gradient-to-position)`,
2775
- "--tw-gradient-to-position": " ",
2776
- "--tw-gradient-stops": `var(--tw-gradient-from), ${(0, _toColorValue.default)(value, "via")} var(--tw-gradient-via-position), var(--tw-gradient-to)`
2786
+ "--tw-gradient-stops": `var(--tw-gradient-from), ${(0, _toColorValue.default)(value)} var(--tw-gradient-via-position), var(--tw-gradient-to)`
2777
2787
  };
2778
2788
  }
2779
2789
  }, options);
@@ -2786,8 +2796,8 @@ let corePlugins = {
2786
2796
  }, positionOptions);
2787
2797
  matchUtilities({
2788
2798
  to: (value)=>({
2789
- "--tw-gradient-to": `${(0, _toColorValue.default)(value, "to")} var(--tw-gradient-to-position)`,
2790
- "--tw-gradient-to-position": " "
2799
+ "@defaults gradient-color-stops": {},
2800
+ "--tw-gradient-to": `${(0, _toColorValue.default)(value)} var(--tw-gradient-to-position)`
2791
2801
  })
2792
2802
  }, options);
2793
2803
  matchUtilities({
@@ -163,6 +163,8 @@ optgroup,
163
163
  select,
164
164
  textarea {
165
165
  font-family: inherit; /* 1 */
166
+ font-feature-settings: inherit; /* 1 */
167
+ font-variation-settings: inherit; /* 1 */
166
168
  font-size: 100%; /* 1 */
167
169
  font-weight: inherit; /* 1 */
168
170
  line-height: inherit; /* 1 */
@@ -300,6 +302,13 @@ menu {
300
302
  padding: 0;
301
303
  }
302
304
 
305
+ /*
306
+ Reset default styling for dialogs.
307
+ */
308
+ dialog {
309
+ padding: 0;
310
+ }
311
+
303
312
  /*
304
313
  Prevent resizing textareas horizontally by default.
305
314
  */
@@ -9,14 +9,19 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- flagEnabled: ()=>flagEnabled,
13
- issueFlagNotices: ()=>issueFlagNotices,
14
- default: ()=>_default
12
+ flagEnabled: function() {
13
+ return flagEnabled;
14
+ },
15
+ issueFlagNotices: function() {
16
+ return issueFlagNotices;
17
+ },
18
+ default: function() {
19
+ return _default;
20
+ }
15
21
  });
16
- const _picocolors = /*#__PURE__*/ _interopRequireDefault(require("picocolors"));
17
- const _log = /*#__PURE__*/ _interopRequireDefault(require("./util/log"));
18
- const _sharedState = require("./lib/sharedState");
19
- function _interopRequireDefault(obj) {
22
+ const _picocolors = /*#__PURE__*/ _interop_require_default(require("picocolors"));
23
+ const _log = /*#__PURE__*/ _interop_require_default(require("./util/log"));
24
+ function _interop_require_default(obj) {
20
25
  return obj && obj.__esModule ? obj : {
21
26
  default: obj
22
27
  };
@@ -25,10 +30,10 @@ let defaults = {
25
30
  optimizeUniversalDefaults: false,
26
31
  generalizedModifiers: true,
27
32
  get disableColorOpacityUtilitiesByDefault () {
28
- return _sharedState.env.OXIDE;
33
+ return false;
29
34
  },
30
35
  get relativeContentPathsByDefault () {
31
- return _sharedState.env.OXIDE;
36
+ return false;
32
37
  }
33
38
  };
34
39
  let featureFlags = {
package/lib/index.js CHANGED
@@ -1,6 +1,2 @@
1
1
  "use strict";
2
- if (process.env.OXIDE) {
3
- module.exports = require("./oxide/postcss-plugin");
4
- } else {
5
- module.exports = require("./plugin");
6
- }
2
+ module.exports = require("./plugin");
@@ -4,11 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "hasContentChanged", {
6
6
  enumerable: true,
7
- get: ()=>hasContentChanged
7
+ get: function() {
8
+ return hasContentChanged;
9
+ }
8
10
  });
9
- const _crypto = /*#__PURE__*/ _interopRequireDefault(require("crypto"));
10
- const _sharedState = /*#__PURE__*/ _interopRequireWildcard(require("./sharedState"));
11
- function _interopRequireDefault(obj) {
11
+ const _crypto = /*#__PURE__*/ _interop_require_default(require("crypto"));
12
+ const _sharedState = /*#__PURE__*/ _interop_require_wildcard(require("./sharedState"));
13
+ function _interop_require_default(obj) {
12
14
  return obj && obj.__esModule ? obj : {
13
15
  default: obj
14
16
  };
@@ -21,7 +23,7 @@ function _getRequireWildcardCache(nodeInterop) {
21
23
  return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
22
24
  })(nodeInterop);
23
25
  }
24
- function _interopRequireWildcard(obj, nodeInterop) {
26
+ function _interop_require_wildcard(obj, nodeInterop) {
25
27
  if (!nodeInterop && obj && obj.__esModule) {
26
28
  return obj;
27
29
  }
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
- get: ()=>collapseAdjacentRules
7
+ get: function() {
8
+ return collapseAdjacentRules;
9
+ }
8
10
  });
9
11
  let comparisonMap = {
10
12
  atrule: [
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
- get: ()=>collapseDuplicateDeclarations
7
+ get: function() {
8
+ return collapseDuplicateDeclarations;
9
+ }
8
10
  });
9
11
  function collapseDuplicateDeclarations() {
10
12
  return (root)=>{
@@ -51,21 +53,21 @@ function collapseDuplicateDeclarations() {
51
53
  // with the same unit but the last one in the list.
52
54
  for (let declarations of byProperty.values()){
53
55
  let byUnit = new Map();
54
- for (let decl1 of declarations){
55
- let unit = resolveUnit(decl1.value);
56
+ for (let decl of declarations){
57
+ let unit = resolveUnit(decl.value);
56
58
  if (unit === null) {
57
59
  continue;
58
60
  }
59
61
  if (!byUnit.has(unit)) {
60
62
  byUnit.set(unit, new Set());
61
63
  }
62
- byUnit.get(unit).add(decl1);
64
+ byUnit.get(unit).add(decl);
63
65
  }
64
- for (let declarations1 of byUnit.values()){
66
+ for (let declarations of byUnit.values()){
65
67
  // Get all but the last one
66
- let removableDeclarations = Array.from(declarations1).slice(0, -1);
67
- for (let decl2 of removableDeclarations){
68
- decl2.remove();
68
+ let removableDeclarations = Array.from(declarations).slice(0, -1);
69
+ for (let decl of removableDeclarations){
70
+ decl.remove();
69
71
  }
70
72
  }
71
73
  }
@@ -10,17 +10,21 @@ function _export(target, all) {
10
10
  });
11
11
  }
12
12
  _export(exports, {
13
- parseCandidateFiles: ()=>parseCandidateFiles,
14
- resolvedChangedContent: ()=>resolvedChangedContent
13
+ parseCandidateFiles: function() {
14
+ return parseCandidateFiles;
15
+ },
16
+ resolvedChangedContent: function() {
17
+ return resolvedChangedContent;
18
+ }
15
19
  });
16
- const _fs = /*#__PURE__*/ _interopRequireDefault(require("fs"));
17
- const _path = /*#__PURE__*/ _interopRequireDefault(require("path"));
18
- const _isGlob = /*#__PURE__*/ _interopRequireDefault(require("is-glob"));
19
- const _fastGlob = /*#__PURE__*/ _interopRequireDefault(require("fast-glob"));
20
- const _normalizePath = /*#__PURE__*/ _interopRequireDefault(require("normalize-path"));
20
+ const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
21
+ const _path = /*#__PURE__*/ _interop_require_default(require("path"));
22
+ const _isglob = /*#__PURE__*/ _interop_require_default(require("is-glob"));
23
+ const _fastglob = /*#__PURE__*/ _interop_require_default(require("fast-glob"));
24
+ const _normalizepath = /*#__PURE__*/ _interop_require_default(require("normalize-path"));
21
25
  const _parseGlob = require("../util/parseGlob");
22
26
  const _sharedState = require("./sharedState");
23
- function _interopRequireDefault(obj) {
27
+ function _interop_require_default(obj) {
24
28
  return obj && obj.__esModule ? obj : {
25
29
  default: obj
26
30
  };
@@ -29,9 +33,9 @@ function parseCandidateFiles(context, tailwindConfig) {
29
33
  let files = tailwindConfig.content.files;
30
34
  // Normalize the file globs
31
35
  files = files.filter((filePath)=>typeof filePath === "string");
32
- files = files.map(_normalizePath.default);
36
+ files = files.map(_normalizepath.default);
33
37
  // Split into included and excluded globs
34
- let tasks = _fastGlob.default.generateTasks(files);
38
+ let tasks = _fastglob.default.generateTasks(files);
35
39
  /** @type {ContentPath[]} */ let included = [];
36
40
  /** @type {ContentPath[]} */ let excluded = [];
37
41
  for (const task of tasks){
@@ -63,7 +67,7 @@ function parseCandidateFiles(context, tailwindConfig) {
63
67
  pattern: filePath,
64
68
  glob: null
65
69
  };
66
- if ((0, _isGlob.default)(filePath)) {
70
+ if ((0, _isglob.default)(filePath)) {
67
71
  Object.assign(contentPath, (0, _parseGlob.parseGlob)(filePath));
68
72
  }
69
73
  return contentPath;
@@ -77,10 +81,10 @@ function parseCandidateFiles(context, tailwindConfig) {
77
81
  // Afaik, this technically shouldn't be needed but there's probably
78
82
  // some internal, direct path matching with a normalized path in
79
83
  // a package which can't handle mixed directory separators
80
- let base = (0, _normalizePath.default)(contentPath.base);
84
+ let base = (0, _normalizepath.default)(contentPath.base);
81
85
  // If the user's file path contains any special characters (like parens) for instance fast-glob
82
86
  // is like "OOOH SHINY" and treats them as such. So we have to escape the base path to fix this
83
- base = _fastGlob.default.escapePath(base);
87
+ base = _fastglob.default.escapePath(base);
84
88
  contentPath.pattern = contentPath.glob ? `${base}/${contentPath.glob}` : base;
85
89
  contentPath.pattern = contentPath.ignore ? `!${contentPath.pattern}` : contentPath.pattern;
86
90
  return contentPath;
@@ -158,7 +162,7 @@ function resolvedChangedContent(context, candidateFiles, fileModifiedMap) {
158
162
  let mTimesToCommit = new Map();
159
163
  let changedFiles = new Set();
160
164
  _sharedState.env.DEBUG && console.time("Finding changed files");
161
- let files = _fastGlob.default.sync(paths, {
165
+ let files = _fastglob.default.sync(paths, {
162
166
  absolute: true
163
167
  });
164
168
  for (let file of files){
@@ -4,10 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "defaultExtractor", {
6
6
  enumerable: true,
7
- get: ()=>defaultExtractor
7
+ get: function() {
8
+ return defaultExtractor;
9
+ }
8
10
  });
9
11
  const _featureFlags = require("../featureFlags");
10
- const _regex = /*#__PURE__*/ _interopRequireWildcard(require("./regex"));
12
+ const _regex = /*#__PURE__*/ _interop_require_wildcard(require("./regex"));
11
13
  function _getRequireWildcardCache(nodeInterop) {
12
14
  if (typeof WeakMap !== "function") return null;
13
15
  var cacheBabelInterop = new WeakMap();
@@ -16,7 +18,7 @@ function _getRequireWildcardCache(nodeInterop) {
16
18
  return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
17
19
  })(nodeInterop);
18
20
  }
19
- function _interopRequireWildcard(obj, nodeInterop) {
21
+ function _interop_require_wildcard(obj, nodeInterop) {
20
22
  if (!nodeInterop && obj && obj.__esModule) {
21
23
  return obj;
22
24
  }
@@ -77,7 +79,7 @@ function* buildRegExps(context) {
77
79
  // This is a targeted fix to continue to allow theme()
78
80
  // with square brackets to work in arbitrary properties
79
81
  // while fixing a problem with the regex matching too much
80
- /\[[^\s:'"`]+:[^\s]+?\[[^\s]+?\][^\s]+?\]/,
82
+ /\[[^\s:'"`]+:[^\s]+?\[[^\s]+\][^\s]+?\]/,
81
83
  // Utilities
82
84
  _regex.pattern([
83
85
  // Utility Name / Group Name
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
- get: ()=>_default
7
+ get: function() {
8
+ return _default;
9
+ }
8
10
  });
9
11
  function isRoot(node) {
10
12
  return node.type === "root";
@@ -4,19 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
- get: ()=>_default
7
+ get: function() {
8
+ return _default;
9
+ }
8
10
  });
9
- const _dlv = /*#__PURE__*/ _interopRequireDefault(require("dlv"));
10
- const _didyoumean = /*#__PURE__*/ _interopRequireDefault(require("didyoumean"));
11
- const _transformThemeValue = /*#__PURE__*/ _interopRequireDefault(require("../util/transformThemeValue"));
12
- const _postcssValueParser = /*#__PURE__*/ _interopRequireDefault(require("postcss-value-parser"));
11
+ const _dlv = /*#__PURE__*/ _interop_require_default(require("dlv"));
12
+ const _didyoumean = /*#__PURE__*/ _interop_require_default(require("didyoumean"));
13
+ const _transformThemeValue = /*#__PURE__*/ _interop_require_default(require("../util/transformThemeValue"));
14
+ const _index = /*#__PURE__*/ _interop_require_default(require("../value-parser/index"));
13
15
  const _normalizeScreens = require("../util/normalizeScreens");
14
- const _buildMediaQuery = /*#__PURE__*/ _interopRequireDefault(require("../util/buildMediaQuery"));
16
+ const _buildMediaQuery = /*#__PURE__*/ _interop_require_default(require("../util/buildMediaQuery"));
15
17
  const _toPath = require("../util/toPath");
16
18
  const _withAlphaVariable = require("../util/withAlphaVariable");
17
19
  const _pluginUtils = require("../util/pluginUtils");
18
- const _log = /*#__PURE__*/ _interopRequireDefault(require("../util/log"));
19
- function _interopRequireDefault(obj) {
20
+ const _log = /*#__PURE__*/ _interop_require_default(require("../util/log"));
21
+ function _interop_require_default(obj) {
20
22
  return obj && obj.__esModule ? obj : {
21
23
  default: obj
22
24
  };
@@ -86,22 +88,22 @@ function validatePath(config, path, defaultValue, themeOpts = {}) {
86
88
  };
87
89
  }
88
90
  if (!(typeof value === "string" || typeof value === "number" || typeof value === "function" || value instanceof String || value instanceof Number || Array.isArray(value))) {
89
- let error1 = `'${pathString}' was found but does not resolve to a string.`;
91
+ let error = `'${pathString}' was found but does not resolve to a string.`;
90
92
  if (isObject(value)) {
91
- let validKeys1 = Object.keys(value).filter((key)=>validatePath(config, [
93
+ let validKeys = Object.keys(value).filter((key)=>validatePath(config, [
92
94
  ...pathSegments,
93
95
  key
94
96
  ]).isValid);
95
- if (validKeys1.length) {
96
- error1 += ` Did you mean something like '${pathToString([
97
+ if (validKeys.length) {
98
+ error += ` Did you mean something like '${pathToString([
97
99
  ...pathSegments,
98
- validKeys1[0]
100
+ validKeys[0]
99
101
  ])}'?`;
100
102
  }
101
103
  }
102
104
  return {
103
105
  isValid: false,
104
- error: error1
106
+ error
105
107
  };
106
108
  }
107
109
  const [themeSection] = pathSegments;
@@ -119,7 +121,7 @@ function extractArgs(node, vNodes, functions) {
119
121
  if (vNode.type === "div" && vNode.value === ",") {
120
122
  args.push("");
121
123
  } else {
122
- args[args.length - 1] += _postcssValueParser.default.stringify(vNode);
124
+ args[args.length - 1] += _index.default.stringify(vNode);
123
125
  }
124
126
  }
125
127
  return args;
@@ -133,7 +135,9 @@ function resolveVNode(node, vNode, functions) {
133
135
  return vNode;
134
136
  }
135
137
  function resolveFunctions(node, input, functions) {
136
- return (0, _postcssValueParser.default)(input).walk((vNode)=>{
138
+ let hasAnyFn = Object.keys(functions).some((fn)=>input.includes(`${fn}(`));
139
+ if (!hasAnyFn) return input;
140
+ return (0, _index.default)(input).walk((vNode)=>{
137
141
  resolveVNode(node, vNode, functions);
138
142
  }).toString();
139
143
  }