tailwindcss 0.0.0-insiders.ca1dfd6 → 0.0.0-insiders.cb6e45a

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 (190) hide show
  1. package/CHANGELOG.md +526 -2
  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/build/deps.js +54 -0
  11. package/lib/cli/build/index.js +44 -0
  12. package/lib/cli/build/plugin.js +335 -0
  13. package/lib/cli/build/utils.js +78 -0
  14. package/lib/cli/build/watching.js +113 -0
  15. package/lib/cli/help/index.js +71 -0
  16. package/lib/cli/index.js +18 -0
  17. package/lib/cli/init/index.js +46 -0
  18. package/lib/cli/shared.js +12 -0
  19. package/lib/cli-peer-dependencies.js +20 -7
  20. package/lib/cli.js +91 -569
  21. package/lib/constants.js +27 -20
  22. package/lib/corePluginList.js +16 -4
  23. package/lib/corePlugins.js +2247 -1873
  24. package/lib/css/preflight.css +20 -9
  25. package/lib/featureFlags.js +37 -23
  26. package/lib/index.js +28 -12
  27. package/lib/lib/cacheInvalidation.js +90 -0
  28. package/lib/lib/collapseAdjacentRules.js +27 -9
  29. package/lib/lib/collapseDuplicateDeclarations.js +83 -0
  30. package/lib/lib/content.js +167 -0
  31. package/lib/lib/defaultExtractor.js +236 -0
  32. package/lib/lib/detectNesting.js +21 -3
  33. package/lib/lib/evaluateTailwindFunctions.js +117 -50
  34. package/lib/lib/expandApplyAtRules.js +439 -160
  35. package/lib/lib/expandTailwindAtRules.js +141 -151
  36. package/lib/lib/findAtConfigPath.js +44 -0
  37. package/lib/lib/generateRules.js +572 -105
  38. package/lib/lib/getModuleDependencies.js +11 -8
  39. package/lib/lib/normalizeTailwindDirectives.js +45 -33
  40. package/lib/lib/offsets.js +217 -0
  41. package/lib/lib/partitionApplyAtRules.js +56 -0
  42. package/lib/lib/regex.js +60 -0
  43. package/lib/lib/resolveDefaultsAtRules.js +114 -81
  44. package/lib/lib/setupContextUtils.js +777 -385
  45. package/lib/lib/setupTrackingContext.js +43 -71
  46. package/lib/lib/sharedState.js +49 -18
  47. package/lib/lib/substituteScreenAtRules.js +13 -8
  48. package/{nesting → lib/postcss-plugins/nesting}/README.md +2 -2
  49. package/lib/postcss-plugins/nesting/index.js +19 -0
  50. package/lib/postcss-plugins/nesting/plugin.js +87 -0
  51. package/lib/processTailwindFeatures.js +36 -21
  52. package/lib/public/colors.js +250 -252
  53. package/lib/public/create-plugin.js +6 -4
  54. package/lib/public/default-config.js +7 -5
  55. package/lib/public/default-theme.js +7 -5
  56. package/lib/public/resolve-config.js +8 -5
  57. package/lib/util/bigSign.js +4 -1
  58. package/lib/util/buildMediaQuery.js +18 -24
  59. package/lib/util/cloneDeep.js +7 -6
  60. package/lib/util/cloneNodes.js +21 -3
  61. package/lib/util/color.js +54 -40
  62. package/lib/util/configurePlugins.js +5 -2
  63. package/lib/util/createPlugin.js +6 -6
  64. package/lib/util/createUtilityPlugin.js +11 -13
  65. package/lib/util/dataTypes.js +137 -100
  66. package/lib/util/defaults.js +10 -1
  67. package/lib/util/escapeClassName.js +7 -4
  68. package/lib/util/escapeCommas.js +5 -2
  69. package/lib/util/flattenColorPalette.js +9 -12
  70. package/lib/util/formatVariantSelector.js +285 -0
  71. package/lib/util/getAllConfigs.js +27 -8
  72. package/lib/util/hashConfig.js +6 -3
  73. package/lib/util/isKeyframeRule.js +5 -2
  74. package/lib/util/isPlainObject.js +5 -2
  75. package/lib/util/isValidArbitraryValue.js +72 -0
  76. package/lib/util/log.js +44 -22
  77. package/lib/util/nameClass.js +20 -8
  78. package/lib/util/negateValue.js +23 -6
  79. package/lib/util/normalizeConfig.js +267 -0
  80. package/lib/util/normalizeScreens.js +170 -0
  81. package/lib/util/parseAnimationValue.js +42 -40
  82. package/lib/util/parseBoxShadowValue.js +84 -0
  83. package/lib/util/parseDependency.js +38 -56
  84. package/lib/util/parseGlob.js +34 -0
  85. package/lib/util/parseObjectStyles.js +11 -8
  86. package/lib/util/pluginUtils.js +171 -189
  87. package/lib/util/prefixSelector.js +10 -10
  88. package/lib/util/removeAlphaVariables.js +29 -0
  89. package/lib/util/resolveConfig.js +92 -126
  90. package/lib/util/resolveConfigPath.js +11 -9
  91. package/lib/util/responsive.js +8 -5
  92. package/lib/util/splitAtTopLevelOnly.js +43 -0
  93. package/lib/util/tap.js +4 -1
  94. package/lib/util/toColorValue.js +5 -3
  95. package/lib/util/toPath.js +24 -3
  96. package/lib/util/transformThemeValue.js +49 -31
  97. package/lib/util/validateConfig.js +24 -0
  98. package/lib/util/validateFormalSyntax.js +24 -0
  99. package/lib/util/withAlphaVariable.js +23 -15
  100. package/nesting/index.js +2 -12
  101. package/package.json +48 -46
  102. package/peers/index.js +14817 -12471
  103. package/plugin.d.ts +11 -0
  104. package/plugin.js +2 -1
  105. package/resolveConfig.d.ts +3 -0
  106. package/resolveConfig.js +2 -1
  107. package/scripts/create-plugin-list.js +2 -2
  108. package/scripts/generate-types.js +105 -0
  109. package/scripts/release-channel.js +18 -0
  110. package/scripts/release-notes.js +21 -0
  111. package/scripts/type-utils.js +27 -0
  112. package/src/cli/build/deps.js +56 -0
  113. package/src/cli/build/index.js +45 -0
  114. package/src/cli/build/plugin.js +397 -0
  115. package/src/cli/build/utils.js +76 -0
  116. package/src/cli/build/watching.js +134 -0
  117. package/src/cli/help/index.js +70 -0
  118. package/src/cli/index.js +3 -0
  119. package/src/cli/init/index.js +50 -0
  120. package/src/cli/shared.js +5 -0
  121. package/src/cli-peer-dependencies.js +7 -1
  122. package/src/cli.js +26 -565
  123. package/src/corePluginList.js +1 -1
  124. package/src/corePlugins.js +905 -615
  125. package/src/css/preflight.css +20 -9
  126. package/src/featureFlags.js +26 -10
  127. package/src/index.js +19 -6
  128. package/src/lib/cacheInvalidation.js +52 -0
  129. package/src/lib/collapseAdjacentRules.js +21 -2
  130. package/src/lib/collapseDuplicateDeclarations.js +93 -0
  131. package/src/lib/content.js +205 -0
  132. package/src/lib/defaultExtractor.js +211 -0
  133. package/src/lib/detectNesting.js +22 -3
  134. package/src/lib/evaluateTailwindFunctions.js +84 -10
  135. package/src/lib/expandApplyAtRules.js +488 -153
  136. package/src/lib/expandTailwindAtRules.js +94 -106
  137. package/src/lib/findAtConfigPath.js +50 -0
  138. package/src/lib/generateRules.js +589 -67
  139. package/src/lib/normalizeTailwindDirectives.js +10 -3
  140. package/src/lib/offsets.js +270 -0
  141. package/src/lib/partitionApplyAtRules.js +52 -0
  142. package/src/lib/regex.js +74 -0
  143. package/src/lib/resolveDefaultsAtRules.js +98 -60
  144. package/src/lib/setupContextUtils.js +737 -246
  145. package/src/lib/setupTrackingContext.js +16 -54
  146. package/src/lib/sharedState.js +44 -7
  147. package/src/lib/substituteScreenAtRules.js +6 -3
  148. package/src/postcss-plugins/nesting/README.md +42 -0
  149. package/src/postcss-plugins/nesting/index.js +13 -0
  150. package/src/postcss-plugins/nesting/plugin.js +80 -0
  151. package/src/processTailwindFeatures.js +17 -2
  152. package/src/public/colors.js +4 -9
  153. package/src/util/buildMediaQuery.js +14 -16
  154. package/src/util/cloneNodes.js +19 -2
  155. package/src/util/color.js +31 -14
  156. package/src/util/createUtilityPlugin.js +2 -2
  157. package/src/util/dataTypes.js +57 -21
  158. package/src/util/defaults.js +6 -0
  159. package/src/util/formatVariantSelector.js +319 -0
  160. package/src/util/getAllConfigs.js +19 -0
  161. package/src/util/isValidArbitraryValue.js +61 -0
  162. package/src/util/log.js +23 -22
  163. package/src/util/nameClass.js +6 -2
  164. package/src/util/negateValue.js +14 -4
  165. package/src/util/normalizeConfig.js +282 -0
  166. package/src/util/normalizeScreens.js +140 -0
  167. package/src/util/parseBoxShadowValue.js +72 -0
  168. package/src/util/parseDependency.js +37 -42
  169. package/src/util/parseGlob.js +24 -0
  170. package/src/util/pluginUtils.js +144 -152
  171. package/src/util/prefixSelector.js +7 -8
  172. package/src/util/removeAlphaVariables.js +24 -0
  173. package/src/util/resolveConfig.js +82 -81
  174. package/src/util/splitAtTopLevelOnly.js +45 -0
  175. package/src/util/toPath.js +23 -1
  176. package/src/util/transformThemeValue.js +33 -8
  177. package/src/util/validateConfig.js +13 -0
  178. package/src/util/validateFormalSyntax.js +34 -0
  179. package/src/util/withAlphaVariable.js +1 -1
  180. package/stubs/defaultConfig.stub.js +173 -93
  181. package/stubs/simpleConfig.stub.js +1 -1
  182. package/types/config.d.ts +361 -0
  183. package/types/generated/.gitkeep +0 -0
  184. package/types/generated/colors.d.ts +276 -0
  185. package/types/generated/corePluginList.d.ts +1 -0
  186. package/types/generated/default-theme.d.ts +342 -0
  187. package/types/index.d.ts +7 -0
  188. package/lib/lib/setupWatchingContext.js +0 -284
  189. package/nesting/plugin.js +0 -41
  190. package/src/lib/setupWatchingContext.js +0 -306
