tailwindcss 3.3.1 → 3.3.2
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 +22 -6
- package/lib/cli/build/deps.js +17 -9
- package/lib/cli/build/index.js +10 -8
- package/lib/cli/build/plugin.js +27 -25
- package/lib/cli/build/utils.js +18 -8
- package/lib/cli/build/watching.js +12 -10
- package/lib/cli/help/index.js +6 -4
- package/lib/cli/index.js +4 -4
- package/lib/cli/init/index.js +8 -6
- package/lib/cli-peer-dependencies.js +12 -4
- package/lib/cli.js +1 -1
- package/lib/corePluginList.js +3 -1
- package/lib/corePlugins.js +41 -35
- package/lib/featureFlags.js +14 -9
- package/lib/index.js +1 -5
- package/lib/lib/cacheInvalidation.js +7 -5
- package/lib/lib/collapseAdjacentRules.js +3 -1
- package/lib/lib/collapseDuplicateDeclarations.js +10 -8
- package/lib/lib/content.js +18 -14
- package/lib/lib/defaultExtractor.js +6 -4
- package/lib/lib/detectNesting.js +3 -1
- package/lib/lib/evaluateTailwindFunctions.js +18 -16
- package/lib/lib/expandApplyAtRules.js +37 -40
- package/lib/lib/expandTailwindAtRules.js +15 -13
- package/lib/lib/findAtConfigPath.js +6 -4
- package/lib/lib/generateRules.js +37 -31
- package/lib/lib/getModuleDependencies.js +10 -8
- package/lib/lib/load-config.js +5 -3
- package/lib/lib/normalizeTailwindDirectives.js +5 -3
- package/lib/lib/offsets.js +7 -5
- package/lib/lib/partitionApplyAtRules.js +3 -1
- package/lib/lib/regex.js +21 -7
- package/lib/lib/remap-bitfield.js +3 -1
- package/lib/lib/resolveDefaultsAtRules.js +24 -20
- package/lib/lib/setupContextUtils.js +67 -57
- package/lib/lib/setupTrackingContext.js +26 -24
- package/lib/lib/sharedState.js +28 -24
- package/lib/lib/substituteScreenAtRules.js +5 -3
- package/lib/oxide/cli/build/deps.js +16 -8
- package/lib/oxide/cli/build/index.js +6 -4
- package/lib/oxide/cli/build/plugin.js +19 -17
- package/lib/oxide/cli/build/utils.js +18 -8
- package/lib/oxide/cli/build/watching.js +10 -8
- package/lib/oxide/cli/help/index.js +6 -4
- package/lib/oxide/cli/index.js +4 -4
- package/lib/oxide/cli/init/index.js +6 -4
- package/lib/plugin.js +7 -7
- package/lib/postcss-plugins/nesting/index.js +3 -1
- package/lib/postcss-plugins/nesting/plugin.js +8 -6
- package/lib/processTailwindFeatures.js +14 -12
- package/lib/public/colors.js +5 -3
- package/lib/public/create-plugin.js +5 -3
- package/lib/public/default-config.js +6 -4
- package/lib/public/default-theme.js +6 -4
- package/lib/public/load-config.js +5 -3
- package/lib/public/resolve-config.js +6 -4
- package/lib/util/applyImportantSelector.js +9 -10
- package/lib/util/bigSign.js +3 -1
- package/lib/util/buildMediaQuery.js +3 -1
- package/lib/util/cloneDeep.js +3 -1
- package/lib/util/cloneNodes.js +3 -1
- package/lib/util/color.js +10 -6
- package/lib/util/colorNames.js +752 -0
- package/lib/util/configurePlugins.js +3 -1
- package/lib/util/createPlugin.js +3 -1
- package/lib/util/createUtilityPlugin.js +5 -3
- package/lib/util/dataTypes.js +45 -15
- package/lib/util/defaults.js +6 -4
- package/lib/util/escapeClassName.js +7 -5
- package/lib/util/escapeCommas.js +3 -1
- package/lib/util/flattenColorPalette.js +3 -1
- package/lib/util/formatVariantSelector.js +28 -108
- package/lib/util/getAllConfigs.js +6 -4
- package/lib/util/hashConfig.js +6 -4
- package/lib/util/isKeyframeRule.js +3 -1
- package/lib/util/isPlainObject.js +3 -1
- package/lib/util/isSyntacticallyValidPropertyValue.js +3 -1
- package/lib/util/log.js +8 -4
- package/lib/util/nameClass.js +12 -6
- package/lib/util/negateValue.js +3 -1
- package/lib/util/normalizeConfig.js +7 -5
- package/lib/util/normalizeScreens.js +12 -4
- package/lib/util/parseAnimationValue.js +3 -1
- package/lib/util/parseBoxShadowValue.js +6 -2
- package/lib/util/parseDependency.js +3 -1
- package/lib/util/parseGlob.js +6 -4
- package/lib/util/parseObjectStyles.js +9 -7
- package/lib/util/pluginUtils.js +30 -18
- package/lib/util/prefixSelector.js +6 -4
- package/lib/util/pseudoElements.js +225 -0
- package/lib/util/removeAlphaVariables.js +3 -1
- package/lib/util/resolveConfig.js +10 -8
- package/lib/util/resolveConfigPath.js +9 -5
- package/lib/util/responsive.js +6 -4
- package/lib/util/splitAtTopLevelOnly.js +3 -1
- package/lib/util/tap.js +3 -1
- package/lib/util/toColorValue.js +3 -1
- package/lib/util/toPath.js +3 -1
- package/lib/util/transformThemeValue.js +6 -4
- package/lib/util/validateConfig.js +5 -3
- package/lib/util/validateFormalSyntax.js +3 -1
- package/lib/util/withAlphaVariable.js +6 -2
- package/package.json +30 -34
- package/peers/index.js +65828 -48819
- package/src/cli/build/plugin.js +1 -1
- package/src/cli.js +1 -1
- package/src/corePlugins.js +16 -17
- package/src/featureFlags.js +2 -3
- package/src/index.js +1 -5
- package/src/lib/defaultExtractor.js +1 -1
- package/src/lib/expandApplyAtRules.js +2 -8
- package/src/lib/expandTailwindAtRules.js +3 -3
- package/src/lib/setupTrackingContext.js +1 -1
- package/src/lib/sharedState.js +0 -15
- package/src/oxide/cli/build/plugin.ts +1 -1
- package/src/plugin.js +1 -1
- package/src/util/applyImportantSelector.js +2 -5
- package/src/util/color.js +1 -1
- package/src/util/colorNames.js +150 -0
- package/src/util/formatVariantSelector.js +2 -124
- package/src/util/pluginUtils.js +1 -5
- package/src/util/pseudoElements.js +170 -0
|
@@ -4,12 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return parseObjectStyles;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const _postcss = /*#__PURE__*/
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
function
|
|
11
|
+
const _postcss = /*#__PURE__*/ _interop_require_default(require("postcss"));
|
|
12
|
+
const _postcssnested = /*#__PURE__*/ _interop_require_default(require("postcss-nested"));
|
|
13
|
+
const _postcssjs = /*#__PURE__*/ _interop_require_default(require("postcss-js"));
|
|
14
|
+
function _interop_require_default(obj) {
|
|
13
15
|
return obj && obj.__esModule ? obj : {
|
|
14
16
|
default: obj
|
|
15
17
|
};
|
|
@@ -22,13 +24,13 @@ function parseObjectStyles(styles) {
|
|
|
22
24
|
}
|
|
23
25
|
return styles.flatMap((style)=>{
|
|
24
26
|
return (0, _postcss.default)([
|
|
25
|
-
(0,
|
|
27
|
+
(0, _postcssnested.default)({
|
|
26
28
|
bubble: [
|
|
27
29
|
"screen"
|
|
28
30
|
]
|
|
29
31
|
})
|
|
30
32
|
]).process(style, {
|
|
31
|
-
parser:
|
|
33
|
+
parser: _postcssjs.default
|
|
32
34
|
}).root.nodes;
|
|
33
35
|
});
|
|
34
36
|
}
|
package/lib/util/pluginUtils.js
CHANGED
|
@@ -9,22 +9,38 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
updateAllClasses: ()
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
updateAllClasses: function() {
|
|
13
|
+
return updateAllClasses;
|
|
14
|
+
},
|
|
15
|
+
asValue: function() {
|
|
16
|
+
return asValue;
|
|
17
|
+
},
|
|
18
|
+
parseColorFormat: function() {
|
|
19
|
+
return parseColorFormat;
|
|
20
|
+
},
|
|
21
|
+
asColor: function() {
|
|
22
|
+
return asColor;
|
|
23
|
+
},
|
|
24
|
+
asLookupValue: function() {
|
|
25
|
+
return asLookupValue;
|
|
26
|
+
},
|
|
27
|
+
typeMap: function() {
|
|
28
|
+
return typeMap;
|
|
29
|
+
},
|
|
30
|
+
coerceValue: function() {
|
|
31
|
+
return coerceValue;
|
|
32
|
+
},
|
|
33
|
+
getMatchingTypes: function() {
|
|
34
|
+
return getMatchingTypes;
|
|
35
|
+
}
|
|
20
36
|
});
|
|
21
|
-
const _escapeCommas = /*#__PURE__*/
|
|
37
|
+
const _escapeCommas = /*#__PURE__*/ _interop_require_default(require("./escapeCommas"));
|
|
22
38
|
const _withAlphaVariable = require("./withAlphaVariable");
|
|
23
39
|
const _dataTypes = require("./dataTypes");
|
|
24
|
-
const _negateValue = /*#__PURE__*/
|
|
40
|
+
const _negateValue = /*#__PURE__*/ _interop_require_default(require("./negateValue"));
|
|
25
41
|
const _validateFormalSyntax = require("./validateFormalSyntax");
|
|
26
|
-
const
|
|
27
|
-
function
|
|
42
|
+
const _featureFlags = require("../featureFlags.js");
|
|
43
|
+
function _interop_require_default(obj) {
|
|
28
44
|
return obj && obj.__esModule ? obj : {
|
|
29
45
|
default: obj
|
|
30
46
|
};
|
|
@@ -105,11 +121,7 @@ function parseColorFormat(value) {
|
|
|
105
121
|
return value;
|
|
106
122
|
}
|
|
107
123
|
function unwrapArbitraryModifier(modifier) {
|
|
108
|
-
|
|
109
|
-
if (modifier.startsWith("--")) {
|
|
110
|
-
modifier = `var(${modifier})`;
|
|
111
|
-
}
|
|
112
|
-
return modifier;
|
|
124
|
+
return (0, _dataTypes.normalize)(modifier.slice(1, -1));
|
|
113
125
|
}
|
|
114
126
|
function asColor(modifier, options = {}, { tailwindConfig ={} } = {}) {
|
|
115
127
|
var _options_values;
|
|
@@ -224,7 +236,7 @@ function coerceValue(types, modifier, options, tailwindConfig) {
|
|
|
224
236
|
return [];
|
|
225
237
|
}
|
|
226
238
|
function* getMatchingTypes(types, rawModifier, options, tailwindConfig) {
|
|
227
|
-
let modifiersEnabled = (0,
|
|
239
|
+
let modifiersEnabled = (0, _featureFlags.flagEnabled)(tailwindConfig, "generalizedModifiers");
|
|
228
240
|
let [modifier, utilityModifier] = splitUtilityModifier(rawModifier);
|
|
229
241
|
let canUseUtilityModifier = modifiersEnabled && options.modifiers != null && (options.modifiers === "any" || typeof options.modifiers === "object" && (utilityModifier && isArbitraryValue(utilityModifier) || utilityModifier in options.modifiers));
|
|
230
242
|
if (!canUseUtilityModifier) {
|
|
@@ -15,10 +15,12 @@ Object.defineProperty(exports, /**
|
|
|
15
15
|
* @returns {T}
|
|
16
16
|
*/ "default", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: ()
|
|
18
|
+
get: function() {
|
|
19
|
+
return _default;
|
|
20
|
+
}
|
|
19
21
|
});
|
|
20
|
-
const
|
|
21
|
-
function
|
|
22
|
+
const _postcssselectorparser = /*#__PURE__*/ _interop_require_default(require("postcss-selector-parser"));
|
|
23
|
+
function _interop_require_default(obj) {
|
|
22
24
|
return obj && obj.__esModule ? obj : {
|
|
23
25
|
default: obj
|
|
24
26
|
};
|
|
@@ -27,7 +29,7 @@ function _default(prefix, selector, prependNegative = false) {
|
|
|
27
29
|
if (prefix === "") {
|
|
28
30
|
return selector;
|
|
29
31
|
}
|
|
30
|
-
let ast = typeof selector === "string" ? (0,
|
|
32
|
+
let ast = typeof selector === "string" ? (0, _postcssselectorparser.default)().astSync(selector) : selector;
|
|
31
33
|
ast.walkClasses((classSelector)=>{
|
|
32
34
|
let baseClass = classSelector.value;
|
|
33
35
|
let shouldPlaceNegativeBeforePrefix = prependNegative && baseClass.startsWith("-");
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/** @typedef {import('postcss-selector-parser').Root} Root */ /** @typedef {import('postcss-selector-parser').Selector} Selector */ /** @typedef {import('postcss-selector-parser').Pseudo} Pseudo */ /** @typedef {import('postcss-selector-parser').Node} Node */ // There are some pseudo-elements that may or may not be:
|
|
2
|
+
// **Actionable**
|
|
3
|
+
// Zero or more user-action pseudo-classes may be attached to the pseudo-element itself
|
|
4
|
+
// structural-pseudo-classes are NOT allowed but we don't make
|
|
5
|
+
// The spec is not clear on whether this is allowed or not — but in practice it is.
|
|
6
|
+
// **Terminal**
|
|
7
|
+
// It MUST be placed at the end of a selector
|
|
8
|
+
//
|
|
9
|
+
// This is the required in the spec. However, some pseudo elements are not "terminal" because
|
|
10
|
+
// they represent a "boundary piercing" that is compiled out by a build step.
|
|
11
|
+
// **Jumpable**
|
|
12
|
+
// Any terminal element may "jump" over combinators when moving to the end of the selector
|
|
13
|
+
//
|
|
14
|
+
// This is a backwards-compat quirk of :before and :after variants.
|
|
15
|
+
/** @typedef {'terminal' | 'actionable' | 'jumpable'} PseudoProperty */ /** @type {Record<string, PseudoProperty[]>} */ "use strict";
|
|
16
|
+
Object.defineProperty(exports, "__esModule", {
|
|
17
|
+
value: true
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "movePseudos", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function() {
|
|
22
|
+
return movePseudos;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
let elementProperties = {
|
|
26
|
+
"::after": [
|
|
27
|
+
"terminal",
|
|
28
|
+
"jumpable"
|
|
29
|
+
],
|
|
30
|
+
"::backdrop": [
|
|
31
|
+
"terminal"
|
|
32
|
+
],
|
|
33
|
+
"::before": [
|
|
34
|
+
"terminal",
|
|
35
|
+
"jumpable"
|
|
36
|
+
],
|
|
37
|
+
"::cue": [
|
|
38
|
+
"terminal"
|
|
39
|
+
],
|
|
40
|
+
"::cue-region": [
|
|
41
|
+
"terminal"
|
|
42
|
+
],
|
|
43
|
+
"::first-letter": [
|
|
44
|
+
"terminal",
|
|
45
|
+
"jumpable"
|
|
46
|
+
],
|
|
47
|
+
"::first-line": [
|
|
48
|
+
"terminal",
|
|
49
|
+
"jumpable"
|
|
50
|
+
],
|
|
51
|
+
"::grammar-error": [
|
|
52
|
+
"terminal"
|
|
53
|
+
],
|
|
54
|
+
"::marker": [
|
|
55
|
+
"terminal"
|
|
56
|
+
],
|
|
57
|
+
"::part": [
|
|
58
|
+
"terminal",
|
|
59
|
+
"actionable"
|
|
60
|
+
],
|
|
61
|
+
"::placeholder": [
|
|
62
|
+
"terminal"
|
|
63
|
+
],
|
|
64
|
+
"::selection": [
|
|
65
|
+
"terminal"
|
|
66
|
+
],
|
|
67
|
+
"::slotted": [
|
|
68
|
+
"terminal"
|
|
69
|
+
],
|
|
70
|
+
"::spelling-error": [
|
|
71
|
+
"terminal"
|
|
72
|
+
],
|
|
73
|
+
"::target-text": [
|
|
74
|
+
"terminal"
|
|
75
|
+
],
|
|
76
|
+
// other
|
|
77
|
+
"::file-selector-button": [
|
|
78
|
+
"terminal",
|
|
79
|
+
"actionable"
|
|
80
|
+
],
|
|
81
|
+
"::-webkit-progress-bar": [
|
|
82
|
+
"terminal",
|
|
83
|
+
"actionable"
|
|
84
|
+
],
|
|
85
|
+
// Webkit scroll bar pseudo elements can be combined with user-action pseudo classes
|
|
86
|
+
"::-webkit-scrollbar": [
|
|
87
|
+
"terminal",
|
|
88
|
+
"actionable"
|
|
89
|
+
],
|
|
90
|
+
"::-webkit-scrollbar-button": [
|
|
91
|
+
"terminal",
|
|
92
|
+
"actionable"
|
|
93
|
+
],
|
|
94
|
+
"::-webkit-scrollbar-thumb": [
|
|
95
|
+
"terminal",
|
|
96
|
+
"actionable"
|
|
97
|
+
],
|
|
98
|
+
"::-webkit-scrollbar-track": [
|
|
99
|
+
"terminal",
|
|
100
|
+
"actionable"
|
|
101
|
+
],
|
|
102
|
+
"::-webkit-scrollbar-track-piece": [
|
|
103
|
+
"terminal",
|
|
104
|
+
"actionable"
|
|
105
|
+
],
|
|
106
|
+
"::-webkit-scrollbar-corner": [
|
|
107
|
+
"terminal",
|
|
108
|
+
"actionable"
|
|
109
|
+
],
|
|
110
|
+
"::-webkit-resizer": [
|
|
111
|
+
"terminal",
|
|
112
|
+
"actionable"
|
|
113
|
+
],
|
|
114
|
+
// Note: As a rule, double colons (::) should be used instead of a single colon
|
|
115
|
+
// (:). This distinguishes pseudo-classes from pseudo-elements. However, since
|
|
116
|
+
// this distinction was not present in older versions of the W3C spec, most
|
|
117
|
+
// browsers support both syntaxes for the original pseudo-elements.
|
|
118
|
+
":after": [
|
|
119
|
+
"terminal",
|
|
120
|
+
"jumpable"
|
|
121
|
+
],
|
|
122
|
+
":before": [
|
|
123
|
+
"terminal",
|
|
124
|
+
"jumpable"
|
|
125
|
+
],
|
|
126
|
+
":first-letter": [
|
|
127
|
+
"terminal",
|
|
128
|
+
"jumpable"
|
|
129
|
+
],
|
|
130
|
+
":first-line": [
|
|
131
|
+
"terminal",
|
|
132
|
+
"jumpable"
|
|
133
|
+
],
|
|
134
|
+
// The default value is used when the pseudo-element is not recognized
|
|
135
|
+
// Because it's not recognized, we don't know if it's terminal or not
|
|
136
|
+
// So we assume it can't be moved AND can have user-action pseudo classes attached to it
|
|
137
|
+
__default__: [
|
|
138
|
+
"actionable"
|
|
139
|
+
]
|
|
140
|
+
};
|
|
141
|
+
function movePseudos(sel) {
|
|
142
|
+
let [pseudos] = movablePseudos(sel);
|
|
143
|
+
// Remove all pseudo elements from their respective selectors
|
|
144
|
+
pseudos.forEach(([sel, pseudo])=>sel.removeChild(pseudo));
|
|
145
|
+
// Re-add them to the end of the selector in the correct order.
|
|
146
|
+
// This moves terminal pseudo elements to the end of the
|
|
147
|
+
// selector otherwise the selector will not be valid.
|
|
148
|
+
//
|
|
149
|
+
// Examples:
|
|
150
|
+
// - `before:hover:text-center` would result in `.before\:hover\:text-center:hover::before`
|
|
151
|
+
// - `hover:before:text-center` would result in `.hover\:before\:text-center:hover::before`
|
|
152
|
+
//
|
|
153
|
+
// The selector `::before:hover` does not work but we
|
|
154
|
+
// can make it work for you by flipping the order.
|
|
155
|
+
sel.nodes.push(...pseudos.map(([, pseudo])=>pseudo));
|
|
156
|
+
return sel;
|
|
157
|
+
}
|
|
158
|
+
/** @typedef {[sel: Selector, pseudo: Pseudo, attachedTo: Pseudo | null]} MovablePseudo */ /** @typedef {[pseudos: MovablePseudo[], lastSeenElement: Pseudo | null]} MovablePseudosResult */ /**
|
|
159
|
+
* @param {Selector} sel
|
|
160
|
+
* @returns {MovablePseudosResult}
|
|
161
|
+
*/ function movablePseudos(sel) {
|
|
162
|
+
/** @type {MovablePseudo[]} */ let buffer = [];
|
|
163
|
+
/** @type {Pseudo | null} */ let lastSeenElement = null;
|
|
164
|
+
for (let node of sel.nodes){
|
|
165
|
+
if (node.type === "combinator") {
|
|
166
|
+
buffer = buffer.filter(([, node])=>propertiesForPseudo(node).includes("jumpable"));
|
|
167
|
+
lastSeenElement = null;
|
|
168
|
+
} else if (node.type === "pseudo") {
|
|
169
|
+
if (isMovablePseudoElement(node)) {
|
|
170
|
+
lastSeenElement = node;
|
|
171
|
+
buffer.push([
|
|
172
|
+
sel,
|
|
173
|
+
node,
|
|
174
|
+
null
|
|
175
|
+
]);
|
|
176
|
+
} else if (lastSeenElement && isAttachablePseudoClass(node, lastSeenElement)) {
|
|
177
|
+
buffer.push([
|
|
178
|
+
sel,
|
|
179
|
+
node,
|
|
180
|
+
lastSeenElement
|
|
181
|
+
]);
|
|
182
|
+
} else {
|
|
183
|
+
lastSeenElement = null;
|
|
184
|
+
}
|
|
185
|
+
var _node_nodes;
|
|
186
|
+
for (let sub of (_node_nodes = node.nodes) !== null && _node_nodes !== void 0 ? _node_nodes : []){
|
|
187
|
+
let [movable, lastSeenElementInSub] = movablePseudos(sub);
|
|
188
|
+
lastSeenElement = lastSeenElementInSub || lastSeenElement;
|
|
189
|
+
buffer.push(...movable);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return [
|
|
194
|
+
buffer,
|
|
195
|
+
lastSeenElement
|
|
196
|
+
];
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* @param {Node} node
|
|
200
|
+
* @returns {boolean}
|
|
201
|
+
*/ function isPseudoElement(node) {
|
|
202
|
+
return node.value.startsWith("::") || elementProperties[node.value] !== undefined;
|
|
203
|
+
}
|
|
204
|
+
/**
|
|
205
|
+
* @param {Node} node
|
|
206
|
+
* @returns {boolean}
|
|
207
|
+
*/ function isMovablePseudoElement(node) {
|
|
208
|
+
return isPseudoElement(node) && propertiesForPseudo(node).includes("terminal");
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* @param {Node} node
|
|
212
|
+
* @param {Pseudo} pseudo
|
|
213
|
+
* @returns {boolean}
|
|
214
|
+
*/ function isAttachablePseudoClass(node, pseudo) {
|
|
215
|
+
if (node.type !== "pseudo") return false;
|
|
216
|
+
if (isPseudoElement(node)) return false;
|
|
217
|
+
return propertiesForPseudo(pseudo).includes("actionable");
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* @param {Pseudo} pseudo
|
|
221
|
+
* @returns {PseudoProperty[]}
|
|
222
|
+
*/ function propertiesForPseudo(pseudo) {
|
|
223
|
+
var _elementProperties_pseudo_value;
|
|
224
|
+
return (_elementProperties_pseudo_value = elementProperties[pseudo.value]) !== null && _elementProperties_pseudo_value !== void 0 ? _elementProperties_pseudo_value : elementProperties.__default__;
|
|
225
|
+
}
|
|
@@ -12,7 +12,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, "removeAlphaVariables", {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: ()
|
|
15
|
+
get: function() {
|
|
16
|
+
return removeAlphaVariables;
|
|
17
|
+
}
|
|
16
18
|
});
|
|
17
19
|
function removeAlphaVariables(container, toRemove) {
|
|
18
20
|
container.walkDecls((decl)=>{
|
|
@@ -4,21 +4,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return resolveConfig;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const _negateValue = /*#__PURE__*/
|
|
10
|
-
const _corePluginList = /*#__PURE__*/
|
|
11
|
-
const _configurePlugins = /*#__PURE__*/
|
|
12
|
-
const _colors = /*#__PURE__*/
|
|
11
|
+
const _negateValue = /*#__PURE__*/ _interop_require_default(require("./negateValue"));
|
|
12
|
+
const _corePluginList = /*#__PURE__*/ _interop_require_default(require("../corePluginList"));
|
|
13
|
+
const _configurePlugins = /*#__PURE__*/ _interop_require_default(require("./configurePlugins"));
|
|
14
|
+
const _colors = /*#__PURE__*/ _interop_require_default(require("../public/colors"));
|
|
13
15
|
const _defaults = require("./defaults");
|
|
14
16
|
const _toPath = require("./toPath");
|
|
15
17
|
const _normalizeConfig = require("./normalizeConfig");
|
|
16
|
-
const _isPlainObject = /*#__PURE__*/
|
|
18
|
+
const _isPlainObject = /*#__PURE__*/ _interop_require_default(require("./isPlainObject"));
|
|
17
19
|
const _cloneDeep = require("./cloneDeep");
|
|
18
20
|
const _pluginUtils = require("./pluginUtils");
|
|
19
21
|
const _withAlphaVariable = require("./withAlphaVariable");
|
|
20
|
-
const _toColorValue = /*#__PURE__*/
|
|
21
|
-
function
|
|
22
|
+
const _toColorValue = /*#__PURE__*/ _interop_require_default(require("./toColorValue"));
|
|
23
|
+
function _interop_require_default(obj) {
|
|
22
24
|
return obj && obj.__esModule ? obj : {
|
|
23
25
|
default: obj
|
|
24
26
|
};
|
|
@@ -9,12 +9,16 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
default: ()
|
|
13
|
-
|
|
12
|
+
default: function() {
|
|
13
|
+
return resolveConfigPath;
|
|
14
|
+
},
|
|
15
|
+
resolveDefaultConfigPath: function() {
|
|
16
|
+
return resolveDefaultConfigPath;
|
|
17
|
+
}
|
|
14
18
|
});
|
|
15
|
-
const _fs = /*#__PURE__*/
|
|
16
|
-
const _path = /*#__PURE__*/
|
|
17
|
-
function
|
|
19
|
+
const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
|
|
20
|
+
const _path = /*#__PURE__*/ _interop_require_default(require("path"));
|
|
21
|
+
function _interop_require_default(obj) {
|
|
18
22
|
return obj && obj.__esModule ? obj : {
|
|
19
23
|
default: obj
|
|
20
24
|
};
|
package/lib/util/responsive.js
CHANGED
|
@@ -4,11 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return responsive;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const _postcss = /*#__PURE__*/
|
|
10
|
-
const _cloneNodes = /*#__PURE__*/
|
|
11
|
-
function
|
|
11
|
+
const _postcss = /*#__PURE__*/ _interop_require_default(require("postcss"));
|
|
12
|
+
const _cloneNodes = /*#__PURE__*/ _interop_require_default(require("./cloneNodes"));
|
|
13
|
+
function _interop_require_default(obj) {
|
|
12
14
|
return obj && obj.__esModule ? obj : {
|
|
13
15
|
default: obj
|
|
14
16
|
};
|
|
@@ -18,7 +18,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "splitAtTopLevelOnly", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: ()
|
|
21
|
+
get: function() {
|
|
22
|
+
return splitAtTopLevelOnly;
|
|
23
|
+
}
|
|
22
24
|
});
|
|
23
25
|
function splitAtTopLevelOnly(input, separator) {
|
|
24
26
|
let stack = [];
|
package/lib/util/tap.js
CHANGED
package/lib/util/toColorValue.js
CHANGED
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return toColorValue;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
function toColorValue(maybeFunction) {
|
|
10
12
|
return typeof maybeFunction === "function" ? maybeFunction({}) : maybeFunction;
|
package/lib/util/toPath.js
CHANGED
|
@@ -17,7 +17,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "toPath", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: ()
|
|
20
|
+
get: function() {
|
|
21
|
+
return toPath;
|
|
22
|
+
}
|
|
21
23
|
});
|
|
22
24
|
function toPath(path) {
|
|
23
25
|
if (Array.isArray(path)) return path;
|
|
@@ -4,11 +4,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return transformThemeValue;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const _postcss = /*#__PURE__*/
|
|
10
|
-
const _isPlainObject = /*#__PURE__*/
|
|
11
|
-
function
|
|
11
|
+
const _postcss = /*#__PURE__*/ _interop_require_default(require("postcss"));
|
|
12
|
+
const _isPlainObject = /*#__PURE__*/ _interop_require_default(require("./isPlainObject"));
|
|
13
|
+
function _interop_require_default(obj) {
|
|
12
14
|
return obj && obj.__esModule ? obj : {
|
|
13
15
|
default: obj
|
|
14
16
|
};
|
|
@@ -4,10 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "validateConfig", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return validateConfig;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
|
-
const _log = /*#__PURE__*/
|
|
10
|
-
function
|
|
11
|
+
const _log = /*#__PURE__*/ _interop_require_default(require("./log"));
|
|
12
|
+
function _interop_require_default(obj) {
|
|
11
13
|
return obj && obj.__esModule ? obj : {
|
|
12
14
|
default: obj
|
|
13
15
|
};
|
|
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
});
|
|
5
5
|
Object.defineProperty(exports, "backgroundSize", {
|
|
6
6
|
enumerable: true,
|
|
7
|
-
get: ()
|
|
7
|
+
get: function() {
|
|
8
|
+
return backgroundSize;
|
|
9
|
+
}
|
|
8
10
|
});
|
|
9
11
|
const _dataTypes = require("./dataTypes");
|
|
10
12
|
const _splitAtTopLevelOnly = require("./splitAtTopLevelOnly");
|
|
@@ -9,8 +9,12 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
withAlphaValue: ()
|
|
13
|
-
|
|
12
|
+
withAlphaValue: function() {
|
|
13
|
+
return withAlphaValue;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return withAlphaVariable;
|
|
17
|
+
}
|
|
14
18
|
});
|
|
15
19
|
const _color = require("./color");
|
|
16
20
|
function withAlphaValue(color, alphaValue, defaultValue) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"prebuild": "npm run generate && rimraf lib",
|
|
20
|
-
"build": "swc src --out-dir lib --copy-files",
|
|
20
|
+
"build": "swc src --out-dir lib --copy-files --config jsc.transform.optimizer.globals.vars.__OXIDE__='\"false\"'",
|
|
21
21
|
"postbuild": "esbuild lib/cli-peer-dependencies.js --bundle --platform=node --outfile=peers/index.js --define:process.env.CSS_TRANSFORMER_WASM=false",
|
|
22
22
|
"rebuild-fixtures": "npm run build && node -r @swc/register scripts/rebuildFixtures.js",
|
|
23
23
|
"style": "eslint .",
|
|
@@ -46,54 +46,50 @@
|
|
|
46
46
|
"*.js"
|
|
47
47
|
],
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@swc/cli": "0.1.
|
|
50
|
-
"@swc/core": "1.3.
|
|
51
|
-
"@swc/jest": "0.2.
|
|
52
|
-
"@swc/register": "0.1.10",
|
|
53
|
-
"autoprefixer": "^10.4.
|
|
54
|
-
"browserslist": "^4.21.
|
|
55
|
-
"concurrently": "^
|
|
56
|
-
"cssnano": "^
|
|
57
|
-
"esbuild": "^0.
|
|
58
|
-
"eslint": "^8.
|
|
59
|
-
"eslint-config-prettier": "^8.
|
|
49
|
+
"@swc/cli": "^0.1.62",
|
|
50
|
+
"@swc/core": "^1.3.55",
|
|
51
|
+
"@swc/jest": "^0.2.26",
|
|
52
|
+
"@swc/register": "^0.1.10",
|
|
53
|
+
"autoprefixer": "^10.4.14",
|
|
54
|
+
"browserslist": "^4.21.5",
|
|
55
|
+
"concurrently": "^8.0.1",
|
|
56
|
+
"cssnano": "^6.0.0",
|
|
57
|
+
"esbuild": "^0.17.18",
|
|
58
|
+
"eslint": "^8.39.0",
|
|
59
|
+
"eslint-config-prettier": "^8.8.0",
|
|
60
60
|
"eslint-plugin-prettier": "^4.2.1",
|
|
61
|
-
"jest": "^
|
|
62
|
-
"jest-diff": "^
|
|
63
|
-
"lightningcss": "
|
|
64
|
-
"prettier": "^2.8.
|
|
65
|
-
"rimraf": "^
|
|
61
|
+
"jest": "^29.5.0",
|
|
62
|
+
"jest-diff": "^29.5.0",
|
|
63
|
+
"lightningcss": "1.18.0",
|
|
64
|
+
"prettier": "^2.8.8",
|
|
65
|
+
"rimraf": "^5.0.0",
|
|
66
66
|
"source-map-js": "^1.0.2",
|
|
67
|
-
"turbo": "^1.
|
|
68
|
-
},
|
|
69
|
-
"peerDependencies": {
|
|
70
|
-
"postcss": "^8.0.9"
|
|
67
|
+
"turbo": "^1.9.3"
|
|
71
68
|
},
|
|
72
69
|
"dependencies": {
|
|
70
|
+
"@alloc/quick-lru": "^5.2.0",
|
|
73
71
|
"arg": "^5.0.2",
|
|
74
72
|
"chokidar": "^3.5.3",
|
|
75
|
-
"color-name": "^1.1.4",
|
|
76
73
|
"didyoumean": "^1.2.2",
|
|
77
74
|
"dlv": "^1.1.3",
|
|
78
75
|
"fast-glob": "^3.2.12",
|
|
79
76
|
"glob-parent": "^6.0.2",
|
|
80
77
|
"is-glob": "^4.0.3",
|
|
81
|
-
"jiti": "^1.
|
|
82
|
-
"lilconfig": "^2.0
|
|
78
|
+
"jiti": "^1.18.2",
|
|
79
|
+
"lilconfig": "^2.1.0",
|
|
83
80
|
"micromatch": "^4.0.5",
|
|
84
81
|
"normalize-path": "^3.0.0",
|
|
85
82
|
"object-hash": "^3.0.0",
|
|
86
83
|
"picocolors": "^1.0.0",
|
|
87
|
-
"postcss": "^8.
|
|
88
|
-
"postcss-import": "^
|
|
89
|
-
"postcss-js": "^4.0.
|
|
90
|
-
"postcss-load-config": "^
|
|
91
|
-
"postcss-nested": "6.0.
|
|
84
|
+
"postcss": "^8.4.23",
|
|
85
|
+
"postcss-import": "^15.1.0",
|
|
86
|
+
"postcss-js": "^4.0.1",
|
|
87
|
+
"postcss-load-config": "^4.0.1",
|
|
88
|
+
"postcss-nested": "^6.0.1",
|
|
92
89
|
"postcss-selector-parser": "^6.0.11",
|
|
93
90
|
"postcss-value-parser": "^4.2.0",
|
|
94
|
-
"
|
|
95
|
-
"
|
|
96
|
-
"sucrase": "^3.29.0"
|
|
91
|
+
"resolve": "^1.22.2",
|
|
92
|
+
"sucrase": "^3.32.0"
|
|
97
93
|
},
|
|
98
94
|
"browserslist": [
|
|
99
95
|
"> 1%",
|
|
@@ -121,6 +117,6 @@
|
|
|
121
117
|
}
|
|
122
118
|
},
|
|
123
119
|
"engines": {
|
|
124
|
-
"node": ">=
|
|
120
|
+
"node": ">=14.0.0"
|
|
125
121
|
}
|
|
126
122
|
}
|