@unocss/preset-mini 0.29.3 → 0.29.6
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 +9 -1
- package/dist/chunks/default.mjs +9 -1
- package/dist/chunks/default2.cjs +89 -44
- package/dist/chunks/default2.mjs +89 -44
- package/dist/theme.d.ts +8 -0
- package/package.json +2 -2
package/dist/chunks/default.cjs
CHANGED
|
@@ -126,7 +126,15 @@ const spacing = {
|
|
|
126
126
|
};
|
|
127
127
|
const duration = {
|
|
128
128
|
DEFAULT: "150ms",
|
|
129
|
-
none: "0ms"
|
|
129
|
+
none: "0ms",
|
|
130
|
+
75: "75ms",
|
|
131
|
+
100: "100ms",
|
|
132
|
+
150: "150ms",
|
|
133
|
+
200: "200ms",
|
|
134
|
+
300: "300ms",
|
|
135
|
+
500: "500ms",
|
|
136
|
+
700: "700ms",
|
|
137
|
+
1e3: "1000ms"
|
|
130
138
|
};
|
|
131
139
|
const borderRadius = {
|
|
132
140
|
"DEFAULT": "0.25rem",
|
package/dist/chunks/default.mjs
CHANGED
|
@@ -124,7 +124,15 @@ const spacing = {
|
|
|
124
124
|
};
|
|
125
125
|
const duration = {
|
|
126
126
|
DEFAULT: "150ms",
|
|
127
|
-
none: "0ms"
|
|
127
|
+
none: "0ms",
|
|
128
|
+
75: "75ms",
|
|
129
|
+
100: "100ms",
|
|
130
|
+
150: "150ms",
|
|
131
|
+
200: "200ms",
|
|
132
|
+
300: "300ms",
|
|
133
|
+
500: "500ms",
|
|
134
|
+
700: "700ms",
|
|
135
|
+
1e3: "1000ms"
|
|
128
136
|
};
|
|
129
137
|
const borderRadius = {
|
|
130
138
|
"DEFAULT": "0.25rem",
|
package/dist/chunks/default2.cjs
CHANGED
|
@@ -168,11 +168,27 @@ const transitions = [
|
|
|
168
168
|
"transition-duration": duration
|
|
169
169
|
};
|
|
170
170
|
}
|
|
171
|
-
}],
|
|
172
|
-
[
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
171
|
+
}, { autocomplete: `transition-(${Object.keys(transitionPropertyGroup).join("|")})` }],
|
|
172
|
+
[
|
|
173
|
+
/^(?:transition-)?duration-(.+)$/,
|
|
174
|
+
([, d], { theme }) => ({ "transition-duration": theme.duration?.[d || "DEFAULT"] ?? utilities.handler.bracket.cssvar.time(d) }),
|
|
175
|
+
{ autocomplete: ["transition-duration-$duration", "duration-$duration"] }
|
|
176
|
+
],
|
|
177
|
+
[
|
|
178
|
+
/^(?:transition-)?delay-(.+)$/,
|
|
179
|
+
([, d], { theme }) => ({ "transition-delay": theme.duration?.[d || "DEFAULT"] ?? utilities.handler.bracket.cssvar.time(d) }),
|
|
180
|
+
{ autocomplete: ["transition-delay-$duration", "delay-$duration"] }
|
|
181
|
+
],
|
|
182
|
+
[
|
|
183
|
+
/^(?:transition-)?ease(?:-(.+))?$/,
|
|
184
|
+
([, d], { theme }) => ({ "transition-timing-function": theme.easing?.[d || "DEFAULT"] ?? utilities.handler.bracket.cssvar(d) }),
|
|
185
|
+
{ autocomplete: ["transition-ease-(linear|in|out|in-out|DEFAULT)", "ease-(linear|in|out|in-out|DEFAULT)"] }
|
|
186
|
+
],
|
|
187
|
+
[
|
|
188
|
+
/^(?:transition-)?property-(.+)$/,
|
|
189
|
+
([, v]) => ({ "transition-property": utilities.handler.global(v) || transitionProperty(v) }),
|
|
190
|
+
{ autocomplete: [`transition-property-(${["inherit", "initial", "revert", "unset", ...Object.keys(transitionPropertyGroup)].join("|")})`] }
|
|
191
|
+
],
|
|
176
192
|
["transition-none", { transition: "none" }]
|
|
177
193
|
];
|
|
178
194
|
|
|
@@ -236,11 +252,11 @@ const fonts = [
|
|
|
236
252
|
const size = themed?.[0] ?? utilities.handler.bracket.cssvar.rem(s);
|
|
237
253
|
if (size != null)
|
|
238
254
|
return { "font-size": size };
|
|
239
|
-
}],
|
|
255
|
+
}, { autocomplete: "text-size-$fontSize" }],
|
|
240
256
|
[
|
|
241
257
|
/^(?:font|fw)-?([^-]+)$/,
|
|
242
258
|
([, s]) => ({ "font-weight": weightMap[s] || utilities.handler.global.number(s) }),
|
|
243
|
-
{ autocomplete:
|
|
259
|
+
{ autocomplete: `(font|fw)-(100|200|300|400|500|600|700|800|900|${Object.keys(weightMap).join("|")})` }
|
|
244
260
|
],
|
|
245
261
|
[
|
|
246
262
|
/^(?:leading|lh)-(.+)$/,
|
|
@@ -271,12 +287,12 @@ const tabSizes = [
|
|
|
271
287
|
}]
|
|
272
288
|
];
|
|
273
289
|
const textIndents = [
|
|
274
|
-
[/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] || utilities.handler.bracket.cssvar.global.fraction.rem(s) })]
|
|
290
|
+
[/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] || utilities.handler.bracket.cssvar.global.fraction.rem(s) }), { autocomplete: "indent-$textIndent" }]
|
|
275
291
|
];
|
|
276
292
|
const textStrokes = [
|
|
277
|
-
[/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] || utilities.handler.bracket.cssvar.px(s) })],
|
|
278
|
-
[/^text-stroke-(.+)$/, utilities.colorResolver("-webkit-text-stroke-color", "text-stroke")],
|
|
279
|
-
[/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": utilities.handler.bracket.percent(opacity) })]
|
|
293
|
+
[/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] || utilities.handler.bracket.cssvar.px(s) }), { autocomplete: "text-stroke-$textStrokeWidth" }],
|
|
294
|
+
[/^text-stroke-(.+)$/, utilities.colorResolver("-webkit-text-stroke-color", "text-stroke"), { autocomplete: "text-stroke-$colors" }],
|
|
295
|
+
[/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "text-stroke-(op|opacity)-<percent>" }]
|
|
280
296
|
];
|
|
281
297
|
const textShadows = [
|
|
282
298
|
[/^text-shadow(?:-(.+))?$/, ([, s], { theme }) => {
|
|
@@ -288,9 +304,9 @@ const textShadows = [
|
|
|
288
304
|
};
|
|
289
305
|
}
|
|
290
306
|
return { "text-shadow": utilities.handler.bracket.cssvar(s) };
|
|
291
|
-
}],
|
|
292
|
-
[/^text-shadow-color-(.+)$/, utilities.colorResolver("--un-text-shadow-color", "text-shadow")],
|
|
293
|
-
[/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": utilities.handler.bracket.percent(opacity) })]
|
|
307
|
+
}, { autocomplete: "text-shadow-$textShadow" }],
|
|
308
|
+
[/^text-shadow-color-(.+)$/, utilities.colorResolver("--un-text-shadow-color", "text-shadow"), { autocomplete: "text-shadow-color-$colors" }],
|
|
309
|
+
[/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "text-shadow-color-(op|opacity)-<percent>" }]
|
|
294
310
|
];
|
|
295
311
|
|
|
296
312
|
const directions = {
|
|
@@ -308,8 +324,8 @@ const handleGap = ([, d = "", s], { theme }) => {
|
|
|
308
324
|
}
|
|
309
325
|
};
|
|
310
326
|
const gaps = [
|
|
311
|
-
[/^(?:flex-|grid-)?gap-?()(.+)$/, handleGap, { autocomplete: "gap-<num>" }],
|
|
312
|
-
[/^(?:flex-|grid-)?gap-([xy])-?(.+)$/, handleGap, { autocomplete: "gap-(x|y)-<num>" }]
|
|
327
|
+
[/^(?:flex-|grid-)?gap-?()(.+)$/, handleGap, { autocomplete: ["gap-$spacing", "gap-<num>"] }],
|
|
328
|
+
[/^(?:flex-|grid-)?gap-([xy])-?(.+)$/, handleGap, { autocomplete: ["gap-(x|y)-$spacing", "gap-(x|y)-<num>"] }]
|
|
313
329
|
];
|
|
314
330
|
|
|
315
331
|
const rowCol = (s) => s.replace("col", "column");
|
|
@@ -340,7 +356,7 @@ const grids = [
|
|
|
340
356
|
const v = utilities.handler.bracket.number(s);
|
|
341
357
|
if (v != null)
|
|
342
358
|
return { [`grid-${rowCol(c)}`]: `span ${v}/span ${v}` };
|
|
343
|
-
}],
|
|
359
|
+
}, { autocomplete: ["grid-(row|col)-span-<num>", "(row|col)-span-<num>"] }],
|
|
344
360
|
[/^(?:grid-)?(row|col)-start-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-start`]: utilities.handler.bracket.cssvar(v) ?? v })],
|
|
345
361
|
[/^(?:grid-)?(row|col)-end-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-end`]: utilities.handler.bracket.cssvar(v) ?? v })],
|
|
346
362
|
[/^(?:grid-)?auto-(rows|cols)-(.+)$/, ([, c, v], { theme }) => ({ [`grid-auto-${rowCol(c)}`]: autoDirection(c, theme, v) })],
|
|
@@ -363,7 +379,7 @@ const overflowValues = [
|
|
|
363
379
|
"scroll"
|
|
364
380
|
];
|
|
365
381
|
const overflows = [
|
|
366
|
-
[/^(?:overflow|of)-(.+)$/, ([, v]) => overflowValues.includes(v) ? { overflow: v } : void 0],
|
|
382
|
+
[/^(?:overflow|of)-(.+)$/, ([, v]) => overflowValues.includes(v) ? { overflow: v } : void 0, { autocomplete: [`(overflow|of)-${overflowValues.join("|")}`, `(overflow|of)-(x|y)-${overflowValues.join("|")}`] }],
|
|
367
383
|
[/^(?:overflow|of)-([xy])-(.+)$/, ([, d, v]) => overflowValues.includes(v) ? { [`overflow-${d}`]: v } : void 0]
|
|
368
384
|
];
|
|
369
385
|
|
|
@@ -440,7 +456,18 @@ function handleInsetValues([, d, v], ctx) {
|
|
|
440
456
|
return utilities.insetMap[d].map((i) => [i.slice(1), r]);
|
|
441
457
|
}
|
|
442
458
|
const insets = [
|
|
443
|
-
[
|
|
459
|
+
[
|
|
460
|
+
/^(?:position-|pos-)?inset-(.+)$/,
|
|
461
|
+
([, v], ctx) => ({ inset: handleInsetValue(v, ctx) }),
|
|
462
|
+
{
|
|
463
|
+
autocomplete: [
|
|
464
|
+
"(position|pos)-inset-<directions>-$spacing",
|
|
465
|
+
"(position|pos)-inset-(block|inline)-$spacing",
|
|
466
|
+
"(position|pos)-inset-(bs|be|is|ie)-$spacing",
|
|
467
|
+
"(position|pos)-(top|left|right|bottom)-$spacing"
|
|
468
|
+
]
|
|
469
|
+
}
|
|
470
|
+
],
|
|
444
471
|
[/^(?:position-|pos-)?inset-([xy])-(.+)$/, handleInsetValues],
|
|
445
472
|
[/^(?:position-|pos-)?inset-([rltbse])-(.+)$/, handleInsetValues],
|
|
446
473
|
[/^(?:position-|pos-)?inset-(block|inline)-(.+)$/, handleInsetValues],
|
|
@@ -458,7 +485,7 @@ const floats = [
|
|
|
458
485
|
];
|
|
459
486
|
const zIndexes = [
|
|
460
487
|
[/^z([\d.]+)$/, ([, v]) => ({ "z-index": utilities.handler.number(v) })],
|
|
461
|
-
[/^z-(.+)$/, ([, v]) => ({ "z-index": utilities.handler.bracket.cssvar.auto.number(v) })]
|
|
488
|
+
[/^z-(.+)$/, ([, v]) => ({ "z-index": utilities.handler.bracket.cssvar.auto.number(v) }), { autocomplete: "z-<num>" }]
|
|
462
489
|
];
|
|
463
490
|
const boxSizing = [
|
|
464
491
|
["box-border", { "box-sizing": "border-box" }],
|
|
@@ -502,7 +529,7 @@ const userSelects = [
|
|
|
502
529
|
["select-none", { "user-select": "none" }]
|
|
503
530
|
];
|
|
504
531
|
const whitespaces = [
|
|
505
|
-
[/^(?:whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap)$/, ([, v]) => ({ "white-space": v })]
|
|
532
|
+
[/^(?:whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap)$/, ([, v]) => ({ "white-space": v }), { autocomplete: "(whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap)" }]
|
|
506
533
|
];
|
|
507
534
|
const contents = [
|
|
508
535
|
[/^content-\[(.+)\]$/, ([, v]) => ({ content: `"${v}"` })],
|
|
@@ -563,14 +590,14 @@ const rings = [
|
|
|
563
590
|
}
|
|
564
591
|
];
|
|
565
592
|
}
|
|
566
|
-
}],
|
|
567
|
-
[/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ?? utilities.handler.bracket.cssvar.px(d) })],
|
|
593
|
+
}, { autocomplete: "ring-$ringWidth" }],
|
|
594
|
+
[/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ?? utilities.handler.bracket.cssvar.px(d) }), { autocomplete: "ring-(width|size)-$lineWidth" }],
|
|
568
595
|
["ring-offset", { "--un-ring-offset-width": "1px" }],
|
|
569
|
-
[/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? utilities.handler.bracket.cssvar.px(d) })],
|
|
596
|
+
[/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? utilities.handler.bracket.cssvar.px(d) }), { autocomplete: "ring-offset-(width|size)-$lineWidth" }],
|
|
570
597
|
[/^ring-(.+)$/, utilities.colorResolver("--un-ring-color", "ring"), { autocomplete: "ring-$colors" }],
|
|
571
598
|
[/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
|
|
572
|
-
[/^ring-offset-(.+)$/, utilities.colorResolver("--un-ring-offset-color", "ring-offset")],
|
|
573
|
-
[/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": utilities.handler.bracket.percent(opacity) })],
|
|
599
|
+
[/^ring-offset-(.+)$/, utilities.colorResolver("--un-ring-offset-color", "ring-offset"), { autocomplete: "ring-offset-$colors" }],
|
|
600
|
+
[/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
|
|
574
601
|
["ring-inset", { "--un-ring-inset": "inset" }]
|
|
575
602
|
];
|
|
576
603
|
|
|
@@ -590,9 +617,9 @@ const boxShadows = [
|
|
|
590
617
|
}
|
|
591
618
|
];
|
|
592
619
|
}
|
|
593
|
-
}],
|
|
594
|
-
[/^shadow-(.+)$/, utilities.colorResolver("--un-shadow-color", "shadow")],
|
|
595
|
-
[/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": utilities.handler.bracket.percent(opacity) })],
|
|
620
|
+
}, { autocomplete: "shadow-$boxShadow" }],
|
|
621
|
+
[/^shadow-(.+)$/, utilities.colorResolver("--un-shadow-color", "shadow"), { autocomplete: "shadow-$colors" }],
|
|
622
|
+
[/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
|
|
596
623
|
["shadow-inset", { "--un-shadow-inset": "inset" }]
|
|
597
624
|
];
|
|
598
625
|
|
|
@@ -619,10 +646,28 @@ function getSizeValue(minmax, hw, theme, prop) {
|
|
|
619
646
|
return utilities.handler.bracket.cssvar.auto.fraction.rem(prop);
|
|
620
647
|
}
|
|
621
648
|
const sizes = [
|
|
622
|
-
[
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
649
|
+
[
|
|
650
|
+
/^(min-|max-)?([wh])-?(.+)$/,
|
|
651
|
+
([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }),
|
|
652
|
+
{
|
|
653
|
+
autocomplete: [
|
|
654
|
+
"(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
|
|
655
|
+
"(max|min)-(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
|
|
656
|
+
]
|
|
657
|
+
}
|
|
658
|
+
],
|
|
659
|
+
[
|
|
660
|
+
/^(min-|max-)?(block|inline)-(.+)$/,
|
|
661
|
+
([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }),
|
|
662
|
+
{
|
|
663
|
+
autocomplete: [
|
|
664
|
+
"(w|h)-(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
|
|
665
|
+
"(max|min)-(w|h)-(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
|
|
666
|
+
]
|
|
667
|
+
}
|
|
668
|
+
],
|
|
669
|
+
[/^(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: theme.verticalBreakpoints?.[s] }), { autocomplete: ["h-screen-$verticalBreakpoints", "(min|max)-h-screen-$verticalBreakpoints"] }],
|
|
670
|
+
[/^(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: theme.breakpoints?.[s] }), { autocomplete: ["w-screen-$breakpoints", "(min|max)-w-screen-$breakpoints"] }]
|
|
626
671
|
];
|
|
627
672
|
function getAspectRatio(prop) {
|
|
628
673
|
if (/^\d+\/\d+$/.test(prop))
|
|
@@ -636,15 +681,15 @@ function getAspectRatio(prop) {
|
|
|
636
681
|
return utilities.handler.bracket.cssvar.auto.number(prop);
|
|
637
682
|
}
|
|
638
683
|
const aspectRatio = [
|
|
639
|
-
[/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) })]
|
|
684
|
+
[/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video)", "aspect-ratio-(square|video)"] }]
|
|
640
685
|
];
|
|
641
686
|
|
|
642
687
|
const paddings = [
|
|
643
688
|
[/^pa?()-?(-?.+)$/, utilities.directionSize("padding"), { autocomplete: ["(m|p)<num>", "(m|p)-<num>"] }],
|
|
644
689
|
[/^p-?([xy])-?(-?.+)$/, utilities.directionSize("padding")],
|
|
645
690
|
[/^p-?([rltbse])-?(-?.+)$/, utilities.directionSize("padding"), { autocomplete: "(m|p)<directions>-<num>" }],
|
|
646
|
-
[/^p-(block|inline)-(-?.+)$/, utilities.directionSize("padding")],
|
|
647
|
-
[/^p-?([bi][se])-?(-?.+)$/, utilities.directionSize("padding")]
|
|
691
|
+
[/^p-(block|inline)-(-?.+)$/, utilities.directionSize("padding"), { autocomplete: "(m|p)-(block|inline)-<num>" }],
|
|
692
|
+
[/^p-?([bi][se])-?(-?.+)$/, utilities.directionSize("padding"), { autocomplete: "(m|p)-(bs|be|is|ie)-<num>" }]
|
|
648
693
|
];
|
|
649
694
|
const margins = [
|
|
650
695
|
[/^ma?()-?(-?.+)$/, utilities.directionSize("margin")],
|
|
@@ -701,7 +746,7 @@ const transformBase = {
|
|
|
701
746
|
[core.CONTROL_SHORTCUT_NO_MERGE]: ""
|
|
702
747
|
};
|
|
703
748
|
const transforms = [
|
|
704
|
-
[/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": utilities.positionMap[s] ?? utilities.handler.bracket.cssvar(s) })],
|
|
749
|
+
[/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": utilities.positionMap[s] ?? utilities.handler.bracket.cssvar(s) }), { autocomplete: [`transform-origin-(${Object.keys(utilities.positionMap).join("|")})`, `origin-(${Object.keys(utilities.positionMap).join("|")})`] }],
|
|
705
750
|
[/^(?:transform-)?perspect(?:ive)?-(.+)$/, ([, s]) => {
|
|
706
751
|
const v = utilities.handler.bracket.cssvar.px.numberWithUnit(s);
|
|
707
752
|
if (v != null) {
|
|
@@ -858,14 +903,14 @@ const textDecorations = [
|
|
|
858
903
|
];
|
|
859
904
|
|
|
860
905
|
const svgUtilities = [
|
|
861
|
-
[/^fill-(.+)$/, utilities.colorResolver("fill", "fill")],
|
|
862
|
-
[/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": utilities.handler.bracket.percent(opacity) })],
|
|
906
|
+
[/^fill-(.+)$/, utilities.colorResolver("fill", "fill"), { autocomplete: "fill-$colors" }],
|
|
907
|
+
[/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "fill-(op|opacity)-<percent>" }],
|
|
863
908
|
["fill-none", { fill: "none" }],
|
|
864
|
-
[/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? utilities.handler.bracket.cssvar.fraction.px.number(s) })],
|
|
865
|
-
[/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": utilities.handler.bracket.cssvar.number(s) })],
|
|
866
|
-
[/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? utilities.handler.bracket.cssvar.px.numberWithUnit(s) })],
|
|
867
|
-
[/^stroke-(.+)$/, utilities.colorResolver("stroke", "stroke")],
|
|
868
|
-
[/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": utilities.handler.bracket.percent(opacity) })],
|
|
909
|
+
[/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? utilities.handler.bracket.cssvar.fraction.px.number(s) }), { autocomplete: ["stroke-width-$lineWidth", "stroke-size-$lineWidth"] }],
|
|
910
|
+
[/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": utilities.handler.bracket.cssvar.number(s) }), { autocomplete: "stroke-dash-<num>" }],
|
|
911
|
+
[/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? utilities.handler.bracket.cssvar.px.numberWithUnit(s) }), { autocomplete: "stroke-offset-$lineWidth" }],
|
|
912
|
+
[/^stroke-(.+)$/, utilities.colorResolver("stroke", "stroke"), { autocomplete: "stroke-$colors" }],
|
|
913
|
+
[/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": utilities.handler.bracket.percent(opacity) }), { autocomplete: "stroke-(op|opacity)-<percent>" }],
|
|
869
914
|
["stroke-cap-square", { "stroke-linecap": "square" }],
|
|
870
915
|
["stroke-cap-round", { "stroke-linecap": "round" }],
|
|
871
916
|
["stroke-cap-auto", { "stroke-linecap": "butt" }],
|
package/dist/chunks/default2.mjs
CHANGED
|
@@ -166,11 +166,27 @@ const transitions = [
|
|
|
166
166
|
"transition-duration": duration
|
|
167
167
|
};
|
|
168
168
|
}
|
|
169
|
-
}],
|
|
170
|
-
[
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
169
|
+
}, { autocomplete: `transition-(${Object.keys(transitionPropertyGroup).join("|")})` }],
|
|
170
|
+
[
|
|
171
|
+
/^(?:transition-)?duration-(.+)$/,
|
|
172
|
+
([, d], { theme }) => ({ "transition-duration": theme.duration?.[d || "DEFAULT"] ?? handler.bracket.cssvar.time(d) }),
|
|
173
|
+
{ autocomplete: ["transition-duration-$duration", "duration-$duration"] }
|
|
174
|
+
],
|
|
175
|
+
[
|
|
176
|
+
/^(?:transition-)?delay-(.+)$/,
|
|
177
|
+
([, d], { theme }) => ({ "transition-delay": theme.duration?.[d || "DEFAULT"] ?? handler.bracket.cssvar.time(d) }),
|
|
178
|
+
{ autocomplete: ["transition-delay-$duration", "delay-$duration"] }
|
|
179
|
+
],
|
|
180
|
+
[
|
|
181
|
+
/^(?:transition-)?ease(?:-(.+))?$/,
|
|
182
|
+
([, d], { theme }) => ({ "transition-timing-function": theme.easing?.[d || "DEFAULT"] ?? handler.bracket.cssvar(d) }),
|
|
183
|
+
{ autocomplete: ["transition-ease-(linear|in|out|in-out|DEFAULT)", "ease-(linear|in|out|in-out|DEFAULT)"] }
|
|
184
|
+
],
|
|
185
|
+
[
|
|
186
|
+
/^(?:transition-)?property-(.+)$/,
|
|
187
|
+
([, v]) => ({ "transition-property": handler.global(v) || transitionProperty(v) }),
|
|
188
|
+
{ autocomplete: [`transition-property-(${["inherit", "initial", "revert", "unset", ...Object.keys(transitionPropertyGroup)].join("|")})`] }
|
|
189
|
+
],
|
|
174
190
|
["transition-none", { transition: "none" }]
|
|
175
191
|
];
|
|
176
192
|
|
|
@@ -234,11 +250,11 @@ const fonts = [
|
|
|
234
250
|
const size = themed?.[0] ?? handler.bracket.cssvar.rem(s);
|
|
235
251
|
if (size != null)
|
|
236
252
|
return { "font-size": size };
|
|
237
|
-
}],
|
|
253
|
+
}, { autocomplete: "text-size-$fontSize" }],
|
|
238
254
|
[
|
|
239
255
|
/^(?:font|fw)-?([^-]+)$/,
|
|
240
256
|
([, s]) => ({ "font-weight": weightMap[s] || handler.global.number(s) }),
|
|
241
|
-
{ autocomplete:
|
|
257
|
+
{ autocomplete: `(font|fw)-(100|200|300|400|500|600|700|800|900|${Object.keys(weightMap).join("|")})` }
|
|
242
258
|
],
|
|
243
259
|
[
|
|
244
260
|
/^(?:leading|lh)-(.+)$/,
|
|
@@ -269,12 +285,12 @@ const tabSizes = [
|
|
|
269
285
|
}]
|
|
270
286
|
];
|
|
271
287
|
const textIndents = [
|
|
272
|
-
[/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] || handler.bracket.cssvar.global.fraction.rem(s) })]
|
|
288
|
+
[/^indent(?:-(.+))?$/, ([, s], { theme }) => ({ "text-indent": theme.textIndent?.[s || "DEFAULT"] || handler.bracket.cssvar.global.fraction.rem(s) }), { autocomplete: "indent-$textIndent" }]
|
|
273
289
|
];
|
|
274
290
|
const textStrokes = [
|
|
275
|
-
[/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] || handler.bracket.cssvar.px(s) })],
|
|
276
|
-
[/^text-stroke-(.+)$/, colorResolver("-webkit-text-stroke-color", "text-stroke")],
|
|
277
|
-
[/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": handler.bracket.percent(opacity) })]
|
|
291
|
+
[/^text-stroke(?:-(.+))?$/, ([, s], { theme }) => ({ "-webkit-text-stroke-width": theme.textStrokeWidth?.[s || "DEFAULT"] || handler.bracket.cssvar.px(s) }), { autocomplete: "text-stroke-$textStrokeWidth" }],
|
|
292
|
+
[/^text-stroke-(.+)$/, colorResolver("-webkit-text-stroke-color", "text-stroke"), { autocomplete: "text-stroke-$colors" }],
|
|
293
|
+
[/^text-stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-stroke-opacity": handler.bracket.percent(opacity) }), { autocomplete: "text-stroke-(op|opacity)-<percent>" }]
|
|
278
294
|
];
|
|
279
295
|
const textShadows = [
|
|
280
296
|
[/^text-shadow(?:-(.+))?$/, ([, s], { theme }) => {
|
|
@@ -286,9 +302,9 @@ const textShadows = [
|
|
|
286
302
|
};
|
|
287
303
|
}
|
|
288
304
|
return { "text-shadow": handler.bracket.cssvar(s) };
|
|
289
|
-
}],
|
|
290
|
-
[/^text-shadow-color-(.+)$/, colorResolver("--un-text-shadow-color", "text-shadow")],
|
|
291
|
-
[/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": handler.bracket.percent(opacity) })]
|
|
305
|
+
}, { autocomplete: "text-shadow-$textShadow" }],
|
|
306
|
+
[/^text-shadow-color-(.+)$/, colorResolver("--un-text-shadow-color", "text-shadow"), { autocomplete: "text-shadow-color-$colors" }],
|
|
307
|
+
[/^text-shadow-color-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-text-shadow-opacity": handler.bracket.percent(opacity) }), { autocomplete: "text-shadow-color-(op|opacity)-<percent>" }]
|
|
292
308
|
];
|
|
293
309
|
|
|
294
310
|
const directions = {
|
|
@@ -306,8 +322,8 @@ const handleGap = ([, d = "", s], { theme }) => {
|
|
|
306
322
|
}
|
|
307
323
|
};
|
|
308
324
|
const gaps = [
|
|
309
|
-
[/^(?:flex-|grid-)?gap-?()(.+)$/, handleGap, { autocomplete: "gap-<num>" }],
|
|
310
|
-
[/^(?:flex-|grid-)?gap-([xy])-?(.+)$/, handleGap, { autocomplete: "gap-(x|y)-<num>" }]
|
|
325
|
+
[/^(?:flex-|grid-)?gap-?()(.+)$/, handleGap, { autocomplete: ["gap-$spacing", "gap-<num>"] }],
|
|
326
|
+
[/^(?:flex-|grid-)?gap-([xy])-?(.+)$/, handleGap, { autocomplete: ["gap-(x|y)-$spacing", "gap-(x|y)-<num>"] }]
|
|
311
327
|
];
|
|
312
328
|
|
|
313
329
|
const rowCol = (s) => s.replace("col", "column");
|
|
@@ -338,7 +354,7 @@ const grids = [
|
|
|
338
354
|
const v = handler.bracket.number(s);
|
|
339
355
|
if (v != null)
|
|
340
356
|
return { [`grid-${rowCol(c)}`]: `span ${v}/span ${v}` };
|
|
341
|
-
}],
|
|
357
|
+
}, { autocomplete: ["grid-(row|col)-span-<num>", "(row|col)-span-<num>"] }],
|
|
342
358
|
[/^(?:grid-)?(row|col)-start-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-start`]: handler.bracket.cssvar(v) ?? v })],
|
|
343
359
|
[/^(?:grid-)?(row|col)-end-(.+)$/, ([, c, v]) => ({ [`grid-${rowCol(c)}-end`]: handler.bracket.cssvar(v) ?? v })],
|
|
344
360
|
[/^(?:grid-)?auto-(rows|cols)-(.+)$/, ([, c, v], { theme }) => ({ [`grid-auto-${rowCol(c)}`]: autoDirection(c, theme, v) })],
|
|
@@ -361,7 +377,7 @@ const overflowValues = [
|
|
|
361
377
|
"scroll"
|
|
362
378
|
];
|
|
363
379
|
const overflows = [
|
|
364
|
-
[/^(?:overflow|of)-(.+)$/, ([, v]) => overflowValues.includes(v) ? { overflow: v } : void 0],
|
|
380
|
+
[/^(?:overflow|of)-(.+)$/, ([, v]) => overflowValues.includes(v) ? { overflow: v } : void 0, { autocomplete: [`(overflow|of)-${overflowValues.join("|")}`, `(overflow|of)-(x|y)-${overflowValues.join("|")}`] }],
|
|
365
381
|
[/^(?:overflow|of)-([xy])-(.+)$/, ([, d, v]) => overflowValues.includes(v) ? { [`overflow-${d}`]: v } : void 0]
|
|
366
382
|
];
|
|
367
383
|
|
|
@@ -438,7 +454,18 @@ function handleInsetValues([, d, v], ctx) {
|
|
|
438
454
|
return insetMap[d].map((i) => [i.slice(1), r]);
|
|
439
455
|
}
|
|
440
456
|
const insets = [
|
|
441
|
-
[
|
|
457
|
+
[
|
|
458
|
+
/^(?:position-|pos-)?inset-(.+)$/,
|
|
459
|
+
([, v], ctx) => ({ inset: handleInsetValue(v, ctx) }),
|
|
460
|
+
{
|
|
461
|
+
autocomplete: [
|
|
462
|
+
"(position|pos)-inset-<directions>-$spacing",
|
|
463
|
+
"(position|pos)-inset-(block|inline)-$spacing",
|
|
464
|
+
"(position|pos)-inset-(bs|be|is|ie)-$spacing",
|
|
465
|
+
"(position|pos)-(top|left|right|bottom)-$spacing"
|
|
466
|
+
]
|
|
467
|
+
}
|
|
468
|
+
],
|
|
442
469
|
[/^(?:position-|pos-)?inset-([xy])-(.+)$/, handleInsetValues],
|
|
443
470
|
[/^(?:position-|pos-)?inset-([rltbse])-(.+)$/, handleInsetValues],
|
|
444
471
|
[/^(?:position-|pos-)?inset-(block|inline)-(.+)$/, handleInsetValues],
|
|
@@ -456,7 +483,7 @@ const floats = [
|
|
|
456
483
|
];
|
|
457
484
|
const zIndexes = [
|
|
458
485
|
[/^z([\d.]+)$/, ([, v]) => ({ "z-index": handler.number(v) })],
|
|
459
|
-
[/^z-(.+)$/, ([, v]) => ({ "z-index": handler.bracket.cssvar.auto.number(v) })]
|
|
486
|
+
[/^z-(.+)$/, ([, v]) => ({ "z-index": handler.bracket.cssvar.auto.number(v) }), { autocomplete: "z-<num>" }]
|
|
460
487
|
];
|
|
461
488
|
const boxSizing = [
|
|
462
489
|
["box-border", { "box-sizing": "border-box" }],
|
|
@@ -500,7 +527,7 @@ const userSelects = [
|
|
|
500
527
|
["select-none", { "user-select": "none" }]
|
|
501
528
|
];
|
|
502
529
|
const whitespaces = [
|
|
503
|
-
[/^(?:whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap)$/, ([, v]) => ({ "white-space": v })]
|
|
530
|
+
[/^(?:whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap)$/, ([, v]) => ({ "white-space": v }), { autocomplete: "(whitespace|ws)-(normal|nowrap|pre|pre-line|pre-wrap)" }]
|
|
504
531
|
];
|
|
505
532
|
const contents = [
|
|
506
533
|
[/^content-\[(.+)\]$/, ([, v]) => ({ content: `"${v}"` })],
|
|
@@ -561,14 +588,14 @@ const rings = [
|
|
|
561
588
|
}
|
|
562
589
|
];
|
|
563
590
|
}
|
|
564
|
-
}],
|
|
565
|
-
[/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ?? handler.bracket.cssvar.px(d) })],
|
|
591
|
+
}, { autocomplete: "ring-$ringWidth" }],
|
|
592
|
+
[/^ring-(?:width-|size-)(.+)$/, ([, d], { theme }) => ({ "--un-ring-width": theme.lineWidth?.[d] ?? handler.bracket.cssvar.px(d) }), { autocomplete: "ring-(width|size)-$lineWidth" }],
|
|
566
593
|
["ring-offset", { "--un-ring-offset-width": "1px" }],
|
|
567
|
-
[/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? handler.bracket.cssvar.px(d) })],
|
|
594
|
+
[/^ring-offset-(?:width-|size-)?(.+)$/, ([, d], { theme }) => ({ "--un-ring-offset-width": theme.lineWidth?.[d] ?? handler.bracket.cssvar.px(d) }), { autocomplete: "ring-offset-(width|size)-$lineWidth" }],
|
|
568
595
|
[/^ring-(.+)$/, colorResolver("--un-ring-color", "ring"), { autocomplete: "ring-$colors" }],
|
|
569
596
|
[/^ring-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-opacity": handler.bracket.percent(opacity) }), { autocomplete: "ring-(op|opacity)-<percent>" }],
|
|
570
|
-
[/^ring-offset-(.+)$/, colorResolver("--un-ring-offset-color", "ring-offset")],
|
|
571
|
-
[/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": handler.bracket.percent(opacity) })],
|
|
597
|
+
[/^ring-offset-(.+)$/, colorResolver("--un-ring-offset-color", "ring-offset"), { autocomplete: "ring-offset-$colors" }],
|
|
598
|
+
[/^ring-offset-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-ring-offset-opacity": handler.bracket.percent(opacity) }), { autocomplete: "ring-offset-(op|opacity)-<percent>" }],
|
|
572
599
|
["ring-inset", { "--un-ring-inset": "inset" }]
|
|
573
600
|
];
|
|
574
601
|
|
|
@@ -588,9 +615,9 @@ const boxShadows = [
|
|
|
588
615
|
}
|
|
589
616
|
];
|
|
590
617
|
}
|
|
591
|
-
}],
|
|
592
|
-
[/^shadow-(.+)$/, colorResolver("--un-shadow-color", "shadow")],
|
|
593
|
-
[/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": handler.bracket.percent(opacity) })],
|
|
618
|
+
}, { autocomplete: "shadow-$boxShadow" }],
|
|
619
|
+
[/^shadow-(.+)$/, colorResolver("--un-shadow-color", "shadow"), { autocomplete: "shadow-$colors" }],
|
|
620
|
+
[/^shadow-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-shadow-opacity": handler.bracket.percent(opacity) }), { autocomplete: "shadow-(op|opacity)-<percent>" }],
|
|
594
621
|
["shadow-inset", { "--un-shadow-inset": "inset" }]
|
|
595
622
|
];
|
|
596
623
|
|
|
@@ -617,10 +644,28 @@ function getSizeValue(minmax, hw, theme, prop) {
|
|
|
617
644
|
return handler.bracket.cssvar.auto.fraction.rem(prop);
|
|
618
645
|
}
|
|
619
646
|
const sizes = [
|
|
620
|
-
[
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
647
|
+
[
|
|
648
|
+
/^(min-|max-)?([wh])-?(.+)$/,
|
|
649
|
+
([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }),
|
|
650
|
+
{
|
|
651
|
+
autocomplete: [
|
|
652
|
+
"(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
|
|
653
|
+
"(max|min)-(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
|
|
654
|
+
]
|
|
655
|
+
}
|
|
656
|
+
],
|
|
657
|
+
[
|
|
658
|
+
/^(min-|max-)?(block|inline)-(.+)$/,
|
|
659
|
+
([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }),
|
|
660
|
+
{
|
|
661
|
+
autocomplete: [
|
|
662
|
+
"(w|h)-(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
|
|
663
|
+
"(max|min)-(w|h)-(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
|
|
664
|
+
]
|
|
665
|
+
}
|
|
666
|
+
],
|
|
667
|
+
[/^(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: theme.verticalBreakpoints?.[s] }), { autocomplete: ["h-screen-$verticalBreakpoints", "(min|max)-h-screen-$verticalBreakpoints"] }],
|
|
668
|
+
[/^(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: theme.breakpoints?.[s] }), { autocomplete: ["w-screen-$breakpoints", "(min|max)-w-screen-$breakpoints"] }]
|
|
624
669
|
];
|
|
625
670
|
function getAspectRatio(prop) {
|
|
626
671
|
if (/^\d+\/\d+$/.test(prop))
|
|
@@ -634,15 +679,15 @@ function getAspectRatio(prop) {
|
|
|
634
679
|
return handler.bracket.cssvar.auto.number(prop);
|
|
635
680
|
}
|
|
636
681
|
const aspectRatio = [
|
|
637
|
-
[/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) })]
|
|
682
|
+
[/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video)", "aspect-ratio-(square|video)"] }]
|
|
638
683
|
];
|
|
639
684
|
|
|
640
685
|
const paddings = [
|
|
641
686
|
[/^pa?()-?(-?.+)$/, directionSize("padding"), { autocomplete: ["(m|p)<num>", "(m|p)-<num>"] }],
|
|
642
687
|
[/^p-?([xy])-?(-?.+)$/, directionSize("padding")],
|
|
643
688
|
[/^p-?([rltbse])-?(-?.+)$/, directionSize("padding"), { autocomplete: "(m|p)<directions>-<num>" }],
|
|
644
|
-
[/^p-(block|inline)-(-?.+)$/, directionSize("padding")],
|
|
645
|
-
[/^p-?([bi][se])-?(-?.+)$/, directionSize("padding")]
|
|
689
|
+
[/^p-(block|inline)-(-?.+)$/, directionSize("padding"), { autocomplete: "(m|p)-(block|inline)-<num>" }],
|
|
690
|
+
[/^p-?([bi][se])-?(-?.+)$/, directionSize("padding"), { autocomplete: "(m|p)-(bs|be|is|ie)-<num>" }]
|
|
646
691
|
];
|
|
647
692
|
const margins = [
|
|
648
693
|
[/^ma?()-?(-?.+)$/, directionSize("margin")],
|
|
@@ -699,7 +744,7 @@ const transformBase = {
|
|
|
699
744
|
[CONTROL_SHORTCUT_NO_MERGE]: ""
|
|
700
745
|
};
|
|
701
746
|
const transforms = [
|
|
702
|
-
[/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": positionMap[s] ?? handler.bracket.cssvar(s) })],
|
|
747
|
+
[/^(?:transform-)?origin-(.+)$/, ([, s]) => ({ "transform-origin": positionMap[s] ?? handler.bracket.cssvar(s) }), { autocomplete: [`transform-origin-(${Object.keys(positionMap).join("|")})`, `origin-(${Object.keys(positionMap).join("|")})`] }],
|
|
703
748
|
[/^(?:transform-)?perspect(?:ive)?-(.+)$/, ([, s]) => {
|
|
704
749
|
const v = handler.bracket.cssvar.px.numberWithUnit(s);
|
|
705
750
|
if (v != null) {
|
|
@@ -856,14 +901,14 @@ const textDecorations = [
|
|
|
856
901
|
];
|
|
857
902
|
|
|
858
903
|
const svgUtilities = [
|
|
859
|
-
[/^fill-(.+)$/, colorResolver("fill", "fill")],
|
|
860
|
-
[/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": handler.bracket.percent(opacity) })],
|
|
904
|
+
[/^fill-(.+)$/, colorResolver("fill", "fill"), { autocomplete: "fill-$colors" }],
|
|
905
|
+
[/^fill-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-fill-opacity": handler.bracket.percent(opacity) }), { autocomplete: "fill-(op|opacity)-<percent>" }],
|
|
861
906
|
["fill-none", { fill: "none" }],
|
|
862
|
-
[/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? handler.bracket.cssvar.fraction.px.number(s) })],
|
|
863
|
-
[/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": handler.bracket.cssvar.number(s) })],
|
|
864
|
-
[/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? handler.bracket.cssvar.px.numberWithUnit(s) })],
|
|
865
|
-
[/^stroke-(.+)$/, colorResolver("stroke", "stroke")],
|
|
866
|
-
[/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": handler.bracket.percent(opacity) })],
|
|
907
|
+
[/^stroke-(?:width-|size-)?(.+)$/, ([, s], { theme }) => ({ "stroke-width": theme.lineWidth?.[s] ?? handler.bracket.cssvar.fraction.px.number(s) }), { autocomplete: ["stroke-width-$lineWidth", "stroke-size-$lineWidth"] }],
|
|
908
|
+
[/^stroke-dash-(.+)$/, ([, s]) => ({ "stroke-dasharray": handler.bracket.cssvar.number(s) }), { autocomplete: "stroke-dash-<num>" }],
|
|
909
|
+
[/^stroke-offset-(.+)$/, ([, s], { theme }) => ({ "stroke-dashoffset": theme.lineWidth?.[s] ?? handler.bracket.cssvar.px.numberWithUnit(s) }), { autocomplete: "stroke-offset-$lineWidth" }],
|
|
910
|
+
[/^stroke-(.+)$/, colorResolver("stroke", "stroke"), { autocomplete: "stroke-$colors" }],
|
|
911
|
+
[/^stroke-op(?:acity)?-?(.+)$/, ([, opacity]) => ({ "--un-stroke-opacity": handler.bracket.percent(opacity) }), { autocomplete: "stroke-(op|opacity)-<percent>" }],
|
|
867
912
|
["stroke-cap-square", { "stroke-linecap": "square" }],
|
|
868
913
|
["stroke-cap-round", { "stroke-linecap": "round" }],
|
|
869
914
|
["stroke-cap-auto", { "stroke-linecap": "butt" }],
|
package/dist/theme.d.ts
CHANGED
|
@@ -73,6 +73,14 @@ declare const spacing: {
|
|
|
73
73
|
declare const duration: {
|
|
74
74
|
DEFAULT: string;
|
|
75
75
|
none: string;
|
|
76
|
+
75: string;
|
|
77
|
+
100: string;
|
|
78
|
+
150: string;
|
|
79
|
+
200: string;
|
|
80
|
+
300: string;
|
|
81
|
+
500: string;
|
|
82
|
+
700: string;
|
|
83
|
+
1000: string;
|
|
76
84
|
};
|
|
77
85
|
declare const borderRadius: {
|
|
78
86
|
DEFAULT: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-mini",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.6",
|
|
4
4
|
"description": "The minimal preset for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
],
|
|
62
62
|
"sideEffects": false,
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@unocss/core": "0.29.
|
|
64
|
+
"@unocss/core": "0.29.6"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "unbuild",
|