tailwindcss 0.0.0-insiders.f2d2a0e → 0.0.0-insiders.f2d73b8

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 (86) hide show
  1. package/CHANGELOG.md +197 -2
  2. package/README.md +8 -4
  3. package/colors.js +2 -1
  4. package/defaultConfig.js +2 -1
  5. package/defaultTheme.js +2 -1
  6. package/lib/cli.js +86 -45
  7. package/lib/constants.js +1 -1
  8. package/lib/corePluginList.js +9 -1
  9. package/lib/corePlugins.js +465 -409
  10. package/lib/css/preflight.css +18 -5
  11. package/lib/featureFlags.js +4 -4
  12. package/lib/index.js +1 -3
  13. package/lib/lib/collapseDuplicateDeclarations.js +80 -0
  14. package/lib/lib/defaultExtractor.js +42 -0
  15. package/lib/lib/detectNesting.js +17 -2
  16. package/lib/lib/evaluateTailwindFunctions.js +10 -6
  17. package/lib/lib/expandApplyAtRules.js +94 -45
  18. package/lib/lib/expandTailwindAtRules.js +22 -30
  19. package/lib/lib/generateRules.js +166 -19
  20. package/lib/lib/normalizeTailwindDirectives.js +8 -1
  21. package/lib/lib/resolveDefaultsAtRules.js +28 -14
  22. package/lib/lib/setupContextUtils.js +232 -142
  23. package/lib/lib/setupTrackingContext.js +11 -10
  24. package/lib/lib/sharedState.js +34 -5
  25. package/lib/lib/substituteScreenAtRules.js +7 -4
  26. package/lib/processTailwindFeatures.js +5 -2
  27. package/lib/util/buildMediaQuery.js +13 -24
  28. package/lib/util/color.js +23 -8
  29. package/lib/util/createUtilityPlugin.js +2 -2
  30. package/lib/util/dataTypes.js +38 -7
  31. package/lib/util/defaults.js +6 -0
  32. package/lib/util/formatVariantSelector.js +186 -0
  33. package/lib/util/isValidArbitraryValue.js +64 -0
  34. package/lib/util/log.js +4 -0
  35. package/lib/util/nameClass.js +1 -0
  36. package/lib/util/normalizeConfig.js +56 -13
  37. package/lib/util/normalizeScreens.js +61 -0
  38. package/lib/util/parseBoxShadowValue.js +77 -0
  39. package/lib/util/pluginUtils.js +22 -146
  40. package/lib/util/prefixSelector.js +1 -3
  41. package/lib/util/resolveConfig.js +21 -13
  42. package/lib/util/toPath.js +6 -1
  43. package/lib/util/transformThemeValue.js +23 -13
  44. package/package.json +19 -19
  45. package/peers/index.js +4577 -5583
  46. package/plugin.js +2 -1
  47. package/resolveConfig.js +2 -1
  48. package/src/cli.js +66 -14
  49. package/src/corePluginList.js +1 -1
  50. package/src/corePlugins.js +424 -519
  51. package/src/css/preflight.css +18 -5
  52. package/src/featureFlags.js +1 -1
  53. package/src/index.js +1 -7
  54. package/src/lib/collapseDuplicateDeclarations.js +93 -0
  55. package/src/lib/defaultExtractor.js +48 -0
  56. package/src/lib/detectNesting.js +22 -3
  57. package/src/lib/evaluateTailwindFunctions.js +6 -3
  58. package/src/lib/expandApplyAtRules.js +101 -45
  59. package/src/lib/expandTailwindAtRules.js +24 -28
  60. package/src/lib/generateRules.js +178 -11
  61. package/src/lib/normalizeTailwindDirectives.js +6 -1
  62. package/src/lib/resolveDefaultsAtRules.js +31 -10
  63. package/src/lib/setupContextUtils.js +211 -86
  64. package/src/lib/setupTrackingContext.js +11 -10
  65. package/src/lib/sharedState.js +40 -4
  66. package/src/lib/substituteScreenAtRules.js +6 -3
  67. package/src/processTailwindFeatures.js +6 -2
  68. package/src/util/buildMediaQuery.js +14 -18
  69. package/src/util/color.js +20 -7
  70. package/src/util/dataTypes.js +43 -11
  71. package/src/util/defaults.js +6 -0
  72. package/src/util/formatVariantSelector.js +196 -0
  73. package/src/util/isValidArbitraryValue.js +61 -0
  74. package/src/util/log.js +4 -0
  75. package/src/util/nameClass.js +1 -1
  76. package/src/util/normalizeConfig.js +31 -2
  77. package/src/util/normalizeScreens.js +45 -0
  78. package/src/util/parseBoxShadowValue.js +71 -0
  79. package/src/util/pluginUtils.js +15 -138
  80. package/src/util/prefixSelector.js +1 -4
  81. package/src/util/resolveConfig.js +11 -1
  82. package/src/util/toPath.js +23 -1
  83. package/src/util/transformThemeValue.js +22 -7
  84. package/stubs/defaultConfig.stub.js +71 -16
  85. package/lib/lib/setupWatchingContext.js +0 -284
  86. package/src/lib/setupWatchingContext.js +0 -304
