@unocss/preset-mini 0.41.2 → 0.43.0

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.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const utilities = require('./utilities.cjs');
3
+ const colors = require('./colors2.cjs');
4
4
  const core = require('@unocss/core');
5
5
  const transform = require('./transform.cjs');
6
6
 
@@ -16,19 +16,19 @@ const verticalAlignAlias = {
16
16
  "text-bottom": "text-bottom",
17
17
  "sub": "sub",
18
18
  "super": "super",
19
- ...Object.fromEntries(utilities.globalKeywords.map((x) => [x, x]))
19
+ ...Object.fromEntries(colors.globalKeywords.map((x) => [x, x]))
20
20
  };
21
21
  const verticalAligns = [
22
22
  [/^(?:vertical|align|v)-([-\w]+)$/, ([, v]) => ({ "vertical-align": verticalAlignAlias[v] }), { autocomplete: `(vertical|align|v)-(${Object.keys(verticalAlignAlias).join("|")})` }]
23
23
  ];
24
- const textAligns = ["center", "left", "right", "justify", "start", "end", ...utilities.globalKeywords].map((v) => [`text-${v}`, { "text-align": v }]);
24
+ const textAligns = ["center", "left", "right", "justify", "start", "end", ...colors.globalKeywords].map((v) => [`text-${v}`, { "text-align": v }]);
25
25
 
26
26
  const outline = [
27
- [/^outline-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "outline-width": theme.lineWidth?.[d] ?? utilities.handler.bracket.cssvar.global.px(d) }), { autocomplete: "outline-(width|size)-<num>" }],
28
- [/^outline-(?:color-)?(.+)$/, utilities.colorResolver("outline-color", "outline-color"), { autocomplete: "outline-$colors" }],
29
- [/^outline-offset-(.+)$/, ([, d], { theme }) => ({ "outline-offset": theme.lineWidth?.[d] ?? utilities.handler.bracket.cssvar.global.px(d) }), { autocomplete: "outline-(offset)-<num>" }],
27
+ [/^outline-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "outline-width": theme.lineWidth?.[d] ?? colors.handler.bracket.cssvar.global.px(d) }), { autocomplete: "outline-(width|size)-<num>" }],
28
+ [/^outline-(?:color-)?(.+)$/, colors.colorResolver("outline-color", "outline-color"), { autocomplete: "outline-$colors" }],
29
+ [/^outline-offset-(.+)$/, ([, d], { theme }) => ({ "outline-offset": theme.lineWidth?.[d] ?? colors.handler.bracket.cssvar.global.px(d) }), { autocomplete: "outline-(offset)-<num>" }],
30
30
  ["outline", { "outline-style": "solid" }],
31
- ...["auto", "dashed", "dotted", "double", "hidden", "solid", "groove", "ridge", "inset", "outset", ...utilities.globalKeywords].map((v) => [`outline-${v}`, { "outline-style": v }]),
31
+ ...["auto", "dashed", "dotted", "double", "hidden", "solid", "groove", "ridge", "inset", "outset", ...colors.globalKeywords].map((v) => [`outline-${v}`, { "outline-style": v }]),
32
32
  ["outline-none", { "outline": "2px solid transparent", "outline-offset": "2px" }]
33
33
  ];
34
34
  const appearance = [
@@ -38,7 +38,7 @@ const appearance = [
38
38
  }]
39
39
  ];
