tailwindcss 3.4.2 → 3.4.4
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 +18 -1
- package/lib/corePlugins.js +27 -10
- package/lib/lib/content.js +3 -36
- package/lib/util/pluginUtils.js +1 -1
- package/package.json +1 -1
- package/peers/index.js +2080 -1912
- package/src/corePlugins.js +37 -12
- package/src/lib/content.js +1 -42
- package/src/util/pluginUtils.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
- Nothing yet!
|
|
11
11
|
|
|
12
|
+
## [3.4.4] - 2024-06-05
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Make it possible to use multiple `<alpha-value>` placeholders in a single color definition ([#13740](https://github.com/tailwindlabs/tailwindcss/pull/13740))
|
|
17
|
+
- Don't prefix classes in arbitrary values of `has-*`, `group-has-*`, and `peer-has-*` variants ([#13770](https://github.com/tailwindlabs/tailwindcss/pull/13770))
|
|
18
|
+
- Support negative values for `{col,row}-{start,end}` utilities ([#13781](https://github.com/tailwindlabs/tailwindcss/pull/13781))
|
|
19
|
+
- Update embedded browserslist database ([#13792](https://github.com/tailwindlabs/tailwindcss/pull/13792))
|
|
20
|
+
|
|
21
|
+
## [3.4.3] - 2024-03-27
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- Revert changes to glob handling ([#13384](https://github.com/tailwindlabs/tailwindcss/pull/13384))
|
|
26
|
+
|
|
12
27
|
## [3.4.2] - 2024-03-27
|
|
13
28
|
|
|
14
29
|
### Fixed
|
|
@@ -2370,7 +2385,9 @@ No release notes
|
|
|
2370
2385
|
|
|
2371
2386
|
- Everything!
|
|
2372
2387
|
|
|
2373
|
-
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.
|
|
2388
|
+
[unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.4...HEAD
|
|
2389
|
+
[3.4.4]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.3...v3.4.4
|
|
2390
|
+
[3.4.3]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.2...v3.4.3
|
|
2374
2391
|
[3.4.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.1...v3.4.2
|
|
2375
2392
|
[3.4.1]: https://github.com/tailwindlabs/tailwindcss/compare/v3.4.0...v3.4.1
|
|
2376
2393
|
[3.4.0]: https://github.com/tailwindlabs/tailwindcss/compare/v3.3.7...v3.4.0
|
package/lib/corePlugins.js
CHANGED
|
@@ -460,15 +460,24 @@ let variantPlugins = {
|
|
|
460
460
|
values: (_theme = theme("supports")) !== null && _theme !== void 0 ? _theme : {}
|
|
461
461
|
});
|
|
462
462
|
},
|
|
463
|
-
hasVariants: ({ matchVariant })=>{
|
|
463
|
+
hasVariants: ({ matchVariant , prefix })=>{
|
|
464
464
|
matchVariant("has", (value)=>`&:has(${(0, _dataTypes.normalize)(value)})`, {
|
|
465
|
-
values: {}
|
|
465
|
+
values: {},
|
|
466
|
+
[_setupContextUtils.INTERNAL_FEATURES]: {
|
|
467
|
+
respectPrefix: false
|
|
468
|
+
}
|
|
466
469
|
});
|
|
467
|
-
matchVariant("group-has", (value, { modifier })=>modifier ? `:merge(.group\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) &` : `:merge(.group):has(${(0, _dataTypes.normalize)(value)}) &`, {
|
|
468
|
-
values: {}
|
|
470
|
+
matchVariant("group-has", (value, { modifier })=>modifier ? `:merge(${prefix(".group")}\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) &` : `:merge(${prefix(".group")}):has(${(0, _dataTypes.normalize)(value)}) &`, {
|
|
471
|
+
values: {},
|
|
472
|
+
[_setupContextUtils.INTERNAL_FEATURES]: {
|
|
473
|
+
respectPrefix: false
|
|
474
|
+
}
|
|
469
475
|
});
|
|
470
|
-
matchVariant("peer-has", (value, { modifier })=>modifier ? `:merge(.peer\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) ~ &` : `:merge(.peer):has(${(0, _dataTypes.normalize)(value)}) ~ &`, {
|
|
471
|
-
values: {}
|
|
476
|
+
matchVariant("peer-has", (value, { modifier })=>modifier ? `:merge(${prefix(".peer")}\\/${modifier}):has(${(0, _dataTypes.normalize)(value)}) ~ &` : `:merge(${prefix(".peer")}):has(${(0, _dataTypes.normalize)(value)}) ~ &`, {
|
|
477
|
+
values: {},
|
|
478
|
+
[_setupContextUtils.INTERNAL_FEATURES]: {
|
|
479
|
+
respectPrefix: false
|
|
480
|
+
}
|
|
472
481
|
});
|
|
473
482
|
},
|
|
474
483
|
ariaVariants: ({ matchVariant , theme })=>{
|
|
@@ -794,7 +803,9 @@ let corePlugins = {
|
|
|
794
803
|
"gridColumnStart"
|
|
795
804
|
]
|
|
796
805
|
]
|
|
797
|
-
]
|
|
806
|
+
], {
|
|
807
|
+
supportsNegativeValues: true
|
|
808
|
+
}),
|
|
798
809
|
gridColumnEnd: (0, _createUtilityPlugin.default)("gridColumnEnd", [
|
|
799
810
|
[
|
|
800
811
|
"col-end",
|
|
@@ -802,7 +813,9 @@ let corePlugins = {
|
|
|
802
813
|
"gridColumnEnd"
|
|
803
814
|
]
|
|
804
815
|
]
|
|
805
|
-
]
|
|
816
|
+
], {
|
|
817
|
+
supportsNegativeValues: true
|
|
818
|
+
}),
|
|
806
819
|
gridRow: (0, _createUtilityPlugin.default)("gridRow", [
|
|
807
820
|
[
|
|
808
821
|
"row",
|
|
@@ -818,7 +831,9 @@ let corePlugins = {
|
|
|
818
831
|
"gridRowStart"
|
|
819
832
|
]
|
|
820
833
|
]
|
|
821
|
-
]
|
|
834
|
+
], {
|
|
835
|
+
supportsNegativeValues: true
|
|
836
|
+
}),
|
|
822
837
|
gridRowEnd: (0, _createUtilityPlugin.default)("gridRowEnd", [
|
|
823
838
|
[
|
|
824
839
|
"row-end",
|
|
@@ -826,7 +841,9 @@ let corePlugins = {
|
|
|
826
841
|
"gridRowEnd"
|
|
827
842
|
]
|
|
828
843
|
]
|
|
829
|
-
]
|
|
844
|
+
], {
|
|
845
|
+
supportsNegativeValues: true
|
|
846
|
+
}),
|
|
830
847
|
float: ({ addUtilities })=>{
|
|
831
848
|
addUtilities({
|
|
832
849
|
".float-start": {
|
package/lib/lib/content.js
CHANGED
|
@@ -21,6 +21,7 @@ const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
|
21
21
|
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
22
22
|
const _isglob = /*#__PURE__*/ _interop_require_default(require("is-glob"));
|
|
23
23
|
const _fastglob = /*#__PURE__*/ _interop_require_default(require("fast-glob"));
|
|
24
|
+
const _normalizepath = /*#__PURE__*/ _interop_require_default(require("normalize-path"));
|
|
24
25
|
const _parseGlob = require("../util/parseGlob");
|
|
25
26
|
const _sharedState = require("./sharedState");
|
|
26
27
|
function _interop_require_default(obj) {
|
|
@@ -28,42 +29,11 @@ function _interop_require_default(obj) {
|
|
|
28
29
|
default: obj
|
|
29
30
|
};
|
|
30
31
|
}
|
|
31
|
-
/*!
|
|
32
|
-
* Modified version of normalize-path, original license below
|
|
33
|
-
*
|
|
34
|
-
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
35
|
-
*
|
|
36
|
-
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
37
|
-
* Released under the MIT License.
|
|
38
|
-
*/ function normalizePath(path) {
|
|
39
|
-
if (typeof path !== "string") {
|
|
40
|
-
throw new TypeError("expected path to be a string");
|
|
41
|
-
}
|
|
42
|
-
if (path === "\\" || path === "/") return "/";
|
|
43
|
-
var len = path.length;
|
|
44
|
-
if (len <= 1) return path;
|
|
45
|
-
// ensure that win32 namespaces has two leading slashes, so that the path is
|
|
46
|
-
// handled properly by the win32 version of path.parse() after being normalized
|
|
47
|
-
// https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces
|
|
48
|
-
var prefix = "";
|
|
49
|
-
if (len > 4 && path[3] === "\\") {
|
|
50
|
-
var ch = path[2];
|
|
51
|
-
if ((ch === "?" || ch === ".") && path.slice(0, 2) === "\\\\") {
|
|
52
|
-
path = path.slice(2);
|
|
53
|
-
prefix = "//";
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
// Modified part: instead of purely splitting on `\\` and `/`, we split on
|
|
57
|
-
// `/` and `\\` that is _not_ followed by any of the following characters: ()[]
|
|
58
|
-
// This is to ensure that we keep the escaping of brackets and parentheses
|
|
59
|
-
let segs = path.split(/[/\\]+(?![\(\)\[\]])/);
|
|
60
|
-
return prefix + segs.join("/");
|
|
61
|
-
}
|
|
62
32
|
function parseCandidateFiles(context, tailwindConfig) {
|
|
63
33
|
let files = tailwindConfig.content.files;
|
|
64
34
|
// Normalize the file globs
|
|
65
35
|
files = files.filter((filePath)=>typeof filePath === "string");
|
|
66
|
-
files = files.map(
|
|
36
|
+
files = files.map(_normalizepath.default);
|
|
67
37
|
// Split into included and excluded globs
|
|
68
38
|
let tasks = _fastglob.default.generateTasks(files);
|
|
69
39
|
/** @type {ContentPath[]} */ let included = [];
|
|
@@ -90,9 +60,6 @@ function parseCandidateFiles(context, tailwindConfig) {
|
|
|
90
60
|
* @param {boolean} ignore
|
|
91
61
|
* @returns {ContentPath}
|
|
92
62
|
*/ function parseFilePath(filePath, ignore) {
|
|
93
|
-
// Escape special characters in the file path such as: ()[]
|
|
94
|
-
// But only if the special character isn't already escaped
|
|
95
|
-
filePath = filePath.replace(/(?<!\\)([\[\]\(\)])/g, "\\$1");
|
|
96
63
|
let contentPath = {
|
|
97
64
|
original: filePath,
|
|
98
65
|
base: filePath,
|
|
@@ -114,7 +81,7 @@ function parseCandidateFiles(context, tailwindConfig) {
|
|
|
114
81
|
// Afaik, this technically shouldn't be needed but there's probably
|
|
115
82
|
// some internal, direct path matching with a normalized path in
|
|
116
83
|
// a package which can't handle mixed directory separators
|
|
117
|
-
let base =
|
|
84
|
+
let base = (0, _normalizepath.default)(contentPath.base);
|
|
118
85
|
// If the user's file path contains any special characters (like parens) for instance fast-glob
|
|
119
86
|
// is like "OOOH SHINY" and treats them as such. So we have to escape the base path to fix this
|
|
120
87
|
base = _fastglob.default.escapePath(base);
|
package/lib/util/pluginUtils.js
CHANGED
|
@@ -129,7 +129,7 @@ function splitUtilityModifier(modifier) {
|
|
|
129
129
|
function parseColorFormat(value) {
|
|
130
130
|
if (typeof value === "string" && value.includes("<alpha-value>")) {
|
|
131
131
|
let oldValue = value;
|
|
132
|
-
return ({ opacityValue =1 })=>oldValue.replace(
|
|
132
|
+
return ({ opacityValue =1 })=>oldValue.replace(/<alpha-value>/g, opacityValue);
|
|
133
133
|
}
|
|
134
134
|
return value;
|
|
135
135
|
}
|