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.
Files changed (112) hide show
  1. package/lib/cli/build/deps.js +10 -18
  2. package/lib/cli/build/index.js +10 -41
  3. package/lib/cli/build/plugin.js +87 -268
  4. package/lib/cli/build/utils.js +18 -40
  5. package/lib/cli/build/watching.js +35 -151
  6. package/lib/cli/help/index.js +15 -58
  7. package/lib/cli/index.js +61 -120
  8. package/lib/cli/init/index.js +21 -43
  9. package/lib/cli-peer-dependencies.js +13 -15
  10. package/lib/cli.js +1 -5
  11. package/lib/corePluginList.js +3 -4
  12. package/lib/corePlugins.js +394 -857
  13. package/lib/featureFlags.js +14 -34
  14. package/lib/index.js +1 -5
  15. package/lib/lib/cacheInvalidation.js +29 -75
  16. package/lib/lib/collapseAdjacentRules.js +22 -43
  17. package/lib/lib/collapseDuplicateDeclarations.js +27 -68
  18. package/lib/lib/content.js +37 -126
  19. package/lib/lib/defaultExtractor.js +96 -199
  20. package/lib/lib/detectNesting.js +12 -36
  21. package/lib/lib/evaluateTailwindFunctions.js +101 -188
  22. package/lib/lib/expandApplyAtRules.js +177 -482
  23. package/lib/lib/expandTailwindAtRules.js +69 -237
  24. package/lib/lib/findAtConfigPath.js +13 -30
  25. package/lib/lib/generateRules.js +349 -765
  26. package/lib/lib/getModuleDependencies.js +27 -63
  27. package/lib/lib/load-config.js +16 -24
  28. package/lib/lib/normalizeTailwindDirectives.js +26 -70
  29. package/lib/lib/offsets.js +61 -224
  30. package/lib/lib/partitionApplyAtRules.js +29 -51
  31. package/lib/lib/regex.js +22 -30
  32. package/lib/lib/remap-bitfield.js +9 -84
  33. package/lib/lib/resolveDefaultsAtRules.js +50 -116
  34. package/lib/lib/setupContextUtils.js +576 -1099
  35. package/lib/lib/setupTrackingContext.js +54 -143
  36. package/lib/lib/sharedState.js +15 -59
  37. package/lib/lib/substituteScreenAtRules.js +8 -16
  38. package/lib/oxide/cli/build/deps.js +17 -32
  39. package/lib/oxide/cli/build/index.js +10 -40
  40. package/lib/oxide/cli/build/plugin.js +87 -267
  41. package/lib/oxide/cli/build/utils.js +18 -39
  42. package/lib/oxide/cli/build/watching.js +34 -149
  43. package/lib/oxide/cli/help/index.js +15 -57
  44. package/lib/oxide/cli/index.js +66 -127
  45. package/lib/oxide/cli/init/index.js +17 -36
  46. package/lib/oxide/cli.js +2 -3
  47. package/lib/plugin.js +30 -57
  48. package/lib/postcss-plugins/nesting/index.js +6 -10
  49. package/lib/postcss-plugins/nesting/plugin.js +17 -60
  50. package/lib/processTailwindFeatures.js +8 -37
  51. package/lib/public/colors.js +15 -22
  52. package/lib/public/create-plugin.js +5 -8
  53. package/lib/public/default-config.js +5 -9
  54. package/lib/public/default-theme.js +5 -9
  55. package/lib/public/load-config.js +4 -6
  56. package/lib/public/resolve-config.js +4 -6
  57. package/lib/util/applyImportantSelector.js +15 -24
  58. package/lib/util/bigSign.js +6 -7
  59. package/lib/util/buildMediaQuery.js +10 -17
  60. package/lib/util/cloneDeep.js +9 -17
  61. package/lib/util/cloneNodes.js +14 -27
  62. package/lib/util/color.js +45 -81
  63. package/lib/util/configurePlugins.js +9 -16
  64. package/lib/util/createPlugin.js +8 -15
  65. package/lib/util/createUtilityPlugin.js +15 -27
  66. package/lib/util/dataTypes.js +23 -144
  67. package/lib/util/defaults.js +9 -19
  68. package/lib/util/escapeClassName.js +6 -10
  69. package/lib/util/escapeCommas.js +6 -7
  70. package/lib/util/flattenColorPalette.js +6 -8
  71. package/lib/util/formatVariantSelector.js +49 -190
  72. package/lib/util/getAllConfigs.js +35 -42
  73. package/lib/util/hashConfig.js +6 -8
  74. package/lib/util/isKeyframeRule.js +6 -7
  75. package/lib/util/isPlainObject.js +8 -11
  76. package/lib/util/isSyntacticallyValidPropertyValue.js +13 -42
  77. package/lib/util/log.js +7 -14
  78. package/lib/util/nameClass.js +6 -21
  79. package/lib/util/negateValue.js +10 -26
  80. package/lib/util/normalizeConfig.js +63 -240
  81. package/lib/util/normalizeScreens.js +70 -137
  82. package/lib/util/parseAnimationValue.js +13 -61
  83. package/lib/util/parseBoxShadowValue.js +12 -57
  84. package/lib/util/parseDependency.js +13 -37
  85. package/lib/util/parseGlob.js +7 -22
  86. package/lib/util/parseObjectStyles.js +17 -26
  87. package/lib/util/pluginUtils.js +69 -176
  88. package/lib/util/prefixSelector.js +11 -28
  89. package/lib/util/pseudoElements.js +29 -105
  90. package/lib/util/removeAlphaVariables.js +8 -21
  91. package/lib/util/resolveConfig.js +103 -220
  92. package/lib/util/resolveConfigPath.js +12 -38
  93. package/lib/util/responsive.js +4 -6
  94. package/lib/util/splitAtTopLevelOnly.js +10 -44
  95. package/lib/util/tap.js +6 -8
  96. package/lib/util/toColorValue.js +6 -7
  97. package/lib/util/toPath.js +8 -26
  98. package/lib/util/transformThemeValue.js +12 -45
  99. package/lib/util/validateConfig.js +14 -22
  100. package/lib/util/validateFormalSyntax.js +5 -11
  101. package/lib/util/withAlphaVariable.js +28 -48
  102. package/package.json +3 -3
  103. package/peers/index.js +14 -16
  104. package/src/cli/build/plugin.js +1 -1
  105. package/src/cli.js +1 -1
  106. package/src/corePlugins.js +16 -17
  107. package/src/featureFlags.js +2 -3
  108. package/src/index.js +1 -5
  109. package/src/lib/expandTailwindAtRules.js +2 -2
  110. package/src/lib/sharedState.js +0 -15
  111. package/src/oxide/cli/build/plugin.ts +1 -1
  112. package/src/plugin.js +1 -1
