@visual-check/cli 0.1.1 → 0.2.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 (219) hide show
  1. package/dist/addon-child/image-files.js +1 -1
  2. package/dist/addon-child/image-files.js.map +1 -1
  3. package/dist/agent-skill/skill-files.d.ts +4 -0
  4. package/dist/agent-skill/skill-files.d.ts.map +1 -1
  5. package/dist/agent-skill/skill-files.js +4 -0
  6. package/dist/agent-skill/skill-files.js.map +1 -1
  7. package/dist/baselines/baseline-error.d.ts +15 -2
  8. package/dist/baselines/baseline-error.d.ts.map +1 -1
  9. package/dist/baselines/baseline-error.js +32 -2
  10. package/dist/baselines/baseline-error.js.map +1 -1
  11. package/dist/capture/capture-session.d.ts +161 -30
  12. package/dist/capture/capture-session.d.ts.map +1 -1
  13. package/dist/capture/capture-session.js +284 -64
  14. package/dist/capture/capture-session.js.map +1 -1
  15. package/dist/capture/driver/cdp/cdp-page.d.ts.map +1 -1
  16. package/dist/capture/driver/cdp/cdp-page.js +120 -31
  17. package/dist/capture/driver/cdp/cdp-page.js.map +1 -1
  18. package/dist/capture/driver/cdp/failed-loads.d.ts +16 -0
  19. package/dist/capture/driver/cdp/failed-loads.d.ts.map +1 -0
  20. package/dist/capture/driver/cdp/failed-loads.js +71 -0
  21. package/dist/capture/driver/cdp/failed-loads.js.map +1 -0
  22. package/dist/capture/driver/cdp/launch-arguments.d.ts +7 -1
  23. package/dist/capture/driver/cdp/launch-arguments.d.ts.map +1 -1
  24. package/dist/capture/driver/cdp/launch-arguments.js +8 -1
  25. package/dist/capture/driver/cdp/launch-arguments.js.map +1 -1
  26. package/dist/capture/driver/driver.d.ts +88 -4
  27. package/dist/capture/driver/driver.d.ts.map +1 -1
  28. package/dist/capture/driver/driver.js +33 -0
  29. package/dist/capture/driver/driver.js.map +1 -1
  30. package/dist/capture/end-state.d.ts +3 -5
  31. package/dist/capture/end-state.d.ts.map +1 -1
  32. package/dist/capture/end-state.js +7 -43
  33. package/dist/capture/end-state.js.map +1 -1
  34. package/dist/capture/frames.d.ts +18 -0
  35. package/dist/capture/frames.d.ts.map +1 -0
  36. package/dist/capture/frames.js +54 -0
  37. package/dist/capture/frames.js.map +1 -0
  38. package/dist/capture/page-script.d.ts +34 -1
  39. package/dist/capture/page-script.d.ts.map +1 -1
  40. package/dist/capture/page-script.js +58 -2
  41. package/dist/capture/page-script.js.map +1 -1
  42. package/dist/capture/prepare-capture.d.ts +50 -3
  43. package/dist/capture/prepare-capture.d.ts.map +1 -1
  44. package/dist/capture/prepare-capture.js +157 -16
  45. package/dist/capture/prepare-capture.js.map +1 -1
  46. package/dist/commands/check-storybooks.d.ts +5 -4
  47. package/dist/commands/check-storybooks.d.ts.map +1 -1
  48. package/dist/commands/check-storybooks.js +11 -8
  49. package/dist/commands/check-storybooks.js.map +1 -1
  50. package/dist/commands/consistency-output.d.ts.map +1 -1
  51. package/dist/commands/consistency-output.js +3 -3
  52. package/dist/commands/consistency-output.js.map +1 -1
  53. package/dist/commands/failed-loads-hint.d.ts +7 -0
  54. package/dist/commands/failed-loads-hint.d.ts.map +1 -0
  55. package/dist/commands/failed-loads-hint.js +16 -0
  56. package/dist/commands/failed-loads-hint.js.map +1 -0
  57. package/dist/commands/local-update.d.ts +22 -0
  58. package/dist/commands/local-update.d.ts.map +1 -0
  59. package/dist/commands/local-update.js +39 -0
  60. package/dist/commands/local-update.js.map +1 -0
  61. package/dist/commands/network-warning.d.ts.map +1 -1
  62. package/dist/commands/network-warning.js +2 -18
  63. package/dist/commands/network-warning.js.map +1 -1
  64. package/dist/commands/plan-snapshots.d.ts +23 -8
  65. package/dist/commands/plan-snapshots.d.ts.map +1 -1
  66. package/dist/commands/plan-snapshots.js +15 -9
  67. package/dist/commands/plan-snapshots.js.map +1 -1
  68. package/dist/commands/report-entries.d.ts +5 -2
  69. package/dist/commands/report-entries.d.ts.map +1 -1
  70. package/dist/commands/report-entries.js +63 -15
  71. package/dist/commands/report-entries.js.map +1 -1
  72. package/dist/commands/run-browser.d.ts +5 -5
  73. package/dist/commands/run-browser.d.ts.map +1 -1
  74. package/dist/commands/run-browser.js +1 -0
  75. package/dist/commands/run-browser.js.map +1 -1
  76. package/dist/commands/run-cli.d.ts +16 -5
  77. package/dist/commands/run-cli.d.ts.map +1 -1
  78. package/dist/commands/run-cli.js +74 -54
  79. package/dist/commands/run-cli.js.map +1 -1
  80. package/dist/commands/run-report.d.ts +3 -3
  81. package/dist/commands/run-report.d.ts.map +1 -1
  82. package/dist/commands/run-report.js +4 -2
  83. package/dist/commands/run-report.js.map +1 -1
  84. package/dist/commands/run-snapshots.d.ts +7 -4
  85. package/dist/commands/run-snapshots.d.ts.map +1 -1
  86. package/dist/commands/run-snapshots.js +49 -17
  87. package/dist/commands/run-snapshots.js.map +1 -1
  88. package/dist/commands/snapshot-result.d.ts +66 -9
  89. package/dist/commands/snapshot-result.d.ts.map +1 -1
  90. package/dist/commands/snapshot-result.js +46 -6
  91. package/dist/commands/snapshot-result.js.map +1 -1
  92. package/dist/commands/stop-message.d.ts.map +1 -1
  93. package/dist/commands/stop-message.js +6 -1
  94. package/dist/commands/stop-message.js.map +1 -1
  95. package/dist/commands/stopped-run.d.ts +10 -5
  96. package/dist/commands/stopped-run.d.ts.map +1 -1
  97. package/dist/commands/stopped-run.js +35 -22
  98. package/dist/commands/stopped-run.js.map +1 -1
  99. package/dist/commands/take-snapshot.d.ts +9 -6
  100. package/dist/commands/take-snapshot.d.ts.map +1 -1
  101. package/dist/commands/take-snapshot.js +16 -7
  102. package/dist/commands/take-snapshot.js.map +1 -1
  103. package/dist/commands/test-snapshot.d.ts +2 -2
  104. package/dist/commands/test-snapshot.d.ts.map +1 -1
  105. package/dist/commands/test-snapshot.js.map +1 -1
  106. package/dist/commands/update-baselines.d.ts.map +1 -1
  107. package/dist/commands/update-baselines.js +3 -2
  108. package/dist/commands/update-baselines.js.map +1 -1
  109. package/dist/commands/update-snapshot.d.ts +22 -4
  110. package/dist/commands/update-snapshot.d.ts.map +1 -1
  111. package/dist/commands/update-snapshot.js +79 -18
  112. package/dist/commands/update-snapshot.js.map +1 -1
  113. package/dist/config/checks.d.ts +26 -0
  114. package/dist/config/checks.d.ts.map +1 -1
  115. package/dist/config/checks.js +68 -6
  116. package/dist/config/checks.js.map +1 -1
  117. package/dist/config/define-config.d.ts +38 -2
  118. package/dist/config/define-config.d.ts.map +1 -1
  119. package/dist/config/define-config.js.map +1 -1
  120. package/dist/config/resolve-config.d.ts +15 -2
  121. package/dist/config/resolve-config.d.ts.map +1 -1
  122. package/dist/config/resolve-config.js +6 -0
  123. package/dist/config/resolve-config.js.map +1 -1
  124. package/dist/config/story-options.d.ts +32 -4
  125. package/dist/config/story-options.d.ts.map +1 -1
  126. package/dist/config/story-options.js +38 -7
  127. package/dist/config/story-options.js.map +1 -1
  128. package/dist/config/unrunnable-regexp.d.ts +22 -0
  129. package/dist/config/unrunnable-regexp.d.ts.map +1 -0
  130. package/dist/config/unrunnable-regexp.js +25 -0
  131. package/dist/config/unrunnable-regexp.js.map +1 -0
  132. package/dist/config/validate-config.d.ts.map +1 -1
  133. package/dist/config/validate-config.js +6 -21
  134. package/dist/config/validate-config.js.map +1 -1
  135. package/dist/index.d.ts +3 -3
  136. package/dist/index.d.ts.map +1 -1
  137. package/dist/index.js.map +1 -1
  138. package/dist/init/find-storybooks.d.ts +5 -0
  139. package/dist/init/find-storybooks.d.ts.map +1 -1
  140. package/dist/init/find-storybooks.js +8 -1
  141. package/dist/init/find-storybooks.js.map +1 -1
  142. package/dist/init/ignored-skill.d.ts +50 -0
  143. package/dist/init/ignored-skill.d.ts.map +1 -0
  144. package/dist/init/ignored-skill.js +61 -0
  145. package/dist/init/ignored-skill.js.map +1 -0
  146. package/dist/init/install.d.ts +24 -9
  147. package/dist/init/install.d.ts.map +1 -1
  148. package/dist/init/install.js +66 -26
  149. package/dist/init/install.js.map +1 -1
  150. package/dist/init/package-manager.d.ts +6 -0
  151. package/dist/init/package-manager.d.ts.map +1 -1
  152. package/dist/init/package-manager.js +4 -0
  153. package/dist/init/package-manager.js.map +1 -1
  154. package/dist/init/run-init.d.ts +17 -4
  155. package/dist/init/run-init.d.ts.map +1 -1
  156. package/dist/init/run-init.js +31 -11
  157. package/dist/init/run-init.js.map +1 -1
  158. package/dist/init/workspace.d.ts +2 -0
  159. package/dist/init/workspace.d.ts.map +1 -1
  160. package/dist/init/workspace.js +2 -0
  161. package/dist/init/workspace.js.map +1 -1
  162. package/dist/page-errors/judge-page-errors.d.ts +50 -0
  163. package/dist/page-errors/judge-page-errors.d.ts.map +1 -0
  164. package/dist/page-errors/judge-page-errors.js +39 -0
  165. package/dist/page-errors/judge-page-errors.js.map +1 -0
  166. package/dist/page-errors/page-error-policy.d.ts +36 -0
  167. package/dist/page-errors/page-error-policy.d.ts.map +1 -0
  168. package/dist/page-errors/page-error-policy.js +15 -0
  169. package/dist/page-errors/page-error-policy.js.map +1 -0
  170. package/dist/real-network-requests/judge-real-requests.d.ts +26 -0
  171. package/dist/real-network-requests/judge-real-requests.d.ts.map +1 -0
  172. package/dist/real-network-requests/judge-real-requests.js +17 -0
  173. package/dist/real-network-requests/judge-real-requests.js.map +1 -0
  174. package/dist/real-network-requests/real-request-policy.d.ts +29 -0
  175. package/dist/real-network-requests/real-request-policy.d.ts.map +1 -0
  176. package/dist/real-network-requests/real-request-policy.js +10 -0
  177. package/dist/real-network-requests/real-request-policy.js.map +1 -0
  178. package/dist/real-network-requests/silenced-hosts.d.ts +9 -0
  179. package/dist/real-network-requests/silenced-hosts.d.ts.map +1 -0
  180. package/dist/real-network-requests/silenced-hosts.js +28 -0
  181. package/dist/real-network-requests/silenced-hosts.js.map +1 -0
  182. package/dist/report/report-document.d.ts +154 -9
  183. package/dist/report/report-document.d.ts.map +1 -1
  184. package/dist/report/report-document.js +1 -1
  185. package/dist/report/report-document.js.map +1 -1
  186. package/dist/report/report-folder.d.ts +7 -3
  187. package/dist/report/report-folder.d.ts.map +1 -1
  188. package/dist/report/report-folder.js +5 -5
  189. package/dist/report/report-folder.js.map +1 -1
  190. package/dist/reporter/end-block.d.ts +32 -3
  191. package/dist/reporter/end-block.d.ts.map +1 -1
  192. package/dist/reporter/end-block.js +55 -3
  193. package/dist/reporter/end-block.js.map +1 -1
  194. package/dist/reporter/page-errors-block.d.ts +52 -0
  195. package/dist/reporter/page-errors-block.d.ts.map +1 -0
  196. package/dist/reporter/page-errors-block.js +98 -0
  197. package/dist/reporter/page-errors-block.js.map +1 -0
  198. package/dist/reporter/real-requests-block.d.ts +33 -0
  199. package/dist/reporter/real-requests-block.d.ts.map +1 -0
  200. package/dist/reporter/real-requests-block.js +53 -0
  201. package/dist/reporter/real-requests-block.js.map +1 -0
  202. package/dist/step-summary/step-summary.d.ts +27 -7
  203. package/dist/step-summary/step-summary.d.ts.map +1 -1
  204. package/dist/step-summary/step-summary.js +107 -15
  205. package/dist/step-summary/step-summary.js.map +1 -1
  206. package/dist/storybook/options-encoding.d.ts +18 -5
  207. package/dist/storybook/options-encoding.d.ts.map +1 -1
  208. package/dist/storybook/options-encoding.js +12 -4
  209. package/dist/storybook/options-encoding.js.map +1 -1
  210. package/dist/storybook/options-read.d.ts +3 -2
  211. package/dist/storybook/options-read.d.ts.map +1 -1
  212. package/dist/storybook/options-read.js +17 -0
  213. package/dist/storybook/options-read.js.map +1 -1
  214. package/dist/storybook/read-stories.d.ts +15 -0
  215. package/dist/storybook/read-stories.d.ts.map +1 -1
  216. package/dist/storybook/read-stories.js +60 -14
  217. package/dist/storybook/read-stories.js.map +1 -1
  218. package/package.json +2 -1
  219. package/skill/SKILL.md +25 -7
