tailwindcss 0.0.0-insiders.ea10bb9 → 0.0.0-insiders.ea4e1cd

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 (184) hide show
  1. package/README.md +1 -1
  2. package/lib/cli/build/deps.js +17 -9
  3. package/lib/cli/build/index.js +20 -10
  4. package/lib/cli/build/plugin.js +86 -70
  5. package/lib/cli/build/utils.js +18 -8
  6. package/lib/cli/build/watching.js +16 -12
  7. package/lib/cli/help/index.js +6 -4
  8. package/lib/cli/index.js +222 -10
  9. package/lib/cli/init/index.js +29 -12
  10. package/lib/cli-peer-dependencies.js +12 -4
  11. package/lib/cli.js +4 -226
  12. package/lib/corePluginList.js +7 -1
  13. package/lib/corePlugins.js +348 -75
  14. package/lib/css/preflight.css +2 -0
  15. package/lib/featureFlags.js +27 -15
  16. package/lib/index.js +1 -47
  17. package/lib/lib/cacheInvalidation.js +7 -5
  18. package/lib/lib/collapseAdjacentRules.js +5 -3
  19. package/lib/lib/collapseDuplicateDeclarations.js +12 -10
  20. package/lib/lib/content.js +34 -30
  21. package/lib/lib/defaultExtractor.js +15 -8
  22. package/lib/lib/detectNesting.js +10 -2
  23. package/lib/lib/evaluateTailwindFunctions.js +22 -20
  24. package/lib/lib/expandApplyAtRules.js +43 -35
  25. package/lib/lib/expandTailwindAtRules.js +46 -19
  26. package/lib/lib/findAtConfigPath.js +9 -7
  27. package/lib/lib/generateRules.js +157 -92
  28. package/lib/lib/getModuleDependencies.js +85 -37
  29. package/lib/lib/load-config.js +42 -0
  30. package/lib/lib/normalizeTailwindDirectives.js +5 -3
  31. package/lib/lib/offsets.js +93 -4
  32. package/lib/lib/partitionApplyAtRules.js +3 -1
  33. package/lib/lib/regex.js +21 -7
  34. package/lib/lib/remap-bitfield.js +89 -0
  35. package/lib/lib/resolveDefaultsAtRules.js +28 -24
  36. package/lib/lib/setupContextUtils.js +190 -131
  37. package/lib/lib/setupTrackingContext.js +49 -26
  38. package/lib/lib/sharedState.js +37 -10
  39. package/lib/lib/substituteScreenAtRules.js +5 -3
  40. package/lib/oxide/cli/build/deps.js +89 -0
  41. package/lib/oxide/cli/build/index.js +53 -0
  42. package/lib/oxide/cli/build/plugin.js +375 -0
  43. package/lib/oxide/cli/build/utils.js +87 -0
  44. package/lib/oxide/cli/build/watching.js +179 -0
  45. package/lib/oxide/cli/help/index.js +72 -0
  46. package/lib/oxide/cli/index.js +214 -0
  47. package/lib/oxide/cli/init/index.js +52 -0
  48. package/lib/oxide/cli.js +5 -0
  49. package/lib/oxide/postcss-plugin.js +2 -0
  50. package/lib/plugin.js +98 -0
  51. package/lib/postcss-plugins/nesting/index.js +3 -1
  52. package/lib/postcss-plugins/nesting/plugin.js +10 -8
  53. package/lib/processTailwindFeatures.js +14 -12
  54. package/lib/public/colors.js +49 -25
  55. package/lib/public/create-plugin.js +5 -3
  56. package/lib/public/default-config.js +6 -4
  57. package/lib/public/default-theme.js +6 -4
  58. package/lib/public/load-config.js +12 -0
  59. package/lib/public/resolve-config.js +6 -4
  60. package/lib/util/applyImportantSelector.js +36 -0
  61. package/lib/util/bigSign.js +3 -1
  62. package/lib/util/buildMediaQuery.js +3 -1
  63. package/lib/util/cloneDeep.js +3 -1
  64. package/lib/util/cloneNodes.js +5 -3
  65. package/lib/util/color.js +30 -12
  66. package/lib/util/colorNames.js +752 -0
  67. package/lib/util/configurePlugins.js +3 -1
  68. package/lib/util/createPlugin.js +3 -1
  69. package/lib/util/createUtilityPlugin.js +7 -5
  70. package/lib/util/dataTypes.js +74 -17
  71. package/lib/util/defaults.js +9 -7
  72. package/lib/util/escapeClassName.js +10 -8
  73. package/lib/util/escapeCommas.js +3 -1
  74. package/lib/util/flattenColorPalette.js +3 -1
  75. package/lib/util/formatVariantSelector.js +138 -160
  76. package/lib/util/getAllConfigs.js +8 -6
  77. package/lib/util/hashConfig.js +6 -4
  78. package/lib/util/isKeyframeRule.js +3 -1
  79. package/lib/util/isPlainObject.js +3 -1
  80. package/lib/util/isSyntacticallyValidPropertyValue.js +3 -1
  81. package/lib/util/log.js +8 -4
  82. package/lib/util/nameClass.js +12 -6
  83. package/lib/util/negateValue.js +4 -2
  84. package/lib/util/normalizeConfig.js +28 -27
  85. package/lib/util/normalizeScreens.js +12 -4
  86. package/lib/util/parseAnimationValue.js +3 -1
  87. package/lib/util/parseBoxShadowValue.js +6 -2
  88. package/lib/util/parseDependency.js +3 -1
  89. package/lib/util/parseGlob.js +6 -4
  90. package/lib/util/parseObjectStyles.js +9 -7
  91. package/lib/util/pluginUtils.js +54 -54
  92. package/lib/util/prefixSelector.js +27 -11
  93. package/lib/util/pseudoElements.js +229 -0
  94. package/lib/util/removeAlphaVariables.js +3 -1
  95. package/lib/util/resolveConfig.js +17 -15
  96. package/lib/util/resolveConfigPath.js +26 -10
  97. package/lib/util/responsive.js +6 -4
  98. package/lib/util/splitAtTopLevelOnly.js +10 -2
  99. package/lib/util/tap.js +3 -1
  100. package/lib/util/toColorValue.js +3 -1
  101. package/lib/util/toPath.js +3 -1
  102. package/lib/util/transformThemeValue.js +6 -4
  103. package/lib/util/validateConfig.js +16 -3
  104. package/lib/util/validateFormalSyntax.js +3 -1
  105. package/lib/util/withAlphaVariable.js +6 -2
  106. package/loadConfig.d.ts +4 -0
  107. package/loadConfig.js +2 -0
  108. package/package.json +45 -37
  109. package/peers/index.js +63324 -46417
  110. package/resolveConfig.d.ts +11 -2
  111. package/scripts/swap-engines.js +40 -0
  112. package/src/cli/build/index.js +13 -9
  113. package/src/cli/build/plugin.js +42 -32
  114. package/src/cli/build/watching.js +4 -2
  115. package/src/cli/index.js +216 -3
  116. package/src/cli/init/index.js +37 -8
  117. package/src/cli.js +4 -220
  118. package/src/corePluginList.js +1 -1
  119. package/src/corePlugins.js +207 -32
  120. package/src/css/preflight.css +2 -0
  121. package/src/featureFlags.js +6 -0
  122. package/src/index.js +1 -47
  123. package/src/lib/content.js +12 -17
  124. package/src/lib/defaultExtractor.js +9 -3
  125. package/src/lib/detectNesting.js +9 -1
  126. package/src/lib/expandApplyAtRules.js +8 -1
  127. package/src/lib/expandTailwindAtRules.js +36 -7
  128. package/src/lib/generateRules.js +124 -42
  129. package/src/lib/getModuleDependencies.js +70 -30
  130. package/src/lib/load-config.ts +31 -0
  131. package/src/lib/offsets.js +104 -1
  132. package/src/lib/remap-bitfield.js +82 -0
  133. package/src/lib/setupContextUtils.js +103 -54
  134. package/src/lib/setupTrackingContext.js +36 -11
  135. package/src/lib/sharedState.js +15 -4
  136. package/src/oxide/cli/build/deps.ts +91 -0
  137. package/src/oxide/cli/build/index.ts +47 -0
  138. package/src/oxide/cli/build/plugin.ts +442 -0
  139. package/src/oxide/cli/build/utils.ts +74 -0
  140. package/src/oxide/cli/build/watching.ts +225 -0
  141. package/src/oxide/cli/help/index.ts +69 -0
  142. package/src/oxide/cli/index.ts +204 -0
  143. package/src/oxide/cli/init/index.ts +59 -0
  144. package/src/oxide/cli.ts +1 -0
  145. package/src/oxide/postcss-plugin.ts +1 -0
  146. package/src/plugin.js +107 -0
  147. package/src/public/colors.js +22 -0
  148. package/src/public/default-config.js +1 -1
  149. package/src/public/default-theme.js +2 -2
  150. package/src/public/load-config.js +2 -0
  151. package/src/util/applyImportantSelector.js +27 -0
  152. package/src/util/color.js +18 -3
  153. package/src/util/colorNames.js +150 -0
  154. package/src/util/dataTypes.js +33 -4
  155. package/src/util/formatVariantSelector.js +160 -163
  156. package/src/util/getAllConfigs.js +2 -2
  157. package/src/util/negateValue.js +1 -1
  158. package/src/util/normalizeConfig.js +2 -1
  159. package/src/util/pluginUtils.js +16 -31
  160. package/src/util/prefixSelector.js +28 -10
  161. package/src/util/pseudoElements.js +170 -0
  162. package/src/util/resolveConfigPath.js +12 -1
  163. package/src/util/splitAtTopLevelOnly.js +8 -1
  164. package/src/util/validateConfig.js +13 -0
  165. package/stubs/.gitignore +1 -0
  166. package/stubs/.prettierrc.json +6 -0
  167. package/stubs/{defaultConfig.stub.js → config.full.js} +183 -146
  168. package/stubs/{simpleConfig.stub.js → config.simple.js} +0 -1
  169. package/stubs/postcss.config.js +6 -0
  170. package/stubs/tailwind.config.cjs +2 -0
  171. package/stubs/tailwind.config.js +2 -0
  172. package/stubs/tailwind.config.ts +3 -0
  173. package/types/config.d.ts +15 -9
  174. package/types/generated/colors.d.ts +22 -0
  175. package/types/generated/corePluginList.d.ts +1 -1
  176. package/types/generated/default-theme.d.ts +108 -79
  177. package/CHANGELOG.md +0 -2336
  178. package/lib/cli/shared.js +0 -12
  179. package/lib/constants.js +0 -44
  180. package/scripts/install-integrations.js +0 -27
  181. package/scripts/rebuildFixtures.js +0 -68
  182. package/src/cli/shared.js +0 -5
  183. package/src/constants.js +0 -17
  184. /package/stubs/{defaultPostCssConfig.stub.js → postcss.config.cjs} +0 -0
