tailwindcss 0.0.0-oxide-insiders.dddaded → 0.0.0-oxide-insiders.b2e3cf2
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 +10 -18
- package/lib/cli/build/index.js +10 -41
- package/lib/cli/build/plugin.js +87 -268
- package/lib/cli/build/utils.js +18 -40
- package/lib/cli/build/watching.js +35 -151
- package/lib/cli/help/index.js +15 -58
- package/lib/cli/index.js +61 -120
- package/lib/cli/init/index.js +21 -43
- package/lib/cli-peer-dependencies.js +13 -15
- package/lib/cli.js +1 -5
- package/lib/corePluginList.js +3 -4
- package/lib/corePlugins.js +394 -857
- package/lib/featureFlags.js +14 -34
- package/lib/index.js +1 -5
- package/lib/lib/cacheInvalidation.js +29 -75
- package/lib/lib/collapseAdjacentRules.js +22 -43
- package/lib/lib/collapseDuplicateDeclarations.js +27 -68
- package/lib/lib/content.js +37 -126
- package/lib/lib/defaultExtractor.js +96 -199
- package/lib/lib/detectNesting.js +12 -36
- package/lib/lib/evaluateTailwindFunctions.js +101 -188
- package/lib/lib/expandApplyAtRules.js +177 -482
- package/lib/lib/expandTailwindAtRules.js +69 -237
- package/lib/lib/findAtConfigPath.js +13 -30
- package/lib/lib/generateRules.js +349 -765
- package/lib/lib/getModuleDependencies.js +27 -63
- package/lib/lib/load-config.js +16 -24
- package/lib/lib/normalizeTailwindDirectives.js +26 -70
- package/lib/lib/offsets.js +61 -224
- package/lib/lib/partitionApplyAtRules.js +29 -51
- package/lib/lib/regex.js +22 -30
- package/lib/lib/remap-bitfield.js +9 -84
- package/lib/lib/resolveDefaultsAtRules.js +50 -116
- package/lib/lib/setupContextUtils.js +576 -1099
- package/lib/lib/setupTrackingContext.js +54 -143
- package/lib/lib/sharedState.js +15 -59
- package/lib/lib/substituteScreenAtRules.js +8 -16
- package/lib/oxide/cli/build/deps.js +17 -32
- package/lib/oxide/cli/build/index.js +10 -40
- package/lib/oxide/cli/build/plugin.js +87 -267
- package/lib/oxide/cli/build/utils.js +18 -39
- package/lib/oxide/cli/build/watching.js +34 -149
- package/lib/oxide/cli/help/index.js +15 -57
- package/lib/oxide/cli/index.js +66 -127
- package/lib/oxide/cli/init/index.js +17 -36
- package/lib/oxide/cli.js +2 -3
- package/lib/plugin.js +30 -57
- package/lib/postcss-plugins/nesting/index.js +6 -10
- package/lib/postcss-plugins/nesting/plugin.js +17 -60
- package/lib/processTailwindFeatures.js +8 -37
- package/lib/public/colors.js +15 -22
- package/lib/public/create-plugin.js +5 -8
- package/lib/public/default-config.js +5 -9
- package/lib/public/default-theme.js +5 -9
- package/lib/public/load-config.js +4 -6
- package/lib/public/resolve-config.js +4 -6
- package/lib/util/applyImportantSelector.js +15 -24
- package/lib/util/bigSign.js +6 -7
- package/lib/util/buildMediaQuery.js +10 -17
- package/lib/util/cloneDeep.js +9 -17
- package/lib/util/cloneNodes.js +14 -27
- package/lib/util/color.js +45 -81
- package/lib/util/configurePlugins.js +9 -16
- package/lib/util/createPlugin.js +8 -15
- package/lib/util/createUtilityPlugin.js +15 -27
- package/lib/util/dataTypes.js +23 -144
- package/lib/util/defaults.js +9 -19
- package/lib/util/escapeClassName.js +6 -10
- package/lib/util/escapeCommas.js +6 -7
- package/lib/util/flattenColorPalette.js +6 -8
- package/lib/util/formatVariantSelector.js +49 -190
- package/lib/util/getAllConfigs.js +35 -42
- package/lib/util/hashConfig.js +6 -8
- package/lib/util/isKeyframeRule.js +6 -7
- package/lib/util/isPlainObject.js +8 -11
- package/lib/util/isSyntacticallyValidPropertyValue.js +13 -42
- package/lib/util/log.js +7 -14
- package/lib/util/nameClass.js +6 -21
- package/lib/util/negateValue.js +10 -26
- package/lib/util/normalizeConfig.js +63 -240
- package/lib/util/normalizeScreens.js +70 -137
- package/lib/util/parseAnimationValue.js +13 -61
- package/lib/util/parseBoxShadowValue.js +12 -57
- package/lib/util/parseDependency.js +13 -37
- package/lib/util/parseGlob.js +7 -22
- package/lib/util/parseObjectStyles.js +17 -26
- package/lib/util/pluginUtils.js +69 -176
- package/lib/util/prefixSelector.js +11 -28
- package/lib/util/pseudoElements.js +29 -105
- package/lib/util/removeAlphaVariables.js +8 -21
- package/lib/util/resolveConfig.js +103 -220
- package/lib/util/resolveConfigPath.js +12 -38
- package/lib/util/responsive.js +4 -6
- package/lib/util/splitAtTopLevelOnly.js +10 -44
- package/lib/util/tap.js +6 -8
- package/lib/util/toColorValue.js +6 -7
- package/lib/util/toPath.js +8 -26
- package/lib/util/transformThemeValue.js +12 -45
- package/lib/util/validateConfig.js +14 -22
- package/lib/util/validateFormalSyntax.js +5 -11
- package/lib/util/withAlphaVariable.js +28 -48
- package/package.json +3 -3
- package/peers/index.js +14 -16
- package/src/cli/build/plugin.js +1 -1
- package/src/cli.js +1 -1
- package/src/corePlugins.js +16 -17
- package/src/featureFlags.js +2 -3
- package/src/index.js +1 -5
- package/src/lib/expandTailwindAtRules.js +2 -2
- package/src/lib/sharedState.js +0 -15
- package/src/oxide/cli/build/plugin.ts +1 -1
- package/src/plugin.js +1 -1
package/lib/cli/init/index.js
CHANGED
|
@@ -1,61 +1,39 @@
|
|
|
1
|
-
// @ts-check
|
|
2
1
|
"use strict";
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value:
|
|
5
|
-
})
|
|
6
|
-
|
|
7
|
-
enumerable: true,
|
|
3
|
+
value: !0
|
|
4
|
+
}), Object.defineProperty(exports, "init", {
|
|
5
|
+
enumerable: !0,
|
|
8
6
|
get: ()=>init
|
|
9
7
|
});
|
|
10
|
-
const _fs =
|
|
11
|
-
const _path = /*#__PURE__*/ _interopRequireDefault(require("path"));
|
|
8
|
+
const _fs = _interopRequireDefault(require("fs")), _path = _interopRequireDefault(require("path"));
|
|
12
9
|
function _interopRequireDefault(obj) {
|
|
13
10
|
return obj && obj.__esModule ? obj : {
|
|
14
11
|
default: obj
|
|
15
12
|
};
|
|
16
13
|
}
|
|
17
|
-
function isESM() {
|
|
18
|
-
const pkgPath = _path.default.resolve("./package.json");
|
|
19
|
-
try {
|
|
20
|
-
let pkg = JSON.parse(_fs.default.readFileSync(pkgPath, "utf8"));
|
|
21
|
-
return pkg.type && pkg.type === "module";
|
|
22
|
-
} catch (err) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
14
|
function init(args) {
|
|
27
|
-
let messages = [];
|
|
28
|
-
let isProjectESM = args["--ts"] || args["--esm"] || isESM();
|
|
29
|
-
let syntax = args["--ts"] ? "ts" : isProjectESM ? "js" : "cjs";
|
|
30
|
-
let extension = args["--ts"] ? "ts" : "js";
|
|
31
15
|
var _args___;
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
16
|
+
let messages = [], isProjectESM = args["--ts"] || args["--esm"] || function() {
|
|
17
|
+
let pkgPath = _path.default.resolve("./package.json");
|
|
18
|
+
try {
|
|
19
|
+
let pkg = JSON.parse(_fs.default.readFileSync(pkgPath, "utf8"));
|
|
20
|
+
return pkg.type && "module" === pkg.type;
|
|
21
|
+
} catch (err) {
|
|
22
|
+
return !1;
|
|
23
|
+
}
|
|
24
|
+
}(), syntax = args["--ts"] ? "ts" : isProjectESM ? "js" : "cjs", extension = args["--ts"] ? "ts" : "js", tailwindConfigLocation = _path.default.resolve(null !== (_args___ = args._[1]) && void 0 !== _args___ ? _args___ : `./tailwind.config.${extension}`);
|
|
25
|
+
if (_fs.default.existsSync(tailwindConfigLocation)) messages.push(`${_path.default.basename(tailwindConfigLocation)} already exists.`);
|
|
26
|
+
else {
|
|
27
|
+
let stubContentsFile = _fs.default.readFileSync(args["--full"] ? _path.default.resolve(__dirname, "../../../stubs/config.full.js") : _path.default.resolve(__dirname, "../../../stubs/config.simple.js"), "utf8"), stubFile = _fs.default.readFileSync(_path.default.resolve(__dirname, `../../../stubs/tailwind.config.${syntax}`), "utf8");
|
|
28
|
+
stubContentsFile = stubContentsFile.replace("../colors", "tailwindcss/colors"), stubFile = stubFile.replace("__CONFIG__", stubContentsFile.replace("module.exports =", "").trim()).trim() + "\n\n", _fs.default.writeFileSync(tailwindConfigLocation, stubFile, "utf8"), messages.push(`Created Tailwind CSS config file: ${_path.default.basename(tailwindConfigLocation)}`);
|
|
44
29
|
}
|
|
45
30
|
if (args["--postcss"]) {
|
|
46
31
|
let postcssConfigLocation = _path.default.resolve("./postcss.config.js");
|
|
47
|
-
if (_fs.default.existsSync(postcssConfigLocation)) {
|
|
48
|
-
|
|
49
|
-
} else {
|
|
32
|
+
if (_fs.default.existsSync(postcssConfigLocation)) messages.push(`${_path.default.basename(postcssConfigLocation)} already exists.`);
|
|
33
|
+
else {
|
|
50
34
|
let stubFile = _fs.default.readFileSync(isProjectESM ? _path.default.resolve(__dirname, "../../../stubs/postcss.config.js") : _path.default.resolve(__dirname, "../../../stubs/postcss.config.cjs"), "utf8");
|
|
51
|
-
_fs.default.writeFileSync(postcssConfigLocation, stubFile, "utf8");
|
|
52
|
-
messages.push(`Created PostCSS config file: ${_path.default.basename(postcssConfigLocation)}`);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
if (messages.length > 0) {
|
|
56
|
-
console.log();
|
|
57
|
-
for (let message of messages){
|
|
58
|
-
console.log(message);
|
|
35
|
+
_fs.default.writeFileSync(postcssConfigLocation, stubFile, "utf8"), messages.push(`Created PostCSS config file: ${_path.default.basename(postcssConfigLocation)}`);
|
|
59
36
|
}
|
|
60
37
|
}
|
|
38
|
+
if (messages.length > 0) for (let message of (console.log(), messages))console.log(message);
|
|
61
39
|
}
|
|
@@ -1,19 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value: true
|
|
4
|
-
});
|
|
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
|
-
lazyPostcss: ()=>lazyPostcss,
|
|
13
|
-
lazyPostcssImport: ()=>lazyPostcssImport,
|
|
14
|
-
lazyAutoprefixer: ()=>lazyAutoprefixer,
|
|
15
|
-
lazyCssnano: ()=>lazyCssnano
|
|
16
|
-
});
|
|
17
2
|
function lazyPostcss() {
|
|
18
3
|
return require("postcss");
|
|
19
4
|
}
|
|
@@ -26,3 +11,16 @@ function lazyAutoprefixer() {
|
|
|
26
11
|
function lazyCssnano() {
|
|
27
12
|
return require("cssnano");
|
|
28
13
|
}
|
|
14
|
+
Object.defineProperty(exports, "__esModule", {
|
|
15
|
+
value: !0
|
|
16
|
+
}), function(target, all) {
|
|
17
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
18
|
+
enumerable: !0,
|
|
19
|
+
get: all[name]
|
|
20
|
+
});
|
|
21
|
+
}(exports, {
|
|
22
|
+
lazyPostcss: ()=>lazyPostcss,
|
|
23
|
+
lazyPostcssImport: ()=>lazyPostcssImport,
|
|
24
|
+
lazyAutoprefixer: ()=>lazyAutoprefixer,
|
|
25
|
+
lazyCssnano: ()=>lazyCssnano
|
|
26
|
+
});
|
package/lib/cli.js
CHANGED
package/lib/corePluginList.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", {
|
|
3
|
-
value:
|
|
4
|
-
})
|
|
5
|
-
|
|
6
|
-
enumerable: true,
|
|
3
|
+
value: !0
|
|
4
|
+
}), Object.defineProperty(exports, "default", {
|
|
5
|
+
enumerable: !0,
|
|
7
6
|
get: ()=>_default
|
|
8
7
|
});
|
|
9
8
|
const _default = [
|