Add the Nook "Candlestick chart" component to this project, exactly as Nook ships it. Price candles, volume, a market ticker and a depth order book drawn without chart dependencies. 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 candlestick-chart`. It writes `components/ui/candlestick-chart.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/candlestick-chart.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 import { CandlestickChart, Ticker, OrderBook, type Candle, } from "@/components/ui/candlestick-chart"; // Fixed seed: the same illustrative session is rendered on the server and browser. function session(): Candle[] { let seed = 2048, last = 184.2; const next = () => { seed = (seed * 16807) % 2147483647; return seed / 2147483647; }; return Array.from({ length: 24 }, (_, i) => { const open = last, close = open + (next() - 0.43) * 1.8; last = close; return { time: `${String(9 + Math.floor((30 + i * 5) / 60)).padStart(2, "0")}:${String((30 + i * 5) % 60).padStart(2, "0")}`, open, close, high: Math.max(open, close) + next() * 0.8, low: Math.min(open, close) - next() * 0.7, volume: Math.round(2000 + next() * 14000), }; }); } const candles = session(); export default function TradingDefault() { return (
d.close)} />

Illustrative market data. Focus a candle and use the arrow keys to explore.

); } ``` API - `CandlestickChart`: An SVG OHLC chart with the existing niceScale axis and a volume strip. - `title / data` (`string / Candle[]`): Accessible chart name and time, open, high, low, close, volume for each candle in display order. - `currency / locale` (`string`, default "USD" / "en-US"): Formatting for tooltip, announcements and table. - `Ticker`: Symbol, name, last price, signed change and percent, and the existing Sparkline. - `symbol / name / price / change / changePercent / history` (`string / string / number / number / number / number[]`): Market snapshot and chronological prices. Percent is in percentage points. - `OrderBook`: Sorted bids and asks with cumulative depth and a spread line. - `bids / asks` (`OrderLevel[]`): Price and quantity pairs; highest bid and lowest ask come first. - `currency / quantityLabel` (`string`, default "USD" / "Shares"): Table units. 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: Up candles are filled; down candles are outlined. Focused candles announce direction and every value. Arrow keys, Home and End navigate. ChartTable supplies the full data alternative and tooltip direction includes an arrow and a word. Done when the component renders like the example in light and dark mode and the project type-checks.