@unocss/preset-mini 0.55.0 → 0.55.2

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 (56) hide show
  1. package/dist/colors.cjs +360 -6
  2. package/dist/{colors-dabdd21f.d.ts → colors.d.cts} +3 -2
  3. package/dist/colors.d.mts +354 -0
  4. package/dist/colors.d.ts +353 -2
  5. package/dist/colors.mjs +361 -1
  6. package/dist/index.cjs +12 -12
  7. package/dist/index.d.cts +69 -0
  8. package/dist/index.d.mts +69 -0
  9. package/dist/index.d.ts +6 -6
  10. package/dist/index.mjs +9 -10
  11. package/dist/rules.cjs +928 -48
  12. package/dist/rules.d.cts +133 -0
  13. package/dist/rules.d.mts +133 -0
  14. package/dist/rules.d.ts +1 -1
  15. package/dist/rules.mjs +891 -4
  16. package/dist/{default-1f25a0ae.d.ts → shared/preset-mini.024bdcea.d.ts} +1 -1
  17. package/dist/shared/preset-mini.0a9763df.d.mts +721 -0
  18. package/dist/shared/preset-mini.0fac4963.mjs +320 -0
  19. package/dist/shared/preset-mini.5bfee53b.cjs +344 -0
  20. package/dist/shared/preset-mini.5f54784f.d.mts +71 -0
  21. package/dist/shared/preset-mini.5f54784f.d.ts +71 -0
  22. package/dist/shared/preset-mini.aa3a264b.d.cts +67 -0
  23. package/dist/shared/{preset-mini.a21c5071.cjs → preset-mini.b4ad509c.cjs} +12 -8
  24. package/dist/shared/preset-mini.d69a12a5.d.cts +721 -0
  25. package/dist/{utilities-d496540e.d.ts → shared/preset-mini.e93c20db.d.ts} +1 -1
  26. package/dist/shared/{preset-mini.6c1c8016.mjs → preset-mini.f1fe435e.mjs} +13 -9
  27. package/dist/shared/preset-mini.fc26b619.d.mts +67 -0
  28. package/dist/theme.cjs +308 -34
  29. package/dist/theme.d.cts +264 -0
  30. package/dist/theme.d.mts +264 -0
  31. package/dist/theme.d.ts +5 -5
  32. package/dist/theme.mjs +284 -4
  33. package/dist/utils.cjs +81 -10
  34. package/dist/utils.d.cts +83 -0
  35. package/dist/utils.d.mts +83 -0
  36. package/dist/utils.d.ts +18 -18
  37. package/dist/utils.mjs +81 -3
  38. package/dist/variants.cjs +737 -33
  39. package/dist/variants.d.cts +46 -0
  40. package/dist/variants.d.mts +46 -0
  41. package/dist/variants.d.ts +4 -4
  42. package/dist/variants.mjs +714 -4
  43. package/package.json +3 -3
  44. package/dist/shared/preset-mini.0131b915.mjs +0 -704
  45. package/dist/shared/preset-mini.1c66bf79.mjs +0 -361
  46. package/dist/shared/preset-mini.74f9d55e.mjs +0 -80
  47. package/dist/shared/preset-mini.811eb23d.mjs +0 -681
  48. package/dist/shared/preset-mini.8dd73081.mjs +0 -452
  49. package/dist/shared/preset-mini.9d93761b.cjs +0 -729
  50. package/dist/shared/preset-mini.b8d9397e.cjs +0 -471
  51. package/dist/shared/preset-mini.ce5169f2.cjs +0 -730
  52. package/dist/shared/preset-mini.d778b487.cjs +0 -85
  53. package/dist/shared/preset-mini.de3bd9f7.mjs +0 -284
  54. package/dist/shared/preset-mini.e078d7da.cjs +0 -313
  55. package/dist/shared/preset-mini.f3fc54d2.cjs +0 -363
  56. /package/dist/{types-d991ba46.d.ts → shared/preset-mini.5f54784f.d.cts} +0 -0
