@unocss/preset-mini 66.1.1 → 66.1.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.
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { entriesToCss, toArray, definePreset } from '@unocss/core';
|
|
|
2
2
|
import { extractorArbitraryVariants } from '@unocss/extractor-arbitrary-variants';
|
|
3
3
|
import { g as globalKeywords } from './shared/preset-mini.DrfPDgwn.mjs';
|
|
4
4
|
export { k as parseColor } from './shared/preset-mini.DrfPDgwn.mjs';
|
|
5
|
-
import { j as variants } from './shared/preset-mini.
|
|
5
|
+
import { j as variants } from './shared/preset-mini.B9RPIxGn.mjs';
|
|
6
6
|
import { r as rules } from './shared/preset-mini.CMjvSGZs.mjs';
|
|
7
7
|
import { t as theme } from './shared/preset-mini.BsxsSmTL.mjs';
|
|
8
8
|
export { colors } from './colors.mjs';
|
|
@@ -497,6 +497,7 @@ const variantNegative = {
|
|
|
497
497
|
}
|
|
498
498
|
};
|
|
499
499
|
|
|
500
|
+
const PseudoPlaceholder = "__pseudo_placeholder__";
|
|
500
501
|
const PseudoClasses = Object.fromEntries([
|
|
501
502
|
// pseudo elements part 1
|
|
502
503
|
["first-letter", "::first-letter"],
|
|
@@ -541,6 +542,7 @@ const PseudoClasses = Object.fromEntries([
|
|
|
541
542
|
["even", ":nth-child(even)"],
|
|
542
543
|
["odd-of-type", ":nth-of-type(odd)"],
|
|
543
544
|
["odd", ":nth-child(odd)"],
|
|
545
|
+
["nth", `:nth-child(${PseudoPlaceholder})`],
|
|
544
546
|
"first-of-type",
|
|
545
547
|
["first", ":first-child"],
|
|
546
548
|
"last-of-type",
|
|
@@ -672,12 +674,18 @@ function variantPseudoClassesAndElements() {
|
|
|
672
674
|
name: "pseudo",
|
|
673
675
|
match(input, ctx) {
|
|
674
676
|
if (!(PseudoClassesAndElementsRE && PseudoClassesAndElementsColonRE)) {
|
|
675
|
-
PseudoClassesAndElementsRE = new RegExp(`^(${PseudoClassesAndElementsStr})(?:${ctx.generator.config.separators.join("|")})`);
|
|
677
|
+
PseudoClassesAndElementsRE = new RegExp(`^(${PseudoClassesAndElementsStr})(?:-(\\[\\w+\\]))?(?:${ctx.generator.config.separators.join("|")})`);
|
|
676
678
|
PseudoClassesAndElementsColonRE = new RegExp(`^(${PseudoClassesAndElementsColonStr})(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
|
|
677
679
|
}
|
|
678
680
|
const match = input.match(PseudoClassesAndElementsRE) || input.match(PseudoClassesAndElementsColonRE);
|
|
679
681
|
if (match) {
|
|
680
|
-
|
|
682
|
+
let pseudo = PseudoClasses[match[1]] || PseudoClassesColon[match[1]] || `:${match[1]}`;
|
|
683
|
+
if (match[2]) {
|
|
684
|
+
const anPlusB = h.bracket(match[2]);
|
|
685
|
+
if (anPlusB) {
|
|
686
|
+
pseudo = pseudo.replace(PseudoPlaceholder, anPlusB);
|
|
687
|
+
}
|
|
688
|
+
}
|
|
681
689
|
let index = PseudoClassesKeys.indexOf(match[1]);
|
|
682
690
|
if (index === -1)
|
|
683
691
|
index = PseudoClassesColonKeys.indexOf(match[1]);
|
package/dist/variants.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { c as calcMaxWidthBySize, v as variantAria, b as variantBreakpoints, d as variantChildren, g as variantColorsMediaOrClass, e as variantCombinators, f as variantContainerQuery, p as variantCssLayer, n as variantCustomMedia, h as variantDataAttribute, l as variantImportant, q as variantInternalLayer, k as variantLanguageDirections, u as variantNegative, z as variantPartClasses, m as variantPrint, x as variantPseudoClassFunctions, w as variantPseudoClassesAndElements, r as variantScope, o as variantSelector, A as variantStartingStyle, B as variantSupports, a as variantTaggedAriaAttributes, i as variantTaggedDataAttributes, y as variantTaggedPseudoClasses, t as variantTheme, s as variantVariables, j as variants } from './shared/preset-mini.
|
|
1
|
+
export { c as calcMaxWidthBySize, v as variantAria, b as variantBreakpoints, d as variantChildren, g as variantColorsMediaOrClass, e as variantCombinators, f as variantContainerQuery, p as variantCssLayer, n as variantCustomMedia, h as variantDataAttribute, l as variantImportant, q as variantInternalLayer, k as variantLanguageDirections, u as variantNegative, z as variantPartClasses, m as variantPrint, x as variantPseudoClassFunctions, w as variantPseudoClassesAndElements, r as variantScope, o as variantSelector, A as variantStartingStyle, B as variantSupports, a as variantTaggedAriaAttributes, i as variantTaggedDataAttributes, y as variantTaggedPseudoClasses, t as variantTheme, s as variantVariables, j as variants } from './shared/preset-mini.B9RPIxGn.mjs';
|
|
2
2
|
import '@unocss/rule-utils';
|
|
3
3
|
import './shared/preset-mini.DrfPDgwn.mjs';
|
|
4
4
|
import '@unocss/core';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-mini",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "66.1.
|
|
4
|
+
"version": "66.1.2",
|
|
5
5
|
"description": "The minimal preset for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -56,9 +56,9 @@
|
|
|
56
56
|
"dist"
|
|
57
57
|
],
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@unocss/core": "66.1.
|
|
60
|
-
"@unocss/
|
|
61
|
-
"@unocss/
|
|
59
|
+
"@unocss/core": "66.1.2",
|
|
60
|
+
"@unocss/rule-utils": "66.1.2",
|
|
61
|
+
"@unocss/extractor-arbitrary-variants": "66.1.2"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "unbuild",
|