tailwindcss 3.1.5 → 3.1.8

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 (85) hide show
  1. package/CHANGELOG.md +36 -8
  2. package/README.md +6 -3
  3. package/lib/cli-peer-dependencies.js +12 -4
  4. package/lib/cli.js +78 -75
  5. package/lib/constants.js +19 -12
  6. package/lib/corePluginList.js +5 -3
  7. package/lib/corePlugins.js +194 -187
  8. package/lib/featureFlags.js +14 -7
  9. package/lib/index.js +9 -6
  10. package/lib/lib/cacheInvalidation.js +18 -15
  11. package/lib/lib/collapseAdjacentRules.js +14 -11
  12. package/lib/lib/collapseDuplicateDeclarations.js +11 -8
  13. package/lib/lib/defaultExtractor.js +38 -35
  14. package/lib/lib/detectNesting.js +4 -1
  15. package/lib/lib/evaluateTailwindFunctions.js +75 -44
  16. package/lib/lib/expandApplyAtRules.js +50 -42
  17. package/lib/lib/expandTailwindAtRules.js +153 -150
  18. package/lib/lib/generateRules.js +81 -73
  19. package/lib/lib/getModuleDependencies.js +21 -18
  20. package/lib/lib/normalizeTailwindDirectives.js +10 -7
  21. package/lib/lib/partitionApplyAtRules.js +14 -11
  22. package/lib/lib/regex.js +15 -7
  23. package/lib/lib/resolveDefaultsAtRules.js +92 -85
  24. package/lib/lib/setupContextUtils.js +109 -97
  25. package/lib/lib/setupTrackingContext.js +82 -75
  26. package/lib/lib/sharedState.js +15 -8
  27. package/lib/lib/substituteScreenAtRules.js +8 -5
  28. package/lib/postcss-plugins/nesting/index.js +7 -5
  29. package/lib/postcss-plugins/nesting/plugin.js +7 -4
  30. package/lib/processTailwindFeatures.js +34 -31
  31. package/lib/public/colors.js +6 -4
  32. package/lib/public/create-plugin.js +6 -4
  33. package/lib/public/default-config.js +7 -5
  34. package/lib/public/default-theme.js +7 -5
  35. package/lib/public/resolve-config.js +13 -10
  36. package/lib/util/bigSign.js +4 -1
  37. package/lib/util/buildMediaQuery.js +5 -2
  38. package/lib/util/cloneDeep.js +4 -1
  39. package/lib/util/cloneNodes.js +9 -2
  40. package/lib/util/color.js +11 -3
  41. package/lib/util/configurePlugins.js +4 -1
  42. package/lib/util/createPlugin.js +5 -3
  43. package/lib/util/createUtilityPlugin.js +13 -10
  44. package/lib/util/dataTypes.js +27 -19
  45. package/lib/util/defaults.js +4 -1
  46. package/lib/util/escapeClassName.js +12 -9
  47. package/lib/util/escapeCommas.js +4 -1
  48. package/lib/util/flattenColorPalette.js +5 -3
  49. package/lib/util/formatVariantSelector.js +21 -14
  50. package/lib/util/getAllConfigs.js +12 -9
  51. package/lib/util/hashConfig.js +10 -7
  52. package/lib/util/isKeyframeRule.js +4 -1
  53. package/lib/util/isPlainObject.js +4 -1
  54. package/lib/util/isValidArbitraryValue.js +33 -24
  55. package/lib/util/log.js +12 -5
  56. package/lib/util/nameClass.js +16 -8
  57. package/lib/util/negateValue.js +4 -1
  58. package/lib/util/normalizeConfig.js +26 -23
  59. package/lib/util/normalizeScreens.js +17 -2
  60. package/lib/util/parseAnimationValue.js +42 -39
  61. package/lib/util/parseBoxShadowValue.js +12 -4
  62. package/lib/util/parseDependency.js +35 -32
  63. package/lib/util/parseObjectStyles.js +14 -11
  64. package/lib/util/pluginUtils.js +28 -20
  65. package/lib/util/prefixSelector.js +6 -3
  66. package/lib/util/removeAlphaVariables.js +13 -2
  67. package/lib/util/resolveConfig.js +56 -53
  68. package/lib/util/resolveConfigPath.js +20 -17
  69. package/lib/util/responsive.js +12 -9
  70. package/lib/util/splitAtTopLevelOnly.js +16 -13
  71. package/lib/util/tap.js +4 -1
  72. package/lib/util/toColorValue.js +4 -1
  73. package/lib/util/toPath.js +18 -2
  74. package/lib/util/transformThemeValue.js +10 -7
  75. package/lib/util/validateConfig.js +5 -2
  76. package/lib/util/withAlphaVariable.js +30 -22
  77. package/package.json +10 -10
  78. package/peers/index.js +950 -825
  79. package/resolveConfig.d.ts +3 -0
  80. package/src/lib/evaluateTailwindFunctions.js +41 -15
  81. package/src/lib/expandApplyAtRules.js +6 -0
  82. package/src/lib/generateRules.js +6 -5
  83. package/src/lib/setupContextUtils.js +4 -2
  84. package/src/util/cloneNodes.js +5 -1
  85. package/src/util/resolveConfig.js +1 -1
