tailwindcss 0.0.0-insiders.e4af07f → 0.0.0-insiders.e4b398b

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 (44) hide show
  1. package/lib/cli/build/plugin.js +8 -7
  2. package/lib/cli/build/watching.js +1 -1
  3. package/lib/cli/help/index.js +2 -2
  4. package/lib/cli/index.js +3 -3
  5. package/lib/corePlugins.js +158 -154
  6. package/lib/featureFlags.js +6 -5
  7. package/lib/lib/content.js +2 -2
  8. package/lib/lib/evaluateTailwindFunctions.js +4 -4
  9. package/lib/lib/expandTailwindAtRules.js +10 -9
  10. package/lib/lib/generateRules.js +17 -9
  11. package/lib/lib/resolveDefaultsAtRules.js +1 -1
  12. package/lib/lib/setupContextUtils.js +66 -41
  13. package/lib/lib/setupTrackingContext.js +3 -2
  14. package/lib/lib/substituteScreenAtRules.js +2 -2
  15. package/lib/plugin.js +4 -4
  16. package/lib/postcss-plugins/nesting/index.js +1 -1
  17. package/lib/postcss-plugins/nesting/plugin.js +2 -2
  18. package/lib/processTailwindFeatures.js +3 -3
  19. package/lib/public/colors.js +1 -1
  20. package/lib/util/color.js +3 -3
  21. package/lib/util/createUtilityPlugin.js +2 -2
  22. package/lib/util/dataTypes.js +61 -7
  23. package/lib/util/defaults.js +4 -4
  24. package/lib/util/escapeClassName.js +2 -2
  25. package/lib/util/formatVariantSelector.js +11 -9
  26. package/lib/util/getAllConfigs.js +3 -2
  27. package/lib/util/normalizeConfig.js +26 -21
  28. package/lib/util/normalizeScreens.js +3 -3
  29. package/lib/util/pluginUtils.js +6 -6
  30. package/lib/util/prefixSelector.js +1 -1
  31. package/lib/util/resolveConfig.js +10 -6
  32. package/lib/util/withAlphaVariable.js +1 -1
  33. package/package.json +12 -12
  34. package/src/cli/build/plugin.js +2 -2
  35. package/src/corePlugins.js +12 -6
  36. package/src/lib/expandTailwindAtRules.js +15 -11
  37. package/src/lib/generateRules.js +11 -4
  38. package/src/lib/setupContextUtils.js +18 -5
  39. package/src/plugin.js +3 -3
  40. package/src/processTailwindFeatures.js +3 -2
  41. package/src/util/dataTypes.js +59 -11
  42. package/src/util/formatVariantSelector.js +4 -3
  43. package/src/util/normalizeConfig.js +1 -1
  44. package/src/util/prefixSelector.js +1 -0
@@ -82,7 +82,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
82
82
  function license() {
83
83
  return `/* ! tailwindcss v${_packagejson.default.version} | MIT License | https://tailwindcss.com */\n`;
84
84
  }
