tailwindcss 0.0.0-insiders.bd970d0 → 0.0.0-insiders.bda8421

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 (137) hide show
  1. package/README.md +1 -2
  2. package/lib/cli/build/deps.js +62 -0
  3. package/lib/cli/build/index.js +12 -15
  4. package/lib/cli/build/plugin.js +107 -167
  5. package/lib/cli/build/utils.js +13 -13
  6. package/lib/cli/build/watching.js +10 -10
  7. package/lib/cli/help/index.js +11 -11
  8. package/lib/cli/index.js +60 -61
  9. package/lib/cli/init/index.js +16 -16
  10. package/lib/cli-peer-dependencies.js +36 -0
  11. package/lib/cli.js +1 -1
  12. package/lib/corePluginList.js +4 -1
  13. package/lib/corePlugins.js +2018 -1905
  14. package/lib/css/preflight.css +18 -12
  15. package/lib/featureFlags.js +17 -23
  16. package/lib/index.js +1 -1
  17. package/lib/lib/cacheInvalidation.js +3 -3
  18. package/lib/lib/collapseAdjacentRules.js +6 -6
  19. package/lib/lib/collapseDuplicateDeclarations.js +1 -1
  20. package/lib/lib/content.js +39 -32
  21. package/lib/lib/defaultExtractor.js +40 -17
  22. package/lib/lib/evaluateTailwindFunctions.js +23 -23
  23. package/lib/lib/expandApplyAtRules.js +37 -18
  24. package/lib/lib/expandTailwindAtRules.js +49 -85
  25. package/lib/lib/findAtConfigPath.js +5 -5
  26. package/lib/lib/generateRules.js +82 -55
  27. package/lib/lib/getModuleDependencies.js +23 -23
  28. package/lib/lib/load-config.js +21 -6
  29. package/lib/lib/normalizeTailwindDirectives.js +36 -21
  30. package/lib/lib/offsets.js +97 -48
  31. package/lib/lib/partitionApplyAtRules.js +2 -2
  32. package/lib/lib/regex.js +5 -5
  33. package/lib/lib/resolveDefaultsAtRules.js +27 -25
  34. package/lib/lib/setupContextUtils.js +195 -167
  35. package/lib/lib/setupTrackingContext.js +4 -5
  36. package/lib/lib/sharedState.js +10 -10
  37. package/lib/lib/substituteScreenAtRules.js +4 -4
  38. package/lib/plugin.js +8 -124
  39. package/lib/postcss-plugins/nesting/index.js +2 -2
  40. package/lib/postcss-plugins/nesting/plugin.js +11 -11
  41. package/lib/processTailwindFeatures.js +3 -5
  42. package/lib/public/colors.js +264 -264
  43. package/lib/util/applyImportantSelector.js +2 -2
  44. package/lib/util/buildMediaQuery.js +2 -2
  45. package/lib/util/cloneDeep.js +1 -1
  46. package/lib/util/cloneNodes.js +33 -13
  47. package/lib/util/color.js +19 -19
  48. package/lib/util/createUtilityPlugin.js +3 -3
  49. package/lib/util/dataTypes.js +170 -113
  50. package/lib/util/defaults.js +4 -4
  51. package/lib/util/escapeClassName.js +2 -2
  52. package/lib/util/escapeCommas.js +1 -1
  53. package/lib/util/flattenColorPalette.js +2 -2
  54. package/lib/util/formatVariantSelector.js +24 -19
  55. package/lib/util/getAllConfigs.js +4 -5
  56. package/lib/util/isKeyframeRule.js +1 -1
  57. package/lib/util/isPlainObject.js +2 -2
  58. package/lib/util/isSyntacticallyValidPropertyValue.js +10 -10
  59. package/lib/util/log.js +6 -23
  60. package/lib/util/nameClass.js +4 -4
  61. package/lib/util/negateValue.js +8 -8
  62. package/lib/util/normalizeConfig.js +63 -94
  63. package/lib/util/normalizeScreens.js +18 -18
  64. package/lib/util/parseAnimationValue.js +38 -38
  65. package/lib/util/parseBoxShadowValue.js +18 -18
  66. package/lib/util/parseDependency.js +4 -4
  67. package/lib/util/parseGlob.js +4 -4
  68. package/lib/util/parseObjectStyles.js +1 -1
  69. package/lib/util/pluginUtils.js +36 -21
  70. package/lib/util/prefixSelector.js +4 -4
  71. package/lib/util/pseudoElements.js +72 -69
  72. package/lib/util/removeAlphaVariables.js +1 -1
  73. package/lib/util/resolveConfig.js +11 -15
  74. package/lib/util/resolveConfigPath.js +6 -6
  75. package/lib/util/responsive.js +1 -1
  76. package/lib/util/splitAtTopLevelOnly.js +3 -3
  77. package/lib/util/toColorValue.js +1 -1
  78. package/lib/util/toPath.js +2 -2
  79. package/lib/util/transformThemeValue.js +24 -24
  80. package/lib/util/validateConfig.js +9 -20
  81. package/lib/util/validateFormalSyntax.js +5 -5
  82. package/lib/util/withAlphaVariable.js +5 -5
  83. package/lib/value-parser/index.js +5 -5
  84. package/lib/value-parser/parse.js +43 -43
  85. package/lib/value-parser/stringify.js +11 -11
  86. package/lib/value-parser/unit.js +5 -5
  87. package/lib/value-parser/walk.js +1 -1
  88. package/nesting/index.d.ts +4 -0
  89. package/package.json +41 -36
  90. package/peers/index.js +96503 -0
  91. package/resolveConfig.d.ts +22 -3
  92. package/scripts/generate-types.js +1 -2
  93. package/scripts/release-notes.js +1 -1
  94. package/src/cli/build/deps.js +56 -0
  95. package/src/cli/build/index.js +0 -4
  96. package/src/cli/build/plugin.js +53 -85
  97. package/src/cli/build/watching.js +1 -1
  98. package/src/cli/index.js +0 -1
  99. package/src/cli-peer-dependencies.js +15 -0
  100. package/src/corePluginList.js +1 -1
  101. package/src/corePlugins.js +118 -31
  102. package/src/css/preflight.css +18 -12
  103. package/src/featureFlags.js +3 -5
  104. package/src/lib/content.js +39 -30
  105. package/src/lib/defaultExtractor.js +29 -6
  106. package/src/lib/expandApplyAtRules.js +24 -0
  107. package/src/lib/expandTailwindAtRules.js +19 -56
  108. package/src/lib/generateRules.js +39 -8
  109. package/src/lib/load-config.ts +13 -0
  110. package/src/lib/normalizeTailwindDirectives.js +27 -0
  111. package/src/lib/offsets.js +62 -3
  112. package/src/lib/resolveDefaultsAtRules.js +5 -1
  113. package/src/lib/setupContextUtils.js +79 -39
  114. package/src/plugin.js +0 -86
  115. package/src/processTailwindFeatures.js +0 -3
  116. package/src/util/cloneNodes.js +35 -14
  117. package/src/util/dataTypes.js +72 -6
  118. package/src/util/formatVariantSelector.js +7 -0
  119. package/src/util/isPlainObject.js +1 -1
  120. package/src/util/log.js +0 -24
  121. package/src/util/normalizeConfig.js +11 -38
  122. package/src/util/pluginUtils.js +20 -0
  123. package/src/util/pseudoElements.js +4 -0
  124. package/src/util/validateConfig.js +0 -10
  125. package/stubs/config.full.js +68 -8
  126. package/stubs/config.simple.js +1 -1
  127. package/stubs/postcss.config.cjs +1 -0
  128. package/stubs/postcss.config.js +1 -0
  129. package/types/config.d.ts +12 -5
  130. package/types/generated/corePluginList.d.ts +1 -1
  131. package/types/generated/default-theme.d.ts +28 -9
  132. package/types/index.d.ts +7 -3
  133. package/index.css +0 -5
  134. package/lib/lib/detectNesting.js +0 -45
  135. package/lib/lib/handleImportAtRules.js +0 -50
  136. package/src/lib/detectNesting.js +0 -47
  137. package/src/lib/handleImportAtRules.js +0 -34
