@unocss/rule-utils 66.4.1 → 66.5.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.mjs +4 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -408,6 +408,9 @@ const PseudoClasses = Object.fromEntries([
|
|
|
408
408
|
["odd-of-type", ":nth-of-type(odd)"],
|
|
409
409
|
["odd", ":nth-child(odd)"],
|
|
410
410
|
["nth", `:nth-child(${PseudoPlaceholder})`],
|
|
411
|
+
["nth-last", `:nth-last-child(${PseudoPlaceholder})`],
|
|
412
|
+
["nth-last-of-type", `:nth-last-of-type(${PseudoPlaceholder})`],
|
|
413
|
+
["nth-of-type", `:nth-of-type(${PseudoPlaceholder})`],
|
|
411
414
|
"first-of-type",
|
|
412
415
|
["first", ":first-child"],
|
|
413
416
|
"last-of-type",
|
|
@@ -541,7 +544,7 @@ function createPseudoClassesAndElements(utils) {
|
|
|
541
544
|
name: "pseudo",
|
|
542
545
|
match(input, ctx) {
|
|
543
546
|
if (!(PseudoClassesAndElementsRE && PseudoClassesAndElementsColonRE)) {
|
|
544
|
-
PseudoClassesAndElementsRE = new RegExp(`^(${PseudoClassesAndElementsStr})(?:-(\\d+|\\[\\w+\\]))?(?:${ctx.generator.config.separators.join("|")})`);
|
|
547
|
+
PseudoClassesAndElementsRE = new RegExp(`^(${PseudoClassesAndElementsStr})(?:-(\\d+|\\[(\\w|[+-.])+\\]))?(?:${ctx.generator.config.separators.join("|")})`);
|
|
545
548
|
PseudoClassesAndElementsColonRE = new RegExp(`^(${PseudoClassesAndElementsColonStr})(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
|
|
546
549
|
}
|
|
547
550
|
const match = input.match(PseudoClassesAndElementsRE) || input.match(PseudoClassesAndElementsColonRE);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/rule-utils",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "66.
|
|
4
|
+
"version": "66.5.0",
|
|
5
5
|
"description": "Utilities for UnoCSS",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"node": ">=14"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"magic-string": "^0.30.
|
|
37
|
-
"@unocss/core": "^66.
|
|
36
|
+
"magic-string": "^0.30.18",
|
|
37
|
+
"@unocss/core": "^66.5.0"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "unbuild",
|