@unocss/preset-mini 0.16.1 → 0.16.2

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.
@@ -887,7 +887,7 @@ const questionMark = [
887
887
  [
888
888
  /^(where|\?)$/,
889
889
  (_, { constructCSS, generator }) => {
890
- if (generator.config.envMode === "dev")
890
+ if (generator.userConfig.envMode === "dev")
891
891
  return `@keyframes __un_qm{0%{box-shadow:inset 4px 4px #ff1e90, inset -4px -4px #ff1e90}100%{box-shadow:inset 8px 8px #3399ff, inset -8px -8px #3399ff}}
892
892
  ${constructCSS({ animation: "__un_qm 0.5s ease-in-out alternate infinite" })}`;
893
893
  }
@@ -885,7 +885,7 @@ const questionMark = [
885
885
  [
886
886
  /^(where|\?)$/,
887
887
  (_, { constructCSS, generator }) => {
888
- if (generator.config.envMode === "dev")
888
+ if (generator.userConfig.envMode === "dev")
889
889
  return `@keyframes __un_qm{0%{box-shadow:inset 4px 4px #ff1e90, inset -4px -4px #ff1e90}100%{box-shadow:inset 8px 8px #3399ff, inset -8px -8px #3399ff}}
890
890
  ${constructCSS({ animation: "__un_qm 0.5s ease-in-out alternate infinite" })}`;
891
891
  }
@@ -8,20 +8,22 @@ const variantBreakpoints = (matcher, _, theme) => {
8
8
  const variantEntries = Object.entries(theme.breakpoints || {}).map(([point, size], idx) => [point, size, idx]);
9
9
  for (const [point, size, idx] of variantEntries) {
10
10
  if (!regexCache[point])
11
- regexCache[point] = new RegExp(`^((?:[a|l]t-)?${point}[:-])`);
11
+ regexCache[point] = new RegExp(`^((?:[al]t-)?${point}[:-])`);
12
12
  const match = matcher.match(regexCache[point]);
13
13
  if (!match)
14
14
  continue;
15
15
  const [, pre] = match;
16
+ const m = matcher.slice(pre.length);
17
+ if (m === "container")
18
+ continue;
16
19
  let direction = "min";
17
- let order = parseInt(size);
20
+ let order = 1e3;
18
21
  if (pre.startsWith("lt-")) {
19
22
  direction = "max";
20
- order = -order;
23
+ order -= idx + 1;
24
+ } else {
25
+ order += idx + 1;
21
26
  }
22
- const m = matcher.slice(pre.length);
23
- if (m === "container")
24
- continue;
25
27
  if (pre.startsWith("at-") && idx < variantEntries.length - 1) {
26
28
  return {
27
29
  matcher: m,
@@ -6,20 +6,22 @@ const variantBreakpoints = (matcher, _, theme) => {
6
6
  const variantEntries = Object.entries(theme.breakpoints || {}).map(([point, size], idx) => [point, size, idx]);
7
7
  for (const [point, size, idx] of variantEntries) {
8
8
  if (!regexCache[point])
9
- regexCache[point] = new RegExp(`^((?:[a|l]t-)?${point}[:-])`);
9
+ regexCache[point] = new RegExp(`^((?:[al]t-)?${point}[:-])`);
10
10
  const match = matcher.match(regexCache[point]);
11
11
  if (!match)
12
12
  continue;
13
13
  const [, pre] = match;
14
+ const m = matcher.slice(pre.length);
15
+ if (m === "container")
16
+ continue;
14
17
  let direction = "min";
15
- let order = parseInt(size);
18
+ let order = 1e3;
16
19
  if (pre.startsWith("lt-")) {
17
20
  direction = "max";
18
- order = -order;
21
+ order -= idx + 1;
22
+ } else {
23
+ order += idx + 1;
19
24
  }
20
- const m = matcher.slice(pre.length);
21
- if (m === "container")
22
- continue;
23
25
  if (pre.startsWith("at-") && idx < variantEntries.length - 1) {
24
26
  return {
25
27
  matcher: m,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unocss/preset-mini",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
4
4
  "description": "The minimal preset for UnoCSS",
5
5
  "keywords": [
6
6
  "unocss",
@@ -61,7 +61,7 @@
61
61
  "*.css"
62
62
  ],
63
63
  "dependencies": {
64
- "@unocss/core": "0.16.1"
64
+ "@unocss/core": "0.16.2"
65
65
  },
66
66
  "scripts": {
67
67
  "build": "unbuild",