@riddledc/riddle-proof 0.7.53 → 0.7.54

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.
@@ -2516,7 +2516,7 @@ async function frameEvidence(selector) {
2516
2516
  const scrollWidth = documentElement ? documentElement.scrollWidth : 0;
2517
2517
  const viewportWidth = clientWidth || window.innerWidth;
2518
2518
  const overflowOffenders = [];
2519
- function isContainedByHorizontalScroller(element) {
2519
+ function isHandledByHorizontalOverflowAncestor(element, rect) {
2520
2520
  let current = element.parentElement;
2521
2521
  while (current && current !== body && current !== documentElement) {
2522
2522
  const style = window.getComputedStyle(current);
@@ -2526,6 +2526,11 @@ async function frameEvidence(selector) {
2526
2526
  const contained = currentRect.left >= -0.5 && currentRect.right <= viewportWidth + 0.5;
2527
2527
  if (contained) return true;
2528
2528
  }
2529
+ if (overflowX === "hidden" || overflowX === "clip" || style.overflow === "hidden" || style.overflow === "clip") {
2530
+ const currentRect = current.getBoundingClientRect();
2531
+ const clippedByAncestor = rect.left < currentRect.left - 0.5 || rect.right > currentRect.right + 0.5;
2532
+ if (clippedByAncestor) return true;
2533
+ }
2529
2534
  current = current.parentElement;
2530
2535
  }
2531
2536
  return false;
@@ -2539,7 +2544,7 @@ async function frameEvidence(selector) {
2539
2544
  const rightOverflow = Math.max(0, rect.right - viewportWidth);
2540
2545
  const overflow = Math.max(leftOverflow, rightOverflow);
2541
2546
  if (overflow <= 0.5) continue;
2542
- if (isContainedByHorizontalScroller(element)) continue;
2547
+ if (isHandledByHorizontalOverflowAncestor(element, rect)) continue;
2543
2548
  const tag = element.tagName ? element.tagName.toLowerCase() : "element";
2544
2549
  const id = element.id ? "#" + element.id : "";
2545
2550
  const className = typeof element.className === "string"
@@ -2919,7 +2924,7 @@ async function captureViewport(viewport) {
2919
2924
  const scrollWidth = documentElement ? documentElement.scrollWidth : 0;
2920
2925
  const viewportWidth = clientWidth || window.innerWidth;
2921
2926
  const overflowOffenders = [];
2922
- function isContainedByHorizontalScroller(element) {
2927
+ function isHandledByHorizontalOverflowAncestor(element, rect) {
2923
2928
  let current = element.parentElement;
2924
2929
  while (current && current !== body && current !== documentElement) {
2925
2930
  const style = window.getComputedStyle(current);
@@ -2929,6 +2934,11 @@ async function captureViewport(viewport) {
2929
2934
  const contained = currentRect.left >= -0.5 && currentRect.right <= viewportWidth + 0.5;
2930
2935
  if (contained) return true;
2931
2936
  }
2937
+ if (overflowX === "hidden" || overflowX === "clip" || style.overflow === "hidden" || style.overflow === "clip") {
2938
+ const currentRect = current.getBoundingClientRect();
2939
+ const clippedByAncestor = rect.left < currentRect.left - 0.5 || rect.right > currentRect.right + 0.5;
2940
+ if (clippedByAncestor) return true;
2941
+ }
2932
2942
  current = current.parentElement;
2933
2943
  }
2934
2944
  return false;
@@ -2942,7 +2952,7 @@ async function captureViewport(viewport) {
2942
2952
  const rightOverflow = Math.max(0, rect.right - viewportWidth);
2943
2953
  const overflow = Math.max(leftOverflow, rightOverflow);
2944
2954
  if (overflow <= 0.5) continue;
2945
- if (isContainedByHorizontalScroller(element)) continue;
2955
+ if (isHandledByHorizontalOverflowAncestor(element, rect)) continue;
2946
2956
  const tag = element.tagName ? element.tagName.toLowerCase() : "element";
2947
2957
  const id = element.id ? "#" + element.id : "";
2948
2958
  const className = typeof element.className === "string"
package/dist/cli.cjs CHANGED
@@ -9373,7 +9373,7 @@ async function frameEvidence(selector) {
9373
9373
  const scrollWidth = documentElement ? documentElement.scrollWidth : 0;
9374
9374
  const viewportWidth = clientWidth || window.innerWidth;
9375
9375
  const overflowOffenders = [];
9376
- function isContainedByHorizontalScroller(element) {
9376
+ function isHandledByHorizontalOverflowAncestor(element, rect) {
9377
9377
  let current = element.parentElement;
9378
9378
  while (current && current !== body && current !== documentElement) {
9379
9379
  const style = window.getComputedStyle(current);
@@ -9383,6 +9383,11 @@ async function frameEvidence(selector) {
9383
9383
  const contained = currentRect.left >= -0.5 && currentRect.right <= viewportWidth + 0.5;
9384
9384
  if (contained) return true;
9385
9385
  }
9386
+ if (overflowX === "hidden" || overflowX === "clip" || style.overflow === "hidden" || style.overflow === "clip") {
9387
+ const currentRect = current.getBoundingClientRect();
9388
+ const clippedByAncestor = rect.left < currentRect.left - 0.5 || rect.right > currentRect.right + 0.5;
9389
+ if (clippedByAncestor) return true;
9390
+ }
9386
9391
  current = current.parentElement;
9387
9392
  }
9388
9393
  return false;
@@ -9396,7 +9401,7 @@ async function frameEvidence(selector) {
9396
9401
  const rightOverflow = Math.max(0, rect.right - viewportWidth);
9397
9402
  const overflow = Math.max(leftOverflow, rightOverflow);
9398
9403
  if (overflow <= 0.5) continue;
9399
- if (isContainedByHorizontalScroller(element)) continue;
9404
+ if (isHandledByHorizontalOverflowAncestor(element, rect)) continue;
9400
9405
  const tag = element.tagName ? element.tagName.toLowerCase() : "element";
9401
9406
  const id = element.id ? "#" + element.id : "";
9402
9407
  const className = typeof element.className === "string"
@@ -9776,7 +9781,7 @@ async function captureViewport(viewport) {
9776
9781
  const scrollWidth = documentElement ? documentElement.scrollWidth : 0;
9777
9782
  const viewportWidth = clientWidth || window.innerWidth;
9778
9783
  const overflowOffenders = [];
9779
- function isContainedByHorizontalScroller(element) {
9784
+ function isHandledByHorizontalOverflowAncestor(element, rect) {
9780
9785
  let current = element.parentElement;
9781
9786
  while (current && current !== body && current !== documentElement) {
9782
9787
  const style = window.getComputedStyle(current);
@@ -9786,6 +9791,11 @@ async function captureViewport(viewport) {
9786
9791
  const contained = currentRect.left >= -0.5 && currentRect.right <= viewportWidth + 0.5;
9787
9792
  if (contained) return true;
9788
9793
  }
9794
+ if (overflowX === "hidden" || overflowX === "clip" || style.overflow === "hidden" || style.overflow === "clip") {
9795
+ const currentRect = current.getBoundingClientRect();
9796
+ const clippedByAncestor = rect.left < currentRect.left - 0.5 || rect.right > currentRect.right + 0.5;
9797
+ if (clippedByAncestor) return true;
9798
+ }
9789
9799
  current = current.parentElement;
9790
9800
  }
9791
9801
  return false;
@@ -9799,7 +9809,7 @@ async function captureViewport(viewport) {
9799
9809
  const rightOverflow = Math.max(0, rect.right - viewportWidth);
9800
9810
  const overflow = Math.max(leftOverflow, rightOverflow);
9801
9811
  if (overflow <= 0.5) continue;
9802
- if (isContainedByHorizontalScroller(element)) continue;
9812
+ if (isHandledByHorizontalOverflowAncestor(element, rect)) continue;
9803
9813
  const tag = element.tagName ? element.tagName.toLowerCase() : "element";
9804
9814
  const id = element.id ? "#" + element.id : "";
9805
9815
  const className = typeof element.className === "string"
package/dist/cli.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  profileStatusExitCode,
11
11
  resolveRiddleProofProfileTargetUrl,
12
12
  resolveRiddleProofProfileTimeoutSec
13
- } from "./chunk-IKT7AKZN.js";
13
+ } from "./chunk-H3DOYKAQ.js";
14
14
  import {
15
15
  createRiddleApiClient,
16
16
  parseRiddleViewport
package/dist/index.cjs CHANGED
@@ -11230,7 +11230,7 @@ async function frameEvidence(selector) {
11230
11230
  const scrollWidth = documentElement ? documentElement.scrollWidth : 0;
11231
11231
  const viewportWidth = clientWidth || window.innerWidth;
11232
11232
  const overflowOffenders = [];
11233
- function isContainedByHorizontalScroller(element) {
11233
+ function isHandledByHorizontalOverflowAncestor(element, rect) {
11234
11234
  let current = element.parentElement;
11235
11235
  while (current && current !== body && current !== documentElement) {
11236
11236
  const style = window.getComputedStyle(current);
@@ -11240,6 +11240,11 @@ async function frameEvidence(selector) {
11240
11240
  const contained = currentRect.left >= -0.5 && currentRect.right <= viewportWidth + 0.5;
11241
11241
  if (contained) return true;
11242
11242
  }
11243
+ if (overflowX === "hidden" || overflowX === "clip" || style.overflow === "hidden" || style.overflow === "clip") {
11244
+ const currentRect = current.getBoundingClientRect();
11245
+ const clippedByAncestor = rect.left < currentRect.left - 0.5 || rect.right > currentRect.right + 0.5;
11246
+ if (clippedByAncestor) return true;
11247
+ }
11243
11248
  current = current.parentElement;
11244
11249
  }
11245
11250
  return false;
@@ -11253,7 +11258,7 @@ async function frameEvidence(selector) {
11253
11258
  const rightOverflow = Math.max(0, rect.right - viewportWidth);
11254
11259
  const overflow = Math.max(leftOverflow, rightOverflow);
11255
11260
  if (overflow <= 0.5) continue;
11256
- if (isContainedByHorizontalScroller(element)) continue;
11261
+ if (isHandledByHorizontalOverflowAncestor(element, rect)) continue;
11257
11262
  const tag = element.tagName ? element.tagName.toLowerCase() : "element";
11258
11263
  const id = element.id ? "#" + element.id : "";
11259
11264
  const className = typeof element.className === "string"
@@ -11633,7 +11638,7 @@ async function captureViewport(viewport) {
11633
11638
  const scrollWidth = documentElement ? documentElement.scrollWidth : 0;
11634
11639
  const viewportWidth = clientWidth || window.innerWidth;
11635
11640
  const overflowOffenders = [];
11636
- function isContainedByHorizontalScroller(element) {
11641
+ function isHandledByHorizontalOverflowAncestor(element, rect) {
11637
11642
  let current = element.parentElement;
11638
11643
  while (current && current !== body && current !== documentElement) {
11639
11644
  const style = window.getComputedStyle(current);
@@ -11643,6 +11648,11 @@ async function captureViewport(viewport) {
11643
11648
  const contained = currentRect.left >= -0.5 && currentRect.right <= viewportWidth + 0.5;
11644
11649
  if (contained) return true;
11645
11650
  }
11651
+ if (overflowX === "hidden" || overflowX === "clip" || style.overflow === "hidden" || style.overflow === "clip") {
11652
+ const currentRect = current.getBoundingClientRect();
11653
+ const clippedByAncestor = rect.left < currentRect.left - 0.5 || rect.right > currentRect.right + 0.5;
11654
+ if (clippedByAncestor) return true;
11655
+ }
11646
11656
  current = current.parentElement;
11647
11657
  }
11648
11658
  return false;
@@ -11656,7 +11666,7 @@ async function captureViewport(viewport) {
11656
11666
  const rightOverflow = Math.max(0, rect.right - viewportWidth);
11657
11667
  const overflow = Math.max(leftOverflow, rightOverflow);
11658
11668
  if (overflow <= 0.5) continue;
11659
- if (isContainedByHorizontalScroller(element)) continue;
11669
+ if (isHandledByHorizontalOverflowAncestor(element, rect)) continue;
11660
11670
  const tag = element.tagName ? element.tagName.toLowerCase() : "element";
11661
11671
  const id = element.id ? "#" + element.id : "";
11662
11672
  const className = typeof element.className === "string"
package/dist/index.js CHANGED
@@ -58,7 +58,7 @@ import {
58
58
  resolveRiddleProofProfileTimeoutSec,
59
59
  slugifyRiddleProofProfileName,
60
60
  summarizeRiddleProofProfileResult
61
- } from "./chunk-IKT7AKZN.js";
61
+ } from "./chunk-H3DOYKAQ.js";
62
62
  import {
63
63
  DEFAULT_RIDDLE_API_BASE_URL,
64
64
  DEFAULT_RIDDLE_API_KEY_FILE,
package/dist/profile.cjs CHANGED
@@ -2559,7 +2559,7 @@ async function frameEvidence(selector) {
2559
2559
  const scrollWidth = documentElement ? documentElement.scrollWidth : 0;
2560
2560
  const viewportWidth = clientWidth || window.innerWidth;
2561
2561
  const overflowOffenders = [];
2562
- function isContainedByHorizontalScroller(element) {
2562
+ function isHandledByHorizontalOverflowAncestor(element, rect) {
2563
2563
  let current = element.parentElement;
2564
2564
  while (current && current !== body && current !== documentElement) {
2565
2565
  const style = window.getComputedStyle(current);
@@ -2569,6 +2569,11 @@ async function frameEvidence(selector) {
2569
2569
  const contained = currentRect.left >= -0.5 && currentRect.right <= viewportWidth + 0.5;
2570
2570
  if (contained) return true;
2571
2571
  }
2572
+ if (overflowX === "hidden" || overflowX === "clip" || style.overflow === "hidden" || style.overflow === "clip") {
2573
+ const currentRect = current.getBoundingClientRect();
2574
+ const clippedByAncestor = rect.left < currentRect.left - 0.5 || rect.right > currentRect.right + 0.5;
2575
+ if (clippedByAncestor) return true;
2576
+ }
2572
2577
  current = current.parentElement;
2573
2578
  }
2574
2579
  return false;
@@ -2582,7 +2587,7 @@ async function frameEvidence(selector) {
2582
2587
  const rightOverflow = Math.max(0, rect.right - viewportWidth);
2583
2588
  const overflow = Math.max(leftOverflow, rightOverflow);
2584
2589
  if (overflow <= 0.5) continue;
2585
- if (isContainedByHorizontalScroller(element)) continue;
2590
+ if (isHandledByHorizontalOverflowAncestor(element, rect)) continue;
2586
2591
  const tag = element.tagName ? element.tagName.toLowerCase() : "element";
2587
2592
  const id = element.id ? "#" + element.id : "";
2588
2593
  const className = typeof element.className === "string"
@@ -2962,7 +2967,7 @@ async function captureViewport(viewport) {
2962
2967
  const scrollWidth = documentElement ? documentElement.scrollWidth : 0;
2963
2968
  const viewportWidth = clientWidth || window.innerWidth;
2964
2969
  const overflowOffenders = [];
2965
- function isContainedByHorizontalScroller(element) {
2970
+ function isHandledByHorizontalOverflowAncestor(element, rect) {
2966
2971
  let current = element.parentElement;
2967
2972
  while (current && current !== body && current !== documentElement) {
2968
2973
  const style = window.getComputedStyle(current);
@@ -2972,6 +2977,11 @@ async function captureViewport(viewport) {
2972
2977
  const contained = currentRect.left >= -0.5 && currentRect.right <= viewportWidth + 0.5;
2973
2978
  if (contained) return true;
2974
2979
  }
2980
+ if (overflowX === "hidden" || overflowX === "clip" || style.overflow === "hidden" || style.overflow === "clip") {
2981
+ const currentRect = current.getBoundingClientRect();
2982
+ const clippedByAncestor = rect.left < currentRect.left - 0.5 || rect.right > currentRect.right + 0.5;
2983
+ if (clippedByAncestor) return true;
2984
+ }
2975
2985
  current = current.parentElement;
2976
2986
  }
2977
2987
  return false;
@@ -2985,7 +2995,7 @@ async function captureViewport(viewport) {
2985
2995
  const rightOverflow = Math.max(0, rect.right - viewportWidth);
2986
2996
  const overflow = Math.max(leftOverflow, rightOverflow);
2987
2997
  if (overflow <= 0.5) continue;
2988
- if (isContainedByHorizontalScroller(element)) continue;
2998
+ if (isHandledByHorizontalOverflowAncestor(element, rect)) continue;
2989
2999
  const tag = element.tagName ? element.tagName.toLowerCase() : "element";
2990
3000
  const id = element.id ? "#" + element.id : "";
2991
3001
  const className = typeof element.className === "string"
package/dist/profile.js CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  resolveRiddleProofProfileTimeoutSec,
20
20
  slugifyRiddleProofProfileName,
21
21
  summarizeRiddleProofProfileResult
22
- } from "./chunk-IKT7AKZN.js";
22
+ } from "./chunk-H3DOYKAQ.js";
23
23
  export {
24
24
  RIDDLE_PROOF_PROFILE_CHECK_TYPES,
25
25
  RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.7.53",
3
+ "version": "0.7.54",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",