tailwindcss 0.0.0-insiders.fe08e91 → 0.0.0-oxide.956419c

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 (186) hide show
  1. package/CHANGELOG.md +384 -3
  2. package/LICENSE +1 -2
  3. package/README.md +12 -8
  4. package/colors.d.ts +3 -0
  5. package/defaultConfig.d.ts +3 -0
  6. package/defaultTheme.d.ts +4 -0
  7. package/lib/cli/build/deps.js +54 -0
  8. package/lib/cli/build/index.js +48 -0
  9. package/lib/cli/build/plugin.js +367 -0
  10. package/lib/cli/build/utils.js +78 -0
  11. package/lib/cli/build/watching.js +178 -0
  12. package/lib/cli/help/index.js +71 -0
  13. package/lib/cli/index.js +239 -0
  14. package/lib/cli/init/index.js +46 -0
  15. package/lib/cli/shared.js +13 -0
  16. package/lib/cli-peer-dependencies.js +20 -7
  17. package/lib/cli.js +4 -740
  18. package/lib/constants.js +27 -20
  19. package/lib/corePluginList.js +6 -3
  20. package/lib/corePlugins.js +2064 -1811
  21. package/lib/css/preflight.css +5 -5
  22. package/lib/featureFlags.js +31 -22
  23. package/lib/index.js +4 -28
  24. package/lib/lib/cacheInvalidation.js +90 -0
  25. package/lib/lib/collapseAdjacentRules.js +27 -9
  26. package/lib/lib/collapseDuplicateDeclarations.js +12 -9
  27. package/lib/lib/content.js +176 -0
  28. package/lib/lib/defaultExtractor.js +225 -31
  29. package/lib/lib/detectNesting.js +13 -10
  30. package/lib/lib/evaluateTailwindFunctions.js +118 -55
  31. package/lib/lib/expandApplyAtRules.js +439 -190
  32. package/lib/lib/expandTailwindAtRules.js +151 -134
  33. package/lib/lib/findAtConfigPath.js +44 -0
  34. package/lib/lib/generateRules.js +454 -187
  35. package/lib/lib/getModuleDependencies.js +11 -8
  36. package/lib/lib/normalizeTailwindDirectives.js +36 -32
  37. package/lib/lib/offsets.js +217 -0
  38. package/lib/lib/partitionApplyAtRules.js +56 -0
  39. package/lib/lib/regex.js +60 -0
  40. package/lib/lib/resolveDefaultsAtRules.js +89 -67
  41. package/lib/lib/setupContextUtils.js +667 -376
  42. package/lib/lib/setupTrackingContext.js +38 -67
  43. package/lib/lib/sharedState.js +27 -14
  44. package/lib/lib/substituteScreenAtRules.js +11 -9
  45. package/lib/oxide/cli.d.js +1 -0
  46. package/lib/oxide/cli.js +2 -0
  47. package/lib/oxide/postcss-plugin.d.js +1 -0
  48. package/lib/oxide/postcss-plugin.js +2 -0
  49. package/lib/plugin.js +48 -0
  50. package/{nesting → lib/postcss-plugins/nesting}/README.md +2 -2
  51. package/lib/postcss-plugins/nesting/index.js +19 -0
  52. package/lib/postcss-plugins/nesting/plugin.js +87 -0
  53. package/lib/processTailwindFeatures.js +35 -25
  54. package/lib/public/colors.js +247 -245
  55. package/lib/public/create-plugin.js +6 -4
  56. package/lib/public/default-config.js +7 -5
  57. package/lib/public/default-theme.js +7 -5
  58. package/lib/public/resolve-config.js +8 -5
  59. package/lib/util/bigSign.js +4 -1
  60. package/lib/util/buildMediaQuery.js +11 -6
  61. package/lib/util/cloneDeep.js +7 -6
  62. package/lib/util/cloneNodes.js +21 -3
  63. package/lib/util/color.js +53 -54
  64. package/lib/util/configurePlugins.js +5 -2
  65. package/lib/util/createPlugin.js +6 -6
  66. package/lib/util/createUtilityPlugin.js +12 -14
  67. package/lib/util/dataTypes.js +119 -110
  68. package/lib/util/defaults.js +4 -1
  69. package/lib/util/escapeClassName.js +7 -4
  70. package/lib/util/escapeCommas.js +5 -2
  71. package/lib/util/flattenColorPalette.js +9 -12
  72. package/lib/util/formatVariantSelector.js +184 -85
  73. package/lib/util/getAllConfigs.js +27 -8
  74. package/lib/util/hashConfig.js +6 -3
  75. package/lib/util/isKeyframeRule.js +5 -2
  76. package/lib/util/isPlainObject.js +5 -2
  77. package/lib/util/{isValidArbitraryValue.js → isSyntacticallyValidPropertyValue.js} +23 -15
  78. package/lib/util/log.js +20 -14
  79. package/lib/util/nameClass.js +20 -9
  80. package/lib/util/negateValue.js +23 -8
  81. package/lib/util/normalizeConfig.js +116 -72
  82. package/lib/util/normalizeScreens.js +120 -11
  83. package/lib/util/parseAnimationValue.js +42 -40
  84. package/lib/util/parseBoxShadowValue.js +30 -23
  85. package/lib/util/parseDependency.js +38 -56
  86. package/lib/util/parseGlob.js +34 -0
  87. package/lib/util/parseObjectStyles.js +11 -8
  88. package/lib/util/pluginUtils.js +147 -50
  89. package/lib/util/prefixSelector.js +10 -8
  90. package/lib/util/removeAlphaVariables.js +29 -0
  91. package/lib/util/resolveConfig.js +97 -85
  92. package/lib/util/resolveConfigPath.js +11 -9
  93. package/lib/util/responsive.js +8 -5
  94. package/lib/util/splitAtTopLevelOnly.js +43 -0
  95. package/lib/util/tap.js +4 -1
  96. package/lib/util/toColorValue.js +5 -3
  97. package/lib/util/toPath.js +20 -4
  98. package/lib/util/transformThemeValue.js +37 -29
  99. package/lib/util/validateConfig.js +24 -0
  100. package/lib/util/validateFormalSyntax.js +24 -0
  101. package/lib/util/withAlphaVariable.js +23 -15
  102. package/nesting/index.js +2 -12
  103. package/package.json +50 -45
  104. package/peers/index.js +11381 -7950
  105. package/plugin.d.ts +11 -0
  106. package/resolveConfig.d.ts +12 -0
  107. package/scripts/generate-types.js +105 -0
  108. package/scripts/release-channel.js +18 -0
  109. package/scripts/release-notes.js +21 -0
  110. package/scripts/type-utils.js +27 -0
  111. package/src/cli/build/deps.js +56 -0
  112. package/src/cli/build/index.js +49 -0
  113. package/src/cli/build/plugin.js +439 -0
  114. package/src/cli/build/utils.js +76 -0
  115. package/src/cli/build/watching.js +227 -0
  116. package/src/cli/help/index.js +70 -0
  117. package/src/cli/index.js +234 -0
  118. package/src/cli/init/index.js +50 -0
  119. package/src/cli/shared.js +6 -0
  120. package/src/cli-peer-dependencies.js +7 -1
  121. package/src/cli.js +4 -810
  122. package/src/corePluginList.js +1 -1
  123. package/src/corePlugins.js +532 -217
  124. package/src/css/preflight.css +5 -5
  125. package/src/featureFlags.js +15 -9
  126. package/src/index.js +4 -27
  127. package/src/lib/cacheInvalidation.js +52 -0
  128. package/src/lib/collapseAdjacentRules.js +21 -2
  129. package/src/lib/content.js +212 -0
  130. package/src/lib/defaultExtractor.js +196 -33
  131. package/src/lib/evaluateTailwindFunctions.js +78 -7
  132. package/src/lib/expandApplyAtRules.js +482 -183
  133. package/src/lib/expandTailwindAtRules.js +106 -85
  134. package/src/lib/findAtConfigPath.js +48 -0
  135. package/src/lib/generateRules.js +418 -129
  136. package/src/lib/normalizeTailwindDirectives.js +1 -0
  137. package/src/lib/offsets.js +270 -0
  138. package/src/lib/partitionApplyAtRules.js +52 -0
  139. package/src/lib/regex.js +74 -0
  140. package/src/lib/resolveDefaultsAtRules.js +51 -30
  141. package/src/lib/setupContextUtils.js +556 -208
  142. package/src/lib/setupTrackingContext.js +11 -48
  143. package/src/lib/sharedState.js +5 -0
  144. package/src/oxide/cli.d.ts +0 -0
  145. package/src/oxide/cli.ts +1 -0
  146. package/src/oxide/postcss-plugin.d.ts +0 -0
  147. package/src/oxide/postcss-plugin.ts +1 -0
  148. package/src/plugin.js +47 -0
  149. package/src/postcss-plugins/nesting/README.md +42 -0
  150. package/src/postcss-plugins/nesting/index.js +13 -0
  151. package/src/postcss-plugins/nesting/plugin.js +80 -0
  152. package/src/processTailwindFeatures.js +8 -0
  153. package/src/util/buildMediaQuery.js +5 -3
  154. package/src/util/cloneNodes.js +19 -2
  155. package/src/util/color.js +25 -21
  156. package/src/util/dataTypes.js +29 -21
  157. package/src/util/formatVariantSelector.js +184 -61
  158. package/src/util/getAllConfigs.js +19 -0
  159. package/src/util/{isValidArbitraryValue.js → isSyntacticallyValidPropertyValue.js} +1 -1
  160. package/src/util/log.js +8 -8
  161. package/src/util/nameClass.js +4 -0
  162. package/src/util/negateValue.js +11 -3
  163. package/src/util/normalizeConfig.js +44 -6
  164. package/src/util/normalizeScreens.js +99 -4
  165. package/src/util/parseBoxShadowValue.js +4 -3
  166. package/src/util/parseDependency.js +37 -42
  167. package/src/util/parseGlob.js +24 -0
  168. package/src/util/pluginUtils.js +132 -10
  169. package/src/util/prefixSelector.js +7 -5
  170. package/src/util/removeAlphaVariables.js +24 -0
  171. package/src/util/resolveConfig.js +70 -32
  172. package/src/util/splitAtTopLevelOnly.js +45 -0
  173. package/src/util/toPath.js +1 -1
  174. package/src/util/transformThemeValue.js +13 -3
  175. package/src/util/validateConfig.js +13 -0
  176. package/src/util/validateFormalSyntax.js +34 -0
  177. package/src/util/withAlphaVariable.js +1 -1
  178. package/stubs/defaultConfig.stub.js +167 -164
  179. package/stubs/simpleConfig.stub.js +1 -0
  180. package/types/config.d.ts +362 -0
  181. package/types/generated/.gitkeep +0 -0
  182. package/types/generated/colors.d.ts +276 -0
  183. package/types/generated/corePluginList.d.ts +1 -0
  184. package/types/generated/default-theme.d.ts +342 -0
  185. package/types/index.d.ts +7 -0
  186. package/nesting/plugin.js +0 -41