40
40
  const willChangeProperty = (prop) => {
41
- return utilities.handler.properties.auto.global(prop) ?? {
41
+ return colors.handler.properties.auto.global(prop) ?? {
42
42
  contents: "contents",
43
43
  scroll: "scroll-position"
44
44
  }[prop];
@@ -47,7 +47,7 @@ const willChange = [
47
47
  [/^will-change-(.+)/, ([, p]) => ({ "will-change": willChangeProperty(p) })]
48
48
  ];
49
49
 
50
- const borderStyles = ["solid", "dashed", "dotted", "double", "hidden", "none", "groove", "ridge", "inset", "outset", ...utilities.globalKeywords];
50
+ const borderStyles = ["solid", "dashed", "dotted", "double", "hidden", "none", "groove", "ridge", "inset", "outset", ...colors.globalKeywords];
51
51
  const borders = [
52
52
  [/^(?:border|b)()(?:-(.+))?$/, handlerBorder, { autocomplete: "(border|b)-<directions>" }],
53
53
  [/^(?:border|b)-([xy])(?:-(.+))?$/, handlerBorder],
@@ -81,31 +81,31 @@ const borders = [
81
81
  [/^(?:border|b)-([bi][se])-(?:style-)?(.+)$/, handlerBorderStyle]
82
82
  ];
83
83
  const borderColorResolver = (direction) => ([, body], theme) => {
84
- const data = utilities.parseColor(body, theme);
84
+ const data = colors.parseColor(body, theme);
85
85
  if (!data)
86
86
  return;
87
87
  const { alpha, color, cssColor } = data;
88
88
  if (cssColor) {
89
89
  if (alpha != null) {
90
90
  return {
91
- [`border${direction}-color`]: utilities.colorToString(cssColor, alpha)
91
+ [`border${direction}-color`]: colors.colorToString(cssColor, alpha)
92
92
  };
93
93
  }
94
94
  if (direction === "") {
95
95
  return {
96
- "--un-border-opacity": utilities.colorOpacityToString(cssColor),
97
- "border-color": utilities.colorToString(cssColor, "var(--un-border-opacity)")
96
+ "--un-border-opacity": colors.colorOpacityToString(cssColor),
97
+ "border-color": colors.colorToString(cssColor, "var(--un-border-opacity)")
98
98
  };
99
99
  } else {
100
100
  return {
101
- "--un-border-opacity": utilities.colorOpacityToString(cssColor),
101
+ "--un-border-opacity": colors.colorOpacityToString(cssColor),
102
102
  [`--un-border${direction}-opacity`]: "var(--un-border-opacity)",
103
- [`border${direction}-color`]: utilities.colorToString(cssColor, `var(--un-border${direction}-opacity)`)
103
+ [`border${direction}-color`]: colors.colorToString(cssColor, `var(--un-border${direction}-opacity)`)
104
104
  };
105
105
  }
106
106
  } else if (color) {
107
107
  return {
108
- [`border${direction}-color`]: utilities.colorToString(color, alpha)
108
+ [`border${direction}-color`]: colors.colorToString(color, alpha)
109
109
  };
110
110
  }
111
111
  };
@@ -120,40 +120,40 @@ function handlerBorder(m, ctx) {
120
120
  }
121
121
  }
122
122
  function handlerBorderSize([, a = "", b], { theme }) {
123
- const v = theme.lineWidth?.[b || "DEFAULT"] ?? utilities.handler.bracket.cssvar.global.px(b || "1");
124
- if (a in utilities.directionMap && v != null)
125
- return utilities.directionMap[a].map((i) => [`border${i}-width`, v]);
123
+ const v = theme.lineWidth?.[b || "DEFAULT"] ?? colors.handler.bracket.cssvar.global.px(b || "1");
124
+ if (a in colors.directionMap && v != null)
125
+ return colors.directionMap[a].map((i) => [`border${i}-width`, v]);
126
126
  }
127
127
  function handlerBorderColor([, a = "", c], { theme }) {
128
- if (a in utilities.directionMap && utilities.hasParseableColor(c, theme)) {
129
- return Object.assign({}, ...utilities.directionMap[a].map((i) => borderColorResolver(i)(["", c], theme)));
128
+ if (a in colors.directionMap && colors.hasParseableColor(c, theme)) {
129
+ return Object.assign({}, ...colors.directionMap[a].map((i) => borderColorResolver(i)(["", c], theme)));
130
130
  }
131
131
  }
132
132
  function handlerBorderOpacity([, a = "", opacity]) {
133
- const v = utilities.handler.bracket.percent(opacity);
134
- if (a in utilities.directionMap && v != null)
135
- return utilities.directionMap[a].map((i) => [`--un-border${i}-opacity`, v]);
133
+ const v = colors.handler.bracket.percent(opacity);
134
+ if (a in colors.directionMap && v != null)
135
+ return colors.directionMap[a].map((i) => [`--un-border${i}-opacity`, v]);
136
136
  }
137
137
  function handlerRounded([, a = "", s], { theme }) {
138
- const v = theme.borderRadius?.[s || "DEFAULT"] || utilities.handler.bracket.cssvar.global.fraction.rem(s || "1");
139
- if (a in utilities.cornerMap && v != null)
140
- return utilities.cornerMap[a].map((i) => [`border${i}-radius`, v]);
138
+ const v = theme.borderRadius?.[s || "DEFAULT"] || colors.handler.bracket.cssvar.global.fraction.rem(s || "1");
139
+ if (a in colors.cornerMap && v != null)
140
+ return colors.cornerMap[a].map((i) => [`border${i}-radius`, v]);
141
141
  }
142
142
  function handlerBorderStyle([, a = "", s]) {
143
- if (borderStyles.includes(s) && a in utilities.directionMap)
144
- return utilities.directionMap[a].map((i) => [`border${i}-style`, s]);
143
+ if (borderStyles.includes(s) && a in colors.directionMap)
144
+ return colors.directionMap[a].map((i) => [`border${i}-style`, s]);
145
145
  }
146
146
 
147
147
  const opacity = [
148
- [/^op(?:acity)?-?(.+)$/, ([, d]) => ({ opacity: utilities.handler.bracket.percent.cssvar(d) })]
148
+ [/^op(?:acity)?-?(.+)$/, ([, d]) => ({ opacity: colors.handler.bracket.percent.cssvar(d) })]
149
149
  ];
150
150
  const textColors = [
151
- [/^(?:text|color|c)-(.+)$/, utilities.colorResolver("color", "text"), { autocomplete: "(text|color|c)-$colors" }],
152
- [/^(?:text|color|c)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-text-opacity": utilities.handler.bracket.percent(opacity2) }), { autocomplete: "(text|color|c)-(op|opacity)-<percent>" }]
151
+ [/^(?:text|color|c)-(.+)$/, colors.colorResolver("color", "text"), { autocomplete: "(text|color|c)-$colors" }],
152
+ [/^(?:text|color|c)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-text-opacity": colors.handler.bracket.percent(opacity2) }), { autocomplete: "(text|color|c)-(op|opacity)-<percent>" }]
153
153
  ];
154
154
  const bgColors = [
155
- [/^bg-(.+)$/, utilities.colorResolver("background-color", "bg"), { autocomplete: "bg-$colors" }],
156
- [/^bg-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-bg-opacity": utilities.handler.bracket.percent(opacity2) }), { autocomplete: "bg-(op|opacity)-<percent>" }]
155
+ [/^bg-(.+)$/, colors.colorResolver("background-color", "bg"), { autocomplete: "bg-$colors" }],
156
+ [/^bg-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-bg-opacity": colors.handler.bracket.percent(opacity2) }), { autocomplete: "bg-(op|opacity)-<percent>" }]
157
157
  ];
158
158
 
159
159
  const transitionPropertyGroup = {
@@ -165,13 +165,13 @@ const transitionPropertyGroup = {
165
165
  transform: "transform"
166
166
  };
167
167
  const transitionProperty = (prop) => {
168
- return utilities.handler.properties(prop) ?? transitionPropertyGroup[prop];
168
+ return colors.handler.properties(prop) ?? transitionPropertyGroup[prop];
169
169
  };
170
170
  const transitions = [
171
171
  [/^transition(?:-([a-z-]+(?:,[a-z-]+)*))?(?:-(\d+))?$/, ([, prop, d], { theme }) => {
172
172
  const p = prop != null ? transitionProperty(prop) : [transitionPropertyGroup.colors, "opacity", "box-shadow", "transform", "filter", "backdrop-filter"].join(",");
173
173
  if (p) {
174
- const duration = theme.duration?.[d || "DEFAULT"] ?? utilities.handler.time(d || "150");
174
+ const duration = theme.duration?.[d || "DEFAULT"] ?? colors.handler.time(d || "150");
175
175
  return {
176
176
  "transition-property": p,
177
177
  "transition-timing-function": "cubic-bezier(0.4, 0, 0.2, 1)",
@@ -181,33 +181,33 @@ const transitions = [
181
181
  }, { autocomplete: `transition-(${Object.keys(transitionPropertyGroup).join("|")})` }],
182
182
  [
183
183
  /^(?:transition-)?duration-(.+)$/,
184
- ([, d], { theme }) => ({ "transition-duration": theme.duration?.[d || "DEFAULT"] ?? utilities.handler.bracket.cssvar.time(d) }),
184
+ ([, d], { theme }) => ({ "transition-duration": theme.duration?.[d || "DEFAULT"] ?? colors.handler.bracket.cssvar.time(d) }),
185
185
  { autocomplete: ["transition-duration-$duration", "duration-$duration"] }
186
186
  ],
187
187
  [
188
188
  /^(?:transition-)?delay-(.+)$/,
189
- ([, d], { theme }) => ({ "transition-delay": theme.duration?.[d || "DEFAULT"] ?? utilities.handler.bracket.cssvar.time(d) }),
189
+ ([, d], { theme }) => ({ "transition-delay": theme.duration?.[d || "DEFAULT"] ?? colors.handler.bracket.cssvar.time(d) }),
190
190
  { autocomplete: ["transition-delay-$duration", "delay-$duration"] }
191
191
  ],
192
192
  [
193
193
  /^(?:transition-)?ease(?:-(.+))?$/,
194
- ([, d], { theme }) => ({ "transition-timing-function": theme.easing?.[d || "DEFAULT"] ?? utilities.handler.bracket.cssvar(d) }),
194
+ ([, d], { theme }) => ({ "transition-timing-function": theme.easing?.[d || "DEFAULT"] ?? colors.handler.bracket.cssvar(d) }),
195
195
  { autocomplete: ["transition-ease-(linear|in|out|in-out|DEFAULT)", "ease-(linear|in|out|in-out|DEFAULT)"] }
196
196
  ],
197
197
  [
198
198
  /^(?:transition-)?property-(.+)$/,
199
- ([, v]) => ({ "transition-property": utilities.handler.global(v) || transitionProperty(v) }),
200
- { autocomplete: [`transition-property-(${[...utilities.globalKeywords, ...Object.keys(transitionPropertyGroup)].join("|")})`] }
199
+ ([, v]) => ({ "transition-property": colors.handler.global(v) || transitionProperty(v) }),
200
+ { autocomplete: [`transition-property-(${[...colors.globalKeywords, ...Object.keys(transitionPropertyGroup)].join("|")})`] }
201
201
  ],
202
202
  ["transition-none", { transition: "none" }],
203
- ...utilities.makeGlobalStaticRules("transition")
203
+ ...colors.makeGlobalStaticRules("transition")
204
204
  ];
205
205
 
206
206
  const flex = [
207
207
  ["flex", { display: "flex" }],
208
208
  ["inline-flex", { display: "inline-flex" }],
209
209
  ["flex-inline", { display: "inline-flex" }],
210
- [/^flex-(.*)$/, ([, d]) => ({ flex: utilities.handler.bracket(d) != null ? utilities.handler.bracket(d).split(" ").map((e) => utilities.handler.cssvar.fraction(e) ?? e).join(" ") : utilities.handler.cssvar.fraction(d) })],
210
+ [/^flex-(.*)$/, ([, d]) => ({ flex: colors.handler.bracket(d) != null ? colors.handler.bracket(d).split(" ").map((e) => colors.handler.cssvar.fraction(e) ?? e).join(" ") : colors.handler.cssvar.fraction(d) })],
211
211
  ["flex-1", { flex: "1 1 0%" }],
212
212
  ["flex-auto", { flex: "1 1 auto" }],
213
213
  ["flex-initial", { flex: "0 1 auto" }],
@@ -216,7 +216,7 @@ const flex = [
216
216
  [/^(?:flex-)?shrink-0$/, () => ({ "flex-shrink": 0 })],
217
217
  [/^(?:flex-)?grow$/, () => ({ "flex-grow": 1 })],
218
218
  [/^(?:flex-)?grow-0$/, () => ({ "flex-grow": 0 })],
219
- [/^(?:flex-)?basis-(.+)$/, ([, d], { theme }) => ({ "flex-basis": theme.spacing?.[d] ?? utilities.handler.bracket.cssvar.auto.fraction.rem(d) })],
219
+ [/^(?:flex-)?basis-(.+)$/, ([, d], { theme }) => ({ "flex-basis": theme.spacing?.[d] ?? colors.handler.bracket.cssvar.auto.fraction.rem(d) })],
220
220
  ["flex-row", { "flex-direction": "row" }],
221
221
  ["flex-row-reverse", { "flex-direction": "row-reverse" }],
222
222
  ["flex-col", { "flex-direction": "column" }],
@@ -240,7 +240,7 @@ const weightMap = {
240
240
  const fonts = [
241
241
  [
242
242
  /^font-(.+)$/,
243
- ([, d], { theme }) => ({ "font-family": theme.fontFamily?.[d] || utilities.handler.bracket.cssvar.global(d) }),
243
+ ([, d], { theme }) => ({ "font-family": theme.fontFamily?.[d] || colors.handler.bracket.cssvar.global(d) }),
244
244
  { autocomplete: "font-$fontFamily" }
245
245
  ],
246
246
  [
@@ -254,45 +254,45 @@ const fonts = [
254
254
  "line-height": height
255
255
  };
256
256
  }
257
- return { "font-size": utilities.handler.bracketOfLength.rem(s) };
257
+ return { "font-size": colors.handler.bracketOfLength.rem(s) };
258
258
  },
259
259
  { autocomplete: "text-$fontSize" }
260
260
  ],
261
261
  [/^text-size-(.+)$/, ([, s], { theme }) => {
262
262
  const themed = core.toArray(theme.fontSize?.[s]);
263
- const size = themed?.[0] ?? utilities.handler.bracket.cssvar.global.rem(s);
263
+ const size = themed?.[0] ?? colors.handler.bracket.cssvar.global.rem(s);
264
264
  if (size != null)
265
265
  return { "font-size": size };
266
266
  }, { autocomplete: "text-size-$fontSize" }],
267
267
  [
268
268
  /^(?:font|fw)-?([^-]+)$/,
269
- ([, s]) => ({ "font-weight": weightMap[s] || utilities.handler.global.number(s) }),
269
+ ([, s]) => ({ "font-weight": weightMap[s] || colors.handler.global.number(s) }),
270
270
  { autocomplete: `(font|fw)-(100|200|300|400|500|600|700|800|900|${Object.keys(weightMap).join("|")})` }
271
271
  ],
272
272
  [
273
273
  /^(?:font-)?(?:leading|lh)-(.+)$/,
274
- ([, s], { theme }) => ({ "line-height": theme.lineHeight?.[s] || utilities.handler.bracket.cssvar.global.rem(s) }),
274
+ ([, s], { theme }) => ({ "line-height": theme.lineHeight?.[s] || colors.handler.bracket.cssvar.global.rem(s) }),
275
275
  { autocomplete: "(leading|lh)-$lineHeight" }
276
276
  ],
277
- [
278
- /^font-synthesis-(.+)$/,
279
- ([, s]) => ({ "font-synthesis": s }),
280
- { autocomplete: "font-synthesis-(none|weight|style|small-caps)" }
281
- ],
277
+ ["font-synthesis-weight", { "font-synthesis": "weight" }],
278
+ ["font-synthesis-style", { "font-synthesis": "style" }],
279
+ ["font-synthesis-small-caps", { "font-synthesis": "small-caps" }],
280
+ ["font-synthesis-none", { "font-synthesis": "none" }],
281
+ [/^font-synthesis-(.+)$/, ([, s]) => ({ "font-synthesis": colors.handler.bracket.cssvar.global(s) })],
282
282
  [
283
283
  /^(?:font-)?tracking-(.+)$/,
284
- ([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] || utilities.handler.bracket.cssvar.global.rem(s) }),
284
+ ([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] || colors.handler.bracket.cssvar.global.rem(s) }),
285
285
  { autocomplete: "tracking-$letterSpacing" }
286
286
  ],
287
287
  [
288
288
  /^(?:font-)?word-spacing-(.+)$/,
289
- ([, s], { theme }) => ({ "word-spacing": theme.wordSpacing?.[s] || utilities.handler.bracket.cssvar.global.rem(s) }),
289
+ ([, s], { theme }) => ({ "word-spacing": theme.wordSpacing?.[s] || colors.handler.bracket.cssvar.global.rem(s) }),
290
290
  { autocomplete: "word-spacing-$wordSpacing" }
291
291
  ]
292
292
  ];
293
293
  const tabSizes = [
294
294
  [/^tab(?:-(.+))?$/, ([, s]) => {
295
- const v = utilities.handler.bracket.cssvar.global.number(s || "4");
295
+ const v = colors.handler.bracket.cssvar.global.number(s || "4");
296
296
  if (v != null) {
297
297
  return {
298
298
  "-moz-tab-size": v,
@@ -303,26 +303,26 @@ const tabSizes = [
303
303
  }]
304
304
  ];
305
305
  const textIndents = [
306
- [/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] || utilities.handler.bracket.cssvar.global.fraction.rem(s) }), { autocomplete: "indent-$textIndent" }]
306
+ [/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] || colors.handler.bracket.cssvar.global.fraction.rem(s) }), { autocomplete: "indent-$textIndent" }]
307
307
  ];
308
308
  const textStrokes = [
309
- [/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] || utilities.handler.bracket.cssvar.px(s) }), { autocomplete: "text-stroke-$textStrokeWidth" }],
310
- [/^text-stroke-(.+)$/, utilities.colorResolver("-webkit-text-stroke-color", "text-stroke"), { autocomplete: "text-stroke-$colors" }],
311
- [/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "text-stroke-(op|opacity)-<percent>" }]
309
+ [/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] || colors.handler.bracket.cssvar.px(s) }), { autocomplete: "text-stroke-$textStrokeWidth" }],
310
+ [/^text-stroke-(.+)$/, colors.colorResolver("-webkit-text-stroke-color", "text-stroke"), { autocomplete: "text-stroke-$colors" }],
311
+ [/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "text-stroke-(op|opacity)-<percent>" }]
312
312
  ];
