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,10 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
exports
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>parseObjectStyles
|
|
8
|
+
});
|
|
9
|
+
const _postcss = /*#__PURE__*/ _interopRequireDefault(require("postcss"));
|
|
10
|
+
const _postcssNested = /*#__PURE__*/ _interopRequireDefault(require("postcss-nested"));
|
|
11
|
+
const _postcssJs = /*#__PURE__*/ _interopRequireDefault(require("postcss-js"));
|
|
12
|
+
function _interopRequireDefault(obj) {
|
|
13
|
+
return obj && obj.__esModule ? obj : {
|
|
14
|
+
default: obj
|
|
15
|
+
};
|
|
16
|
+
}
|
|
9
17
|
function parseObjectStyles(styles) {
|
|
10
18
|
if (!Array.isArray(styles)) {
|
|
11
19
|
return parseObjectStyles([
|
|
@@ -13,8 +21,8 @@ function parseObjectStyles(styles) {
|
|
|
13
21
|
]);
|
|
14
22
|
}
|
|
15
23
|
return styles.flatMap((style)=>{
|
|
16
|
-
return (0, _postcss
|
|
17
|
-
(0, _postcssNested
|
|
24
|
+
return (0, _postcss.default)([
|
|
25
|
+
(0, _postcssNested.default)({
|
|
18
26
|
bubble: [
|
|
19
27
|
"screen"
|
|
20
28
|
]
|
|
@@ -24,8 +32,3 @@ function parseObjectStyles(styles) {
|
|
|
24
32
|
}).root.nodes;
|
|
25
33
|
});
|
|
26
34
|
}
|
|
27
|
-
function _interopRequireDefault(obj) {
|
|
28
|
-
return obj && obj.__esModule ? obj : {
|
|
29
|
-
default: obj
|
|
30
|
-
};
|
|
31
|
-
}
|
package/lib/util/pluginUtils.js
CHANGED
|
@@ -2,33 +2,41 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
+
updateAllClasses: ()=>updateAllClasses,
|
|
13
|
+
asValue: ()=>asValue,
|
|
14
|
+
parseColorFormat: ()=>parseColorFormat,
|
|
15
|
+
asColor: ()=>asColor,
|
|
16
|
+
asLookupValue: ()=>asLookupValue,
|
|
17
|
+
coerceValue: ()=>coerceValue
|
|
18
|
+
});
|
|
19
|
+
const _postcssSelectorParser = /*#__PURE__*/ _interopRequireDefault(require("postcss-selector-parser"));
|
|
20
|
+
const _escapeCommas = /*#__PURE__*/ _interopRequireDefault(require("./escapeCommas"));
|
|
21
|
+
const _withAlphaVariable = require("./withAlphaVariable");
|
|
22
|
+
const _dataTypes = require("./dataTypes");
|
|
23
|
+
const _negateValue = /*#__PURE__*/ _interopRequireDefault(require("./negateValue"));
|
|
16
24
|
function _interopRequireDefault(obj) {
|
|
17
25
|
return obj && obj.__esModule ? obj : {
|
|
18
26
|
default: obj
|
|
19
27
|
};
|
|
20
28
|
}
|
|
21
|
-
function updateAllClasses(
|
|
22
|
-
let parser = (0, _postcssSelectorParser
|
|
29
|
+
function updateAllClasses(selectors, updateClass) {
|
|
30
|
+
let parser = (0, _postcssSelectorParser.default)((selectors)=>{
|
|
23
31
|
selectors.walkClasses((sel)=>{
|
|
24
32
|
let updatedClass = updateClass(sel.value);
|
|
25
33
|
sel.value = updatedClass;
|
|
26
34
|
if (sel.raws && sel.raws.value) {
|
|
27
|
-
sel.raws.value = (0, _escapeCommas
|
|
35
|
+
sel.raws.value = (0, _escapeCommas.default)(sel.raws.value);
|
|
28
36
|
}
|
|
29
37
|
});
|
|
30
38
|
});
|
|
31
|
-
let result = parser.processSync(
|
|
39
|
+
let result = parser.processSync(selectors);
|
|
32
40
|
return result;
|
|
33
41
|
}
|
|
34
42
|
function resolveArbitraryValue(modifier, validate) {
|
|
@@ -39,19 +47,19 @@ function resolveArbitraryValue(modifier, validate) {
|
|
|
39
47
|
if (!validate(value)) {
|
|
40
48
|
return undefined;
|
|
41
49
|
}
|
|
42
|
-
return (0, _dataTypes
|
|
50
|
+
return (0, _dataTypes.normalize)(value);
|
|
43
51
|
}
|
|
44
52
|
function asNegativeValue(modifier, lookup = {}, validate) {
|
|
45
53
|
let positiveValue = lookup[modifier];
|
|
46
54
|
if (positiveValue !== undefined) {
|
|
47
|
-
return (0, _negateValue
|
|
55
|
+
return (0, _negateValue.default)(positiveValue);
|
|
48
56
|
}
|
|
49
57
|
if (isArbitraryValue(modifier)) {
|
|
50
58
|
let resolved = resolveArbitraryValue(modifier, validate);
|
|
51
59
|
if (resolved === undefined) {
|
|
52
60
|
return undefined;
|
|
53
61
|
}
|
|
54
|
-
return (0, _negateValue
|
|
62
|
+
return (0, _negateValue.default)(resolved);
|
|
55
63
|
}
|
|
56
64
|
}
|
|
57
65
|
function asValue(modifier, options = {}, { validate =()=>true } = {}) {
|
|
@@ -103,12 +111,12 @@ function asColor(modifier, options = {}, { tailwindConfig ={} } = {}) {
|
|
|
103
111
|
}
|
|
104
112
|
normalizedColor = parseColorFormat(normalizedColor);
|
|
105
113
|
if (isArbitraryValue(alpha)) {
|
|
106
|
-
return (0, _withAlphaVariable
|
|
114
|
+
return (0, _withAlphaVariable.withAlphaValue)(normalizedColor, alpha.slice(1, -1));
|
|
107
115
|
}
|
|
108
116
|
if (((ref3 = tailwindConfig.theme) === null || ref3 === void 0 ? void 0 : (ref4 = ref3.opacity) === null || ref4 === void 0 ? void 0 : ref4[alpha]) === undefined) {
|
|
109
117
|
return undefined;
|
|
110
118
|
}
|
|
111
|
-
return (0, _withAlphaVariable
|
|
119
|
+
return (0, _withAlphaVariable.withAlphaValue)(normalizedColor, tailwindConfig.theme.opacity[alpha]);
|
|
112
120
|
}
|
|
113
121
|
return asValue(modifier, options, {
|
|
114
122
|
validate: _dataTypes.color
|
|
@@ -2,15 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
exports
|
|
6
|
-
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>_default
|
|
8
|
+
});
|
|
9
|
+
const _postcssSelectorParser = /*#__PURE__*/ _interopRequireDefault(require("postcss-selector-parser"));
|
|
7
10
|
function _interopRequireDefault(obj) {
|
|
8
11
|
return obj && obj.__esModule ? obj : {
|
|
9
12
|
default: obj
|
|
10
13
|
};
|
|
11
14
|
}
|
|
12
15
|
function _default(prefix, selector, prependNegative = false) {
|
|
13
|
-
return (0, _postcssSelectorParser
|
|
16
|
+
return (0, _postcssSelectorParser.default)((selectors)=>{
|
|
14
17
|
selectors.walkClasses((classSelector)=>{
|
|
15
18
|
let baseClass = classSelector.value;
|
|
16
19
|
let shouldPlaceNegativeBeforePrefix = prependNegative && baseClass.startsWith("-");
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* This function removes any uses of CSS variables used as an alpha channel
|
|
3
|
+
*
|
|
4
|
+
* This is required for selectors like `:visited` which do not allow
|
|
5
|
+
* changes in opacity or external control using CSS variables.
|
|
6
|
+
*
|
|
7
|
+
* @param {import('postcss').Container} container
|
|
8
|
+
* @param {string[]} toRemove
|
|
9
|
+
*/ "use strict";
|
|
2
10
|
Object.defineProperty(exports, "__esModule", {
|
|
3
11
|
value: true
|
|
4
12
|
});
|
|
5
|
-
exports
|
|
13
|
+
Object.defineProperty(exports, "removeAlphaVariables", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: ()=>removeAlphaVariables
|
|
16
|
+
});
|
|
6
17
|
function removeAlphaVariables(container, toRemove) {
|
|
7
18
|
container.walkDecls((decl)=>{
|
|
8
19
|
if (toRemove.includes(decl.prop)) {
|
|
@@ -2,41 +2,23 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
exports
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
{
|
|
23
|
-
prefix: "",
|
|
24
|
-
important: false,
|
|
25
|
-
separator: ":",
|
|
26
|
-
variantOrder: _defaultConfigStub.default.variantOrder
|
|
27
|
-
},
|
|
28
|
-
];
|
|
29
|
-
var ref, ref1;
|
|
30
|
-
return (0, _normalizeConfig).normalizeConfig((0, _defaults).defaults({
|
|
31
|
-
theme: resolveFunctionKeys(mergeExtensions(mergeThemes(allConfigs.map((t)=>{
|
|
32
|
-
return (ref = t === null || t === void 0 ? void 0 : t.theme) !== null && ref !== void 0 ? ref : {};
|
|
33
|
-
})))),
|
|
34
|
-
corePlugins: resolveCorePlugins(allConfigs.map((c)=>c.corePlugins)),
|
|
35
|
-
plugins: resolvePluginLists(configs.map((c)=>{
|
|
36
|
-
return (ref1 = c === null || c === void 0 ? void 0 : c.plugins) !== null && ref1 !== void 0 ? ref1 : [];
|
|
37
|
-
}))
|
|
38
|
-
}, ...allConfigs));
|
|
39
|
-
}
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>resolveConfig
|
|
8
|
+
});
|
|
9
|
+
const _negateValue = /*#__PURE__*/ _interopRequireDefault(require("./negateValue"));
|
|
10
|
+
const _corePluginList = /*#__PURE__*/ _interopRequireDefault(require("../corePluginList"));
|
|
11
|
+
const _configurePlugins = /*#__PURE__*/ _interopRequireDefault(require("./configurePlugins"));
|
|
12
|
+
const _defaultConfigStub = /*#__PURE__*/ _interopRequireDefault(require("../../stubs/defaultConfig.stub"));
|
|
13
|
+
const _colors = /*#__PURE__*/ _interopRequireDefault(require("../public/colors"));
|
|
14
|
+
const _defaults = require("./defaults");
|
|
15
|
+
const _toPath = require("./toPath");
|
|
16
|
+
const _normalizeConfig = require("./normalizeConfig");
|
|
17
|
+
const _isPlainObject = /*#__PURE__*/ _interopRequireDefault(require("./isPlainObject"));
|
|
18
|
+
const _cloneDeep = require("./cloneDeep");
|
|
19
|
+
const _pluginUtils = require("./pluginUtils");
|
|
20
|
+
const _withAlphaVariable = require("./withAlphaVariable");
|
|
21
|
+
const _toColorValue = /*#__PURE__*/ _interopRequireDefault(require("./toColorValue"));
|
|
40
22
|
function _interopRequireDefault(obj) {
|
|
41
23
|
return obj && obj.__esModule ? obj : {
|
|
42
24
|
default: obj
|
|
@@ -71,7 +53,7 @@ const configUtils = {
|
|
|
71
53
|
negative (scale) {
|
|
72
54
|
// TODO: Log that this function isn't really needed anymore?
|
|
73
55
|
return Object.keys(scale).filter((key)=>scale[key] !== "0").reduce((negativeScale, key)=>{
|
|
74
|
-
let negativeValue = (0, _negateValue
|
|
56
|
+
let negativeValue = (0, _negateValue.default)(scale[key]);
|
|
75
57
|
if (negativeValue !== undefined) {
|
|
76
58
|
negativeScale[`-${key}`] = negativeValue;
|
|
77
59
|
}
|
|
@@ -111,27 +93,27 @@ function collectExtends(items) {
|
|
|
111
93
|
}
|
|
112
94
|
function mergeThemes(themes) {
|
|
113
95
|
return {
|
|
114
|
-
...themes.reduce((merged, theme)=>(0, _defaults
|
|
96
|
+
...themes.reduce((merged, theme)=>(0, _defaults.defaults)(merged, theme), {}),
|
|
115
97
|
// In order to resolve n config objects, we combine all of their `extend` properties
|
|
116
98
|
// into arrays instead of objects so they aren't overridden.
|
|
117
99
|
extend: collectExtends(themes)
|
|
118
100
|
};
|
|
119
101
|
}
|
|
120
|
-
function mergeExtensionCustomizer(merged,
|
|
102
|
+
function mergeExtensionCustomizer(merged, value) {
|
|
121
103
|
// When we have an array of objects, we do want to merge it
|
|
122
104
|
if (Array.isArray(merged) && isObject(merged[0])) {
|
|
123
|
-
return merged.concat(
|
|
105
|
+
return merged.concat(value);
|
|
124
106
|
}
|
|
125
107
|
// When the incoming value is an array, and the existing config is an object, prepend the existing object
|
|
126
|
-
if (Array.isArray(
|
|
108
|
+
if (Array.isArray(value) && isObject(value[0]) && isObject(merged)) {
|
|
127
109
|
return [
|
|
128
110
|
merged,
|
|
129
|
-
...
|
|
111
|
+
...value
|
|
130
112
|
];
|
|
131
113
|
}
|
|
132
114
|
// Override arrays (for example for font-families, box-shadows, ...)
|
|
133
|
-
if (Array.isArray(
|
|
134
|
-
return
|
|
115
|
+
if (Array.isArray(value)) {
|
|
116
|
+
return value;
|
|
135
117
|
}
|
|
136
118
|
// Execute default behaviour
|
|
137
119
|
return undefined;
|
|
@@ -153,7 +135,7 @@ function mergeExtensions({ extend , ...theme }) {
|
|
|
153
135
|
* @param {string} key
|
|
154
136
|
* @return {Iterable<string[] & {alpha: string | undefined}>}
|
|
155
137
|
*/ function* toPaths(key) {
|
|
156
|
-
let path = (0, _toPath
|
|
138
|
+
let path = (0, _toPath.toPath)(key);
|
|
157
139
|
if (path.length === 0) {
|
|
158
140
|
return;
|
|
159
141
|
}
|
|
@@ -165,7 +147,7 @@ function mergeExtensions({ extend , ...theme }) {
|
|
|
165
147
|
let matches = key.match(pattern);
|
|
166
148
|
if (matches !== null) {
|
|
167
149
|
let [, prefix, alpha] = matches;
|
|
168
|
-
let newPath = (0, _toPath
|
|
150
|
+
let newPath = (0, _toPath.toPath)(prefix);
|
|
169
151
|
newPath.alpha = alpha;
|
|
170
152
|
yield newPath;
|
|
171
153
|
}
|
|
@@ -178,16 +160,16 @@ function resolveFunctionKeys(object) {
|
|
|
178
160
|
let val = object;
|
|
179
161
|
while(val !== undefined && val !== null && index < path.length){
|
|
180
162
|
val = val[path[index++]];
|
|
181
|
-
let shouldResolveAsFn = isFunction(val) && (path.alpha === undefined || index
|
|
163
|
+
let shouldResolveAsFn = isFunction(val) && (path.alpha === undefined || index <= path.length - 1);
|
|
182
164
|
val = shouldResolveAsFn ? val(resolvePath, configUtils) : val;
|
|
183
165
|
}
|
|
184
166
|
if (val !== undefined) {
|
|
185
167
|
if (path.alpha !== undefined) {
|
|
186
|
-
let normalized = (0, _pluginUtils
|
|
187
|
-
return (0, _withAlphaVariable
|
|
168
|
+
let normalized = (0, _pluginUtils.parseColorFormat)(val);
|
|
169
|
+
return (0, _withAlphaVariable.withAlphaValue)(normalized, path.alpha, (0, _toColorValue.default)(normalized));
|
|
188
170
|
}
|
|
189
|
-
if ((0, _isPlainObject
|
|
190
|
-
return (0, _cloneDeep
|
|
171
|
+
if ((0, _isPlainObject.default)(val)) {
|
|
172
|
+
return (0, _cloneDeep.cloneDeep)(val);
|
|
191
173
|
}
|
|
192
174
|
return val;
|
|
193
175
|
}
|
|
@@ -210,8 +192,8 @@ function extractPluginConfigs(configs) {
|
|
|
210
192
|
...allConfigs,
|
|
211
193
|
config
|
|
212
194
|
];
|
|
213
|
-
var
|
|
214
|
-
const plugins = (
|
|
195
|
+
var ref;
|
|
196
|
+
const plugins = (ref = config === null || config === void 0 ? void 0 : config.plugins) !== null && ref !== void 0 ? ref : [];
|
|
215
197
|
if (plugins.length === 0) {
|
|
216
198
|
return;
|
|
217
199
|
}
|
|
@@ -239,7 +221,7 @@ function resolveCorePlugins(corePluginConfigs) {
|
|
|
239
221
|
corePlugins: resolved
|
|
240
222
|
});
|
|
241
223
|
}
|
|
242
|
-
return (0, _configurePlugins
|
|
224
|
+
return (0, _configurePlugins.default)(corePluginConfig, resolved);
|
|
243
225
|
}, _corePluginList.default);
|
|
244
226
|
return result;
|
|
245
227
|
}
|
|
@@ -254,3 +236,24 @@ function resolvePluginLists(pluginLists) {
|
|
|
254
236
|
}, []);
|
|
255
237
|
return result;
|
|
256
238
|
}
|
|
239
|
+
function resolveConfig(configs) {
|
|
240
|
+
let allConfigs = [
|
|
241
|
+
...extractPluginConfigs(configs),
|
|
242
|
+
{
|
|
243
|
+
prefix: "",
|
|
244
|
+
important: false,
|
|
245
|
+
separator: ":",
|
|
246
|
+
variantOrder: _defaultConfigStub.default.variantOrder
|
|
247
|
+
},
|
|
248
|
+
];
|
|
249
|
+
var ref, ref1;
|
|
250
|
+
return (0, _normalizeConfig.normalizeConfig)((0, _defaults.defaults)({
|
|
251
|
+
theme: resolveFunctionKeys(mergeExtensions(mergeThemes(allConfigs.map((t)=>{
|
|
252
|
+
return (ref = t === null || t === void 0 ? void 0 : t.theme) !== null && ref !== void 0 ? ref : {};
|
|
253
|
+
})))),
|
|
254
|
+
corePlugins: resolveCorePlugins(allConfigs.map((c)=>c.corePlugins)),
|
|
255
|
+
plugins: resolvePluginLists(configs.map((c)=>{
|
|
256
|
+
return (ref1 = c === null || c === void 0 ? void 0 : c.plugins) !== null && ref1 !== void 0 ? ref1 : [];
|
|
257
|
+
}))
|
|
258
|
+
}, ...allConfigs));
|
|
259
|
+
}
|
|
@@ -2,9 +2,26 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
exports
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>resolveConfigPath
|
|
8
|
+
});
|
|
9
|
+
const _fs = /*#__PURE__*/ _interopRequireDefault(require("fs"));
|
|
10
|
+
const _path = /*#__PURE__*/ _interopRequireDefault(require("path"));
|
|
11
|
+
function _interopRequireDefault(obj) {
|
|
12
|
+
return obj && obj.__esModule ? obj : {
|
|
13
|
+
default: obj
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function isObject(value) {
|
|
17
|
+
return typeof value === "object" && value !== null;
|
|
18
|
+
}
|
|
19
|
+
function isEmpty(obj) {
|
|
20
|
+
return Object.keys(obj).length === 0;
|
|
21
|
+
}
|
|
22
|
+
function isString(value) {
|
|
23
|
+
return typeof value === "string" || value instanceof String;
|
|
24
|
+
}
|
|
8
25
|
function resolveConfigPath(pathOrConfig) {
|
|
9
26
|
// require('tailwindcss')({ theme: ..., variants: ... })
|
|
10
27
|
if (isObject(pathOrConfig) && pathOrConfig.config === undefined && !isEmpty(pathOrConfig)) {
|
|
@@ -35,17 +52,3 @@ function resolveConfigPath(pathOrConfig) {
|
|
|
35
52
|
}
|
|
36
53
|
return null;
|
|
37
54
|
}
|
|
38
|
-
function _interopRequireDefault(obj) {
|
|
39
|
-
return obj && obj.__esModule ? obj : {
|
|
40
|
-
default: obj
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
function isObject(value) {
|
|
44
|
-
return typeof value === "object" && value !== null;
|
|
45
|
-
}
|
|
46
|
-
function isEmpty(obj) {
|
|
47
|
-
return Object.keys(obj).length === 0;
|
|
48
|
-
}
|
|
49
|
-
function isString(value) {
|
|
50
|
-
return typeof value === "string" || value instanceof String;
|
|
51
|
-
}
|
package/lib/util/responsive.js
CHANGED
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
exports
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>responsive
|
|
8
|
+
});
|
|
9
|
+
const _postcss = /*#__PURE__*/ _interopRequireDefault(require("postcss"));
|
|
10
|
+
const _cloneNodes = /*#__PURE__*/ _interopRequireDefault(require("./cloneNodes"));
|
|
11
|
+
function _interopRequireDefault(obj) {
|
|
12
|
+
return obj && obj.__esModule ? obj : {
|
|
13
|
+
default: obj
|
|
14
|
+
};
|
|
15
|
+
}
|
|
8
16
|
function responsive(rules) {
|
|
9
17
|
return _postcss.default.atRule({
|
|
10
18
|
name: "responsive"
|
|
11
|
-
}).append((0, _cloneNodes
|
|
19
|
+
}).append((0, _cloneNodes.default)(Array.isArray(rules) ? rules : [
|
|
12
20
|
rules
|
|
13
21
|
]));
|
|
14
22
|
}
|
|
15
|
-
function _interopRequireDefault(obj) {
|
|
16
|
-
return obj && obj.__esModule ? obj : {
|
|
17
|
-
default: obj
|
|
18
|
-
};
|
|
19
|
-
}
|
|
@@ -2,18 +2,21 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
exports
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Object.defineProperty(exports, "splitAtTopLevelOnly", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>splitAtTopLevelOnly
|
|
8
|
+
});
|
|
9
|
+
const _regex = /*#__PURE__*/ _interopRequireWildcard(require("../lib/regex"));
|
|
10
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
8
11
|
if (typeof WeakMap !== "function") return null;
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
var cacheBabelInterop = new WeakMap();
|
|
13
|
+
var cacheNodeInterop = new WeakMap();
|
|
14
|
+
return (_getRequireWildcardCache = function(nodeInterop) {
|
|
15
|
+
return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
|
|
16
|
+
})(nodeInterop);
|
|
14
17
|
}
|
|
15
|
-
function _interopRequireWildcard(obj) {
|
|
16
|
-
if (obj && obj.__esModule) {
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
19
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
17
20
|
return obj;
|
|
18
21
|
}
|
|
19
22
|
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
@@ -21,14 +24,14 @@ function _interopRequireWildcard(obj) {
|
|
|
21
24
|
default: obj
|
|
22
25
|
};
|
|
23
26
|
}
|
|
24
|
-
var cache = _getRequireWildcardCache();
|
|
27
|
+
var cache = _getRequireWildcardCache(nodeInterop);
|
|
25
28
|
if (cache && cache.has(obj)) {
|
|
26
29
|
return cache.get(obj);
|
|
27
30
|
}
|
|
28
31
|
var newObj = {};
|
|
29
32
|
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
30
33
|
for(var key in obj){
|
|
31
|
-
if (Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
34
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
32
35
|
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
33
36
|
if (desc && (desc.get || desc.set)) {
|
|
34
37
|
Object.defineProperty(newObj, key, desc);
|
|
@@ -44,7 +47,7 @@ function _interopRequireWildcard(obj) {
|
|
|
44
47
|
return newObj;
|
|
45
48
|
}
|
|
46
49
|
function* splitAtTopLevelOnly(input, separator) {
|
|
47
|
-
let SPECIALS = new RegExp(`[(){}\\[\\]${
|
|
50
|
+
let SPECIALS = new RegExp(`[(){}\\[\\]${_regex.escape(separator)}]`, "g");
|
|
48
51
|
let depth = 0;
|
|
49
52
|
let lastIndex = 0;
|
|
50
53
|
let found = false;
|
package/lib/util/tap.js
CHANGED
package/lib/util/toColorValue.js
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
exports
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>toColorValue
|
|
8
|
+
});
|
|
6
9
|
function toColorValue(maybeFunction) {
|
|
7
10
|
return typeof maybeFunction === "function" ? maybeFunction({}) : maybeFunction;
|
|
8
11
|
}
|
package/lib/util/toPath.js
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Parse a path string into an array of path segments.
|
|
3
|
+
*
|
|
4
|
+
* Square bracket notation `a[b]` may be used to "escape" dots that would otherwise be interpreted as path separators.
|
|
5
|
+
*
|
|
6
|
+
* Example:
|
|
7
|
+
* a -> ['a']
|
|
8
|
+
* a.b.c -> ['a', 'b', 'c']
|
|
9
|
+
* a[b].c -> ['a', 'b', 'c']
|
|
10
|
+
* a[b.c].e.f -> ['a', 'b.c', 'e', 'f']
|
|
11
|
+
* a[b][c][d] -> ['a', 'b', 'c', 'd']
|
|
12
|
+
*
|
|
13
|
+
* @param {string|string[]} path
|
|
14
|
+
**/ "use strict";
|
|
2
15
|
Object.defineProperty(exports, "__esModule", {
|
|
3
16
|
value: true
|
|
4
17
|
});
|
|
5
|
-
exports
|
|
18
|
+
Object.defineProperty(exports, "toPath", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: ()=>toPath
|
|
21
|
+
});
|
|
6
22
|
function toPath(path) {
|
|
7
23
|
if (Array.isArray(path)) return path;
|
|
8
24
|
let openBrackets = path.split("[").length - 1;
|
|
@@ -2,8 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
exports
|
|
6
|
-
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>transformThemeValue
|
|
8
|
+
});
|
|
9
|
+
const _postcss = /*#__PURE__*/ _interopRequireDefault(require("postcss"));
|
|
10
|
+
function _interopRequireDefault(obj) {
|
|
11
|
+
return obj && obj.__esModule ? obj : {
|
|
12
|
+
default: obj
|
|
13
|
+
};
|
|
14
|
+
}
|
|
7
15
|
function transformThemeValue(themeSection) {
|
|
8
16
|
if ([
|
|
9
17
|
"fontSize",
|
|
@@ -54,8 +62,3 @@ function transformThemeValue(themeSection) {
|
|
|
54
62
|
return value;
|
|
55
63
|
};
|
|
56
64
|
}
|
|
57
|
-
function _interopRequireDefault(obj) {
|
|
58
|
-
return obj && obj.__esModule ? obj : {
|
|
59
|
-
default: obj
|
|
60
|
-
};
|
|
61
|
-
}
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
exports
|
|
6
|
-
|
|
5
|
+
Object.defineProperty(exports, "validateConfig", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: ()=>validateConfig
|
|
8
|
+
});
|
|
9
|
+
const _log = /*#__PURE__*/ _interopRequireDefault(require("./log"));
|
|
7
10
|
function _interopRequireDefault(obj) {
|
|
8
11
|
return obj && obj.__esModule ? obj : {
|
|
9
12
|
default: obj
|