@@ -1,452 +0,0 @@
1
- import { d as displays, o as opacity, b as bgColors, c as colorScheme, a as borders, e as contentVisibility, f as contents, t as textOverflows, g as textDecorations, h as textTransforms, i as textAligns, j as textColors, k as fontStyles, l as fontSmoothings, m as boxShadows, r as rings, p as positions, n as cursors, q as appearances, s as pointerEvents, u as resizes, v as verticalAligns, w as userSelects, x as whitespaces, y as breaks, z as overflows, A as outline, B as appearance, C as orders, D as justifies, E as alignments, F as placements, G as flexGridJustifiesAlignments, H as insets, I as floats, J as zIndexes, K as boxSizing, L as transitions, M as transforms, N as willChange, O as contains, P as textWraps } from './preset-mini.811eb23d.mjs';
2
- import { h, s as splitShorthand, c as colorResolver, j as colorableShadows, r as resolveVerticalBreakpoints, l as resolveBreakpoints, o as directionSize } from './preset-mini.6c1c8016.mjs';
3
- import { warnOnce, toArray } from '@unocss/core';
4
-
5
- const containerParent = [
6
- [/^@container(?:\/(\w+))?(?:-(normal))?$/, ([, l, v]) => {
7
- warnOnce("The container query rule is experimental and may not follow semver.");
8
- return {
9
- "container-type": v ?? "inline-size",
10
- "container-name": l
11
- };
12
- }]
13
- ];
14
-
15
- const flex = [
16
- ["flex", { display: "flex" }],
17
- ["inline-flex", { display: "inline-flex" }],
18
- ["flex-inline", { display: "inline-flex" }],
19
- [/^flex-(.*)$/, ([, d]) => ({ flex: h.bracket(d) != null ? h.bracket(d).split(" ").map((e) => h.cssvar.fraction(e) ?? e).join(" ") : h.cssvar.fraction(d) })],
20
- ["flex-1", { flex: "1 1 0%" }],
21
- ["flex-auto", { flex: "1 1 auto" }],
22
- ["flex-initial", { flex: "0 1 auto" }],
23
- ["flex-none", { flex: "none" }],
24
- [/^(?:flex-)?shrink(?:-(.*))?$/, ([, d = ""]) => ({ "flex-shrink": h.bracket.cssvar.number(d) ?? 1 }), { autocomplete: ["flex-shrink-<num>", "shrink-<num>"] }],
25
- [/^(?:flex-)?grow(?:-(.*))?$/, ([, d = ""]) => ({ "flex-grow": h.bracket.cssvar.number(d) ?? 1 }), { autocomplete: ["flex-grow-<num>", "grow-<num>"] }],
26
- [/^(?:flex-)?basis-(.+)$/, ([, d], { theme }) => ({ "flex-basis": theme.spacing?.[d] ?? h.bracket.cssvar.auto.fraction.rem(d) }), { autocomplete: ["flex-basis-$spacing", "basis-$spacing"] }],
27
- ["flex-row", { "flex-direction": "row" }],
28
- ["flex-row-reverse", { "flex-direction": "row-reverse" }],
29
- ["flex-col", { "flex-direction": "column" }],
30
- ["flex-col-reverse", { "flex-direction": "column-reverse" }],
31
- ["flex-wrap", { "flex-wrap": "wrap" }],
32
- ["flex-wrap-reverse", { "flex-wrap": "wrap-reverse" }],
33
- ["flex-nowrap", { "flex-wrap": "nowrap" }]
34
- ];
35
-
36
- function handleLineHeight(s, theme) {
37
- return theme.lineHeight?.[s] || h.bracket.cssvar.global.rem(s);
38
- }
39
- const fonts = [
40
- [
41
- /^text-(.+)$/,
42
- ([, s = "base"], { theme }) => {
43
- const [size, leading] = splitShorthand(s, "length");
44
- const sizePairs = toArray(theme.fontSize?.[size]);
45
- const lineHeight = leading ? handleLineHeight(leading, theme) : void 0;
46
- if (sizePairs?.[0]) {
47
- const [fontSize2, height] = sizePairs;
48
- return {
49
- "font-size": fontSize2,
50
- "line-height": lineHeight ?? height ?? "1"
51
- };
52
- }
53
- const fontSize = h.bracketOfLength.rem(size);
54
- if (lineHeight && fontSize) {
55
- return {
56
- "font-size": fontSize,
57
- "line-height": lineHeight
58
- };
59
- }
60
- return { "font-size": h.bracketOfLength.rem(s) };
61
- },
62
- { autocomplete: "text-$fontSize" }
63
- ],
64
- [/^(?:text|font)-size-(.+)$/, ([, s], { theme }) => {
65
- const themed = toArray(theme.fontSize?.[s]);
66
- const size = themed?.[0] ?? h.bracket.cssvar.global.rem(s);
67
- if (size != null)
68
- return { "font-size": size };
69
- }, { autocomplete: "text-size-$fontSize" }],
70
- [
71
- /^(?:font|fw)-?([^-]+)$/,
72
- ([, s], { theme }) => ({ "font-weight": theme.fontWeight?.[s] || h.bracket.global.number(s) }),
73
- {
74
- autocomplete: [
75
- "(font|fw)-(100|200|300|400|500|600|700|800|900)",
76
- "(font|fw)-$fontWeight"
77
- ]
78
- }
79
- ],
80
- [
81
- /^(?:font-)?(?:leading|lh|line-height)-(.+)$/,
82
- ([, s], { theme }) => ({ "line-height": handleLineHeight(s, theme) }),
83
- { autocomplete: "(leading|lh|line-height)-$lineHeight" }
84
- ],
85
- ["font-synthesis-weight", { "font-synthesis": "weight" }],
86
- ["font-synthesis-style", { "font-synthesis": "style" }],
87
- ["font-synthesis-small-caps", { "font-synthesis": "small-caps" }],
88
- ["font-synthesis-none", { "font-synthesis": "none" }],
89
- [/^font-synthesis-(.+)$/, ([, s]) => ({ "font-synthesis": h.bracket.cssvar.global(s) })],
90
- [
91
- /^(?:font-)?tracking-(.+)$/,
92
- ([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] || h.bracket.cssvar.global.rem(s) }),
93
- { autocomplete: "tracking-$letterSpacing" }
94
- ],
95
- [
96
- /^(?:font-)?word-spacing-(.+)$/,
97
- ([, s], { theme }) => ({ "word-spacing": theme.wordSpacing?.[s] || h.bracket.cssvar.global.rem(s) }),
98
- { autocomplete: "word-spacing-$wordSpacing" }
99
- ],
100
- [
101
- /^font-(.+)$/,
102
- ([, d], { theme }) => ({ "font-family": theme.fontFamily?.[d] || h.bracket.cssvar.global(d) }),
103
- { autocomplete: "font-$fontFamily" }
104
- ]
105
- ];
106
- const tabSizes = [
107
- [/^tab(?:-(.+))?$/, ([, s]) => {
108
- const v = h.bracket.cssvar.global.number(s || "4");
109
- if (v != null) {
110
- return {
111
- "-moz-tab-size": v,
112
- "-o-tab-size": v,
113
- "tab-size": v
114
- };
115
- }
116
- }]
117
- ];
118
- const textIndents = [
119
- [/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] || h.bracket.cssvar.global.fraction.rem(s) }), { autocomplete: "indent-$textIndent" }]
120
- ];
121
- const textStrokes = [
122
- [/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] || h.bracket.cssvar.px(s) }), { autocomplete: "text-stroke-$textStrokeWidth" }],
123
- [/^text-stroke-(.+)$/, colorResolver("-webkit-text-stroke-color", "text-stroke"), { autocomplete: "text-stroke-$colors" }],
124
- [/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "text-stroke-(op|opacity)-<percent>" }]
125
- ];
126
- const textShadows = [
127
- [/^text-shadow(?:-(.+))?$/, ([, s], { theme }) => {
128
- const v = theme.textShadow?.[s || "DEFAULT"];
129
- if (v != null) {
130
- return {
131
- "--un-text-shadow": colorableShadows(v, "--un-text-shadow-color").join(","),
132
- "text-shadow": "var(--un-text-shadow)"
133
- };
134
- }
135
- return { "text-shadow": h.bracket.cssvar.global(s) };
136
- }, { autocomplete: "text-shadow-$textShadow" }],
137
- [/^text-shadow-color-(.+)$/, colorResolver("--un-text-shadow-color", "text-shadow"), { autocomplete: "text-shadow-color-$colors" }],
138
- [/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "text-shadow-color-(op|opacity)-<percent>" }]
139
- ];
140
-
141
- const directions = {
142
- "": "",
143
- "x": "column-",
144
- "y": "row-"
145
- };
146
- function handleGap([, d = "", s], { theme }) {
147
- const v = theme.spacing?.[s] ?? h.bracket.cssvar.global.rem(s);
148
- if (v != null) {
149
- return {
150
- [`${directions[d]}gap`]: v
151
- };
152
- }
153
- }
154
- const gaps = [
155
- [/^(?:flex-|grid-)?gap-?()(.+)$/, handleGap, { autocomplete: ["gap-$spacing", "gap-<num>"] }],
156
- [/^(?:flex-|grid-)?gap-([xy])-?(.+)$/, handleGap, { autocomplete: ["gap-(x|y)-$spacing", "gap-(x|y)-<num>"] }]
157
- ];
158
-
159
- function rowCol(s) {
160
- return s.replace("col", "column");
161
- }
162
- function rowColTheme(s) {
163
- return s[0] === "r" ? "Row" : "Column";
164
- }
165
- function autoDirection(c, theme, prop) {
166
- const v = theme[`gridAuto${rowColTheme(c)}`]?.[prop];
167
- if (v != null)
168
- return v;
169
- switch (prop) {
170
- case "min":
171
- return "min-content";
172
- case "max":
173
- return "max-content";
174
- case "fr":
175
- return "minmax(0,1fr)";
176
- }
177
- return h.bracket.cssvar.auto.rem(prop);
178
- }
179
- const grids = [
180
- ["grid", { display: "grid" }],
181
- ["inline-grid", { display: "inline-grid" }],
182
- [/^(?:grid-)?(row|col)-(.+)$/, ([, c, v], { theme }) => ({
183
- [`grid-${rowCol(c)}`]: theme[`grid${rowColTheme(c)}`]?.[v] ?? h.bracket.cssvar.auto(v)
184
- })],
185
- [/^(?:grid-)?(row|col)-span-(.+)$/, ([, c, s]) => {
186
- if (s === "full")
187
- return { [`grid-${rowCol(c)}`]: "1/-1" };
188
- const v = h.bracket.number(s);
189
- if (v != null)
190
- return { [`grid-${rowCol(c)}`]: `span ${v}/span ${v}` };
191
- }, { autocomplete: ["grid-(row|col)-span-<num>", "(row|col)-span-<num>"] }],
192
- [/^(?:grid-)?(row|col)-start-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-start`]: h.bracket.cssvar(v) ?? v })],
193
- [/^(?:grid-)?(row|col)-end-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-end`]: h.bracket.cssvar(v) ?? v }), { autocomplete: ["grid-(row|col)-(start|end)-<num>"] }],
194
- [/^(?:grid-)?auto-(rows|cols)-(.+)$/, ([, c, v], { theme }) => ({ [`grid-auto-${rowCol(c)}`]: autoDirection(c, theme, v) }), { autocomplete: ["grid-auto-(rows|cols)-<num>"] }],
195
- [/^(?:grid-auto-flow|auto-flow|grid-flow)-(.+)$/, ([, v]) => ({ "grid-auto-flow": h.bracket.cssvar(v) })],
196
- [/^(?: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)"] }],
197
- [/^grid-(rows|cols)-(.+)$/, ([, c, v], { theme }) => ({
198
- [`grid-template-${rowCol(c)}`]: theme[`gridTemplate${rowColTheme(c)}`]?.[v] ?? h.bracket.cssvar(v)
199
- })],
200
- [/^grid-(rows|cols)-minmax-([\w.-]+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(auto-fill,minmax(${d},1fr))` })],
201
- [/^grid-(rows|cols)-(\d+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(${d},minmax(0,1fr))` }), { autocomplete: ["grid-(rows|cols)-<num>", "grid-(rows|cols)-none"] }],
202
- [/^grid-area(s)?-(.+)$/, ([, s, v]) => {
203
- if (s != null)
204
- return { "grid-template-areas": h.cssvar(v) ?? v.split("-").map((s2) => `"${h.bracket(s2)}"`).join(" ") };
205
- return { "grid-area": h.bracket.cssvar(v) };
206
- }],
207
- ["grid-rows-none", { "grid-template-rows": "none" }],
208
- ["grid-cols-none", { "grid-template-columns": "none" }]
209
- ];
210
-
211
- const sizeMapping = {
212
- h: "height",
213
- w: "width",
214
- inline: "inline-size",
215
- block: "block-size"
216
- };
217
- function getPropName(minmax, hw) {
218
- return `${minmax || ""}${sizeMapping[hw]}`;
219
- }
220
- function getSizeValue(minmax, hw, theme, prop) {
221
- const str = getPropName(minmax, hw).replace(/-(\w)/g, (_, p) => p.toUpperCase());
222
- const v = theme[str]?.[prop];
223
- if (v != null)
224
- return v;
225
- switch (prop) {
226
- case "fit":
227
- case "max":
228
- case "min":
229
- return `${prop}-content`;
230
- }
231
- return h.bracket.cssvar.global.auto.fraction.rem(prop);
232
- }
233
- const sizes = [
234
- [/^(?:size-)?(min-|max-)?([wh])-?(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) })],
235
- [/^(?:size-)?(min-|max-)?(block|inline)-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }), {
236
- autocomplete: [
237
- "(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
238
- "(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
239
- "(max|min)-(w|h|block|inline)",
240
- "(max|min)-(w|h|block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
241
- "(w|h)-full",
242
- "(max|min)-(w|h)-full"
243
- ]
244
- }],
245
- [/^(?:size-)?(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: resolveVerticalBreakpoints(context)?.[s] })],
246
- [/^(?:size-)?(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: resolveBreakpoints(context)?.[s] }), {
247
- autocomplete: [
248
- "(w|h)-screen",
249
- "(min|max)-(w|h)-screen",
250
- "h-screen-$verticalBreakpoints",
251
- "(min|max)-h-screen-$verticalBreakpoints",
252
- "w-screen-$breakpoints",
253
- "(min|max)-w-screen-$breakpoints"
254
- ]
255
- }]
256
- ];
257
- function getAspectRatio(prop) {
258
- if (/^\d+\/\d+$/.test(prop))
259
- return prop;
260
- switch (prop) {
261
- case "square":
262
- return "1/1";
263
- case "video":
264
- return "16/9";
265
- }
266
- return h.bracket.cssvar.global.auto.number(prop);
267
- }
268
- const aspectRatio = [
269
- [/^(?:size-)?aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video|ratio)", "aspect-ratio-(square|video)"] }]
270
- ];
271
-
272
- const paddings = [
273
- [/^pa?()-?(-?.+)$/, directionSize("padding"), { autocomplete: ["(m|p)<num>", "(m|p)-<num>"] }],
274
- [/^p-?xy()()$/, directionSize("padding"), { autocomplete: "(m|p)-(xy)" }],
275
- [/^p-?([xy])(?:-?(-?.+))?$/, directionSize("padding")],
276
- [/^p-?([rltbse])(?:-?(-?.+))?$/, directionSize("padding"), { autocomplete: "(m|p)<directions>-<num>" }],
277
- [/^p-(block|inline)(?:-(-?.+))?$/, directionSize("padding"), { autocomplete: "(m|p)-(block|inline)-<num>" }],
278
- [/^p-?([bi][se])(?:-?(-?.+))?$/, directionSize("padding"), { autocomplete: "(m|p)-(bs|be|is|ie)-<num>" }]
279
- ];
280
- const margins = [
281
- [/^ma?()-?(-?.+)$/, directionSize("margin")],
282
- [/^m-?xy()()$/, directionSize("margin")],
283
- [/^m-?([xy])(?:-?(-?.+))?$/, directionSize("margin")],
284
- [/^m-?([rltbse])(?:-?(-?.+))?$/, directionSize("margin")],
285
- [/^m-(block|inline)(?:-(-?.+))?$/, directionSize("margin")],
286
- [/^m-?([bi][se])(?:-?(-?.+))?$/, directionSize("margin")]
287
- ];
288
-
289
- const variablesAbbrMap = {
290
- backface: "backface-visibility",
291
- break: "word-break",
292
- case: "text-transform",
293
- content: "align-content",
294
- fw: "font-weight",
295
- items: "align-items",
296
- justify: "justify-content",
297
- select: "user-select",
298
- self: "align-self",
299
- vertical: "vertical-align",
300
- visible: "visibility",
301
- whitespace: "white-space",
302
- ws: "white-space"
303
- };
304
- const cssVariables = [
305
- [/^(.+?)-(\$.+)$/, ([, name, varname]) => {
306
- const prop = variablesAbbrMap[name];
307
- if (prop)
308
- return { [prop]: h.cssvar(varname) };
309
- }]
310
- ];
311
- const cssProperty = [
312
- [/^\[(.*)\]$/, ([_, body]) => {
313
- if (!body.includes(":"))
314
- return;
315
- const [prop, ...rest] = body.split(":");
316
- const value = rest.join(":");
317
- if (!isURI(body) && prop.match(/^[a-z-]+$/) && isValidCSSBody(value)) {
318
- const parsed = h.bracket(`[${value}]`);
319
- if (parsed)
320
- return { [prop]: parsed };
321
- }
322
- }]
323
- ];
324
- function isValidCSSBody(body) {
325
- let i = 0;
326
- function findUntil(c) {
327
- while (i < body.length) {
328
- i += 1;
329
- const char = body[i];
330
- if (char === c)
331
- return true;
332
- }
333
- return false;
334
- }
335
- for (i = 0; i < body.length; i++) {
336
- const c = body[i];
337
- if ("\"`'".includes(c)) {
338
- if (!findUntil(c))
339
- return false;
340
- } else if (c === "(") {
341
- if (!findUntil(")"))
342
- return false;
343
- } else if ("[]{}:".includes(c)) {
344
- return false;
345
- }
346
- }
347
- return true;
348
- }
349
- function isURI(declaration) {
350
- if (!declaration.includes("://"))
351
- return false;
352
- try {
353
- return new URL(declaration).host !== "";
354
- } catch (err) {
355
- return false;
356
- }
357
- }
358
-
359
- const questionMark = [
360
- [
361
- /^(where|\?)$/,
362
- (_, { constructCSS, generator }) => {
363
- if (generator.userConfig.envMode === "dev")
364
- return `@keyframes __un_qm{0%{box-shadow:inset 4px 4px #ff1e90, inset -4px -4px #ff1e90}100%{box-shadow:inset 8px 8px #3399ff, inset -8px -8px #3399ff}}
365
- ${constructCSS({ animation: "__un_qm 0.5s ease-in-out alternate infinite" })}`;
366
- }
367
- ]
368
- ];
369
-
370
- const svgUtilities = [
371
- [/^fill-(.+)$/, colorResolver("fill", "fill"), { autocomplete: "fill-$colors" }],
372
- [/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "fill-(op|opacity)-<percent>" }],
373
- ["fill-none", { fill: "none" }],
374
- [/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? h.bracket.cssvar.fraction.px.number(s) }), { autocomplete: ["stroke-width-$lineWidth", "stroke-size-$lineWidth"] }],
375
- [/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": h.bracket.cssvar.number(s) }), { autocomplete: "stroke-dash-<num>" }],
376
- [/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? h.bracket.cssvar.px.numberWithUnit(s) }), { autocomplete: "stroke-offset-$lineWidth" }],
377
- [/^stroke-(.+)$/, colorResolver("stroke", "stroke"), { autocomplete: "stroke-$colors" }],
378
- [/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "stroke-(op|opacity)-<percent>" }],
379
- ["stroke-cap-square", { "stroke-linecap": "square" }],
380
- ["stroke-cap-round", { "stroke-linecap": "round" }],
381
- ["stroke-cap-auto", { "stroke-linecap": "butt" }],
382
- ["stroke-join-arcs", { "stroke-linejoin": "arcs" }],
383
- ["stroke-join-bevel", { "stroke-linejoin": "bevel" }],
384
- ["stroke-join-clip", { "stroke-linejoin": "miter-clip" }],
385
- ["stroke-join-round", { "stroke-linejoin": "round" }],
386
- ["stroke-join-auto", { "stroke-linejoin": "miter" }],
387
- ["stroke-none", { stroke: "none" }]
388
- ];
389
-
390
- const rules = [
391
- cssVariables,
392
- cssProperty,
393
- paddings,
394
- margins,
395
- displays,
396
- opacity,
397
- bgColors,
398
- colorScheme,
399
- svgUtilities,
400
- borders,
401
- contentVisibility,
402
- contents,
403
- fonts,
404
- tabSizes,
405
- textIndents,
406
- textOverflows,
407
- textDecorations,
408
- textStrokes,
409
- textShadows,
410
- textTransforms,
411
- textAligns,
412
- textColors,
413
- fontStyles,
414
- fontSmoothings,
415
- boxShadows,
416
- rings,
417
- flex,
418
- grids,
419
- gaps,
420
- positions,
421
- sizes,
422
- aspectRatio,
423
- cursors,
424
- appearances,
425
- pointerEvents,
426
- resizes,
427
- verticalAligns,
428
- userSelects,
429
- whitespaces,
430
- breaks,
431
- overflows,
432
- outline,
433
- appearance,
434
- orders,
435
- justifies,
436
- alignments,
437
- placements,
438
- flexGridJustifiesAlignments,
439
- insets,
440
- floats,
441
- zIndexes,
442
- boxSizing,
443
- transitions,
444
- transforms,
445
- willChange,
446
- containerParent,
447
- contains,
448
- textWraps,
449
- questionMark
450
- ].flat(1);
451
-
452
- export { grids as a, aspectRatio as b, containerParent as c, svgUtilities as d, fonts as e, flex as f, gaps as g, textIndents as h, textStrokes as i, textShadows as j, cssVariables as k, cssProperty as l, margins as m, paddings as p, questionMark as q, rules as r, sizes as s, tabSizes as t };