@riddledc/riddle-proof 0.7.21 → 0.7.23

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.
package/dist/profile.cjs CHANGED
@@ -81,6 +81,79 @@ function stringValue(value) {
81
81
  function numberValue(value) {
82
82
  return typeof value === "number" && Number.isFinite(value) ? value : void 0;
83
83
  }
84
+ function horizontalBoundsOverflowPx(value) {
85
+ if (!isRecord(value)) return 0;
86
+ let max = maxPositiveNumber(
87
+ value.overflow_px,
88
+ value.overflow,
89
+ value.bounds_overflow_px,
90
+ value.horizontal_overflow_px,
91
+ value.left_overflow_px,
92
+ value.right_overflow_px
93
+ );
94
+ for (const offender of boundsOffendersForEvidence(value)) {
95
+ max = Math.max(max, horizontalOffenderOverflowPx(offender));
96
+ }
97
+ return roundPixels(max);
98
+ }
99
+ function horizontalOffenderOverflowPx(value) {
100
+ if (!isRecord(value)) return 0;
101
+ let max = maxPositiveNumber(
102
+ value.overflow,
103
+ value.overflow_px,
104
+ value.bounds_overflow_px,
105
+ value.horizontal_overflow_px,
106
+ value.left_overflow_px,
107
+ value.right_overflow_px,
108
+ value.leftOverflowPx,
109
+ value.rightOverflowPx
110
+ );
111
+ const clipped = isRecord(value.clipped || value.clip || value.clipping) ? value.clipped || value.clip || value.clipping : void 0;
112
+ if (isRecord(clipped)) {
113
+ max = Math.max(max, maxPositiveNumber(
114
+ clipped.left,
115
+ clipped.right,
116
+ clipped.left_px,
117
+ clipped.right_px,
118
+ clipped.leftPx,
119
+ clipped.rightPx
120
+ ));
121
+ }
122
+ const rect = isRecord(value.rect || value.bounds || value.bounding_rect || value.boundingRect) ? value.rect || value.bounds || value.bounding_rect || value.boundingRect : void 0;
123
+ const viewportWidth = numberValue(value.viewport_width ?? value.viewportWidth);
124
+ if (isRecord(rect) && viewportWidth !== void 0) {
125
+ const left = numberValue(rect.left);
126
+ const right = numberValue(rect.right);
127
+ if (left !== void 0 && left < 0) max = Math.max(max, Math.abs(left));
128
+ if (right !== void 0 && right > viewportWidth) max = Math.max(max, right - viewportWidth);
129
+ }
130
+ return roundPixels(max);
131
+ }
132
+ function boundsOffendersForEvidence(value) {
133
+ if (!isRecord(value)) return [];
134
+ const offenders = [
135
+ ...Array.isArray(value.overflow_offenders) ? value.overflow_offenders : [],
136
+ ...Array.isArray(value.overflowOffenders) ? value.overflowOffenders : [],
137
+ ...Array.isArray(value.bounds_offenders) ? value.bounds_offenders : [],
138
+ ...Array.isArray(value.boundsOffenders) ? value.boundsOffenders : [],
139
+ ...Array.isArray(value.clipped_elements) ? value.clipped_elements : [],
140
+ ...Array.isArray(value.clippedElements) ? value.clippedElements : [],
141
+ ...Array.isArray(value.clipping_offenders) ? value.clipping_offenders : [],
142
+ ...Array.isArray(value.clippingOffenders) ? value.clippingOffenders : []
143
+ ];
144
+ return offenders.filter((item) => isRecord(item)).sort((a, b) => horizontalOffenderOverflowPx(b) - horizontalOffenderOverflowPx(a));
145
+ }
146
+ function maxPositiveNumber(...values) {
147
+ let max = 0;
148
+ for (const value of values) {
149
+ const number = numberValue(value);
150
+ if (number !== void 0 && number > max) max = number;
151
+ }
152
+ return max;
153
+ }
154
+ function roundPixels(value) {
155
+ return Math.round(value * 100) / 100;
156
+ }
84
157
  function timeoutSecValue(value) {
85
158
  const number = numberValue(value);
86
159
  return number && number > 0 ? Math.ceil(number) : void 0;
@@ -423,7 +496,7 @@ function assessCheckFromEvidence(check, evidence) {
423
496
  message: "No applicable viewport evidence was captured for overflow check."
424
497
  };
425
498
  }
426
- const failed = applicable.filter((viewport) => (viewport.overflow_px ?? 0) > maxOverflow);
499
+ const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx(viewport) > maxOverflow);
427
500
  return {
428
501
  type: check.type,
429
502
  label: checkLabel(check),
@@ -431,9 +504,11 @@ function assessCheckFromEvidence(check, evidence) {
431
504
  evidence: {
432
505
  max_overflow_px: maxOverflow,
433
506
  overflow_px: applicable.map((viewport) => viewport.overflow_px ?? null),
507
+ bounds_overflow_px: applicable.map((viewport) => horizontalBoundsOverflowPx(viewport)),
508
+ overflow_offender_counts: applicable.map((viewport) => boundsOffendersForEvidence(viewport).length),
434
509
  viewports: applicable.map((viewport) => viewport.name)
435
510
  },
436
- message: failed.length ? `Horizontal overflow exceeded ${maxOverflow}px in ${failed.length} viewport(s).` : void 0
511
+ message: failed.length ? `Horizontal bounds overflow exceeded ${maxOverflow}px in ${failed.length} viewport(s).` : void 0
437
512
  };
438
513
  }
