hyperframes 0.7.78 → 0.7.80

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.
@@ -105,6 +105,10 @@
105
105
  return !!element.closest("[data-layout-allow-overflow]");
106
106
  }
107
107
 
108
+ function hasAllowCaptionZoneFlag(element) {
109
+ return !!element.closest("[data-layout-allow-caption-zone]");
110
+ }
111
+
108
112
  function hasTextClipOptOut(element) {
109
113
  return hasAllowOverflowFlag(element) || element.hasAttribute("data-layout-bleed");
110
114
  }
@@ -1396,7 +1400,7 @@
1396
1400
  }
1397
1401
  if (!isVisibleElement(element, 0.05, false)) continue;
1398
1402
  const elementRect = toRect(element.getBoundingClientRect());
1399
- if (includeText && hasOwnTextCandidate(element, true)) {
1403
+ if (includeText && hasOwnTextCandidate(element, true) && !hasAllowCaptionZoneFlag(element)) {
1400
1404
  const rect = textRectFor(element, true);
1401
1405
  if (rect) {
1402
1406
  candidates.push(