# Inline-Friendly Section Conventions (Option A) Active rewrite: every section in `src/components/sections/**` becomes a *flat-bodied* React component whose JSX can be lifted verbatim into a generated `HomePage.tsx` by the snippet AST inliner. **Only the file body changes** — the props interface stays exactly as it is so the snippet pipeline keeps working. These rules SUPERSEDE `components.md` / `transformation.md` / `animations.md` for files in `src/components/sections/**`. The legacy docs still describe how the v4 *showcase* and shared helpers are wired, but a section file written today must not import any of those helpers. --- ## What "inline-friendly" means After the AST inliner expands `` into HomePage, the resulting JSX must be: 1. **Flat** — only browser-intrinsic tags (`section`, `div`, `h1`, `p`, `a`, `img`, `video`, `button`, `form`, `input`, `nav`, etc.), `motion.` from `motion/react`, lucide icons, and the five whitelisted open-source primitives. 2. **Self-explanatory to an LLM** — class names from the v4 fluid scale (`text-7xl`, `w-content-width`, `p-1`–`p-8`, `gap-1`–`gap-8`) and shadcn aliases (`bg-primary`, `text-muted-foreground`, `border-border`) only. 3. **Identifier-clean** — every name referenced inside the JSX is either a destructured prop, a `const` declared at the top of the function, or imported from one of the allowed sources below. If any one of those three is broken, free-edit will misfire. No exceptions. --- ## Allowed imports — exhaustive list ```ts // Animation import { motion } from "motion/react"; // Icons import { Star, ArrowRight /* ... any lucide icon */ } from "lucide-react"; // Open-source primitives (curated five) import TextAnimation from "@/components/ui/text-animation"; import HoverPattern from "@/components/ui/hover-pattern"; import ShimmerText from "@/components/ui/shimmer-text"; import Marquee from "@/components/ui/marquee"; import GlowCard from "@/components/ui/glow-card"; ``` Anything else is forbidden, including (non-exhaustive): - `@/components/ui/Button`, `@/components/ui/TextAnimation` (capital T — the closed v4 one), `@/components/ui/ScrollReveal`, `@/components/ui/ImageOrVideo`, `@/components/ui/HeroBackgroundSlot`, `@/components/ui/GridOrCarousel`, any `@/components/ui/*Background*`, any `@/components/ui/Navbar*`, any `@/components/ui/Button*`, `Card`, `Carousel`, `Modal`, `Sheet`, `Accordion`, `Tooltip`, `Dropdown`, `DropdownMenu`, `Tag`, `Tabs`, `Spinner`, `Switch`, `Checkbox`, `Input`, `Label`, `Textarea`, `MediaStack`, `OrbitingIcons`, `LoopCarousel`, `TiltedCarousel`, `TiltedStackCards`, `AnimatedBarChart`, `AvatarGroup`, `BorderGlow`, `AutoFillText`, `IconTextMarquee`, `ChatMarquee`, `InfoCardMarquee`, `ChecklistTimeline`, `Calendar`, `Separator`, `TextLink`, `Transition`, `StyleProvider`, `useStyle`. - `@/components/shared/*` — every shared helper. - `@/components/cardStack/*`. - `@/components/text/*`. - `@/hooks/*` — sections must be stateless; if interactivity is needed, ship a tiny inline `useState` BUT only inside one of the five open-source primitives, never at section level. - `gsap`, `framer-motion` (use `motion/react`), `react-router-dom`, anything else that isn't already in `webild-vite` `package.json`. --- ## Replacement table | Closed v4 primitive | Inline replacement | |---|---| | `