@unocss/preset-mini 0.22.0 → 0.22.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.
- package/dist/chunks/default.cjs +25 -19
- package/dist/chunks/default.mjs +25 -19
- package/dist/chunks/default2.cjs +150 -64
- package/dist/chunks/default2.mjs +150 -66
- package/dist/chunks/utilities.cjs +31 -4
- package/dist/chunks/utilities.mjs +31 -5
- package/dist/{colors-6d634692.d.ts → colors-338f482c.d.ts} +1 -1
- package/dist/colors.d.ts +2 -2
- package/dist/{default-958434b6.d.ts → default-17948303.d.ts} +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/rules.cjs +2 -0
- package/dist/rules.d.ts +11 -2
- package/dist/rules.mjs +1 -1
- package/dist/theme.d.ts +8 -8
- package/dist/{types-a2d2b52f.d.ts → types-c14b808b.d.ts} +8 -2
- package/dist/{utilities-22a522e2.d.ts → utilities-13c33ba5.d.ts} +1 -1
- package/dist/utils.cjs +1 -0
- package/dist/utils.d.ts +4 -3
- package/dist/utils.mjs +1 -1
- package/dist/variants.d.ts +4 -4
- package/package.json +2 -2
package/dist/chunks/default.cjs
CHANGED
|
@@ -71,12 +71,12 @@ const textStrokeWidth = {
|
|
|
71
71
|
lg: "thick"
|
|
72
72
|
};
|
|
73
73
|
const textShadow = {
|
|
74
|
-
DEFAULT: "
|
|
75
|
-
sm: "1px 1px 3px
|
|
76
|
-
md: "
|
|
77
|
-
lg: "3px 3px 6px
|
|
78
|
-
xl: "1px 1px 3px
|
|
79
|
-
none: "
|
|
74
|
+
DEFAULT: ["0 0 1px rgba(0,0,0,0.2)", "0 0 1px rgba(1,0,5,0.1)"],
|
|
75
|
+
sm: "1px 1px 3px rgba(36,37,47,0.25)",
|
|
76
|
+
md: ["0 1px 2px rgba(30,29,39,0.19)", "1px 2px 4px rgba(54,64,147,0.18)"],
|
|
77
|
+
lg: ["3px 3px 6px rgba(0,0,0,0.26)", "0 0 5px rgba(15,3,86,0.22)"],
|
|
78
|
+
xl: ["1px 1px 3px rgba(0,0,0,0.29)", "2px 4px 7px rgba(73,64,125,0.35)"],
|
|
79
|
+
none: "0 0 #0000"
|
|
80
80
|
};
|
|
81
81
|
const lineHeight = {
|
|
82
82
|
none: "1",
|
|
@@ -115,13 +115,13 @@ const borderRadius = {
|
|
|
115
115
|
"full": "9999px"
|
|
116
116
|
};
|
|
117
117
|
const boxShadow = {
|
|
118
|
-
"DEFAULT": "var(--un-shadow-inset) 0 1px 3px 0 rgba(
|
|
119
|
-
"sm": "var(--un-shadow-inset) 0 1px 2px 0 rgba(
|
|
120
|
-
"md": "var(--un-shadow-inset) 0 4px 6px -1px rgba(
|
|
121
|
-
"lg": "var(--un-shadow-inset) 0 10px 15px -3px rgba(
|
|
122
|
-
"xl": "var(--un-shadow-inset) 0 20px 25px -5px rgba(
|
|
123
|
-
"2xl": "var(--un-shadow-inset) 0 25px 50px -12px rgba(
|
|
124
|
-
"inner": "inset 0 2px 4px 0 rgba(
|
|
118
|
+
"DEFAULT": ["var(--un-shadow-inset) 0 1px 3px 0 rgba(0,0,0,0.1)", "var(--un-shadow-inset) 0 1px 2px -1px rgba(0,0,0,0.1)"],
|
|
119
|
+
"sm": "var(--un-shadow-inset) 0 1px 2px 0 rgba(0,0,0,0.05)",
|
|
120
|
+
"md": ["var(--un-shadow-inset) 0 4px 6px -1px rgba(0,0,0,0.1)", "var(--un-shadow-inset) 0 2px 4px -2px rgba(0,0,0,0.1)"],
|
|
121
|
+
"lg": ["var(--un-shadow-inset) 0 10px 15px -3px rgba(0,0,0,0.1)", "var(--un-shadow-inset) 0 4px 6px -4px rgba(0,0,0,0.1)"],
|
|
122
|
+
"xl": ["var(--un-shadow-inset) 0 20px 25px -5px rgba(0,0,0,0.1)", "var(--un-shadow-inset) 0 8px 10px -6px rgba(0,0,0,0.1)"],
|
|
123
|
+
"2xl": "var(--un-shadow-inset) 0 25px 50px -12px rgba(0,0,0,0.25)",
|
|
124
|
+
"inner": "inset 0 2px 4px 0 rgba(0,0,0,0.05)",
|
|
125
125
|
"none": "0 0 #0000"
|
|
126
126
|
};
|
|
127
127
|
|
|
@@ -136,12 +136,12 @@ const blur = {
|
|
|
136
136
|
"3xl": "64px"
|
|
137
137
|
};
|
|
138
138
|
const dropShadow = {
|
|
139
|
-
"DEFAULT": ["0 1px 2px rgba(0,
|
|
140
|
-
"sm": "0 1px 1px rgba(0,
|
|
141
|
-
"md": ["0 4px 3px rgba(0,
|
|
142
|
-
"lg": ["0 10px 8px rgba(0,
|
|
143
|
-
"xl": ["0 20px 13px rgba(0,
|
|
144
|
-
"2xl": "0 25px 25px rgba(0,
|
|
139
|
+
"DEFAULT": ["0 1px 2px rgba(0,0,0,0.1)", "0 1px 1px rgba(0,0,0,0.06)"],
|
|
140
|
+
"sm": "0 1px 1px rgba(0,0,0,0.05)",
|
|
141
|
+
"md": ["0 4px 3px rgba(0,0,0,0.07)", "0 2px 2px rgba(0,0,0,0.06)"],
|
|
142
|
+
"lg": ["0 10px 8px rgba(0,0,0,0.04)", "0 4px 3px rgba(0,0,0,0.1)"],
|
|
143
|
+
"xl": ["0 20px 13px rgba(0,0,0,0.03)", "0 8px 5px rgba(0,0,0,0.08)"],
|
|
144
|
+
"2xl": "0 25px 25px rgba(0,0,0,0.15)",
|
|
145
145
|
"none": "0 0 #0000"
|
|
146
146
|
};
|
|
147
147
|
|
|
@@ -187,6 +187,12 @@ const theme = {
|
|
|
187
187
|
maxHeight,
|
|
188
188
|
minWidth: maxWidth,
|
|
189
189
|
minHeight: maxHeight,
|
|
190
|
+
inlineSize: width,
|
|
191
|
+
blockSize: height,
|
|
192
|
+
maxInlineSize: maxWidth,
|
|
193
|
+
maxBlockSize: maxHeight,
|
|
194
|
+
minInlineSize: maxWidth,
|
|
195
|
+
minBlockSize: maxHeight,
|
|
190
196
|
colors: colors.colors,
|
|
191
197
|
fontFamily,
|
|
192
198
|
fontSize,
|
package/dist/chunks/default.mjs
CHANGED
|
@@ -69,12 +69,12 @@ const textStrokeWidth = {
|
|
|
69
69
|
lg: "thick"
|
|
70
70
|
};
|
|
71
71
|
const textShadow = {
|
|
72
|
-
DEFAULT: "
|
|
73
|
-
sm: "1px 1px 3px
|
|
74
|
-
md: "
|
|
75
|
-
lg: "3px 3px 6px
|
|
76
|
-
xl: "1px 1px 3px
|
|
77
|
-
none: "
|
|
72
|
+
DEFAULT: ["0 0 1px rgba(0,0,0,0.2)", "0 0 1px rgba(1,0,5,0.1)"],
|
|
73
|
+
sm: "1px 1px 3px rgba(36,37,47,0.25)",
|
|
74
|
+
md: ["0 1px 2px rgba(30,29,39,0.19)", "1px 2px 4px rgba(54,64,147,0.18)"],
|
|
75
|
+
lg: ["3px 3px 6px rgba(0,0,0,0.26)", "0 0 5px rgba(15,3,86,0.22)"],
|
|
76
|
+
xl: ["1px 1px 3px rgba(0,0,0,0.29)", "2px 4px 7px rgba(73,64,125,0.35)"],
|
|
77
|
+
none: "0 0 #0000"
|
|
78
78
|
};
|
|
79
79
|
const lineHeight = {
|
|
80
80
|
none: "1",
|
|
@@ -113,13 +113,13 @@ const borderRadius = {
|
|
|
113
113
|
"full": "9999px"
|
|
114
114
|
};
|
|
115
115
|
const boxShadow = {
|
|
116
|
-
"DEFAULT": "var(--un-shadow-inset) 0 1px 3px 0 rgba(
|
|
117
|
-
"sm": "var(--un-shadow-inset) 0 1px 2px 0 rgba(
|
|
118
|
-
"md": "var(--un-shadow-inset) 0 4px 6px -1px rgba(
|
|
119
|
-
"lg": "var(--un-shadow-inset) 0 10px 15px -3px rgba(
|
|
120
|
-
"xl": "var(--un-shadow-inset) 0 20px 25px -5px rgba(
|
|
121
|
-
"2xl": "var(--un-shadow-inset) 0 25px 50px -12px rgba(
|
|
122
|
-
"inner": "inset 0 2px 4px 0 rgba(
|
|
116
|
+
"DEFAULT": ["var(--un-shadow-inset) 0 1px 3px 0 rgba(0,0,0,0.1)", "var(--un-shadow-inset) 0 1px 2px -1px rgba(0,0,0,0.1)"],
|
|
117
|
+
"sm": "var(--un-shadow-inset) 0 1px 2px 0 rgba(0,0,0,0.05)",
|
|
118
|
+
"md": ["var(--un-shadow-inset) 0 4px 6px -1px rgba(0,0,0,0.1)", "var(--un-shadow-inset) 0 2px 4px -2px rgba(0,0,0,0.1)"],
|
|
119
|
+
"lg": ["var(--un-shadow-inset) 0 10px 15px -3px rgba(0,0,0,0.1)", "var(--un-shadow-inset) 0 4px 6px -4px rgba(0,0,0,0.1)"],
|
|
120
|
+
"xl": ["var(--un-shadow-inset) 0 20px 25px -5px rgba(0,0,0,0.1)", "var(--un-shadow-inset) 0 8px 10px -6px rgba(0,0,0,0.1)"],
|
|
121
|
+
"2xl": "var(--un-shadow-inset) 0 25px 50px -12px rgba(0,0,0,0.25)",
|
|
122
|
+
"inner": "inset 0 2px 4px 0 rgba(0,0,0,0.05)",
|
|
123
123
|
"none": "0 0 #0000"
|
|
124
124
|
};
|
|
125
125
|
|
|
@@ -134,12 +134,12 @@ const blur = {
|
|
|
134
134
|
"3xl": "64px"
|
|
135
135
|
};
|
|
136
136
|
const dropShadow = {
|
|
137
|
-
"DEFAULT": ["0 1px 2px rgba(0,
|
|
138
|
-
"sm": "0 1px 1px rgba(0,
|
|
139
|
-
"md": ["0 4px 3px rgba(0,
|
|
140
|
-
"lg": ["0 10px 8px rgba(0,
|
|
141
|
-
"xl": ["0 20px 13px rgba(0,
|
|
142
|
-
"2xl": "0 25px 25px rgba(0,
|
|
137
|
+
"DEFAULT": ["0 1px 2px rgba(0,0,0,0.1)", "0 1px 1px rgba(0,0,0,0.06)"],
|
|
138
|
+
"sm": "0 1px 1px rgba(0,0,0,0.05)",
|
|
139
|
+
"md": ["0 4px 3px rgba(0,0,0,0.07)", "0 2px 2px rgba(0,0,0,0.06)"],
|
|
140
|
+
"lg": ["0 10px 8px rgba(0,0,0,0.04)", "0 4px 3px rgba(0,0,0,0.1)"],
|
|
141
|
+
"xl": ["0 20px 13px rgba(0,0,0,0.03)", "0 8px 5px rgba(0,0,0,0.08)"],
|
|
142
|
+
"2xl": "0 25px 25px rgba(0,0,0,0.15)",
|
|
143
143
|
"none": "0 0 #0000"
|
|
144
144
|
};
|
|
145
145
|
|
|
@@ -185,6 +185,12 @@ const theme = {
|
|
|
185
185
|
maxHeight,
|
|
186
186
|
minWidth: maxWidth,
|
|
187
187
|
minHeight: maxHeight,
|
|
188
|
+
inlineSize: width,
|
|
189
|
+
blockSize: height,
|
|
190
|
+
maxInlineSize: maxWidth,
|
|
191
|
+
maxBlockSize: maxHeight,
|
|
192
|
+
minInlineSize: maxWidth,
|
|
193
|
+
minBlockSize: maxHeight,
|
|
188
194
|
colors,
|
|
189
195
|
fontFamily,
|
|
190
196
|
fontSize,
|
package/dist/chunks/default2.cjs
CHANGED
|
@@ -46,19 +46,28 @@ const borders = [
|
|
|
46
46
|
[/^(?:border|b)()(?:-(.+))?$/, handlerBorder],
|
|
47
47
|
[/^(?:border|b)-([xy])(?:-(.+))?$/, handlerBorder],
|
|
48
48
|
[/^(?:border|b)-([rltbse])(?:-(.+))?$/, handlerBorder],
|
|
49
|
-
[/^(?:border|b)-()
|
|
50
|
-
[/^(?:border|b)-([
|
|
51
|
-
[/^(?:border|b)-(
|
|
49
|
+
[/^(?:border|b)-(block|inline)(?:-(.+))?$/, handlerBorder],
|
|
50
|
+
[/^(?:border|b)-([bi][se])(?:-(.+))?$/, handlerBorder],
|
|
51
|
+
[/^(?:border|b)-()(?:width|size)-(.+)$/, handlerBorderSize],
|
|
52
|
+
[/^(?:border|b)-([xy])-(?:width|size)-(.+)$/, handlerBorderSize],
|
|
53
|
+
[/^(?:border|b)-([rltbse])-(?:width|size)-(.+)$/, handlerBorderSize],
|
|
54
|
+
[/^(?:border|b)-(block|inline)-(?:width|size)-(.+)$/, handlerBorderSize],
|
|
55
|
+
[/^(?:border|b)-([bi][se])-(?:width|size)-(.+)$/, handlerBorderSize],
|
|
52
56
|
[/^(?:border|b)-()(?:color-)?(.+)$/, handlerBorderColor],
|
|
53
57
|
[/^(?:border|b)-([xy])-(?:color-)?(.+)$/, handlerBorderColor],
|
|
54
58
|
[/^(?:border|b)-([rltbse])-(?:color-)?(.+)$/, handlerBorderColor],
|
|
59
|
+
[/^(?:border|b)-(block|inline)-(?:color-)?(.+)$/, handlerBorderColor],
|
|
60
|
+
[/^(?:border|b)-([bi][se])-(?:color-)?(.+)$/, handlerBorderColor],
|
|
55
61
|
[/^(?:border|b)-()op(?:acity)?-?(.+)$/, handlerBorderOpacity],
|
|
56
62
|
[/^(?:border|b)-([xy])-op(?:acity)?-?(.+)$/, handlerBorderOpacity],
|
|
57
63
|
[/^(?:border|b)-([rltbse])-op(?:acity)?-?(.+)$/, handlerBorderOpacity],
|
|
64
|
+
[/^(?:border|b)-(block|inline)-op(?:acity)?-?(.+)$/, handlerBorderOpacity],
|
|
65
|
+
[/^(?:border|b)-([bi][se])-op(?:acity)?-?(.+)$/, handlerBorderOpacity],
|
|
58
66
|
[/^(?:border-)?(?:rounded|rd)()(?:-(.+))?$/, handlerRounded],
|
|
59
|
-
[/^(?:border-)?(?:rounded|rd)-([xy])(?:-(.+))?$/, handlerRounded],
|
|
60
67
|
[/^(?:border-)?(?:rounded|rd)-([rltb])(?:-(.+))?$/, handlerRounded],
|
|
61
68
|
[/^(?:border-)?(?:rounded|rd)-([rltb]{2})(?:-(.+))?$/, handlerRounded],
|
|
69
|
+
[/^(?:border-)?(?:rounded|rd)-([bi][se])(?:-(.+))?$/, handlerRounded],
|
|
70
|
+
[/^(?:border-)?(?:rounded|rd)-([bi][se]-[bi][se])(?:-(.+))?$/, handlerRounded],
|
|
62
71
|
["border-solid", { "border-style": "solid" }],
|
|
63
72
|
["border-dashed", { "border-style": "dashed" }],
|
|
64
73
|
["border-dotted", { "border-style": "dotted" }],
|
|
@@ -252,7 +261,29 @@ const textStrokes = [
|
|
|
252
261
|
[/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": utilities.handler.bracket.percent(opacity) })]
|
|
253
262
|
];
|
|
254
263
|
const textShadows = [
|
|
255
|
-
[/^text-shadow(?:-(.+))?$/, ([, s], { theme }) =>
|
|
264
|
+
[/^text-shadow(?:-(.+))?$/, ([, s], { theme }) => {
|
|
265
|
+
const v = theme.textShadow?.[s || "DEFAULT"];
|
|
266
|
+
if (v != null) {
|
|
267
|
+
const shadow = core.toArray(v);
|
|
268
|
+
const colored = shadow.map((s2) => s2.replace(/\s\S+$/, " var(--un-text-shadow-color)"));
|
|
269
|
+
return {
|
|
270
|
+
"--un-text-shadow": shadow.join(","),
|
|
271
|
+
"--un-text-shadow-colored": colored.join(","),
|
|
272
|
+
"text-shadow": "var(--un-text-shadow)"
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
return { "text-shadow": utilities.handler.bracket.cssvar(s) };
|
|
276
|
+
}],
|
|
277
|
+
[/^text-shadow-color-(.+)$/, (m, ctx) => {
|
|
278
|
+
const color = utilities.colorResolver("--un-text-shadow-color", "text-shadow")(m, ctx);
|
|
279
|
+
if (color) {
|
|
280
|
+
return {
|
|
281
|
+
...color,
|
|
282
|
+
"--un-text-shadow": "var(--un-text-shadow-colored)"
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
}],
|
|
286
|
+
[/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": utilities.handler.bracket.percent(opacity) })]
|
|
256
287
|
];
|
|
257
288
|
|
|
258
289
|
const directions = {
|
|
@@ -388,16 +419,18 @@ const placements = [
|
|
|
388
419
|
["place-self-stretch", { "place-self": "stretch" }]
|
|
389
420
|
];
|
|
390
421
|
function handleInsetValue(v) {
|
|
391
|
-
return
|
|
422
|
+
return utilities.handler.bracket.fraction.cssvar.auto.rem(v);
|
|
392
423
|
}
|
|
393
424
|
function handleInsetValues([, d, v]) {
|
|
394
425
|
const r = handleInsetValue(v);
|
|
395
|
-
if (r != null && d in utilities.
|
|
396
|
-
return utilities.
|
|
426
|
+
if (r != null && d in utilities.insetMap)
|
|
427
|
+
return utilities.insetMap[d].map((i) => [i.slice(1), r]);
|
|
397
428
|
}
|
|
398
429
|
const insets = [
|
|
399
430
|
[/^(?:position-|pos-)?inset-(.+)$/, ([, v]) => ({ inset: handleInsetValue(v) })],
|
|
400
431
|
[/^(?:position-|pos-)?inset-([xy])-(.+)$/, handleInsetValues],
|
|
432
|
+
[/^(?:position-|pos-)?inset-(block|inline)-(.+)$/, handleInsetValues],
|
|
433
|
+
[/^(?:position-|pos-)?inset-([bi][se])-(.+)$/, handleInsetValues],
|
|
401
434
|
[/^(?:position-|pos-)?(top|left|right|bottom)-(.+)$/, ([, d, v]) => ({ [d]: handleInsetValue(v) })]
|
|
402
435
|
];
|
|
403
436
|
const floats = [
|
|
@@ -493,19 +526,62 @@ const fontSmoothings = [
|
|
|
493
526
|
}]
|
|
494
527
|
];
|
|
495
528
|
|
|
529
|
+
const shadowBase = {
|
|
530
|
+
[core.CONTROL_SHORTCUT_NO_MERGE]: "",
|
|
531
|
+
"--un-ring-offset-shadow": "0 0 #0000",
|
|
532
|
+
"--un-ring-shadow": "0 0 #0000",
|
|
533
|
+
"--un-shadow-inset": varEmpty,
|
|
534
|
+
"--un-shadow": "0 0 #0000",
|
|
535
|
+
"--un-shadow-colored": "0 0 #0000"
|
|
536
|
+
};
|
|
537
|
+
const boxShadows = [
|
|
538
|
+
[/^shadow(?:-(.+))?$/, ([, d], { theme }) => {
|
|
539
|
+
const v = theme.boxShadow?.[d || "DEFAULT"];
|
|
540
|
+
if (v) {
|
|
541
|
+
const shadow = core.toArray(v);
|
|
542
|
+
const colored = shadow.map((s) => s.replace(/\s\S+$/, " var(--un-shadow-color)"));
|
|
543
|
+
return [
|
|
544
|
+
shadowBase,
|
|
545
|
+
{
|
|
546
|
+
"--un-shadow": shadow.join(","),
|
|
547
|
+
"--un-shadow-colored": colored.join(","),
|
|
548
|
+
"box-shadow": "var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow)"
|
|
549
|
+
}
|
|
550
|
+
];
|
|
551
|
+
}
|
|
552
|
+
}],
|
|
553
|
+
[/^shadow-(.+)$/, (m, ctx) => {
|
|
554
|
+
const color = utilities.colorResolver("--un-shadow-color", "shadow")(m, ctx);
|
|
555
|
+
if (color) {
|
|
556
|
+
return {
|
|
557
|
+
...color,
|
|
558
|
+
"--un-shadow": "var(--un-shadow-colored)"
|
|
559
|
+
};
|
|
560
|
+
}
|
|
561
|
+
}],
|
|
562
|
+
[/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": utilities.handler.bracket.percent.cssvar(opacity) })],
|
|
563
|
+
["shadow-inset", { "--un-shadow-inset": "inset" }]
|
|
564
|
+
];
|
|
565
|
+
|
|
566
|
+
const ringBase = {
|
|
567
|
+
"--un-ring-inset": varEmpty,
|
|
568
|
+
"--un-ring-offset-width": "0px",
|
|
569
|
+
"--un-ring-offset-color": "#fff",
|
|
570
|
+
"--un-ring-color": "rgba(147,197,253,0.5)",
|
|
571
|
+
...shadowBase
|
|
572
|
+
};
|
|
496
573
|
const rings = [
|
|
497
574
|
[/^ring(?:-(.+))?$/, ([, d]) => {
|
|
498
575
|
const value = utilities.handler.px(d || "1");
|
|
499
576
|
if (value) {
|
|
500
|
-
return
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
};
|
|
577
|
+
return [
|
|
578
|
+
ringBase,
|
|
579
|
+
{
|
|
580
|
+
"--un-ring-offset-shadow": "var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color)",
|
|
581
|
+
"--un-ring-shadow": `var(--un-ring-inset) 0 0 0 calc(${value} + var(--un-ring-offset-width)) var(--un-ring-color)`,
|
|
582
|
+
"box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow, 0 0 #0000)"
|
|
583
|
+
}
|
|
584
|
+
];
|
|
509
585
|
}
|
|
510
586
|
}],
|
|
511
587
|
["ring-offset", { "--un-ring-offset-width": "1px" }],
|
|
@@ -517,46 +593,17 @@ const rings = [
|
|
|
517
593
|
["ring-inset", { "--un-ring-inset": "inset" }]
|
|
518
594
|
];
|
|
519
595
|
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
if (!color)
|
|
526
|
-
return;
|
|
527
|
-
if (rgba) {
|
|
528
|
-
return {
|
|
529
|
-
"--un-shadow-color": `${rgba.slice(0, 3).join(",")}`
|
|
530
|
-
};
|
|
531
|
-
} else {
|
|
532
|
-
return {
|
|
533
|
-
"--un-shadow-color": color
|
|
534
|
-
};
|
|
535
|
-
}
|
|
596
|
+
const sizeMapping = {
|
|
597
|
+
h: "height",
|
|
598
|
+
w: "width",
|
|
599
|
+
inline: "inline-size",
|
|
600
|
+
block: "block-size"
|
|
536
601
|
};
|
|
537
|
-
const boxShadows = [
|
|
538
|
-
[/^shadow(?:-(.+))?$/, ([, d], { theme }) => {
|
|
539
|
-
const value = theme.boxShadow?.[d || "DEFAULT"];
|
|
540
|
-
if (value) {
|
|
541
|
-
return {
|
|
542
|
-
"--un-shadow-inset": varEmpty,
|
|
543
|
-
"--un-shadow-color": "0,0,0",
|
|
544
|
-
"--un-shadow": value,
|
|
545
|
-
"box-shadow": "var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow)"
|
|
546
|
-
};
|
|
547
|
-
}
|
|
548
|
-
}],
|
|
549
|
-
[/^shadow-(.+)$/, ([, d], { theme }) => shadowColorResolver(d, theme)],
|
|
550
|
-
["shadow-inset", { "--un-shadow-inset": "inset" }]
|
|
551
|
-
];
|
|
552
|
-
|
|
553
602
|
function getPropName(minmax, hw) {
|
|
554
|
-
return `${minmax
|
|
603
|
+
return `${minmax || ""}${sizeMapping[hw]}`;
|
|
555
604
|
}
|
|
556
605
|
function getSizeValue(minmax, hw, theme, prop) {
|
|
557
|
-
|
|
558
|
-
if (minmax)
|
|
559
|
-
str = `${minmax}${utilities.capitalize(str)}`;
|
|
606
|
+
const str = getPropName(minmax, hw).replace(/-(\w)/g, (_, p) => p.toUpperCase());
|
|
560
607
|
const v = theme[str]?.[prop];
|
|
561
608
|
if (v != null)
|
|
562
609
|
return v;
|
|
@@ -569,8 +616,9 @@ function getSizeValue(minmax, hw, theme, prop) {
|
|
|
569
616
|
return utilities.handler.bracket.cssvar.fraction.auto.rem(prop);
|
|
570
617
|
}
|
|
571
618
|
const sizes = [
|
|
572
|
-
[/^(
|
|
573
|
-
[/^(
|
|
619
|
+
[/^(min-|max-)?([wh])-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) })],
|
|
620
|
+
[/^(min-|max-)?(block|inline)-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) })],
|
|
621
|
+
[/^(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: theme.breakpoints?.[s] })]
|
|
574
622
|
];
|
|
575
623
|
function getAspectRatio(prop) {
|
|
576
624
|
if (/^\d+\/\d+$/.test(prop))
|
|
@@ -590,22 +638,53 @@ const aspectRatio = [
|
|
|
590
638
|
const paddings = [
|
|
591
639
|
[/^pa?()-?(-?.+)$/, utilities.directionSize("padding")],
|
|
592
640
|
[/^p-?([xy])-?(-?.+)$/, utilities.directionSize("padding")],
|
|
593
|
-
[/^p-?([rltbse])-?(-?.+)$/, utilities.directionSize("padding")]
|
|
641
|
+
[/^p-?([rltbse])-?(-?.+)$/, utilities.directionSize("padding")],
|
|
642
|
+
[/^p-(inline|block)-(-?.+)$/, utilities.directionSize("padding")],
|
|
643
|
+
[/^p-?([bi][se])-?(-?.+)$/, utilities.directionSize("padding")]
|
|
594
644
|
];
|
|
595
645
|
const margins = [
|
|
596
646
|
[/^ma?()-?(-?.+)$/, utilities.directionSize("margin")],
|
|
597
647
|
[/^m-?([xy])-?(-?.+)$/, utilities.directionSize("margin")],
|
|
598
|
-
[/^m-?([rltbse])-?(-?.+)$/, utilities.directionSize("margin")]
|
|
648
|
+
[/^m-?([rltbse])-?(-?.+)$/, utilities.directionSize("margin")],
|
|
649
|
+
[/^m-(inline|block)-(-?.+)$/, utilities.directionSize("margin")],
|
|
650
|
+
[/^m-?([bi][se])-?(-?.+)$/, utilities.directionSize("margin")]
|
|
599
651
|
];
|
|
600
652
|
|
|
601
653
|
const transformGpu = {
|
|
602
|
-
"--un-transform":
|
|
654
|
+
"--un-transform": [
|
|
655
|
+
"translate3d(var(--un-translate-x), var(--un-translate-y), var(--un-translate-z))",
|
|
656
|
+
"rotate(var(--un-rotate))",
|
|
657
|
+
"rotateX(var(--un-rotate-x))",
|
|
658
|
+
"rotateY(var(--un-rotate-y))",
|
|
659
|
+
"rotateZ(var(--un-rotate-z))",
|
|
660
|
+
"skewX(var(--un-skew-x))",
|
|
661
|
+
"skewY(var(--un-skew-y))",
|
|
662
|
+
"scaleX(var(--un-scale-x))",
|
|
663
|
+
"scaleY(var(--un-scale-y))",
|
|
664
|
+
"scaleZ(var(--un-scale-z))"
|
|
665
|
+
].join(" ")
|
|
603
666
|
};
|
|
604
667
|
const transformCpu = {
|
|
605
|
-
"--un-transform":
|
|
668
|
+
"--un-transform": [
|
|
669
|
+
"translateX(var(--un-translate-x))",
|
|
670
|
+
"translateY(var(--un-translate-y))",
|
|
671
|
+
"translateZ(var(--un-translate-z))",
|
|
672
|
+
"rotate(var(--un-rotate))",
|
|
673
|
+
"rotateX(var(--un-rotate-x))",
|
|
674
|
+
"rotateY(var(--un-rotate-y))",
|
|
675
|
+
"rotateZ(var(--un-rotate-z))",
|
|
676
|
+
"skewX(var(--un-skew-x))",
|
|
677
|
+
"skewY(var(--un-skew-y))",
|
|
678
|
+
"scaleX(var(--un-scale-x))",
|
|
679
|
+
"scaleY(var(--un-scale-y))",
|
|
680
|
+
"scaleZ(var(--un-scale-z))"
|
|
681
|
+
].join(" ")
|
|
606
682
|
};
|
|
607
683
|
const transformBase = {
|
|
608
684
|
"--un-rotate": 0,
|
|
685
|
+
"--un-rotate-x": 0,
|
|
686
|
+
"--un-rotate-y": 0,
|
|
687
|
+
"--un-rotate-z": 0,
|
|
609
688
|
"--un-scale-x": 1,
|
|
610
689
|
"--un-scale-y": 1,
|
|
611
690
|
"--un-scale-z": 1,
|
|
@@ -639,7 +718,8 @@ const transforms = [
|
|
|
639
718
|
}],
|
|
640
719
|
[/^translate-()(.+)$/, handleTranslate],
|
|
641
720
|
[/^translate-([xyz])-(.+)$/, handleTranslate],
|
|
642
|
-
[/^rotate-(.+)$/, handleRotate],
|
|
721
|
+
[/^rotate-()(.+)$/, handleRotate],
|
|
722
|
+
[/^rotate(-[xyz])-(.+)$/, handleRotate],
|
|
643
723
|
[/^skew-()(.+)$/, handleSkew],
|
|
644
724
|
[/^skew-([xy])-(.+)$/, handleSkew],
|
|
645
725
|
[/^scale-()(.+)$/, handleScale],
|
|
@@ -678,14 +758,14 @@ function handleScale([, d, b]) {
|
|
|
678
758
|
];
|
|
679
759
|
}
|
|
680
760
|
}
|
|
681
|
-
function handleRotate([, b]) {
|
|
761
|
+
function handleRotate([, d, b]) {
|
|
682
762
|
const v = utilities.handler.bracket.degree(b);
|
|
683
763
|
if (v != null) {
|
|
684
764
|
return [
|
|
685
765
|
transformBase,
|
|
686
766
|
{
|
|
687
|
-
|
|
688
|
-
|
|
767
|
+
[`--un-rotate${d || ""}`]: v,
|
|
768
|
+
transform: "var(--un-transform)"
|
|
689
769
|
}
|
|
690
770
|
];
|
|
691
771
|
}
|
|
@@ -734,6 +814,9 @@ const cssVariables = [
|
|
|
734
814
|
return { [prop]: `var(--${varname})` };
|
|
735
815
|
}]
|
|
736
816
|
];
|
|
817
|
+
const cssProperty = [
|
|
818
|
+
[/^\[(.+):(.+)\]$/, ([, prop, value]) => ({ [prop]: utilities.handler.bracket(`[${value}]`) })]
|
|
819
|
+
];
|
|
737
820
|
|
|
738
821
|
const questionMark = [
|
|
739
822
|
[
|
|
@@ -774,7 +857,7 @@ const svgUtilities = [
|
|
|
774
857
|
[/^fill-(.+)$/, utilities.colorResolver("fill", "fill")],
|
|
775
858
|
[/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": utilities.handler.bracket.percent(opacity) })],
|
|
776
859
|
["fill-none", { fill: "none" }],
|
|
777
|
-
[/^stroke-(?:size
|
|
860
|
+
[/^stroke-(?:width-|size-)?(.+)$/, ([, s]) => ({ "stroke-width": utilities.handler.bracket.fraction.px.number(s) })],
|
|
778
861
|
[/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": utilities.handler.bracket.number(s) })],
|
|
779
862
|
[/^stroke-offset-(.+)$/, ([, s]) => ({ "stroke-dashoffset": utilities.handler.bracket.px.numberWithUnit(s) })],
|
|
780
863
|
[/^stroke-(.+)$/, utilities.colorResolver("stroke", "stroke")],
|
|
@@ -792,6 +875,7 @@ const svgUtilities = [
|
|
|
792
875
|
|
|
793
876
|
const rules = [
|
|
794
877
|
cssVariables,
|
|
878
|
+
cssProperty,
|
|
795
879
|
paddings,
|
|
796
880
|
margins,
|
|
797
881
|
displays,
|
|
@@ -856,6 +940,7 @@ exports.boxShadows = boxShadows;
|
|
|
856
940
|
exports.boxSizing = boxSizing;
|
|
857
941
|
exports.breaks = breaks;
|
|
858
942
|
exports.contents = contents;
|
|
943
|
+
exports.cssProperty = cssProperty;
|
|
859
944
|
exports.cssVariables = cssVariables;
|
|
860
945
|
exports.cursors = cursors;
|
|
861
946
|
exports.displays = displays;
|
|
@@ -881,6 +966,7 @@ exports.questionMark = questionMark;
|
|
|
881
966
|
exports.resizes = resizes;
|
|
882
967
|
exports.rings = rings;
|
|
883
968
|
exports.rules = rules;
|
|
969
|
+
exports.shadowBase = shadowBase;
|
|
884
970
|
exports.sizes = sizes;
|
|
885
971
|
exports.svgUtilities = svgUtilities;
|
|
886
972
|
exports.tabSizes = tabSizes;
|
package/dist/chunks/default2.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as handler, c as colorResolver, d as directionMap, p as parseColor, a as cornerMap,
|
|
1
|
+
import { h as handler, c as colorResolver, d as directionMap, p as parseColor, a as cornerMap, i as insetMap, b as directionSize, e as positionMap, x as xyzMap } from './utilities.mjs';
|
|
2
2
|
import { toArray, CONTROL_SHORTCUT_NO_MERGE } from '@unocss/core';
|
|
3
3
|
|
|
4
4
|
const verticalAlignAlias = {
|
|
@@ -44,19 +44,28 @@ const borders = [
|
|
|
44
44
|
[/^(?:border|b)()(?:-(.+))?$/, handlerBorder],
|
|
45
45
|
[/^(?:border|b)-([xy])(?:-(.+))?$/, handlerBorder],
|
|
46
46
|
[/^(?:border|b)-([rltbse])(?:-(.+))?$/, handlerBorder],
|
|
47
|
-
[/^(?:border|b)-()
|
|
48
|
-
[/^(?:border|b)-([
|
|
49
|
-
[/^(?:border|b)-(
|
|
47
|
+
[/^(?:border|b)-(block|inline)(?:-(.+))?$/, handlerBorder],
|
|
48
|
+
[/^(?:border|b)-([bi][se])(?:-(.+))?$/, handlerBorder],
|
|
49
|
+
[/^(?:border|b)-()(?:width|size)-(.+)$/, handlerBorderSize],
|
|
50
|
+
[/^(?:border|b)-([xy])-(?:width|size)-(.+)$/, handlerBorderSize],
|
|
51
|
+
[/^(?:border|b)-([rltbse])-(?:width|size)-(.+)$/, handlerBorderSize],
|
|
52
|
+
[/^(?:border|b)-(block|inline)-(?:width|size)-(.+)$/, handlerBorderSize],
|
|
53
|
+
[/^(?:border|b)-([bi][se])-(?:width|size)-(.+)$/, handlerBorderSize],
|
|
50
54
|
[/^(?:border|b)-()(?:color-)?(.+)$/, handlerBorderColor],
|
|
51
55
|
[/^(?:border|b)-([xy])-(?:color-)?(.+)$/, handlerBorderColor],
|
|
52
56
|
[/^(?:border|b)-([rltbse])-(?:color-)?(.+)$/, handlerBorderColor],
|
|
57
|
+
[/^(?:border|b)-(block|inline)-(?:color-)?(.+)$/, handlerBorderColor],
|
|
58
|
+
[/^(?:border|b)-([bi][se])-(?:color-)?(.+)$/, handlerBorderColor],
|
|
53
59
|
[/^(?:border|b)-()op(?:acity)?-?(.+)$/, handlerBorderOpacity],
|
|
54
60
|
[/^(?:border|b)-([xy])-op(?:acity)?-?(.+)$/, handlerBorderOpacity],
|
|
55
61
|
[/^(?:border|b)-([rltbse])-op(?:acity)?-?(.+)$/, handlerBorderOpacity],
|
|
62
|
+
[/^(?:border|b)-(block|inline)-op(?:acity)?-?(.+)$/, handlerBorderOpacity],
|
|
63
|
+
[/^(?:border|b)-([bi][se])-op(?:acity)?-?(.+)$/, handlerBorderOpacity],
|
|
56
64
|
[/^(?:border-)?(?:rounded|rd)()(?:-(.+))?$/, handlerRounded],
|
|
57
|
-
[/^(?:border-)?(?:rounded|rd)-([xy])(?:-(.+))?$/, handlerRounded],
|
|
58
65
|
[/^(?:border-)?(?:rounded|rd)-([rltb])(?:-(.+))?$/, handlerRounded],
|
|
59
66
|
[/^(?:border-)?(?:rounded|rd)-([rltb]{2})(?:-(.+))?$/, handlerRounded],
|
|
67
|
+
[/^(?:border-)?(?:rounded|rd)-([bi][se])(?:-(.+))?$/, handlerRounded],
|
|
68
|
+
[/^(?:border-)?(?:rounded|rd)-([bi][se]-[bi][se])(?:-(.+))?$/, handlerRounded],
|
|
60
69
|
["border-solid", { "border-style": "solid" }],
|
|
61
70
|
["border-dashed", { "border-style": "dashed" }],
|
|
62
71
|
["border-dotted", { "border-style": "dotted" }],
|
|
@@ -250,7 +259,29 @@ const textStrokes = [
|
|
|
250
259
|
[/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": handler.bracket.percent(opacity) })]
|
|
251
260
|
];
|
|
252
261
|
const textShadows = [
|
|
253
|
-
[/^text-shadow(?:-(.+))?$/, ([, s], { theme }) =>
|
|
262
|
+
[/^text-shadow(?:-(.+))?$/, ([, s], { theme }) => {
|
|
263
|
+
const v = theme.textShadow?.[s || "DEFAULT"];
|
|
264
|
+
if (v != null) {
|
|
265
|
+
const shadow = toArray(v);
|
|
266
|
+
const colored = shadow.map((s2) => s2.replace(/\s\S+$/, " var(--un-text-shadow-color)"));
|
|
267
|
+
return {
|
|
268
|
+
"--un-text-shadow": shadow.join(","),
|
|
269
|
+
"--un-text-shadow-colored": colored.join(","),
|
|
270
|
+
"text-shadow": "var(--un-text-shadow)"
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
return { "text-shadow": handler.bracket.cssvar(s) };
|
|
274
|
+
}],
|
|
275
|
+
[/^text-shadow-color-(.+)$/, (m, ctx) => {
|
|
276
|
+
const color = colorResolver("--un-text-shadow-color", "text-shadow")(m, ctx);
|
|
277
|
+
if (color) {
|
|
278
|
+
return {
|
|
279
|
+
...color,
|
|
280
|
+
"--un-text-shadow": "var(--un-text-shadow-colored)"
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
}],
|
|
284
|
+
[/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": handler.bracket.percent(opacity) })]
|
|
254
285
|
];
|
|
255
286
|
|
|
256
287
|
const directions = {
|
|
@@ -386,16 +417,18 @@ const placements = [
|
|
|
386
417
|
["place-self-stretch", { "place-self": "stretch" }]
|
|
387
418
|
];
|
|
388
419
|
function handleInsetValue(v) {
|
|
389
|
-
return
|
|
420
|
+
return handler.bracket.fraction.cssvar.auto.rem(v);
|
|
390
421
|
}
|
|
391
422
|
function handleInsetValues([, d, v]) {
|
|
392
423
|
const r = handleInsetValue(v);
|
|
393
|
-
if (r != null && d in
|
|
394
|
-
return
|
|
424
|
+
if (r != null && d in insetMap)
|
|
425
|
+
return insetMap[d].map((i) => [i.slice(1), r]);
|
|
395
426
|
}
|
|
396
427
|
const insets = [
|
|
397
428
|
[/^(?:position-|pos-)?inset-(.+)$/, ([, v]) => ({ inset: handleInsetValue(v) })],
|
|
398
429
|
[/^(?:position-|pos-)?inset-([xy])-(.+)$/, handleInsetValues],
|
|
430
|
+
[/^(?:position-|pos-)?inset-(block|inline)-(.+)$/, handleInsetValues],
|
|
431
|
+
[/^(?:position-|pos-)?inset-([bi][se])-(.+)$/, handleInsetValues],
|
|
399
432
|
[/^(?:position-|pos-)?(top|left|right|bottom)-(.+)$/, ([, d, v]) => ({ [d]: handleInsetValue(v) })]
|
|
400
433
|
];
|
|
401
434
|
const floats = [
|
|
@@ -491,19 +524,62 @@ const fontSmoothings = [
|
|
|
491
524
|
}]
|
|
492
525
|
];
|
|
493
526
|
|
|
527
|
+
const shadowBase = {
|
|
528
|
+
[CONTROL_SHORTCUT_NO_MERGE]: "",
|
|
529
|
+
"--un-ring-offset-shadow": "0 0 #0000",
|
|
530
|
+
"--un-ring-shadow": "0 0 #0000",
|
|
531
|
+
"--un-shadow-inset": varEmpty,
|
|
532
|
+
"--un-shadow": "0 0 #0000",
|
|
533
|
+
"--un-shadow-colored": "0 0 #0000"
|
|
534
|
+
};
|
|
535
|
+
const boxShadows = [
|
|
536
|
+
[/^shadow(?:-(.+))?$/, ([, d], { theme }) => {
|
|
537
|
+
const v = theme.boxShadow?.[d || "DEFAULT"];
|
|
538
|
+
if (v) {
|
|
539
|
+
const shadow = toArray(v);
|
|
540
|
+
const colored = shadow.map((s) => s.replace(/\s\S+$/, " var(--un-shadow-color)"));
|
|
541
|
+
return [
|
|
542
|
+
shadowBase,
|
|
543
|
+
{
|
|
544
|
+
"--un-shadow": shadow.join(","),
|
|
545
|
+
"--un-shadow-colored": colored.join(","),
|
|
546
|
+
"box-shadow": "var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow)"
|
|
547
|
+
}
|
|
548
|
+
];
|
|
549
|
+
}
|
|
550
|
+
}],
|
|
551
|
+
[/^shadow-(.+)$/, (m, ctx) => {
|
|
552
|
+
const color = colorResolver("--un-shadow-color", "shadow")(m, ctx);
|
|
553
|
+
if (color) {
|
|
554
|
+
return {
|
|
555
|
+
...color,
|
|
556
|
+
"--un-shadow": "var(--un-shadow-colored)"
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
}],
|
|
560
|
+
[/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": handler.bracket.percent.cssvar(opacity) })],
|
|
561
|
+
["shadow-inset", { "--un-shadow-inset": "inset" }]
|
|
562
|
+
];
|
|
563
|
+
|
|
564
|
+
const ringBase = {
|
|
565
|
+
"--un-ring-inset": varEmpty,
|
|
566
|
+
"--un-ring-offset-width": "0px",
|
|
567
|
+
"--un-ring-offset-color": "#fff",
|
|
568
|
+
"--un-ring-color": "rgba(147,197,253,0.5)",
|
|
569
|
+
...shadowBase
|
|
570
|
+
};
|
|
494
571
|
const rings = [
|
|
495
572
|
[/^ring(?:-(.+))?$/, ([, d]) => {
|
|
496
573
|
const value = handler.px(d || "1");
|
|
497
574
|
if (value) {
|
|
498
|
-
return
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
};
|
|
575
|
+
return [
|
|
576
|
+
ringBase,
|
|
577
|
+
{
|
|
578
|
+
"--un-ring-offset-shadow": "var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color)",
|
|
579
|
+
"--un-ring-shadow": `var(--un-ring-inset) 0 0 0 calc(${value} + var(--un-ring-offset-width)) var(--un-ring-color)`,
|
|
580
|
+
"box-shadow": "var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow, 0 0 #0000)"
|
|
581
|
+
}
|
|
582
|
+
];
|
|
507
583
|
}
|
|
508
584
|
}],
|
|
509
585
|
["ring-offset", { "--un-ring-offset-width": "1px" }],
|
|
@@ -515,46 +591,17 @@ const rings = [
|
|
|
515
591
|
["ring-inset", { "--un-ring-inset": "inset" }]
|
|
516
592
|
];
|
|
517
593
|
|
|
518
|
-
const
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
if (!color)
|
|
524
|
-
return;
|
|
525
|
-
if (rgba) {
|
|
526
|
-
return {
|
|
527
|
-
"--un-shadow-color": `${rgba.slice(0, 3).join(",")}`
|
|
528
|
-
};
|
|
529
|
-
} else {
|
|
530
|
-
return {
|
|
531
|
-
"--un-shadow-color": color
|
|
532
|
-
};
|
|
533
|
-
}
|
|
594
|
+
const sizeMapping = {
|
|
595
|
+
h: "height",
|
|
596
|
+
w: "width",
|
|
597
|
+
inline: "inline-size",
|
|
598
|
+
block: "block-size"
|
|
534
599
|
};
|
|
535
|
-
const boxShadows = [
|
|
536
|
-
[/^shadow(?:-(.+))?$/, ([, d], { theme }) => {
|
|
537
|
-
const value = theme.boxShadow?.[d || "DEFAULT"];
|
|
538
|
-
if (value) {
|
|
539
|
-
return {
|
|
540
|
-
"--un-shadow-inset": varEmpty,
|
|
541
|
-
"--un-shadow-color": "0,0,0",
|
|
542
|
-
"--un-shadow": value,
|
|
543
|
-
"box-shadow": "var(--un-ring-offset-shadow, 0 0 #0000), var(--un-ring-shadow, 0 0 #0000), var(--un-shadow)"
|
|
544
|
-
};
|
|
545
|
-
}
|
|
546
|
-
}],
|
|
547
|
-
[/^shadow-(.+)$/, ([, d], { theme }) => shadowColorResolver(d, theme)],
|
|
548
|
-
["shadow-inset", { "--un-shadow-inset": "inset" }]
|
|
549
|
-
];
|
|
550
|
-
|
|
551
600
|
function getPropName(minmax, hw) {
|
|
552
|
-
return `${minmax
|
|
601
|
+
return `${minmax || ""}${sizeMapping[hw]}`;
|
|
553
602
|
}
|
|
554
603
|
function getSizeValue(minmax, hw, theme, prop) {
|
|
555
|
-
|
|
556
|
-
if (minmax)
|
|
557
|
-
str = `${minmax}${capitalize(str)}`;
|
|
604
|
+
const str = getPropName(minmax, hw).replace(/-(\w)/g, (_, p) => p.toUpperCase());
|
|
558
605
|
const v = theme[str]?.[prop];
|
|
559
606
|
if (v != null)
|
|
560
607
|
return v;
|
|
@@ -567,8 +614,9 @@ function getSizeValue(minmax, hw, theme, prop) {
|
|
|
567
614
|
return handler.bracket.cssvar.fraction.auto.rem(prop);
|
|
568
615
|
}
|
|
569
616
|
const sizes = [
|
|
570
|
-
[/^(
|
|
571
|
-
[/^(
|
|
617
|
+
[/^(min-|max-)?([wh])-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) })],
|
|
618
|
+
[/^(min-|max-)?(block|inline)-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) })],
|
|
619
|
+
[/^(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: theme.breakpoints?.[s] })]
|
|
572
620
|
];
|
|
573
621
|
function getAspectRatio(prop) {
|
|
574
622
|
if (/^\d+\/\d+$/.test(prop))
|
|
@@ -588,22 +636,53 @@ const aspectRatio = [
|
|
|
588
636
|
const paddings = [
|
|
589
637
|
[/^pa?()-?(-?.+)$/, directionSize("padding")],
|
|
590
638
|
[/^p-?([xy])-?(-?.+)$/, directionSize("padding")],
|
|
591
|
-
[/^p-?([rltbse])-?(-?.+)$/, directionSize("padding")]
|
|
639
|
+
[/^p-?([rltbse])-?(-?.+)$/, directionSize("padding")],
|
|
640
|
+
[/^p-(inline|block)-(-?.+)$/, directionSize("padding")],
|
|
641
|
+
[/^p-?([bi][se])-?(-?.+)$/, directionSize("padding")]
|
|
592
642
|
];
|
|
593
643
|
const margins = [
|
|
594
644
|
[/^ma?()-?(-?.+)$/, directionSize("margin")],
|
|
595
645
|
[/^m-?([xy])-?(-?.+)$/, directionSize("margin")],
|
|
596
|
-
[/^m-?([rltbse])-?(-?.+)$/, directionSize("margin")]
|
|
646
|
+
[/^m-?([rltbse])-?(-?.+)$/, directionSize("margin")],
|
|
647
|
+
[/^m-(inline|block)-(-?.+)$/, directionSize("margin")],
|
|
648
|
+
[/^m-?([bi][se])-?(-?.+)$/, directionSize("margin")]
|
|
597
649
|
];
|
|
598
650
|
|
|
599
651
|
const transformGpu = {
|
|
600
|
-
"--un-transform":
|
|
652
|
+
"--un-transform": [
|
|
653
|
+
"translate3d(var(--un-translate-x), var(--un-translate-y), var(--un-translate-z))",
|
|
654
|
+
"rotate(var(--un-rotate))",
|
|
655
|
+
"rotateX(var(--un-rotate-x))",
|
|
656
|
+
"rotateY(var(--un-rotate-y))",
|
|
657
|
+
"rotateZ(var(--un-rotate-z))",
|
|
658
|
+
"skewX(var(--un-skew-x))",
|
|
659
|
+
"skewY(var(--un-skew-y))",
|
|
660
|
+
"scaleX(var(--un-scale-x))",
|
|
661
|
+
"scaleY(var(--un-scale-y))",
|
|
662
|
+
"scaleZ(var(--un-scale-z))"
|
|
663
|
+
].join(" ")
|
|
601
664
|
};
|
|
602
665
|
const transformCpu = {
|
|
603
|
-
"--un-transform":
|
|
666
|
+
"--un-transform": [
|
|
667
|
+
"translateX(var(--un-translate-x))",
|
|
668
|
+
"translateY(var(--un-translate-y))",
|
|
669
|
+
"translateZ(var(--un-translate-z))",
|
|
670
|
+
"rotate(var(--un-rotate))",
|
|
671
|
+
"rotateX(var(--un-rotate-x))",
|
|
672
|
+
"rotateY(var(--un-rotate-y))",
|
|
673
|
+
"rotateZ(var(--un-rotate-z))",
|
|
674
|
+
"skewX(var(--un-skew-x))",
|
|
675
|
+
"skewY(var(--un-skew-y))",
|
|
676
|
+
"scaleX(var(--un-scale-x))",
|
|
677
|
+
"scaleY(var(--un-scale-y))",
|
|
678
|
+
"scaleZ(var(--un-scale-z))"
|
|
679
|
+
].join(" ")
|
|
604
680
|
};
|
|
605
681
|
const transformBase = {
|
|
606
682
|
"--un-rotate": 0,
|
|
683
|
+
"--un-rotate-x": 0,
|
|
684
|
+
"--un-rotate-y": 0,
|
|
685
|
+
"--un-rotate-z": 0,
|
|
607
686
|
"--un-scale-x": 1,
|
|
608
687
|
"--un-scale-y": 1,
|
|
609
688
|
"--un-scale-z": 1,
|
|
@@ -637,7 +716,8 @@ const transforms = [
|
|
|
637
716
|
}],
|
|
638
717
|
[/^translate-()(.+)$/, handleTranslate],
|
|
639
718
|
[/^translate-([xyz])-(.+)$/, handleTranslate],
|
|
640
|
-
[/^rotate-(.+)$/, handleRotate],
|
|
719
|
+
[/^rotate-()(.+)$/, handleRotate],
|
|
720
|
+
[/^rotate(-[xyz])-(.+)$/, handleRotate],
|
|
641
721
|
[/^skew-()(.+)$/, handleSkew],
|
|
642
722
|
[/^skew-([xy])-(.+)$/, handleSkew],
|
|
643
723
|
[/^scale-()(.+)$/, handleScale],
|
|
@@ -676,14 +756,14 @@ function handleScale([, d, b]) {
|
|
|
676
756
|
];
|
|
677
757
|
}
|
|
678
758
|
}
|
|
679
|
-
function handleRotate([, b]) {
|
|
759
|
+
function handleRotate([, d, b]) {
|
|
680
760
|
const v = handler.bracket.degree(b);
|
|
681
761
|
if (v != null) {
|
|
682
762
|
return [
|
|
683
763
|
transformBase,
|
|
684
764
|
{
|
|
685
|
-
|
|
686
|
-
|
|
765
|
+
[`--un-rotate${d || ""}`]: v,
|
|
766
|
+
transform: "var(--un-transform)"
|
|
687
767
|
}
|
|
688
768
|
];
|
|
689
769
|
}
|
|
@@ -732,6 +812,9 @@ const cssVariables = [
|
|
|
732
812
|
return { [prop]: `var(--${varname})` };
|
|
733
813
|
}]
|
|
734
814
|
];
|
|
815
|
+
const cssProperty = [
|
|
816
|
+
[/^\[(.+):(.+)\]$/, ([, prop, value]) => ({ [prop]: handler.bracket(`[${value}]`) })]
|
|
817
|
+
];
|
|
735
818
|
|
|
736
819
|
const questionMark = [
|
|
737
820
|
[
|
|
@@ -772,7 +855,7 @@ const svgUtilities = [
|
|
|
772
855
|
[/^fill-(.+)$/, colorResolver("fill", "fill")],
|
|
773
856
|
[/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": handler.bracket.percent(opacity) })],
|
|
774
857
|
["fill-none", { fill: "none" }],
|
|
775
|
-
[/^stroke-(?:size
|
|
858
|
+
[/^stroke-(?:width-|size-)?(.+)$/, ([, s]) => ({ "stroke-width": handler.bracket.fraction.px.number(s) })],
|
|
776
859
|
[/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": handler.bracket.number(s) })],
|
|
777
860
|
[/^stroke-offset-(.+)$/, ([, s]) => ({ "stroke-dashoffset": handler.bracket.px.numberWithUnit(s) })],
|
|
778
861
|
[/^stroke-(.+)$/, colorResolver("stroke", "stroke")],
|
|
@@ -790,6 +873,7 @@ const svgUtilities = [
|
|
|
790
873
|
|
|
791
874
|
const rules = [
|
|
792
875
|
cssVariables,
|
|
876
|
+
cssProperty,
|
|
793
877
|
paddings,
|
|
794
878
|
margins,
|
|
795
879
|
displays,
|
|
@@ -844,4 +928,4 @@ const rules = [
|
|
|
844
928
|
questionMark
|
|
845
929
|
].flat(1);
|
|
846
930
|
|
|
847
|
-
export {
|
|
931
|
+
export { cssVariables as $, boxShadows as A, sizes as B, aspectRatio as C, paddings as D, margins as E, varEmpty as F, displays as G, appearances as H, cursors as I, pointerEvents as J, resizes as K, userSelects as L, whitespaces as M, contents as N, breaks as O, textOverflows as P, textTransforms as Q, fontStyles as R, fontSmoothings as S, svgUtilities as T, transforms as U, transitions as V, fonts as W, tabSizes as X, textIndents as Y, textStrokes as Z, textShadows as _, appearance as a, cssProperty as a0, textDecorations as a1, 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, shadowBase as y, zIndexes as z };
|
|
@@ -12,13 +12,27 @@ const directionMap = {
|
|
|
12
12
|
"x": ["-left", "-right"],
|
|
13
13
|
"y": ["-top", "-bottom"],
|
|
14
14
|
"": [""],
|
|
15
|
-
"
|
|
15
|
+
"bs": ["-block-start"],
|
|
16
|
+
"be": ["-block-end"],
|
|
17
|
+
"is": ["-inline-start"],
|
|
18
|
+
"ie": ["-inline-end"],
|
|
19
|
+
"block": ["-block-start", "-block-end"],
|
|
20
|
+
"inline": ["-inline-start", "-inline-end"]
|
|
21
|
+
};
|
|
22
|
+
const insetMap = {
|
|
23
|
+
...directionMap,
|
|
24
|
+
bs: ["-inset-block-start"],
|
|
25
|
+
be: ["-inset-block-end"],
|
|
26
|
+
is: ["-inset-inline-start"],
|
|
27
|
+
ie: ["-inset-inline-end"],
|
|
28
|
+
block: ["-inset-block-start", "-inset-block-end"],
|
|
29
|
+
inline: ["-inset-inline-start", "-inset-inline-end"]
|
|
16
30
|
};
|
|
17
31
|
const cornerMap = {
|
|
18
|
-
"
|
|
32
|
+
"l": ["-top-left", "-bottom-left"],
|
|
19
33
|
"r": ["-top-right", "-bottom-right"],
|
|
34
|
+
"t": ["-top-left", "-top-right"],
|
|
20
35
|
"b": ["-bottom-left", "-bottom-right"],
|
|
21
|
-
"l": ["-bottom-left", "-top-left"],
|
|
22
36
|
"tl": ["-top-left"],
|
|
23
37
|
"lt": ["-top-left"],
|
|
24
38
|
"tr": ["-top-right"],
|
|
@@ -27,7 +41,19 @@ const cornerMap = {
|
|
|
27
41
|
"lb": ["-bottom-left"],
|
|
28
42
|
"br": ["-bottom-right"],
|
|
29
43
|
"rb": ["-bottom-right"],
|
|
30
|
-
"": [""]
|
|
44
|
+
"": [""],
|
|
45
|
+
"bs": ["-start-start", "-start-end"],
|
|
46
|
+
"be": ["-end-start", "-end-end"],
|
|
47
|
+
"is": ["-end-start", "-start-start"],
|
|
48
|
+
"ie": ["-start-end", "-end-end"],
|
|
49
|
+
"bs-is": ["-start-start"],
|
|
50
|
+
"is-bs": ["-start-start"],
|
|
51
|
+
"bs-ie": ["-start-end"],
|
|
52
|
+
"ie-bs": ["-start-end"],
|
|
53
|
+
"be-is": ["-end-start"],
|
|
54
|
+
"is-be": ["-end-start"],
|
|
55
|
+
"be-ie": ["-end-end"],
|
|
56
|
+
"ie-be": ["-end-end"]
|
|
31
57
|
};
|
|
32
58
|
const xyzMap = {
|
|
33
59
|
"x": ["-x"],
|
|
@@ -332,6 +358,7 @@ exports.directionMap = directionMap;
|
|
|
332
358
|
exports.directionSize = directionSize;
|
|
333
359
|
exports.h = h;
|
|
334
360
|
exports.handler = handler;
|
|
361
|
+
exports.insetMap = insetMap;
|
|
335
362
|
exports.parseColor = parseColor;
|
|
336
363
|
exports.positionMap = positionMap;
|
|
337
364
|
exports.valueHandlers = valueHandlers;
|
|
@@ -10,13 +10,27 @@ const directionMap = {
|
|
|
10
10
|
"x": ["-left", "-right"],
|
|
11
11
|
"y": ["-top", "-bottom"],
|
|
12
12
|
"": [""],
|
|
13
|
-
"
|
|
13
|
+
"bs": ["-block-start"],
|
|
14
|
+
"be": ["-block-end"],
|
|
15
|
+
"is": ["-inline-start"],
|
|
16
|
+
"ie": ["-inline-end"],
|
|
17
|
+
"block": ["-block-start", "-block-end"],
|
|
18
|
+
"inline": ["-inline-start", "-inline-end"]
|
|
19
|
+
};
|
|
20
|
+
const insetMap = {
|
|
21
|
+
...directionMap,
|
|
22
|
+
bs: ["-inset-block-start"],
|
|
23
|
+
be: ["-inset-block-end"],
|
|
24
|
+
is: ["-inset-inline-start"],
|
|
25
|
+
ie: ["-inset-inline-end"],
|
|
26
|
+
block: ["-inset-block-start", "-inset-block-end"],
|
|
27
|
+
inline: ["-inset-inline-start", "-inset-inline-end"]
|
|
14
28
|
};
|
|
15
29
|
const cornerMap = {
|
|
16
|
-
"
|
|
30
|
+
"l": ["-top-left", "-bottom-left"],
|
|
17
31
|
"r": ["-top-right", "-bottom-right"],
|
|
32
|
+
"t": ["-top-left", "-top-right"],
|
|
18
33
|
"b": ["-bottom-left", "-bottom-right"],
|
|
19
|
-
"l": ["-bottom-left", "-top-left"],
|
|
20
34
|
"tl": ["-top-left"],
|
|
21
35
|
"lt": ["-top-left"],
|
|
22
36
|
"tr": ["-top-right"],
|
|
@@ -25,7 +39,19 @@ const cornerMap = {
|
|
|
25
39
|
"lb": ["-bottom-left"],
|
|
26
40
|
"br": ["-bottom-right"],
|
|
27
41
|
"rb": ["-bottom-right"],
|
|
28
|
-
"": [""]
|
|
42
|
+
"": [""],
|
|
43
|
+
"bs": ["-start-start", "-start-end"],
|
|
44
|
+
"be": ["-end-start", "-end-end"],
|
|
45
|
+
"is": ["-end-start", "-start-start"],
|
|
46
|
+
"ie": ["-start-end", "-end-end"],
|
|
47
|
+
"bs-is": ["-start-start"],
|
|
48
|
+
"is-bs": ["-start-start"],
|
|
49
|
+
"bs-ie": ["-start-end"],
|
|
50
|
+
"ie-bs": ["-start-end"],
|
|
51
|
+
"be-is": ["-end-start"],
|
|
52
|
+
"is-be": ["-end-start"],
|
|
53
|
+
"be-ie": ["-end-end"],
|
|
54
|
+
"ie-be": ["-end-end"]
|
|
29
55
|
};
|
|
30
56
|
const xyzMap = {
|
|
31
57
|
"x": ["-x"],
|
|
@@ -323,4 +349,4 @@ const colorResolver = (property, varName) => ([, body], { theme }) => {
|
|
|
323
349
|
}
|
|
324
350
|
};
|
|
325
351
|
|
|
326
|
-
export { cornerMap as a,
|
|
352
|
+
export { cornerMap as a, directionSize as b, colorResolver as c, directionMap as d, positionMap as e, h as f, capitalize as g, handler as h, insetMap as i, parseColor as p, valueHandlers as v, xyzMap as x };
|
package/dist/colors.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { c as colors } from './colors-
|
|
2
|
-
import './types-
|
|
1
|
+
export { c as colors } from './colors-338f482c';
|
|
2
|
+
import './types-c14b808b';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PresetOptions, Preset } from '@unocss/core';
|
|
2
|
-
import { T as Theme } from './types-
|
|
3
|
-
export { T as Theme, a as ThemeAnimation } from './types-
|
|
4
|
-
export { t as theme } from './default-
|
|
5
|
-
export { c as colors } from './colors-
|
|
6
|
-
export { p as parseColor } from './utilities-
|
|
2
|
+
import { T as Theme } from './types-c14b808b';
|
|
3
|
+
export { T as Theme, a as ThemeAnimation } from './types-c14b808b';
|
|
4
|
+
export { t as theme } from './default-17948303';
|
|
5
|
+
export { c as colors } from './colors-338f482c';
|
|
6
|
+
export { p as parseColor } from './utilities-13c33ba5';
|
|
7
7
|
|
|
8
8
|
interface PresetMiniOptions extends PresetOptions {
|
|
9
9
|
/**
|
package/dist/rules.cjs
CHANGED
|
@@ -18,6 +18,7 @@ exports.boxShadows = _default.boxShadows;
|
|
|
18
18
|
exports.boxSizing = _default.boxSizing;
|
|
19
19
|
exports.breaks = _default.breaks;
|
|
20
20
|
exports.contents = _default.contents;
|
|
21
|
+
exports.cssProperty = _default.cssProperty;
|
|
21
22
|
exports.cssVariables = _default.cssVariables;
|
|
22
23
|
exports.cursors = _default.cursors;
|
|
23
24
|
exports.displays = _default.displays;
|
|
@@ -43,6 +44,7 @@ exports.questionMark = _default.questionMark;
|
|
|
43
44
|
exports.resizes = _default.resizes;
|
|
44
45
|
exports.rings = _default.rings;
|
|
45
46
|
exports.rules = _default.rules;
|
|
47
|
+
exports.shadowBase = _default.shadowBase;
|
|
46
48
|
exports.sizes = _default.sizes;
|
|
47
49
|
exports.svgUtilities = _default.svgUtilities;
|
|
48
50
|
exports.tabSizes = _default.tabSizes;
|
package/dist/rules.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Rule } from '@unocss/core';
|
|
2
|
-
import { T as Theme } from './types-
|
|
2
|
+
import { T as Theme } from './types-c14b808b';
|
|
3
3
|
|
|
4
4
|
declare const verticalAligns: Rule[];
|
|
5
5
|
declare const textAligns: Rule[];
|
|
@@ -49,6 +49,14 @@ declare const questionMark: Rule[];
|
|
|
49
49
|
|
|
50
50
|
declare const rings: Rule<Theme>[];
|
|
51
51
|
|
|
52
|
+
declare const shadowBase: {
|
|
53
|
+
"$$shortcut-no-merge": string;
|
|
54
|
+
'--un-ring-offset-shadow': string;
|
|
55
|
+
'--un-ring-shadow': string;
|
|
56
|
+
'--un-shadow-inset': string;
|
|
57
|
+
'--un-shadow': string;
|
|
58
|
+
'--un-shadow-colored': string;
|
|
59
|
+
};
|
|
52
60
|
declare const boxShadows: Rule<Theme>[];
|
|
53
61
|
|
|
54
62
|
declare const sizes: Rule<Theme>[];
|
|
@@ -85,7 +93,8 @@ declare const textStrokes: Rule<Theme>[];
|
|
|
85
93
|
declare const textShadows: Rule<Theme>[];
|
|
86
94
|
|
|
87
95
|
declare const cssVariables: Rule[];
|
|
96
|
+
declare const cssProperty: Rule[];
|
|
88
97
|
|
|
89
98
|
declare const textDecorations: Rule[];
|
|
90
99
|
|
|
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 };
|
|
100
|
+
export { alignments, appearance, appearances, aspectRatio, bgColors, borders, boxShadows, boxSizing, breaks, contents, cssProperty, 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, shadowBase, 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,3 +1,3 @@
|
|
|
1
|
-
export { l as alignments, a as appearance,
|
|
1
|
+
export { l as alignments, a as appearance, H as appearances, C as aspectRatio, e as bgColors, b as borders, A as boxShadows, s as boxSizing, O as breaks, N as contents, a0 as cssProperty, $ as cssVariables, I as cursors, G as displays, f as flex, q as floats, S as fontSmoothings, R as fontStyles, W as fonts, g as gaps, h as grids, n as insets, j as justifies, E as margins, c as opacity, k as orders, o as outline, i as overflows, D as paddings, m as placements, J as pointerEvents, p as positions, u as questionMark, K as resizes, x as rings, r as rules, y as shadowBase, B as sizes, T as svgUtilities, X as tabSizes, t as textAligns, d as textColors, a1 as textDecorations, Y as textIndents, P as textOverflows, _ as textShadows, Z as textStrokes, Q as textTransforms, U as transforms, V as transitions, L as userSelects, F as varEmpty, v as verticalAligns, M as whitespaces, w as willChange, z as zIndexes } from './chunks/default2.mjs';
|
|
2
2
|
import './chunks/utilities.mjs';
|
|
3
3
|
import '@unocss/core';
|
package/dist/theme.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { c as colors } from './colors-
|
|
2
|
-
export { t as theme } from './default-
|
|
3
|
-
import { T as Theme } from './types-
|
|
4
|
-
export { T as Theme, a as ThemeAnimation } from './types-
|
|
1
|
+
export { c as colors } from './colors-338f482c';
|
|
2
|
+
export { t as theme } from './default-17948303';
|
|
3
|
+
import { T as Theme } from './types-c14b808b';
|
|
4
|
+
export { T as Theme, a as ThemeAnimation } from './types-c14b808b';
|
|
5
5
|
|
|
6
6
|
declare const blur: {
|
|
7
7
|
DEFAULT: string;
|
|
@@ -55,11 +55,11 @@ declare const borderRadius: {
|
|
|
55
55
|
full: string;
|
|
56
56
|
};
|
|
57
57
|
declare const boxShadow: {
|
|
58
|
-
DEFAULT: string;
|
|
58
|
+
DEFAULT: string[];
|
|
59
59
|
sm: string;
|
|
60
|
-
md: string;
|
|
61
|
-
lg: string;
|
|
62
|
-
xl: string;
|
|
60
|
+
md: string[];
|
|
61
|
+
lg: string[];
|
|
62
|
+
xl: string[];
|
|
63
63
|
'2xl': string;
|
|
64
64
|
inner: string;
|
|
65
65
|
none: string;
|
|
@@ -11,6 +11,12 @@ interface Theme {
|
|
|
11
11
|
maxHeight?: Record<string, string>;
|
|
12
12
|
minWidth?: Record<string, string>;
|
|
13
13
|
minHeight?: Record<string, string>;
|
|
14
|
+
inlineSize?: Record<string, string>;
|
|
15
|
+
blockSize?: Record<string, string>;
|
|
16
|
+
maxInlineSize?: Record<string, string>;
|
|
17
|
+
maxBlockSize?: Record<string, string>;
|
|
18
|
+
minInlineSize?: Record<string, string>;
|
|
19
|
+
minBlockSize?: Record<string, string>;
|
|
14
20
|
borderRadius?: Record<string, string>;
|
|
15
21
|
breakpoints?: Record<string, string>;
|
|
16
22
|
colors?: Record<string, string | Record<string, string>>;
|
|
@@ -19,9 +25,9 @@ interface Theme {
|
|
|
19
25
|
lineHeight?: Record<string, string>;
|
|
20
26
|
letterSpacing?: Record<string, string>;
|
|
21
27
|
wordSpacing?: Record<string, string>;
|
|
22
|
-
boxShadow?: Record<string, string>;
|
|
28
|
+
boxShadow?: Record<string, string | string[]>;
|
|
23
29
|
textIndent?: Record<string, string>;
|
|
24
|
-
textShadow?: Record<string, string>;
|
|
30
|
+
textShadow?: Record<string, string | string[]>;
|
|
25
31
|
textStrokeWidth?: Record<string, string>;
|
|
26
32
|
blur?: Record<string, string>;
|
|
27
33
|
dropShadow?: Record<string, string | string[]>;
|
package/dist/utils.cjs
CHANGED
|
@@ -15,6 +15,7 @@ exports.directionMap = utilities.directionMap;
|
|
|
15
15
|
exports.directionSize = utilities.directionSize;
|
|
16
16
|
exports.h = utilities.h;
|
|
17
17
|
exports.handler = utilities.handler;
|
|
18
|
+
exports.insetMap = utilities.insetMap;
|
|
18
19
|
exports.parseColor = utilities.parseColor;
|
|
19
20
|
exports.positionMap = utilities.positionMap;
|
|
20
21
|
exports.valueHandlers = utilities.valueHandlers;
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as _unocss_core from '@unocss/core';
|
|
2
2
|
import { VariantHandler } from '@unocss/core';
|
|
3
|
-
export { c as capitalize, a as colorResolver, d as directionSize, p as parseColor } from './utilities-
|
|
4
|
-
import './types-
|
|
3
|
+
export { c as capitalize, a as colorResolver, d as directionSize, p as parseColor } from './utilities-13c33ba5';
|
|
4
|
+
import './types-c14b808b';
|
|
5
5
|
|
|
6
6
|
declare const directionMap: Record<string, string[]>;
|
|
7
|
+
declare const insetMap: Record<string, string[]>;
|
|
7
8
|
declare const cornerMap: Record<string, string[]>;
|
|
8
9
|
declare const xyzMap: Record<string, string[]>;
|
|
9
10
|
declare const positionMap: Record<string, string>;
|
|
@@ -59,4 +60,4 @@ declare const h: _unocss_core.ValueHandler<"number" | "auto" | "numberWithUnit"
|
|
|
59
60
|
declare const variantMatcher: (name: string, selector?: ((input: string) => string | undefined) | undefined) => (input: string) => VariantHandler | undefined;
|
|
60
61
|
declare const variantParentMatcher: (name: string, parent: string) => (input: string) => VariantHandler | undefined;
|
|
61
62
|
|
|
62
|
-
export { cornerMap, directionMap, h, handler, positionMap, handlers as valueHandlers, variantMatcher, variantParentMatcher, xyzMap };
|
|
63
|
+
export { cornerMap, directionMap, h, handler, insetMap, positionMap, handlers as valueHandlers, variantMatcher, variantParentMatcher, xyzMap };
|
package/dist/utils.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { g as capitalize, c as colorResolver, a as cornerMap, d as directionMap, b as directionSize, f as h, h as handler, i as insetMap, p as parseColor, e as positionMap, v as valueHandlers, x as xyzMap } from './chunks/utilities.mjs';
|
|
2
2
|
export { v as variantMatcher, a as variantParentMatcher } from './chunks/variants.mjs';
|
|
3
3
|
import '@unocss/core';
|
package/dist/variants.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as _unocss_core from '@unocss/core';
|
|
2
2
|
import { Variant, VariantFunction, VariantObject } from '@unocss/core';
|
|
3
|
-
import { T as Theme } from './types-
|
|
3
|
+
import { T as Theme } from './types-c14b808b';
|
|
4
4
|
import { PresetMiniOptions } from './index';
|
|
5
|
-
import './default-
|
|
6
|
-
import './colors-
|
|
7
|
-
import './utilities-
|
|
5
|
+
import './default-17948303';
|
|
6
|
+
import './colors-338f482c';
|
|
7
|
+
import './utilities-13c33ba5';
|
|
8
8
|
|
|
9
9
|
declare const variantBreakpoints: Variant<Theme>;
|
|
10
10
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-mini",
|
|
3
|
-
"version": "0.22.
|
|
3
|
+
"version": "0.22.1",
|
|
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.22.
|
|
64
|
+
"@unocss/core": "0.22.1"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "unbuild",
|