@@ -2,101 +2,109 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.normalize = normalize;
6
- exports.url = url;
7
- exports.number = number;
8
- exports.percentage = percentage;
9
- exports.length = length;
10
- exports.lineWidth = lineWidth;
11
- exports.shadow = shadow;
12
- exports.color = color;
13
- exports.image = image;
14
- exports.gradient = gradient;
15
- exports.position = position;
16
- exports.familyName = familyName;
17
- exports.genericName = genericName;
18
- exports.absoluteSize = absoluteSize;
19
- exports.relativeSize = relativeSize;
20
- var _color = require("./color");
21
- var _parseBoxShadowValue = require("./parseBoxShadowValue");
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ normalize: ()=>normalize,
13
+ url: ()=>url,
14
+ number: ()=>number,
15
+ percentage: ()=>percentage,
16
+ length: ()=>length,
17
+ lineWidth: ()=>lineWidth,
18
+ shadow: ()=>shadow,
19
+ color: ()=>color,
20
+ image: ()=>image,
21
+ gradient: ()=>gradient,
22
+ position: ()=>position,
23
+ familyName: ()=>familyName,
24
+ genericName: ()=>genericName,
25
+ absoluteSize: ()=>absoluteSize,
26
+ relativeSize: ()=>relativeSize
27
+ });
28
+ const _color = require("./color");
29
+ const _parseBoxShadowValue = require("./parseBoxShadowValue");
30
+ const _splitAtTopLevelOnly = require("./splitAtTopLevelOnly");
22
31
  let cssFunctions = [
23
- 'min',
24
- 'max',
25
- 'clamp',
26
- 'calc'
32
+ "min",
33
+ "max",
34
+ "clamp",
35
+ "calc"
27
36
  ];
