styleproof 3.2.0 → 3.4.0

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/report.js CHANGED
@@ -8,8 +8,7 @@ import { describeChange, tokenIndex, toHex, trackCount } from './describe.js';
8
8
  // through the package's report module rather than a deep path.
9
9
  export { describeChange, colorName, tokenIndex, toHex } from './describe.js';
10
10
  // Hidden marker appended to a new-surface heading. Invisible in rendered
11
- // markdown; lets the PR-comment layer attach an OPTIONAL "approve" box to a new
12
- // surface (vs the required box on a real change), so new surfaces never gate.
11
+ // markdown; lets the PR-comment layer recognize one-sided surfaces.
13
12
  const NEW_SURFACE_MARKER = '<!-- styleproof-new -->';
14
13
  const rectToBox = (r) => ({ x: r[0], y: r[1], w: r[2], h: r[3] });
15
14
  const pad = (b, by) => ({ x: b.x - by, y: b.y - by, w: b.w + 2 * by, h: b.h + 2 * by });
@@ -910,8 +909,8 @@ export function generateStyleMapReport(opts) {
910
909
  if (missing.length > 0) {
911
910
  if (changeGroups.length > 0)
912
911
  md.push('');
913
- md.push(`🆕 **${missing.length} new surface(s)** captured with no baseline to compare — shown below for reference. ` +
914
- `New surfaces don't block the check.`);
912
+ md.push(`🆕 **${missing.length} new surface(s)** captured with no baseline to compare — shown below for review. ` +
913
+ `Approve them before they become the baseline.`);
915
914
  }
916
915
  }
917
916
  if (volatileCount > 0) {
@@ -1037,8 +1036,7 @@ export function generateStyleMapReport(opts) {
1037
1036
  json.push(surfaceJson);
1038
1037
  }
1039
1038
  // New surfaces: present on only one side, so there's nothing to diff. Show the
1040
- // captured side as a single screenshot for reference and mark the heading so the
1041
- // PR comment can attach an OPTIONAL approval box — these never gate the check.
1039
+ // captured side as a single screenshot and mark the heading for the PR comment.
1042
1040
  for (const p of missing) {
1043
1041
  const side = p.sd.missing === 'before' ? 'after' : 'before';
1044
1042
  const srcDir = side === 'after' ? afterDir : beforeDir;
@@ -1058,7 +1056,7 @@ export function generateStyleMapReport(opts) {
1058
1056
  else {
1059
1057
  md.push('', `_Captured only in the **${side}** set; no screenshot saved (run captures with \`screenshots: true\`)._`);
1060
1058
  }
1061
- md.push('', `_No baseline to compare against — this surface is new, so it doesn't block the check. It becomes part of the baseline once this merges._`);
1059
+ md.push('', `_No baseline to compare against — this surface is new. Review and approve it before it becomes part of the baseline._`);
1062
1060
  json.push(surfaceJson);
1063
1061
  }
1064
1062
  md.push(...contentSection.md);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "styleproof",
3
- "version": "3.2.0",
3
+ "version": "3.4.0",
4
4
  "description": "Catch every CSS change before it ships — review PRs and certify refactors by the browser's computed styles, not pixels. Works with any styling system.",
5
5
  "keywords": [
6
6
  "playwright",
@@ -38,6 +38,7 @@
38
38
  "bin": {
39
39
  "styleproof-init": "./bin/styleproof-init.mjs",
40
40
  "styleproof-map": "./bin/styleproof-map.mjs",
41
+ "styleproof-capture": "./bin/styleproof-capture.mjs",
41
42
  "styleproof-diff": "./bin/styleproof-diff.mjs",
42
43
  "styleproof-report": "./bin/styleproof-report.mjs",
43
44
  "styleproof-variants": "./bin/styleproof-variants.mjs"