@@ -1 +1 @@
1
- {"version":3,"file":"page-script.js","sourceRoot":"","sources":["../../src/capture/page-script.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAA;AAC7F,OAAO,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAA;AA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,OAAO,CAAC;QACzB,OAAO,IAAI,CAAC,EACZ,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAA;IAC1D,CAAC;IAED,IACE,MAAM,CAAC,OAAO,KAAK,WAAW;QAC9B,MAAM,CAAC,IAAI,KAAK,OAAO;QACvB,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC;QAC3B,YAAY,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,EACtD,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,CAAC,GAAG,YAAY,CAAC,EAAE,CAAA;IACjF,CAAC;IAED,MAAM,IAAI,KAAK,CACb,uFAAuF,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAChH,CAAA;AACH,CAAC"}
@@ -84,6 +84,29 @@ export interface PageGrid {
84
84
  */
85
85
  height: number;
86
86
  }
87
+ /**
88
+ * The overflow of a story's page, as the capture preparation measures it: how far content the capture would cut reaches
89
+ * past each side of the capture, in CSS pixels, each rounded up, 0 on a side where nothing counts.
90
+ */
91
+ export interface PageOverflow {
92
+ /**
93
+ * How far the element reaches past the page's top edge, in CSS pixels.
94
+ */
95
+ top: number;
96
+ /**
97
+ * How far content reaches past the capture's right edge, in CSS pixels: the full page's content past the viewport's
98
+ * right edge, or the element's content past its border box's.
99
+ */
100
+ right: number;
101
+ /**
102
+ * How far the element's content spills past its border box's bottom edge, in CSS pixels.
103
+ */
104
+ bottom: number;
105
+ /**
106
+ * How far the element reaches past the page's left edge, in CSS pixels.
107
+ */
108
+ left: number;
109
+ }
87
110
  /**
88
111
  * The source of a function, evaluated in the page as part of the page script, that creates the capture preparation.
89
112
  * It takes what the page script kept at document start: `shadowRoots`, `findRemoteContent`, the remote content search,
@@ -100,7 +123,26 @@ export interface PageGrid {
100
123
  * whole pixels and cut at the page's edge: the left and top edges rounded down and kept at 0 or more, the right and
101
124
  * bottom edges kept within the document's scrollable area, read from its root element's `scrollWidth` and
102
125
  * `scrollHeight`, and rounded up. When that size can't be read, the right and bottom edges aren't cut. A box of zero
103
- * width or height, before or after that, or one that can't be read, gives `found: 'zero-size'`.
126
+ * width or height, before or after that, or one that can't be read, gives `found: 'zero-size'`. Then it measures
127
+ * the overflow, content the capture would cut, as how far it reaches past each side, in CSS pixels. For the full
128
+ * page, that's the right side only: the root element's `scrollWidth` less its `clientWidth`, unless the root
129
+ * element or `body` has a computed `overflow-x` of `hidden` or `clip`, as the page cuts that itself. The capture
130
+ * takes the content's full height, and content left of the page's edge can't be scrolled to. For the element, the
131
+ * left and top sides are how far its border box, with the page's scroll, reaches past the page's left and top
132
+ * edges, where its box is cut. The right side is how far its content spills past its border box's right edge,
133
+ * only when its computed `overflow-x` is `visible` and its `direction` is `ltr`, as a right-to-left element's
134
+ * `scrollWidth` counts content spilling left: the content's right edge is its border box's left edge, with the
135
+ * page's scroll, plus its `clientLeft` and its `scrollWidth`. Those are lengths of the element's own layout, so when
136
+ * its border box is drawn a whole pixel or more wider or narrower than its `offsetWidth`, as a transform or zoom
137
+ * draws it, they're scaled by the drawn width over `offsetWidth`. Both edges are kept within the document's
138
+ * scrollable area when its size can be read. The bottom side is the same with `overflow-y`, `clientTop`,
139
+ * `scrollHeight` and `offsetHeight`, whatever the direction. Chrome's `scrollWidth` and `scrollHeight` of an element that doesn't clip cover descendants
140
+ * spilling right or down, transformed or absolutely positioned ones included, but not `position: fixed` ones, the
141
+ * top layer or a `box-shadow`, and scrollable overflow never reaches left or up, so content spilling left or up
142
+ * from an element isn't measured. A side counts when it's at least one whole CSS pixel, as Chrome rounds
143
+ * `scrollWidth` and `clientWidth` to whole pixels, and is rounded up. A side whose values can't be read, or aren't
144
+ * finite, doesn't count, nor does the full page's when the root element's or `body`'s style can't be read. When the
145
+ * element is missing or a selector is invalid, there's no overflow.
104
146
  * 2. Finds the masks' boxes. A selector mask covers each element of the top document that matches it and has an
105
147
  * area, by its border box, with the page's scroll, not rounded. A selector that throws gives
106
148
  * `{ outcome: 'invalid-selector', of: 'mask', name, message }`. Then the remote content search runs once, with the
@@ -131,7 +173,8 @@ export interface PageGrid {
131
173
  * `findRemote` is true and the search answered, it adds `remote`, the remote content found, maybe none: each item's
132
174
  * `host`, with its port when the URL has one, and its box, `x`, `y`, `width` and `height`, in CSS pixels of the top
133
175
  * document, as the search gives them. Without `remote`, the remote content is unknown. When the top document shows a
134
- * grid, it adds `grid`, the widest grid's width and the tallest grid's height. When the element is missing, a
176
+ * grid, it adds `grid`, the widest grid's width and the tallest grid's height. When at least one side of the overflow
177
+ * counts, it adds `overflow`, `{ top, right, bottom, left }`, 0 on a side that doesn't. When the element is missing, a
135
178
  * selector is invalid or the search for a host mask timed out, it paints nothing and hides no caret. It never throws. A
136
179
  * mask must never fail open: when finding the masks' boxes or painting them throws, as when the search for a host mask
137
180
  * rejects or an element can't be created, it answers `{ outcome: 'paint-failed', message }` and hides no caret, with
@@ -139,7 +182,7 @@ export interface PageGrid {
139
182
  * be shown as a popover takes the highest `z-index`, as said above. Hiding the caret is best effort: a root that can't
140
183
  * adopt the sheet is left out, and it still answers `ready`.
141
184
  */
142
- export declare const prepareCaptureFunction = "(context) => {\n const { shadowRoots, findRemoteContent, stateGlobal } = context\n const { elementsOf, rootsOf, read, isObject, scrollOf, recordedRootsOf } = (() => {\n const read = (getter, fallback) => {\n try {\n return getter()\n } catch {\n return fallback\n }\n }\n\n const isObject = (value) => typeof value === 'object' && value !== null\n\n const scrollOf = (view, axis) => {\n const scroll = read(() => view[axis], 0)\n return Number.isFinite(scroll) ? scroll : 0\n }\n\n const elementsOf = (root, selector) => {\n try {\n return Array.from(root.querySelectorAll(selector))\n } catch {\n return []\n }\n }\n\n const openShadowRootOf = (element) => {\n const root = read(() => element.shadowRoot, undefined)\n return isObject(root) ? root : undefined\n }\n\n const rootsOf = (rootDocument, recordedRoots) => {\n const roots = new Set([rootDocument, ...recordedRoots])\n // A Set's iteration visits the roots added during it, so the open roots inside open roots are walked too.\n for (const root of roots) {\n for (const element of elementsOf(root, '*')) {\n const openRoot = openShadowRootOf(element)\n if (openRoot !== undefined) {\n roots.add(openRoot)\n }\n }\n }\n return roots\n }\n\n const recordedRootsOf = (frame, stateGlobal) => {\n const recorded = read(() => frame.contentWindow[stateGlobal].shadowRoots, undefined)\n return Array.isArray(recorded) ? recorded : []\n }\n\n return { elementsOf, rootsOf, read, isObject, scrollOf, recordedRootsOf }\n})()\n\n // The tag name of the element that holds the painted masks. An unknown name with a hyphen gives an HTMLElement.\n const masksTagName = 'visual-check-masks'\n\n // The attribute @visual-check/storybook's grid puts on its element, gridAttribute there. The CLI can't import that\n // package, so it's repeated here.\n const gridSelector = '[data-visual-check-grid]'\n\n // The highest z-index, for a host that couldn't go in the top layer.\n const topZIndex = 2147483647\n\n // The rule that hides the text caret on every element of a root.\n const caretRule = '*, *::before, *::after { caret-color: transparent !important; }'\n\n // The message of what a selector threw.\n const messageOf = (error) =>\n read(() => (isObject(error) && typeof error.message === 'string' ? error.message : String(error)), 'It threw.')\n\n // How far the top document is scrolled, 0 along an axis that can't be read.\n const pageScrollOf = () => {\n const view = read(() => document.defaultView, undefined)\n return { x: scrollOf(view, 'scrollX'), y: scrollOf(view, 'scrollY') }\n }\n\n // The widest grid's border-box width and the tallest grid's height, in CSS pixels, or undefined when the top document\n // shows no grid whose box can be read.\n const gridOf = () => {\n let grid\n for (const element of read(() => Array.from(document.querySelectorAll(gridSelector)), [])) {\n const rect = read(() => element.getBoundingClientRect(), undefined)\n const sides = read(() => [rect.width, rect.height], [])\n if (sides.length === 2 && sides.every((side) => Number.isFinite(side) && side >= 0)) {\n const [width, height] = sides\n grid =\n grid === undefined\n ? { width, height }\n : { width: Math.max(grid.width, width), height: Math.max(grid.height, height) }\n }\n }\n return grid\n }\n\n // The size of the top document's scrollable area, or undefined when it can't be read.\n const documentSizeOf = () => {\n const width = read(() => document.documentElement.scrollWidth, undefined)\n const height = read(() => document.documentElement.scrollHeight, undefined)\n const valid = (side) => typeof side === 'number' && Number.isFinite(side) && side >= 0\n return valid(width) && valid(height) ? { width, height } : undefined\n }\n\n // An element's border box, with the page's scroll, or undefined when it has no area or can't be read.\n const documentBoxOf = (element, scroll) => {\n const rect = read(() => element.getBoundingClientRect(), undefined)\n const sides = read(() => [rect.left, rect.top, rect.right, rect.bottom, rect.width, rect.height], [])\n if (sides.length === 0 || !sides.every(Number.isFinite) || rect.width <= 0 || rect.height <= 0) {\n return undefined\n }\n return {\n left: rect.left + scroll.x,\n top: rect.top + scroll.y,\n right: rect.right + scroll.x,\n bottom: rect.bottom + scroll.y,\n }\n }\n\n // The box of the element the selector matches first, out to whole pixels, or why there's none.\n const elementBoxOf = (selector, scroll) => {\n let element\n try {\n element = document.querySelector(selector)\n } catch (error) {\n return { outcome: 'invalid-selector', of: 'element', message: messageOf(error) }\n }\n if (!isObject(element)) {\n return { outcome: 'element-missing', found: 'nothing' }\n }\n const box = documentBoxOf(element, scroll)\n if (box === undefined) {\n return { outcome: 'element-missing', found: 'zero-size' }\n }\n const size = documentSizeOf()\n const x = Math.max(0, Math.floor(box.left))\n const y = Math.max(0, Math.floor(box.top))\n const right = Math.ceil(size === undefined ? box.right : Math.min(box.right, size.width))\n const bottom = Math.ceil(size === undefined ? box.bottom : Math.min(box.bottom, size.height))\n const width = right - x\n const height = bottom - y\n if (width <= 0 || height <= 0) {\n return { outcome: 'element-missing', found: 'zero-size' }\n }\n return { box: { x, y, width, height } }\n }\n\n // The boxes of the elements a selector mask covers, or why there are none.\n const selectorBoxesOf = (mask, scroll) => {\n let elements\n try {\n elements = Array.from(document.querySelectorAll(mask.selector))\n } catch (error) {\n return { outcome: 'invalid-selector', of: 'mask', name: mask.name, message: messageOf(error) }\n }\n return { boxes: elements.map((element) => documentBoxOf(element, scroll)).filter((box) => box !== undefined) }\n }\n\n // Runs the remote content search once, when a host mask or the request needs it, or gives undefined when neither\n // does. A search that rejects fails the host masks, as a mask must never fail open, and with no host mask leaves the\n // remote content unknown.\n const searchOnce = async (hostMasks, findRemote, timeoutMs) => {\n if (hostMasks.length === 0 && !findRemote) {\n return undefined\n }\n try {\n return await findRemoteContent(timeoutMs)\n } catch (error) {\n if (hostMasks.length > 0) {\n throw error\n }\n return undefined\n }\n }\n\n // The boxes of the remote content the host masks cover, or why there are none.\n const hostBoxesOf = (hostMasks, search) => {\n if (hostMasks.length === 0) {\n return { boxes: [] }\n }\n if (search.outcome === 'timed-out') {\n return { outcome: 'timed-out' }\n }\n const boxes = []\n for (const mask of hostMasks) {\n const host = mask.host.toLowerCase()\n for (const item of search.items) {\n if (item.host === host || item.hostname === host) {\n boxes.push({ left: item.x, top: item.y, right: item.x + item.width, bottom: item.y + item.height })\n }\n }\n }\n return { boxes }\n }\n\n // The remote content a search found, each item by its host and box, or undefined when it's unknown: no search ran,\n // it rejected or it timed out.\n const remoteOf = (search) => {\n if (search === undefined || search.outcome !== 'found') {\n return undefined\n }\n return search.items.map((item) => ({\n host: item.host,\n x: item.x,\n y: item.y,\n width: item.width,\n height: item.height,\n }))\n }\n\n // The boxes of every mask, selector masks first, with the remote content found when the request asks for it, or why\n // there are none.\n const maskBoxesOf = async (masks, scroll, findRemote, timeoutMs) => {\n const boxes = []\n for (const mask of masks) {\n if (typeof mask.selector === 'string') {\n const found = selectorBoxesOf(mask, scroll)\n if (found.outcome !== undefined) {\n return found\n }\n boxes.push(...found.boxes)\n }\n }\n const hostMasks = masks.filter((mask) => typeof mask.host === 'string')\n const search = await searchOnce(hostMasks, findRemote, timeoutMs)\n const found = hostBoxesOf(hostMasks, search)\n if (found.outcome !== undefined) {\n return found\n }\n return { boxes: [...boxes, ...found.boxes], remote: findRemote ? remoteOf(search) : undefined }\n }\n\n // The inline style of the element that holds the masks: a box at the document's origin, the size of its scrollable\n // area, clipping what's past it, or an empty box clipping nothing when that size can't be read.\n const hostStyleOf = (size) =>\n [\n 'all: initial !important',\n 'display: block !important',\n 'position: absolute !important',\n 'left: 0 !important',\n 'top: 0 !important',\n 'width: ' + (size === undefined ? 0 : size.width) + 'px !important',\n 'height: ' + (size === undefined ? 0 : size.height) + 'px !important',\n 'margin: 0 !important',\n 'padding: 0 !important',\n 'border: 0 !important',\n 'overflow: ' + (size === undefined ? 'visible' : 'clip') + ' !important',\n 'background: transparent !important',\n 'pointer-events: none !important',\n ].join('; ')\n\n // The inline style of a painted box.\n const maskStyleOf = (box, maskColor) =>\n [\n 'all: initial !important',\n 'display: block !important',\n 'position: absolute !important',\n 'left: ' + box.left + 'px !important',\n 'top: ' + box.top + 'px !important',\n 'width: ' + (box.right - box.left) + 'px !important',\n 'height: ' + (box.bottom - box.top) + 'px !important',\n 'background: ' + maskColor + ' !important',\n ].join('; ')\n\n // Paints the boxes in a manual popover, so they sit in the top layer, or over the page by z-index when it can't.\n const paint = (boxes, maskColor) => {\n if (boxes.length === 0) {\n return\n }\n const hostStyle = hostStyleOf(documentSizeOf())\n const host = document.createElement(masksTagName)\n host.setAttribute('popover', 'manual')\n host.style.cssText = hostStyle\n for (const box of boxes) {\n const mask = document.createElement('div')\n mask.style.cssText = maskStyleOf(box, maskColor)\n host.appendChild(mask)\n }\n document.documentElement.appendChild(host)\n try {\n host.showPopover()\n } catch {\n host.style.cssText = hostStyle + '; z-index: ' + topZIndex + ' !important'\n }\n }\n\n // Finds the masks' boxes and paints them, giving the remote content found when that's done, or why it couldn't be.\n // A mask unpainted would leave its content in the capture, so anything thrown here fails the preparation.\n const paintMasks = async (masks, maskColor, scroll, findRemote, timeoutMs) => {\n try {\n const found = await maskBoxesOf(masks, scroll, findRemote, timeoutMs)\n if (found.outcome !== undefined) {\n return found\n }\n paint(found.boxes, maskColor)\n return { remote: found.remote }\n } catch (error) {\n return { outcome: 'paint-failed', message: messageOf(error) }\n }\n }\n\n // Hides the caret in a document's roots with a sheet its own window made, then in the documents of its frames.\n const hideCaretIn = (hidden, recordedRoots) => {\n let sheet\n try {\n sheet = new hidden.defaultView.CSSStyleSheet()\n sheet.replaceSync(caretRule)\n } catch {\n return\n }\n for (const root of rootsOf(hidden, recordedRoots)) {\n try {\n root.adoptedStyleSheets = [...root.adoptedStyleSheets, sheet]\n } catch {}\n for (const frame of elementsOf(root, 'iframe, frame')) {\n const frameDocument = read(() => frame.contentDocument, null)\n if (isObject(frameDocument)) {\n hideCaretIn(frameDocument, recordedRootsOf(frame, stateGlobal))\n }\n }\n }\n }\n\n return async (request, timeoutMs) => {\n const { element, masks, maskColor, findRemote } = request\n const scroll = pageScrollOf()\n const grid = gridOf()\n const measured = element === null ? { box: null } : elementBoxOf(element, scroll)\n if (measured.outcome !== undefined) {\n return measured\n }\n const painted = await paintMasks(masks, maskColor, scroll, findRemote, timeoutMs)\n if (painted.outcome !== undefined) {\n return painted\n }\n try {\n hideCaretIn(document, shadowRoots)\n } catch {}\n const ready = { outcome: 'ready', box: measured.box }\n return {\n ...ready,\n ...(painted.remote === undefined ? {} : { remote: painted.remote }),\n ...(grid === undefined ? {} : { grid }),\n }\n }\n}";
185
+ export declare const prepareCaptureFunction = "(context) => {\n const { shadowRoots, findRemoteContent, stateGlobal } = context\n const { elementsOf, rootsOf, read, isObject, scrollOf, recordedRootsOf } = (() => {\n const read = (getter, fallback) => {\n try {\n return getter()\n } catch {\n return fallback\n }\n }\n\n const isObject = (value) => typeof value === 'object' && value !== null\n\n const scrollOf = (view, axis) => {\n const scroll = read(() => view[axis], 0)\n return Number.isFinite(scroll) ? scroll : 0\n }\n\n const elementsOf = (root, selector) => {\n try {\n return Array.from(root.querySelectorAll(selector))\n } catch {\n return []\n }\n }\n\n const openShadowRootOf = (element) => {\n const root = read(() => element.shadowRoot, undefined)\n return isObject(root) ? root : undefined\n }\n\n const rootsOf = (rootDocument, recordedRoots) => {\n const roots = new Set([rootDocument, ...recordedRoots])\n // A Set's iteration visits the roots added during it, so the open roots inside open roots are walked too.\n for (const root of roots) {\n for (const element of elementsOf(root, '*')) {\n const openRoot = openShadowRootOf(element)\n if (openRoot !== undefined) {\n roots.add(openRoot)\n }\n }\n }\n return roots\n }\n\n const recordedRootsOf = (frame, stateGlobal) => {\n const recorded = read(() => frame.contentWindow[stateGlobal].shadowRoots, undefined)\n return Array.isArray(recorded) ? recorded : []\n }\n\n return { elementsOf, rootsOf, read, isObject, scrollOf, recordedRootsOf }\n})()\n\n // The tag name of the element that holds the painted masks. An unknown name with a hyphen gives an HTMLElement.\n const masksTagName = 'visual-check-masks'\n\n // The attribute @visual-check/storybook's grid puts on its element, gridAttribute there. The CLI can't import that\n // package, so it's repeated here.\n const gridSelector = '[data-visual-check-grid]'\n\n // The highest z-index, for a host that couldn't go in the top layer.\n const topZIndex = 2147483647\n\n // The rule that hides the text caret on every element of a root.\n const caretRule = '*, *::before, *::after { caret-color: transparent !important; }'\n\n // The message of what a selector threw.\n const messageOf = (error) =>\n read(() => (isObject(error) && typeof error.message === 'string' ? error.message : String(error)), 'It threw.')\n\n // How far the top document is scrolled, 0 along an axis that can't be read.\n const pageScrollOf = () => {\n const view = read(() => document.defaultView, undefined)\n return { x: scrollOf(view, 'scrollX'), y: scrollOf(view, 'scrollY') }\n }\n\n // The widest grid's border-box width and the tallest grid's height, in CSS pixels, or undefined when the top document\n // shows no grid whose box can be read.\n const gridOf = () => {\n let grid\n for (const element of read(() => Array.from(document.querySelectorAll(gridSelector)), [])) {\n const rect = read(() => element.getBoundingClientRect(), undefined)\n const sides = read(() => [rect.width, rect.height], [])\n if (sides.length === 2 && sides.every((side) => Number.isFinite(side) && side >= 0)) {\n const [width, height] = sides\n grid =\n grid === undefined\n ? { width, height }\n : { width: Math.max(grid.width, width), height: Math.max(grid.height, height) }\n }\n }\n return grid\n }\n\n // The size of the top document's scrollable area, or undefined when it can't be read.\n const documentSizeOf = () => {\n const width = read(() => document.documentElement.scrollWidth, undefined)\n const height = read(() => document.documentElement.scrollHeight, undefined)\n const valid = (side) => typeof side === 'number' && Number.isFinite(side) && side >= 0\n return valid(width) && valid(height) ? { width, height } : undefined\n }\n\n // A number a getter reads, or undefined when it can't be read or isn't a finite number.\n const numberOf = (getter) => {\n const value = read(getter, undefined)\n return typeof value === 'number' && Number.isFinite(value) ? value : undefined\n }\n\n // The computed value of a CSS property of an element of the top document, or undefined when it can't be read.\n const computedOf = (element, property) => {\n const value = read(() => document.defaultView.getComputedStyle(element).getPropertyValue(property), undefined)\n return typeof value === 'string' ? value : undefined\n }\n\n // How far content reaches past a side of the capture, in CSS pixels: rounded up when it's at least one whole pixel,\n // and 0 when it's less or unknown, as Chrome rounds scrollWidth and clientWidth to whole pixels.\n const excessOf = (excess) =>\n typeof excess === 'number' && Number.isFinite(excess) && excess >= 1 ? Math.ceil(excess) : 0\n\n // The overflow on each side, or undefined when no side counts.\n const overflowOf = ({ top, right, bottom, left }) => {\n const overflow = { top: excessOf(top), right: excessOf(right), bottom: excessOf(bottom), left: excessOf(left) }\n return Object.values(overflow).some((side) => side > 0) ? overflow : undefined\n }\n\n // The full page's overflow: how far its content reaches past the viewport's right edge, or undefined when nothing\n // does, the root element or body clips it with overflow-x hidden or clip, or that can't be read.\n const pageOverflowOf = () => {\n const root = read(() => document.documentElement, undefined)\n const body = read(() => document.body, undefined)\n const clips = (element) => {\n const value = computedOf(element, 'overflow-x')\n return value === undefined || value === 'hidden' || value === 'clip'\n }\n if (!isObject(root) || [root, body].filter(isObject).some(clips)) {\n return undefined\n }\n const scrollWidth = numberOf(() => root.scrollWidth)\n const clientWidth = numberOf(() => root.clientWidth)\n if (scrollWidth === undefined || clientWidth === undefined) {\n return undefined\n }\n return overflowOf({ top: 0, right: scrollWidth - clientWidth, bottom: 0, left: 0 })\n }\n\n // Whether an element lets its content spill along an axis: its computed overflow on that axis is visible, and, along\n // x, its direction is ltr, as a right-to-left element's scrollWidth counts content spilling left.\n const spillsOn = (element, axis) =>\n computedOf(element, axis === 'x' ? 'overflow-x' : 'overflow-y') === 'visible' &&\n (axis === 'y' || computedOf(element, 'direction') === 'ltr')\n\n // How a length in an element's own layout maps to the document along an axis: its border box's drawn extent over its\n // layout size, offsetWidth or offsetHeight, when they differ by a whole pixel or more, as a transform or zoom makes\n // them, and 1 otherwise, as the layout size is rounded to whole pixels. Undefined when the layout size can't be read.\n const scaleOf = (element, axis, extent) => {\n const layout = numberOf(() => (axis === 'x' ? element.offsetWidth : element.offsetHeight))\n if (layout === undefined || layout <= 0) {\n return undefined\n }\n return Math.abs(extent - layout) < 1 ? 1 : extent / layout\n }\n\n // How far an element's content spills past its border box's far edge along an axis, from its border box's near and\n // far edges in document coordinates, or undefined when the element doesn't let it spill or it can't be read. The\n // content's end is clientLeft and scrollWidth past the near edge, or clientTop and scrollHeight, lengths of the\n // element's own layout, scaled to the document, so a transform or zoom neither makes a spill nor hides one. Both\n // ends are kept within the document's scrollable area, limit, when it's known.\n const spillOf = (element, axis, near, far, limit) => {\n if (!spillsOn(element, axis)) {\n return undefined\n }\n const border = numberOf(() => (axis === 'x' ? element.clientLeft : element.clientTop))\n const content = numberOf(() => (axis === 'x' ? element.scrollWidth : element.scrollHeight))\n const scale = scaleOf(element, axis, far - near)\n if (border === undefined || content === undefined || scale === undefined) {\n return undefined\n }\n const within = (end) => (limit === undefined ? end : Math.min(end, limit))\n return within(near + (border + content) * scale) - within(far)\n }\n\n // An element's overflow, from its border box in document coordinates, or undefined when no side counts.\n const elementOverflowOf = (element, box, size) =>\n overflowOf({\n top: -box.top,\n right: spillOf(element, 'x', box.left, box.right, size === undefined ? undefined : size.width),\n bottom: spillOf(element, 'y', box.top, box.bottom, size === undefined ? undefined : size.height),\n left: -box.left,\n })\n\n // An element's border box, with the page's scroll, or undefined when it has no area or can't be read.\n const documentBoxOf = (element, scroll) => {\n const rect = read(() => element.getBoundingClientRect(), undefined)\n const sides = read(() => [rect.left, rect.top, rect.right, rect.bottom, rect.width, rect.height], [])\n if (sides.length === 0 || !sides.every(Number.isFinite) || rect.width <= 0 || rect.height <= 0) {\n return undefined\n }\n return {\n left: rect.left + scroll.x,\n top: rect.top + scroll.y,\n right: rect.right + scroll.x,\n bottom: rect.bottom + scroll.y,\n }\n }\n\n // The box of the element the selector matches first, out to whole pixels, with its overflow when a side counts, or\n // why there's none.\n const elementBoxOf = (selector, scroll) => {\n let element\n try {\n element = document.querySelector(selector)\n } catch (error) {\n return { outcome: 'invalid-selector', of: 'element', message: messageOf(error) }\n }\n if (!isObject(element)) {\n return { outcome: 'element-missing', found: 'nothing' }\n }\n const box = documentBoxOf(element, scroll)\n if (box === undefined) {\n return { outcome: 'element-missing', found: 'zero-size' }\n }\n const size = documentSizeOf()\n const x = Math.max(0, Math.floor(box.left))\n const y = Math.max(0, Math.floor(box.top))\n const right = Math.ceil(size === undefined ? box.right : Math.min(box.right, size.width))\n const bottom = Math.ceil(size === undefined ? box.bottom : Math.min(box.bottom, size.height))\n const width = right - x\n const height = bottom - y\n if (width <= 0 || height <= 0) {\n return { outcome: 'element-missing', found: 'zero-size' }\n }\n return { box: { x, y, width, height }, overflow: elementOverflowOf(element, box, size) }\n }\n\n // The boxes of the elements a selector mask covers, or why there are none.\n const selectorBoxesOf = (mask, scroll) => {\n let elements\n try {\n elements = Array.from(document.querySelectorAll(mask.selector))\n } catch (error) {\n return { outcome: 'invalid-selector', of: 'mask', name: mask.name, message: messageOf(error) }\n }\n return { boxes: elements.map((element) => documentBoxOf(element, scroll)).filter((box) => box !== undefined) }\n }\n\n // Runs the remote content search once, when a host mask or the request needs it, or gives undefined when neither\n // does. A search that rejects fails the host masks, as a mask must never fail open, and with no host mask leaves the\n // remote content unknown.\n const searchOnce = async (hostMasks, findRemote, timeoutMs) => {\n if (hostMasks.length === 0 && !findRemote) {\n return undefined\n }\n try {\n return await findRemoteContent(timeoutMs)\n } catch (error) {\n if (hostMasks.length > 0) {\n throw error\n }\n return undefined\n }\n }\n\n // The boxes of the remote content the host masks cover, or why there are none.\n const hostBoxesOf = (hostMasks, search) => {\n if (hostMasks.length === 0) {\n return { boxes: [] }\n }\n if (search.outcome === 'timed-out') {\n return { outcome: 'timed-out' }\n }\n const boxes = []\n for (const mask of hostMasks) {\n const host = mask.host.toLowerCase()\n for (const item of search.items) {\n if (item.host === host || item.hostname === host) {\n boxes.push({ left: item.x, top: item.y, right: item.x + item.width, bottom: item.y + item.height })\n }\n }\n }\n return { boxes }\n }\n\n // The remote content a search found, each item by its host and box, or undefined when it's unknown: no search ran,\n // it rejected or it timed out.\n const remoteOf = (search) => {\n if (search === undefined || search.outcome !== 'found') {\n return undefined\n }\n return search.items.map((item) => ({\n host: item.host,\n x: item.x,\n y: item.y,\n width: item.width,\n height: item.height,\n }))\n }\n\n // The boxes of every mask, selector masks first, with the remote content found when the request asks for it, or why\n // there are none.\n const maskBoxesOf = async (masks, scroll, findRemote, timeoutMs) => {\n const boxes = []\n for (const mask of masks) {\n if (typeof mask.selector === 'string') {\n const found = selectorBoxesOf(mask, scroll)\n if (found.outcome !== undefined) {\n return found\n }\n boxes.push(...found.boxes)\n }\n }\n const hostMasks = masks.filter((mask) => typeof mask.host === 'string')\n const search = await searchOnce(hostMasks, findRemote, timeoutMs)\n const found = hostBoxesOf(hostMasks, search)\n if (found.outcome !== undefined) {\n return found\n }\n return { boxes: [...boxes, ...found.boxes], remote: findRemote ? remoteOf(search) : undefined }\n }\n\n // The inline style of the element that holds the masks: a box at the document's origin, the size of its scrollable\n // area, clipping what's past it, or an empty box clipping nothing when that size can't be read.\n const hostStyleOf = (size) =>\n [\n 'all: initial !important',\n 'display: block !important',\n 'position: absolute !important',\n 'left: 0 !important',\n 'top: 0 !important',\n 'width: ' + (size === undefined ? 0 : size.width) + 'px !important',\n 'height: ' + (size === undefined ? 0 : size.height) + 'px !important',\n 'margin: 0 !important',\n 'padding: 0 !important',\n 'border: 0 !important',\n 'overflow: ' + (size === undefined ? 'visible' : 'clip') + ' !important',\n 'background: transparent !important',\n 'pointer-events: none !important',\n ].join('; ')\n\n // The inline style of a painted box.\n const maskStyleOf = (box, maskColor) =>\n [\n 'all: initial !important',\n 'display: block !important',\n 'position: absolute !important',\n 'left: ' + box.left + 'px !important',\n 'top: ' + box.top + 'px !important',\n 'width: ' + (box.right - box.left) + 'px !important',\n 'height: ' + (box.bottom - box.top) + 'px !important',\n 'background: ' + maskColor + ' !important',\n ].join('; ')\n\n // Paints the boxes in a manual popover, so they sit in the top layer, or over the page by z-index when it can't.\n const paint = (boxes, maskColor) => {\n if (boxes.length === 0) {\n return\n }\n const hostStyle = hostStyleOf(documentSizeOf())\n const host = document.createElement(masksTagName)\n host.setAttribute('popover', 'manual')\n host.style.cssText = hostStyle\n for (const box of boxes) {\n const mask = document.createElement('div')\n mask.style.cssText = maskStyleOf(box, maskColor)\n host.appendChild(mask)\n }\n document.documentElement.appendChild(host)\n try {\n host.showPopover()\n } catch {\n host.style.cssText = hostStyle + '; z-index: ' + topZIndex + ' !important'\n }\n }\n\n // Finds the masks' boxes and paints them, giving the remote content found when that's done, or why it couldn't be.\n // A mask unpainted would leave its content in the capture, so anything thrown here fails the preparation.\n const paintMasks = async (masks, maskColor, scroll, findRemote, timeoutMs) => {\n try {\n const found = await maskBoxesOf(masks, scroll, findRemote, timeoutMs)\n if (found.outcome !== undefined) {\n return found\n }\n paint(found.boxes, maskColor)\n return { remote: found.remote }\n } catch (error) {\n return { outcome: 'paint-failed', message: messageOf(error) }\n }\n }\n\n // Hides the caret in a document's roots with a sheet its own window made, then in the documents of its frames.\n const hideCaretIn = (hidden, recordedRoots) => {\n let sheet\n try {\n sheet = new hidden.defaultView.CSSStyleSheet()\n sheet.replaceSync(caretRule)\n } catch {\n return\n }\n for (const root of rootsOf(hidden, recordedRoots)) {\n try {\n root.adoptedStyleSheets = [...root.adoptedStyleSheets, sheet]\n } catch {}\n for (const frame of elementsOf(root, 'iframe, frame')) {\n const frameDocument = read(() => frame.contentDocument, null)\n if (isObject(frameDocument)) {\n hideCaretIn(frameDocument, recordedRootsOf(frame, stateGlobal))\n }\n }\n }\n }\n\n return async (request, timeoutMs) => {\n const { element, masks, maskColor, findRemote } = request\n const scroll = pageScrollOf()\n const grid = gridOf()\n const measured = element === null ? { box: null, overflow: pageOverflowOf() } : elementBoxOf(element, scroll)\n if (measured.outcome !== undefined) {\n return measured\n }\n const painted = await paintMasks(masks, maskColor, scroll, findRemote, timeoutMs)\n if (painted.outcome !== undefined) {\n return painted\n }\n try {\n hideCaretIn(document, shadowRoots)\n } catch {}\n const ready = { outcome: 'ready', box: measured.box }\n return {\n ...ready,\n ...(painted.remote === undefined ? {} : { remote: painted.remote }),\n ...(grid === undefined ? {} : { grid }),\n ...(measured.overflow === undefined ? {} : { overflow: measured.overflow }),\n }\n }\n}";
143
186
  /**
144
187
  * What preparing the page for its capture found.
145
188
  */
@@ -161,6 +204,10 @@ export type CapturePrep = {
161
204
  * The grids the page shows, when it shows any: the widest grid's width and the tallest grid's height.
162
205
  */
163
206
  grid?: PageGrid;
207
+ /**
208
+ * The content the capture would cut, when at least one side counts: how far it reaches past each side.
209
+ */
210
+ overflow?: PageOverflow;
164
211
  } | {
165
212
  /**
166
213
  * The element selector matched no element with an area.
@@ -1 +1 @@
1
- {"version":3,"file":"prepare-capture.d.ts","sourceRoot":"","sources":["../../src/capture/prepare-capture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAGpD;;;;GAIG;AACH,MAAM,MAAM,SAAS,GACjB;IACE;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB,GACD;IACE;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAEL;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB;;OAEG;IACH,KAAK,EAAE,SAAS,SAAS,EAAE,CAAA;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,UAAU,EAA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,CAAA;CACrB,GACD;IACE;;OAEG;IACH,OAAO,EAAE,gBAAgB,CAAA;CAC1B,GACD;IACE;;OAEG;IACH,OAAO,EAAE,cAAc,CAAA;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAoJL;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAW3D"}
1
+ {"version":3,"file":"prepare-capture.d.ts","sourceRoot":"","sources":["../../src/capture/prepare-capture.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AAGpD;;;;GAIG;AACH,MAAM,MAAM,SAAS,GACjB;IACE;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;CACjB,GACD;IACE;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAEL;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB;;OAEG;IACH,KAAK,EAAE,SAAS,SAAS,EAAE,CAAA;IAC3B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,UAAU,EAAE,OAAO,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,CAAC,EAAE,MAAM,CAAA;IACT;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;C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AA;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AA4LL;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,CAW3D"}
@@ -15,7 +15,26 @@ import { pageRootsFunction } from './page-roots.js';
15
15
  * whole pixels and cut at the page's edge: the left and top edges rounded down and kept at 0 or more, the right and
16
16
  * bottom edges kept within the document's scrollable area, read from its root element's `scrollWidth` and
17
17
  * `scrollHeight`, and rounded up. When that size can't be read, the right and bottom edges aren't cut. A box of zero
18
- * width or height, before or after that, or one that can't be read, gives `found: 'zero-size'`.
18
+ * width or height, before or after that, or one that can't be read, gives `found: 'zero-size'`. Then it measures
19
+ * the overflow, content the capture would cut, as how far it reaches past each side, in CSS pixels. For the full
20
+ * page, that's the right side only: the root element's `scrollWidth` less its `clientWidth`, unless the root
21
+ * element or `body` has a computed `overflow-x` of `hidden` or `clip`, as the page cuts that itself. The capture
22
+ * takes the content's full height, and content left of the page's edge can't be scrolled to. For the element, the
23
+ * left and top sides are how far its border box, with the page's scroll, reaches past the page's left and top
24
+ * edges, where its box is cut. The right side is how far its content spills past its border box's right edge,
25
+ * only when its computed `overflow-x` is `visible` and its `direction` is `ltr`, as a right-to-left element's
26
+ * `scrollWidth` counts content spilling left: the content's right edge is its border box's left edge, with the
27
+ * page's scroll, plus its `clientLeft` and its `scrollWidth`. Those are lengths of the element's own layout, so when
28
+ * its border box is drawn a whole pixel or more wider or narrower than its `offsetWidth`, as a transform or zoom
29
+ * draws it, they're scaled by the drawn width over `offsetWidth`. Both edges are kept within the document's
30
+ * scrollable area when its size can be read. The bottom side is the same with `overflow-y`, `clientTop`,
31
+ * `scrollHeight` and `offsetHeight`, whatever the direction. Chrome's `scrollWidth` and `scrollHeight` of an element that doesn't clip cover descendants
32
+ * spilling right or down, transformed or absolutely positioned ones included, but not `position: fixed` ones, the
33
+ * top layer or a `box-shadow`, and scrollable overflow never reaches left or up, so content spilling left or up
34
+ * from an element isn't measured. A side counts when it's at least one whole CSS pixel, as Chrome rounds
35
+ * `scrollWidth` and `clientWidth` to whole pixels, and is rounded up. A side whose values can't be read, or aren't
36
+ * finite, doesn't count, nor does the full page's when the root element's or `body`'s style can't be read. When the
37
+ * element is missing or a selector is invalid, there's no overflow.
19
38
  * 2. Finds the masks' boxes. A selector mask covers each element of the top document that matches it and has an
20
39
  * area, by its border box, with the page's scroll, not rounded. A selector that throws gives
21
40
  * `{ outcome: 'invalid-selector', of: 'mask', name, message }`. Then the remote content search runs once, with the
@@ -46,7 +65,8 @@ import { pageRootsFunction } from './page-roots.js';
46
65
  * `findRemote` is true and the search answered, it adds `remote`, the remote content found, maybe none: each item's
47
66
  * `host`, with its port when the URL has one, and its box, `x`, `y`, `width` and `height`, in CSS pixels of the top
48
67
  * document, as the search gives them. Without `remote`, the remote content is unknown. When the top document shows a
49
- * grid, it adds `grid`, the widest grid's width and the tallest grid's height. When the element is missing, a
68
+ * grid, it adds `grid`, the widest grid's width and the tallest grid's height. When at least one side of the overflow
69
+ * counts, it adds `overflow`, `{ top, right, bottom, left }`, 0 on a side that doesn't. When the element is missing, a
50
70
  * selector is invalid or the search for a host mask timed out, it paints nothing and hides no caret. It never throws. A
51
71
  * mask must never fail open: when finding the masks' boxes or painting them throws, as when the search for a host mask
52
72
  * rejects or an element can't be created, it answers `{ outcome: 'paint-failed', message }` and hides no caret, with
@@ -107,6 +127,94 @@ export const prepareCaptureFunction = `(context) => {
107
127
  return valid(width) && valid(height) ? { width, height } : undefined
108
128
  }
109
129
 
130
+ // A number a getter reads, or undefined when it can't be read or isn't a finite number.
131
+ const numberOf = (getter) => {
132
+ const value = read(getter, undefined)
133
+ return typeof value === 'number' && Number.isFinite(value) ? value : undefined
134
+ }
135
+
136
+ // The computed value of a CSS property of an element of the top document, or undefined when it can't be read.
137
+ const computedOf = (element, property) => {
138
+ const value = read(() => document.defaultView.getComputedStyle(element).getPropertyValue(property), undefined)
139
+ return typeof value === 'string' ? value : undefined
140
+ }
141
+
142
+ // How far content reaches past a side of the capture, in CSS pixels: rounded up when it's at least one whole pixel,
143
+ // and 0 when it's less or unknown, as Chrome rounds scrollWidth and clientWidth to whole pixels.
144
+ const excessOf = (excess) =>
145
+ typeof excess === 'number' && Number.isFinite(excess) && excess >= 1 ? Math.ceil(excess) : 0
146
+
147
+ // The overflow on each side, or undefined when no side counts.
148
+ const overflowOf = ({ top, right, bottom, left }) => {
149
+ const overflow = { top: excessOf(top), right: excessOf(right), bottom: excessOf(bottom), left: excessOf(left) }
150
+ return Object.values(overflow).some((side) => side > 0) ? overflow : undefined
151
+ }
152
+
153
+ // The full page's overflow: how far its content reaches past the viewport's right edge, or undefined when nothing
154
+ // does, the root element or body clips it with overflow-x hidden or clip, or that can't be read.
155
+ const pageOverflowOf = () => {
156
+ const root = read(() => document.documentElement, undefined)
157
+ const body = read(() => document.body, undefined)
158
+ const clips = (element) => {
159
+ const value = computedOf(element, 'overflow-x')
160
+ return value === undefined || value === 'hidden' || value === 'clip'
161
+ }
162
+ if (!isObject(root) || [root, body].filter(isObject).some(clips)) {
163
+ return undefined
164
+ }
165
+ const scrollWidth = numberOf(() => root.scrollWidth)
166
+ const clientWidth = numberOf(() => root.clientWidth)
167
+ if (scrollWidth === undefined || clientWidth === undefined) {
168
+ return undefined
169
+ }
170
+ return overflowOf({ top: 0, right: scrollWidth - clientWidth, bottom: 0, left: 0 })
171
+ }
172
+
173
+ // Whether an element lets its content spill along an axis: its computed overflow on that axis is visible, and, along
174
+ // x, its direction is ltr, as a right-to-left element's scrollWidth counts content spilling left.
175
+ const spillsOn = (element, axis) =>
176
+ computedOf(element, axis === 'x' ? 'overflow-x' : 'overflow-y') === 'visible' &&
177
+ (axis === 'y' || computedOf(element, 'direction') === 'ltr')
178
+
179
+ // How a length in an element's own layout maps to the document along an axis: its border box's drawn extent over its
180
+ // layout size, offsetWidth or offsetHeight, when they differ by a whole pixel or more, as a transform or zoom makes
181
+ // them, and 1 otherwise, as the layout size is rounded to whole pixels. Undefined when the layout size can't be read.
182
+ const scaleOf = (element, axis, extent) => {
183
+ const layout = numberOf(() => (axis === 'x' ? element.offsetWidth : element.offsetHeight))
184
+ if (layout === undefined || layout <= 0) {
185
+ return undefined
186
+ }
187
+ return Math.abs(extent - layout) < 1 ? 1 : extent / layout
188
+ }
189
+
190
+ // How far an element's content spills past its border box's far edge along an axis, from its border box's near and
191
+ // far edges in document coordinates, or undefined when the element doesn't let it spill or it can't be read. The
192
+ // content's end is clientLeft and scrollWidth past the near edge, or clientTop and scrollHeight, lengths of the
193
+ // element's own layout, scaled to the document, so a transform or zoom neither makes a spill nor hides one. Both
194
+ // ends are kept within the document's scrollable area, limit, when it's known.
195
+ const spillOf = (element, axis, near, far, limit) => {
196
+ if (!spillsOn(element, axis)) {
197
+ return undefined
198
+ }
199
+ const border = numberOf(() => (axis === 'x' ? element.clientLeft : element.clientTop))
200
+ const content = numberOf(() => (axis === 'x' ? element.scrollWidth : element.scrollHeight))
201
+ const scale = scaleOf(element, axis, far - near)
202
+ if (border === undefined || content === undefined || scale === undefined) {
203
+ return undefined
204
+ }
205
+ const within = (end) => (limit === undefined ? end : Math.min(end, limit))
206
+ return within(near + (border + content) * scale) - within(far)
207
+ }
208
+
209
+ // An element's overflow, from its border box in document coordinates, or undefined when no side counts.
210
+ const elementOverflowOf = (element, box, size) =>
211
+ overflowOf({
212
+ top: -box.top,
213
+ right: spillOf(element, 'x', box.left, box.right, size === undefined ? undefined : size.width),
214
+ bottom: spillOf(element, 'y', box.top, box.bottom, size === undefined ? undefined : size.height),
215
+ left: -box.left,
216
+ })
217
+
110
218
  // An element's border box, with the page's scroll, or undefined when it has no area or can't be read.
111
219
  const documentBoxOf = (element, scroll) => {
112
220
  const rect = read(() => element.getBoundingClientRect(), undefined)
@@ -122,7 +230,8 @@ export const prepareCaptureFunction = `(context) => {
122
230
  }
123
231
  }
124
232
 
125
- // The box of the element the selector matches first, out to whole pixels, or why there's none.
233
+ // The box of the element the selector matches first, out to whole pixels, with its overflow when a side counts, or
234
+ // why there's none.
126
235
  const elementBoxOf = (selector, scroll) => {
127
236
  let element
128
237
  try {
@@ -147,7 +256,7 @@ export const prepareCaptureFunction = `(context) => {
147
256
  if (width <= 0 || height <= 0) {
148
257
  return { outcome: 'element-missing', found: 'zero-size' }
149
258
  }
150
- return { box: { x, y, width, height } }
259
+ return { box: { x, y, width, height }, overflow: elementOverflowOf(element, box, size) }
151
260
  }
152
261
 
153
262
  // The boxes of the elements a selector mask covers, or why there are none.
@@ -330,7 +439,7 @@ export const prepareCaptureFunction = `(context) => {
330
439
  const { element, masks, maskColor, findRemote } = request
331
440
  const scroll = pageScrollOf()
332
441
  const grid = gridOf()
333
- const measured = element === null ? { box: null } : elementBoxOf(element, scroll)
442
+ const measured = element === null ? { box: null, overflow: pageOverflowOf() } : elementBoxOf(element, scroll)
334
443
  if (measured.outcome !== undefined) {
335
444
  return measured
336
445
  }
@@ -346,6 +455,7 @@ export const prepareCaptureFunction = `(context) => {
346
455
  ...ready,
347
456
  ...(painted.remote === undefined ? {} : { remote: painted.remote }),
348
457
  ...(grid === undefined ? {} : { grid }),
458
+ ...(measured.overflow === undefined ? {} : { overflow: measured.overflow }),
349
459
  }
350
460
  }
351
461
  }`;
@@ -409,27 +519,58 @@ function readGrid(value) {
409
519
  return [width, height].every((side) => Number.isFinite(side) && side >= 0) ? { grid: { width, height } } : undefined;
410
520
  }
411
521
  /**
412
- * Reads an answer of the page that's ready, with the element's box or none, and the remote content and the grids when
413
- * it gives them. Gives `undefined` for any other answer.
522
+ * Reads the overflow the page gives with an answer that's ready, keeping its four sides only. Gives
523
+ * `{ overflow: undefined }` when there's none, and `undefined` when it's not four finite sides of 0 or more.
414
524
  */
415
- function readReady(answer) {
416
- const { box } = answer;
525
+ function readOverflow(value) {
526
+ if (value === undefined) {
527
+ return { overflow: undefined };
528
+ }
529
+ if (typeof value !== 'object' || value === null) {
530
+ return undefined;
531
+ }
532
+ const { top, right, bottom, left } = { ...value };
533
+ if (typeof top !== 'number' || typeof right !== 'number' || typeof bottom !== 'number' || typeof left !== 'number') {
534
+ return undefined;
535
+ }
536
+ return [top, right, bottom, left].every((side) => Number.isFinite(side) && side >= 0)
537
+ ? { overflow: { top, right, bottom, left } }
538
+ : undefined;
539
+ }
540
+ /**
541
+ * Reads what the page gives besides the box with an answer that's ready: the remote content, the grids and the
542
+ * overflow, each only when the page gives it. Gives `undefined` when any of them isn't what the page gives.
543
+ */
544
+ function readExtras(answer) {
417
545
  const read = readRemote(answer.remote);
418
546
  const readGrids = readGrid(answer.grid);
419
- if (answer.outcome !== 'ready' || read === undefined || readGrids === undefined) {
547
+ const readOverflows = readOverflow(answer.overflow);
548
+ if (read === undefined || readGrids === undefined || readOverflows === undefined) {
549
+ return undefined;
550
+ }
551
+ return {
552
+ ...(read.remote === undefined ? {} : { remote: read.remote }),
553
+ ...(readGrids.grid === undefined ? {} : { grid: readGrids.grid }),
554
+ ...(readOverflows.overflow === undefined ? {} : { overflow: readOverflows.overflow }),
555
+ };
556
+ }
557
+ /**
558
+ * Reads an answer of the page that's ready, with the element's box or none, and the remote content, the grids and the
559
+ * overflow when it gives them. Gives `undefined` for any other answer.
560
+ */
561
+ function readReady(answer) {
562
+ const { box } = answer;
563
+ const extras = readExtras(answer);
564
+ if (answer.outcome !== 'ready' || extras === undefined) {
420
565
  return undefined;
421
566
  }
422
567
  if (box !== null && !isCaptureBox(box)) {
423
568
  return undefined;
424
569
  }
425
- const ready = {
570
+ return {
426
571
  outcome: 'ready',
427
572
  box: box === null ? null : { x: box.x, y: box.y, width: box.width, height: box.height },
428
- };
429
- return {
430
- ...ready,
431
- ...(read.remote === undefined ? {} : { remote: read.remote }),
432
- ...(readGrids.grid === undefined ? {} : { grid: readGrids.grid }),
573
+ ...extras,
433
574
  };
434
575
  }
435
576
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"prepare-capture.js","sourceRoot":"","sources":["../../src/capture/prepare-capture.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iB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59,10 +59,11 @@ interface UnreachableStorybook {
59
59
  url: string;
60
60
  }
61
61
  /**
62
- * Checks every Storybook in the run: the version of its installed `storybook`, then its stories from `index.json`.
63
- * Each Storybook that passes comes back with both. Every Storybook is checked, and every problem is reported, in
64
- * config order, with the Storybooks where nothing answers, by name and URL. With several Storybooks in the run and one
65
- * of them unreachable, the problems end with a line that suggests `--storybook`.
62
+ * Checks every Storybook in the run: the version of its installed `storybook`, then its stories from `index.json`, then
63
+ * that its story page doesn't redirect. Each Storybook that passes comes back with its version and stories. Every
64
+ * Storybook is checked, and every problem is reported, in config order, with the Storybooks where nothing answers, by
65
+ * name and URL. With several Storybooks in the run and one of them unreachable, the problems end with a line that
66
+ * suggests `--storybook`.
66
67
  *
67
68
  * @throws {Error} When a check fails in a way that isn't a Storybook's problem.
68
69
  */
@@ -1 +1 @@
1
- {"version":3,"file":"check-storybooks.d.ts","sourceRoot":"","sources":["../../src/commands/check-storybooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,KAAK,EAAE,MAAM,8BAA8B,CAAA;AAItE;;GAEG;AACH,UAAU,cAAc;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;CACZ;AAED;;GAEG;AACH,UAAU,gBAAgB,CAAC,CAAC,SAAS,cAAc;IACjD;;OAEG;IACH,SAAS,EAAE,CAAC,CAAA;IACZ;;OAEG;IACH,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B;;OAEG;IACH,OAAO,EAAE,KAAK,EAAE,CAAA;CACjB;AAED;;;GAGG;AACH,KAAK,eAAe,CAAC,CAAC,SAAS,cAAc,IACzC;IAAE,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAE,GACzD;IAAE,QAAQ,EAAE,MAAM,EAAE,CAAC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AEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;CACZ;AAqCD;;;;;;;;GAQG;AACH,wBAAsB,eAAe,CAAC,CAAC,SAAS,cAAc,EAC5D,UAAU,EAAE,CAAC,EAAE,EACf,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAwB7B"}
@@ -1,16 +1,18 @@
1
- import { readStories } from '../storybook/read-stories.js';
1
+ import { checkStoryPage, readStories } from '../storybook/read-stories.js';
2
2
  import { StorybookError, StorybookUnreachableError } from '../storybook/storybook-error.js';
3
3
  import { checkStorybookVersion } from '../storybook/storybook-version.js';
4
4
  /**
5
- * Checks one Storybook's version, then reads its stories. A version that is too old is the Storybook's problem, and
6
- * its `index.json` isn't read. A Storybook's own error becomes a problem; any other error is thrown.
5
+ * Checks one Storybook's version, then reads its stories, then checks that its story page doesn't redirect. A version
6
+ * that is too old is the Storybook's problem, and its `index.json` isn't read. A Storybook's own error becomes a problem; any other error is thrown.
7
7
  */
8
8
  async function checkOneStorybook(storybook, cwd) {
9
9
  let warning;
10
10
  try {
11
11
  const check = checkStorybookVersion(storybook, cwd);
12
12
  warning = check.warning;
13
- return { storybook, version: check.version, stories: await readStories(storybook, cwd), warning };
13
+ const stories = await readStories(storybook, cwd);
14
+ await checkStoryPage(storybook);
15
+ return { storybook, version: check.version, stories, warning };
14
16
  }
15
17
  catch (error) {
16
18
  if (error instanceof StorybookError) {
@@ -20,10 +22,11 @@ async function checkOneStorybook(storybook, cwd) {
20
22
  }
21
23
  }
22
24
  /**
23
- * Checks every Storybook in the run: the version of its installed `storybook`, then its stories from `index.json`.
24
- * Each Storybook that passes comes back with both. Every Storybook is checked, and every problem is reported, in
25
- * config order, with the Storybooks where nothing answers, by name and URL. With several Storybooks in the run and one
26
- * of them unreachable, the problems end with a line that suggests `--storybook`.
25
+ * Checks every Storybook in the run: the version of its installed `storybook`, then its stories from `index.json`, then
26
+ * that its story page doesn't redirect. Each Storybook that passes comes back with its version and stories. Every
27
+ * Storybook is checked, and every problem is reported, in config order, with the Storybooks where nothing answers, by
28
+ * name and URL. With several Storybooks in the run and one of them unreachable, the problems end with a line that
29
+ * suggests `--storybook`.
27
30
  *
28
31
  * @throws {Error} When a check fails in a way that isn't a Storybook's problem.
29
32
  */
@@ -1 +1 @@
1
- {"version":3,"file":"check-storybooks.js","sourceRoot":"","sources":["../../src/commands/check-storybooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAc,MAAM,8BAA8B,CAAA;AACtE,OAAO,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAA;AAC3F,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AAqEzE;;;GAGG;AACH,KAAK,UAAU,iBAAiB,CAA2B,SAAY,EAAE,GAAW;IAClF,IAAI,OAA2B,CAAA;IAE/B,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,qBAAqB,CAAC,SAAS,EAAE,GAAG,CAAC,CAAA;QAEnD,OAAO,GAAG,KAAK,CAAC,OAAO,CAAA;QAEvB,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC,SAAS,EAAE,GAAG,CAAC,EAAE,OAAO,EAAE,CAAA;IACnG,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,cAAc,EAAE,CAAC;YACpC,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,WAAW,EAAE,KAAK,YAAY,yBAAyB,EAAE,OAAO,EAAE,CAAA;QAChH,CAAC;QAED,MAAM,KAAK,CAAA;IACb,CAAC;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,UAAe,EACf,GAAW;IAEX,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GA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ency-output.d.ts","sourceRoot":"","sources":["../../src/commands/consistency-output.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAgB,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AACrG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1D,OAAO,EAAmC,KAAK,cAAc,EAAuB,MAAM,sBAAsB,CAAA;AAEhH;;GAEG;AACH,UAAU,WAAW;IACnB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,OAAO,EAAE,SAAS,eAAe,EAAE,CAAA;IACnC;;OAEG;IACH,KAAK,EAAE,gBAAgB,CAAA;CACxB;AAED;;GAEG;AACH,UAAU,iBAAiB;IACzB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB;;OAEG;IACH,OAAO,EAAE,cAAc,EAAE,CAAA;CAC1B;AAOD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,EAAE,CAQ9F;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,WAAW,GAAG,iBAAiB,CA6BpG"}
1
+ {"version":3,"file":"consistency-output.d.ts","sourceRoot":"","sources":["../../src/commands/consistency-output.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,gBAAgB,EAAgB,KAAK,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AACrG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAA;AAE1D,OAAO,EAGL,KAAK,cAAc,EAGpB,MAAM,sBAAsB,CAAA;AAE7B;;GAEG;AACH,UAAU,WAAW;IACnB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,OAAO,EAAE,SAAS,eAAe,EAAE,CAAA;IACnC;;OAEG;IACH,KAAK,EAAE,gBAAgB,CAAA;CACxB;AAED;;GAEG;AACH,UAAU,iBAAiB;IACzB;;OAEG;IACH,UAAU,EAAE,OAAO,CAAA;IACnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,KAAK,EAAE,eAAe,EAAE,CAAA;IACxB;;OAEG;IACH,OAAO,EAAE,cAAc,EAAE,CAAA;CAC1B;AAOD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,kBAAkB,EAAE,GAAG,MAAM,EAAE,CAQ9F;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,WAAW,GAAG,iBAAiB,CA6BpG"}
@@ -4,7 +4,7 @@ import { displayPathOf } from '../report/display-path.js';
4
4
  import { countsLineOf, orphanLabelOf } from '../reporter/counts-line.js';
5
5
  import { isConsistent } from './consistency-check.js';
6
6
  import { failMark, snapshotCountOf, snapshotLineOf } from './run-output.js';
7
- import { brokenResultOf, missingResultOf } from './snapshot-result.js';
7
+ import { brokenResultOf, missingResultOf, withNothingJudged, } from './snapshot-result.js';
8
8
  /**
9
9
  * The line that ends the consistency output when the check found nothing.
10
10
  */
@@ -29,9 +29,9 @@ export function orphanLinesOf(cwd, storybooks) {
29
29
  export function consistencyOutputOf({ version, cwd, planned, check }) {
30
30
  const findings = planned.flatMap((item) => {
31
31
  if ('broken' in item) {
32
- return [{ item, result: brokenResultOf(item.broken, { attempts: 0 }) }];
32
+ return [{ item, result: withNothingJudged(brokenResultOf(item.broken, { attempts: 0 })) }];
33
33
  }
34
- return check.missing.has(item) ? [{ item, result: missingResultOf() }] : [];
34
+ return check.missing.has(item) ? [{ item, result: withNothingJudged(missingResultOf()) }] : [];
35
35
  });
36
36
  const results = findings.map(({ result }) => result);
37
37
  const orphanLines = orphanLinesOf(cwd, check.storybooks);
@@ -1 +1 @@
1
- {"version":3,"file":"consistency-output.js","sourceRoot":"","sources":["../../src/commands/consistency-output.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAA;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AACxE,OAAO,EAAyB,YAAY,EAA2B,MAAM,wBAAwB,CAAA;AAErG,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAC3E,OAAO,EAAE,cAAc,EAAE,eAAe,EAA4C,MAAM,sBAAsB,CAAA;AA+ChH;;GAEG;AACH,MAAM,cAAc,GAAG,kFAAkF,CAAA;AAEzG;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,GAAW,EAAE,UAAyC;IAClF,OAAO,UAAU,CAAC,OAAO,CAAC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,CACnD,OAAO,CAAC,GAAG,CACT,CAAC,IAAI,EAAE,EAAE,CACP,GAAG,QAAQ,IAAI,SAAS,CAAC,IAAI,KAAK,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,+BAA+B;QAC/F,GAAG,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,wCAAwC,CACtE,CACF,CAAA;AACH,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,mBAAmB,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAe;IAC/E,MAAM,QA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WAAW,CAAC,MAAM,CAAC;KAC/C,CAAA;IACV,MAAM,UAAU,GAAG,YAAY,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IAC/C,MAAM,KAAK,GAAG;QACZ,gBAAgB,OAAO,2BAA2B,eAAe,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;QACnF,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACnE,GAAG,WAAW;QACd,UAAU,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC;KACnD,CAAA;IAED,OAAO;QACL,UAAU;QACV,MAAM,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;QACjD,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC;QACvC,OAAO;KACR,CAAA;AACH,CAAC;AAED;;GAEG;AACH,SAAS,OAAO,CAAC,OAAkC,EAAE,MAAsB;IACzE,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,MAAM,CAAA;AACpE,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Gives the hint for a broken story whose page couldn't load some of Storybook's own files, in one line, for the report
3
+ * and `test`'s end block: the server dropped the connection, which a server that can't take many connections at once
4
+ * does under parallel workers, what to serve the build with instead, and the CI docs page.
5
+ */
6
+ export declare function failedLoadsHintMessageOf(): string;
7
+ //# sourceMappingURL=failed-loads-hint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"failed-loads-hint.d.ts","sourceRoot":"","sources":["../../src/commands/failed-loads-hint.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,wBAAgB,wBAAwB,IAAI,MAAM,CAMjD"}