--- /** * A few words in a heading that edit themselves, once, when the heading scrolls into view. * * The hero refines one word by restyling it. Section headings take the same gesture one step * further, the way an editor would: a caret lands at the end of the old words, drags a selection * back across them, and types the new ones over it. It reads as the page being revised, which is * the whole idea of the product, and it only ever happens once per heading. * * The finished heading is the one in the markup. The words are real text, styled like the hero's * `em`, so with no JavaScript, with reduced motion, or to a crawler, the heading is the final * sentence. When the script takes over it hides that text visually (a screen reader still reads * it, and only it) and draws the animation from a `data-` attribute through `::before`, which is * neither announced inside `aria-hidden` nor copied with a selection. */ interface Props { /** What the heading says before it's revised. */ from: string; /** What it says after, and what every reader without the animation gets. */ to: string; } const { from, to } = Astro.props; --- {to}