@blazediff/matcher 1.4.0 → 1.4.1

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.
Files changed (2) hide show
  1. package/README.md +26 -0
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -171,6 +171,12 @@ Main function for snapshot comparison.
171
171
  <td>true</td>
172
172
  <td>Run image I/O and comparison in a worker thread for better performance</td>
173
173
  </tr>
174
+ <tr>
175
+ <td><code>outputFormat</code></td>
176
+ <td>'png' | 'html'</td>
177
+ <td>'png'</td>
178
+ <td>Diff output format (<code>core-native</code> only). Use <code>'html'</code> for an interactive interpret report with detected change regions, classification, and severity</td>
179
+ </tr>
174
180
  </table>
175
181
 
176
182
  ### ComparisonResult
@@ -322,6 +328,26 @@ const result = await getOrCreateSnapshot(
322
328
  );
323
329
  ```
324
330
 
331
+ ### HTML Interpret Report
332
+
333
+ When using `core-native`, set `outputFormat: 'html'` to generate an interactive HTML report on failure instead of a plain diff image. The report includes detected change regions with classification, severity, and spatial analysis.
334
+
335
+ ```typescript
336
+ const result = await getOrCreateSnapshot(
337
+ imagePath,
338
+ {
339
+ method: 'core-native',
340
+ outputFormat: 'html',
341
+ failureThreshold: 0.01,
342
+ failureThresholdType: 'percent',
343
+ },
344
+ { testPath: __filename, testName: 'test name' }
345
+ );
346
+
347
+ // On failure, result.diffPath points to an .html file instead of .png
348
+ console.log(result.diffPath); // __snapshots__/test-name.diff.html
349
+ ```
350
+
325
351
  ### Different Comparison Methods
326
352
 
327
353
  ```typescript
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blazediff/matcher",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Core matcher logic for visual regression testing with blazediff",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -35,9 +35,9 @@
35
35
  "picocolors": "^1.1.1",
36
36
  "@blazediff/core-native": "4.1.0",
37
37
  "@blazediff/core": "1.9.1",
38
- "@blazediff/gmsd": "1.7.1",
39
- "@blazediff/codec-pngjs": "3.0.0",
40
- "@blazediff/ssim": "1.7.1"
38
+ "@blazediff/ssim": "1.7.1",
39
+ "@blazediff/codec-pngjs": "4.0.0",
40
+ "@blazediff/gmsd": "1.7.1"
41
41
  },
42
42
  "devDependencies": {
43
43
  "@types/node": "^24.3.0",