tailwindcss 0.0.0-insiders.fe08e91 → 0.0.0-oxide.dd87d75

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 (178) hide show
  1. package/CHANGELOG.md +379 -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/plugin.js +48 -0
  46. package/{nesting → lib/postcss-plugins/nesting}/README.md +2 -2
  47. package/lib/postcss-plugins/nesting/index.js +19 -0
  48. package/lib/postcss-plugins/nesting/plugin.js +87 -0
  49. package/lib/processTailwindFeatures.js +35 -25
  50. package/lib/public/colors.js +247 -245
  51. package/lib/public/create-plugin.js +6 -4
  52. package/lib/public/default-config.js +7 -5
  53. package/lib/public/default-theme.js +7 -5
  54. package/lib/public/resolve-config.js +8 -5
  55. package/lib/util/bigSign.js +4 -1
  56. package/lib/util/buildMediaQuery.js +11 -6
  57. package/lib/util/cloneDeep.js +7 -6
  58. package/lib/util/cloneNodes.js +21 -3
  59. package/lib/util/color.js +53 -54
  60. package/lib/util/configurePlugins.js +5 -2
  61. package/lib/util/createPlugin.js +6 -6
  62. package/lib/util/createUtilityPlugin.js +12 -14
  63. package/lib/util/dataTypes.js +119 -110
  64. package/lib/util/defaults.js +4 -1
  65. package/lib/util/escapeClassName.js +7 -4
  66. package/lib/util/escapeCommas.js +5 -2
  67. package/lib/util/flattenColorPalette.js +9 -12
  68. package/lib/util/formatVariantSelector.js +184 -85
  69. package/lib/util/getAllConfigs.js +27 -8
  70. package/lib/util/hashConfig.js +6 -3
  71. package/lib/util/isKeyframeRule.js +5 -2
  72. package/lib/util/isPlainObject.js +5 -2
  73. package/lib/util/{isValidArbitraryValue.js → isSyntacticallyValidPropertyValue.js} +23 -15
  74. package/lib/util/log.js +20 -14
  75. package/lib/util/nameClass.js +20 -9
  76. package/lib/util/negateValue.js +23 -8
  77. package/lib/util/normalizeConfig.js +116 -72
  78. package/lib/util/normalizeScreens.js +120 -11
  79. package/lib/util/parseAnimationValue.js +42 -40
  80. package/lib/util/parseBoxShadowValue.js +30 -23
  81. package/lib/util/parseDependency.js +38 -56
  82. package/lib/util/parseGlob.js +34 -0
  83. package/lib/util/parseObjectStyles.js +11 -8
  84. package/lib/util/pluginUtils.js +147 -50
  85. package/lib/util/prefixSelector.js +10 -8
  86. package/lib/util/removeAlphaVariables.js +29 -0
  87. package/lib/util/resolveConfig.js +97 -85
  88. package/lib/util/resolveConfigPath.js +11 -9
  89. package/lib/util/responsive.js +8 -5
  90. package/lib/util/splitAtTopLevelOnly.js +43 -0
  91. package/lib/util/tap.js +4 -1
  92. package/lib/util/toColorValue.js +5 -3
  93. package/lib/util/toPath.js +20 -4
  94. package/lib/util/transformThemeValue.js +37 -29
  95. package/lib/util/validateConfig.js +24 -0
  96. package/lib/util/validateFormalSyntax.js +24 -0
  97. package/lib/util/withAlphaVariable.js +23 -15
  98. package/nesting/index.js +2 -12
  99. package/package.json +47 -42
  100. package/peers/index.js +11381 -7950
  101. package/plugin.d.ts +11 -0
  102. package/resolveConfig.d.ts +12 -0
  103. package/scripts/generate-types.js +105 -0
  104. package/scripts/release-channel.js +18 -0
  105. package/scripts/release-notes.js +21 -0
  106. package/scripts/type-utils.js +27 -0
  107. package/src/cli/build/deps.js +56 -0
  108. package/src/cli/build/index.js +49 -0
  109. package/src/cli/build/plugin.js +439 -0
  110. package/src/cli/build/utils.js +76 -0
  111. package/src/cli/build/watching.js +227 -0
  112. package/src/cli/help/index.js +70 -0
  113. package/src/cli/index.js +234 -0
  114. package/src/cli/init/index.js +50 -0
  115. package/src/cli/shared.js +6 -0
  116. package/src/cli-peer-dependencies.js +7 -1
  117. package/src/cli.js +4 -810
  118. package/src/corePluginList.js +1 -1
  119. package/src/corePlugins.js +532 -217
  120. package/src/css/preflight.css +5 -5
  121. package/src/featureFlags.js +15 -9
  122. package/src/index.js +4 -27
  123. package/src/lib/cacheInvalidation.js +52 -0
  124. package/src/lib/collapseAdjacentRules.js +21 -2
  125. package/src/lib/content.js +212 -0
  126. package/src/lib/defaultExtractor.js +196 -33
  127. package/src/lib/evaluateTailwindFunctions.js +78 -7
  128. package/src/lib/expandApplyAtRules.js +482 -183
  129. package/src/lib/expandTailwindAtRules.js +106 -85
  130. package/src/lib/findAtConfigPath.js +48 -0
  131. package/src/lib/generateRules.js +418 -129
  132. package/src/lib/normalizeTailwindDirectives.js +1 -0
  133. package/src/lib/offsets.js +270 -0
  134. package/src/lib/partitionApplyAtRules.js +52 -0
  135. package/src/lib/regex.js +74 -0
  136. package/src/lib/resolveDefaultsAtRules.js +51 -30
  137. package/src/lib/setupContextUtils.js +556 -208
  138. package/src/lib/setupTrackingContext.js +11 -48
  139. package/src/lib/sharedState.js +5 -0
  140. package/src/plugin.js +47 -0
  141. package/src/postcss-plugins/nesting/README.md +42 -0
  142. package/src/postcss-plugins/nesting/index.js +13 -0
  143. package/src/postcss-plugins/nesting/plugin.js +80 -0
  144. package/src/processTailwindFeatures.js +8 -0
  145. package/src/util/buildMediaQuery.js +5 -3
  146. package/src/util/cloneNodes.js +19 -2
  147. package/src/util/color.js +25 -21
  148. package/src/util/dataTypes.js +29 -21
  149. package/src/util/formatVariantSelector.js +184 -61
  150. package/src/util/getAllConfigs.js +19 -0
  151. package/src/util/{isValidArbitraryValue.js → isSyntacticallyValidPropertyValue.js} +1 -1
  152. package/src/util/log.js +8 -8
  153. package/src/util/nameClass.js +4 -0
  154. package/src/util/negateValue.js +11 -3
  155. package/src/util/normalizeConfig.js +44 -6
  156. package/src/util/normalizeScreens.js +99 -4
  157. package/src/util/parseBoxShadowValue.js +4 -3
  158. package/src/util/parseDependency.js +37 -42
  159. package/src/util/parseGlob.js +24 -0
  160. package/src/util/pluginUtils.js +132 -10
  161. package/src/util/prefixSelector.js +7 -5
  162. package/src/util/removeAlphaVariables.js +24 -0
  163. package/src/util/resolveConfig.js +70 -32
  164. package/src/util/splitAtTopLevelOnly.js +45 -0
  165. package/src/util/toPath.js +1 -1
  166. package/src/util/transformThemeValue.js +13 -3
  167. package/src/util/validateConfig.js +13 -0
  168. package/src/util/validateFormalSyntax.js +34 -0
  169. package/src/util/withAlphaVariable.js +1 -1
  170. package/stubs/defaultConfig.stub.js +23 -20
  171. package/stubs/simpleConfig.stub.js +1 -0
  172. package/types/config.d.ts +362 -0
  173. package/types/generated/.gitkeep +0 -0
  174. package/types/generated/colors.d.ts +276 -0
  175. package/types/generated/corePluginList.d.ts +1 -0
  176. package/types/generated/default-theme.d.ts +342 -0
  177. package/types/index.d.ts +7 -0
  178. package/nesting/plugin.js +0 -41
