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.
- package/CHANGELOG.md +36 -8
- package/README.md +6 -3
- package/lib/cli-peer-dependencies.js +12 -4
- package/lib/cli.js +78 -75
- package/lib/constants.js +19 -12
- package/lib/corePluginList.js +5 -3
- package/lib/corePlugins.js +194 -187
- package/lib/featureFlags.js +14 -7
- package/lib/index.js +9 -6
- package/lib/lib/cacheInvalidation.js +18 -15
- package/lib/lib/collapseAdjacentRules.js +14 -11
- package/lib/lib/collapseDuplicateDeclarations.js +11 -8
- package/lib/lib/defaultExtractor.js +38 -35
- package/lib/lib/detectNesting.js +4 -1
- package/lib/lib/evaluateTailwindFunctions.js +75 -44
- package/lib/lib/expandApplyAtRules.js +50 -42
- package/lib/lib/expandTailwindAtRules.js +153 -150
- package/lib/lib/generateRules.js +81 -73
- package/lib/lib/getModuleDependencies.js +21 -18
- package/lib/lib/normalizeTailwindDirectives.js +10 -7
- package/lib/lib/partitionApplyAtRules.js +14 -11
- package/lib/lib/regex.js +15 -7
- package/lib/lib/resolveDefaultsAtRules.js +92 -85
- package/lib/lib/setupContextUtils.js +109 -97
- package/lib/lib/setupTrackingContext.js +82 -75
- package/lib/lib/sharedState.js +15 -8
- package/lib/lib/substituteScreenAtRules.js +8 -5
- package/lib/postcss-plugins/nesting/index.js +7 -5
- package/lib/postcss-plugins/nesting/plugin.js +7 -4
- package/lib/processTailwindFeatures.js +34 -31
- package/lib/public/colors.js +6 -4
- package/lib/public/create-plugin.js +6 -4
- package/lib/public/default-config.js +7 -5
- package/lib/public/default-theme.js +7 -5
- package/lib/public/resolve-config.js +13 -10
- package/lib/util/bigSign.js +4 -1
- package/lib/util/buildMediaQuery.js +5 -2
- package/lib/util/cloneDeep.js +4 -1
- package/lib/util/cloneNodes.js +9 -2
- package/lib/util/color.js +11 -3
- package/lib/util/configurePlugins.js +4 -1
- package/lib/util/createPlugin.js +5 -3
- package/lib/util/createUtilityPlugin.js +13 -10
- package/lib/util/dataTypes.js +27 -19
- package/lib/util/defaults.js +4 -1
- package/lib/util/escapeClassName.js +12 -9
- package/lib/util/escapeCommas.js +4 -1
- package/lib/util/flattenColorPalette.js +5 -3
- package/lib/util/formatVariantSelector.js +21 -14
- package/lib/util/getAllConfigs.js +12 -9
- package/lib/util/hashConfig.js +10 -7
- package/lib/util/isKeyframeRule.js +4 -1
- package/lib/util/isPlainObject.js +4 -1
- package/lib/util/isValidArbitraryValue.js +33 -24
- package/lib/util/log.js +12 -5
- package/lib/util/nameClass.js +16 -8
- package/lib/util/negateValue.js +4 -1
- package/lib/util/normalizeConfig.js +26 -23
- package/lib/util/normalizeScreens.js +17 -2
- package/lib/util/parseAnimationValue.js +42 -39
- package/lib/util/parseBoxShadowValue.js +12 -4
- package/lib/util/parseDependency.js +35 -32
- package/lib/util/parseObjectStyles.js +14 -11
- package/lib/util/pluginUtils.js +28 -20
- package/lib/util/prefixSelector.js +6 -3
- package/lib/util/removeAlphaVariables.js +13 -2
- package/lib/util/resolveConfig.js +56 -53
- package/lib/util/resolveConfigPath.js +20 -17
- package/lib/util/responsive.js +12 -9
- package/lib/util/splitAtTopLevelOnly.js +16 -13
- package/lib/util/tap.js +4 -1
- package/lib/util/toColorValue.js +4 -1
- package/lib/util/toPath.js +18 -2
- package/lib/util/transformThemeValue.js +10 -7
- package/lib/util/validateConfig.js +5 -2
- package/lib/util/withAlphaVariable.js +30 -22
- package/package.json +10 -10
- package/peers/index.js +950 -825
- package/resolveConfig.d.ts +3 -0
- package/src/lib/evaluateTailwindFunctions.js +41 -15
- package/src/lib/expandApplyAtRules.js +6 -0
- package/src/lib/generateRules.js +6 -5
- package/src/lib/setupContextUtils.js +4 -2
- package/src/util/cloneNodes.js +5 -1
- package/src/util/resolveConfig.js +1 -1
|
@@ -2,9 +2,34 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
|
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
|
|
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.
|
|
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.
|
|
47
|
-
"@swc/jest": "^0.2.
|
|
46
|
+
"@swc/core": "^1.2.218",
|
|
47
|
+
"@swc/jest": "^0.2.22",
|
|
48
48
|
"@swc/register": "^0.1.10",
|
|
49
|
-
"autoprefixer": "^10.4.
|
|
49
|
+
"autoprefixer": "^10.4.8",
|
|
50
50
|
"cssnano": "^5.1.12",
|
|
51
51
|
"esbuild": "^0.14.48",
|
|
52
|
-
"eslint": "^8.
|
|
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.
|
|
56
|
-
"jest-diff": "^28.1.
|
|
55
|
+
"jest": "^28.1.3",
|
|
56
|
+
"jest-diff": "^28.1.3",
|
|
57
57
|
"prettier": "^2.7.1",
|
|
58
|
-
"prettier-plugin-tailwindcss": "^0.1.
|
|
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.
|
|
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": "^
|
|
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",
|