@unocss/preset-mini 66.1.1 → 66.1.3
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 +2 -2
- package/dist/rules.mjs +1 -1
- package/dist/shared/{preset-mini.CMjvSGZs.mjs → preset-mini.0ybCwWTx.mjs} +2 -2
- package/dist/shared/{preset-mini.C-YrfzXL.mjs → preset-mini.D2M6e9t5.mjs} +12 -13
- package/dist/variants.d.mts +1 -2
- package/dist/variants.d.ts +1 -2
- package/dist/variants.mjs +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -2,8 +2,8 @@ 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 {
|
|
6
|
-
import { r as rules } from './shared/preset-mini.
|
|
5
|
+
import { i as variants } from './shared/preset-mini.D2M6e9t5.mjs';
|
|
6
|
+
import { r as rules } from './shared/preset-mini.0ybCwWTx.mjs';
|
|
7
7
|
import { t as theme } from './shared/preset-mini.BsxsSmTL.mjs';
|
|
8
8
|
export { colors } from './colors.mjs';
|
|
9
9
|
import '@unocss/rule-utils';
|
package/dist/rules.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { s as alignments, a as appearance, E as aspectRatio, e as bgColors, b as borderStyles, c as borders, B as boxSizing, f as colorScheme, g as containerParent, P as cssProperty, O as cssVariables, j as flex, x as flexGridJustifiesAlignments, z as floats, J as fonts, k as gaps, l as grids, h as handlerBorderStyle, y as insets, n as justifies, G as margins, d as opacity, q as orders, o as outline, m as overflows, F as paddings, u as placements, p as positions, C as questionMark, r as rules, D as sizes, H as svgUtilities, K as tabSizes, t as textAligns, i as textDecorations, L as textIndents, N as textShadows, M as textStrokes, I as transitions, v as verticalAligns, w as willChange, A as zIndexes } from './shared/preset-mini.
|
|
1
|
+
export { s as alignments, a as appearance, E as aspectRatio, e as bgColors, b as borderStyles, c as borders, B as boxSizing, f as colorScheme, g as containerParent, P as cssProperty, O as cssVariables, j as flex, x as flexGridJustifiesAlignments, z as floats, J as fonts, k as gaps, l as grids, h as handlerBorderStyle, y as insets, n as justifies, G as margins, d as opacity, q as orders, o as outline, m as overflows, F as paddings, u as placements, p as positions, C as questionMark, r as rules, D as sizes, H as svgUtilities, K as tabSizes, t as textAligns, i as textDecorations, L as textIndents, N as textShadows, M as textStrokes, I as transitions, v as verticalAligns, w as willChange, A as zIndexes } from './shared/preset-mini.0ybCwWTx.mjs';
|
|
2
2
|
export { e as appearances, c as boxShadows, b as boxShadowsBase, k as breaks, g as contains, i as contentVisibility, j as contents, f as cursors, d as displays, q as fieldSizing, o as fontSmoothings, n as fontStyles, p as pointerEvents, h as resizes, r as ringBase, a as rings, l as textOverflows, m as textTransforms, t as textWraps, s as transformBase, x as transforms, u as userSelects, v as varEmpty, w as whitespaces } from './shared/preset-mini.DxJ0TbJb.mjs';
|
|
3
3
|
import './shared/preset-mini.DrfPDgwn.mjs';
|
|
4
4
|
import '@unocss/core';
|
|
@@ -21,8 +21,8 @@ const verticalAlignAlias = {
|
|
|
21
21
|
};
|
|
22
22
|
const verticalAligns = [
|
|
23
23
|
[
|
|
24
|
-
/^(?:vertical|align|v)-(
|
|
25
|
-
([, v]) => ({ "vertical-align": verticalAlignAlias[v] ?? h.numberWithUnit(v) }),
|
|
24
|
+
/^(?:vertical|align|v)-(.+)$/,
|
|
25
|
+
([, v]) => ({ "vertical-align": verticalAlignAlias[v] ?? h.bracket.cssvar.numberWithUnit(v) }),
|
|
26
26
|
{
|
|
27
27
|
autocomplete: [
|
|
28
28
|
`(vertical|align|v)-(${Object.keys(verticalAlignAlias).join("|")})`,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { variantGetParameter, variantMatcher, variantGetBracket, variantParentMatcher, getBracket, hasThemeFn, transformThemeFn, getStringComponent } from '@unocss/rule-utils';
|
|
1
|
+
import { variantGetParameter, calcMaxWidthBySize, variantMatcher, variantGetBracket, variantParentMatcher, getBracket, hasThemeFn, transformThemeFn, getStringComponent } from '@unocss/rule-utils';
|
|
2
2
|
import { a as h, r as resolveBreakpoints, C as CONTROL_MINI_NO_NEGATIVE, e as cssMathFnRE, f as cssVarFnRE } from './preset-mini.DrfPDgwn.mjs';
|
|
3
3
|
import { toArray, escapeRegExp, escapeSelector } from '@unocss/core';
|
|
4
4
|
|
|
@@ -43,15 +43,6 @@ const variantTaggedAriaAttributes = [
|
|
|
43
43
|
taggedAria("previous")
|
|
44
44
|
];
|
|
45
45
|
|
|
46
|
-
function calcMaxWidthBySize(size) {
|
|
47
|
-
const value = size.match(/^-?\d+\.?\d*/)?.[0] || "";
|
|
48
|
-
const unit = size.slice(value.length);
|
|
49
|
-
if (unit === "px") {
|
|
50
|
-
const maxWidth = Number.parseFloat(value) - 0.1;
|
|
51
|
-
return Number.isNaN(maxWidth) ? size : `${maxWidth}${unit}`;
|
|
52
|
-
}
|
|
53
|
-
return `calc(${size} - 0.1px)`;
|
|
54
|
-
}
|
|
55
46
|
const sizePseudo = /(max|min)-\[([^\]]*)\]:/;
|
|
56
47
|
function variantBreakpoints() {
|
|
57
48
|
const regexCache = {};
|
|
@@ -497,6 +488,7 @@ const variantNegative = {
|
|
|
497
488
|
}
|
|
498
489
|
};
|
|
499
490
|
|
|
491
|
+
const PseudoPlaceholder = "__pseudo_placeholder__";
|
|
500
492
|
const PseudoClasses = Object.fromEntries([
|
|
501
493
|
// pseudo elements part 1
|
|
502
494
|
["first-letter", "::first-letter"],
|
|
@@ -541,6 +533,7 @@ const PseudoClasses = Object.fromEntries([
|
|
|
541
533
|
["even", ":nth-child(even)"],
|
|
542
534
|
["odd-of-type", ":nth-of-type(odd)"],
|
|
543
535
|
["odd", ":nth-child(odd)"],
|
|
536
|
+
["nth", `:nth-child(${PseudoPlaceholder})`],
|
|
544
537
|
"first-of-type",
|
|
545
538
|
["first", ":first-child"],
|
|
546
539
|
"last-of-type",
|
|
@@ -672,12 +665,18 @@ function variantPseudoClassesAndElements() {
|
|
|
672
665
|
name: "pseudo",
|
|
673
666
|
match(input, ctx) {
|
|
674
667
|
if (!(PseudoClassesAndElementsRE && PseudoClassesAndElementsColonRE)) {
|
|
675
|
-
PseudoClassesAndElementsRE = new RegExp(`^(${PseudoClassesAndElementsStr})(?:${ctx.generator.config.separators.join("|")})`);
|
|
668
|
+
PseudoClassesAndElementsRE = new RegExp(`^(${PseudoClassesAndElementsStr})(?:-(\\[\\w+\\]))?(?:${ctx.generator.config.separators.join("|")})`);
|
|
676
669
|
PseudoClassesAndElementsColonRE = new RegExp(`^(${PseudoClassesAndElementsColonStr})(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
|
|
677
670
|
}
|
|
678
671
|
const match = input.match(PseudoClassesAndElementsRE) || input.match(PseudoClassesAndElementsColonRE);
|
|
679
672
|
if (match) {
|
|
680
|
-
|
|
673
|
+
let pseudo = PseudoClasses[match[1]] || PseudoClassesColon[match[1]] || `:${match[1]}`;
|
|
674
|
+
if (match[2]) {
|
|
675
|
+
const anPlusB = h.bracket(match[2]);
|
|
676
|
+
if (anPlusB) {
|
|
677
|
+
pseudo = pseudo.replace(PseudoPlaceholder, anPlusB);
|
|
678
|
+
}
|
|
679
|
+
}
|
|
681
680
|
let index = PseudoClassesKeys.indexOf(match[1]);
|
|
682
681
|
if (index === -1)
|
|
683
682
|
index = PseudoClassesColonKeys.indexOf(match[1]);
|
|
@@ -855,4 +854,4 @@ function variants(options) {
|
|
|
855
854
|
];
|
|
856
855
|
}
|
|
857
856
|
|
|
858
|
-
export {
|
|
857
|
+
export { variantSupports as A, variantTaggedAriaAttributes as a, variantBreakpoints as b, variantChildren as c, variantCombinators as d, variantContainerQuery as e, variantColorsMediaOrClass as f, variantDataAttribute as g, variantTaggedDataAttributes as h, variants as i, variantLanguageDirections as j, variantImportant as k, variantPrint as l, variantCustomMedia as m, variantSelector as n, variantCssLayer as o, variantInternalLayer as p, variantScope as q, variantVariables as r, variantTheme as s, variantNegative as t, variantPseudoClassesAndElements as u, variantAria as v, variantPseudoClassFunctions as w, variantTaggedPseudoClasses as x, variantPartClasses as y, variantStartingStyle as z };
|
package/dist/variants.d.mts
CHANGED
|
@@ -9,7 +9,6 @@ import '@unocss/rule-utils';
|
|
|
9
9
|
declare const variantAria: VariantObject;
|
|
10
10
|
declare const variantTaggedAriaAttributes: Variant[];
|
|
11
11
|
|
|
12
|
-
declare function calcMaxWidthBySize(size: string): string;
|
|
13
12
|
declare function variantBreakpoints(): VariantObject;
|
|
14
13
|
|
|
15
14
|
declare const variantChildren: Variant[];
|
|
@@ -50,4 +49,4 @@ declare const variantStartingStyle: Variant;
|
|
|
50
49
|
|
|
51
50
|
declare const variantSupports: VariantObject;
|
|
52
51
|
|
|
53
|
-
export {
|
|
52
|
+
export { variantAria, variantBreakpoints, variantChildren, variantColorsMediaOrClass, variantCombinators, variantContainerQuery, variantCssLayer, variantCustomMedia, variantDataAttribute, variantImportant, variantInternalLayer, variantLanguageDirections, variantNegative, variantPartClasses, variantPrint, variantPseudoClassFunctions, variantPseudoClassesAndElements, variantScope, variantSelector, variantStartingStyle, variantSupports, variantTaggedAriaAttributes, variantTaggedDataAttributes, variantTaggedPseudoClasses, variantTheme, variantVariables, variants };
|
package/dist/variants.d.ts
CHANGED
|
@@ -9,7 +9,6 @@ import '@unocss/rule-utils';
|
|
|
9
9
|
declare const variantAria: VariantObject;
|
|
10
10
|
declare const variantTaggedAriaAttributes: Variant[];
|
|
11
11
|
|
|
12
|
-
declare function calcMaxWidthBySize(size: string): string;
|
|
13
12
|
declare function variantBreakpoints(): VariantObject;
|
|
14
13
|
|
|
15
14
|
declare const variantChildren: Variant[];
|
|
@@ -50,4 +49,4 @@ declare const variantStartingStyle: Variant;
|
|
|
50
49
|
|
|
51
50
|
declare const variantSupports: VariantObject;
|
|
52
51
|
|
|
53
|
-
export {
|
|
52
|
+
export { variantAria, variantBreakpoints, variantChildren, variantColorsMediaOrClass, variantCombinators, variantContainerQuery, variantCssLayer, variantCustomMedia, variantDataAttribute, variantImportant, variantInternalLayer, variantLanguageDirections, variantNegative, variantPartClasses, variantPrint, variantPseudoClassFunctions, variantPseudoClassesAndElements, variantScope, variantSelector, variantStartingStyle, variantSupports, variantTaggedAriaAttributes, variantTaggedDataAttributes, variantTaggedPseudoClasses, variantTheme, variantVariables, variants };
|
package/dist/variants.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { v as variantAria, b as variantBreakpoints, c as variantChildren, f as variantColorsMediaOrClass, d as variantCombinators, e as variantContainerQuery, o as variantCssLayer, m as variantCustomMedia, g as variantDataAttribute, k as variantImportant, p as variantInternalLayer, j as variantLanguageDirections, t as variantNegative, y as variantPartClasses, l as variantPrint, w as variantPseudoClassFunctions, u as variantPseudoClassesAndElements, q as variantScope, n as variantSelector, z as variantStartingStyle, A as variantSupports, a as variantTaggedAriaAttributes, h as variantTaggedDataAttributes, x as variantTaggedPseudoClasses, s as variantTheme, r as variantVariables, i as variants } from './shared/preset-mini.D2M6e9t5.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.3",
|
|
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/
|
|
60
|
-
"@unocss/
|
|
61
|
-
"@unocss/
|
|
59
|
+
"@unocss/rule-utils": "66.1.3",
|
|
60
|
+
"@unocss/core": "66.1.3",
|
|
61
|
+
"@unocss/extractor-arbitrary-variants": "66.1.3"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"build": "unbuild",
|