@@ -1,61 +1,39 @@
1
- // @ts-check
2
1
  "use strict";
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "init", {
7
- enumerable: true,
3
+ value: !0
4
+ }), Object.defineProperty(exports, "init", {
5
+ enumerable: !0,
8
6
  get: ()=>init
9
7
  });
10
- const _fs = /*#__PURE__*/ _interopRequireDefault(require("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 tailwindConfigLocation = _path.default.resolve((_args___ = args["_"][1]) !== null && _args___ !== void 0 ? _args___ : `./tailwind.config.${extension}`);
33
- if (_fs.default.existsSync(tailwindConfigLocation)) {
34
- messages.push(`${_path.default.basename(tailwindConfigLocation)} already exists.`);
35
- } else {
36
- let stubContentsFile = _fs.default.readFileSync(args["--full"] ? _path.default.resolve(__dirname, "../../../stubs/config.full.js") : _path.default.resolve(__dirname, "../../../stubs/config.simple.js"), "utf8");
37
- let stubFile = _fs.default.readFileSync(_path.default.resolve(__dirname, `../../../stubs/tailwind.config.${syntax}`), "utf8");
38
- // Change colors import
39
- stubContentsFile = stubContentsFile.replace("../colors", "tailwindcss/colors");
40
- // Replace contents of {ts,js,cjs} file with the stub {simple,full}.
41
- stubFile = stubFile.replace("__CONFIG__", stubContentsFile.replace("module.exports =", "").trim()).trim() + "\n\n";
42
- _fs.default.writeFileSync(tailwindConfigLocation, stubFile, "utf8");
43
- messages.push(`Created Tailwind CSS config file: ${_path.default.basename(tailwindConfigLocation)}`);
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
- messages.push(`${_path.default.basename(postcssConfigLocation)} already exists.`);
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
@@ -1,7 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
  "use strict";
3
- if (process.env.OXIDE) {
4
- module.exports = require("./oxide/cli");
5
- } else {
6
- module.exports = require("./cli/index");
7
- }
3
+ module.exports = require("./oxide/cli");
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", {
3
- value: true
4
- });
5
- Object.defineProperty(exports, "default", {
6
- enumerable: true,
3
+ value: !0
4
+ }), Object.defineProperty(exports, "default", {
5
+ enumerable: !0,
7
6
  get: ()=>_default
8
7
  });
9
8
  const _default = [