tailwindcss 0.0.0-oxide-insiders.a7fe2fe → 0.0.0-oxide-insiders.759a8c2
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/lib/cli/build/deps.js +34 -18
- package/lib/cli/build/index.js +45 -12
- package/lib/cli/build/plugin.js +273 -90
- package/lib/cli/build/utils.js +56 -24
- package/lib/cli/build/watching.js +156 -38
- package/lib/cli/help/index.js +61 -16
- package/lib/cli/index.js +121 -62
- package/lib/cli/init/index.js +47 -23
- package/lib/cli-peer-dependencies.js +23 -13
- package/lib/cli.js +5 -1
- package/lib/corePluginList.js +7 -4
- package/lib/corePlugins.js +855 -386
- package/lib/featureFlags.js +43 -18
- package/lib/lib/cacheInvalidation.js +78 -30
- package/lib/lib/collapseAdjacentRules.js +46 -23
- package/lib/lib/collapseDuplicateDeclarations.js +70 -27
- package/lib/lib/content.js +134 -41
- package/lib/lib/defaultExtractor.js +201 -96
- package/lib/lib/detectNesting.js +38 -12
- package/lib/lib/evaluateTailwindFunctions.js +192 -103
- package/lib/lib/expandApplyAtRules.js +488 -181
- package/lib/lib/expandTailwindAtRules.js +240 -70
- package/lib/lib/findAtConfigPath.js +34 -15
- package/lib/lib/generateRules.js +775 -353
- package/lib/lib/getModuleDependencies.js +67 -29
- package/lib/lib/load-config.js +27 -17
- package/lib/lib/normalizeTailwindDirectives.js +73 -27
- package/lib/lib/offsets.js +227 -62
- package/lib/lib/partitionApplyAtRules.js +53 -29
- package/lib/lib/regex.js +50 -28
- package/lib/lib/remap-bitfield.js +86 -9
- package/lib/lib/resolveDefaultsAtRules.js +123 -53
- package/lib/lib/setupContextUtils.js +1117 -584
- package/lib/lib/setupTrackingContext.js +149 -58
- package/lib/lib/sharedState.js +71 -23
- package/lib/lib/substituteScreenAtRules.js +19 -9
- package/lib/oxide/cli/build/deps.js +46 -23
- package/lib/oxide/cli/build/index.js +44 -12
- package/lib/oxide/cli/build/plugin.js +271 -89
- package/lib/oxide/cli/build/utils.js +55 -24
- package/lib/oxide/cli/build/watching.js +153 -36
- package/lib/oxide/cli/help/index.js +60 -16
- package/lib/oxide/cli/index.js +128 -67
- package/lib/oxide/cli/init/index.js +40 -19
- package/lib/oxide/cli.js +3 -2
- package/lib/plugin.js +58 -31
- package/lib/postcss-plugins/nesting/index.js +13 -7
- package/lib/postcss-plugins/nesting/plugin.js +65 -20
- package/lib/processTailwindFeatures.js +41 -10
- package/lib/public/colors.js +25 -16
- package/lib/public/create-plugin.js +11 -6
- package/lib/public/default-config.js +12 -6
- package/lib/public/default-theme.js +12 -6
- package/lib/public/load-config.js +9 -5
- package/lib/public/resolve-config.js +10 -6
- package/lib/util/applyImportantSelector.js +28 -17
- package/lib/util/bigSign.js +9 -6
- package/lib/util/buildMediaQuery.js +19 -10
- package/lib/util/cloneDeep.js +19 -9
- package/lib/util/cloneNodes.js +29 -14
- package/lib/util/color.js +87 -47
- package/lib/util/colorNames.js +752 -0
- package/lib/util/configurePlugins.js +18 -9
- package/lib/util/createPlugin.js +17 -8
- package/lib/util/createUtilityPlugin.js +30 -16
- package/lib/util/dataTypes.js +189 -38
- package/lib/util/defaults.js +21 -9
- package/lib/util/escapeClassName.js +15 -9
- package/lib/util/escapeCommas.js +9 -6
- package/lib/util/flattenColorPalette.js +11 -7
- package/lib/util/formatVariantSelector.js +209 -60
- package/lib/util/getAllConfigs.js +44 -35
- package/lib/util/hashConfig.js +12 -8
- package/lib/util/isKeyframeRule.js +10 -7
- package/lib/util/isPlainObject.js +14 -9
- package/lib/util/isSyntacticallyValidPropertyValue.js +45 -14
- package/lib/util/log.js +20 -9
- package/lib/util/nameClass.js +31 -10
- package/lib/util/negateValue.js +28 -10
- package/lib/util/normalizeConfig.js +242 -63
- package/lib/util/normalizeScreens.js +145 -70
- package/lib/util/parseAnimationValue.js +64 -14
- package/lib/util/parseBoxShadowValue.js +63 -14
- package/lib/util/parseDependency.js +39 -13
- package/lib/util/parseGlob.js +25 -8
- package/lib/util/parseObjectStyles.js +29 -18
- package/lib/util/pluginUtils.js +196 -77
- package/lib/util/prefixSelector.js +31 -12
- package/lib/util/pseudoElements.js +116 -34
- package/lib/util/removeAlphaVariables.js +23 -8
- package/lib/util/resolveConfig.js +224 -105
- package/lib/util/resolveConfigPath.js +45 -15
- package/lib/util/responsive.js +10 -6
- package/lib/util/splitAtTopLevelOnly.js +46 -10
- package/lib/util/tap.js +11 -7
- package/lib/util/toColorValue.js +10 -7
- package/lib/util/toPath.js +28 -8
- package/lib/util/transformThemeValue.js +49 -14
- package/lib/util/validateConfig.js +25 -15
- package/lib/util/validateFormalSyntax.js +14 -6
- package/lib/util/withAlphaVariable.js +54 -30
- package/package.json +18 -22
- package/peers/index.js +57849 -43101
- package/src/lib/expandTailwindAtRules.js +1 -1
- package/src/lib/setupTrackingContext.js +1 -1
- package/src/util/color.js +1 -1
- package/src/util/colorNames.js +150 -0
- package/src/util/pseudoElements.js +4 -4
|
@@ -1,25 +1,39 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value:
|
|
4
|
-
}), Object.defineProperty(exports, "default", {
|
|
5
|
-
enumerable: !0,
|
|
6
|
-
get: ()=>transformThemeValue
|
|
3
|
+
value: true
|
|
7
4
|
});
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
Object.defineProperty(exports, "default", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return transformThemeValue;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _postcss = /*#__PURE__*/ _interop_require_default(require("postcss"));
|
|
12
|
+
const _isPlainObject = /*#__PURE__*/ _interop_require_default(require("./isPlainObject"));
|
|
13
|
+
function _interop_require_default(obj) {
|
|
10
14
|
return obj && obj.__esModule ? obj : {
|
|
11
15
|
default: obj
|
|
12
16
|
};
|
|
13
17
|
}
|
|
14
18
|
function transformThemeValue(themeSection) {
|
|
15
|
-
|
|
19
|
+
if ([
|
|
16
20
|
"fontSize",
|
|
17
21
|
"outline"
|
|
18
|
-
].includes(themeSection)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
].includes(themeSection)) {
|
|
23
|
+
return (value)=>{
|
|
24
|
+
if (typeof value === "function") value = value({});
|
|
25
|
+
if (Array.isArray(value)) value = value[0];
|
|
26
|
+
return value;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
if (themeSection === "fontFamily") {
|
|
30
|
+
return (value)=>{
|
|
31
|
+
if (typeof value === "function") value = value({});
|
|
32
|
+
let families = Array.isArray(value) && (0, _isPlainObject.default)(value[1]) ? value[0] : value;
|
|
33
|
+
return Array.isArray(families) ? families.join(", ") : families;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
if ([
|
|
23
37
|
"boxShadow",
|
|
24
38
|
"transitionProperty",
|
|
25
39
|
"transitionDuration",
|
|
@@ -30,9 +44,30 @@ function transformThemeValue(themeSection) {
|
|
|
30
44
|
"backgroundColor",
|
|
31
45
|
"cursor",
|
|
32
46
|
"animation"
|
|
33
|
-
].includes(themeSection)
|
|
47
|
+
].includes(themeSection)) {
|
|
48
|
+
return (value)=>{
|
|
49
|
+
if (typeof value === "function") value = value({});
|
|
50
|
+
if (Array.isArray(value)) value = value.join(", ");
|
|
51
|
+
return value;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
// For backwards compatibility reasons, before we switched to underscores
|
|
55
|
+
// instead of commas for arbitrary values.
|
|
56
|
+
if ([
|
|
34
57
|
"gridTemplateColumns",
|
|
35
58
|
"gridTemplateRows",
|
|
36
59
|
"objectPosition"
|
|
37
|
-
].includes(themeSection)
|
|
60
|
+
].includes(themeSection)) {
|
|
61
|
+
return (value)=>{
|
|
62
|
+
if (typeof value === "function") value = value({});
|
|
63
|
+
if (typeof value === "string") value = _postcss.default.list.comma(value).join(" ");
|
|
64
|
+
return value;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
return (value, opts = {})=>{
|
|
68
|
+
if (typeof value === "function") {
|
|
69
|
+
value = value(opts);
|
|
70
|
+
}
|
|
71
|
+
return value;
|
|
72
|
+
};
|
|
38
73
|
}
|
|
@@ -1,27 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value:
|
|
4
|
-
}), Object.defineProperty(exports, "validateConfig", {
|
|
5
|
-
enumerable: !0,
|
|
6
|
-
get: ()=>validateConfig
|
|
3
|
+
value: true
|
|
7
4
|
});
|
|
8
|
-
|
|
5
|
+
Object.defineProperty(exports, "validateConfig", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return validateConfig;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _log = /*#__PURE__*/ _interop_require_default(require("./log"));
|
|
12
|
+
function _interop_require_default(obj) {
|
|
9
13
|
return obj && obj.__esModule ? obj : {
|
|
10
14
|
default: obj
|
|
11
15
|
};
|
|
12
|
-
}
|
|
16
|
+
}
|
|
13
17
|
function validateConfig(config) {
|
|
14
|
-
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
if (config.content.files.length === 0) {
|
|
19
|
+
_log.default.warn("content-problems", [
|
|
20
|
+
"The `content` option in your Tailwind CSS configuration is missing or empty.",
|
|
21
|
+
"Configure your content sources or your generated CSS will be missing styles.",
|
|
22
|
+
"https://tailwindcss.com/docs/content-configuration"
|
|
23
|
+
]);
|
|
24
|
+
}
|
|
25
|
+
// Warn if the line-clamp plugin is installed
|
|
19
26
|
try {
|
|
20
27
|
let plugin = require("@tailwindcss/line-clamp");
|
|
21
|
-
config.plugins.includes(plugin)
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
if (config.plugins.includes(plugin)) {
|
|
29
|
+
_log.default.warn("line-clamp-in-core", [
|
|
30
|
+
"As of Tailwind CSS v3.3, the `@tailwindcss/line-clamp` plugin is now included by default.",
|
|
31
|
+
"Remove it from the `plugins` array in your configuration to eliminate this warning."
|
|
32
|
+
]);
|
|
33
|
+
config.plugins = config.plugins.filter((p)=>p !== plugin);
|
|
34
|
+
}
|
|
25
35
|
} catch {}
|
|
26
36
|
return config;
|
|
27
37
|
}
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value:
|
|
4
|
-
}), Object.defineProperty(exports, "backgroundSize", {
|
|
5
|
-
enumerable: !0,
|
|
6
|
-
get: ()=>backgroundSize
|
|
3
|
+
value: true
|
|
7
4
|
});
|
|
8
|
-
|
|
5
|
+
Object.defineProperty(exports, "backgroundSize", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return backgroundSize;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _dataTypes = require("./dataTypes");
|
|
12
|
+
const _splitAtTopLevelOnly = require("./splitAtTopLevelOnly");
|
|
9
13
|
function backgroundSize(value) {
|
|
10
14
|
let keywordValues = [
|
|
11
15
|
"cover",
|
|
12
16
|
"contain"
|
|
13
17
|
];
|
|
18
|
+
// the <length-percentage> type will probably be a css function
|
|
19
|
+
// so we have to use `splitAtTopLevelOnly`
|
|
14
20
|
return (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(value, ",").every((part)=>{
|
|
15
21
|
let sizes = (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(part, "_").filter(Boolean);
|
|
16
|
-
|
|
22
|
+
if (sizes.length === 1 && keywordValues.includes(sizes[0])) return true;
|
|
23
|
+
if (sizes.length !== 1 && sizes.length !== 2) return false;
|
|
24
|
+
return sizes.every((size)=>(0, _dataTypes.length)(size) || (0, _dataTypes.percentage)(size) || size === "auto");
|
|
17
25
|
});
|
|
18
26
|
}
|
|
@@ -1,55 +1,79 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value:
|
|
4
|
-
})
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
5
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
6
|
-
enumerable:
|
|
7
|
+
enumerable: true,
|
|
7
8
|
get: all[name]
|
|
8
9
|
});
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
withAlphaValue: function() {
|
|
13
|
+
return withAlphaValue;
|
|
14
|
+
},
|
|
15
|
+
default: function() {
|
|
16
|
+
return withAlphaVariable;
|
|
17
|
+
}
|
|
12
18
|
});
|
|
13
19
|
const _color = require("./color");
|
|
14
20
|
function withAlphaValue(color, alphaValue, defaultValue) {
|
|
15
|
-
if ("function"
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
if (typeof color === "function") {
|
|
22
|
+
return color({
|
|
23
|
+
opacityValue: alphaValue
|
|
24
|
+
});
|
|
25
|
+
}
|
|
18
26
|
let parsed = (0, _color.parseColor)(color, {
|
|
19
|
-
loose:
|
|
27
|
+
loose: true
|
|
20
28
|
});
|
|
21
|
-
|
|
29
|
+
if (parsed === null) {
|
|
30
|
+
return defaultValue;
|
|
31
|
+
}
|
|
32
|
+
return (0, _color.formatColor)({
|
|
22
33
|
...parsed,
|
|
23
34
|
alpha: alphaValue
|
|
24
35
|
});
|
|
25
36
|
}
|
|
26
37
|
function withAlphaVariable({ color , property , variable }) {
|
|
27
38
|
let properties = [].concat(property);
|
|
28
|
-
if ("function"
|
|
29
|
-
|
|
30
|
-
|
|
39
|
+
if (typeof color === "function") {
|
|
40
|
+
return {
|
|
41
|
+
[variable]: "1",
|
|
42
|
+
...Object.fromEntries(properties.map((p)=>{
|
|
43
|
+
return [
|
|
44
|
+
p,
|
|
45
|
+
color({
|
|
46
|
+
opacityVariable: variable,
|
|
47
|
+
opacityValue: `var(${variable})`
|
|
48
|
+
})
|
|
49
|
+
];
|
|
50
|
+
}))
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
const parsed = (0, _color.parseColor)(color);
|
|
54
|
+
if (parsed === null) {
|
|
55
|
+
return Object.fromEntries(properties.map((p)=>[
|
|
31
56
|
p,
|
|
32
|
-
color
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
p,
|
|
44
|
-
color
|
|
45
|
-
])) : {
|
|
57
|
+
color
|
|
58
|
+
]));
|
|
59
|
+
}
|
|
60
|
+
if (parsed.alpha !== undefined) {
|
|
61
|
+
// Has an alpha value, return color as-is
|
|
62
|
+
return Object.fromEntries(properties.map((p)=>[
|
|
63
|
+
p,
|
|
64
|
+
color
|
|
65
|
+
]));
|
|
66
|
+
}
|
|
67
|
+
return {
|
|
46
68
|
[variable]: "1",
|
|
47
|
-
...Object.fromEntries(properties.map((p)=>
|
|
69
|
+
...Object.fromEntries(properties.map((p)=>{
|
|
70
|
+
return [
|
|
48
71
|
p,
|
|
49
72
|
(0, _color.formatColor)({
|
|
50
73
|
...parsed,
|
|
51
74
|
alpha: `var(${variable})`
|
|
52
75
|
})
|
|
53
|
-
]
|
|
76
|
+
];
|
|
77
|
+
}))
|
|
54
78
|
};
|
|
55
79
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss",
|
|
3
|
-
"version": "0.0.0-oxide-insiders.
|
|
3
|
+
"version": "0.0.0-oxide-insiders.759a8c2",
|
|
4
4
|
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -48,39 +48,36 @@
|
|
|
48
48
|
"*.js"
|
|
49
49
|
],
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@swc/cli": "0.1.62",
|
|
52
|
-
"@swc/core": "1.3.
|
|
53
|
-
"@swc/jest": "0.2.26",
|
|
54
|
-
"@swc/register": "0.1.10",
|
|
51
|
+
"@swc/cli": "^0.1.62",
|
|
52
|
+
"@swc/core": "^1.3.56",
|
|
53
|
+
"@swc/jest": "^0.2.26",
|
|
54
|
+
"@swc/register": "^0.1.10",
|
|
55
55
|
"autoprefixer": "^10.4.14",
|
|
56
|
-
"concurrently": "^
|
|
57
|
-
"cssnano": "^
|
|
58
|
-
"esbuild": "^0.17.
|
|
59
|
-
"eslint": "^8.
|
|
56
|
+
"concurrently": "^8.0.1",
|
|
57
|
+
"cssnano": "^6.0.0",
|
|
58
|
+
"esbuild": "^0.17.18",
|
|
59
|
+
"eslint": "^8.39.0",
|
|
60
60
|
"eslint-config-prettier": "^8.8.0",
|
|
61
61
|
"eslint-plugin-prettier": "^4.2.1",
|
|
62
62
|
"jest": "^29.5.0",
|
|
63
63
|
"jest-diff": "^29.5.0",
|
|
64
|
-
"prettier": "^2.8.
|
|
65
|
-
"rimraf": "^
|
|
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": {
|
|
73
|
-
"@
|
|
70
|
+
"@alloc/quick-lru": "^5.2.0",
|
|
71
|
+
"@tailwindcss/oxide": "0.0.0-oxide-insiders.759a8c2",
|
|
74
72
|
"arg": "^5.0.2",
|
|
75
73
|
"browserslist": "^4.21.5",
|
|
76
74
|
"chokidar": "^3.5.3",
|
|
77
|
-
"color-name": "^1.1.4",
|
|
78
75
|
"didyoumean": "^1.2.2",
|
|
79
76
|
"dlv": "^1.1.3",
|
|
80
77
|
"fast-glob": "^3.2.12",
|
|
81
78
|
"glob-parent": "^6.0.2",
|
|
82
79
|
"is-glob": "^4.0.3",
|
|
83
|
-
"jiti": "^1.
|
|
80
|
+
"jiti": "^1.18.2",
|
|
84
81
|
"lightningcss": "^1.18.0",
|
|
85
82
|
"lilconfig": "^2.1.0",
|
|
86
83
|
"micromatch": "^4.0.5",
|
|
@@ -88,13 +85,12 @@
|
|
|
88
85
|
"object-hash": "^3.0.0",
|
|
89
86
|
"picocolors": "^1.0.0",
|
|
90
87
|
"postcss": "^8.4.23",
|
|
91
|
-
"postcss-import": "^
|
|
88
|
+
"postcss-import": "^15.1.0",
|
|
92
89
|
"postcss-js": "^4.0.1",
|
|
93
|
-
"postcss-load-config": "^
|
|
94
|
-
"postcss-nested": "6.0.1",
|
|
90
|
+
"postcss-load-config": "^4.0.1",
|
|
91
|
+
"postcss-nested": "^6.0.1",
|
|
95
92
|
"postcss-selector-parser": "^6.0.11",
|
|
96
93
|
"postcss-value-parser": "^4.2.0",
|
|
97
|
-
"quick-lru": "^5.1.1",
|
|
98
94
|
"resolve": "^1.22.3",
|
|
99
95
|
"sucrase": "^3.32.0"
|
|
100
96
|
},
|