313
313
  const textShadows = [
314
314
  [/^text-shadow(?:-(.+))?$/, ([, s], { theme }) => {
315
315
  const v = theme.textShadow?.[s || "DEFAULT"];
316
316
  if (v != null) {
317
317
  return {
318
- "--un-text-shadow": utilities.colorableShadows(v, "--un-text-shadow-color").join(","),
318
+ "--un-text-shadow": colors.colorableShadows(v, "--un-text-shadow-color").join(","),
319
319
  "text-shadow": "var(--un-text-shadow)"
320
320
  };
321
321
  }
322
- return { "text-shadow": utilities.handler.bracket.cssvar.global(s) };
322
+ return { "text-shadow": colors.handler.bracket.cssvar.global(s) };
323
323
  }, { autocomplete: "text-shadow-$textShadow" }],
324
- [/^text-shadow-color-(.+)$/, utilities.colorResolver("--un-text-shadow-color", "text-shadow"), { autocomplete: "text-shadow-color-$colors" }],
325
- [/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "text-shadow-color-(op|opacity)-<percent>" }]
324
+ [/^text-shadow-color-(.+)$/, colors.colorResolver("--un-text-shadow-color", "text-shadow"), { autocomplete: "text-shadow-color-$colors" }],
325
+ [/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "text-shadow-color-(op|opacity)-<percent>" }]
326
326
  ];
