@unocss/preset-mini 66.1.0 → 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,12 +2,12 @@ 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.C-YrfzXL.mjs';
6
- import { r as rules } from './shared/preset-mini.DD6O2PIA.mjs';
7
- import { t as theme } from './shared/preset-mini.DSyW8MIa.mjs';
5
+ import { j as variants } from './shared/preset-mini.B9RPIxGn.mjs';
6
+ import { r as rules } from './shared/preset-mini.CMjvSGZs.mjs';
7
+ import { t as theme } from './shared/preset-mini.BsxsSmTL.mjs';
8
8
  export { colors } from './colors.mjs';
9
9
  import '@unocss/rule-utils';
10
- import './shared/preset-mini.S_lRiJh3.mjs';
10
+ import './shared/preset-mini.DxJ0TbJb.mjs';
11
11
 
12
12
  function preflights(options) {
13
13
  if (options.preflight) {
package/dist/rules.d.mts CHANGED
@@ -96,6 +96,7 @@ declare const textOverflows: Rule[];
96
96
  declare const textTransforms: Rule[];
97
97
  declare const fontStyles: Rule[];
98
98
  declare const fontSmoothings: Rule[];
99
+ declare const fieldSizing: Rule[];
99
100
 
100
101
  declare const svgUtilities: Rule<Theme>[];
101
102
 
@@ -126,4 +127,4 @@ declare const textShadows: Rule<Theme>[];
126
127
  declare const cssVariables: Rule[];
127
128
  declare const cssProperty: Rule[];
128
129
 
129
- export { alignments, appearance, appearances, aspectRatio, bgColors, borderStyles, borders, boxShadows, boxShadowsBase, boxSizing, breaks, colorScheme, containerParent, contains, contentVisibility, contents, cssProperty, cssVariables, cursors, displays, flex, flexGridJustifiesAlignments, floats, fontSmoothings, fontStyles, fonts, gaps, grids, handlerBorderStyle, insets, justifies, margins, opacity, orders, outline, overflows, paddings, placements, pointerEvents, positions, questionMark, resizes, ringBase, rings, rules, sizes, svgUtilities, tabSizes, textAligns, textDecorations, textIndents, textOverflows, textShadows, textStrokes, textTransforms, textWraps, transformBase, transforms, transitions, userSelects, varEmpty, verticalAligns, whitespaces, willChange, zIndexes };
130
+ export { alignments, appearance, appearances, aspectRatio, bgColors, borderStyles, borders, boxShadows, boxShadowsBase, boxSizing, breaks, colorScheme, containerParent, contains, contentVisibility, contents, cssProperty, cssVariables, cursors, displays, fieldSizing, flex, flexGridJustifiesAlignments, floats, fontSmoothings, fontStyles, fonts, gaps, grids, handlerBorderStyle, insets, justifies, margins, opacity, orders, outline, overflows, paddings, placements, pointerEvents, positions, questionMark, resizes, ringBase, rings, rules, sizes, svgUtilities, tabSizes, textAligns, textDecorations, textIndents, textOverflows, textShadows, textStrokes, textTransforms, textWraps, transformBase, transforms, transitions, userSelects, varEmpty, verticalAligns, whitespaces, willChange, zIndexes };
package/dist/rules.d.ts CHANGED
@@ -96,6 +96,7 @@ declare const textOverflows: Rule[];
96
96
  declare const textTransforms: Rule[];
97
97
  declare const fontStyles: Rule[];
98
98
  declare const fontSmoothings: Rule[];
99
+ declare const fieldSizing: Rule[];
99
100
 
100
101
  declare const svgUtilities: Rule<Theme>[];
101
102
 
@@ -126,4 +127,4 @@ declare const textShadows: Rule<Theme>[];
126
127
  declare const cssVariables: Rule[];
127
128
  declare const cssProperty: Rule[];
128
129
 
129
- export { alignments, appearance, appearances, aspectRatio, bgColors, borderStyles, borders, boxShadows, boxShadowsBase, boxSizing, breaks, colorScheme, containerParent, contains, contentVisibility, contents, cssProperty, cssVariables, cursors, displays, flex, flexGridJustifiesAlignments, floats, fontSmoothings, fontStyles, fonts, gaps, grids, handlerBorderStyle, insets, justifies, margins, opacity, orders, outline, overflows, paddings, placements, pointerEvents, positions, questionMark, resizes, ringBase, rings, rules, sizes, svgUtilities, tabSizes, textAligns, textDecorations, textIndents, textOverflows, textShadows, textStrokes, textTransforms, textWraps, transformBase, transforms, transitions, userSelects, varEmpty, verticalAligns, whitespaces, willChange, zIndexes };
130
+ export { alignments, appearance, appearances, aspectRatio, bgColors, borderStyles, borders, boxShadows, boxShadowsBase, boxSizing, breaks, colorScheme, containerParent, contains, contentVisibility, contents, cssProperty, cssVariables, cursors, displays, fieldSizing, flex, flexGridJustifiesAlignments, floats, fontSmoothings, fontStyles, fonts, gaps, grids, handlerBorderStyle, insets, justifies, margins, opacity, orders, outline, overflows, paddings, placements, pointerEvents, positions, questionMark, resizes, ringBase, rings, rules, sizes, svgUtilities, tabSizes, textAligns, textDecorations, textIndents, textOverflows, textShadows, textStrokes, textTransforms, textWraps, transformBase, transforms, transitions, userSelects, varEmpty, verticalAligns, whitespaces, willChange, zIndexes };
package/dist/rules.mjs CHANGED
@@ -1,5 +1,5 @@
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.DD6O2PIA.mjs';
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, 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, q as transformBase, s as transforms, u as userSelects, v as varEmpty, w as whitespaces } from './shared/preset-mini.S_lRiJh3.mjs';
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.CMjvSGZs.mjs';
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';
5
5
  import '@unocss/rule-utils';
@@ -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
- const pseudo = PseudoClasses[match[1]] || PseudoClassesColon[match[1]] || `:${match[1]}`;
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]);
@@ -1,5 +1,5 @@
1
1
  import { colors } from '../colors.mjs';
