@unocss/preset-mini 0.48.5 → 0.49.1

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,14 +1,14 @@
1
- import { h as handler, l as resolveBreakpoints, q as getBracket, C as CONTROL_MINI_NO_NEGATIVE, t as getComponent } from './preset-mini.ca595ab5.mjs';
1
+ import { h as handler, l as resolveBreakpoints, q as getBracket, C as CONTROL_MINI_NO_NEGATIVE, t as getComponent } from './preset-mini.d9489281.mjs';
2
2
  import { warnOnce, escapeRegExp, escapeSelector } from '@unocss/core';
3
- import { v as variantGetParameter, a as variantGetBracket, b as variantParentMatcher, c as variantMatcher } from './preset-mini.bd4c0c0c.mjs';
3
+ import { v as variantGetParameter, a as variantGetBracket, b as variantParentMatcher, c as variantMatcher } from './preset-mini.816a9399.mjs';
4
4
 
5
5
  const variantAria = {
6
6
  name: "aria",
7
- match(matcher, { theme }) {
8
- const variant = variantGetParameter("aria-", matcher, [":", "-"]);
7
+ match(matcher, ctx) {
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) ?? theme.aria?.[match] ?? "";
11
+ const aria = handler.bracket(match) ?? ctx.theme.aria?.[match] ?? "";
12
12
  if (aria) {
13
13
  return {
14
14
  matcher: rest,
@@ -19,74 +19,77 @@ const variantAria = {
19
19
  }
20
20
  };
21
21
 
22
- const regexCache = {};
23
22
  const calcMaxWidthBySize = (size) => {
24
23
  const value = size.match(/^-?[0-9]+\.?[0-9]*/)?.[0] || "";
25
24
  const unit = size.slice(value.length);
26
25
  const maxWidth = parseFloat(value) - 0.1;
27
26
  return Number.isNaN(maxWidth) ? size : `${maxWidth}${unit}`;
28
27
  };
29
- const variantBreakpoints = {
30
- name: "breakpoints",
31
- match(matcher, context) {
32
- const variantEntries = Object.entries(resolveBreakpoints(context) ?? {}).map(([point, size], idx) => [point, size, idx]);
33
- for (const [point, size, idx] of variantEntries) {
34
- if (!regexCache[point])
35
- regexCache[point] = new RegExp(`^((?:[al]t-)?${point}[:-])`);
36
- const match = matcher.match(regexCache[point]);
37
- if (!match)
38
- continue;
39
- const [, pre] = match;
40
- const m = matcher.slice(pre.length);
41
- if (m === "container")
42
- continue;
43
- const isLtPrefix = pre.startsWith("lt-");
44
- const isAtPrefix = pre.startsWith("at-");
45
- let order = 1e3;
46
- if (isLtPrefix) {
47
- order -= idx + 1;
48
- return {
49
- matcher: m,
50
- handle: (input, next) => next({
51
- ...input,
52
- parent: `${input.parent ? `${input.parent} $$ ` : ""}@media (max-width: ${calcMaxWidthBySize(size)})`,
53
- parentOrder: order
54
- })
55
- };
56
- }
57
- order += idx + 1;
58
- if (isAtPrefix && idx < variantEntries.length - 1) {
28
+ const variantBreakpoints = () => {
29
+ const regexCache = {};
30
+ return {
31
+ name: "breakpoints",
32
+ match(matcher, context) {
33
+ const variantEntries = Object.entries(resolveBreakpoints(context) ?? {}).map(([point, size], idx) => [point, size, idx]);
34
+ for (const [point, size, idx] of variantEntries) {
35
+ if (!regexCache[point])
36
+ regexCache[point] = new RegExp(`^((?:[al]t-)?${point}(?:${context.generator.config.separators.join("|")}))`);
37
+ const match = matcher.match(regexCache[point]);
38
+ if (!match)
39
+ continue;
40
+ const [, pre] = match;
41
+ const m = matcher.slice(pre.length);
42
+ if (m === "container")
43
+ continue;
44
+ const isLtPrefix = pre.startsWith("lt-");
45
+ const isAtPrefix = pre.startsWith("at-");
46
+ let order = 1e3;
47
+ if (isLtPrefix) {
48
+ order -= idx + 1;
49
+ return {
50
+ matcher: m,
51
+ handle: (input, next) => next({
52
+ ...input,
53
+ parent: `${input.parent ? `${input.parent} $$ ` : ""}@media (max-width: ${calcMaxWidthBySize(size)})`,
54
+ parentOrder: order
55
+ })
56
+ };
57
+ }
58
+ order += idx + 1;
59
+ if (isAtPrefix && idx < variantEntries.length - 1) {
60
+ return {
61
+ matcher: m,
62
+ handle: (input, next) => next({
63
+ ...input,
64
+ parent: `${input.parent ? `${input.parent} $$ ` : ""}@media (min-width: ${size}) and (max-width: ${calcMaxWidthBySize(variantEntries[idx + 1][1])})`,
65
+ parentOrder: order
66
+ })
67
+ };
68
+ }
59
69
  return {
60
70
  matcher: m,
61
71
  handle: (input, next) => next({
62
72
  ...input,
63
- parent: `${input.parent ? `${input.parent} $$ ` : ""}@media (min-width: ${size}) and (max-width: ${calcMaxWidthBySize(variantEntries[idx + 1][1])})`,
73
+ parent: `${input.parent ? `${input.parent} $$ ` : ""}@media (min-width: ${size})`,
64
74
  parentOrder: order
65
75
  })
66
76
  };
67
77
  }
68
- return {
69
- matcher: m,
70
- handle: (input, next) => next({
71
- ...input,
72
- parent: `${input.parent ? `${input.parent} $$ ` : ""}@media (min-width: ${size})`,
73
- parentOrder: order
74
- })
75
- };
76
- }
77
- },
78
- multiPass: true,
79
- autocomplete: "(at-|lt-|)$breakpoints:"
78
+ },
79
+ multiPass: true,
80
+ autocomplete: "(at-|lt-|)$breakpoints:"
81
+ };
80
82
  };
81
83
 
82
84
  const scopeMatcher = (name, combinator) => ({
83
85
  name: `combinator:${name}`,
84
- match(matcher) {
86
+ match(matcher, ctx) {
85
87
  if (!matcher.startsWith(name))
86
88
  return;
87
- let body = variantGetBracket(`${name}-`, matcher, [":", "-"]);
89
+ const separators = ctx.generator.config.separators;
90
+ let body = variantGetBracket(`${name}-`, matcher, separators);
88
91
  if (!body) {
89
- for (const separator of [":", "-"]) {
92
+ for (const separator of separators) {
90
93
  if (matcher.startsWith(`${name}${separator}`)) {
91
94
  body = ["", matcher.slice(name.length + separator.length)];
92
95
  break;
@@ -115,10 +118,10 @@ const variantCombinators = [
115
118
 
116
119
  const variantContainerQuery = {
117
120
  name: "@",
118
- match(matcher, { theme }) {
121
+ match(matcher, ctx) {
119
122
  if (matcher.startsWith("@container"))
120
123
  return;
121
- const variant = variantGetParameter("@", matcher, [":", "-"]);
124
+ const variant = variantGetParameter("@", matcher, ctx.generator.config.separators);
122
125
  if (variant) {
123
126
  const [match, rest, label] = variant;
124
127
  const unbracket = handler.bracket(match);
@@ -128,7 +131,7 @@ const variantContainerQuery = {
128
131
  if (minWidth)
129
132
  container = `(min-width: ${minWidth})`;
130
133
  } else {
131
- container = theme.containers?.[match] ?? "";
134
+ container = ctx.theme.containers?.[match] ?? "";
132
135
  }
133
136
  if (container) {
134
137
  warnOnce("The container query variant is experimental and may not follow semver.");
@@ -147,11 +150,11 @@ const variantContainerQuery = {
147
150
 
148
151
  const variantDataAttribute = {
149
152
  name: "data",
150
- match(matcher, { theme }) {
151
- const variant = variantGetParameter("data-", matcher, [":", "-"]);
153
+ match(matcher, ctx) {
154
+ const variant = variantGetParameter("data-", matcher, ctx.generator.config.separators);
152
155
  if (variant) {
153
156
  const [match, rest] = variant;
154
- const dataAttribute = handler.bracket(match) ?? theme.data?.[match] ?? "";
157
+ const dataAttribute = handler.bracket(match) ?? ctx.theme.data?.[match] ?? "";
155
158
  if (dataAttribute) {
156
159
  return {
157
160
  matcher: rest,
@@ -165,13 +168,13 @@ const variantDataAttribute = {
165
168
  const variantPrint = variantParentMatcher("print", "@media print");
166
169
  const variantCustomMedia = {
167
170
  name: "media",
168
- match(matcher, { theme }) {
169
- const variant = variantGetParameter("media-", matcher, [":", "-"]);
171
+ match(matcher, ctx) {
172
+ const variant = variantGetParameter("media-", matcher, ctx.generator.config.separators);
170
173
  if (variant) {
171
174
  const [match, rest] = variant;
172
175
  let media = handler.bracket(match) ?? "";
173
176
  if (media === "")
174
- media = theme.media?.[match] ?? "";
177
+ media = ctx.theme.media?.[match] ?? "";
175
178
  if (media) {
176
179
  return {
177
180
  matcher: rest,
@@ -188,13 +191,13 @@ const variantCustomMedia = {
188
191
 
189
192
  const variantSupports = {
190
193
  name: "supports",
191
- match(matcher, { theme }) {
192
- const variant = variantGetParameter("supports-", matcher, [":", "-"]);
194
+ match(matcher, ctx) {
195
+ const variant = variantGetParameter("supports-", matcher, ctx.generator.config.separators);
193
196
  if (variant) {
194
197
  const [match, rest] = variant;
195
198
  let supports = handler.bracket(match) ?? "";
196
199
  if (supports === "")
197
- supports = theme.supports?.[match] ?? "";
200
+ supports = ctx.theme.supports?.[match] ?? "";
198
201
  if (supports) {
199
202
  return {
200
203
  matcher: rest,
@@ -230,8 +233,8 @@ const variantLanguageDirections = [
230
233
 
231
234
  const variantSelector = {
232
235
  name: "selector",
233
- match(matcher) {
234
- const variant = variantGetBracket("selector-", matcher, [":", "-"]);
236
+ match(matcher, ctx) {
237
+ const variant = variantGetBracket("selector-", matcher, ctx.generator.config.separators);
235
238
  if (variant) {
236
239
  const [match, rest] = variant;
237
240
  const selector = handler.bracket(match);
@@ -246,8 +249,8 @@ const variantSelector = {
246
249
  };
247
250
  const variantCssLayer = {
248
251
  name: "layer",
249
- match(matcher) {
250
- const variant = variantGetParameter("layer-", matcher, [":", "-"]);
252
+ match(matcher, ctx) {
253
+ const variant = variantGetParameter("layer-", matcher, ctx.generator.config.separators);
251
254
  if (variant) {
252
255
  const [match, rest] = variant;
253
256
  const layer = handler.bracket(match) ?? match;
@@ -265,8 +268,8 @@ const variantCssLayer = {
265
268
  };
266
269
  const variantInternalLayer = {
267
270
  name: "uno-layer",
268
- match(matcher) {
269
- const variant = variantGetParameter("uno-layer-", matcher, [":", "-"]);
271
+ match(matcher, ctx) {
272
+ const variant = variantGetParameter("uno-layer-", matcher, ctx.generator.config.separators);
270
273
  if (variant) {
271
274
  const [match, rest] = variant;
272
275
  const layer = handler.bracket(match) ?? match;
@@ -281,8 +284,8 @@ const variantInternalLayer = {
281
284
  };
282
285
  const variantScope = {
283
286
  name: "scope",
284
- match(matcher) {
285
- const variant = variantGetBracket("scope-", matcher, [":", "-"]);
287
+ match(matcher, ctx) {
288
+ const variant = variantGetBracket("scope-", matcher, ctx.generator.config.separators);
286
289
  if (variant) {
287
290
  const [match, rest] = variant;
288
291
  const scope = handler.bracket(match);
@@ -297,14 +300,14 @@ const variantScope = {
297
300
  };
298
301
  const variantVariables = {
299
302
  name: "variables",
300
- match(matcher) {
303
+ match(matcher, ctx) {
301
304
  if (!matcher.startsWith("["))
302
305
  return;
303
306
  const [match, rest] = getBracket(matcher, "[", "]") ?? [];
304
307
  if (!(match && rest))
305
308
  return;
306
309
  let newMatcher;
307
- for (const separator of [":", "-"]) {
310
+ for (const separator of ctx.generator.config.separators) {
308
311
  if (rest.startsWith(separator)) {
309
312
  newMatcher = rest.slice(separator.length);
310
313
  break;
@@ -380,28 +383,33 @@ const variantNegative = {
380
383
  }
381
384
  };
382
385
 
383
- const variantImportant = {
384
- name: "important",
385
- match(matcher) {
386
- let base;
387
- const match = matcher.match(/^(important[:-]|!)/);
388
- if (match)
389
- base = matcher.slice(match[0].length);
390
- else if (matcher.endsWith("!"))
391
- base = matcher.slice(0, -1);
392
- if (base) {
393
- return {
394
- matcher: base,
395
- body: (body) => {
396
- body.forEach((v) => {
397
- if (v[1])
398
- v[1] += " !important";
399
- });
400
- return body;
401
- }
402
- };
386
+ const variantImportant = () => {
387
+ let re;
388
+ return {
389
+ name: "important",
390
+ match(matcher, ctx) {
391
+ if (!re)
392
+ re = new RegExp(`^(important(?:${ctx.generator.config.separators.join("|")})|!)`);
393
+ let base;
394
+ const match = matcher.match(re);
395
+ if (match)
396
+ base = matcher.slice(match[0].length);
397
+ else if (matcher.endsWith("!"))
398
+ base = matcher.slice(0, -1);
399
+ if (base) {
400
+ return {
401
+ matcher: base,
402
+ body: (body) => {
403
+ body.forEach((v) => {
404
+ if (v[1])
405
+ v[1] += " !important";
406
+ });
407
+ return body;
408
+ }
409
+ };
410
+ }
403
411
  }
404
- }
412
+ };
405
413
  };
406
414
 
407
415
  const PseudoClasses = Object.fromEntries([
@@ -469,8 +477,9 @@ const sortValue = (pseudo) => {
469
477
  };
470
478
  const taggedPseudoClassMatcher = (tag, parent, combinator) => {
471
479
  const rawRE = new RegExp(`^(${escapeRegExp(parent)}:)(\\S+)${escapeRegExp(combinator)}\\1`);
472
- const pseudoRE = new RegExp(`^${tag}-(?:(?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesStr}))(?:(/\\w+))?[:-]`);
473
- const pseudoColonRE = new RegExp(`^${tag}-(?:(?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesColonStr}))(?:(/\\w+))?[:]`);
480
+ let splitRE;
481
+ let pseudoRE;
482
+ let pseudoColonRE;
474
483
  const matchBracket = (input) => {
475
484
  const body = variantGetBracket(`${tag}-`, input, []);
476
485
  if (!body)
@@ -479,7 +488,7 @@ const taggedPseudoClassMatcher = (tag, parent, combinator) => {
479
488
  const bracketValue = handler.bracket(match);
480
489
  if (bracketValue == null)
481
490
  return;
482
- const label = rest.split(/[:-]/, 1)?.[0] ?? "";
491
+ const label = rest.split(splitRE, 1)?.[0] ?? "";
483
492
  const prefix = `${parent}${escapeSelector(label)}`;
484
493
  return [
485
494
  label,
@@ -505,7 +514,12 @@ const taggedPseudoClassMatcher = (tag, parent, combinator) => {
505
514
  };
506
515
  return {
507
516
  name: `pseudo:${tag}`,
508
- match(input) {
517
+ match(input, ctx) {
518
+ if (!(splitRE && pseudoRE && pseudoColonRE)) {
519
+ splitRE = new RegExp(`(?:${ctx.generator.config.separators.join("|")})`);
520
+ pseudoRE = new RegExp(`^${tag}-(?:(?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesStr}))(?:(/\\w+))?(?:${ctx.generator.config.separators.join("|")})`);
521
+ pseudoColonRE = new RegExp(`^${tag}-(?:(?:(${PseudoClassFunctionsStr})-)?(${PseudoClassesColonStr}))(?:(/\\w+))?(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
522
+ }
509
523
  if (!input.startsWith(tag))
510
524
  return;
511
525
  const result = matchBracket(input) || matchPseudo(input);
@@ -528,50 +542,62 @@ const taggedPseudoClassMatcher = (tag, parent, combinator) => {
528
542
  };
529
543
  const PseudoClassesAndElementsStr = Object.entries(PseudoClasses).map(([key]) => key).join("|");
530
544
  const PseudoClassesAndElementsColonStr = Object.entries(PseudoClassesColon).map(([key]) => key).join("|");
531
- const PseudoClassesAndElementsRE = new RegExp(`^(${PseudoClassesAndElementsStr})[:-]`);
532
- const PseudoClassesAndElementsColonRE = new RegExp(`^(${PseudoClassesAndElementsColonStr})[:]`);
533
- const variantPseudoClassesAndElements = {
534
- name: "pseudo",
535
- match(input) {
536
- const match = input.match(PseudoClassesAndElementsRE) || input.match(PseudoClassesAndElementsColonRE);
537
- if (match) {
538
- const pseudo = PseudoClasses[match[1]] || PseudoClassesColon[match[1]] || `:${match[1]}`;
539
- return {
540
- matcher: input.slice(match[0].length),
541
- handle: (input2, next) => {
542
- const selectors = pseudo.startsWith("::") ? {
543
- pseudo: `${input2.pseudo}${pseudo}`
544
- } : {
545
- selector: `${input2.selector}${pseudo}`
546
- };
547
- return next({
548
- ...input2,
549
- ...selectors,
550
- sort: sortValue(match[1])
551
- });
552
- }
553
- };
554
- }
555
- },
556
- multiPass: true,
557
- autocomplete: `(${PseudoClassesAndElementsStr}):`
545
+ const variantPseudoClassesAndElements = () => {
546
+ let PseudoClassesAndElementsRE;
547
+ let PseudoClassesAndElementsColonRE;
548
+ return {
549
+ name: "pseudo",
550
+ match(input, ctx) {
551
+ if (!(PseudoClassesAndElementsRE && PseudoClassesAndElementsRE)) {
552
+ PseudoClassesAndElementsRE = new RegExp(`^(${PseudoClassesAndElementsStr})(?:${ctx.generator.config.separators.join("|")})`);
553
+ PseudoClassesAndElementsColonRE = new RegExp(`^(${PseudoClassesAndElementsColonStr})(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
554
+ }
555
+ const match = input.match(PseudoClassesAndElementsRE) || input.match(PseudoClassesAndElementsColonRE);
556
+ if (match) {
557
+ const pseudo = PseudoClasses[match[1]] || PseudoClassesColon[match[1]] || `:${match[1]}`;
558
+ return {
559
+ matcher: input.slice(match[0].length),
560
+ handle: (input2, next) => {
561
+ const selectors = pseudo.startsWith("::") ? {
562
+ pseudo: `${input2.pseudo}${pseudo}`
563
+ } : {
564
+ selector: `${input2.selector}${pseudo}`
565
+ };
566
+ return next({
567
+ ...input2,
568
+ ...selectors,
569
+ sort: sortValue(match[1])
570
+ });
571
+ }
572
+ };
573
+ }
574
+ },
575
+ multiPass: true,
576
+ autocomplete: `(${PseudoClassesAndElementsStr}|${PseudoClassesAndElementsColonStr}):`
577
+ };
558
578
  };
559
- const PseudoClassFunctionsRE = new RegExp(`^(${PseudoClassFunctionsStr})-(${PseudoClassesStr})[:-]`);
560
- const PseudoClassColonFunctionsRE = new RegExp(`^(${PseudoClassFunctionsStr})-(${PseudoClassesColonStr})[:]`);
561
- const variantPseudoClassFunctions = {
562
- match(input) {
563
- const match = input.match(PseudoClassFunctionsRE) || input.match(PseudoClassColonFunctionsRE);
564
- if (match) {
565
- const fn = match[1];
566
- const pseudo = PseudoClasses[match[2]] || PseudoClassesColon[match[2]] || `:${match[2]}`;
567
- return {
568
- matcher: input.slice(match[0].length),
569
- selector: (s) => `${s}:${fn}(${pseudo})`
570
- };
571
- }
572
- },
573
- multiPass: true,
574
- autocomplete: `(${PseudoClassFunctionsStr})-(${PseudoClassesStr}|${PseudoClassesColonStr}):`
579
+ const variantPseudoClassFunctions = () => {
580
+ let PseudoClassFunctionsRE;
581
+ let PseudoClassColonFunctionsRE;
582
+ return {
583
+ match(input, ctx) {
584
+ if (!(PseudoClassFunctionsRE && PseudoClassColonFunctionsRE)) {
585
+ PseudoClassFunctionsRE = new RegExp(`^(${PseudoClassFunctionsStr})-(${PseudoClassesStr})(?:${ctx.generator.config.separators.join("|")})`);
586
+ PseudoClassColonFunctionsRE = new RegExp(`^(${PseudoClassFunctionsStr})-(${PseudoClassesColonStr})(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
587
+ }
588
+ const match = input.match(PseudoClassFunctionsRE) || input.match(PseudoClassColonFunctionsRE);
589
+ if (match) {
590
+ const fn = match[1];
591
+ const pseudo = PseudoClasses[match[2]] || PseudoClassesColon[match[2]] || `:${match[2]}`;
592
+ return {
593
+ matcher: input.slice(match[0].length),
594
+ selector: (s) => `${s}:${fn}(${pseudo})`
595
+ };
596
+ }
597
+ },
598
+ multiPass: true,
599
+ autocomplete: `(${PseudoClassFunctionsStr})-(${PseudoClassesStr}|${PseudoClassesColonStr}):`
600
+ };
575
601
  };
576
602
  const variantTaggedPseudoClasses = (options = {}) => {
577
603
  const attributify = !!options?.attributifyPseudo;
@@ -604,14 +630,14 @@ const variants = (options) => [
604
630
  variantSelector,
605
631
  variantInternalLayer,
606
632
  variantNegative,
607
- variantImportant,
633
+ variantImportant(),
608
634
  variantSupports,
609
635
  variantPrint,
610
636
  variantCustomMedia,
611
- variantBreakpoints,
637
+ variantBreakpoints(),
612
638
  ...variantCombinators,
613
- variantPseudoClassesAndElements,
614
- variantPseudoClassFunctions,
639
+ variantPseudoClassesAndElements(),
640
+ variantPseudoClassFunctions(),
615
641
  ...variantTaggedPseudoClasses(options),
616
642
  partClasses,
617
643
  ...variantColorsMediaOrClass(options),
@@ -1,5 +1,5 @@
1
- import { d as displays, b as borders, c as contentVisibility, a as contents, f as fonts, t as tabSizes, e as textIndents, g as textOverflows, h as textDecorations, i as textStrokes, j as textShadows, k as textTransforms, l as textAligns, m as fontStyles, n as fontSmoothings, o as boxShadows, r as rings, p as positions, q as cursors, s as appearances, u as pointerEvents, v as resizes, w as verticalAligns, x as userSelects, y as whitespaces, z as breaks, A as overflows, B as outline, C as appearance, D as orders, E as justifies, F as alignments, G as placements, H as insets, I as floats, J as zIndexes, K as boxSizing, L as transitions, M as transforms, N as willChange, O as contains } from './preset-mini.a6daaf18.mjs';
2
- import { h as handler, c as colorResolver, n as numberWithUnitRE, r as resolveVerticalBreakpoints, l as resolveBreakpoints, o as directionSize } from './preset-mini.ca595ab5.mjs';
1
+ import { d as displays, b as borders, c as contentVisibility, a as contents, f as fonts, t as tabSizes, e as textIndents, g as textOverflows, h as textDecorations, i as textStrokes, j as textShadows, k as textTransforms, l as textAligns, m as fontStyles, n as fontSmoothings, o as boxShadows, r as rings, p as positions, q as cursors, s as appearances, u as pointerEvents, v as resizes, w as verticalAligns, x as userSelects, y as whitespaces, z as breaks, A as overflows, B as outline, C as appearance, D as orders, E as justifies, F as alignments, G as placements, H as insets, I as floats, J as zIndexes, K as boxSizing, L as transitions, M as transforms, N as willChange, O as contains } from './preset-mini.8c7d231d.mjs';
2
+ import { h as handler, c as colorResolver, n as numberWithUnitRE, r as resolveVerticalBreakpoints, l as resolveBreakpoints, o as directionSize } from './preset-mini.d9489281.mjs';
3
3
  import { warnOnce } from '@unocss/core';
4
4
 
5
5
  const opacity = [
@@ -212,7 +212,7 @@ const cssVariables = [
212
212
  }]
213
213
  ];
214
214
  const cssProperty = [
215
- [/^\[(--(\w|\\\W)+|[\w-]+):(.+)\]$/, ([match, prop, , value]) => {
215
+ [/^\[(--(\w|\\\W)+|[\w-]+):([^:].*)\]$/, ([match, prop, , value]) => {
216
216
  if (!isURI(match.slice(1, -1)))
217
217
  return { [prop]: handler.bracket(`[${value}]`) };
218
218
  }]
@@ -20,7 +20,9 @@ const directionMap = {
20
20
  const insetMap = {
21
21
  ...directionMap,
22
22
  s: ["-inset-inline-start"],
23
+ start: ["-inset-inline-start"],
23
24
  e: ["-inset-inline-end"],
25
+ end: ["-inset-inline-end"],
24
26
  bs: ["-inset-block-start"],
25
27
  be: ["-inset-block-end"],
26
28
  is: ["-inset-inline-start"],
@@ -44,14 +46,20 @@ const cornerMap = {
44
46
  "": [""],
45
47
  "bs": ["-start-start", "-start-end"],
46
48
  "be": ["-end-start", "-end-end"],
49
+ "s": ["-end-start", "-start-start"],
47
50
  "is": ["-end-start", "-start-start"],
51
+ "e": ["-start-end", "-end-end"],
48
52
  "ie": ["-start-end", "-end-end"],
53
+ "ss": ["-start-start"],
49
54
  "bs-is": ["-start-start"],
50
55
  "is-bs": ["-start-start"],
56
+ "se": ["-start-end"],
51
57
  "bs-ie": ["-start-end"],
52
58
  "ie-bs": ["-start-end"],
59
+ "es": ["-end-start"],
53
60
  "be-is": ["-end-start"],
54
61
  "is-be": ["-end-start"],
62
+ "ee": ["-end-end"],
55
63
  "be-ie": ["-end-end"],
56
64
  "ie-be": ["-end-end"]
57
65
  };
@@ -248,8 +256,12 @@ function bracketWithType(str, requiredType) {
248
256
  case "quoted":
249
257
  return base.replace(/(^|[^\\])_/g, "$1 ").replace(/\\_/g, "_").replace(/(["\\])/g, "\\$1").replace(/^(.+)$/, '"$1"');
250
258
  }
251
- return base.replace(/(url\(.*?\))/g, (v) => v.replace(/_/g, "\\_")).replace(/(^|[^\\])_/g, "$1 ").replace(/\\_/g, "_").replace(/(?:calc|clamp|max|min)\((.*)/g, (v) => {
252
- return v.replace(/(-?\d*\.?\d(?!\b-.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, "$1 $2 ");
259
+ return base.replace(/(url\(.*?\))/g, (v) => v.replace(/_/g, "\\_")).replace(/(^|[^\\])_/g, "$1 ").replace(/\\_/g, "_").replace(/(?:calc|clamp|max|min)\((.*)/g, (match2) => {
260
+ const vars = [];
261
+ return match2.replace(/var\((--.+?)[,)]/g, (match3, g1) => {
262
+ vars.push(g1);
263
+ return match3.replace(g1, "--v");
264
+ }).replace(/(-?\d*\.?\d(?!\b-\d.+[,)](?![^+\-/*])\D)(?:%|[a-z]+)?|\))([+\-/*])/g, "$1 $2 ").replace("--v", () => vars.shift());
253
265
  });
254
266
  }
255
267
  }
package/dist/theme.cjs CHANGED
@@ -3,9 +3,9 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const colors = require('./shared/preset-mini.30606736.cjs');
6
- const _default = require('./shared/preset-mini.43dfafb9.cjs');
7
- require('./shared/preset-mini.8953ff1a.cjs');
8
- require('./shared/preset-mini.e54ce13d.cjs');
6
+ const _default = require('./shared/preset-mini.3a9c563b.cjs');
7
+ require('./shared/preset-mini.5d6b20c4.cjs');
8
+ require('./shared/preset-mini.65179802.cjs');
9
9
  require('@unocss/core');
10
10
 
11
11
 
package/dist/theme.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  export { c as colors } from './shared/preset-mini.65ac75be.mjs';
2
- export { p as baseSize, b as blur, m as borderRadius, n as boxShadow, i as breakpoints, z as containers, d as dropShadow, k as duration, o as easing, f as fontFamily, a as fontSize, x as height, h as letterSpacing, l as lineHeight, j as lineWidth, y as maxHeight, u as maxWidth, A as preflightBase, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, q as width, w as wordSpacing } from './shared/preset-mini.0a36abfc.mjs';
3
- import './shared/preset-mini.a6daaf18.mjs';
4
- import './shared/preset-mini.ca595ab5.mjs';
2
+ export { p as baseSize, b as blur, m as borderRadius, n as boxShadow, i as breakpoints, z as containers, d as dropShadow, k as duration, o as easing, f as fontFamily, a as fontSize, x as height, h as letterSpacing, l as lineHeight, j as lineWidth, y as maxHeight, u as maxWidth, A as preflightBase, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, q as width, w as wordSpacing } from './shared/preset-mini.708f19ca.mjs';
3
+ import './shared/preset-mini.8c7d231d.mjs';
4
+ import './shared/preset-mini.d9489281.mjs';
5
5
  import '@unocss/core';
package/dist/utils.cjs CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const colors = require('./shared/preset-mini.e54ce13d.cjs');
6
- const variants = require('./shared/preset-mini.28b1d01c.cjs');
5
+ const colors = require('./shared/preset-mini.65179802.cjs');
6
+ const variants = require('./shared/preset-mini.77e00c7b.cjs');
7
7
  require('@unocss/core');
8
8
 
9
9
 
package/dist/utils.mjs CHANGED
@@ -1,3 +1,3 @@
1
- export { C as CONTROL_MINI_NO_NEGATIVE, f as colorOpacityToString, c as colorResolver, e as colorToString, i as colorableShadows, b as cornerMap, d as directionMap, o as directionSize, q as getBracket, t as getComponent, z as getComponents, g as globalKeywords, w as h, h as handler, a as hasParseableColor, u as hex2rgba, j as insetMap, m as makeGlobalStaticRules, p as parseColor, v as parseCssColor, k as positionMap, l as resolveBreakpoints, r as resolveVerticalBreakpoints, s as splitShorthand, y as valueHandlers, x as xyzMap } from './shared/preset-mini.ca595ab5.mjs';
2
- export { a as variantGetBracket, v as variantGetParameter, c as variantMatcher, b as variantParentMatcher } from './shared/preset-mini.bd4c0c0c.mjs';
1
+ export { C as CONTROL_MINI_NO_NEGATIVE, f as colorOpacityToString, c as colorResolver, e as colorToString, i as colorableShadows, b as cornerMap, d as directionMap, o as directionSize, q as getBracket, t as getComponent, z as getComponents, g as globalKeywords, w as h, h as handler, a as hasParseableColor, u as hex2rgba, j as insetMap, m as makeGlobalStaticRules, p as parseColor, v as parseCssColor, k as positionMap, l as resolveBreakpoints, r as resolveVerticalBreakpoints, s as splitShorthand, y as valueHandlers, x as xyzMap } from './shared/preset-mini.d9489281.mjs';
2
+ export { a as variantGetBracket, v as variantGetParameter, c as variantMatcher, b as variantParentMatcher } from './shared/preset-mini.816a9399.mjs';
3
3
  import '@unocss/core';
package/dist/variants.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- const _default = require('./shared/preset-mini.89cb41ec.cjs');
6
- require('./shared/preset-mini.e54ce13d.cjs');
5
+ const _default = require('./shared/preset-mini.6f1356df.cjs');
6
+ require('./shared/preset-mini.65179802.cjs');
7
7
  require('@unocss/core');
8
- require('./shared/preset-mini.28b1d01c.cjs');
8
+ require('./shared/preset-mini.77e00c7b.cjs');
9
9
 
10
10
 
11
11