327
327
 
328
328
  const directions = {
@@ -331,7 +331,7 @@ const directions = {
331
331
  "y": "row-"
332
332
  };
333
333
  const handleGap = ([, d = "", s], { theme }) => {
334
- const v = theme.spacing?.[s] ?? utilities.handler.bracket.cssvar.global.rem(s);
334
+ const v = theme.spacing?.[s] ?? colors.handler.bracket.cssvar.global.rem(s);
335
335
  if (v != null) {
336
336
  return {
337
337
  [`grid-${directions[d]}gap`]: v,
@@ -358,31 +358,31 @@ const autoDirection = (c, theme, prop) => {
358
358
  case "fr":
359
359
  return "minmax(0,1fr)";
360
360
  }
361
- return utilities.handler.bracket.cssvar.auto.rem(prop);
361
+ return colors.handler.bracket.cssvar.auto.rem(prop);
362
362
  };
363
363
  const grids = [
364
364
  ["grid", { display: "grid" }],
365
365
  ["inline-grid", { display: "inline-grid" }],
366
366
  [/^(?:grid-)?(row|col)-(.+)$/, ([, c, v], { theme }) => ({
367
- [`grid-${rowCol(c)}`]: theme[`grid${rowColTheme(c)}`]?.[v] ?? utilities.handler.bracket.cssvar.auto(v)
367
+ [`grid-${rowCol(c)}`]: theme[`grid${rowColTheme(c)}`]?.[v] ?? colors.handler.bracket.cssvar.auto(v)
368
368
  })],
369
369
  [/^(?:grid-)?(row|col)-span-(.+)$/, ([, c, s]) => {
370
370
  if (s === "full")
371
371
  return { [`grid-${rowCol(c)}`]: "1/-1" };
372
- const v = utilities.handler.bracket.number(s);
372
+ const v = colors.handler.bracket.number(s);
373
373
  if (v != null)
374
374
  return { [`grid-${rowCol(c)}`]: `span ${v}/span ${v}` };
375
375
  }, { autocomplete: ["grid-(row|col)-span-<num>", "(row|col)-span-<num>"] }],
376
- [/^(?:grid-)?(row|col)-start-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-start`]: utilities.handler.bracket.cssvar(v) ?? v })],
377
- [/^(?:grid-)?(row|col)-end-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-end`]: utilities.handler.bracket.cssvar(v) ?? v })],
378
- [/^(?:grid-)?auto-(rows|cols)-(.+)$/, ([, c, v], { theme }) => ({ [`grid-auto-${rowCol(c)}`]: autoDirection(c, theme, v) })],
379
- [/^(?:grid-auto-flow|auto-flow|grid-flow)-(.+)$/, ([, v]) => ({ "grid-auto-flow": utilities.handler.bracket.cssvar(v) })],
380
- [/^(?:grid-auto-flow|auto-flow|grid-flow)-(row|col|dense|row-dense|col-dense)$/, ([, v]) => ({ "grid-auto-flow": rowCol(v).replace("-", " ") })],
376
+ [/^(?:grid-)?(row|col)-start-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-start`]: colors.handler.bracket.cssvar(v) ?? v })],
377
+ [/^(?:grid-)?(row|col)-end-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-end`]: colors.handler.bracket.cssvar(v) ?? v }), { autocomplete: ["grid-(row|col)-(start|end)-<num>"] }],
378
+ [/^(?:grid-)?auto-(rows|cols)-(.+)$/, ([, c, v], { theme }) => ({ [`grid-auto-${rowCol(c)}`]: autoDirection(c, theme, v) }), { autocomplete: ["grid-auto-(rows|cols)-<num>"] }],
379
+ [/^(?:grid-auto-flow|auto-flow|grid-flow)-(.+)$/, ([, v]) => ({ "grid-auto-flow": colors.handler.bracket.cssvar(v) })],
380
+ [/^(?:grid-auto-flow|auto-flow|grid-flow)-(row|col|dense|row-dense|col-dense)$/, ([, v]) => ({ "grid-auto-flow": rowCol(v).replace("-", " ") }), { autocomplete: ["(grid-auto-flow|auto-flow|grid-flow)-(row|col|dense|row-dense|col-dense)"] }],
381
381
  [/^grid-(rows|cols)-(.+)$/, ([, c, v], { theme }) => ({
382
- [`grid-template-${rowCol(c)}`]: theme[`gridTemplate${rowColTheme(c)}`]?.[v] ?? utilities.handler.bracket.cssvar(v)
382
+ [`grid-template-${rowCol(c)}`]: theme[`gridTemplate${rowColTheme(c)}`]?.[v] ?? colors.handler.bracket.cssvar(v)
383
383
  })],
