tailwindcss 0.0.0-insiders.7c337f2 → 0.0.0-insiders.7d8eb21
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 +246 -6
- package/README.md +13 -9
- package/defaultTheme.d.ts +2 -1
- package/lib/cli/build/deps.js +54 -0
- package/lib/cli/build/index.js +48 -0
- package/lib/cli/build/plugin.js +362 -0
- package/lib/cli/build/utils.js +78 -0
- package/lib/cli/build/watching.js +178 -0
- package/lib/cli/help/index.js +71 -0
- package/lib/cli/index.js +18 -0
- package/lib/cli/init/index.js +46 -0
- package/lib/cli/shared.js +12 -0
- package/lib/cli-peer-dependencies.js +18 -5
- package/lib/cli.js +62 -592
- package/lib/constants.js +19 -12
- package/lib/corePluginList.js +5 -3
- package/lib/corePlugins.js +619 -347
- package/lib/css/preflight.css +7 -0
- package/lib/featureFlags.js +34 -22
- package/lib/index.js +16 -9
- package/lib/lib/cacheInvalidation.js +42 -21
- package/lib/lib/collapseAdjacentRules.js +16 -14
- package/lib/lib/collapseDuplicateDeclarations.js +13 -10
- package/lib/lib/content.js +177 -0
- package/lib/lib/defaultExtractor.js +230 -33
- package/lib/lib/detectNesting.js +13 -4
- package/lib/lib/evaluateTailwindFunctions.js +105 -42
- package/lib/lib/expandApplyAtRules.js +151 -92
- package/lib/lib/expandTailwindAtRules.js +134 -149
- package/lib/lib/findAtConfigPath.js +44 -0
- package/lib/lib/generateRules.js +404 -185
- package/lib/lib/getModuleDependencies.js +21 -18
- package/lib/lib/normalizeTailwindDirectives.js +11 -8
- package/lib/lib/offsets.js +285 -0
- package/lib/lib/partitionApplyAtRules.js +14 -11
- package/lib/lib/regex.js +60 -0
- package/lib/lib/remap-bitfield.js +87 -0
- package/lib/lib/resolveDefaultsAtRules.js +97 -79
- package/lib/lib/setupContextUtils.js +567 -242
- package/lib/lib/setupTrackingContext.js +77 -106
- package/lib/lib/sharedState.js +18 -10
- package/lib/lib/substituteScreenAtRules.js +9 -7
- package/lib/postcss-plugins/nesting/index.js +7 -5
- package/lib/postcss-plugins/nesting/plugin.js +10 -8
- package/lib/processTailwindFeatures.js +34 -31
- package/lib/public/colors.js +7 -5
- 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 +10 -5
- package/lib/util/cloneDeep.js +6 -5
- package/lib/util/cloneNodes.js +9 -2
- package/lib/util/color.js +20 -17
- package/lib/util/configurePlugins.js +5 -2
- package/lib/util/createPlugin.js +6 -5
- package/lib/util/createUtilityPlugin.js +15 -13
- package/lib/util/dataTypes.js +75 -51
- package/lib/util/defaults.js +8 -5
- package/lib/util/escapeClassName.js +13 -10
- package/lib/util/escapeCommas.js +4 -1
- package/lib/util/flattenColorPalette.js +7 -8
- package/lib/util/formatVariantSelector.js +270 -103
- package/lib/util/getAllConfigs.js +34 -15
- 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 → isSyntacticallyValidPropertyValue.js} +34 -26
- package/lib/util/log.js +14 -8
- package/lib/util/nameClass.js +19 -8
- package/lib/util/negateValue.js +20 -5
- package/lib/util/normalizeConfig.js +94 -53
- package/lib/util/normalizeScreens.js +115 -4
- package/lib/util/parseAnimationValue.js +43 -41
- package/lib/util/parseBoxShadowValue.js +12 -45
- package/lib/util/parseDependency.js +37 -55
- package/lib/util/parseGlob.js +34 -0
- package/lib/util/parseObjectStyles.js +15 -12
- package/lib/util/pluginUtils.js +146 -42
- package/lib/util/prefixSelector.js +26 -9
- package/lib/util/removeAlphaVariables.js +29 -0
- package/lib/util/resolveConfig.js +104 -105
- package/lib/util/resolveConfigPath.js +20 -17
- package/lib/util/responsive.js +12 -9
- package/lib/util/splitAtTopLevelOnly.js +43 -0
- 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 +23 -11
- package/lib/util/validateConfig.js +24 -0
- package/lib/util/validateFormalSyntax.js +24 -0
- package/lib/util/withAlphaVariable.js +32 -24
- package/package.json +32 -29
- package/peers/index.js +6693 -3036
- package/plugin.d.ts +10 -5
- package/resolveConfig.d.ts +12 -0
- package/scripts/generate-types.js +53 -0
- package/scripts/release-channel.js +18 -0
- package/scripts/release-notes.js +21 -0
- package/scripts/type-utils.js +27 -0
- package/src/cli/build/deps.js +56 -0
- package/src/cli/build/index.js +49 -0
- package/src/cli/build/plugin.js +434 -0
- package/src/cli/build/utils.js +76 -0
- package/src/cli/build/watching.js +227 -0
- package/src/cli/help/index.js +70 -0
- package/src/cli/index.js +3 -0
- package/src/cli/init/index.js +50 -0
- package/src/cli/shared.js +5 -0
- package/src/cli-peer-dependencies.js +7 -1
- package/src/cli.js +46 -659
- package/src/corePlugins.js +346 -79
- package/src/css/preflight.css +7 -0
- package/src/featureFlags.js +12 -2
- package/src/index.js +5 -0
- package/src/lib/content.js +213 -0
- package/src/lib/defaultExtractor.js +202 -35
- package/src/lib/detectNesting.js +9 -1
- package/src/lib/evaluateTailwindFunctions.js +78 -7
- package/src/lib/expandApplyAtRules.js +129 -34
- package/src/lib/expandTailwindAtRules.js +12 -50
- package/src/lib/findAtConfigPath.js +48 -0
- package/src/lib/generateRules.js +379 -126
- package/src/lib/offsets.js +351 -0
- package/src/lib/regex.js +74 -0
- package/src/lib/remap-bitfield.js +82 -0
- package/src/lib/resolveDefaultsAtRules.js +53 -36
- package/src/lib/setupContextUtils.js +510 -120
- package/src/lib/setupTrackingContext.js +8 -45
- package/src/lib/sharedState.js +2 -0
- package/src/util/buildMediaQuery.js +5 -3
- package/src/util/cloneNodes.js +5 -1
- package/src/util/dataTypes.js +51 -26
- package/src/util/formatVariantSelector.js +317 -101
- package/src/util/getAllConfigs.js +19 -0
- package/src/util/{isValidArbitraryValue.js → isSyntacticallyValidPropertyValue.js} +1 -1
- package/src/util/log.js +1 -1
- package/src/util/nameClass.js +4 -0
- package/src/util/negateValue.js +10 -2
- package/src/util/normalizeConfig.js +40 -10
- package/src/util/normalizeScreens.js +99 -4
- package/src/util/parseBoxShadowValue.js +3 -50
- package/src/util/parseDependency.js +37 -42
- package/src/util/parseGlob.js +24 -0
- package/src/util/pluginUtils.js +132 -10
- package/src/util/prefixSelector.js +28 -10
- package/src/util/removeAlphaVariables.js +24 -0
- package/src/util/resolveConfig.js +70 -62
- package/src/util/splitAtTopLevelOnly.js +45 -0
- package/src/util/toPath.js +1 -1
- package/src/util/transformThemeValue.js +13 -3
- package/src/util/validateConfig.js +13 -0
- package/src/util/validateFormalSyntax.js +34 -0
- package/src/util/withAlphaVariable.js +1 -1
- package/stubs/defaultConfig.stub.js +165 -164
- package/stubs/simpleConfig.stub.js +1 -0
- package/types/config.d.ts +77 -37
- package/types/generated/default-theme.d.ts +342 -0
- package/types/index.d.ts +7 -1
- package/types.d.ts +0 -1
|
@@ -2,9 +2,34 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
3
|
value: true
|
|
4
4
|
});
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
+
withAlphaValue: ()=>withAlphaValue,
|
|
13
|
+
default: ()=>withAlphaVariable
|
|
14
|
+
});
|
|
15
|
+
const _color = require("./color");
|
|
16
|
+
function withAlphaValue(color, alphaValue, defaultValue) {
|
|
17
|
+
if (typeof color === "function") {
|
|
18
|
+
return color({
|
|
19
|
+
opacityValue: alphaValue
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
let parsed = (0, _color.parseColor)(color, {
|
|
23
|
+
loose: true
|
|
24
|
+
});
|
|
25
|
+
if (parsed === null) {
|
|
26
|
+
return defaultValue;
|
|
27
|
+
}
|
|
28
|
+
return (0, _color.formatColor)({
|
|
29
|
+
...parsed,
|
|
30
|
+
alpha: alphaValue
|
|
31
|
+
});
|
|
32
|
+
}
|
|
8
33
|
function withAlphaVariable({ color , property , variable }) {
|
|
9
34
|
let properties = [].concat(property);
|
|
10
35
|
if (typeof color === "function") {
|
|
@@ -21,28 +46,26 @@ function withAlphaVariable({ color , property , variable }) {
|
|
|
21
46
|
}))
|
|
22
47
|
};
|
|
23
48
|
}
|
|
24
|
-
const parsed = (0, _color
|
|
49
|
+
const parsed = (0, _color.parseColor)(color);
|
|
25
50
|
if (parsed === null) {
|
|
26
51
|
return Object.fromEntries(properties.map((p)=>[
|
|
27
52
|
p,
|
|
28
53
|
color
|
|
29
|
-
]
|
|
30
|
-
));
|
|
54
|
+
]));
|
|
31
55
|
}
|
|
32
56
|
if (parsed.alpha !== undefined) {
|
|
33
57
|
// Has an alpha value, return color as-is
|
|
34
58
|
return Object.fromEntries(properties.map((p)=>[
|
|
35
59
|
p,
|
|
36
60
|
color
|
|
37
|
-
]
|
|
38
|
-
));
|
|
61
|
+
]));
|
|
39
62
|
}
|
|
40
63
|
return {
|
|
41
64
|
[variable]: "1",
|
|
42
65
|
...Object.fromEntries(properties.map((p)=>{
|
|
43
66
|
return [
|
|
44
67
|
p,
|
|
45
|
-
(0, _color
|
|
68
|
+
(0, _color.formatColor)({
|
|
46
69
|
...parsed,
|
|
47
70
|
alpha: `var(${variable})`
|
|
48
71
|
})
|
|
@@ -50,18 +73,3 @@ function withAlphaVariable({ color , property , variable }) {
|
|
|
50
73
|
}))
|
|
51
74
|
};
|
|
52
75
|
}
|
|
53
|
-
function withAlphaValue(color, alphaValue, defaultValue) {
|
|
54
|
-
if (typeof color === "function") {
|
|
55
|
-
return color({
|
|
56
|
-
opacityValue: alphaValue
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
let parsed = (0, _color).parseColor(color);
|
|
60
|
-
if (parsed === null) {
|
|
61
|
-
return defaultValue;
|
|
62
|
-
}
|
|
63
|
-
return (0, _color).formatColor({
|
|
64
|
-
...parsed,
|
|
65
|
-
alpha: alphaValue
|
|
66
|
-
});
|
|
67
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tailwindcss",
|
|
3
|
-
"version": "0.0.0-insiders.
|
|
3
|
+
"version": "0.0.0-insiders.7d8eb21",
|
|
4
4
|
"description": "A utility-first CSS framework for rapidly building custom user interfaces.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -13,20 +13,21 @@
|
|
|
13
13
|
"tailwindcss": "lib/cli.js"
|
|
14
14
|
},
|
|
15
15
|
"scripts": {
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"rebuild-fixtures": "npm run
|
|
20
|
-
"prepublishOnly": "npm install --force && npm run
|
|
16
|
+
"prebuild": "npm run generate && rimraf lib",
|
|
17
|
+
"build": "swc src --out-dir lib --copy-files",
|
|
18
|
+
"postbuild": "esbuild lib/cli-peer-dependencies.js --bundle --platform=node --outfile=peers/index.js",
|
|
19
|
+
"rebuild-fixtures": "npm run build && node -r @swc/register scripts/rebuildFixtures.js",
|
|
20
|
+
"prepublishOnly": "npm install --force && npm run build",
|
|
21
21
|
"style": "eslint .",
|
|
22
22
|
"pretest": "npm run generate",
|
|
23
23
|
"test": "jest",
|
|
24
24
|
"test:integrations": "npm run test --prefix ./integrations",
|
|
25
25
|
"install:integrations": "node scripts/install-integrations.js",
|
|
26
|
-
"posttest": "npm run style",
|
|
27
26
|
"generate:plugin-list": "node -r @swc/register scripts/create-plugin-list.js",
|
|
28
27
|
"generate:types": "node -r @swc/register scripts/generate-types.js",
|
|
29
|
-
"generate": "npm run generate:plugin-list && npm run generate:types"
|
|
28
|
+
"generate": "npm run generate:plugin-list && npm run generate:types",
|
|
29
|
+
"release-channel": "node ./scripts/release-channel.js",
|
|
30
|
+
"release-notes": "node ./scripts/release-notes.js"
|
|
30
31
|
},
|
|
31
32
|
"files": [
|
|
32
33
|
"src/*",
|
|
@@ -42,20 +43,19 @@
|
|
|
42
43
|
"*.js"
|
|
43
44
|
],
|
|
44
45
|
"devDependencies": {
|
|
45
|
-
"@swc/cli": "^0.1.
|
|
46
|
-
"@swc/core": "^1.
|
|
47
|
-
"@swc/jest": "^0.2.
|
|
46
|
+
"@swc/cli": "^0.1.59",
|
|
47
|
+
"@swc/core": "^1.3.24",
|
|
48
|
+
"@swc/jest": "^0.2.24",
|
|
48
49
|
"@swc/register": "^0.1.10",
|
|
49
|
-
"autoprefixer": "^10.4.
|
|
50
|
-
"cssnano": "^5.1.
|
|
51
|
-
"esbuild": "^0.
|
|
52
|
-
"eslint": "^8.
|
|
50
|
+
"autoprefixer": "^10.4.13",
|
|
51
|
+
"cssnano": "^5.1.14",
|
|
52
|
+
"esbuild": "^0.16.10",
|
|
53
|
+
"eslint": "^8.30.0",
|
|
53
54
|
"eslint-config-prettier": "^8.5.0",
|
|
54
|
-
"eslint-plugin-prettier": "^4.
|
|
55
|
-
"jest": "^
|
|
56
|
-
"jest-diff": "^
|
|
57
|
-
"prettier": "^2.
|
|
58
|
-
"prettier-plugin-tailwindcss": "^0.1.10",
|
|
55
|
+
"eslint-plugin-prettier": "^4.2.1",
|
|
56
|
+
"jest": "^28.1.3",
|
|
57
|
+
"jest-diff": "^28.1.3",
|
|
58
|
+
"prettier": "^2.8.1",
|
|
59
59
|
"rimraf": "^3.0.0",
|
|
60
60
|
"source-map-js": "^1.0.2"
|
|
61
61
|
},
|
|
@@ -63,27 +63,29 @@
|
|
|
63
63
|
"postcss": "^8.0.9"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"arg": "^5.0.
|
|
66
|
+
"arg": "^5.0.2",
|
|
67
67
|
"chokidar": "^3.5.3",
|
|
68
68
|
"color-name": "^1.1.4",
|
|
69
|
-
"detective": "^5.2.
|
|
69
|
+
"detective": "^5.2.1",
|
|
70
70
|
"didyoumean": "^1.2.2",
|
|
71
71
|
"dlv": "^1.1.3",
|
|
72
|
-
"fast-glob": "^3.2.
|
|
72
|
+
"fast-glob": "^3.2.12",
|
|
73
73
|
"glob-parent": "^6.0.2",
|
|
74
74
|
"is-glob": "^4.0.3",
|
|
75
|
-
"lilconfig": "^2.0.
|
|
75
|
+
"lilconfig": "^2.0.6",
|
|
76
|
+
"micromatch": "^4.0.5",
|
|
76
77
|
"normalize-path": "^3.0.0",
|
|
77
78
|
"object-hash": "^3.0.0",
|
|
78
79
|
"picocolors": "^1.0.0",
|
|
79
|
-
"postcss": "^8.4.
|
|
80
|
+
"postcss": "^8.4.20",
|
|
81
|
+
"postcss-import": "^14.1.0",
|
|
80
82
|
"postcss-js": "^4.0.0",
|
|
81
83
|
"postcss-load-config": "^3.1.4",
|
|
82
|
-
"postcss-nested": "
|
|
83
|
-
"postcss-selector-parser": "^6.0.
|
|
84
|
+
"postcss-nested": "6.0.0",
|
|
85
|
+
"postcss-selector-parser": "^6.0.11",
|
|
84
86
|
"postcss-value-parser": "^4.2.0",
|
|
85
87
|
"quick-lru": "^5.1.1",
|
|
86
|
-
"resolve": "^1.22.
|
|
88
|
+
"resolve": "^1.22.1"
|
|
87
89
|
},
|
|
88
90
|
"browserslist": [
|
|
89
91
|
"> 1%",
|
|
@@ -99,7 +101,8 @@
|
|
|
99
101
|
"testPathIgnorePatterns": [
|
|
100
102
|
"/node_modules/",
|
|
101
103
|
"/integrations/",
|
|
102
|
-
"/standalone-cli/"
|
|
104
|
+
"/standalone-cli/",
|
|
105
|
+
"\\.test\\.skip\\.js$"
|
|
103
106
|
],
|
|
104
107
|
"transform": {
|
|
105
108
|
"\\.js$": "@swc/jest"
|