happo 6.8.0 → 6.9.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.
Files changed (53) hide show
  1. package/dist/browser/main.js +132 -10
  2. package/dist/browser/main.js.map +2 -2
  3. package/dist/browser/takeDOMSnapshot.d.ts +7 -1
  4. package/dist/browser/takeDOMSnapshot.d.ts.map +1 -1
  5. package/dist/cli/cancelJob-Y4WJCCU6.js +10 -0
  6. package/dist/cli/{chunk-33PSYGHX.js → chunk-BESQLM5F.js} +2 -2
  7. package/dist/cli/{chunk-EDBI7VNX.js → chunk-BK32666K.js} +3 -3
  8. package/dist/cli/{chunk-WFQHO45L.js → chunk-CVX5DVCT.js} +2 -2
  9. package/dist/cli/{chunk-URV3R5XF.js → chunk-J2EA5OBW.js} +2 -2
  10. package/dist/cli/{chunk-Q6DV4AEM.js → chunk-P4EXA4AX.js} +4 -4
  11. package/dist/cli/{chunk-Q6DV4AEM.js.map → chunk-P4EXA4AX.js.map} +1 -1
  12. package/dist/cli/{chunk-CQ7QTIYV.js → chunk-R6YURZXU.js} +2 -2
  13. package/dist/cli/createAsyncComparison-CQLGQXY2.js +10 -0
  14. package/dist/cli/{createAsyncReport-62YCQXCV.js → createAsyncReport-4ZD53TJC.js} +4 -4
  15. package/dist/cli/{getFlakes-257F34EF.js → getFlakes-6ZGTWZTM.js} +4 -4
  16. package/dist/cli/main.js +11 -11
  17. package/dist/cli/package-4NRNRUE3.js +7 -0
  18. package/dist/cli/{prepareSnapRequests-R2YIHDTR.js → prepareSnapRequests-2LHSGFZV.js} +4 -4
  19. package/dist/cli/startJob-JAO5FUA2.js +10 -0
  20. package/dist/cli/{wrapper-7A35DA3L.js → wrapper-7RE2N7Y3.js} +7 -7
  21. package/dist/config/index.d.ts +18 -0
  22. package/dist/config/index.d.ts.map +1 -1
  23. package/dist/config/index.js.map +2 -2
  24. package/dist/cypress/index.d.ts.map +1 -1
  25. package/dist/cypress/index.js +187 -46
  26. package/dist/cypress/index.js.map +2 -2
  27. package/dist/cypress/task.d.ts +4 -0
  28. package/dist/cypress/task.d.ts.map +1 -1
  29. package/dist/cypress/task.js +11 -4
  30. package/dist/cypress/task.js.map +2 -2
  31. package/dist/isomorphic/types.d.ts +14 -0
  32. package/dist/isomorphic/types.d.ts.map +1 -1
  33. package/dist/playwright/index.d.ts.map +1 -1
  34. package/dist/playwright/index.js +10 -6
  35. package/dist/playwright/index.js.map +3 -3
  36. package/package.json +3 -3
  37. package/dist/cli/cancelJob-3MYHESOW.js +0 -10
  38. package/dist/cli/createAsyncComparison-MOLWGUJT.js +0 -10
  39. package/dist/cli/package-7QCVHFDF.js +0 -7
  40. package/dist/cli/startJob-6EVDORMA.js +0 -10
  41. /package/dist/cli/{cancelJob-3MYHESOW.js.map → cancelJob-Y4WJCCU6.js.map} +0 -0
  42. /package/dist/cli/{chunk-33PSYGHX.js.map → chunk-BESQLM5F.js.map} +0 -0
  43. /package/dist/cli/{chunk-EDBI7VNX.js.map → chunk-BK32666K.js.map} +0 -0
  44. /package/dist/cli/{chunk-WFQHO45L.js.map → chunk-CVX5DVCT.js.map} +0 -0
  45. /package/dist/cli/{chunk-URV3R5XF.js.map → chunk-J2EA5OBW.js.map} +0 -0
  46. /package/dist/cli/{chunk-CQ7QTIYV.js.map → chunk-R6YURZXU.js.map} +0 -0
  47. /package/dist/cli/{createAsyncComparison-MOLWGUJT.js.map → createAsyncComparison-CQLGQXY2.js.map} +0 -0
  48. /package/dist/cli/{createAsyncReport-62YCQXCV.js.map → createAsyncReport-4ZD53TJC.js.map} +0 -0
  49. /package/dist/cli/{getFlakes-257F34EF.js.map → getFlakes-6ZGTWZTM.js.map} +0 -0
  50. /package/dist/cli/{package-7QCVHFDF.js.map → package-4NRNRUE3.js.map} +0 -0
  51. /package/dist/cli/{prepareSnapRequests-R2YIHDTR.js.map → prepareSnapRequests-2LHSGFZV.js.map} +0 -0
  52. /package/dist/cli/{startJob-6EVDORMA.js.map → startJob-JAO5FUA2.js.map} +0 -0
  53. /package/dist/cli/{wrapper-7A35DA3L.js.map → wrapper-7RE2N7Y3.js.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  makeHappoAPIRequest
3
- } from "./chunk-CQ7QTIYV.js";
3
+ } from "./chunk-R6YURZXU.js";
4
4
  import {
5
5
  ErrorWithStatusCode
6
- } from "./chunk-33PSYGHX.js";
6
+ } from "./chunk-BESQLM5F.js";
7
7
 
8
8
  // src/network/cancelJob.ts
9
9
  async function cancelJob(status, message, config, { beforeSha, afterSha, link }, logger) {
@@ -43,4 +43,4 @@ async function cancelJob(status, message, config, { beforeSha, afterSha, link },
43
43
  export {
44
44
  cancelJob
45
45
  };
46
- //# sourceMappingURL=chunk-EDBI7VNX.js.map
46
+ //# sourceMappingURL=chunk-BK32666K.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  makeHappoAPIRequest
3
- } from "./chunk-CQ7QTIYV.js";
3
+ } from "./chunk-R6YURZXU.js";
4
4
 
5
5
  // src/network/startJob.ts
6
6
  function assertResultIsStartJobResult(result) {
@@ -36,4 +36,4 @@ async function startJob(config, { beforeSha, afterSha, link, message }, logger)
36
36
  export {
37
37
  startJob
38
38
  };
39
- //# sourceMappingURL=chunk-WFQHO45L.js.map
39
+ //# sourceMappingURL=chunk-CVX5DVCT.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  makeHappoAPIRequest
3
- } from "./chunk-CQ7QTIYV.js";
3
+ } from "./chunk-R6YURZXU.js";
4
4
 
5
5
  // src/network/createAsyncComparison.ts