384
384
  [/^grid-(rows|cols)-minmax-([\w.-]+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(auto-fill,minmax(${d},1fr))` })],
385
- [/^grid-(rows|cols)-(\d+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(${d},minmax(0,1fr))` })],
385
+ [/^grid-(rows|cols)-(\d+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(${d},minmax(0,1fr))` }), { autocomplete: ["grid-(rows|cols)-<num>", "grid-(rows|cols)-none"] }],
386
386
  ["grid-rows-none", { "grid-template-rows": "none" }],
387
387
  ["grid-cols-none", { "grid-template-columns": "none" }]
388
388
  ];
@@ -393,7 +393,7 @@ const overflowValues = [
393
393
  "clip",
394
394
  "visible",
395
395
  "scroll",
396
- ...utilities.globalKeywords
396
+ ...colors.globalKeywords
397
397
  ];
398
398
  const overflows = [
399
399
  [/^(?:overflow|of)-(.+)$/, ([, v]) => overflowValues.includes(v) ? { overflow: v } : void 0, { autocomplete: [`(overflow|of)-(${overflowValues.join("|")})`, `(overflow|of)-(x|y)-(${overflowValues.join("|")})`] }],
@@ -402,7 +402,7 @@ const overflows = [
402
402
 
403
403
  const positions = [
404
404
  [/^(?:position-|pos-)?(relative|absolute|fixed|sticky)$/, ([, v]) => ({ position: v })],
405
- [/^(?:position-|pos-)([-\w]+)$/, ([, v]) => utilities.globalKeywords.includes(v) ? { position: v } : void 0],
405
+ [/^(?:position-|pos-)([-\w]+)$/, ([, v]) => colors.globalKeywords.includes(v) ? { position: v } : void 0],
406
406
  [/^(?:position-|pos-)?(static)$/, ([, v]) => ({ position: v })]
407
407
  ];
408
408
  const justifies = [
@@ -412,21 +412,21 @@ const justifies = [
412
412
  ["justify-between", { "justify-content": "space-between" }],
413
413
  ["justify-around", { "justify-content": "space-around" }],
414
414
  ["justify-evenly", { "justify-content": "space-evenly" }],
415
- ...utilities.makeGlobalStaticRules("justify", "justify-content"),
415
+ ...colors.makeGlobalStaticRules("justify", "justify-content"),
416
416
  ["justify-items-start", { "justify-items": "start" }],
417
417
  ["justify-items-end", { "justify-items": "end" }],
418
418
  ["justify-items-center", { "justify-items": "center" }],
419
419
  ["justify-items-stretch", { "justify-items": "stretch" }],
420
- ...utilities.makeGlobalStaticRules("justify-items"),
420
+ ...colors.makeGlobalStaticRules("justify-items"),
421
421
  ["justify-self-auto", { "justify-self": "auto" }],
422
422
  ["justify-self-start", { "justify-self": "start" }],
423
423
  ["justify-self-end", { "justify-self": "end" }],
424
424
  ["justify-self-center", { "justify-self": "center" }],
425
425
  ["justify-self-stretch", { "justify-self": "stretch" }],
426
- ...utilities.makeGlobalStaticRules("justify-self")
426
+ ...colors.makeGlobalStaticRules("justify-self")
427
427
  ];
428
428
  const orders = [
429
- [/^order-(.+)$/, ([, v]) => ({ order: utilities.handler.bracket.cssvar.number(v) })],
429
+ [/^order-(.+)$/, ([, v]) => ({ order: colors.handler.bracket.cssvar.number(v) })],
430
430
  ["order-first", { order: "-9999" }],
431
431
  ["order-last", { order: "9999" }],
432
432
  ["order-none", { order: "0" }]
@@ -438,20 +438,20 @@ const alignments = [
438
438
  ["content-between", { "align-content": "space-between" }],
439
439
  ["content-around", { "align-content": "space-around" }],
440
440
  ["content-evenly", { "align-content": "space-evenly" }],
441
- ...utilities.makeGlobalStaticRules("content", "align-content"),
441
+ ...colors.makeGlobalStaticRules("content", "align-content"),
442
442
  ["items-start", { "align-items": "flex-start" }],
443
443
  ["items-end", { "align-items": "flex-end" }],
444
444
  ["items-center", { "align-items": "center" }],
445
445
  ["items-baseline", { "align-items": "baseline" }],
446
446
  ["items-stretch", { "align-items": "stretch" }],
447
- ...utilities.makeGlobalStaticRules("items", "align-items"),
447
+ ...colors.makeGlobalStaticRules("items", "align-items"),
448
448
  ["self-auto", { "align-self": "auto" }],
449
449
  ["self-start", { "align-self": "flex-start" }],
450
450
  ["self-end", { "align-self": "flex-end" }],
451
451
  ["self-center", { "align-self": "center" }],
452
452
  ["self-stretch", { "align-self": "stretch" }],
453
453
  ["self-baseline", { "align-self": "baseline" }],
454
- ...utilities.makeGlobalStaticRules("self", "align-self")
454
+ ...colors.makeGlobalStaticRules("self", "align-self")
455
455
  ];
456
456
  const placements = [
457
457
  ["place-content-center", { "place-content": "center" }],
@@ -461,26 +461,26 @@ const placements = [
461
461
  ["place-content-around", { "place-content": "space-around" }],
462
462
  ["place-content-evenly", { "place-content": "space-evenly" }],
463
463
  ["place-content-stretch", { "place-content": "stretch" }],
464
- ...utilities.makeGlobalStaticRules("place-content"),
464
+ ...colors.makeGlobalStaticRules("place-content"),
465
465
  ["place-items-start", { "place-items": "start" }],
466
466
  ["place-items-end", { "place-items": "end" }],
467
467
  ["place-items-center", { "place-items": "center" }],
468
468
  ["place-items-stretch", { "place-items": "stretch" }],
469
- ...utilities.makeGlobalStaticRules("place-items"),
469
+ ...colors.makeGlobalStaticRules("place-items"),
470
470
  ["place-self-auto", { "place-self": "auto" }],
471
471
  ["place-self-start", { "place-self": "start" }],
472
472
  ["place-self-end", { "place-self": "end" }],
473
473
  ["place-self-center", { "place-self": "center" }],
474
474
  ["place-self-stretch", { "place-self": "stretch" }],
475
- ...utilities.makeGlobalStaticRules("place-self")
475
+ ...colors.makeGlobalStaticRules("place-self")
476
476
  ];
477
477
  function handleInsetValue(v, { theme }) {
478
- return theme.spacing?.[v] ?? utilities.handler.bracket.cssvar.global.auto.fraction.rem(v);
478
+ return theme.spacing?.[v] ?? colors.handler.bracket.cssvar.global.auto.fraction.rem(v);
479
479
  }
480
480
  function handleInsetValues([, d, v], ctx) {
481
481
  const r = handleInsetValue(v, ctx);
482
- if (r != null && d in utilities.insetMap)
483
- return utilities.insetMap[d].map((i) => [i.slice(1), r]);
482
+ if (r != null && d in colors.insetMap)
483
+ return colors.insetMap[d].map((i) => [i.slice(1), r]);
484
484
  }
485
485
  const insets = [
486
486
  [
@@ -505,21 +505,21 @@ const floats = [
505
505
  ["float-left", { float: "left" }],
506
506
  ["float-right", { float: "right" }],
507
507
  ["float-none", { float: "none" }],
508
- ...utilities.makeGlobalStaticRules("float"),
508
+ ...colors.makeGlobalStaticRules("float"),
509
509
  ["clear-left", { clear: "left" }],
510
510
  ["clear-right", { clear: "right" }],
511
511
  ["clear-both", { clear: "both" }],
512
512
  ["clear-none", { clear: "none" }],
513
- ...utilities.makeGlobalStaticRules("clear")
513
+ ...colors.makeGlobalStaticRules("clear")
514
514
  ];
515
515
  const zIndexes = [
516
- [/^z([\d.]+)$/, ([, v]) => ({ "z-index": utilities.handler.number(v) })],
517
- [/^z-(.+)$/, ([, v]) => ({ "z-index": utilities.handler.bracket.cssvar.global.auto.number(v) }), { autocomplete: "z-<num>" }]
516
+ [/^z([\d.]+)$/, ([, v]) => ({ "z-index": colors.handler.number(v) })],
517
+ [/^z-(.+)$/, ([, v]) => ({ "z-index": colors.handler.bracket.cssvar.global.auto.number(v) }), { autocomplete: "z-<num>" }]
518
518
  ];
519
519
  const boxSizing = [
520
520
  ["box-border", { "box-sizing": "border-box" }],
521
521
  ["box-content", { "box-sizing": "content-box" }],
522
- ...utilities.makeGlobalStaticRules("box", "box-sizing")
522
+ ...colors.makeGlobalStaticRules("box", "box-sizing")
523
523
  ];
524
524
 
525
525
  const sizeMapping = {
@@ -542,31 +542,29 @@ function getSizeValue(minmax, hw, theme, prop) {
542
542
  case "min":
543
543
  return `${prop}-content`;
544
544
  }
545
- return utilities.handler.bracket.cssvar.global.auto.fraction.rem(prop);
545
+ return colors.handler.bracket.cssvar.global.auto.fraction.rem(prop);
546
546
  }
547
547
  const sizes = [
548
- [
549
- /^(min-|max-)?([wh])-?(.+)$/,
550
- ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }),
551
- {
552
- autocomplete: [
553
- "(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
554
- "(max|min)-(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
555
- ]
556
- }
557
- ],
558
- [
559
- /^(min-|max-)?(block|inline)-(.+)$/,
560
- ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }),
561
- {
562
- autocomplete: [
563
- "(w|h)-(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
564
- "(max|min)-(w|h)-(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
565
- ]
566
- }
567
- ],
568
- [/^(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: utilities.resolveVerticalBreakpoints(context)?.[s] }), { autocomplete: ["h-screen-$verticalBreakpoints", "(min|max)-h-screen-$verticalBreakpoints"] }],
569
- [/^(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: utilities.resolveBreakpoints(context)?.[s] }), { autocomplete: ["w-screen-$breakpoints", "(min|max)-w-screen-$breakpoints"] }]
548
+ [/^(min-|max-)?([wh])-?(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) })],
549
+ [/^(min-|max-)?(block|inline)-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }), {
550
+ autocomplete: [
551
+ "(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
552
+ "(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
553
+ "(max|min)-(w|h|block|inline)",
554
+ "(max|min)-(w|h|block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
555
+ ]
556
+ }],
557
+ [/^(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: colors.resolveVerticalBreakpoints(context)?.[s] })],
558
+ [/^(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: colors.resolveBreakpoints(context)?.[s] }), {
559
+ autocomplete: [
560
+ "(w|h)-screen",
561
+ "(min|max)-(w|h)-screen",
562
+ "h-screen-$verticalBreakpoints",
563
+ "(min|max)-h-screen-$verticalBreakpoints",
564
+ "w-screen-$breakpoints",
565
+ "(min|max)-w-screen-$breakpoints"
566
+ ]
567
+ }]
570
568
  ];
571
569
  function getAspectRatio(prop) {
572
570
  if (/^\d+\/\d+$/.test(prop))
@@ -577,27 +575,27 @@ function getAspectRatio(prop) {
577
575
  case "video":
578
576
  return "16/9";
579
577
  }
580
- return utilities.handler.bracket.cssvar.global.auto.number(prop);
578
+ return colors.handler.bracket.cssvar.global.auto.number(prop);
581
579
  }
582
580
  const aspectRatio = [
583
- [/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video)", "aspect-ratio-(square|video)"] }]
581
+ [/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video|ratio)", "aspect-ratio-(square|video)"] }]
584
582
  ];
585
583
 
586
584
  const paddings = [
587
- [/^pa?()-?(-?.+)$/, utilities.directionSize("padding"), { autocomplete: ["(m|p)<num>", "(m|p)-<num>"] }],
588
- [/^p-?xy()()$/, utilities.directionSize("padding"), { autocomplete: "(m|p)-(xy)" }],
589
- [/^p-?([xy])(?:-?(-?.+))?$/, utilities.directionSize("padding")],
590
- [/^p-?([rltbse])(?:-?(-?.+))?$/, utilities.directionSize("padding"), { autocomplete: "(m|p)<directions>-<num>" }],
591
- [/^p-(block|inline)(?:-(-?.+))?$/, utilities.directionSize("padding"), { autocomplete: "(m|p)-(block|inline)-<num>" }],
592
- [/^p-?([bi][se])(?:-?(-?.+))?$/, utilities.directionSize("padding"), { autocomplete: "(m|p)-(bs|be|is|ie)-<num>" }]
585
+ [/^pa?()-?(-?.+)$/, colors.directionSize("padding"), { autocomplete: ["(m|p)<num>", "(m|p)-<num>"] }],
586
+ [/^p-?xy()()$/, colors.directionSize("padding"), { autocomplete: "(m|p)-(xy)" }],
587
+ [/^p-?([xy])(?:-?(-?.+))?$/, colors.directionSize("padding")],
588
+ [/^p-?([rltbse])(?:-?(-?.+))?$/, colors.directionSize("padding"), { autocomplete: "(m|p)<directions>-<num>" }],
589
+ [/^p-(block|inline)(?:-(-?.+))?$/, colors.directionSize("padding"), { autocomplete: "(m|p)-(block|inline)-<num>" }],
590
+ [/^p-?([bi][se])(?:-?(-?.+))?$/, colors.directionSize("padding"), { autocomplete: "(m|p)-(bs|be|is|ie)-<num>" }]
593
591
  ];
594
592
  const margins = [
595
- [/^ma?()-?(-?.+)$/, utilities.directionSize("margin")],
596
- [/^m-?xy()()$/, utilities.directionSize("margin")],
597
- [/^m-?([xy])(?:-?(-?.+))?$/, utilities.directionSize("margin")],
598
- [/^m-?([rltbse])(?:-?(-?.+))?$/, utilities.directionSize("margin")],
599
- [/^m-(block|inline)(?:-(-?.+))?$/, utilities.directionSize("margin")],
600
- [/^m-?([bi][se])(?:-?(-?.+))?$/, utilities.directionSize("margin")]
593
+ [/^ma?()-?(-?.+)$/, colors.directionSize("margin")],
594
+ [/^m-?xy()()$/, colors.directionSize("margin")],
595
+ [/^m-?([xy])(?:-?(-?.+))?$/, colors.directionSize("margin")],
596
+ [/^m-?([rltbse])(?:-?(-?.+))?$/, colors.directionSize("margin")],
597
+ [/^m-(block|inline)(?:-(-?.+))?$/, colors.directionSize("margin")],
598
+ [/^m-?([bi][se])(?:-?(-?.+))?$/, colors.directionSize("margin")]
601
599
  ];
602
600
 
603
601
  const variablesAbbrMap = {
@@ -619,11 +617,11 @@ const cssVariables = [
619
617
  [/^(.+?)-(\$.+)$/, ([, name, varname]) => {
620
618
  const prop = variablesAbbrMap[name];
621
619
  if (prop)
622
- return { [prop]: utilities.handler.cssvar(varname) };
620
+ return { [prop]: colors.handler.cssvar(varname) };
623
621
  }]
624
622
  ];
625
623
  const cssProperty = [
626
- [/^\[([\w_-]+):([^'"]+)\]$/, ([, prop, value]) => ({ [prop]: utilities.handler.bracket(`[${value}]`) })]
624
+ [/^\[([\w_-]+):([^'"]+)\]$/, ([, prop, value]) => ({ [prop]: colors.handler.bracket(`[${value}]`) })]
627
625
  ];
628
626
 
629
627
  const questionMark = [
@@ -637,13 +635,13 @@ ${constructCSS({ animation: "__un_qm 0.5s ease-in-out alternate infinite" })}`;
637
635
  ]
638
636
  ];