2
- import { r as ringBase, b as boxShadowsBase, q as transformBase } from './preset-mini.S_lRiJh3.mjs';
2
+ import { r as ringBase, b as boxShadowsBase, s as transformBase } from './preset-mini.DxJ0TbJb.mjs';
3
3
 
4
4
  const blur = {
5
5
  "DEFAULT": "8px",
@@ -1,6 +1,6 @@
1
1
  import { g as globalKeywords, a as h, t as isCSSMathFn, l as colorResolver, d as directionMap, n as hasParseableColor, c as cornerMap, k as parseColor, u as isSize, q as makeGlobalStaticRules, i as insetMap, r as resolveBreakpoints, j as directionSize, s as splitShorthand, m as colorableShadows } from './preset-mini.DrfPDgwn.mjs';
2
2
  import { colorToString, colorOpacityToString } from '@unocss/rule-utils';
3
- import { g as contains, p as pointerEvents, e as appearances, d as displays, s as transforms, f as cursors, u as userSelects, h as resizes, l as textOverflows, w as whitespaces, k as breaks, t as textWraps, m as textTransforms, n as fontStyles, o as fontSmoothings, c as boxShadows, a as rings, i as contentVisibility, j as contents } from './preset-mini.S_lRiJh3.mjs';
3
+ import { g as contains, p as pointerEvents, e as appearances, d as displays, x as transforms, f as cursors, u as userSelects, h as resizes, l as textOverflows, w as whitespaces, k as breaks, t as textWraps, m as textTransforms, n as fontStyles, o as fontSmoothings, c as boxShadows, a as rings, i as contentVisibility, j as contents, q as fieldSizing } from './preset-mini.DxJ0TbJb.mjs';
4
4
  import { toArray } from '@unocss/core';
5
5
 
6
6
  const verticalAlignAlias = {
@@ -929,7 +929,7 @@ const cssProperty = [
929
929
  return;
930
930
  const [prop, ...rest] = body.split(":");
931
931
  const value = rest.join(":");
932
- if (!isURI(body) && /^[a-z-]+$/.test(prop) && isValidCSSBody(value)) {
932
+ if (!isURI(body) && /^[a-z-_]+$/i.test(prop) && isValidCSSBody(value)) {
933
933
  const parsed = h.bracket(`[${value}]`);
934
934
  if (parsed)
935
935
  return { [prop]: parsed };
@@ -1029,6 +1029,7 @@ const rules = [
1029
1029
  contentVisibility,
1030
1030
  contents,
1031
1031
  containerParent,
1032
+ fieldSizing,
1032
1033
  // should be the last
1033
1034
  questionMark
1034
1035
  ].flat(1);
@@ -118,6 +118,10 @@ const fontSmoothings = [
118
118
  "-moz-osx-font-smoothing": "auto"
119
119
  }]
120
120
  ];
121
+ const fieldSizing = [
122
+ ["field-sizing-fixed", { "field-sizing": "fixed" }],
123
+ ["field-sizing-content", { "field-sizing": "content" }]
124
+ ];
121
125
 
122
126
  const ringBase = {
123
127
  "--un-ring-inset": varEmpty,
@@ -348,4 +352,4 @@ function handleSkew([, d, b]) {
348
352
  }
349
353
  }
350
354
 
351
- export { rings as a, boxShadowsBase as b, boxShadows as c, displays as d, appearances as e, cursors as f, contains as g, resizes as h, contentVisibility as i, contents as j, breaks as k, textOverflows as l, textTransforms as m, fontStyles as n, fontSmoothings as o, pointerEvents as p, transformBase as q, ringBase as r, transforms as s, textWraps as t, userSelects as u, varEmpty as v, whitespaces as w };
355
+ export { rings as a, boxShadowsBase as b, boxShadows as c, displays as d, appearances as e, cursors as f, contains as g, resizes as h, contentVisibility as i, contents as j, breaks as k, textOverflows as l, textTransforms as m, fontStyles as n, fontSmoothings as o, pointerEvents as p, fieldSizing as q, ringBase as r, transformBase as s, textWraps as t, userSelects as u, varEmpty as v, whitespaces as w, transforms as x };
package/dist/theme.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  export { colors } from './colors.mjs';
2
- export { u as baseSize, A as blockSize, b as blur, n as borderRadius, o as boxShadow, j as breakpoints, G as containers, d as dropShadow, m as duration, f as fontFamily, a as fontSize, i as fontWeight, C as height, B as inlineSize, h as letterSpacing, l as lineHeight, k as lineWidth, E as maxBlockSize, D as maxHeight, F as maxInlineSize, y as maxWidth, p as media, q as preflightBase, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, x as width, w as wordSpacing, z as zIndex } from './shared/preset-mini.DSyW8MIa.mjs';
3
- import './shared/preset-mini.S_lRiJh3.mjs';
2
+ export { u as baseSize, A as blockSize, b as blur, n as borderRadius, o as boxShadow, j as breakpoints, G as containers, d as dropShadow, m as duration, f as fontFamily, a as fontSize, i as fontWeight, C as height, B as inlineSize, h as letterSpacing, l as lineHeight, k as lineWidth, E as maxBlockSize, D as maxHeight, F as maxInlineSize, y as maxWidth, p as media, q as preflightBase, r as ringWidth, s as spacing, c as textIndent, g as textShadow, e as textStrokeWidth, t as theme, v as verticalBreakpoints, x as width, w as wordSpacing, z as zIndex } from './shared/preset-mini.BsxsSmTL.mjs';
3
+ import './shared/preset-mini.DxJ0TbJb.mjs';
4
4
  import './shared/preset-mini.DrfPDgwn.mjs';
5
5
  import '@unocss/core';
6
6
  import '@unocss/rule-utils';
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.C-YrfzXL.mjs';
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.0",
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/extractor-arbitrary-variants": "66.1.0",
60
- "@unocss/core": "66.1.0",
61
- "@unocss/rule-utils": "66.1.0"
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",