@@ -5,10 +5,13 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  Object.defineProperty(exports, "Offsets", {
7
7
  enumerable: true,
8
- get: ()=>Offsets
8
+ get: function() {
9
+ return Offsets;
10
+ }
9
11
  });
10
- const _bigSign = /*#__PURE__*/ _interopRequireDefault(require("../util/bigSign"));
11
- function _interopRequireDefault(obj) {
12
+ const _bigSign = /*#__PURE__*/ _interop_require_default(require("../util/bigSign"));
13
+ const _remapbitfield = require("./remap-bitfield.js");
14
+ function _interop_require_default(obj) {
12
15
  return obj && obj.__esModule ? obj : {
13
16
  default: obj
14
17
  };
@@ -96,6 +99,7 @@ class Offsets {
96
99
  * @param {VariantOption} options
97
100
  * @returns {RuleOffset}
98
101
  */ applyVariantOffset(rule, variant, options) {
102
+ options.variant = variant.variants;
99
103
  return {
100
104
  ...rule,
101
105
  layer: "variants",
@@ -153,7 +157,7 @@ class Offsets {
153
157
  this.reservedVariantBits += BigInt(fnCount);
154
158
  return {
155
159
  ...this.create("variants"),
156
- variants: 1n << this.reservedVariantBits
160
+ variants: this.variantOffsets.get(variant)
157
161
  };
158
162
  }
159
163
  /**
@@ -165,11 +169,29 @@ class Offsets {
165
169
  if (a.layer !== b.layer) {
166
170
  return this.layerPositions[a.layer] - this.layerPositions[b.layer];
167
171
  }
172
+ // When sorting the `variants` layer, we need to sort based on the parent layer as well within
173
+ // this variants layer.
174
+ if (a.parentLayer !== b.parentLayer) {
175
+ return this.layerPositions[a.parentLayer] - this.layerPositions[b.parentLayer];
176
+ }
168
177
  // Sort based on the sorting function
169
178
  for (let aOptions of a.options){
170
179
  for (let bOptions of b.options){
171
180
  if (aOptions.id !== bOptions.id) continue;
172
181
  if (!aOptions.sort || !bOptions.sort) continue;
182
+ var _max;
183
+ let maxFnVariant = (_max = max([
184
+ aOptions.variant,
185
+ bOptions.variant
186
+ ])) !== null && _max !== void 0 ? _max : 0n;
187
+ // Create a mask of 0s from bits 1..N where N represents the mask of the Nth bit
188
+ let mask = ~(maxFnVariant | maxFnVariant - 1n);
189
+ let aVariantsAfterFn = a.variants & mask;
190
+ let bVariantsAfterFn = b.variants & mask;
191
+ // If the variants the same, we _can_ sort them
192
+ if (aVariantsAfterFn !== bVariantsAfterFn) {
193
+ continue;
194
+ }
173
195
  let result = aOptions.sort({
174
196
  value: aOptions.value,
175
197
  modifier: aOptions.modifier
@@ -196,10 +218,57 @@ class Offsets {
196
218
  return a.index - b.index;
197
219
  }
198
220
  /**
221
+ * Arbitrary variants are recorded in the order they're encountered.
222
+ * This means that the order is not stable between environments and sets of content files.
223
+ *
224
+ * In order to make the order stable, we need to remap the arbitrary variant offsets to
225
+ * be in alphabetical order starting from the offset of the first arbitrary variant.
226
+ */ recalculateVariantOffsets() {
227
+ // Sort the variants by their name
228
+ let variants = Array.from(this.variantOffsets.entries()).filter(([v])=>v.startsWith("[")).sort(([a], [z])=>fastCompare(a, z));
229
+ // Sort the list of offsets
230
+ // This is not necessarily a discrete range of numbers which is why
231
+ // we're using sort instead of creating a range from min/max
232
+ let newOffsets = variants.map(([, offset])=>offset).sort((a, z)=>(0, _bigSign.default)(a - z));
233
+ // Create a map from the old offsets to the new offsets in the new sort order
234
+ /** @type {[bigint, bigint][]} */ let mapping = variants.map(([, oldOffset], i)=>[
235
+ oldOffset,
236
+ newOffsets[i]
237
+ ]);
238
+ // Remove any variants that will not move letting us skip
239
+ // remapping if everything happens to be in order
240
+ return mapping.filter(([a, z])=>a !== z);
241
+ }
242
+ /**
243
+ * @template T
244
+ * @param {[RuleOffset, T][]} list
245
+ * @returns {[RuleOffset, T][]}
246
+ */ remapArbitraryVariantOffsets(list) {
247
+ let mapping = this.recalculateVariantOffsets();
248
+ // No arbitrary variants? Nothing to do.
249
+ // Everyhing already in order? Nothing to do.
250
+ if (mapping.length === 0) {
251
+ return list;
252
+ }
253
+ // Remap every variant offset in the list
254
+ return list.map((item)=>{
255
+ let [offset, rule] = item;
256
+ offset = {
257
+ ...offset,
258
+ variants: (0, _remapbitfield.remapBitfield)(offset.variants, mapping)
259
+ };
260
+ return [
261
+ offset,
262
+ rule
263
+ ];
264
+ });
265
+ }
266
+ /**
199
267
  * @template T
200
268
  * @param {[RuleOffset, T][]} list
201
269
  * @returns {[RuleOffset, T][]}
202
270
  */ sort(list) {
271
+ list = this.remapArbitraryVariantOffsets(list);
203
272
  return list.sort(([a], [b])=>(0, _bigSign.default)(this.compare(a, b)));
204
273
  }
205
274
  }
@@ -215,3 +284,23 @@ class Offsets {
215
284
  }
216
285
  return max;
217
286
  }
287
+ /**
288
+ * A fast ASCII order string comparison function.
289
+ *
290
+ * Using `.sort()` without a custom compare function is faster
291
+ * But you can only use that if you're sorting an array of
292
+ * only strings. If you're sorting strings inside objects
293
+ * or arrays, you need must use a custom compare function.
294
+ *
295
+ * @param {string} a
296
+ * @param {string} b
297
+ */ function fastCompare(a, b) {
298
+ let aLen = a.length;
299
+ let bLen = b.length;
300
+ let minLen = aLen < bLen ? aLen : bLen;
301
+ for(let i = 0; i < minLen; i++){
302
+ let cmp = a.charCodeAt(i) - b.charCodeAt(i);
303
+ if (cmp !== 0) return cmp;
304
+ }
305
+ return aLen - bLen;
306
+ }
@@ -4,7 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "default", {
6
6
  enumerable: true,
7
- get: ()=>expandApplyAtRules
7
+ get: function() {
8
+ return expandApplyAtRules;
9
+ }
8
10
  });
9
11
  function partitionRules(root) {
10
12
  if (!root.walkAtRules) return;
package/lib/lib/regex.js CHANGED
@@ -9,13 +9,27 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- pattern: ()=>pattern,
13
- withoutCapturing: ()=>withoutCapturing,
14
- any: ()=>any,
15
- optional: ()=>optional,
16
- zeroOrMore: ()=>zeroOrMore,
17
- nestedBrackets: ()=>nestedBrackets,
18
- escape: ()=>escape
12
+ pattern: function() {
13
+ return pattern;
14
+ },
15
+ withoutCapturing: function() {
16
+ return withoutCapturing;
17
+ },
18
+ any: function() {
19
+ return any;
20
+ },
21
+ optional: function() {
22
+ return optional;
23
+ },
24
+ zeroOrMore: function() {
25
+ return zeroOrMore;
26
+ },
27
+ nestedBrackets: function() {
28
+ return nestedBrackets;
29
+ },
30
+ escape: function() {
31
+ return escape;
32
+ }
19
33
  });
20
34
  const REGEX_SPECIAL = /[\\^$.*+?()[\]{}|]/g;
21
35
  const REGEX_HAS_SPECIAL = RegExp(REGEX_SPECIAL.source);
@@ -0,0 +1,89 @@
1
+ // @ts-check
2
+ /**
3
+ * We must remap all the old bits to new bits for each set variant
4
+ * Only arbitrary variants are considered as those are the only
5
+ * ones that need to be re-sorted at this time
6
+ *
7
+ * An iterated process that removes and sets individual bits simultaneously
8
+ * will not work because we may have a new bit that is also a later old bit
9
+ * This means that we would be removing a previously set bit which we don't
10
+ * want to do
11
+ *
12
+ * For example (assume `bN` = `1<<N`)
13
+ * Given the "total" mapping `[[b1, b3], [b2, b4], [b3, b1], [b4, b2]]`
14
+ * The mapping is "total" because:
15
+ * 1. Every input and output is accounted for
16
+ * 2. All combinations are unique
17
+ * 3. No one input maps to multiple outputs and vice versa
18
+ * And, given an offset with all bits set:
19
+ * V = b1 | b2 | b3 | b4
20
+ *
21
+ * Let's explore the issue with removing and setting bits simultaneously:
22
+ * V & ~b1 | b3 = b2 | b3 | b4
23
+ * V & ~b2 | b4 = b3 | b4
24
+ * V & ~b3 | b1 = b1 | b4
25
+ * V & ~b4 | b2 = b1 | b2
26
+ *
27
+ * As you can see, we end up with the wrong result.
28
+ * This is because we're removing a bit that was previously set.
29
+ * And, thus the final result is missing b3 and b4.
30
+ *
31
+ * Now, let's explore the issue with removing the bits first:
32
+ * V & ~b1 = b2 | b3 | b4
33
+ * V & ~b2 = b3 | b4
34
+ * V & ~b3 = b4
35
+ * V & ~b4 = 0
36
+ *
37
+ * And then setting the bits:
38
+ * V | b3 = b3
39
+ * V | b4 = b3 | b4
40
+ * V | b1 = b1 | b3 | b4
41
+ * V | b2 = b1 | b2 | b3 | b4
42
+ *
43
+ * We get the correct result because we're not removing any bits that were
44
+ * previously set thus properly remapping the bits to the new order
45
+ *
46
+ * To collect this into a single operation that can be done simultaneously
47
+ * we must first create a mask for the old bits that are set and a mask for
48
+ * the new bits that are set. Then we can remove the old bits and set the new
49
+ * bits simultaneously in a "single" operation like so:
50
+ * OldMask = b1 | b2 | b3 | b4
51
+ * NewMask = b3 | b4 | b1 | b2
52
+ *
53
+ * So this:
54
+ * V & ~oldMask | newMask
55
+ *
56
+ * Expands to this:
57
+ * V & ~b1 & ~b2 & ~b3 & ~b4 | b3 | b4 | b1 | b2
58
+ *
59
+ * Which becomes this:
60
+ * b1 | b2 | b3 | b4
61
+ *
62
+ * Which is the correct result!
63
+ *
64
+ * @param {bigint} num
65
+ * @param {[bigint, bigint][]} mapping
66
+ */ "use strict";
67
+ Object.defineProperty(exports, "__esModule", {
68
+ value: true
69
+ });
70
+ Object.defineProperty(exports, "remapBitfield", {
71
+ enumerable: true,
72
+ get: function() {
73
+ return remapBitfield;
74
+ }
75
+ });
76
+ function remapBitfield(num, mapping) {
77
+ // Create masks for the old and new bits that are set
78
+ let oldMask = 0n;
79
+ let newMask = 0n;
80
+ for (let [oldBit, newBit] of mapping){
81
+ if (num & oldBit) {
82
+ oldMask = oldMask | oldBit;
83
+ newMask = newMask | newBit;
84
+ }
85
+ }
86
+ // Remove all old bits
87
+ // Set all new bits
88
+ return num & ~oldMask | newMask;
89
+ }
@@ -9,20 +9,24 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- elementSelectorParser: ()=>elementSelectorParser,
13
- default: ()=>resolveDefaultsAtRules
12
+ elementSelectorParser: function() {
13
+ return elementSelectorParser;
14
+ },
15
+ default: function() {
16
+ return resolveDefaultsAtRules;
17
+ }
14
18
  });
