@drskillissue/ganko 0.1.17 → 0.1.19

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.
@@ -13,7 +13,7 @@ import {
13
13
  rules3,
14
14
  runCrossFileRules,
15
15
  runPhases
16
- } from "./chunk-OYGFWDEL.js";
16
+ } from "./chunk-LGHIMW4P.js";
17
17
  import "./chunk-EGRHWZRV.js";
18
18
 
19
19
  // src/eslint-adapter.ts
package/dist/index.cjs CHANGED
@@ -2805,6 +2805,26 @@ var GraphCache = class {
2805
2805
  this.solidGeneration++;
2806
2806
  if (this.log.enabled) this.log.debug(`setSolidGraph: ${key} v=${version} (${this.solids.size} total) solidGen=${this.solidGeneration}`);
2807
2807
  }
2808
+ /**
2809
+ * Get a cached SolidGraph without building on miss.
2810
+ *
2811
+ * Returns the cached graph if the version matches, null otherwise.
2812
+ * Use when the caller has already confirmed the entry exists via
2813
+ * `hasSolidGraph` and wants to avoid allocating a builder closure.
2814
+ *
2815
+ * @param path Absolute file path
2816
+ * @param version Script version string from the TS project service
2817
+ */
2818
+ getCachedSolidGraph(path, version) {
2819
+ const key = canonicalPath(path);
2820
+ const cached = this.solids.get(key);
2821
+ if (cached !== void 0 && cached.version === version) {
2822
+ if (this.log.enabled) this.log.debug(`getCachedSolidGraph HIT: ${key} v=${version}`);
2823
+ return cached.graph;
2824
+ }
2825
+ if (this.log.enabled) this.log.debug(`getCachedSolidGraph MISS: ${key} v=${version}`);
2826
+ return null;
2827
+ }
2808
2828
  /**
2809
2829
  * Get or build a SolidGraph for a file path.
2810
2830
  *
@@ -29273,7 +29293,8 @@ var cssRequireReducedMotionOverride = defineCSSRule({
29273
29293
  for (let j = 0; j < resolved.length; j++) {
29274
29294
  const sel = resolved[j];
29275
29295
  if (!sel) continue;
29276
- reduced.add(`${normalizeSelector2(sel)}|${group}`);
29296
+ const key = `${normalizeSelector2(sel)}|${group}`;
29297
+ reduced.add(key);
29277
29298
  }
29278
29299
  }
29279
29300
  for (let i = 0; i < motionDecls.length; i++) {
@@ -29292,7 +29313,8 @@ var cssRequireReducedMotionOverride = defineCSSRule({
29292
29313
  for (let j = 0; j < resolved.length; j++) {
29293
29314
  const sel = resolved[j];
29294
29315
  if (!sel) continue;
29295
- if (reduced.has(`${normalizeSelector2(sel)}|${group}`)) {
29316
+ const key = `${normalizeSelector2(sel)}|${group}`;
29317
+ if (reduced.has(key)) {
29296
29318
  covered = true;
29297
29319
  break;
29298
29320
  }
@@ -30700,6 +30722,16 @@ function readKnownNormalizedWithGuard(snapshot, name) {
30700
30722
  if (!value2) return null;
30701
30723
  return value2.normalized;
30702
30724
  }
30725
+ function isLayoutHidden(node, snapshotByElementNode) {
30726
+ if (node.attributes.has("hidden")) return true;
30727
+ if (node.classTokenSet.has("hidden")) return true;
30728
+ const snapshot = snapshotByElementNode.get(node);
30729
+ if (snapshot) {
30730
+ const display = readKnownNormalized(snapshot, "display");
30731
+ if (display === "none") return true;
30732
+ }
30733
+ return false;
30734
+ }
30703
30735
  function hasEffectivePosition(snapshot) {
30704
30736
  const position = readKnownNormalized(snapshot, "position");
30705
30737
  if (position === null) return false;
@@ -34626,6 +34658,10 @@ function collectCohortMetrics(input) {
34626
34658
  const node = input.children[i];
34627
34659
  if (!node) continue;
34628
34660
  const childSnapshot = input.snapshotByElementNode.get(node);
34661
+ if (isLayoutHidden(node, input.snapshotByElementNode)) {
34662
+ excluded.add(node.key);
34663
+ continue;
34664
+ }
34629
34665
  if (childSnapshot && isUnconditionallyOutOfFlow(childSnapshot)) {
34630
34666
  excluded.add(node.key);
34631
34667
  continue;
@@ -35512,6 +35548,7 @@ function resolveMeasurementCandidates(root, childrenByParentNode, snapshotByElem
35512
35548
  for (let i = 0; i < children.length; i++) {
35513
35549
  const child = children[i];
35514
35550
  if (!child) continue;
35551
+ if (isLayoutHidden(child, snapshotByElementNode)) continue;
35515
35552
  if (firstControlOrReplacedDescendant === null && (child.isControl || child.isReplaced)) {
35516
35553
  firstControlOrReplacedDescendant = child;
35517
35554
  }