Add the Nook "Trip tracker" component to this project, exactly as Nook ships it. A ride map, trip progress, driver details and a pre-trip ride chooser. 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 trip-tracker`. It writes `components/ui/trip-tracker.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/trip-tracker.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 { TripTracker, type TripStatus } from "@/components/ui/trip-tracker"; import { ToggleGroup, Toggle } from "@/components/ui/toggle-group"; import { OSM_TILES, cityCenter, cityRoute, station, studio } from "../map/data"; export default function TripDefault() { const [status, setStatus] = React.useState("driver-on-way"); const [ride, setRide] = React.useState("comfort"); const [message, setMessage] = React.useState(""); const rides = [ { id: "economy", name: "Economy", price: 14.5, arrival: "3 min away" }, { id: "comfort", name: "Comfort", price: 19.5, arrival: "4 min away" }, { id: "xl", name: "XL", price: 26, arrival: "6 min away" }, ]; return (
{ if (value[0]) setStatus(value[0] as TripStatus); }} aria-label="Preview trip status" className="flex-wrap" > Finding Driver coming On trip Arrived ©{" "} OpenStreetMap {" "} contributors ), }} driver={{ name: "Alex Morgan", rating: 4.9, car: "Toyota Camry · Silver", plate: "NYC 2048", }} eta={status === "on-trip" ? "8 min" : "4 min"} fare={rides.find((option) => option.id === ride)!.price} rideTypes={rides} rideType={ride} onRideTypeChange={setRide} onCall={() => setMessage("Call Alex at the number provided by your ride service.") } onMessage={() => setMessage("Message to Alex: I am by the Smith Street exit.") } onCancel={() => setMessage( "Cancellation requested. Confirm it with your ride service.", ) } onShare={() => setMessage("Trip details are ready to share with someone you trust.") } />

{message}

); } ``` API - `TripTracker`: Composes Map, Steps, Avatar, Rating and Money. The app owns trip status and all service actions. - `status` (`TripStatus`): Required state: finding, driver-on-way, on-trip or arrived. Does not advance automatically. - `pickup / dropoff / route` (`TripPlace / TripPlace / MapCoordinate[]`): Named endpoints and optional ordered route coordinates. - `driver` (`TripDriver`): name, optional avatar, rating, car and plate. Shown once a driver is on the way. - `eta / fare / currency` (`string / number / string`): Human-readable ETA and fare in major currency units. - `rideTypes / rideType / defaultRideType / onRideTypeChange` (`RideType[] / string / callback`): Pre-trip choices with id, name, price and arrival. Selection can be controlled. - `onCall / onMessage / onCancel / onShare` (`() => void`): App-owned actions. No call, message, share or cancellation request is sent by the component. - `mapProps / mapOverlay` (`MapProps / ReactNode`): Map viewport, tile configuration and optional geographic road overlays. - Variant `status`: finding, driver-on-way, on-trip, arrived (default finding) 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: Status is stated in words and through the existing Steps. Ride types are native radios. Driver rating has a text label, the license plate is named, and every map gesture has keyboard controls. Done when the component renders like the example in light and dark mode and the project type-checks.