@@ -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,30 +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
- if (typeof screens === 'string') {
8
- screens = {
9
- min: screens
10
- };
11
- }
12
- if (!Array.isArray(screens)) {
13
- screens = [
14
- screens
15
- ];
16
- }
10
+ screens = Array.isArray(screens) ? screens : [
11
+ screens
12
+ ];
17
13
  return screens.map((screen)=>{
18
- var ref;
19
- if (screen === null || screen === void 0 ? void 0 : (ref = screen.hasOwnProperty) === null || ref === void 0 ? void 0 : ref.call(screen, 'raw')) {
20
- return screen.raw;
21
- }
22
- return Object.entries(screen).map(([feature, value])=>{
23
- var _feature;
24
- feature = (_feature = ({
25
- min: 'min-width',
26
- max: 'max-width'
27
- })[feature]) !== null && _feature !== void 0 ? _feature : feature;
28
- return `(${feature}: ${value})`;
29
- }).join(' and ');
30
- }).join(', ');
14
+ let values = screen.values.map((screen)=>{
15
+ if (screen.raw !== undefined) {
16
+ return screen.raw;
17
+ }
18
+ return [
19
+ screen.min && `(min-width: ${screen.min})`,
20
+ screen.max && `(max-width: ${screen.max})`
21
+ ].filter(Boolean).join(" and ");
22
+ });
23
+ return screen.not ? `not all and ${values}` : values;
24
+ }).join(", ");
31
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,73 +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_HSL = new RegExp(`^(rgb|hsl)a?\\(\\s*(${VALUE})${SEP}(${VALUE})${SEP}(${VALUE})(?:${ALPHA_SEP}(${VALUE}))?\\s*\\)$`);
19
- function parseColor(value) {
20
- 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") {
21
32
  return null;
22
33
  }