439
514
  if (check.type === "no_fatal_console_errors") {
@@ -655,6 +730,77 @@ function textMatches(sample, check) {
655
730
  }
656
731
  return String(sample || "").includes(check.text || "");
657
732
  }
733
+ function numberValue(value) {
734
+ return typeof value === "number" && Number.isFinite(value) ? value : undefined;
735
+ }
736
+ function maxPositiveNumber() {
737
+ let max = 0;
738
+ for (const value of arguments) {
739
+ const number = numberValue(value);
740
+ if (number !== undefined && number > max) max = number;
741
+ }
742
+ return max;
743
+ }
744
+ function roundPixels(value) {
745
+ return Math.round(value * 100) / 100;
746
+ }
747
+ function isRecord(value) {
748
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
749
+ }
750
+ function boundsOffendersForEvidence(value) {
751
+ if (!isRecord(value)) return [];
752
+ const offenders = []
753
+ .concat(Array.isArray(value.overflow_offenders) ? value.overflow_offenders : [])
754
+ .concat(Array.isArray(value.overflowOffenders) ? value.overflowOffenders : [])
755
+ .concat(Array.isArray(value.bounds_offenders) ? value.bounds_offenders : [])
756
+ .concat(Array.isArray(value.boundsOffenders) ? value.boundsOffenders : [])
757
+ .concat(Array.isArray(value.clipped_elements) ? value.clipped_elements : [])
758
+ .concat(Array.isArray(value.clippedElements) ? value.clippedElements : [])
759
+ .concat(Array.isArray(value.clipping_offenders) ? value.clipping_offenders : [])
760
+ .concat(Array.isArray(value.clippingOffenders) ? value.clippingOffenders : []);
761
+ return offenders.filter(isRecord).sort((a, b) => horizontalOffenderOverflowPx(b) - horizontalOffenderOverflowPx(a));
762
+ }
763
+ function horizontalOffenderOverflowPx(value) {
764
+ if (!isRecord(value)) return 0;
765
+ let max = maxPositiveNumber(
766
+ value.overflow,
767
+ value.overflow_px,
768
+ value.bounds_overflow_px,
769
+ value.horizontal_overflow_px,
770
+ value.left_overflow_px,
771
+ value.right_overflow_px,
772
+ value.leftOverflowPx,
773
+ value.rightOverflowPx
774
+ );
775
+ const clipped = value.clipped || value.clip || value.clipping;
776
+ if (isRecord(clipped)) {
777
+ max = Math.max(max, maxPositiveNumber(clipped.left, clipped.right, clipped.left_px, clipped.right_px, clipped.leftPx, clipped.rightPx));
778
+ }
779
+ const rect = value.rect || value.bounds || value.bounding_rect || value.boundingRect;
780
+ const viewportWidth = numberValue(value.viewport_width != null ? value.viewport_width : value.viewportWidth);
781
+ if (isRecord(rect) && viewportWidth !== undefined) {
782
+ const left = numberValue(rect.left);
783
+ const right = numberValue(rect.right);
784
+ if (left !== undefined && left < 0) max = Math.max(max, Math.abs(left));
785
+ if (right !== undefined && right > viewportWidth) max = Math.max(max, right - viewportWidth);
786
+ }
787
+ return roundPixels(max);
788
+ }
789
+ function horizontalBoundsOverflowPx(value) {
790
+ if (!isRecord(value)) return 0;
791
+ let max = maxPositiveNumber(
792
+ value.overflow_px,
793
+ value.overflow,
794
+ value.bounds_overflow_px,
795
+ value.horizontal_overflow_px,
796
+ value.left_overflow_px,
797
+ value.right_overflow_px
798
+ );
799
+ for (const offender of boundsOffendersForEvidence(value)) {
800
+ max = Math.max(max, horizontalOffenderOverflowPx(offender));
801
+ }
802
+ return roundPixels(max);
803
+ }
658
804
  function assessProfile(profile, evidence) {
659
805
  const checks = [];
660
806
  const viewports = evidence.viewports || [];
@@ -772,13 +918,19 @@ function assessProfile(profile, evidence) {
772
918
  });
