@unocss/preset-wind 0.35.1 → 0.35.4
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 +24 -15
- package/dist/index.mjs +24 -15
- package/package.json +5 -5
package/dist/index.cjs
CHANGED
|
@@ -32,36 +32,36 @@ ${constructCSS(Object.assign({ animation: `${name} ${duration} ${timing} infinit
|
|
|
32
32
|
[/^animate-delay-(.+)$/, ([, d], { theme }) => ({ "animation-delay": theme.duration?.[d || "DEFAULT"] ?? utils.handler.bracket.cssvar.time(d) }), { autocomplete: ["animate-delay", "animate-delay-$duration"] }],
|
|
33
33
|
[/^animate-ease(?:-(.+))?$/, ([, d], { theme }) => ({ "animation-timing-function": theme.easing?.[d || "DEFAULT"] ?? utils.handler.bracket.cssvar(d) }), { autocomplete: "animate-delay-$easing" }],
|
|
34
34
|
[
|
|
35
|
-
/^animate-(?:fill-|mode-|fill-mode-)?(none|forwards|backwards|both|inherit|initial|revert|unset)$/,
|
|
35
|
+
/^animate-(?:fill-|mode-|fill-mode-)?(none|forwards|backwards|both|inherit|initial|revert|revert-layer|unset)$/,
|
|
36
36
|
([, d]) => ({ "animation-fill-mode": d }),
|
|
37
37
|
{
|
|
38
38
|
autocomplete: [
|
|
39
39
|
"animate-(fill|mode|fill-mode)",
|
|
40
|
-
"animate-(fill|mode|fill-mode)-(none|forwards|backwards|both|inherit|initial|revert|unset)",
|
|
41
|
-
"animate-(none|forwards|backwards|both|inherit|initial|revert|unset)"
|
|
40
|
+
"animate-(fill|mode|fill-mode)-(none|forwards|backwards|both|inherit|initial|revert|revert-layer|unset)",
|
|
41
|
+
"animate-(none|forwards|backwards|both|inherit|initial|revert|revert-layer|unset)"
|
|
42
42
|
]
|
|
43
43
|
}
|
|
44
44
|
],
|
|
45
45
|
[
|
|
46
|
-
/^animate-(?:direction-)?(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|unset)$/,
|
|
46
|
+
/^animate-(?:direction-)?(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|revert-layer|unset)$/,
|
|
47
47
|
([, d]) => ({ "animation-direction": d }),
|
|
48
48
|
{
|
|
49
49
|
autocomplete: [
|
|
50
50
|
"animate-direction",
|
|
51
|
-
"animate-direction-(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|unset)",
|
|
52
|
-
"animate-(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|unset)"
|
|
51
|
+
"animate-direction-(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|revert-layer|unset)",
|
|
52
|
+
"animate-(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|revert-layer|unset)"
|
|
53
53
|
]
|
|
54
54
|
}
|
|
55
55
|
],
|
|
56
56
|
[/^animate-(?:iteration-|count-|iteration-count-)(.+)$/, ([, d]) => ({ "animation-iteration-count": utils.handler.bracket.cssvar(d) ?? d.replace(/\-/g, ",") }), { autocomplete: ["animate-(iteration|count|iteration-count)", "animate-(iteration|count|iteration-count)-<num>"] }],
|
|
57
57
|
[
|
|
58
|
-
/^animate-(?:play-|state-|play-state-)?(paused|running|inherit|initial|revert|unset)$/,
|
|
58
|
+
/^animate-(?:play-|state-|play-state-)?(paused|running|inherit|initial|revert|revert-layer|unset)$/,
|
|
59
59
|
([, d]) => ({ "animation-play-state": d }),
|
|
60
60
|
{
|
|
61
61
|
autocomplete: [
|
|
62
62
|
"animate-(play|state|play-state)",
|
|
63
|
-
"animate-(play|state|play-state)-(paused|running|inherit|initial|revert|unset)",
|
|
64
|
-
"animate-(paused|running|inherit|initial|revert|unset)"
|
|
63
|
+
"animate-(play|state|play-state)-(paused|running|inherit|initial|revert|revert-layer|unset)",
|
|
64
|
+
"animate-(paused|running|inherit|initial|revert|revert-layer|unset)"
|
|
65
65
|
]
|
|
66
66
|
}
|
|
67
67
|
],
|
|
@@ -98,14 +98,17 @@ const bgGradientColorResolver = (mode) => ([, body], { theme }) => {
|
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
|
+
const bgUrlRE = /^\[url\(.+\)\]$/;
|
|
102
|
+
const bgLengthRE = /^\[length:.+\]$/;
|
|
103
|
+
const bgPositionRE = /^\[position:.+\]$/;
|
|
101
104
|
const backgroundStyles = [
|
|
102
|
-
[/^bg-(
|
|
103
|
-
if (
|
|
104
|
-
return { "--un-url":
|
|
105
|
-
|
|
105
|
+
[/^bg-(.+)$/, ([, d]) => {
|
|
106
|
+
if (bgUrlRE.test(d))
|
|
107
|
+
return { "--un-url": utils.handler.bracket(d), "background-image": "var(--un-url)" };
|
|
108
|
+
if (bgLengthRE.test(d) && utils.handler.bracketOfLength(d) != null)
|
|
106
109
|
return { "background-size": utils.handler.bracketOfLength(d).split(" ").map((e) => utils.handler.fraction.auto.px.cssvar(e)).join(" ") };
|
|
107
|
-
|
|
108
|
-
return { "background-position": utils.handler.bracketOfPosition(d).split(" ").map((e) => utils.handler.fraction.auto.px.cssvar(e)).join(" ") };
|
|
110
|
+
if (bgPositionRE.test(d) && utils.handler.bracketOfPosition(d) != null)
|
|
111
|
+
return { "background-position": utils.handler.bracketOfPosition(d).split(" ").map((e) => utils.handler.position.fraction.auto.px.cssvar(e)).join(" ") };
|
|
109
112
|
}],
|
|
110
113
|
[/^bg-gradient-(.+)$/, ([, d]) => ({ "--un-gradient": utils.handler.bracket(d) }), {
|
|
111
114
|
autocomplete: ["bg-gradient", "bg-gradient-(from|to|via)", "bg-gradient-(from|to|via)-$colors", "bg-gradient-(from|to|via)-(op|opacity)", "bg-gradient-(from|to|via)-(op|opacity)-<percent>"]
|
|
@@ -553,6 +556,7 @@ const mixBlendModes = [
|
|
|
553
556
|
["mix-blend-saturation", { "mix-blend-mode": "saturation" }],
|
|
554
557
|
["mix-blend-color", { "mix-blend-mode": "color" }],
|
|
555
558
|
["mix-blend-luminosity", { "mix-blend-mode": "luminosity" }],
|
|
559
|
+
["mix-blend-plus-lighter", { "mix-blend-mode": "plus-lighter" }],
|
|
556
560
|
["mix-blend-normal", { "mix-blend-mode": "normal" }]
|
|
557
561
|
];
|
|
558
562
|
|
|
@@ -1025,6 +1029,10 @@ const variantColorsScheme = [
|
|
|
1025
1029
|
utils.variantParentMatcher("@light", "@media (prefers-color-scheme: light)")
|
|
1026
1030
|
];
|
|
1027
1031
|
|
|
1032
|
+
const variantContrasts = [
|
|
1033
|
+
utils.variantParentMatcher("contrast-more", "@media (prefers-contrast: more)"),
|
|
1034
|
+
utils.variantParentMatcher("contrast-less", "@media (prefers-contrast: less)")
|
|
1035
|
+
];
|
|
1028
1036
|
const variantMotions = [
|
|
1029
1037
|
utils.variantParentMatcher("motion-reduce", "@media (prefers-reduced-motion: reduce)"),
|
|
1030
1038
|
utils.variantParentMatcher("motion-safe", "@media (prefers-reduced-motion: no-preference)")
|
|
@@ -1067,6 +1075,7 @@ const variants = (options) => [
|
|
|
1067
1075
|
placeholderModifier,
|
|
1068
1076
|
variantSpaceAndDivide,
|
|
1069
1077
|
...variants$1.variants(options),
|
|
1078
|
+
...variantContrasts,
|
|
1070
1079
|
...variantOrientations,
|
|
1071
1080
|
...variantMotions,
|
|
1072
1081
|
...variantCombinators,
|
package/dist/index.mjs
CHANGED
|
@@ -28,36 +28,36 @@ ${constructCSS(Object.assign({ animation: `${name} ${duration} ${timing} infinit
|
|
|
28
28
|
[/^animate-delay-(.+)$/, ([, d], { theme }) => ({ "animation-delay": theme.duration?.[d || "DEFAULT"] ?? handler.bracket.cssvar.time(d) }), { autocomplete: ["animate-delay", "animate-delay-$duration"] }],
|
|
29
29
|
[/^animate-ease(?:-(.+))?$/, ([, d], { theme }) => ({ "animation-timing-function": theme.easing?.[d || "DEFAULT"] ?? handler.bracket.cssvar(d) }), { autocomplete: "animate-delay-$easing" }],
|
|
30
30
|
[
|
|
31
|
-
/^animate-(?:fill-|mode-|fill-mode-)?(none|forwards|backwards|both|inherit|initial|revert|unset)$/,
|
|
31
|
+
/^animate-(?:fill-|mode-|fill-mode-)?(none|forwards|backwards|both|inherit|initial|revert|revert-layer|unset)$/,
|
|
32
32
|
([, d]) => ({ "animation-fill-mode": d }),
|
|
33
33
|
{
|
|
34
34
|
autocomplete: [
|
|
35
35
|
"animate-(fill|mode|fill-mode)",
|
|
36
|
-
"animate-(fill|mode|fill-mode)-(none|forwards|backwards|both|inherit|initial|revert|unset)",
|
|
37
|
-
"animate-(none|forwards|backwards|both|inherit|initial|revert|unset)"
|
|
36
|
+
"animate-(fill|mode|fill-mode)-(none|forwards|backwards|both|inherit|initial|revert|revert-layer|unset)",
|
|
37
|
+
"animate-(none|forwards|backwards|both|inherit|initial|revert|revert-layer|unset)"
|
|
38
38
|
]
|
|
39
39
|
}
|
|
40
40
|
],
|
|
41
41
|
[
|
|
42
|
-
/^animate-(?:direction-)?(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|unset)$/,
|
|
42
|
+
/^animate-(?:direction-)?(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|revert-layer|unset)$/,
|
|
43
43
|
([, d]) => ({ "animation-direction": d }),
|
|
44
44
|
{
|
|
45
45
|
autocomplete: [
|
|
46
46
|
"animate-direction",
|
|
47
|
-
"animate-direction-(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|unset)",
|
|
48
|
-
"animate-(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|unset)"
|
|
47
|
+
"animate-direction-(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|revert-layer|unset)",
|
|
48
|
+
"animate-(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|revert-layer|unset)"
|
|
49
49
|
]
|
|
50
50
|
}
|
|
51
51
|
],
|
|
52
52
|
[/^animate-(?:iteration-|count-|iteration-count-)(.+)$/, ([, d]) => ({ "animation-iteration-count": handler.bracket.cssvar(d) ?? d.replace(/\-/g, ",") }), { autocomplete: ["animate-(iteration|count|iteration-count)", "animate-(iteration|count|iteration-count)-<num>"] }],
|
|
53
53
|
[
|
|
54
|
-
/^animate-(?:play-|state-|play-state-)?(paused|running|inherit|initial|revert|unset)$/,
|
|
54
|
+
/^animate-(?:play-|state-|play-state-)?(paused|running|inherit|initial|revert|revert-layer|unset)$/,
|
|
55
55
|
([, d]) => ({ "animation-play-state": d }),
|
|
56
56
|
{
|
|
57
57
|
autocomplete: [
|
|
58
58
|
"animate-(play|state|play-state)",
|
|
59
|
-
"animate-(play|state|play-state)-(paused|running|inherit|initial|revert|unset)",
|
|
60
|
-
"animate-(paused|running|inherit|initial|revert|unset)"
|
|
59
|
+
"animate-(play|state|play-state)-(paused|running|inherit|initial|revert|revert-layer|unset)",
|
|
60
|
+
"animate-(paused|running|inherit|initial|revert|revert-layer|unset)"
|
|
61
61
|
]
|
|
62
62
|
}
|
|
63
63
|
],
|
|
@@ -94,14 +94,17 @@ const bgGradientColorResolver = (mode) => ([, body], { theme }) => {
|
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
};
|
|
97
|
+
const bgUrlRE = /^\[url\(.+\)\]$/;
|
|
98
|
+
const bgLengthRE = /^\[length:.+\]$/;
|
|
99
|
+
const bgPositionRE = /^\[position:.+\]$/;
|
|
97
100
|
const backgroundStyles = [
|
|
98
|
-
[/^bg-(
|
|
99
|
-
if (
|
|
100
|
-
return { "--un-url":
|
|
101
|
-
|
|
101
|
+
[/^bg-(.+)$/, ([, d]) => {
|
|
102
|
+
if (bgUrlRE.test(d))
|
|
103
|
+
return { "--un-url": handler.bracket(d), "background-image": "var(--un-url)" };
|
|
104
|
+
if (bgLengthRE.test(d) && handler.bracketOfLength(d) != null)
|
|
102
105
|
return { "background-size": handler.bracketOfLength(d).split(" ").map((e) => handler.fraction.auto.px.cssvar(e)).join(" ") };
|
|
103
|
-
|
|
104
|
-
return { "background-position": handler.bracketOfPosition(d).split(" ").map((e) => handler.fraction.auto.px.cssvar(e)).join(" ") };
|
|
106
|
+
if (bgPositionRE.test(d) && handler.bracketOfPosition(d) != null)
|
|
107
|
+
return { "background-position": handler.bracketOfPosition(d).split(" ").map((e) => handler.position.fraction.auto.px.cssvar(e)).join(" ") };
|
|
105
108
|
}],
|
|
106
109
|
[/^bg-gradient-(.+)$/, ([, d]) => ({ "--un-gradient": handler.bracket(d) }), {
|
|
107
110
|
autocomplete: ["bg-gradient", "bg-gradient-(from|to|via)", "bg-gradient-(from|to|via)-$colors", "bg-gradient-(from|to|via)-(op|opacity)", "bg-gradient-(from|to|via)-(op|opacity)-<percent>"]
|
|
@@ -549,6 +552,7 @@ const mixBlendModes = [
|
|
|
549
552
|
["mix-blend-saturation", { "mix-blend-mode": "saturation" }],
|
|
550
553
|
["mix-blend-color", { "mix-blend-mode": "color" }],
|
|
551
554
|
["mix-blend-luminosity", { "mix-blend-mode": "luminosity" }],
|
|
555
|
+
["mix-blend-plus-lighter", { "mix-blend-mode": "plus-lighter" }],
|
|
552
556
|
["mix-blend-normal", { "mix-blend-mode": "normal" }]
|
|
553
557
|
];
|
|
554
558
|
|
|
@@ -1021,6 +1025,10 @@ const variantColorsScheme = [
|
|
|
1021
1025
|
variantParentMatcher("@light", "@media (prefers-color-scheme: light)")
|
|
1022
1026
|
];
|
|
1023
1027
|
|
|
1028
|
+
const variantContrasts = [
|
|
1029
|
+
variantParentMatcher("contrast-more", "@media (prefers-contrast: more)"),
|
|
1030
|
+
variantParentMatcher("contrast-less", "@media (prefers-contrast: less)")
|
|
1031
|
+
];
|
|
1024
1032
|
const variantMotions = [
|
|
1025
1033
|
variantParentMatcher("motion-reduce", "@media (prefers-reduced-motion: reduce)"),
|
|
1026
1034
|
variantParentMatcher("motion-safe", "@media (prefers-reduced-motion: no-preference)")
|
|
@@ -1063,6 +1071,7 @@ const variants = (options) => [
|
|
|
1063
1071
|
placeholderModifier,
|
|
1064
1072
|
variantSpaceAndDivide,
|
|
1065
1073
|
...variants$1(options),
|
|
1074
|
+
...variantContrasts,
|
|
1066
1075
|
...variantOrientations,
|
|
1067
1076
|
...variantMotions,
|
|
1068
1077
|
...variantCombinators,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-wind",
|
|
3
|
-
"version": "0.35.
|
|
3
|
+
"version": "0.35.4",
|
|
4
4
|
"description": "Tailwind / Windi CSS compact preset for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
24
|
"types": "./dist/index.d.ts",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
25
|
+
"require": "./dist/index.cjs",
|
|
26
|
+
"import": "./dist/index.mjs"
|
|
27
27
|
},
|
|
28
28
|
"./*": "./*"
|
|
29
29
|
},
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"*.css"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@unocss/core": "0.35.
|
|
39
|
-
"@unocss/preset-mini": "0.35.
|
|
38
|
+
"@unocss/core": "0.35.4",
|
|
39
|
+
"@unocss/preset-mini": "0.35.4"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "unbuild",
|