@unocss/preset-wind 0.22.7 → 0.23.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
@@ -25,16 +25,14 @@ ${constructCSS({ animation: `${name}` })}`;
25
25
  return `@keyframes ${name}${kf}
26
26
  ${constructCSS(Object.assign({ animation: `${name} ${duration} ${timing} infinite` }, props))}`;
27
27
  }
28
- return { animate: utils.handler.bracket.cssvar(name) };
28
+ return { animation: utils.handler.bracket.cssvar(name) };
29
29
  }],
30
30
  [/^animate-name-(.+)/, ([, d]) => ({ "animation-name": utils.handler.bracket.cssvar(d) ?? d })],
31
31
  [/^animate-duration-(.+)$/, ([, d]) => ({ "animation-duration": utils.handler.bracket.cssvar.time(d) })],
32
32
  [/^animate-delay-(.+)$/, ([, d]) => ({ "animation-delay": utils.handler.bracket.cssvar.time(d) })],
33
33
  [/^animate-ease(?:-(.+))?$/, ([, d], { theme }) => ({ "animation-timing-function": theme.easing?.[d || "DEFAULT"] ?? utils.handler.bracket.cssvar(d) })],
34
- [/^animate-(?:fill-|mode-|fill-mode-)?(forwards|backwards|both|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-fill-mode": d })],
35
- [/^animate-(?:fill-|mode-|fill-mode-)none$/, () => ({ "animation-fill-mode": "none" })],
36
- [/^animate-(?:direction-)?(reverse|alternate|alternate-reverse|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-direction": d })],
37
- [/^animate-(?:direction-)?normal$/, () => ({ "animation-direction": "normal" })],
34
+ [/^animate-(?:fill-|mode-|fill-mode-)?(none|forwards|backwards|both|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-fill-mode": d })],
35
+ [/^animate-(?:direction-)?(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-direction": d })],
38
36
  [/^animate-(?:iteration-|count-|iteration-count-)(.+)$/, ([, d]) => ({ "animation-iteration-count": utils.handler.bracket.cssvar(d) ?? d.replace(/\-/g, ",") })],
39
37
  [/^animate-(?:play-|state-|play-state-)?(paused|running|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-play-state": d })],
40
38
  ["animate-none", { animation: "none" }]
@@ -267,8 +265,8 @@ const percentWithDefault = (str) => {
267
265
  return v;
268
266
  };
269
267
  const toFilter = (varName, resolver) => ([, b, s], { theme }) => {
270
- const value = resolver(s, theme);
271
- if (value != null && value !== "") {
268
+ const value = resolver(s, theme) ?? (s === "none" ? "0" : "");
269
+ if (value !== "") {
272
270
  if (b) {
273
271
  return [
274
272
  backdropFilterBase,
@@ -340,12 +338,7 @@ const filters = [
340
338
  ["backdrop-filter-none", {
341
339
  "-webkit-backdrop-filter": "none",
342
340
  "backdrop-filter": "none"
343
- }],
344
- [/^(?:filter-)?(blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|saturate|sepia)-none$/, ([, s]) => ({ filter: `${s}(0)` })],
345
- [/^backdrop-(blur|brightness|contrast|grayscale|hue-rotate|invert|opacity|saturate|sepia)-none$/, ([, s]) => ({
346
- "-webkit-backdrop-filter": `${s}(0)`,
347
- "backdrop-filter": `${s}(0)`
348
- })]
341
+ }]
349
342
  ];
350
343
 
351
344
  const spaces = [
package/dist/index.mjs CHANGED
@@ -21,16 +21,14 @@ ${constructCSS({ animation: `${name}` })}`;
21
21
  return `@keyframes ${name}${kf}
22
22
  ${constructCSS(Object.assign({ animation: `${name} ${duration} ${timing} infinite` }, props))}`;
23
23
  }
24
- return { animate: handler.bracket.cssvar(name) };
24
+ return { animation: handler.bracket.cssvar(name) };
25
25
  }],
26
26
  [/^animate-name-(.+)/, ([, d]) => ({ "animation-name": handler.bracket.cssvar(d) ?? d })],
27
27
  [/^animate-duration-(.+)$/, ([, d]) => ({ "animation-duration": handler.bracket.cssvar.time(d) })],
28
28
  [/^animate-delay-(.+)$/, ([, d]) => ({ "animation-delay": handler.bracket.cssvar.time(d) })],
29
29
  [/^animate-ease(?:-(.+))?$/, ([, d], { theme }) => ({ "animation-timing-function": theme.easing?.[d || "DEFAULT"] ?? handler.bracket.cssvar(d) })],
30
- [/^animate-(?:fill-|mode-|fill-mode-)?(forwards|backwards|both|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-fill-mode": d })],
31
- [/^animate-(?:fill-|mode-|fill-mode-)none$/, () => ({ "animation-fill-mode": "none" })],
32
- [/^animate-(?:direction-)?(reverse|alternate|alternate-reverse|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-direction": d })],
33
- [/^animate-(?:direction-)?normal$/, () => ({ "animation-direction": "normal" })],
30
+ [/^animate-(?:fill-|mode-|fill-mode-)?(none|forwards|backwards|both|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-fill-mode": d })],
31
+ [/^animate-(?:direction-)?(normal|reverse|alternate|alternate-reverse|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-direction": d })],
34
32
  [/^animate-(?:iteration-|count-|iteration-count-)(.+)$/, ([, d]) => ({ "animation-iteration-count": handler.bracket.cssvar(d) ?? d.replace(/\-/g, ",") })],
35
33
  [/^animate-(?:play-|state-|play-state-)?(paused|running|inherit|initial|revert|unset)$/, ([, d]) => ({ "animation-play-state": d })],
36
34
  ["animate-none", { animation: "none" }]
@@ -263,8 +261,8 @@ const percentWithDefault = (str) => {
263
261
  return v;
264
262
  };
265
263
  const toFilter = (varName, resolver) => ([, b, s], { theme }) => {
266
- const value = resolver(s, theme);
267
- if (value != null && value !== "") {
264
+ const value = resolver(s, theme) ?? (s === "none" ? "0" : "");
265
+ if (value !== "") {
268
266
  if (b) {
269
267
  return [
270
268
  backdropFilterBase,
@@ -336,12 +334,7 @@ const filters = [
336
334
  ["backdrop-filter-none", {
337
335
  "-webkit-backdrop-filter": "none",
338
336
  "backdrop-filter": "none"
339
- }],
340
- [/^(?:filter-)?(blur|brightness|contrast|drop-shadow|grayscale|hue-rotate|invert|saturate|sepia)-none$/, ([, s]) => ({ filter: `${s}(0)` })],
341
- [/^backdrop-(blur|brightness|contrast|grayscale|hue-rotate|invert|opacity|saturate|sepia)-none$/, ([, s]) => ({
342
- "-webkit-backdrop-filter": `${s}(0)`,
343
- "backdrop-filter": `${s}(0)`
344
- })]
337
+ }]
345
338
  ];
346
339
 
347
340
  const spaces = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-wind",
3
- "version": "0.22.7",
3
+ "version": "0.23.0",
4
4
  "description": "Tailwind / Windi CSS compact preset for UnoCSS",
5
5
  "keywords": [
6
6
  "unocss",
@@ -35,8 +35,8 @@
35
35
  "*.css"
36
36
  ],
37
37
  "dependencies": {
38
- "@unocss/core": "0.22.7",
39
- "@unocss/preset-mini": "0.22.7"
38
+ "@unocss/core": "0.23.0",
39
+ "@unocss/preset-mini": "0.23.0"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "unbuild",