diff --git a/demo/src/showcase.ts b/demo/src/showcase.ts index f08efac..785b4d9 100644 --- a/demo/src/showcase.ts +++ b/demo/src/showcase.ts @@ -587,7 +587,7 @@ function accentNote(color: string, kicker: string): any { return { ...baseCard, defaultWidth: SMALL_W, - defaultHeight: 86, + defaultHeight: 110, type: 'text' as const, stroke: hexAlpha(color, 0.35), fill: hexAlpha(color, 0.05), @@ -842,7 +842,7 @@ nodes.push({ x: initiativesOffsetX + initiativesTotalW + CARD_GAP, y: ROW_Y.initiatives, width: SMALL_W, - height: 86, + height: 110, }) // --- Secondary initiatives --- @@ -875,7 +875,7 @@ nodes.push({ x: secondaryOffsetX + secondaryTotalW + CARD_GAP, y: ROW_Y.secondary, width: SMALL_W, - height: 86, + height: 110, }) // --- Footer cards: customers + revenue --- diff --git a/packages/core/src/slots.ts b/packages/core/src/slots.ts index 2d0bcd1..c32ca8f 100644 --- a/packages/core/src/slots.ts +++ b/packages/core/src/slots.ts @@ -175,8 +175,13 @@ export function computeCategorySlotRegions( // and sits at HEADER_INSET_Y; pad another small gap so the // bar reads as decoration rather than a divider line. y + HEADER_INSET_Y + fs + 6 - : // Legacy: under one line of body text. - y + HEADER_INSET_Y + fs + Math.round(fs * 0.9) + : // No header: anchor just above the footer strip so the bar + // sits between the body content and the stats region + // regardless of how many lines the title wraps to. A + // top-anchored position (legacy: HEADER_INSET_Y + fs + 0.9em) + // only works for single-line titles; multi-line titles wrap + // into the bar because the centered label straddles it. + y + height - FOOTER_INSET_Y - footer - bandHeight - 6 return { x: x + HEADER_INSET_X, y: bandY,