tailwindcss 0.0.0-insiders.42e75ba → 0.0.0-insiders.42e765f

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 (73) hide show
  1. package/lib/cli/build/plugin.js +9 -11
  2. package/lib/cli/build/utils.js +7 -7
  3. package/lib/cli/build/watching.js +1 -1
  4. package/lib/cli/index.js +2 -2
  5. package/lib/corePluginList.js +4 -1
  6. package/lib/corePlugins.js +141 -10
  7. package/lib/css/preflight.css +12 -6
  8. package/lib/featureFlags.js +8 -9
  9. package/lib/lib/cacheInvalidation.js +3 -1
  10. package/lib/lib/collapseAdjacentRules.js +4 -2
  11. package/lib/lib/content.js +36 -3
  12. package/lib/lib/defaultExtractor.js +35 -10
  13. package/lib/lib/evaluateTailwindFunctions.js +2 -2
  14. package/lib/lib/expandApplyAtRules.js +6 -0
  15. package/lib/lib/expandTailwindAtRules.js +34 -33
  16. package/lib/lib/generateRules.js +39 -12
  17. package/lib/lib/load-config.js +14 -3
  18. package/lib/lib/offsets.js +51 -2
  19. package/lib/lib/regex.js +12 -12
  20. package/lib/lib/resolveDefaultsAtRules.js +6 -4
  21. package/lib/lib/setupContextUtils.js +82 -67
  22. package/lib/lib/setupTrackingContext.js +1 -2
  23. package/lib/lib/sharedState.js +12 -12
  24. package/lib/plugin.js +4 -2
  25. package/lib/postcss-plugins/nesting/plugin.js +2 -2
  26. package/lib/util/cloneNodes.js +33 -13
  27. package/lib/util/color.js +4 -4
  28. package/lib/util/dataTypes.js +92 -33
  29. package/lib/util/defaults.js +4 -4
  30. package/lib/util/escapeClassName.js +2 -2
  31. package/lib/util/formatVariantSelector.js +12 -7
  32. package/lib/util/getAllConfigs.js +1 -2
  33. package/lib/util/isPlainObject.js +1 -1
  34. package/lib/util/log.js +3 -3
  35. package/lib/util/normalizeConfig.js +15 -18
  36. package/lib/util/normalizeScreens.js +4 -4
  37. package/lib/util/parseBoxShadowValue.js +3 -3
  38. package/lib/util/pluginUtils.js +24 -11
  39. package/lib/util/pseudoElements.js +3 -0
  40. package/lib/util/resolveConfig.js +44 -41
  41. package/lib/util/withAlphaVariable.js +3 -3
  42. package/nesting/index.d.ts +4 -0
  43. package/package.json +22 -21
  44. package/resolveConfig.d.ts +22 -3
  45. package/scripts/generate-types.js +1 -2
  46. package/src/cli/build/plugin.js +5 -8
  47. package/src/cli/build/watching.js +1 -1
  48. package/src/corePluginList.js +1 -1
  49. package/src/corePlugins.js +108 -5
  50. package/src/css/preflight.css +12 -6
  51. package/src/lib/content.js +42 -1
  52. package/src/lib/defaultExtractor.js +29 -6
  53. package/src/lib/expandApplyAtRules.js +7 -0
  54. package/src/lib/expandTailwindAtRules.js +39 -32
  55. package/src/lib/generateRules.js +31 -5
  56. package/src/lib/load-config.ts +8 -0
  57. package/src/lib/offsets.js +60 -1
  58. package/src/lib/resolveDefaultsAtRules.js +5 -1
  59. package/src/lib/setupContextUtils.js +58 -33
  60. package/src/plugin.js +1 -1
  61. package/src/util/cloneNodes.js +35 -14
  62. package/src/util/color.js +1 -1
  63. package/src/util/dataTypes.js +75 -11
  64. package/src/util/formatVariantSelector.js +7 -0
  65. package/src/util/isPlainObject.js +1 -1
  66. package/src/util/pluginUtils.js +16 -0
  67. package/src/util/pseudoElements.js +4 -0
  68. package/src/util/resolveConfig.js +42 -24
  69. package/stubs/config.full.js +67 -7
  70. package/types/config.d.ts +13 -3
  71. package/types/generated/corePluginList.d.ts +1 -1
  72. package/types/generated/default-theme.d.ts +28 -9
  73. package/types/index.d.ts +7 -3
