storybook-addon-vis 0.16.2 → 0.16.4
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/preview.d.ts +15 -0
- package/dist/vitest-plugin.d.ts +27 -0
- package/package.json +3 -3
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ImageSnapshotMatcher } from 'vitest-plugin-vis/client';
|
|
2
|
+
import { StoryContext } from 'storybook/internal/types';
|
|
3
|
+
|
|
4
|
+
declare global {
|
|
5
|
+
namespace jest {
|
|
6
|
+
interface Matchers<R, T> extends ImageSnapshotMatcher {
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare const visAnnotations: {
|
|
12
|
+
beforeEach(ctx: StoryContext): void;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { visAnnotations as default };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { VisOptions } from 'vitest-plugin-vis/config';
|
|
2
|
+
export { trimCommonFolder } from 'vitest-plugin-vis/config';
|
|
3
|
+
import * as vitest_plugin_vis_commands from 'vitest-plugin-vis/commands';
|
|
4
|
+
import * as vitest_node from 'vitest/node';
|
|
5
|
+
import { Omit } from 'type-plus';
|
|
6
|
+
|
|
7
|
+
declare function storybookVis(options?: Omit<VisOptions, 'preset'>): {
|
|
8
|
+
name: string;
|
|
9
|
+
config(this: void): {
|
|
10
|
+
test: {
|
|
11
|
+
browser: {
|
|
12
|
+
name: string;
|
|
13
|
+
commands: {
|
|
14
|
+
setupVisSuite: vitest_node.BrowserCommand<[]>;
|
|
15
|
+
imageSnapshotNextIndex: vitest_node.BrowserCommand<[taskId: string]>;
|
|
16
|
+
hasImageSnapshot: vitest_node.BrowserCommand<[taskId: string, snapshotId?: string | undefined]>;
|
|
17
|
+
matchImageSnapshot: vitest_node.BrowserCommand<[taskId: string, subject: string, options?: vitest_plugin_vis_commands.MatchImageSnapshotOptions | undefined]>;
|
|
18
|
+
prepareImageSnapshotComparison: vitest_node.BrowserCommand<[taskId: string, snapshotId: string, options?: vitest_plugin_vis_commands.MatchImageSnapshotOptions | undefined]>;
|
|
19
|
+
writeImageSnapshot: vitest_node.BrowserCommand<[relativeFilePath: string, imageBase64: string]>;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
setupFiles: string[] | undefined;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export { storybookVis };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "storybook-addon-vis",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.4",
|
|
4
4
|
"description": "Storybook Vitest visual testing addon",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"image-snapshot",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
],
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"type-plus": "^8.0.0-beta.6",
|
|
60
|
-
"vitest-plugin-vis": "1.3.
|
|
60
|
+
"vitest-plugin-vis": "1.3.2"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@storybook/addon-essentials": "^8.4.2",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"react": "^18.2.0",
|
|
83
83
|
"react-dom": "^18.2.0",
|
|
84
84
|
"storybook": "^8.4.2",
|
|
85
|
-
"tsup": "^8.
|
|
85
|
+
"tsup": "^8.3.5",
|
|
86
86
|
"typescript": "^5.7.2",
|
|
87
87
|
"vite": "^5.3.5",
|
|
88
88
|
"vitest-browser-react": "^0.0.4",
|