@mlut/core 2.0.1 → 2.1.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.
@@ -21,6 +21,7 @@ export class JitEngine {
21
21
  escapedQuotes: /\\['"`]/g,
22
22
  utilName: /^-?[A-Z]{1}[a-zA-Z]*/,
23
23
  uppercaseLetter: /[A-Z]/,
24
+ contextUtil: /-Ctx([\d\-#]|$)/,
24
25
  };
25
26
  configRegexps = {
26
27
  userSettings: /@use ['"][^'"]*(tools|mlut|core)['"](\s*as\s+[\w]+)?\s+with\s*\(([^;]+)\);/s,
@@ -84,7 +85,8 @@ export class JitEngine {
84
85
  const utility = cssClass.split('_').find((str) => (this.utilsRegexps.utilName.test(str)));
85
86
  if (utility) {
86
87
  const utilName = utility.match(this.utilsRegexps.utilName)?.[0];
87
- if (this.utils.has(utilName) || utilName[0] === '-') {
88
+ if (this.utils.has(utilName) ||
89
+ (utilName[0] === '-' && !this.utilsRegexps.contextUtil.test(utilName))) {
88
90
  acc.add(cssClass);
89
91
  }
90
92
  }
@@ -474,6 +474,8 @@ $utils-cfg: (
474
474
  'rdo': ':read-only',
475
475
  'rdw': ':read-write',
476
476
  't': ':target',
477
+ 'ui': ':user-invalid',
478
+ 'uv': ':user-valid',
477
479
  'v': ':visited',
478
480
  'vl': ':valid',
479
481
  ),
@@ -1591,6 +1591,18 @@ $utils-db: (
1591
1591
  'nn': none,
1592
1592
  ),
1593
1593
  ),
1594
+ 'Coi': (
1595
+ 'properties': counter-increment,
1596
+ 'conversion': 'num-length',
1597
+ ),
1598
+ 'Cor': (
1599
+ 'properties': counter-reset,
1600
+ 'conversion': 'num-length',
1601
+ ),
1602
+ 'Cos': (
1603
+ 'properties': counter-set,
1604
+ 'conversion': 'num-length',
1605
+ ),
1594
1606
 
1595
1607
  // SVG
1596
1608
  'Fi': (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mlut/core",
3
- "version": "2.0.1",
3
+ "version": "2.1.0",
4
4
  "description": "Atomic CSS toolkit with Sass and ergonomics for creating styles of any complexity",
5
5
  "author": "mr150",
6
6
  "type": "module",