tailwindcss 0.0.0-insiders.2dec564 → 0.0.0-insiders.2dffc87

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 (113) hide show
  1. package/CHANGELOG.md +70 -3
  2. package/colors.d.ts +3 -0
  3. package/defaultConfig.d.ts +3 -0
  4. package/defaultTheme.d.ts +3 -0
  5. package/lib/cli-peer-dependencies.js +10 -5
  6. package/lib/cli.js +243 -179
  7. package/lib/constants.js +8 -8
  8. package/lib/corePluginList.js +1 -0
  9. package/lib/corePlugins.js +1597 -1529
  10. package/lib/css/preflight.css +1 -8
  11. package/lib/featureFlags.js +12 -8
  12. package/lib/index.js +17 -6
  13. package/lib/lib/cacheInvalidation.js +69 -0
  14. package/lib/lib/collapseAdjacentRules.js +17 -14
  15. package/lib/lib/collapseDuplicateDeclarations.js +1 -1
  16. package/lib/lib/defaultExtractor.js +175 -32
  17. package/lib/lib/detectNesting.js +9 -9
  18. package/lib/lib/evaluateTailwindFunctions.js +31 -19
  19. package/lib/lib/expandApplyAtRules.js +392 -194
  20. package/lib/lib/expandTailwindAtRules.js +135 -125
  21. package/lib/lib/generateRules.js +131 -75
  22. package/lib/lib/getModuleDependencies.js +14 -14
  23. package/lib/lib/normalizeTailwindDirectives.js +35 -35
  24. package/lib/lib/partitionApplyAtRules.js +7 -7
  25. package/lib/lib/regex.js +53 -0
  26. package/lib/lib/resolveDefaultsAtRules.js +75 -75
  27. package/lib/lib/setupContextUtils.js +161 -127
  28. package/lib/lib/setupTrackingContext.js +60 -57
  29. package/lib/lib/sharedState.js +10 -8
  30. package/lib/lib/substituteScreenAtRules.js +2 -2
  31. package/lib/postcss-plugins/nesting/README.md +2 -2
  32. package/lib/postcss-plugins/nesting/index.js +1 -1
  33. package/lib/postcss-plugins/nesting/plugin.js +10 -10
  34. package/lib/processTailwindFeatures.js +7 -7
  35. package/lib/public/colors.js +241 -241
  36. package/lib/public/resolve-config.js +5 -5
  37. package/lib/util/buildMediaQuery.js +2 -2
  38. package/lib/util/cloneDeep.js +1 -1
  39. package/lib/util/cloneNodes.js +8 -2
  40. package/lib/util/color.js +42 -46
  41. package/lib/util/createUtilityPlugin.js +6 -6
  42. package/lib/util/dataTypes.js +85 -76
  43. package/lib/util/escapeClassName.js +5 -5
  44. package/lib/util/escapeCommas.js +1 -1
  45. package/lib/util/flattenColorPalette.js +2 -2
  46. package/lib/util/formatVariantSelector.js +83 -75
  47. package/lib/util/getAllConfigs.js +13 -5
  48. package/lib/util/hashConfig.js +5 -5
  49. package/lib/util/isKeyframeRule.js +1 -1
  50. package/lib/util/isPlainObject.js +1 -1
  51. package/lib/util/isValidArbitraryValue.js +27 -27
  52. package/lib/util/log.js +5 -5
  53. package/lib/util/nameClass.js +7 -7
  54. package/lib/util/negateValue.js +4 -4
  55. package/lib/util/normalizeConfig.js +35 -42
  56. package/lib/util/normalizeScreens.js +4 -4
  57. package/lib/util/parseAnimationValue.js +56 -56
  58. package/lib/util/parseBoxShadowValue.js +19 -60
  59. package/lib/util/parseDependency.js +32 -32
  60. package/lib/util/parseObjectStyles.js +6 -6
  61. package/lib/util/pluginUtils.js +9 -9
  62. package/lib/util/prefixSelector.js +1 -1
  63. package/lib/util/resolveConfig.js +99 -49
  64. package/lib/util/resolveConfigPath.js +16 -16
  65. package/lib/util/responsive.js +6 -6
  66. package/lib/util/splitAtTopLevelOnly.js +72 -0
  67. package/lib/util/toColorValue.js +1 -1
  68. package/lib/util/toPath.js +2 -2
  69. package/lib/util/transformThemeValue.js +30 -28
  70. package/lib/util/validateConfig.js +21 -0
  71. package/lib/util/withAlphaVariable.js +19 -19
  72. package/package.json +27 -23
  73. package/peers/index.js +5370 -2654
  74. package/plugin.d.ts +11 -0
  75. package/scripts/generate-types.js +52 -0
  76. package/src/cli-peer-dependencies.js +7 -1
  77. package/src/cli.js +103 -23
  78. package/src/corePluginList.js +1 -1
  79. package/src/corePlugins.js +100 -28
  80. package/src/css/preflight.css +1 -8
  81. package/src/featureFlags.js +2 -2
  82. package/src/index.js +15 -1
  83. package/src/lib/cacheInvalidation.js +52 -0
  84. package/src/lib/collapseAdjacentRules.js +5 -1
  85. package/src/lib/defaultExtractor.js +177 -35
  86. package/src/lib/evaluateTailwindFunctions.js +18 -4
  87. package/src/lib/expandApplyAtRules.js +416 -190
  88. package/src/lib/expandTailwindAtRules.js +29 -9
  89. package/src/lib/generateRules.js +116 -50
  90. package/src/lib/regex.js +74 -0
  91. package/src/lib/setupContextUtils.js +120 -65
  92. package/src/lib/setupTrackingContext.js +7 -3
  93. package/src/lib/sharedState.js +1 -0
  94. package/src/postcss-plugins/nesting/README.md +2 -2
  95. package/src/util/cloneNodes.js +8 -1
  96. package/src/util/color.js +25 -21
  97. package/src/util/dataTypes.js +14 -6
  98. package/src/util/formatVariantSelector.js +79 -62
  99. package/src/util/getAllConfigs.js +7 -0
  100. package/src/util/normalizeConfig.js +0 -8
  101. package/src/util/parseBoxShadowValue.js +3 -50
  102. package/src/util/resolveConfig.js +93 -21
  103. package/src/util/splitAtTopLevelOnly.js +71 -0
  104. package/src/util/toPath.js +1 -1
  105. package/src/util/transformThemeValue.js +4 -2
  106. package/src/util/validateConfig.js +13 -0
  107. package/stubs/defaultConfig.stub.js +4 -1
  108. package/types/config.d.ts +325 -0
  109. package/types/generated/.gitkeep +0 -0
  110. package/types/generated/colors.d.ts +276 -0
  111. package/types/generated/corePluginList.d.ts +1 -0
  112. package/types/index.d.ts +1 -0
  113. package/types.d.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -7,11 +7,77 @@ 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
