@unocss/preset-wind 0.38.0 → 0.39.0
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 +22 -9
- package/dist/index.mjs +22 -9
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -10,21 +10,29 @@ const theme$1 = require('@unocss/preset-mini/theme');
|
|
|
10
10
|
const variants$1 = require('@unocss/preset-mini/variants');
|
|
11
11
|
|
|
12
12
|
const animations = [
|
|
13
|
-
[/^(?:animate-)?keyframes-(.+)$/, ([, name], { theme
|
|
13
|
+
[/^(?:animate-)?keyframes-(.+)$/, ([, name], { theme }) => {
|
|
14
14
|
const kf = theme.animation?.keyframes?.[name];
|
|
15
|
-
if (kf)
|
|
16
|
-
return
|
|
17
|
-
${
|
|
15
|
+
if (kf) {
|
|
16
|
+
return [
|
|
17
|
+
`@keyframes ${name}${kf}`,
|
|
18
|
+
{ animation: name }
|
|
19
|
+
];
|
|
20
|
+
}
|
|
18
21
|
}, { autocomplete: ["animate-keyframes-$animation.keyframes", "keyframes-$animation.keyframes"] }],
|
|
19
|
-
[/^animate-(.+)$/, ([, name], { theme
|
|
22
|
+
[/^animate-(.+)$/, ([, name], { theme }) => {
|
|
20
23
|
const kf = theme.animation?.keyframes?.[name];
|
|
21
24
|
if (kf) {
|
|
22
25
|
const duration = theme.animation?.durations?.[name] ?? "1s";
|
|
23
26
|
const timing = theme.animation?.timingFns?.[name] ?? "linear";
|
|
24
|
-
const props = theme.animation?.properties?.[name];
|
|
25
27
|
const count = theme.animation?.counts?.[name] ?? 1;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
const props = theme.animation?.properties?.[name];
|
|
29
|
+
return [
|
|
30
|
+
`@keyframes ${name}${kf}`,
|
|
31
|
+
{
|
|
32
|
+
animation: `${name} ${duration} ${timing} ${count}`,
|
|
33
|
+
...props
|
|
34
|
+
}
|
|
35
|
+
];
|
|
28
36
|
}
|
|
29
37
|
return { animation: utils.handler.bracket.cssvar(name) };
|
|
30
38
|
}, { autocomplete: "animate-$animation.keyframes" }],
|
|
@@ -501,7 +509,12 @@ const objectPositions = [
|
|
|
501
509
|
["object-fill", { "object-fit": "fill" }],
|
|
502
510
|
["object-scale-down", { "object-fit": "scale-down" }],
|
|
503
511
|
["object-none", { "object-fit": "none" }],
|
|
504
|
-
[/^object-(
|
|
512
|
+
[/^object-(.+)$/, ([, d]) => {
|
|
513
|
+
if (utils.positionMap[d])
|
|
514
|
+
return { "object-position": utils.positionMap[d] };
|
|
515
|
+
if (utils.handler.bracketOfPosition(d) != null)
|
|
516
|
+
return { "object-position": utils.handler.bracketOfPosition(d).split(" ").map((e) => utils.handler.position.fraction.auto.px.cssvar(e)).join(" ") };
|
|
517
|
+
}, { autocomplete: `object-(${Object.keys(utils.positionMap).join("|")})` }]
|
|
505
518
|
];
|
|
506
519
|
const backgroundBlendModes = [
|
|
507
520
|
["bg-blend-multiply", { "background-blend-mode": "multiply" }],
|
package/dist/index.mjs
CHANGED
|
@@ -7,21 +7,29 @@ import { theme as theme$1 } from '@unocss/preset-mini/theme';
|
|
|
7
7
|
import { variants as variants$1 } from '@unocss/preset-mini/variants';
|
|
8
8
|
|
|
9
9
|
const animations = [
|
|
10
|
-
[/^(?:animate-)?keyframes-(.+)$/, ([, name], { theme
|
|
10
|
+
[/^(?:animate-)?keyframes-(.+)$/, ([, name], { theme }) => {
|
|
11
11
|
const kf = theme.animation?.keyframes?.[name];
|
|
12
|
-
if (kf)
|
|
13
|
-
return
|
|
14
|
-
${
|
|
12
|
+
if (kf) {
|
|
13
|
+
return [
|
|
14
|
+
`@keyframes ${name}${kf}`,
|
|
15
|
+
{ animation: name }
|
|
16
|
+
];
|
|
17
|
+
}
|
|
15
18
|
}, { autocomplete: ["animate-keyframes-$animation.keyframes", "keyframes-$animation.keyframes"] }],
|
|
16
|
-
[/^animate-(.+)$/, ([, name], { theme
|
|
19
|
+
[/^animate-(.+)$/, ([, name], { theme }) => {
|
|
17
20
|
const kf = theme.animation?.keyframes?.[name];
|
|
18
21
|
if (kf) {
|
|
19
22
|
const duration = theme.animation?.durations?.[name] ?? "1s";
|
|
20
23
|
const timing = theme.animation?.timingFns?.[name] ?? "linear";
|
|
21
|
-
const props = theme.animation?.properties?.[name];
|
|
22
24
|
const count = theme.animation?.counts?.[name] ?? 1;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
const props = theme.animation?.properties?.[name];
|
|
26
|
+
return [
|
|
27
|
+
`@keyframes ${name}${kf}`,
|
|
28
|
+
{
|
|
29
|
+
animation: `${name} ${duration} ${timing} ${count}`,
|
|
30
|
+
...props
|
|
31
|
+
}
|
|
32
|
+
];
|
|
25
33
|
}
|
|
26
34
|
return { animation: handler.bracket.cssvar(name) };
|
|
27
35
|
}, { autocomplete: "animate-$animation.keyframes" }],
|
|
@@ -498,7 +506,12 @@ const objectPositions = [
|
|
|
498
506
|
["object-fill", { "object-fit": "fill" }],
|
|
499
507
|
["object-scale-down", { "object-fit": "scale-down" }],
|
|
500
508
|
["object-none", { "object-fit": "none" }],
|
|
501
|
-
[/^object-(
|
|
509
|
+
[/^object-(.+)$/, ([, d]) => {
|
|
510
|
+
if (positionMap[d])
|
|
511
|
+
return { "object-position": positionMap[d] };
|
|
512
|
+
if (handler.bracketOfPosition(d) != null)
|
|
513
|
+
return { "object-position": handler.bracketOfPosition(d).split(" ").map((e) => handler.position.fraction.auto.px.cssvar(e)).join(" ") };
|
|
514
|
+
}, { autocomplete: `object-(${Object.keys(positionMap).join("|")})` }]
|
|
502
515
|
];
|
|
503
516
|
const backgroundBlendModes = [
|
|
504
517
|
["bg-blend-multiply", { "background-blend-mode": "multiply" }],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-wind",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.39.0",
|
|
4
4
|
"description": "Tailwind / Windi CSS compact preset for UnoCSS",
|
|
5
5
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"*.css"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@unocss/core": "0.
|
|
39
|
-
"@unocss/preset-mini": "0.
|
|
38
|
+
"@unocss/core": "0.39.0",
|
|
39
|
+
"@unocss/preset-mini": "0.39.0"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "unbuild",
|