28
37
  // Ref: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Types
29
- let COMMA = /,(?![^(]*\))/g // Comma separator that is not located between brackets. E.g.: `cubiz-bezier(a, b, c)` these don't count.
30
- ;
31
- let UNDERSCORE = /_(?![^(]*\))/g // Underscore separator that is not located between brackets. E.g.: `rgba(255,_255,_255)_black` these don't count.
32
- ;
38
+ function isCSSFunction(value) {
39
+ return cssFunctions.some((fn)=>new RegExp(`^${fn}\\(.*\\)`).test(value));
40
+ }
33
41
  function normalize(value, isRoot = true) {
42
+ if (value.startsWith("--")) {
43
+ return `var(${value})`;
44
+ }
34
45
  // Keep raw strings if it starts with `url(`
35
- if (value.includes('url(')) {
46
+ if (value.includes("url(")) {
36
47
  return value.split(/(url\(.*?\))/g).filter(Boolean).map((part)=>{
37
48
  if (/^url\(.*?\)$/.test(part)) {
38
49
  return part;
39
50
  }
40
51
  return normalize(part, false);
41
- }).join('');
52
+ }).join("");
42
53
  }
43
54
  // Convert `_` to ` `, except for escaped underscores `\_`
44
- value = value.replace(/([^\\])_+/g, (fullMatch, characterBefore)=>characterBefore + ' '.repeat(fullMatch.length - 1)
45
- ).replace(/^_/g, ' ').replace(/\\_/g, '_');
55
+ value = value.replace(/([^\\])_+/g, (fullMatch, characterBefore)=>characterBefore + " ".repeat(fullMatch.length - 1)).replace(/^_/g, " ").replace(/\\_/g, "_");
46
56
  // Remove leftover whitespace
