@unocss/preset-wind 0.24.2 → 0.25.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/index.cjs CHANGED
@@ -903,9 +903,32 @@ const theme = {
903
903
  "zoom-out-right": { "transform-origin": "right center" },
904
904
  "zoom-out-up": { "transform-origin": "center bottom" }
905
905
  }
906
+ },
907
+ media: {
908
+ portrait: "(orientation: portrait)",
909
+ landscape: "(orientation: landscape)",
910
+ os_dark: "(prefers-color-scheme: dark)",
911
+ os_light: "(prefers-color-scheme: light)",
912
+ motion_ok: "(prefers-reduced-motion: no-preference)",
913
+ motion_not_ok: "(prefers-reduced-motion: reduce)",
914
+ high_contrast: "(prefers-contrast: high)",
915
+ low_contrast: "(prefers-contrast: low)",
916
+ opacity_ok: "(prefers-reduced-transparency: no-preference)",
917
+ opacity_not_ok: "(prefers-reduced-transparency: reduce)",
918
+ useData_ok: "(prefers-reduced-data: no-preference)",
919
+ useData_not_ok: "(prefers-reduced-data: reduce)",
920
+ touch: "(hover: none) and (pointer: coarse)",
921
+ stylus: "(hover: none) and (pointer: fine)",
922
+ pointer: "(hover) and (pointer: coarse)",
923
+ mouse: "(hover) and (pointer: fine)",
924
+ hd_color: "(dynamic-range: high)"
906
925
  }
907
926
  };
908
927
 
928
+ const variantCombinators = [
929
+ utils.variantMatcher("svg", (input) => `${input} svg`)
930
+ ];
931
+
909
932
  const variantColorsScheme = [
910
933
  utils.variantMatcher(".dark", (input) => `.dark $$ ${input}`),
911
934
  utils.variantMatcher(".light", (input) => `.light $$ ${input}`),
@@ -913,6 +936,15 @@ const variantColorsScheme = [
913
936
  utils.variantParentMatcher("@light", "@media (prefers-color-scheme: light)")
914
937
  ];
915
938
 
939
+ const variantMotions = [
940
+ utils.variantParentMatcher("motion-reduce", "@media (prefers-reduced-motion: reduce)"),
941
+ utils.variantParentMatcher("motion-safe", "@media (prefers-reduced-motion: no-preference)")
942
+ ];
943
+ const variantOrientations = [
944
+ utils.variantParentMatcher("landscape", "@media (orientation: landscape)"),
945
+ utils.variantParentMatcher("portrait", "@media (orientation: portrait)")
946
+ ];
947
+
916
948
  const variantSpaceAndDivide = (matcher) => {
917
949
  if (/^space-?([xy])-?(-?.+)$/.test(matcher) || /^divide-/.test(matcher)) {
918
950
  return {
@@ -949,6 +981,9 @@ const variants = (options) => [
949
981
  placeholderModifier,
950
982
  variantSpaceAndDivide,
951
983
  ...variants$1.variants(options),
984
+ ...variantOrientations,
985
+ ...variantMotions,
986
+ ...variantCombinators,
952
987
  ...variantColorsScheme
953
988
  ];
954
989
 
package/dist/index.mjs CHANGED
@@ -899,9 +899,32 @@ const theme = {
899
899
  "zoom-out-right": { "transform-origin": "right center" },
900
900
  "zoom-out-up": { "transform-origin": "center bottom" }
901
901
  }
902
+ },
903
+ media: {
904
+ portrait: "(orientation: portrait)",
905
+ landscape: "(orientation: landscape)",
906
+ os_dark: "(prefers-color-scheme: dark)",
907
+ os_light: "(prefers-color-scheme: light)",
908
+ motion_ok: "(prefers-reduced-motion: no-preference)",
909
+ motion_not_ok: "(prefers-reduced-motion: reduce)",
910
+ high_contrast: "(prefers-contrast: high)",
911
+ low_contrast: "(prefers-contrast: low)",
912
+ opacity_ok: "(prefers-reduced-transparency: no-preference)",
913
+ opacity_not_ok: "(prefers-reduced-transparency: reduce)",
914
+ useData_ok: "(prefers-reduced-data: no-preference)",
915
+ useData_not_ok: "(prefers-reduced-data: reduce)",
916
+ touch: "(hover: none) and (pointer: coarse)",
917
+ stylus: "(hover: none) and (pointer: fine)",
918
+ pointer: "(hover) and (pointer: coarse)",
919
+ mouse: "(hover) and (pointer: fine)",
920
+ hd_color: "(dynamic-range: high)"
902
921
  }
903
922
  };
904
923
 
924
+ const variantCombinators = [
925
+ variantMatcher("svg", (input) => `${input} svg`)
926
+ ];
927
+
905
928
  const variantColorsScheme = [
906
929
  variantMatcher(".dark", (input) => `.dark $$ ${input}`),
907
930
  variantMatcher(".light", (input) => `.light $$ ${input}`),
@@ -909,6 +932,15 @@ const variantColorsScheme = [
909
932
  variantParentMatcher("@light", "@media (prefers-color-scheme: light)")
910
933
  ];
911
934
 
935
+ const variantMotions = [
936
+ variantParentMatcher("motion-reduce", "@media (prefers-reduced-motion: reduce)"),
937
+ variantParentMatcher("motion-safe", "@media (prefers-reduced-motion: no-preference)")
938
+ ];
939
+ const variantOrientations = [
940
+ variantParentMatcher("landscape", "@media (orientation: landscape)"),
941
+ variantParentMatcher("portrait", "@media (orientation: portrait)")
942
+ ];
943
+
912
944
  const variantSpaceAndDivide = (matcher) => {
913
945
  if (/^space-?([xy])-?(-?.+)$/.test(matcher) || /^divide-/.test(matcher)) {
914
946
  return {
@@ -945,6 +977,9 @@ const variants = (options) => [
945
977
  placeholderModifier,
946
978
  variantSpaceAndDivide,
947
979
  ...variants$1(options),
980
+ ...variantOrientations,
981
+ ...variantMotions,
982
+ ...variantCombinators,
948
983
  ...variantColorsScheme
949
984
  ];
950
985
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-wind",
3
- "version": "0.24.2",
3
+ "version": "0.25.1",
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.24.2",
39
- "@unocss/preset-mini": "0.24.2"
38
+ "@unocss/core": "0.25.1",
39
+ "@unocss/preset-mini": "0.25.1"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "unbuild",