Add the Nook "Mail" component to this project, exactly as Nook ships it. An inbox list and an opened message. Steps 1. Check for `nook.json` in the project root. If it is missing, run `npx nook-ui@latest init` first (React or Next.js with Tailwind CSS v4). It adds the Nook tokens, the theme and `cn()`. 2. Run `npx nook-ui@latest add mail`. It writes `components/ui/mail.tsx` together with everything the component needs. Do not write the component from memory. 3. If you cannot run commands, fetch http://localhost:3000/r/mail.json, write every entry of `files` to the path it names, install the packages in `dependencies`, and repeat for each name in `registryDependencies`. 4. Use it where I ask. Start from this example: ```tsx "use client"; import * as React from "react"; import { Avatar, AvatarFallback } from "@/components/ui/avatar"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { MailItem, MailList, MailMessage } from "@/components/ui/mail"; const MAILS = [ { id: "1", sender: "Maya Chen", initials: "MC", address: "maya@acme.com", subject: "Launch page copy, final", preview: "Legal signed off last night. I only changed the pricing line.", time: "9:41", unread: true, label: "Launch" }, { id: "2", sender: "Billing", initials: "B", address: "billing@acme.com", subject: "Your invoice for November", preview: "Invoice INV-004 for $450.00 is ready to download.", time: "8:02", unread: true }, { id: "3", sender: "Arif Rahman", initials: "AR", address: "arif@acme.com", subject: "Checkout total is fixed", preview: "The rounding bug is gone. Can you check staging before noon?", time: "Yesterday", unread: false }, ]; export default function MailDefault() { const [open, setOpen] = React.useState("1"); const [starred, setStarred] = React.useState(["3"]); const mail = MAILS.find((item) => item.id === open)!; return (
{MAILS.map((item) => ( setStarred((list) => (on ? [...list, item.id] : list.filter((id) => id !== item.id)))} onOpen={() => setOpen(item.id)} labels={item.label && item.id !== open ? {item.label} : null} /> ))} {mail.initials} } actions={ <> } >

Hi,

{mail.preview}

Thanks,
{mail.sender}

); } ``` API - `MailList`: The list. - `MailItem`: One message in the list. - `sender, subject, preview, time` (`string`): What the row shows. - `unread` (`boolean`): Marks it unread. - `selected` (`boolean`): Marks the message that is open. - `starred, onStarChange` (`boolean, (starred) => void`): Adds a star toggle. - `onOpen / href` (`() => void / string`): Opens the message. - `labels` (`ReactNode`): Small labels after the subject. - `MailMessage`: A message opened for reading. Children are the body. - `subject, from, address, to, time` (`string`): The header. - `avatar, actions` (`ReactNode`): The sender's avatar, and buttons such as Reply. Rules - Colors, radii, shadows and motion come from Nook tokens and classes such as `bg-primary`, `text-muted-foreground`, `border-border`, `rounded-lg` and `h-control`. Never hard-code them. - Do not restyle or simplify the file. Change how it looks through `className`, its props and the theme. - It must keep working with the keyboard, in light and dark mode, and in the sharp, soft and bold styles. - Accessibility: The whole row opens the message, while staying one button or link; the star is a separate toggle. Unread is said in words as well as shown by the square dot. Done when the component renders like the example in light and dark mode and the project type-checks.