tailwindcss 0.0.0-insiders.4e21639 → 0.0.0-insiders.4e62334

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