@@ -24,102 +24,105 @@ Object.defineProperty(exports, "movePseudos", {
24
24
  });
25
25
  let elementProperties = {
26
26
  // Pseudo elements from the spec
27
- '::after': [
28
- 'terminal',
29
- 'jumpable'
27
+ "::after": [
28
+ "terminal",
29
+ "jumpable"
30
30
  ],
31
- '::backdrop': [
32
- 'terminal',
33
- 'jumpable'
31
+ "::backdrop": [
32
+ "terminal",
33
+ "jumpable"
34
34
  ],
35
- '::before': [
36
- 'terminal',
37
- 'jumpable'
35
+ "::before": [
36
+ "terminal",
37
+ "jumpable"
38
38
  ],
39
- '::cue': [
40
- 'terminal'
39
+ "::cue": [
40
+ "terminal"
41
41
  ],
42
- '::cue-region': [
43
- 'terminal'
42
+ "::cue-region": [
43
+ "terminal"
44
44
  ],
45
- '::first-letter': [
46
- 'terminal',
47
- 'jumpable'
45
+ "::first-letter": [
46
+ "terminal",
47
+ "jumpable"
48
48
  ],
49
- '::first-line': [
50
- 'terminal',
51
- 'jumpable'
49
+ "::first-line": [
50
+ "terminal",
51
+ "jumpable"
52
52
  ],
53
- '::grammar-error': [
54
- 'terminal'
53
+ "::grammar-error": [
54
+ "terminal"
55
55
  ],
56
- '::marker': [
57
- 'terminal',
58
- 'jumpable'
56
+ "::marker": [
57
+ "terminal",
58
+ "jumpable"
59
59
  ],
60
- '::part': [
61
- 'terminal',
62
- 'actionable'
60
+ "::part": [
61
+ "terminal",
62
+ "actionable"
63
63
  ],
64
- '::placeholder': [
65
- 'terminal',
66
- 'jumpable'
64
+ "::placeholder": [
65
+ "terminal",
66
+ "jumpable"
67
67
  ],
68
- '::selection': [
69
- 'terminal',
70
- 'jumpable'
68
+ "::selection": [
69
+ "terminal",
70
+ "jumpable"
71
71
  ],
72
- '::slotted': [
73
- 'terminal'
72
+ "::slotted": [
73
+ "terminal"
74
74
  ],
75
- '::spelling-error': [
76
- 'terminal'
75
+ "::spelling-error": [
76
+ "terminal"
77
77
  ],
78
- '::target-text': [
79
- 'terminal'
78
+ "::target-text": [
79
+ "terminal"
80
80
  ],
81
81
  // Pseudo elements from the spec with special rules
82
- '::file-selector-button': [
83
- 'terminal',
84
- 'actionable'
82
+ "::file-selector-button": [
83
+ "terminal",
84
+ "actionable"
85
85
  ],
86
86
  // Library-specific pseudo elements used by component libraries
87
87
  // These are Shadow DOM-like
88
- '::deep': [
89
- 'actionable'
88
+ "::deep": [
89
+ "actionable"
90
90
  ],
91
- '::v-deep': [
92
- 'actionable'
91
+ "::v-deep": [
92
+ "actionable"
93
93
  ],
94
- '::ng-deep': [
95
- 'actionable'
94
+ "::ng-deep": [
95
+ "actionable"
96
96
  ],
97
97
  // Note: As a rule, double colons (::) should be used instead of a single colon
98
98
  // (:). This distinguishes pseudo-classes from pseudo-elements. However, since
99
99
  // this distinction was not present in older versions of the W3C spec, most
100
100
  // browsers support both syntaxes for the original pseudo-elements.
101
- ':after': [
102
- 'terminal',
103
- 'jumpable'
101
+ ":after": [
102
+ "terminal",
103
+ "jumpable"
104
104
  ],
105
- ':before': [
106
- 'terminal',
107
- 'jumpable'
105
+ ":before": [
106
+ "terminal",
107
+ "jumpable"
108
108
  ],
109
- ':first-letter': [
110
- 'terminal',
111
- 'jumpable'
109
+ ":first-letter": [
110
+ "terminal",
111
+ "jumpable"
112
112
  ],
113
- ':first-line': [
114
- 'terminal',
115
- 'jumpable'
113
+ ":first-line": [
114
+ "terminal",
115
+ "jumpable"
116
116
  ],
117
+ ":where": [],
118
+ ":is": [],
119
+ ":has": [],
117
120
  // The default value is used when the pseudo-element is not recognized
118
121
  // Because it's not recognized, we don't know if it's terminal or not
119
122
  // So we assume it can be moved AND can have user-action pseudo classes attached to it
120
123
  __default__: [
121
- 'terminal',
122
- 'actionable'
124
+ "terminal",
125
+ "actionable"
123
126
  ]
124
127
  };
125
128
  function movePseudos(sel) {
@@ -146,10 +149,10 @@ function movePseudos(sel) {
146
149
  /** @type {MovablePseudo[]} */ let buffer = [];
147
150
  /** @type {Pseudo | null} */ let lastSeenElement = null;
148
151
  for (let node of sel.nodes){
149
- if (node.type === 'combinator') {
150
- buffer = buffer.filter(([, node])=>propertiesForPseudo(node).includes('jumpable'));
152
+ if (node.type === "combinator") {
153
+ buffer = buffer.filter(([, node])=>propertiesForPseudo(node).includes("jumpable"));
151
154
  lastSeenElement = null;
152
- } else if (node.type === 'pseudo') {
155
+ } else if (node.type === "pseudo") {
153
156
  if (isMovablePseudoElement(node)) {
154
157
  lastSeenElement = node;
155
158
  buffer.push([
@@ -183,22 +186,22 @@ function movePseudos(sel) {
183
186
  * @param {Node} node
184
187
  * @returns {boolean}
185
188
  */ function isPseudoElement(node) {
186
- return node.value.startsWith('::') || elementProperties[node.value] !== undefined;
189
+ return node.value.startsWith("::") || elementProperties[node.value] !== undefined;
187
190
  }
188
191
  /**
189
192
  * @param {Node} node
190
193
  * @returns {boolean}
191
194
  */ function isMovablePseudoElement(node) {
192
- return isPseudoElement(node) && propertiesForPseudo(node).includes('terminal');
195
+ return isPseudoElement(node) && propertiesForPseudo(node).includes("terminal");
193
196
  }
194
197
  /**
195
198
  * @param {Node} node
196
199
  * @param {Pseudo} pseudo
197
200
  * @returns {boolean}
198
201
  */ function isAttachablePseudoClass(node, pseudo) {
199
- if (node.type !== 'pseudo') return false;
202
+ if (node.type !== "pseudo") return false;
200
203
  if (isPseudoElement(node)) return false;
201
- return propertiesForPseudo(pseudo).includes('actionable');
204
+ return propertiesForPseudo(pseudo).includes("actionable");
202
205
  }
203
206
  /**
204
207
  * @param {Pseudo} pseudo
@@ -24,7 +24,7 @@ function removeAlphaVariables(container, toRemove) {
24
24
  }
25
25
  for (let varName of toRemove){
26
26
  if (decl.value.includes(`/ var(${varName})`)) {
27
- decl.value = decl.value.replace(`/ var(${varName})`, '');
27
+ decl.value = decl.value.replace(`/ var(${varName})`, "");
28
28
  }
29
29
  }
30
30
  });
@@ -26,7 +26,7 @@ function _interop_require_default(obj) {
26
26
  };
27
27
  }
28
28
  function isFunction(input) {
29
- return typeof input === 'function';
29
+ return typeof input === "function";
30
30
  }
31
31
  function mergeWith(target, ...sources) {
32
32
  let customizer = sources.pop();
@@ -50,7 +50,7 @@ const configUtils = {
50
50
  colors: _colors.default,
51
51
  negative (scale) {
52
52
  // TODO: Log that this function isn't really needed anymore?
53
- return Object.keys(scale).filter((key)=>scale[key] !== '0').reduce((negativeScale, key)=>{
53
+ return Object.keys(scale).filter((key)=>scale[key] !== "0").reduce((negativeScale, key)=>{
54
54
  let negativeValue = (0, _negateValue.default)(scale[key]);
55
55
  if (negativeValue !== undefined) {
56
56
  negativeScale[`-${key}`] = negativeValue;
@@ -59,7 +59,7 @@ const configUtils = {
59
59
  }, {});
60
60
  },
61
61
  breakpoints (screens) {
62
- return Object.keys(screens).filter((key)=>typeof screens[key] === 'string').reduce((breakpoints, key)=>({
62
+ return Object.keys(screens).filter((key)=>typeof screens[key] === "string").reduce((breakpoints, key)=>({
63
63
  ...breakpoints,
64
64
  [`screen-${key}`]: screens[key]
65
65
  }), {});
@@ -69,7 +69,7 @@ function value(valueToResolve, ...args) {
69
69
  return isFunction(valueToResolve) ? valueToResolve(...args) : valueToResolve;
70
70
  }
71
71
  function collectExtends(items) {
72
- return items.reduce((merged, { extend })=>{
72
+ return items.reduce((merged, { extend })=>{
73
73
  return mergeWith(merged, extend, (mergedValue, extendValue)=>{
74
74
  if (mergedValue === undefined) {
75
75
  return [
@@ -116,7 +116,7 @@ function mergeExtensionCustomizer(merged, value) {
116
116
  // Execute default behaviour
117
117
  return undefined;
118
118
  }
119
- function mergeExtensions({ extend, ...theme }) {
119
+ function mergeExtensions({ extend , ...theme }) {
120
120
  return mergeWith(theme, extend, (themeValue, extensions)=>{
121
121
  // The `extend` property is an array, so we need to check if it contains any functions
122
122
  if (!isFunction(themeValue) && !extensions.some(isFunction)) {
@@ -186,18 +186,16 @@ function resolveFunctionKeys(object) {
186
186
  function extractPluginConfigs(configs) {
187
187
  let allConfigs = [];
188
188
  configs.forEach((config)=>{
189
- var _config;
190
189
  allConfigs = [
191
190
  ...allConfigs,
192
191
  config
193
192
  ];
194
193
  var _config_plugins;
195
- const plugins = (_config_plugins = (_config = config) === null || _config === void 0 ? void 0 : _config.plugins) !== null && _config_plugins !== void 0 ? _config_plugins : [];
194
+ const plugins = (_config_plugins = config === null || config === void 0 ? void 0 : config.plugins) !== null && _config_plugins !== void 0 ? _config_plugins : [];
196
195
  if (plugins.length === 0) {
197
196
  return;
198
197
  }
199
198
  plugins.forEach((plugin)=>{
200
- var _plugin;
201
199
  if (plugin.__isOptionsFunction) {
202
200
  plugin = plugin();
203
201
  }
@@ -205,7 +203,7 @@ function extractPluginConfigs(configs) {
205
203
  allConfigs = [
206
204
  ...allConfigs,
207
205
  ...extractPluginConfigs([
208
- (_plugin_config = (_plugin = plugin) === null || _plugin === void 0 ? void 0 : _plugin.config) !== null && _plugin_config !== void 0 ? _plugin_config : {}
206
+ (_plugin_config = plugin === null || plugin === void 0 ? void 0 : plugin.config) !== null && _plugin_config !== void 0 ? _plugin_config : {}
209
207
  ])
210
208
  ];
211
209
  });
@@ -240,21 +238,19 @@ function resolveConfig(configs) {
240
238
  let allConfigs = [
241
239
  ...extractPluginConfigs(configs),
242
240
  {
243
- prefix: '',
241
+ prefix: "",
244
242
  important: false,
245
- separator: ':'
243
+ separator: ":"
246
244
  }
247
245
  ];
248
246
  var _t_theme, _c_plugins;
249
247
  return (0, _normalizeConfig.normalizeConfig)((0, _defaults.defaults)({
250
248
  theme: resolveFunctionKeys(mergeExtensions(mergeThemes(allConfigs.map((t)=>{
251
- var _t;
252
- return (_t_theme = (_t = t) === null || _t === void 0 ? void 0 : _t.theme) !== null && _t_theme !== void 0 ? _t_theme : {};
249
+ return (_t_theme = t === null || t === void 0 ? void 0 : t.theme) !== null && _t_theme !== void 0 ? _t_theme : {};
253
250
  })))),
254
251
  corePlugins: resolveCorePlugins(allConfigs.map((c)=>c.corePlugins)),
255
252
  plugins: resolvePluginLists(configs.map((c)=>{
256
- var _c;
257
- return (_c_plugins = (_c = c) === null || _c === void 0 ? void 0 : _c.plugins) !== null && _c_plugins !== void 0 ? _c_plugins : [];
253
+ return (_c_plugins = c === null || c === void 0 ? void 0 : c.plugins) !== null && _c_plugins !== void 0 ? _c_plugins : [];
258
254
  }))
259
255
  }, ...allConfigs));
260
256
  }
@@ -24,19 +24,19 @@ function _interop_require_default(obj) {
24
24
  };
25
25
  }
26
26
  const defaultConfigFiles = [
27
- './tailwind.config.js',
28
- './tailwind.config.cjs',
29
- './tailwind.config.mjs',
30
- './tailwind.config.ts'
27
+ "./tailwind.config.js",
28
+ "./tailwind.config.cjs",
29
+ "./tailwind.config.mjs",
30
+ "./tailwind.config.ts"
31
31
  ];
32
32
  function isObject(value) {
33
- return typeof value === 'object' && value !== null;
33
+ return typeof value === "object" && value !== null;
34
34
  }
35
35
  function isEmpty(obj) {
36
36
  return Object.keys(obj).length === 0;
37
37
  }
38
38
  function isString(value) {
39
- return typeof value === 'string' || value instanceof String;
39
+ return typeof value === "string" || value instanceof String;
40
40
  }
41
41
  function resolveConfigPath(pathOrConfig) {
42
42
  // require('tailwindcss')({ theme: ..., variants: ... })
@@ -17,7 +17,7 @@ function _interop_require_default(obj) {
17
17
  }
18
18
  function responsive(rules) {
19
19
  return _postcss.default.atRule({
20
- name: 'responsive'
20
+ name: "responsive"
21
21
  }).append((0, _cloneNodes.default)(Array.isArray(rules) ? rules : [
22
22
  rules
23
23
  ]));
@@ -37,12 +37,12 @@ function splitAtTopLevelOnly(input, separator) {
37
37
  }
38
38
  if (isEscaped) {
39
39
  isEscaped = false;
40
- } else if (char === '\\') {
40
+ } else if (char === "\\") {
41
41
  isEscaped = true;
42
42
  }
43
- if (char === '(' || char === '[' || char === '{') {
43
+ if (char === "(" || char === "[" || char === "{") {
44
44
  stack.push(char);
45
- } else if (char === ')' && stack[stack.length - 1] === '(' || char === ']' && stack[stack.length - 1] === '[' || char === '}' && stack[stack.length - 1] === '{') {
45
+ } else if (char === ")" && stack[stack.length - 1] === "(" || char === "]" && stack[stack.length - 1] === "[" || char === "}" && stack[stack.length - 1] === "{") {
46
46
  stack.pop();
47
47
  }
48
48
  }
@@ -9,5 +9,5 @@ Object.defineProperty(exports, "default", {
9
9
  }
10
10
  });
11
11
  function toColorValue(maybeFunction) {
12
- return typeof maybeFunction === 'function' ? maybeFunction({}) : maybeFunction;
12
+ return typeof maybeFunction === "function" ? maybeFunction({}) : maybeFunction;
13
13
  }
@@ -23,8 +23,8 @@ Object.defineProperty(exports, "toPath", {
23
23
  });
24
24
  function toPath(path) {
25
25
  if (Array.isArray(path)) return path;
26
- let openBrackets = path.split('[').length - 1;
27
- let closedBrackets = path.split(']').length - 1;
26
+ let openBrackets = path.split("[").length - 1;
27
+ let closedBrackets = path.split("]").length - 1;
28
28
  if (openBrackets !== closedBrackets) {
29
29
  throw new Error(`Path is invalid. Has unbalanced brackets: ${path}`);
30
30
  }
@@ -17,55 +17,55 @@ function _interop_require_default(obj) {
17
17
  }
18
18
  function transformThemeValue(themeSection) {
19
19
  if ([
20
- 'fontSize',
21
- 'outline'
20
+ "fontSize",
21
+ "outline"
22
22
  ].includes(themeSection)) {
23
23
  return (value)=>{
24
- if (typeof value === 'function') value = value({});
24
+ if (typeof value === "function") value = value({});
25
25
  if (Array.isArray(value)) value = value[0];
26
26
  return value;
27
27
  };
28
28
  }
29
- if (themeSection === 'fontFamily') {
29
+ if (themeSection === "fontFamily") {
30
30
  return (value)=>{
31
- if (typeof value === 'function') value = value({});
31
+ if (typeof value === "function") value = value({});
32
32
  let families = Array.isArray(value) && (0, _isPlainObject.default)(value[1]) ? value[0] : value;
33
- return Array.isArray(families) ? families.join(', ') : families;
33
+ return Array.isArray(families) ? families.join(", ") : families;
34
34
  };
35
35
  }
36
36
  if ([
37
- 'boxShadow',
38
- 'transitionProperty',
39
- 'transitionDuration',
40
- 'transitionDelay',
41
- 'transitionTimingFunction',
42
- 'backgroundImage',
43
- 'backgroundSize',
44
- 'backgroundColor',
45
- 'cursor',
46
- 'animation'
37
+ "boxShadow",
38
+ "transitionProperty",
39
+ "transitionDuration",
40
+ "transitionDelay",
41
+ "transitionTimingFunction",
42
+ "backgroundImage",
43
+ "backgroundSize",
44
+ "backgroundColor",
45
+ "cursor",
46
+ "animation"
47
47
  ].includes(themeSection)) {
48
48
  return (value)=>{
49
- if (typeof value === 'function') value = value({});
50
- if (Array.isArray(value)) value = value.join(', ');
49
+ if (typeof value === "function") value = value({});
50
+ if (Array.isArray(value)) value = value.join(", ");
51
51
  return value;
52
52
  };
53
53
  }
54
54
  // For backwards compatibility reasons, before we switched to underscores
55
55
  // instead of commas for arbitrary values.
56
56
  if ([
57
- 'gridTemplateColumns',
58
- 'gridTemplateRows',
59
- 'objectPosition'
57
+ "gridTemplateColumns",
58
+ "gridTemplateRows",
59
+ "objectPosition"
60
60
  ].includes(themeSection)) {
61
61
  return (value)=>{
62
- if (typeof value === 'function') value = value({});
63
- if (typeof value === 'string') value = _postcss.default.list.comma(value).join(' ');
62
+ if (typeof value === "function") value = value({});
63
+ if (typeof value === "string") value = _postcss.default.list.comma(value).join(" ");
64
64
  return value;
65
65
  };
66
66
  }
67
67
  return (value, opts = {})=>{
68
- if (typeof value === 'function') {
68
+ if (typeof value === "function") {
69
69
  value = value(opts);
70
70
  }
71
71
  return value;
@@ -8,7 +8,6 @@ Object.defineProperty(exports, "validateConfig", {
8
8
  return validateConfig;
9
9
  }
10
10
  });
11
- const _picocolors = /*#__PURE__*/ _interop_require_default(require("picocolors"));
12
11
  const _log = /*#__PURE__*/ _interop_require_default(require("./log"));
13
12
  function _interop_require_default(obj) {
14
13
  return obj && obj.__esModule ? obj : {
@@ -17,32 +16,22 @@ function _interop_require_default(obj) {
17
16
  }
18
17
  function validateConfig(config) {
19
18
  if (config.content.files.length === 0) {
20
- _log.default.warn('content-problems', [
21
- 'The `content` option in your Tailwind CSS configuration is missing or empty.',
22
- 'Configure your content sources or your generated CSS will be missing styles.',
23
- 'https://tailwindcss.com/docs/content-configuration'
19
+ _log.default.warn("content-problems", [
20
+ "The `content` option in your Tailwind CSS configuration is missing or empty.",
21
+ "Configure your content sources or your generated CSS will be missing styles.",
22
+ "https://tailwindcss.com/docs/content-configuration"
24
23
  ]);
25
24
  }
26
- if (config.content.files.includes('auto')) {
27
- _log.default.group('auto-content-experimental', (log)=>{
28
- log.info([
29
- _picocolors.default.bold('Automatically detecting Tailwind CSS content sources...')
30
- ]);
31
- log.warn([
32
- 'Automatic content detection is experimental, and the behavior may change at any time.'
33
- ]);
34
- });
35
- }
36
25
  // Warn if the line-clamp plugin is installed
37
26
  try {
38
- let plugin = require('@tailwindcss/line-clamp');
27
+ let plugin = require("@tailwindcss/line-clamp");
39
28
  if (config.plugins.includes(plugin)) {
40
- _log.default.warn('line-clamp-in-core', [
41
- 'As of Tailwind CSS v3.3, the `@tailwindcss/line-clamp` plugin is now included by default.',
42
- 'Remove it from the `plugins` array in your configuration to eliminate this warning.'
29
+ _log.default.warn("line-clamp-in-core", [
30
+ "As of Tailwind CSS v3.3, the `@tailwindcss/line-clamp` plugin is now included by default.",
31
+ "Remove it from the `plugins` array in your configuration to eliminate this warning."
43
32
  ]);
44
33
  config.plugins = config.plugins.filter((p)=>p !== plugin);
45
34
  }
46
- } catch (e) {}
35
+ } catch {}
47
36
  return config;
48
37
  }
@@ -12,15 +12,15 @@ const _dataTypes = require("./dataTypes");
12
12
  const _splitAtTopLevelOnly = require("./splitAtTopLevelOnly");
13
13
  function backgroundSize(value) {
14
14
  let keywordValues = [
15
- 'cover',
16
- 'contain'
15
+ "cover",
16
+ "contain"
17
17
  ];
18
18
  // the <length-percentage> type will probably be a css function
19
19
  // so we have to use `splitAtTopLevelOnly`
20
- return (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(value, ',').every((part)=>{
21
- let sizes = (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(part, '_').filter(Boolean);
20
+ return (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(value, ",").every((part)=>{
21
+ let sizes = (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(part, "_").filter(Boolean);
22
22
  if (sizes.length === 1 && keywordValues.includes(sizes[0])) return true;
23
23
  if (sizes.length !== 1 && sizes.length !== 2) return false;
24
- return sizes.every((size)=>(0, _dataTypes.length)(size) || (0, _dataTypes.percentage)(size) || size === 'auto');
24
+ return sizes.every((size)=>(0, _dataTypes.length)(size) || (0, _dataTypes.percentage)(size) || size === "auto");
25
25
  });
26
26
  }
@@ -18,7 +18,7 @@ _export(exports, {
18
18
  });
19
19
  const _color = require("./color");
20
20
  function withAlphaValue(color, alphaValue, defaultValue) {
21
- if (typeof color === 'function') {
21
+ if (typeof color === "function") {
22
22
  return color({
23
23
  opacityValue: alphaValue
24
24
  });
@@ -34,11 +34,11 @@ function withAlphaValue(color, alphaValue, defaultValue) {
34
34
  alpha: alphaValue
35
35
  });
36
36
  }
37
- function withAlphaVariable({ color, property, variable }) {
37
+ function withAlphaVariable({ color , property , variable }) {
38
38
  let properties = [].concat(property);
39
- if (typeof color === 'function') {
39
+ if (typeof color === "function") {
40
40
  return {
41
- [variable]: '1',
41
+ [variable]: "1",
42
42
  ...Object.fromEntries(properties.map((p)=>{
43
43
  return [
44
44
  p,
@@ -65,7 +65,7 @@ function withAlphaVariable({ color, property, variable }) {
65
65
  ]));
66
66
  }
67
67
  return {
68
- [variable]: '1',
68
+ [variable]: "1",
69
69
  ...Object.fromEntries(properties.map((p)=>{
70
70
  return [
71
71
  p,
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
- var parse = require('./parse');
3
- var walk = require('./walk');
4
- var stringify = require('./stringify');
2
+ var parse = require("./parse");
3
+ var walk = require("./walk");
4
+ var stringify = require("./stringify");
5
5
  function ValueParser(value) {
6
6
  if (this instanceof ValueParser) {
7
7
  this.nodes = parse(value);
@@ -10,13 +10,13 @@ function ValueParser(value) {
10
10
  return new ValueParser(value);
11
11
  }
12
12
  ValueParser.prototype.toString = function() {
13
- return Array.isArray(this.nodes) ? stringify(this.nodes) : '';
13
+ return Array.isArray(this.nodes) ? stringify(this.nodes) : "";
14
14
  };
15
15
  ValueParser.prototype.walk = function(cb, bubble) {
16
16
  walk(this.nodes, cb, bubble);
17
17
  return this;
18
18
  };
19
- ValueParser.unit = require('./unit');
19
+ ValueParser.unit = require("./unit");
20
20
  ValueParser.walk = walk;
21
21
  ValueParser.stringify = stringify;
22
22
  module.exports = ValueParser;