tailwindcss 0.0.0-insiders.ee3f3fd → 0.0.0-insiders.eebf529

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 (58) hide show
  1. package/CHANGELOG.md +62 -3
  2. package/colors.js +2 -1
  3. package/defaultConfig.js +2 -1
  4. package/defaultTheme.js +2 -1
  5. package/lib/cli.js +33 -33
  6. package/lib/constants.js +1 -1
  7. package/lib/corePluginList.js +8 -1
  8. package/lib/corePlugins.js +232 -77
  9. package/lib/css/preflight.css +2 -1
  10. package/lib/featureFlags.js +3 -3
  11. package/lib/lib/collapseDuplicateDeclarations.js +2 -2
  12. package/lib/lib/detectNesting.js +17 -2
  13. package/lib/lib/evaluateTailwindFunctions.js +9 -5
  14. package/lib/lib/expandApplyAtRules.js +9 -9
  15. package/lib/lib/expandTailwindAtRules.js +2 -0
  16. package/lib/lib/generateRules.js +46 -10
  17. package/lib/lib/resolveDefaultsAtRules.js +2 -2
  18. package/lib/lib/setupContextUtils.js +17 -73
  19. package/lib/lib/sharedState.js +2 -2
  20. package/lib/lib/substituteScreenAtRules.js +7 -4
  21. package/lib/util/buildMediaQuery.js +13 -24
  22. package/lib/util/createUtilityPlugin.js +2 -2
  23. package/lib/util/dataTypes.js +25 -3
  24. package/lib/util/formatVariantSelector.js +93 -9
  25. package/lib/util/isValidArbitraryValue.js +64 -0
  26. package/lib/util/nameClass.js +1 -0
  27. package/lib/util/normalizeConfig.js +7 -7
  28. package/lib/util/normalizeScreens.js +61 -0
  29. package/lib/util/parseBoxShadowValue.js +77 -0
  30. package/lib/util/pluginUtils.js +12 -11
  31. package/lib/util/resolveConfig.js +12 -12
  32. package/lib/util/transformThemeValue.js +23 -13
  33. package/package.json +12 -12
  34. package/peers/index.js +4456 -5450
  35. package/plugin.js +2 -1
  36. package/resolveConfig.js +2 -1
  37. package/src/cli.js +1 -1
  38. package/src/corePluginList.js +1 -1
  39. package/src/corePlugins.js +172 -67
  40. package/src/css/preflight.css +2 -1
  41. package/src/lib/detectNesting.js +22 -3
  42. package/src/lib/evaluateTailwindFunctions.js +5 -2
  43. package/src/lib/expandApplyAtRules.js +2 -2
  44. package/src/lib/expandTailwindAtRules.js +2 -0
  45. package/src/lib/generateRules.js +34 -0
  46. package/src/lib/setupContextUtils.js +8 -59
  47. package/src/lib/sharedState.js +1 -1
  48. package/src/lib/substituteScreenAtRules.js +6 -3
  49. package/src/util/buildMediaQuery.js +14 -18
  50. package/src/util/dataTypes.js +24 -6
  51. package/src/util/formatVariantSelector.js +92 -1
  52. package/src/util/isValidArbitraryValue.js +61 -0
  53. package/src/util/nameClass.js +1 -1
  54. package/src/util/normalizeScreens.js +45 -0
  55. package/src/util/parseBoxShadowValue.js +71 -0
  56. package/src/util/pluginUtils.js +2 -0
  57. package/src/util/transformThemeValue.js +22 -7
  58. package/stubs/defaultConfig.stub.js +40 -14
