shots: app titles get the weights the templates use (variable axis, used range or static weights; font-weight warning), palette.bg as one colour or a CSS gradient string (validated; contrast guard in shots check), photo backgrounds (palette.image, shots.feature.background) with overlay and cover crop

This commit is contained in:
CRTkafa 2026-10-20 13:37:37 +07:00
parent 2ba8278ab7
commit 3a11682a37
21 changed files with 713 additions and 44 deletions

View file

@ -7,6 +7,15 @@
- **`shots capture` / `render` find Playwright's chromium in a project's CommonJS playwright** whether it comes on the
namespace or under `default`; when the module has no `chromium.launch`, the error names the resolved file and its
exports (was "Cannot read properties of undefined (reading 'launch')").
- **Heavy app-style headlines again:** `shots fonts` downloads the weights the templates use (the full `wght` axis of a
variable Google family, else the used range, else the static weights), so a family like Plus Jakarta Sans no longer
falls back to its thin 400 instance. `shots fonts` warns about weights a family or a local file (`{ weight }`) lacks;
`shots check` warns per image when a title was drawn at another weight (`font-weight`).
- **palette.bg as a string:** one colour (flat) or a CSS gradient string now renders as given instead of a white
background; anything else fails config validation ("palette.bg must be a colour, a gradient or an array of 2-3
colours"). `shots check` warns when the title ink has low contrast against the pixels behind it (`contrast`).
- **Photo backgrounds:** `palette.image` (+ `overlay`) and `shots.feature.background` put a cover-cropped photo under a
dark overlay (the Play feature graphic, optionally the screenshots); `shots check` checks the file and its size.
## 0.8.18 · 2026-10-20