@@ -2,9 +2,34 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.default = withAlphaVariable;
6
- exports.withAlphaValue = withAlphaValue;
7
- var _color = require("./color");
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ withAlphaValue: ()=>withAlphaValue,
13
+ default: ()=>withAlphaVariable
14
+ });
15
+ const _color = require("./color");
16
+ function withAlphaValue(color, alphaValue, defaultValue) {
17
+ if (typeof color === "function") {
18
+ return color({
19
+ opacityValue: alphaValue
20
+ });
21
+ }
22
+ let parsed = (0, _color.parseColor)(color, {
23
+ loose: true
24
+ });
25
+ if (parsed === null) {
26
+ return defaultValue;
27
+ }
28
+ return (0, _color.formatColor)({
29
+ ...parsed,
30
+ alpha: alphaValue
31
+ });
32
+ }
8
33
  function withAlphaVariable({ color , property , variable }) {
9
34
  let properties = [].concat(property);
10
35
  if (typeof color === "function") {
@@ -21,7 +46,7 @@ function withAlphaVariable({ color , property , variable }) {
21
46
  }))
22
47
  };
23
48
  }
24
- const parsed = (0, _color).parseColor(color);
49
+ const parsed = (0, _color.parseColor)(color);
25
50
  if (parsed === null) {
26
51
  return Object.fromEntries(properties.map((p)=>[
27
52
  p,
@@ -40,7 +65,7 @@ function withAlphaVariable({ color , property , variable }) {
40
65
  ...Object.fromEntries(properties.map((p)=>{
41
66
  return [
42
67
  p,
43
- (0, _color).formatColor({
68
+ (0, _color.formatColor)({
44
69
  ...parsed,
45
70
  alpha: `var(${variable})`
46
71
  })
@@ -48,20 +73,3 @@ function withAlphaVariable({ color , property , variable }) {
48
73
  }))
49
74
  };
50
75
  }
51
- function withAlphaValue(color, alphaValue, defaultValue) {
52
- if (typeof color === "function") {
53
- return color({
54
- opacityValue: alphaValue
55
- });
56
- }
57
- let parsed = (0, _color).parseColor(color, {
58
- loose: true
59
- });
60
- if (parsed === null) {
61
- return defaultValue;
62
- }
63
- return (0, _color).formatColor({
64
- ...parsed,
65
- alpha: alphaValue
66
- });
67
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tailwindcss",
3
- "version": "3.1.5",
3
+ "version": "3.1.8",
4
4
  "description": "A utility-first CSS framework for rapidly building custom user interfaces.",
5
5
  "license": "MIT",
6
6
  "main": "lib/index.js",
@@ -43,19 +43,19 @@
43
43
  ],
44
44
  "devDependencies": {
45
45
  "@swc/cli": "^0.1.57",
46
- "@swc/core": "^1.2.196",
47
- "@swc/jest": "^0.2.21",
46
+ "@swc/core": "^1.2.218",
47
+ "@swc/jest": "^0.2.22",
48
48
  "@swc/register": "^0.1.10",
49
- "autoprefixer": "^10.4.7",
49
+ "autoprefixer": "^10.4.8",
50
50
  "cssnano": "^5.1.12",
51
51
  "esbuild": "^0.14.48",
52
- "eslint": "^8.18.0",
52
+ "eslint": "^8.20.0",
53
53
  "eslint-config-prettier": "^8.5.0",
54
54
  "eslint-plugin-prettier": "^4.2.1",
55
- "jest": "^28.1.2",
56
- "jest-diff": "^28.1.1",
55
+ "jest": "^28.1.3",
56
+ "jest-diff": "^28.1.3",
57
57
  "prettier": "^2.7.1",
58
- "prettier-plugin-tailwindcss": "^0.1.11",
58
+ "prettier-plugin-tailwindcss": "^0.1.13",
59
59
  "rimraf": "^3.0.0",
60
60
  "source-map-js": "^1.0.2"
61
61
  },
@@ -72,14 +72,14 @@
72
72
  "fast-glob": "^3.2.11",
73
73
  "glob-parent": "^6.0.2",
74
74
  "is-glob": "^4.0.3",
75
- "lilconfig": "^2.0.5",
75
+ "lilconfig": "^2.0.6",
76
76
  "normalize-path": "^3.0.0",
77
77
  "object-hash": "^3.0.0",
78
78
  "picocolors": "^1.0.0",
79
79
  "postcss": "^8.4.14",
80
80
  "postcss-import": "^14.1.0",
81
81
  "postcss-js": "^4.0.0",
82
- "postcss-load-config": "^4.0.1",
82
+ "postcss-load-config": "^3.1.4",
83
83
  "postcss-nested": "5.0.6",
84
84
  "postcss-selector-parser": "^6.0.10",
85
85
  "postcss-value-parser": "^4.2.0",