package/CHANGELOG.md CHANGED
@@ -7,6 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Fixed
11
+
12
+ - Ensure complex variants with multiple classes work ([#6311](https://github.com/tailwindlabs/tailwindcss/pull/6311))
13
+ - Re-add `default` interop to public available functions ([#6348](https://github.com/tailwindlabs/tailwindcss/pull/6348))
14
+
15
+ ## [3.0.0] - 2021-12-09
16
+
17
+ ### Fixed
18
+
19
+ - Enforce the order of some variants (like `before` and `after`) ([#6018](https://github.com/tailwindlabs/tailwindcss/pull/6018))
20
+
21
+ ### Added
22
+
23
+ - Add `placeholder` variant ([#6106](https://github.com/tailwindlabs/tailwindcss/pull/6106))
24
+ - Add composable `touch-action` utilities ([#6115](https://github.com/tailwindlabs/tailwindcss/pull/6115))
25
+ - Add support for "arbitrary properties" ([#6161](https://github.com/tailwindlabs/tailwindcss/pull/6161))
26
+ - Add `portrait` and `landscape` variants ([#6046](https://github.com/tailwindlabs/tailwindcss/pull/6046))
27
+ - Add `text-decoration-style`, `text-decoration-thickness`, and `text-underline-offset` utilities ([#6004](https://github.com/tailwindlabs/tailwindcss/pull/6004))
28
+ - Add `menu` reset to preflight ([#6213](https://github.com/tailwindlabs/tailwindcss/pull/6213))
29
+ - Allow `0` as a valid `length` value ([#6233](https://github.com/tailwindlabs/tailwindcss/pull/6233), [#6259](https://github.com/tailwindlabs/tailwindcss/pull/6259))
30
+ - Add CSS functions to data types ([#6258](https://github.com/tailwindlabs/tailwindcss/pull/6258))
31
+ - Support negative values for `scale-*` utilities ([c48e629](https://github.com/tailwindlabs/tailwindcss/commit/c48e629955585ad18dadba9f470fda59cc448ab7))
32
+ - Improve `length` data type, by validating each value individually ([#6283](https://github.com/tailwindlabs/tailwindcss/pull/6283))
33
+
34
+ ### Changed
35
+
36
+ - Deprecate `decoration-slice` and `decoration-break` in favor `box-decoration-slice` and `box-decoration-break` _(non-breaking)_ ([#6004](https://github.com/tailwindlabs/tailwindcss/pull/6004))
37
+
38
+ ## [3.0.0-alpha.2] - 2021-11-08
39
+
10
40
  ### Changed
11
41
 
12
42
  - Don't use pointer cursor on disabled buttons by default ([#5772](https://github.com/tailwindlabs/tailwindcss/pull/5772))
@@ -22,7 +52,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
22
52
  - Add all standard `cursor-*` values by default ([#5734](https://github.com/tailwindlabs/tailwindcss/pull/5734))
23
53
  - Add `grow-*` and `shrink-*` utilities, deprecate `flex-grow-*` and `flex-shrink-*` ([#5733](https://github.com/tailwindlabs/tailwindcss/pull/5733))
24
54
  - Add `text-decoration-color` utilities ([#5760](https://github.com/tailwindlabs/tailwindcss/pull/5760))
25
- - Add declarative `addVariant` syntax ([#5809](https://github.com/tailwindlabs/tailwindcss/pull/5809))
55
+ - Add new declarative `addVariant` API ([#5809](https://github.com/tailwindlabs/tailwindcss/pull/5809))
56
+ - Add first-class `print` variant for targeting printed media ([#5885](https://github.com/tailwindlabs/tailwindcss/pull/5885))
57
+ - Add `outline-style`, `outline-color`, `outline-width` and `outline-offset` utilities ([#5887](https://github.com/tailwindlabs/tailwindcss/pull/5887))
58
+ - Add full color palette for `fill-*` and `stroke-*` utilities (#5933[](https://github.com/tailwindlabs/tailwindcss/pull/5933))
59
+ - Add composable API for colored box shadows ([#5979](https://github.com/tailwindlabs/tailwindcss/pull/5979))
26
60
 
27
61
  ### Fixed
28
62
 
@@ -32,6 +66,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
32
66
  - Cleanup duplicate properties ([#5830](https://github.com/tailwindlabs/tailwindcss/pull/5830))
33
67
  - Allow `_` inside `url()` when using arbitrary values ([#5853](https://github.com/tailwindlabs/tailwindcss/pull/5853))
34
68
  - Prevent crashes when using comments in `@layer` AtRules ([#5854](https://github.com/tailwindlabs/tailwindcss/pull/5854))
69
+ - Handle color transformations properly with `theme(...)` for all relevant plugins ([#4533](https://github.com/tailwindlabs/tailwindcss/pull/4533), [#5871](https://github.com/tailwindlabs/tailwindcss/pull/5871))
70
+ - Ensure `@apply`-ing a utility with multiple definitions works ([#5870](https://github.com/tailwindlabs/tailwindcss/pull/5870))
35
71
 
36
72
  ## [3.0.0-alpha.1] - 2021-10-01
37
73
 
@@ -72,6 +108,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
72
108
  - Fix using negated `content` globs ([#5625](https://github.com/tailwindlabs/tailwindcss/pull/5625))
73
109
  - Fix using backslashes in `content` globs ([#5628](https://github.com/tailwindlabs/tailwindcss/pull/5628))
74
110
 
111
+ ## [2.2.19] - 2021-10-29
112
+
113
+ ### Fixed
114
+
115
+ - Ensure `corePlugins` order is consisent in AOT mode ([#5928](https://github.com/tailwindlabs/tailwindcss/pull/5928))
116
+
117
+ ## [2.2.18] - 2021-10-29
118
+
119
+ ### Fixed
120
+
121
+ - Bump versions for security vulnerabilities ([#5924](https://github.com/tailwindlabs/tailwindcss/pull/5924))
122
+
123
+ ## [2.2.17] - 2021-10-13
124
+
125
+ ### Fixed
126
+
127
+ - Configure chokidar's `awaitWriteFinish` setting to avoid occasional stale builds on Windows ([#5758](https://github.com/tailwindlabs/tailwindcss/pull/5758))
128
+
75
129
  ## [2.2.16] - 2021-09-26
76
130
 
77
131
  ### Fixed
@@ -1630,8 +1684,13 @@ No release notes
1630
1684
 
1631
1685
  - Everything!
1632
1686
 
1633
- [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.1...HEAD
1634
- [3.0.0-alpha.1]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.16...v3.0.0-alpha.1
1687
+ [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0...HEAD
1688
+ [3.0.0]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.2...v3.0.0
1689
+ [3.0.0-alpha.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.1...v3.0.0-alpha.2
1690
+ [3.0.0-alpha.1]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.19...v3.0.0-alpha.1
1691
+ [2.2.19]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.18...v2.2.19
1692
+ [2.2.18]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.17...v2.2.18
1693
+ [2.2.17]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.16...v2.2.17
1635
1694
  [2.2.16]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.15...v2.2.16
1636
1695
  [2.2.15]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.14...v2.2.15
1637
1696
  [2.2.14]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.13...v2.2.14
package/colors.js CHANGED
@@ -1 +1,2 @@
1
- module.exports = require('./lib/public/colors').default
1
+ let colors = require('./lib/public/colors')
2
+ module.exports = (colors.__esModule ? colors : { default: colors }).default
package/defaultConfig.js CHANGED
@@ -1 +1,2 @@
1
- module.exports = require('./lib/public/default-config').default
1
+ let defaultConfig = require('./lib/public/default-config')
2
+ module.exports = (defaultConfig.__esModule ? defaultConfig : { default: defaultConfig }).default
package/defaultTheme.js CHANGED
@@ -1 +1,2 @@
1
- module.exports = require('./lib/public/default-theme').default
1
+ let defaultTheme = require('./lib/public/default-theme')
2
+ module.exports = (defaultTheme.__esModule ? defaultTheme : { default: defaultTheme }).default
package/lib/cli.js CHANGED
@@ -22,7 +22,7 @@ function _interopRequireDefault(obj) {
22
22
  };
23
23
  }
24
24
  let env = {
25
- DEBUG: process.env.DEBUG !== undefined
25
+ DEBUG: process.env.DEBUG !== undefined && process.env.DEBUG !== '0'
26
26
  };
27
27
  // ---
28
28
  function indentRecursive(node, indent = 0) {
@@ -40,7 +40,7 @@ function formatNodes(root) {
40
40
  root.first.raws.before = '';
41
41
  }
42
42
  }
43
- function help({ message , usage , commands , options }) {
43
+ function help({ message , usage , commands: commands1 , options }) {
44
44
  let indent = 2;
45
45
  // Render header
46
46
  console.log();
@@ -61,11 +61,11 @@ function help({ message , usage , commands , options }) {
61
61
  }
62
62
  }
63
63
  // Render commands
64
- if (commands && commands.length > 0) {
64
+ if (commands1 && commands1.length > 0) {
65
65
  console.log();
66
66
  console.log('Commands:');
67
- for (let command of commands){
68
- console.log(' '.repeat(indent), command);
67
+ for (let command1 of commands1){
68
+ console.log(' '.repeat(indent), command1);
69
69
  }
70
70
  }
71
71
  // Render options
@@ -86,12 +86,12 @@ function help({ message , usage , commands , options }) {
86
86
  }
87
87
  console.log();
88
88
  console.log('Options:');
89
- for (let { flags , description , deprecated } of Object.values(groupedOptions)){
89
+ for (let { flags: flags1 , description , deprecated } of Object.values(groupedOptions)){
90
90
  if (deprecated) continue;
91
- if (flags.length === 1) {
92
- console.log(' '.repeat(indent + 4 /* 4 = "-i, ".length */ ), flags.slice().reverse().join(', ').padEnd(20, ' '), description);
91
+ if (flags1.length === 1) {
92
+ console.log(' '.repeat(indent + 4 /* 4 = "-i, ".length */ ), flags1.slice().reverse().join(', ').padEnd(20, ' '), description);
93
93
  } else {
94
- console.log(' '.repeat(indent), flags.slice().reverse().join(', ').padEnd(24, ' '), description);
94
+ console.log(' '.repeat(indent), flags1.slice().reverse().join(', ').padEnd(24, ' '), description);
95
95
  }
96
96
  }
97
97
  }
@@ -187,8 +187,8 @@ if (process.stdout.isTTY /* Detect redirecting output to a file */ && (process.
187
187
  'tailwindcss [--input input.css] [--output output.css] [--watch] [options...]',
188
188
  'tailwindcss init [--full] [--postcss] [options...]',
189
189
  ],
190
- commands: Object.keys(commands).filter((command)=>command !== 'build'
191
- ).map((command)=>`${command} [options]`
190
+ commands: Object.keys(commands).filter((command2)=>command2 !== 'build'
191
+ ).map((command3)=>`${command3} [options]`
192
192
  ),
193
193
  options: {
194
194
  ...commands.build.args,
@@ -210,8 +210,8 @@ if (commands[command] === undefined) {
210
210
  usage: [
211
211
  'tailwindcss <command> [options]'
212
212
  ],
213
- commands: Object.keys(commands).filter((command)=>command !== 'build'
214
- ).map((command)=>`${command} [options]`
213
+ commands: Object.keys(commands).filter((command4)=>command4 !== 'build'
214
+ ).map((command5)=>`${command5} [options]`
215
215
  ),
216
216
  options: sharedFlags
217
217
  });
@@ -247,16 +247,16 @@ let args = (()=>{
247
247
  handler = flags[handler];
248
248
  }
249
249
  if (!handler) continue;
250
- let args = [];
250
+ let args1 = [];
251
251
  let offset = i + 1;
252
252
  // Parse args for current flag
253
253
  while(result['_'][offset] && !result['_'][offset].startsWith('-')){
254
- args.push(result['_'][offset++]);
254
+ args1.push(result['_'][offset++]);
255
255
  }
256
256
  // Cleanup manually parsed flags + args
257
- result['_'].splice(i, 1 + args.length);
257
+ result['_'].splice(i, 1 + args1.length);
258
258
  // Set the resolved value in the `result` object
259
- result[flagName] = handler.type(args.length === 0 ? undefined : args.length === 1 ? args[0] : args, flagName);
259
+ result[flagName] = handler.type(args1.length === 0 ? undefined : args1.length === 1 ? args1[0] : args1, flagName);
260
260
  }
261
261
  // Ensure that the `command` is always the first argument in the `args`.
262
262
  // This is important so that we don't have to check if a default command
@@ -510,8 +510,8 @@ async function build() {
510
510
  console.error('Done in', (end - start) / BigInt(1000000) + 'ms.');
511
511
  });
512
512
  }
513
- let css = input ? _fs.default.readFileSync(_path.default.resolve(input), 'utf8') : '@tailwind base; @tailwind components; @tailwind utilities';
514
- return processCSS(css);
513
+ let css1 = input ? _fs.default.readFileSync(_path.default.resolve(input), 'utf8') : '@tailwind base; @tailwind components; @tailwind utilities';
514
+ return processCSS(css1);
515
515
  }
516
516
  let context = null;
517
517
  async function startWatcher() {
@@ -521,8 +521,8 @@ async function build() {
521
521
  let watcher = null;
522
522
  function refreshConfig() {
523
523
  env.DEBUG && console.time('Module dependencies');
524
- for (let file of configDependencies){
525
- delete require.cache[require.resolve(file)];
524
+ for (let file1 of configDependencies){
525
+ delete require.cache[require.resolve(file1)];
526
526
  }
527
527
  if (configPath) {
528
528
  configDependencies = (0, _getModuleDependencies).default(configPath).map(({ file })=>file
@@ -636,18 +636,18 @@ async function build() {
636
636
  }
637
637
  });
638
638
  }
639
- let css = input ? _fs.default.readFileSync(_path.default.resolve(input), 'utf8') : '@tailwind base; @tailwind components; @tailwind utilities';
640
- let result1 = await processCSS(css);
639
+ let css2 = input ? _fs.default.readFileSync(_path.default.resolve(input), 'utf8') : '@tailwind base; @tailwind components; @tailwind utilities';
640
+ let result1 = await processCSS(css2);
641
641
  env.DEBUG && console.timeEnd('Finished in');
642
642
  return result1;
643
643
  }
644
- let config = refreshConfig(configPath);
644
+ let config1 = refreshConfig(configPath);
645
645
  if (input) {
646
646
  contextDependencies.add(_path.default.resolve(input));
647
647
  }
648
648
  watcher = _chokidar.default.watch([
649
649
  ...contextDependencies,
650
- ...extractFileGlobs(config)
650
+ ...extractFileGlobs(config1)
651
651
  ], {
652
652
  ignoreInitial: true,
653
653
  awaitWriteFinish: process.platform === 'win32' ? {
@@ -660,16 +660,16 @@ async function build() {
660
660
  if (contextDependencies.has(file)) {
661
661
  env.DEBUG && console.time('Resolve config');
662
662
  context = null;
663
- config = refreshConfig(configPath);
663
+ config1 = refreshConfig(configPath);
664
664
  env.DEBUG && console.timeEnd('Resolve config');
665
665
  env.DEBUG && console.time('Watch new files');
666
- let globs = extractFileGlobs(config);
666
+ let globs = extractFileGlobs(config1);
667
667
  watcher.add(configDependencies);
668
668
  watcher.add(globs);
669
669
  env.DEBUG && console.timeEnd('Watch new files');
670
670
  chain = chain.then(async ()=>{
671
- changedContent.push(...getChangedContent(config));
672
- await rebuild(config);
671
+ changedContent.push(...getChangedContent(config1));
672
+ await rebuild(config1);
673
673
  });
674
674
  } else {
675
675
  chain = chain.then(async ()=>{
@@ -677,7 +677,7 @@ async function build() {
677
677
  content: _fs.default.readFileSync(_path.default.resolve(file), 'utf8'),
678
678
  extension: _path.default.extname(file).slice(1)
679
679
  });
680
- await rebuild(config);
680
+ await rebuild(config1);
681
681
  });
682
682
  }
683
683
  });
@@ -687,12 +687,12 @@ async function build() {
687
687
  content: _fs.default.readFileSync(_path.default.resolve(file), 'utf8'),
688
688
  extension: _path.default.extname(file).slice(1)
689
689
  });
690
- await rebuild(config);
690
+ await rebuild(config1);
691
691
  });
692
692
  });
693
693
  chain = chain.then(()=>{
694
- changedContent.push(...getChangedContent(config));
695
- return rebuild(config);
694
+ changedContent.push(...getChangedContent(config1));
695
+ return rebuild(config1);
696
696
  });
697
697
  }
698
698
  if (shouldWatch) {
package/lib/constants.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.simpleConfigStubFile = exports.defaultPostCssConfigFile = exports.defaultConfigStubFile = exports.supportedPostCssConfigFile = exports.cjsConfigFile = exports.supportedConfigFiles = exports.defaultPostCssConfigStubFile = exports.cli = exports.cjsPostCssConfigFile = exports.defaultConfigFile = void 0;
5
+ exports.defaultPostCssConfigStubFile = exports.simpleConfigStubFile = exports.defaultConfigStubFile = exports.supportedPostCssConfigFile = exports.supportedConfigFiles = exports.cjsPostCssConfigFile = exports.cjsConfigFile = exports.defaultPostCssConfigFile = exports.defaultConfigFile = exports.cli = void 0;
6
6
  var _path = _interopRequireDefault(require("path"));
7
7
  function _interopRequireDefault(obj) {
8
8
  return obj && obj.__esModule ? obj : {
@@ -126,6 +126,9 @@ var _default = [
126
126
  "textOpacity",
127
127
  "textDecoration",
128
128
  "textDecorationColor",
129
+ "textDecorationStyle",
130
+ "textDecorationThickness",
131
+ "textUnderlineOffset",
129
132
  "fontSmoothing",
130
133
  "placeholderColor",
131
134
  "placeholderOpacity",
@@ -135,7 +138,11 @@ var _default = [
135
138
  "backgroundBlendMode",
136
139
  "mixBlendMode",
137
140
  "boxShadow",
138
- "outline",
141
+ "boxShadowColor",
142
+ "outlineStyle",
143
+ "outlineWidth",
144
+ "outlineOffset",
145
+ "outlineColor",
139
146
  "ringWidth",
140
147
  "ringColor",
141
148
  "ringOpacity",