// AppShell composition — topbar + main scroll region. Used by the // dashboard, portal, admin templates as the authenticated-app skeleton. // The shell itself is dumb; auth gates / sidebar collapse / search / // command palette layer on top. // // `LinkComponent` lets apps pass `Link` from `@voltro/web` so the // top nav uses client-side routing + loader prefetch instead of full // page reloads. Default is plain `` so the kit stays // router-agnostic. // // The top bar chrome (sticky, glass-on-scroll, h-16, max-w-7xl) is // the shared — same one consumed by DocsLayout and by // landing / marketplace pages directly. That's the single visual // source of truth across the four sibling apps; do not duplicate // the header treatment here. import type { ComponentType, ReactNode } from 'react' import { cn } from '../cn' import type { ShellLinkProps } from './docShell' import { PageHeader } from './pageHeader' interface NavLink { readonly label: string readonly href: string } interface AppShellProps { readonly brand: ReactNode readonly nav?: ReadonlyArray readonly right?: ReactNode readonly children: ReactNode readonly className?: string readonly LinkComponent?: ComponentType } const PlainLink = ({ to, className, children }: ShellLinkProps): ReactNode => ( {children} ) export const AppShell = ({ brand, nav, right, children, className, LinkComponent = PlainLink, }: AppShellProps): ReactNode => { const Link = LinkComponent return (
{brand}
{nav && nav.length > 0 ? ( ) : null} {right ?
{right}
: null}
{children}
) }