@unocss/preset-mini 0.53.0 → 0.53.3

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,5 +1,5 @@
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 flexGridJustifiesAlignments, L as insets, M as floats, N as zIndexes, O as boxSizing, P as transitions, Q as transforms, R as willChange, S as contains, T as textWraps } from './preset-mini.6babd10a.mjs';
2
- import { h as handler, r as resolveVerticalBreakpoints, l as resolveBreakpoints, o as directionSize, c as colorResolver } from './preset-mini.64d922d5.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 flexGridJustifiesAlignments, L as insets, M as floats, N as zIndexes, O as boxSizing, P as transitions, Q as transforms, R as willChange, S as contains, T as textWraps } from './preset-mini.17fe8f10.mjs';
2
+ import { h, r as resolveVerticalBreakpoints, l as resolveBreakpoints, o as directionSize, c as colorResolver } from './preset-mini.6c244f7e.mjs';
3
3
  import { warnOnce } from '@unocss/core';
4
4
 
5
5
  const containerParent = [
@@ -16,14 +16,14 @@ const flex = [
16
16
  ["flex", { display: "flex" }],
17
17
  ["inline-flex", { display: "inline-flex" }],
18
18
  ["flex-inline", { display: "inline-flex" }],
19
- [/^flex-(.*)$/, ([, d]) => ({ flex: handler.bracket(d) != null ? handler.bracket(d).split(" ").map((e) => handler.cssvar.fraction(e) ?? e).join(" ") : handler.cssvar.fraction(d) })],
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
20
  ["flex-1", { flex: "1 1 0%" }],
21
21
  ["flex-auto", { flex: "1 1 auto" }],
22
22
  ["flex-initial", { flex: "0 1 auto" }],
23
23
  ["flex-none", { flex: "none" }],
24
- [/^(?:flex-)?shrink(?:-(.*))?$/, ([, d = ""]) => ({ "flex-shrink": handler.bracket.cssvar.number(d) ?? 1 }), { autocomplete: ["flex-shrink-<num>", "shrink-<num>"] }],
25
- [/^(?:flex-)?grow(?:-(.*))?$/, ([, d = ""]) => ({ "flex-grow": handler.bracket.cssvar.number(d) ?? 1 }), { autocomplete: ["flex-grow-<num>", "grow-<num>"] }],
26
- [/^(?:flex-)?basis-(.+)$/, ([, d], { theme }) => ({ "flex-basis": theme.spacing?.[d] ?? handler.bracket.cssvar.auto.fraction.rem(d) }), { autocomplete: ["flex-basis-$spacing", "basis-$spacing"] }],
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
27
  ["flex-row", { "flex-direction": "row" }],
28
28
  ["flex-row-reverse", { "flex-direction": "row-reverse" }],
29
29
  ["flex-col", { "flex-direction": "column" }],
@@ -39,7 +39,7 @@ const directions = {
39
39
  "y": "row-"
40
40
  };
41
41
  function handleGap([, d = "", s], { theme }) {
42
- const v = theme.spacing?.[s] ?? handler.bracket.cssvar.global.rem(s);
42
+ const v = theme.spacing?.[s] ?? h.bracket.cssvar.global.rem(s);
43
43
  if (v != null) {
44
44
  return {
45
45
  [`grid-${directions[d]}gap`]: v,
@@ -70,35 +70,35 @@ function autoDirection(c, theme, prop) {
70
70
  case "fr":
71
71
  return "minmax(0,1fr)";
72
72
  }
73
- return handler.bracket.cssvar.auto.rem(prop);
73
+ return h.bracket.cssvar.auto.rem(prop);
74
74
  }
75
75
  const grids = [
76
76
  ["grid", { display: "grid" }],
77
77
  ["inline-grid", { display: "inline-grid" }],
78
78
  [/^(?:grid-)?(row|col)-(.+)$/, ([, c, v], { theme }) => ({
79
- [`grid-${rowCol(c)}`]: theme[`grid${rowColTheme(c)}`]?.[v] ?? handler.bracket.cssvar.auto(v)
79
+ [`grid-${rowCol(c)}`]: theme[`grid${rowColTheme(c)}`]?.[v] ?? h.bracket.cssvar.auto(v)
80
80
  })],
81
81
  [/^(?:grid-)?(row|col)-span-(.+)$/, ([, c, s]) => {
82
82
  if (s === "full")
83
83
  return { [`grid-${rowCol(c)}`]: "1/-1" };
84
- const v = handler.bracket.number(s);
84
+ const v = h.bracket.number(s);
85
85
  if (v != null)
86
86
  return { [`grid-${rowCol(c)}`]: `span ${v}/span ${v}` };
87
87
  }, { autocomplete: ["grid-(row|col)-span-<num>", "(row|col)-span-<num>"] }],
88
- [/^(?:grid-)?(row|col)-start-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-start`]: handler.bracket.cssvar(v) ?? v })],
89
- [/^(?:grid-)?(row|col)-end-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-end`]: handler.bracket.cssvar(v) ?? v }), { autocomplete: ["grid-(row|col)-(start|end)-<num>"] }],
88
+ [/^(?:grid-)?(row|col)-start-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-start`]: h.bracket.cssvar(v) ?? v })],
89
+ [/^(?:grid-)?(row|col)-end-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-end`]: h.bracket.cssvar(v) ?? v }), { autocomplete: ["grid-(row|col)-(start|end)-<num>"] }],
90
90
  [/^(?:grid-)?auto-(rows|cols)-(.+)$/, ([, c, v], { theme }) => ({ [`grid-auto-${rowCol(c)}`]: autoDirection(c, theme, v) }), { autocomplete: ["grid-auto-(rows|cols)-<num>"] }],
