@unocss/preset-mini 0.31.10 → 0.31.14

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.
@@ -26,8 +26,8 @@ const outline = [
26
26
  [/^outline-(?:color-)?(.+)$/, utilities.colorResolver("outline-color", "outline-color"), { autocomplete: "outline-$colors" }],
27
27
  [/^outline-offset-(.+)$/, ([, d], { theme }) => ({ "outline-offset": theme.lineWidth?.[d] ?? utilities.handler.bracket.cssvar.px(d) }), { autocomplete: "outline-(offset)-<num>" }],
28
28
  ["outline", { "outline-style": "solid" }],
29
- ["outline-none", { "outline": "2px solid transparent", "outline-offset": "2px" }],
30
- ...["auto", "dashed", "dotted", "double", "hidden", "solid", "groove", "ridge", "inset", "outset", "inherit", "initial", "revert", "unset"].map((v) => [`outline-${v}`, { "outline-style": v }])
29
+ ...["auto", "dashed", "dotted", "double", "hidden", "solid", "groove", "ridge", "inset", "outset", "inherit", "initial", "revert", "unset"].map((v) => [`outline-${v}`, { "outline-style": v }]),
30
+ ["outline-none", { "outline": "2px solid transparent", "outline-offset": "2px" }]
31
31
  ];
32
32
  const appearance = [
33
33
  ["appearance-none", {
@@ -73,7 +73,10 @@ const borders = [
73
73
  [/^(?:border-|b-)?(?:rounded|rd)-([bi][se])(?:-(.+))?$/, handlerRounded],
74
74
  [/^(?:border-|b-)?(?:rounded|rd)-([bi][se]-[bi][se])(?:-(.+))?$/, handlerRounded],
75
75
  [/^(?:border|b)-(?:style-)?()(.+)$/, handlerBorderStyle, { autocomplete: ["(border|b)-style", `(border|b)-(${borderStyles.join("|")})`, "(border|b)-<directions>-style", `(border|b)-<directions>-(${borderStyles.join("|")})`, `(border|b)-<directions>-style-(${borderStyles.join("|")})`, `(border|b)-style-(${borderStyles.join("|")})`] }],
76
- [/^(?:border|b)-([rltbsexy])-(?:style-)?(.+)$/, handlerBorderStyle]
76
+ [/^(?:border|b)-([xy])-(?:style-)?(.+)$/, handlerBorderStyle],
77
+ [/^(?:border|b)-([rltbse])-(?:style-)?(.+)$/, handlerBorderStyle],
78
+ [/^(?:border|b)-(block|inline)-(?:style-)?(.+)$/, handlerBorderStyle],
79
+ [/^(?:border|b)-([bi][se])-(?:style-)?(.+)$/, handlerBorderStyle]
77
80
  ];
78
81
  const borderColorResolver = (direction) => ([, body], theme) => {
79
82
  const data = utilities.parseColor(body, theme);
@@ -135,12 +138,8 @@ function handlerRounded([, a = "", s], { theme }) {
135
138
  return utilities.cornerMap[a].map((i) => [`border${i}-radius`, v]);
136
139
  }
137
140
  function handlerBorderStyle([, a = "", s]) {
138
- if (borderStyles.includes(s)) {
139
- if (a in utilities.directionMap)
140
- return utilities.directionMap[a].map((i) => [`border${i}-style`, s]);
141
- else
142
- return [["border-style", s]];
143
- }
141
+ if (borderStyles.includes(s) && a in utilities.directionMap)
142
+ return utilities.directionMap[a].map((i) => [`border${i}-style`, s]);
144
143
  }
145
144
 
146
145
  const opacity = [
@@ -24,8 +24,8 @@ const outline = [
24
24
  [/^outline-(?:color-)?(.+)$/, colorResolver("outline-color", "outline-color"), { autocomplete: "outline-$colors" }],
25
25
  [/^outline-offset-(.+)$/, ([, d], { theme }) => ({ "outline-offset": theme.lineWidth?.[d] ?? handler.bracket.cssvar.px(d) }), { autocomplete: "outline-(offset)-<num>" }],
26
26
  ["outline", { "outline-style": "solid" }],
27
- ["outline-none", { "outline": "2px solid transparent", "outline-offset": "2px" }],
28
- ...["auto", "dashed", "dotted", "double", "hidden", "solid", "groove", "ridge", "inset", "outset", "inherit", "initial", "revert", "unset"].map((v) => [`outline-${v}`, { "outline-style": v }])
27
+ ...["auto", "dashed", "dotted", "double", "hidden", "solid", "groove", "ridge", "inset", "outset", "inherit", "initial", "revert", "unset"].map((v) => [`outline-${v}`, { "outline-style": v }]),
28
+ ["outline-none", { "outline": "2px solid transparent", "outline-offset": "2px" }]
29
29
  ];
30
30
  const appearance = [
31
31
  ["appearance-none", {
@@ -71,7 +71,10 @@ const borders = [
71
71
  [/^(?:border-|b-)?(?:rounded|rd)-([bi][se])(?:-(.+))?$/, handlerRounded],
72
72
  [/^(?:border-|b-)?(?:rounded|rd)-([bi][se]-[bi][se])(?:-(.+))?$/, handlerRounded],
73
73
  [/^(?:border|b)-(?:style-)?()(.+)$/, handlerBorderStyle, { autocomplete: ["(border|b)-style", `(border|b)-(${borderStyles.join("|")})`, "(border|b)-<directions>-style", `(border|b)-<directions>-(${borderStyles.join("|")})`, `(border|b)-<directions>-style-(${borderStyles.join("|")})`, `(border|b)-style-(${borderStyles.join("|")})`] }],
74
- [/^(?:border|b)-([rltbsexy])-(?:style-)?(.+)$/, handlerBorderStyle]
74
+ [/^(?:border|b)-([xy])-(?:style-)?(.+)$/, handlerBorderStyle],
75
+ [/^(?:border|b)-([rltbse])-(?:style-)?(.+)$/, handlerBorderStyle],
76
+ [/^(?:border|b)-(block|inline)-(?:style-)?(.+)$/, handlerBorderStyle],
77
+ [/^(?:border|b)-([bi][se])-(?:style-)?(.+)$/, handlerBorderStyle]
75
78
  ];
76
79
  const borderColorResolver = (direction) => ([, body], theme) => {
77
80
  const data = parseColor(body, theme);
@@ -133,12 +136,8 @@ function handlerRounded([, a = "", s], { theme }) {
133
136
  return cornerMap[a].map((i) => [`border${i}-radius`, v]);
134
137
  }
135
138
  function handlerBorderStyle([, a = "", s]) {
136
- if (borderStyles.includes(s)) {
137
- if (a in directionMap)
138
- return directionMap[a].map((i) => [`border${i}-style`, s]);
139
- else
140
- return [["border-style", s]];
141
- }
139
+ if (borderStyles.includes(s) && a in directionMap)
140
+ return directionMap[a].map((i) => [`border${i}-style`, s]);
142
141
  }
143
142
 
144
143
  const opacity = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-mini",
3
- "version": "0.31.10",
3
+ "version": "0.31.14",
4
4
  "description": "The minimal preset for UnoCSS",
5
5
  "keywords": [
6
6
  "unocss",
@@ -61,7 +61,7 @@
61
61
  ],
62
62
  "sideEffects": false,
63
63
  "dependencies": {
64
- "@unocss/core": "0.31.10"
64
+ "@unocss/core": "0.31.14"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "unbuild",