The rendering pipeline
Present routes to a view
Section titled “Present routes to a view”<Present> is the single entry. It detects context and renders one of:
Deck: the audience/standalone view (the main canvas).PresenterView: opened at#presenter; current/next previews, notes, timer, step indicator.CaptureView: used at build time by thumbnails to render one motionless slide.
The fixed canvas
Section titled “The fixed canvas”Slides are authored at 1280×720. ScaledStage measures its parent and applies a single CSS transform: scale(...) so the canvas fits, centered + letterboxed. Because everything is one scaled layer, a slide is pixel-identical everywhere. Only the scale differs.
SlideFrame wraps each slide with the brand background, the animated Atmosphere (gradient blooms; a still variant for captures), and a padded content area.
Steps & reveals
Section titled “Steps & reveals”StepsProvider (mounted per active slide) tracks how many reveal “slots” the slide contains; <Step> claims one. The deck’s current step drives which steps are shown. A component can claim several slots via useRevealState(count). That’s how <CodeMagic> advances through its states with the same key presses.
Navigation is pure at its core (stepForward / stepBack): advance within a slide’s steps; once past the last, change slide. The same logic backs keyboard, touch, and the on-screen controls.
Transitions
Section titled “Transitions”- Between slides:
AnimatePresenceswaps the slide via a configurable transition (Motion variants resolved with the nav direction). Built-ins:fade(default),blur,slide(directional push),zoom,none, or pass a custom spec. Set a deck default onPresent(transition="slide") and override per slide withexport const transition. Honorsprefers-reduced-motion(collapses to a tiny opacity fade), and is off by default on mobile (coarse pointer). SetmobileTransitionsto opt back in. Persistent-layer elements travel above this swap, so they’re unaffected. - Within a slide:
<Step>fades/rises each reveal;<Magic>/<CodeMagic>FLIP shared elements vialayoutId.
Overview & thumbnails
Section titled “Overview & thumbnails”The overview grid (o) prefers the build-time thumbnail <img>s; absent, it renders a cheap static DeckThumb. The presenter previews always render live (only two slides) so they stay crisp and reflect the real reveal/plugin state.
Code-first presentations your agent can author. One file out, no server.
Comments