storybook-addon-vis 4.5.0 → 4.6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # CHANGE LOG
2
2
 
3
+ ## 4.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1017](https://github.com/repobuddy/visual-testing/pull/1017) [`ae0d477`](https://github.com/repobuddy/visual-testing/commit/ae0d4777ced6884287cd399d3696cf5bf7ca3cda) Thanks [@unional](https://github.com/unional)! - Fix `page.toMatchImageSnapshot({ fullPage: true })` so it captures the whole test page, including content below or to the right of the viewport.
8
+ It works with the `playwright` and `webdriverio` providers.
9
+
10
+ With `playwright`, `page.toMatchImageSnapshot()` now captures the test iframe instead of the Vitest runner page,
11
+ so the image has the size of the test viewport.
12
+ Existing page snapshot baselines may change size and need to be updated.
13
+
14
+ Add `fullPage` to auto snapshots.
15
+ Set it for all auto snapshots with `vis.setup({ fullPage: true })`,
16
+ for a test with `setAutoSnapshotOptions({ fullPage: true })`,
17
+ or for a story with `parameters: defineAutoSnapshotParam({ fullPage: true })`.
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies [[`ae0d477`](https://github.com/repobuddy/visual-testing/commit/ae0d4777ced6884287cd399d3696cf5bf7ca3cda)]:
22
+ - vitest-plugin-vis@5.5.0
23
+
3
24
  ## 4.5.0
4
25
 
5
26
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  import "../global_matcher_augment-B1plNA_9.mjs";
2
- import { t as visAnnotations } from "../vis_annotation-pQo0FcfJ.mjs";
2
+ import { t as visAnnotations } from "../vis_annotation-N0xbuXis.mjs";
3
3
  import { setAutoSnapshotOptions } from "vitest-plugin-vis";
4
4
  import * as vitest_plugin_vis_setup_api0 from "vitest-plugin-vis/setup-api";
5
5
 
package/dist/index.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import "./global_matcher_augment-B1plNA_9.mjs";
2
- import { t as visAnnotations } from "./vis_annotation-pQo0FcfJ.mjs";
2
+ import { t as visAnnotations } from "./vis_annotation-N0xbuXis.mjs";
3
3
  import * as storybook_internal_csf0 from "storybook/internal/csf";
4
- import { ComparisonMethod, FailureThresholdOptions, ImageSnapshotCompareOptions, ImageSnapshotKeyOptions, ImageSnapshotKeyOptions as ImageSnapshotKeyOptions$1, ImageSnapshotSubjectOptions, ImageSnapshotTimeoutOptions, PixelComparisonOptions, SsimComparisonOptions, ToMatchImageSnapshotOptions } from "vitest-plugin-vis/client-api";
4
+ import { ComparisonMethod, FailureThresholdOptions, ImageSnapshotCompareOptions, ImageSnapshotKeyOptions, ImageSnapshotKeyOptions as ImageSnapshotKeyOptions$1, ImageSnapshotSubjectOptions, ImageSnapshotTimeoutOptions, PageImageSnapshotOptions, PixelComparisonOptions, SsimComparisonOptions, ToMatchImageSnapshotOptions } from "vitest-plugin-vis/client-api";
5
5
  import * as vitest_plugin_vis0 from "vitest-plugin-vis";
6
6
  import { SetupVisOptions } from "vitest-plugin-vis";
7
7
  import "vitest";
@@ -22,12 +22,14 @@ declare function hasImageSnapshot(options?: ImageSnapshotKeyOptions$1 | undefine
22
22
  //#region src/client/storybook/param.d.ts
23
23
  /**
24
24
  * Define snapshot parameter for auto snapshot.
25
+ *
26
+ * Set `fullPage: true` to snapshot the whole page instead of the subject.
25
27
  */
26
- declare function defineAutoSnapshotParam<M extends ComparisonMethod>(snapshot: ToMatchImageSnapshotOptions<M> & ImageSnapshotSubjectOptions): {
28
+ declare function defineAutoSnapshotParam<M extends ComparisonMethod>(snapshot: ToMatchImageSnapshotOptions<M> & ImageSnapshotSubjectOptions & PageImageSnapshotOptions): {
27
29
  snapshot: ImageSnapshotTimeoutOptions & ImageSnapshotKeyOptions & (M extends "ssim" ? SsimComparisonOptions<M> : PixelComparisonOptions<M>) & FailureThresholdOptions & vitest_plugin_vis0.ReviewImageOptions & vitest_plugin_vis0.AnimationsOptions & vitest_plugin_vis0.MaskOptions & {
28
30
  expectToFail?: boolean | undefined;
29
31
  createMissingBaseline?: boolean | undefined;
30
- } & ImageSnapshotSubjectOptions;
32
+ } & ImageSnapshotSubjectOptions & PageImageSnapshotOptions;
31
33
  };
32
34
  //#endregion
33
35
  //#region src/client/storybook/tags.d.ts
@@ -38,5 +40,5 @@ declare const _default: (options?: SetupVisOptions<{
38
40
  tags: string[];
39
41
  }>) => storybook_internal_csf0.PreviewAddon<storybook_internal_csf0.AddonTypes>;
40
42
  //#endregion
41
- export { type ComparisonMethod, type FailureThresholdOptions, type ImageSnapshotCompareOptions, type ImageSnapshotKeyOptions, type ImageSnapshotSubjectOptions, type ImageSnapshotTimeoutOptions, type PixelComparisonOptions, type SsimComparisonOptions, type ToMatchImageSnapshotOptions, cdp, _default as default, defineAutoSnapshotParam, hasImageSnapshot, isSnapshotEnabled, page, visAnnotations };
43
+ export { type ComparisonMethod, type FailureThresholdOptions, type ImageSnapshotCompareOptions, type ImageSnapshotKeyOptions, type ImageSnapshotSubjectOptions, type ImageSnapshotTimeoutOptions, type PageImageSnapshotOptions, type PixelComparisonOptions, type SsimComparisonOptions, type ToMatchImageSnapshotOptions, cdp, _default as default, defineAutoSnapshotParam, hasImageSnapshot, isSnapshotEnabled, page, visAnnotations };
42
44
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/client/vitest_proxy.ts","../src/client/has_image_snapshot.ts","../src/client/storybook/param.ts","../src/client/storybook/tags.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;cAyGa,MAAI;cAEJ,WAhCI;;;;;;iBCpED,gBAAA,WAA2B,gDAAmC;;;;;;iBCqB9D,kCAAkC,4BACvC,4BAA4B,KAAK;;;;;;;;iBC7B5B,iBAAA;;;cCqBoB,qBAEX;;OAAqD,uBAAA,CAAA,aAAtC,uBAAA,CAAsC,UAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/client/vitest_proxy.ts","../src/client/has_image_snapshot.ts","../src/client/storybook/param.ts","../src/client/storybook/tags.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;cAyGa,MAAI;cAEJ,WAhCI;;;;;;iBCpED,gBAAA,WAA2B,gDAAmC;;;;;;;;iBCyB9D,kCAAkC,4BACvC,4BAA4B,KAAK,8BAA8B;;;;;AFwE1E,CAAA;;;iBGzGgB,iBAAA;;;cCqBoB,qBAEX;;OAAqD,uBAAA,CAAA,aAAtC,uBAAA,CAAsC,UAAA"}
package/dist/index.mjs CHANGED
@@ -28,6 +28,8 @@ function hasImageSnapshot(options) {
28
28
  //#region src/client/storybook/param.ts
29
29
  /**
30
30
  * Define snapshot parameter for auto snapshot.
31
+ *
32
+ * Set `fullPage: true` to snapshot the whole page instead of the subject.
31
33
  */
32
34
  function defineAutoSnapshotParam(snapshot) {
33
35
  return { snapshot };
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/client/ctx.ts","../src/client/has_image_snapshot.ts","../src/client/storybook/param.ts","../src/index.ts"],"sourcesContent":["import { getCurrentTest } from './vitest_proxy.ts'\n\nexport const ctx = {\n\tgetCurrentTest,\n\t__test__reset() {\n\t\tctx.getCurrentTest = getCurrentTest\n\t},\n}\n","import { hasImageSnapshotAction, type ImageSnapshotKeyOptions, toTaskId } from 'vitest-plugin-vis/client-api'\nimport { ctx } from './ctx.ts'\nimport { commands } from './vitest_proxy.ts'\n\n/**\n * Check if the snapshot image exists.\n */\nexport function hasImageSnapshot(options?: ImageSnapshotKeyOptions | undefined) {\n\tconst test = ctx.getCurrentTest()\n\tif (!test) return false\n\n\treturn hasImageSnapshotAction(commands, toTaskId(test), options)\n}\n","import type {\n\tComparisonMethod,\n\tFailureThresholdOptions,\n\tImageSnapshotCompareOptions,\n\tImageSnapshotKeyOptions,\n\tImageSnapshotSubjectOptions,\n\tImageSnapshotTimeoutOptions,\n\tPixelComparisonOptions,\n\tSsimComparisonOptions,\n\tToMatchImageSnapshotOptions,\n} from 'vitest-plugin-vis/client-api'\n\n// This fix the inferred type cannot be named error\nexport type {\n\tComparisonMethod,\n\tFailureThresholdOptions,\n\tImageSnapshotCompareOptions,\n\tImageSnapshotKeyOptions,\n\tImageSnapshotSubjectOptions,\n\tImageSnapshotTimeoutOptions,\n\tPixelComparisonOptions,\n\tSsimComparisonOptions,\n\tToMatchImageSnapshotOptions,\n}\n\n/**\n * Define snapshot parameter for auto snapshot.\n */\nexport function defineAutoSnapshotParam<M extends ComparisonMethod>(\n\tsnapshot: ToMatchImageSnapshotOptions<M> & ImageSnapshotSubjectOptions,\n) {\n\treturn { snapshot }\n}\n","// `storybook-addon-vis` provides code that can be used in test files.\nimport './shared/global_matcher_augment.ts'\n\nimport { definePreviewAddon } from 'storybook/internal/csf'\nimport { expect } from 'storybook/test'\nimport type { SetupVisOptions } from 'vitest-plugin-vis'\nimport { autoSnapshotMatcher, setAutoSnapshotOptions, toSuiteDefaults } from 'vitest-plugin-vis/client-api'\nimport { toMatchImageSnapshot } from './client/expect/to_match_image_snapshot.ts'\nimport { isVitestBrowser } from './client/is_vitest_browser.ts'\nimport { cdp, commands, page, whenVitestProxyReady } from './client/vitest_proxy.ts'\nimport { visAnnotations } from './preview/vis_annotation.ts'\n\n// Register at module load time so it's available in Storybook dev mode.\n// (visAnnotations.beforeEach is only wired via vitest's setProjectAnnotations, not in dev mode)\nexpect.extend({ toMatchImageSnapshot })\n\nexport * from 'vitest-plugin-vis'\nexport * from './client/has_image_snapshot.ts'\nexport * from './client/storybook/param.ts'\nexport * from './client/storybook/tags.ts'\n\nexport { cdp, page, visAnnotations }\n\nexport default (options: SetupVisOptions<{ tags: string[] }> = { auto: false }) => {\n\tlet matcher: ReturnType<typeof autoSnapshotMatcher>\n\tlet matcherFn: () => Promise<void>\n\treturn definePreviewAddon({\n\t\ttags: options.auto === true ? ['snapshot'] : [],\n\t\tasync beforeAll() {\n\t\t\tif (!isVitestBrowser()) return\n\t\t\t// `page` and `getCurrentTest` come from a dynamic import; the hooks that\n\t\t\t// follow read them synchronously, so wait for it here (#835).\n\t\t\tawait whenVitestProxyReady()\n\t\t\tmatcher = autoSnapshotMatcher(commands, expect)\n\t\t\tconst suiteDefaults = toSuiteDefaults(options)\n\t\t\tif (typeof options?.auto === 'function') {\n\t\t\t\tmatcherFn = matcher.createMatcher(\n\t\t\t\t\t{\n\t\t\t\t\t\tauto: options.auto,\n\t\t\t\t\t},\n\t\t\t\t\tsuiteDefaults,\n\t\t\t\t)\n\t\t\t} else if (typeof options?.auto === 'object') {\n\t\t\t\tmatcherFn = matcher.createMatcher(options.auto, suiteDefaults)\n\t\t\t} else matcherFn = matcher.createMatcher({ async auto() {} }, suiteDefaults)\n\n\t\t\tawait matcher.setup()\n\t\t\tawait setAutoSnapshotOptions(true)\n\t\t},\n\t\tafterEach() {\n\t\t\tif (matcherFn) {\n\t\t\t\treturn matcherFn()\n\t\t\t}\n\t\t},\n\t\t...visAnnotations,\n\t})\n}\n"],"mappings":";;;;;;;;AAEA,MAAa,MAAM;CAClB;CACA,gBAAgB;AACf,MAAI,iBAAiB;;CAEtB;;;;;;;ACAD,SAAgB,iBAAiB,SAA+C;CAC/E,MAAM,OAAO,IAAI,gBAAgB;AACjC,KAAI,CAAC,KAAM,QAAO;AAElB,QAAO,uBAAuB,UAAU,SAAS,KAAK,EAAE,QAAQ;;;;;;;;ACiBjE,SAAgB,wBACf,UACC;AACD,QAAO,EAAE,UAAU;;;;;ACjBpB,OAAO,OAAO,EAAE,sBAAsB,CAAC;AASvC,mBAAgB,UAA+C,EAAE,MAAM,OAAO,KAAK;CAClF,IAAI;CACJ,IAAI;AACJ,QAAO,mBAAmB;EACzB,MAAM,QAAQ,SAAS,OAAO,CAAC,WAAW,GAAG,EAAE;EAC/C,MAAM,YAAY;AACjB,OAAI,CAAC,iBAAiB,CAAE;AAGxB,SAAM,sBAAsB;AAC5B,aAAU,oBAAoB,UAAU,OAAO;GAC/C,MAAM,gBAAgB,gBAAgB,QAAQ;AAC9C,OAAI,OAAO,SAAS,SAAS,WAC5B,aAAY,QAAQ,cACnB,EACC,MAAM,QAAQ,MACd,EACD,cACA;YACS,OAAO,SAAS,SAAS,SACnC,aAAY,QAAQ,cAAc,QAAQ,MAAM,cAAc;OACxD,aAAY,QAAQ,cAAc,EAAE,MAAM,OAAO,IAAI,EAAE,cAAc;AAE5E,SAAM,QAAQ,OAAO;AACrB,SAAM,uBAAuB,KAAK;;EAEnC,YAAY;AACX,OAAI,UACH,QAAO,WAAW;;EAGpB,GAAG;EACH,CAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/client/ctx.ts","../src/client/has_image_snapshot.ts","../src/client/storybook/param.ts","../src/index.ts"],"sourcesContent":["import { getCurrentTest } from './vitest_proxy.ts'\n\nexport const ctx = {\n\tgetCurrentTest,\n\t__test__reset() {\n\t\tctx.getCurrentTest = getCurrentTest\n\t},\n}\n","import { hasImageSnapshotAction, type ImageSnapshotKeyOptions, toTaskId } from 'vitest-plugin-vis/client-api'\nimport { ctx } from './ctx.ts'\nimport { commands } from './vitest_proxy.ts'\n\n/**\n * Check if the snapshot image exists.\n */\nexport function hasImageSnapshot(options?: ImageSnapshotKeyOptions | undefined) {\n\tconst test = ctx.getCurrentTest()\n\tif (!test) return false\n\n\treturn hasImageSnapshotAction(commands, toTaskId(test), options)\n}\n","import type {\n\tComparisonMethod,\n\tFailureThresholdOptions,\n\tImageSnapshotCompareOptions,\n\tImageSnapshotKeyOptions,\n\tImageSnapshotSubjectOptions,\n\tImageSnapshotTimeoutOptions,\n\tPageImageSnapshotOptions,\n\tPixelComparisonOptions,\n\tSsimComparisonOptions,\n\tToMatchImageSnapshotOptions,\n} from 'vitest-plugin-vis/client-api'\n\n// This fix the inferred type cannot be named error\nexport type {\n\tComparisonMethod,\n\tFailureThresholdOptions,\n\tImageSnapshotCompareOptions,\n\tImageSnapshotKeyOptions,\n\tImageSnapshotSubjectOptions,\n\tImageSnapshotTimeoutOptions,\n\tPageImageSnapshotOptions,\n\tPixelComparisonOptions,\n\tSsimComparisonOptions,\n\tToMatchImageSnapshotOptions,\n}\n\n/**\n * Define snapshot parameter for auto snapshot.\n *\n * Set `fullPage: true` to snapshot the whole page instead of the subject.\n */\nexport function defineAutoSnapshotParam<M extends ComparisonMethod>(\n\tsnapshot: ToMatchImageSnapshotOptions<M> & ImageSnapshotSubjectOptions & PageImageSnapshotOptions,\n) {\n\treturn { snapshot }\n}\n","// `storybook-addon-vis` provides code that can be used in test files.\nimport './shared/global_matcher_augment.ts'\n\nimport { definePreviewAddon } from 'storybook/internal/csf'\nimport { expect } from 'storybook/test'\nimport type { SetupVisOptions } from 'vitest-plugin-vis'\nimport { autoSnapshotMatcher, setAutoSnapshotOptions, toSuiteDefaults } from 'vitest-plugin-vis/client-api'\nimport { toMatchImageSnapshot } from './client/expect/to_match_image_snapshot.ts'\nimport { isVitestBrowser } from './client/is_vitest_browser.ts'\nimport { cdp, commands, page, whenVitestProxyReady } from './client/vitest_proxy.ts'\nimport { visAnnotations } from './preview/vis_annotation.ts'\n\n// Register at module load time so it's available in Storybook dev mode.\n// (visAnnotations.beforeEach is only wired via vitest's setProjectAnnotations, not in dev mode)\nexpect.extend({ toMatchImageSnapshot })\n\nexport * from 'vitest-plugin-vis'\nexport * from './client/has_image_snapshot.ts'\nexport * from './client/storybook/param.ts'\nexport * from './client/storybook/tags.ts'\n\nexport { cdp, page, visAnnotations }\n\nexport default (options: SetupVisOptions<{ tags: string[] }> = { auto: false }) => {\n\tlet matcher: ReturnType<typeof autoSnapshotMatcher>\n\tlet matcherFn: () => Promise<void>\n\treturn definePreviewAddon({\n\t\ttags: options.auto === true ? ['snapshot'] : [],\n\t\tasync beforeAll() {\n\t\t\tif (!isVitestBrowser()) return\n\t\t\t// `page` and `getCurrentTest` come from a dynamic import; the hooks that\n\t\t\t// follow read them synchronously, so wait for it here (#835).\n\t\t\tawait whenVitestProxyReady()\n\t\t\tmatcher = autoSnapshotMatcher(commands, expect)\n\t\t\tconst suiteDefaults = toSuiteDefaults(options)\n\t\t\tif (typeof options?.auto === 'function') {\n\t\t\t\tmatcherFn = matcher.createMatcher(\n\t\t\t\t\t{\n\t\t\t\t\t\tauto: options.auto,\n\t\t\t\t\t},\n\t\t\t\t\tsuiteDefaults,\n\t\t\t\t)\n\t\t\t} else if (typeof options?.auto === 'object') {\n\t\t\t\tmatcherFn = matcher.createMatcher(options.auto, suiteDefaults)\n\t\t\t} else matcherFn = matcher.createMatcher({ async auto() {} }, suiteDefaults)\n\n\t\t\tawait matcher.setup()\n\t\t\tawait setAutoSnapshotOptions(true)\n\t\t},\n\t\tafterEach() {\n\t\t\tif (matcherFn) {\n\t\t\t\treturn matcherFn()\n\t\t\t}\n\t\t},\n\t\t...visAnnotations,\n\t})\n}\n"],"mappings":";;;;;;;;AAEA,MAAa,MAAM;CAClB;CACA,gBAAgB;AACf,MAAI,iBAAiB;;CAEtB;;;;;;;ACAD,SAAgB,iBAAiB,SAA+C;CAC/E,MAAM,OAAO,IAAI,gBAAgB;AACjC,KAAI,CAAC,KAAM,QAAO;AAElB,QAAO,uBAAuB,UAAU,SAAS,KAAK,EAAE,QAAQ;;;;;;;;;;ACqBjE,SAAgB,wBACf,UACC;AACD,QAAO,EAAE,UAAU;;;;;ACrBpB,OAAO,OAAO,EAAE,sBAAsB,CAAC;AASvC,mBAAgB,UAA+C,EAAE,MAAM,OAAO,KAAK;CAClF,IAAI;CACJ,IAAI;AACJ,QAAO,mBAAmB;EACzB,MAAM,QAAQ,SAAS,OAAO,CAAC,WAAW,GAAG,EAAE;EAC/C,MAAM,YAAY;AACjB,OAAI,CAAC,iBAAiB,CAAE;AAGxB,SAAM,sBAAsB;AAC5B,aAAU,oBAAoB,UAAU,OAAO;GAC/C,MAAM,gBAAgB,gBAAgB,QAAQ;AAC9C,OAAI,OAAO,SAAS,SAAS,WAC5B,aAAY,QAAQ,cACnB,EACC,MAAM,QAAQ,MACd,EACD,cACA;YACS,OAAO,SAAS,SAAS,SACnC,aAAY,QAAQ,cAAc,QAAQ,MAAM,cAAc;OACxD,aAAY,QAAQ,cAAc,EAAE,MAAM,OAAO,IAAI,EAAE,cAAc;AAE5E,SAAM,QAAQ,OAAO;AACrB,SAAM,uBAAuB,KAAK;;EAEnC,YAAY;AACX,OAAI,UACH,QAAO,WAAW;;EAGpB,GAAG;EACH,CAAC"}
@@ -0,0 +1,9 @@
1
+ import * as storybook_internal_csf1 from "storybook/internal/csf";
2
+
3
+ //#region src/preview/vis_annotation.d.ts
4
+ declare const visAnnotations: {
5
+ beforeEach(ctx: storybook_internal_csf1.StoryContext<any, storybook_internal_csf1.Args>): void;
6
+ };
7
+ //#endregion
8
+ export { visAnnotations as t };
9
+ //# sourceMappingURL=vis_annotation-N0xbuXis.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vis_annotation-N0xbuXis.d.mts","names":[],"sources":["../src/preview/vis_annotation.ts"],"sourcesContent":[],"mappings":";;;cAUa;kBAgBoC,uBAAA,CAAA,kBAAA,uBAAA,CAAA,IAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook-addon-vis",
3
- "version": "4.5.0",
3
+ "version": "4.6.0",
4
4
  "description": "Storybook Vitest visual testing addon",
5
5
  "keywords": [
6
6
  "image-snapshot",
@@ -70,7 +70,7 @@
70
70
  "memoize": "^11.0.0",
71
71
  "pathe": "^2.0.3",
72
72
  "type-plus": "8.0.1",
73
- "vitest-plugin-vis": "^5.4.0"
73
+ "vitest-plugin-vis": "^5.5.0"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@repobuddy/storybook": "^2.33.4",
@@ -5,6 +5,7 @@ import type {
5
5
  ImageSnapshotKeyOptions,
6
6
  ImageSnapshotSubjectOptions,
7
7
  ImageSnapshotTimeoutOptions,
8
+ PageImageSnapshotOptions,
8
9
  PixelComparisonOptions,
9
10
  SsimComparisonOptions,
10
11
  ToMatchImageSnapshotOptions,
@@ -18,6 +19,7 @@ export type {
18
19
  ImageSnapshotKeyOptions,
19
20
  ImageSnapshotSubjectOptions,
20
21
  ImageSnapshotTimeoutOptions,
22
+ PageImageSnapshotOptions,
21
23
  PixelComparisonOptions,
22
24
  SsimComparisonOptions,
23
25
  ToMatchImageSnapshotOptions,
@@ -25,9 +27,11 @@ export type {
25
27
 
26
28
  /**
27
29
  * Define snapshot parameter for auto snapshot.
30
+ *
31
+ * Set `fullPage: true` to snapshot the whole page instead of the subject.
28
32
  */
29
33
  export function defineAutoSnapshotParam<M extends ComparisonMethod>(
30
- snapshot: ToMatchImageSnapshotOptions<M> & ImageSnapshotSubjectOptions,
34
+ snapshot: ToMatchImageSnapshotOptions<M> & ImageSnapshotSubjectOptions & PageImageSnapshotOptions,
31
35
  ) {
32
36
  return { snapshot }
33
37
  }
@@ -1,9 +0,0 @@
1
- import * as storybook_internal_types0 from "storybook/internal/types";
2
-
3
- //#region src/preview/vis_annotation.d.ts
4
- declare const visAnnotations: {
5
- beforeEach(ctx: storybook_internal_types0.StoryContext<any, storybook_internal_types0.Args>): void;
6
- };
7
- //#endregion
8
- export { visAnnotations as t };
9
- //# sourceMappingURL=vis_annotation-pQo0FcfJ.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vis_annotation-pQo0FcfJ.d.mts","names":[],"sources":["../src/preview/vis_annotation.ts"],"sourcesContent":[],"mappings":";;;cAUa;kBAgBoC,yBAAA,CAAA,kBAAA,yBAAA,CAAA,IAAA"}