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/src/corePlugins.js
CHANGED
|
@@ -434,23 +434,40 @@ export let variantPlugins = {
|
|
|
434
434
|
)
|
|
435
435
|
},
|
|
436
436
|
|
|
437
|
-
hasVariants: ({ matchVariant }) => {
|
|
438
|
-
matchVariant('has', (value) => `&:has(${normalize(value)})`, {
|
|
437
|
+
hasVariants: ({ matchVariant, prefix }) => {
|
|
438
|
+
matchVariant('has', (value) => `&:has(${normalize(value)})`, {
|
|
439
|
+
values: {},
|
|
440
|
+
[INTERNAL_FEATURES]: {
|
|
441
|
+
respectPrefix: false,
|
|
442
|
+
},
|
|
443
|
+
})
|
|
444
|
+
|
|
439
445
|
matchVariant(
|
|
440
446
|
'group-has',
|
|
441
447
|
(value, { modifier }) =>
|
|
442
448
|
modifier
|
|
443
|
-
? `:merge(.group\\/${modifier}):has(${normalize(value)}) &`
|
|
444
|
-
: `:merge(.group):has(${normalize(value)}) &`,
|
|
445
|
-
{
|
|
449
|
+
? `:merge(${prefix('.group')}\\/${modifier}):has(${normalize(value)}) &`
|
|
450
|
+
: `:merge(${prefix('.group')}):has(${normalize(value)}) &`,
|
|
451
|
+
{
|
|
452
|
+
values: {},
|
|
453
|
+
[INTERNAL_FEATURES]: {
|
|
454
|
+
respectPrefix: false,
|
|
455
|
+
},
|
|
456
|
+
}
|
|
446
457
|
)
|
|
458
|
+
|
|
447
459
|
matchVariant(
|
|
448
460
|
'peer-has',
|
|
449
461
|
(value, { modifier }) =>
|
|
450
462
|
modifier
|
|
451
|
-
? `:merge(.peer\\/${modifier}):has(${normalize(value)}) ~ &`
|
|
452
|
-
: `:merge(.peer):has(${normalize(value)}) ~ &`,
|
|
453
|
-
{
|
|
463
|
+
? `:merge(${prefix('.peer')}\\/${modifier}):has(${normalize(value)}) ~ &`
|
|
464
|
+
: `:merge(${prefix('.peer')}):has(${normalize(value)}) ~ &`,
|
|
465
|
+
{
|
|
466
|
+
values: {},
|
|
467
|
+
[INTERNAL_FEATURES]: {
|
|
468
|
+
respectPrefix: false,
|
|
469
|
+
},
|
|
470
|
+
}
|
|
454
471
|
)
|
|
455
472
|
},
|
|
456
473
|
|
|
@@ -724,11 +741,19 @@ export let corePlugins = {
|
|
|
724
741
|
zIndex: createUtilityPlugin('zIndex', [['z', ['zIndex']]], { supportsNegativeValues: true }),
|
|
725
742
|
order: createUtilityPlugin('order', undefined, { supportsNegativeValues: true }),
|
|
726
743
|
gridColumn: createUtilityPlugin('gridColumn', [['col', ['gridColumn']]]),
|
|
727
|
-
gridColumnStart: createUtilityPlugin('gridColumnStart', [['col-start', ['gridColumnStart']]]
|
|
728
|
-
|
|
744
|
+
gridColumnStart: createUtilityPlugin('gridColumnStart', [['col-start', ['gridColumnStart']]], {
|
|
745
|
+
supportsNegativeValues: true,
|
|
746
|
+
}),
|
|
747
|
+
gridColumnEnd: createUtilityPlugin('gridColumnEnd', [['col-end', ['gridColumnEnd']]], {
|
|
748
|
+
supportsNegativeValues: true,
|
|
749
|
+
}),
|
|
729
750
|
gridRow: createUtilityPlugin('gridRow', [['row', ['gridRow']]]),
|
|
730
|
-
gridRowStart: createUtilityPlugin('gridRowStart', [['row-start', ['gridRowStart']]]
|
|
731
|
-
|
|
751
|
+
gridRowStart: createUtilityPlugin('gridRowStart', [['row-start', ['gridRowStart']]], {
|
|
752
|
+
supportsNegativeValues: true,
|
|
753
|
+
}),
|
|
754
|
+
gridRowEnd: createUtilityPlugin('gridRowEnd', [['row-end', ['gridRowEnd']]], {
|
|
755
|
+
supportsNegativeValues: true,
|
|
756
|
+
}),
|
|
732
757
|
|
|
733
758
|
float: ({ addUtilities }) => {
|
|
734
759
|
addUtilities({
|
package/src/lib/content.js
CHANGED
|
@@ -4,47 +4,10 @@ import fs from 'fs'
|
|
|
4
4
|
import path from 'path'
|
|
5
5
|
import isGlob from 'is-glob'
|
|
6
6
|
import fastGlob from 'fast-glob'
|
|
7
|
+
import normalizePath from 'normalize-path'
|
|
7
8
|
import { parseGlob } from '../util/parseGlob'
|
|
8
9
|
import { env } from './sharedState'
|
|
9
10
|
|
|
10
|
-
/*!
|
|
11
|
-
* Modified version of normalize-path, original license below
|
|
12
|
-
*
|
|
13
|
-
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
|
14
|
-
*
|
|
15
|
-
* Copyright (c) 2014-2018, Jon Schlinkert.
|
|
16
|
-
* Released under the MIT License.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
function normalizePath(path) {
|
|
20
|
-
if (typeof path !== 'string') {
|
|
21
|
-
throw new TypeError('expected path to be a string')
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (path === '\\' || path === '/') return '/'
|
|
25
|
-
|
|
26
|
-
var len = path.length
|
|
27
|
-
if (len <= 1) return path
|
|
28
|
-
|
|
29
|
-
// ensure that win32 namespaces has two leading slashes, so that the path is
|
|
30
|
-
// handled properly by the win32 version of path.parse() after being normalized
|
|
31
|
-
// https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces
|
|
32
|
-
var prefix = ''
|
|
33
|
-
if (len > 4 && path[3] === '\\') {
|
|
34
|
-
var ch = path[2]
|
|
35
|
-
if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') {
|
|
36
|
-
path = path.slice(2)
|
|
37
|
-
prefix = '//'
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// Modified part: instead of purely splitting on `\\` and `/`, we split on
|
|
42
|
-
// `/` and `\\` that is _not_ followed by any of the following characters: ()[]
|
|
43
|
-
// This is to ensure that we keep the escaping of brackets and parentheses
|
|
44
|
-
let segs = path.split(/[/\\]+(?![\(\)\[\]])/)
|
|
45
|
-
return prefix + segs.join('/')
|
|
46
|
-
}
|
|
47
|
-
|
|
48
11
|
/** @typedef {import('../../types/config.js').RawFile} RawFile */
|
|
49
12
|
/** @typedef {import('../../types/config.js').FilePath} FilePath */
|
|
50
13
|
|
|
@@ -110,10 +73,6 @@ export function parseCandidateFiles(context, tailwindConfig) {
|
|
|
110
73
|
* @returns {ContentPath}
|
|
111
74
|
*/
|
|
112
75
|
function parseFilePath(filePath, ignore) {
|
|
113
|
-
// Escape special characters in the file path such as: ()[]
|
|
114
|
-
// But only if the special character isn't already escaped
|
|
115
|
-
filePath = filePath.replace(/(?<!\\)([\[\]\(\)])/g, '\\$1')
|
|
116
|
-
|
|
117
76
|
let contentPath = {
|
|
118
77
|
original: filePath,
|
|
119
78
|
base: filePath,
|
package/src/util/pluginUtils.js
CHANGED
|
@@ -124,7 +124,7 @@ export function parseColorFormat(value) {
|
|
|
124
124
|
if (typeof value === 'string' && value.includes('<alpha-value>')) {
|
|
125
125
|
let oldValue = value
|
|
126
126
|
|
|
127
|
-
return ({ opacityValue = 1 }) => oldValue.replace(
|
|
127
|
+
return ({ opacityValue = 1 }) => oldValue.replace(/<alpha-value>/g, opacityValue)
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
return value
|