tailwindcss 0.0.0-insiders.c3906b4 → 0.0.0-insiders.c42ffc1

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 (59) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/colors.js +1 -304
  3. package/defaultConfig.js +1 -4
  4. package/defaultTheme.js +1 -4
  5. package/lib/cli.js +11 -14
  6. package/lib/corePluginList.js +6 -0
  7. package/lib/corePlugins.js +334 -51
  8. package/lib/featureFlags.js +2 -2
  9. package/lib/lib/expandTailwindAtRules.js +13 -26
  10. package/lib/lib/generateRules.js +57 -10
  11. package/lib/lib/normalizeTailwindDirectives.js +3 -2
  12. package/lib/lib/setupContextUtils.js +146 -121
  13. package/lib/lib/setupTrackingContext.js +10 -7
  14. package/lib/lib/setupWatchingContext.js +6 -6
  15. package/lib/lib/sharedState.js +1 -11
  16. package/lib/processTailwindFeatures.js +1 -1
  17. package/lib/public/colors.js +329 -0
  18. package/lib/public/create-plugin.js +13 -0
  19. package/lib/public/default-config.js +14 -0
  20. package/lib/public/default-theme.js +14 -0
  21. package/lib/public/resolve-config.js +19 -0
  22. package/lib/util/log.js +30 -18
  23. package/lib/util/normalizeConfig.js +194 -0
  24. package/lib/util/parseAnimationValue.js +7 -1
  25. package/lib/util/parseDependency.js +3 -0
  26. package/lib/util/pluginUtils.js +22 -18
  27. package/lib/util/resolveConfig.js +7 -70
  28. package/lib/util/withAlphaVariable.js +29 -14
  29. package/package.json +4 -4
  30. package/peers/index.js +758 -617
  31. package/plugin.js +1 -3
  32. package/resolveConfig.js +1 -7
  33. package/scripts/create-plugin-list.js +2 -2
  34. package/src/cli.js +18 -16
  35. package/src/corePluginList.js +1 -1
  36. package/src/corePlugins.js +193 -55
  37. package/src/featureFlags.js +2 -2
  38. package/src/lib/expandTailwindAtRules.js +13 -28
  39. package/src/lib/generateRules.js +73 -8
  40. package/src/lib/normalizeTailwindDirectives.js +3 -2
  41. package/src/lib/setupContextUtils.js +134 -113
  42. package/src/lib/setupTrackingContext.js +9 -9
  43. package/src/lib/setupWatchingContext.js +5 -8
  44. package/src/lib/sharedState.js +0 -3
  45. package/src/processTailwindFeatures.js +1 -1
  46. package/src/public/colors.js +300 -0
  47. package/src/public/create-plugin.js +2 -0
  48. package/src/public/default-config.js +4 -0
  49. package/src/public/default-theme.js +4 -0
  50. package/src/public/resolve-config.js +7 -0
  51. package/src/util/log.js +18 -21
  52. package/src/util/normalizeConfig.js +233 -0
  53. package/src/util/parseAnimationValue.js +7 -1
  54. package/src/util/parseDependency.js +4 -0
  55. package/src/util/pluginUtils.js +25 -17
  56. package/src/util/resolveConfig.js +6 -65
  57. package/src/util/withAlphaVariable.js +13 -8
  58. package/stubs/defaultConfig.stub.js +44 -38
  59. package/stubs/simpleConfig.stub.js +0 -1
