@unocss/preset-mini 0.17.2 → 0.17.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.
- package/dist/chunks/default2.cjs +39 -109
- package/dist/chunks/default2.mjs +41 -107
- package/dist/chunks/pseudo.cjs +1 -0
- package/dist/chunks/pseudo.mjs +1 -0
- package/dist/rules.cjs +0 -4
- package/dist/rules.d.ts +1 -5
- package/dist/rules.mjs +1 -1
- package/package.json +2 -2
package/dist/chunks/default2.cjs
CHANGED
|
@@ -19,38 +19,12 @@ const textAligns = [
|
|
|
19
19
|
["text-justify", { "text-align": "justify" }]
|
|
20
20
|
];
|
|
21
21
|
|
|
22
|
-
const outlineStyle = ["auto", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset", "inherit", "initial", "revert", "unset"];
|
|
23
|
-
const parseOutlineSize = (s) => {
|
|
24
|
-
const propName = ["width", "offset"].find((item) => s.startsWith(item)) || "width";
|
|
25
|
-
const size = utilities.handler.bracket.fraction.auto.rem(s.replace(/^(offset\-|width\-|size\-)/, ""));
|
|
26
|
-
if (size) {
|
|
27
|
-
return {
|
|
28
|
-
[`outline-${propName}`]: size
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
22
|
const outline = [
|
|
23
|
+
[/^outline-(?:width-|size-)?(.+)$/, ([, d]) => ({ "outline-width": utilities.handler.bracket.fraction.auto.rem(d) })],
|
|
24
|
+
[/^outline-(?:color-)?(.+)$/, utilities.colorResolver("outline-color", "outline-color")],
|
|
25
|
+
[/^outline-offset-(.+)$/, ([, d]) => ({ "outline-offset": utilities.handler.bracket.fraction.auto.rem(d) })],
|
|
33
26
|
["outline", { "outline-style": "solid" }],
|
|
34
|
-
[
|
|
35
|
-
/^outline-(.+)$/,
|
|
36
|
-
(match, config) => {
|
|
37
|
-
const [, d] = match;
|
|
38
|
-
if (outlineStyle.includes(d)) {
|
|
39
|
-
return {
|
|
40
|
-
"outline-style": d
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
const colorSheet = utilities.colorResolver("outline-color", "outline-color")([
|
|
44
|
-
match[0],
|
|
45
|
-
match[1].replace(/^color-/, "")
|
|
46
|
-
], config);
|
|
47
|
-
if (colorSheet)
|
|
48
|
-
return colorSheet;
|
|
49
|
-
const sizeSheet = parseOutlineSize(d);
|
|
50
|
-
if (sizeSheet)
|
|
51
|
-
return sizeSheet;
|
|
52
|
-
}
|
|
53
|
-
],
|
|
27
|
+
[/^outline-(auto|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|revert|unset)$/, ([, c]) => ({ "outline-style": c })],
|
|
54
28
|
["outline-none", { "outline": "2px solid transparent", "outline-offset": "2px" }]
|
|
55
29
|
];
|
|
56
30
|
const appearance = [
|
|
@@ -59,21 +33,6 @@ const appearance = [
|
|
|
59
33
|
"-webkit-appearance": "none"
|
|
60
34
|
}]
|
|
61
35
|
];
|
|
62
|
-
const placeholder = [
|
|
63
|
-
[
|
|
64
|
-
/^placeholder-opacity-(\d+)$/,
|
|
65
|
-
([, d]) => ({
|
|
66
|
-
"placeholder-opacity": utilities.handler.bracket.percent(d)
|
|
67
|
-
})
|
|
68
|
-
],
|
|
69
|
-
[
|
|
70
|
-
/^placeholder-(?!opacity)(.+)$/,
|
|
71
|
-
(match, config) => {
|
|
72
|
-
match[1] = match[1].replace(/^color-/, "");
|
|
73
|
-
return utilities.colorResolver("placeholder-color", "placeholder-color")(match, config);
|
|
74
|
-
}
|
|
75
|
-
]
|
|
76
|
-
];
|
|
77
36
|
const willChange = [
|
|
78
37
|
[/^will-change-(.+)/, ([, p]) => ({ "will-change": utilities.handler.properties.global(p) })]
|
|
79
38
|
];
|
|
@@ -87,14 +46,14 @@ const borders = [
|
|
|
87
46
|
[/^(?:border|b)()-(.+)$/, handlerBorderColor],
|
|
88
47
|
[/^(?:border|b)-([^-]+)(?:-(.+))?$/, handlerBorderColor],
|
|
89
48
|
[/^(?:border|b)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-border-opacity": utilities.handler.bracket.percent(opacity) })],
|
|
49
|
+
[/^(?:border-)?(?:rounded|rd)$/, handlerRounded],
|
|
50
|
+
[/^(?:border-)?(?:rounded|rd)(?:-(.+))?$/, handlerRounded],
|
|
51
|
+
[/^(?:border-)?(?:rounded|rd)(?:-([^-]+))?(?:-(.+))?$/, handlerRounded],
|
|
90
52
|
["border-solid", { "border-style": "solid" }],
|
|
91
53
|
["border-dashed", { "border-style": "dashed" }],
|
|
92
54
|
["border-dotted", { "border-style": "dotted" }],
|
|
93
55
|
["border-double", { "border-style": "double" }],
|
|
94
|
-
["border-none", { "border-style": "none" }]
|
|
95
|
-
[/^(?:border-)?(?:rounded|rd)$/, handlerRounded],
|
|
96
|
-
[/^(?:border-)?(?:rounded|rd)(?:-(.+))?$/, handlerRounded],
|
|
97
|
-
[/^(?:border-)?(?:rounded|rd)(?:-([^-]+))?(?:-(.+))?$/, handlerRounded]
|
|
56
|
+
["border-none", { "border-style": "none" }]
|
|
98
57
|
];
|
|
99
58
|
function handlerBorder(m) {
|
|
100
59
|
const borderSizes = handlerBorderSize(m);
|
|
@@ -134,18 +93,6 @@ const bgColors = [
|
|
|
134
93
|
[/^bg-(.+)$/, utilities.colorResolver("background-color", "bg")],
|
|
135
94
|
[/^bg-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-bg-opacity": utilities.handler.bracket.percent(opacity2) })]
|
|
136
95
|
];
|
|
137
|
-
const borderColors = [
|
|
138
|
-
[/^(?:border|b)-(.+)$/, utilities.colorResolver("border-color", "border")],
|
|
139
|
-
[/^(?:border|b)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-border-opacity": utilities.handler.bracket.percent(opacity2) })]
|
|
140
|
-
];
|
|
141
|
-
const ringColors = [
|
|
142
|
-
[/^ring-(.+)$/, utilities.colorResolver("--un-ring-color", "ring")],
|
|
143
|
-
[/^ring-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-ring-opacity": utilities.handler.bracket.percent(opacity2) })]
|
|
144
|
-
];
|
|
145
|
-
const ringOffsetColors = [
|
|
146
|
-
[/^ring-offset-(.+)$/, utilities.colorResolver("--un-ring-offset-color", "ring-offset")],
|
|
147
|
-
[/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-ring-offset-opacity": utilities.handler.bracket.percent(opacity2) })]
|
|
148
|
-
];
|
|
149
96
|
|
|
150
97
|
const transitionProperty = (prop) => {
|
|
151
98
|
return utilities.handler.properties(prop) || (prop === "all" ? prop : void 0);
|
|
@@ -294,30 +241,17 @@ const textShadows = [
|
|
|
294
241
|
];
|
|
295
242
|
|
|
296
243
|
const gaps = [
|
|
297
|
-
[/^(?:flex-|grid-)?gap-([^-]+)$/, ([, s]) => {
|
|
298
|
-
const v = utilities.handler.bracket.auto.rem(s);
|
|
299
|
-
if (v != null) {
|
|
300
|
-
return {
|
|
301
|
-
"grid-gap": v,
|
|
302
|
-
"gap": v
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
|
-
}],
|
|
306
|
-
[/^(?:flex-|grid-)?gap-x-([^-]+)$/, ([, s]) => {
|
|
244
|
+
[/^(?:flex-|grid-)?gap-(x-|y-)?([^-]+)$/, ([, d = "", s]) => {
|
|
307
245
|
const v = utilities.handler.bracket.auto.rem(s);
|
|
308
246
|
if (v != null) {
|
|
247
|
+
const direction = {
|
|
248
|
+
"": "",
|
|
249
|
+
"x-": "column-",
|
|
250
|
+
"y-": "row-"
|
|
251
|
+
}[d];
|
|
309
252
|
return {
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
};
|
|
313
|
-
}
|
|
314
|
-
}],
|
|
315
|
-
[/^(?:flex-|grid-)?gap-y-([^-]+)$/, ([, s]) => {
|
|
316
|
-
const v = utilities.handler.bracket.auto.rem(s);
|
|
317
|
-
if (v != null) {
|
|
318
|
-
return {
|
|
319
|
-
"grid-row-gap": v,
|
|
320
|
-
"row-gap": v
|
|
253
|
+
[`grid-${direction}gap`]: v,
|
|
254
|
+
[`${direction}gap`]: v
|
|
321
255
|
};
|
|
322
256
|
}
|
|
323
257
|
}]
|
|
@@ -351,7 +285,7 @@ const grids = [
|
|
|
351
285
|
if (parts[0] === "span") {
|
|
352
286
|
if (parts[1] === "full")
|
|
353
287
|
return { [key]: "1/-1" };
|
|
354
|
-
raw = utilities.handler.number.bracket(parts[1])
|
|
288
|
+
raw = utilities.handler.number.bracket(parts[1]);
|
|
355
289
|
if (raw)
|
|
356
290
|
return { [key]: `span ${raw}/span ${raw}` };
|
|
357
291
|
}
|
|
@@ -397,7 +331,9 @@ const justifies = [
|
|
|
397
331
|
...basicSet.map((i) => [`justify-self-${i}`, { "justify-self": i }])
|
|
398
332
|
];
|
|
399
333
|
const orders = [
|
|
400
|
-
[/^order-(.+)$/, ([, v]) => ({ order:
|
|
334
|
+
[/^order-(.+)$/, ([, v]) => ({ order: utilities.handler.bracket.number(v) })],
|
|
335
|
+
["order-first", { order: "-9999" }],
|
|
336
|
+
["order-last", { order: "9999" }],
|
|
401
337
|
["order-none", { order: "0" }]
|
|
402
338
|
];
|
|
403
339
|
const alignments = [
|
|
@@ -441,9 +377,12 @@ const insets = [
|
|
|
441
377
|
}]
|
|
442
378
|
];
|
|
443
379
|
const floats = [
|
|
444
|
-
[
|
|
380
|
+
["float-left", { float: "left" }],
|
|
381
|
+
["float-right", { float: "right" }],
|
|
445
382
|
["float-none", { float: "none" }],
|
|
446
|
-
[
|
|
383
|
+
["clear-left", { clear: "left" }],
|
|
384
|
+
["clear-right", { clear: "right" }],
|
|
385
|
+
["clear-both", { clear: "both" }],
|
|
447
386
|
["clear-none", { clear: "none" }]
|
|
448
387
|
];
|
|
449
388
|
const zIndexes = [
|
|
@@ -451,12 +390,8 @@ const zIndexes = [
|
|
|
451
390
|
[/^z-([^-]+)$/, ([, v]) => ({ "z-index": utilities.handler.number(v) })]
|
|
452
391
|
];
|
|
453
392
|
const boxSizing = [
|
|
454
|
-
[
|
|
455
|
-
|
|
456
|
-
([, value]) => ({
|
|
457
|
-
"box-sizing": `${value}-box`
|
|
458
|
-
})
|
|
459
|
-
]
|
|
393
|
+
["box-border", { "box-sizing": "border-box" }],
|
|
394
|
+
["box-content", { "box-sizing": "content-box" }]
|
|
460
395
|
];
|
|
461
396
|
|
|
462
397
|
const varEmpty = "var(--un-empty,/*!*/ /*!*/)";
|
|
@@ -489,7 +424,9 @@ const resizes = [
|
|
|
489
424
|
["resize-none", { resize: "none" }]
|
|
490
425
|
];
|
|
491
426
|
const userSelects = [
|
|
492
|
-
[
|
|
427
|
+
["select-auto", { "user-select": "auto" }],
|
|
428
|
+
["select-all", { "user-select": "all" }],
|
|
429
|
+
["select-text", { "user-select": "text" }],
|
|
493
430
|
["select-none", { "user-select": "none" }]
|
|
494
431
|
];
|
|
495
432
|
const whitespaces = [
|
|
@@ -553,9 +490,11 @@ const rings = [
|
|
|
553
490
|
if (value)
|
|
554
491
|
return { "--un-ring-offset-width": value };
|
|
555
492
|
}],
|
|
556
|
-
[
|
|
557
|
-
|
|
558
|
-
|
|
493
|
+
[/^ring-(.+)$/, utilities.colorResolver("--un-ring-color", "ring")],
|
|
494
|
+
[/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": utilities.handler.bracket.percent(opacity) })],
|
|
495
|
+
[/^ring-offset-(.+)$/, utilities.colorResolver("--un-ring-offset-color", "ring-offset")],
|
|
496
|
+
[/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": utilities.handler.bracket.percent(opacity) })],
|
|
497
|
+
["ring-inset", { "--un-ring-inset": "inset" }]
|
|
559
498
|
];
|
|
560
499
|
|
|
561
500
|
const colorResolver = (body, theme) => {
|
|
@@ -775,14 +714,8 @@ const textDecorations = [
|
|
|
775
714
|
["line-through", { "text-decoration": "line-through" }],
|
|
776
715
|
["decoration-underline", { "text-decoration": "underline" }],
|
|
777
716
|
["decoration-line-through", { "text-decoration": "line-through" }],
|
|
778
|
-
[/^(?:underline|decoration)-(
|
|
779
|
-
[/^(?:underline|decoration)-(
|
|
780
|
-
[/^decoration-(.+)$/, ([, d]) => ({ "text-decoration-thickness": utilities.handler.bracket.px(d) })],
|
|
781
|
-
[/^underline-offset-([^-]+)$/, ([, s]) => {
|
|
782
|
-
const v = s === "auto" ? s : utilities.handler.bracket.px(s);
|
|
783
|
-
if (v != null)
|
|
784
|
-
return { "text-underline-offset": v };
|
|
785
|
-
}],
|
|
717
|
+
[/^(?:underline|decoration)-(?:size-)?(.+)$/, ([, s]) => ({ "text-decoration-thickness": utilities.handler.bracket.px(s) })],
|
|
718
|
+
[/^(?:underline|decoration)-(auto|from-font)$/, ([, s]) => ({ "text-decoration-thickness": s })],
|
|
786
719
|
[/^(?:underline|decoration)-(.+)$/, (match, ctx) => {
|
|
787
720
|
const result = utilities.colorResolver("text-decoration-color", "line")(match, ctx);
|
|
788
721
|
if (result) {
|
|
@@ -793,6 +726,8 @@ const textDecorations = [
|
|
|
793
726
|
}
|
|
794
727
|
}],
|
|
795
728
|
[/^(?:underline|decoration)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-line-opacity": utilities.handler.bracket.percent(opacity) })],
|
|
729
|
+
[/^underline-offset-(.+)$/, ([, s]) => ({ "text-underline-offset": utilities.handler.auto.bracket.px(s) })],
|
|
730
|
+
[/^(?:underline|decoration)-(solid|double|dotted|dashed|wavy|inherit|initial|revert|unset)$/, ([, d]) => ({ "text-decoration-style": d })],
|
|
796
731
|
["no-underline", { "text-decoration": "none" }],
|
|
797
732
|
["decoration-none", { "text-decoration": "none" }]
|
|
798
733
|
];
|
|
@@ -852,7 +787,6 @@ const rules = [
|
|
|
852
787
|
overflows,
|
|
853
788
|
outline,
|
|
854
789
|
appearance,
|
|
855
|
-
placeholder,
|
|
856
790
|
positions,
|
|
857
791
|
orders,
|
|
858
792
|
justifies,
|
|
@@ -873,7 +807,6 @@ exports.appearance = appearance;
|
|
|
873
807
|
exports.appearances = appearances;
|
|
874
808
|
exports.aspectRatio = aspectRatio;
|
|
875
809
|
exports.bgColors = bgColors;
|
|
876
|
-
exports.borderColors = borderColors;
|
|
877
810
|
exports.borders = borders;
|
|
878
811
|
exports.boxShadows = boxShadows;
|
|
879
812
|
exports.boxSizing = boxSizing;
|
|
@@ -897,14 +830,11 @@ exports.orders = orders;
|
|
|
897
830
|
exports.outline = outline;
|
|
898
831
|
exports.overflows = overflows;
|
|
899
832
|
exports.paddings = paddings;
|
|
900
|
-
exports.placeholder = placeholder;
|
|
901
833
|
exports.placements = placements;
|
|
902
834
|
exports.pointerEvents = pointerEvents;
|
|
903
835
|
exports.positions = positions;
|
|
904
836
|
exports.questionMark = questionMark;
|
|
905
837
|
exports.resizes = resizes;
|
|
906
|
-
exports.ringColors = ringColors;
|
|
907
|
-
exports.ringOffsetColors = ringOffsetColors;
|
|
908
838
|
exports.rings = rings;
|
|
909
839
|
exports.rules = rules;
|
|
910
840
|
exports.sizes = sizes;
|
package/dist/chunks/default2.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as handler, c as colorResolver$1, d as directionMap, a as cornerMap, p as parseColor, b as capitalize, e as directionSize, x as xyzMap } from './utilities.mjs';
|
|
2
2
|
import { toArray } from '@unocss/core';
|
|
3
3
|
import { C as CONTROL_BYPASS_PSEUDO_CLASS } from './pseudo.mjs';
|
|
4
4
|
|
|
@@ -17,38 +17,12 @@ const textAligns = [
|
|
|
17
17
|
["text-justify", { "text-align": "justify" }]
|
|
18
18
|
];
|
|
19
19
|
|
|
20
|
-
const outlineStyle = ["auto", "dotted", "dashed", "solid", "double", "groove", "ridge", "inset", "outset", "inherit", "initial", "revert", "unset"];
|
|
21
|
-
const parseOutlineSize = (s) => {
|
|
22
|
-
const propName = ["width", "offset"].find((item) => s.startsWith(item)) || "width";
|
|
23
|
-
const size = handler.bracket.fraction.auto.rem(s.replace(/^(offset\-|width\-|size\-)/, ""));
|
|
24
|
-
if (size) {
|
|
25
|
-
return {
|
|
26
|
-
[`outline-${propName}`]: size
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
20
|
const outline = [
|
|
21
|
+
[/^outline-(?:width-|size-)?(.+)$/, ([, d]) => ({ "outline-width": handler.bracket.fraction.auto.rem(d) })],
|
|
22
|
+
[/^outline-(?:color-)?(.+)$/, colorResolver$1("outline-color", "outline-color")],
|
|
23
|
+
[/^outline-offset-(.+)$/, ([, d]) => ({ "outline-offset": handler.bracket.fraction.auto.rem(d) })],
|
|
31
24
|
["outline", { "outline-style": "solid" }],
|
|
32
|
-
[
|
|
33
|
-
/^outline-(.+)$/,
|
|
34
|
-
(match, config) => {
|
|
35
|
-
const [, d] = match;
|
|
36
|
-
if (outlineStyle.includes(d)) {
|
|
37
|
-
return {
|
|
38
|
-
"outline-style": d
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
const colorSheet = colorResolver$1("outline-color", "outline-color")([
|
|
42
|
-
match[0],
|
|
43
|
-
match[1].replace(/^color-/, "")
|
|
44
|
-
], config);
|
|
45
|
-
if (colorSheet)
|
|
46
|
-
return colorSheet;
|
|
47
|
-
const sizeSheet = parseOutlineSize(d);
|
|
48
|
-
if (sizeSheet)
|
|
49
|
-
return sizeSheet;
|
|
50
|
-
}
|
|
51
|
-
],
|
|
25
|
+
[/^outline-(auto|dotted|dashed|solid|double|groove|ridge|inset|outset|inherit|initial|revert|unset)$/, ([, c]) => ({ "outline-style": c })],
|
|
52
26
|
["outline-none", { "outline": "2px solid transparent", "outline-offset": "2px" }]
|
|
53
27
|
];
|
|
54
28
|
const appearance = [
|
|
@@ -57,21 +31,6 @@ const appearance = [
|
|
|
57
31
|
"-webkit-appearance": "none"
|
|
58
32
|
}]
|
|
59
33
|
];
|
|
60
|
-
const placeholder = [
|
|
61
|
-
[
|
|
62
|
-
/^placeholder-opacity-(\d+)$/,
|
|
63
|
-
([, d]) => ({
|
|
64
|
-
"placeholder-opacity": handler.bracket.percent(d)
|
|
65
|
-
})
|
|
66
|
-
],
|
|
67
|
-
[
|
|
68
|
-
/^placeholder-(?!opacity)(.+)$/,
|
|
69
|
-
(match, config) => {
|
|
70
|
-
match[1] = match[1].replace(/^color-/, "");
|
|
71
|
-
return colorResolver$1("placeholder-color", "placeholder-color")(match, config);
|
|
72
|
-
}
|
|
73
|
-
]
|
|
74
|
-
];
|
|
75
34
|
const willChange = [
|
|
76
35
|
[/^will-change-(.+)/, ([, p]) => ({ "will-change": handler.properties.global(p) })]
|
|
77
36
|
];
|
|
@@ -85,14 +44,14 @@ const borders = [
|
|
|
85
44
|
[/^(?:border|b)()-(.+)$/, handlerBorderColor],
|
|
86
45
|
[/^(?:border|b)-([^-]+)(?:-(.+))?$/, handlerBorderColor],
|
|
87
46
|
[/^(?:border|b)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-border-opacity": handler.bracket.percent(opacity) })],
|
|
47
|
+
[/^(?:border-)?(?:rounded|rd)$/, handlerRounded],
|
|
48
|
+
[/^(?:border-)?(?:rounded|rd)(?:-(.+))?$/, handlerRounded],
|
|
49
|
+
[/^(?:border-)?(?:rounded|rd)(?:-([^-]+))?(?:-(.+))?$/, handlerRounded],
|
|
88
50
|
["border-solid", { "border-style": "solid" }],
|
|
89
51
|
["border-dashed", { "border-style": "dashed" }],
|
|
90
52
|
["border-dotted", { "border-style": "dotted" }],
|
|
91
53
|
["border-double", { "border-style": "double" }],
|
|
92
|
-
["border-none", { "border-style": "none" }]
|
|
93
|
-
[/^(?:border-)?(?:rounded|rd)$/, handlerRounded],
|
|
94
|
-
[/^(?:border-)?(?:rounded|rd)(?:-(.+))?$/, handlerRounded],
|
|
95
|
-
[/^(?:border-)?(?:rounded|rd)(?:-([^-]+))?(?:-(.+))?$/, handlerRounded]
|
|
54
|
+
["border-none", { "border-style": "none" }]
|
|
96
55
|
];
|
|
97
56
|
function handlerBorder(m) {
|
|
98
57
|
const borderSizes = handlerBorderSize(m);
|
|
@@ -132,18 +91,6 @@ const bgColors = [
|
|
|
132
91
|
[/^bg-(.+)$/, colorResolver$1("background-color", "bg")],
|
|
133
92
|
[/^bg-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-bg-opacity": handler.bracket.percent(opacity2) })]
|
|
134
93
|
];
|
|
135
|
-
const borderColors = [
|
|
136
|
-
[/^(?:border|b)-(.+)$/, colorResolver$1("border-color", "border")],
|
|
137
|
-
[/^(?:border|b)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-border-opacity": handler.bracket.percent(opacity2) })]
|
|
138
|
-
];
|
|
139
|
-
const ringColors = [
|
|
140
|
-
[/^ring-(.+)$/, colorResolver$1("--un-ring-color", "ring")],
|
|
141
|
-
[/^ring-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-ring-opacity": handler.bracket.percent(opacity2) })]
|
|
142
|
-
];
|
|
143
|
-
const ringOffsetColors = [
|
|
144
|
-
[/^ring-offset-(.+)$/, colorResolver$1("--un-ring-offset-color", "ring-offset")],
|
|
145
|
-
[/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-ring-offset-opacity": handler.bracket.percent(opacity2) })]
|
|
146
|
-
];
|
|
147
94
|
|
|
148
95
|
const transitionProperty = (prop) => {
|
|
149
96
|
return handler.properties(prop) || (prop === "all" ? prop : void 0);
|
|
@@ -292,30 +239,17 @@ const textShadows = [
|
|
|
292
239
|
];
|
|
293
240
|
|
|
294
241
|
const gaps = [
|
|
295
|
-
[/^(?:flex-|grid-)?gap-([^-]+)$/, ([, s]) => {
|
|
296
|
-
const v = handler.bracket.auto.rem(s);
|
|
297
|
-
if (v != null) {
|
|
298
|
-
return {
|
|
299
|
-
"grid-gap": v,
|
|
300
|
-
"gap": v
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
}],
|
|
304
|
-
[/^(?:flex-|grid-)?gap-x-([^-]+)$/, ([, s]) => {
|
|
242
|
+
[/^(?:flex-|grid-)?gap-(x-|y-)?([^-]+)$/, ([, d = "", s]) => {
|
|
305
243
|
const v = handler.bracket.auto.rem(s);
|
|
306
244
|
if (v != null) {
|
|
245
|
+
const direction = {
|
|
246
|
+
"": "",
|
|
247
|
+
"x-": "column-",
|
|
248
|
+
"y-": "row-"
|
|
249
|
+
}[d];
|
|
307
250
|
return {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
};
|
|
311
|
-
}
|
|
312
|
-
}],
|
|
313
|
-
[/^(?:flex-|grid-)?gap-y-([^-]+)$/, ([, s]) => {
|
|
314
|
-
const v = handler.bracket.auto.rem(s);
|
|
315
|
-
if (v != null) {
|
|
316
|
-
return {
|
|
317
|
-
"grid-row-gap": v,
|
|
318
|
-
"row-gap": v
|
|
251
|
+
[`grid-${direction}gap`]: v,
|
|
252
|
+
[`${direction}gap`]: v
|
|
319
253
|
};
|
|
320
254
|
}
|
|
321
255
|
}]
|
|
@@ -349,7 +283,7 @@ const grids = [
|
|
|
349
283
|
if (parts[0] === "span") {
|
|
350
284
|
if (parts[1] === "full")
|
|
351
285
|
return { [key]: "1/-1" };
|
|
352
|
-
raw = handler.number.bracket(parts[1])
|
|
286
|
+
raw = handler.number.bracket(parts[1]);
|
|
353
287
|
if (raw)
|
|
354
288
|
return { [key]: `span ${raw}/span ${raw}` };
|
|
355
289
|
}
|
|
@@ -395,7 +329,9 @@ const justifies = [
|
|
|
395
329
|
...basicSet.map((i) => [`justify-self-${i}`, { "justify-self": i }])
|
|
396
330
|
];
|
|
397
331
|
const orders = [
|
|
398
|
-
[/^order-(.+)$/, ([, v]) => ({ order:
|
|
332
|
+
[/^order-(.+)$/, ([, v]) => ({ order: handler.bracket.number(v) })],
|
|
333
|
+
["order-first", { order: "-9999" }],
|
|
334
|
+
["order-last", { order: "9999" }],
|
|
399
335
|
["order-none", { order: "0" }]
|
|
400
336
|
];
|
|
401
337
|
const alignments = [
|
|
@@ -439,9 +375,12 @@ const insets = [
|
|
|
439
375
|
}]
|
|
440
376
|
];
|
|
441
377
|
const floats = [
|
|
442
|
-
[
|
|
378
|
+
["float-left", { float: "left" }],
|
|
379
|
+
["float-right", { float: "right" }],
|
|
443
380
|
["float-none", { float: "none" }],
|
|
444
|
-
[
|
|
381
|
+
["clear-left", { clear: "left" }],
|
|
382
|
+
["clear-right", { clear: "right" }],
|
|
383
|
+
["clear-both", { clear: "both" }],
|
|
445
384
|
["clear-none", { clear: "none" }]
|
|
446
385
|
];
|
|
447
386
|
const zIndexes = [
|
|
@@ -449,12 +388,8 @@ const zIndexes = [
|
|
|
449
388
|
[/^z-([^-]+)$/, ([, v]) => ({ "z-index": handler.number(v) })]
|
|
450
389
|
];
|
|
451
390
|
const boxSizing = [
|
|
452
|
-
[
|
|
453
|
-
|
|
454
|
-
([, value]) => ({
|
|
455
|
-
"box-sizing": `${value}-box`
|
|
456
|
-
})
|
|
457
|
-
]
|
|
391
|
+
["box-border", { "box-sizing": "border-box" }],
|
|
392
|
+
["box-content", { "box-sizing": "content-box" }]
|
|
458
393
|
];
|
|
459
394
|
|
|
460
395
|
const varEmpty = "var(--un-empty,/*!*/ /*!*/)";
|
|
@@ -487,7 +422,9 @@ const resizes = [
|
|
|
487
422
|
["resize-none", { resize: "none" }]
|
|
488
423
|
];
|
|
489
424
|
const userSelects = [
|
|
490
|
-
[
|
|
425
|
+
["select-auto", { "user-select": "auto" }],
|
|
426
|
+
["select-all", { "user-select": "all" }],
|
|
427
|
+
["select-text", { "user-select": "text" }],
|
|
491
428
|
["select-none", { "user-select": "none" }]
|
|
492
429
|
];
|
|
493
430
|
const whitespaces = [
|
|
@@ -551,9 +488,11 @@ const rings = [
|
|
|
551
488
|
if (value)
|
|
552
489
|
return { "--un-ring-offset-width": value };
|
|
553
490
|
}],
|
|
554
|
-
[
|
|
555
|
-
|
|
556
|
-
|
|
491
|
+
[/^ring-(.+)$/, colorResolver$1("--un-ring-color", "ring")],
|
|
492
|
+
[/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": handler.bracket.percent(opacity) })],
|
|
493
|
+
[/^ring-offset-(.+)$/, colorResolver$1("--un-ring-offset-color", "ring-offset")],
|
|
494
|
+
[/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": handler.bracket.percent(opacity) })],
|
|
495
|
+
["ring-inset", { "--un-ring-inset": "inset" }]
|
|
557
496
|
];
|
|
558
497
|
|
|
559
498
|
const colorResolver = (body, theme) => {
|
|
@@ -773,14 +712,8 @@ const textDecorations = [
|
|
|
773
712
|
["line-through", { "text-decoration": "line-through" }],
|
|
774
713
|
["decoration-underline", { "text-decoration": "underline" }],
|
|
775
714
|
["decoration-line-through", { "text-decoration": "line-through" }],
|
|
776
|
-
[/^(?:underline|decoration)-(
|
|
777
|
-
[/^(?:underline|decoration)-(
|
|
778
|
-
[/^decoration-(.+)$/, ([, d]) => ({ "text-decoration-thickness": handler.bracket.px(d) })],
|
|
779
|
-
[/^underline-offset-([^-]+)$/, ([, s]) => {
|
|
780
|
-
const v = s === "auto" ? s : handler.bracket.px(s);
|
|
781
|
-
if (v != null)
|
|
782
|
-
return { "text-underline-offset": v };
|
|
783
|
-
}],
|
|
715
|
+
[/^(?:underline|decoration)-(?:size-)?(.+)$/, ([, s]) => ({ "text-decoration-thickness": handler.bracket.px(s) })],
|
|
716
|
+
[/^(?:underline|decoration)-(auto|from-font)$/, ([, s]) => ({ "text-decoration-thickness": s })],
|
|
784
717
|
[/^(?:underline|decoration)-(.+)$/, (match, ctx) => {
|
|
785
718
|
const result = colorResolver$1("text-decoration-color", "line")(match, ctx);
|
|
786
719
|
if (result) {
|
|
@@ -791,6 +724,8 @@ const textDecorations = [
|
|
|
791
724
|
}
|
|
792
725
|
}],
|
|
793
726
|
[/^(?:underline|decoration)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-line-opacity": handler.bracket.percent(opacity) })],
|
|
727
|
+
[/^underline-offset-(.+)$/, ([, s]) => ({ "text-underline-offset": handler.auto.bracket.px(s) })],
|
|
728
|
+
[/^(?:underline|decoration)-(solid|double|dotted|dashed|wavy|inherit|initial|revert|unset)$/, ([, d]) => ({ "text-decoration-style": d })],
|
|
794
729
|
["no-underline", { "text-decoration": "none" }],
|
|
795
730
|
["decoration-none", { "text-decoration": "none" }]
|
|
796
731
|
];
|
|
@@ -850,7 +785,6 @@ const rules = [
|
|
|
850
785
|
overflows,
|
|
851
786
|
outline,
|
|
852
787
|
appearance,
|
|
853
|
-
placeholder,
|
|
854
788
|
positions,
|
|
855
789
|
orders,
|
|
856
790
|
justifies,
|
|
@@ -866,4 +800,4 @@ const rules = [
|
|
|
866
800
|
questionMark
|
|
867
801
|
].flat(1);
|
|
868
802
|
|
|
869
|
-
export {
|
|
803
|
+
export { textDecorations as $, sizes as A, aspectRatio as B, paddings as C, margins as D, varEmpty as E, displays as F, appearances as G, cursors as H, pointerEvents as I, resizes as J, userSelects as K, whitespaces as L, contents as M, breaks as N, textOverflows as O, textTransforms as P, fontStyles as Q, fontSmoothings as R, svgUtilities as S, transforms as T, transitions as U, fonts as V, tabSizes as W, textIndents as X, textStrokes as Y, textShadows as Z, cssVariables as _, appearance as a, borders as b, opacity as c, textColors as d, bgColors as e, flex as f, gaps as g, grids as h, overflows as i, justifies as j, orders as k, alignments as l, placements as m, insets as n, outline as o, positions as p, floats as q, rules as r, boxSizing as s, textAligns as t, questionMark as u, verticalAligns as v, willChange as w, rings as x, boxShadows as y, zIndexes as z };
|
package/dist/chunks/pseudo.cjs
CHANGED
package/dist/chunks/pseudo.mjs
CHANGED
package/dist/rules.cjs
CHANGED
|
@@ -14,7 +14,6 @@ exports.appearance = _default.appearance;
|
|
|
14
14
|
exports.appearances = _default.appearances;
|
|
15
15
|
exports.aspectRatio = _default.aspectRatio;
|
|
16
16
|
exports.bgColors = _default.bgColors;
|
|
17
|
-
exports.borderColors = _default.borderColors;
|
|
18
17
|
exports.borders = _default.borders;
|
|
19
18
|
exports.boxShadows = _default.boxShadows;
|
|
20
19
|
exports.boxSizing = _default.boxSizing;
|
|
@@ -38,14 +37,11 @@ exports.orders = _default.orders;
|
|
|
38
37
|
exports.outline = _default.outline;
|
|
39
38
|
exports.overflows = _default.overflows;
|
|
40
39
|
exports.paddings = _default.paddings;
|
|
41
|
-
exports.placeholder = _default.placeholder;
|
|
42
40
|
exports.placements = _default.placements;
|
|
43
41
|
exports.pointerEvents = _default.pointerEvents;
|
|
44
42
|
exports.positions = _default.positions;
|
|
45
43
|
exports.questionMark = _default.questionMark;
|
|
46
44
|
exports.resizes = _default.resizes;
|
|
47
|
-
exports.ringColors = _default.ringColors;
|
|
48
|
-
exports.ringOffsetColors = _default.ringOffsetColors;
|
|
49
45
|
exports.rings = _default.rings;
|
|
50
46
|
exports.rules = _default.rules;
|
|
51
47
|
exports.sizes = _default.sizes;
|
package/dist/rules.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ declare const textAligns: Rule[];
|
|
|
6
6
|
|
|
7
7
|
declare const outline: Rule[];
|
|
8
8
|
declare const appearance: Rule[];
|
|
9
|
-
declare const placeholder: Rule[];
|
|
10
9
|
declare const willChange: Rule[];
|
|
11
10
|
|
|
12
11
|
declare const borders: Rule[];
|
|
@@ -20,9 +19,6 @@ declare const opacity: Rule[];
|
|
|
20
19
|
*/
|
|
21
20
|
declare const textColors: Rule[];
|
|
22
21
|
declare const bgColors: Rule[];
|
|
23
|
-
declare const borderColors: Rule[];
|
|
24
|
-
declare const ringColors: Rule[];
|
|
25
|
-
declare const ringOffsetColors: Rule[];
|
|
26
22
|
|
|
27
23
|
declare const rules: Rule[];
|
|
28
24
|
|
|
@@ -92,4 +88,4 @@ declare const cssVariables: Rule[];
|
|
|
92
88
|
|
|
93
89
|
declare const textDecorations: Rule[];
|
|
94
90
|
|
|
95
|
-
export { alignments, appearance, appearances, aspectRatio, bgColors,
|
|
91
|
+
export { alignments, appearance, appearances, aspectRatio, bgColors, borders, boxShadows, boxSizing, breaks, contents, cssVariables, cursors, displays, flex, floats, fontSmoothings, fontStyles, fonts, gaps, grids, insets, justifies, margins, opacity, orders, outline, overflows, paddings, placements, pointerEvents, positions, questionMark, resizes, rings, rules, sizes, svgUtilities, tabSizes, textAligns, textColors, textDecorations, textIndents, textOverflows, textShadows, textStrokes, textTransforms, transforms, transitions, userSelects, varEmpty, verticalAligns, whitespaces, willChange, zIndexes };
|
package/dist/rules.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { l as alignments, a as appearance, G as appearances, B as aspectRatio, e as bgColors, b as borders, y as boxShadows, s as boxSizing, N as breaks, M as contents, _ as cssVariables, H as cursors, F as displays, f as flex, q as floats, R as fontSmoothings, Q as fontStyles, V as fonts, g as gaps, h as grids, n as insets, j as justifies, D as margins, c as opacity, k as orders, o as outline, i as overflows, C as paddings, m as placements, I as pointerEvents, p as positions, u as questionMark, J as resizes, x as rings, r as rules, A as sizes, S as svgUtilities, W as tabSizes, t as textAligns, d as textColors, $ as textDecorations, X as textIndents, O as textOverflows, Z as textShadows, Y as textStrokes, P as textTransforms, T as transforms, U as transitions, K as userSelects, E as varEmpty, v as verticalAligns, L as whitespaces, w as willChange, z as zIndexes } from './chunks/default2.mjs';
|
|
2
2
|
import './chunks/utilities.mjs';
|
|
3
3
|
import '@unocss/core';
|
|
4
4
|
import './chunks/pseudo.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-mini",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.3",
|
|
4
4
|
"description": "The minimal preset for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"*.css"
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@unocss/core": "0.17.
|
|
64
|
+
"@unocss/core": "0.17.3"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "unbuild",
|