@@ -2,17 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.default = resolveConfig;
6
- var _resolveConfig = _interopRequireDefault(require("../util/resolveConfig"));
7
- var _getAllConfigs = _interopRequireDefault(require("../util/getAllConfigs"));
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: ()=>resolveConfig
8
+ });
9
+ const _resolveConfig = /*#__PURE__*/ _interopRequireDefault(require("../util/resolveConfig"));
10
+ const _getAllConfigs = /*#__PURE__*/ _interopRequireDefault(require("../util/getAllConfigs"));
8
11
  function _interopRequireDefault(obj) {
9
12
  return obj && obj.__esModule ? obj : {
10
13
  default: obj
11
14
  };
12
15
  }
13
16
  function resolveConfig(...configs) {
14
- let [, ...defaultConfigs] = (0, _getAllConfigs).default(configs[0]);
15
- return (0, _resolveConfig).default([
17
+ let [, ...defaultConfigs] = (0, _getAllConfigs.default)(configs[0]);
18
+ return (0, _resolveConfig.default)([
16
19
  ...configs,
17
20
  ...defaultConfigs
18
21
  ]);
@@ -2,7 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.default = bigSign;
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: ()=>bigSign
8
+ });
6
9
  function bigSign(bigIntValue) {
7
10
  return (bigIntValue > 0n) - (bigIntValue < 0n);
8
11
  }
@@ -2,19 +2,24 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.default = buildMediaQuery;
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: ()=>buildMediaQuery
8
+ });
6
9
  function buildMediaQuery(screens) {
7
10
  screens = Array.isArray(screens) ? screens : [
8
11
  screens
9
12
  ];
10
- return screens.map((screen1)=>screen1.values.map((screen)=>{
13
+ return screens.map((screen)=>{
14
+ let values = screen.values.map((screen)=>{
11
15
  if (screen.raw !== undefined) {
12
16
  return screen.raw;
13
17
  }
14
18
  return [
15
19
  screen.min && `(min-width: ${screen.min})`,
16
- screen.max && `(max-width: ${screen.max})`,
17
- ].filter(Boolean).join(' and ');
18
- })
19
- ).join(', ');
20
+ screen.max && `(max-width: ${screen.max})`
21
+ ].filter(Boolean).join(" and ");
22
+ });
23
+ return screen.not ? `not all and ${values}` : values;
24
+ }).join(", ");
20
25
  }