23
34
  value = value.trim();
24
- if (value === 'transparent') {
35
+ if (value === "transparent") {
25
36
  return {
26
- mode: 'rgb',
37
+ mode: "rgb",
27
38
  color: [
28
- '0',
29
- '0',
30
- '0'
39
+ "0",
40
+ "0",
41
+ "0"
31
42
  ],
32
- alpha: '0'
43
+ alpha: "0"
33
44
  };
34
45
  }
35
46
  if (value in _colorName.default) {
36
47
  return {
37
- mode: 'rgb',
38
- color: _colorName.default[value].map((v)=>v.toString()
39
- )
48
+ mode: "rgb",
49
+ color: _colorName.default[value].map((v)=>v.toString())
40
50
  };
41
51
  }
42
52
  let hex = value.replace(SHORT_HEX, (_, r, g, b, a)=>[
43
- '#',
53
+ "#",
44
54
  r,
45
55
  r,
46
56
  g,
47
57
  g,
48
58
  b,
49
59
  b,
50
- a ? a + a : ''
51
- ].join('')
52
- ).match(HEX);
60
+ a ? a + a : ""
61
+ ].join("")).match(HEX);
53
62
  if (hex !== null) {
54
63
  return {
55
- mode: 'rgb',
64
+ mode: "rgb",
56
65
  color: [
57
66
  parseInt(hex[1], 16),
58
67
  parseInt(hex[2], 16),
59
68
  parseInt(hex[3], 16)
60
- ].map((v)=>v.toString()
61
- ),
69
+ ].map((v)=>v.toString()),
62
70
  alpha: hex[4] ? (parseInt(hex[4], 16) / 255).toString() : undefined
63
71
  };
