@gemx-dev/clarity-visualize 0.8.65 → 0.8.67

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.
@@ -151,19 +151,16 @@ function get$1(input, type) {
151
151
  selectorMap[key].push(input.id);
152
152
  }
153
153
  selector = "".concat(key).concat("~" /* Constant.Tilde */).concat(selectorMap[key].indexOf(input.id));
154
- console.log("\uD83D\uDE80 \uD83D\uDC25 ~ get ~ selector:", selector);
155
154
  }
156
155
  else {
157
156
  // In Beta mode, we continue to look at query selectors in context of the full page
158
157
  selector = "".concat(prefix).concat(input.tag, ".").concat(classes).concat(suffix);
159
- console.log("\uD83D\uDE80 \uD83D\uDC25 ~ get ~ selector:", selector);
160
158
  }
161
159
  }
162
160
  // Update selector to use "id" field when available. There are two exceptions:
163
161
  // (1) if "id" appears to be an auto generated string token, e.g. guid or a random id containing digits
164
162
  // (2) if "id" appears inside a shadow DOM, in which case we continue to prefix up to shadow DOM to prevent conflicts
165
163
  selector = id && filter(id) ? "".concat(getDomPrefix(prefix)).concat("#" /* Constant.Hash */).concat(id) : selector;
166
- console.log("\uD83D\uDE80 \uD83D\uDC25 ~ get ~ selector:", selector);
167
164
  return selector;
168
165
  }
169
166
  }
@@ -191,7 +188,6 @@ function filter(value) {
191
188
  return false;
192
189
  } // Do not process empty strings
193
190
  var excludeClassNames = getExcludeClassNames();
194
- console.log("\uD83D\uDE80 \uD83D\uDC25 ~ filter ~ excludeClassNames:", excludeClassNames);
195
191
  if (excludeClassNames.some(function (x) { return value.toLowerCase().indexOf(x) >= 0; })) {
196
192
  return false;
197
193
  }
@@ -204,8 +200,6 @@ function filter(value) {
204
200
  return true;
205
201
  }
206
202
  function getExcludeClassNames() {
207
- console.log("\uD83D\uDE80 \uD83D\uDC25 ~ getExcludeClassNames ~ extraExcludeClassNames:", extraExcludeClassNames);
208
- console.log("\uD83D\uDE80 \uD83D\uDC25 ~ getExcludeClassNames ~ excludeClassNames:", excludeClassNames);
209
203
  return __spreadArray(__spreadArray([], excludeClassNames, true), extraExcludeClassNames, true);
210
204
  }
211
205
 
@@ -998,7 +992,9 @@ var HeatmapHelper = /** @class */ (function () {
998
992
  if (e.tagName === "CANVAS" /* Constant.Canvas */ || (e.id && e.id.indexOf("clarity-" /* Constant.ClarityPrefix */) === 0)) {
999
993
  continue;
1000
994
  }
1001
- visibility = e === el;
995
+ // Consider visible if the top element is the element itself OR a descendant of it
996
+ // (e.g. a BUTTON containing P/SPAN children — children will appear on top in elementsFromPoint)
997
+ visibility = e === el || el.contains(e);
1002
998
  shadowElement = e.shadowRoot && e.shadowRoot != doc ? e.shadowRoot : null;
1003
999
  break;
1004
1000
  }
@@ -1058,7 +1054,7 @@ var HeatmapHelper = /** @class */ (function () {
1058
1054
  return canvas;
1059
1055
  }
1060
1056
  catch (error) {
1061
- console.error("\uD83D\uDE80 \uD83D\uDC25 ~ HeatmapHelper ~ createPortalCanvas:", error);
1057
+ console.error("[Heatmap] createPortalCanvas:", error);
1062
1058
  }
1063
1059
  return null;
1064
1060
  };