// TituloEditorial: linhas Cormorant 700 com a palavra em `*itálico vinho*`. Cada linha sobe 60 px por trás de uma máscara // enquanto o espaçamento entre letras fecha de 0,25 em a −0,01 em (30 quadros); 10 quadros entre linhas. Kicker em Jost. import React from 'react'; import {useCurrentFrame} from 'remotion'; import {COR, FONTE, LARGURA_UTIL, SEGURA, caber, e5, eb, pedacos, seg, textoLimpo} from '../base'; export type TituloEditorialProps = {linhas: string[]; kicker?: string; inicio?: number; intervalo?: number; y?: number; tamanho?: number; fim?: number}; export const TituloEditorial: React.FC = ({linhas, kicker, inicio = 0, intervalo = 10, y = 700, tamanho = 230, fim}) => { const f = useCurrentFrame(); if (fim !== undefined && f >= fim) return null; const tams = linhas.map((l) => caber(textoLimpo(l), tamanho, LARGURA_UTIL, 700, -0.01)); const alts = tams.map((t) => t * 0.98); const total = alts.reduce((a, b) => a + b, 0) + (kicker ? 80 : 0); let topo = y - total / 2; const kt = topo; if (kicker) topo += 80; const kp = e5(seg(f, inicio, inicio + 20)); return
{kicker &&
{kicker}
} {linhas.map((l, i) => { const top = topo; topo += alts[i]; const p = e5((f - inicio - i * intervalo) / 30); const q = eb((f - inicio - i * intervalo) / 16, 1.1); return
{pedacos(l).map((s, j) => {s.t})}
; })}
; };