@unocss/preset-mini 0.64.0 → 0.65.0-beta.1

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/colors.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as Colors } from './shared/preset-mini.Cde3ndkA.mjs';
1
+ import { C as Colors } from './shared/preset-mini.BjJC-NnU.mjs';
2
2
  import '@unocss/core';
3
3
 
4
4
  declare const colors: {
package/dist/colors.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { C as Colors } from './shared/preset-mini.Cde3ndkA.js';
1
+ import { C as Colors } from './shared/preset-mini.BjJC-NnU.js';
2
2
  import '@unocss/core';
3
3
 
4
4
  declare const colors: {
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as _unocss_core from '@unocss/core';
2
2
  import { Preflight, PresetOptions, Postprocessor } from '@unocss/core';
3
- import { T as Theme } from './shared/preset-mini.Cde3ndkA.mjs';
4
- export { a as ThemeAnimation } from './shared/preset-mini.Cde3ndkA.mjs';
3
+ import { T as Theme } from './shared/preset-mini.BjJC-NnU.mjs';
4
+ export { a as ThemeAnimation } from './shared/preset-mini.BjJC-NnU.mjs';
5
5
  export { colors } from './colors.mjs';
6
- export { t as theme } from './shared/preset-mini.CQNs5PKm.mjs';
7
- export { p as parseColor } from './shared/preset-mini.XtClvIKE.mjs';
6
+ export { t as theme } from './shared/preset-mini.BSnAbT9I.mjs';
7
+ export { p as parseColor } from './shared/preset-mini.oF7XTPi1.mjs';
8
8
  import '@unocss/rule-utils';
9
9
 
10
10
  declare const preflights: Preflight<Theme>[];
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as _unocss_core from '@unocss/core';
2
2
  import { Preflight, PresetOptions, Postprocessor } from '@unocss/core';
3
- import { T as Theme } from './shared/preset-mini.Cde3ndkA.js';
4
- export { a as ThemeAnimation } from './shared/preset-mini.Cde3ndkA.js';
3
+ import { T as Theme } from './shared/preset-mini.BjJC-NnU.js';
4
+ export { a as ThemeAnimation } from './shared/preset-mini.BjJC-NnU.js';
5
5
  export { colors } from './colors.js';
6
- export { t as theme } from './shared/preset-mini.DiXszE9_.js';
7
- export { p as parseColor } from './shared/preset-mini.DChc_8j2.js';
6
+ export { t as theme } from './shared/preset-mini.CoOfBKs_.js';
7
+ export { p as parseColor } from './shared/preset-mini.CRliz1QB.js';
8
8
  import '@unocss/rule-utils';
9
9
 
10
10
  declare const preflights: Preflight<Theme>[];
package/dist/index.mjs CHANGED
@@ -4,7 +4,7 @@ import { g as globalKeywords } from './shared/preset-mini.Cay6Ue29.mjs';
4
4
  export { k as parseColor } from './shared/preset-mini.Cay6Ue29.mjs';
5
5
  import { t as theme } from './shared/preset-mini.mgoK7_fk.mjs';
6
6
  import { r as rules } from './shared/preset-mini.K1rIaInm.mjs';
7
- import { j as variants } from './shared/preset-mini.C46mpC2z.mjs';
7
+ import { j as variants } from './shared/preset-mini.CDgj-fgp.mjs';
8
8
  export { colors } from './colors.mjs';
9
9
  import '@unocss/rule-utils';
10
10
  import './shared/preset-mini.Cw_oISCI.mjs';
package/dist/rules.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Rule, CSSEntries, StaticRule } from '@unocss/core';
2
- import { T as Theme } from './shared/preset-mini.Cde3ndkA.mjs';
2
+ import { T as Theme } from './shared/preset-mini.BjJC-NnU.mjs';
3
3
 
4
4
  declare const verticalAligns: Rule[];
5
5
  declare const textAligns: Rule[];
package/dist/rules.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Rule, CSSEntries, StaticRule } from '@unocss/core';
2
- import { T as Theme } from './shared/preset-mini.Cde3ndkA.js';
2
+ import { T as Theme } from './shared/preset-mini.BjJC-NnU.js';
3
3
 
4
4
  declare const verticalAligns: Rule[];
