@unocss/preset-uno 0.12.15 → 0.12.16
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.
|
@@ -5,9 +5,10 @@ import {
|
|
|
5
5
|
// src/variants/breakpoints.ts
|
|
6
6
|
var regexCache = {};
|
|
7
7
|
var variantBreakpoints = (matcher, _, theme) => {
|
|
8
|
-
|
|
8
|
+
const variantEntries = Object.entries(theme.breakpoints || {}).map(([point, size], idx) => [point, size, idx]);
|
|
9
|
+
for (const [point, size, idx] of variantEntries) {
|
|
9
10
|
if (!regexCache[point])
|
|
10
|
-
regexCache[point] = new RegExp(`^((?:
|
|
11
|
+
regexCache[point] = new RegExp(`^((?:[a|l]t-)?${point}[:-])`);
|
|
11
12
|
const match = matcher.match(regexCache[point]);
|
|
12
13
|
if (!match)
|
|
13
14
|
continue;
|
|
@@ -21,6 +22,12 @@ var variantBreakpoints = (matcher, _, theme) => {
|
|
|
21
22
|
const m = matcher.slice(pre.length);
|
|
22
23
|
if (m === "container")
|
|
23
24
|
continue;
|
|
25
|
+
if (pre.startsWith("at-") && idx < variantEntries.length - 1) {
|
|
26
|
+
return {
|
|
27
|
+
matcher: m,
|
|
28
|
+
parent: [`@media (min-width: ${size}) and (max-width: ${variantEntries[idx + 1][1]})`, order]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
24
31
|
return {
|
|
25
32
|
matcher: m,
|
|
26
33
|
parent: [`@media (${direction}-width: ${size})`, order]
|
|
@@ -5,9 +5,10 @@ var _chunkLPZDYB4Jjs = require('./chunk-LPZDYB4J.js');
|
|
|
5
5
|
// src/variants/breakpoints.ts
|
|
6
6
|
var regexCache = {};
|
|
7
7
|
var variantBreakpoints = (matcher, _, theme) => {
|
|
8
|
-
|
|
8
|
+
const variantEntries = Object.entries(theme.breakpoints || {}).map(([point, size], idx) => [point, size, idx]);
|
|
9
|
+
for (const [point, size, idx] of variantEntries) {
|
|
9
10
|
if (!regexCache[point])
|
|
10
|
-
regexCache[point] = new RegExp(`^((?:
|
|
11
|
+
regexCache[point] = new RegExp(`^((?:[a|l]t-)?${point}[:-])`);
|
|
11
12
|
const match = matcher.match(regexCache[point]);
|
|
12
13
|
if (!match)
|
|
13
14
|
continue;
|
|
@@ -21,6 +22,12 @@ var variantBreakpoints = (matcher, _, theme) => {
|
|
|
21
22
|
const m = matcher.slice(pre.length);
|
|
22
23
|
if (m === "container")
|
|
23
24
|
continue;
|
|
25
|
+
if (pre.startsWith("at-") && idx < variantEntries.length - 1) {
|
|
26
|
+
return {
|
|
27
|
+
matcher: m,
|
|
28
|
+
parent: [`@media (min-width: ${size}) and (max-width: ${variantEntries[idx + 1][1]})`, order]
|
|
29
|
+
};
|
|
30
|
+
}
|
|
24
31
|
return {
|
|
25
32
|
matcher: m,
|
|
26
33
|
parent: [`@media (${direction}-width: ${size})`, order]
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var _chunk7O4GGKN3js = require('./chunk-7O4GGKN3.js');
|
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
var
|
|
15
|
+
var _chunkZSTIMFUCjs = require('./chunk-ZSTIMFUC.js');
|
|
16
16
|
require('./chunk-LPZDYB4J.js');
|
|
17
17
|
require('./chunk-Y6EUTGDC.js');
|
|
18
18
|
|
|
@@ -22,12 +22,13 @@ var preset = (options = {}) => ({
|
|
|
22
22
|
theme: _chunkBOWXQI3Bjs.theme,
|
|
23
23
|
rules: _chunkGBKIE2NKjs.rules,
|
|
24
24
|
variants: [
|
|
25
|
-
...
|
|
26
|
-
...options.dark === "media" ?
|
|
25
|
+
..._chunkZSTIMFUCjs.variants,
|
|
26
|
+
...options.dark === "media" ? _chunkZSTIMFUCjs.variantColorsMedia : _chunkZSTIMFUCjs.variantColorsClass
|
|
27
27
|
],
|
|
28
28
|
shortcuts: [
|
|
29
29
|
..._chunkGBKIE2NKjs.containerShortcuts
|
|
30
|
-
]
|
|
30
|
+
],
|
|
31
|
+
options
|
|
31
32
|
});
|
|
32
33
|
var src_default = preset;
|
|
33
34
|
|
package/dist/index.mjs
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
variantColorsClass,
|
|
13
13
|
variantColorsMedia,
|
|
14
14
|
variants
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-EE3IQZ3A.mjs";
|
|
16
16
|
import "./chunk-O7YRGPXQ.mjs";
|
|
17
17
|
import "./chunk-5SH5BFJ4.mjs";
|
|
18
18
|
|
|
@@ -27,7 +27,8 @@ var preset = (options = {}) => ({
|
|
|
27
27
|
],
|
|
28
28
|
shortcuts: [
|
|
29
29
|
...containerShortcuts
|
|
30
|
-
]
|
|
30
|
+
],
|
|
31
|
+
options
|
|
31
32
|
});
|
|
32
33
|
var src_default = preset;
|
|
33
34
|
export {
|
package/dist/variants.js
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkZSTIMFUCjs = require('./chunk-ZSTIMFUC.js');
|
|
14
14
|
require('./chunk-LPZDYB4J.js');
|
|
15
15
|
require('./chunk-Y6EUTGDC.js');
|
|
16
16
|
|
|
@@ -25,4 +25,4 @@ require('./chunk-Y6EUTGDC.js');
|
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
|
|
28
|
-
exports.PseudoClasses =
|
|
28
|
+
exports.PseudoClasses = _chunkZSTIMFUCjs.PseudoClasses; exports.variantBreakpoints = _chunkZSTIMFUCjs.variantBreakpoints; exports.variantChildren = _chunkZSTIMFUCjs.variantChildren; exports.variantColorsClass = _chunkZSTIMFUCjs.variantColorsClass; exports.variantColorsMedia = _chunkZSTIMFUCjs.variantColorsMedia; exports.variantImportant = _chunkZSTIMFUCjs.variantImportant; exports.variantNegative = _chunkZSTIMFUCjs.variantNegative; exports.variantPseudoClasses = _chunkZSTIMFUCjs.variantPseudoClasses; exports.variantPseudoElements = _chunkZSTIMFUCjs.variantPseudoElements; exports.variantSpace = _chunkZSTIMFUCjs.variantSpace; exports.variants = _chunkZSTIMFUCjs.variants;
|
package/dist/variants.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-uno",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.16",
|
|
4
4
|
"description": "The default preset for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"*.css"
|
|
61
61
|
],
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@unocss/core": "0.12.
|
|
63
|
+
"@unocss/core": "0.12.16"
|
|
64
64
|
},
|
|
65
65
|
"scripts": {
|
|
66
66
|
"build": "tsup",
|