@unocss/preset-mini 0.42.0 → 0.42.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/default2.cjs +21 -23
- package/dist/chunks/default2.mjs +21 -23
- package/dist/chunks/transform.cjs +10 -3
- package/dist/chunks/transform.mjs +10 -3
- package/package.json +2 -2
package/dist/chunks/default2.cjs
CHANGED
|
@@ -545,28 +545,26 @@ function getSizeValue(minmax, hw, theme, prop) {
|
|
|
545
545
|
return utilities.handler.bracket.cssvar.global.auto.fraction.rem(prop);
|
|
546
546
|
}
|
|
547
547
|
const sizes = [
|
|
548
|
-
[
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
],
|
|
558
|
-
[
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
]
|
|
568
|
-
[/^(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: utilities.resolveVerticalBreakpoints(context)?.[s] }), { autocomplete: ["h-screen-$verticalBreakpoints", "(min|max)-h-screen-$verticalBreakpoints"] }],
|
|
569
|
-
[/^(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: utilities.resolveBreakpoints(context)?.[s] }), { autocomplete: ["w-screen-$breakpoints", "(min|max)-w-screen-$breakpoints"] }]
|
|
548
|
+
[/^(min-|max-)?([wh])-?(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) })],
|
|
549
|
+
[/^(min-|max-)?(block|inline)-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }), {
|
|
550
|
+
autocomplete: [
|
|
551
|
+
"(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
|
|
552
|
+
"(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
|
|
553
|
+
"(max|min)-(w|h|block|inline)",
|
|
554
|
+
"(max|min)-(w|h|block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
|
|
555
|
+
]
|
|
556
|
+
}],
|
|
557
|
+
[/^(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: utilities.resolveVerticalBreakpoints(context)?.[s] })],
|
|
558
|
+
[/^(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: utilities.resolveBreakpoints(context)?.[s] }), {
|
|
559
|
+
autocomplete: [
|
|
560
|
+
"(w|h)-screen",
|
|
561
|
+
"(min|max)-(w|h)-screen",
|
|
562
|
+
"h-screen-$verticalBreakpoints",
|
|
563
|
+
"(min|max)-h-screen-$verticalBreakpoints",
|
|
564
|
+
"w-screen-$breakpoints",
|
|
565
|
+
"(min|max)-w-screen-$breakpoints"
|
|
566
|
+
]
|
|
567
|
+
}]
|
|
570
568
|
];
|
|
571
569
|
function getAspectRatio(prop) {
|
|
572
570
|
if (/^\d+\/\d+$/.test(prop))
|
|
@@ -580,7 +578,7 @@ function getAspectRatio(prop) {
|
|
|
580
578
|
return utilities.handler.bracket.cssvar.global.auto.number(prop);
|
|
581
579
|
}
|
|
582
580
|
const aspectRatio = [
|
|
583
|
-
[/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video)", "aspect-ratio-(square|video)"] }]
|
|
581
|
+
[/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video|ratio)", "aspect-ratio-(square|video)"] }]
|
|
584
582
|
];
|
|
585
583
|
|
|
586
584
|
const paddings = [
|
package/dist/chunks/default2.mjs
CHANGED
|
@@ -543,28 +543,26 @@ function getSizeValue(minmax, hw, theme, prop) {
|
|
|
543
543
|
return handler.bracket.cssvar.global.auto.fraction.rem(prop);
|
|
544
544
|
}
|
|
545
545
|
const sizes = [
|
|
546
|
-
[
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
],
|
|
556
|
-
[
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
]
|
|
566
|
-
[/^(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: resolveVerticalBreakpoints(context)?.[s] }), { autocomplete: ["h-screen-$verticalBreakpoints", "(min|max)-h-screen-$verticalBreakpoints"] }],
|
|
567
|
-
[/^(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: resolveBreakpoints(context)?.[s] }), { autocomplete: ["w-screen-$breakpoints", "(min|max)-w-screen-$breakpoints"] }]
|
|
546
|
+
[/^(min-|max-)?([wh])-?(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) })],
|
|
547
|
+
[/^(min-|max-)?(block|inline)-(.+)$/, ([, m, w, s], { theme }) => ({ [getPropName(m, w)]: getSizeValue(m, w, theme, s) }), {
|
|
548
|
+
autocomplete: [
|
|
549
|
+
"(w|h)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
|
|
550
|
+
"(block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize",
|
|
551
|
+
"(max|min)-(w|h|block|inline)",
|
|
552
|
+
"(max|min)-(w|h|block|inline)-$width|height|maxWidth|maxHeight|minWidth|minHeight|inlineSize|blockSize|maxInlineSize|maxBlockSize|minInlineSize|minBlockSize"
|
|
553
|
+
]
|
|
554
|
+
}],
|
|
555
|
+
[/^(min-|max-)?(h)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: resolveVerticalBreakpoints(context)?.[s] })],
|
|
556
|
+
[/^(min-|max-)?(w)-screen-(.+)$/, ([, m, w, s], context) => ({ [getPropName(m, w)]: resolveBreakpoints(context)?.[s] }), {
|
|
557
|
+
autocomplete: [
|
|
558
|
+
"(w|h)-screen",
|
|
559
|
+
"(min|max)-(w|h)-screen",
|
|
560
|
+
"h-screen-$verticalBreakpoints",
|
|
561
|
+
"(min|max)-h-screen-$verticalBreakpoints",
|
|
562
|
+
"w-screen-$breakpoints",
|
|
563
|
+
"(min|max)-w-screen-$breakpoints"
|
|
564
|
+
]
|
|
565
|
+
}]
|
|
568
566
|
];
|
|
569
567
|
function getAspectRatio(prop) {
|
|
570
568
|
if (/^\d+\/\d+$/.test(prop))
|
|
@@ -578,7 +576,7 @@ function getAspectRatio(prop) {
|
|
|
578
576
|
return handler.bracket.cssvar.global.auto.number(prop);
|
|
579
577
|
}
|
|
580
578
|
const aspectRatio = [
|
|
581
|
-
[/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video)", "aspect-ratio-(square|video)"] }]
|
|
579
|
+
[/^aspect-(?:ratio-)?(.+)$/, ([, d]) => ({ "aspect-ratio": getAspectRatio(d) }), { autocomplete: ["aspect-(square|video|ratio)", "aspect-ratio-(square|video)"] }]
|
|
582
580
|
];
|
|
583
581
|
|
|
584
582
|
const paddings = [
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
const utilities = require('./utilities.cjs');
|
|
4
4
|
|
|
5
|
+
const cursorValues = ["auto", "default", "none", "context-menu", "help", "pointer", "progress", "wait", "cell", "crosshair", "text", "vertical-text", "alias", "copy", "move", "no-drop", "not-allowed", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out"];
|
|
5
6
|
const varEmpty = "var(--un-empty,/*!*/ /*!*/)";
|
|
6
7
|
const displays = [
|
|
7
8
|
["inline", { display: "inline" }],
|
|
@@ -21,7 +22,8 @@ const appearances = [
|
|
|
21
22
|
...utilities.makeGlobalStaticRules("backface", "backface-visibility")
|
|
22
23
|
];
|
|
23
24
|
const cursors = [
|
|
24
|
-
[/^cursor-(.+)$/, ([, c]) => ({ cursor: utilities.handler.bracket.cssvar.global(c)
|
|
25
|
+
[/^cursor-(.+)$/, ([, c]) => ({ cursor: utilities.handler.bracket.cssvar.global(c) })],
|
|
26
|
+
...cursorValues.map((v) => [`cursor-${v}`, { cursor: v }])
|
|
25
27
|
];
|
|
26
28
|
const pointerEvents = [
|
|
27
29
|
["pointer-events-auto", { "pointer-events": "auto" }],
|
|
@@ -146,6 +148,11 @@ const boxShadows = [
|
|
|
146
148
|
["shadow-inset", { "--un-shadow-inset": "inset" }]
|
|
147
149
|
];
|
|
148
150
|
|
|
151
|
+
const transformValues = [
|
|
152
|
+
"translate",
|
|
153
|
+
"rotate",
|
|
154
|
+
"scale"
|
|
155
|
+
];
|
|
149
156
|
const transformCpu = [
|
|
150
157
|
"translateX(var(--un-translate-x))",
|
|
151
158
|
"translateY(var(--un-translate-y))",
|
|
@@ -210,9 +217,9 @@ const transforms = [
|
|
|
210
217
|
[/^(?:transform-)?translate-([xyz])-(.+)$/, handleTranslate],
|
|
211
218
|
[/^(?:transform-)?rotate-()(.+)$/, handleRotate],
|
|
212
219
|
[/^(?:transform-)?rotate-([xyz])-(.+)$/, handleRotate],
|
|
213
|
-
[/^(?:transform-)?skew-([xy])-(.+)$/, handleSkew],
|
|
220
|
+
[/^(?:transform-)?skew-([xy])-(.+)$/, handleSkew, { autocomplete: ["transform-skew-(x|y)-<percent>"] }],
|
|
214
221
|
[/^(?:transform-)?scale-()(.+)$/, handleScale],
|
|
215
|
-
[/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale],
|
|
222
|
+
[/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale, { autocomplete: [`transform-(${transformValues.join("|")})-<percent>`, `transform-(${transformValues.join("|")})-(x|y|z)-<percent>`] }],
|
|
216
223
|
[/^(?:transform-)?preserve-3d$/, () => ({ "transform-style": "preserve-3d" })],
|
|
217
224
|
[/^(?:transform-)?preserve-flat$/, () => ({ "transform-style": "flat" })],
|
|
218
225
|
["transform", { transform: transformCpu }],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h as handler, m as makeGlobalStaticRules, g as globalKeywords, c as colorResolver, i as colorableShadows, n as positionMap, x as xyzMap } from './utilities.mjs';
|
|
2
2
|
|
|
3
|
+
const cursorValues = ["auto", "default", "none", "context-menu", "help", "pointer", "progress", "wait", "cell", "crosshair", "text", "vertical-text", "alias", "copy", "move", "no-drop", "not-allowed", "grab", "grabbing", "all-scroll", "col-resize", "row-resize", "n-resize", "e-resize", "s-resize", "w-resize", "ne-resize", "nw-resize", "se-resize", "sw-resize", "ew-resize", "ns-resize", "nesw-resize", "nwse-resize", "zoom-in", "zoom-out"];
|
|
3
4
|
const varEmpty = "var(--un-empty,/*!*/ /*!*/)";
|
|
4
5
|
const displays = [
|
|
5
6
|
["inline", { display: "inline" }],
|
|
@@ -19,7 +20,8 @@ const appearances = [
|
|
|
19
20
|
...makeGlobalStaticRules("backface", "backface-visibility")
|
|
20
21
|
];
|
|
21
22
|
const cursors = [
|
|
22
|
-
[/^cursor-(.+)$/, ([, c]) => ({ cursor: handler.bracket.cssvar.global(c)
|
|
23
|
+
[/^cursor-(.+)$/, ([, c]) => ({ cursor: handler.bracket.cssvar.global(c) })],
|
|
24
|
+
...cursorValues.map((v) => [`cursor-${v}`, { cursor: v }])
|
|
23
25
|
];
|
|
24
26
|
const pointerEvents = [
|
|
25
27
|
["pointer-events-auto", { "pointer-events": "auto" }],
|
|
@@ -144,6 +146,11 @@ const boxShadows = [
|
|
|
144
146
|
["shadow-inset", { "--un-shadow-inset": "inset" }]
|
|
145
147
|
];
|
|
146
148
|
|
|
149
|
+
const transformValues = [
|
|
150
|
+
"translate",
|
|
151
|
+
"rotate",
|
|
152
|
+
"scale"
|
|
153
|
+
];
|
|
147
154
|
const transformCpu = [
|
|
148
155
|
"translateX(var(--un-translate-x))",
|
|
149
156
|
"translateY(var(--un-translate-y))",
|
|
@@ -208,9 +215,9 @@ const transforms = [
|
|
|
208
215
|
[/^(?:transform-)?translate-([xyz])-(.+)$/, handleTranslate],
|
|
209
216
|
[/^(?:transform-)?rotate-()(.+)$/, handleRotate],
|
|
210
217
|
[/^(?:transform-)?rotate-([xyz])-(.+)$/, handleRotate],
|
|
211
|
-
[/^(?:transform-)?skew-([xy])-(.+)$/, handleSkew],
|
|
218
|
+
[/^(?:transform-)?skew-([xy])-(.+)$/, handleSkew, { autocomplete: ["transform-skew-(x|y)-<percent>"] }],
|
|
212
219
|
[/^(?:transform-)?scale-()(.+)$/, handleScale],
|
|
213
|
-
[/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale],
|
|
220
|
+
[/^(?:transform-)?scale-([xyz])-(.+)$/, handleScale, { autocomplete: [`transform-(${transformValues.join("|")})-<percent>`, `transform-(${transformValues.join("|")})-(x|y|z)-<percent>`] }],
|
|
214
221
|
[/^(?:transform-)?preserve-3d$/, () => ({ "transform-style": "preserve-3d" })],
|
|
215
222
|
[/^(?:transform-)?preserve-flat$/, () => ({ "transform-style": "flat" })],
|
|
216
223
|
["transform", { transform: transformCpu }],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-mini",
|
|
3
|
-
"version": "0.42.
|
|
3
|
+
"version": "0.42.1",
|
|
4
4
|
"description": "The minimal preset for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"*.css"
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@unocss/core": "0.42.
|
|
64
|
+
"@unocss/core": "0.42.1"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "unbuild",
|