47
57
  if (isRoot) {
48
58
  value = value.trim();
49
59
  }
50
- // Add spaces around operators inside calc() that do not follow an operator
60
+ // Add spaces around operators inside math functions like calc() that do not follow an operator
51
61
  // or '('.
52
- return value.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, '$1 $2 ');
62
+ value = value.replace(/(calc|min|max|clamp)\(.+\)/g, (match)=>{
63
+ return match.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, "$1 $2 ");
64
+ });
65
+ return value;
53
66
  }
54
67
  function url(value) {
55
- return value.startsWith('url(');
68
+ return value.startsWith("url(");
56
69
  }
57
70
  function number(value) {
58
- return !isNaN(Number(value)) || cssFunctions.some((fn)=>new RegExp(`^${fn}\\(.+?`).test(value)
59
- );
71
+ return !isNaN(Number(value)) || isCSSFunction(value);
60
72
  }
61
73
  function percentage(value) {
62
- return /%$/g.test(value) || cssFunctions.some((fn)=>new RegExp(`^${fn}\\(.+?%`).test(value)
63
- );
74
+ return value.endsWith("%") && number(value.slice(0, -1)) || isCSSFunction(value);
64
75
  }
65
76
  let lengthUnits = [
66
- 'cm',
67
- 'mm',
68
- 'Q',
69
- 'in',
70
- 'pc',
71
- 'pt',
72
- 'px',
73
- 'em',
74
- 'ex',
75
- 'ch',
76
- 'rem',
77
- 'lh',
78
- 'vw',
79
- 'vh',
80
- 'vmin',
81
- 'vmax',
77
+ "cm",
78
+ "mm",
79
+ "Q",
80
+ "in",
81
+ "pc",
82
+ "pt",
83
+ "px",
84
+ "em",
85
+ "ex",
86
+ "ch",
87
+ "rem",
88
+ "lh",
89
+ "vw",
90
+ "vh",
91
+ "vmin",
92
+ "vmax"
82
93
  ];
83
- let lengthUnitsPattern = `(?:${lengthUnits.join('|')})`;
94
+ let lengthUnitsPattern = `(?:${lengthUnits.join("|")})`;
84
95
  function length(value) {
85
- return value.split(UNDERSCORE).every((part)=>{
86
- return part === '0' || new RegExp(`${lengthUnitsPattern}$`).test(part) || cssFunctions.some((fn)=>new RegExp(`^${fn}\\(.+?${lengthUnitsPattern}`).test(part)
87
- );
88
- });
96
+ return value === "0" || new RegExp(`^[+-]?[0-9]*\.?[0-9]+(?:[eE][+-]?[0-9]+)?${lengthUnitsPattern}$`).test(value) || isCSSFunction(value);
89
97
  }
90
98
  let lineWidths = new Set([
91
- 'thin',
92
- 'medium',
93
- 'thick'
99
+ "thin",
100
+ "medium",
101
+ "thick"
94
102
  ]);
95
103
  function lineWidth(value) {
96
104
  return lineWidths.has(value);
97
105
  }