91
- [/^(?:grid-auto-flow|auto-flow|grid-flow)-(.+)$/, ([, v]) => ({ "grid-auto-flow": handler.bracket.cssvar(v) })],
91
+ [/^(?:grid-auto-flow|auto-flow|grid-flow)-(.+)$/, ([, v]) => ({ "grid-auto-flow": h.bracket.cssvar(v) })],
92
92
  [/^(?: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)"] }],
93
93
  [/^grid-(rows|cols)-(.+)$/, ([, c, v], { theme }) => ({
94
- [`grid-template-${rowCol(c)}`]: theme[`gridTemplate${rowColTheme(c)}`]?.[v] ?? handler.bracket.cssvar(v)
94
+ [`grid-template-${rowCol(c)}`]: theme[`gridTemplate${rowColTheme(c)}`]?.[v] ?? h.bracket.cssvar(v)
95
95
  })],
96
96
  [/^grid-(rows|cols)-minmax-([\w.-]+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(auto-fill,minmax(${d},1fr))` })],
97
97
  [/^grid-(rows|cols)-(\d+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(${d},minmax(0,1fr))` }), { autocomplete: ["grid-(rows|cols)-<num>", "grid-(rows|cols)-none"] }],
98
98
  [/^grid-area(s)?-(.+)$/, ([, s, v]) => {
99
99
  if (s != null)
100
- return { "grid-template-areas": handler.cssvar(v) ?? v.split("-").map((s2) => `"${handler.bracket(s2)}"`).join(" ") };
101
- return { "grid-area": handler.bracket.cssvar(v) };
100
+ return { "grid-template-areas": h.cssvar(v) ?? v.split("-").map((s2) => `"${h.bracket(s2)}"`).join(" ") };
101
+ return { "grid-area": h.bracket.cssvar(v) };
102
102
  }],
103
103
  ["grid-rows-none", { "grid-template-rows": "none" }],
104
104
  ["grid-cols-none", { "grid-template-columns": "none" }]
@@ -124,7 +124,7 @@ function getSizeValue(minmax, hw, theme, prop) {
124
124
  case "min":
125
125
  return `${prop}-content`;
126
126
  }
127
- return handler.bracket.cssvar.global.auto.fraction.rem(prop);
127
+ return h.bracket.cssvar.global.auto.fraction.rem(prop);
128
128
  }
129
129
  const sizes = [
130
130
  [/^(?:size-)?(min-|max-)?([wh])-?(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) })],
@@ -157,7 +157,7 @@ function getAspectRatio(prop) {
157
157
  case "video":
158
158
  return "16/9";
159
159
  }
160
- return handler.bracket.cssvar.global.auto.number(prop);
160
+ return h.bracket.cssvar.global.auto.number(prop);
161
161
  }
