storybook-addon-vis 0.17.0 → 0.17.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.
Files changed (2) hide show
  1. package/package.json +3 -2
  2. package/readme.md +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "storybook-addon-vis",
3
- "version": "0.17.0",
3
+ "version": "0.17.2",
4
4
  "description": "Storybook Vitest visual testing addon",
5
5
  "keywords": [
6
6
  "image-snapshot",
@@ -48,6 +48,7 @@
48
48
  },
49
49
  "./package.json": "./package.json"
50
50
  },
51
+ "types": "./dist/index.d.ts",
51
52
  "files": [
52
53
  "dist",
53
54
  "src",
@@ -57,7 +58,7 @@
57
58
  ],
58
59
  "dependencies": {
59
60
  "type-plus": "^8.0.0-beta.6",
60
- "vitest-plugin-vis": "1.4.0"
61
+ "vitest-plugin-vis": "1.5.1"
61
62
  },
62
63
  "devDependencies": {
63
64
  "@storybook/addon-essentials": "^8.4.2",
package/readme.md CHANGED
@@ -93,15 +93,16 @@ import { storybookVis, trimCommonFolder } from 'storybook-addon-vis/vitest-plugi
93
93
  export default defineConfig({
94
94
  plugins: [
95
95
  storybookVis({
96
- comparisonMethod: 'pixel',
97
96
  snapshotRootDir: '__vis__',
97
+ platform: '...', // {process.platform} or `local`
98
98
  customizeSnapshotSubpath: (subpath) => trimCommonFolder(subpath),
99
99
  customizeSnapshotId: (id, index) => `${id}-${index}`,
100
+ comparisonMethod: 'pixel',
100
101
  // pixelmatch or ssim.js options, depending on `comparisonMethod`.
101
102
  diffOptions: undefined,
102
103
  failureThresholdType: 'pixel',
103
104
  failureThreshold: 0,
104
- timeout: 5000 // 30000 on CI
105
+ timeout: 30000
105
106
  })
106
107
  ],
107
108
  })