773
919
  continue;
774
920
  }
775
- const failed = applicable.filter((viewport) => (viewport.overflow_px || 0) > maxOverflow);
921
+ const failed = applicable.filter((viewport) => horizontalBoundsOverflowPx(viewport) > maxOverflow);
776
922
  checks.push({
777
923
  type: check.type,
778
924
  label: check.label || check.type,
779
925
  status: failed.length ? "failed" : "passed",
780
- evidence: { max_overflow_px: maxOverflow, overflow_px: applicable.map((viewport) => viewport.overflow_px ?? null), viewports: applicable.map((viewport) => viewport.name) },
781
- message: failed.length ? "Horizontal overflow exceeded " + maxOverflow + "px in " + failed.length + " viewport(s)." : undefined,
926
+ evidence: {
927
+ max_overflow_px: maxOverflow,
928
+ overflow_px: applicable.map((viewport) => viewport.overflow_px ?? null),
929
+ bounds_overflow_px: applicable.map((viewport) => horizontalBoundsOverflowPx(viewport)),
930
+ overflow_offender_counts: applicable.map((viewport) => boundsOffendersForEvidence(viewport).length),
931
+ viewports: applicable.map((viewport) => viewport.name)
932
+ },
933
+ message: failed.length ? "Horizontal bounds overflow exceeded " + maxOverflow + "px in " + failed.length + " viewport(s)." : undefined,
782
934
  });
783
935
  continue;
784
936
  }
