@riddledc/riddle-proof 0.7.157 → 0.7.158

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/cli.cjs CHANGED
@@ -16048,13 +16048,20 @@ function riddlePollOptionsForProfile(options) {
16048
16048
  } : void 0
16049
16049
  };
16050
16050
  }
16051
+ function profileItemAppliesToSplitViewport(item, viewport) {
16052
+ if (!item.viewports?.length) return true;
16053
+ return Boolean(viewport.name && item.viewports.includes(viewport.name));
16054
+ }
16051
16055
  function profileForSplitViewport(profile, viewport) {
16056
+ const setupActions = profile.target.setup_actions?.filter((action) => profileItemAppliesToSplitViewport(action, viewport));
16052
16057
  return {
16053
16058
  ...profile,
16054
16059
  name: `${profile.name}-${viewport.name || `${viewport.width}x${viewport.height}`}`,
16060
+ checks: profile.checks.filter((check) => profileItemAppliesToSplitViewport(check, viewport)),
16055
16061
  target: {
16056
16062
  ...profile.target,
16057
- viewports: [viewport]
16063
+ viewports: [viewport],
16064
+ ...setupActions ? { setup_actions: setupActions } : {}
16058
16065
  },
16059
16066
  metadata: {
16060
16067
  ...profile.metadata || {},
package/dist/cli.js CHANGED
@@ -1299,13 +1299,20 @@ function riddlePollOptionsForProfile(options) {
1299
1299
  } : void 0
1300
1300
  };
1301
1301
  }
1302
+ function profileItemAppliesToSplitViewport(item, viewport) {
1303
+ if (!item.viewports?.length) return true;
1304
+ return Boolean(viewport.name && item.viewports.includes(viewport.name));
1305
+ }
1302
1306
  function profileForSplitViewport(profile, viewport) {
1307
+ const setupActions = profile.target.setup_actions?.filter((action) => profileItemAppliesToSplitViewport(action, viewport));
1303
1308
  return {
1304
1309
  ...profile,
1305
1310
  name: `${profile.name}-${viewport.name || `${viewport.width}x${viewport.height}`}`,
1311
+ checks: profile.checks.filter((check) => profileItemAppliesToSplitViewport(check, viewport)),
1306
1312
  target: {
1307
1313
  ...profile.target,
1308
- viewports: [viewport]
1314
+ viewports: [viewport],
1315
+ ...setupActions ? { setup_actions: setupActions } : {}
1309
1316
  },
1310
1317
  metadata: {
1311
1318
  ...profile.metadata || {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riddledc/riddle-proof",
3
- "version": "0.7.157",
3
+ "version": "0.7.158",
4
4
  "description": "Reusable Riddle Proof contracts and helpers for evidence-backed agent changes.",
5
5
  "license": "MIT",
6
6
  "author": "RiddleDC",