+ - Types: allow for arbitrary theme values (for 3rd party plugins) ([#7926](https://github.com/tailwindlabs/tailwindcss/pull/7926))
13
+ - Don’t split vars with numbers in them inside arbitrary values ([#8091](https://github.com/tailwindlabs/tailwindcss/pull/8091))
14
+ - Require matching prefix when detecting negatives ([#8121](https://github.com/tailwindlabs/tailwindcss/pull/8121))
15
+ - Handle duplicate At Rules without children ([#8122](https://github.com/tailwindlabs/tailwindcss/pull/8122))
16
+ - Allow arbitrary values with commas in `@apply` ([#8125](https://github.com/tailwindlabs/tailwindcss/pull/8125))
17
+ - Fix intellisense for plugins with multiple `@apply` rules ([#8213](https://github.com/tailwindlabs/tailwindcss/pull/8213))
18
+ - Improve type detection for arbitrary color values ([#8201](https://github.com/tailwindlabs/tailwindcss/pull/8201))
19
+ - Support PostCSS config options in config file in CLI ([#8226](https://github.com/tailwindlabs/tailwindcss/pull/8226))
20
+ - Remove default `[hidden]` style in preflight ([#8248](https://github.com/tailwindlabs/tailwindcss/pull/8248))
21
+ - Only check selectors containing base apply candidates for circular dependencies ([#8222](https://github.com/tailwindlabs/tailwindcss/pull/8222))
22
+ - Rewrite default class extractor ([#8204](https://github.com/tailwindlabs/tailwindcss/pull/8204))
23
+ - Move `important` selector to the front when `@apply`-ing selector-modifying variants in custom utilities ([#8313](https://github.com/tailwindlabs/tailwindcss/pull/8313))
24
+ - Error when registering an invalid custom variant ([#8345](https://github.com/tailwindlabs/tailwindcss/pull/8345))
25
+ - Create tailwind.config.cjs file in ESM package when running init ([#8363](https://github.com/tailwindlabs/tailwindcss/pull/8363))
26
+ - Fix `matchVariants` that use at-rules and placeholders ([#8392](https://github.com/tailwindlabs/tailwindcss/pull/8392))
27
+ - Improve types of the `tailwindcss/plugin` ([#8400](https://github.com/tailwindlabs/tailwindcss/pull/8400))
28
+
29
+ ### Changed
30
+
31
+ - Try using local `postcss` installation first in the CLI ([#8270](https://github.com/tailwindlabs/tailwindcss/pull/8270))
32
+ - Only apply hover styles when supported (future) ([#8394](https://github.com/tailwindlabs/tailwindcss/pull/8394))
33
+ - Respect default ring color opacity (future) ([#8448](https://github.com/tailwindlabs/tailwindcss/pull/8448), [3f4005e](https://github.com/tailwindlabs/tailwindcss/commit/3f4005e833445f7549219eb5ae89728cbb3a2630))
34
+
35
+ ### Added
36
+
37
+ - Allow default ring color to be a function ([#7587](https://github.com/tailwindlabs/tailwindcss/pull/7587))
38
+ - Add `rgb` and `hsl` color helpers for CSS variables ([#7665](https://github.com/tailwindlabs/tailwindcss/pull/7665))
39
+ - Support PostCSS `Document` nodes ([#7291](https://github.com/tailwindlabs/tailwindcss/pull/7291))
40
+ - Add `text-start` and `text-end` utilities ([#6656](https://github.com/tailwindlabs/tailwindcss/pull/6656))
41
+ - Support customizing class name when using `darkMode: 'class'` ([#5800](https://github.com/tailwindlabs/tailwindcss/pull/5800))
42
+ - Add `--poll` option to the CLI ([#7725](https://github.com/tailwindlabs/tailwindcss/pull/7725))
43
+ - Add new `border-spacing` utilities ([#7102](https://github.com/tailwindlabs/tailwindcss/pull/7102))
44
+ - Add `enabled` variant ([#7905](https://github.com/tailwindlabs/tailwindcss/pull/7905))
45
+ - Add TypeScript types for the `tailwind.config.js` file ([#7891](https://github.com/tailwindlabs/tailwindcss/pull/7891))
46
+ - Add `backdrop` variant ([#7924](https://github.com/tailwindlabs/tailwindcss/pull/7924))
47
+ - Add `grid-flow-dense` utility ([#8193](https://github.com/tailwindlabs/tailwindcss/pull/8193))
48
+ - Add `mix-blend-plus-lighter` utility ([#8288](https://github.com/tailwindlabs/tailwindcss/pull/8288))
49
+ - Add arbitrary variants ([#8299](https://github.com/tailwindlabs/tailwindcss/pull/8299))
50
+ - Add `matchVariant` API ([#8310](https://github.com/tailwindlabs/tailwindcss/pull/8310))
51
+ - Add `prefers-contrast` media query variants ([#8410](https://github.com/tailwindlabs/tailwindcss/pull/8410))
52
+ - Experimental support for variant grouping ([#8405](https://github.com/tailwindlabs/tailwindcss/pull/8405))
53
+ - Add opacity support when referencing colors with `theme` function ([#8416](https://github.com/tailwindlabs/tailwindcss/pull/8416))
54
+ - Add `postcss-import` support to the CLI ([#8437](https://github.com/tailwindlabs/tailwindcss/pull/8437))
55
+
56
+ ## [3.0.24] - 2022-04-12
57
+
58
+ ### Fixed
59
+
10
60
  - Prevent nesting plugin from breaking other plugins ([#7563](https://github.com/tailwindlabs/tailwindcss/pull/7563))
11
61
  - Recursively collapse adjacent rules ([#7565](https://github.com/tailwindlabs/tailwindcss/pull/7565))
12
- - Allow default ring color to be a function ([#7587](https://github.com/tailwindlabs/tailwindcss/pull/7587))
13
62
  - Preserve source maps for generated CSS ([#7588](https://github.com/tailwindlabs/tailwindcss/pull/7588))
14
63
  - Split box shadows on top-level commas only ([#7479](https://github.com/tailwindlabs/tailwindcss/pull/7479))
64
+ - Use local user CSS cache for `@apply` ([#7524](https://github.com/tailwindlabs/tailwindcss/pull/7524))
65
+ - Invalidate context when main CSS changes ([#7626](https://github.com/tailwindlabs/tailwindcss/pull/7626))
66
+ - Only add `!` to selector class matching template candidate when using important modifier with mutli-class selectors ([#7664](https://github.com/tailwindlabs/tailwindcss/pull/7664))
67
+ - Correctly parse and prefix animation names with dots ([#7163](https://github.com/tailwindlabs/tailwindcss/pull/7163))
68
+ - Fix extraction from template literal/function with array ([#7481](https://github.com/tailwindlabs/tailwindcss/pull/7481))
69
+ - Don't output unparsable arbitrary values ([#7789](https://github.com/tailwindlabs/tailwindcss/pull/7789))
70
+ - Fix generation of `div:not(.foo)` if `.foo` is never defined ([#7815](https://github.com/tailwindlabs/tailwindcss/pull/7815))
71
+ - Allow for custom properties in `rgb`, `rgba`, `hsl` and `hsla` colors ([#7933](https://github.com/tailwindlabs/tailwindcss/pull/7933))
72
+ - Remove autoprefixer as explicit peer-dependency to avoid invalid warnings in situations where it isn't actually needed ([#7949](https://github.com/tailwindlabs/tailwindcss/pull/7949))
73
+ - Ensure the `percentage` data type is validated correctly ([#8015](https://github.com/tailwindlabs/tailwindcss/pull/8015))
74
+ - Make sure `font-weight` is inherited by form controls in all browsers ([#8078](https://github.com/tailwindlabs/tailwindcss/pull/8078))
75
+
76
+ ### Changed
77
+
78
+ - Replace `chalk` with `picocolors` ([#6039](https://github.com/tailwindlabs/tailwindcss/pull/6039))
79
+ - Replace `cosmiconfig` with `lilconfig` ([#6039](https://github.com/tailwindlabs/tailwindcss/pull/6038))
80
+ - Update `cssnano` to avoid removing empty variables when minifying ([#7818](https://github.com/tailwindlabs/tailwindcss/pull/7818))
15
81
 
16
82
  ## [3.0.23] - 2022-02-16
17
83
 
@@ -26,7 +92,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
26
92
 
27
93
  ### Fixed
28
94
 
29
- - Temporarily move postcss to dependencies ([#7424](https://github.com/tailwindlabs/tailwindcss/pull/7424))
95
+ - Temporarily move `postcss` to dependencies ([#7424](https://github.com/tailwindlabs/tailwindcss/pull/7424))
30
96
 
31
97
  ## [3.0.21] - 2022-02-10
32
98
 
@@ -1878,7 +1944,8 @@ No release notes
1878
1944
 
1879
1945
  - Everything!
1880
1946
 
1881
- [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.23...HEAD
1947
+ [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.24...HEAD
1948
+ [3.0.24]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.23...v3.0.24
1882
1949
  [3.0.23]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.22...v3.0.23
1883
1950
  [3.0.22]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.21...v3.0.22
1884
1951
  [3.0.21]: https://github.com/tailwindlabs/tailwindcss/compare/v3.0.20...v3.0.21
package/colors.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import type { DefaultColors } from './types/generated/colors'
2
+ declare const colors: DefaultColors
3
+ export = colors
@@ -0,0 +1,3 @@
1
+ import type { Config } from './types/config'
2
+ declare const config: Config
3
+ export = config
@@ -0,0 +1,3 @@
1
+ import type { Config } from './types/config'
2
+ declare const theme: Config['theme']
3
+ export = theme
@@ -2,14 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
+ exports.lazyPostcss = lazyPostcss;
6
+ exports.lazyPostcssImport = lazyPostcssImport;
5
7
  exports.lazyAutoprefixer = lazyAutoprefixer;
6
8
  exports.lazyCssnano = lazyCssnano;
7
- exports.postcss = void 0;
8
- let postcss = require('postcss');
9
- exports.postcss = postcss;
9
+ function lazyPostcss() {
10
+ return require("postcss");
11
+ }
12
+ function lazyPostcssImport() {
13
+ return require("postcss-import");
14
+ }
10
15
  function lazyAutoprefixer() {
11
- return require('autoprefixer');
16
+ return require("autoprefixer");
12
17
  }
13
18
  function lazyCssnano() {
14
- return require('cssnano');
19
+ return require("cssnano");
15
20
  }