@@ -1008,14 +1160,55 @@ async function captureViewport(viewport) {
1008
1160
  const body = document.body;
1009
1161
  const documentElement = document.documentElement;
1010
1162
  const text = (body ? body.innerText : "").replace(/\s+/g, " ").trim();
1163
+ const clientWidth = documentElement ? documentElement.clientWidth : window.innerWidth;
1164
+ const scrollWidth = documentElement ? documentElement.scrollWidth : 0;
1165
+ const viewportWidth = clientWidth || window.innerWidth;
1166
+ const overflowOffenders = [];
1167
+ for (const element of Array.from(body ? body.querySelectorAll("*") : [])) {
1168
+ const rect = element.getBoundingClientRect();
1169
+ if (!rect || rect.width < 1 || rect.height < 1) continue;
1170
+ const style = window.getComputedStyle(element);
1171
+ if (style.display === "none" || style.visibility === "hidden" || style.opacity === "0") continue;
1172
+ const leftOverflow = Math.max(0, -rect.left);
1173
+ const rightOverflow = Math.max(0, rect.right - viewportWidth);
1174
+ const overflow = Math.max(leftOverflow, rightOverflow);
1175
+ if (overflow <= 0.5) continue;
1176
+ const tag = element.tagName ? element.tagName.toLowerCase() : "element";
1177
+ const id = element.id ? "#" + element.id : "";
1178
+ const className = typeof element.className === "string"
1179
+ ? element.className.trim().split(/\s+/).filter(Boolean).slice(0, 2).join(".")
1180
+ : "";
1181
+ overflowOffenders.push({
1182
+ selector: tag + id + (className ? "." + className : ""),
1183
+ tag,
1184
+ text: (element.textContent || "").replace(/\s+/g, " ").trim().slice(0, 120),
1185
+ overflow,
1186
+ left_overflow_px: leftOverflow,
1187
+ right_overflow_px: rightOverflow,
1188
+ viewport_width: viewportWidth,
1189
+ rect: {
1190
+ left: rect.left,
1191
+ right: rect.right,
1192
+ width: rect.width,
1193
+ },
1194
+ });
1195
+ }
1196
+ overflowOffenders.sort((a, b) => b.overflow - a.overflow);
1197
+ const boundsOverflowPx = Math.max(
1198
+ 0,
1199
+ scrollWidth - (clientWidth || viewportWidth),
1200
+ ...overflowOffenders.map((offender) => offender.overflow),
1201
+ );
1011
1202
  return {
1012
1203
  url: location.href,
1013
1204
  pathname: location.pathname,
1014
1205
  title: document.title,
1015
1206
  body_text_length: text.length,
1016
1207
  body_text_sample: text.slice(0, 8000),
1017
- scroll_width: documentElement ? documentElement.scrollWidth : 0,
1018
- client_width: documentElement ? documentElement.clientWidth : window.innerWidth,
1208
+ scroll_width: scrollWidth,
1209
+ client_width: clientWidth,
1210
+ bounds_overflow_px: Math.round(boundsOverflowPx * 100) / 100,
1211
+ overflow_offenders: overflowOffenders.slice(0, 10),
1019
1212
  };
1020
1213
  }).catch((error) => ({
1021
1214
  url: page.url(),
@@ -1025,6 +1218,8 @@ async function captureViewport(viewport) {
1025
1218
  body_text_sample: "",
1026
1219
  scroll_width: 0,
1027
1220
  client_width: viewport.width,
1221
+ bounds_overflow_px: 0,
1222
+ overflow_offenders: [],
1028
1223
  evaluation_error: String(error && error.message ? error.message : error).slice(0, 1000),
1029
1224
  }));
1030
1225
  const selectors = {};
@@ -1063,6 +1258,8 @@ async function captureViewport(viewport) {
1063
1258
  scroll_width: dom.scroll_width,
1064
1259
  client_width: dom.client_width,
1065
1260
  overflow_px: Math.max(0, (dom.scroll_width || 0) - (dom.client_width || viewport.width)),
1261
+ bounds_overflow_px: dom.bounds_overflow_px,
1262
+ overflow_offenders: dom.overflow_offenders || [],
1066
1263
  selectors,
1067
1264
  text_matches,
1068
1265
  setup_action_results: setupActionResults,
@@ -1094,6 +1291,8 @@ function buildProfileEvidence(currentViewports) {
1094
1291
  routes: currentViewports.map((viewport) => viewport.route),
1095
1292
  titles: currentViewports.map((viewport) => viewport.title),
1096
1293
  overflow_px: currentViewports.map((viewport) => viewport.overflow_px),
1294
+ bounds_overflow_px: currentViewports.map((viewport) => viewport.bounds_overflow_px),
1295
+ overflow_offender_counts: currentViewports.map((viewport) => (viewport.overflow_offenders || []).length),
1097
1296
  },
1098
1297
  };
1099
1298
  }
@@ -1117,24 +1316,36 @@ return result;
1117
1316
  }
