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/tap.js
DELETED
package/lib/util/toColorValue.js
DELETED
package/lib/util/toPath.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = transformThemeValue;
|
|
7
|
-
|
|
8
|
-
var _postcss = _interopRequireDefault(require("postcss"));
|
|
9
|
-
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
function transformThemeValue(themeSection) {
|
|
13
|
-
if (['fontSize', 'outline'].includes(themeSection)) {
|
|
14
|
-
return value => Array.isArray(value) ? value[0] : value;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
if (['fontFamily', 'boxShadow', 'transitionProperty', 'transitionDuration', 'transitionDelay', 'transitionTimingFunction', 'backgroundImage', 'backgroundSize', 'backgroundColor', 'cursor', 'animation'].includes(themeSection)) {
|
|
18
|
-
return value => Array.isArray(value) ? value.join(', ') : value;
|
|
19
|
-
} // For backwards compatibility reasons, before we switched to underscores
|
|
20
|
-
// instead of commas for arbitrary values.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (['gridTemplateColumns', 'gridTemplateRows', 'objectPosition'].includes(themeSection)) {
|
|
24
|
-
return value => typeof value === 'string' ? _postcss.default.list.comma(value).join(' ') : value;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (themeSection === 'colors') {
|
|
28
|
-
return value => typeof value === 'function' ? value({}) : value;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
return value => value;
|
|
32
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.withAlphaValue = withAlphaValue;
|
|
7
|
-
exports.default = withAlphaVariable;
|
|
8
|
-
|
|
9
|
-
var _color = require("./color");
|
|
10
|
-
|
|
11
|
-
function withAlphaValue(color, alphaValue, defaultValue) {
|
|
12
|
-
if (typeof color === 'function') {
|
|
13
|
-
return color({
|
|
14
|
-
opacityValue: alphaValue
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
let parsed = (0, _color.parseColor)(color);
|
|
19
|
-
|
|
20
|
-
if (parsed === null) {
|
|
21
|
-
return defaultValue;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
return (0, _color.formatColor)({ ...parsed,
|
|
25
|
-
alpha: alphaValue
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function withAlphaVariable({
|
|
30
|
-
color,
|
|
31
|
-
property,
|
|
32
|
-
variable
|
|
33
|
-
}) {
|
|
34
|
-
if (typeof color === 'function') {
|
|
35
|
-
return {
|
|
36
|
-
[variable]: '1',
|
|
37
|
-
[property]: color({
|
|
38
|
-
opacityVariable: variable,
|
|
39
|
-
opacityValue: `var(${variable})`
|
|
40
|
-
})
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const parsed = (0, _color.parseColor)(color);
|
|
45
|
-
|
|
46
|
-
if (parsed === null) {
|
|
47
|
-
return {
|
|
48
|
-
[property]: color
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (parsed.alpha !== undefined) {
|
|
53
|
-
// Has an alpha value, return color as-is
|
|
54
|
-
return {
|
|
55
|
-
[property]: color
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
return {
|
|
60
|
-
[variable]: '1',
|
|
61
|
-
[property]: (0, _color.formatColor)({ ...parsed,
|
|
62
|
-
alpha: `var(${variable})`
|
|
63
|
-
})
|
|
64
|
-
};
|
|
65
|
-
}
|
package/nesting/README.md
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
# tailwindcss/nesting
|
|
2
|
-
|
|
3
|
-
This is a PostCSS plugin that wraps [postcss-nested](https://github.com/postcss/postcss-nested) or [postcss-nesting](https://github.com/jonathantneal/postcss-nesting) and acts as a compatibility layer to make sure your nesting plugin of choice properly understands Tailwind's custom syntax like `@apply` and `@screen`.
|
|
4
|
-
|
|
5
|
-
Add it to your PostCSS configuration, somewhere before Tailwind itself:
|
|
6
|
-
|
|
7
|
-
```js
|
|
8
|
-
// postcss.config.js
|
|
9
|
-
module.exports = {
|
|
10
|
-
plugins: [
|
|
11
|
-
require('postcss-import'),
|
|
12
|
-
require('tailwindcss/nesting'),
|
|
13
|
-
require('tailwindcss'),
|
|
14
|
-
require('autoprefixer'),
|
|
15
|
-
]
|
|
16
|
-
}
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
By default, it uses the [postcss-nested](https://github.com/postcss/postcss-nested) plugin under the hood, which uses a Sass-like syntax and is the plugin that powers nesting support in the [Tailwind CSS plugin API](https://tailwindcss.com/docs/plugins#css-in-js-syntax).
|
|
20
|
-
|
|
21
|
-
If you'd rather use [postcss-nesting](https://github.com/jonathantneal/postcss-nesting) (which is based on the work-in-progress [CSS Nesting](https://drafts.csswg.org/css-nesting-1/) specification), first install the plugin alongside:
|
|
22
|
-
|
|
23
|
-
```shell
|
|
24
|
-
npm install postcss-nesting
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
Then pass the plugin itself as an argument to `tailwindcss/nesting` in your PostCSS configuration:
|
|
28
|
-
|
|
29
|
-
```js
|
|
30
|
-
// postcss.config.js
|
|
31
|
-
module.exports = {
|
|
32
|
-
plugins: [
|
|
33
|
-
require('postcss-import'),
|
|
34
|
-
require('tailwindcss/nesting')(require('postcss-nesting')),
|
|
35
|
-
require('tailwindcss'),
|
|
36
|
-
require('autoprefixer'),
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
This can also be helpful if for whatever reason you need to use a very specific version of `postcss-nested` and want to override the version we bundle with `tailwindcss/nesting` itself.
|
|
42
|
-
|
package/nesting/index.js
DELETED
package/nesting/plugin.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
let postcss = require('postcss')
|
|
2
|
-
let postcssNested = require('postcss-nested')
|
|
3
|
-
|
|
4
|
-
module.exports = function nesting(opts = postcssNested) {
|
|
5
|
-
return (root, result) => {
|
|
6
|
-
root.walkAtRules('screen', (rule) => {
|
|
7
|
-
rule.name = 'media'
|
|
8
|
-
rule.params = `screen(${rule.params})`
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
root.walkAtRules('apply', (rule) => {
|
|
12
|
-
rule.before(postcss.decl({ prop: '__apply', value: rule.params, source: rule.source }))
|
|
13
|
-
rule.remove()
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
let plugin = (() => {
|
|
17
|
-
if (typeof opts === 'function') {
|
|
18
|
-
return opts
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (typeof opts === 'string') {
|
|
22
|
-
return require(opts)
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
if (Object.keys(opts).length <= 0) {
|
|
26
|
-
return postcssNested
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
throw new Error('tailwindcss/nesting should be loaded with a nesting plugin.')
|
|
30
|
-
})()
|
|
31
|
-
|
|
32
|
-
postcss([plugin]).process(root, result.opts).sync()
|
|
33
|
-
|
|
34
|
-
root.walkDecls('__apply', (decl) => {
|
|
35
|
-
decl.before(postcss.atRule({ name: 'apply', params: decl.value, source: decl.source }))
|
|
36
|
-
decl.remove()
|
|
37
|
-
})
|
|
38
|
-
|
|
39
|
-
return root
|
|
40
|
-
}
|
|
41
|
-
}
|