{"_id":"@storycap-testrun/browser","_rev":"8-1ae4f5b1865228bb624432ac70665777","name":"@storycap-testrun/browser","dist-tags":{"canary":"2.0.0-canary.0","latest":"3.1.1"},"versions":{"2.0.0-canary.0":{"name":"@storycap-testrun/browser","version":"2.0.0-canary.0","keywords":["storybook","storybook-addon","storycap","addon","addon-vitest","playwright","screenshot","visual-testing","testing","test","vitest"],"author":{"name":"wadackel"},"license":"MIT","_id":"@storycap-testrun/browser@2.0.0-canary.0","maintainers":[{"name":"wadackel","email":"wadackel@gmail.com"}],"contributors":[{"name":"Yosuke Kurami"}],"homepage":"https://github.com/reg-viz/storycap-testrun","bugs":{"url":"https://github.com/reg-viz/storycap-testrun/issues"},"dist":{"shasum":"cc0652130b891489682eed8e55154e8c48d44424","tarball":"https://registry.npmjs.org/@storycap-testrun/browser/-/browser-2.0.0-canary.0.tgz","fileCount":20,"integrity":"sha512-kVXf5DRvT88W0URv6vdPMofVDoYDvVNQMEWxJl9WqTy4U6Tq+9iUwrt9VSlG6yjB3hnFKoyln+vB+a66TIsaZw==","signatures":[{"sig":"MEQCIBhwaESLiVS7PM8d9wz1za4UiF8Pmpb7CSo7RnExsyuwAiBYqxDrT1aJk81jp7vQBtKkWvGstRpTNHOiQG6zYFzR3Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":47807},"main":"./dist/index.js","_from":"file:storycap-testrun-browser-2.0.0-canary.0.tgz","types":"./dist/index.d.ts","tsdown":{"dts":true,"clean":true,"entry":["src/index.ts","src/vitest-plugin/index.ts"],"format":["esm","cjs"],"minify":true,"sourcemap":false,"splitting":false},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json","./vitest-plugin":{"types":"./dist/vitest-plugin/index.d.ts","import":"./dist/vitest-plugin/index.mjs","require":"./dist/vitest-plugin/index.js"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rimraf dist","typecheck":"tsc","test:watch":"vitest"},"_npmUser":{"name":"wadackel","email":"wadackel@gmail.com"},"_resolved":"/private/var/folders/j6/2yds_hjd7j13wmsnjhbcbmjr0000gn/T/72a4f55a1378d0f94eb38c7cb32ac07c/storycap-testrun-browser-2.0.0-canary.0.tgz","_integrity":"sha512-kVXf5DRvT88W0URv6vdPMofVDoYDvVNQMEWxJl9WqTy4U6Tq+9iUwrt9VSlG6yjB3hnFKoyln+vB+a66TIsaZw==","repository":{"url":"git+https://github.com/reg-viz/storycap-testrun.git","type":"git","directory":"packages/browser"},"_npmVersion":"10.9.3","description":"Screenshot capture for Storybook addon-vitest - Provides stable visual testing functionality and Vitest plugin for Storybook stories running in browser environments","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@storycap-testrun/internal":"2.0.0-canary.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"3.2.4","@vitest/browser":"3.2.4"},"peerDependencies":{"@vitest/browser":"*"},"_npmOperationalInternal":{"tmp":"tmp/browser_2.0.0-canary.0_1758441645842_0.6536771292309702","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@storycap-testrun/browser","version":"2.0.0","keywords":["storybook","storybook-addon","storycap","addon","addon-vitest","playwright","screenshot","visual-testing","testing","test","vitest"],"author":{"name":"wadackel"},"license":"MIT","_id":"@storycap-testrun/browser@2.0.0","maintainers":[{"name":"wadackel","email":"wadackel@gmail.com"}],"contributors":[{"name":"Yosuke Kurami"}],"homepage":"https://github.com/reg-viz/storycap-testrun","bugs":{"url":"https://github.com/reg-viz/storycap-testrun/issues"},"dist":{"shasum":"2fdee4f333506fb09f4cdddfdf6a8e22750c4ac9","tarball":"https://registry.npmjs.org/@storycap-testrun/browser/-/browser-2.0.0.tgz","fileCount":20,"integrity":"sha512-lO5AbCCRHYWofzrcoZK1Jtcz06AP5ay42cSJRXtL/t4d9XxVQZKFNvB20ayUknZMlhSQtfVMt8/56r0xBOC8KQ==","signatures":[{"sig":"MEYCIQDpbpG1+EDjb3Pd9j7tqryUH6goPOhVE+xTgfd9I58NvQIhAKdwu6SvVguVneBY5PZXMYm6PGZV8HTyf/xhVFoZrDE4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@storycap-testrun%2fbrowser@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":47838},"main":"./dist/index.js","_from":"file:storycap-testrun-browser-2.0.0.tgz","types":"./dist/index.d.ts","tsdown":{"dts":true,"clean":true,"entry":["src/index.ts","src/vitest-plugin/index.ts"],"format":["esm","cjs"],"minify":true,"sourcemap":false,"splitting":false},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./package.json":"./package.json","./vitest-plugin":{"types":"./dist/vitest-plugin/index.d.ts","import":"./dist/vitest-plugin/index.mjs","require":"./dist/vitest-plugin/index.js"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rimraf dist","typecheck":"tsc","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:645ada33-5fd9-4c61-aac1-98288572dd2d"}},"_resolved":"/tmp/57860412e7776d7e9e2d94822a5b28a6/storycap-testrun-browser-2.0.0.tgz","_integrity":"sha512-lO5AbCCRHYWofzrcoZK1Jtcz06AP5ay42cSJRXtL/t4d9XxVQZKFNvB20ayUknZMlhSQtfVMt8/56r0xBOC8KQ==","repository":{"url":"git+https://github.com/reg-viz/storycap-testrun.git","type":"git","directory":"packages/browser"},"_npmVersion":"11.6.0","description":"Screenshot capture for Storybook addon-vitest - Provides stable visual testing functionality and Vitest plugin for Storybook stories running in browser environments","directories":{},"_nodeVersion":"20.19.5","dependencies":{"@storycap-testrun/internal":"2.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"3.2.4","@vitest/browser":"3.2.4"},"peerDependencies":{"@vitest/browser":"*"},"_npmOperationalInternal":{"tmp":"tmp/browser_2.0.0_1758443778418_0.8215111660124543","host":"s3://npm-registry-packages-npm-production"}},"2.1.0":{"name":"@storycap-testrun/browser","version":"2.1.0","keywords":["addon","addon-vitest","playwright","screenshot","storybook","storybook-addon","storycap","test","testing","visual-testing","vitest"],"author":{"name":"wadackel"},"license":"MIT","_id":"@storycap-testrun/browser@2.1.0","maintainers":[{"name":"wadackel","email":"wadackel@gmail.com"}],"contributors":[{"name":"Yosuke Kurami"}],"homepage":"https://github.com/reg-viz/storycap-testrun","bugs":{"url":"https://github.com/reg-viz/storycap-testrun/issues"},"dist":{"shasum":"268cb277b1d7b25db08c28f6aa4eccbbc6ee719d","tarball":"https://registry.npmjs.org/@storycap-testrun/browser/-/browser-2.1.0.tgz","fileCount":19,"integrity":"sha512-O8lwk35j/Gm0lYGLOlYGU7K5Wnc1cJaj9muImvlVbKs9xUEOL+XEO/pBqcjHHE/JQk8+lb1bpcYRXhDLgTctNA==","signatures":[{"sig":"MEYCIQCKPGiiio1SlWP3Xh9IN52kQhJ/GajPv8Zmmebl7DtArAIhAKqyYfLytgdvxgEoDzLihJE3our8IQP0vfzloqNipp4N","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@storycap-testrun%2fbrowser@2.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":3628212},"main":"./dist/index.cjs","_from":"file:storycap-testrun-browser-2.1.0.tgz","types":"./dist/index.d.cts","tsdown":{"dts":true,"deps":{"neverBundle":["vitest/browser"]},"clean":true,"entry":["src/index.ts","src/vitest-plugin/index.ts"],"format":["esm","cjs"],"minify":true,"sourcemap":false,"splitting":false},"exports":{".":{"types":{"import":"./dist/index.d.mts","require":"./dist/index.d.cts"},"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./vitest-plugin":{"types":{"import":"./dist/vitest-plugin/index.d.mts","require":"./dist/vitest-plugin/index.d.cts"},"import":"./dist/vitest-plugin/index.mjs","require":"./dist/vitest-plugin/index.cjs"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rimraf dist","typecheck":"tsc","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:645ada33-5fd9-4c61-aac1-98288572dd2d"}},"_resolved":"/tmp/558a80c40387e011834300fec82bb927/storycap-testrun-browser-2.1.0.tgz","_integrity":"sha512-O8lwk35j/Gm0lYGLOlYGU7K5Wnc1cJaj9muImvlVbKs9xUEOL+XEO/pBqcjHHE/JQk8+lb1bpcYRXhDLgTctNA==","repository":{"url":"git+https://github.com/reg-viz/storycap-testrun.git","type":"git","directory":"packages/browser"},"_npmVersion":"11.12.0","description":"Screenshot capture for Storybook addon-vitest - Provides stable visual testing functionality and Vitest plugin for Storybook stories running in browser environments","directories":{},"_nodeVersion":"20.20.1","dependencies":{"@storycap-testrun/internal":"2.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.0","@vitest/browser-playwright":"4.1.0"},"peerDependencies":{"@vitest/browser-playwright":"*"},"_npmOperationalInternal":{"tmp":"tmp/browser_2.1.0_1774107071896_0.28648483303755246","host":"s3://npm-registry-packages-npm-production"}},"2.1.1":{"name":"@storycap-testrun/browser","version":"2.1.1","keywords":["addon","addon-vitest","playwright","screenshot","storybook","storybook-addon","storycap","test","testing","visual-testing","vitest"],"author":{"name":"wadackel"},"license":"MIT","_id":"@storycap-testrun/browser@2.1.1","maintainers":[{"name":"wadackel","email":"wadackel@gmail.com"}],"contributors":[{"name":"Yosuke Kurami"}],"homepage":"https://github.com/reg-viz/storycap-testrun","bugs":{"url":"https://github.com/reg-viz/storycap-testrun/issues"},"dist":{"shasum":"de1690238d03889d690f083caffe616be5915a65","tarball":"https://registry.npmjs.org/@storycap-testrun/browser/-/browser-2.1.1.tgz","fileCount":17,"integrity":"sha512-LQpkmPExjdojELXNzw98IBgWnX2LYkCRzZ4gyBvUk+4ut1vNCOQhbMrT6dhRa/h31OdP/E2utoJXHoITYQKjTw==","signatures":[{"sig":"MEUCIQC/Vs1oPqPLJIlGrMGhpQw/nXokHe72SAxm9xK1k/XM7gIgIoN9XcjyyfgZACd9hWT7SjaDiN3fXl6aBUJeePc8k3k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@storycap-testrun%2fbrowser@2.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":7047073},"main":"./dist/index.cjs","_from":"file:storycap-testrun-browser-2.1.1.tgz","types":"./dist/index.d.cts","exports":{".":{"types":{"import":"./dist/index.d.mts","require":"./dist/index.d.cts"},"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./vitest-plugin":{"types":{"import":"./dist/vitest-plugin/index.d.mts","require":"./dist/vitest-plugin/index.d.cts"},"import":"./dist/vitest-plugin/index.mjs","require":"./dist/vitest-plugin/index.cjs"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rimraf dist","typecheck":"tsc && pnpm typecheck:dist","test:watch":"vitest","typecheck:dist":"tsc -p test-types"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:645ada33-5fd9-4c61-aac1-98288572dd2d"}},"_resolved":"/tmp/7a2f26a3d164f86a18dc24063ce361e2/storycap-testrun-browser-2.1.1.tgz","_integrity":"sha512-LQpkmPExjdojELXNzw98IBgWnX2LYkCRzZ4gyBvUk+4ut1vNCOQhbMrT6dhRa/h31OdP/E2utoJXHoITYQKjTw==","repository":{"url":"git+https://github.com/reg-viz/storycap-testrun.git","type":"git","directory":"packages/browser"},"_npmVersion":"11.13.0","description":"Screenshot capture for Storybook addon-vitest - Provides stable visual testing functionality and Vitest plugin for Storybook stories running in browser environments","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@storycap-testrun/internal":"2.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.0","@vitest/browser-playwright":"4.1.0"},"peerDependencies":{"@vitest/browser-playwright":"*"},"_npmOperationalInternal":{"tmp":"tmp/browser_2.1.1_1777453983387_0.9666460366020311","host":"s3://npm-registry-packages-npm-production"}},"3.0.0":{"name":"@storycap-testrun/browser","version":"3.0.0","keywords":["addon","addon-vitest","playwright","screenshot","storybook","storybook-addon","storycap","test","testing","visual-testing","vitest"],"author":"wadackel","license":"MIT","_id":"@storycap-testrun/browser@3.0.0","maintainers":[{"name":"wadackel","email":"wadackel@gmail.com"}],"contributors":["Yosuke Kurami"],"homepage":"https://github.com/reg-viz/storycap-testrun","bugs":{"url":"https://github.com/reg-viz/storycap-testrun/issues"},"dist":{"shasum":"2444bdf677882e552c390543f74af5771676a988","tarball":"https://registry.npmjs.org/@storycap-testrun/browser/-/browser-3.0.0.tgz","fileCount":17,"integrity":"sha512-bkJDN5Llhy3T+yJXKyIr709DZYukJ3WHVfB/wissutb/avi59/U3xqbGOnsnElrNJXE3LSGkzrNjohHN311aVw==","signatures":[{"sig":"MEQCIFJxehg3SimMsBafNKg4q1ea3XmkR5NWGpY3EUNrN9j6AiA/TQbnZpkm+UKmDCIxIudOE+YejBF0DYCsxLwKLoCZtQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCGBLPvy43QttUJxSC0bcgGsYM6YGBgnS9xFbWGCJhgqAIhALhPM304e0gW1WO/+ZTwIoJH2yIV4G9qZVkXszL9n9eq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@storycap-testrun%2fbrowser@3.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":76032},"main":"./dist/index.cjs","types":"./dist/index.d.cts","engines":{"node":">=22"},"exports":{".":{"types":{"import":"./dist/index.d.mts","require":"./dist/index.d.cts"},"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./vitest-plugin":{"types":{"import":"./dist/vitest-plugin/index.d.mts","require":"./dist/vitest-plugin/index.d.cts"},"import":"./dist/vitest-plugin/index.mjs","require":"./dist/vitest-plugin/index.cjs"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rimraf dist","typecheck":"tsc && pnpm typecheck:dist","test:watch":"vitest","typecheck:dist":"tsc -p test-types"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:645ada33-5fd9-4c61-aac1-98288572dd2d"}},"repository":{"url":"https://github.com/reg-viz/storycap-testrun.git","type":"git","directory":"packages/browser"},"description":"Screenshot capture for Storybook addon-vitest - Provides stable visual testing functionality and Vitest plugin for Storybook stories running in browser environments","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@storycap-testrun/internal":"3.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.11","@vitest/browser-playwright":"4.1.11"},"peerDependencies":{"@vitest/browser-playwright":"*"},"_npmOperationalInternal":{"tmp":"tmp/browser_3.0.0_1787995137008_0.5178373994108769","host":"s3://npm-registry-packages-npm-production"}},"3.0.1":{"name":"@storycap-testrun/browser","version":"3.0.1","keywords":["addon","addon-vitest","playwright","screenshot","storybook","storybook-addon","storycap","test","testing","visual-testing","vitest"],"author":"wadackel","license":"MIT","_id":"@storycap-testrun/browser@3.0.1","maintainers":[{"name":"wadackel","email":"wadackel@gmail.com"}],"contributors":["Yosuke Kurami"],"homepage":"https://github.com/reg-viz/storycap-testrun","bugs":{"url":"https://github.com/reg-viz/storycap-testrun/issues"},"dist":{"shasum":"79a3977eb044432960892ba8f77792cae0e402ea","tarball":"https://registry.npmjs.org/@storycap-testrun/browser/-/browser-3.0.1.tgz","fileCount":17,"integrity":"sha512-pytrdPLMXxXy2dKKcu23QyOa6KoQLljRu3DkK2s66WTtFO4fXXF4Mfd2X4jBLkHUdjzgTZhq7O+g/R90SofH2w==","signatures":[{"sig":"MEYCIQD60VFEKupOYLfIgoG3eT7kr+BCt64TezYkS1jWe5G7MgIhAIuesNI4wj+T2FI424dW+aeUEsc1zTPquOyCHzxWvjAw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIBRjpS1K44wz1WYBfmpHT+Qj30a1vV51UR6TeshNaBA1AiAlkCv11NoJtJAibxa5Gjs1dfmlEZh7g/I0QMnuZFGSRw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@storycap-testrun%2fbrowser@3.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":78426},"main":"./dist/index.cjs","types":"./dist/index.d.cts","engines":{"node":">=22"},"exports":{".":{"types":{"import":"./dist/index.d.mts","require":"./dist/index.d.cts"},"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./vitest-plugin":{"types":{"import":"./dist/vitest-plugin/index.d.mts","require":"./dist/vitest-plugin/index.d.cts"},"import":"./dist/vitest-plugin/index.mjs","require":"./dist/vitest-plugin/index.cjs"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rimraf dist","typecheck":"tsc && pnpm typecheck:dist","test:watch":"vitest","typecheck:dist":"tsc -p test-types"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:645ada33-5fd9-4c61-aac1-98288572dd2d"}},"repository":{"url":"https://github.com/reg-viz/storycap-testrun.git","type":"git","directory":"packages/browser"},"description":"Screenshot capture for Storybook addon-vitest - Provides stable visual testing functionality and Vitest plugin for Storybook stories running in browser environments","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@storycap-testrun/internal":"3.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.11","@vitest/browser-playwright":"4.1.11"},"peerDependencies":{"@vitest/browser-playwright":"*"},"_npmOperationalInternal":{"tmp":"tmp/browser_3.0.1_1788365488137_0.6325186711576078","host":"s3://npm-registry-packages-npm-production"}},"3.1.0":{"name":"@storycap-testrun/browser","version":"3.1.0","keywords":["addon","addon-vitest","playwright","screenshot","storybook","storybook-addon","storycap","test","testing","visual-testing","vitest"],"author":"wadackel","license":"MIT","_id":"@storycap-testrun/browser@3.1.0","maintainers":[{"name":"wadackel","email":"wadackel@gmail.com"}],"contributors":["Yosuke Kurami"],"homepage":"https://github.com/reg-viz/storycap-testrun","bugs":{"url":"https://github.com/reg-viz/storycap-testrun/issues"},"dist":{"shasum":"c635ee88838c677a04a23d77d0d83fcba24fff86","tarball":"https://registry.npmjs.org/@storycap-testrun/browser/-/browser-3.1.0.tgz","fileCount":17,"integrity":"sha512-NhtWyHJGuNtwfQlTnSxfjjgWQkoURDDPwdfzZ59CWHLvUgWzydaHuQjtHbL41vglyNqn/i21njOqEOW5LroXBw==","signatures":[{"sig":"MEYCIQDZz8J1eN84lFxvle1RAge6sCqhf9vOEeq40+b5HuvBWQIhAOb2S3YInAmFeJR5JSxhmBuLrbr+2ytUs9ta1OJawQS4","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCIEXnLXNNnJvdzzzcNBhSiyXedhuJXzQ5WnfSNADkvrXeAiB4SVHJXkcGC33UZx9blXUzWjaR7CvpDVworfLrxTYXpg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@storycap-testrun%2fbrowser@3.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":81809},"main":"./dist/index.cjs","types":"./dist/index.d.cts","engines":{"node":">=22"},"exports":{".":{"types":{"import":"./dist/index.d.mts","require":"./dist/index.d.cts"},"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./vitest-plugin":{"types":{"import":"./dist/vitest-plugin/index.d.mts","require":"./dist/vitest-plugin/index.d.cts"},"import":"./dist/vitest-plugin/index.mjs","require":"./dist/vitest-plugin/index.cjs"}},"scripts":{"test":"vitest run","build":"tsdown","clean":"rimraf dist","typecheck":"tsc && pnpm typecheck:dist","test:watch":"vitest","typecheck:dist":"tsc -p test-types"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:645ada33-5fd9-4c61-aac1-98288572dd2d"}},"repository":{"url":"https://github.com/reg-viz/storycap-testrun.git","type":"git","directory":"packages/browser"},"description":"Screenshot capture for Storybook addon-vitest - Provides stable visual testing functionality and Vitest plugin for Storybook stories running in browser environments","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@storycap-testrun/internal":"3.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"4.1.11","@vitest/browser-playwright":"4.1.11"},"peerDependencies":{"@vitest/browser-playwright":"*"},"_npmOperationalInternal":{"tmp":"tmp/browser_3.1.0_1788784670222_0.2347635075797463","host":"s3://npm-registry-packages-npm-production"}},"3.1.1":{"_id":"@storycap-testrun/browser@3.1.1","bugs":{"url":"https://github.com/reg-viz/storycap-testrun/issues"},"dist":{"shasum":"f9a79048e5705a1c793813442788e715bdbea783","tarball":"https://registry.npmjs.org/@storycap-testrun/browser/-/browser-3.1.1.tgz","fileCount":17,"integrity":"sha512-nv05/cHkojM/qxaBqEffTKQQHOv8IlKAyMztc6ncNWjSRR39U82Okgnl8NnAySN1emnC8KLmE4l8Fjrig32d+A==","signatures":[{"sig":"MEUCIQCEdwzLCvcpLH/8SiQtAwAmgKLmwt7jajSoongDHYQNHQIgU68liY17lMky5SuHFfQ7we0112yXIZ7zoSJSPf2tVEI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFlANnuQ96fl7VWBMlYhB+xbRY0eAHSsagQ2IXbzDpNXAiBzPY4JaPF+NPqCFN4riapzANjHnMhHLXtgJ3dF0Kg0Tw=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@storycap-testrun%2fbrowser@3.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":81728},"main":"./dist/index.cjs","name":"@storycap-testrun/browser","types":"./dist/index.d.cts","author":"wadackel","engines":{"node":">=22"},"exports":{".":{"types":{"import":"./dist/index.d.mts","require":"./dist/index.d.cts"},"import":"./dist/index.mjs","require":"./dist/index.cjs"},"./package.json":"./package.json","./vitest-plugin":{"types":{"import":"./dist/vitest-plugin/index.d.mts","require":"./dist/vitest-plugin/index.d.cts"},"import":"./dist/vitest-plugin/index.mjs","require":"./dist/vitest-plugin/index.cjs"}},"license":"MIT","scripts":{"test":"vitest run","build":"tsdown","clean":"rimraf dist","typecheck":"tsc && pnpm typecheck:dist","test:watch":"vitest","typecheck:dist":"tsc -p test-types"},"version":"3.1.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:645ada33-5fd9-4c61-aac1-98288572dd2d"}},"homepage":"https://github.com/reg-viz/storycap-testrun","keywords":["addon","addon-vitest","playwright","screenshot","storybook","storybook-addon","storycap","test","testing","visual-testing","vitest"],"repository":{"url":"https://github.com/reg-viz/storycap-testrun.git","type":"git","directory":"packages/browser"},"description":"Screenshot capture for Storybook addon-vitest - Provides stable visual testing functionality and Vitest plugin for Storybook stories running in browser environments","directories":{},"maintainers":[{"name":"wadackel","email":"wadackel@gmail.com"}],"contributors":["Yosuke Kurami"],"dependencies":{"@storycap-testrun/internal":"3.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"5.0.0","@vitest/browser-playwright":"5.0.0"},"peerDependencies":{"@vitest/browser-playwright":"*"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/browser_3.1.1_1789748376344_0.9750833692267686"}}},"time":{"created":"2025-09-21T08:00:45.676Z","modified":"2026-09-18T16:19:37.560Z","2.0.0-canary.0":"2025-09-21T08:00:46.057Z","2.0.0":"2025-09-21T08:36:18.601Z","2.1.0":"2026-03-21T15:31:12.061Z","2.1.1":"2026-04-29T09:13:03.685Z","3.0.0":"2026-08-29T09:18:57.081Z","3.0.1":"2026-09-02T16:11:28.226Z","3.1.0":"2026-09-07T12:37:50.306Z","3.1.1":"2026-09-18T16:19:36.443Z"},"bugs":{"url":"https://github.com/reg-viz/storycap-testrun/issues"},"author":"wadackel","license":"MIT","homepage":"https://github.com/reg-viz/storycap-testrun","keywords":["addon","addon-vitest","playwright","screenshot","storybook","storybook-addon","storycap","test","testing","visual-testing","vitest"],"repository":{"url":"https://github.com/reg-viz/storycap-testrun.git","type":"git","directory":"packages/browser"},"description":"Screenshot capture for Storybook addon-vitest - Provides stable visual testing functionality and Vitest plugin for Storybook stories running in browser environments","contributors":["Yosuke Kurami"],"maintainers":[{"name":"wadackel","email":"wadackel@gmail.com"}],"readme":"<h1 align=\"center\">@storycap-testrun/browser</h1>\n<p align=\"center\">\n    <a href=\"https://github.com/reg-viz/storycap-testrun/actions/workflows/ci.yaml?query=branch%3Amain\"><img alt=\"GitHub Actions Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/reg-viz/storycap-testrun/ci.yaml?branch=main&style=flat-square&logo=GitHub%20Actions&logoColor=white\"></a>\n    <a href=\"https://www.npmjs.com/package/@storycap-testrun/browser\"><img alt=\"NPM Version\" src=\"https://img.shields.io/npm/v/%40storycap-testrun%2Fbrowser?style=flat-square&logo=white\"></a>\n    <a href=\"https://github.com/reg-viz/storycap-testrun/blob/main/LICENSE\"><img src=\"https://img.shields.io/github/license/reg-viz/storycap-testrun?label=license&style=flat-square\" alt=\"MIT LICENSE\" /></a>\n</p>\n<p align=\"center\">Screenshot capture for Storybook addon-vitest - Provides stable visual testing functionality and Vitest plugin for Storybook stories running in browser environments.</p>\n\n---\n\n**@storycap-testrun/browser** brings reliable visual testing to [`@storybook/addon-vitest`][storybook-addon-vitest] with the same stability approach as [storycap][storycap], optimized for Vitest browser environments :camera:\n\n## Why `@storycap-testrun/browser`?\n\n[`@storybook/addon-vitest`][storybook-addon-vitest] enables running Storybook tests directly in the browser environment. While the underlying `@vitest/browser` provides basic screenshot functionality, it lacks the specialized features needed for reliable visual regression testing:\n\n**Limited visual testing capabilities:**\n\n- Basic screenshot API without stability detection\n- No automatic waiting for rendering completion\n- Fixed file paths with limited configuration options\n- No built-in handling for dynamic content or animations\n- Missing retry mechanisms for flaky captures\n\n`@storycap-testrun/browser` enhances the basic functionality with production-ready features:\n\n**Stability and reliability:**\n\n- **Intelligent waiting**: Automatically detects when rendering is truly complete using CDP metrics\n- **Hash verification**: Ensures screenshot consistency through multiple capture comparison\n- **Flaky prevention**: Built-in masking and removal for dynamic content\n\n**Developer experience:**\n\n- **Flexible file management**: Full control over screenshot paths and naming conventions\n- **Story-level configuration**: Per-story parameters for skip, delay, mask, remove, and viewport\n- **Vitest plugin**: Seamless integration with Vitest's configuration and lifecycle\n\n**Performance optimizations:**\n\n- **Metrics monitoring**: Uses Chrome DevTools Protocol for efficient stability detection (Chromium)\n- **Smart retries**: Configurable retry logic that minimizes unnecessary captures\n- **Browser-native execution**: Screenshots captured directly in the test environment without external automation\n\nThis makes it ideal for teams who need more than basic screenshots - providing the reliability and flexibility required for production visual regression testing workflows.\n\n### Features\n\n- High stability checks for rendering content\n- Accurate waiting for Play Function\n- Customization before and after screenshot capture using Hooks\n- Masking of unstable elements\n- Removal of unstable elements\n- Skipping of unstable elements\n- Easy setup with Vitest plugin\n- Integration with Storybook addon-vitest\n\n### Requirements\n\n- Vitest browser mode with Playwright provider\n- `@storybook/addon-vitest` setup\n\n### Limitations\n\n- **Metrics monitoring limited to Chromium browsers**\n  - Full stability checks work only with Chromium-based browsers (Chrome, Edge, etc.)\n  - **Fallback**: Other browsers use hash verification only (still effective, but slower)\n- **Browser environment constraints**\n  - Limited to capabilities available in browser context.\n- **Full-page screenshots with `position: fixed/sticky`**\n  - When capturing full-page screenshots of content larger than the viewport, elements with `position: fixed` or `position: sticky` may appear duplicated in the output image.\n- **Incompatible with `browser.ui`**\n  - The Vitest UI keeps mutating the page, so the CDP metrics never settle and every capture ends in `MetricsTimeoutError`. `browser.ui` is already off whenever `headless: true` is set.\n- **Only Chromium is exercised**\n  - The examples and CI run Chromium. Firefox and WebKit should work through the hash-verification fallback, but are not verified.\n\n## Installation\n\nInstall via npm:\n\n```bash\n$ npm install --save-dev @storycap-testrun/browser\n```\n\n## Getting Started\n\nPlease set up [`@storybook/addon-vitest`][storybook-addon-vitest] beforehand.\n\n### 1. Configure Vitest\n\nAdd the storycap plugin to your `vitest.config.js`:\n\n```javascript\nimport path from 'node:path';\nimport { defineConfig, defineProject } from 'vitest/config';\nimport { storybookTest } from '@storybook/addon-vitest/vitest-plugin';\nimport { playwright } from '@vitest/browser-playwright';\nimport storycap from '@storycap-testrun/browser/vitest-plugin';\n\nexport default defineConfig({\n  test: {\n    projects: [\n      defineProject({\n        plugins: [\n          storybookTest({\n            configDir: '.storybook',\n            storybookScript: 'storybook --ci',\n          }),\n          storycap({\n            viewport: {\n              width: 1280,\n              height: 720,\n            },\n          }),\n        ],\n        test: {\n          name: 'storybook',\n          browser: {\n            enabled: true,\n            provider: playwright(),\n            headless: true,\n            instances: [{ browser: 'chromium' }],\n          },\n          setupFiles: ['./.storybook/vitest.setup.ts'],\n        },\n      }),\n    ],\n  },\n});\n```\n\n### 2. Setup Screenshot Capture\n\nCreate `.storybook/vitest.setup.ts`:\n\n```typescript\nimport { afterEach, beforeEach } from 'vitest';\nimport { page } from '@vitest/browser/context';\nimport { screenshot } from '@storycap-testrun/browser';\nimport { setProjectAnnotations } from '@storybook/react-vite'; // Adjust for your framework\nimport * as projectAnnotations from './preview';\n\nsetProjectAnnotations([projectAnnotations]);\n\n// Sizes the iframe while the test body runs. The captured image uses the\n// storycap plugin's viewport option instead.\nbeforeEach(async () => {\n  await page.viewport(1280, 720);\n});\n\nafterEach(async (context) => {\n  await screenshot(page, context);\n});\n```\n\n**`beforeEach` with `page.viewport()`**\n\n`page.viewport()` sizes the Vitest iframe while your test body runs, so it is what play functions and interaction assertions see. It does not decide the screenshot dimensions: immediately before capturing, storycap lays the story out at the plugin's `viewport` size, and the image is taken at that size.\n\nSet it when a play function depends on the viewport. Otherwise the captured image size is controlled by the plugin's `viewport` option, optionally overridden per story with the [`viewport` parameter](#viewport-1).\n\n**`afterEach` with `screenshot()`**\n\n- **Post-story state**: Captures the final state after all story rendering and play functions complete\n- **Test isolation**: Each story gets its own screenshot without interference from previous tests\n- **Automatic execution**: No need to manually call screenshot in every story file\n\n### 3. Run Tests\n\n```bash\n$ vitest run --project=storybook\n```\n\nBy default, the screenshot images are saved in the `__screenshots__` directory.\n\n### TypeScript Setup\n\nBy importing types and merging them for the framework you use, you can enable type checking for parameters specified in each Story.\n\n```typescript\nimport type { ScreenshotParameters } from '@storycap-testrun/browser';\n\n// Replace it with the framework you are using.\ndeclare module '@storybook/react' {\n  interface Parameters {\n    screenshot?: ScreenshotParameters;\n  }\n}\n\n// For other frameworks, replace with your framework's module name\n```\n\n## API\n\n### `screenshot(page, context, options)`\n\n- `page: BrowserPage`\n  - The page instance from `@vitest/browser/context`.\n- `context: TestContext`\n  - The test context from Vitest passed in setup hooks.\n- `options: BrowserScreenshotOptions`\n  - See [Options Section](#options).\n- Returns: `Promise<void>`\n\n## Vitest Plugin\n\n### `storycap(options)`\n\nThe Vitest plugin that integrates screenshot functionality with Vitest's browser mode.\n\n**What the plugin does:**\n\n- **File output management**: Handles screenshot file naming and directory structure\n- **Test context integration**: Provides story metadata to the screenshot function\n- **Build-time configuration**: Sets up screenshot options during Vitest configuration\n- **Vitest compatibility**: Ensures proper integration with Vitest's browser test lifecycle\n\n**Why you need it:**\nThe plugin bridges Vitest's test execution with screenshot capture, providing the necessary context and configuration that the standalone `screenshot()` function needs to work properly in a Vitest environment.\n\n#### Plugin Options\n\n```typescript\ntype VitestStorycapPluginOptions = {\n  output?: ScreenshotOutputOptions<BrowserScreenshotContext>;\n  viewport?: { width: number; height: number };\n};\n```\n\n##### `viewport`\n\n**Type:** `{ width: number; height: number }`\n**Default:** Uses the Playwright context viewport (typically 1280x720)\n\nSets the viewport dimensions for screenshot capture. This ensures screenshots are captured at the specified dimensions regardless of Vitest's internal iframe scaling.\n\n```javascript\nstorycap({\n  viewport: { width: 1280, height: 720 },\n});\n```\n\nWhile a screenshot is taken, the Playwright context is resized to this size, so hooks that run during the capture see the resized page. The resize is skipped when the context viewport already matches, which you can arrange through the provider:\n\n```javascript\nbrowser: {\n  provider: playwright({\n    contextOptions: { viewport: { width: 1280, height: 720 } },\n  }),\n  instances: [{ browser: 'chromium' }],\n}\n```\n\n> [!NOTE]\n> `page.viewport()` from `vitest/browser` does not change this size. It sizes the Vitest iframe during the test body only.\n\n> [!TIP]\n> Individual stories can override these dimensions with the per-story [`viewport` parameter](#viewport-1).\n\n> [!WARNING]\n> When the Playwright context has no viewport of its own — `contextOptions: { viewport: null }` — the resize is one-way: Playwright cannot turn viewport emulation back off, so the page keeps this size for the rest of the run. Give the context a viewport as above to avoid it.\n\n##### `output.dir`\n\n**Type:** `string`  \n**Default:** `path.join(process.cwd(), '__screenshots__')`\n\nSpecifies the root directory for saving screenshot images.\n\n##### `output.file`\n\n**Type:** `string | ((context: BrowserScreenshotContext) => string)`  \n**Default:** `path.join('[file]', '[name].png')`\n\nSpecifies the file name for the screenshot image of each Story.\n\nWhen specifying a `string`, the following templates can be used:\n\n- `[id]`: Story ID\n- `[name]`: Story's name\n- `[file]`: Test file path\n\nWhen specifying a function, you can access the context object:\n\n```typescript\nstorycap({\n  output: {\n    file: (context) =>\n      path.join(context.file.replace('.stories.js', ''), `${context.name}.png`),\n  },\n});\n```\n\n## Options\n\nOptions that can be specified as the third argument in the `screenshot` function.\n\n### `flakiness.metrics.enabled`\n\n**Type:** `boolean`  \n**Default:** `true`\n\nWhen set to `true`, it monitors several metrics related to the rendering of the Story and performs stability checks.\n\n> [!WARNING]\n> As this process depends on [CDP][cdp], it works only in Chromium browsers. If enabled in browsers other than Chromium, a warning will be displayed.\n\n### `flakiness.metrics.retries`\n\n**Type:** `number`  \n**Default:** `1000`\n\nThe number of retries during metrics monitoring. It continues monitoring for the specified number of frames (1 frame = 16ms) and ensures that the metrics stabilize.\n\n### `flakiness.retake.enabled`\n\n**Type:** `boolean`  \n**Default:** `true`\n\nThis option calculates the hash value of the screenshot image and checks the stability of the rendering content by ensuring that there are no changes in the image.\n\n> [!TIP]\n> In the case of Chromium, `flakiness.metrics.enabled` alone is often sufficient. Enabling this option means capturing screenshots at least twice, so it's recommended to disable it if it leads to performance degradation.\n\n### `flakiness.retake.interval`\n\n**Type:** `number`  \n**Default:** `100`\n\nThe interval in milliseconds before attempting to capture the screenshot again. The second capture is performed immediately for hash checking.\n\n### `flakiness.retake.retries`\n\n**Type:** `number`  \n**Default:** `10`\n\nThe number of times to repeat capturing the screenshot until the hash values of the images are identical. A value of 3 or more is recommended to achieve the effect of retries.\n\n### `hooks`\n\n**Type:** `BrowserScreenshotHook[]`  \n**Default:** `[]`\n\nHooks for interrupting processes before and after screenshot capture. Please specify an object that implements the following interface.\n\n```typescript\nexport type BrowserScreenshotHook = {\n  setup?: (\n    page: BrowserPage,\n    context: BrowserScreenshotContext,\n  ) => Promise<void>;\n  preCapture?: (\n    page: BrowserPage,\n    context: BrowserScreenshotContext,\n  ) => Promise<void>;\n  postCapture?: (\n    page: BrowserPage,\n    context: BrowserScreenshotContext,\n    filepath: string,\n  ) => Promise<void>;\n};\n```\n\nEach is executed in the following lifecycle:\n\n| Method        | Description                                                 |\n| :------------ | :---------------------------------------------------------- |\n| `setup`       | Immediately after the `screenshot` function is executed     |\n| `preCapture`  | After stability checks are completed                        |\n| `postCapture` | After the screenshot is captured, before the image is saved |\n\nThe built-in functions like Masking and Removal are implemented using Hooks.\n\n### `fullPage`\n\n**Type:** `boolean`  \n**Default:** `true`\n\nSee [Page | Playwright][playwright-screenshot].\n\n### `omitBackground`\n\n**Type:** `boolean`  \n**Default:** `false`\n\nSee [Page | Playwright][playwright-screenshot].\n\n### `scale`\n\n**Type:** `'css' | 'device'`  \n**Default:** `'device'`\n\nSee [Page | Playwright][playwright-screenshot].\n\n## Parameters\n\nThese are parameters that can be specified for each Story.\n\n```typescript\n// Button.stories.tsx\nconst meta: Meta<typeof Button> = {\n  component: Button,\n  parameters: {\n    screenshot: {/* parameters... */},\n  },\n};\n\nexport default meta;\n```\n\n### `skip`\n\n**Type:** `boolean`  \n**Default:** `false`\n\nSkips the screenshot capture. Useful in cases where you want to conduct tests with addon-vitest but disable screenshot capture.\n\n### `delay`\n\n**Type:** `number`  \n**Default:** None\n\nThe delay in milliseconds before capturing the screenshot. Waits after completing the basic stability checks.\n\n### `mask`\n\n**Type:** `string | { selector: string; color: string }`  \n**Default:** None\n\nMasks elements corresponding to the CSS selector with a rectangle. Useful for hiding elements that inevitably differ in content with each render.\n\n### `remove`\n\n**Type:** `string`\n**Default:** None\n\nRemoves elements corresponding to the CSS selector.\n\n### `fullPage`\n\n**Type:** `boolean`\n**Default:** `true`\n\nCaptures the full scrollable content when `true`. When `false`, captures only the viewport area. Can be set per-story to override the global default set in `screenshot()` options.\n\n```typescript\nexport const ViewportOnly = {\n  parameters: {\n    screenshot: {\n      fullPage: false,\n    },\n  },\n};\n```\n\n> [!NOTE]\n> When `fullPage` is `true` and content exceeds the viewport height or width, screenshots are captured by scrolling through the content and stitching the results. Elements with `position: fixed` or `position: sticky` may appear duplicated across tiles.\n\n### `omitBackground`\n\n**Type:** `boolean`\n**Default:** `false`\n\nHides the default white background and allows capturing screenshots with transparency. Can be set per-story to override the global default.\n\n### `scale`\n\n**Type:** `'css' | 'device'`\n**Default:** `'device'`\n\nThe screenshot resolution scale. `'css'` produces screenshots at CSS pixel dimensions, while `'device'` produces screenshots at device pixel dimensions (which may be larger on high-DPI displays). Can be set per-story to override the global default.\n\n### `viewport`\n\n**Type:** `{ width?: number; height?: number }`\n**Default:** None\n\nOverrides the viewport the screenshot is captured at, for this story only. Both dimensions are optional — an omitted dimension falls back to the plugin's `viewport` option (or the Playwright context viewport when the plugin option is not set). Useful for stories such as dialogs that do not fit into the globally configured viewport.\n\n```typescript\nexport const TallDialog = {\n  parameters: {\n    screenshot: {\n      // Keep the configured width, capture at 800px height\n      viewport: { height: 800 },\n    },\n  },\n};\n```\n\nThe Playwright context is resized to the resolved viewport for the duration of the capture and restored afterwards, so other stories are not affected.\n\n> [!WARNING]\n> The same one-way caveat as the plugin's `viewport` option applies: when the Playwright context has no viewport of its own (`contextOptions: { viewport: null }`), enabling viewport emulation cannot be undone and the page keeps the overridden size for the rest of the run. Give the context a viewport to avoid it.\n\n## CHANGELOG\n\nSee [CHANGELOG.md](./CHANGELOG.md).\n\n## License\n\n[MIT © reg-viz](../../LICENSE)\n\n![reg-viz](https://raw.githubusercontent.com/reg-viz/artwork/master/repository/footer.png)\n\n[storycap]: https://github.com/reg-viz/storycap\n[storybook-addon-vitest]: https://storybook.js.org/docs/writing-tests/integrations/vitest-addon\n[vitest]: https://vitest.dev\n[playwright]: https://playwright.dev\n[cdp]: https://chromedevtools.github.io/devtools-protocol/\n[playwright-screenshot]: https://playwright.dev/docs/api/class-page#page-screenshot\n","readmeFilename":""}