15
- const _postcss = /*#__PURE__*/ _interopRequireDefault(require("postcss"));
16
- const _postcssSelectorParser = /*#__PURE__*/ _interopRequireDefault(require("postcss-selector-parser"));
19
+ const _postcss = /*#__PURE__*/ _interop_require_default(require("postcss"));
20
+ const _postcssselectorparser = /*#__PURE__*/ _interop_require_default(require("postcss-selector-parser"));
17
21
  const _featureFlags = require("../featureFlags");
18
- function _interopRequireDefault(obj) {
22
+ function _interop_require_default(obj) {
19
23
  return obj && obj.__esModule ? obj : {
20
24
  default: obj
21
25
  };
22
26
  }
23
27
  let getNode = {
24
28
  id (node) {
25
- return _postcssSelectorParser.default.attribute({
29
+ return _postcssselectorparser.default.attribute({
26
30
  attribute: "id",
27
31
  operator: "=",
28
32
  value: node.value,
@@ -60,14 +64,14 @@ function minimumImpactSelector(nodes) {
60
64
  let combinatorIdx = rest.findIndex((n)=>n.type === "combinator" && n.value === ">");
61
65
  if (combinatorIdx !== -1) {
62
66
  rest.splice(0, combinatorIdx);
63
- rest.unshift(_postcssSelectorParser.default.universal());
67
+ rest.unshift(_postcssselectorparser.default.universal());
64
68
  }
65
69
  return [
66
70
  bestNode,
67
71
  ...rest.reverse()
68
72
  ].join("").trim();
69
73
  }
70
- let elementSelectorParser = (0, _postcssSelectorParser.default)((selectors)=>{
74
+ let elementSelectorParser = (0, _postcssselectorparser.default)((selectors)=>{
71
75
  return selectors.map((s)=>{
72
76
  let nodes = s.split((n)=>n.type === "combinator" && n.value === " ").pop();
73
77
  return minimumImpactSelector(nodes);
@@ -99,8 +103,8 @@ function resolveDefaultsAtRules({ tailwindConfig }) {
99
103
  if ((0, _featureFlags.flagEnabled)(tailwindConfig, "optimizeUniversalDefaults")) {
100
104
  for (let universal of universals){
101
105
  /** @type {Map<string, Set<string>>} */ let selectorGroups = new Map();
102
- var ref;
103
- let rules = (ref = variableNodeMap.get(universal.params)) !== null && ref !== void 0 ? ref : [];
106
+ var _variableNodeMap_get;
107
+ let rules = (_variableNodeMap_get = variableNodeMap.get(universal.params)) !== null && _variableNodeMap_get !== void 0 ? _variableNodeMap_get : [];
104
108
  for (let rule of rules){
105
109
  for (let selector of extractElementSelector(rule.selector)){
106
110
  // If selector contains a vendor prefix after a pseudo element or class,
@@ -108,8 +112,8 @@ function resolveDefaultsAtRules({ tailwindConfig }) {
108
112
  // a single rule will cause browsers that do not understand the
109
113
  // vendor prefix to throw out the whole rule
110
114
  let selectorGroupName = selector.includes(":-") || selector.includes("::-") ? selector : "__DEFAULT__";
111
- var ref1;
112
- let selectors = (ref1 = selectorGroups.get(selectorGroupName)) !== null && ref1 !== void 0 ? ref1 : new Set();
115
+ var _selectorGroups_get;
116
+ let selectors = (_selectorGroups_get = selectorGroups.get(selectorGroupName)) !== null && _selectorGroups_get !== void 0 ? _selectorGroups_get : new Set();
113
117
  selectorGroups.set(selectorGroupName, selectors);
114
118
  selectors.add(selector);
115
119
  }
@@ -119,12 +123,12 @@ function resolveDefaultsAtRules({ tailwindConfig }) {
119
123
  universal.remove();
120
124
  continue;
121
125
  }
122
- for (let [, selectors1] of selectorGroups){
126
+ for (let [, selectors] of selectorGroups){
123
127
  let universalRule = _postcss.default.rule({
124
128
  source: universal.source
125
129
  });
126
130
  universalRule.selectors = [
127
- ...selectors1
131
+ ...selectors
128
132
  ];
129
133
  universalRule.append(universal.nodes.map((node)=>node.clone()));
130
134
  universal.before(universalRule);
@@ -133,29 +137,29 @@ function resolveDefaultsAtRules({ tailwindConfig }) {
133
137
  universal.remove();
134
138
  }
135
139
  } else if (universals.size) {
136
- let universalRule1 = _postcss.default.rule({
140
+ let universalRule = _postcss.default.rule({
137
141
  selectors: [
138
142
  "*",
139
143
  "::before",
140
144
  "::after"
141
145
  ]
142
146
  });
143
- for (let universal1 of universals){
144
- universalRule1.append(universal1.nodes);
145
- if (!universalRule1.parent) {
146
- universal1.before(universalRule1);
147
+ for (let universal of universals){
148
+ universalRule.append(universal.nodes);
149
+ if (!universalRule.parent) {
150
+ universal.before(universalRule);
147
151
  }
148
- if (!universalRule1.source) {
149
- universalRule1.source = universal1.source;
152
+ if (!universalRule.source) {
153
+ universalRule.source = universal.source;
150
154
  }
151
- universal1.remove();
155
+ universal.remove();
152
156
  }
153
- let backdropRule = universalRule1.clone({
157
+ let backdropRule = universalRule.clone({
154
158
  selectors: [
155
159
  "::backdrop"
156
160
  ]
157
161
  });
158
- universalRule1.after(backdropRule);
162
+ universalRule.after(backdropRule);
159
163
  }
160
164
  };
161
165
  }