@@ -61,7 +61,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
61
61
  if (cache && cache.has(obj)) {
62
62
  return cache.get(obj);
63
63
  }
64
- var newObj = {};
64
+ var newObj = {
65
+ __proto__: null
66
+ };
65
67
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
66
68
  for(var key in obj){
67
69
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -96,14 +98,11 @@ async function lightningcss(result, { map = true, minify = true } = {}) {
96
98
  sourceMap: result.map === undefined ? map : !!result.map,
97
99
  inputSourceMap: result.map ? result.map.toString() : undefined,
98
100
  targets: _lightningcss.default.browserslistToTargets((0, _browserslist.default)(browsersListConfig)),
99
- drafts: {
100
- nesting: true
101
- },
102
101
  include: _lightningcss.Features.Nesting,
103
102
  exclude: _lightningcss.Features.LogicalProperties
104
103
  });
105
104
  return Object.assign(result, {
106
- css: transformed.code.toString('utf8'),
105
+ css: transformed.code.toString(),
107
106
  map: result.map ? Object.assign(result.map, {
108
107
  toString () {
109
108
  var _transformed_map;
@@ -180,7 +179,6 @@ let state = {
180
179
  };
181
180
  },
182
181
  loadConfig (configPath, content) {
183
- var _content;
184
182
  if (this.watcher && configPath) {
185
183
  this.refreshConfigDependencies();
186
184
  }
@@ -197,7 +195,7 @@ let state = {
197
195
  };
198
196
  this.configBag.config = (0, _validateConfig.validateConfig)((0, _resolveConfig.default)(this.configBag.config));
199
197
  // Override content files if `--content` has been passed explicitly
200
- if (((_content = content) === null || _content === void 0 ? void 0 : _content.length) > 0) {
198
+ if ((content === null || content === void 0 ? void 0 : content.length) > 0) {
201
199
  this.configBag.config.content.files = content;
202
200
  }
203
201
  return this.configBag.config;
@@ -239,14 +237,14 @@ let state = {
239
237
  return content;
240
238
  },
241
239
  getContext ({ createContext, cliConfigPath, root, result, content }) {
242
- if (this.context) {
243
- this.context.changedContent = this.changedContent.splice(0);
244
- return this.context;
245
- }
246
240
  _sharedState.env.DEBUG && console.time('Searching for config');
247
241
  var _findAtConfigPath1;
248
242
  let configPath = (_findAtConfigPath1 = (0, _findAtConfigPath.findAtConfigPath)(root, result)) !== null && _findAtConfigPath1 !== void 0 ? _findAtConfigPath1 : cliConfigPath;
249
243
  _sharedState.env.DEBUG && console.timeEnd('Searching for config');
244
+ if (this.context) {
245
+ this.context.changedContent = this.changedContent.splice(0);
246
+ return this.context;
247
+ }
250
248
  _sharedState.env.DEBUG && console.time('Loading config');
251
249
  let config = this.loadConfig(configPath, content);
252
250
  _sharedState.env.DEBUG && console.timeEnd('Loading config');
@@ -10,20 +10,20 @@ function _export(target, all) {
10
10
  });
11
11
  }
12
12
  _export(exports, {
13
- indentRecursive: function() {
14
- return indentRecursive;
13
+ drainStdin: function() {
14
+ return drainStdin;
15
15
  },
16
16
  formatNodes: function() {
17
17
  return formatNodes;
18
18
  },
19
- readFileWithRetries: function() {
20
- return readFileWithRetries;
21
- },
22
- drainStdin: function() {
23
- return drainStdin;
19
+ indentRecursive: function() {
20
+ return indentRecursive;
24
21
  },
25
22
  outputFile: function() {
26
23
  return outputFile;
24
+ },
25
+ readFileWithRetries: function() {
26
+ return readFileWithRetries;
27
27
  }
28
28
  });
29
29
  const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
@@ -126,7 +126,7 @@ function createWatcher(args, { state, rebuild }) {
126
126
  // This is very likely a chokidar bug but it's one we need to work around
127
127
  // We treat this as a change event and rebuild the CSS
128
128
  watcher.on('raw', (evt, filePath, meta)=>{
129
- if (evt !== 'rename') {
129
+ if (evt !== 'rename' || filePath === null) {
130
130
  return;
131
131
  }
132
132
  let watchedPath = meta.watchedPath;
package/lib/cli/index.js CHANGED
@@ -151,8 +151,8 @@ let args = (()=>{
151
151
  ...flags,
152
152
  ...sharedFlags
153
153
  }).filter(([_key, value])=>{
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);
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);
156
156
  }).map(([key, value])=>[
157
157
  key,
158
158
  typeof value === 'object' ? value.type : value
@@ -32,6 +32,7 @@ const _default = [
32
32
  "lineClamp",
33
33
  "display",
34
34
  "aspectRatio",
35
+ "size",
35
36
  "height",
36
37
  "maxHeight",
37
38
  "minHeight",
@@ -184,5 +185,7 @@ const _default = [
184
185
  "transitionDuration",
185
186
  "transitionTimingFunction",
186
187
  "willChange",
187
- "content"
188
+ "contain",
189
+ "content",
190
+ "forcedColorAdjust"
188
191
  ];
@@ -9,11 +9,11 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- variantPlugins: function() {
13
- return variantPlugins;
14
- },
15
12
  corePlugins: function() {
16
13
  return corePlugins;
14
+ },
15
+ variantPlugins: function() {
16
+ return variantPlugins;
17
17
  }
18
18
  });
19
19
  const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
@@ -61,7 +61,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
61
61
  if (cache && cache.has(obj)) {
62
62
  return cache.get(obj);
63
63
  }
64
- var newObj = {};
64
+ var newObj = {
65
+ __proto__: null
66
+ };
65
67
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
66
68
  for(var key in obj){
67
69
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -80,6 +82,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
80
82
  return newObj;
81
83
  }
82
84
  let variantPlugins = {
85
+ childVariant: ({ addVariant })=>{
86
+ addVariant('*', '& > *');
87
+ },
83
88
  pseudoElementVariants: ({ addVariant })=>{
84
89
  addVariant('first-letter', '&::first-letter');
85
90
  addVariant('first-line', '&::first-line');
@@ -263,15 +268,15 @@ let variantPlugins = {
263
268
  }
264
269
  },
265
270
  directionVariants: ({ addVariant })=>{
266
- addVariant('ltr', ':is([dir="ltr"] &)');
267
- addVariant('rtl', ':is([dir="rtl"] &)');
271
+ addVariant('ltr', '&:where([dir="ltr"], [dir="ltr"] *)');
272
+ addVariant('rtl', '&:where([dir="rtl"], [dir="rtl"] *)');
268
273
  },
269
274
  reducedMotionVariants: ({ addVariant })=>{
270
275
  addVariant('motion-safe', '@media (prefers-reduced-motion: no-preference)');
271
276
  addVariant('motion-reduce', '@media (prefers-reduced-motion: reduce)');
272
277
  },
273
278
  darkVariants: ({ config, addVariant })=>{
274
- let [mode, className = '.dark'] = [].concat(config('darkMode', 'media'));
279
+ let [mode, selector = '.dark'] = [].concat(config('darkMode', 'media'));
275
280
  if (mode === false) {
276
281
  mode = 'media';
277
282
  _log.default.warn('darkmode-false', [
@@ -280,10 +285,48 @@ let variantPlugins = {
280
285
  'https://tailwindcss.com/docs/upgrade-guide#remove-dark-mode-configuration'
281
286
  ]);
282
287
  }
283
- if (mode === 'class') {
284
- addVariant('dark', `:is(${className} &)`);
288
+ if (mode === 'variant') {
289
+ let formats;
290
+ if (Array.isArray(selector)) {
291
+ formats = selector;
292
+ } else if (typeof selector === 'function') {
293
+ formats = selector;
294
+ } else if (typeof selector === 'string') {
295
+ formats = [
296
+ selector
297
+ ];
298
+ }
299
+ // TODO: We could also add these warnings if the user passes a function that returns string | string[]
300
+ // But this is an advanced enough use case that it's probably not necessary
301
+ if (Array.isArray(formats)) {
302
+ for (let format of formats){
303
+ if (format === '.dark') {
304
+ mode = false;
305
+ _log.default.warn('darkmode-variant-without-selector', [
306
+ 'When using `variant` for `darkMode`, you must provide a selector.',
307
+ 'Example: `darkMode: ["variant", ".your-selector &"]`'
308
+ ]);
309
+ } else if (!format.includes('&')) {
310
+ mode = false;
311
+ _log.default.warn('darkmode-variant-without-ampersand', [
312
+ 'When using `variant` for `darkMode`, your selector must contain `&`.',
313
+ 'Example `darkMode: ["variant", ".your-selector &"]`'
314
+ ]);
315
+ }
316
+ }
317
+ }
318
+ selector = formats;
319
+ }
320
+ if (mode === 'selector') {
321
+ // New preferred behavior
322
+ addVariant('dark', `&:where(${selector}, ${selector} *)`);
285
323
  } else if (mode === 'media') {
286
324
  addVariant('dark', '@media (prefers-color-scheme: dark)');
325
+ } else if (mode === 'variant') {
326
+ addVariant('dark', selector);
327
+ } else if (mode === 'class') {
328
+ // Old behavior
329
+ addVariant('dark', `:is(${selector} &)`);
287
330
  }
288
331
  },
289
332
  printVariant: ({ addVariant })=>{
@@ -464,6 +507,9 @@ let variantPlugins = {
464
507
  prefersContrastVariants: ({ addVariant })=>{
465
508
  addVariant('contrast-more', '@media (prefers-contrast: more)');
466
509
  addVariant('contrast-less', '@media (prefers-contrast: less)');
510
+ },
511
+ forcedColorsVariants: ({ addVariant })=>{
512
+ addVariant('forced-colors', '@media (forced-colors: active)');
467
513
  }
468
514
  };
469
515
  let cssTransformValue = [
@@ -779,6 +825,12 @@ let corePlugins = {
779
825
  ]),
780
826
  float: ({ addUtilities })=>{
781
827
  addUtilities({
828
+ '.float-start': {
829
+ float: 'inline-start'
830
+ },
831
+ '.float-end': {
832
+ float: 'inline-end'
833
+ },
782
834
  '.float-right': {
783
835
  float: 'right'
784
836
  },
@@ -792,6 +844,12 @@ let corePlugins = {
792
844
  },
793
845
  clear: ({ addUtilities })=>{
794
846
  addUtilities({
847
+ '.clear-start': {
848
+ clear: 'inline-start'
849
+ },
850
+ '.clear-end': {
851
+ clear: 'inline-end'
852
+ },
795
853
  '.clear-left': {
796
854
  clear: 'left'
797
855
  },
@@ -975,6 +1033,15 @@ let corePlugins = {
975
1033
  ]
976
1034
  ]
977
1035
  ]),
1036
+ size: (0, _createUtilityPlugin.default)('size', [
1037
+ [
1038
+ 'size',
1039
+ [
1040
+ 'width',
1041
+ 'height'
1042
+ ]
1043
+ ]
1044
+ ]),
978
1045
  height: (0, _createUtilityPlugin.default)('height', [
979
1046
  [
980
1047
  'h',
@@ -1618,6 +1685,9 @@ let corePlugins = {
1618
1685
  addUtilities({
1619
1686
  '.appearance-none': {
1620
1687
  appearance: 'none'
1688
+ },
1689
+ '.appearance-auto': {
1690
+ appearance: 'auto'
1621
1691
  }
1622
1692
  });
1623
1693
  },
@@ -2312,6 +2382,9 @@ let corePlugins = {
2312
2382
  },
2313
2383
  '.text-balance': {
2314
2384
  'text-wrap': 'balance'
2385
+ },
2386
+ '.text-pretty': {
2387
+ 'text-wrap': 'pretty'
2315
2388
  }
2316
2389
  });
2317
2390
  },
@@ -3615,6 +3688,9 @@ let corePlugins = {
3615
3688
  '.mix-blend-luminosity': {
3616
3689
  'mix-blend-mode': 'luminosity'
3617
3690
  },
3691
+ '.mix-blend-plus-darker': {
3692
+ 'mix-blend-mode': 'plus-darker'
3693
+ },
3618
3694
  '.mix-blend-plus-lighter': {
3619
3695
  'mix-blend-mode': 'plus-lighter'
3620
3696
  }
@@ -4180,6 +4256,51 @@ let corePlugins = {
4180
4256
  ]
4181
4257
  ]
4182
4258
  ]),
4259
+ contain: ({ addDefaults, addUtilities })=>{
4260
+ let cssContainValue = 'var(--tw-contain-size) var(--tw-contain-layout) var(--tw-contain-paint) var(--tw-contain-style)';
4261
+ addDefaults('contain', {
4262
+ '--tw-contain-size': ' ',
4263
+ '--tw-contain-layout': ' ',
4264
+ '--tw-contain-paint': ' ',
4265
+ '--tw-contain-style': ' '
4266
+ });
4267
+ addUtilities({
4268
+ '.contain-none': {
4269
+ contain: 'none'
4270
+ },
4271
+ '.contain-content': {
4272
+ contain: 'content'
4273
+ },
4274
+ '.contain-strict': {
4275
+ contain: 'strict'
4276
+ },
4277
+ '.contain-size': {
4278
+ '@defaults contain': {},
4279
+ '--tw-contain-size': 'size',
4280
+ contain: cssContainValue
4281
+ },
4282
+ '.contain-inline-size': {
4283
+ '@defaults contain': {},
4284
+ '--tw-contain-size': 'inline-size',
4285
+ contain: cssContainValue
4286
+ },
4287
+ '.contain-layout': {
4288
+ '@defaults contain': {},
4289
+ '--tw-contain-layout': 'layout',
4290
+ contain: cssContainValue
4291
+ },
4292
+ '.contain-paint': {
4293
+ '@defaults contain': {},
4294
+ '--tw-contain-paint': 'paint',
4295
+ contain: cssContainValue
4296
+ },
4297
+ '.contain-style': {
4298
+ '@defaults contain': {},
4299
+ '--tw-contain-style': 'style',
4300
+ contain: cssContainValue
4301
+ }
4302
+ });
4303
+ },
4183
4304
  content: (0, _createUtilityPlugin.default)('content', [
4184
4305
  [
4185
4306
  'content',
@@ -4191,5 +4312,15 @@ let corePlugins = {
4191
4312
  ]
4192
4313
  ]
4193
4314
  ]
4194
- ])
4315
+ ]),
4316
+ forcedColorAdjust: ({ addUtilities })=>{
4317
+ addUtilities({
4318
+ '.forced-color-adjust-auto': {
4319
+ 'forced-color-adjust': 'auto'
4320
+ },
4321
+ '.forced-color-adjust-none': {
4322
+ 'forced-color-adjust': 'none'
4323
+ }
4324
+ });
4325
+ }
4195
4326
  };
@@ -24,6 +24,7 @@
24
24
  4. Use the user's configured `sans` font-family by default.
25
25
  5. Use the user's configured `sans` font-feature-settings by default.
26
26
  6. Use the user's configured `sans` font-variation-settings by default.
27
+ 7. Disable tap highlights on iOS.
27
28
  */
28
29
 
29
30
  html,
@@ -35,6 +36,7 @@ html,
35
36
  font-family: theme('fontFamily.sans', ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"); /* 4 */
36
37
  font-feature-settings: theme('fontFamily.sans[1].fontFeatureSettings', normal); /* 5 */
37
38
  font-variation-settings: theme('fontFamily.sans[1].fontVariationSettings', normal); /* 6 */
39
+ -webkit-tap-highlight-color: transparent; /* 7 */
38
40
  }
39
41
 
40
42
  /*
@@ -100,8 +102,10 @@ strong {
100
102
  }
101
103
 
102
104
  /*
103
- 1. Use the user's configured `mono` font family by default.
104
- 2. Correct the odd `em` font sizing in all browsers.
105
+ 1. Use the user's configured `mono` font-family by default.
106
+ 2. Use the user's configured `mono` font-feature-settings by default.
107
+ 3. Use the user's configured `mono` font-variation-settings by default.
108
+ 4. Correct the odd `em` font sizing in all browsers.
105
109
  */
106
110
 
107
111
  code,
@@ -109,7 +113,9 @@ kbd,
109
113
  samp,
110
114
  pre {
111
115
  font-family: theme('fontFamily.mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace); /* 1 */
112
- font-size: 1em; /* 2 */
116
+ font-feature-settings: theme('fontFamily.mono[1].fontFeatureSettings', normal); /* 2 */
117
+ font-variation-settings: theme('fontFamily.mono[1].fontVariationSettings', normal); /* 3 */
118
+ font-size: 1em; /* 4 */
113
119
  }
114
120
 
115
121
  /*
@@ -189,9 +195,9 @@ select {
189
195
  */
190
196
 
191
197
  button,
192
- [type='button'],
193
- [type='reset'],
194
- [type='submit'] {
198
+ input:where([type='button']),
199
+ input:where([type='reset']),
200
+ input:where([type='submit']) {
195
201
  -webkit-appearance: button; /* 1 */
196
202
  background-color: transparent; /* 2 */
197
203
  background-image: none; /* 2 */
@@ -9,6 +9,9 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
+ default: function() {
13
+ return _default;
14
+ },
12
15
  featureFlags: function() {
13
16
  return featureFlags;
14
17
  },
@@ -17,9 +20,6 @@ _export(exports, {
17
20
  },
18
21
  issueFlagNotices: function() {
19
22
  return issueFlagNotices;
20
- },
21
- default: function() {
22
- return _default;
23
23
  }
24
24
  });
25
25
  const _picocolors = /*#__PURE__*/ _interop_require_default(require("picocolors"));
@@ -51,24 +51,23 @@ let featureFlags = {
51
51
  };
52
52
  function flagEnabled(config, flag) {
53
53
  if (featureFlags.future.includes(flag)) {
54
- var _config_future, _config;
54
+ var _config_future;
55
55
  var _config_future_flag, _ref;
56
- return config.future === 'all' || ((_ref = (_config_future_flag = (_config = config) === null || _config === void 0 ? void 0 : (_config_future = _config.future) === null || _config_future === void 0 ? void 0 : _config_future[flag]) !== null && _config_future_flag !== void 0 ? _config_future_flag : defaults[flag]) !== null && _ref !== void 0 ? _ref : false);
56
+ return config.future === 'all' || ((_ref = (_config_future_flag = config === null || config === void 0 ? void 0 : (_config_future = config.future) === null || _config_future === void 0 ? void 0 : _config_future[flag]) !== null && _config_future_flag !== void 0 ? _config_future_flag : defaults[flag]) !== null && _ref !== void 0 ? _ref : false);
57
57
  }
58
58
  if (featureFlags.experimental.includes(flag)) {
59
- var _config_experimental, _config1;
59
+ var _config_experimental;
60
60
  var _config_experimental_flag, _ref1;
61
- return config.experimental === 'all' || ((_ref1 = (_config_experimental_flag = (_config1 = config) === null || _config1 === void 0 ? void 0 : (_config_experimental = _config1.experimental) === null || _config_experimental === void 0 ? void 0 : _config_experimental[flag]) !== null && _config_experimental_flag !== void 0 ? _config_experimental_flag : defaults[flag]) !== null && _ref1 !== void 0 ? _ref1 : false);
61
+ return config.experimental === 'all' || ((_ref1 = (_config_experimental_flag = config === null || config === void 0 ? void 0 : (_config_experimental = config.experimental) === null || _config_experimental === void 0 ? void 0 : _config_experimental[flag]) !== null && _config_experimental_flag !== void 0 ? _config_experimental_flag : defaults[flag]) !== null && _ref1 !== void 0 ? _ref1 : false);
62
62
  }
63
63
  return false;
64
64
  }
65
65
  function experimentalFlagsEnabled(config) {
66
- var _config;
67
66
  if (config.experimental === 'all') {
68
67
  return featureFlags.experimental;
69
68
  }
70
69
  var _config_experimental;
71
- return Object.keys((_config_experimental = (_config = config) === null || _config === void 0 ? void 0 : _config.experimental) !== null && _config_experimental !== void 0 ? _config_experimental : {}).filter((flag)=>featureFlags.experimental.includes(flag) && config.experimental[flag]);
70
+ return Object.keys((_config_experimental = config === null || config === void 0 ? void 0 : config.experimental) !== null && _config_experimental !== void 0 ? _config_experimental : {}).filter((flag)=>featureFlags.experimental.includes(flag) && config.experimental[flag]);
72
71
  }
73
72
  function issueFlagNotices(config) {
74
73
  if (process.env.JEST_WORKER_ID !== undefined) {
@@ -36,7 +36,9 @@ function _interop_require_wildcard(obj, nodeInterop) {
36
36
  if (cache && cache.has(obj)) {
37
37
  return cache.get(obj);
38
38
  }
39
- var newObj = {};
39
+ var newObj = {
40
+ __proto__: null
41
+ };
40
42
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
41
43
  for(var key in obj){
42
44
  if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
@@ -31,10 +31,12 @@ function collapseAdjacentRules() {
31
31
  return;
32
32
  }
33
33
  let properties = comparisonMap[node.type];
34
- var _node_property, _currentRule_property;
35
34
  if (node.type === 'atrule' && node.name === 'font-face') {
36
35
  currentRule = node;
37
- } else if (properties.every((property)=>((_node_property = node[property]) !== null && _node_property !== void 0 ? _node_property : '').replace(/\s+/g, ' ') === ((_currentRule_property = currentRule[property]) !== null && _currentRule_property !== void 0 ? _currentRule_property : '').replace(/\s+/g, ' '))) {
36
+ } else if (properties.every((property)=>{
37
+ var _node_property, _currentRule_property;
38
+ return ((_node_property = node[property]) !== null && _node_property !== void 0 ? _node_property : '').replace(/\s+/g, ' ') === ((_currentRule_property = currentRule[property]) !== null && _currentRule_property !== void 0 ? _currentRule_property : '').replace(/\s+/g, ' ');
39
+ })) {
38
40
  // An AtRule may not have children (for example if we encounter duplicate @import url(…) rules)
39
41
  if (node.nodes) {
40
42
  currentRule.append(node.nodes);
@@ -21,7 +21,6 @@ const _fs = /*#__PURE__*/ _interop_require_default(require("fs"));
21
21
  const _path = /*#__PURE__*/ _interop_require_default(require("path"));
22
22
  const _isglob = /*#__PURE__*/ _interop_require_default(require("is-glob"));
23
23
  const _fastglob = /*#__PURE__*/ _interop_require_default(require("fast-glob"));
24
- const _normalizepath = /*#__PURE__*/ _interop_require_default(require("normalize-path"));
25
24
  const _parseGlob = require("../util/parseGlob");
26
25
  const _sharedState = require("./sharedState");
27
26
  const _oxide = require("@tailwindcss/oxide");
@@ -30,6 +29,37 @@ function _interop_require_default(obj) {
30
29
  default: obj
31
30
  };
32
31
  }
32
+ /*!
33
+ * Modified version of normalize-path, original license below
34
+ *
35
+ * normalize-path <https://github.com/jonschlinkert/normalize-path>
36
+ *
37
+ * Copyright (c) 2014-2018, Jon Schlinkert.
38
+ * Released under the MIT License.
39
+ */ function normalizePath(path) {
40
+ if (typeof path !== 'string') {
41
+ throw new TypeError('expected path to be a string');
42
+ }
43
+ if (path === '\\' || path === '/') return '/';
44
+ var len = path.length;
45
+ if (len <= 1) return path;
46
+ // ensure that win32 namespaces has two leading slashes, so that the path is
47
+ // handled properly by the win32 version of path.parse() after being normalized
48
+ // https://msdn.microsoft.com/library/windows/desktop/aa365247(v=vs.85).aspx#namespaces
49
+ var prefix = '';
50
+ if (len > 4 && path[3] === '\\') {
51
+ var ch = path[2];
52
+ if ((ch === '?' || ch === '.') && path.slice(0, 2) === '\\\\') {
53
+ path = path.slice(2);
54
+ prefix = '//';
55
+ }
56
+ }
57
+ // Modified part: instead of purely splitting on `\\` and `/`, we split on
58
+ // `/` and `\\` that is _not_ followed by any of the following characters: ()[]
59
+ // This is to ensure that we keep the escaping of brackets and parentheses
60
+ let segs = path.split(/[/\\]+(?![\(\)\[\]])/);
61
+ return prefix + segs.join('/');
62
+ }
33
63
  /** @typedef {import('../../types/config.js').RawFile} RawFile */ /** @typedef {import('../../types/config.js').FilePath} FilePath */ /*
34
64
  * @param {import('tailwindcss').Config} tailwindConfig
35
65
  * @param {{skip:string[]}} options
@@ -59,7 +89,7 @@ function parseCandidateFiles(context, tailwindConfig) {
59
89
  });
60
90
  // Normalize the file globs
61
91
  files = files.filter((filePath)=>typeof filePath === 'string');
62
- files = files.map(_normalizepath.default);
92
+ files = files.map(normalizePath);
63
93
  // Split into included and excluded globs
64
94
  let tasks = _fastglob.default.generateTasks(files);
65
95
  /** @type {ContentPath[]} */ let included = [];
@@ -86,6 +116,9 @@ function parseCandidateFiles(context, tailwindConfig) {
86
116
  * @param {boolean} ignore
87
117
  * @returns {ContentPath}
88
118
  */ function parseFilePath(filePath, ignore) {
119
+ // Escape special characters in the file path such as: ()[]
120
+ // But only if the special character isn't already escaped
121
+ filePath = filePath.replace(RegExp("(?<!\\\\)([\\[\\]\\(\\)])", "g"), '\\$1');
89
122
  let contentPath = {
90
123
  original: filePath,
91
124
  base: filePath,
@@ -107,7 +140,7 @@ function parseCandidateFiles(context, tailwindConfig) {
107
140
  // Afaik, this technically shouldn't be needed but there's probably
108
141
  // some internal, direct path matching with a normalized path in
109
142
  // a package which can't handle mixed directory separators
110
- let base = (0, _normalizepath.default)(contentPath.base);
143
+ let base = normalizePath(contentPath.base);
111
144
  // If the user's file path contains any special characters (like parens) for instance fast-glob
112
145
  // is like "OOOH SHINY" and treats them as such. So we have to escape the base path to fix this
113
146
  base = _fastglob.default.escapePath(base);