639
637
 
640
- const decorationStyles = ["solid", "double", "dotted", "dashed", "wavy", ...utilities.globalKeywords];
638
+ const decorationStyles = ["solid", "double", "dotted", "dashed", "wavy", ...colors.globalKeywords];
641
639
  const textDecorations = [
642
640
  [/^(?:decoration-)?(underline|overline|line-through)$/, ([, s]) => ({ "text-decoration-line": s }), { autocomplete: "decoration-(underline|overline|line-through)" }],
643
- [/^(?:underline|decoration)-(?:size-)?(.+)$/, ([, s], { theme }) => ({ "text-decoration-thickness": theme.lineWidth?.[s] ?? utilities.handler.bracket.cssvar.global.px(s) }), { autocomplete: "(underline|decoration)-<num>" }],
641
+ [/^(?:underline|decoration)-(?:size-)?(.+)$/, ([, s], { theme }) => ({ "text-decoration-thickness": theme.lineWidth?.[s] ?? colors.handler.bracket.cssvar.global.px(s) }), { autocomplete: "(underline|decoration)-<num>" }],
644
642
  [/^(?:underline|decoration)-(auto|from-font)$/, ([, s]) => ({ "text-decoration-thickness": s }), { autocomplete: "(underline|decoration)-(auto|from-font)" }],
645
643
  [/^(?:underline|decoration)-(.+)$/, (match, ctx) => {
646
- const result = utilities.colorResolver("text-decoration-color", "line")(match, ctx);
644
+ const result = colors.colorResolver("text-decoration-color", "line")(match, ctx);
647
645
  if (result) {
648
646
  return {
649
647
  "-webkit-text-decoration-color": result["text-decoration-color"],
@@ -651,8 +649,8 @@ const textDecorations = [
651
649
  };
652
650
  }
653
651
  }, { autocomplete: "(underline|decoration)-$colors" }],
654
- [/^(?:underline|decoration)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-line-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "(underline|decoration)-(op|opacity)-<percent>" }],
655
- [/^(?:underline|decoration)-offset-(.+)$/, ([, s], { theme }) => ({ "text-underline-offset": theme.lineWidth?.[s] ?? utilities.handler.auto.bracket.cssvar.global.px(s) }), { autocomplete: "(underline|decoration)-(offset)-<num>" }],
652
+ [/^(?:underline|decoration)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-line-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "(underline|decoration)-(op|opacity)-<percent>" }],
653
+ [/^(?:underline|decoration)-offset-(.+)$/, ([, s], { theme }) => ({ "text-underline-offset": theme.lineWidth?.[s] ?? colors.handler.auto.bracket.cssvar.global.px(s) }), { autocomplete: "(underline|decoration)-(offset)-<num>" }],
656
654
  ...decorationStyles.map((v) => [`underline-${v}`, { "text-decoration-style": v }]),
