@unocss/preset-mini 0.53.0 → 0.53.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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.b9e9b262.cjs → preset-mini.0ea9a044.cjs} +2 -2
- package/dist/shared/{preset-mini.6babd10a.mjs → preset-mini.17fe8f10.mjs} +64 -63
- package/dist/shared/{preset-mini.7577b1bf.mjs → preset-mini.354bed23.mjs} +26 -26
- package/dist/shared/{preset-mini.8d9dbf2c.cjs → preset-mini.3567e469.cjs} +20 -20
- package/dist/shared/{preset-mini.82cf398e.mjs → preset-mini.407f1930.mjs} +20 -20
- package/dist/shared/{preset-mini.422a3875.mjs → preset-mini.438da325.mjs} +2 -2
- package/dist/shared/{preset-mini.64d922d5.mjs → preset-mini.6c244f7e.mjs} +7 -7
- package/dist/shared/{preset-mini.bd1a81a2.mjs → preset-mini.9af3cc95.mjs} +1 -1
- package/dist/shared/{preset-mini.099ab35c.cjs → preset-mini.a21c5071.cjs} +6 -6
- package/dist/shared/{preset-mini.c3ab5ec7.cjs → preset-mini.d778b487.cjs} +1 -1
- package/dist/shared/{preset-mini.60fa5b43.cjs → preset-mini.db8ecde7.cjs} +64 -63
- package/dist/shared/{preset-mini.dfb70bd4.cjs → preset-mini.f4e50e04.cjs} +26 -26
- 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.a21c5071.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,14 +238,9 @@ 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
|
-
[
|
|
245
|
-
/^font-(.+)$/,
|
|
246
|
-
([, d], { theme }) => ({ "font-family": theme.fontFamily?.[d] || colors.handler.bracket.cssvar.global(d) }),
|
|
247
|
-
{ autocomplete: "font-$fontFamily" }
|
|
248
|
-
],
|
|
249
244
|
[
|
|
250
245
|
/^text-(.+)$/,
|
|
251
246
|
([, s = "base"], { theme }) => {
|
|
@@ -259,26 +254,26 @@ const fonts = [
|
|
|
259
254
|
"line-height": lineHeight ?? height ?? "1"
|
|
260
255
|
};
|
|
261
256
|
}
|
|
262
|
-
const fontSize = colors.
|
|
257
|
+
const fontSize = colors.h.bracketOfLength.rem(size);
|
|
263
258
|
if (lineHeight && fontSize) {
|
|
264
259
|
return {
|
|
265
260
|
"font-size": fontSize,
|
|
266
261
|
"line-height": lineHeight
|
|
267
262
|
};
|
|
268
263
|
}
|
|
269
|
-
return { "font-size": colors.
|
|
264
|
+
return { "font-size": colors.h.bracketOfLength.rem(s) };
|
|
270
265
|
},
|
|
271
266
|
{ autocomplete: "text-$fontSize" }
|
|
272
267
|
],
|
|
273
268
|
[/^text-size-(.+)$/, ([, s], { theme }) => {
|
|
274
269
|
const themed = core.toArray(theme.fontSize?.[s]);
|
|
275
|
-
const size = themed?.[0] ?? colors.
|
|
270
|
+
const size = themed?.[0] ?? colors.h.bracket.cssvar.global.rem(s);
|
|
276
271
|
if (size != null)
|
|
277
272
|
return { "font-size": size };
|
|
278
273
|
}, { autocomplete: "text-size-$fontSize" }],
|
|
279
274
|
[
|
|
280
275
|
/^(?:font|fw)-?([^-]+)$/,
|
|
281
|
-
([, s]) => ({ "font-weight": weightMap[s] || colors.
|
|
276
|
+
([, s]) => ({ "font-weight": weightMap[s] || colors.h.bracket.global.number(s) }),
|
|
282
277
|
{ autocomplete: `(font|fw)-(100|200|300|400|500|600|700|800|900|${Object.keys(weightMap).join("|")})` }
|
|
283
278
|
],
|
|
284
279
|
[
|
|
@@ -290,21 +285,26 @@ const fonts = [
|
|
|
290
285
|
["font-synthesis-style", { "font-synthesis": "style" }],
|
|
291
286
|
["font-synthesis-small-caps", { "font-synthesis": "small-caps" }],
|
|
292
287
|
["font-synthesis-none", { "font-synthesis": "none" }],
|
|
293
|
-
[/^font-synthesis-(.+)$/, ([, s]) => ({ "font-synthesis": colors.
|
|
288
|
+
[/^font-synthesis-(.+)$/, ([, s]) => ({ "font-synthesis": colors.h.bracket.cssvar.global(s) })],
|
|
294
289
|
[
|
|
295
290
|
/^(?:font-)?tracking-(.+)$/,
|
|
296
|
-
([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] || colors.
|
|
291
|
+
([, s], { theme }) => ({ "letter-spacing": theme.letterSpacing?.[s] || colors.h.bracket.cssvar.global.rem(s) }),
|
|
297
292
|
{ autocomplete: "tracking-$letterSpacing" }
|
|
298
293
|
],
|
|
299
294
|
[
|
|
300
295
|
/^(?:font-)?word-spacing-(.+)$/,
|
|
301
|
-
([, s], { theme }) => ({ "word-spacing": theme.wordSpacing?.[s] || colors.
|
|
296
|
+
([, s], { theme }) => ({ "word-spacing": theme.wordSpacing?.[s] || colors.h.bracket.cssvar.global.rem(s) }),
|
|
302
297
|
{ autocomplete: "word-spacing-$wordSpacing" }
|
|
298
|
+
],
|
|
299
|
+
[
|
|
300
|
+
/^font-(.+)$/,
|
|
301
|
+
([, d], { theme }) => ({ "font-family": theme.fontFamily?.[d] || colors.h.bracket.cssvar.global(d) }),
|
|
302
|
+
{ autocomplete: "font-$fontFamily" }
|
|
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
|
];
|
|
@@ -555,7 +555,8 @@ const breaks = [
|
|
|
555
555
|
["break-normal", { "overflow-wrap": "normal", "word-break": "normal" }],
|
|
556
556
|
["break-words", { "overflow-wrap": "break-word" }],
|
|
557
557
|
["break-all", { "word-break": "break-all" }],
|
|
558
|
-
["break-keep", { "word-break": "keep-all" }]
|
|
558
|
+
["break-keep", { "word-break": "keep-all" }],
|
|
559
|
+
["break-anywhere", { "overflow-wrap": "anywhere" }]
|
|
559
560
|
];
|
|
560
561
|
const textWraps = [
|
|
561
562
|
["text-wrap", { "text-wrap": "wrap" }],
|
|
@@ -608,7 +609,7 @@ const ringBase = {
|
|
|
608
609
|
};
|
|
609
610
|
const rings = [
|
|
610
611
|
[/^ring(?:-(.+))?$/, ([, d], { theme }) => {
|
|
611
|
-
const value = theme.ringWidth?.[d || "DEFAULT"] ?? colors.
|
|
612
|
+
const value = theme.ringWidth?.[d || "DEFAULT"] ?? colors.h.px(d || "1");
|
|
612
613
|
if (value) {
|
|
613
614
|
return {
|
|
614
615
|
"--un-ring-width": value,
|
|
@@ -618,13 +619,13 @@ const rings = [
|
|
|
618
619
|
};
|
|
619
620
|
}
|
|
620
621
|
}, { autocomplete: "ring-$ringWidth" }],
|
|
621
|
-
[/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ?? colors.
|
|
622
|
+
[/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ?? colors.h.bracket.cssvar.px(d) }), { autocomplete: "ring-(width|size)-$lineWidth" }],
|
|
622
623
|
["ring-offset", { "--un-ring-offset-width": "1px" }],
|
|
623
|
-
[/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? colors.
|
|
624
|
+
[/^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
625
|
[/^ring-(.+)$/, colors.colorResolver("--un-ring-color", "ring"), { autocomplete: "ring-$colors" }],
|
|
625
|
-
[/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": colors.
|
|
626
|
+
[/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": colors.h.bracket.percent.cssvar(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
|
|
626
627
|
[/^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.
|
|
628
|
+
[/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": colors.h.bracket.percent.cssvar(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
|
|
628
629
|
["ring-inset", { "--un-ring-inset": "inset" }]
|
|
629
630
|
];
|
|
630
631
|
|
|
@@ -639,7 +640,7 @@ const boxShadows = [
|
|
|
639
640
|
const [, d] = match;
|
|
640
641
|
const { theme } = context;
|
|
641
642
|
const v = theme.boxShadow?.[d || "DEFAULT"];
|
|
642
|
-
const c = d ? colors.
|
|
643
|
+
const c = d ? colors.h.bracket.cssvar(d) : void 0;
|
|
643
644
|
if ((v != null || c != null) && !colors.hasParseableColor(c, theme)) {
|
|
644
645
|
return {
|
|
645
646
|
"--un-shadow": colors.colorableShadows(v || c, "--un-shadow-color").join(","),
|
|
@@ -648,7 +649,7 @@ const boxShadows = [
|
|
|
648
649
|
}
|
|
649
650
|
return colors.colorResolver("--un-shadow-color", "shadow")(match, context);
|
|
650
651
|
}, { autocomplete: ["shadow-$colors", "shadow-$boxShadow"] }],
|
|
651
|
-
[/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": colors.
|
|
652
|
+
[/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": colors.h.bracket.percent.cssvar(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
|
|
652
653
|
["shadow-inset", { "--un-shadow-inset": "inset" }]
|
|
653
654
|
];
|
|
654
655
|
|
|
@@ -698,9 +699,9 @@ const transformBase = {
|
|
|
698
699
|
"--un-translate-z": 0
|
|
699
700
|
};
|
|
700
701
|
const transforms = [
|
|
701
|
-
[/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": colors.positionMap[s] ?? colors.
|
|
702
|
+
[/^(?: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
703
|
[/^(?:transform-)?perspect(?:ive)?-(.+)$/, ([, s]) => {
|
|
703
|
-
const v = colors.
|
|
704
|
+
const v = colors.h.bracket.cssvar.px.numberWithUnit(s);
|
|
704
705
|
if (v != null) {
|
|
705
706
|
return {
|
|
706
707
|
"-webkit-perspective": v,
|
|
@@ -709,7 +710,7 @@ const transforms = [
|
|
|
709
710
|
}
|
|
710
711
|
}],
|
|
711
712
|
[/^(?:transform-)?perspect(?:ive)?-origin-(.+)$/, ([, s]) => {
|
|
712
|
-
const v = colors.
|
|
713
|
+
const v = colors.h.bracket.cssvar(s) ?? (s.length >= 3 ? colors.positionMap[s] : void 0);
|
|
713
714
|
if (v != null) {
|
|
714
715
|
return {
|
|
715
716
|
"-webkit-perspective-origin": v,
|
|
@@ -734,7 +735,7 @@ const transforms = [
|
|
|
734
735
|
...colors.makeGlobalStaticRules("transform")
|
|
735
736
|
];
|
|
736
737
|
function handleTranslate([, d, b], { theme }) {
|
|
737
|
-
const v = theme.spacing?.[b] ?? colors.
|
|
738
|
+
const v = theme.spacing?.[b] ?? colors.h.bracket.cssvar.fraction.rem(b);
|
|
738
739
|
if (v != null) {
|
|
739
740
|
return [
|
|
740
741
|
...colors.xyzMap[d].map((i) => [`--un-translate${i}`, v]),
|
|
@@ -743,7 +744,7 @@ function handleTranslate([, d, b], { theme }) {
|
|
|
743
744
|
}
|
|
744
745
|
}
|
|
745
746
|
function handleScale([, d, b]) {
|
|
746
|
-
const v = colors.
|
|
747
|
+
const v = colors.h.bracket.cssvar.fraction.percent(b);
|
|
747
748
|
if (v != null) {
|
|
748
749
|
return [
|
|
749
750
|
...colors.xyzMap[d].map((i) => [`--un-scale${i}`, v]),
|
|
@@ -752,7 +753,7 @@ function handleScale([, d, b]) {
|
|
|
752
753
|
}
|
|
753
754
|
}
|
|
754
755
|
function handleRotate([, d = "", b]) {
|
|
755
|
-
const v = colors.
|
|
756
|
+
const v = colors.h.bracket.cssvar.degree(b);
|
|
756
757
|
if (v != null) {
|
|
757
758
|
if (d) {
|
|
758
759
|
return {
|
|
@@ -772,7 +773,7 @@ function handleRotate([, d = "", b]) {
|
|
|
772
773
|
}
|
|
773
774
|
}
|
|
774
775
|
function handleSkew([, d, b]) {
|
|
775
|
-
const v = colors.
|
|
776
|
+
const v = colors.h.bracket.cssvar.degree(b);
|
|
776
777
|
if (v != null) {
|
|
777
778
|
return [
|
|
778
779
|
...colors.xyzMap[d].map((i) => [`--un-skew${i}`, v]),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const transform = require('./preset-mini.
|
|
4
|
-
const colors = require('./preset-mini.
|
|
3
|
+
const transform = require('./preset-mini.db8ecde7.cjs');
|
|
4
|
+
const colors = require('./preset-mini.a21c5071.cjs');
|
|
5
5
|
const core = require('@unocss/core');
|
|
6
6
|
|
|
7
7
|
const containerParent = [
|
|
@@ -18,14 +18,14 @@ const flex = [
|
|
|
18
18
|
["flex", { display: "flex" }],
|
|
19
19
|
["inline-flex", { display: "inline-flex" }],
|
|
20
20
|
["flex-inline", { display: "inline-flex" }],
|
|
21
|
-
[/^flex-(.*)$/, ([, d]) => ({ flex: colors.
|
|
21
|
+
[/^flex-(.*)$/, ([, d]) => ({ flex: colors.h.bracket(d) != null ? colors.h.bracket(d).split(" ").map((e) => colors.h.cssvar.fraction(e) ?? e).join(" ") : colors.h.cssvar.fraction(d) })],
|
|
22
22
|
["flex-1", { flex: "1 1 0%" }],
|
|
23
23
|
["flex-auto", { flex: "1 1 auto" }],
|
|
24
24
|
["flex-initial", { flex: "0 1 auto" }],
|
|
25
25
|
["flex-none", { flex: "none" }],
|
|
26
|
-
[/^(?:flex-)?shrink(?:-(.*))?$/, ([, d = ""]) => ({ "flex-shrink": colors.
|
|
27
|
-
[/^(?:flex-)?grow(?:-(.*))?$/, ([, d = ""]) => ({ "flex-grow": colors.
|
|
28
|
-
[/^(?:flex-)?basis-(.+)$/, ([, d], { theme }) => ({ "flex-basis": theme.spacing?.[d] ?? colors.
|
|
26
|
+
[/^(?:flex-)?shrink(?:-(.*))?$/, ([, d = ""]) => ({ "flex-shrink": colors.h.bracket.cssvar.number(d) ?? 1 }), { autocomplete: ["flex-shrink-<num>", "shrink-<num>"] }],
|
|
27
|
+
[/^(?:flex-)?grow(?:-(.*))?$/, ([, d = ""]) => ({ "flex-grow": colors.h.bracket.cssvar.number(d) ?? 1 }), { autocomplete: ["flex-grow-<num>", "grow-<num>"] }],
|
|
28
|
+
[/^(?:flex-)?basis-(.+)$/, ([, d], { theme }) => ({ "flex-basis": theme.spacing?.[d] ?? colors.h.bracket.cssvar.auto.fraction.rem(d) }), { autocomplete: ["flex-basis-$spacing", "basis-$spacing"] }],
|
|
29
29
|
["flex-row", { "flex-direction": "row" }],
|
|
30
30
|
["flex-row-reverse", { "flex-direction": "row-reverse" }],
|
|
31
31
|
["flex-col", { "flex-direction": "column" }],
|
|
@@ -41,7 +41,7 @@ const directions = {
|
|
|
41
41
|
"y": "row-"
|
|
42
42
|
};
|
|
43
43
|
function handleGap([, d = "", s], { theme }) {
|
|
44
|
-
const v = theme.spacing?.[s] ?? colors.
|
|
44
|
+
const v = theme.spacing?.[s] ?? colors.h.bracket.cssvar.global.rem(s);
|
|
45
45
|
if (v != null) {
|
|
46
46
|
return {
|
|
47
47
|
[`grid-${directions[d]}gap`]: v,
|
|
@@ -72,35 +72,35 @@ function autoDirection(c, theme, prop) {
|
|
|
72
72
|
case "fr":
|
|
73
73
|
return "minmax(0,1fr)";
|
|
74
74
|
}
|
|
75
|
-
return colors.
|
|
75
|
+
return colors.h.bracket.cssvar.auto.rem(prop);
|
|
76
76
|
}
|
|
77
77
|
const grids = [
|
|
78
78
|
["grid", { display: "grid" }],
|
|
79
79
|
["inline-grid", { display: "inline-grid" }],
|
|
80
80
|
[/^(?:grid-)?(row|col)-(.+)$/, ([, c, v], { theme }) => ({
|
|
81
|
-
[`grid-${rowCol(c)}`]: theme[`grid${rowColTheme(c)}`]?.[v] ?? colors.
|
|
81
|
+
[`grid-${rowCol(c)}`]: theme[`grid${rowColTheme(c)}`]?.[v] ?? colors.h.bracket.cssvar.auto(v)
|
|
82
82
|
})],
|
|
83
83
|
[/^(?:grid-)?(row|col)-span-(.+)$/, ([, c, s]) => {
|
|
84
84
|
if (s === "full")
|
|
85
85
|
return { [`grid-${rowCol(c)}`]: "1/-1" };
|
|
86
|
-
const v = colors.
|
|
86
|
+
const v = colors.h.bracket.number(s);
|
|
87
87
|
if (v != null)
|
|
88
88
|
return { [`grid-${rowCol(c)}`]: `span ${v}/span ${v}` };
|
|
89
89
|
}, { autocomplete: ["grid-(row|col)-span-<num>", "(row|col)-span-<num>"] }],
|
|
90
|
-
[/^(?:grid-)?(row|col)-start-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-start`]: colors.
|
|
91
|
-
[/^(?:grid-)?(row|col)-end-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-end`]: colors.
|
|
90
|
+
[/^(?:grid-)?(row|col)-start-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-start`]: colors.h.bracket.cssvar(v) ?? v })],
|
|
91
|
+
[/^(?:grid-)?(row|col)-end-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-end`]: colors.h.bracket.cssvar(v) ?? v }), { autocomplete: ["grid-(row|col)-(start|end)-<num>"] }],
|
|
92
92
|
[/^(?:grid-)?auto-(rows|cols)-(.+)$/, ([, c, v], { theme }) => ({ [`grid-auto-${rowCol(c)}`]: autoDirection(c, theme, v) }), { autocomplete: ["grid-auto-(rows|cols)-<num>"] }],
|
|
93
|
-
[/^(?:grid-auto-flow|auto-flow|grid-flow)-(.+)$/, ([, v]) => ({ "grid-auto-flow": colors.
|
|
93
|
+
[/^(?:grid-auto-flow|auto-flow|grid-flow)-(.+)$/, ([, v]) => ({ "grid-auto-flow": colors.h.bracket.cssvar(v) })],
|
|
94
94
|
[/^(?:grid-auto-flow|auto-flow|grid-flow)-(row|col|dense|row-dense|col-dense)$/, ([, v]) => ({ "grid-auto-flow": rowCol(v).replace("-", " ") }), { autocomplete: ["(grid-auto-flow|auto-flow|grid-flow)-(row|col|dense|row-dense|col-dense)"] }],
|
|
95
95
|
[/^grid-(rows|cols)-(.+)$/, ([, c, v], { theme }) => ({
|
|
96
|
-
[`grid-template-${rowCol(c)}`]: theme[`gridTemplate${rowColTheme(c)}`]?.[v] ?? colors.
|
|
96
|
+
[`grid-template-${rowCol(c)}`]: theme[`gridTemplate${rowColTheme(c)}`]?.[v] ?? colors.h.bracket.cssvar(v)
|
|
97
97
|
})],
|
|
98
98
|
[/^grid-(rows|cols)-minmax-([\w.-]+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(auto-fill,minmax(${d},1fr))` })],
|
|
99
99
|
[/^grid-(rows|cols)-(\d+)$/, ([, c, d]) => ({ [`grid-template-${rowCol(c)}`]: `repeat(${d},minmax(0,1fr))` }), { autocomplete: ["grid-(rows|cols)-<num>", "grid-(rows|cols)-none"] }],
|
|
100
100
|
[/^grid-area(s)?-(.+)$/, ([, s, v]) => {
|
|
101
101
|
if (s != null)
|
|
102
|
-
return { "grid-template-areas": colors.
|
|
103
|
-
return { "grid-area": colors.
|
|
102
|
+
return { "grid-template-areas": colors.h.cssvar(v) ?? v.split("-").map((s2) => `"${colors.h.bracket(s2)}"`).join(" ") };
|
|
103
|
+
return { "grid-area": colors.h.bracket.cssvar(v) };
|
|
104
104
|
}],
|
|
105
105
|
["grid-rows-none", { "grid-template-rows": "none" }],
|
|
106
106
|
["grid-cols-none", { "grid-template-columns": "none" }]
|
|
@@ -126,7 +126,7 @@ function getSizeValue(minmax, hw, theme, prop) {
|
|
|
126
126
|
case "min":
|
|
127
127
|
return `${prop}-content`;
|
|
128
128
|
}
|
|
129
|
-
return colors.
|
|
129
|
+
return colors.h.bracket.cssvar.global.auto.fraction.rem(prop);
|
|
130
130
|
}
|
|
131
131
|
const sizes = [
|
|
132
132
|
[/^(?:size-)?(min-|max-)?([wh])-?(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) })],
|
|
@@ -159,7 +159,7 @@ function getAspectRatio(prop) {
|
|
|
159
159
|
case "video":
|
|
160
160
|
return "16/9";
|
|
161
161
|
}
|
|
162
|
-
return colors.
|
|
162
|
+
return colors.h.bracket.cssvar.global.auto.number(prop);
|
|
163
163
|
}
|
|
164
164
|
const aspectRatio = [
|
|
165
165
|
[/^(?:size-)?aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video|ratio)", "aspect-ratio-(square|video)"] }]
|
|
@@ -201,13 +201,13 @@ const cssVariables = [
|
|
|
201
201
|
[/^(.+?)-(\$.+)$/, ([, name, varname]) => {
|
|
202
202
|
const prop = variablesAbbrMap[name];
|
|
203
203
|
if (prop)
|
|
204
|
-
return { [prop]: colors.
|
|
204
|
+
return { [prop]: colors.h.cssvar(varname) };
|
|
205
205
|
}]
|
|
206
206
|
];
|
|
207
207
|
const cssProperty = [
|
|
208
|
-
[/^\[(--(\w|\\\W)+|[\w-]+):([^\s
|
|
208
|
+
[/^\[(--(\w|\\\W)+|[\w-]+):(("[^\s"]+?"|'[^\s']+?'|`[^\s`]+?`|[^\s:'"`;{}]+?)+)\]$/, ([match, prop, , value]) => {
|
|
209
209
|
if (!isURI(match.slice(1, -1)))
|
|
210
|
-
return { [prop]: colors.
|
|
210
|
+
return { [prop]: colors.h.bracket(`[${value}]`) };
|
|
211
211
|
}]
|
|
212
212
|
];
|
|
213
213
|
function isURI(declaration) {
|
|
@@ -233,13 +233,13 @@ ${constructCSS({ animation: "__un_qm 0.5s ease-in-out alternate infinite" })}`;
|
|
|
233
233
|
|
|
234
234
|
const svgUtilities = [
|
|
235
235
|
[/^fill-(.+)$/, colors.colorResolver("fill", "fill"), { autocomplete: "fill-$colors" }],
|
|
236
|
-
[/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": colors.
|
|
236
|
+
[/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": colors.h.bracket.percent.cssvar(opacity) }), { autocomplete: "fill-(op|opacity)-<percent>" }],
|
|
237
237
|
["fill-none", { fill: "none" }],
|
|
238
|
-
[/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? colors.
|
|
239
|
-
[/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": colors.
|
|
240
|
-
[/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? colors.
|
|
238
|
+
[/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? colors.h.bracket.cssvar.fraction.px.number(s) }), { autocomplete: ["stroke-width-$lineWidth", "stroke-size-$lineWidth"] }],
|
|
239
|
+
[/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": colors.h.bracket.cssvar.number(s) }), { autocomplete: "stroke-dash-<num>" }],
|
|
240
|
+
[/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? colors.h.bracket.cssvar.px.numberWithUnit(s) }), { autocomplete: "stroke-offset-$lineWidth" }],
|
|
241
241
|
[/^stroke-(.+)$/, colors.colorResolver("stroke", "stroke"), { autocomplete: "stroke-$colors" }],
|
|
242
|
-
[/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": colors.
|
|
242
|
+
[/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": colors.h.bracket.percent.cssvar(opacity) }), { autocomplete: "stroke-(op|opacity)-<percent>" }],
|
|
243
243
|
["stroke-cap-square", { "stroke-linecap": "square" }],
|
|
244
244
|
["stroke-cap-round", { "stroke-linecap": "round" }],
|
|
245
245
|
["stroke-cap-auto", { "stroke-linecap": "butt" }],
|
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.0ea9a044.cjs');
|
|
7
|
+
require('./shared/preset-mini.db8ecde7.cjs');
|
|
8
|
+
require('./shared/preset-mini.a21c5071.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.438da325.mjs';
|
|
3
|
+
import './shared/preset-mini.17fe8f10.mjs';
|
|
4
|
+
import './shared/preset-mini.6c244f7e.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.a21c5071.cjs');
|
|
6
|
+
const variants = require('./shared/preset-mini.d778b487.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.6c244f7e.mjs';
|
|
2
|
+
export { a as variantGetBracket, v as variantGetParameter, b as variantMatcher, c as variantParentMatcher } from './shared/preset-mini.9af3cc95.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.3567e469.cjs');
|
|
6
|
+
require('./shared/preset-mini.a21c5071.cjs');
|
|
7
7
|
require('@unocss/core');
|
|
8
|
-
require('./shared/preset-mini.
|
|
8
|
+
require('./shared/preset-mini.d778b487.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|