@ng-prism/plugin-visual-regression 22.2.0-beta.1 → 22.2.0-beta.2

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/vrt-bg.d.ts CHANGED
@@ -3,18 +3,20 @@ import type { VrtVariantResult } from './visual-regression.types.js';
3
3
  /**
4
4
  * Background declarations for the box that holds a capture.
5
5
  *
6
- * The captures themselves are opaque, so this is mostly invisible except
7
- * under a diff mask, where the unchanged pixels a comparator leaves
8
- * transparent let it through. There the surface decides whether a diff reads
9
- * as a diff or as a chequered mess.
6
+ * Mostly invisible behind an opaque capture but not behind every one. It
7
+ * shows through a diff mask, where the unchanged pixels a comparator leaves
8
+ * transparent let it past, and through a `transparent` capture, which is see-
9
+ * through by design. In both places the surface decides whether the image
10
+ * reads as itself or as a chequered mess.
10
11
  *
11
- * Only `light` and `dark` produce a colour. `dots`, `plain` and `checker` all
12
- * paint `--prism-bg-surface`, a *theme* token, and the panel cannot know which
13
- * theme the runner's browser ran in so those keep the checkerboard, which
14
- * reads as "transparent" rather than as a guess painted as fact. For `checker`
15
- * that is also the literal rendering, and since it is what an undeclared
16
- * variant resolves to, an undeclared capture frames itself correctly. Same for
17
- * a report that recorded no background at all.
12
+ * Only `light` and `dark` produce a colour. The rest keep the checkerboard,
13
+ * for two different reasons. `dots`, `plain` and `checker` paint
14
+ * `--prism-bg-surface`, a *theme* token, and the panel cannot know which theme
15
+ * the runner's browser ran in so a colour here would be a guess painted as
16
+ * fact. `transparent` is the opposite case: its capture genuinely has an alpha
17
+ * channel, and the checkerboard is what makes that legible instead of
18
+ * inventing a surface the capture deliberately omitted. A report that recorded
19
+ * no background at all is treated the same way.
18
20
  */
19
21
  export declare function shotSurfaceStyle(bg: CanvasBg | undefined): Record<string, string>;
20
22
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"vrt-bg.d.ts","sourceRoot":"","sources":["../src/vrt-bg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAerE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,QAAQ,GAAG,SAAS,GACvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIxB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,gBAAgB,GACxB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,EAAE,EAAE,QAAQ,CAAA;CAAE,GAAG,IAAI,CAIzC"}
1
+ {"version":3,"file":"vrt-bg.d.ts","sourceRoot":"","sources":["../src/vrt-bg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAerE;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,gBAAgB,CAC9B,EAAE,EAAE,QAAQ,GAAG,SAAS,GACvB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAIxB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,gBAAgB,GACxB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,EAAE,EAAE,QAAQ,CAAA;CAAE,GAAG,IAAI,CAIzC"}
package/dist/vrt-bg.js CHANGED
@@ -13,18 +13,20 @@ const SURFACE = {
13
13
  /**
14
14
  * Background declarations for the box that holds a capture.
15
15
  *
16
- * The captures themselves are opaque, so this is mostly invisible except
17
- * under a diff mask, where the unchanged pixels a comparator leaves
18
- * transparent let it through. There the surface decides whether a diff reads
19
- * as a diff or as a chequered mess.
16
+ * Mostly invisible behind an opaque capture but not behind every one. It
17
+ * shows through a diff mask, where the unchanged pixels a comparator leaves
18
+ * transparent let it past, and through a `transparent` capture, which is see-
19
+ * through by design. In both places the surface decides whether the image
20
+ * reads as itself or as a chequered mess.
20
21
  *
21
- * Only `light` and `dark` produce a colour. `dots`, `plain` and `checker` all
22
- * paint `--prism-bg-surface`, a *theme* token, and the panel cannot know which
23
- * theme the runner's browser ran in so those keep the checkerboard, which
24
- * reads as "transparent" rather than as a guess painted as fact. For `checker`
25
- * that is also the literal rendering, and since it is what an undeclared
26
- * variant resolves to, an undeclared capture frames itself correctly. Same for
27
- * a report that recorded no background at all.
22
+ * Only `light` and `dark` produce a colour. The rest keep the checkerboard,
23
+ * for two different reasons. `dots`, `plain` and `checker` paint
24
+ * `--prism-bg-surface`, a *theme* token, and the panel cannot know which theme
25
+ * the runner's browser ran in so a colour here would be a guess painted as
26
+ * fact. `transparent` is the opposite case: its capture genuinely has an alpha
27
+ * channel, and the checkerboard is what makes that legible instead of
28
+ * inventing a surface the capture deliberately omitted. A report that recorded
29
+ * no background at all is treated the same way.
28
30
  */
29
31
  export function shotSurfaceStyle(bg) {
30
32
  const surface = bg ? SURFACE[bg] : undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-prism/plugin-visual-regression",
3
- "version": "22.2.0-beta.1",
3
+ "version": "22.2.0-beta.2",
4
4
  "description": "Visual regression report panel for ng-prism.",
5
5
  "ng-add": {
6
6
  "save": "devDependencies"