tailwindcss 0.0.0-insiders.ebc1c7a → 0.0.0-insiders.ec0049a
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/LICENSE +1 -2
- package/README.md +18 -11
- package/dist/chunk-AZANAYY2.mjs +1 -0
- package/dist/chunk-CH45MXZF.mjs +10 -0
- package/dist/chunk-V2K3XTS4.mjs +1 -0
- package/dist/colors-b_6i0Oi7.d.ts +295 -0
- package/dist/colors.d.mts +295 -0
- package/dist/colors.d.ts +5 -0
- package/dist/colors.js +1 -0
- package/dist/colors.mjs +1 -0
- package/dist/default-theme.d.mts +1147 -0
- package/dist/default-theme.d.ts +1147 -0
- package/dist/default-theme.js +1 -0
- package/dist/default-theme.mjs +1 -0
- package/dist/flatten-color-palette.d.mts +6 -0
- package/dist/flatten-color-palette.d.ts +6 -0
- package/dist/flatten-color-palette.js +1 -0
- package/dist/flatten-color-palette.mjs +1 -0
- package/dist/lib.d.mts +260 -0
- package/dist/lib.d.ts +3 -0
- package/dist/lib.js +33 -0
- package/dist/lib.mjs +24 -0
- package/dist/plugin.d.mts +11 -0
- package/dist/plugin.d.ts +104 -0
- package/dist/plugin.js +1 -0
- package/dist/plugin.mjs +1 -0
- package/dist/resolve-config-BIFUA2FY.d.ts +29 -0
- package/dist/resolve-config-QUZ9b-Gn.d.mts +190 -0
- package/dist/types-B254mqw1.d.mts +98 -0
- package/index.css +865 -0
- package/package.json +73 -110
- package/preflight.css +383 -0
- package/theme.css +453 -0
- package/CHANGELOG.md +0 -1742
- package/base.css +0 -1
- package/colors.js +0 -304
- package/components.css +0 -1
- package/defaultConfig.js +0 -4
- package/defaultTheme.js +0 -4
- package/lib/cli-peer-dependencies.js +0 -20
- package/lib/cli.js +0 -765
- package/lib/constants.js +0 -37
- package/lib/corePluginList.js +0 -8
- package/lib/corePlugins.js +0 -2977
- package/lib/css/LICENSE +0 -25
- package/lib/css/preflight.css +0 -354
- package/lib/featureFlags.js +0 -60
- package/lib/index.js +0 -31
- package/lib/lib/collapseAdjacentRules.js +0 -43
- package/lib/lib/evaluateTailwindFunctions.js +0 -192
- package/lib/lib/expandApplyAtRules.js +0 -245
- package/lib/lib/expandTailwindAtRules.js +0 -260
- package/lib/lib/generateRules.js +0 -362
- package/lib/lib/getModuleDependencies.js +0 -53
- package/lib/lib/normalizeTailwindDirectives.js +0 -68
- package/lib/lib/resolveDefaultsAtRules.js +0 -105
- package/lib/lib/setupContextUtils.js +0 -643
- package/lib/lib/setupTrackingContext.js +0 -190
- package/lib/lib/setupWatchingContext.js +0 -331
- package/lib/lib/sharedState.js +0 -29
- package/lib/lib/substituteScreenAtRules.js +0 -31
- package/lib/processTailwindFeatures.js +0 -57
- package/lib/util/bigSign.js +0 -10
- package/lib/util/buildMediaQuery.js +0 -36
- package/lib/util/cloneDeep.js +0 -18
- package/lib/util/cloneNodes.js +0 -18
- package/lib/util/color.js +0 -74
- package/lib/util/configurePlugins.js +0 -19
- package/lib/util/createPlugin.js +0 -33
- package/lib/util/createUtilityPlugin.js +0 -51
- package/lib/util/defaults.js +0 -20
- package/lib/util/escapeClassName.js +0 -21
- package/lib/util/escapeCommas.js +0 -10
- package/lib/util/flattenColorPalette.js +0 -15
- package/lib/util/getAllConfigs.js +0 -22
- package/lib/util/hashConfig.js +0 -16
- package/lib/util/isKeyframeRule.js +0 -10
- package/lib/util/isPlainObject.js +0 -15
- package/lib/util/log.js +0 -38
- package/lib/util/nameClass.js +0 -32
- package/lib/util/negateValue.js +0 -20
- package/lib/util/parseAnimationValue.js +0 -60
- package/lib/util/parseDependency.js +0 -74
- package/lib/util/parseObjectStyles.js +0 -28
- package/lib/util/pluginUtils.js +0 -318
- package/lib/util/prefixSelector.js +0 -23
- package/lib/util/resolveConfig.js +0 -289
- package/lib/util/resolveConfigPath.js +0 -59
- package/lib/util/responsive.js +0 -18
- package/lib/util/tap.js +0 -11
- package/lib/util/toColorValue.js +0 -10
- package/lib/util/toPath.js +0 -11
- package/lib/util/transformThemeValue.js +0 -32
- package/lib/util/withAlphaVariable.js +0 -65
- package/nesting/README.md +0 -42
- package/nesting/index.js +0 -12
- package/nesting/plugin.js +0 -41
- package/peers/index.js +0 -87302
- package/plugin.js +0 -3
- package/prettier.config.js +0 -19
- package/resolveConfig.js +0 -7
- package/screens.css +0 -1
- package/scripts/create-plugin-list.js +0 -10
- package/scripts/install-integrations.js +0 -27
- package/scripts/rebuildFixtures.js +0 -68
- package/src/cli-peer-dependencies.js +0 -9
- package/src/cli.js +0 -759
- package/src/constants.js +0 -17
- package/src/corePluginList.js +0 -1
- package/src/corePlugins.js +0 -2228
- package/src/css/LICENSE +0 -25
- package/src/css/preflight.css +0 -354
- package/src/featureFlags.js +0 -48
- package/src/index.js +0 -34
- package/src/lib/collapseAdjacentRules.js +0 -39
- package/src/lib/evaluateTailwindFunctions.js +0 -195
- package/src/lib/expandApplyAtRules.js +0 -251
- package/src/lib/expandTailwindAtRules.js +0 -262
- package/src/lib/generateRules.js +0 -319
- package/src/lib/getModuleDependencies.js +0 -39
- package/src/lib/normalizeTailwindDirectives.js +0 -77
- package/src/lib/resolveDefaultsAtRules.js +0 -105
- package/src/lib/setupContextUtils.js +0 -639
- package/src/lib/setupTrackingContext.js +0 -181
- package/src/lib/setupWatchingContext.js +0 -306
- package/src/lib/sharedState.js +0 -13
- package/src/lib/substituteScreenAtRules.js +0 -16
- package/src/processTailwindFeatures.js +0 -41
- package/src/util/bigSign.js +0 -3
- package/src/util/buildMediaQuery.js +0 -24
- package/src/util/cloneDeep.js +0 -11
- package/src/util/cloneNodes.js +0 -11
- package/src/util/color.js +0 -56
- package/src/util/configurePlugins.js +0 -23
- package/src/util/createPlugin.js +0 -27
- package/src/util/createUtilityPlugin.js +0 -46
- package/src/util/defaults.js +0 -11
- package/src/util/escapeClassName.js +0 -8
- package/src/util/escapeCommas.js +0 -3
- package/src/util/flattenColorPalette.js +0 -13
- package/src/util/getAllConfigs.js +0 -19
- package/src/util/hashConfig.js +0 -5
- package/src/util/isKeyframeRule.js +0 -3
- package/src/util/isPlainObject.js +0 -8
- package/src/util/log.js +0 -28
- package/src/util/nameClass.js +0 -22
- package/src/util/negateValue.js +0 -14
- package/src/util/parseAnimationValue.js +0 -62
- package/src/util/parseDependency.js +0 -45
- package/src/util/parseObjectStyles.js +0 -19
- package/src/util/pluginUtils.js +0 -295
- package/src/util/prefixSelector.js +0 -15
- package/src/util/resolveConfig.js +0 -282
- package/src/util/resolveConfigPath.js +0 -55
- package/src/util/responsive.js +0 -10
- package/src/util/tap.js +0 -4
- package/src/util/toColorValue.js +0 -3
- package/src/util/toPath.js +0 -4
- package/src/util/transformThemeValue.js +0 -37
- package/src/util/withAlphaVariable.js +0 -44
- package/stubs/defaultConfig.stub.js +0 -884
- package/stubs/defaultPostCssConfig.stub.js +0 -6
- package/stubs/simpleConfig.stub.js +0 -8
- package/tailwind.css +0 -5
- package/variants.css +0 -1
package/lib/util/cloneDeep.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.cloneDeep = cloneDeep;
|
|
7
|
-
|
|
8
|
-
function cloneDeep(value) {
|
|
9
|
-
if (Array.isArray(value)) {
|
|
10
|
-
return value.map(child => cloneDeep(child));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if (typeof value === 'object' && value !== null) {
|
|
14
|
-
return Object.fromEntries(Object.entries(value).map(([k, v]) => [k, cloneDeep(v)]));
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return value;
|
|
18
|
-
}
|
package/lib/util/cloneNodes.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = cloneNodes;
|
|
7
|
-
|
|
8
|
-
function cloneNodes(nodes, source) {
|
|
9
|
-
return nodes.map(node => {
|
|
10
|
-
let cloned = node.clone();
|
|
11
|
-
|
|
12
|
-
if (source !== undefined) {
|
|
13
|
-
cloned.source = source;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
return cloned;
|
|
17
|
-
});
|
|
18
|
-
}
|
package/lib/util/color.js
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.parseColor = parseColor;
|
|
7
|
-
exports.formatColor = formatColor;
|
|
8
|
-
|
|
9
|
-
var _colorName = _interopRequireDefault(require("color-name"));
|
|
10
|
-
|
|
11
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
13
|
-
let HEX = /^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;
|
|
14
|
-
let SHORT_HEX = /^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;
|
|
15
|
-
let VALUE = `(?:\\d+|\\d*\\.\\d+)%?`;
|
|
16
|
-
let SEP = `(?:\\s*,\\s*|\\s+)`;
|
|
17
|
-
let ALPHA_SEP = `\\s*[,/]\\s*`;
|
|
18
|
-
let RGB_HSL = new RegExp(`^(rgb|hsl)a?\\(\\s*(${VALUE})${SEP}(${VALUE})${SEP}(${VALUE})(?:${ALPHA_SEP}(${VALUE}))?\\s*\\)$`);
|
|
19
|
-
|
|
20
|
-
function parseColor(value) {
|
|
21
|
-
if (typeof value !== 'string') {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
value = value.trim();
|
|
26
|
-
|
|
27
|
-
if (value === 'transparent') {
|
|
28
|
-
return {
|
|
29
|
-
mode: 'rgb',
|
|
30
|
-
color: ['0', '0', '0'],
|
|
31
|
-
alpha: '0'
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
if (value in _colorName.default) {
|
|
36
|
-
return {
|
|
37
|
-
mode: 'rgb',
|
|
38
|
-
color: _colorName.default[value].map(v => v.toString())
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
let hex = value.replace(SHORT_HEX, (_, r, g, b, a) => ['#', r, r, g, g, b, b, a ? a + a : ''].join('')).match(HEX);
|
|
43
|
-
|
|
44
|
-
if (hex !== null) {
|
|
45
|
-
return {
|
|
46
|
-
mode: 'rgb',
|
|
47
|
-
color: [parseInt(hex[1], 16), parseInt(hex[2], 16), parseInt(hex[3], 16)].map(v => v.toString()),
|
|
48
|
-
alpha: hex[4] ? (parseInt(hex[4], 16) / 255).toString() : undefined
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
let match = value.match(RGB_HSL);
|
|
53
|
-
|
|
54
|
-
if (match !== null) {
|
|
55
|
-
var _match$, _match$$toString;
|
|
56
|
-
|
|
57
|
-
return {
|
|
58
|
-
mode: match[1],
|
|
59
|
-
color: [match[2], match[3], match[4]].map(v => v.toString()),
|
|
60
|
-
alpha: (_match$ = match[5]) === null || _match$ === void 0 ? void 0 : (_match$$toString = _match$.toString) === null || _match$$toString === void 0 ? void 0 : _match$$toString.call(_match$)
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return null;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function formatColor({
|
|
68
|
-
mode,
|
|
69
|
-
color,
|
|
70
|
-
alpha
|
|
71
|
-
}) {
|
|
72
|
-
let hasAlpha = alpha !== undefined;
|
|
73
|
-
return `${mode}(${color.join(' ')}${hasAlpha ? ` / ${alpha}` : ''})`;
|
|
74
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
|
-
|
|
8
|
-
function _default(pluginConfig, plugins) {
|
|
9
|
-
if (pluginConfig === undefined) {
|
|
10
|
-
return plugins;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const pluginNames = Array.isArray(pluginConfig) ? pluginConfig : [...new Set(plugins.filter(pluginName => {
|
|
14
|
-
return pluginConfig !== false && pluginConfig[pluginName] !== false;
|
|
15
|
-
}).concat(Object.keys(pluginConfig).filter(pluginName => {
|
|
16
|
-
return pluginConfig[pluginName] !== false;
|
|
17
|
-
})))];
|
|
18
|
-
return pluginNames;
|
|
19
|
-
}
|
package/lib/util/createPlugin.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
function createPlugin(plugin, config) {
|
|
9
|
-
return {
|
|
10
|
-
handler: plugin,
|
|
11
|
-
config
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
createPlugin.withOptions = function (pluginFunction, configFunction = () => ({})) {
|
|
16
|
-
const optionsFunction = function (options) {
|
|
17
|
-
return {
|
|
18
|
-
__options: options,
|
|
19
|
-
handler: pluginFunction(options),
|
|
20
|
-
config: configFunction(options)
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
optionsFunction.__isOptionsFunction = true; // Expose plugin dependencies so that `object-hash` returns a different
|
|
25
|
-
// value if anything here changes, to ensure a rebuild is triggered.
|
|
26
|
-
|
|
27
|
-
optionsFunction.__pluginFunction = pluginFunction;
|
|
28
|
-
optionsFunction.__configFunction = configFunction;
|
|
29
|
-
return optionsFunction;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
var _default = createPlugin;
|
|
33
|
-
exports.default = _default;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = createUtilityPlugin;
|
|
7
|
-
|
|
8
|
-
var _transformThemeValue = _interopRequireDefault(require("./transformThemeValue"));
|
|
9
|
-
|
|
10
|
-
var _pluginUtils = require("../util/pluginUtils");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
let asMap = new Map([[_pluginUtils.asValue, 'any'], [_pluginUtils.asColor, 'color'], [_pluginUtils.asAngle, 'angle'], [_pluginUtils.asLength, 'length'], [_pluginUtils.asLookupValue, 'lookup']]);
|
|
15
|
-
|
|
16
|
-
function createUtilityPlugin(themeKey, utilityVariations = [[themeKey, [themeKey]]], {
|
|
17
|
-
filterDefault = false,
|
|
18
|
-
resolveArbitraryValue = _pluginUtils.asValue
|
|
19
|
-
} = {}) {
|
|
20
|
-
let transformValue = (0, _transformThemeValue.default)(themeKey);
|
|
21
|
-
return function ({
|
|
22
|
-
matchUtilities,
|
|
23
|
-
theme
|
|
24
|
-
}) {
|
|
25
|
-
for (let utilityVariation of utilityVariations) {
|
|
26
|
-
var _theme, _asMap$get;
|
|
27
|
-
|
|
28
|
-
let group = Array.isArray(utilityVariation[0]) ? utilityVariation : [utilityVariation];
|
|
29
|
-
matchUtilities(group.reduce((obj, [classPrefix, properties]) => {
|
|
30
|
-
return Object.assign(obj, {
|
|
31
|
-
[classPrefix]: value => {
|
|
32
|
-
return properties.reduce((obj, name) => {
|
|
33
|
-
if (Array.isArray(name)) {
|
|
34
|
-
return Object.assign(obj, {
|
|
35
|
-
[name[0]]: name[1]
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return Object.assign(obj, {
|
|
40
|
-
[name]: transformValue(value)
|
|
41
|
-
});
|
|
42
|
-
}, {});
|
|
43
|
-
}
|
|
44
|
-
});
|
|
45
|
-
}, {}), {
|
|
46
|
-
values: filterDefault ? Object.fromEntries(Object.entries((_theme = theme(themeKey)) !== null && _theme !== void 0 ? _theme : {}).filter(([modifier]) => modifier !== 'DEFAULT')) : theme(themeKey),
|
|
47
|
-
type: (_asMap$get = asMap.get(resolveArbitraryValue)) !== null && _asMap$get !== void 0 ? _asMap$get : 'any'
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
}
|
package/lib/util/defaults.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.defaults = defaults;
|
|
7
|
-
|
|
8
|
-
function defaults(target, ...sources) {
|
|
9
|
-
for (let source of sources) {
|
|
10
|
-
for (let k in source) {
|
|
11
|
-
var _target$hasOwnPropert;
|
|
12
|
-
|
|
13
|
-
if (!(target !== null && target !== void 0 && (_target$hasOwnPropert = target.hasOwnProperty) !== null && _target$hasOwnPropert !== void 0 && _target$hasOwnPropert.call(target, k))) {
|
|
14
|
-
target[k] = source[k];
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return target;
|
|
20
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = escapeClassName;
|
|
7
|
-
|
|
8
|
-
var _postcssSelectorParser = _interopRequireDefault(require("postcss-selector-parser"));
|
|
9
|
-
|
|
10
|
-
var _escapeCommas = _interopRequireDefault(require("./escapeCommas"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function escapeClassName(className) {
|
|
15
|
-
var _node$raws$value, _node$raws;
|
|
16
|
-
|
|
17
|
-
let node = _postcssSelectorParser.default.className();
|
|
18
|
-
|
|
19
|
-
node.value = className;
|
|
20
|
-
return (0, _escapeCommas.default)((_node$raws$value = node === null || node === void 0 ? void 0 : (_node$raws = node.raws) === null || _node$raws === void 0 ? void 0 : _node$raws.value) !== null && _node$raws$value !== void 0 ? _node$raws$value : node.value);
|
|
21
|
-
}
|
package/lib/util/escapeCommas.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
const flattenColorPalette = colors => Object.assign({}, ...Object.entries(colors !== null && colors !== void 0 ? colors : {}).flatMap(([color, values]) => typeof values == 'object' ? Object.entries(flattenColorPalette(values)).map(([number, hex]) => ({
|
|
9
|
-
[color + (number === 'DEFAULT' ? '' : `-${number}`)]: hex
|
|
10
|
-
})) : [{
|
|
11
|
-
[`${color}`]: values
|
|
12
|
-
}]));
|
|
13
|
-
|
|
14
|
-
var _default = flattenColorPalette;
|
|
15
|
-
exports.default = _default;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = getAllConfigs;
|
|
7
|
-
|
|
8
|
-
var _defaultConfigStub = _interopRequireDefault(require("../../stubs/defaultConfig.stub.js"));
|
|
9
|
-
|
|
10
|
-
var _featureFlags = require("../featureFlags");
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function getAllConfigs(config) {
|
|
15
|
-
var _config$presets;
|
|
16
|
-
|
|
17
|
-
const configs = ((_config$presets = config === null || config === void 0 ? void 0 : config.presets) !== null && _config$presets !== void 0 ? _config$presets : [_defaultConfigStub.default]).slice().reverse().flatMap(preset => getAllConfigs(preset instanceof Function ? preset() : preset));
|
|
18
|
-
const features = {// Add experimental configs here...
|
|
19
|
-
};
|
|
20
|
-
const experimentals = Object.keys(features).filter(feature => (0, _featureFlags.flagEnabled)(config, feature)).map(feature => features[feature]);
|
|
21
|
-
return [config, ...experimentals, ...configs];
|
|
22
|
-
}
|
package/lib/util/hashConfig.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = hashConfig;
|
|
7
|
-
|
|
8
|
-
var _objectHash = _interopRequireDefault(require("object-hash"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
function hashConfig(config) {
|
|
13
|
-
return (0, _objectHash.default)(config, {
|
|
14
|
-
ignoreUnknown: true
|
|
15
|
-
});
|
|
16
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = isPlainObject;
|
|
7
|
-
|
|
8
|
-
function isPlainObject(value) {
|
|
9
|
-
if (Object.prototype.toString.call(value) !== '[object Object]') {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
const prototype = Object.getPrototypeOf(value);
|
|
14
|
-
return prototype === null || prototype === Object.prototype;
|
|
15
|
-
}
|
package/lib/util/log.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _chalk = _interopRequireDefault(require("chalk"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
var _default = {
|
|
13
|
-
info(messages) {
|
|
14
|
-
if (process.env.JEST_WORKER_ID !== undefined) return;
|
|
15
|
-
console.warn('');
|
|
16
|
-
messages.forEach(message => {
|
|
17
|
-
console.warn(_chalk.default.bold.cyan('info'), '-', message);
|
|
18
|
-
});
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
warn(messages) {
|
|
22
|
-
if (process.env.JEST_WORKER_ID !== undefined) return;
|
|
23
|
-
console.warn('');
|
|
24
|
-
messages.forEach(message => {
|
|
25
|
-
console.warn(_chalk.default.bold.yellow('warn'), '-', message);
|
|
26
|
-
});
|
|
27
|
-
},
|
|
28
|
-
|
|
29
|
-
risk(messages) {
|
|
30
|
-
if (process.env.JEST_WORKER_ID !== undefined) return;
|
|
31
|
-
console.warn('');
|
|
32
|
-
messages.forEach(message => {
|
|
33
|
-
console.warn(_chalk.default.bold.magenta('risk'), '-', message);
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
};
|
|
38
|
-
exports.default = _default;
|
package/lib/util/nameClass.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = nameClass;
|
|
7
|
-
|
|
8
|
-
var _escapeClassName = _interopRequireDefault(require("./escapeClassName"));
|
|
9
|
-
|
|
10
|
-
var _escapeCommas = _interopRequireDefault(require("./escapeCommas"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function asClass(name) {
|
|
15
|
-
return (0, _escapeCommas.default)(`.${(0, _escapeClassName.default)(name)}`);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
function nameClass(classPrefix, key) {
|
|
19
|
-
if (key === 'DEFAULT') {
|
|
20
|
-
return asClass(classPrefix);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
if (key === '-') {
|
|
24
|
-
return asClass(`-${classPrefix}`);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (key.startsWith('-')) {
|
|
28
|
-
return asClass(`-${classPrefix}${key}`);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return asClass(`${classPrefix}-${key}`);
|
|
32
|
-
}
|
package/lib/util/negateValue.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = _default;
|
|
7
|
-
|
|
8
|
-
function _default(value) {
|
|
9
|
-
value = `${value}`; // Flip sign of numbers
|
|
10
|
-
|
|
11
|
-
if (/^[+-]?(\d+|\d*\.\d+)(e[+-]?\d+)?(%|\w+)?$/.test(value)) {
|
|
12
|
-
return value.replace(/^[+-]?/, sign => sign === '-' ? '' : '-');
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
if (value.includes('var(') || value.includes('calc(')) {
|
|
16
|
-
return `calc(${value} * -1)`;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return value;
|
|
20
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = parseAnimationValue;
|
|
7
|
-
const DIRECTIONS = new Set(['normal', 'reverse', 'alternate', 'alternate-reverse']);
|
|
8
|
-
const PLAY_STATES = new Set(['running', 'paused']);
|
|
9
|
-
const FILL_MODES = new Set(['none', 'forwards', 'backwards', 'both']);
|
|
10
|
-
const ITERATION_COUNTS = new Set(['infinite']);
|
|
11
|
-
const TIMINGS = new Set(['linear', 'ease', 'ease-in', 'ease-out', 'ease-in-out', 'step-start', 'step-end']);
|
|
12
|
-
const TIMING_FNS = ['cubic-bezier', 'steps'];
|
|
13
|
-
const COMMA = /\,(?![^(]*\))/g; // Comma separator that is not located between brackets. E.g.: `cubiz-bezier(a, b, c)` these don't count.
|
|
14
|
-
|
|
15
|
-
const SPACE = /\ +(?![^(]*\))/g; // Similar to the one above, but with spaces instead.
|
|
16
|
-
|
|
17
|
-
const TIME = /^(-?[\d.]+m?s)$/;
|
|
18
|
-
const DIGIT = /^(\d+)$/;
|
|
19
|
-
|
|
20
|
-
function parseAnimationValue(input) {
|
|
21
|
-
let animations = input.split(COMMA);
|
|
22
|
-
return animations.map(animation => {
|
|
23
|
-
let value = animation.trim();
|
|
24
|
-
let result = {
|
|
25
|
-
value
|
|
26
|
-
};
|
|
27
|
-
let parts = value.split(SPACE);
|
|
28
|
-
let seen = new Set();
|
|
29
|
-
|
|
30
|
-
for (let part of parts) {
|
|
31
|
-
if (!seen.has('DIRECTIONS') && DIRECTIONS.has(part)) {
|
|
32
|
-
result.direction = part;
|
|
33
|
-
seen.add('DIRECTIONS');
|
|
34
|
-
} else if (!seen.has('PLAY_STATES') && PLAY_STATES.has(part)) {
|
|
35
|
-
result.playState = part;
|
|
36
|
-
seen.add('PLAY_STATES');
|
|
37
|
-
} else if (!seen.has('FILL_MODES') && FILL_MODES.has(part)) {
|
|
38
|
-
result.fillMode = part;
|
|
39
|
-
seen.add('FILL_MODES');
|
|
40
|
-
} else if (!seen.has('ITERATION_COUNTS') && (ITERATION_COUNTS.has(part) || DIGIT.test(part))) {
|
|
41
|
-
result.iterationCount = part;
|
|
42
|
-
seen.add('ITERATION_COUNTS');
|
|
43
|
-
} else if (!seen.has('TIMING_FUNCTION') && TIMINGS.has(part)) {
|
|
44
|
-
result.timingFunction = part;
|
|
45
|
-
seen.add('TIMING_FUNCTION');
|
|
46
|
-
} else if (!seen.has('TIMING_FUNCTION') && TIMING_FNS.some(f => part.startsWith(`${f}(`))) {
|
|
47
|
-
result.timingFunction = part;
|
|
48
|
-
seen.add('TIMING_FUNCTION');
|
|
49
|
-
} else if (!seen.has('DURATION') && TIME.test(part)) {
|
|
50
|
-
result.duration = part;
|
|
51
|
-
seen.add('DURATION');
|
|
52
|
-
} else if (!seen.has('DELAY') && TIME.test(part)) {
|
|
53
|
-
result.delay = part;
|
|
54
|
-
seen.add('DELAY');
|
|
55
|
-
} else result.name = part;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return result;
|
|
59
|
-
});
|
|
60
|
-
}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = parseDependency;
|
|
7
|
-
|
|
8
|
-
var _isGlob = _interopRequireDefault(require("is-glob"));
|
|
9
|
-
|
|
10
|
-
var _globParent = _interopRequireDefault(require("glob-parent"));
|
|
11
|
-
|
|
12
|
-
var _path = _interopRequireDefault(require("path"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
// Based on `glob-base`
|
|
17
|
-
// https://github.com/micromatch/glob-base/blob/master/index.js
|
|
18
|
-
function parseGlob(pattern) {
|
|
19
|
-
let glob = pattern;
|
|
20
|
-
let base = (0, _globParent.default)(pattern);
|
|
21
|
-
|
|
22
|
-
if (base !== '.') {
|
|
23
|
-
glob = pattern.substr(base.length);
|
|
24
|
-
|
|
25
|
-
if (glob.charAt(0) === '/') {
|
|
26
|
-
glob = glob.substr(1);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (glob.substr(0, 2) === './') {
|
|
31
|
-
glob = glob.substr(2);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (glob.charAt(0) === '/') {
|
|
35
|
-
glob = glob.substr(1);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
base,
|
|
40
|
-
glob
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
function parseDependency(normalizedFileOrGlob) {
|
|
45
|
-
let message;
|
|
46
|
-
|
|
47
|
-
if ((0, _isGlob.default)(normalizedFileOrGlob)) {
|
|
48
|
-
let {
|
|
49
|
-
base,
|
|
50
|
-
glob
|
|
51
|
-
} = parseGlob(normalizedFileOrGlob);
|
|
52
|
-
message = {
|
|
53
|
-
type: 'dir-dependency',
|
|
54
|
-
dir: _path.default.resolve(base),
|
|
55
|
-
glob
|
|
56
|
-
};
|
|
57
|
-
} else {
|
|
58
|
-
message = {
|
|
59
|
-
type: 'dependency',
|
|
60
|
-
file: _path.default.resolve(normalizedFileOrGlob)
|
|
61
|
-
};
|
|
62
|
-
} // rollup-plugin-postcss does not support dir-dependency messages
|
|
63
|
-
// but directories can be watched in the same way as files
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (message.type === 'dir-dependency' && process.env.ROLLUP_WATCH === 'true') {
|
|
67
|
-
message = {
|
|
68
|
-
type: 'dependency',
|
|
69
|
-
file: message.dir
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
return message;
|
|
74
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = parseObjectStyles;
|
|
7
|
-
|
|
8
|
-
var _postcss = _interopRequireDefault(require("postcss"));
|
|
9
|
-
|
|
10
|
-
var _postcssNested = _interopRequireDefault(require("postcss-nested"));
|
|
11
|
-
|
|
12
|
-
var _postcssJs = _interopRequireDefault(require("postcss-js"));
|
|
13
|
-
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
function parseObjectStyles(styles) {
|
|
17
|
-
if (!Array.isArray(styles)) {
|
|
18
|
-
return parseObjectStyles([styles]);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return styles.flatMap(style => {
|
|
22
|
-
return (0, _postcss.default)([(0, _postcssNested.default)({
|
|
23
|
-
bubble: ['screen']
|
|
24
|
-
})]).process(style, {
|
|
25
|
-
parser: _postcssJs.default
|
|
26
|
-
}).root.nodes;
|
|
27
|
-
});
|
|
28
|
-
}
|