Files
pastilhasandClaude Opus 5 5968cb5d83 each row picks its own main image, and frames it
The shape is one decision for the whole section and stays on the template — every
collab is a 21:9 band or none of them is. Which part of THIS photograph survives
that shape is a decision about this photograph, and there is one per row. A single
rectangle chosen against one lead and applied to all of them is how a portrait
ends up cropped through somebody's head, which is what the block-level crop did
and why it is gone.

So a row's settings now carry Main image: a picture and a cropping frame in the
proportions the page asked for. Empty means the first item of its carousel, which
is the ordinary state and is not stored — reorder the carousel and the lead
follows. Choosing one is the deliberate act of saying "not that one", and it may
be a picture the carousel does not contain at all.

`cover_shape` rides along with each row so this panel can draw the right frame
without knowing how a template is assembled. SHAPES moved out of PageBuilderPanel
because two screens offer them now, and two lists is two places to add the next
ratio.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-05 15:41:37 +01:00

19 lines
883 B
TypeScript

/**
* The shapes a slot can be framed into, in one place.
*
* Shared because two screens now offer them: the page builder sets the shape on a template's lead
* block, and a row's settings draw a cropping frame of those proportions. Two lists would be two
* places to add the next ratio, and the day they disagree a crop is framed against a shape the page
* does not use.
*/
export const SHAPES = [
{ value: '', label: "The picture's own shape", ratio: null as number | null },
{ value: '21/9', label: '21:9 — a letterbox band', ratio: 21 / 9 },
{ value: '16/9', label: '16:9', ratio: 16 / 9 },
{ value: '3/2', label: '3:2', ratio: 3 / 2 },
{ value: '4/3', label: '4:3', ratio: 4 / 3 },
{ value: '1/1', label: '1:1 — square', ratio: 1 },
{ value: '3/4', label: '3:4 — upright', ratio: 3 / 4 },
{ value: '2/3', label: '2:3 — upright', ratio: 2 / 3 },
];