import { createContext, useContext, type ReactNode } from 'react' import { cn } from './cn' import { ScrollArea } from './ScrollArea' /** * The navigation column: 240px, a hairline on its right, the surface * behind it, scrolling independently of the content beside it (the shell * of Ship's Sidebar, 2026-09-02 — its contents stayed in the app). * * What goes inside is the caller's: NavItem rows, a SectionLabel heading * in a 32px row over a group. Desktop only — there is no narrow-screen * drawer. * * In AppShell's `inset` frame it stands on the ground instead: no hairline, * no surface, the content's card beside it (Katerina, 28 September). The * frame tells it so; the caller passes nothing. */ export interface SidebarProps { /** Names the navigation region for assistive tech. */ 'aria-label'?: string children: ReactNode className?: string } /** Set by AppShell's `inset` frame: the sidebar stands on the ground, with no line or surface of its own. */ export const SidebarOnGround = createContext(false) export function Sidebar({ 'aria-label': ariaLabel = 'Workspace', children, className }: SidebarProps) { const onGround = useContext(SidebarOnGround) return ( ) }