5
5
  declare const textAligns: Rule[];
@@ -1,5 +1,5 @@
1
1
  import * as _unocss_core from '@unocss/core';
2
- import { C as Colors } from './preset-mini.Cde3ndkA.mjs';
2
+ import { C as Colors } from './preset-mini.BjJC-NnU.mjs';
3
3
 
4
4
  declare const theme: {
5
5
  width: {
@@ -6,6 +6,7 @@ interface ThemeAnimation {
6
6
  timingFns?: Record<string, string>;
7
7
  properties?: Record<string, object>;
8
8
  counts?: Record<string, string | number>;
9
+ category?: Record<string, string>;
9
10
  }
10
11
  interface Colors {
11
12
  [key: string]: Colors & {
@@ -6,6 +6,7 @@ interface ThemeAnimation {
6
6
  timingFns?: Record<string, string>;
7
7
  properties?: Record<string, object>;
8
8
  counts?: Record<string, string | number>;
9
+ category?: Record<string, string>;
9
10
  }
10
11
  interface Colors {
11
12
  [key: string]: Colors & {
@@ -550,8 +550,6 @@ const PseudoClasses = Object.fromEntries([
550
550
  ["placeholder", "::placeholder"],
551
551
  ["before", "::before"],
552
552
  ["after", "::after"],
553
- ["selection", " ::selection"],
554
- ["marker", "::marker"],
555
553
  ["file", "::file-selector-button"]
556
554
  ].map((key) => Array.isArray(key) ? key : [key, `:${key}`]));
557
555
  const PseudoClassesKeys = Object.keys(PseudoClasses);
@@ -565,9 +563,14 @@ const PseudoClassFunctions = [
565
563
  "where",
566
564
  "has"
567
565
  ];
566
+ const PseudoClassesMulti = Object.fromEntries([
567
+ ["selection", ["::selection", " *::selection"]],
568
+ ["marker", ["::marker", " *::marker"]]
569
+ ]);
568
570
  const PseudoClassesStr = Object.entries(PseudoClasses).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).sort((a, b) => b.length - a.length).join("|");
569
571
  const PseudoClassesColonStr = Object.entries(PseudoClassesColon).filter(([, pseudo]) => !pseudo.startsWith("::")).map(([key]) => key).sort((a, b) => b.length - a.length).join("|");
570
572
  const PseudoClassFunctionsStr = PseudoClassFunctions.join("|");
573
+ const PseudoClassesMultiStr = Object.keys(PseudoClassesMulti).sort((a, b) => b.length - a.length).join("|");
571
574
  function taggedPseudoClassMatcher(tag, parent, combinator) {
572
575
  const rawRE = new RegExp(`^(${escapeRegExp(parent)}:)(\\S+)${escapeRegExp(combinator)}\\1`);
573
576
  let splitRE;
@@ -661,42 +664,68 @@ const PseudoClassesAndElementsColonStr = Object.entries(PseudoClassesColon).map(
661
664
  function variantPseudoClassesAndElements() {
662
665
  let PseudoClassesAndElementsRE;
663
666
  let PseudoClassesAndElementsColonRE;
664
- return {
665
- name: "pseudo",
666
- match(input, ctx) {
667
- if (!(PseudoClassesAndElementsRE && PseudoClassesAndElementsRE)) {
668
- PseudoClassesAndElementsRE = new RegExp(`^(${PseudoClassesAndElementsStr})(?:${ctx.generator.config.separators.join("|")})`);
669
- PseudoClassesAndElementsColonRE = new RegExp(`^(${PseudoClassesAndElementsColonStr})(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
670
- }
671
- const match = input.match(PseudoClassesAndElementsRE) || input.match(PseudoClassesAndElementsColonRE);
672
- if (match) {
673
- const pseudo = PseudoClasses[match[1]] || PseudoClassesColon[match[1]] || `:${match[1]}`;
674
- let index = PseudoClassesKeys.indexOf(match[1]);
675
- if (index === -1)
676
- index = PseudoClassesColonKeys.indexOf(match[1]);
677
- if (index === -1)
678
- index = void 0;
679
- return {
680
- matcher: input.slice(match[0].length),
681
- handle: (input2, next) => {
682
- const selectors = pseudo.startsWith("::") && !excludedPseudo.includes(pseudo) ? {
683
- pseudo: `${input2.pseudo}${pseudo}`
684
- } : {
685
- selector: `${input2.selector}${pseudo}`
686
- };
687
- return next({
688
- ...input2,
689
- ...selectors,
690
- sort: index,
691
- noMerge: true
692
- });
693
- }
694
- };
695
- }
667
+ let PseudoClassesMultiRE;
668
+ return [
669
+ {
670
+ name: "pseudo",
671
+ match(input, ctx) {
672
+ if (!(PseudoClassesAndElementsRE && PseudoClassesAndElementsColonRE)) {
673
+ PseudoClassesAndElementsRE = new RegExp(`^(${PseudoClassesAndElementsStr})(?:${ctx.generator.config.separators.join("|")})`);
674
+ PseudoClassesAndElementsColonRE = new RegExp(`^(${PseudoClassesAndElementsColonStr})(?:${ctx.generator.config.separators.filter((x) => x !== "-").join("|")})`);
675
+ }
676
+ const match = input.match(PseudoClassesAndElementsRE) || input.match(PseudoClassesAndElementsColonRE);
677
+ if (match) {
678
+ const pseudo = PseudoClasses[match[1]] || PseudoClassesColon[match[1]] || `:${match[1]}`;
679
+ let index = PseudoClassesKeys.indexOf(match[1]);
680
+ if (index === -1)
681
+ index = PseudoClassesColonKeys.indexOf(match[1]);
682
+ if (index === -1)
683
+ index = void 0;
684
+ return {
685
+ matcher: input.slice(match[0].length),
686
+ handle: (input2, next) => {
687
+ const selectors = pseudo.includes("::") && !excludedPseudo.includes(pseudo) ? {
688
+ pseudo: `${input2.pseudo}${pseudo}`
689
+ } : {
690
+ selector: `${input2.selector}${pseudo}`
691
+ };
692
+ return next({
693
+ ...input2,
694
+ ...selectors,
695
+ sort: index,
696
+ noMerge: true
697
+ });
698
+ }
699
+ };
700
+ }
701
+ },
702
+ multiPass: true,
703
+ autocomplete: `(${PseudoClassesAndElementsStr}|${PseudoClassesAndElementsColonStr}):`
696
704
  },
697
- multiPass: true,
698
- autocomplete: `(${PseudoClassesAndElementsStr}|${PseudoClassesAndElementsColonStr}):`
699
- };
705
+ {
706
+ name: "pseudo:multi",
707
+ match(input, ctx) {
708
+ if (!PseudoClassesMultiRE) {
709
+ PseudoClassesMultiRE = new RegExp(`^(${PseudoClassesMultiStr})(?:${ctx.generator.config.separators.join("|")})`);
710
+ }
711
+ const match = input.match(PseudoClassesMultiRE);
712
+ if (match) {
713
+ const pseudos = PseudoClassesMulti[match[1]];
714
+ return pseudos.map((pseudo) => {
715
+ return {
716
+ matcher: input.slice(match[0].length),
717
+ handle: (input2, next) => next({
718
+ ...input2,
719
+ pseudo: `${input2.pseudo}${pseudo}`
720
+ })
721
+ };
722
+ });
723
+ }
724
+ },
725
+ multiPass: false,
726
+ autocomplete: `(${PseudoClassesMultiStr}):`
727
+ }
728
+ ];
700
729
  }
701
730
  function variantPseudoClassFunctions() {
702
731
  let PseudoClassFunctionsRE;
@@ -808,7 +837,7 @@ function variants(options) {
808
837
  variantCustomMedia,
809
838
  variantBreakpoints(),
810
839
  ...variantCombinators,
811
- variantPseudoClassesAndElements(),
840
+ ...variantPseudoClassesAndElements(),
812
841
  variantPseudoClassFunctions(),
813
842
  ...variantTaggedPseudoClasses(options),
814
843
  variantPartClasses,
@@ -1,6 +1,6 @@
1
1
  import { DynamicMatcher, CSSObject, VariantContext, StaticRule } from '@unocss/core';
2
2
  import { ParsedColorValue } from '@unocss/rule-utils';
3
- import { T as Theme } from './preset-mini.Cde3ndkA.js';
3
+ import { T as Theme } from './preset-mini.BjJC-NnU.js';
4
4
 
5
5
  declare const CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative";
6
6
  /**
@@ -1,5 +1,5 @@
1
1
  import * as _unocss_core from '@unocss/core';
2
- import { C as Colors } from './preset-mini.Cde3ndkA.js';
2
+ import { C as Colors } from './preset-mini.BjJC-NnU.js';
3
3
 
4
4
  declare const theme: {
5
5
  width: {
@@ -1,6 +1,6 @@
1
1
  import { DynamicMatcher, CSSObject, VariantContext, StaticRule } from '@unocss/core';
2
2
  import { ParsedColorValue } from '@unocss/rule-utils';
3
- import { T as Theme } from './preset-mini.Cde3ndkA.mjs';
3
+ import { T as Theme } from './preset-mini.BjJC-NnU.mjs';
4
4
 
5
5
  declare const CONTROL_MINI_NO_NEGATIVE = "$$mini-no-negative";
6
6
  /**
package/dist/theme.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { colors } from './colors.mjs';
2
- export { t as theme } from './shared/preset-mini.CQNs5PKm.mjs';
3
- import { T as Theme } from './shared/preset-mini.Cde3ndkA.mjs';
4
- export { C as Colors, a as ThemeAnimation } from './shared/preset-mini.Cde3ndkA.mjs';
2
+ export { t as theme } from './shared/preset-mini.BSnAbT9I.mjs';
3
+ import { T as Theme } from './shared/preset-mini.BjJC-NnU.mjs';
4
+ export { C as Colors, a as ThemeAnimation } from './shared/preset-mini.BjJC-NnU.mjs';
5
5
  import '@unocss/core';
6
6
 
7
7
  declare const blur: {
package/dist/theme.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  export { colors } from './colors.js';
2
- export { t as theme } from './shared/preset-mini.DiXszE9_.js';
3
- import { T as Theme } from './shared/preset-mini.Cde3ndkA.js';
4
- export { C as Colors, a as ThemeAnimation } from './shared/preset-mini.Cde3ndkA.js';
2
+ export { t as theme } from './shared/preset-mini.CoOfBKs_.js';
3
+ import { T as Theme } from './shared/preset-mini.BjJC-NnU.js';
4
+ export { C as Colors, a as ThemeAnimation } from './shared/preset-mini.BjJC-NnU.js';
5
5
  import '@unocss/core';
6
6
 
7
7
  declare const blur: {
package/dist/utils.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as _unocss_rule_utils from '@unocss/rule-utils';
2
2
  export * from '@unocss/rule-utils';
3
- export { C as CONTROL_MINI_NO_NEGATIVE, c as colorResolver, a as colorableShadows, d as directionSize, h as hasParseableColor, i as isCSSMathFn, e as isSize, m as makeGlobalStaticRules, p as parseColor, r as resolveBreakpoints, b as resolveVerticalBreakpoints, s as splitShorthand, t as transformXYZ } from './shared/preset-mini.XtClvIKE.mjs';
3
+ export { C as CONTROL_MINI_NO_NEGATIVE, c as colorResolver, a as colorableShadows, d as directionSize, h as hasParseableColor, i as isCSSMathFn, e as isSize, m as makeGlobalStaticRules, p as parseColor, r as resolveBreakpoints, b as resolveVerticalBreakpoints, s as splitShorthand, t as transformXYZ } from './shared/preset-mini.oF7XTPi1.mjs';
4
4
  import '@unocss/core';
5
- import './shared/preset-mini.Cde3ndkA.mjs';
5
+ import './shared/preset-mini.BjJC-NnU.mjs';
6
6
 
7
7
  declare function numberWithUnit(str: string): string | undefined;
8
8
  declare function auto(str: string): "auto" | undefined;
package/dist/utils.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as _unocss_rule_utils from '@unocss/rule-utils';
2
2
  export * from '@unocss/rule-utils';
3
- export { C as CONTROL_MINI_NO_NEGATIVE, c as colorResolver, a as colorableShadows, d as directionSize, h as hasParseableColor, i as isCSSMathFn, e as isSize, m as makeGlobalStaticRules, p as parseColor, r as resolveBreakpoints, b as resolveVerticalBreakpoints, s as splitShorthand, t as transformXYZ } from './shared/preset-mini.DChc_8j2.js';
3
+ export { C as CONTROL_MINI_NO_NEGATIVE, c as colorResolver, a as colorableShadows, d as directionSize, h as hasParseableColor, i as isCSSMathFn, e as isSize, m as makeGlobalStaticRules, p as parseColor, r as resolveBreakpoints, b as resolveVerticalBreakpoints, s as splitShorthand, t as transformXYZ } from './shared/preset-mini.CRliz1QB.js';
4
4
  import '@unocss/core';
5
- import './shared/preset-mini.Cde3ndkA.js';
5
+ import './shared/preset-mini.BjJC-NnU.js';
6
6
 
7
7
  declare function numberWithUnit(str: string): string | undefined;
8
8
  declare function auto(str: string): "auto" | undefined;
@@ -1,9 +1,9 @@
1
1
  import { VariantObject, Variant } from '@unocss/core';
2
2
  import { PresetMiniOptions } from './index.mjs';
3
- import { T as Theme } from './shared/preset-mini.Cde3ndkA.mjs';
3
+ import { T as Theme } from './shared/preset-mini.BjJC-NnU.mjs';
4
4
  import './colors.mjs';
5
- import './shared/preset-mini.CQNs5PKm.mjs';
6
- import './shared/preset-mini.XtClvIKE.mjs';
5
+ import './shared/preset-mini.BSnAbT9I.mjs';
6
+ import './shared/preset-mini.oF7XTPi1.mjs';
7
7
  import '@unocss/rule-utils';
8
8
 
9
9
  declare const variantAria: VariantObject;
@@ -41,7 +41,7 @@ declare const variantTheme: Variant;
41
41
 
42
42
  declare const variantNegative: Variant;
43
43
 
44
- declare function variantPseudoClassesAndElements(): VariantObject;
44
+ declare function variantPseudoClassesAndElements(): VariantObject[];
45
45
  declare function variantPseudoClassFunctions(): VariantObject;
46
46
  declare function variantTaggedPseudoClasses(options?: PresetMiniOptions): VariantObject[];
47
47
  declare const variantPartClasses: VariantObject;
@@ -1,9 +1,9 @@
1
1
  import { VariantObject, Variant } from '@unocss/core';
2
2
  import { PresetMiniOptions } from './index.js';
3
- import { T as Theme } from './shared/preset-mini.Cde3ndkA.js';
3
+ import { T as Theme } from './shared/preset-mini.BjJC-NnU.js';
4
4
  import './colors.js';
5
- import './shared/preset-mini.DiXszE9_.js';
6
- import './shared/preset-mini.DChc_8j2.js';
5
+ import './shared/preset-mini.CoOfBKs_.js';
6
+ import './shared/preset-mini.CRliz1QB.js';
7
7
  import '@unocss/rule-utils';
8
8
 
9
9
  declare const variantAria: VariantObject;
@@ -41,7 +41,7 @@ declare const variantTheme: Variant;
41
41
 
42
42
  declare const variantNegative: Variant;
43
43
 
44
- declare function variantPseudoClassesAndElements(): VariantObject;
44
+ declare function variantPseudoClassesAndElements(): VariantObject[];
45
45
  declare function variantPseudoClassFunctions(): VariantObject;
46
46
  declare function variantTaggedPseudoClasses(options?: PresetMiniOptions): VariantObject[];
47
47
  declare const variantPartClasses: VariantObject;
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.C46mpC2z.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.CDgj-fgp.mjs';
2
2
  import '@unocss/rule-utils';
3
3
  import './shared/preset-mini.Cay6Ue29.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": "0.64.0",
4
+ "version": "0.65.0-beta.1",
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": "0.64.0",
60
- "@unocss/extractor-arbitrary-variants": "0.64.0",
61
- "@unocss/rule-utils": "0.64.0"
59
+ "@unocss/core": "0.65.0-beta.1",
60
+ "@unocss/rule-utils": "0.65.0-beta.1",
61
+ "@unocss/extractor-arbitrary-variants": "0.65.0-beta.1"
62
62
  },
63
63
  "scripts": {
64
64
  "build": "unbuild",