@projectwallace/css-analyzer 7.0.2 → 7.1.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.
@@ -1,7 +1,7 @@
1
- import Dt from "css-tree/parser";
1
+ import It from "css-tree/parser";
2
2
  import q from "css-tree/walker";
3
- import { calculateForAST as Ft } from "@bramus/specificity/core";
4
- function Ee(i, t) {
3
+ import { calculateForAST as Ut } from "@bramus/specificity/core";
4
+ function Fe(i, t) {
5
5
  return t >= 65 && t <= 90 && (t = t | 32), i === t;
6
6
  }
7
7
  function z(i, t) {
@@ -9,7 +9,7 @@ function z(i, t) {
9
9
  let r = i.length;
10
10
  if (r !== t.length) return !1;
11
11
  for (let e = 0; e < r; e++)
12
- if (Ee(i.charCodeAt(e), t.charCodeAt(e)) === !1)
12
+ if (Fe(i.charCodeAt(e), t.charCodeAt(e)) === !1)
13
13
  return !1;
14
14
  return !0;
15
15
  }
@@ -19,37 +19,37 @@ function L(i, t) {
19
19
  if (e < 0)
20
20
  return !1;
21
21
  for (let l = r - 1; l >= e; l--)
22
- if (Ee(i.charCodeAt(l - e), t.charCodeAt(l)) === !1)
22
+ if (Fe(i.charCodeAt(l - e), t.charCodeAt(l)) === !1)
23
23
  return !1;
24
24
  return !0;
25
25
  }
26
- function De(i, t) {
26
+ function Te(i, t) {
27
27
  if (i === t) return !0;
28
28
  let r = i.length;
29
29
  if (t.length < r) return !1;
30
30
  for (let e = 0; e < r; e++)
31
- if (Ee(i.charCodeAt(e), t.charCodeAt(e)) === !1)
31
+ if (Fe(i.charCodeAt(e), t.charCodeAt(e)) === !1)
32
32
  return !1;
33
33
  return !0;
34
34
  }
35
- const Tt = "Atrule", Mt = "MediaQuery", Ut = "Rule", Fe = "Selector", _t = "TypeSelector", Y = "PseudoClassSelector", St = "AttributeSelector", vt = "PseudoElementSelector", Re = "Declaration", It = "Value", O = "Identifier", Ht = "Nth", Vt = "Combinator", Wt = "Number", qt = "Dimension", V = "Operator", Kt = "Hash", jt = "Url", Te = "Function";
36
- function bt(i, t, r) {
35
+ const Ht = "Atrule", Vt = "MediaQuery", Wt = "Rule", Me = "Selector", At = "TypeSelector", G = "PseudoClassSelector", Pt = "AttributeSelector", Lt = "PseudoElementSelector", De = "Declaration", Kt = "Value", O = "Identifier", jt = "Nth", Bt = "Combinator", Yt = "Number", Ot = "Dimension", V = "Operator", Gt = "Hash", Qt = "Url", Ie = "Function";
36
+ function _t(i, t, r) {
37
37
  let e = i.value.children.first;
38
38
  return z(t, i.property) && e.type === O && z(r, e.name);
39
39
  }
40
- function Bt(i) {
40
+ function Nt(i) {
41
41
  let t = !1;
42
42
  return q(i, function(r) {
43
- if (r.type === Re && (bt(r, "-webkit-appearance", "none") || bt(r, "-moz-appearance", "meterbar")))
43
+ if (r.type === De && (_t(r, "-webkit-appearance", "none") || _t(r, "-moz-appearance", "meterbar")))
44
44
  return t = !0, this.break;
45
45
  }), t;
46
46
  }
47
- function Yt(i) {
47
+ function Zt(i) {
48
48
  let t = !1;
49
49
  return q(i, function(r) {
50
50
  let e = r.name, l = r.value;
51
- if (r.type === Mt && r.mediaType !== null) {
52
- if (De("\\0", r.mediaType) || L("\\9 ", r.mediaType))
51
+ if (r.type === Vt && r.mediaType !== null) {
52
+ if (Te("\\0", r.mediaType) || L("\\9 ", r.mediaType))
53
53
  return t = !0, this.break;
54
54
  } else if (r.type === "Feature" && r.kind === "media") {
55
55
  if (l && l.unit && l.unit === "\\0")
@@ -63,9 +63,9 @@ function Yt(i) {
63
63
  }
64
64
  }), t;
65
65
  }
66
- const xt = 45;
66
+ const St = 45;
67
67
  function D(i) {
68
- return i.charCodeAt(0) === xt && i.charCodeAt(1) !== xt && i.indexOf("-", 2) !== -1;
68
+ return i.charCodeAt(0) === St && i.charCodeAt(1) !== St && i.indexOf("-", 2) !== -1;
69
69
  }
70
70
  class A {
71
71
  /** @param {string[]} items */
@@ -77,16 +77,16 @@ class A {
77
77
  return this.set.has(t.toLowerCase());
78
78
  }
79
79
  }
80
- function At(i, t) {
80
+ function Rt(i, t) {
81
81
  let r = [];
82
82
  return q(i, {
83
- visit: Fe,
83
+ visit: Me,
84
84
  enter: function(e) {
85
85
  r.push(t(e));
86
86
  }
87
87
  }), r;
88
88
  }
89
- const Pt = new A([
89
+ const Et = new A([
90
90
  "nth-child",
91
91
  "where",
92
92
  "not",
@@ -97,15 +97,15 @@ const Pt = new A([
97
97
  "-webkit-any",
98
98
  "-moz-any"
99
99
  ]);
100
- function Lt(i) {
100
+ function Dt(i) {
101
101
  let t = !1;
102
102
  return q(i, function(r) {
103
- if (r.type === St) {
103
+ if (r.type === Pt) {
104
104
  let e = r.name.name;
105
- if (z("role", e) || De("aria-", e))
105
+ if (z("role", e) || Te("aria-", e))
106
106
  return t = !0, this.break;
107
- } else if (r.type === Y && Pt.has(r.name)) {
108
- let e = At(r, Lt);
107
+ } else if (r.type === G && Et.has(r.name)) {
108
+ let e = Rt(r, Dt);
109
109
  for (let l of e)
110
110
  if (l === !0) {
111
111
  t = !0;
@@ -115,29 +115,29 @@ function Lt(i) {
115
115
  }
116
116
  }), t;
117
117
  }
118
- function Gt(i) {
118
+ function Jt(i) {
119
119
  let t = !1;
120
120
  return q(i, function(r) {
121
121
  let e = r.type;
122
- if ((e === vt || e === _t || e === Y) && D(r.name))
122
+ if ((e === Lt || e === At || e === G) && D(r.name))
123
123
  return t = !0, this.break;
124
124
  }), t;
125
125
  }
126
- function Qt(i) {
126
+ function Xt(i) {
127
127
  let t = [];
128
128
  return q(i, function(r) {
129
- r.type === Y && t.push(r.name);
129
+ r.type === G && t.push(r.name);
130
130
  }), t.length === 0 ? !1 : t;
131
131
  }
132
- function Ot(i) {
132
+ function Ft(i) {
133
133
  let t = 0;
134
134
  return q(i, function(r) {
135
135
  let e = r.type;
136
- if (!(e === Fe || e === Ht)) {
137
- if (t++, (e === vt || e === _t || e === Y) && D(r.name) && t++, e === St)
136
+ if (!(e === Me || e === jt)) {
137
+ if (t++, (e === Lt || e === At || e === G) && D(r.name) && t++, e === Pt)
138
138
  return r.value && t++, this.skip;
139
- if (e === Y && Pt.has(r.name)) {
140
- let l = At(r, Ot);
139
+ if (e === G && Et.has(r.name)) {
140
+ let l = Rt(r, Ft);
141
141
  if (l.length === 0) return;
142
142
  for (let n of l)
143
143
  t += n;
@@ -146,9 +146,9 @@ function Ot(i) {
146
146
  }
147
147
  }), t;
148
148
  }
149
- function Zt(i, t) {
149
+ function $t(i, t) {
150
150
  q(i, function(r, e) {
151
- if (r.type === Vt) {
151
+ if (r.type === Bt) {
152
152
  let l = r.loc, n = r.name;
153
153
  if (l === null) {
154
154
  let g = e.prev.data.loc.end, w = {
@@ -175,7 +175,7 @@ function Zt(i, t) {
175
175
  }
176
176
  });
177
177
  }
178
- const Jt = new A([
178
+ const ei = new A([
179
179
  // CSS Named Colors
180
180
  // Spec: https://drafts.csswg.org/css-color/#named-colors
181
181
  // Heuristic: popular names first for quick finding in set.has()
@@ -328,7 +328,7 @@ const Jt = new A([
328
328
  "mediumorchid",
329
329
  "darksalmon",
330
330
  "mediumspringgreen"
331
- ]), Xt = new A([
331
+ ]), ti = new A([
332
332
  // CSS System Colors
333
333
  // Spec: https://drafts.csswg.org/css-color/#css-system-colors
334
334
  "accentcolor",
@@ -350,7 +350,7 @@ const Jt = new A([
350
350
  "selecteditem",
351
351
  "selecteditemtext",
352
352
  "visitedtext"
353
- ]), $t = new A([
353
+ ]), ii = new A([
354
354
  "rgba",
355
355
  "rgb",
356
356
  "hsla",
@@ -361,10 +361,10 @@ const Jt = new A([
361
361
  "lch",
362
362
  "lab",
363
363
  "oklab"
364
- ]), Nt = new A([
364
+ ]), ri = new A([
365
365
  "transparent",
366
366
  "currentcolor"
367
- ]), N = new A([
367
+ ]), te = new A([
368
368
  "auto",
369
369
  "none",
370
370
  // for `text-shadow`, `box-shadow` and `background`
@@ -374,20 +374,20 @@ const Jt = new A([
374
374
  "revert",
375
375
  "revert-layer"
376
376
  ]);
377
- function $(i) {
377
+ function ee(i) {
378
378
  let t = i.children, r = t.size;
379
379
  if (!t || r > 1 || r === 0) return !1;
380
380
  let e = t.first;
381
- return e.type === O && N.has(e.name);
381
+ return e.type === O && te.has(e.name);
382
382
  }
383
- const ei = new A([
383
+ const si = new A([
384
384
  "caption",
385
385
  "icon",
386
386
  "menu",
387
387
  "message-box",
388
388
  "small-caption",
389
389
  "status-bar"
390
- ]), ti = new A([
390
+ ]), li = new A([
391
391
  /* <absolute-size> values */
392
392
  "xx-small",
393
393
  "x-small",
@@ -400,39 +400,39 @@ const ei = new A([
400
400
  /* <relative-size> values */
401
401
  "smaller",
402
402
  "larger"
403
- ]), ii = 44, Ct = 47;
404
- function Le(i) {
403
+ ]), ni = 44, vt = 47;
404
+ function Re(i) {
405
405
  let t = i.children.first;
406
- return t === null ? !1 : t.type === O && ei.has(t.name);
406
+ return t === null ? !1 : t.type === O && si.has(t.name);
407
407
  }
408
- function ri(i, t, r) {
408
+ function ai(i, t, r) {
409
409
  var w;
410
410
  let e = Array.from({ length: 2 }), l, n;
411
411
  i.children.forEach(function(d, _) {
412
412
  let y = _.prev ? _.prev.data : void 0, P = _.next ? _.next.data : void 0;
413
- if (d.type === O && N.has(d.name) && r({
413
+ if (d.type === O && te.has(d.name) && r({
414
414
  type: "keyword",
415
415
  value: d.name
416
- }), P && P.type === V && P.value.charCodeAt(0) === Ct) {
416
+ }), P && P.type === V && P.value.charCodeAt(0) === vt) {
417
417
  l = t(d);
418
418
  return;
419
419
  }
420
- if (y && y.type === V && y.value.charCodeAt(0) === Ct) {
420
+ if (y && y.type === V && y.value.charCodeAt(0) === vt) {
421
421
  n = t(d);
422
422
  return;
423
423
  }
424
- if (P && P.type === V && P.value.charCodeAt(0) === ii && !e[0]) {
424
+ if (P && P.type === V && P.value.charCodeAt(0) === ni && !e[0]) {
425
425
  e[0] = d, !l && y && (l = t(y));
426
426
  return;
427
427
  }
428
- if (d.type !== Wt) {
428
+ if (d.type !== Yt) {
429
429
  if (_.next === null) {
430
430
  e[1] = d, !l && !e[0] && y && (l = t(y));
431
431
  return;
432
432
  }
433
433
  if (d.type === O) {
434
434
  let R = d.name;
435
- if (ti.has(R)) {
435
+ if (li.has(R)) {
436
436
  l = R;
437
437
  return;
438
438
  }
@@ -457,7 +457,7 @@ function ri(i, t, r) {
457
457
  font_family: g
458
458
  };
459
459
  }
460
- const si = new A([
460
+ const oi = new A([
461
461
  "linear",
462
462
  "ease",
463
463
  "ease-in",
@@ -465,36 +465,36 @@ const si = new A([
465
465
  "ease-in-out",
466
466
  "step-start",
467
467
  "step-end"
468
- ]), li = new A([
468
+ ]), ui = new A([
469
469
  "cubic-bezier",
470
470
  "steps"
471
471
  ]);
472
- function ni(i, t) {
472
+ function ci(i, t) {
473
473
  let r = !1;
474
474
  for (let e of i) {
475
475
  let l = e.type, n = e.name;
476
- l === V ? r = !1 : l === qt && r === !1 ? (r = !0, t({
476
+ l === V ? r = !1 : l === Ot && r === !1 ? (r = !0, t({
477
477
  type: "duration",
478
478
  value: e
479
- })) : l === O ? si.has(n) ? t({
479
+ })) : l === O ? oi.has(n) ? t({
480
480
  type: "fn",
481
481
  value: e
482
- }) : N.has(n) && t({
482
+ }) : te.has(n) && t({
483
483
  type: "keyword",
484
484
  value: e
485
- }) : l === Te && li.has(n) && t({
485
+ }) : l === Ie && ui.has(n) && t({
486
486
  type: "fn",
487
487
  value: e
488
488
  });
489
489
  }
490
490
  }
491
- function Rt(i) {
491
+ function Tt(i) {
492
492
  let t = i.children;
493
493
  if (!t)
494
494
  return !1;
495
495
  for (let r of t) {
496
496
  let { type: e, name: l } = r;
497
- if (e === O && D(l) || e === Te && (D(l) || Rt(r)))
497
+ if (e === O && D(l) || e === Ie && (D(l) || Tt(r)))
498
498
  return !0;
499
499
  }
500
500
  return !1;
@@ -567,7 +567,7 @@ class u {
567
567
  return e && (d.uniqueWithLocations = Object.fromEntries(t)), d;
568
568
  }
569
569
  }
570
- class Oe {
570
+ class Ee {
571
571
  /** @param {boolean} useLocations */
572
572
  constructor(t) {
573
573
  this._list = new u(t), this._contexts = /* @__PURE__ */ new Map(), this._useLocations = t;
@@ -590,7 +590,7 @@ class Oe {
590
590
  });
591
591
  }
592
592
  }
593
- function ai(i) {
593
+ function fi(i) {
594
594
  let t = /* @__PURE__ */ new Map(), r = -1, e = 0, l = 0, n = i.length;
595
595
  for (let g = 0; g < n; g++) {
596
596
  let w = i[g], d = (t.get(w) || 0) + 1;
@@ -623,7 +623,7 @@ class v {
623
623
  range: 0,
624
624
  sum: 0
625
625
  };
626
- let r = this._items.slice().sort((w, d) => w - d), e = r[0], l = r[t - 1], n = ai(r), g = this._sum;
626
+ let r = this._items.slice().sort((w, d) => w - d), e = r[0], l = r[t - 1], n = fi(r), g = this._sum;
627
627
  return {
628
628
  min: e,
629
629
  max: l,
@@ -640,25 +640,25 @@ class v {
640
640
  return this._items;
641
641
  }
642
642
  }
643
- function oi(i) {
644
- if (Me(i) || D(i)) return !1;
643
+ function pi(i) {
644
+ if (Ue(i) || D(i)) return !1;
645
645
  let t = i.charCodeAt(0);
646
646
  return t === 47 || t === 42 || t === 95 || t === 43 || t === 38 || t === 36 || t === 35;
647
647
  }
648
- function Me(i) {
648
+ function Ue(i) {
649
649
  return i.length < 3 ? !1 : i.charCodeAt(0) === 45 && i.charCodeAt(1) === 45;
650
650
  }
651
- function C(i, t) {
652
- return Me(t) ? !1 : L(i, t);
651
+ function x(i, t) {
652
+ return Ue(t) ? !1 : L(i, t);
653
653
  }
654
- function ui(i) {
654
+ function hi(i) {
655
655
  return D(i) ? i.slice(i.indexOf("-", 2) + 1) : i;
656
656
  }
657
- function ci(i) {
657
+ function mi(i) {
658
658
  let t = 5, r = i.indexOf(";"), e = i.indexOf(",");
659
659
  return r === -1 || e !== -1 && e < r ? i.substring(t, e) : i.substring(t, r);
660
660
  }
661
- function fi(i) {
661
+ function gi(i) {
662
662
  let t = i.children;
663
663
  if (t) {
664
664
  let r = t.last;
@@ -666,7 +666,7 @@ function fi(i) {
666
666
  }
667
667
  return !1;
668
668
  }
669
- let pi = new A([
669
+ let di = new A([
670
670
  "border-radius",
671
671
  "border-top-left-radius",
672
672
  "border-top-right-radius",
@@ -677,26 +677,26 @@ let pi = new A([
677
677
  "border-end-end-radius",
678
678
  "border-end-start-radius"
679
679
  ]);
680
- function x(i, t) {
680
+ function C(i, t) {
681
681
  return t === 0 ? 0 : i / t;
682
682
  }
683
- let hi = {
683
+ let yi = {
684
684
  useLocations: !1
685
685
  };
686
- function yi(i, t = {}) {
687
- let e = Object.assign({}, hi, t).useLocations === !0, l = Date.now();
686
+ function xi(i, t = {}) {
687
+ let e = Object.assign({}, yi, t).useLocations === !0, l = Date.now();
688
688
  function n(s) {
689
689
  return g(s).trim();
690
690
  }
691
691
  function g(s) {
692
- let f = s.loc;
693
- return i.substring(f.start.offset, f.end.offset);
692
+ let Y = s.loc;
693
+ return i.substring(Y.start.offset, Y.end.offset);
694
694
  }
695
695
  let w = 0, d = 0, _ = 0, y = {
696
696
  total: 0,
697
697
  /** @type {Map<string, { size: number, count: number } & ({ uniqueWithLocations?: undefined } | ({ uniqueWithLocations: { offset: number, line: number, column: number, length: number }[] })) }>} */
698
698
  unique: /* @__PURE__ */ new Map()
699
- }, P = Date.now(), R = Dt(i, {
699
+ }, P = Date.now(), R = It(i, {
700
700
  parseCustomProperty: !0,
701
701
  // To find font-families, colors, etc.
702
702
  positions: !0,
@@ -705,74 +705,88 @@ function yi(i, t = {}) {
705
705
  onComment: function(s) {
706
706
  w++, d += s.length;
707
707
  }
708
- }), F = Date.now(), Et = R.loc.end.line - R.loc.start.line + 1, ee = 0, te = new v(), ie = [], Ue = new u(e), re = new u(e), Ie = new u(e), He = new u(e), Ve = new u(e), We = new u(e), se = new u(e), Ke = new u(e), le = new u(e), ne = new u(e), je = new u(e), Be = new u(e), ae = 0, oe = 0, ue = new v(), ce = new v(), fe = new v(), Ye = new u(e), Ge = new u(e), Qe = new u(e), pe = new u(e), Ze = /* @__PURE__ */ new Set(), he = new u(e), T, M, Je = new v(), Xe = new v(), $e = new v(), Ne = new u(e), G = new v(), et = new u(e), tt = [], me = new u(e), ge = new u(e), it = new u(e), rt = new u(e), st = /* @__PURE__ */ new Set(), W = 0, lt = new v(), Q = 0, de = 0, ye = new u(e), K = new u(e), we = new u(e), ke = new u(e), Z = new u(e), j = new v(), be = new v(), nt = new u(e), xe = new u(e), at = new u(e), ot = new u(e), ut = new u(e), Ce = new u(e), ze = new u(e), _e = new u(e), J = new u(e), X = new u(e), U = new Oe(e), I = new u(e), Se = new Oe(e), ct = new u(e), B = new u(e), ft = new Oe(e);
708
+ }), F = Date.now(), Mt = R.loc.end.line - R.loc.start.line + 1, ie = 0, re = new v(), se = [], He = new u(e), le = new u(e), Ve = new u(e), We = new u(e), Ke = new u(e), je = new u(e), Be = new u(e), ne = new u(e), Ye = new u(e), ae = new u(e), oe = new u(e), Ge = new u(e), Q = new u(e), Qe = new u(e), ue = 0, ce = 0, fe = new v(), pe = new v(), he = new v(), Ne = new u(e), Ze = new u(e), Je = new u(e), me = new u(e), Xe = /* @__PURE__ */ new Set(), ge = new u(e), T, M, $e = new v(), et = new v(), tt = new v(), it = new u(e), N = new v(), rt = new u(e), st = [], de = new u(e), ye = new u(e), lt = new u(e), nt = new u(e), at = /* @__PURE__ */ new Set(), W = 0, ot = new v(), Z = 0, we = 0, ke = new u(e), K = new u(e), be = new u(e), xe = new u(e), J = new u(e), j = new v(), Ce = new v(), ut = new u(e), ze = new u(e), ct = new u(e), ft = new u(e), pt = new u(e), _e = new u(e), Se = new u(e), ve = new u(e), X = new u(e), $ = new u(e), I = new Ee(e), U = new u(e), qe = new Ee(e), ht = new u(e), B = new u(e), mt = new Ee(e);
709
709
  q(R, function(s) {
710
+ var Y, zt;
710
711
  switch (s.type) {
711
- case Tt: {
712
- ee++;
713
- let f = s.name;
714
- if (f === "font-face") {
712
+ case Ht: {
713
+ ie++;
714
+ let p = s.name;
715
+ if (p === "font-face") {
715
716
  let m = {};
716
- e && Ue.p(s.loc.start.offset, s.loc), s.block.children.forEach((c) => {
717
- c.type === Re && (m[c.property] = n(c.value));
718
- }), ie.push(m), te.push(1);
717
+ e && He.p(s.loc.start.offset, s.loc), s.block.children.forEach((c) => {
718
+ c.type === De && (m[c.property] = n(c.value));
719
+ }), se.push(m), re.push(1);
719
720
  break;
720
721
  }
721
722
  let a = 1;
722
723
  if (s.prelude !== null) {
723
- let m = s.prelude, c = m && n(s.prelude), p = m.loc;
724
- if (f === "media")
725
- He.p(c, p), Yt(m) && (Ve.p(c, p), a++);
726
- else if (f === "supports")
727
- se.p(c, p), Bt(m) && (Ke.p(c, p), a++);
728
- else if (L("keyframes", f)) {
729
- let o = "@" + f + " " + c;
730
- D(f) && (ne.p(o, p), a++), le.p(o, p);
731
- } else f === "import" ? (q(s, function(o) {
732
- if (o.type === "Condition" && o.kind === "supports") {
733
- let h = n(o);
734
- return se.p(h, o.loc), this.break;
724
+ let m = s.prelude, c = m && n(s.prelude), f = m.loc;
725
+ if (p === "media")
726
+ We.p(c, f), Zt(m) && (Ke.p(c, f), a++);
727
+ else if (p === "supports")
728
+ ne.p(c, f), Nt(m) && (Ye.p(c, f), a++);
729
+ else if (L("keyframes", p)) {
730
+ let o = "@" + p + " " + c;
731
+ D(p) && (oe.p(o, f), a++), ae.p(o, f);
732
+ } else if (p === "import")
733
+ q(s, function(o) {
734
+ if (o.type === "Condition" && o.kind === "supports") {
735
+ let h = n(o);
736
+ return ne.p(h, o.loc), this.break;
737
+ }
738
+ }), Ve.p(c, f);
739
+ else if (p === "charset")
740
+ Be.p(c, f);
741
+ else if (p === "container") {
742
+ if (Ge.p(c, f), ((Y = m.children.first) == null ? void 0 : Y.type) === "Identifier") {
743
+ let o = m.children.first.name;
744
+ Q.p(o, f);
735
745
  }
736
- }), Ie.p(c, p)) : f === "charset" ? We.p(c, p) : f === "container" ? je.p(c, p) : f === "property" && Be.p(c, p);
746
+ } else p === "property" && Qe.p(c, f);
737
747
  } else
738
- f === "layer" && (re.p("<anonymous>", s.loc), a++);
739
- te.push(a);
748
+ p === "layer" && (le.p("<anonymous>", s.loc), a++);
749
+ re.push(a);
740
750
  break;
741
751
  }
742
752
  case "Layer": {
743
- s.name !== null && re.p(s.name, s.loc);
753
+ s.name !== null && le.p(s.name, s.loc);
744
754
  break;
745
755
  }
746
- case Ut: {
747
- let f = s.prelude, a = s.block, m = f.children, c = a.children, p = m ? m.size : 0, o = c ? c.size : 0;
748
- ue.push(p + o), Ye.p(p + o, s.loc), ce.push(p), Ge.p(p, f.loc), fe.push(o), Qe.p(o, a.loc), ae++, o === 0 && oe++;
756
+ case "Feature": {
757
+ je.p(s.name, s.loc);
749
758
  break;
750
759
  }
751
- case Fe: {
752
- let f = n(s);
760
+ case Wt: {
761
+ let p = s.prelude, a = s.block, m = p.children, c = a.children, f = m ? m.size : 0, o = c ? c.size : 0;
762
+ fe.push(f + o), Ne.p(f + o, s.loc), pe.push(f), Ze.p(f, p.loc), he.push(o), Je.p(o, a.loc), ue++, o === 0 && ce++;
763
+ break;
764
+ }
765
+ case Me: {
766
+ let p = n(s);
753
767
  if (this.atrule && L("keyframes", this.atrule.name))
754
- return pe.p(f, s.loc), this.skip;
755
- Lt(s) && ge.p(f, s.loc);
756
- let a = Qt(s);
768
+ return me.p(p, s.loc), this.skip;
769
+ Dt(s) && ye.p(p, s.loc);
770
+ let a = Xt(s);
757
771
  if (a !== !1)
758
772
  for (let b of a)
759
- it.p(b, s.loc);
760
- let m = Ot(s);
761
- Gt(s) && he.p(f, s.loc), Ze.add(f), G.push(m), et.p(m, s.loc);
762
- let c = Ft(s).toArray(), [p, o, h] = c;
763
- return Ne.p(c.toString(), s.loc), Je.push(p), Xe.push(o), $e.push(h), T === void 0 && (T = c), M === void 0 && (M = c), M !== void 0 && zt(M, c) < 0 && (M = c), T !== void 0 && zt(T, c) > 0 && (T = c), tt.push(c), p > 0 && me.p(f, s.loc), Zt(s, function(S) {
764
- rt.p(S.name, S.loc);
773
+ lt.p(b, s.loc);
774
+ let m = Ft(s);
775
+ Jt(s) && ge.p(p, s.loc), Xe.add(p), N.push(m), rt.p(m, s.loc);
776
+ let c = Ut(s).toArray(), [f, o, h] = c;
777
+ return it.p(c.toString(), s.loc), $e.push(f), et.push(o), tt.push(h), T === void 0 && (T = c), M === void 0 && (M = c), M !== void 0 && qt(M, c) < 0 && (M = c), T !== void 0 && qt(T, c) > 0 && (T = c), st.push(c), f > 0 && de.p(p, s.loc), $t(s, function(S) {
778
+ nt.p(S.name, S.loc);
765
779
  }), this.skip;
766
780
  }
767
- case qt: {
781
+ case Ot: {
768
782
  if (!this.declaration)
769
783
  break;
770
- let f = s.unit;
771
- return L("\\9", f) ? Se.push(f.substring(0, f.length - 2), this.declaration.property, s.loc) : Se.push(f, this.declaration.property, s.loc), this.skip;
784
+ let p = s.unit;
785
+ return L("\\9", p) ? qe.push(p.substring(0, p.length - 2), this.declaration.property, s.loc) : qe.push(p, this.declaration.property, s.loc), this.skip;
772
786
  }
773
- case jt: {
774
- if (De("data:", s.value)) {
775
- let f = s.value, a = f.length, m = ci(f);
787
+ case Qt: {
788
+ if (Te("data:", s.value)) {
789
+ let p = s.value, a = p.length, m = mi(p);
776
790
  y.total++, _ += a;
777
791
  let c = {
778
792
  /** @type {number} */
@@ -785,100 +799,104 @@ function yi(i, t = {}) {
785
799
  length: s.loc.end.offset - s.loc.start.offset
786
800
  };
787
801
  if (y.unique.has(m)) {
788
- let p = y.unique.get(m);
789
- p.count++, p.size += a, y.unique.set(m, p), e && p.uniqueWithLocations.push(c);
802
+ let f = y.unique.get(m);
803
+ f.count++, f.size += a, y.unique.set(m, f), e && f.uniqueWithLocations.push(c);
790
804
  } else {
791
- let p = {
805
+ let f = {
792
806
  count: 1,
793
807
  size: a
794
808
  };
795
- e && (p.uniqueWithLocations = [c]), y.unique.set(m, p);
809
+ e && (f.uniqueWithLocations = [c]), y.unique.set(m, f);
796
810
  }
797
811
  }
798
812
  break;
799
813
  }
800
- case It: {
801
- if ($(s)) {
802
- be.push(1), B.p(n(s), s.loc);
814
+ case Kt: {
815
+ if (ee(s)) {
816
+ Ce.push(1), B.p(n(s), s.loc);
803
817
  break;
804
818
  }
805
- let f = this.declaration, { property: a, important: m } = f, c = 1;
806
- Rt(s) && (nt.p(n(s), s.loc), c++), typeof m == "string" && (xe.p(g(s) + "!" + m, s.loc), c++), fi(s) && (xe.p(n(s), s.loc), c++);
807
- let p = s.children, o = s.loc;
808
- if (be.push(c), C("z-index", a))
809
- return at.p(n(s), o), this.skip;
810
- if (C("font", a)) {
811
- if (Le(s)) return;
812
- let { font_size: h, line_height: b, font_family: S } = ri(s, n, function(E) {
819
+ let p = this.declaration, { property: a, important: m } = p, c = 1;
820
+ Tt(s) && (ut.p(n(s), s.loc), c++), typeof m == "string" && (ze.p(g(s) + "!" + m, s.loc), c++), gi(s) && (ze.p(n(s), s.loc), c++);
821
+ let f = s.children, o = s.loc;
822
+ if (Ce.push(c), x("z-index", a))
823
+ return ct.p(n(s), o), this.skip;
824
+ if (x("font", a)) {
825
+ if (Re(s)) return;
826
+ let { font_size: h, line_height: b, font_family: S } = ai(s, n, function(E) {
813
827
  E.type === "keyword" && B.p(E.value, o);
814
828
  });
815
- S && Ce.p(S, o), h && ze.p(h, o), b && _e.p(b, o);
829
+ S && _e.p(S, o), h && Se.p(h, o), b && ve.p(b, o);
816
830
  break;
817
- } else if (C("font-size", a)) {
818
- Le(s) || ze.p(n(s), o);
831
+ } else if (x("font-size", a)) {
832
+ Re(s) || Se.p(n(s), o);
819
833
  break;
820
- } else if (C("font-family", a)) {
821
- Le(s) || Ce.p(n(s), o);
834
+ } else if (x("font-family", a)) {
835
+ Re(s) || _e.p(n(s), o);
822
836
  break;
823
- } else if (C("line-height", a))
824
- _e.p(n(s), o);
825
- else if (C("transition", a) || C("animation", a)) {
826
- ni(p, function(h) {
827
- h.type === "fn" ? J.p(n(h.value), o) : h.type === "duration" ? X.p(n(h.value), o) : h.type === "keyword" && B.p(n(h.value), o);
837
+ } else if (x("line-height", a))
838
+ ve.p(n(s), o);
839
+ else if (x("transition", a) || x("animation", a)) {
840
+ ci(f, function(h) {
841
+ h.type === "fn" ? X.p(n(h.value), o) : h.type === "duration" ? $.p(n(h.value), o) : h.type === "keyword" && B.p(n(h.value), o);
828
842
  });
829
843
  break;
830
- } else if (C("animation-duration", a) || C("transition-duration", a)) {
831
- p && p.size > 1 ? p.forEach((h) => {
844
+ } else if (x("animation-duration", a) || x("transition-duration", a)) {
845
+ f && f.size > 1 ? f.forEach((h) => {
846
+ h.type !== V && $.p(n(h), o);
847
+ }) : $.p(n(s), o);
848
+ break;
849
+ } else if (x("transition-timing-function", a) || x("animation-timing-function", a)) {
850
+ f && f.size > 1 ? f.forEach((h) => {
832
851
  h.type !== V && X.p(n(h), o);
833
852
  }) : X.p(n(s), o);
834
853
  break;
835
- } else if (C("transition-timing-function", a) || C("animation-timing-function", a)) {
836
- p && p.size > 1 ? p.forEach((h) => {
837
- h.type !== V && J.p(n(h), o);
838
- }) : J.p(n(s), o);
839
- break;
840
- } else if (pi.has(ui(a))) {
841
- $(s) || ft.push(n(s), a, o);
854
+ } else if (x("container-name", a))
855
+ Q.p(n(s), o);
856
+ else if (x("container", a))
857
+ ((zt = f.first) == null ? void 0 : zt.type) === "Identifier" && Q.p(f.first.name, o);
858
+ else if (di.has(hi(a))) {
859
+ ee(s) || mt.push(n(s), a, o);
842
860
  break;
843
- } else C("text-shadow", a) ? $(s) || ot.p(n(s), o) : C("box-shadow", a) && ($(s) || ut.p(n(s), o));
861
+ } else x("text-shadow", a) ? ee(s) || ft.p(n(s), o) : x("box-shadow", a) && (ee(s) || pt.p(n(s), o));
844
862
  q(s, function(h) {
845
863
  let b = h.name;
846
864
  switch (h.type) {
847
- case Kt: {
865
+ case Gt: {
848
866
  let S = h.value.length;
849
- return L("\\9", h.value) && (S = S - 2), U.push("#" + h.value, a, o), I.p("hex" + S, o), this.skip;
867
+ return L("\\9", h.value) && (S = S - 2), I.push("#" + h.value, a, o), U.p("hex" + S, o), this.skip;
850
868
  }
851
869
  case O: {
852
- N.has(b) && B.p(b, o);
870
+ te.has(b) && B.p(b, o);
853
871
  let S = b.length;
854
872
  if (S > 20 || S < 3)
855
873
  return this.skip;
856
- if (Nt.has(b)) {
874
+ if (ri.has(b)) {
857
875
  let E = n(h);
858
- U.push(E, a, o), I.p(b.toLowerCase(), o);
876
+ I.push(E, a, o), U.p(b.toLowerCase(), o);
859
877
  return;
860
878
  }
861
- if (Jt.has(b)) {
879
+ if (ei.has(b)) {
862
880
  let E = n(h);
863
- U.push(E, a, o), I.p("named", o);
881
+ I.push(E, a, o), U.p("named", o);
864
882
  return;
865
883
  }
866
- if (Xt.has(b)) {
884
+ if (ti.has(b)) {
867
885
  let E = n(h);
868
- U.push(E, a, o), I.p("system", o);
886
+ I.push(E, a, o), U.p("system", o);
869
887
  return;
870
888
  }
871
889
  return this.skip;
872
890
  }
873
- case Te: {
891
+ case Ie: {
874
892
  if (z("var", b))
875
893
  return this.skip;
876
- if ($t.has(b)) {
877
- U.push(n(h), a, h.loc), I.p(b.toLowerCase(), h.loc);
894
+ if (ii.has(b)) {
895
+ I.push(n(h), a, h.loc), U.p(b.toLowerCase(), h.loc);
878
896
  return;
879
897
  }
880
898
  if (L("gradient", b)) {
881
- ct.p(n(h), h.loc);
899
+ ht.p(n(h), h.loc);
882
900
  return;
883
901
  }
884
902
  }
@@ -886,12 +904,12 @@ function yi(i, t = {}) {
886
904
  });
887
905
  break;
888
906
  }
889
- case Re: {
907
+ case De: {
890
908
  if (this.atrulePrelude !== null)
891
909
  return this.skip;
892
910
  W++;
893
- let f = 1;
894
- st.add(n(s)), s.important === !0 && (Q++, f++, this.atrule && L("keyframes", this.atrule.name) && (de++, f++)), lt.push(f);
911
+ let p = 1;
912
+ at.add(n(s)), s.important === !0 && (Z++, p++, this.atrule && L("keyframes", this.atrule.name) && (we++, p++)), ot.push(p);
895
913
  let { property: a, loc: { start: m } } = s, c = {
896
914
  start: {
897
915
  line: m.line,
@@ -902,18 +920,18 @@ function yi(i, t = {}) {
902
920
  offset: m.offset + a.length
903
921
  }
904
922
  };
905
- K.p(a, c), D(a) ? (ke.p(a, c), j.push(2)) : oi(a) ? (we.p(a, c), j.push(2)) : Me(a) ? (Z.p(a, c), j.push(s.important ? 3 : 2), s.important === !0 && ye.p(a, c)) : j.push(1);
923
+ K.p(a, c), D(a) ? (xe.p(a, c), j.push(2)) : pi(a) ? (be.p(a, c), j.push(2)) : Ue(a) ? (J.p(a, c), j.push(s.important ? 3 : 2), s.important === !0 && ke.p(a, c)) : j.push(1);
906
924
  break;
907
925
  }
908
926
  }
909
927
  });
910
- let pt = st.size, H = G.size(), ve = Je.aggregate(), qe = Xe.aggregate(), Ae = $e.aggregate(), ht = Ze.size, k = Object.assign, mt = i.length, Pe = ie.length, gt = te.aggregate(), dt = G.aggregate(), yt = lt.aggregate(), wt = j.aggregate(), kt = be.aggregate();
928
+ let gt = at.size, H = N.size(), Ae = $e.aggregate(), Pe = et.aggregate(), Le = tt.aggregate(), dt = Xe.size, k = Object.assign, yt = i.length, Oe = se.length, wt = re.aggregate(), kt = N.aggregate(), bt = ot.aggregate(), xt = j.aggregate(), Ct = Ce.aggregate();
911
929
  return {
912
930
  stylesheet: {
913
- sourceLinesOfCode: ee + H + W + pe.size(),
914
- linesOfCode: Et,
915
- size: mt,
916
- complexity: gt.sum + dt.sum + yt.sum + wt.sum + kt.sum,
931
+ sourceLinesOfCode: ie + H + W + me.size(),
932
+ linesOfCode: Mt,
933
+ size: yt,
934
+ complexity: wt.sum + kt.sum + bt.sum + xt.sum + Ct.sum,
917
935
  comments: {
918
936
  total: w,
919
937
  size: d
@@ -921,88 +939,94 @@ function yi(i, t = {}) {
921
939
  embeddedContent: {
922
940
  size: {
923
941
  total: _,
924
- ratio: x(_, mt)
942
+ ratio: C(_, yt)
925
943
  },
926
944
  types: {
927
945
  total: y.total,
928
946
  totalUnique: y.unique.size,
929
- uniquenessRatio: x(y.unique.size, y.total),
947
+ uniquenessRatio: C(y.unique.size, y.total),
930
948
  unique: Object.fromEntries(y.unique)
931
949
  }
932
950
  }
933
951
  },
934
952
  atrules: {
935
953
  fontface: k({
936
- total: Pe,
937
- totalUnique: Pe,
938
- unique: ie,
939
- uniquenessRatio: Pe === 0 ? 0 : 1
954
+ total: Oe,
955
+ totalUnique: Oe,
956
+ unique: se,
957
+ uniquenessRatio: Oe === 0 ? 0 : 1
940
958
  }, e ? {
941
- uniqueWithLocations: Ue.c().uniqueWithLocations
959
+ uniqueWithLocations: He.c().uniqueWithLocations
942
960
  } : {}),
943
- import: Ie.c(),
961
+ import: Ve.c(),
944
962
  media: k(
945
- He.c(),
963
+ We.c(),
946
964
  {
947
- browserhacks: Ve.c()
965
+ browserhacks: Ke.c(),
966
+ features: je.c()
948
967
  }
949
968
  ),
950
- charset: We.c(),
969
+ charset: Be.c(),
951
970
  supports: k(
952
- se.c(),
971
+ ne.c(),
953
972
  {
954
- browserhacks: Ke.c()
973
+ browserhacks: Ye.c()
955
974
  }
956
975
  ),
957
976
  keyframes: k(
958
- le.c(),
977
+ ae.c(),
959
978
  {
960
979
  prefixed: k(
961
- ne.c(),
980
+ oe.c(),
962
981
  {
963
- ratio: x(ne.size(), le.size())
982
+ ratio: C(oe.size(), ae.size())
964
983
  }
965
984
  )
966
985
  }
967
986
  ),
968
- container: je.c(),
969
- layer: re.c(),
970
- property: Be.c(),
971
- total: ee,
972
- complexity: gt
987
+ container: k(
988
+ Ge.c(),
989
+ {
990
+ names: Q.c()
991
+ }
992
+ ),
993
+ layer: le.c(),
994
+ property: Qe.c(),
995
+ total: ie,
996
+ complexity: wt
973
997
  },
974
998
  rules: {
975
- total: ae,
999
+ total: ue,
976
1000
  empty: {
977
- total: oe,
978
- ratio: x(oe, ae)
1001
+ total: ce,
1002
+ ratio: C(ce, ue)
979
1003
  },
980
1004
  sizes: k(
981
- ue.aggregate(),
1005
+ fe.aggregate(),
982
1006
  {
983
- items: ue.toArray()
1007
+ items: fe.toArray()
984
1008
  },
985
- Ye.c()
1009
+ Ne.c()
986
1010
  ),
987
1011
  selectors: k(
988
- ce.aggregate(),
1012
+ pe.aggregate(),
989
1013
  {
990
- items: ce.toArray()
1014
+ items: pe.toArray()
991
1015
  },
992
- Ge.c()
1016
+ Ze.c()
993
1017
  ),
994
1018
  declarations: k(
995
- fe.aggregate(),
1019
+ he.aggregate(),
996
1020
  {
997
- items: fe.toArray()
1021
+ items: he.toArray()
998
1022
  },
999
- Qe.c()
1023
+ Je.c()
1000
1024
  )
1001
1025
  },
1002
1026
  selectors: {
1003
1027
  total: H,
1004
- totalUnique: ht,
1005
- uniquenessRatio: x(ht, H),
1028
+ totalUnique: dt,
1029
+ uniquenessRatio: C(dt, H),
1006
1030
  specificity: k(
1007
1031
  {
1008
1032
  /** @type Specificity */
@@ -1010,112 +1034,112 @@ function yi(i, t = {}) {
1010
1034
  /** @type Specificity */
1011
1035
  max: T === void 0 ? [0, 0, 0] : T,
1012
1036
  /** @type Specificity */
1013
- sum: [ve.sum, qe.sum, Ae.sum],
1037
+ sum: [Ae.sum, Pe.sum, Le.sum],
1014
1038
  /** @type Specificity */
1015
- mean: [ve.mean, qe.mean, Ae.mean],
1039
+ mean: [Ae.mean, Pe.mean, Le.mean],
1016
1040
  /** @type Specificity */
1017
- mode: [ve.mode, qe.mode, Ae.mode],
1041
+ mode: [Ae.mode, Pe.mode, Le.mode],
1018
1042
  /** @type Specificity */
1019
- items: tt
1043
+ items: st
1020
1044
  },
1021
- Ne.c()
1045
+ it.c()
1022
1046
  ),
1023
1047
  complexity: k(
1024
- dt,
1025
- et.c(),
1048
+ kt,
1049
+ rt.c(),
1026
1050
  {
1027
- items: G.toArray()
1051
+ items: N.toArray()
1028
1052
  }
1029
1053
  ),
1030
1054
  id: k(
1031
- me.c(),
1055
+ de.c(),
1032
1056
  {
1033
- ratio: x(me.size(), H)
1057
+ ratio: C(de.size(), H)
1034
1058
  }
1035
1059
  ),
1036
- pseudoClasses: it.c(),
1060
+ pseudoClasses: lt.c(),
1037
1061
  accessibility: k(
1038
- ge.c(),
1062
+ ye.c(),
1039
1063
  {
1040
- ratio: x(ge.size(), H)
1064
+ ratio: C(ye.size(), H)
1041
1065
  }
1042
1066
  ),
1043
- keyframes: pe.c(),
1067
+ keyframes: me.c(),
1044
1068
  prefixed: k(
1045
- he.c(),
1069
+ ge.c(),
1046
1070
  {
1047
- ratio: x(he.size(), H)
1071
+ ratio: C(ge.size(), H)
1048
1072
  }
1049
1073
  ),
1050
- combinators: rt.c()
1074
+ combinators: nt.c()
1051
1075
  },
1052
1076
  declarations: {
1053
1077
  total: W,
1054
- totalUnique: pt,
1055
- uniquenessRatio: x(pt, W),
1078
+ totalUnique: gt,
1079
+ uniquenessRatio: C(gt, W),
1056
1080
  importants: {
1057
- total: Q,
1058
- ratio: x(Q, W),
1081
+ total: Z,
1082
+ ratio: C(Z, W),
1059
1083
  inKeyframes: {
1060
- total: de,
1061
- ratio: x(de, Q)
1084
+ total: we,
1085
+ ratio: C(we, Z)
1062
1086
  }
1063
1087
  },
1064
- complexity: yt
1088
+ complexity: bt
1065
1089
  },
1066
1090
  properties: k(
1067
1091
  K.c(),
1068
1092
  {
1069
1093
  prefixed: k(
1070
- ke.c(),
1094
+ xe.c(),
1071
1095
  {
1072
- ratio: x(ke.size(), K.size())
1096
+ ratio: C(xe.size(), K.size())
1073
1097
  }
1074
1098
  ),
1075
1099
  custom: k(
1076
- Z.c(),
1100
+ J.c(),
1077
1101
  {
1078
- ratio: x(Z.size(), K.size()),
1102
+ ratio: C(J.size(), K.size()),
1079
1103
  importants: k(
1080
- ye.c(),
1104
+ ke.c(),
1081
1105
  {
1082
- ratio: x(ye.size(), Z.size())
1106
+ ratio: C(ke.size(), J.size())
1083
1107
  }
1084
1108
  )
1085
1109
  }
1086
1110
  ),
1087
1111
  browserhacks: k(
1088
- we.c(),
1112
+ be.c(),
1089
1113
  {
1090
- ratio: x(we.size(), K.size())
1114
+ ratio: C(be.size(), K.size())
1091
1115
  }
1092
1116
  ),
1093
- complexity: wt
1117
+ complexity: xt
1094
1118
  }
1095
1119
  ),
1096
1120
  values: {
1097
1121
  colors: k(
1098
- U.count(),
1122
+ I.count(),
1099
1123
  {
1100
- formats: I.c()
1124
+ formats: U.c()
1101
1125
  }
1102
1126
  ),
1103
- gradients: ct.c(),
1104
- fontFamilies: Ce.c(),
1105
- fontSizes: ze.c(),
1106
- lineHeights: _e.c(),
1107
- zindexes: at.c(),
1108
- textShadows: ot.c(),
1109
- boxShadows: ut.c(),
1110
- borderRadiuses: ft.count(),
1127
+ gradients: ht.c(),
1128
+ fontFamilies: _e.c(),
1129
+ fontSizes: Se.c(),
1130
+ lineHeights: ve.c(),
1131
+ zindexes: ct.c(),
1132
+ textShadows: ft.c(),
1133
+ boxShadows: pt.c(),
1134
+ borderRadiuses: mt.count(),
1111
1135
  animations: {
1112
- durations: X.c(),
1113
- timingFunctions: J.c()
1136
+ durations: $.c(),
1137
+ timingFunctions: X.c()
1114
1138
  },
1115
- prefixes: nt.c(),
1116
- browserhacks: xe.c(),
1117
- units: Se.count(),
1118
- complexity: kt,
1139
+ prefixes: ut.c(),
1140
+ browserhacks: ze.c(),
1141
+ units: qe.count(),
1142
+ complexity: Ct,
1119
1143
  keywords: B.c()
1120
1144
  },
1121
1145
  __meta__: {
@@ -1125,18 +1149,18 @@ function yi(i, t = {}) {
1125
1149
  }
1126
1150
  };
1127
1151
  }
1128
- function zt(i, t) {
1152
+ function qt(i, t) {
1129
1153
  return i[0] === t[0] ? i[1] === t[1] ? t[2] - i[2] : t[1] - i[1] : t[0] - i[0];
1130
1154
  }
1131
1155
  export {
1132
- yi as analyze,
1133
- zt as compareSpecificity,
1156
+ xi as analyze,
1157
+ qt as compareSpecificity,
1134
1158
  D as hasVendorPrefix,
1135
- Lt as isAccessibilitySelector,
1136
- Yt as isMediaBrowserhack,
1137
- oi as isPropertyHack,
1138
- Gt as isSelectorPrefixed,
1139
- Bt as isSupportsBrowserhack,
1140
- Rt as isValuePrefixed,
1141
- Ot as selectorComplexity
1159
+ Dt as isAccessibilitySelector,
1160
+ Zt as isMediaBrowserhack,
1161
+ pi as isPropertyHack,
1162
+ Jt as isSelectorPrefixed,
1163
+ Nt as isSupportsBrowserhack,
1164
+ Tt as isValuePrefixed,
1165
+ Ft as selectorComplexity
1142
1166
  };
package/dist/index.d.ts CHANGED
@@ -105,6 +105,21 @@ export function analyze(css: string, options?: Options): {
105
105
  } | {
106
106
  uniqueWithLocations?: undefined;
107
107
  });
108
+ features: {
109
+ total: number;
110
+ totalUnique: number;
111
+ uniquenessRatio: number;
112
+ unique: Record<string, number>;
113
+ } & ({
114
+ uniqueWithLocations: Record<string, {
115
+ line: number;
116
+ column: number;
117
+ offset: number;
118
+ length: number;
119
+ }[]>;
120
+ } | {
121
+ uniqueWithLocations?: undefined;
122
+ });
108
123
  };
109
124
  charset: {
110
125
  total: number;
@@ -185,7 +200,7 @@ export function analyze(css: string, options?: Options): {
185
200
  ratio: number;
186
201
  };
187
202
  };
188
- container: {
203
+ container: ({
189
204
  total: number;
190
205
  totalUnique: number;
191
206
  uniquenessRatio: number;
@@ -199,7 +214,23 @@ export function analyze(css: string, options?: Options): {
199
214
  }[]>;
200
215
  } | {
201
216
  uniqueWithLocations?: undefined;
202
- });
217
+ })) & {
218
+ names: {
219
+ total: number;
220
+ totalUnique: number;
221
+ uniquenessRatio: number;
222
+ unique: Record<string, number>;
223
+ } & ({
224
+ uniqueWithLocations: Record<string, {
225
+ line: number;
226
+ column: number;
227
+ offset: number;
228
+ length: number;
229
+ }[]>;
230
+ } | {
231
+ uniqueWithLocations?: undefined;
232
+ });
233
+ };
203
234
  layer: {
204
235
  total: number;
205
236
  totalUnique: number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@projectwallace/css-analyzer",
3
3
  "description": "The best CSS analyzer out there. Check design tokens, complexity, specificity, performance and more.",
4
- "version": "7.0.2",
4
+ "version": "7.1.1",
5
5
  "author": "Bart Veneman",
6
6
  "repository": {
7
7
  "type": "git",
@@ -45,7 +45,7 @@
45
45
  "code"
46
46
  ],
47
47
  "dependencies": {
48
- "@bramus/specificity": "^2.4.1",
48
+ "@bramus/specificity": "^2.4.2",
49
49
  "css-tree": "^3.1.0"
50
50
  },
51
51
  "devDependencies": {