98
106
  function shadow(value) {
99
- let parsedShadows = (0, _parseBoxShadowValue).parseBoxShadowValue(normalize(value));
107
+ let parsedShadows = (0, _parseBoxShadowValue.parseBoxShadowValue)(normalize(value));
100
108
  for (let parsedShadow of parsedShadows){
101
109
  if (!parsedShadow.valid) {
102
110
  return false;
@@ -106,10 +114,12 @@ function shadow(value) {
106
114
  }
107
115
  function color(value) {
108
116
  let colors = 0;
109
- let result = value.split(UNDERSCORE).every((part)=>{
117
+ let result = (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(value, "_").every((part)=>{
110
118
  part = normalize(part);
111
- if (part.startsWith('var(')) return true;
112
- if ((0, _color).parseColor(part) !== null) return colors++, true;
119
+ if (part.startsWith("var(")) return true;
120
+ if ((0, _color.parseColor)(part, {
121
+ loose: true
122
+ }) !== null) return colors++, true;
113
123
  return false;
114
124
  });
115
125
  if (!result) return false;
@@ -117,16 +127,15 @@ function color(value) {
117
127
  }
118
128
  function image(value) {
119
129
  let images = 0;
120
- let result = value.split(COMMA).every((part)=>{
130
+ let result = (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(value, ",").every((part)=>{
121
131
  part = normalize(part);
122
- if (part.startsWith('var(')) return true;
132
+ if (part.startsWith("var(")) return true;
123
133
  if (url(part) || gradient(part) || [
124
- 'element(',
125
- 'image(',
126
- 'cross-fade(',
127
- 'image-set('
128
- ].some((fn)=>part.startsWith(fn)
129
- )) {
134
+ "element(",
135
+ "image(",
136
+ "cross-fade(",
137
+ "image-set("
138
+ ].some((fn)=>part.startsWith(fn))) {
130
139
  images++;
131
140
  return true;
132
141
  }
@@ -136,11 +145,11 @@ function image(value) {
136
145
  return images > 0;
137
146
  }
138
147
  let gradientTypes = new Set([
139
- 'linear-gradient',
140
- 'radial-gradient',
141
- 'repeating-linear-gradient',
142
- 'repeating-radial-gradient',
143
- 'conic-gradient',
148
+ "linear-gradient",
149
+ "radial-gradient",
150
+ "repeating-linear-gradient",
151
+ "repeating-radial-gradient",
152
+ "conic-gradient"
144
153
  ]);
145
154
  function gradient(value) {
146
155
  value = normalize(value);
@@ -152,17 +161,17 @@ function gradient(value) {
152
161
  return false;
153
162
  }
154
163
  let validPositions = new Set([
155
- 'center',
156
- 'top',
157
- 'right',
158
- 'bottom',
159
- 'left'
164
+ "center",
165
+ "top",
166
+ "right",
167
+ "bottom",
168
+ "left"
160
169
  ]);
161
170
  function position(value) {
162
171
  let positions = 0;
163
- let result = value.split(UNDERSCORE).every((part)=>{
172
+ let result = (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(value, "_").every((part)=>{
164
173
  part = normalize(part);
165
- if (part.startsWith('var(')) return true;
174
+ if (part.startsWith("var(")) return true;
166
175
  if (validPositions.has(part) || length(part) || percentage(part)) {
167
176
  positions++;
168
177
  return true;
@@ -174,11 +183,11 @@ function position(value) {
174
183
  }
175
184
  function familyName(value) {
176
185
  let fonts = 0;
177
- let result = value.split(COMMA).every((part)=>{
186
+ let result = (0, _splitAtTopLevelOnly.splitAtTopLevelOnly)(value, ",").every((part)=>{
178
187
  part = normalize(part);
179
- if (part.startsWith('var(')) return true;
188
+ if (part.startsWith("var(")) return true;
180
189
  // If it contains spaces, then it should be quoted
181
- if (part.includes(' ')) {
190
+ if (part.includes(" ")) {
182
191
  if (!/(['"])([^"']+)\1/g.test(part)) {
183
192
  return false;
184
193
  }
@@ -194,39 +203,39 @@ function familyName(value) {
194
203
  return fonts > 0;
195
204
  }
196
205
  let genericNames = new Set([
197
- 'serif',
198
- 'sans-serif',
199
- 'monospace',
200
- 'cursive',
201
- 'fantasy',
202
- 'system-ui',
203
- 'ui-serif',
204
- 'ui-sans-serif',
205
- 'ui-monospace',
206
- 'ui-rounded',
207
- 'math',
208
- 'emoji',
209
- 'fangsong',
206
+ "serif",
207
+ "sans-serif",
208
+ "monospace",
209
+ "cursive",
210
+ "fantasy",
211
+ "system-ui",
212
+ "ui-serif",
213
+ "ui-sans-serif",
214
+ "ui-monospace",
215
+ "ui-rounded",
216
+ "math",
217
+ "emoji",
218
+ "fangsong"
210
219
  ]);
211
220
  function genericName(value) {
212
221
  return genericNames.has(value);
213
222
  }
214
223
  let absoluteSizes = new Set([
215
- 'xx-small',
216
- 'x-small',
217
- 'small',
218
- 'medium',
219
- 'large',
220
- 'x-large',
221
- 'x-large',
222
- 'xxx-large',
224
+ "xx-small",
225
+ "x-small",
226
+ "small",
227
+ "medium",
228
+ "large",
229
+ "x-large",
230
+ "x-large",
231
+ "xxx-large"
223
232
  ]);
224
233
  function absoluteSize(value) {
225
234
  return absoluteSizes.has(value);
226
235
  }
227
236
  let relativeSizes = new Set([
228
- 'larger',
229
- 'smaller'
237
+ "larger",
238
+ "smaller"
230
239
  ]);
231
240
  function relativeSize(value) {
232
241
  return relativeSizes.has(value);
@@ -2,7 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.defaults = defaults;
5
+ Object.defineProperty(exports, "defaults", {
6
+ enumerable: true,
7
+ get: ()=>defaults
8
+ });
6
9
  function defaults(target, ...sources) {
7
10
  for (let source of sources){
8
11
  for(let k in source){
@@ -2,9 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.default = escapeClassName;
6
- var _postcssSelectorParser = _interopRequireDefault(require("postcss-selector-parser"));
7
- var _escapeCommas = _interopRequireDefault(require("./escapeCommas"));
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: ()=>escapeClassName
8
+ });
9
+ const _postcssSelectorParser = /*#__PURE__*/ _interopRequireDefault(require("postcss-selector-parser"));
10
+ const _escapeCommas = /*#__PURE__*/ _interopRequireDefault(require("./escapeCommas"));
8
11
  function _interopRequireDefault(obj) {
9
12
  return obj && obj.__esModule ? obj : {
10
13
  default: obj
@@ -15,5 +18,5 @@ function escapeClassName(className) {
15
18
  let node = _postcssSelectorParser.default.className();
16
19
  node.value = className;
17
20
  var ref1;
18
- return (0, _escapeCommas).default((ref1 = node === null || node === void 0 ? void 0 : (ref = node.raws) === null || ref === void 0 ? void 0 : ref.value) !== null && ref1 !== void 0 ? ref1 : node.value);
21
+ return (0, _escapeCommas.default)((ref1 = node === null || node === void 0 ? void 0 : (ref = node.raws) === null || ref === void 0 ? void 0 : ref.value) !== null && ref1 !== void 0 ? ref1 : node.value);
19
22
  }
@@ -2,7 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.default = escapeCommas;
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: ()=>escapeCommas
8
+ });
6
9
  function escapeCommas(className) {
7
- return className.replace(/\\,/g, '\\2c ');
10
+ return className.replace(/\\,/g, "\\2c ");
8
11
  }
@@ -2,18 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.default = void 0;
6
- const flattenColorPalette = (colors)=>Object.assign({
7
- }, ...Object.entries(colors !== null && colors !== void 0 ? colors : {
8
- }).flatMap(([color, values])=>typeof values == 'object' ? Object.entries(flattenColorPalette(values)).map(([number, hex])=>({
9
- [color + (number === 'DEFAULT' ? '' : `-${number}`)]: hex
10
- })
11
- ) : [
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: ()=>_default
8
+ });
9
+ const flattenColorPalette = (colors)=>Object.assign({}, ...Object.entries(colors !== null && colors !== void 0 ? colors : {}).flatMap(([color, values])=>typeof values == "object" ? Object.entries(flattenColorPalette(values)).map(([number, hex])=>({
10
+ [color + (number === "DEFAULT" ? "" : `-${number}`)]: hex
11
+ })) : [
12
12
  {
13
13
  [`${color}`]: values
14
14
  }
15
- ]
16
- ))
17
- ;
18
- var _default = flattenColorPalette;
19
- exports.default = _default;
15
+ ]));
16
+ const _default = flattenColorPalette;