162
162
  const aspectRatio = [
163
163
  [/^(?:size-)?aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video|ratio)", "aspect-ratio-(square|video)"] }]
@@ -199,13 +199,13 @@ const cssVariables = [
199
199
  [/^(.+?)-(\$.+)$/, ([, name, varname]) => {
200
200
  const prop = variablesAbbrMap[name];
201
201
  if (prop)
202
- return { [prop]: handler.cssvar(varname) };
202
+ return { [prop]: h.cssvar(varname) };
203
203
  }]
204
204
  ];
205
205
  const cssProperty = [
206
- [/^\[(--(\w|\\\W)+|[\w-]+):([^\s:]*?("\S+?"|'\S+?'|`\S+?`|[^\s:]+?)[^\s:]*?\)?)\]$/, ([match, prop, , value]) => {
206
+ [/^\[(--(\w|\\\W)+|[\w-]+):(("[^\s"]+?"|'[^\s']+?'|`[^\s`]+?`|[^\s:'"`;{}]+?)+)\]$/, ([match, prop, , value]) => {
207
207
  if (!isURI(match.slice(1, -1)))
208
- return { [prop]: handler.bracket(`[${value}]`) };
208
+ return { [prop]: h.bracket(`[${value}]`) };
209
209
  }]
210
210
  ];
211
211
  function isURI(declaration) {
@@ -231,13 +231,13 @@ ${constructCSS({ animation: "__un_qm 0.5s ease-in-out alternate infinite" })}`;
231
231
 
232
232
  const svgUtilities = [
233
233
  [/^fill-(.+)$/, colorResolver("fill", "fill"), { autocomplete: "fill-$colors" }],
234
- [/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": handler.bracket.percent.cssvar(opacity) }), { autocomplete: "fill-(op|opacity)-<percent>" }],
234
+ [/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "fill-(op|opacity)-<percent>" }],
235
235
  ["fill-none", { fill: "none" }],
236
- [/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? handler.bracket.cssvar.fraction.px.number(s) }), { autocomplete: ["stroke-width-$lineWidth", "stroke-size-$lineWidth"] }],
237
- [/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": handler.bracket.cssvar.number(s) }), { autocomplete: "stroke-dash-<num>" }],
238
- [/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? handler.bracket.cssvar.px.numberWithUnit(s) }), { autocomplete: "stroke-offset-$lineWidth" }],
236
+ [/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? h.bracket.cssvar.fraction.px.number(s) }), { autocomplete: ["stroke-width-$lineWidth", "stroke-size-$lineWidth"] }],
237
+ [/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": h.bracket.cssvar.number(s) }), { autocomplete: "stroke-dash-<num>" }],
238
+ [/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? h.bracket.cssvar.px.numberWithUnit(s) }), { autocomplete: "stroke-offset-$lineWidth" }],
239
239
  [/^stroke-(.+)$/, colorResolver("stroke", "stroke"), { autocomplete: "stroke-$colors" }],
240
- [/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": handler.bracket.percent.cssvar(opacity) }), { autocomplete: "stroke-(op|opacity)-<percent>" }],
240
+ [/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": h.bracket.percent.cssvar(opacity) }), { autocomplete: "stroke-(op|opacity)-<percent>" }],
241
241
  ["stroke-cap-square", { "stroke-linecap": "square" }],
242
242
  ["stroke-cap-round", { "stroke-linecap": "round" }],
243
243
  ["stroke-cap-auto", { "stroke-linecap": "butt" }],
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- const colors = require('./preset-mini.099ab35c.cjs');
3
+ const colors = require('./preset-mini.a21c5071.cjs');
4
4
  const core = require('@unocss/core');
5
- const variants$1 = require('./preset-mini.c3ab5ec7.cjs');
5
+ const variants$1 = require('./preset-mini.d778b487.cjs');
6
6
 
7
7
  const variantAria = {
8
8
  name: "aria",
@@ -10,7 +10,7 @@ const variantAria = {
10
10
  const variant = variants$1.variantGetParameter("aria-", matcher, ctx.generator.config.separators);
11
11
  if (variant) {
12
12
  const [match, rest] = variant;
13
- const aria = colors.handler.bracket(match) ?? ctx.theme.aria?.[match] ?? "";
13
+ const aria = colors.h.bracket(match) ?? ctx.theme.aria?.[match] ?? "";
14
14
  if (aria) {
15
15
  return {
16
16
  matcher: rest,
@@ -101,7 +101,7 @@ function scopeMatcher(name, combinator) {
101
101
  if (!body)
102
102
  return;
103
103
  }
104
- let bracketValue = colors.handler.bracket(body[0]) ?? "";
104
+ let bracketValue = colors.h.bracket(body[0]) ?? "";
105
105
  if (bracketValue === "")
106
106
  bracketValue = "*";
107
107
  return {
@@ -128,10 +128,10 @@ const variantContainerQuery = {
128
128
  const variant = variants$1.variantGetParameter("@", matcher, ctx.generator.config.separators);
129
129
  if (variant) {
130
130
  const [match, rest, label] = variant;
131
- const unbracket = colors.handler.bracket(match);
131
+ const unbracket = colors.h.bracket(match);
132
132
  let container;
133
133
  if (unbracket) {
134
- const minWidth = colors.handler.numberWithUnit(unbracket);
134
+ const minWidth = colors.h.numberWithUnit(unbracket);
135
135
  if (minWidth)
136
136
  container = `(min-width: ${minWidth})`;
137
137
  } else {
@@ -172,7 +172,7 @@ const variantDataAttribute = {
172
172
  const variant = variants$1.variantGetParameter("data-", matcher, ctx.generator.config.separators);
173
173
  if (variant) {
174
174
  const [match, rest] = variant;
175
- const dataAttribute = colors.handler.bracket(match) ?? ctx.theme.data?.[match] ?? "";
175
+ const dataAttribute = colors.h.bracket(match) ?? ctx.theme.data?.[match] ?? "";
176
176
  if (dataAttribute) {
177
177
  return {
178
178
  matcher: rest,
@@ -194,7 +194,7 @@ const variantSelector = {
194
194
  const variant = variants$1.variantGetBracket("selector-", matcher, ctx.generator.config.separators);
195
195
  if (variant) {
196
196
  const [match, rest] = variant;
197
- const selector = colors.handler.bracket(match);
197
+ const selector = colors.h.bracket(match);
198
198
  if (selector) {
199
199
  return {
200
200
  matcher: rest,
@@ -210,7 +210,7 @@ const variantCssLayer = {
210
210
  const variant = variants$1.variantGetParameter("layer-", matcher, ctx.generator.config.separators);
211
211
  if (variant) {
212
212
  const [match, rest] = variant;
213
- const layer = colors.handler.bracket(match) ?? match;
213
+ const layer = colors.h.bracket(match) ?? match;
214
214
  if (layer) {
215
215
  return {
216
216
  matcher: rest,
@@ -229,7 +229,7 @@ const variantInternalLayer = {
229
229
  const variant = variants$1.variantGetParameter("uno-layer-", matcher, ctx.generator.config.separators);
230
230
  if (variant) {
231
231
  const [match, rest] = variant;
232
- const layer = colors.handler.bracket(match) ?? match;
232
+ const layer = colors.h.bracket(match) ?? match;
233
233
  if (layer) {
234
234
  return {
235
235
  matcher: rest,
@@ -245,7 +245,7 @@ const variantScope = {
245
245
  const variant = variants$1.variantGetBracket("scope-", matcher, ctx.generator.config.separators);
246
246
  if (variant) {
247
247
  const [match, rest] = variant;
248
- const scope = colors.handler.bracket(match);
248
+ const scope = colors.h.bracket(match);
249
249
  if (scope) {
250
250
  return {
251
251
  matcher: rest,
@@ -272,7 +272,7 @@ const variantVariables = {
272
272
  }
273
273
  if (newMatcher == null)
274
274
  return;
275
- const variant = colors.handler.bracket(match) ?? "";
275
+ const variant = colors.h.bracket(match) ?? "";
276
276
  const useParent = variant.startsWith("@");
277
277
  if (!(useParent || variant.includes("&")))
278
278
  return;
@@ -376,7 +376,7 @@ const variantCustomMedia = {
376
376
  const variant = variants$1.variantGetParameter("media-", matcher, ctx.generator.config.separators);
377
377
  if (variant) {
378
378
  const [match, rest] = variant;
379
- let media = colors.handler.bracket(match) ?? "";
379
+ let media = colors.h.bracket(match) ?? "";
380
380
  if (media === "")
381
381
  media = ctx.theme.media?.[match] ?? "";
382
382
  if (media) {
@@ -399,7 +399,7 @@ const variantSupports = {
399
399
  const variant = variants$1.variantGetParameter("supports-", matcher, ctx.generator.config.separators);
400
400
  if (variant) {
401
401
  const [match, rest] = variant;
402
- let supports = colors.handler.bracket(match) ?? "";
402
+ let supports = colors.h.bracket(match) ?? "";
403
403
  if (supports === "")
404
404
  supports = ctx.theme.supports?.[match] ?? "";
405
405
  if (supports) {
@@ -476,8 +476,8 @@ const PseudoClassFunctions = [
476
476
  "where",
477
477
  "has"
478
478
  ];
479
- const PseudoClassesStr = Object.entries(PseudoClasses).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).join("|");
480
- const PseudoClassesColonStr = Object.entries(PseudoClassesColon).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).join("|");
479
+ const PseudoClassesStr = Object.entries(PseudoClasses).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).sort((a, b) => b.length - a.length).join("|");
480
+ const PseudoClassesColonStr = Object.entries(PseudoClassesColon).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).sort((a, b) => b.length - a.length).join("|");
481
481
  const PseudoClassFunctionsStr = PseudoClassFunctions.join("|");
482
482
  function taggedPseudoClassMatcher(tag, parent, combinator) {
483
483
  const rawRE = new RegExp(`^(${core.escapeRegExp(parent)}:)(\\S+)${core.escapeRegExp(combinator)}\\1`);
@@ -490,7 +490,7 @@ function taggedPseudoClassMatcher(tag, parent, combinator) {
490
490
  if (!body)
491
491
  return;
492
492
  const [match, rest] = body;
493
- const bracketValue = colors.handler.bracket(match);
493
+ const bracketValue = colors.h.bracket(match);
494
494
  if (bracketValue == null)
495
495
  return;
496
496
  const label = rest.split(splitRE, 1)?.[0] ?? "";
@@ -569,8 +569,8 @@ const excludedPseudo = [
569
569
  "::-webkit-scrollbar-track-piece",
570
570
  "::file-selector-button"
571
571
  ];
572
- const PseudoClassesAndElementsStr = Object.entries(PseudoClasses).map(([key]) => key).join("|");
573
- const PseudoClassesAndElementsColonStr = Object.entries(PseudoClassesColon).map(([key]) => key).join("|");
572
+ const PseudoClassesAndElementsStr = Object.entries(PseudoClasses).map(([key]) => key).sort((a, b) => b.length - a.length).join("|");
573
+ const PseudoClassesAndElementsColonStr = Object.entries(PseudoClassesColon).map(([key]) => key).sort((a, b) => b.length - a.length).join("|");
574
574
  function variantPseudoClassesAndElements() {
575
575
  let PseudoClassesAndElementsRE;
576
576
  let PseudoClassesAndElementsColonRE;
@@ -626,7 +626,7 @@ function variantPseudoClassFunctions() {
626
626
  if (match) {
627
627
  const fn = match[1];
628
628
  const fnVal = colors.getBracket(match[2], "[", "]");
629
- const pseudo = fnVal ? colors.handler.bracket(match[2]) : PseudoClasses[match[2]] || PseudoClassesColon[match[2]] || `:${match[2]}`;
629
+ const pseudo = fnVal ? colors.h.bracket(match[2]) : PseudoClasses[match[2]] || PseudoClassesColon[match[2]] || `:${match[2]}`;
630
630
  return {
631
631
  matcher: input.slice(match[0].length),
632
632
  selector: (s) => `${s}:${fn}(${pseudo})`
@@ -1,6 +1,6 @@
1
- import { h as handler, l as resolveBreakpoints, q as getBracket, C as CONTROL_MINI_NO_NEGATIVE, t as getComponent } from './preset-mini.64d922d5.mjs';
1
+ import { h, l as resolveBreakpoints, q as getBracket, C as CONTROL_MINI_NO_NEGATIVE, t as getComponent } from './preset-mini.6c244f7e.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.bd1a81a2.mjs';
3
+ import { v as variantGetParameter, a as variantGetBracket, b as variantMatcher, c as variantParentMatcher } from './preset-mini.9af3cc95.mjs';
4
4
 
5
5
  const variantAria = {
6
6
  name: "aria",
@@ -8,7 +8,7 @@ const variantAria = {
8
8
  const variant = variantGetParameter("aria-", matcher, ctx.generator.config.separators);
9
9
  if (variant) {
10
10
  const [match, rest] = variant;
11
- const aria = handler.bracket(match) ?? ctx.theme.aria?.[match] ?? "";
11
+ const aria = h.bracket(match) ?? ctx.theme.aria?.[match] ?? "";
12
12
  if (aria) {
13
13
  return {
14
14
  matcher: rest,
@@ -99,7 +99,7 @@ function scopeMatcher(name, combinator) {
99
99
  if (!body)
100
100
  return;
101
101
  }
102
- let bracketValue = handler.bracket(body[0]) ?? "";
102
+ let bracketValue = h.bracket(body[0]) ?? "";
103
103
  if (bracketValue === "")
104
104
  bracketValue = "*";
105
105
  return {
@@ -126,10 +126,10 @@ const variantContainerQuery = {
126
126
  const variant = variantGetParameter("@", matcher, ctx.generator.config.separators);
127
127
  if (variant) {
128
128
  const [match, rest, label] = variant;
129
- const unbracket = handler.bracket(match);
129
+ const unbracket = h.bracket(match);
130
130
  let container;
131
131
  if (unbracket) {
132
- const minWidth = handler.numberWithUnit(unbracket);
132
+ const minWidth = h.numberWithUnit(unbracket);
133
133
  if (minWidth)
134
134
  container = `(min-width: ${minWidth})`;
135
135
  } else {
@@ -170,7 +170,7 @@ const variantDataAttribute = {
170
170
  const variant = variantGetParameter("data-", matcher, ctx.generator.config.separators);
171
171
  if (variant) {
172
172
  const [match, rest] = variant;
173
- const dataAttribute = handler.bracket(match) ?? ctx.theme.data?.[match] ?? "";
173
+ const dataAttribute = h.bracket(match) ?? ctx.theme.data?.[match] ?? "";
174
174
  if (dataAttribute) {
175
175
  return {
176
176
  matcher: rest,
@@ -192,7 +192,7 @@ const variantSelector = {
192
192
  const variant = variantGetBracket("selector-", matcher, ctx.generator.config.separators);
193
193
  if (variant) {
194
194
  const [match, rest] = variant;
195
- const selector = handler.bracket(match);
195
+ const selector = h.bracket(match);
196
196
  if (selector) {
197
197
  return {
198
198
  matcher: rest,
@@ -208,7 +208,7 @@ const variantCssLayer = {
208
208
  const variant = variantGetParameter("layer-", matcher, ctx.generator.config.separators);
209
209
  if (variant) {
210
210
  const [match, rest] = variant;
211
- const layer = handler.bracket(match) ?? match;
211
+ const layer = h.bracket(match) ?? match;
212
212
  if (layer) {
213
213
  return {
214
214
  matcher: rest,
@@ -227,7 +227,7 @@ const variantInternalLayer = {
227
227
  const variant = variantGetParameter("uno-layer-", matcher, ctx.generator.config.separators);
228
228
  if (variant) {
229
229
  const [match, rest] = variant;
230
- const layer = handler.bracket(match) ?? match;
230
+ const layer = h.bracket(match) ?? match;
231
231
  if (layer) {
232
232
  return {
233
233
  matcher: rest,
@@ -243,7 +243,7 @@ const variantScope = {
243
243
  const variant = variantGetBracket("scope-", matcher, ctx.generator.config.separators);
244
244
  if (variant) {
245
245
  const [match, rest] = variant;
246
- const scope = handler.bracket(match);
246
+ const scope = h.bracket(match);
247
247
  if (scope) {
248
248
  return {
249
249
  matcher: rest,
@@ -270,7 +270,7 @@ const variantVariables = {
270
270
  }
271
271
  if (newMatcher == null)
272
272
  return;
273
- const variant = handler.bracket(match) ?? "";
273
+ const variant = h.bracket(match) ?? "";
274
274
  const useParent = variant.startsWith("@");
275
275
  if (!(useParent || variant.includes("&")))
276
276
  return;
@@ -374,7 +374,7 @@ const variantCustomMedia = {
374
374
  const variant = variantGetParameter("media-", matcher, ctx.generator.config.separators);
375
375
  if (variant) {
376
376
  const [match, rest] = variant;
377
- let media = handler.bracket(match) ?? "";
377
+ let media = h.bracket(match) ?? "";
378
378
  if (media === "")
379
379
  media = ctx.theme.media?.[match] ?? "";
380
380
  if (media) {
@@ -397,7 +397,7 @@ const variantSupports = {
397
397
  const variant = variantGetParameter("supports-", matcher, ctx.generator.config.separators);
398
398
  if (variant) {
399
399
  const [match, rest] = variant;
400
- let supports = handler.bracket(match) ?? "";
400
+ let supports = h.bracket(match) ?? "";
401
401
  if (supports === "")
402
402
  supports = ctx.theme.supports?.[match] ?? "";
403
403
  if (supports) {
@@ -474,8 +474,8 @@ const PseudoClassFunctions = [
474
474
  "where",
475
475
  "has"
476
476
  ];
477
- const PseudoClassesStr = Object.entries(PseudoClasses).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).join("|");
478
- const PseudoClassesColonStr = Object.entries(PseudoClassesColon).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).join("|");
477
+ const PseudoClassesStr = Object.entries(PseudoClasses).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).sort((a, b) => b.length - a.length).join("|");
478
+ const PseudoClassesColonStr = Object.entries(PseudoClassesColon).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).sort((a, b) => b.length - a.length).join("|");
479
479
  const PseudoClassFunctionsStr = PseudoClassFunctions.join("|");
480
480
  function taggedPseudoClassMatcher(tag, parent, combinator) {
481
481
  const rawRE = new RegExp(`^(${escapeRegExp(parent)}:)(\\S+)${escapeRegExp(combinator)}\\1`);
@@ -488,7 +488,7 @@ function taggedPseudoClassMatcher(tag, parent, combinator) {
488
488
  if (!body)
489
489
  return;
490
490
  const [match, rest] = body;
491
- const bracketValue = handler.bracket(match);
491
+ const bracketValue = h.bracket(match);
492
492
  if (bracketValue == null)
493
493
  return;
494
494
  const label = rest.split(splitRE, 1)?.[0] ?? "";
@@ -567,8 +567,8 @@ const excludedPseudo = [
567
567
  "::-webkit-scrollbar-track-piece",
568
568
  "::file-selector-button"
569
569
  ];
570
- const PseudoClassesAndElementsStr = Object.entries(PseudoClasses).map(([key]) => key).join("|");
571
- const PseudoClassesAndElementsColonStr = Object.entries(PseudoClassesColon).map(([key]) => key).join("|");
570
+ const PseudoClassesAndElementsStr = Object.entries(PseudoClasses).map(([key]) => key).sort((a, b) => b.length - a.length).join("|");
571
+ const PseudoClassesAndElementsColonStr = Object.entries(PseudoClassesColon).map(([key]) => key).sort((a, b) => b.length - a.length).join("|");
572
572
  function variantPseudoClassesAndElements() {
573
573
  let PseudoClassesAndElementsRE;
574
574
  let PseudoClassesAndElementsColonRE;
@@ -624,7 +624,7 @@ function variantPseudoClassFunctions() {
624
624
  if (match) {
625
625
  const fn = match[1];
626
626
  const fnVal = getBracket(match[2], "[", "]");
627
- const pseudo = fnVal ? handler.bracket(match[2]) : PseudoClasses[match[2]] || PseudoClassesColon[match[2]] || `:${match[2]}`;
627
+ const pseudo = fnVal ? h.bracket(match[2]) : PseudoClasses[match[2]] || PseudoClassesColon[match[2]] || `:${match[2]}`;
628
628
  return {
629
629
  matcher: input.slice(match[0].length),
630
630
  selector: (s) => `${s}:${fn}(${pseudo})`
@@ -1,7 +1,7 @@
1
1
  import { c as colors } from './preset-mini.1c66bf79.mjs';
2
- import { U as transformBase, V as boxShadowsBase, W as ringBase } from './preset-mini.6babd10a.mjs';
2
+ import { U as transformBase, V as boxShadowsBase, W as ringBase } from './preset-mini.17fe8f10.mjs';
3
3
  import '@unocss/core';
4
- import './preset-mini.64d922d5.mjs';
4
+ import './preset-mini.6c244f7e.mjs';
5
5
 
6
6
  const fontFamily = {
7
7
  sans: [
@@ -293,7 +293,7 @@ function bracketOfPosition(str) {
293
293
  return bracketWithType(str, "position");
294
294
  }
295
295
  function cssvar(str) {
296
- if (str.match(/^\$\S/))
296
+ if (str.match(/^\$[^\s'"`;{}]/))
297
297
  return `var(--${escapeSelector(str.slice(1))})`;
298
298
  }
299
299
  function time(str) {
@@ -360,7 +360,7 @@ const h = handler;
360
360
  const CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative";
361
361
  function directionSize(propertyPrefix) {
362
362
  return ([_, direction, size], { theme }) => {
363
- const v = theme.spacing?.[size || "DEFAULT"] ?? handler.bracket.cssvar.global.auto.fraction.rem(size);
363
+ const v = theme.spacing?.[size || "DEFAULT"] ?? h.bracket.cssvar.global.auto.fraction.rem(size);
364
364
  if (v != null)
365
365
  return directionMap[direction].map((i) => [`${propertyPrefix}${i}`, v]);
366
366
  };
@@ -400,16 +400,16 @@ function parseColor$1(body, theme) {
400
400
  if (!name)
401
401
  return;
402
402
  let color;
403
- const bracket = handler.bracketOfColor(main);
403
+ const bracket = h.bracketOfColor(main);
404
404
  const bracketOrMain = bracket || main;
405
- if (handler.numberWithUnit(bracketOrMain))
405
+ if (h.numberWithUnit(bracketOrMain))
406
406
  return;
407
407
  if (bracketOrMain.match(/^#[\da-fA-F]+/g))
408
408
  color = bracketOrMain;
409
409
  else if (bracketOrMain.match(/^hex-[\da-fA-F]+/g))
410
410
  color = `#${bracketOrMain.slice(4)}`;
411
411
  else if (main.startsWith("$"))
412
- color = handler.cssvar(main);
412
+ color = h.cssvar(main);
413
413
  color = color || bracket;
414
414
  if (!color) {
415
415
  const colorData = getThemeColor(theme, [main]);
@@ -445,7 +445,7 @@ function parseColor$1(body, theme) {
445
445
  no,
446
446
  color,
447
447
  cssColor: parseCssColor(color),
448
- alpha: handler.bracket.cssvar.percent(opacity ?? "")
448
+ alpha: h.bracket.cssvar.percent(opacity ?? "")
449
449
  };
450
450
  }
451
451
  function colorResolver(property, varName, shouldPass) {
@@ -770,4 +770,4 @@ function parseCssSpaceColorValues(componentString) {
770
770
  };
771
771
  }
772
772
 
773
- export { CONTROL_MINI_NO_NEGATIVE as C, hasParseableColor as a, cornerMap as b, colorResolver as c, directionMap as d, colorToString as e, colorOpacityToString as f, globalKeywords as g, handler as h, colorableShadows as i, insetMap as j, positionMap as k, resolveBreakpoints as l, makeGlobalStaticRules as m, numberWithUnitRE as n, directionSize as o, parseColor$1 as p, getBracket as q, resolveVerticalBreakpoints as r, splitShorthand as s, getComponent as t, hex2rgba as u, parseCssColor as v, h as w, xyzMap as x, valueHandlers as y, getComponents as z };
773
+ export { CONTROL_MINI_NO_NEGATIVE as C, hasParseableColor as a, cornerMap as b, colorResolver as c, directionMap as d, colorToString as e, colorOpacityToString as f, globalKeywords as g, h, colorableShadows as i, insetMap as j, positionMap as k, resolveBreakpoints as l, makeGlobalStaticRules as m, numberWithUnitRE as n, directionSize as o, parseColor$1 as p, getBracket as q, resolveVerticalBreakpoints as r, splitShorthand as s, getComponent as t, hex2rgba as u, parseCssColor as v, handler as w, xyzMap as x, valueHandlers as y, getComponents as z };
@@ -1,5 +1,5 @@
1
1
  import { escapeRegExp } from '@unocss/core';
2
- import { q as getBracket } from './preset-mini.64d922d5.mjs';
2
+ import { q as getBracket } from './preset-mini.6c244f7e.mjs';
3
3
 
4
4
  function variantMatcher(name, handler) {
5
5
  let re;
@@ -295,7 +295,7 @@ function bracketOfPosition(str) {
295
295
  return bracketWithType(str, "position");
296
296
  }
297
297
  function cssvar(str) {
298
- if (str.match(/^\$\S/))
298
+ if (str.match(/^\$[^\s'"`;{}]/))
299
299
  return `var(--${core.escapeSelector(str.slice(1))})`;
300
300
  }
301
301
  function time(str) {
@@ -362,7 +362,7 @@ const h = handler;
362
362
  const CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative";
363
363
  function directionSize(propertyPrefix) {
364
364
  return ([_, direction, size], { theme }) => {
365
- const v = theme.spacing?.[size || "DEFAULT"] ?? handler.bracket.cssvar.global.auto.fraction.rem(size);
365
+ const v = theme.spacing?.[size || "DEFAULT"] ?? h.bracket.cssvar.global.auto.fraction.rem(size);
366
366
  if (v != null)
367
367
  return directionMap[direction].map((i) => [`${propertyPrefix}${i}`, v]);
368
368
  };
@@ -402,16 +402,16 @@ function parseColor$1(body, theme) {
402
402
  if (!name)
403
403
  return;
404
404
  let color;
405
- const bracket = handler.bracketOfColor(main);
405
+ const bracket = h.bracketOfColor(main);
406
406
  const bracketOrMain = bracket || main;
407
- if (handler.numberWithUnit(bracketOrMain))
407
+ if (h.numberWithUnit(bracketOrMain))
408
408
  return;
409
409
  if (bracketOrMain.match(/^#[\da-fA-F]+/g))
410
410
  color = bracketOrMain;
411
411
  else if (bracketOrMain.match(/^hex-[\da-fA-F]+/g))
412
412
  color = `#${bracketOrMain.slice(4)}`;
413
413
  else if (main.startsWith("$"))
414
- color = handler.cssvar(main);
414
+ color = h.cssvar(main);
415
415
  color = color || bracket;
416
416
  if (!color) {
417
417
  const colorData = getThemeColor(theme, [main]);
@@ -447,7 +447,7 @@ function parseColor$1(body, theme) {
447
447
  no,
448
448
  color,
449
449
  cssColor: parseCssColor(color),
450
- alpha: handler.bracket.cssvar.percent(opacity ?? "")
450
+ alpha: h.bracket.cssvar.percent(opacity ?? "")
451
451
  };
452
452
  }
453
453
  function colorResolver(property, varName, shouldPass) {
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const core = require('@unocss/core');
4
- const colors = require('./preset-mini.099ab35c.cjs');
4
+ const colors = require('./preset-mini.a21c5071.cjs');
5
5
 
6
6
  function variantMatcher(name, handler) {
7
7
  let re;