vitest-plugin-vis 3.5.1 → 4.0.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 (342) hide show
  1. package/dist/asserts--HSSlgPD.mjs +8 -0
  2. package/dist/asserts--HSSlgPD.mjs.map +1 -0
  3. package/dist/augment-BJmy1S7i.d.mts +31 -0
  4. package/dist/augment-BJmy1S7i.d.mts.map +1 -0
  5. package/dist/auto_snapshot_options-CAD43Zkp.mjs +90 -0
  6. package/dist/auto_snapshot_options-CAD43Zkp.mjs.map +1 -0
  7. package/dist/auto_snapshot_options-CaQCXDdi.d.mts +45 -0
  8. package/dist/auto_snapshot_options-CaQCXDdi.d.mts.map +1 -0
  9. package/dist/base64-CHSENEAO.mjs +8 -0
  10. package/dist/base64-CHSENEAO.mjs.map +1 -0
  11. package/dist/client-api.d.mts +141 -0
  12. package/dist/client-api.d.mts.map +1 -0
  13. package/dist/client-api.mjs +14 -0
  14. package/dist/client-api.mjs.map +1 -0
  15. package/dist/config.d.mts +28 -0
  16. package/dist/config.d.mts.map +1 -0
  17. package/dist/config.mjs +412 -0
  18. package/dist/config.mjs.map +1 -0
  19. package/dist/constants-CTBaz8Ml.mjs +10 -0
  20. package/dist/constants-CTBaz8Ml.mjs.map +1 -0
  21. package/dist/index.d.mts +5 -0
  22. package/dist/index.mjs +6 -0
  23. package/dist/presets/auto.d.mts +1 -0
  24. package/dist/presets/auto.mjs +19 -0
  25. package/dist/presets/auto.mjs.map +1 -0
  26. package/dist/presets/enable.d.mts +1 -0
  27. package/dist/presets/enable.mjs +15 -0
  28. package/dist/presets/enable.mjs.map +1 -0
  29. package/dist/presets/manual.d.mts +1 -0
  30. package/dist/presets/manual.mjs +15 -0
  31. package/dist/presets/manual.mjs.map +1 -0
  32. package/dist/server-utils.d.mts +19 -0
  33. package/dist/server-utils.d.mts.map +1 -0
  34. package/dist/server-utils.mjs +4 -0
  35. package/dist/setup-BWgIDtv-.mjs +141 -0
  36. package/dist/setup-BWgIDtv-.mjs.map +1 -0
  37. package/dist/setup.d.mts +110 -0
  38. package/dist/setup.d.mts.map +1 -0
  39. package/dist/setup.mjs +8 -0
  40. package/dist/setup_vis_suite-C6JGGT7B.d.mts +17 -0
  41. package/dist/setup_vis_suite-C6JGGT7B.d.mts.map +1 -0
  42. package/dist/snapshot_path-7GliOSH_.mjs +58 -0
  43. package/dist/snapshot_path-7GliOSH_.mjs.map +1 -0
  44. package/dist/src-CSQnlFa9.mjs +1 -0
  45. package/dist/task_id-DnS9_4Ub.mjs +316 -0
  46. package/dist/task_id-DnS9_4Ub.mjs.map +1 -0
  47. package/dist/testing.d.mts +12 -0
  48. package/dist/testing.d.mts.map +1 -0
  49. package/dist/testing.mjs +65550 -0
  50. package/dist/testing.mjs.map +1 -0
  51. package/dist/to_match_image_snapshot.types-p-zilA_M.d.mts +9 -0
  52. package/dist/to_match_image_snapshot.types-p-zilA_M.d.mts.map +1 -0
  53. package/dist/trim_common_folder-ModiubEJ.d.mts +9 -0
  54. package/dist/trim_common_folder-ModiubEJ.d.mts.map +1 -0
  55. package/dist/types-DFb23VE1.d.mts +110 -0
  56. package/dist/types-DFb23VE1.d.mts.map +1 -0
  57. package/dist/types-Do1N7g4c.d.mts +63 -0
  58. package/dist/types-Do1N7g4c.d.mts.map +1 -0
  59. package/dist/vis_server_context.types-Ce1f9vOO.d.mts +1 -0
  60. package/package.json +55 -39
  61. package/readme.md +58 -6
  62. package/src/client/actions/match_image_snapshot_action.ts +1 -1
  63. package/src/client/actions/match_page_image_snapshot_action.ts +1 -1
  64. package/src/client/auto_snapshot_options.ts +16 -1
  65. package/src/client/compare_image_snapshot.ts +1 -1
  66. package/src/client/expect/to_match_image_snapshot.ts +1 -1
  67. package/src/client/page/extend.ts +1 -1
  68. package/src/client/page/has_image_snapshot.mdx +1 -1
  69. package/src/client/page/has_image_snapshot.ts +1 -1
  70. package/src/client/page/to_match_image_snapshot.mdx +1 -1
  71. package/src/client/page/to_match_image_snapshot.ts +1 -1
  72. package/src/client/setup/create_vis.ts +16 -14
  73. package/src/client/setup/vis.ctx.ts +4 -3
  74. package/src/client/setup/vis.ts +1 -1
  75. package/src/client/snapshot_meta.ts +5 -0
  76. package/src/client/vitest_browser_context_proxy.ts +3 -3
  77. package/src/config/vis.ts +4 -4
  78. package/src/server/browser_provider/browser_api.ts +2 -2
  79. package/src/server/browser_provider/playwright.ts +6 -4
  80. package/src/server/browser_provider/webdriverio.ts +3 -3
  81. package/src/server/commands/_assertions.ts +3 -3
  82. package/src/server/commands/augment.ts +1 -1
  83. package/src/server/commands/has_image_snapshot.ts +2 -2
  84. package/src/server/commands/image_snapshot_next_index.ts +2 -2
  85. package/src/server/commands/load_image_snapshot_results.ts +2 -3
  86. package/src/server/commands/prepare_image_snapshot_comparison.ts +2 -2
  87. package/src/server/commands/prepare_page_image_snapshot_comparison.ts +2 -2
  88. package/src/server/commands/setup_vis_suite.ts +3 -3
  89. package/src/server/project.ts +8 -7
  90. package/src/server/snapshot.ts +4 -4
  91. package/src/server/snapshot_path.ts +6 -5
  92. package/src/server/suite.ts +7 -12
  93. package/src/server/testing/stubBrowserCommandContext.ts +16 -0
  94. package/src/{testing → server/testing}/stubSuite.ts +7 -9
  95. package/src/server/testing/stubUserConfig.ts +6 -0
  96. package/src/server/vis_options.ts +4 -5
  97. package/src/server/vis_server_context.logic.ts +7 -7
  98. package/src/server/vis_server_context.types.ts +31 -26
  99. package/src/shared/types.ts +2 -0
  100. package/src/testing.ts +0 -1
  101. package/esm/client/actions/has_image_snapshot_action.d.ts +0 -4
  102. package/esm/client/actions/has_image_snapshot_action.d.ts.map +0 -1
  103. package/esm/client/actions/has_image_snapshot_action.js +0 -6
  104. package/esm/client/actions/load_image_snapshot_results_action.d.ts +0 -3
  105. package/esm/client/actions/load_image_snapshot_results_action.d.ts.map +0 -1
  106. package/esm/client/actions/load_image_snapshot_results_action.js +0 -3
  107. package/esm/client/actions/match_image_snapshot_action.d.ts +0 -6
  108. package/esm/client/actions/match_image_snapshot_action.d.ts.map +0 -1
  109. package/esm/client/actions/match_image_snapshot_action.js +0 -20
  110. package/esm/client/actions/match_page_image_snapshot_action.d.ts +0 -6
  111. package/esm/client/actions/match_page_image_snapshot_action.d.ts.map +0 -1
  112. package/esm/client/actions/match_page_image_snapshot_action.js +0 -9
  113. package/esm/client/align_images.d.ts +0 -2
  114. package/esm/client/align_images.d.ts.map +0 -1
  115. package/esm/client/align_images.js +0 -10
  116. package/esm/client/auto_snapshot_options.d.ts +0 -29
  117. package/esm/client/auto_snapshot_options.d.ts.map +0 -1
  118. package/esm/client/auto_snapshot_options.js +0 -49
  119. package/esm/client/compare_image_snapshot.d.ts +0 -6
  120. package/esm/client/compare_image_snapshot.d.ts.map +0 -1
  121. package/esm/client/compare_image_snapshot.js +0 -52
  122. package/esm/client/compare_image_snapshot.logic.d.ts +0 -3
  123. package/esm/client/compare_image_snapshot.logic.d.ts.map +0 -1
  124. package/esm/client/compare_image_snapshot.logic.js +0 -12
  125. package/esm/client/ctx.d.ts +0 -7
  126. package/esm/client/ctx.d.ts.map +0 -1
  127. package/esm/client/ctx.js +0 -11
  128. package/esm/client/expect/augment.d.ts +0 -8
  129. package/esm/client/expect/augment.d.ts.map +0 -1
  130. package/esm/client/expect/augment.js +0 -1
  131. package/esm/client/expect/expectation_result.d.ts +0 -3
  132. package/esm/client/expect/expectation_result.d.ts.map +0 -1
  133. package/esm/client/expect/expectation_result.js +0 -5
  134. package/esm/client/expect/extend.d.ts +0 -2
  135. package/esm/client/expect/extend.d.ts.map +0 -1
  136. package/esm/client/expect/extend.js +0 -4
  137. package/esm/client/expect/to_match_image_snapshot.d.ts +0 -9
  138. package/esm/client/expect/to_match_image_snapshot.d.ts.map +0 -1
  139. package/esm/client/expect/to_match_image_snapshot.js +0 -21
  140. package/esm/client/expect/to_match_image_snapshot.types.d.ts +0 -5
  141. package/esm/client/expect/to_match_image_snapshot.types.d.ts.map +0 -1
  142. package/esm/client/expect/to_match_image_snapshot.types.js +0 -1
  143. package/esm/client/image_data.d.ts +0 -3
  144. package/esm/client/image_data.d.ts.map +0 -1
  145. package/esm/client/image_data.js +0 -33
  146. package/esm/client/image_resizer.d.ts +0 -9
  147. package/esm/client/image_resizer.d.ts.map +0 -1
  148. package/esm/client/image_resizer.js +0 -49
  149. package/esm/client/image_snapshot_options.d.ts +0 -2
  150. package/esm/client/image_snapshot_options.d.ts.map +0 -1
  151. package/esm/client/image_snapshot_options.js +0 -6
  152. package/esm/client/page/augment.d.ts +0 -7
  153. package/esm/client/page/augment.d.ts.map +0 -1
  154. package/esm/client/page/augment.js +0 -1
  155. package/esm/client/page/extend.d.ts +0 -2
  156. package/esm/client/page/extend.d.ts.map +0 -1
  157. package/esm/client/page/extend.js +0 -5
  158. package/esm/client/page/has_image_snapshot.d.ts +0 -10
  159. package/esm/client/page/has_image_snapshot.d.ts.map +0 -1
  160. package/esm/client/page/has_image_snapshot.js +0 -15
  161. package/esm/client/page/to_match_image_snapshot.d.ts +0 -6
  162. package/esm/client/page/to_match_image_snapshot.d.ts.map +0 -1
  163. package/esm/client/page/to_match_image_snapshot.js +0 -15
  164. package/esm/client/selector.d.ts +0 -7
  165. package/esm/client/selector.d.ts.map +0 -1
  166. package/esm/client/selector.js +0 -97
  167. package/esm/client/setup/create_vis.d.ts +0 -96
  168. package/esm/client/setup/create_vis.d.ts.map +0 -1
  169. package/esm/client/setup/create_vis.js +0 -109
  170. package/esm/client/setup/vis.ctx.d.ts +0 -12
  171. package/esm/client/setup/vis.ctx.d.ts.map +0 -1
  172. package/esm/client/setup/vis.ctx.js +0 -32
  173. package/esm/client/setup/vis.d.ts +0 -5
  174. package/esm/client/setup/vis.d.ts.map +0 -1
  175. package/esm/client/setup/vis.js +0 -6
  176. package/esm/client/should_take_snapshot.d.ts +0 -3
  177. package/esm/client/should_take_snapshot.d.ts.map +0 -1
  178. package/esm/client/should_take_snapshot.js +0 -3
  179. package/esm/client/snapshot_meta.d.ts +0 -6
  180. package/esm/client/snapshot_meta.d.ts.map +0 -1
  181. package/esm/client/snapshot_meta.js +0 -1
  182. package/esm/client/task_id.d.ts +0 -7
  183. package/esm/client/task_id.d.ts.map +0 -1
  184. package/esm/client/task_id.js +0 -10
  185. package/esm/client/vitest_browser_context_proxy.d.ts +0 -32
  186. package/esm/client/vitest_browser_context_proxy.d.ts.map +0 -1
  187. package/esm/client/vitest_browser_context_proxy.js +0 -11
  188. package/esm/client/vitest_suite_proxy.d.ts +0 -7
  189. package/esm/client/vitest_suite_proxy.d.ts.map +0 -1
  190. package/esm/client/vitest_suite_proxy.js +0 -8
  191. package/esm/client-api.d.ts +0 -12
  192. package/esm/client-api.d.ts.map +0 -1
  193. package/esm/client-api.js +0 -9
  194. package/esm/commands.d.ts +0 -5
  195. package/esm/commands.d.ts.map +0 -1
  196. package/esm/commands.js +0 -4
  197. package/esm/config/types.d.ts +0 -60
  198. package/esm/config/types.d.ts.map +0 -1
  199. package/esm/config/types.js +0 -1
  200. package/esm/config/vis.d.ts +0 -28
  201. package/esm/config/vis.d.ts.map +0 -1
  202. package/esm/config/vis.js +0 -27
  203. package/esm/config.d.ts +0 -4
  204. package/esm/config.d.ts.map +0 -1
  205. package/esm/config.js +0 -2
  206. package/esm/index.d.ts +0 -5
  207. package/esm/index.d.ts.map +0 -1
  208. package/esm/index.js +0 -4
  209. package/esm/presets/auto.d.ts +0 -2
  210. package/esm/presets/auto.d.ts.map +0 -1
  211. package/esm/presets/auto.js +0 -8
  212. package/esm/presets/enable.d.ts +0 -2
  213. package/esm/presets/enable.d.ts.map +0 -1
  214. package/esm/presets/enable.js +0 -4
  215. package/esm/presets/manual.d.ts +0 -2
  216. package/esm/presets/manual.d.ts.map +0 -1
  217. package/esm/presets/manual.js +0 -4
  218. package/esm/server/browser_provider/browser_api.d.ts +0 -3
  219. package/esm/server/browser_provider/browser_api.d.ts.map +0 -1
  220. package/esm/server/browser_provider/browser_api.js +0 -11
  221. package/esm/server/browser_provider/playwright.d.ts +0 -4
  222. package/esm/server/browser_provider/playwright.d.ts.map +0 -1
  223. package/esm/server/browser_provider/playwright.js +0 -18
  224. package/esm/server/browser_provider/types.d.ts +0 -10
  225. package/esm/server/browser_provider/types.d.ts.map +0 -1
  226. package/esm/server/browser_provider/types.js +0 -1
  227. package/esm/server/browser_provider/webdriverio.d.ts +0 -4
  228. package/esm/server/browser_provider/webdriverio.d.ts.map +0 -1
  229. package/esm/server/browser_provider/webdriverio.js +0 -12
  230. package/esm/server/commands/_assertions.d.ts +0 -5
  231. package/esm/server/commands/_assertions.d.ts.map +0 -1
  232. package/esm/server/commands/_assertions.js +0 -11
  233. package/esm/server/commands/augment.d.ts +0 -11
  234. package/esm/server/commands/augment.d.ts.map +0 -1
  235. package/esm/server/commands/augment.js +0 -1
  236. package/esm/server/commands/commands.d.ts +0 -9
  237. package/esm/server/commands/commands.d.ts.map +0 -1
  238. package/esm/server/commands/commands.js +0 -14
  239. package/esm/server/commands/has_image_snapshot.d.ts +0 -6
  240. package/esm/server/commands/has_image_snapshot.d.ts.map +0 -1
  241. package/esm/server/commands/has_image_snapshot.js +0 -6
  242. package/esm/server/commands/image_snapshot_next_index.d.ts +0 -9
  243. package/esm/server/commands/image_snapshot_next_index.d.ts.map +0 -1
  244. package/esm/server/commands/image_snapshot_next_index.js +0 -6
  245. package/esm/server/commands/load_image_snapshot_results.d.ts +0 -21
  246. package/esm/server/commands/load_image_snapshot_results.d.ts.map +0 -1
  247. package/esm/server/commands/load_image_snapshot_results.js +0 -6
  248. package/esm/server/commands/prepare_image_snapshot_comparison.d.ts +0 -38
  249. package/esm/server/commands/prepare_image_snapshot_comparison.d.ts.map +0 -1
  250. package/esm/server/commands/prepare_image_snapshot_comparison.js +0 -34
  251. package/esm/server/commands/prepare_page_image_snapshot_comparison.d.ts +0 -35
  252. package/esm/server/commands/prepare_page_image_snapshot_comparison.d.ts.map +0 -1
  253. package/esm/server/commands/prepare_page_image_snapshot_comparison.js +0 -27
  254. package/esm/server/commands/setup_vis_suite.d.ts +0 -15
  255. package/esm/server/commands/setup_vis_suite.d.ts.map +0 -1
  256. package/esm/server/commands/setup_vis_suite.js +0 -6
  257. package/esm/server/commands/types.d.ts +0 -3
  258. package/esm/server/commands/types.d.ts.map +0 -1
  259. package/esm/server/commands/types.js +0 -1
  260. package/esm/server/externals/file.d.ts +0 -10
  261. package/esm/server/externals/file.d.ts.map +0 -1
  262. package/esm/server/externals/file.js +0 -20
  263. package/esm/server/project.d.ts +0 -21
  264. package/esm/server/project.d.ts.map +0 -1
  265. package/esm/server/project.js +0 -13
  266. package/esm/server/snapshot.d.ts +0 -6
  267. package/esm/server/snapshot.d.ts.map +0 -1
  268. package/esm/server/snapshot.js +0 -29
  269. package/esm/server/snapshot_path.d.ts +0 -14
  270. package/esm/server/snapshot_path.d.ts.map +0 -1
  271. package/esm/server/snapshot_path.js +0 -34
  272. package/esm/server/snapshot_writer.d.ts +0 -13
  273. package/esm/server/snapshot_writer.d.ts.map +0 -1
  274. package/esm/server/snapshot_writer.js +0 -15
  275. package/esm/server/suite.d.ts +0 -54
  276. package/esm/server/suite.d.ts.map +0 -1
  277. package/esm/server/suite.js +0 -73
  278. package/esm/server/vis_options.d.ts +0 -19
  279. package/esm/server/vis_options.d.ts.map +0 -1
  280. package/esm/server/vis_options.js +0 -14
  281. package/esm/server/vis_server_context.d.ts +0 -50
  282. package/esm/server/vis_server_context.d.ts.map +0 -1
  283. package/esm/server/vis_server_context.deps.d.ts +0 -29
  284. package/esm/server/vis_server_context.deps.d.ts.map +0 -1
  285. package/esm/server/vis_server_context.deps.js +0 -10
  286. package/esm/server/vis_server_context.js +0 -2
  287. package/esm/server/vis_server_context.logic.d.ts +0 -53
  288. package/esm/server/vis_server_context.logic.d.ts.map +0 -1
  289. package/esm/server/vis_server_context.logic.js +0 -79
  290. package/esm/server/vis_server_context.types.d.ts +0 -54
  291. package/esm/server/vis_server_context.types.d.ts.map +0 -1
  292. package/esm/server/vis_server_context.types.js +0 -1
  293. package/esm/server-utils.d.ts +0 -4
  294. package/esm/server-utils.d.ts.map +0 -1
  295. package/esm/server-utils.js +0 -3
  296. package/esm/setup.d.ts +0 -5
  297. package/esm/setup.d.ts.map +0 -1
  298. package/esm/setup.js +0 -5
  299. package/esm/shared/asserts.d.ts +0 -2
  300. package/esm/shared/asserts.d.ts.map +0 -1
  301. package/esm/shared/asserts.js +0 -5
  302. package/esm/shared/base64.d.ts +0 -2
  303. package/esm/shared/base64.d.ts.map +0 -1
  304. package/esm/shared/base64.js +0 -3
  305. package/esm/shared/compare_image.d.ts +0 -6
  306. package/esm/shared/compare_image.d.ts.map +0 -1
  307. package/esm/shared/compare_image.js +0 -42
  308. package/esm/shared/constants.d.ts +0 -6
  309. package/esm/shared/constants.d.ts.map +0 -1
  310. package/esm/shared/constants.js +0 -5
  311. package/esm/shared/convert_threshold_unit.d.ts +0 -6
  312. package/esm/shared/convert_threshold_unit.d.ts.map +0 -1
  313. package/esm/shared/convert_threshold_unit.js +0 -10
  314. package/esm/shared/get_max_size.d.ts +0 -11
  315. package/esm/shared/get_max_size.d.ts.map +0 -1
  316. package/esm/shared/get_max_size.js +0 -5
  317. package/esm/shared/is_same_size.d.ts +0 -8
  318. package/esm/shared/is_same_size.d.ts.map +0 -1
  319. package/esm/shared/is_same_size.js +0 -3
  320. package/esm/shared/trim_common_folder.d.ts +0 -6
  321. package/esm/shared/trim_common_folder.d.ts.map +0 -1
  322. package/esm/shared/trim_common_folder.js +0 -11
  323. package/esm/shared/types.d.ts +0 -90
  324. package/esm/shared/types.d.ts.map +0 -1
  325. package/esm/shared/types.js +0 -1
  326. package/esm/testing/constants.d.ts +0 -9
  327. package/esm/testing/constants.d.ts.map +0 -1
  328. package/esm/testing/constants.js +0 -1933
  329. package/esm/testing/stubBrowserCommandContext.d.ts +0 -8
  330. package/esm/testing/stubBrowserCommandContext.d.ts.map +0 -1
  331. package/esm/testing/stubBrowserCommandContext.js +0 -12
  332. package/esm/testing/stubSuite.d.ts +0 -10
  333. package/esm/testing/stubSuite.d.ts.map +0 -1
  334. package/esm/testing/stubSuite.js +0 -27
  335. package/esm/testing/stubUserConfig.d.ts +0 -7
  336. package/esm/testing/stubUserConfig.d.ts.map +0 -1
  337. package/esm/testing/stubUserConfig.js +0 -4
  338. package/esm/testing.d.ts +0 -3
  339. package/esm/testing.d.ts.map +0 -1
  340. package/esm/testing.js +0 -2
  341. package/src/testing/stubBrowserCommandContext.ts +0 -16
  342. package/src/testing/stubUserConfig.ts +0 -6
