@unocss/preset-wind 0.24.4 → 0.25.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
@@ -903,6 +903,25 @@ 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
 
@@ -917,6 +936,15 @@ const variantColorsScheme = [
917
936
  utils.variantParentMatcher("@light", "@media (prefers-color-scheme: light)")
918
937
  ];
919
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
+
920
948
  const variantSpaceAndDivide = (matcher) => {
921
949
  if (/^space-?([xy])-?(-?.+)$/.test(matcher) || /^divide-/.test(matcher)) {
922
950
  return {
@@ -953,6 +981,8 @@ const variants = (options) => [
953
981
  placeholderModifier,
954
982
  variantSpaceAndDivide,
955
983
  ...variants$1.variants(options),
984
+ ...variantOrientations,
985
+ ...variantMotions,
956
986
  ...variantCombinators,
957
987
  ...variantColorsScheme
958
988
  ];
package/dist/index.mjs CHANGED
@@ -899,6 +899,25 @@ 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
 
@@ -913,6 +932,15 @@ const variantColorsScheme = [
913
932
  variantParentMatcher("@light", "@media (prefers-color-scheme: light)")
914
933
  ];
915
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
+
916
944
  const variantSpaceAndDivide = (matcher) => {
917
945
  if (/^space-?([xy])-?(-?.+)$/.test(matcher) || /^divide-/.test(matcher)) {
918
946
  return {
@@ -949,6 +977,8 @@ const variants = (options) => [
949
977
  placeholderModifier,
950
978
  variantSpaceAndDivide,
951
979
  ...variants$1(options),
980
+ ...variantOrientations,
981
+ ...variantMotions,
952
982
  ...variantCombinators,
953
983
  ...variantColorsScheme
954
984
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-wind",
3
- "version": "0.24.4",
3
+ "version": "0.25.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.24.4",
39
- "@unocss/preset-mini": "0.24.4"
38
+ "@unocss/core": "0.25.0",
39
+ "@unocss/preset-mini": "0.25.0"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "unbuild",