package/CHANGELOG.md CHANGED
@@ -7,10 +7,171 @@ 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
+ - Allow use of falsy values in theme config ([#6917](https://github.com/tailwindlabs/tailwindcss/pull/6917))
13
+ - Ensure we can apply classes that are grouped with non-class selectors ([#6922](https://github.com/tailwindlabs/tailwindcss/pull/6922))
14
+ - Improve standalone CLI compatibility on Linux by switching to the `linuxstatic` build target ([#6914](https://github.com/tailwindlabs/tailwindcss/pull/6914))
15
+ - Ensure `@apply` works consistently with or without `@layer` ([#6938](https://github.com/tailwindlabs/tailwindcss/pull/6938))
16
+ - Only emit defaults when using base layer ([#6906](https://github.com/tailwindlabs/tailwindcss/pull/6906))
17
+ - Emit plugin defaults regardless of usage ([#6906](https://github.com/tailwindlabs/tailwindcss/pull/6906))
18
+ - Move default border color back to preflight ([#6906](https://github.com/tailwindlabs/tailwindcss/pull/6906))
19
+ - Change `experimental.optimizeUniversalDefaults` to only work with `@tailwind base` ([#6906](https://github.com/tailwindlabs/tailwindcss/pull/6906))
20
+
21
+ ## [3.0.11] - 2022-01-05
22
+
23
+ ### Fixed
24
+
25
+ - Preserve casing of CSS variables added by plugins ([#6888](https://github.com/tailwindlabs/tailwindcss/pull/6888))
26
+ - Ignore content paths that are passed in but don't actually exist ([#6901](https://github.com/tailwindlabs/tailwindcss/pull/6901))
27
+ - Revert change that applies Tailwind's defaults in isolated environments like CSS modules ([9fdc391](https://github.com/tailwindlabs/tailwindcss/commit/9fdc391d4ff93e7e350f5ce439060176b1f0162f))
28
+
29
+ ## [3.0.10] - 2022-01-04
30
+
31
+ ### Fixed
32
+
33
+ - Fix `@apply` in files without `@tailwind` directives ([#6580](https://github.com/tailwindlabs/tailwindcss/pull/6580), [#6875](https://github.com/tailwindlabs/tailwindcss/pull/6875))
34
+ - CLI: avoid unnecessary writes to output files ([#6550](https://github.com/tailwindlabs/tailwindcss/pull/6550))
35
+
36
+ ### Added
37
+
38
+ - Allow piping data into the CLI ([#6876](https://github.com/tailwindlabs/tailwindcss/pull/6876))
39
+
40
+ ## [3.0.9] - 2022-01-03
41
+
42
+ ### Fixed
43
+
44
+ - Improve `DEBUG` flag ([#6797](https://github.com/tailwindlabs/tailwindcss/pull/6797), [#6804](https://github.com/tailwindlabs/tailwindcss/pull/6804))
45
+ - Ensure we can use `<` and `>` characters in modifiers ([#6851](https://github.com/tailwindlabs/tailwindcss/pull/6851))
46
+ - Validate `theme()` works in arbitrary values ([#6852](https://github.com/tailwindlabs/tailwindcss/pull/6852))
47
+ - Properly detect `theme()` value usage in arbitrary properties ([#6854](https://github.com/tailwindlabs/tailwindcss/pull/6854))
48
+ - Improve collapsing of duplicate declarations ([#6856](https://github.com/tailwindlabs/tailwindcss/pull/6856))
49
+ - Remove support for `TAILWIND_MODE=watch` ([#6858](https://github.com/tailwindlabs/tailwindcss/pull/6858))
50
+
51
+ ## [3.0.8] - 2021-12-28
52
+
53
+ ### Fixed
54
+
55
+ - Reduce specificity of `abbr` rule in preflight ([#6671](https://github.com/tailwindlabs/tailwindcss/pull/6671))
56
+ - Support HSL with hue units in arbitrary values ([#6726](https://github.com/tailwindlabs/tailwindcss/pull/6726))
57
+ - Add `node16-linux-arm64` target for standalone CLI ([#6693](https://github.com/tailwindlabs/tailwindcss/pull/6693))
58
+
59
+ ## [3.0.7] - 2021-12-17
60
+
61
+ ### Fixed
62
+
63
+ - Don't mutate custom color palette when overriding per-plugin colors ([#6546](https://github.com/tailwindlabs/tailwindcss/pull/6546))
64
+ - Improve circular dependency detection when using `@apply` ([#6588](https://github.com/tailwindlabs/tailwindcss/pull/6588))
65
+ - Only generate variants for non-`user` layers ([#6589](https://github.com/tailwindlabs/tailwindcss/pull/6589))
66
+ - Properly extract classes with arbitrary values in arrays and classes followed by escaped quotes ([#6590](https://github.com/tailwindlabs/tailwindcss/pull/6590))
67
+ - Improve jsx interpolation candidate matching ([#6593](https://github.com/tailwindlabs/tailwindcss/pull/6593))
68
+ - Ensure `@apply` of a rule inside an AtRule works ([#6594](https://github.com/tailwindlabs/tailwindcss/pull/6594))
69
+
70
+ ## [3.0.6] - 2021-12-16
71
+
72
+ ### Fixed
73
+
74
+ - Support square bracket notation in paths ([#6519](https://github.com/tailwindlabs/tailwindcss/pull/6519))
75
+ - Ensure all plugins are executed for a given candidate ([#6540](https://github.com/tailwindlabs/tailwindcss/pull/6540))
76
+
77
+ ## [3.0.5] - 2021-12-15
78
+
79
+ ### Fixed
80
+
81
+ - Revert: add `li` to list-style reset ([9777562d](https://github.com/tailwindlabs/tailwindcss/commit/9777562da37ee631bbf77374c0d14825f09ef9af))
82
+
83
+ ## [3.0.4] - 2021-12-15
84
+
85
+ ### Fixed
86
+
87
+ - Insert always-on defaults layer in correct spot ([#6526](https://github.com/tailwindlabs/tailwindcss/pull/6526))
88
+
89
+ ## [3.0.3] - 2021-12-15
90
+
91
+ ### Added
92
+
93
+ - Warn about invalid globs in `content` ([#6449](https://github.com/tailwindlabs/tailwindcss/pull/6449))
94
+ - Add standalone tailwindcss CLI ([#6506](https://github.com/tailwindlabs/tailwindcss/pull/6506))
95
+ - Add `li` to list-style reset ([00f60e6](https://github.com/tailwindlabs/tailwindcss/commit/00f60e61013c6e4e3419e4b699371a13eb30b75d))
96
+
97
+ ### Fixed
98
+
99
+ - Don't output unparsable values ([#6469](https://github.com/tailwindlabs/tailwindcss/pull/6469))
100
+ - Fix text decoration utilities from overriding the new text decoration color/style/thickness utilities when used with a modifier ([#6378](https://github.com/tailwindlabs/tailwindcss/pull/6378))
101
+ - Move defaults to their own always-on layer ([#6500](https://github.com/tailwindlabs/tailwindcss/pull/6500))
102
+ - Support negative values in safelist patterns ([#6480](https://github.com/tailwindlabs/tailwindcss/pull/6480))
103
+
104
+ ## [3.0.2] - 2021-12-13
105
+
106
+ ### Fixed
107
+
108
+ - Temporarily disable optimize universal defaults, fixes issue with transforms/filters/rings not being `@apply`-able in CSS modules/Svelte components/Vue components ([#6461](https://github.com/tailwindlabs/tailwindcss/pull/6461))
109
+
110
+ ## [3.0.1] - 2021-12-10
111
+
112
+ ### Fixed
113
+
114
+ - Ensure complex variants with multiple classes work ([#6311](https://github.com/tailwindlabs/tailwindcss/pull/6311))
115
+ - Re-add `default` interop to public available functions ([#6348](https://github.com/tailwindlabs/tailwindcss/pull/6348))
116
+ - Detect circular dependencies when using `@apply` ([#6365](https://github.com/tailwindlabs/tailwindcss/pull/6365))
117
+ - Fix defaults optimization when vendor prefixes are involved ([#6369](https://github.com/tailwindlabs/tailwindcss/pull/6369))
118
+
119
+ ## [3.0.0] - 2021-12-09
120
+
121
+ ### Fixed
122
+
123
+ - Enforce the order of some variants (like `before` and `after`) ([#6018](https://github.com/tailwindlabs/tailwindcss/pull/6018))
124
+
125
+ ### Added
126
+
127
+ - Add `placeholder` variant ([#6106](https://github.com/tailwindlabs/tailwindcss/pull/6106))
128
+ - Add composable `touch-action` utilities ([#6115](https://github.com/tailwindlabs/tailwindcss/pull/6115))
129
+ - Add support for "arbitrary properties" ([#6161](https://github.com/tailwindlabs/tailwindcss/pull/6161))
130
+ - Add `portrait` and `landscape` variants ([#6046](https://github.com/tailwindlabs/tailwindcss/pull/6046))
131
+ - Add `text-decoration-style`, `text-decoration-thickness`, and `text-underline-offset` utilities ([#6004](https://github.com/tailwindlabs/tailwindcss/pull/6004))
132
+ - Add `menu` reset to preflight ([#6213](https://github.com/tailwindlabs/tailwindcss/pull/6213))
133
+ - Allow `0` as a valid `length` value ([#6233](https://github.com/tailwindlabs/tailwindcss/pull/6233), [#6259](https://github.com/tailwindlabs/tailwindcss/pull/6259))
134
+ - Add CSS functions to data types ([#6258](https://github.com/tailwindlabs/tailwindcss/pull/6258))
135
+ - Support negative values for `scale-*` utilities ([c48e629](https://github.com/tailwindlabs/tailwindcss/commit/c48e629955585ad18dadba9f470fda59cc448ab7))
136
+ - Improve `length` data type, by validating each value individually ([#6283](https://github.com/tailwindlabs/tailwindcss/pull/6283))
137
+
138
+ ### Changed
139
+
140
+ - 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))
141
+
142
+ ## [3.0.0-alpha.2] - 2021-11-08
143
+
144
+ ### Changed
145
+
146
+ - Don't use pointer cursor on disabled buttons by default ([#5772](https://github.com/tailwindlabs/tailwindcss/pull/5772))
147
+ - Set default content value in preflight instead of within each before/after utility ([#5820](https://github.com/tailwindlabs/tailwindcss/pull/5820))
148
+ - Remove `prefix` as a function ([#5829](https://github.com/tailwindlabs/tailwindcss/pull/5829))
149
+
10
150
  ### Added
11
151
 
12
152
  - Add `flex-basis` utilities ([#5671](https://github.com/tailwindlabs/tailwindcss/pull/5671))
13
153
  - Make negative values a first-class feature ([#5709](https://github.com/tailwindlabs/tailwindcss/pull/5709))
154
+ - Add `fit-content` values for `min/max-width/height` utilities ([#5638](https://github.com/tailwindlabs/tailwindcss/pull/5638))
155
+ - Add `min/max-content` values for `min/max-height` utilities ([#5729](https://github.com/tailwindlabs/tailwindcss/pull/5729))
156
+ - Add all standard `cursor-*` values by default ([#5734](https://github.com/tailwindlabs/tailwindcss/pull/5734))
157
+ - Add `grow-*` and `shrink-*` utilities, deprecate `flex-grow-*` and `flex-shrink-*` ([#5733](https://github.com/tailwindlabs/tailwindcss/pull/5733))
158
+ - Add `text-decoration-color` utilities ([#5760](https://github.com/tailwindlabs/tailwindcss/pull/5760))
159
+ - Add new declarative `addVariant` API ([#5809](https://github.com/tailwindlabs/tailwindcss/pull/5809))
160
+ - Add first-class `print` variant for targeting printed media ([#5885](https://github.com/tailwindlabs/tailwindcss/pull/5885))
161
+ - Add `outline-style`, `outline-color`, `outline-width` and `outline-offset` utilities ([#5887](https://github.com/tailwindlabs/tailwindcss/pull/5887))
162
+ - Add full color palette for `fill-*` and `stroke-*` utilities (#5933[](https://github.com/tailwindlabs/tailwindcss/pull/5933))
163
+ - Add composable API for colored box shadows ([#5979](https://github.com/tailwindlabs/tailwindcss/pull/5979))
164
+
165
+ ### Fixed
166
+
167
+ - Configure chokidar's `awaitWriteFinish` setting to avoid occasional stale builds on Windows ([#5774](https://github.com/tailwindlabs/tailwindcss/pull/5774))
168
+ - Fix CLI `--content` option ([#5775](https://github.com/tailwindlabs/tailwindcss/pull/5775))
169
+ - Fix before/after utilities overriding custom content values at larger breakpoints ([#5820](https://github.com/tailwindlabs/tailwindcss/pull/5820))
170
+ - Cleanup duplicate properties ([#5830](https://github.com/tailwindlabs/tailwindcss/pull/5830))
171
+ - Allow `_` inside `url()` when using arbitrary values ([#5853](https://github.com/tailwindlabs/tailwindcss/pull/5853))
172
+ - Prevent crashes when using comments in `@layer` AtRules ([#5854](https://github.com/tailwindlabs/tailwindcss/pull/5854))
173
+ - 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))
174
+ - Ensure `@apply`-ing a utility with multiple definitions works ([#5870](https://github.com/tailwindlabs/tailwindcss/pull/5870))
14
175
 
15
176
  ## [3.0.0-alpha.1] - 2021-10-01
16
177
 
@@ -51,6 +212,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
51
212
  - Fix using negated `content` globs ([#5625](https://github.com/tailwindlabs/tailwindcss/pull/5625))
52
213
  - Fix using backslashes in `content` globs ([#5628](https://github.com/tailwindlabs/tailwindcss/pull/5628))
53
214
 
215
+ ## [2.2.19] - 2021-10-29
216
+
217
+ ### Fixed
218
+
219
+ - Ensure `corePlugins` order is consisent in AOT mode ([#5928](https://github.com/tailwindlabs/tailwindcss/pull/5928))
220
+
221
+ ## [2.2.18] - 2021-10-29
222
+
223
+ ### Fixed
224
+
225
+ - Bump versions for security vulnerabilities ([#5924](https://github.com/tailwindlabs/tailwindcss/pull/5924))
226
+
227
+ ## [2.2.17] - 2021-10-13
228
+
229
+ ### Fixed
230
+
231
+ - Configure chokidar's `awaitWriteFinish` setting to avoid occasional stale builds on Windows ([#5758](https://github.com/tailwindlabs/tailwindcss/pull/5758))
232
+
54
233
  ## [2.2.16] - 2021-09-26
55
234
 
56
235
  ### Fixed
@@ -1609,8 +1788,24 @@ No release notes
1609
1788
 
1610
1789
  - Everything!
1611
1790
 
1612
- [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.1...HEAD
1613
- [3.0.0-alpha.1]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.16...v3.0.0-alpha.1
1791
+ [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.11...HEAD
1792
+ [3.0.11]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.10...v3.0.11
1793
+ [3.0.10]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.9...v3.0.10
1794
+ [3.0.9]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.8...v3.0.9
1795
+ [3.0.8]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.7...v3.0.8
1796
+ [3.0.7]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.6...v3.0.7
1797
+ [3.0.6]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.5...v3.0.6
1798
+ [3.0.5]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.4...v3.0.5
1799
+ [3.0.4]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.3...v3.0.4
1800
+ [3.0.3]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.2...v3.0.3
1801
+ [3.0.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.1...v3.0.2
1802
+ [3.0.1]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0...v3.0.1
1803
+ [3.0.0]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.2...v3.0.0
1804
+ [3.0.0-alpha.2]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.0-alpha.1...v3.0.0-alpha.2
1805
+ [3.0.0-alpha.1]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.19...v3.0.0-alpha.1
1806
+ [2.2.19]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.18...v2.2.19
1807
+ [2.2.18]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.17...v2.2.18
1808
+ [2.2.17]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.16...v2.2.17
1614
1809
  [2.2.16]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.15...v2.2.16
1615
1810
  [2.2.15]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.14...v2.2.15
1616
1811
  [2.2.14]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.13...v2.2.14
package/README.md CHANGED
@@ -1,10 +1,14 @@
1
1
  <p>
2
- <a href="https://tailwindcss.com/" target="_blank">
3
- <img alt="Tailwind CSS" width="350" src="https://refactoringui.nyc3.cdn.digitaloceanspaces.com/tailwind-logo-sticker.svg">
4
- </a><br>
5
- A utility-first CSS framework for rapidly building custom user interfaces.
2
+ <a href="https://tailwindcss.com/#gh-light-mode-only" target="_blank">
3
+ <img src="./.github/logo-light.svg" alt="Tailwind CSS" width="350" height="70">
4
+ </a>
5
+ <a href="https://tailwindcss.com/#gh-dark-mode-only" target="_blank">
6
+ <img src="./.github/logo-dark.svg" alt="Tailwind CSS" width="350" height="70">
7
+ </a>
6
8
  </p>
7
9
 
10
+ A utility-first CSS framework for rapidly building custom user interfaces.
11
+
8
12
  <p>
9
13
  <a href="https://github.com/tailwindlabs/tailwindcss/actions"><img src="https://img.shields.io/github/workflow/status/tailwindlabs/tailwindcss/Node.js%20CI" alt="Build Status"></a>
10
14
  <a href="https://www.npmjs.com/package/tailwindcss"><img src="https://img.shields.io/npm/dt/tailwindcss.svg" alt="Total Downloads"></a>
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,26 @@ function formatNodes(root) {
40
40
  root.first.raws.before = '';
41
41
  }
42
42
  }
43
- function help({ message , usage , commands , options }) {
43
+ async function outputFile(file, contents) {
44
+ if (_fs.default.existsSync(file) && await _fs.default.promises.readFile(file, 'utf8') === contents) {
45
+ return; // Skip writing the file
46
+ }
47
+ // Write the file
48
+ await _fs.default.promises.writeFile(file, contents, 'utf8');
49
+ }
50
+ function drainStdin() {
51
+ return new Promise((resolve, reject)=>{
52
+ let result = '';
53
+ process.stdin.on('data', (chunk)=>{
54
+ result += chunk;
55
+ });
56
+ process.stdin.on('end', ()=>resolve(result)
57
+ );
58
+ process.stdin.on('error', (err)=>reject(err)
59
+ );
60
+ });
61
+ }
62
+ function help({ message , usage , commands: commands1 , options }) {
44
63
  let indent = 2;
45
64
  // Render header
46
65
  console.log();
@@ -61,11 +80,11 @@ function help({ message , usage , commands , options }) {
61
80
  }
62
81
  }
63
82
  // Render commands
64
- if (commands && commands.length > 0) {
83
+ if (commands1 && commands1.length > 0) {
65
84
  console.log();
66
85
  console.log('Commands:');
67
- for (let command of commands){
68
- console.log(' '.repeat(indent), command);
86
+ for (let command1 of commands1){
87
+ console.log(' '.repeat(indent), command1);
69
88
  }
70
89
  }
71
90
  // Render options
@@ -86,12 +105,12 @@ function help({ message , usage , commands , options }) {
86
105
  }
87
106
  console.log();
88
107
  console.log('Options:');
89
- for (let { flags , description , deprecated } of Object.values(groupedOptions)){
108
+ for (let { flags: flags1 , description , deprecated } of Object.values(groupedOptions)){
90
109
  if (deprecated) continue;
91
- if (flags.length === 1) {
92
- console.log(' '.repeat(indent + 4 /* 4 = "-i, ".length */ ), flags.slice().reverse().join(', ').padEnd(20, ' '), description);
110
+ if (flags1.length === 1) {
111
+ console.log(' '.repeat(indent + 4 /* 4 = "-i, ".length */ ), flags1.slice().reverse().join(', ').padEnd(20, ' '), description);
93
112
  } else {
94
- console.log(' '.repeat(indent), flags.slice().reverse().join(', ').padEnd(24, ' '), description);
113
+ console.log(' '.repeat(indent), flags1.slice().reverse().join(', ').padEnd(24, ' '), description);
95
114
  }
96
115
  }
97
116
  }
@@ -187,8 +206,8 @@ if (process.stdout.isTTY /* Detect redirecting output to a file */ && (process.
187
206
  'tailwindcss [--input input.css] [--output output.css] [--watch] [options...]',
188
207
  'tailwindcss init [--full] [--postcss] [options...]',
189
208
  ],
190
- commands: Object.keys(commands).filter((command)=>command !== 'build'
191
- ).map((command)=>`${command} [options]`
209
+ commands: Object.keys(commands).filter((command2)=>command2 !== 'build'
210
+ ).map((command3)=>`${command3} [options]`
192
211
  ),
193
212
  options: {
194
213
  ...commands.build.args,
@@ -210,8 +229,8 @@ if (commands[command] === undefined) {
210
229
  usage: [
211
230
  'tailwindcss <command> [options]'
212
231
  ],
213
- commands: Object.keys(commands).filter((command)=>command !== 'build'
214
- ).map((command)=>`${command} [options]`
232
+ commands: Object.keys(commands).filter((command4)=>command4 !== 'build'
233
+ ).map((command5)=>`${command5} [options]`
215
234
  ),
216
235
  options: sharedFlags
217
236
  });
@@ -247,16 +266,16 @@ let args = (()=>{
247
266
  handler = flags[handler];
248
267
  }
249
268
  if (!handler) continue;
250
- let args = [];
269
+ let args1 = [];
251
270
  let offset = i + 1;
252
271
  // Parse args for current flag
253
272
  while(result['_'][offset] && !result['_'][offset].startsWith('-')){
254
- args.push(result['_'][offset++]);
273
+ args1.push(result['_'][offset++]);
255
274
  }
256
275
  // Cleanup manually parsed flags + args
257
- result['_'].splice(i, 1 + args.length);
276
+ result['_'].splice(i, 1 + args1.length);
258
277
  // Set the resolved value in the `result` object
259
- result[flagName] = handler.type(args.length === 0 ? undefined : args.length === 1 ? args[0] : args, flagName);
278
+ result[flagName] = handler.type(args1.length === 0 ? undefined : args1.length === 1 ? args1[0] : args1, flagName);
260
279
  }
261
280
  // Ensure that the `command` is always the first argument in the `args`.
262
281
  // This is important so that we don't have to check if a default command
@@ -336,7 +355,7 @@ async function build() {
336
355
  console.error('[deprecation] Running tailwindcss without -i, please provide an input file.');
337
356
  input = args['--input'] = args['_'][1];
338
357
  }
339
- if (input && !_fs.default.existsSync(input = _path.default.resolve(input))) {
358
+ if (input && input !== '-' && !_fs.default.existsSync(input = _path.default.resolve(input))) {
340
359
  console.error(`Specified input file ${args['--input']} does not exist.`);
341
360
  process.exit(9);
342
361
  }
@@ -396,7 +415,7 @@ async function build() {
396
415
  }
397
416
  }
398
417
  if (args['--content']) {
399
- resolvedConfig.content = args['--content'].split(/(?<!{[^}]+),/);
418
+ resolvedConfig.content.files = args['--content'].split(/(?<!{[^}]+),/);
400
419
  }
401
420
  return resolvedConfig;
402
421
  }
@@ -499,10 +518,8 @@ async function build() {
499
518
  return process.stdout.write(result.css);
500
519
  }
501
520
  return Promise.all([
502
- _fs.default.promises.writeFile(output, result.css, ()=>true
503
- ),
504
- result.map && _fs.default.writeFile(output + '.map', result.map.toString(), ()=>true
505
- ),
521
+ outputFile(output, result.css),
522
+ result.map && outputFile(output + '.map', result.map.toString()),
506
523
  ].filter(Boolean));
507
524
  }).then(()=>{
508
525
  let end = process.hrtime.bigint();
@@ -510,8 +527,19 @@ async function build() {
510
527
  console.error('Done in', (end - start) / BigInt(1000000) + 'ms.');
511
528
  });
512
529
  }
513
- let css = input ? _fs.default.readFileSync(_path.default.resolve(input), 'utf8') : '@tailwind base; @tailwind components; @tailwind utilities';
514
- return processCSS(css);
530
+ let css1 = await (()=>{
531
+ // Piping in data, let's drain the stdin
532
+ if (input === '-') {
533
+ return drainStdin();
534
+ }
535
+ // Input file has been provided
536
+ if (input) {
537
+ return _fs.default.readFileSync(_path.default.resolve(input), 'utf8');
538
+ }
539
+ // No input file provided, fallback to default atrules
540
+ return '@tailwind base; @tailwind components; @tailwind utilities';
541
+ })();
542
+ return processCSS(css1);
515
543
  }
516
544
  let context = null;
517
545
  async function startWatcher() {
@@ -521,8 +549,8 @@ async function build() {
521
549
  let watcher = null;
522
550
  function refreshConfig() {
523
551
  env.DEBUG && console.time('Module dependencies');
524
- for (let file of configDependencies){
525
- delete require.cache[require.resolve(file)];
552
+ for (let file1 of configDependencies){
553
+ delete require.cache[require.resolve(file1)];
526
554
  }
527
555
  if (configPath) {
528
556
  configDependencies = (0, _getModuleDependencies).default(configPath).map(({ file })=>file
@@ -619,11 +647,9 @@ async function build() {
619
647
  if (!output) {
620
648
  return process.stdout.write(result.css);
621
649
  }
622
- await Promise.all([
623
- _fs.default.promises.writeFile(output, result.css, ()=>true
624
- ),
625
- result.map && _fs.default.writeFile(output + '.map', result.map.toString(), ()=>true
626
- ),
650
+ return Promise.all([
651
+ outputFile(output, result.css),
652
+ result.map && outputFile(output + '.map', result.map.toString()),
627
653
  ].filter(Boolean));
628
654
  }).then(()=>{
629
655
  let end = process.hrtime.bigint();
@@ -636,36 +662,51 @@ async function build() {
636
662
  }
637
663
  });
638
664
  }
639
- let css = input ? _fs.default.readFileSync(_path.default.resolve(input), 'utf8') : '@tailwind base; @tailwind components; @tailwind utilities';
640
- let result1 = await processCSS(css);
665
+ let css2 = await (()=>{
666
+ // Piping in data, let's drain the stdin
667
+ if (input === '-') {
668
+ return drainStdin();
669
+ }
670
+ // Input file has been provided
671
+ if (input) {
672
+ return _fs.default.readFileSync(_path.default.resolve(input), 'utf8');
673
+ }
674
+ // No input file provided, fallback to default atrules
675
+ return '@tailwind base; @tailwind components; @tailwind utilities';
676
+ })();
677
+ let result1 = await processCSS(css2);
641
678
  env.DEBUG && console.timeEnd('Finished in');
642
679
  return result1;
643
680
  }
644
- let config = refreshConfig(configPath);
681
+ let config1 = refreshConfig(configPath);
645
682
  if (input) {
646
683
  contextDependencies.add(_path.default.resolve(input));
647
684
  }
648
685
  watcher = _chokidar.default.watch([
649
686
  ...contextDependencies,
650
- ...extractFileGlobs(config)
687
+ ...extractFileGlobs(config1)
651
688
  ], {
652
- ignoreInitial: true
689
+ ignoreInitial: true,
690
+ awaitWriteFinish: process.platform === 'win32' ? {
691
+ stabilityThreshold: 50,
692
+ pollInterval: 10
693
+ } : false
653
694
  });
654
695
  let chain = Promise.resolve();
655
696
  watcher.on('change', async (file)=>{
656
697
  if (contextDependencies.has(file)) {
657
698
  env.DEBUG && console.time('Resolve config');
658
699
  context = null;
659
- config = refreshConfig(configPath);
700
+ config1 = refreshConfig(configPath);
660
701
  env.DEBUG && console.timeEnd('Resolve config');
661
702
  env.DEBUG && console.time('Watch new files');
662
- let globs = extractFileGlobs(config);
703
+ let globs = extractFileGlobs(config1);
663
704
  watcher.add(configDependencies);
664
705
  watcher.add(globs);
665
706
  env.DEBUG && console.timeEnd('Watch new files');
666
707
  chain = chain.then(async ()=>{
667
- changedContent.push(...getChangedContent(config));
668
- await rebuild(config);
708
+ changedContent.push(...getChangedContent(config1));
709
+ await rebuild(config1);
669
710
  });
670
711
  } else {
671
712
  chain = chain.then(async ()=>{
@@ -673,7 +714,7 @@ async function build() {
673
714
  content: _fs.default.readFileSync(_path.default.resolve(file), 'utf8'),
674
715
  extension: _path.default.extname(file).slice(1)
675
716
  });
676
- await rebuild(config);
717
+ await rebuild(config1);
677
718
  });
678
719
  }
679
720
  });
@@ -683,12 +724,12 @@ async function build() {
683
724
  content: _fs.default.readFileSync(_path.default.resolve(file), 'utf8'),
684
725
  extension: _path.default.extname(file).slice(1)
685
726
  });
686
- await rebuild(config);
727
+ await rebuild(config1);
687
728
  });
688
729
  });
689
730
  chain = chain.then(()=>{
690
- changedContent.push(...getChangedContent(config));
691
- return rebuild(config);
731
+ changedContent.push(...getChangedContent(config1));
732
+ return rebuild(config1);
692
733
  });
693
734
  }
694
735
  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 : {
@@ -125,6 +125,10 @@ var _default = [
125
125
  "textColor",
126
126
  "textOpacity",
127
127
  "textDecoration",
128
+ "textDecorationColor",
129
+ "textDecorationStyle",
130
+ "textDecorationThickness",
131
+ "textUnderlineOffset",
128
132
  "fontSmoothing",
129
133
  "placeholderColor",
130
134
  "placeholderOpacity",
@@ -134,7 +138,11 @@ var _default = [
134
138
  "backgroundBlendMode",
135
139
  "mixBlendMode",
136
140
  "boxShadow",
137
- "outline",
141
+ "boxShadowColor",
142
+ "outlineStyle",
143
+ "outlineWidth",
144
+ "outlineOffset",
145
+ "outlineColor",
138
146
  "ringWidth",
139
147
  "ringColor",
140
148
  "ringOpacity",