6
6
  function assertResultIsCreateAsyncComparisonResult(result) {
@@ -60,4 +60,4 @@ async function createAsyncComparison(config, {
60
60
  export {
61
61
  createAsyncComparison
62
62
  };
63
- //# sourceMappingURL=chunk-URV3R5XF.js.map
63
+ //# sourceMappingURL=chunk-J2EA5OBW.js.map
@@ -1,7 +1,7 @@
1
1
  // package.json
2
2
  var package_default = {
3
3
  name: "happo",
4
- version: "6.8.0",
4
+ version: "6.9.0",
5
5
  description: "Catch unexpected visual and accessibility changes and UI bugs",
6
6
  license: "MIT",
7
7
  repository: {
@@ -133,8 +133,8 @@ var package_default = {
133
133
  "react-dom": "^19.2.0",
134
134
  "react-error-boundary": "^6.0.0",
135
135
  storybook: "^10.0.1",
136
- typescript: "^5.9.2",
137
- "typescript-eslint": "^8.56.1"
136
+ typescript: "^6.0.2",
137
+ "typescript-eslint": "^8.57.2"
138
138
  },
139
139
  dependencies: {
140
140
  "async-retry": "^1.3.3",
@@ -184,4 +184,4 @@ var package_default = {
184
184
  export {
185
185
  package_default
186
186
  };
187
- //# sourceMappingURL=chunk-Q6DV4AEM.js.map
187
+ //# sourceMappingURL=chunk-P4EXA4AX.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../package.json"],
4
- "sourcesContent": ["{\n \"name\": \"happo\",\n \"version\": \"6.8.0\",\n \"description\": \"Catch unexpected visual and accessibility changes and UI bugs\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/happo/happo.git\"\n },\n \"bugs\": \"https://github.com/happo/happo/issues\",\n \"homepage\": \"https://happo.io\",\n \"bin\": {\n \"happo\": \"dist/cli/main.js\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/config/index.js\",\n \"types\": \"./dist/config/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/config/index.d.ts\",\n \"default\": \"./dist/config/index.js\"\n },\n \"./cypress\": {\n \"types\": \"./dist/cypress/index.d.ts\",\n \"default\": \"./dist/cypress/index.js\"\n },\n \"./cypress/task\": {\n \"types\": \"./dist/cypress/task.d.ts\",\n \"default\": \"./dist/cypress/task.js\"\n },\n \"./playwright\": {\n \"types\": \"./dist/playwright/index.d.ts\",\n \"default\": \"./dist/playwright/index.js\"\n },\n \"./custom\": {\n \"types\": \"./dist/custom/index.d.ts\",\n \"default\": \"./dist/custom/index.js\"\n },\n \"./storybook/addon\": {\n \"types\": \"./dist/storybook/browser/addon.d.ts\",\n \"default\": \"./dist/storybook/browser/addon.js\"\n },\n \"./storybook/decorator\": {\n \"types\": \"./dist/storybook/browser/decorator.d.ts\",\n \"default\": \"./dist/storybook/browser/decorator.js\"\n },\n \"./storybook/preset\": {\n \"types\": \"./dist/storybook/preset.d.ts\",\n \"default\": \"./dist/storybook/preset.js\"\n },\n \"./storybook/register\": {\n \"types\": \"./dist/storybook/browser/register.d.ts\",\n \"default\": \"./dist/storybook/browser/register.js\"\n }\n },\n \"files\": [\n \"dist\",\n \"preset.js\"\n ],\n \"scripts\": {\n \"all\": \"node ./scripts/allchecks.ts\",\n \"build\": \"pnpm build:types && pnpm build:dist\",\n \"build:custom\": \"esbuild src/custom/__happo__/index.ts --bundle --format=iife --global-name=happoCustom --outfile=tmp/happo-custom/bundle.js --platform=browser --target=esnext\",\n \"build:dist\": \"node ./scripts/build.ts\",\n \"build:types\": \"pnpm tsc --pretty\",\n \"build:watch\": \"tsc --build --watch\",\n \"clean\": \"node ./scripts/clean.ts\",\n \"lint\": \"eslint .\",\n \"prepublishOnly\": \"pnpm clean && pnpm build\",\n \"storybook:dev\": \"storybook dev --config-dir src/storybook/__tests__/storybook-app -p ${PORT:-6007}\",\n \"test\": \"node --env-file-if-exists=.env.local ./scripts/test.ts\",\n \"test:custom\": \"pnpm build:dist && pnpm build:custom && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.custom.config.ts\",\n \"test:cypress\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.cypress.config.ts e2e -- cypress run -C src/cypress/__cypress__/cypress.config.ts\",\n \"test:cypress:open\": \"cypress open -C src/cypress/__cypress__/cypress.config.ts\",\n \"test:playwright\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.playwright.config.ts e2e -- playwright test\",\n \"test:playwright:nonce\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.playwright-nonce.config.ts --nonce $HAPPO_NONCE e2e -- playwright test && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.playwright-nonce.config.ts --nonce $HAPPO_NONCE finalize\",\n \"test:storybook\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.storybook.config.ts\",\n \"test:pages\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.pages.config.ts\",\n \"tsc\": \"tsc --build tsconfig.json\"\n },\n \"browserslist\": {\n \"node\": [\n \"node 22\"\n ],\n \"browser\": [\n \"last 2 Chrome major versions\",\n \"last 2 Firefox major versions\",\n \"last 2 Safari major versions\",\n \"last 2 Edge major versions\"\n ],\n \"isomorphic\": [\n \"node 22\",\n \"last 2 Chrome major versions\",\n \"last 2 Firefox major versions\",\n \"last 2 Safari major versions\",\n \"last 2 Edge major versions\"\n ]\n },\n \"prettier\": {\n \"printWidth\": 85,\n \"singleQuote\": true,\n \"trailingComma\": \"all\",\n \"arrowParens\": \"always\"\n },\n \"devDependencies\": {\n \"@eslint/js\": \"^10.0.1\",\n \"@playwright/test\": \"^1.55.1\",\n \"@reporters/github\": \"^1.11.0\",\n \"@storybook/builder-vite\": \"^10.0.1\",\n \"@storybook/react-vite\": \"^10.0.1\",\n \"@types/async-retry\": \"^1.4.9\",\n \"@types/base64-stream\": \"^1.0.5\",\n \"@types/jsdom\": \"^28.0.0\",\n \"@types/mime-types\": \"^3.0.1\",\n \"@types/multiparty\": \"^4.2.1\",\n \"@types/node\": \"^24.9.1\",\n \"@types/react\": \"^19.2.0\",\n \"@types/react-dom\": \"^19.2.0\",\n \"cypress\": \"^15.5.0\",\n \"esbuild\": \"^0.27.0\",\n \"eslint\": \"^10.0.2\",\n \"eslint-config-prettier\": \"^10.1.8\",\n \"eslint-plugin-compat\": \"^7.0.1\",\n \"eslint-plugin-depend\": \"^1.4.0\",\n \"eslint-plugin-simple-import-sort\": \"^12.1.1\",\n \"eslint-plugin-unicorn\": \"^63.0.0\",\n \"jiti\": \"^2.6.1\",\n \"jsdom\": \"^29.0.0\",\n \"multiparty\": \"^4.2.3\",\n \"prettier\": \"^3.6.2\",\n \"react\": \"^19.2.0\",\n \"react-dom\": \"^19.2.0\",\n \"react-error-boundary\": \"^6.0.0\",\n \"storybook\": \"^10.0.1\",\n \"typescript\": \"^5.9.2\",\n \"typescript-eslint\": \"^8.56.1\"\n },\n \"dependencies\": {\n \"async-retry\": \"^1.3.3\",\n \"base64-stream\": \"^1.0.0\",\n \"empathic\": \"^2.0.0\",\n \"fflate\": \"^0.8.2\",\n \"jose\": \"^6.1.0\",\n \"limit-concur\": \"^4.0.0\",\n \"mime-types\": \"^3.0.1\",\n \"srcset\": \"^5.0.2\"\n },\n \"storybook\": {\n \"displayName\": \"Happo\",\n \"icon\": \"https://happo.io/static/happo-hippo.png\",\n \"supportedFrameworks\": [\n \"angular\",\n \"ember\",\n \"html\",\n \"preact\",\n \"react\",\n \"react-native\",\n \"svelte\",\n \"vue\",\n \"web-components\"\n ],\n \"unsupportedFrameworks\": []\n },\n \"keywords\": [\n \"storybook-addon\",\n \"accessibility\",\n \"cypress\",\n \"playwright\",\n \"regression\",\n \"storybook\",\n \"test\",\n \"testing\",\n \"ui\",\n \"visual-regression\",\n \"visual\",\n \"vrt\"\n ],\n \"engines\": {\n \"node\": \"^22.18.0 || ^23.6.0 || >=24.0.0\"\n }\n}\n"],
4
+ "sourcesContent": ["{\n \"name\": \"happo\",\n \"version\": \"6.9.0\",\n \"description\": \"Catch unexpected visual and accessibility changes and UI bugs\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/happo/happo.git\"\n },\n \"bugs\": \"https://github.com/happo/happo/issues\",\n \"homepage\": \"https://happo.io\",\n \"bin\": {\n \"happo\": \"dist/cli/main.js\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/config/index.js\",\n \"types\": \"./dist/config/index.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./dist/config/index.d.ts\",\n \"default\": \"./dist/config/index.js\"\n },\n \"./cypress\": {\n \"types\": \"./dist/cypress/index.d.ts\",\n \"default\": \"./dist/cypress/index.js\"\n },\n \"./cypress/task\": {\n \"types\": \"./dist/cypress/task.d.ts\",\n \"default\": \"./dist/cypress/task.js\"\n },\n \"./playwright\": {\n \"types\": \"./dist/playwright/index.d.ts\",\n \"default\": \"./dist/playwright/index.js\"\n },\n \"./custom\": {\n \"types\": \"./dist/custom/index.d.ts\",\n \"default\": \"./dist/custom/index.js\"\n },\n \"./storybook/addon\": {\n \"types\": \"./dist/storybook/browser/addon.d.ts\",\n \"default\": \"./dist/storybook/browser/addon.js\"\n },\n \"./storybook/decorator\": {\n \"types\": \"./dist/storybook/browser/decorator.d.ts\",\n \"default\": \"./dist/storybook/browser/decorator.js\"\n },\n \"./storybook/preset\": {\n \"types\": \"./dist/storybook/preset.d.ts\",\n \"default\": \"./dist/storybook/preset.js\"\n },\n \"./storybook/register\": {\n \"types\": \"./dist/storybook/browser/register.d.ts\",\n \"default\": \"./dist/storybook/browser/register.js\"\n }\n },\n \"files\": [\n \"dist\",\n \"preset.js\"\n ],\n \"scripts\": {\n \"all\": \"node ./scripts/allchecks.ts\",\n \"build\": \"pnpm build:types && pnpm build:dist\",\n \"build:custom\": \"esbuild src/custom/__happo__/index.ts --bundle --format=iife --global-name=happoCustom --outfile=tmp/happo-custom/bundle.js --platform=browser --target=esnext\",\n \"build:dist\": \"node ./scripts/build.ts\",\n \"build:types\": \"pnpm tsc --pretty\",\n \"build:watch\": \"tsc --build --watch\",\n \"clean\": \"node ./scripts/clean.ts\",\n \"lint\": \"eslint .\",\n \"prepublishOnly\": \"pnpm clean && pnpm build\",\n \"storybook:dev\": \"storybook dev --config-dir src/storybook/__tests__/storybook-app -p ${PORT:-6007}\",\n \"test\": \"node --env-file-if-exists=.env.local ./scripts/test.ts\",\n \"test:custom\": \"pnpm build:dist && pnpm build:custom && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.custom.config.ts\",\n \"test:cypress\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.cypress.config.ts e2e -- cypress run -C src/cypress/__cypress__/cypress.config.ts\",\n \"test:cypress:open\": \"cypress open -C src/cypress/__cypress__/cypress.config.ts\",\n \"test:playwright\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.playwright.config.ts e2e -- playwright test\",\n \"test:playwright:nonce\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.playwright-nonce.config.ts --nonce $HAPPO_NONCE e2e -- playwright test && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.playwright-nonce.config.ts --nonce $HAPPO_NONCE finalize\",\n \"test:storybook\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.storybook.config.ts\",\n \"test:pages\": \"pnpm build:dist && node --env-file-if-exists=.env.local dist/cli/main.js -c ./happoconfigs/happo.pages.config.ts\",\n \"tsc\": \"tsc --build tsconfig.json\"\n },\n \"browserslist\": {\n \"node\": [\n \"node 22\"\n ],\n \"browser\": [\n \"last 2 Chrome major versions\",\n \"last 2 Firefox major versions\",\n \"last 2 Safari major versions\",\n \"last 2 Edge major versions\"\n ],\n \"isomorphic\": [\n \"node 22\",\n \"last 2 Chrome major versions\",\n \"last 2 Firefox major versions\",\n \"last 2 Safari major versions\",\n \"last 2 Edge major versions\"\n ]\n },\n \"prettier\": {\n \"printWidth\": 85,\n \"singleQuote\": true,\n \"trailingComma\": \"all\",\n \"arrowParens\": \"always\"\n },\n \"devDependencies\": {\n \"@eslint/js\": \"^10.0.1\",\n \"@playwright/test\": \"^1.55.1\",\n \"@reporters/github\": \"^1.11.0\",\n \"@storybook/builder-vite\": \"^10.0.1\",\n \"@storybook/react-vite\": \"^10.0.1\",\n \"@types/async-retry\": \"^1.4.9\",\n \"@types/base64-stream\": \"^1.0.5\",\n \"@types/jsdom\": \"^28.0.0\",\n \"@types/mime-types\": \"^3.0.1\",\n \"@types/multiparty\": \"^4.2.1\",\n \"@types/node\": \"^24.9.1\",\n \"@types/react\": \"^19.2.0\",\n \"@types/react-dom\": \"^19.2.0\",\n \"cypress\": \"^15.5.0\",\n \"esbuild\": \"^0.27.0\",\n \"eslint\": \"^10.0.2\",\n \"eslint-config-prettier\": \"^10.1.8\",\n \"eslint-plugin-compat\": \"^7.0.1\",\n \"eslint-plugin-depend\": \"^1.4.0\",\n \"eslint-plugin-simple-import-sort\": \"^12.1.1\",\n \"eslint-plugin-unicorn\": \"^63.0.0\",\n \"jiti\": \"^2.6.1\",\n \"jsdom\": \"^29.0.0\",\n \"multiparty\": \"^4.2.3\",\n \"prettier\": \"^3.6.2\",\n \"react\": \"^19.2.0\",\n \"react-dom\": \"^19.2.0\",\n \"react-error-boundary\": \"^6.0.0\",\n \"storybook\": \"^10.0.1\",\n \"typescript\": \"^6.0.2\",\n \"typescript-eslint\": \"^8.57.2\"\n },\n \"dependencies\": {\n \"async-retry\": \"^1.3.3\",\n \"base64-stream\": \"^1.0.0\",\n \"empathic\": \"^2.0.0\",\n \"fflate\": \"^0.8.2\",\n \"jose\": \"^6.1.0\",\n \"limit-concur\": \"^4.0.0\",\n \"mime-types\": \"^3.0.1\",\n \"srcset\": \"^5.0.2\"\n },\n \"storybook\": {\n \"displayName\": \"Happo\",\n \"icon\": \"https://happo.io/static/happo-hippo.png\",\n \"supportedFrameworks\": [\n \"angular\",\n \"ember\",\n \"html\",\n \"preact\",\n \"react\",\n \"react-native\",\n \"svelte\",\n \"vue\",\n \"web-components\"\n ],\n \"unsupportedFrameworks\": []\n },\n \"keywords\": [\n \"storybook-addon\",\n \"accessibility\",\n \"cypress\",\n \"playwright\",\n \"regression\",\n \"storybook\",\n \"test\",\n \"testing\",\n \"ui\",\n \"visual-regression\",\n \"visual\",\n \"vrt\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,IAChB,cAAc;AAAA,IACd,QAAU;AAAA,EACZ;AAAA,EACA,WAAa;AAAA,IACX,aAAe;AAAA,IACf,MAAQ;AAAA,IACR,qBAAuB;AAAA,MACrB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA,uBAAyB,CAAC;AAAA,EAC5B;AAAA,EACA,UAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AAAA,EACA,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  fetchWithRetry
3
- } from "./chunk-33PSYGHX.js";
3
+ } from "./chunk-BESQLM5F.js";
4
4
 
5
5
  // src/network/getSignedToken.ts
6
6
  import { SignJWT } from "jose";
@@ -81,4 +81,4 @@ async function makeHappoAPIRequest({ url, path, method = "GET", formData, body }
81
81
  export {
82
82
  makeHappoAPIRequest
83
83
  };
84
- //# sourceMappingURL=chunk-CQ7QTIYV.js.map
84
+ //# sourceMappingURL=chunk-R6YURZXU.js.map
@@ -0,0 +1,10 @@
1
+ import {
2
+ createAsyncComparison
3
+ } from "./chunk-J2EA5OBW.js";
4
+ import "./chunk-R6YURZXU.js";
5
+ import "./chunk-BESQLM5F.js";
6
+ import "./chunk-P4EXA4AX.js";
7
+ export {
8
+ createAsyncComparison as default
9
+ };
10
+ //# sourceMappingURL=createAsyncComparison-CQLGQXY2.js.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  makeHappoAPIRequest
3
- } from "./chunk-CQ7QTIYV.js";
4
- import "./chunk-33PSYGHX.js";
5
- import "./chunk-Q6DV4AEM.js";
3
+ } from "./chunk-R6YURZXU.js";
4
+ import "./chunk-BESQLM5F.js";
5
+ import "./chunk-P4EXA4AX.js";
6
6
 
7
7
  // src/network/createAsyncReport.ts
8
8
  function assertResultIsCreateAsyncReportResult(result) {
@@ -38,4 +38,4 @@ async function createAsyncReport(snapRequestIds, config, { afterSha, link, messa
38
38
  export {
39
39
  createAsyncReport as default
40
40
  };
41
- //# sourceMappingURL=createAsyncReport-62YCQXCV.js.map
41
+ //# sourceMappingURL=createAsyncReport-4ZD53TJC.js.map
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  makeHappoAPIRequest
3
- } from "./chunk-CQ7QTIYV.js";
4
- import "./chunk-33PSYGHX.js";
5
- import "./chunk-Q6DV4AEM.js";
3
+ } from "./chunk-R6YURZXU.js";
4
+ import "./chunk-BESQLM5F.js";
5
+ import "./chunk-P4EXA4AX.js";
6
6
 
7
7
  // src/network/getFlakes.ts
8
8
  function formatFlakeOutput(flakes) {
@@ -70,4 +70,4 @@ export {
70
70
  getFlakes as default,
71
71
  formatFlakeOutput
72
72
  };
73
- //# sourceMappingURL=getFlakes-257F34EF.js.map
73
+ //# sourceMappingURL=getFlakes-6ZGTWZTM.js.map
package/dist/cli/main.js CHANGED
@@ -4,10 +4,10 @@ import {
4
4
  } from "./chunk-JTRP4JVC.js";
5
5
  import {
6
6
  fetchWithRetry
7
- } from "./chunk-33PSYGHX.js";
7
+ } from "./chunk-BESQLM5F.js";
8
8
  import {
9
9
  package_default
10
- } from "./chunk-Q6DV4AEM.js";
10
+ } from "./chunk-P4EXA4AX.js";
11
11
 
12
12
  // src/cli/index.ts
13
13
  import path3 from "node:path";
@@ -1194,7 +1194,7 @@ function createReporter(opts = {}) {
1194
1194
 
1195
1195
  // src/cli/index.ts
1196
1196
  async function getVersion() {
1197
- const packageJson = await import("./package-7QCVHFDF.js");
1197
+ const packageJson = await import("./package-4NRNRUE3.js");
1198
1198
  return packageJson.default.version;
1199
1199
  }
1200
1200
  function parseDashdashCommandParts(rawArgs) {
@@ -1439,10 +1439,10 @@ async function main(rawArgs = process.argv, logger = console) {
1439
1439
  async function handleDefaultCommand(config, environment, logger) {
1440
1440
  logger.log("Running happo tests...");
1441
1441
  const [startJob, createAsyncComparison, createAsyncReport, prepareSnapRequests] = await Promise.all([
1442
- (await import("./startJob-6EVDORMA.js")).default,
1443
- (await import("./createAsyncComparison-MOLWGUJT.js")).default,
1444
- (await import("./createAsyncReport-62YCQXCV.js")).default,
1445
- (await import("./prepareSnapRequests-R2YIHDTR.js")).default
1442
+ (await import("./startJob-JAO5FUA2.js")).default,
1443
+ (await import("./createAsyncComparison-CQLGQXY2.js")).default,
1444
+ (await import("./createAsyncReport-4ZD53TJC.js")).default,
1445
+ (await import("./prepareSnapRequests-2LHSGFZV.js")).default
1446
1446
  ]);
1447
1447
  await startJob(config, environment, logger);
1448
1448
  try {
@@ -1475,7 +1475,7 @@ async function handleDefaultCommand(config, environment, logger) {
1475
1475
  } catch (e) {
1476
1476
  const message = e instanceof Error ? e.message : String(e);
1477
1477
  logger.error(`${config.integration.type} run failed: ${message}`, e);
1478
- const cancelJob = (await import("./cancelJob-3MYHESOW.js")).default;
1478
+ const cancelJob = (await import("./cancelJob-Y4WJCCU6.js")).default;
1479
1479
  await cancelJob("failure", message, config, environment, logger);
1480
1480
  process.exitCode = 1;
1481
1481
  return;
@@ -1486,7 +1486,7 @@ async function handleFinalizeCommand(config, environment, logger) {
1486
1486
  logger.log("Config:", config);
1487
1487
  logger.log("Environment:", environment);
1488
1488
  try {
1489
- const finalizeAll = (await import("./wrapper-7A35DA3L.js")).finalizeAll;
1489
+ const finalizeAll = (await import("./wrapper-7RE2N7Y3.js")).finalizeAll;
1490
1490
  await finalizeAll({ happoConfig: config, environment, logger });
1491
1491
  } catch (e) {
1492
1492
  logger.error(e instanceof Error ? e.message : String(e), e);
@@ -1514,7 +1514,7 @@ async function handleFlakeCommand(config, {
1514
1514
  process.exitCode = 1;
1515
1515
  return;
1516
1516
  }
1517
- const { default: getFlakes, formatFlakeOutput } = await import("./getFlakes-257F34EF.js");
1517
+ const { default: getFlakes, formatFlakeOutput } = await import("./getFlakes-6ZGTWZTM.js");
1518
1518
  const project = allProjects ? void 0 : projectOverride ?? config.project;
1519
1519
  const flakes = await getFlakes(
1520
1520
  {
@@ -1556,7 +1556,7 @@ async function handleE2ECommand(config, environment, dashdashCommandParts, confi
1556
1556
  logger.log("Config:", config);
1557
1557
  logger.log("Environment:", environment);
1558
1558
  logger.log("Dashdash command parts:", dashdashCommandParts);
1559
- const runWithWrapper = (await import("./wrapper-7A35DA3L.js")).default;
1559
+ const runWithWrapper = (await import("./wrapper-7RE2N7Y3.js")).default;
1560
1560
  const exitCode = await runWithWrapper(
1561
1561
  dashdashCommandParts,
1562
1562
  config,
@@ -0,0 +1,7 @@
1
+ import {
2
+ package_default
3
+ } from "./chunk-P4EXA4AX.js";
4
+ export {
5
+ package_default as default
6
+ };
7
+ //# sourceMappingURL=package-4NRNRUE3.js.map
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  makeHappoAPIRequest
3
- } from "./chunk-CQ7QTIYV.js";
3
+ } from "./chunk-R6YURZXU.js";
4
4
  import {
5
5
  ErrorWithStatusCode
6
- } from "./chunk-33PSYGHX.js";
7
- import "./chunk-Q6DV4AEM.js";
6
+ } from "./chunk-BESQLM5F.js";
7
+ import "./chunk-P4EXA4AX.js";
8
8
 
9
9
  // src/network/prepareSnapRequests.ts
10
10
  import fs6 from "node:fs";
@@ -868,4 +868,4 @@ async function prepareSnapRequests(config) {
868
868
  export {
869
869
  prepareSnapRequests as default
870
870
  };
871
- //# sourceMappingURL=prepareSnapRequests-R2YIHDTR.js.map
871
+ //# sourceMappingURL=prepareSnapRequests-2LHSGFZV.js.map
@@ -0,0 +1,10 @@
1
+ import {
2
+ startJob
3
+ } from "./chunk-CVX5DVCT.js";
4
+ import "./chunk-R6YURZXU.js";
5
+ import "./chunk-BESQLM5F.js";
6
+ import "./chunk-P4EXA4AX.js";
7
+ export {
8
+ startJob as default
9
+ };
10
+ //# sourceMappingURL=startJob-JAO5FUA2.js.map
@@ -3,21 +3,21 @@ import {
3
3
  } from "./chunk-JTRP4JVC.js";
4
4
  import {
5
5
  startJob
6
- } from "./chunk-WFQHO45L.js";
6
+ } from "./chunk-CVX5DVCT.js";
7
7
  import {
8
8
  createAsyncComparison
9
- } from "./chunk-URV3R5XF.js";
9
+ } from "./chunk-J2EA5OBW.js";
10
10
  import {
11
11
  postGitHubComment
12
12
  } from "./chunk-X4TE2VNY.js";
13
13
  import {
14
14
  cancelJob
15
- } from "./chunk-EDBI7VNX.js";
15
+ } from "./chunk-BK32666K.js";
16
16
  import {
17
17
  makeHappoAPIRequest
18
- } from "./chunk-CQ7QTIYV.js";
19
- import "./chunk-33PSYGHX.js";
20
- import "./chunk-Q6DV4AEM.js";
18
+ } from "./chunk-R6YURZXU.js";
19
+ import "./chunk-BESQLM5F.js";
20
+ import "./chunk-P4EXA4AX.js";
21
21
 
22
22
  // src/e2e/wrapper.ts
23
23
  import { spawn } from "node:child_process";
@@ -216,4 +216,4 @@ export {
216
216
  runWithWrapper as default,
217
217
  finalizeAll
218
218
  };
219
- //# sourceMappingURL=wrapper-7A35DA3L.js.map
219
+ //# sourceMappingURL=wrapper-7RE2N7Y3.js.map
@@ -37,6 +37,24 @@ interface BaseE2EIntegration {
37
37
  * assets will be included.
38
38
  */
39
39
  downloadAllAssets?: boolean;
40
+ /**
41
+ * When set to `true`, Happo automatically detects elements that are in
42
+ * `:hover`, `:active`, or `:focus-visible` states at the moment a screenshot
43
+ * is taken and adds the corresponding `data-happo-hover`,
44
+ * `data-happo-active`, and `data-happo-focus-visible` attributes. It also
45
+ * improves focus handling by traversing into shadow DOM to find the deepest
46
+ * focused element so that `data-happo-focus` is applied reliably.
47
+ *
48
+ * Note: basic focus handling (`data-happo-focus` based on `activeElement`)
49
+ * is always applied regardless of this option.
50
+ *
51
+ * This lets you write tests naturally (e.g. hover or focus an element) and
52
+ * have Happo capture those states without any extra markup.
53
+ *
54
+ * Requires `applyPseudoClasses: true` on your targets for the attributes to
55
+ * be rendered as CSS pseudo-class styles on Happo workers.
56
+ */
57
+ autoApplyPseudoStateAttributes?: boolean;
40
58
  }
41
59
  interface CypressIntegration extends BaseE2EIntegration {
42
60
  type: 'cypress';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAElE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,WAAW,CAAC;IAElB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,CAAC,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC,GAAG,SAAS,CAAC;CAC3D;AAED,UAAU,kBAAkB;IAC1B;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,UAAU,kBAAmB,SAAQ,kBAAkB;IACrD,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,UAAU,qBAAsB,SAAQ,kBAAkB;IACxD,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;AAExE,UAAU,iBAAiB;IACzB,IAAI,EAAE,QAAQ,CAAC;IAEf;;;;;;;;;;OAUG;IACH,KAAK,EAAE,MAAM,OAAO,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,mBAAmB,CAAC,EAAE,MAAM,CAAC;KAC9B,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,IAAI;IACnB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;IAC7C,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,UAAU,aAAc,SAAQ,UAAU;IACxC,IAAI,EAAE,kBAAkB,CAAC;IAEzB;;OAEG;IACH,QAAQ,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;IAEhC;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjE;AAED,MAAM,MAAM,MAAM,GAAG,kBAAkB,GAAG,aAAa,CAAC;AAExD,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACpD,QAAQ,EAAE,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;IAChC,SAAS,EAAE,OAAO,CAAC;IACnB,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,kBAAmB,SAAQ,MAAM;IAChD,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IACtC,SAAS,EAAE,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5C,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;IAChD,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IAC1C,YAAY,EAAE,WAAW,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC;IAClD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;CAC7C;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAEnD"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/config/index.ts"],
4
- "sourcesContent": ["import type { SkipItems } from '../storybook/isomorphic/types.ts';\n\nexport interface StorybookIntegration {\n type: 'storybook';\n\n /**\n * The directory containing the Storybook configuration\n */\n configDir?: string;\n\n /**\n * The directory containing the static files to serve\n */\n staticDir?: string;\n\n /**\n * The directory to output the static Storybook package to\n */\n outputDir?: string;\n\n /**\n * Whether to use a prebuilt Storybook package. If you use this option, make\n * sure that files are built to the outputDir.\n */\n usePrebuiltPackage?: boolean;\n\n /**\n * Items to skip when generating snapshots.\n *\n * Can be an async function that resolves to an array of `{component,\n * variant}`, or an array of `{component, variant}`.\n */\n skip?: SkipItems | (() => Promise<SkipItems>) | undefined;\n}\n\ninterface BaseE2EIntegration {\n /**\n * Whether to allow failures.\n */\n allowFailures?: boolean;\n\n /**\n * Whether to download and include all assets in the asset package. If false\n * (default), only local assets will be included. When true, even external\n * assets will be included.\n */\n downloadAllAssets?: boolean;\n}\n\ninterface CypressIntegration extends BaseE2EIntegration {\n type: 'cypress';\n}\n\ninterface PlaywrightIntegration extends BaseE2EIntegration {\n type: 'playwright';\n}\n\nexport type E2EIntegration = CypressIntegration | PlaywrightIntegration;\n\ninterface CustomIntegration {\n type: 'custom';\n\n /**\n * An async function that generates a custom package. Returns an object with\n * the path to the folder containing the custom files and the path to the\n * entry point file relative to the root directory.\n *\n * Optionally return `estimatedSnapsCount` to enable server-side auto-chunking,\n * which parallelizes rendering across multiple workers.\n *\n * @example\n * { rootDir: 'dist/custom', entryPoint: 'index.js', estimatedSnapsCount: 42 }\n */\n build: () => Promise<{\n rootDir: string;\n entryPoint: string;\n estimatedSnapsCount?: number;\n }>;\n}\n\nexport interface Page {\n /**\n * URL of the page to screenshot\n *\n * Note: The URLs to the website need to be publicly available, otherwise\n * Happo workers won't be able to access the pages.\n */\n url: string;\n\n /**\n * Title of the page to screenshot\n *\n * This is used as the \"component\" identifier in Happo reports, so ensure\n * it is unique for each page.\n */\n title: string;\n\n /**\n * Wait for the content to appear on the page before taking the screenshot.\n */\n waitForContent?: string;\n\n /**\n * Wait for a condition to be true before taking the screenshot.\n */\n waitForSelector?: string;\n}\n\ninterface PagesIntegration {\n type: 'pages';\n\n /**\n * A list of pages to screenshot.\n */\n pages: Array<Page>;\n}\n\n/**\n * Settings for deep compare functionality\n */\nexport interface DeepCompareSettings {\n /**\n * Threshold for comparing images with the given diff algorithm (float between\n * 0 and 1). 1 means all differences are allowed. 0 means no differences are\n * allowed. A good starting value is 0.03 for color-delta and 0.01 for ssim.\n */\n compareThreshold: number;\n\n /**\n * Algorithm to use for diff comparison. Must be \"color-delta\" or \"ssim\".\n * Defaults to \"color-delta\" if not provided. Note that \"ssim\" is experimental\n * and may be removed in the future.\n */\n diffAlgorithm?: 'color-delta' | 'ssim';\n\n /**\n * Threshold for ignoring individual pixel differences, side-stepping the\n * compare threshold. Used relatively to the image size. E.g. a value of 0.01\n * means 1% of the pixels can be above the compare threshold. Use this option\n * if your screenshots contain images or graphics with sharp noise. It is not\n * recommended to use this option for other types of diffs. (float\n * between 0 and 1).\n */\n ignoreThreshold?: number;\n\n /**\n * Whether to ignore whitespace in the diff. If true, whitespace differences\n * will not be considered when comparing images. Whitespace is defined as a\n * vertical section in a screenshot containing a single solid color.\n */\n ignoreWhitespace?: boolean;\n\n /**\n * Whether to apply blur to the diff. This can be used to smooth out subtle\n * differences that would otherwise be above the compare threshold. This\n * should mainly be used when your screenshots have a high contrast and you\n * want to smooth out some of the sharpness that can otherwise cause flakiness.\n */\n applyBlur?: boolean;\n}\n\nexport interface Config {\n /**\n * Key used to authenticate with the Happo API. Never store this in plain\n * text.\n */\n apiKey?: string;\n\n /**\n * Secret used to authenticate with the Happo API. Never store this in plain\n * text.\n */\n apiSecret?: string;\n\n /**\n * The endpoint to use for the happo run. Defaults to `https://happo.io`\n */\n endpoint?: string;\n\n /**\n * The name of the project to associate the Happo run with. If not provided,\n * the default project will be used.\n */\n project?: string;\n\n /**\n * Use this to post Happo statuses as comments to your PR. This can be useful\n * if the Happo server doesn't have access to your GitHub repository.\n *\n * The default is `'https://api.github.com'`. If you are using GitHub\n * Enterprise, enter the URL to your local GitHub API here, such as\n * `'https://ghe.mycompany.zone/api/v3'` (the default for GHE installation is\n * for the API to be located at `/api/v3`).\n */\n githubApiUrl?: string;\n\n /**\n * Browsers to use when generating snapshots\n */\n targets: Record<string, Target>;\n\n /**\n * Type of integration to use\n *\n * - 'storybook': Use Storybook to generate snapshots\n * - 'e2e': Use Playwright or Cypress to generate snapshots\n * - 'custom': Use a custom JS bundle to generate snapshots\n *\n * - 'pages': Use a list of pages to generate snapshots\n */\n integration?:\n | StorybookIntegration\n | CypressIntegration\n | PlaywrightIntegration\n | CustomIntegration\n | PagesIntegration;\n\n /**\n * An object with settings for deep compare.\n */\n deepCompare?: DeepCompareSettings;\n}\n\ntype MobileSafariBrowserType = 'ios-safari' | 'ipad-safari';\ntype DesktopBrowserType = 'chrome' | 'firefox' | 'edge' | 'safari' | 'accessibility';\nexport type BrowserType = MobileSafariBrowserType | DesktopBrowserType;\n\ninterface BaseTarget {\n type: BrowserType;\n\n /**\n * Split the target into chunks to be run on multiple workers in parallel\n *\n * This adds some overhead, so if your test suite isn't large, using more than\n * one chunk might actually slow things down.\n */\n chunks?: number;\n\n /**\n * Override the default maximum height (5000px) used by Happo workers\n *\n * This is useful when taking screenshots of tall components or pages.\n *\n * Note: The maximum width defaults to the maximum height, so if you set\n * `maxHeight`, you may also want to set `maxWidth` at the same time.\n */\n maxHeight?: number;\n\n /**\n * Override the default maximum width used by Happo workers (defaults to\n * `maxHeight`, which defaults to 5000 pixels)\n *\n * This is useful when taking screenshots of wide components or pages.\n */\n maxWidth?: number;\n\n /**\n * Controls how Happo handles elements with the `data-happo-hide` attribute.\n * By default, elements with this attribute are made invisible. Use the value\n * `'ignore'` to make the content appear in screenshots but exclude it from\n * comparison.\n */\n hideBehavior?: 'ignore';\n\n /**\n * When set to `true`, this option allows you to add `data-happo-hover`,\n * `data-happo-focus`, and `data-happo-active` attributes to your DOM elements\n * and have Happo apply the corresponding `:hover`, `:focus`, or `:active`\n * styles.\n *\n * For example, if you have this markup:\n *\n * ```html\n * <button>Hover me</button>\n * <style>\n * button:hover {\n * background-color: blue;\n * }\n * </style>\n * ```\n *\n * To apply the hover style before taking the screenshot (making the button\n * blue), change the markup to:\n *\n * ```html\n * <button data-happo-hover>Hover me</button>\n * <style>\n * button:hover {\n * background-color: blue;\n * }\n * </style>\n * ```\n *\n * Similarly, you can add focus to elements using `data-happo-focus`:\n *\n * ```html\n * <input type=\"text\" data-happo-focus />\n * ```\n *\n * And add `data-happo-active` to elements to simulate the `:active` state:\n *\n * ```html\n * <button data-happo-active>Click me</button>\n * <style>\n * button:active {\n * background-color: red;\n * }\n * </style>\n * ```\n */\n applyPseudoClasses?: boolean;\n\n /**\n * Set `prefersColorScheme: 'dark'` or `prefersColorScheme: 'light'` to set\n * the color scheme preference in the browser.\n */\n prefersColorScheme?: 'light' | 'dark';\n\n /**\n * Controls whether pointer events are allowed in the browser. Defaults to\n * `true`.\n *\n * When `true` (the default), Happo does not inject CSS to disable pointer\n * events, which allows mouse interaction in your tests (e.g., when using\n * Storybook interactive stories).\n *\n * Set `allowPointerEvents: false` to tell Happo to inject CSS that disables\n * pointer events. This can prevent spurious hover effects caused by the\n * system mouse pointer.\n *\n * If you're interested in testing `:hover`, `:focus`, and `:active` states\n * with Happo, you may also want to use the `applyPseudoClasses` option.\n */\n allowPointerEvents?: boolean;\n\n /**\n * Set `freezeAnimations: 'last-frame'` to freeze the animations at the last\n * frame. This is the default behavior.\n *\n * Set `freezeAnimations: 'first-frame'` to freeze the animations at the first\n * frame.\n */\n freezeAnimations?: 'last-frame' | 'first-frame';\n}\n\ninterface MobileSafariTarget extends BaseTarget {\n type: MobileSafariBrowserType;\n}\n\ninterface DesktopTarget extends BaseTarget {\n type: DesktopBrowserType;\n\n /**\n * Set the viewport size for the browser\n */\n viewport: `${number}x${number}`;\n\n /**\n * By default, Happo makes the browser prefer reduced motion when rendering\n * the UI. Set `prefersReducedMotion: false` to disable this behavior.\n */\n prefersReducedMotion?: boolean;\n\n /**\n * Add additional headers to the outgoing requests from the browser. This is\n * useful if you for instance need to tell a CDN that the request originates\n * from a Happo run.\n */\n outgoingRequestHeaders?: Array<{ name: string; value: string }>;\n}\n\nexport type Target = MobileSafariTarget | DesktopTarget;\n\nexport interface TargetWithDefaults extends BaseTarget {\n viewport: `${number}x${number}`;\n __dynamic: boolean;\n prefersReducedMotion?: boolean;\n}\n\nexport interface ConfigWithDefaults extends Config {\n apiKey: NonNullable<Config['apiKey']>;\n apiSecret: NonNullable<Config['apiSecret']>;\n integration: NonNullable<Config['integration']>;\n endpoint: NonNullable<Config['endpoint']>;\n githubApiUrl: NonNullable<Config['githubApiUrl']>;\n targets: Record<string, TargetWithDefaults>;\n}\n\nexport function defineConfig(config: Config): Config {\n return config;\n}\n"],
5
- "mappings": ";AAoYO,SAAS,aAAa,QAAwB;AACnD,SAAO;AACT;",
4
+ "sourcesContent": ["import type { SkipItems } from '../storybook/isomorphic/types.ts';\n\nexport interface StorybookIntegration {\n type: 'storybook';\n\n /**\n * The directory containing the Storybook configuration\n */\n configDir?: string;\n\n /**\n * The directory containing the static files to serve\n */\n staticDir?: string;\n\n /**\n * The directory to output the static Storybook package to\n */\n outputDir?: string;\n\n /**\n * Whether to use a prebuilt Storybook package. If you use this option, make\n * sure that files are built to the outputDir.\n */\n usePrebuiltPackage?: boolean;\n\n /**\n * Items to skip when generating snapshots.\n *\n * Can be an async function that resolves to an array of `{component,\n * variant}`, or an array of `{component, variant}`.\n */\n skip?: SkipItems | (() => Promise<SkipItems>) | undefined;\n}\n\ninterface BaseE2EIntegration {\n /**\n * Whether to allow failures.\n */\n allowFailures?: boolean;\n\n /**\n * Whether to download and include all assets in the asset package. If false\n * (default), only local assets will be included. When true, even external\n * assets will be included.\n */\n downloadAllAssets?: boolean;\n\n /**\n * When set to `true`, Happo automatically detects elements that are in\n * `:hover`, `:active`, or `:focus-visible` states at the moment a screenshot\n * is taken and adds the corresponding `data-happo-hover`,\n * `data-happo-active`, and `data-happo-focus-visible` attributes. It also\n * improves focus handling by traversing into shadow DOM to find the deepest\n * focused element so that `data-happo-focus` is applied reliably.\n *\n * Note: basic focus handling (`data-happo-focus` based on `activeElement`)\n * is always applied regardless of this option.\n *\n * This lets you write tests naturally (e.g. hover or focus an element) and\n * have Happo capture those states without any extra markup.\n *\n * Requires `applyPseudoClasses: true` on your targets for the attributes to\n * be rendered as CSS pseudo-class styles on Happo workers.\n */\n autoApplyPseudoStateAttributes?: boolean;\n}\n\ninterface CypressIntegration extends BaseE2EIntegration {\n type: 'cypress';\n}\n\ninterface PlaywrightIntegration extends BaseE2EIntegration {\n type: 'playwright';\n}\n\nexport type E2EIntegration = CypressIntegration | PlaywrightIntegration;\n\ninterface CustomIntegration {\n type: 'custom';\n\n /**\n * An async function that generates a custom package. Returns an object with\n * the path to the folder containing the custom files and the path to the\n * entry point file relative to the root directory.\n *\n * Optionally return `estimatedSnapsCount` to enable server-side auto-chunking,\n * which parallelizes rendering across multiple workers.\n *\n * @example\n * { rootDir: 'dist/custom', entryPoint: 'index.js', estimatedSnapsCount: 42 }\n */\n build: () => Promise<{\n rootDir: string;\n entryPoint: string;\n estimatedSnapsCount?: number;\n }>;\n}\n\nexport interface Page {\n /**\n * URL of the page to screenshot\n *\n * Note: The URLs to the website need to be publicly available, otherwise\n * Happo workers won't be able to access the pages.\n */\n url: string;\n\n /**\n * Title of the page to screenshot\n *\n * This is used as the \"component\" identifier in Happo reports, so ensure\n * it is unique for each page.\n */\n title: string;\n\n /**\n * Wait for the content to appear on the page before taking the screenshot.\n */\n waitForContent?: string;\n\n /**\n * Wait for a condition to be true before taking the screenshot.\n */\n waitForSelector?: string;\n}\n\ninterface PagesIntegration {\n type: 'pages';\n\n /**\n * A list of pages to screenshot.\n */\n pages: Array<Page>;\n}\n\n/**\n * Settings for deep compare functionality\n */\nexport interface DeepCompareSettings {\n /**\n * Threshold for comparing images with the given diff algorithm (float between\n * 0 and 1). 1 means all differences are allowed. 0 means no differences are\n * allowed. A good starting value is 0.03 for color-delta and 0.01 for ssim.\n */\n compareThreshold: number;\n\n /**\n * Algorithm to use for diff comparison. Must be \"color-delta\" or \"ssim\".\n * Defaults to \"color-delta\" if not provided. Note that \"ssim\" is experimental\n * and may be removed in the future.\n */\n diffAlgorithm?: 'color-delta' | 'ssim';\n\n /**\n * Threshold for ignoring individual pixel differences, side-stepping the\n * compare threshold. Used relatively to the image size. E.g. a value of 0.01\n * means 1% of the pixels can be above the compare threshold. Use this option\n * if your screenshots contain images or graphics with sharp noise. It is not\n * recommended to use this option for other types of diffs. (float\n * between 0 and 1).\n */\n ignoreThreshold?: number;\n\n /**\n * Whether to ignore whitespace in the diff. If true, whitespace differences\n * will not be considered when comparing images. Whitespace is defined as a\n * vertical section in a screenshot containing a single solid color.\n */\n ignoreWhitespace?: boolean;\n\n /**\n * Whether to apply blur to the diff. This can be used to smooth out subtle\n * differences that would otherwise be above the compare threshold. This\n * should mainly be used when your screenshots have a high contrast and you\n * want to smooth out some of the sharpness that can otherwise cause flakiness.\n */\n applyBlur?: boolean;\n}\n\nexport interface Config {\n /**\n * Key used to authenticate with the Happo API. Never store this in plain\n * text.\n */\n apiKey?: string;\n\n /**\n * Secret used to authenticate with the Happo API. Never store this in plain\n * text.\n */\n apiSecret?: string;\n\n /**\n * The endpoint to use for the happo run. Defaults to `https://happo.io`\n */\n endpoint?: string;\n\n /**\n * The name of the project to associate the Happo run with. If not provided,\n * the default project will be used.\n */\n project?: string;\n\n /**\n * Use this to post Happo statuses as comments to your PR. This can be useful\n * if the Happo server doesn't have access to your GitHub repository.\n *\n * The default is `'https://api.github.com'`. If you are using GitHub\n * Enterprise, enter the URL to your local GitHub API here, such as\n * `'https://ghe.mycompany.zone/api/v3'` (the default for GHE installation is\n * for the API to be located at `/api/v3`).\n */\n githubApiUrl?: string;\n\n /**\n * Browsers to use when generating snapshots\n */\n targets: Record<string, Target>;\n\n /**\n * Type of integration to use\n *\n * - 'storybook': Use Storybook to generate snapshots\n * - 'e2e': Use Playwright or Cypress to generate snapshots\n * - 'custom': Use a custom JS bundle to generate snapshots\n *\n * - 'pages': Use a list of pages to generate snapshots\n */\n integration?:\n | StorybookIntegration\n | CypressIntegration\n | PlaywrightIntegration\n | CustomIntegration\n | PagesIntegration;\n\n /**\n * An object with settings for deep compare.\n */\n deepCompare?: DeepCompareSettings;\n}\n\ntype MobileSafariBrowserType = 'ios-safari' | 'ipad-safari';\ntype DesktopBrowserType = 'chrome' | 'firefox' | 'edge' | 'safari' | 'accessibility';\nexport type BrowserType = MobileSafariBrowserType | DesktopBrowserType;\n\ninterface BaseTarget {\n type: BrowserType;\n\n /**\n * Split the target into chunks to be run on multiple workers in parallel\n *\n * This adds some overhead, so if your test suite isn't large, using more than\n * one chunk might actually slow things down.\n */\n chunks?: number;\n\n /**\n * Override the default maximum height (5000px) used by Happo workers\n *\n * This is useful when taking screenshots of tall components or pages.\n *\n * Note: The maximum width defaults to the maximum height, so if you set\n * `maxHeight`, you may also want to set `maxWidth` at the same time.\n */\n maxHeight?: number;\n\n /**\n * Override the default maximum width used by Happo workers (defaults to\n * `maxHeight`, which defaults to 5000 pixels)\n *\n * This is useful when taking screenshots of wide components or pages.\n */\n maxWidth?: number;\n\n /**\n * Controls how Happo handles elements with the `data-happo-hide` attribute.\n * By default, elements with this attribute are made invisible. Use the value\n * `'ignore'` to make the content appear in screenshots but exclude it from\n * comparison.\n */\n hideBehavior?: 'ignore';\n\n /**\n * When set to `true`, this option allows you to add `data-happo-hover`,\n * `data-happo-focus`, and `data-happo-active` attributes to your DOM elements\n * and have Happo apply the corresponding `:hover`, `:focus`, or `:active`\n * styles.\n *\n * For example, if you have this markup:\n *\n * ```html\n * <button>Hover me</button>\n * <style>\n * button:hover {\n * background-color: blue;\n * }\n * </style>\n * ```\n *\n * To apply the hover style before taking the screenshot (making the button\n * blue), change the markup to:\n *\n * ```html\n * <button data-happo-hover>Hover me</button>\n * <style>\n * button:hover {\n * background-color: blue;\n * }\n * </style>\n * ```\n *\n * Similarly, you can add focus to elements using `data-happo-focus`:\n *\n * ```html\n * <input type=\"text\" data-happo-focus />\n * ```\n *\n * And add `data-happo-active` to elements to simulate the `:active` state:\n *\n * ```html\n * <button data-happo-active>Click me</button>\n * <style>\n * button:active {\n * background-color: red;\n * }\n * </style>\n * ```\n */\n applyPseudoClasses?: boolean;\n\n /**\n * Set `prefersColorScheme: 'dark'` or `prefersColorScheme: 'light'` to set\n * the color scheme preference in the browser.\n */\n prefersColorScheme?: 'light' | 'dark';\n\n /**\n * Controls whether pointer events are allowed in the browser. Defaults to\n * `true`.\n *\n * When `true` (the default), Happo does not inject CSS to disable pointer\n * events, which allows mouse interaction in your tests (e.g., when using\n * Storybook interactive stories).\n *\n * Set `allowPointerEvents: false` to tell Happo to inject CSS that disables\n * pointer events. This can prevent spurious hover effects caused by the\n * system mouse pointer.\n *\n * If you're interested in testing `:hover`, `:focus`, and `:active` states\n * with Happo, you may also want to use the `applyPseudoClasses` option.\n */\n allowPointerEvents?: boolean;\n\n /**\n * Set `freezeAnimations: 'last-frame'` to freeze the animations at the last\n * frame. This is the default behavior.\n *\n * Set `freezeAnimations: 'first-frame'` to freeze the animations at the first\n * frame.\n */\n freezeAnimations?: 'last-frame' | 'first-frame';\n}\n\ninterface MobileSafariTarget extends BaseTarget {\n type: MobileSafariBrowserType;\n}\n\ninterface DesktopTarget extends BaseTarget {\n type: DesktopBrowserType;\n\n /**\n * Set the viewport size for the browser\n */\n viewport: `${number}x${number}`;\n\n /**\n * By default, Happo makes the browser prefer reduced motion when rendering\n * the UI. Set `prefersReducedMotion: false` to disable this behavior.\n */\n prefersReducedMotion?: boolean;\n\n /**\n * Add additional headers to the outgoing requests from the browser. This is\n * useful if you for instance need to tell a CDN that the request originates\n * from a Happo run.\n */\n outgoingRequestHeaders?: Array<{ name: string; value: string }>;\n}\n\nexport type Target = MobileSafariTarget | DesktopTarget;\n\nexport interface TargetWithDefaults extends BaseTarget {\n viewport: `${number}x${number}`;\n __dynamic: boolean;\n prefersReducedMotion?: boolean;\n}\n\nexport interface ConfigWithDefaults extends Config {\n apiKey: NonNullable<Config['apiKey']>;\n apiSecret: NonNullable<Config['apiSecret']>;\n integration: NonNullable<Config['integration']>;\n endpoint: NonNullable<Config['endpoint']>;\n githubApiUrl: NonNullable<Config['githubApiUrl']>;\n targets: Record<string, TargetWithDefaults>;\n}\n\nexport function defineConfig(config: Config): Config {\n return config;\n}\n"],
5
+ "mappings": ";AAuZO,SAAS,aAAa,QAAwB;AACnD,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cypress/index.ts"],"names":[],"mappings":"AAOA,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,OAAO,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACpC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,KAAK,OAAO,CAAC;KACzD,CAAC;IAEF;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,OAAO,CAAC;QAChB,UAAU,SAAS;YACjB,eAAe,CAAC,OAAO,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;SACvE;KACF;CACF;AAUD,UAAU,aAAa;IACrB,yBAAyB,EAAE,OAAO,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;CACzB;AAOD,eAAO,MAAM,SAAS,GAAI,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