64
72
  }
65
- let match = value.match(RGB_HSL);
66
- if (match !== null) {
67
- var ref, ref1;
68
- return {
69
- mode: match[1],
70
- color: [
71
- match[2],
72
- match[3],
73
- match[4]
74
- ].map((v)=>v.toString()
75
- ),
76
- alpha: (ref = match[5]) === null || ref === void 0 ? void 0 : (ref1 = ref.toString) === null || ref1 === void 0 ? void 0 : ref1.call(ref)
77
- };
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;
78
77
  }
79
- return null;
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;
85
+ }
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
+ };
80
94
  }
81
95
  function formatColor({ mode , color , alpha }) {
82
96
  let hasAlpha = alpha !== undefined;
83
- return `${mode}(${color.join(' ')}${hasAlpha ? ` / ${alpha}` : ''})`;
97
+ return `${mode}(${color.join(" ")}${hasAlpha ? ` / ${alpha}` : ""})`;
84
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,9 +19,8 @@ function createUtilityPlugin(themeKey, utilityVariations = [
16
19
  themeKey
17
20
  ]
18
21
  ]
19
- ], { filterDefault =false , type ='any' } = {
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 : [
@@ -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
- }), {
46
- values: filterDefault ? Object.fromEntries(Object.entries((ref = theme(themeKey)) !== null && ref !== void 0 ? ref : {
47
- }).filter(([modifier])=>modifier !== 'DEFAULT'
48
- )) : theme(themeKey),
49
- type
45
+ }, {}), {
46
+ ...options,
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
  };