package/CHANGELOG.md CHANGED
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
14
14
  - Remove dependency on `modern-normalize`, inline and consolidate with Preflight ([#5358](https://github.com/tailwindlabs/tailwindcss/pull/5358))
15
15
  - Enable extended color palette by default with updated color names ([#5384](https://github.com/tailwindlabs/tailwindcss/pull/5384))
16
16
  - Move `vertical-align` values to config file instead of hard-coding ([#5487](https://github.com/tailwindlabs/tailwindcss/pull/5487))
17
+ - Rename `overflow-clip` to `text-clip` and `overflow-ellipsis` to `text-ellipsis` ([#5630](https://github.com/tailwindlabs/tailwindcss/pull/5630))
17
18
 
18
19
  ### Added
19
20
 
@@ -25,10 +26,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
25
26
  - Add `align-sub` and `align-super` utilities by default ([#5486](https://github.com/tailwindlabs/tailwindcss/pull/5486))
26
27
  - Add `break-before`, `break-inside` and `break-after` utilities ([#5530](https://github.com/tailwindlabs/tailwindcss/pull/5530))
27
28
  - Add `file` variant for `::file-selector-button` pseudo element ([#4936](https://github.com/tailwindlabs/tailwindcss/pull/4936))
29
+ - Add `touch-action` utilities ([#5603](https://github.com/tailwindlabs/tailwindcss/pull/5603))
30
+ - Add `inherit` to default color palette ([#5597](https://github.com/tailwindlabs/tailwindcss/pull/5597))
31
+ - Add `overflow-clip`, `overflow-x-clip` and `overflow-y-clip` utilities ([#5630](https://github.com/tailwindlabs/tailwindcss/pull/5630))
32
+ - Add `scroll-snap` utilities ([#5637](https://github.com/tailwindlabs/tailwindcss/pull/5637))
33
+ - Add `border-x` and `border-y` width and color utilities ([#5639](https://github.com/tailwindlabs/tailwindcss/pull/5639))
34
+ - Add `[open]` variant ([#5627](https://github.com/tailwindlabs/tailwindcss/pull/5627))
28
35
 
29
36
  ### Fixed
30
37
 
31
38
  - Fix defining colors as functions when color opacity plugins are disabled ([#5470](https://github.com/tailwindlabs/tailwindcss/pull/5470))
39
+ - Fix using negated `content` globs ([#5625](https://github.com/tailwindlabs/tailwindcss/pull/5625))
40
+ - Fix using backslashes in `content` globs ([#5628](https://github.com/tailwindlabs/tailwindcss/pull/5628))
41
+
42
+ ## [2.2.16] - 2021-09-26
43
+
44
+ ### Fixed
45
+
46
+ - JIT: Properly handle animations that use CSS custom properties ([#5602](https://github.com/tailwindlabs/tailwindcss/pull/5602))
32
47
 
33
48
  ## [2.2.15] - 2021-09-10
34
49
 
@@ -1582,7 +1597,8 @@ No release notes
1582
1597
 
1583
1598
  - Everything!
1584
1599
 
1585
- [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.15...HEAD
1600
+ [unreleased]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.16...HEAD
1601
+ [2.2.16]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.15...v2.2.16
1586
1602
  [2.2.15]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.14...v2.2.15
1587
1603
  [2.2.14]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.13...v2.2.14
1588
1604
  [2.2.13]: https://github.com/tailwindlabs/tailwindcss/compare/v2.2.12...v2.2.13
package/colors.js CHANGED
@@ -1,304 +1 @@
1
- const log = require('./lib/util/log').default
2
-
3
- let warned = []
4
-
5
- function warn({ version, from, to }) {
6
- if (!warned.includes(from)) {
7
- log.warn([
8
- `As of Tailwind CSS ${version}, \`${from}\` has been renamed to \`${to}\`.`,
9
- 'Please update your color palette to eliminate this warning.',
10
- ])
11
- warned.push(from)
12
- }
13
- }
14
-
15
- module.exports = {
16
- transparent: 'transparent',
17
- current: 'currentColor',
18
- black: '#000',
19
- white: '#fff',
20
- slate: {
21
- 50: '#f8fafc',
22
- 100: '#f1f5f9',
23
- 200: '#e2e8f0',
24
- 300: '#cbd5e1',
25
- 400: '#94a3b8',
26
- 500: '#64748b',
27
- 600: '#475569',
28
- 700: '#334155',
29
- 800: '#1e293b',
30
- 900: '#0f172a',
31
- },
32
- gray: {
33
- 50: '#f9fafb',
34
- 100: '#f3f4f6',
35
- 200: '#e5e7eb',
36
- 300: '#d1d5db',
37
- 400: '#9ca3af',
38
- 500: '#6b7280',
39
- 600: '#4b5563',
40
- 700: '#374151',
41
- 800: '#1f2937',
42
- 900: '#111827',
43
- },
44
- zinc: {
45
- 50: '#fafafa',
46
- 100: '#f4f4f5',
47
- 200: '#e4e4e7',
48
- 300: '#d4d4d8',
49
- 400: '#a1a1aa',
50
- 500: '#71717a',
51
- 600: '#52525b',
52
- 700: '#3f3f46',
53
- 800: '#27272a',
54
- 900: '#18181b',
55
- },
56
- neutral: {
57
- 50: '#fafafa',
58
- 100: '#f5f5f5',
59
- 200: '#e5e5e5',
60
- 300: '#d4d4d4',
61
- 400: '#a3a3a3',
62
- 500: '#737373',
63
- 600: '#525252',
64
- 700: '#404040',
65
- 800: '#262626',
66
- 900: '#171717',
67
- },
68
- stone: {
69
- 50: '#fafaf9',
70
- 100: '#f5f5f4',
71
- 200: '#e7e5e4',
72
- 300: '#d6d3d1',
73
- 400: '#a8a29e',
74
- 500: '#78716c',
75
- 600: '#57534e',
76
- 700: '#44403c',
77
- 800: '#292524',
78
- 900: '#1c1917',
79
- },
80
- red: {
81
- 50: '#fef2f2',
82
- 100: '#fee2e2',
83
- 200: '#fecaca',
84
- 300: '#fca5a5',
85
- 400: '#f87171',
86
- 500: '#ef4444',
87
- 600: '#dc2626',
88
- 700: '#b91c1c',
89
- 800: '#991b1b',
90
- 900: '#7f1d1d',
91
- },
92
- orange: {
93
- 50: '#fff7ed',
94
- 100: '#ffedd5',
95
- 200: '#fed7aa',
96
- 300: '#fdba74',
97
- 400: '#fb923c',
98
- 500: '#f97316',
99
- 600: '#ea580c',
100
- 700: '#c2410c',
101
- 800: '#9a3412',
102
- 900: '#7c2d12',
103
- },
104
- amber: {
105
- 50: '#fffbeb',
106
- 100: '#fef3c7',
107
- 200: '#fde68a',
108
- 300: '#fcd34d',
109
- 400: '#fbbf24',
110
- 500: '#f59e0b',
111
- 600: '#d97706',
112
- 700: '#b45309',
113
- 800: '#92400e',
114
- 900: '#78350f',
115
- },
116
- yellow: {
117
- 50: '#fefce8',
118
- 100: '#fef9c3',
119
- 200: '#fef08a',
120
- 300: '#fde047',
121
- 400: '#facc15',
122
- 500: '#eab308',
123
- 600: '#ca8a04',
124
- 700: '#a16207',
125
- 800: '#854d0e',
126
- 900: '#713f12',
127
- },
128
- lime: {
129
- 50: '#f7fee7',
130
- 100: '#ecfccb',
131
- 200: '#d9f99d',
132
- 300: '#bef264',
133
- 400: '#a3e635',
134
- 500: '#84cc16',
135
- 600: '#65a30d',
136
- 700: '#4d7c0f',
137
- 800: '#3f6212',
138
- 900: '#365314',
139
- },
140
- green: {
141
- 50: '#f0fdf4',
142
- 100: '#dcfce7',
143
- 200: '#bbf7d0',
144
- 300: '#86efac',
145
- 400: '#4ade80',
146
- 500: '#22c55e',
147
- 600: '#16a34a',
148
- 700: '#15803d',
149
- 800: '#166534',
150
- 900: '#14532d',
151
- },
152
- emerald: {
153
- 50: '#ecfdf5',
154
- 100: '#d1fae5',
155
- 200: '#a7f3d0',
156
- 300: '#6ee7b7',
157
- 400: '#34d399',
158
- 500: '#10b981',
159
- 600: '#059669',
160
- 700: '#047857',
161
- 800: '#065f46',
162
- 900: '#064e3b',
163
- },
164
- teal: {
165
- 50: '#f0fdfa',
166
- 100: '#ccfbf1',
167
- 200: '#99f6e4',
168
- 300: '#5eead4',
169
- 400: '#2dd4bf',
170
- 500: '#14b8a6',
171
- 600: '#0d9488',
172
- 700: '#0f766e',
173
- 800: '#115e59',
174
- 900: '#134e4a',
175
- },
176
- cyan: {
177
- 50: '#ecfeff',
178
- 100: '#cffafe',
179
- 200: '#a5f3fc',
180
- 300: '#67e8f9',
181
- 400: '#22d3ee',
182
- 500: '#06b6d4',
183
- 600: '#0891b2',
184
- 700: '#0e7490',
185
- 800: '#155e75',
186
- 900: '#164e63',
187
- },
188
- sky: {
189
- 50: '#f0f9ff',
190
- 100: '#e0f2fe',
191
- 200: '#bae6fd',
192
- 300: '#7dd3fc',
193
- 400: '#38bdf8',
194
- 500: '#0ea5e9',
195
- 600: '#0284c7',
196
- 700: '#0369a1',
197
- 800: '#075985',
198
- 900: '#0c4a6e',
199
- },
200
- blue: {
201
- 50: '#eff6ff',
202
- 100: '#dbeafe',
203
- 200: '#bfdbfe',
204
- 300: '#93c5fd',
205
- 400: '#60a5fa',
206
- 500: '#3b82f6',
207
- 600: '#2563eb',
208
- 700: '#1d4ed8',
209
- 800: '#1e40af',
210
- 900: '#1e3a8a',
211
- },
212
- indigo: {
213
- 50: '#eef2ff',
214
- 100: '#e0e7ff',
215
- 200: '#c7d2fe',
216
- 300: '#a5b4fc',
217
- 400: '#818cf8',
218
- 500: '#6366f1',
219
- 600: '#4f46e5',
220
- 700: '#4338ca',
221
- 800: '#3730a3',
222
- 900: '#312e81',
223
- },
224
- violet: {
225
- 50: '#f5f3ff',
226
- 100: '#ede9fe',
227
- 200: '#ddd6fe',
228
- 300: '#c4b5fd',
229
- 400: '#a78bfa',
230
- 500: '#8b5cf6',
231
- 600: '#7c3aed',
232
- 700: '#6d28d9',
233
- 800: '#5b21b6',
234
- 900: '#4c1d95',
235
- },
236
- purple: {
237
- 50: '#faf5ff',
238
- 100: '#f3e8ff',
239
- 200: '#e9d5ff',
240
- 300: '#d8b4fe',
241
- 400: '#c084fc',
242
- 500: '#a855f7',
243
- 600: '#9333ea',
244
- 700: '#7e22ce',
245
- 800: '#6b21a8',
246
- 900: '#581c87',
247
- },
248
- fuchsia: {
249
- 50: '#fdf4ff',
250
- 100: '#fae8ff',
251
- 200: '#f5d0fe',
252
- 300: '#f0abfc',
253
- 400: '#e879f9',
254
- 500: '#d946ef',
255
- 600: '#c026d3',
256
- 700: '#a21caf',
257
- 800: '#86198f',
258
- 900: '#701a75',
259
- },
260
- pink: {
261
- 50: '#fdf2f8',
262
- 100: '#fce7f3',
263
- 200: '#fbcfe8',
264
- 300: '#f9a8d4',
265
- 400: '#f472b6',
266
- 500: '#ec4899',
267
- 600: '#db2777',
268
- 700: '#be185d',
269
- 800: '#9d174d',
270
- 900: '#831843',
271
- },
272
- rose: {
273
- 50: '#fff1f2',
274
- 100: '#ffe4e6',
275
- 200: '#fecdd3',
276
- 300: '#fda4af',
277
- 400: '#fb7185',
278
- 500: '#f43f5e',
279
- 600: '#e11d48',
280
- 700: '#be123c',
281
- 800: '#9f1239',
282
- 900: '#881337',
283
- },
284
- get lightBlue() {
285
- warn({ version: 'v2.2', from: 'lightBlue', to: 'sky' })
286
- return this.sky
287
- },
288
- get warmGray() {
289
- warn({ version: 'v3.0', from: 'warmGray', to: 'stone' })
290
- return this.stone
291
- },
292
- get trueGray() {
293
- warn({ version: 'v3.0', from: 'trueGray', to: 'neutral' })
294
- return this.neutral
295
- },
296
- get coolGray() {
297
- warn({ version: 'v3.0', from: 'coolGray', to: 'gray' })
298
- return this.gray
299
- },
300
- get blueGray() {
301
- warn({ version: 'v3.0', from: 'blueGray', to: 'slate' })
302
- return this.slate
303
- },
304
- }
1
+ module.exports = require('./lib/public/colors').default
package/defaultConfig.js CHANGED
@@ -1,4 +1 @@
1
- let { cloneDeep } = require('./lib/util/cloneDeep')
2
- let defaultConfig = require('./stubs/defaultConfig.stub.js')
3
-
4
- module.exports = cloneDeep(defaultConfig)
1
+ module.exports = require('./lib/public/default-config').default
package/defaultTheme.js CHANGED
@@ -1,4 +1 @@
1
- let { cloneDeep } = require('./lib/util/cloneDeep')
2
- let defaultConfig = require('./stubs/defaultConfig.stub.js')
3
-
4
- module.exports = cloneDeep(defaultConfig.theme)
1
+ module.exports = require('./lib/public/default-theme').default
package/lib/cli.js CHANGED
@@ -15,6 +15,7 @@ var _fastGlob = _interopRequireDefault(require("fast-glob"));
15
15
  var _getModuleDependencies = _interopRequireDefault(require("./lib/getModuleDependencies"));
16
16
  var _log = _interopRequireDefault(require("./util/log"));
17
17
  var _packageJson = _interopRequireDefault(require("../package.json"));
18
+ var _normalizePath = _interopRequireDefault(require("normalize-path"));
18
19
  function _interopRequireDefault(obj) {
19
20
  return obj && obj.__esModule ? obj : {
20
21
  default: obj
@@ -386,14 +387,12 @@ async function build() {
386
387
  };
387
388
  let resolvedConfig = (0, _resolveConfig).default(config);
388
389
  if (args['--purge']) {
389
- _log.default.warn([
390
+ _log.default.warn('purge-flag-deprecated', [
390
391
  'The `--purge` flag has been deprecated.',
391
- 'Please use `--content` instead.'
392
+ 'Please use `--content` instead.',
392
393
  ]);
393
394
  if (!args['--content']) {
394
- args['--content'] = [
395
- '--purge'
396
- ];
395
+ args['--content'] = args['--purge'];
397
396
  }
398
397
  }
399
398
  if (args['--content']) {
@@ -401,19 +400,17 @@ async function build() {
401
400
  }
402
401
  return resolvedConfig;
403
402
  }
404
- function extractContent(config) {
405
- return config.content.content.concat(config.content.safelist);
406
- }
407
403
  function extractFileGlobs(config) {
408
- return extractContent(config).filter((file)=>{
404
+ return config.content.files.filter((file)=>{
409
405
  // Strings in this case are files / globs. If it is something else,
410
406
  // like an object it's probably a raw content object. But this object
411
407
  // is not watchable, so let's remove it.
412
408
  return typeof file === 'string';
413
- });
409
+ }).map((glob)=>(0, _normalizePath).default(glob)
410
+ );
414
411
  }
415
412
  function extractRawContent(config) {
416
- return extractContent(config).filter((file)=>{
413
+ return config.content.files.filter((file)=>{
417
414
  return typeof file === 'object' && file !== null;
418
415
  });
419
416
  }
@@ -425,7 +422,7 @@ async function build() {
425
422
  for (let file of files){
426
423
  changedContent.push({
427
424
  content: _fs.default.readFileSync(_path.default.resolve(file), 'utf8'),
428
- extension: _path.default.extname(file)
425
+ extension: _path.default.extname(file).slice(1)
429
426
  });
430
427
  }
431
428
  // Resolve raw content in the tailwind config
@@ -674,7 +671,7 @@ async function build() {
674
671
  chain = chain.then(async ()=>{
675
672
  changedContent.push({
676
673
  content: _fs.default.readFileSync(_path.default.resolve(file), 'utf8'),
677
- extension: _path.default.extname(file)
674
+ extension: _path.default.extname(file).slice(1)
678
675
  });
679
676
  await rebuild(config);
680
677
  });
@@ -684,7 +681,7 @@ async function build() {
684
681
  chain = chain.then(async ()=>{
685
682
  changedContent.push({
686
683
  content: _fs.default.readFileSync(_path.default.resolve(file), 'utf8'),
687
- extension: _path.default.extname(file)
684
+ extension: _path.default.extname(file).slice(1)
688
685
  });
689
686
  await rebuild(config);
690
687
  });
@@ -45,8 +45,14 @@ var _default = [
45
45
  "transform",
46
46
  "animation",
47
47
  "cursor",
48
+ "touchAction",
48
49
  "userSelect",
49
50
  "resize",
51
+ "scrollSnapType",
52
+ "scrollSnapAlign",
53
+ "scrollSnapStop",
54
+ "scrollMargin",
55
+ "scrollPadding",
50
56
  "listStylePosition",
51
57
  "listStyleType",
52
58
  "appearance",