import { motion } from "framer-motion"; import { createContext, useContext, type ReactNode } from "react"; import { useTheme } from "../ThemeContext"; import { MONO } from "../theme"; import { spring } from "./primitives"; // Deck sets this to the current slide's auto-derived section number, so // slides no longer hard-code their kicker index (insert freely, numbers fix // themselves). Falls back to the `index` prop if no context is present. export const SectionNumberContext = createContext(null); // Consistent deck chrome for content slides: kicker (NN / SECTION), // big title, accent rule, and a small page index in the corner. export function SlideShell({ index, kicker, title, children, titleSize = 46, }: { index?: number; // optional manual override; normally auto-numbered kicker: string; // e.g. "TRADITIONAL RL" title: ReactNode; children?: ReactNode; titleSize?: number; // override the (compact) default when a slide needs it }) { const { T } = useTheme(); const ctxNo = useContext(SectionNumberContext); const idx = String(ctxNo ?? index ?? 0).padStart(2, "0"); return (
{/* Header — kept compact so content gets the room */}
{idx}  /  {kicker} {title}
{/* Content region — slides position their own content below the header */} {children} {/* Footer — just a small page index in the corner */}
{idx}
); }