@unocss/preset-mini 0.53.0 → 0.53.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/index.cjs +6 -6
- package/dist/index.mjs +7 -7
- package/dist/rules.cjs +3 -3
- package/dist/rules.mjs +3 -3
- package/dist/shared/{preset-mini.099ab35c.cjs → preset-mini.02aa6651.cjs} +5 -5
- package/dist/shared/{preset-mini.64d922d5.mjs → preset-mini.08cdeeea.mjs} +6 -6
- package/dist/shared/{preset-mini.82cf398e.mjs → preset-mini.19364a2e.mjs} +20 -20
- package/dist/shared/{preset-mini.8d9dbf2c.cjs → preset-mini.473275f7.cjs} +20 -20
- package/dist/shared/{preset-mini.7577b1bf.mjs → preset-mini.629d3881.mjs} +25 -25
- package/dist/shared/{preset-mini.b9e9b262.cjs → preset-mini.62c94926.cjs} +2 -2
- package/dist/shared/{preset-mini.dfb70bd4.cjs → preset-mini.89cf0040.cjs} +25 -25
- package/dist/shared/{preset-mini.6babd10a.mjs → preset-mini.a201ed79.mjs} +58 -58
- package/dist/shared/{preset-mini.c3ab5ec7.cjs → preset-mini.c1922eb8.cjs} +1 -1
- package/dist/shared/{preset-mini.422a3875.mjs → preset-mini.c5ebe4cd.mjs} +2 -2
- package/dist/shared/{preset-mini.60fa5b43.cjs → preset-mini.daaac022.cjs} +58 -58
- package/dist/shared/{preset-mini.bd1a81a2.mjs → preset-mini.e2fa1eff.mjs} +1 -1
- package/dist/theme.cjs +3 -3
- package/dist/theme.mjs +3 -3
- package/dist/utils.cjs +2 -2
- package/dist/utils.mjs +2 -2
- package/dist/variants.cjs +3 -3
- package/dist/variants.mjs +3 -3
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const colors = require('./preset-mini.
|
|
3
|
+
const colors = require('./preset-mini.02aa6651.cjs');
|
|
4
4
|
const core = require('@unocss/core');
|
|
5
5
|
|
|
6
6
|
const verticalAlignAlias = {
|
|
@@ -25,9 +25,9 @@ const verticalAligns = [
|
|
|
25
25
|
const textAligns = ["center", "left", "right", "justify", "start", "end"].map((v) => [`text-${v}`, { "text-align": v }]);
|
|
26
26
|
|
|
27
27
|
const outline = [
|
|
28
|
-
[/^outline-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "outline-width": theme.lineWidth?.[d] ?? colors.
|
|
28
|
+
[/^outline-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "outline-width": theme.lineWidth?.[d] ?? colors.h.bracket.cssvar.global.px(d) }), { autocomplete: "outline-(width|size)-<num>" }],
|
|
29
29
|
[/^outline-(?:color-)?(.+)$/, colors.colorResolver("outline-color", "outline-color"), { autocomplete: "outline-$colors" }],
|
|
30
|
-
[/^outline-offset-(.+)$/, ([, d], { theme }) => ({ "outline-offset": theme.lineWidth?.[d] ?? colors.
|
|
30
|
+
[/^outline-offset-(.+)$/, ([, d], { theme }) => ({ "outline-offset": theme.lineWidth?.[d] ?? colors.h.bracket.cssvar.global.px(d) }), { autocomplete: "outline-(offset)-<num>" }],
|
|
31
31
|
["outline", { "outline-style": "solid" }],
|
|
32
32
|
...["auto", "dashed", "dotted", "double", "hidden", "solid", "groove", "ridge", "inset", "outset", ...colors.globalKeywords].map((v) => [`outline-${v}`, { "outline-style": v }]),
|
|
33
33
|
["outline-none", { "outline": "2px solid transparent", "outline-offset": "2px" }]
|
|
@@ -39,7 +39,7 @@ const appearance = [
|
|
|
39
39
|
}]
|
|
40
40
|
];
|
|
41
41
|
function willChangeProperty(prop) {
|
|
42
|
-
return colors.
|
|
42
|
+
return colors.h.properties.auto.global(prop) ?? {
|
|
43
43
|
contents: "contents",
|
|
44
44
|
scroll: "scroll-position"
|
|
45
45
|
}[prop];
|
|
@@ -116,7 +116,7 @@ function handlerBorder(m, ctx) {
|
|
|
116
116
|
return handlerBorderSize(m, ctx);
|
|
117
117
|
}
|
|
118
118
|
function handlerBorderSize([, a = "", b], { theme }) {
|
|
119
|
-
const v = theme.lineWidth?.[b || "DEFAULT"] ?? colors.
|
|
119
|
+
const v = theme.lineWidth?.[b || "DEFAULT"] ?? colors.h.bracket.cssvar.global.px(b || "1");
|
|
120
120
|
if (a in colors.directionMap && v != null)
|
|
121
121
|
return colors.directionMap[a].map((i) => [`border${i}-width`, v]);
|
|
122
122
|
}
|
|
@@ -129,12 +129,12 @@ function handlerBorderColor([, a = "", c], { theme }) {
|
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
function handlerBorderOpacity([, a = "", opacity]) {
|
|
132
|
-
const v = colors.
|
|
132
|
+
const v = colors.h.bracket.percent.cssvar(opacity);
|
|
133
133
|
if (a in colors.directionMap && v != null)
|
|
134
134
|
return colors.directionMap[a].map((i) => [`--un-border${i}-opacity`, v]);
|
|
135
135
|
}
|
|
136
136
|
function handlerRounded([, a = "", s], { theme }) {
|
|
137
|
-
const v = theme.borderRadius?.[s || "DEFAULT"] || colors.
|
|
137
|
+
const v = theme.borderRadius?.[s || "DEFAULT"] || colors.h.bracket.cssvar.global.fraction.rem(s || "1");
|
|
138
138
|
if (a in colors.cornerMap && v != null)
|
|
139
139
|
return colors.cornerMap[a].map((i) => [`border${i}-radius`, v]);
|
|
140
140
|
}
|
|
@@ -144,23 +144,23 @@ function handlerBorderStyle([, a = "", s]) {
|
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
const opacity = [
|
|
147
|
-
[/^op(?:acity)?-?(.+)$/, ([, d]) => ({ opacity: colors.
|
|
147
|
+
[/^op(?:acity)?-?(.+)$/, ([, d]) => ({ opacity: colors.h.bracket.percent.cssvar(d) })]
|
|
148
148
|
];
|
|
149
149
|
const textColors = [
|
|
150
150
|
[/^(?:color|c)-(.+)$/, colors.colorResolver("color", "text"), { autocomplete: "(color|c)-$colors" }],
|
|
151
151
|
[/^text-(.+)$/, colors.colorResolver("color", "text", (css) => !css.color?.toString().match(colors.numberWithUnitRE)), { autocomplete: "text-$colors" }],
|
|
152
152
|
[/^(?:text|color|c)-(.+)$/, ([, v]) => colors.globalKeywords.includes(v) ? { color: v } : void 0, { autocomplete: `(text|color|c)-(${colors.globalKeywords.join("|")})` }],
|
|
153
|
-
[/^(?:text|color|c)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-text-opacity": colors.
|
|
153
|
+
[/^(?:text|color|c)-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-text-opacity": colors.h.bracket.percent.cssvar(opacity2) }), { autocomplete: "(text|color|c)-(op|opacity)-<percent>" }]
|
|
154
154
|
];
|
|
155
155
|
const bgColors = [
|
|
156
156
|
[/^bg-(.+)$/, colors.colorResolver("background-color", "bg"), { autocomplete: "bg-$colors" }],
|
|
157
|
-
[/^bg-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-bg-opacity": colors.
|
|
157
|
+
[/^bg-op(?:acity)?-?(.+)$/, ([, opacity2]) => ({ "--un-bg-opacity": colors.h.bracket.percent.cssvar(opacity2) }), { autocomplete: "bg-(op|opacity)-<percent>" }]
|
|
158
158
|
];
|
|
159
159
|
|
|
160
160
|
const decorationStyles = ["solid", "double", "dotted", "dashed", "wavy", ...colors.globalKeywords];
|
|
161
161
|
const textDecorations = [
|
|
162
162
|
[/^(?:decoration-)?(underline|overline|line-through)$/, ([, s]) => ({ "text-decoration-line": s }), { autocomplete: "decoration-(underline|overline|line-through)" }],
|
|
163
|
-
[/^(?:underline|decoration)-(?:size-)?(.+)$/, ([, s], { theme }) => ({ "text-decoration-thickness": theme.lineWidth?.[s] ?? colors.
|
|
163
|
+
[/^(?:underline|decoration)-(?:size-)?(.+)$/, ([, s], { theme }) => ({ "text-decoration-thickness": theme.lineWidth?.[s] ?? colors.h.bracket.cssvar.global.px(s) }), { autocomplete: "(underline|decoration)-<num>" }],
|
|
164
164
|
[/^(?:underline|decoration)-(auto|from-font)$/, ([, s]) => ({ "text-decoration-thickness": s }), { autocomplete: "(underline|decoration)-(auto|from-font)" }],
|
|
165
165
|
[/^(?:underline|decoration)-(.+)$/, (match, ctx) => {
|
|
166
166
|
const result = colors.colorResolver("text-decoration-color", "line")(match, ctx);
|
|
@@ -171,8 +171,8 @@ const textDecorations = [
|
|
|
171
171
|
};
|
|
172
172
|
}
|
|
173
173
|
}, { autocomplete: "(underline|decoration)-$colors" }],
|
|
174
|
-
[/^(?:underline|decoration)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-line-opacity": colors.
|
|
175
|
-
[/^(?:underline|decoration)-offset-(.+)$/, ([, s], { theme }) => ({ "text-underline-offset": theme.lineWidth?.[s] ?? colors.
|
|
174
|
+
[/^(?:underline|decoration)-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-line-opacity": colors.h.bracket.percent.cssvar(opacity) }), { autocomplete: "(underline|decoration)-(op|opacity)-<percent>" }],
|
|
175
|
+
[/^(?:underline|decoration)-offset-(.+)$/, ([, s], { theme }) => ({ "text-underline-offset": theme.lineWidth?.[s] ?? colors.h.auto.bracket.cssvar.global.px(s) }), { autocomplete: "(underline|decoration)-(offset)-<num>" }],
|
|
176
176
|
...decorationStyles.map((v) => [`underline-${v}`, { "text-decoration-style": v }]),
|
|
177
177
|
...decorationStyles.map((v) => [`decoration-${v}`, { "text-decoration-style": v }]),
|
|
178
178
|
["no-underline", { "text-decoration": "none" }],
|
|
@@ -188,13 +188,13 @@ const transitionPropertyGroup = {
|
|
|
188
188
|
transform: "transform"
|
|
189
189
|
};
|
|
190
190
|
function transitionProperty(prop) {
|
|
191
|
-
return colors.
|
|
191
|
+
return colors.h.properties(prop) ?? transitionPropertyGroup[prop];
|
|
192
192
|
}
|
|
193
193
|
const transitions = [
|
|
194
194
|
[/^transition(?:-([a-z-]+(?:,[a-z-]+)*))?(?:-(\d+))?$/, ([, prop, d], { theme }) => {
|
|
195
195
|
const p = prop != null ? transitionProperty(prop) : [transitionPropertyGroup.colors, "opacity", "box-shadow", "transform", "filter", "backdrop-filter"].join(",");
|
|
196
196
|
if (p) {
|
|
197
|
-
const duration = theme.duration?.[d || "DEFAULT"] ?? colors.
|
|
197
|
+
const duration = theme.duration?.[d || "DEFAULT"] ?? colors.h.time(d || "150");
|
|
198
198
|
return {
|
|
199
199
|
"transition-property": p,
|
|
200
200
|
"transition-timing-function": "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
@@ -204,22 +204,22 @@ const transitions = [
|
|
|
204
204
|
}, { autocomplete: `transition-(${Object.keys(transitionPropertyGroup).join("|")})` }],
|
|
205
205
|
[
|
|
206
206
|
/^(?:transition-)?duration-(.+)$/,
|
|
207
|
-
([, d], { theme }) => ({ "transition-duration": theme.duration?.[d || "DEFAULT"] ?? colors.
|
|
207
|
+
([, d], { theme }) => ({ "transition-duration": theme.duration?.[d || "DEFAULT"] ?? colors.h.bracket.cssvar.time(d) }),
|
|
208
208
|
{ autocomplete: ["transition-duration-$duration", "duration-$duration"] }
|
|
209
209
|
],
|
|
210
210
|
[
|
|
211
211
|
/^(?:transition-)?delay-(.+)$/,
|
|
212
|
-
([, d], { theme }) => ({ "transition-delay": theme.duration?.[d || "DEFAULT"] ?? colors.
|
|
212
|
+
([, d], { theme }) => ({ "transition-delay": theme.duration?.[d || "DEFAULT"] ?? colors.h.bracket.cssvar.time(d) }),
|
|
213
213
|
{ autocomplete: ["transition-delay-$duration", "delay-$duration"] }
|
|
214
214
|
],
|
|
215
215
|
[
|
|
216
216
|
/^(?:transition-)?ease(?:-(.+))?$/,
|
|
217
|
-
([, d], { theme }) => ({ "transition-timing-function": theme.easing?.[d || "DEFAULT"] ?? colors.
|
|
217
|
+
([, d], { theme }) => ({ "transition-timing-function": theme.easing?.[d || "DEFAULT"] ?? colors.h.bracket.cssvar(d) }),
|
|
218
218
|
{ autocomplete: ["transition-ease-(linear|in|out|in-out|DEFAULT)", "ease-(linear|in|out|in-out|DEFAULT)"] }
|
|
219
219
|
],
|
|
220
220
|
[
|
|
221
221
|
/^(?:transition-)?property-(.+)$/,
|
|
222
|
-
([, v]) => ({ "transition-property": colors.
|
|
222
|
+
([, v]) => ({ "transition-property": colors.h.bracket.global(v) || transitionProperty(v) }),
|
|
223
223
|
{ autocomplete: [`transition-property-(${[...colors.globalKeywords, ...Object.keys(transitionPropertyGroup)].join("|")})`] }
|
|
224
224
|
],
|
|
225
225
|
["transition-none", { transition: "none" }],
|
|
@@ -238,12 +238,12 @@ const weightMap = {
|
|
|
238
238
|
black: "900"
|
|
239
239
|
};
|
|
240
240
|
function handleLineHeight(s, theme) {
|
|
241
|
-
return theme.lineHeight?.[s] || colors.
|
|
241
|
+
return theme.lineHeight?.[s] || colors.h.bracket.cssvar.global.rem(s);
|
|
242
242
|
}
|
|
243
243
|
const fonts = [
|
|
244
244
|
[
|
|
245
245
|
/^font-(.+)$/,
|
|
246
|
-
([, d], { theme }) => ({ "font-family": theme.fontFamily?.[d] || colors.
|
|
246
|
+
([, d], { theme }) => ({ "font-family": theme.fontFamily?.[d] || colors.h.bracket.cssvar.global(d) }),
|
|
247
247
|
{ autocomplete: "font-$fontFamily" }
|
|
248
248
|
],
|
|
249
249
|
[
|
|
@@ -259,26 +259,26 @@ const fonts = [
|
|
|
259
259
|
"line-height": lineHeight ?? height ?? "1"
|
|
260
260
|
};
|
|
261
261
|
}
|
|
262
|
-
const fontSize = colors.
|
|
262
|
+
const fontSize = colors.h.bracketOfLength.rem(size);
|
|
263
263
|
if (lineHeight && fontSize) {
|
|
264
264
|
return {
|
|
265
265
|
"font-size": fontSize,
|
|
266
266
|
"line-height": lineHeight
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
|
-
return { "font-size": colors.
|
|
269
|
+
return { "font-size": colors.h.bracketOfLength.rem(s) };
|
|
270
270
|
},
|
|
271
271
|
{ autocomplete: "text-$fontSize" }
|
|
272
272
|
],
|
|
273
273
|
[/^text-size-(.+)$/, ([, s], { theme }) => {
|
|
274
274
|
const themed = core.toArray(theme.fontSize?.[s]);
|
|
275
|
-
const size = themed?.[0] ?? colors.
|
|
275
|
+
const size = themed?.[0] ?? colors.h.bracket.cssvar.global.rem(s);
|
|
276
276
|
if (size != null)
|
|
277
277
|
return { "font-size": size };
|
|
278
278
|
}, { autocomplete: "text-size-$fontSize" }],
|
|
279
279
|
[
|
|
280
280
|
/^(?:font|fw)-?([^-]+)$/,
|
|
281
|
-
([, s]) => ({ "font-weight": weightMap[s] || colors.
|
|
281
|
+
([, s]) => ({ "font-weight": weightMap[s] || colors.h.bracket.global.number(s) }),
|
|
282
282
|
{ autocomplete: `(font|fw)-(100|200|300|400|500|600|700|800|900|${Object.keys(weightMap).join("|")})` }
|
|
283
283
|
],
|
|
284
284
|
[
|
|
@@ -290,21 +290,21 @@ const fonts = [
|
|
|
290
290
|
["font-synthesis-style", { "font-synthesis": "style" }],
|
|
291
291
|
["font-synthesis-small-caps", { "font-synthesis": "small-caps" }],
|
|
292
292
|
["font-synthesis-none", { "font-synthesis": "none" }],
|
|
293
|
-
[/^font-synthesis-(.+)$/, ([, s]) => ({ "font-synthesis": colors.
|
|
293
|
+
[/^font-synthesis-(.+)$/, ([, s]) => ({ "font-synthesis": colors.h.bracket.cssvar.global(s) })],
|
|
294
294
|
[
|
|
295
295
|
/^(?:font-)?tracking-(.+)$/,
|
|
296
|
-
([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] || colors.
|
|
296
|
+
([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] || colors.h.bracket.cssvar.global.rem(s) }),
|
|
297
297
|
{ autocomplete: "tracking-$letterSpacing" }
|
|
298
298
|
],
|
|
299
299
|
[
|
|
300
300
|
/^(?:font-)?word-spacing-(.+)$/,
|
|
301
|
-
([, s], { theme }) => ({ "word-spacing": theme.wordSpacing?.[s] || colors.
|
|
301
|
+
([, s], { theme }) => ({ "word-spacing": theme.wordSpacing?.[s] || colors.h.bracket.cssvar.global.rem(s) }),
|
|
302
302
|
{ autocomplete: "word-spacing-$wordSpacing" }
|
|
303
303
|
]
|
|
304
304
|
];
|
|
305
305
|
const tabSizes = [
|
|
306
306
|
[/^tab(?:-(.+))?$/, ([, s]) => {
|
|
307
|
-
const v = colors.
|
|
307
|
+
const v = colors.h.bracket.cssvar.global.number(s || "4");
|
|
308
308
|
if (v != null) {
|
|
309
309
|
return {
|
|
310
310
|
"-moz-tab-size": v,
|
|
@@ -315,12 +315,12 @@ const tabSizes = [
|
|
|
315
315
|
}]
|
|
316
316
|
];
|
|
317
317
|
const textIndents = [
|
|
318
|
-
[/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] || colors.
|
|
318
|
+
[/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] || colors.h.bracket.cssvar.global.fraction.rem(s) }), { autocomplete: "indent-$textIndent" }]
|
|
319
319
|
];
|
|
320
320
|
const textStrokes = [
|
|
321
|
-
[/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] || colors.
|
|
321
|
+
[/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] || colors.h.bracket.cssvar.px(s) }), { autocomplete: "text-stroke-$textStrokeWidth" }],
|
|
322
322
|
[/^text-stroke-(.+)$/, colors.colorResolver("-webkit-text-stroke-color", "text-stroke"), { autocomplete: "text-stroke-$colors" }],
|
|
323
|
-
[/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": colors.
|
|
323
|
+
[/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": colors.h.bracket.percent.cssvar(opacity) }), { autocomplete: "text-stroke-(op|opacity)-<percent>" }]
|
|
324
324
|
];
|
|
325
325
|
const textShadows = [
|
|
326
326
|
[/^text-shadow(?:-(.+))?$/, ([, s], { theme }) => {
|
|
@@ -331,10 +331,10 @@ const textShadows = [
|
|
|
331
331
|
"text-shadow": "var(--un-text-shadow)"
|
|
332
332
|
};
|
|
333
333
|
}
|
|
334
|
-
return { "text-shadow": colors.
|
|
334
|
+
return { "text-shadow": colors.h.bracket.cssvar.global(s) };
|
|
335
335
|
}, { autocomplete: "text-shadow-$textShadow" }],
|
|
336
336
|
[/^text-shadow-color-(.+)$/, colors.colorResolver("--un-text-shadow-color", "text-shadow"), { autocomplete: "text-shadow-color-$colors" }],
|
|
337
|
-
[/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": colors.
|
|
337
|
+
[/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": colors.h.bracket.percent.cssvar(opacity) }), { autocomplete: "text-shadow-color-(op|opacity)-<percent>" }]
|
|
338
338
|
];
|
|
339
339
|
|
|
340
340
|
const overflowValues = [
|
|
@@ -378,7 +378,7 @@ const justifies = [
|
|
|
378
378
|
...colors.makeGlobalStaticRules("justify-self")
|
|
379
379
|
];
|
|
380
380
|
const orders = [
|
|
381
|
-
[/^order-(.+)$/, ([, v]) => ({ order: colors.
|
|
381
|
+
[/^order-(.+)$/, ([, v]) => ({ order: colors.h.bracket.cssvar.number(v) })],
|
|
382
382
|
["order-first", { order: "-9999" }],
|
|
383
383
|
["order-last", { order: "9999" }],
|
|
384
384
|
["order-none", { order: "0" }]
|
|
@@ -431,7 +431,7 @@ const flexGridJustifiesAlignments = [...justifies, ...alignments].flatMap(([k, v
|
|
|
431
431
|
[`grid-${k}`, v]
|
|
432
432
|
]);
|
|
433
433
|
function handleInsetValue(v, { theme }) {
|
|
434
|
-
return theme.spacing?.[v] ?? colors.
|
|
434
|
+
return theme.spacing?.[v] ?? colors.h.bracket.cssvar.global.auto.fraction.rem(v);
|
|
435
435
|
}
|
|
436
436
|
function handleInsetValues([, d, v], ctx) {
|
|
437
437
|
const r = handleInsetValue(v, ctx);
|
|
@@ -470,8 +470,8 @@ const floats = [
|
|
|
470
470
|
...colors.makeGlobalStaticRules("clear")
|
|
471
471
|
];
|
|
472
472
|
const zIndexes = [
|
|
473
|
-
[/^(?:position-|pos-)?z([\d.]+)$/, ([, v]) => ({ "z-index": colors.
|
|
474
|
-
[/^(?:position-|pos-)?z-(.+)$/, ([, v]) => ({ "z-index": colors.
|
|
473
|
+
[/^(?:position-|pos-)?z([\d.]+)$/, ([, v]) => ({ "z-index": colors.h.number(v) })],
|
|
474
|
+
[/^(?:position-|pos-)?z-(.+)$/, ([, v]) => ({ "z-index": colors.h.bracket.cssvar.global.auto.number(v) }), { autocomplete: "z-<num>" }]
|
|
475
475
|
];
|
|
476
476
|
const boxSizing = [
|
|
477
477
|
["box-border", { "box-sizing": "border-box" }],
|
|
@@ -490,7 +490,7 @@ const displays = [
|
|
|
490
490
|
["flow-root", { display: "flow-root" }],
|
|
491
491
|
["list-item", { display: "list-item" }],
|
|
492
492
|
["hidden", { display: "none" }],
|
|
493
|
-
[/^display-(.+)$/, ([, c]) => ({ display: colors.
|
|
493
|
+
[/^display-(.+)$/, ([, c]) => ({ display: colors.h.bracket.cssvar.global(c) || c })]
|
|
494
494
|
];
|
|
495
495
|
const appearances = [
|
|
496
496
|
["visible", { visibility: "visible" }],
|
|
@@ -500,14 +500,14 @@ const appearances = [
|
|
|
500
500
|
...colors.makeGlobalStaticRules("backface", "backface-visibility")
|
|
501
501
|
];
|
|
502
502
|
const cursors = [
|
|
503
|
-
[/^cursor-(.+)$/, ([, c]) => ({ cursor: colors.
|
|
503
|
+
[/^cursor-(.+)$/, ([, c]) => ({ cursor: colors.h.bracket.cssvar.global(c) })],
|
|
504
504
|
...cursorValues.map((v) => [`cursor-${v}`, { cursor: v }])
|
|
505
505
|
];
|
|
506
506
|
const contains = [
|
|
507
507
|
[/^contain-(.*)$/, ([, d]) => {
|
|
508
|
-
if (colors.
|
|
508
|
+
if (colors.h.bracket(d) != null) {
|
|
509
509
|
return {
|
|
510
|
-
contain: colors.
|
|
510
|
+
contain: colors.h.bracket(d).split(" ").map((e) => colors.h.cssvar.fraction(e) ?? e).join(" ")
|
|
511
511
|
};
|
|
512
512
|
}
|
|
513
513
|
return containValues.includes(d) ? { contain: d } : void 0;
|
|
@@ -540,14 +540,14 @@ const whitespaces = [
|
|
|
540
540
|
]
|
|
541
541
|
];
|
|
542
542
|
const contentVisibility = [
|
|
543
|
-
[/^intrinsic-size-(.+)$/, ([, d]) => ({ "contain-intrinsic-size": colors.
|
|
543
|
+
[/^intrinsic-size-(.+)$/, ([, d]) => ({ "contain-intrinsic-size": colors.h.bracket.cssvar.global.fraction.rem(d) }), { autocomplete: "intrinsic-size-<num>" }],
|
|
544
544
|
["content-visibility-visible", { "content-visibility": "visible" }],
|
|
545
545
|
["content-visibility-hidden", { "content-visibility": "hidden" }],
|
|
546
546
|
["content-visibility-auto", { "content-visibility": "auto" }],
|
|
547
547
|
...colors.makeGlobalStaticRules("content-visibility")
|
|
548
548
|
];
|
|
549
549
|
const contents = [
|
|
550
|
-
[/^content-(.+)$/, ([, v]) => ({ content: colors.
|
|
550
|
+
[/^content-(.+)$/, ([, v]) => ({ content: colors.h.bracket.cssvar(v) })],
|
|
551
551
|
["content-empty", { content: '""' }],
|
|
552
552
|
["content-none", { content: "none" }]
|
|
553
553
|
];
|
|
@@ -608,7 +608,7 @@ const ringBase = {
|
|
|
608
608
|
};
|
|
609
609
|
const rings = [
|
|
610
610
|
[/^ring(?:-(.+))?$/, ([, d], { theme }) => {
|
|
611
|
-
const value = theme.ringWidth?.[d || "DEFAULT"] ?? colors.
|
|
611
|
+
const value = theme.ringWidth?.[d || "DEFAULT"] ?? colors.h.px(d || "1");
|
|
612
612
|
if (value) {
|
|
613
613
|
return {
|
|
614
614
|
"--un-ring-width": value,
|
|
@@ -618,13 +618,13 @@ const rings = [
|
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
620
|
}, { autocomplete: "ring-$ringWidth" }],
|
|
621
|
-
[/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ?? colors.
|
|
621
|
+
[/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ?? colors.h.bracket.cssvar.px(d) }), { autocomplete: "ring-(width|size)-$lineWidth" }],
|
|
622
622
|
["ring-offset", { "--un-ring-offset-width": "1px" }],
|
|
623
|
-
[/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? colors.
|
|
623
|
+
[/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? colors.h.bracket.cssvar.px(d) }), { autocomplete: "ring-offset-(width|size)-$lineWidth" }],
|
|
624
624
|
[/^ring-(.+)$/, colors.colorResolver("--un-ring-color", "ring"), { autocomplete: "ring-$colors" }],
|
|
625
|
-
[/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": colors.
|
|
625
|
+
[/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": colors.h.bracket.percent.cssvar(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
|
|
626
626
|
[/^ring-offset-(.+)$/, colors.colorResolver("--un-ring-offset-color", "ring-offset"), { autocomplete: "ring-offset-$colors" }],
|
|
627
|
-
[/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": colors.
|
|
627
|
+
[/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": colors.h.bracket.percent.cssvar(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
|
|
628
628
|
["ring-inset", { "--un-ring-inset": "inset" }]
|
|
629
629
|
];
|
|
630
630
|
|
|
@@ -639,7 +639,7 @@ const boxShadows = [
|
|
|
639
639
|
const [, d] = match;
|
|
640
640
|
const { theme } = context;
|
|
641
641
|
const v = theme.boxShadow?.[d || "DEFAULT"];
|
|
642
|
-
const c = d ? colors.
|
|
642
|
+
const c = d ? colors.h.bracket.cssvar(d) : void 0;
|
|
643
643
|
if ((v != null || c != null) && !colors.hasParseableColor(c, theme)) {
|
|
644
644
|
return {
|
|
645
645
|
"--un-shadow": colors.colorableShadows(v || c, "--un-shadow-color").join(","),
|
|
@@ -648,7 +648,7 @@ const boxShadows = [
|
|
|
648
648
|
}
|
|
649
649
|
return colors.colorResolver("--un-shadow-color", "shadow")(match, context);
|
|
650
650
|
}, { autocomplete: ["shadow-$colors", "shadow-$boxShadow"] }],
|
|
651
|
-
[/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": colors.
|
|
651
|
+
[/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": colors.h.bracket.percent.cssvar(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
|
|
652
652
|
["shadow-inset", { "--un-shadow-inset": "inset" }]
|
|
653
653
|
];
|
|
654
654
|
|
|
@@ -698,9 +698,9 @@ const transformBase = {
|
|
|
698
698
|
"--un-translate-z": 0
|
|
699
699
|
};
|
|
700
700
|
const transforms = [
|
|
701
|
-
[/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": colors.positionMap[s] ?? colors.
|
|
701
|
+
[/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": colors.positionMap[s] ?? colors.h.bracket.cssvar(s) }), { autocomplete: [`transform-origin-(${Object.keys(colors.positionMap).join("|")})`, `origin-(${Object.keys(colors.positionMap).join("|")})`] }],
|
|
702
702
|
[/^(?:transform-)?perspect(?:ive)?-(.+)$/, ([, s]) => {
|
|
703
|
-
const v = colors.
|
|
703
|
+
const v = colors.h.bracket.cssvar.px.numberWithUnit(s);
|
|
704
704
|
if (v != null) {
|
|
705
705
|
return {
|
|
706
706
|
"-webkit-perspective": v,
|
|
@@ -709,7 +709,7 @@ const transforms = [
|
|
|
709
709
|
}
|
|
710
710
|
}],
|
|
711
711
|
[/^(?:transform-)?perspect(?:ive)?-origin-(.+)$/, ([, s]) => {
|
|
712
|
-
const v = colors.
|
|
712
|
+
const v = colors.h.bracket.cssvar(s) ?? (s.length >= 3 ? colors.positionMap[s] : void 0);
|
|
713
713
|
if (v != null) {
|
|
714
714
|
return {
|
|
715
715
|
"-webkit-perspective-origin": v,
|
|
@@ -734,7 +734,7 @@ const transforms = [
|
|
|
734
734
|
...colors.makeGlobalStaticRules("transform")
|
|
735
735
|
];
|
|
736
736
|
function handleTranslate([, d, b], { theme }) {
|
|
737
|
-
const v = theme.spacing?.[b] ?? colors.
|
|
737
|
+
const v = theme.spacing?.[b] ?? colors.h.bracket.cssvar.fraction.rem(b);
|
|
738
738
|
if (v != null) {
|
|
739
739
|
return [
|
|
740
740
|
...colors.xyzMap[d].map((i) => [`--un-translate${i}`, v]),
|
|
@@ -743,7 +743,7 @@ function handleTranslate([, d, b], { theme }) {
|
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
745
|
function handleScale([, d, b]) {
|
|
746
|
-
const v = colors.
|
|
746
|
+
const v = colors.h.bracket.cssvar.fraction.percent(b);
|
|
747
747
|
if (v != null) {
|
|
748
748
|
return [
|
|
749
749
|
...colors.xyzMap[d].map((i) => [`--un-scale${i}`, v]),
|
|
@@ -752,7 +752,7 @@ function handleScale([, d, b]) {
|
|
|
752
752
|
}
|
|
753
753
|
}
|
|
754
754
|
function handleRotate([, d = "", b]) {
|
|
755
|
-
const v = colors.
|
|
755
|
+
const v = colors.h.bracket.cssvar.degree(b);
|
|
756
756
|
if (v != null) {
|
|
757
757
|
if (d) {
|
|
758
758
|
return {
|
|
@@ -772,7 +772,7 @@ function handleRotate([, d = "", b]) {
|
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
774
|
function handleSkew([, d, b]) {
|
|
775
|
-
const v = colors.
|
|
775
|
+
const v = colors.h.bracket.cssvar.degree(b);
|
|
776
776
|
if (v != null) {
|
|
777
777
|
return [
|
|
778
778
|
...colors.xyzMap[d].map((i) => [`--un-skew${i}`, v]),
|
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.f3fc54d2.cjs');
|
|
6
|
-
const _default = require('./shared/preset-mini.
|
|
7
|
-
require('./shared/preset-mini.
|
|
8
|
-
require('./shared/preset-mini.
|
|
6
|
+
const _default = require('./shared/preset-mini.62c94926.cjs');
|
|
7
|
+
require('./shared/preset-mini.daaac022.cjs');
|
|
8
|
+
require('./shared/preset-mini.02aa6651.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.1c66bf79.mjs';
|
|
2
|
-
export { q as baseSize, b as blur, m as borderRadius, n as boxShadow, i as breakpoints, A as containers, d as dropShadow, k as duration, o as easing, f as fontFamily, a as fontSize, y as height, h as letterSpacing, l as lineHeight, j as lineWidth, z as maxHeight, x as maxWidth, p as preflightBase, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, u as width, w as wordSpacing } from './shared/preset-mini.
|
|
3
|
-
import './shared/preset-mini.
|
|
4
|
-
import './shared/preset-mini.
|
|
2
|
+
export { q as baseSize, b as blur, m as borderRadius, n as boxShadow, i as breakpoints, A as containers, d as dropShadow, k as duration, o as easing, f as fontFamily, a as fontSize, y as height, h as letterSpacing, l as lineHeight, j as lineWidth, z as maxHeight, x as maxWidth, p as preflightBase, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, u as width, w as wordSpacing } from './shared/preset-mini.c5ebe4cd.mjs';
|
|
3
|
+
import './shared/preset-mini.a201ed79.mjs';
|
|
4
|
+
import './shared/preset-mini.08cdeeea.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.
|
|
6
|
-
const variants = require('./shared/preset-mini.
|
|
5
|
+
const colors = require('./shared/preset-mini.02aa6651.cjs');
|
|
6
|
+
const variants = require('./shared/preset-mini.c1922eb8.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,
|
|
2
|
-
export { a as variantGetBracket, v as variantGetParameter, b as variantMatcher, c as variantParentMatcher } from './shared/preset-mini.
|
|
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, h, w 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.08cdeeea.mjs';
|
|
2
|
+
export { a as variantGetBracket, v as variantGetParameter, b as variantMatcher, c as variantParentMatcher } from './shared/preset-mini.e2fa1eff.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.
|
|
6
|
-
require('./shared/preset-mini.
|
|
5
|
+
const _default = require('./shared/preset-mini.473275f7.cjs');
|
|
6
|
+
require('./shared/preset-mini.02aa6651.cjs');
|
|
7
7
|
require('@unocss/core');
|
|
8
|
-
require('./shared/preset-mini.
|
|
8
|
+
require('./shared/preset-mini.c1922eb8.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
package/dist/variants.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as calcMaxWidthBySize, a as variantAria, b as variantBreakpoints, f as variantColorsMediaOrClass, d as variantCombinators, e as variantContainerQuery, m as variantCssLayer, k as variantCustomMedia, g as variantDataAttribute, i as variantImportant, n as variantInternalLayer, h as variantLanguageDirections, q as variantNegative, u as variantPartClasses, j as variantPrint, s as variantPseudoClassFunctions, r as variantPseudoClassesAndElements, o as variantScope, l as variantSelector, w as variantSupports, t as variantTaggedPseudoClasses, p as variantVariables, v as variants } from './shared/preset-mini.
|
|
2
|
-
import './shared/preset-mini.
|
|
1
|
+
export { c as calcMaxWidthBySize, a as variantAria, b as variantBreakpoints, f as variantColorsMediaOrClass, d as variantCombinators, e as variantContainerQuery, m as variantCssLayer, k as variantCustomMedia, g as variantDataAttribute, i as variantImportant, n as variantInternalLayer, h as variantLanguageDirections, q as variantNegative, u as variantPartClasses, j as variantPrint, s as variantPseudoClassFunctions, r as variantPseudoClassesAndElements, o as variantScope, l as variantSelector, w as variantSupports, t as variantTaggedPseudoClasses, p as variantVariables, v as variants } from './shared/preset-mini.19364a2e.mjs';
|
|
2
|
+
import './shared/preset-mini.08cdeeea.mjs';
|
|
3
3
|
import '@unocss/core';
|
|
4
|
-
import './shared/preset-mini.
|
|
4
|
+
import './shared/preset-mini.e2fa1eff.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-mini",
|
|
3
|
-
"version": "0.53.
|
|
3
|
+
"version": "0.53.1",
|
|
4
4
|
"description": "The minimal preset for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"*.css"
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@unocss/core": "0.53.
|
|
65
|
-
"@unocss/extractor-arbitrary-variants": "0.53.
|
|
64
|
+
"@unocss/core": "0.53.1",
|
|
65
|
+
"@unocss/extractor-arbitrary-variants": "0.53.1"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
68
|
"build": "unbuild",
|