@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.
@@ -28929,7 +28929,8 @@ var cssRequireReducedMotionOverride = defineCSSRule({
28929
28929
  for (let j = 0; j < resolved.length; j++) {
28930
28930
  const sel = resolved[j];
28931
28931
  if (!sel) continue;
28932
- reduced.add(`${normalizeSelector2(sel)}|${group}`);
28932
+ const key = `${normalizeSelector2(sel)}|${group}`;
28933
+ reduced.add(key);
28933
28934
  }
28934
28935
  }
28935
28936
  for (let i = 0; i < motionDecls.length; i++) {
@@ -28948,7 +28949,8 @@ var cssRequireReducedMotionOverride = defineCSSRule({
28948
28949
  for (let j = 0; j < resolved.length; j++) {
28949
28950
  const sel = resolved[j];
28950
28951
  if (!sel) continue;
28951
- if (reduced.has(`${normalizeSelector2(sel)}|${group}`)) {
28952
+ const key = `${normalizeSelector2(sel)}|${group}`;
28953
+ if (reduced.has(key)) {
28952
28954
  covered = true;
28953
28955
  break;
28954
28956
  }
@@ -29926,6 +29928,16 @@ function readKnownNormalizedWithGuard(snapshot, name) {
29926
29928
  if (!value2) return null;
29927
29929
  return value2.normalized;
29928
29930
  }
29931
+ function isLayoutHidden(node, snapshotByElementNode) {
29932
+ if (node.attributes.has("hidden")) return true;
29933
+ if (node.classTokenSet.has("hidden")) return true;
29934
+ const snapshot = snapshotByElementNode.get(node);
29935
+ if (snapshot) {
29936
+ const display = readKnownNormalized(snapshot, "display");
29937
+ if (display === "none") return true;
29938
+ }
29939
+ return false;
29940
+ }
29929
29941
  function hasEffectivePosition(snapshot) {
29930
29942
  const position = readKnownNormalized(snapshot, "position");
29931
29943
  if (position === null) return false;
@@ -33901,6 +33913,10 @@ function collectCohortMetrics(input) {
33901
33913
  const node = input.children[i];
33902
33914
  if (!node) continue;
33903
33915
  const childSnapshot = input.snapshotByElementNode.get(node);
33916
+ if (isLayoutHidden(node, input.snapshotByElementNode)) {
33917
+ excluded.add(node.key);
33918
+ continue;
33919
+ }
33904
33920
  if (childSnapshot && isUnconditionallyOutOfFlow(childSnapshot)) {
33905
33921
  excluded.add(node.key);
33906
33922
  continue;
@@ -34787,6 +34803,7 @@ function resolveMeasurementCandidates(root, childrenByParentNode, snapshotByElem
34787
34803
  for (let i = 0; i < children.length; i++) {
34788
34804
  const child = children[i];
34789
34805
  if (!child) continue;
34806
+ if (isLayoutHidden(child, snapshotByElementNode)) continue;
34790
34807
  if (firstControlOrReplacedDescendant === null && (child.isControl || child.isReplaced)) {
34791
34808
  firstControlOrReplacedDescendant = child;
34792
34809
  }