@drskillissue/ganko 0.1.18 → 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.
@@ -24726,7 +24726,8 @@ var cssRequireReducedMotionOverride = defineCSSRule({
24726
24726
  for (let j = 0; j < resolved.length; j++) {
24727
24727
  const sel = resolved[j];
24728
24728
  if (!sel) continue;
24729
- reduced.add(`${normalizeSelector(sel)}|${group}`);
24729
+ const key = `${normalizeSelector(sel)}|${group}`;
24730
+ reduced.add(key);
24730
24731
  }
24731
24732
  }
24732
24733
  for (let i = 0; i < motionDecls.length; i++) {
@@ -24745,7 +24746,8 @@ var cssRequireReducedMotionOverride = defineCSSRule({
24745
24746
  for (let j = 0; j < resolved.length; j++) {
24746
24747
  const sel = resolved[j];
24747
24748
  if (!sel) continue;
24748
- if (reduced.has(`${normalizeSelector(sel)}|${group}`)) {
24749
+ const key = `${normalizeSelector(sel)}|${group}`;
24750
+ if (reduced.has(key)) {
24749
24751
  covered = true;
24750
24752
  break;
24751
24753
  }
@@ -32930,6 +32932,16 @@ function readKnownNormalizedWithGuard(snapshot, name) {
32930
32932
  if (!value2) return null;
32931
32933
  return value2.normalized;
32932
32934
  }
32935
+ function isLayoutHidden(node, snapshotByElementNode) {
32936
+ if (node.attributes.has("hidden")) return true;
32937
+ if (node.classTokenSet.has("hidden")) return true;
32938
+ const snapshot = snapshotByElementNode.get(node);
32939
+ if (snapshot) {
32940
+ const display = readKnownNormalized(snapshot, "display");
32941
+ if (display === "none") return true;
32942
+ }
32943
+ return false;
32944
+ }
32933
32945
  function hasEffectivePosition(snapshot) {
32934
32946
  const position = readKnownNormalized(snapshot, "position");
32935
32947
  if (position === null) return false;
@@ -34142,6 +34154,10 @@ function collectCohortMetrics(input) {
34142
34154
  const node = input.children[i];
34143
34155
  if (!node) continue;
34144
34156
  const childSnapshot = input.snapshotByElementNode.get(node);
34157
+ if (isLayoutHidden(node, input.snapshotByElementNode)) {
34158
+ excluded.add(node.key);
34159
+ continue;
34160
+ }
34145
34161
  if (childSnapshot && isUnconditionallyOutOfFlow(childSnapshot)) {
34146
34162
  excluded.add(node.key);
34147
34163
  continue;
@@ -35028,6 +35044,7 @@ function resolveMeasurementCandidates(root, childrenByParentNode, snapshotByElem
35028
35044
  for (let i = 0; i < children.length; i++) {
35029
35045
  const child = children[i];
35030
35046
  if (!child) continue;
35047
+ if (isLayoutHidden(child, snapshotByElementNode)) continue;
35031
35048
  if (firstControlOrReplacedDescendant === null && (child.isControl || child.isReplaced)) {
35032
35049
  firstControlOrReplacedDescendant = child;
35033
35050
  }
@@ -39893,4 +39910,4 @@ export {
39893
39910
  rules3,
39894
39911
  runCrossFileRules
39895
39912
  };
39896
- //# sourceMappingURL=chunk-OYGFWDEL.js.map
39913
+ //# sourceMappingURL=chunk-LGHIMW4P.js.map