@@ -2,18 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.cloneDeep = cloneDeep;
5
+ Object.defineProperty(exports, "cloneDeep", {
6
+ enumerable: true,
7
+ get: ()=>cloneDeep
8
+ });
6
9
  function cloneDeep(value) {
7
10
  if (Array.isArray(value)) {
8
- return value.map((child)=>cloneDeep(child)
9
- );
11
+ return value.map((child)=>cloneDeep(child));
10
12
  }
11
- if (typeof value === 'object' && value !== null) {
13
+ if (typeof value === "object" && value !== null) {
12
14
  return Object.fromEntries(Object.entries(value).map(([k, v])=>[
13
15
  k,
14
16
  cloneDeep(v)
15
- ]
16
- ));
17
+ ]));
17
18
  }
18
19
  return value;
19
20
  }
@@ -2,12 +2,30 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.default = cloneNodes;
6
- function cloneNodes(nodes, source) {
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: ()=>cloneNodes
8
+ });
9
+ function cloneNodes(nodes, source = undefined, raws = undefined) {
7
10
  return nodes.map((node)=>{
11
+ var ref;
8
12
  let cloned = node.clone();
9
- if (source !== undefined) {
13
+ // We always want override the source map
14
+ // except when explicitly told not to
15
+ let shouldOverwriteSource = ((ref = node.raws.tailwind) === null || ref === void 0 ? void 0 : ref.preserveSource) !== true || !cloned.source;
16
+ if (source !== undefined && shouldOverwriteSource) {
10
17
  cloned.source = source;
18
+ if ("walk" in cloned) {
19
+ cloned.walk((child)=>{
20
+ child.source = source;
21
+ });
22
+ }
23
+ }
24
+ if (raws !== undefined) {
25
+ cloned.raws.tailwind = {
26
+ ...cloned.raws.tailwind,
27
+ ...raws
28
+ };
11
29
  }
12
30
  return cloned;
13
31
  });
package/lib/util/color.js CHANGED
@@ -2,9 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.parseColor = parseColor;
6
- exports.formatColor = formatColor;
7
- var _colorName = _interopRequireDefault(require("color-name"));
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
+ parseColor: ()=>parseColor,
13
+ formatColor: ()=>formatColor
14
+ });
15
+ const _colorName = /*#__PURE__*/ _interopRequireDefault(require("color-name"));
8
16
  function _interopRequireDefault(obj) {
9
17
  return obj && obj.__esModule ? obj : {
10
18
  default: obj
@@ -12,88 +20,79 @@ function _interopRequireDefault(obj) {
12
20
  }
13
21
  let HEX = /^#([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?$/i;
14
22
  let SHORT_HEX = /^#([a-f\d])([a-f\d])([a-f\d])([a-f\d])?$/i;
15
- let VALUE = `(?:\\d+|\\d*\\.\\d+)%?`;
16
- let SEP = `(?:\\s*,\\s*|\\s+)`;
17
- let ALPHA_SEP = `\\s*[,/]\\s*`;
18
- let RGB = new RegExp(`^rgba?\\(\\s*(${VALUE})${SEP}(${VALUE})${SEP}(${VALUE})(?:${ALPHA_SEP}(${VALUE}))?\\s*\\)$`);
19
- let HSL = new RegExp(`^hsla?\\(\\s*((?:${VALUE})(?:deg|rad|grad|turn)?)${SEP}(${VALUE})${SEP}(${VALUE})(?:${ALPHA_SEP}(${VALUE}))?\\s*\\)$`);
20
- function parseColor(value) {
21
- if (typeof value !== 'string') {
23
+ let VALUE = /(?:\d+|\d*\.\d+)%?/;
24
+ let SEP = /(?:\s*,\s*|\s+)/;
25
+ let ALPHA_SEP = /\s*[,/]\s*/;
26
+ let CUSTOM_PROPERTY = /var\(--(?:[^ )]*?)\)/;
27
+ let RGB = new RegExp(`^(rgb)a?\\(\\s*(${VALUE.source}|${CUSTOM_PROPERTY.source})(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${ALPHA_SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?\\s*\\)$`);
28
+ let HSL = new RegExp(`^(hsl)a?\\(\\s*((?:${VALUE.source})(?:deg|rad|grad|turn)?|${CUSTOM_PROPERTY.source})(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?(?:${ALPHA_SEP.source}(${VALUE.source}|${CUSTOM_PROPERTY.source}))?\\s*\\)$`);
29
+ function parseColor(value, { loose =false } = {}) {
30
+ var ref, ref1;
31
+ if (typeof value !== "string") {
22
32
  return null;
23
33
  }
24
34
  value = value.trim();
25
- if (value === 'transparent') {
35
+ if (value === "transparent") {
26
36
  return {
27
- mode: 'rgb',
37
+ mode: "rgb",
28
38
  color: [
29
- '0',
30
- '0',
31
- '0'
39
+ "0",
40
+ "0",
41
+ "0"
32
42
  ],
33
- alpha: '0'
43
+ alpha: "0"
34
44
  };
35
45
  }
36
46
  if (value in _colorName.default) {
37
47
  return {
38
- mode: 'rgb',
39
- color: _colorName.default[value].map((v)=>v.toString()
40
- )
48
+ mode: "rgb",
49
+ color: _colorName.default[value].map((v)=>v.toString())
41
50
  };
42
51
  }
43
52
  let hex = value.replace(SHORT_HEX, (_, r, g, b, a)=>[
44
- '#',
53
+ "#",
45
54
  r,
46
55
  r,
47
56
  g,
48
57
  g,
49
58
  b,
50
59
  b,
51
- a ? a + a : ''
52
- ].join('')
53
- ).match(HEX);
60
+ a ? a + a : ""
61
+ ].join("")).match(HEX);
54
62
  if (hex !== null) {
55
63
  return {
56
- mode: 'rgb',
64
+ mode: "rgb",
57
65
  color: [
58
66
  parseInt(hex[1], 16),
59
67
  parseInt(hex[2], 16),
60
68
  parseInt(hex[3], 16)
61
- ].map((v)=>v.toString()
62
- ),
69
+ ].map((v)=>v.toString()),
63
70
  alpha: hex[4] ? (parseInt(hex[4], 16) / 255).toString() : undefined
64
71
  };
65
72
  }
66
- let rgbMatch = value.match(RGB);
67
- if (rgbMatch !== null) {
68
- var ref, ref1;
69
- return {
70
- mode: 'rgb',
71
- color: [
72
- rgbMatch[1],
73
- rgbMatch[2],
74
- rgbMatch[3]
75
- ].map((v)=>v.toString()
76
- ),
77
- alpha: (ref = rgbMatch[4]) === null || ref === void 0 ? void 0 : (ref1 = ref.toString) === null || ref1 === void 0 ? void 0 : ref1.call(ref)
78
- };
73
+ var ref2;
74
+ let match = (ref2 = value.match(RGB)) !== null && ref2 !== void 0 ? ref2 : value.match(HSL);
75
+ if (match === null) {
76
+ return null;
79
77
  }
80
- let hslMatch = value.match(HSL);
81
- if (hslMatch !== null) {
82
- var ref2, ref3;
83
- return {
84
- mode: 'hsl',
85
- color: [
86
- hslMatch[1],
87
- hslMatch[2],
88
- hslMatch[3]
89
- ].map((v)=>v.toString()
90
- ),
91
- alpha: (ref2 = hslMatch[4]) === null || ref2 === void 0 ? void 0 : (ref3 = ref2.toString) === null || ref3 === void 0 ? void 0 : ref3.call(ref2)
92
- };
78
+ let color = [
79
+ match[2],
80
+ match[3],
81
+ match[4]
82
+ ].filter(Boolean).map((v)=>v.toString());
83
+ if (!loose && color.length !== 3) {
84
+ return null;
93
85
  }
94
- return null;
86
+ if (color.length < 3 && !color.some((part)=>/^var\(.*?\)$/.test(part))) {
87
+ return null;
88
+ }
89
+ return {
90
+ mode: match[1],
91
+ color,
92
+ alpha: (ref = match[5]) === null || ref === void 0 ? void 0 : (ref1 = ref.toString) === null || ref1 === void 0 ? void 0 : ref1.call(ref)
93
+ };
95
94
  }
96
95
  function formatColor({ mode , color , alpha }) {
97
96
  let hasAlpha = alpha !== undefined;
98
- return `${mode}(${color.join(' ')}${hasAlpha ? ` / ${alpha}` : ''})`;
97
+ return `${mode}(${color.join(" ")}${hasAlpha ? ` / ${alpha}` : ""})`;
99
98
  }
@@ -2,7 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.default = _default;
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: ()=>_default
8
+ });
6
9
  function _default(pluginConfig, plugins) {
7
10
  if (pluginConfig === undefined) {
8
11
  return plugins;
@@ -12,7 +15,7 @@ function _default(pluginConfig, plugins) {
12
15
  return pluginConfig !== false && pluginConfig[pluginName] !== false;
13
16
  }).concat(Object.keys(pluginConfig).filter((pluginName)=>{
14
17
  return pluginConfig[pluginName] !== false;
15
- }))),
18
+ })))
16
19
  ];
