@unocss/preset-mini 0.50.6 → 0.50.8

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 (33) hide show
  1. package/README.md +2 -126
  2. package/dist/{colors-fdadc382.d.ts → colors-e683aa85.d.ts} +24 -0
  3. package/dist/colors.cjs +1 -1
  4. package/dist/colors.d.ts +1 -1
  5. package/dist/colors.mjs +1 -1
  6. package/dist/{default-be74c37e.d.ts → default-d9218dd5.d.ts} +24 -0
  7. package/dist/index.cjs +8 -8
  8. package/dist/index.d.ts +3 -3
  9. package/dist/index.mjs +9 -9
  10. package/dist/rules.cjs +2 -2
  11. package/dist/rules.mjs +2 -2
  12. package/dist/shared/{preset-mini.fc0fd434.cjs → preset-mini.2c84a1da.cjs} +2 -2
  13. package/dist/shared/{preset-mini.2f75df7e.cjs → preset-mini.4b2d3970.cjs} +12 -8
  14. package/dist/shared/{preset-mini.305062ab.mjs → preset-mini.6c20780a.mjs} +8 -8
  15. package/dist/shared/{preset-mini.65ac75be.mjs → preset-mini.74b45c11.mjs} +48 -24
  16. package/dist/shared/{preset-mini.761cdd48.mjs → preset-mini.94514c53.mjs} +42 -39
  17. package/dist/shared/{preset-mini.ef35a101.cjs → preset-mini.a8322582.cjs} +73 -69
  18. package/dist/shared/{preset-mini.be40d10c.mjs → preset-mini.b53c93f8.mjs} +12 -8
  19. package/dist/shared/{preset-mini.9d7e4452.mjs → preset-mini.b68b942d.mjs} +73 -69
  20. package/dist/shared/{preset-mini.30606736.cjs → preset-mini.bb7dc365.cjs} +48 -24
  21. package/dist/shared/{preset-mini.4a5aade9.cjs → preset-mini.c4fc86b9.cjs} +8 -8
  22. package/dist/shared/{preset-mini.f9468448.mjs → preset-mini.d3cd9ef2.mjs} +2 -2
  23. package/dist/shared/{preset-mini.e96e6b4a.cjs → preset-mini.fea712fb.cjs} +42 -39
  24. package/dist/theme.cjs +3 -3
  25. package/dist/theme.d.ts +2 -2
  26. package/dist/theme.mjs +3 -3
  27. package/dist/utils.cjs +1 -1
  28. package/dist/utils.d.ts +4 -4
  29. package/dist/utils.mjs +1 -1
  30. package/dist/variants.cjs +2 -2
  31. package/dist/variants.d.ts +10 -10
  32. package/dist/variants.mjs +2 -2
  33. package/package.json +2 -2
@@ -2,7 +2,7 @@
2
2
 
3
3
  const colors = require('./preset-mini.2be263e2.cjs');
4
4
  const core = require('@unocss/core');
5
- const variants$1 = require('./preset-mini.4a5aade9.cjs');
5
+ const variants$1 = require('./preset-mini.c4fc86b9.cjs');
6
6
 
7
7
  const variantAria = {
8
8
  name: "aria",
@@ -21,13 +21,13 @@ const variantAria = {
21
21
  }
22
22
  };
23
23
 