@@ -0,0 +1,8 @@
1
+ //#region src/shared/asserts.ts
2
+ function assertSnapshotKeyWithoutDash(snapshotKey) {
3
+ if (snapshotKey?.includes("-")) throw new Error("Snapshot key cannot contain dash");
4
+ }
5
+
6
+ //#endregion
7
+ export { assertSnapshotKeyWithoutDash as t };
8
+ //# sourceMappingURL=asserts--HSSlgPD.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asserts--HSSlgPD.mjs","names":[],"sources":["../src/shared/asserts.ts"],"sourcesContent":["export function assertSnapshotKeyWithoutDash(snapshotKey: string | undefined) {\n\tif (snapshotKey?.includes('-')) {\n\t\tthrow new Error('Snapshot key cannot contain dash')\n\t}\n}\n"],"mappings":";AAAA,SAAgB,6BAA6B,aAAiC;AAC7E,KAAI,aAAa,SAAS,IAAI,CAC7B,OAAM,IAAI,MAAM,mCAAmC"}
@@ -0,0 +1,31 @@
1
+ import { a as ImageSnapshotKeyOptions, h as ToMatchPageImageSnapshotOptions, n as ComparisonMethod } from "./types-DFb23VE1.mjs";
2
+ import { t as ImageSnapshotMatcher } from "./to_match_image_snapshot.types-p-zilA_M.mjs";
3
+ import { BrowserPage } from "vitest/browser";
4
+
5
+ //#region src/client/expect/augment.d.ts
6
+ declare global {
7
+ namespace jest {
8
+ interface Matchers<R, T> extends ImageSnapshotMatcher {}
9
+ }
10
+ }
11
+ //# sourceMappingURL=augment.d.ts.map
12
+ //#endregion
13
+ //#region src/client/page/has_image_snapshot.d.ts
14
+ interface HasImageSnapshotAction {
15
+ /**
16
+ * Check if the snapshot image exists.
17
+ */
18
+ hasImageSnapshot(this: BrowserPage, options?: ImageSnapshotKeyOptions | undefined): Promise<boolean>;
19
+ }
20
+ //#endregion
21
+ //#region src/client/page/to_match_image_snapshot.d.ts
22
+ interface ToMatchImageSnapshotAction {
23
+ toMatchImageSnapshot<M extends ComparisonMethod = 'pixel'>(options?: ToMatchPageImageSnapshotOptions<M> | undefined): Promise<void>;
24
+ }
25
+ //#endregion
26
+ //#region src/client/page/augment.d.ts
27
+ declare module '@vitest/browser/context' {
28
+ interface BrowserPage extends HasImageSnapshotAction, ToMatchImageSnapshotAction {}
29
+ }
30
+ //# sourceMappingURL=augment.d.ts.map
31
+ //# sourceMappingURL=augment-BJmy1S7i.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"augment-BJmy1S7i.d.mts","names":[],"sources":["../src/client/expect/augment.ts","../src/client/page/has_image_snapshot.ts","../src/client/page/to_match_image_snapshot.ts","../src/client/page/augment.ts"],"sourcesContent":[],"mappings":";;;;;;;qCAKmC;EAL2C;;;;;UCM7D,sBAAA;;;ADN6D;EAAA,gBAAA,CAAA,IAAA,ECUtD,WDVsD,EAAA,OAAA,CAAA,ECU/B,uBDV+B,GAAA,SAAA,CAAA,ECUO,ODVP,CAAA,OAAA,CAAA;;;;UEM7D,0BAAA;iCACe,sCACpB,gCAAgC,iBACxC;;;;;gCCL2B,wBAAwB;AHJuB"}
@@ -0,0 +1,90 @@
1
+ import { t as assertSnapshotKeyWithoutDash } from "./asserts--HSSlgPD.mjs";
2
+ import { r as NAME } from "./constants-CTBaz8Ml.mjs";
3
+
4
+ //#region src/client/vitest_suite_proxy.ts
5
+ let vitestSuite;
6
+ if (globalThis.__vitest_browser__) import("vitest/suite").then((m) => {
7
+ vitestSuite = m;
8
+ });
9
+ const getCurrentTest = () => vitestSuite?.getCurrentTest();
10
+ const getCurrentSuite = () => vitestSuite?.getCurrentSuite();
11
+
12
+ //#endregion
13
+ //#region src/client/ctx.ts
14
+ const ctx = {
15
+ autoEnabled: void 0,
16
+ getCurrentTest,
17
+ getCurrentSuite,
18
+ __test__reset() {
19
+ ctx.getCurrentTest = getCurrentTest;
20
+ ctx.getCurrentSuite = getCurrentSuite;
21
+ ctx.autoEnabled = void 0;
22
+ }
23
+ };
24
+
25
+ //#endregion
26
+ //#region src/client/auto_snapshot_options.ts
27
+ /**
28
+ * Set the snapshot options for auto snapshot.
29
+ *
30
+ * You can use it in beforeAll, beforeEach, or individual test cases.
31
+ *
32
+ * @param meta - The snapshot options to set.
33
+ * You can pass a boolean to enable/disable the snapshot, or an object with the snapshot options.
34
+ * When passing an object, the `enable` property will be set to `true` by default unless you explicitly set it to `false`.
35
+ * @param meta.enable - Whether to enable the snapshot.
36
+ * @param meta.snapshotKey - The key to use for the snapshot.
37
+ * @param meta.comparisonMethod - The comparison method to use for the snapshot.
38
+ * @param meta.diffOptions - The diff options to use for the snapshot.
39
+ * @param meta.failureThreshold - The failure threshold to use for the snapshot.
40
+ * @param meta.failureThresholdType - The failure threshold type to use for the snapshot.
41
+ * @param meta.timeout - The timeout to use for the snapshot.
42
+ *
43
+ * @example
44
+ *
45
+ * ```ts
46
+ * beforeAll(() => setAutoSnapshotOptions(...))
47
+ * beforeEach(() => setAutoSnapshotOptions(...))
48
+ *
49
+ * it('...', () => {
50
+ * setAutoSnapshotOptions(...)
51
+ * })
52
+ * ```
53
+ */
54
+ function setAutoSnapshotOptions(meta) {
55
+ if (typeof meta === "object") assertSnapshotKeyWithoutDash(meta.snapshotKey);
56
+ const task = getTask();
57
+ if (!task) return;
58
+ task.meta[NAME] = {
59
+ ...task.meta[NAME],
60
+ ...parseMeta(meta)
61
+ };
62
+ }
63
+ function getTask() {
64
+ return ctx.getCurrentTest() ?? (ctx.getCurrentSuite()?.tasks?.[0])?.file;
65
+ }
66
+ function parseMeta(meta) {
67
+ return typeof meta === "boolean" ? { enable: meta } : {
68
+ enable: true,
69
+ ...meta
70
+ };
71
+ }
72
+ function extractAutoSnapshotOptions(task) {
73
+ if (!task) return;
74
+ const list = [];
75
+ let current = task;
76
+ while (current?.suite) {
77
+ list.unshift(current.suite.meta);
78
+ current = current.suite;
79
+ }
80
+ list.unshift(task.file?.meta);
81
+ list.push(task.meta);
82
+ return list.reduce((acc, cur) => {
83
+ const meta = cur?.[NAME];
84
+ return meta ? Object.assign({}, acc, meta) : acc;
85
+ }, { enable: false });
86
+ }
87
+
88
+ //#endregion
89
+ export { setAutoSnapshotOptions as n, ctx as r, extractAutoSnapshotOptions as t };
90
+ //# sourceMappingURL=auto_snapshot_options-CAD43Zkp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto_snapshot_options-CAD43Zkp.mjs","names":["vitestSuite: Awaited<typeof import('vitest/suite')>","list: any[]"],"sources":["../src/client/vitest_suite_proxy.ts","../src/client/ctx.ts","../src/client/auto_snapshot_options.ts"],"sourcesContent":["import type { SnapshotTestMeta } from '../shared/types.ts'\n\nlet vitestSuite: Awaited<typeof import('vitest/suite')>\n\nif ((globalThis as any).__vitest_browser__) {\n\timport('vitest/suite').then((m) => {\n\t\tvitestSuite = m\n\t})\n}\n\nexport type CurrentTest = ReturnType<typeof vitestSuite.getCurrentTest> & SnapshotTestMeta\n\nexport const getCurrentTest = () => vitestSuite?.getCurrentTest() as CurrentTest\nexport const getCurrentSuite = () => vitestSuite?.getCurrentSuite()\n","import { getCurrentSuite, getCurrentTest } from './vitest_suite_proxy.ts'\n\nexport const ctx = {\n\tautoEnabled: undefined as boolean | undefined,\n\tgetCurrentTest,\n\tgetCurrentSuite,\n\t__test__reset() {\n\t\tctx.getCurrentTest = getCurrentTest\n\t\tctx.getCurrentSuite = getCurrentSuite\n\t\tctx.autoEnabled = undefined\n\t},\n}\n","import { assertSnapshotKeyWithoutDash } from '../shared/asserts.ts'\nimport { NAME } from '../shared/constants.ts'\nimport type { ComparisonMethod } from '../shared/types.ts'\nimport { ctx } from './ctx.ts'\nimport type { SnapshotMeta } from './snapshot_meta.ts'\n\ntype Suite = { meta: Record<string, any>; suite?: Suite | undefined }\n\nexport type MetaTask =\n\t| {\n\t\t\tfile?: { meta: Record<string, any> } | undefined\n\t\t\tsuite?: Suite | undefined\n\t\t\tmeta: Record<string, any>\n\t }\n\t| undefined\n\n/**\n * Set the snapshot options for auto snapshot.\n *\n * You can use it in beforeAll, beforeEach, or individual test cases.\n *\n * @param meta - The snapshot options to set.\n * You can pass a boolean to enable/disable the snapshot, or an object with the snapshot options.\n * When passing an object, the `enable` property will be set to `true` by default unless you explicitly set it to `false`.\n * @param meta.enable - Whether to enable the snapshot.\n * @param meta.snapshotKey - The key to use for the snapshot.\n * @param meta.comparisonMethod - The comparison method to use for the snapshot.\n * @param meta.diffOptions - The diff options to use for the snapshot.\n * @param meta.failureThreshold - The failure threshold to use for the snapshot.\n * @param meta.failureThresholdType - The failure threshold type to use for the snapshot.\n * @param meta.timeout - The timeout to use for the snapshot.\n *\n * @example\n *\n * ```ts\n * beforeAll(() => setAutoSnapshotOptions(...))\n * beforeEach(() => setAutoSnapshotOptions(...))\n *\n * it('...', () => {\n * setAutoSnapshotOptions(...)\n * })\n * ```\n */\nexport function setAutoSnapshotOptions<M extends ComparisonMethod>(meta: boolean | SnapshotMeta<M>): void {\n\tif (typeof meta === 'object') {\n\t\tassertSnapshotKeyWithoutDash(meta.snapshotKey)\n\t}\n\n\tconst task = getTask()\n\tif (!task) return\n\n\ttask.meta[NAME] = {\n\t\t...task.meta[NAME],\n\t\t...parseMeta(meta),\n\t}\n}\n\nfunction getTask(): MetaTask | undefined {\n\treturn ctx.getCurrentTest() ?? (ctx.getCurrentSuite()?.tasks?.[0] as any)?.file\n}\n\nfunction parseMeta<M extends ComparisonMethod>(meta: boolean | SnapshotMeta<M>): SnapshotMeta<M> {\n\treturn typeof meta === 'boolean' ? ({ enable: meta } as any) : { enable: true, ...meta }\n}\n\nexport function extractAutoSnapshotOptions<M extends SnapshotMeta<any> = SnapshotMeta<any>>(\n\ttask: MetaTask,\n): M | undefined {\n\tif (!task) return\n\n\tconst list: any[] = []\n\tlet current = task\n\twhile (current?.suite) {\n\t\tlist.unshift(current.suite.meta)\n\t\tcurrent = current.suite\n\t}\n\tlist.unshift(task.file?.meta)\n\tlist.push(task.meta)\n\treturn list.reduce(\n\t\t(acc, cur) => {\n\t\t\tconst meta = cur?.[NAME]\n\t\t\treturn meta ? Object.assign({}, acc, meta) : acc\n\t\t},\n\t\t{ enable: false },\n\t)\n}\n"],"mappings":";;;;AAEA,IAAIA;AAEJ,IAAK,WAAmB,mBACvB,QAAO,gBAAgB,MAAM,MAAM;AAClC,eAAc;EACb;AAKH,MAAa,uBAAuB,aAAa,gBAAgB;AACjE,MAAa,wBAAwB,aAAa,iBAAiB;;;;ACXnE,MAAa,MAAM;CAClB,aAAa;CACb;CACA;CACA,gBAAgB;AACf,MAAI,iBAAiB;AACrB,MAAI,kBAAkB;AACtB,MAAI,cAAc;;CAEnB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACgCD,SAAgB,uBAAmD,MAAuC;AACzG,KAAI,OAAO,SAAS,SACnB,8BAA6B,KAAK,YAAY;CAG/C,MAAM,OAAO,SAAS;AACtB,KAAI,CAAC,KAAM;AAEX,MAAK,KAAK,QAAQ;EACjB,GAAG,KAAK,KAAK;EACb,GAAG,UAAU,KAAK;EAClB;;AAGF,SAAS,UAAgC;AACxC,QAAO,IAAI,gBAAgB,KAAK,IAAI,iBAAiB,EAAE,QAAQ,KAAY;;AAG5E,SAAS,UAAsC,MAAkD;AAChG,QAAO,OAAO,SAAS,YAAa,EAAE,QAAQ,MAAM,GAAW;EAAE,QAAQ;EAAM,GAAG;EAAM;;AAGzF,SAAgB,2BACf,MACgB;AAChB,KAAI,CAAC,KAAM;CAEX,MAAMC,OAAc,EAAE;CACtB,IAAI,UAAU;AACd,QAAO,SAAS,OAAO;AACtB,OAAK,QAAQ,QAAQ,MAAM,KAAK;AAChC,YAAU,QAAQ;;AAEnB,MAAK,QAAQ,KAAK,MAAM,KAAK;AAC7B,MAAK,KAAK,KAAK,KAAK;AACpB,QAAO,KAAK,QACV,KAAK,QAAQ;EACb,MAAM,OAAO,MAAM;AACnB,SAAO,OAAO,OAAO,OAAO,EAAE,EAAE,KAAK,KAAK,GAAG;IAE9C,EAAE,QAAQ,OAAO,CACjB"}
@@ -0,0 +1,45 @@
1
+ import { n as ComparisonMethod, x as SnapshotMeta } from "./types-DFb23VE1.mjs";
2
+
3
+ //#region src/client/auto_snapshot_options.d.ts
4
+ type Suite = {
5
+ meta: Record<string, any>;
6
+ suite?: Suite | undefined;
7
+ };
8
+ type MetaTask = {
9
+ file?: {
10
+ meta: Record<string, any>;
11
+ } | undefined;
12
+ suite?: Suite | undefined;
13
+ meta: Record<string, any>;
14
+ } | undefined;
15
+ /**
16
+ * Set the snapshot options for auto snapshot.
17
+ *
18
+ * You can use it in beforeAll, beforeEach, or individual test cases.
19
+ *
20
+ * @param meta - The snapshot options to set.
21
+ * You can pass a boolean to enable/disable the snapshot, or an object with the snapshot options.
22
+ * When passing an object, the `enable` property will be set to `true` by default unless you explicitly set it to `false`.
23
+ * @param meta.enable - Whether to enable the snapshot.
24
+ * @param meta.snapshotKey - The key to use for the snapshot.
25
+ * @param meta.comparisonMethod - The comparison method to use for the snapshot.
26
+ * @param meta.diffOptions - The diff options to use for the snapshot.
27
+ * @param meta.failureThreshold - The failure threshold to use for the snapshot.
28
+ * @param meta.failureThresholdType - The failure threshold type to use for the snapshot.
29
+ * @param meta.timeout - The timeout to use for the snapshot.
30
+ *
31
+ * @example
32
+ *
33
+ * ```ts
34
+ * beforeAll(() => setAutoSnapshotOptions(...))
35
+ * beforeEach(() => setAutoSnapshotOptions(...))
36
+ *
37
+ * it('...', () => {
38
+ * setAutoSnapshotOptions(...)
39
+ * })
40
+ * ```
41
+ */
42
+ declare function setAutoSnapshotOptions<M extends ComparisonMethod>(meta: boolean | SnapshotMeta<M>): void;
43
+ //#endregion
44
+ export { setAutoSnapshotOptions as n, MetaTask as t };
45
+ //# sourceMappingURL=auto_snapshot_options-CaQCXDdi.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto_snapshot_options-CaQCXDdi.d.mts","names":[],"sources":["../src/client/auto_snapshot_options.ts"],"sourcesContent":[],"mappings":";;;KAMK,KAAA;EAAA,IAAA,EAAgB,MAAX,CAAA,MAAA,EAAW,GAAA,CAAA;EAET,KAAA,CAAA,EAFsC,KAE9B,GAAA,SAAA;CAEF;AACP,KAHC,QAAA,GAGD;EACF,IAAA,CAAA,EAAA;IAAM,IAAA,EAFG,MAEH,CAAA,MAAA,EAAA,GAAA,CAAA;EA+BC,CAAA,GAAA,SAAA;EAAiC,KAAA,CAAA,EAhCtC,KAgCsC,GAAA,SAAA;EAA+C,IAAA,EA/BvF,MA+BuF,CAAA,MAAA,EAAA,GAAA,CAAA;CAAb,GAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAAnE,iCAAiC,kCAAkC,aAAa"}
@@ -0,0 +1,8 @@
1
+ //#region src/shared/base64.ts
2
+ function isBase64String(value) {
3
+ return typeof value === "string" && /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/.test(value);
4
+ }
5
+
6
+ //#endregion
7
+ export { isBase64String as t };
8
+ //# sourceMappingURL=base64-CHSENEAO.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base64-CHSENEAO.mjs","names":[],"sources":["../src/shared/base64.ts"],"sourcesContent":["export function isBase64String(value: unknown): value is string {\n\treturn typeof value === 'string' && /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/.test(value)\n}\n"],"mappings":";AAAA,SAAgB,eAAe,OAAiC;AAC/D,QAAO,OAAO,UAAU,YAAY,mEAAmE,KAAK,MAAM"}
@@ -0,0 +1,141 @@
1
+ import { _ as DIFF_DIR, a as ImageSnapshotKeyOptions, b as SNAPSHOT_ROOT_DIR, c as PageImageSnapshotOptions, d as SnapshotTestMeta, f as SsimComparisonOptions, g as BASELINE_DIR, h as ToMatchPageImageSnapshotOptions, i as ImageSnapshotCompareOptions, l as PixelComparisonOptions, m as ToMatchImageSnapshotOptions, n as ComparisonMethod, o as ImageSnapshotSubjectOptions, p as SsimDiffOptions, r as FailureThresholdOptions, s as ImageSnapshotTimeoutOptions, t as Awaitable, u as PixelDiffOptions, v as NAME, y as RESULT_DIR } from "./types-DFb23VE1.mjs";
2
+ import "./vis_server_context.types-Ce1f9vOO.mjs";
3
+ import "./types-Do1N7g4c.mjs";
4
+ import { t as SetupVisSuiteCommand } from "./setup_vis_suite-C6JGGT7B.mjs";
5
+ import { n as setAutoSnapshotOptions, t as MetaTask } from "./auto_snapshot_options-CaQCXDdi.mjs";
6
+ import { t as ImageSnapshotMatcher } from "./to_match_image_snapshot.types-p-zilA_M.mjs";
7
+ import { BrowserCommands } from "vitest/browser";
8
+ import { SyncExpectationResult } from "@vitest/expect";
9
+
10
+ //#region src/server/commands/has_image_snapshot.d.ts
11
+ interface HasImageSnapshotCommand {
12
+ hasImageSnapshot(taskId: string, snapshotKey: string | undefined): Promise<boolean>;
13
+ }
14
+ //#endregion
15
+ //#region src/server/commands/image_snapshot_next_index.d.ts
16
+ interface ImageSnapshotNextIndexCommand {
17
+ /**
18
+ * Get the index of the snapshot image to be created.
19
+ */
20
+ imageSnapshotNextIndex(taskId: string): Promise<number>;
21
+ }
22
+ //#endregion
23
+ //#region src/server/commands/load_image_snapshot_results.d.ts
24
+ interface ImageSnapshotResult {
25
+ filename: string;
26
+ /**
27
+ * The base64 encoded image of the baseline snapshot.
28
+ */
29
+ baseline?: string | undefined;
30
+ /**
31
+ * The base64 encoded image of the result snapshot.
32
+ */
33
+ result?: string | undefined;
34
+ /**
35
+ * The base64 encoded image of the diff snapshot.
36
+ */
37
+ diff?: string | undefined;
38
+ }
39
+ interface LoadImageSnapshotResultsCommand {
40
+ loadImageSnapshotResults(taskId: string): Promise<ImageSnapshotResult[]>;
41
+ }
42
+ //#endregion
43
+ //#region src/server/commands/types.d.ts
44
+ type MatchImageSnapshotOptions = ImageSnapshotTimeoutOptions & ImageSnapshotCompareOptions<any> & ImageSnapshotKeyOptions;
45
+ //#endregion
46
+ //#region src/server/commands/prepare_image_snapshot_comparison.d.ts
47
+ type ImageSnapshotComparisonInfo$1 = {
48
+ /**
49
+ * Path to the project root.
50
+ */
51
+ projectRoot: string;
52
+ /**
53
+ * Path to the baseline image relative to the project root.
54
+ */
55
+ baselinePath: string;
56
+ /**
57
+ * Path to the result image relative to the project root.
58
+ */
59
+ resultPath: string;
60
+ /**
61
+ * Path to the diff image relative to the project root.
62
+ */
63
+ diffPath: string;
64
+ /**
65
+ * Base64 encoded baseline image.
66
+ */
67
+ baseline: string;
68
+ /**
69
+ * Base64 encoded result image.
70
+ */
71
+ result: string;
72
+ /**
73
+ * Base64 encoded diff image.
74
+ */
75
+ diff?: string | undefined;
76
+ } & ImageSnapshotTimeoutOptions & FailureThresholdOptions & (SsimComparisonOptions | PixelComparisonOptions);
77
+ interface PrepareImageSnapshotComparisonCommand {
78
+ prepareImageSnapshotComparison: (taskId: string, subject: string, options?: MatchImageSnapshotOptions | undefined) => Promise<ImageSnapshotComparisonInfo$1 | undefined>;
79
+ }
80
+ //#endregion
81
+ //#region src/server/commands/prepare_page_image_snapshot_comparison.d.ts
82
+ type ImageSnapshotComparisonInfo = {
83
+ /**
84
+ * Path to the project root.
85
+ */
86
+ projectRoot: string;
87
+ /**
88
+ * Path to the baseline image relative to the project root.
89
+ */
90
+ baselinePath: string;
91
+ /**
92
+ * Path to the result image relative to the project root.
93
+ */
94
+ resultPath: string;
95
+ /**
96
+ * Path to the diff image relative to the project root.
97
+ */
98
+ diffPath: string;
99
+ /**
100
+ * Base64 encoded baseline image.
101
+ */
102
+ baseline: string;
103
+ /**
104
+ * Base64 encoded result image.
105
+ */
106
+ result: string;
107
+ } & ImageSnapshotTimeoutOptions & FailureThresholdOptions & (SsimComparisonOptions | PixelComparisonOptions);
108
+ interface PreparePageImageSnapshotComparisonCommand {
109
+ preparePageImageSnapshotComparison: (taskId: string, options?: MatchImageSnapshotOptions | undefined) => Promise<ImageSnapshotComparisonInfo | undefined>;
110
+ }
111
+ //#endregion
112
+ //#region src/server/commands/augment.d.ts
113
+ declare module 'vitest/browser' {
114
+ interface BrowserCommands extends SetupVisSuiteCommand, ImageSnapshotNextIndexCommand, HasImageSnapshotCommand, PreparePageImageSnapshotComparisonCommand, PrepareImageSnapshotComparisonCommand, LoadImageSnapshotResultsCommand {}
115
+ }
116
+ //# sourceMappingURL=augment.d.ts.map
117
+ //#endregion
118
+ //#region src/client/actions/has_image_snapshot_action.d.ts
119
+ declare function hasImageSnapshotAction(commands: ImageSnapshotNextIndexCommand & HasImageSnapshotCommand, taskId: string, options?: ImageSnapshotKeyOptions | undefined): Promise<boolean>;
120
+ //#endregion
121
+ //#region src/client/actions/load_image_snapshot_results_action.d.ts
122
+ declare function loadImageSnapshotResultsAction(commands: LoadImageSnapshotResultsCommand, taskId: string): Promise<ImageSnapshotResult[]>;
123
+ //#endregion
124
+ //#region src/client/actions/match_image_snapshot_action.d.ts
125
+ declare function matchImageSnapshotAction(commands: BrowserCommands & PrepareImageSnapshotComparisonCommand & ImageSnapshotNextIndexCommand, taskId: string, subject: any, options?: ToMatchImageSnapshotOptions<any>): Promise<void>;
126
+ //#endregion
127
+ //#region src/client/actions/match_page_image_snapshot_action.d.ts
128
+ declare function matchPageImageSnapshotAction(commands: BrowserCommands & PrepareImageSnapshotComparisonCommand & ImageSnapshotNextIndexCommand, taskId: string, options?: ToMatchImageSnapshotOptions<any>): Promise<void>;
129
+ //#endregion
130
+ //#region src/client/expect/expectation_result.d.ts
131
+ declare const success: SyncExpectationResult;
132
+ //#endregion
133
+ //#region src/client/task_id.d.ts
134
+ type Task = {
135
+ name: string;
136
+ suite?: Task | undefined;
137
+ };
138
+ declare function toTaskId(task: Task): string;
139
+ //#endregion
140
+ export { Awaitable, BASELINE_DIR, ComparisonMethod, DIFF_DIR, FailureThresholdOptions, ImageSnapshotCompareOptions, ImageSnapshotKeyOptions, ImageSnapshotMatcher, ImageSnapshotSubjectOptions, ImageSnapshotTimeoutOptions, type MetaTask, NAME, PageImageSnapshotOptions, PixelComparisonOptions, PixelDiffOptions, RESULT_DIR, SNAPSHOT_ROOT_DIR, SnapshotTestMeta, SsimComparisonOptions, SsimDiffOptions, ToMatchImageSnapshotOptions, ToMatchPageImageSnapshotOptions, hasImageSnapshotAction, loadImageSnapshotResultsAction, matchImageSnapshotAction, matchPageImageSnapshotAction, setAutoSnapshotOptions, success, toTaskId };
141
+ //# sourceMappingURL=client-api.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-api.d.mts","names":[],"sources":["../src/server/commands/has_image_snapshot.ts","../src/server/commands/image_snapshot_next_index.ts","../src/server/commands/load_image_snapshot_results.ts","../src/server/commands/types.ts","../src/server/commands/prepare_image_snapshot_comparison.ts","../src/server/commands/prepare_page_image_snapshot_comparison.ts","../src/server/commands/augment.ts","../src/client/actions/has_image_snapshot_action.ts","../src/client/actions/load_image_snapshot_results_action.ts","../src/client/actions/match_image_snapshot_action.ts","../src/client/actions/match_page_image_snapshot_action.ts","../src/client/expect/expectation_result.ts","../src/client/task_id.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;UAIiB,uBAAA;qEACmD;;;;UCDnD,6BAAA;;;;0CAIwB;;;;UCJxB,mBAAA;;;;;;;;;EFAA,MAAA,CAAA,EAAA,MAAA,GAAA,SAAuB;;;;ECAvB,IAAA,CAAA,EAAA,MAAA,GAAA,SAAA;;UCgBA,+BAAA;4CAC0B,QAAQ;AAjBnD;;;KCEY,yBAAA,GAA4B,8BACvC,mCACA;;;KCSW,6BAAA;;;;;;;AJbZ;;;;ACAA;;;;ACAA;EAgBiB,QAAA,EAAA,MAAA;;;;ECdL,QAAA,EAAA,MAAA;EAA4B;;;EAEhB,MAAA,EAAA,MAAA;;;;ECSZ,IAAA,CAAA,EAAA,MAAA,GAAA,SAAA;CA6BR,GAAA,2BAAA,GACH,uBADG,GAAA,CAEF,qBAFE,GAEsB,sBAFtB,CAAA;AACH,UAGgB,qCAAA,CAHhB;EACC,8BAAA,EAAA,CAAA,MAAA,EAAA,MAAA,EAAA,OAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAMU,yBANV,GAAA,SAAA,EAAA,GAOI,OAPJ,CAOY,6BAPZ,GAAA,SAAA,CAAA;;;;KCjCG,2BAAA;;;;;;;ALXL;;;;ACAA;;;;ACAA;EAgBiB,QAAA,EAAA,MAAA;;;;ECdL,QAAA,EAAA,MAAA;EAA4B;;;EAEhB,MAAA,EAAA,MAAA;IEgCpB,8BACH,2BACC,wBAAwB;UAET,yCAAA;iEAGL,0CACN,QAAQ;AD/Bd;;;;oCERU,sBACP,+BACA,yBACA,2CACA,uCACA;;ANVH;;;iBODgB,sBAAA,WACL,gCAAgC,mDAEhC,sCAAmC;;;iBCJ9B,8BAAA,WAAyC,kDAA+C,QAAhB,mBAAA;;;iBCOlE,wBAAA,WACX,kBAAkB,wCAAwC,uEAG1D,mCAAgC;;;iBCNrB,4BAAA,WACX,kBAAkB,wCAAwC,yDAE1D,mCAAgC;;;cCR9B,SAAS;;;KCFjB,IAAA;;UAEI;;iBAGO,QAAA,OAAe"}
@@ -0,0 +1,14 @@
1
+ import "./asserts--HSSlgPD.mjs";
2
+ import { a as SNAPSHOT_ROOT_DIR, i as RESULT_DIR, n as DIFF_DIR, r as NAME, t as BASELINE_DIR } from "./constants-CTBaz8Ml.mjs";
3
+ import { n as setAutoSnapshotOptions } from "./auto_snapshot_options-CAD43Zkp.mjs";
4
+ import "./base64-CHSENEAO.mjs";
5
+ import { a as hasImageSnapshotAction, i as matchImageSnapshotAction, n as success, r as matchPageImageSnapshotAction, t as toTaskId } from "./task_id-DnS9_4Ub.mjs";
6
+
7
+ //#region src/client/actions/load_image_snapshot_results_action.ts
8
+ function loadImageSnapshotResultsAction(commands, taskId) {
9
+ return commands.loadImageSnapshotResults(taskId);
10
+ }
11
+
12
+ //#endregion
13
+ export { BASELINE_DIR, DIFF_DIR, NAME, RESULT_DIR, SNAPSHOT_ROOT_DIR, hasImageSnapshotAction, loadImageSnapshotResultsAction, matchImageSnapshotAction, matchPageImageSnapshotAction, setAutoSnapshotOptions, success, toTaskId };
14
+ //# sourceMappingURL=client-api.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-api.mjs","names":[],"sources":["../src/client/actions/load_image_snapshot_results_action.ts"],"sourcesContent":["import type { LoadImageSnapshotResultsCommand } from '../../server/commands/load_image_snapshot_results.ts'\n\nexport function loadImageSnapshotResultsAction(commands: LoadImageSnapshotResultsCommand, taskId: string) {\n\treturn commands.loadImageSnapshotResults(taskId)\n}\n"],"mappings":";;;;;;;AAEA,SAAgB,+BAA+B,UAA2C,QAAgB;AACzG,QAAO,SAAS,yBAAyB,OAAO"}
@@ -0,0 +1,28 @@
1
+ import { f as SsimComparisonOptions, l as PixelComparisonOptions, n as ComparisonMethod, p as SsimDiffOptions, u as PixelDiffOptions } from "./types-DFb23VE1.mjs";
2
+ import { t as VisOptions } from "./types-Do1N7g4c.mjs";
3
+ import { t as trimCommonFolder } from "./trim_common_folder-ModiubEJ.mjs";
4
+ import * as vite0 from "vite";
5
+
6
+ //#region src/config/vis.d.ts
7
+
8
+ /**
9
+ * Create a Vite plugin for visual testing.
10
+ *
11
+ * If options are not provided, the plugin will use the default options,
12
+ * which enables the `auto` preset.
13
+ */
14
+ declare function vis<M extends ComparisonMethod = 'pixel'>(options?: VisOptions<M>): {
15
+ name: string;
16
+ config(this: unknown, userConfig: vite0.UserConfig): {
17
+ test: {
18
+ browser: {
19
+ name: undefined;
20
+ commands: any;
21
+ };
22
+ setupFiles: string[];
23
+ };
24
+ };
25
+ };
26
+ //#endregion
27
+ export { ComparisonMethod, PixelComparisonOptions, PixelDiffOptions, SsimComparisonOptions, SsimDiffOptions, VisOptions, trimCommonFolder, vis };
28
+ //# sourceMappingURL=config.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.mts","names":[],"sources":["../src/config/vis.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;AAaA;;AAA8E,iBAA9D,GAA8D,CAAA,UAAhD,gBAAgD,GAAA,OAAA,CAAA,CAAA,OAAA,CAAA,EAAX,UAAW,CAAA,CAAA,CAAA,CAAA,EAAA;EAAX,IAAA,EAAA,MAAA;EAAU,MAGvD,CAAA,IAAA,EAAA,OAAA,EAAA,UAAA,EAHuD,KAAA,CAGvD,UAAA,CAAA,EAAA;IAAA,IAAA,EAAA"}