85
- async function lightningcss(result, { map =true , minify =true } = {}) {
85
+ async function lightningcss(result, { map = true, minify = true } = {}) {
86
86
  try {
87
87
  var _browserslist_findConfig;
88
88
  var _result_opts_from;
@@ -126,7 +126,7 @@ async function lightningcss(result, { map =true , minify =true } = {}) {
126
126
  let file = _path.default.resolve(customPostCssPath);
127
127
  // Implementation, see: https://unpkg.com/browse/postcss-load-config@3.1.0/src/index.js
128
128
  // @ts-ignore
129
- let { config ={} } = await (0, _lilconfig.lilconfig)("postcss").load(file);
129
+ let { config = {} } = await (0, _lilconfig.lilconfig)("postcss").load(file);
130
130
  if (typeof config === "function") {
131
131
  config = config();
132
132
  } else {
@@ -180,6 +180,7 @@ let state = {
180
180
  };
181
181
  },
182
182
  loadConfig (configPath, content) {
183
+ var _content;
183
184
  if (this.watcher && configPath) {
184
185
  this.refreshConfigDependencies();
185
186
  }
@@ -196,7 +197,7 @@ let state = {
196
197
  };
197
198
  this.configBag.config = (0, _validateConfig.validateConfig)((0, _resolveConfig.default)(this.configBag.config));
198
199
  // Override content files if `--content` has been passed explicitly
199
- if ((content === null || content === void 0 ? void 0 : content.length) > 0) {
200
+ if (((_content = content) === null || _content === void 0 ? void 0 : _content.length) > 0) {
200
201
  this.configBag.config.content.files = content;
201
202
  }
202
203
  return this.configBag.config;
@@ -229,7 +230,7 @@ let state = {
229
230
  let rawContent = this.config.content.files.filter((file)=>{
230
231
  return file !== null && typeof file === "object";
231
232
  });
232
- for (let { raw: htmlContent , extension ="html" } of rawContent){
233
+ for (let { raw: htmlContent, extension = "html" } of rawContent){
233
234
  content.push({
234
235
  content: htmlContent,
235
236
  extension
@@ -237,7 +238,7 @@ let state = {
237
238
  }
238
239
  return content;
239
240
  },
240
- getContext ({ createContext , cliConfigPath , root , result , content }) {
241
+ getContext ({ createContext, cliConfigPath, root, result, content }) {
241
242
  if (this.context) {
242
243
  this.context.changedContent = this.changedContent.splice(0);
243
244
  return this.context;
@@ -295,9 +296,9 @@ async function createProcessor(args, cliConfigPath) {
295
296
  let tailwindPlugin = ()=>{
296
297
  return {
297
298
  postcssPlugin: "tailwindcss",
298
- Once (root, { result }) {
299
+ async Once (root, { result }) {
299
300
  _sharedState.env.DEBUG && console.time("Compiling CSS");
300
- (0, _processTailwindFeatures.default)(({ createContext })=>{
301
+ await (0, _processTailwindFeatures.default)(({ createContext })=>{
301
302
  console.error();
302
303
  console.error("Rebuilding...");
303
304
  return ()=>{
@@ -20,7 +20,7 @@ function _interop_require_default(obj) {
20
20
  default: obj
21
21
  };
22
22
  }
23
- function createWatcher(args, { state , rebuild }) {
23
+ function createWatcher(args, { state, rebuild }) {
24
24
  let shouldPoll = args["--poll"];
25
25
  let shouldCoalesceWriteEvents = shouldPoll || process.platform === "win32";
26
26
  // Polling interval in milliseconds
@@ -15,7 +15,7 @@ function _interop_require_default(obj) {
15
15
  default: obj
16
16
  };
17
17
  }
18
- function help({ message , usage , commands , options }) {
18
+ function help({ message, usage, commands, options }) {
19
19
  let indent = 2;
20
20
  // Render header
21
21
  console.log();
@@ -60,7 +60,7 @@ function help({ message , usage , commands , options }) {
60
60
  }
61
61
  console.log();
62
62
  console.log("Options:");
63
- for (let { flags , description , deprecated } of Object.values(groupedOptions)){
63
+ for (let { flags, description, deprecated } of Object.values(groupedOptions)){
64
64
  if (deprecated) continue;
65
65
  if (flags.length === 1) {
66
66
  console.log(" ".repeat(indent + 4 /* 4 = "-i, ".length */ ), flags.slice().reverse().join(", ").padEnd(20, " "), description);
package/lib/cli/index.js CHANGED
@@ -144,15 +144,15 @@ if (commands[command] === undefined) {
144
144
  }
145
145
  }
146
146
  // Execute command
147
- let { args: flags , run } = commands[command];
147
+ let { args: flags, run } = commands[command];
148
148
  let args = (()=>{
149
149
  try {
150
150
  let result = (0, _arg.default)(Object.fromEntries(Object.entries({
151
151
  ...flags,
152
152
  ...sharedFlags
153
153
  }).filter(([_key, value])=>{
154
- var _value_type;
155
- return !(value === null || value === void 0 ? void 0 : (_value_type = value.type) === null || _value_type === void 0 ? void 0 : _value_type.manualParsing);
154
+ var _value_type, _value;
155
+ return !((_value = value) === null || _value === void 0 ? void 0 : (_value_type = _value.type) === null || _value_type === void 0 ? void 0 : _value_type.manualParsing);
156
156
  }).map(([key, value])=>[
157
157
  key,
158
158
  typeof value === "object" ? value.type : value