1118
1317
  function collectRiddleProfileArtifactRefs(input) {
1119
1318
  const refs = [];
1120
- const seen = /* @__PURE__ */ new Set();
1319
+ const indexes = /* @__PURE__ */ new Map();
1320
+ const priorities = /* @__PURE__ */ new Map();
1121
1321
  function add(item, source) {
1122
1322
  if (!isRecord(item)) return;
1123
- const name = stringValue(item.name) || stringValue(item.filename) || "";
1124
1323
  const url = stringValue(item.url);
1125
1324
  const path = stringValue(item.path);
1325
+ const rawName = stringValue(item.name) || stringValue(item.filename) || artifactNameFromPath(url || path) || "";
1326
+ const name = normalizeRiddleProfileArtifactName(rawName);
1126
1327
  if (!name && !url && !path) return;
1127
- const key = `${name}:${url || path || ""}`;
1128
- if (seen.has(key)) return;
1129
- seen.add(key);
1130
- refs.push({
1328
+ const key = profileArtifactDedupeKey(name, url || path || "");
1329
+ const priority = profileArtifactPriority(rawName, name);
1330
+ const ref = {
1131
1331
  name,
1132
1332
  url,
1133
1333
  path,
1134
1334
  kind: stringValue(item.kind) || stringValue(item.type),
1135
1335
  content_type: stringValue(item.content_type) || stringValue(item.contentType),
1136
1336
  source
1137
- });
1337
+ };
1338
+ const existingIndex = indexes.get(key);
1339
+ if (existingIndex !== void 0) {
1340
+ if (priority > (priorities.get(key) || 0)) {
1341
+ refs[existingIndex] = ref;
1342
+ priorities.set(key, priority);
1343
+ }
1344
+ return;
1345
+ }
1346
+ indexes.set(key, refs.length);
1347
+ priorities.set(key, priority);
1348
+ refs.push(ref);
1138
1349
  }
1139
1350
  function visit(value, source) {
1140
1351
  if (Array.isArray(value)) {
@@ -1149,6 +1360,31 @@ function collectRiddleProfileArtifactRefs(input) {
1149
1360
  visit(input, "artifacts");
1150
1361
  return refs;
1151
1362
  }
1363
+ function normalizeRiddleProfileArtifactName(name) {
1364
+ return name.replace(/\.json\.json$/i, ".json");
1365
+ }
1366
+ function profileArtifactDedupeKey(name, location) {
1367
+ if (PROFILE_SINGLETON_ARTIFACT_NAMES.has(name.toLowerCase())) return name.toLowerCase();
1368
+ return `${name}:${location}`;
1369
+ }
1370
+ function profileArtifactPriority(rawName, normalizedName) {
1371
+ const lower = normalizedName.toLowerCase();
1372
+ if (!PROFILE_SINGLETON_ARTIFACT_NAMES.has(lower)) return 1;
1373
+ return /\.json\.json$/i.test(rawName) ? 2 : 1;
1374
+ }
1375
+ function artifactNameFromPath(value) {
1376
+ if (!value) return "";
1377
+ try {
1378
+ return new URL(value).pathname.split("/").filter(Boolean).pop() || "";
1379
+ } catch {
1380
+ return value.split(/[\\/]/).filter(Boolean).pop() || "";
1381
+ }
1382
+ }
1383
+ var PROFILE_SINGLETON_ARTIFACT_NAMES = /* @__PURE__ */ new Set([
1384
+ "proof.json",
1385
+ "console.json",
1386
+ "dom-summary.json"
1387
+ ]);
1152
1388
  function extractRiddleProofProfileResult(input) {
1153
1389
  if (!isRecord(input)) return void 0;
1154
1390
  if (input.version === RIDDLE_PROOF_PROFILE_RESULT_VERSION) return input;
@@ -68,6 +68,22 @@ interface RiddleProofProfileRouteEvidence {
68
68
  http_status?: number | null;
69
69
  error?: string;
70
70
  }
71
+ interface RiddleProofProfileBoundsOffender {
72
+ selector?: string | null;
73
+ tag?: string | null;
74
+ text?: string | null;
75
+ overflow?: number;
76
+ overflow_px?: number;
77
+ left_overflow_px?: number;
78
+ right_overflow_px?: number;
79
+ bounds_overflow_px?: number;
80
+ clipped?: Record<string, unknown>;
81
+ rect?: Record<string, unknown>;
82
+ bounds?: Record<string, unknown>;
83
+ viewport_width?: number;
84
+ viewportWidth?: number;
85
+ [key: string]: unknown;
86
+ }
71
87
  interface RiddleProofProfileViewportEvidence {
72
88
  name: string;
73
89
  width: number;
@@ -80,6 +96,8 @@ interface RiddleProofProfileViewportEvidence {
80
96
  scroll_width?: number;
81
97
  client_width?: number;
82
98
  overflow_px?: number;
99
+ bounds_overflow_px?: number;
100
+ overflow_offenders?: RiddleProofProfileBoundsOffender[];
83
101
  selectors?: Record<string, {
84
102
  count: number;
85
103
  visible_count: number;
@@ -191,4 +209,4 @@ declare function buildRiddleProofProfileScript(profile: RiddleProofProfile): str
191
209
  declare function collectRiddleProfileArtifactRefs(input: unknown): RiddleProofProfileArtifactRef[];
192
210
  declare function extractRiddleProofProfileResult(input: unknown): RiddleProofProfileResult | undefined;
193
211
 
194
- export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, type RiddleProofProfile, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileResult, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRunner, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
212
+ export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, type RiddleProofProfile, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileBoundsOffender, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileResult, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRunner, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
package/dist/profile.d.ts CHANGED
@@ -68,6 +68,22 @@ interface RiddleProofProfileRouteEvidence {
68
68
  http_status?: number | null;
69
69
  error?: string;
70
70
  }
71
+ interface RiddleProofProfileBoundsOffender {
72
+ selector?: string | null;
73
+ tag?: string | null;
74
+ text?: string | null;
75
+ overflow?: number;
76
+ overflow_px?: number;
77
+ left_overflow_px?: number;
78
+ right_overflow_px?: number;
79
+ bounds_overflow_px?: number;
80
+ clipped?: Record<string, unknown>;
81
+ rect?: Record<string, unknown>;
82
+ bounds?: Record<string, unknown>;
83
+ viewport_width?: number;
84
+ viewportWidth?: number;
85
+ [key: string]: unknown;
86
+ }
71
87
  interface RiddleProofProfileViewportEvidence {
72
88
  name: string;
73
89
  width: number;
@@ -80,6 +96,8 @@ interface RiddleProofProfileViewportEvidence {
80
96
  scroll_width?: number;
81
97
  client_width?: number;
82
98
  overflow_px?: number;
99
+ bounds_overflow_px?: number;
100
+ overflow_offenders?: RiddleProofProfileBoundsOffender[];
83
101
  selectors?: Record<string, {
84
102
  count: number;
85
103
  visible_count: number;
@@ -191,4 +209,4 @@ declare function buildRiddleProofProfileScript(profile: RiddleProofProfile): str
191
209
  declare function collectRiddleProfileArtifactRefs(input: unknown): RiddleProofProfileArtifactRef[];
192
210
  declare function extractRiddleProofProfileResult(input: unknown): RiddleProofProfileResult | undefined;
193
211
 
194
- export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, type RiddleProofProfile, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileResult, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRunner, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
212
+ export { type NormalizeRiddleProofProfileOptions, RIDDLE_PROOF_PROFILE_CHECK_TYPES, RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION, RIDDLE_PROOF_PROFILE_RESULT_VERSION, RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES, RIDDLE_PROOF_PROFILE_STATUSES, RIDDLE_PROOF_PROFILE_VERSION, type RiddleProofProfile, type RiddleProofProfileArtifactRef, type RiddleProofProfileBaselinePolicy, type RiddleProofProfileBoundsOffender, type RiddleProofProfileCheck, type RiddleProofProfileCheckResult, type RiddleProofProfileCheckType, type RiddleProofProfileEvidence, type RiddleProofProfileFailureAction, type RiddleProofProfileResult, type RiddleProofProfileRouteEvidence, type RiddleProofProfileRunner, type RiddleProofProfileSetupAction, type RiddleProofProfileSetupActionType, type RiddleProofProfileStatus, type RiddleProofProfileTarget, type RiddleProofProfileViewport, type RiddleProofProfileViewportEvidence, assessRiddleProofProfileEvidence, buildRiddleProofProfileScript, collectRiddleProfileArtifactRefs, createRiddleProofProfileConfigurationError, createRiddleProofProfileEnvironmentBlockedResult, createRiddleProofProfileInsufficientResult, extractRiddleProofProfileResult, normalizeRiddleProofProfile, profileStatusExitCode, resolveRiddleProofProfileRouteUrl, resolveRiddleProofProfileTargetUrl, resolveRiddleProofProfileTimeoutSec, slugifyRiddleProofProfileName, summarizeRiddleProofProfileResult };
package/dist/profile.js CHANGED
@@ -19,7 +19,7 @@ import {
19
19
  resolveRiddleProofProfileTimeoutSec,
20
20
  slugifyRiddleProofProfileName,
21
21
  summarizeRiddleProofProfileResult
22
- } from "./chunk-TPUR67H5.js";
22
+ } from "./chunk-XOM2OYAB.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.21",
3
+ "version": "0.7.23",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",