* Story definitions. `playInteraction` is a Playwright callback that replicates * the Storybook play function for stories that require user interaction before * the screenshot is taken.
| 58 | * the screenshot is taken. |
| 59 | */ |
| 60 | interface StoryDef { |
| 61 | exportName: string; |
| 62 | storyId: string; |
| 63 | outputFile: string; |
| 64 | /** Optional crop region in CSS pixels for focused README screenshots. */ |
| 65 | clip?: { x: number; y: number; width: number; height: number }; |
| 66 | /** Optional per-story viewport override (CSS pixels). Defaults to global VIEWPORT. */ |
| 67 | viewport?: { width: number; height: number }; |
| 68 | /** Optional context overrides for device-specific stories (mobile touch/user-agent). */ |
| 69 | contextOptions?: BrowserContextOptions; |
| 70 | /** Replicate the Storybook play function via Playwright interactions. */ |
| 71 | playInteraction?: (page: Page) => Promise<void>; |
| 72 | /** Custom Sharp post-processing instead of the default full-page → WebP conversion. */ |
| 73 | postProcess?: (pngBuffer: Buffer) => Promise<Buffer>; |
| 74 | } |
| 75 | |
| 76 | const STORIES: StoryDef[] = [ |
| 77 | // README hero uses mux-demo.gif; screenshot captures start at code-review.webp. |
nothing calls this directly
no outgoing calls
no test coverage detected