17
20
  return pluginNames;
18
21
  }
@@ -2,16 +2,17 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.default = void 0;
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: ()=>_default
8
+ });
6
9
  function createPlugin(plugin, config) {
7
10
  return {
8
11
  handler: plugin,
9
12
  config
10
13
  };
11
14
  }
12
- createPlugin.withOptions = function(pluginFunction, configFunction = ()=>({
13
- })
14
- ) {
15
+ createPlugin.withOptions = function(pluginFunction, configFunction = ()=>({})) {
15
16
  const optionsFunction = function(options) {
16
17
  return {
17
18
  __options: options,
@@ -26,5 +27,4 @@ createPlugin.withOptions = function(pluginFunction, configFunction = ()=>({
26
27
  optionsFunction.__configFunction = configFunction;
27
28
  return optionsFunction;
28
29
  };
29
- var _default = createPlugin;
30
- exports.default = _default;
30
+ const _default = createPlugin;
@@ -2,8 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- exports.default = createUtilityPlugin;
6
- var _transformThemeValue = _interopRequireDefault(require("./transformThemeValue"));
5
+ Object.defineProperty(exports, "default", {
6
+ enumerable: true,
7
+ get: ()=>createUtilityPlugin
8
+ });
9
+ const _transformThemeValue = /*#__PURE__*/ _interopRequireDefault(require("./transformThemeValue"));
7
10
  function _interopRequireDefault(obj) {
8
11
  return obj && obj.__esModule ? obj : {
9
12
  default: obj
@@ -16,17 +19,16 @@ function createUtilityPlugin(themeKey, utilityVariations = [
16
19
  themeKey
17
20
  ]
18
21
  ]
19
- ], { filterDefault =false , ...options } = {
20
- }) {
21
- let transformValue = (0, _transformThemeValue).default(themeKey);
22
+ ], { filterDefault =false , ...options } = {}) {
23
+ let transformValue = (0, _transformThemeValue.default)(themeKey);
22
24
  return function({ matchUtilities , theme }) {
23
25
  for (let utilityVariation of utilityVariations){
24
26
  let group = Array.isArray(utilityVariation[0]) ? utilityVariation : [
25
27
  utilityVariation
26
28
  ];
27
29
  var ref;
28
- matchUtilities(group.reduce((obj1, [classPrefix, properties])=>{
29
- return Object.assign(obj1, {
30
+ matchUtilities(group.reduce((obj, [classPrefix, properties])=>{
31
+ return Object.assign(obj, {
30
32
  [classPrefix]: (value)=>{
31
33
  return properties.reduce((obj, name)=>{
32
34
  if (Array.isArray(name)) {
@@ -37,16 +39,12 @@ function createUtilityPlugin(themeKey, utilityVariations = [
37
39
  return Object.assign(obj, {
38
40
  [name]: transformValue(value)
39
41
  });
40
- }, {
41
- });
42
+ }, {});
42
43
  }
43
44
  });
44
- }, {
45
- }), {
45
+ }, {}), {
46
46
  ...options,
47
- values: filterDefault ? Object.fromEntries(Object.entries((ref = theme(themeKey)) !== null && ref !== void 0 ? ref : {
48
- }).filter(([modifier])=>modifier !== 'DEFAULT'
49
- )) : theme(themeKey)
47
+ values: filterDefault ? Object.fromEntries(Object.entries((ref = theme(themeKey)) !== null && ref !== void 0 ? ref : {}).filter(([modifier])=>modifier !== "DEFAULT")) : theme(themeKey)
50
48
  });
51
49
  }
52
50
  };