@unocss/preset-wind 0.38.2 → 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 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, constructCSS }) => {
13
+ [/^(?:animate-)?keyframes-(.+)$/, ([, name], { theme }) => {
14
14
  const kf = theme.animation?.keyframes?.[name];
15
- if (kf)
16
- return `@keyframes ${name}${kf}
17
- ${constructCSS({ animation: `${name}` })}`;
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, constructCSS }) => {
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
- return `@keyframes ${name}${kf}
27
- ${constructCSS(Object.assign({ animation: `${name} ${duration} ${timing} ${count}` }, props))}`;
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" }],
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, constructCSS }) => {
10
+ [/^(?:animate-)?keyframes-(.+)$/, ([, name], { theme }) => {
11
11
  const kf = theme.animation?.keyframes?.[name];
12
- if (kf)
13
- return `@keyframes ${name}${kf}
14
- ${constructCSS({ animation: `${name}` })}`;
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, constructCSS }) => {
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
- return `@keyframes ${name}${kf}
24
- ${constructCSS(Object.assign({ animation: `${name} ${duration} ${timing} ${count}` }, props))}`;
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" }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-wind",
3
- "version": "0.38.2",
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.38.2",
39
- "@unocss/preset-mini": "0.38.2"
38
+ "@unocss/core": "0.39.0",
39
+ "@unocss/preset-mini": "0.39.0"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "unbuild",