657
655
  ...decorationStyles.map((v) => [`decoration-${v}`, { "text-decoration-style": v }]),
658
656
  ["no-underline", { "text-decoration": "none" }],
@@ -660,14 +658,14 @@ const textDecorations = [
660
658
  ];
661
659
 
662
660
  const svgUtilities = [
663
- [/^fill-(.+)$/, utilities.colorResolver("fill", "fill"), { autocomplete: "fill-$colors" }],
664
- [/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "fill-(op|opacity)-<percent>" }],
661
+ [/^fill-(.+)$/, colors.colorResolver("fill", "fill"), { autocomplete: "fill-$colors" }],
662
+ [/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "fill-(op|opacity)-<percent>" }],
665
663
  ["fill-none", { fill: "none" }],
666
- [/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? utilities.handler.bracket.cssvar.fraction.px.number(s) }), { autocomplete: ["stroke-width-$lineWidth", "stroke-size-$lineWidth"] }],
667
- [/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": utilities.handler.bracket.cssvar.number(s) }), { autocomplete: "stroke-dash-<num>" }],
668
- [/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? utilities.handler.bracket.cssvar.px.numberWithUnit(s) }), { autocomplete: "stroke-offset-$lineWidth" }],
669
- [/^stroke-(.+)$/, utilities.colorResolver("stroke", "stroke"), { autocomplete: "stroke-$colors" }],
670
- [/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "stroke-(op|opacity)-<percent>" }],
664
+ [/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? colors.handler.bracket.cssvar.fraction.px.number(s) }), { autocomplete: ["stroke-width-$lineWidth", "stroke-size-$lineWidth"] }],
665
+ [/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": colors.handler.bracket.cssvar.number(s) }), { autocomplete: "stroke-dash-<num>" }],
666
+ [/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? colors.handler.bracket.cssvar.px.numberWithUnit(s) }), { autocomplete: "stroke-offset-$lineWidth" }],
667
+ [/^stroke-(.+)$/, colors.colorResolver("stroke", "stroke"), { autocomplete: "stroke-$colors" }],
668
+ [/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": colors.handler.bracket.percent(opacity) }), { autocomplete: "stroke-(op|opacity)-<percent>" }],
671
669
  ["stroke-cap-square", { "stroke-linecap": "square" }],
672
670
  ["stroke-cap-round", { "stroke-linecap": "round" }],
673
671
  ["stroke-cap-auto", { "stroke-linecap": "butt" }],
@@ -739,6 +737,7 @@ exports.alignments = alignments;
739
737
  exports.appearance = appearance;
740
738
  exports.aspectRatio = aspectRatio;
741
739
  exports.bgColors = bgColors;
740
+ exports.borderStyles = borderStyles;
742
741
  exports.borders = borders;
743
742
  exports.boxSizing = boxSizing;
744
743
  exports.cssProperty = cssProperty;