Add the Nook "Zoom pane" component to this project, exactly as Nook ships it. Explore a map, plan or illustration with wheel, pinch, drag, buttons and keyboard controls. 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 zoom-pane`. It writes `components/ui/zoom-pane.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/zoom-pane.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 { ZoomPane } from "@/components/ui/zoom-pane"; export default function ZoomPaneDefault() { const blocks = [ { x: 50, y: 80, w: 160, h: 100, name: "North studio", color: "var(--chart-1)" }, { x: 250, y: 80, w: 180, h: 100, name: "Print workshop", color: "var(--chart-2)" }, { x: 470, y: 80, w: 180, h: 100, name: "The reading room", color: "var(--chart-3)" }, { x: 50, y: 260, w: 160, h: 140, name: "Gallery", color: "var(--chart-4)" }, { x: 250, y: 260, w: 180, h: 140, name: "Sculpture garden", color: "var(--chart-3)" }, { x: 470, y: 260, w: 180, h: 140, name: "Coffee & conversation", color: "var(--chart-5)" }, ]; return

Fieldwork campus

Visitor map
FIELDWORK / CAMPUS N ↑ {blocks.map((block) => {block.name}{[0, 1, 2].map((row) => )})} FOUNDRY LANE Entrance →0100 m

Drag to explore. Ctrl + scroll or pinch to zoom. Focus the map for + / −, 0 and arrow keys.

; } ``` API - `ZoomPane`: A clipped viewport, transformed content, and a separate control layer. - `label` (`string`, default Zoomable content): Names the keyboard-focusable viewport. - `minZoom / maxZoom` (`number`, default 0.25 / 4): Scale limits. - `scale / defaultScale` (`number`, default 1): Controlled or initial scale. - `onScaleChange` (`(scale: number) => void`): Receives clamped scale changes. - `controls` (`ReactNode`, default ): Replace the controls, or pass null to hide them. - `...props` (`React.HTMLAttributes`): Everything the native element accepts, such as `id`, `aria-*` and event handlers. - `ZoomControls`: Zoom out, reset percentage, zoom in and fit. Reads its parent ZoomPane or an explicit controls object. - `controls` (`ReturnType`): State and actions for a custom viewport. - `useZoomPan`: The same zoom state and gestures for custom surfaces. Returns viewportRef, contentRef, viewportProps, contentStyle, scale, position, zoomTo, zoomIn, zoomOut, panBy, reset and fit. - `options` (`ZoomPanOptions`): The same scale limits, controlled state and callback as ZoomPane. 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: Focus the viewport and use plus/minus to zoom, zero to reset, and arrows to pan. Shift pans farther. Controls are named native buttons. Wheel pans, Ctrl+wheel or a two-pointer pinch zooms around the pointer. No motion is required to operate it. Done when the component renders like the example in light and dark mode and the project type-checks.