24
- const calcMaxWidthBySize = (size) => {
24
+ function calcMaxWidthBySize(size) {
25
25
  const value = size.match(/^-?[0-9]+\.?[0-9]*/)?.[0] || "";
26
26
  const unit = size.slice(value.length);
27
27
  const maxWidth = parseFloat(value) - 0.1;
28
28
  return Number.isNaN(maxWidth) ? size : `${maxWidth}${unit}`;
29
- };
30
- const variantBreakpoints = () => {
29
+ }
30
+ function variantBreakpoints() {
31
31
  const regexCache = {};
32
32
  return {
33
33
  name: "breakpoints",
@@ -81,35 +81,37 @@ const variantBreakpoints = () => {
81
81
  multiPass: true,
82
82
  autocomplete: "(at-|lt-|)$breakpoints:"
83
83
  };
84
- };
84
+ }
85
85
 
86
- const scopeMatcher = (name, combinator) => ({
87
- name: `combinator:${name}`,
88
- match(matcher, ctx) {
89
- if (!matcher.startsWith(name))
90
- return;
91
- const separators = ctx.generator.config.separators;
92
- let body = variants$1.variantGetBracket(`${name}-`, matcher, separators);
93
- if (!body) {
94
- for (const separator of separators) {
95
- if (matcher.startsWith(`${name}${separator}`)) {
96
- body = ["", matcher.slice(name.length + separator.length)];
97
- break;
86
+ function scopeMatcher(name, combinator) {
87
+ return {
88
+ name: `combinator:${name}`,
89
+ match(matcher, ctx) {
90
+ if (!matcher.startsWith(name))
91
+ return;
92
+ const separators = ctx.generator.config.separators;
93
+ let body = variants$1.variantGetBracket(`${name}-`, matcher, separators);
94
+ if (!body) {
95
+ for (const separator of separators) {
96
+ if (matcher.startsWith(`${name}${separator}`)) {
97
+ body = ["", matcher.slice(name.length + separator.length)];
98
+ break;
99
+ }
98
100
  }
101
+ if (!body)
102
+ return;
99
103
  }
100
- if (!body)
101
- return;
102
- }
103
- let bracketValue = colors.handler.bracket(body[0]) ?? "";
104
- if (bracketValue === "")
105
- bracketValue = "*";
106
- return {
107
- matcher: body[1],
108
- selector: (s) => `${s}${combinator}${bracketValue}`
109
- };
110
- },
111
- multiPass: true
112
- });
104
+ let bracketValue = colors.handler.bracket(body[0]) ?? "";
105
+ if (bracketValue === "")
106
+ bracketValue = "*";
107
+ return {
108
+ matcher: body[1],
109
+ selector: (s) => `${s}${combinator}${bracketValue}`
110
+ };
111
+ },
112
+ multiPass: true
113
+ };
114
+ }
113
115
  const variantCombinators = [
114
116
  scopeMatcher("all", " "),
115
117
  scopeMatcher("children", ">"),
@@ -150,7 +152,7 @@ const variantContainerQuery = {
150
152
  multiPass: true
151
153
  };
152
154
 
153
- const variantColorsMediaOrClass = (options = {}) => {
155
+ function variantColorsMediaOrClass(options = {}) {
154
156
  if (options?.dark === "class" || typeof options.dark === "object") {
155
157
  const { dark = ".dark", light = ".light" } = typeof options.dark === "string" ? {} : options.dark;
156
158
  return [
@@ -162,7 +164,7 @@ const variantColorsMediaOrClass = (options = {}) => {
162
164
  variants$1.variantParentMatcher("dark", "@media (prefers-color-scheme: dark)"),
163
165
  variants$1.variantParentMatcher("light", "@media (prefers-color-scheme: light)")
164
166
  ];
165
- };
167
+ }
166
168
 
167
169
  const variantDataAttribute = {
168
170
  name: "data",
@@ -296,14 +298,14 @@ const numberRE = /[0-9.]+(?:[a-z]+|%)?/;
296
298
  const ignoreProps = [
297
299
  /opacity|color|flex/
298
300
  ];
299
- const negateFunctions = (value) => {
301
+ function negateFunctions(value) {
300
302
  const match = value.match(/^(calc|clamp|max|min)\s*(\(.*)/);
301
303
  if (match) {
302
304
  const [fnBody, rest] = colors.getComponent(match[2], "(", ")", " ") ?? [];
303
305
  if (fnBody)
304
306
  return `calc(${match[1]}${fnBody} * -1)${rest ? ` ${rest}` : ""}`;
305
307
  }
306
- };
308
+ }
307
309
  const variantNegative = {
308
310
  name: "negative",
309
311
  match(matcher) {
@@ -338,7 +340,7 @@ const variantNegative = {
338
340
  }
339
341
  };
340
342
 
341
- const variantImportant = () => {
343
+ function variantImportant() {
342
344
  let re;
343
345
  return {
344
346
  name: "important",
@@ -365,7 +367,7 @@ const variantImportant = () => {
365
367
  }
366
368
  }
367
369
  };
368
- };
370
+ }
369
371
 
370
372
  const variantPrint = variants$1.variantParentMatcher("print", "@media print");
371
373
  const variantCustomMedia = {
@@ -474,15 +476,15 @@ const PseudoClassFunctions = [
474
476
  const PseudoClassesStr = Object.entries(PseudoClasses).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).join("|");
475
477
  const PseudoClassesColonStr = Object.entries(PseudoClassesColon).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).join("|");
476
478
  const PseudoClassFunctionsStr = PseudoClassFunctions.join("|");
477
- const pseudoModifier = (pseudo) => {
479
+ function pseudoModifier(pseudo) {
478
480
  if (pseudo === "active") {
479
481
  return {
480
482
  sort: 1,
481
483
  noMerge: true
482
484
  };
483
485
  }
484
- };
485
- const taggedPseudoClassMatcher = (tag, parent, combinator) => {
486
+ }
487
+ function taggedPseudoClassMatcher(tag, parent, combinator) {
486
488
  const rawRE = new RegExp(`^(${core.escapeRegExp(parent)}:)(\\S+)${core.escapeRegExp(combinator)}\\1`);
487
489
  let splitRE;
488
490
  let pseudoRE;
@@ -546,7 +548,7 @@ const taggedPseudoClassMatcher = (tag, parent, combinator) => {
546
548
  },
547
549
  multiPass: true
548
550
  };
549
- };
551
+ }
550
552
  const excludedPseudo = [
551
553
  "::-webkit-resizer",
552
554
  "::-webkit-scrollbar",
@@ -559,7 +561,7 @@ const excludedPseudo = [
559
561
  ];
560
562
  const PseudoClassesAndElementsStr = Object.entries(PseudoClasses).map(([key]) => key).join("|");
561
563
  const PseudoClassesAndElementsColonStr = Object.entries(PseudoClassesColon).map(([key]) => key).join("|");
562
- const variantPseudoClassesAndElements = () => {
564
+ function variantPseudoClassesAndElements() {
563
565
  let PseudoClassesAndElementsRE;
564
566
  let PseudoClassesAndElementsColonRE;
565
567
  return {
@@ -592,8 +594,8 @@ const variantPseudoClassesAndElements = () => {
592
594
  multiPass: true,
593
595
  autocomplete: `(${PseudoClassesAndElementsStr}|${PseudoClassesAndElementsColonStr}):`
594
596
  };
595
- };
596
- const variantPseudoClassFunctions = () => {
597
+ }
598
+ function variantPseudoClassFunctions() {
597
599
  let PseudoClassFunctionsRE;
598
600
  let PseudoClassColonFunctionsRE;
599
601
  return {
@@ -615,8 +617,8 @@ const variantPseudoClassFunctions = () => {
615
617
  multiPass: true,
616
618
  autocomplete: `(${PseudoClassFunctionsStr})-(${PseudoClassesStr}|${PseudoClassesColonStr}):`
617
619
  };
618
- };
619
- const variantTaggedPseudoClasses = (options = {}) => {
620
+ }
621
+ function variantTaggedPseudoClasses(options = {}) {
620
622
  const attributify = !!options?.attributifyPseudo;
621
623
  return [
622
624
  taggedPseudoClassMatcher("group", attributify ? '[group=""]' : ".group", " "),
@@ -624,7 +626,7 @@ const variantTaggedPseudoClasses = (options = {}) => {
624
626
  taggedPseudoClassMatcher("parent", attributify ? '[parent=""]' : ".parent", ">"),
625
627
  taggedPseudoClassMatcher("previous", attributify ? '[previous=""]' : ".previous", "+")
626
628
  ];
627
- };
629
+ }
628
630
  const PartClassesRE = /(part-\[(.+)]:)(.+)/;
629
631
  const partClasses = {
630
632
  match(input) {
@@ -640,29 +642,31 @@ const partClasses = {
640
642
  multiPass: true
641
643
  };
642
644
 
643
- const variants = (options) => [
644
- variantAria,
645
- variantDataAttribute,
646
- variantCssLayer,
647
- variantSelector,
648
- variantInternalLayer,
649
- variantNegative,
650
- variantImportant(),
651
- variantSupports,
652
- variantPrint,
653
- variantCustomMedia,
654
- variantBreakpoints(),
655
- ...variantCombinators,
656
- variantPseudoClassesAndElements(),
657
- variantPseudoClassFunctions(),
658
- ...variantTaggedPseudoClasses(options),
659
- partClasses,
660
- ...variantColorsMediaOrClass(options),
661
- ...variantLanguageDirections,
662
- variantScope,
663
- variantContainerQuery,
664
- variantVariables
665
- ];
645
+ function variants(options) {
646
+ return [
647
+ variantAria,
648
+ variantDataAttribute,
649
+ variantCssLayer,
650
+ variantSelector,
651
+ variantInternalLayer,
652
+ variantNegative,
653
+ variantImportant(),
654
+ variantSupports,
655
+ variantPrint,
656
+ variantCustomMedia,
657
+ variantBreakpoints(),
658
+ ...variantCombinators,
659
+ variantPseudoClassesAndElements(),
660
+ variantPseudoClassFunctions(),
661
+ ...variantTaggedPseudoClasses(options),
662
+ partClasses,
663
+ ...variantColorsMediaOrClass(options),
664
+ ...variantLanguageDirections,
665
+ variantScope,
666
+ variantContainerQuery,
667
+ variantVariables
668
+ ];
669
+ }
666
670
 
667
671
  exports.calcMaxWidthBySize = calcMaxWidthBySize;
668
672
  exports.partClasses = partClasses;
@@ -1,4 +1,4 @@
1
- import { d as displays, o as opacity, b as bgColors, a as borders, c as contentVisibility, e as contents, f as fonts, t as tabSizes, g as textIndents, h as textOverflows, i as textDecorations, j as textStrokes, k as textShadows, l as textTransforms, m as textAligns, n as textColors, p as fontStyles, q as fontSmoothings, r as boxShadows, s as rings, u as positions, v as cursors, w as appearances, x as pointerEvents, y as resizes, z as verticalAligns, A as userSelects, B as whitespaces, C as breaks, D as overflows, E as outline, F as appearance, G as orders, H as justifies, I as alignments, J as placements, K as insets, L as floats, M as zIndexes, N as boxSizing, O as transitions, P as transforms, Q as willChange, R as contains } from './preset-mini.761cdd48.mjs';
1
+ import { d as displays, o as opacity, b as bgColors, a as borders, c as contentVisibility, e as contents, f as fonts, t as tabSizes, g as textIndents, h as textOverflows, i as textDecorations, j as textStrokes, k as textShadows, l as textTransforms, m as textAligns, n as textColors, p as fontStyles, q as fontSmoothings, r as boxShadows, s as rings, u as positions, v as cursors, w as appearances, x as pointerEvents, y as resizes, z as verticalAligns, A as userSelects, B as whitespaces, C as breaks, D as overflows, E as outline, F as appearance, G as orders, H as justifies, I as alignments, J as placements, K as insets, L as floats, M as zIndexes, N as boxSizing, O as transitions, P as transforms, Q as willChange, R as contains } from './preset-mini.94514c53.mjs';
2
2
  import { h as handler, r as resolveVerticalBreakpoints, l as resolveBreakpoints, o as directionSize, c as colorResolver } from './preset-mini.617e6696.mjs';
3
3
  import { warnOnce } from '@unocss/core';
4
4
 
@@ -38,7 +38,7 @@ const directions = {
38
38
  "x": "column-",
39
39
  "y": "row-"
40
40
  };
41
- const handleGap = ([, d = "", s], { theme }) => {
41
+ function handleGap([, d = "", s], { theme }) {
42
42
  const v = theme.spacing?.[s] ?? handler.bracket.cssvar.global.rem(s);
43
43
  if (v != null) {
44
44
  return {
@@ -46,15 +46,19 @@ const handleGap = ([, d = "", s], { theme }) => {
46
46
  [`${directions[d]}gap`]: v
47
47
  };
48
48
  }
49
- };
49
+ }
50
50
  const gaps = [
51
51
  [/^(?:flex-|grid-)?gap-?()(.+)$/, handleGap, { autocomplete: ["gap-$spacing", "gap-<num>"] }],
52
52
  [/^(?:flex-|grid-)?gap-([xy])-?(.+)$/, handleGap, { autocomplete: ["gap-(x|y)-$spacing", "gap-(x|y)-<num>"] }]
53
53
  ];
54
54
 
55
- const rowCol = (s) => s.replace("col", "column");
56
- const rowColTheme = (s) => s[0] === "r" ? "Row" : "Column";
57
- const autoDirection = (c, theme, prop) => {
55
+ function rowCol(s) {
56
+ return s.replace("col", "column");
57
+ }
58
+ function rowColTheme(s) {
59
+ return s[0] === "r" ? "Row" : "Column";
60
+ }
61
+ function autoDirection(c, theme, prop) {
58
62
  const v = theme[`gridAuto${rowColTheme(c)}`]?.[prop];
59
63
  if (v != null)
60
64
  return v;
@@ -67,7 +71,7 @@ const autoDirection = (c, theme, prop) => {
67
71
  return "minmax(0,1fr)";
68
72
  }
69
73
  return handler.bracket.cssvar.auto.rem(prop);
70
- };
74
+ }
71
75
  const grids = [
72
76
  ["grid", { display: "grid" }],
73
77
  ["inline-grid", { display: "inline-grid" }],
@@ -199,7 +203,7 @@ const cssVariables = [
199
203
  }]
200
204
  ];
201
205
  const cssProperty = [
202
- [/^\[(--(\w|\\\W)+|[\w-]+):([^:].*)\]$/, ([match, prop, , value]) => {
206
+ [/^\[(--(\w|\\\W)+|[\w-]+):([^\s:]*?("\S+?"|'\S+?'|`\S+?`|[^\s:]+?)[^\s:]*?\)?)\]$/, ([match, prop, , value]) => {
203
207
  if (!isURI(match.slice(1, -1)))
204
208
  return { [prop]: handler.bracket(`[${value}]`) };
205
209
  }]
@@ -1,6 +1,6 @@
1
1
  import { h as handler, l as resolveBreakpoints, q as getBracket, C as CONTROL_MINI_NO_NEGATIVE, t as getComponent } from './preset-mini.617e6696.mjs';
2
2
  import { warnOnce, escapeRegExp, escapeSelector } from '@unocss/core';
3
- import { v as variantGetParameter, a as variantGetBracket, b as variantMatcher, c as variantParentMatcher } from './preset-mini.305062ab.mjs';
3
+ import { v as variantGetParameter, a as variantGetBracket, b as variantMatcher, c as variantParentMatcher } from './preset-mini.6c20780a.mjs';
4
4
 
5
5
  const variantAria = {
6
6
  name: "aria",
@@ -19,13 +19,13 @@ const variantAria = {
19
19
  }
20
20
  };
21
21
 
22
- const calcMaxWidthBySize = (size) => {
22
+ function calcMaxWidthBySize(size) {
23
23
  const value = size.match(/^-?[0-9]+\.?[0-9]*/)?.[0] || "";
24
24
  const unit = size.slice(value.length);
25
25
  const maxWidth = parseFloat(value) - 0.1;
26
26
  return Number.isNaN(maxWidth) ? size : `${maxWidth}${unit}`;
27
- };
28
- const variantBreakpoints = () => {
27
+ }
28
+ function variantBreakpoints() {
29
29
  const regexCache = {};
30
30
  return {
31
31
  name: "breakpoints",
@@ -79,35 +79,37 @@ const variantBreakpoints = () => {
79
79
  multiPass: true,
80
80
  autocomplete: "(at-|lt-|)$breakpoints:"
81
81
  };
82
- };
82
+ }
83
83
 
84
- const scopeMatcher = (name, combinator) => ({
85
- name: `combinator:${name}`,
86
- match(matcher, ctx) {
87
- if (!matcher.startsWith(name))
88
- return;
89
- const separators = ctx.generator.config.separators;
90
- let body = variantGetBracket(`${name}-`, matcher, separators);
91
- if (!body) {
92
- for (const separator of separators) {
93
- if (matcher.startsWith(`${name}${separator}`)) {
94
- body = ["", matcher.slice(name.length + separator.length)];
95
- break;
84
+ function scopeMatcher(name, combinator) {
85
+ return {
86
+ name: `combinator:${name}`,
87
+ match(matcher, ctx) {
88
+ if (!matcher.startsWith(name))
89
+ return;
90
+ const separators = ctx.generator.config.separators;
91
+ let body = variantGetBracket(`${name}-`, matcher, separators);
92
+ if (!body) {
93
+ for (const separator of separators) {
94
+ if (matcher.startsWith(`${name}${separator}`)) {
95
+ body = ["", matcher.slice(name.length + separator.length)];
96
+ break;
97
+ }
96
98
  }
99
+ if (!body)
100
+ return;
97
101
  }
98
- if (!body)
99
- return;
100
- }
101
- let bracketValue = handler.bracket(body[0]) ?? "";
102
- if (bracketValue === "")
103
- bracketValue = "*";
104
- return {
105
- matcher: body[1],
106
- selector: (s) => `${s}${combinator}${bracketValue}`
107
- };
108
- },
109
- multiPass: true
110
- });
102
+ let bracketValue = handler.bracket(body[0]) ?? "";
103
+ if (bracketValue === "")
104
+ bracketValue = "*";
105
+ return {
106
+ matcher: body[1],
107
+ selector: (s) => `${s}${combinator}${bracketValue}`
108
+ };
109
+ },
110
+ multiPass: true
111
+ };
112
+ }
111
113
  const variantCombinators = [
112
114
  scopeMatcher("all", " "),
113
115
  scopeMatcher("children", ">"),
@@ -148,7 +150,7 @@ const variantContainerQuery = {
148
150
  multiPass: true
149
151
  };
150
152
 
151
- const variantColorsMediaOrClass = (options = {}) => {
153
+ function variantColorsMediaOrClass(options = {}) {
152
154
  if (options?.dark === "class" || typeof options.dark === "object") {
153
155
  const { dark = ".dark", light = ".light" } = typeof options.dark === "string" ? {} : options.dark;
154
156
  return [
@@ -160,7 +162,7 @@ const variantColorsMediaOrClass = (options = {}) => {
160
162
  variantParentMatcher("dark", "@media (prefers-color-scheme: dark)"),
161
163
  variantParentMatcher("light", "@media (prefers-color-scheme: light)")
162
164
  ];
163
- };
165
+ }
164
166
 
165
167
  const variantDataAttribute = {
166
168
  name: "data",
@@ -294,14 +296,14 @@ const numberRE = /[0-9.]+(?:[a-z]+|%)?/;
294
296
  const ignoreProps = [
295
297
  /opacity|color|flex/
296
298
  ];
297
- const negateFunctions = (value) => {
299
+ function negateFunctions(value) {
298
300
  const match = value.match(/^(calc|clamp|max|min)\s*(\(.*)/);
299
301
  if (match) {
300
302
  const [fnBody, rest] = getComponent(match[2], "(", ")", " ") ?? [];
301
303
  if (fnBody)
302
304
  return `calc(${match[1]}${fnBody} * -1)${rest ? ` ${rest}` : ""}`;
303
305
  }
304
- };
306
+ }
305
307
  const variantNegative = {
306
308
  name: "negative",
307
309
  match(matcher) {
@@ -336,7 +338,7 @@ const variantNegative = {
336
338
  }
337
339
  };
338
340
 
339
- const variantImportant = () => {
341
+ function variantImportant() {
340
342
  let re;
341
343
  return {
342
344
  name: "important",
@@ -363,7 +365,7 @@ const variantImportant = () => {
363
365
  }
364
366
  }
365
367
  };
366
- };
368
+ }
367
369
 
368
370
  const variantPrint = variantParentMatcher("print", "@media print");
369
371
  const variantCustomMedia = {
@@ -472,15 +474,15 @@ const PseudoClassFunctions = [
472
474
  const PseudoClassesStr = Object.entries(PseudoClasses).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).join("|");
473
475
  const PseudoClassesColonStr = Object.entries(PseudoClassesColon).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).join("|");
474
476
  const PseudoClassFunctionsStr = PseudoClassFunctions.join("|");
475
- const pseudoModifier = (pseudo) => {
477
+ function pseudoModifier(pseudo) {
476
478
  if (pseudo === "active") {
477
479
  return {
478
480
  sort: 1,
479
481
  noMerge: true
480
482
  };
481
483
  }
482
- };
483
- const taggedPseudoClassMatcher = (tag, parent, combinator) => {
484
+ }
485
+ function taggedPseudoClassMatcher(tag, parent, combinator) {
484
486
  const rawRE = new RegExp(`^(${escapeRegExp(parent)}:)(\\S+)${escapeRegExp(combinator)}\\1`);
485
487
  let splitRE;
486
488
  let pseudoRE;
@@ -544,7 +546,7 @@ const taggedPseudoClassMatcher = (tag, parent, combinator) => {
544
546
  },
545
547
  multiPass: true
546
548
  };
547
- };
549
+ }
548
550
  const excludedPseudo = [
549
551
  "::-webkit-resizer",
550
552
  "::-webkit-scrollbar",
@@ -557,7 +559,7 @@ const excludedPseudo = [
557
559
  ];
558
560
  const PseudoClassesAndElementsStr = Object.entries(PseudoClasses).map(([key]) => key).join("|");
559
561
  const PseudoClassesAndElementsColonStr = Object.entries(PseudoClassesColon).map(([key]) => key).join("|");
560
- const variantPseudoClassesAndElements = () => {
562
+ function variantPseudoClassesAndElements() {
561
563
  let PseudoClassesAndElementsRE;
562
564
  let PseudoClassesAndElementsColonRE;
563
565
  return {
@@ -590,8 +592,8 @@ const variantPseudoClassesAndElements = () => {
590
592
  multiPass: true,
591
593
  autocomplete: `(${PseudoClassesAndElementsStr}|${PseudoClassesAndElementsColonStr}):`
592
594
  };
593
- };
594
- const variantPseudoClassFunctions = () => {
595
+ }
596
+ function variantPseudoClassFunctions() {
595
597
  let PseudoClassFunctionsRE;
596
598
  let PseudoClassColonFunctionsRE;
597
599
  return {
@@ -613,8 +615,8 @@ const variantPseudoClassFunctions = () => {
613
615
  multiPass: true,
614
616
  autocomplete: `(${PseudoClassFunctionsStr})-(${PseudoClassesStr}|${PseudoClassesColonStr}):`
615
617
  };
616
- };
617
- const variantTaggedPseudoClasses = (options = {}) => {
618
+ }
619
+ function variantTaggedPseudoClasses(options = {}) {
618
620
  const attributify = !!options?.attributifyPseudo;
619
621
  return [
620
622
  taggedPseudoClassMatcher("group", attributify ? '[group=""]' : ".group", " "),
@@ -622,7 +624,7 @@ const variantTaggedPseudoClasses = (options = {}) => {
622
624
  taggedPseudoClassMatcher("parent", attributify ? '[parent=""]' : ".parent", ">"),
623
625
  taggedPseudoClassMatcher("previous", attributify ? '[previous=""]' : ".previous", "+")
624
626
  ];
625
- };
627
+ }
626
628
  const PartClassesRE = /(part-\[(.+)]:)(.+)/;
627
629
  const partClasses = {
628
630
  match(input) {
@@ -638,28 +640,30 @@ const partClasses = {
638
640
  multiPass: true
639
641
  };
640
642
 
641
- const variants = (options) => [
642
- variantAria,
643
- variantDataAttribute,
644
- variantCssLayer,
645
- variantSelector,
646
- variantInternalLayer,
647
- variantNegative,
648
- variantImportant(),
649
- variantSupports,
650
- variantPrint,
651
- variantCustomMedia,
652
- variantBreakpoints(),
653
- ...variantCombinators,
654
- variantPseudoClassesAndElements(),
655
- variantPseudoClassFunctions(),
656
- ...variantTaggedPseudoClasses(options),
657
- partClasses,
658
- ...variantColorsMediaOrClass(options),
659
- ...variantLanguageDirections,
660
- variantScope,
661
- variantContainerQuery,
662
- variantVariables
663
- ];
643
+ function variants(options) {
644
+ return [
645
+ variantAria,
646
+ variantDataAttribute,
647
+ variantCssLayer,
648
+ variantSelector,
649
+ variantInternalLayer,
650
+ variantNegative,
651
+ variantImportant(),
652
+ variantSupports,
653
+ variantPrint,
654
+ variantCustomMedia,
655
+ variantBreakpoints(),
656
+ ...variantCombinators,
657
+ variantPseudoClassesAndElements(),
658
+ variantPseudoClassFunctions(),
659
+ ...variantTaggedPseudoClasses(options),
660
+ partClasses,
661
+ ...variantColorsMediaOrClass(options),
662
+ ...variantLanguageDirections,
663
+ variantScope,
664
+ variantContainerQuery,
665
+ variantVariables
666
+ ];
667
+ }
664
668
 
665
669
  export { variantAria as a, variantBreakpoints as b, calcMaxWidthBySize as c, variantCombinators as d, variantContainerQuery as e, variantColorsMediaOrClass as f, variantDataAttribute as g, variantLanguageDirections as h, variantImportant as i, variantPrint as j, variantCustomMedia as k, variantSelector as l, variantCssLayer as m, variantInternalLayer as n, variantScope as o, variantVariables as p, variantNegative as q, variantPseudoClassesAndElements as r, variantPseudoClassFunctions as s, variantTaggedPseudoClasses as t, partClasses as u, variants as v, variantSupports as w };