ardo 2.7.0 → 2.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,7 @@ import {
27
27
  import { useContext } from "react";
28
28
  import { Links, Meta, Scripts, ScrollRestoration } from "react-router";
29
29
  import { jsx, jsxs } from "react/jsx-runtime";
30
+ var ARDO_FAVICON = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20style%3D%22stroke-linecap%3Around%3Bstroke-linejoin%3Around%22%20viewBox%3D%220%200%20600%20600%22%3E%3Cdefs%3E%3Csymbol%20id%3D%22a%22%20overflow%3D%22visible%22%3E%3Cpath%20d%3D%22M300%20300%20151%20128l2%20178-41%2094h93c-35%2032-55%2068-63%20107m63-106%2095%2081m-32-96%2028%2088%22%2F%3E%3Cellipse%20cx%3D%22222%22%20cy%3D%22327%22%20fill%3D%22%2300655a%22%20rx%3D%2220%22%20ry%3D%2233%22%2F%3E%3Ccircle%20cx%3D%22227%22%20cy%3D%22324%22%20r%3D%2271%22%2F%3E%3C%2Fsymbol%3E%3C%2Fdefs%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%2300655a%22%20stroke-width%3D%2216%22%3E%3Cpath%20d%3D%22M155%20318c2-70%2066-126%20145-126s143%2056%20145%20126%22%2F%3E%3Ccircle%20cx%3D%22300%22%20cy%3D%22290%22%20r%3D%22270%22%2F%3E%3Cuse%20href%3D%22%23a%22%2F%3E%3Cuse%20href%3D%22%23a%22%20transform%3D%22matrix%28-1%200%200%201%20600%200%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E";
30
31
  function RootLayout({ children, favicon, lang }) {
31
32
  const context = useContext(ArdoContext);
32
33
  const resolvedLang = lang ?? context?.config.lang ?? "en";
@@ -34,7 +35,7 @@ function RootLayout({ children, favicon, lang }) {
34
35
  /* @__PURE__ */ jsxs("head", { children: [
35
36
  /* @__PURE__ */ jsx("meta", { charSet: "utf-8" }),
36
37
  /* @__PURE__ */ jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }),
37
- favicon && /* @__PURE__ */ jsx("link", { rel: "icon", type: "image/svg+xml", href: favicon }),
38
+ /* @__PURE__ */ jsx("link", { rel: "icon", type: "image/svg+xml", href: favicon ?? ARDO_FAVICON }),
38
39
  /* @__PURE__ */ jsx(Meta, {}),
39
40
  /* @__PURE__ */ jsx(Links, {})
40
41
  ] }),
@@ -840,4 +841,4 @@ export {
840
841
  Steps,
841
842
  FileTree
842
843
  };
843
- //# sourceMappingURL=chunk-6CQBZBXD.js.map
844
+ //# sourceMappingURL=chunk-2JWOR7PG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/ui/Layout.tsx","../src/ui/ArdoRoot.tsx","../src/ui/Header.tsx","../src/ui/components/ThemeToggle.tsx","../src/ui/Sidebar.tsx","../src/ui/Footer.tsx","../src/ui/Nav.tsx","../src/ui/TOC.tsx","../src/ui/DocPage.tsx","../src/ui/HomePage.tsx","../src/ui/components/Hero.tsx","../src/ui/components/Features.tsx","../src/ui/components/Steps.tsx","../src/ui/components/FileTree.tsx"],"sourcesContent":["import { type ReactNode, useContext } from \"react\"\nimport { Links, Meta, Scripts, ScrollRestoration } from \"react-router\"\nimport { ArdoContext } from \"../runtime/hooks\"\n\n// =============================================================================\n// RootLayout Component (html/head/body shell)\n// =============================================================================\n\nconst ARDO_FAVICON =\n \"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20style%3D%22stroke-linecap%3Around%3Bstroke-linejoin%3Around%22%20viewBox%3D%220%200%20600%20600%22%3E%3Cdefs%3E%3Csymbol%20id%3D%22a%22%20overflow%3D%22visible%22%3E%3Cpath%20d%3D%22M300%20300%20151%20128l2%20178-41%2094h93c-35%2032-55%2068-63%20107m63-106%2095%2081m-32-96%2028%2088%22%2F%3E%3Cellipse%20cx%3D%22222%22%20cy%3D%22327%22%20fill%3D%22%2300655a%22%20rx%3D%2220%22%20ry%3D%2233%22%2F%3E%3Ccircle%20cx%3D%22227%22%20cy%3D%22324%22%20r%3D%2271%22%2F%3E%3C%2Fsymbol%3E%3C%2Fdefs%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%2300655a%22%20stroke-width%3D%2216%22%3E%3Cpath%20d%3D%22M155%20318c2-70%2066-126%20145-126s143%2056%20145%20126%22%2F%3E%3Ccircle%20cx%3D%22300%22%20cy%3D%22290%22%20r%3D%22270%22%2F%3E%3Cuse%20href%3D%22%23a%22%2F%3E%3Cuse%20href%3D%22%23a%22%20transform%3D%22matrix%28-1%200%200%201%20600%200%29%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E\"\n\nexport interface RootLayoutProps {\n children: ReactNode\n /** Favicon URL (renders <link rel=\"icon\">) */\n favicon?: string\n /** Language attribute for <html> (default: from config or \"en\") */\n lang?: string\n}\n\n/**\n * Default HTML shell for Ardo sites. Replaces the boilerplate `Layout` export\n * that every root.tsx must define for React Router.\n *\n * @example Basic usage\n * ```tsx\n * // app/root.tsx\n * export { RootLayout as Layout } from \"ardo/ui\"\n * ```\n *\n * @example With favicon\n * ```tsx\n * import logo from \"./assets/logo.svg\"\n * export const Layout = (props) => <RootLayout favicon={logo} {...props} />\n * ```\n */\nexport function RootLayout({ children, favicon, lang }: RootLayoutProps) {\n // Use optional context (RootLayout renders before ArdoProvider is available)\n const context = useContext(ArdoContext)\n const resolvedLang = lang ?? context?.config.lang ?? \"en\"\n\n return (\n <html lang={resolvedLang} suppressHydrationWarning>\n <head>\n <meta charSet=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n <link rel=\"icon\" type=\"image/svg+xml\" href={favicon ?? ARDO_FAVICON} />\n <Meta />\n <Links />\n </head>\n <body suppressHydrationWarning>\n {children}\n <ScrollRestoration />\n <Scripts />\n </body>\n </html>\n )\n}\n\n// =============================================================================\n// Layout Component\n// =============================================================================\n\nexport interface LayoutProps {\n /** Header content */\n header?: ReactNode\n /** Sidebar content */\n sidebar?: ReactNode\n /** Footer content */\n footer?: ReactNode\n /** Main content */\n children: ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\n/**\n * Layout component with explicit slot props.\n *\n * @example\n * ```tsx\n * <Layout\n * header={<Header logo=\"/logo.svg\" title=\"Ardo\" nav={...} />}\n * sidebar={<Sidebar>...</Sidebar>}\n * footer={<Footer message=\"MIT License\" />}\n * >\n * <Outlet />\n * </Layout>\n * ```\n */\nexport function Layout({ header, sidebar, footer, children, className }: LayoutProps) {\n return (\n <div className={className ?? \"ardo-layout\"}>\n <a href=\"#main-content\" className=\"ardo-skip-link\">\n Skip to content\n </a>\n {header}\n <div className=\"ardo-layout-container\">\n {sidebar}\n <main id=\"main-content\" className=\"ardo-main\">\n {children}\n </main>\n </div>\n {footer}\n </div>\n )\n}\n","import { type ReactNode } from \"react\"\nimport { Outlet, useLocation } from \"react-router\"\nimport { ArdoProvider } from \"../runtime/hooks\"\nimport type { ArdoConfig, SidebarItem } from \"../config/types\"\nimport { Layout } from \"./Layout\"\nimport { Header, type HeaderProps } from \"./Header\"\nimport { Sidebar, type SidebarProps } from \"./Sidebar\"\nimport { Footer, type FooterProps } from \"./Footer\"\n\n// =============================================================================\n// ArdoRoot Component\n// =============================================================================\n\nexport interface ArdoRootProps {\n /** Ardo config (from virtual:ardo/config) */\n config: ArdoConfig\n /** Sidebar data (from virtual:ardo/sidebar) */\n sidebar: SidebarItem[]\n /** Custom header element (overrides auto-generated header) */\n header?: ReactNode\n /** Custom sidebar element (overrides auto-generated sidebar) */\n sidebarContent?: ReactNode\n /** Custom footer element (overrides auto-generated footer) */\n footer?: ReactNode\n /** Props passed to auto-generated Header (ignored when header is provided) */\n headerProps?: HeaderProps\n /** Props passed to auto-generated Sidebar (ignored when sidebarContent is provided) */\n sidebarProps?: SidebarProps\n /** Props passed to auto-generated Footer (ignored when footer is provided) */\n footerProps?: FooterProps\n /** Additional CSS classes for the layout */\n className?: string\n /** Content to render (defaults to <Outlet />) */\n children?: ReactNode\n}\n\n/**\n * All-in-one root component that combines ArdoProvider, Layout, Header,\n * Sidebar, Footer, and homepage detection into a single component.\n *\n * @example Minimal usage\n * ```tsx\n * import config from \"virtual:ardo/config\"\n * import sidebar from \"virtual:ardo/sidebar\"\n *\n * export default function Root() {\n * return <ArdoRoot config={config} sidebar={sidebar} />\n * }\n * ```\n *\n * @example With custom nav and footer overrides\n * ```tsx\n * export default function Root() {\n * return (\n * <ArdoRoot\n * config={config}\n * sidebar={sidebar}\n * headerProps={{\n * nav: (\n * <Nav>\n * <NavLink to=\"/guide\">Guide</NavLink>\n * <NavLink to=\"/api\">API</NavLink>\n * </Nav>\n * ),\n * }}\n * footerProps={{\n * message: \"Released under the MIT License.\",\n * }}\n * />\n * )\n * }\n * ```\n */\nexport function ArdoRoot({\n config,\n sidebar,\n header,\n sidebarContent,\n footer,\n headerProps,\n sidebarProps,\n footerProps,\n className,\n children,\n}: ArdoRootProps) {\n const location = useLocation()\n const isHomePage = location.pathname === \"/\" || location.pathname === \"\"\n\n const resolvedHeader = header ?? <Header {...headerProps} />\n const resolvedSidebar = isHomePage ? undefined : (sidebarContent ?? <Sidebar {...sidebarProps} />)\n const resolvedFooter = footer ?? <Footer {...footerProps} />\n const resolvedClassName = className ?? (isHomePage ? \"ardo-layout ardo-home\" : \"ardo-layout\")\n\n return (\n <ArdoProvider config={config} sidebar={sidebar}>\n <Layout\n className={resolvedClassName}\n header={resolvedHeader}\n sidebar={resolvedSidebar}\n footer={resolvedFooter}\n >\n {children ?? <Outlet />}\n </Layout>\n </ArdoProvider>\n )\n}\n","import { useState, lazy, Suspense, type ReactNode } from \"react\"\nimport { Link, NavLink as RouterNavLink } from \"react-router\"\nimport {\n GithubIcon,\n TwitterIcon,\n MessageCircleIcon,\n LinkedinIcon,\n YoutubeIcon,\n PackageIcon,\n} from \"./icons\"\nimport { ThemeToggle } from \"./components/ThemeToggle\"\nimport { useConfig, useThemeConfig } from \"../runtime/hooks\"\nimport type { NavItem } from \"../config/types\"\n\nconst LazySearch = lazy(() => import(\"./components/Search\").then((m) => ({ default: m.Search })))\n\n// =============================================================================\n// Header Component\n// =============================================================================\n\nexport interface HeaderProps {\n /** Logo image URL or light/dark variants */\n logo?: string | { light: string; dark: string }\n /** Site title displayed next to logo */\n title?: string\n /** Navigation content (Nav component or custom) */\n nav?: ReactNode\n /** Actions/right side content (social links, custom buttons) */\n actions?: ReactNode\n /** Show search (default: true) */\n search?: boolean\n /** Show theme toggle (default: true) */\n themeToggle?: boolean\n /** Additional CSS classes */\n className?: string\n}\n\n/**\n * Header component with explicit slot props.\n *\n * Automatically pulls `title` from config and `logo`/`siteTitle` from themeConfig.\n * Props serve as overrides.\n *\n * @example Zero-config\n * ```tsx\n * <Header />\n * ```\n *\n * @example With overrides\n * ```tsx\n * <Header\n * logo=\"/logo.svg\"\n * title=\"Ardo\"\n * nav={\n * <Nav>\n * <NavLink to=\"/guide\">Guide</NavLink>\n * <NavLink to=\"/api\">API</NavLink>\n * </Nav>\n * }\n * />\n * ```\n */\nexport function Header({\n logo,\n title,\n nav,\n actions,\n search = true,\n themeToggle = true,\n className,\n}: HeaderProps) {\n const config = useConfig()\n const themeConfig = useThemeConfig()\n const [mobileMenuOpen, setMobileMenuOpen] = useState(false)\n\n const resolvedLogo = logo ?? themeConfig.logo\n const resolvedTitle =\n title ?? (themeConfig.siteTitle !== false ? (themeConfig.siteTitle ?? config.title) : undefined)\n\n // Auto-render nav from themeConfig.nav when no nav prop given\n const resolvedNav =\n nav ?? (themeConfig.nav?.length ? <AutoNav items={themeConfig.nav} /> : undefined)\n\n // Auto-render social links from themeConfig.socialLinks when no actions prop given\n const resolvedActions =\n actions ??\n (themeConfig.socialLinks?.length\n ? themeConfig.socialLinks.map((link, i) => (\n <SocialLink key={i} href={link.link} icon={link.icon} ariaLabel={link.ariaLabel} />\n ))\n : undefined)\n\n return (\n <header className={className ?? \"ardo-header\"}>\n <div className=\"ardo-header-container\">\n {/* Left: Mobile menu button + Logo/Title */}\n <div className=\"ardo-header-left\">\n <button\n className=\"ardo-mobile-menu-button\"\n onClick={() => setMobileMenuOpen(!mobileMenuOpen)}\n aria-label=\"Toggle menu\"\n aria-expanded={mobileMenuOpen}\n >\n <span className=\"ardo-hamburger\">\n <span></span>\n <span></span>\n <span></span>\n </span>\n </button>\n\n <Link to=\"/\" className=\"ardo-logo-link\">\n {resolvedLogo && (\n <img\n src={typeof resolvedLogo === \"string\" ? resolvedLogo : resolvedLogo.light}\n alt={resolvedTitle ?? \"Logo\"}\n className=\"ardo-logo\"\n />\n )}\n {resolvedTitle && <span className=\"ardo-site-title\">{resolvedTitle}</span>}\n </Link>\n </div>\n\n {/* Center: Navigation */}\n {resolvedNav && <div className=\"ardo-nav\">{resolvedNav}</div>}\n\n {/* Right: Search, Theme Toggle, Actions */}\n <div className=\"ardo-header-right\">\n {search && (\n <Suspense fallback={<span className=\"ardo-search-placeholder\" />}>\n <LazySearch />\n </Suspense>\n )}\n {themeToggle && <ThemeToggle />}\n {resolvedActions}\n </div>\n </div>\n\n {/* Mobile menu */}\n {mobileMenuOpen && (\n <div className=\"ardo-mobile-menu\">\n <nav className=\"ardo-mobile-nav\" onClick={() => setMobileMenuOpen(false)}>\n {resolvedNav}\n </nav>\n </div>\n )}\n </header>\n )\n}\n\n// =============================================================================\n// SocialLink Component\n// =============================================================================\n\nexport interface SocialLinkProps {\n /** URL to link to */\n href: string\n /** Social icon type */\n icon: \"github\" | \"twitter\" | \"discord\" | \"linkedin\" | \"youtube\" | \"npm\"\n /** Accessible label */\n ariaLabel?: string\n /** Additional CSS classes */\n className?: string\n}\n\n/**\n * Social media link with icon.\n *\n * @example\n * ```tsx\n * <SocialLink href=\"https://github.com/...\" icon=\"github\" />\n * ```\n */\nexport function SocialLink({ href, icon, ariaLabel, className }: SocialLinkProps) {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={className ?? \"ardo-social-link\"}\n aria-label={ariaLabel ?? icon}\n >\n <SocialIcon icon={icon} />\n </a>\n )\n}\n\n// =============================================================================\n// Auto Nav Component (internal, renders from NavItem[])\n// =============================================================================\n\nfunction AutoNav({ items }: { items: NavItem[] }) {\n return (\n <nav className=\"ardo-nav\">\n {items.map((item, i) => (\n <AutoNavItem key={i} item={item} />\n ))}\n </nav>\n )\n}\n\nfunction AutoNavItem({ item }: { item: NavItem }) {\n if (item.link?.startsWith(\"http\")) {\n return (\n <a href={item.link} className=\"ardo-nav-link\" target=\"_blank\" rel=\"noopener noreferrer\">\n {item.text}\n </a>\n )\n }\n\n if (item.link) {\n return (\n <RouterNavLink\n to={item.link}\n className={({ isActive }: { isActive: boolean }) =>\n [\"ardo-nav-link\", isActive && \"active\"].filter(Boolean).join(\" \")\n }\n >\n {item.text}\n </RouterNavLink>\n )\n }\n\n return <span className=\"ardo-nav-link\">{item.text}</span>\n}\n\n// =============================================================================\n// Social Icon Component (internal)\n// =============================================================================\n\nconst socialIcons = {\n github: GithubIcon,\n twitter: TwitterIcon,\n discord: MessageCircleIcon,\n linkedin: LinkedinIcon,\n youtube: YoutubeIcon,\n npm: PackageIcon,\n} as const\n\nfunction SocialIcon({ icon }: { icon: string }) {\n const IconComponent = socialIcons[icon as keyof typeof socialIcons] ?? GithubIcon\n return <IconComponent size={20} />\n}\n","import { useState, useEffect } from \"react\"\nimport { SunIcon, MoonIcon, MonitorIcon } from \"../icons\"\n\ntype Theme = \"light\" | \"dark\" | \"system\"\n\nexport function ThemeToggle() {\n const [theme, setTheme] = useState<Theme>(\"system\")\n const [mounted, setMounted] = useState(false)\n\n useEffect(() => {\n setMounted(true)\n\n const stored = localStorage.getItem(\"ardo-theme\") as Theme | null\n if (stored) {\n setTheme(stored)\n applyTheme(stored)\n } else {\n applyTheme(\"system\")\n }\n }, [])\n\n const toggleTheme = () => {\n const nextTheme: Theme = theme === \"light\" ? \"dark\" : theme === \"dark\" ? \"system\" : \"light\"\n setTheme(nextTheme)\n localStorage.setItem(\"ardo-theme\", nextTheme)\n applyTheme(nextTheme)\n }\n\n if (!mounted) {\n return (\n <button className=\"ardo-theme-toggle\" aria-label=\"Toggle theme\">\n <span className=\"ardo-theme-icon\">\n <SunIcon size={20} />\n </span>\n </button>\n )\n }\n\n return (\n <button\n className=\"ardo-theme-toggle\"\n onClick={toggleTheme}\n aria-label={`Switch to ${theme === \"light\" ? \"dark\" : theme === \"dark\" ? \"system\" : \"light\"} theme`}\n >\n <span className=\"ardo-theme-icon\">\n {theme === \"light\" && <SunIcon size={20} />}\n {theme === \"dark\" && <MoonIcon size={20} />}\n {theme === \"system\" && <MonitorIcon size={20} />}\n </span>\n </button>\n )\n}\n\nfunction applyTheme(theme: Theme) {\n const root = document.documentElement\n\n if (theme === \"system\") {\n const isDark = window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n root.classList.toggle(\"dark\", isDark)\n root.classList.toggle(\"light\", !isDark)\n } else {\n root.classList.toggle(\"dark\", theme === \"dark\")\n root.classList.toggle(\"light\", theme === \"light\")\n }\n}\n","import {\n useState,\n type ReactNode,\n type ComponentProps,\n Children,\n isValidElement,\n createContext,\n useContext,\n} from \"react\"\nimport { NavLink, useLocation } from \"react-router\"\nimport { ChevronDownIcon } from \"./icons\"\nimport type { SidebarItem as SidebarItemType } from \"../config/types\"\nimport { useSidebar } from \"../runtime/hooks\"\n\n/** Route path type - uses React Router's NavLink 'to' prop type for type-safe routes */\ntype RoutePath = ComponentProps<typeof NavLink>[\"to\"]\n\n// =============================================================================\n// Sidebar Context\n// =============================================================================\n\ninterface SidebarContextValue {\n currentPath: string\n}\n\nconst SidebarContext = createContext<SidebarContextValue>({ currentPath: \"\" })\n\nfunction useSidebarContext() {\n return useContext(SidebarContext)\n}\n\n// =============================================================================\n// Sidebar Component Types\n// =============================================================================\n\nexport interface SidebarProps {\n /** Sidebar items (for data-driven approach) */\n items?: SidebarItemType[]\n /** Children for JSX composition (SidebarGroup, SidebarLink) */\n children?: ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\n// =============================================================================\n// Sidebar Main Component\n// =============================================================================\n\n/**\n * Sidebar component supporting data-driven, JSX composition, and zero-config patterns.\n *\n * When neither `items` nor `children` are provided, automatically renders from\n * the Ardo sidebar context (`virtual:ardo/sidebar`).\n *\n * @example Zero-config (from context)\n * ```tsx\n * <Sidebar />\n * ```\n *\n * @example Data-driven (items prop)\n * ```tsx\n * <Sidebar items={[\n * { text: 'Introduction', link: '/intro' },\n * { text: 'Guide', items: [\n * { text: 'Getting Started', link: '/guide/getting-started' }\n * ]}\n * ]} />\n * ```\n *\n * @example JSX composition\n * ```tsx\n * <Sidebar>\n * <SidebarLink to=\"/intro\">Introduction</SidebarLink>\n * <SidebarGroup title=\"Guide\">\n * <SidebarLink to=\"/guide/getting-started\">Getting Started</SidebarLink>\n * </SidebarGroup>\n * </Sidebar>\n * ```\n */\nexport function Sidebar({ items, children, className }: SidebarProps) {\n const { pathname } = useLocation()\n const contextSidebar = useSidebar()\n const resolvedItems = items ?? (children ? undefined : contextSidebar)\n\n return (\n <SidebarContext.Provider value={{ currentPath: pathname }}>\n <aside className={className ?? \"ardo-sidebar\"}>\n <nav className=\"ardo-sidebar-nav\" aria-label=\"Main navigation\">\n {children ? (\n <ul className=\"ardo-sidebar-list ardo-sidebar-list-0\">{children}</ul>\n ) : resolvedItems?.length ? (\n <SidebarItems items={resolvedItems} depth={0} />\n ) : null}\n </nav>\n </aside>\n </SidebarContext.Provider>\n )\n}\n\n// =============================================================================\n// SidebarGroup Component\n// =============================================================================\n\nexport interface SidebarGroupProps {\n /** Group title */\n title: string\n /** Optional link for the group title */\n to?: string\n /** Initial collapsed state (default: false) */\n collapsed?: boolean\n /** Whether group is collapsible (default: true if has children) */\n collapsible?: boolean\n /** Children (SidebarLink, nested SidebarGroup) */\n children?: ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\n/**\n * Group component for organizing sidebar links.\n *\n * @example\n * ```tsx\n * <SidebarGroup title=\"Guide\">\n * <SidebarLink to=\"/guide/intro\">Introduction</SidebarLink>\n * <SidebarLink to=\"/guide/setup\">Setup</SidebarLink>\n * </SidebarGroup>\n * ```\n *\n * @example With collapsible state\n * ```tsx\n * <SidebarGroup title=\"Advanced\" collapsed>\n * <SidebarLink to=\"/advanced/config\">Configuration</SidebarLink>\n * </SidebarGroup>\n * ```\n */\nexport function SidebarGroup({\n title,\n to,\n collapsed: initialCollapsed = false,\n collapsible = true,\n children,\n className,\n}: SidebarGroupProps) {\n const [collapsed, setCollapsed] = useState(initialCollapsed)\n const { currentPath } = useSidebarContext()\n\n // Check if any child is active\n const isChildActive = checkChildrenActive(children, currentPath)\n\n const textClassName = [\"ardo-sidebar-text\", isChildActive && \"child-active\"]\n .filter(Boolean)\n .join(\" \")\n\n const hasChildren = Children.count(children) > 0\n\n return (\n <li className={className ?? \"ardo-sidebar-item\"}>\n <div className=\"ardo-sidebar-item-header\">\n {to ? (\n <NavLink\n to={to}\n end\n className={({ isActive }) =>\n [textClassName, isActive && \"active\"].filter(Boolean).join(\" \")\n }\n >\n {title}\n </NavLink>\n ) : (\n <span\n className={textClassName}\n onClick={() => collapsible && hasChildren && setCollapsed(!collapsed)}\n style={collapsible && hasChildren ? { cursor: \"pointer\" } : undefined}\n >\n {title}\n </span>\n )}\n\n {collapsible && hasChildren && (\n <button\n className={[\"ardo-sidebar-collapse\", collapsed && \"collapsed\"]\n .filter(Boolean)\n .join(\" \")}\n onClick={() => setCollapsed(!collapsed)}\n aria-label={collapsed ? \"Expand\" : \"Collapse\"}\n >\n <ChevronDownIcon size={16} />\n </button>\n )}\n </div>\n\n {hasChildren && !collapsed && (\n <ul className=\"ardo-sidebar-list ardo-sidebar-list-1\">{children}</ul>\n )}\n </li>\n )\n}\n\n// =============================================================================\n// SidebarLink Component\n// =============================================================================\n\nexport interface SidebarLinkProps {\n /** Internal route path (type-safe with React Router's registered routes) */\n to: RoutePath\n /** Link text */\n children: ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\n/**\n * Sidebar navigation link.\n *\n * @example\n * ```tsx\n * <SidebarLink to=\"/guide/getting-started\">Getting Started</SidebarLink>\n * ```\n */\nexport function SidebarLink({ to, children, className }: SidebarLinkProps) {\n const baseClassName = className ?? \"ardo-sidebar-link\"\n return (\n <li className=\"ardo-sidebar-item\">\n <NavLink\n to={to}\n className={({ isActive }) =>\n [baseClassName, isActive && \"active\"].filter(Boolean).join(\" \")\n }\n >\n {children}\n </NavLink>\n </li>\n )\n}\n\n// =============================================================================\n// Internal: Data-driven sidebar rendering\n// =============================================================================\n\ninterface SidebarItemsProps {\n items: SidebarItemType[]\n depth: number\n}\n\nfunction SidebarItems({ items, depth }: SidebarItemsProps) {\n return (\n <ul className={`ardo-sidebar-list ardo-sidebar-list-${depth}`}>\n {items.map((item, index) => (\n <SidebarItemComponent key={index} item={item} depth={depth} />\n ))}\n </ul>\n )\n}\n\ninterface SidebarItemComponentProps {\n item: SidebarItemType\n depth: number\n}\n\nfunction SidebarItemComponent({ item, depth }: SidebarItemComponentProps) {\n const { currentPath } = useSidebarContext()\n const [collapsed, setCollapsed] = useState(item.collapsed ?? false)\n\n const hasChildren = item.items && item.items.length > 0\n\n const isChildActive =\n hasChildren &&\n item.items!.some(\n (child) =>\n child.link === currentPath ||\n (child.items && child.items.some((grandchild) => grandchild.link === currentPath))\n )\n\n const linkClassName = [\"ardo-sidebar-link\", isChildActive && \"child-active\"]\n .filter(Boolean)\n .join(\" \")\n\n const textClassName = [\"ardo-sidebar-text\", isChildActive && \"child-active\"]\n .filter(Boolean)\n .join(\" \")\n\n return (\n <li className=\"ardo-sidebar-item\">\n <div className=\"ardo-sidebar-item-header\">\n {item.link ? (\n <NavLink\n to={item.link}\n className={({ isActive }) =>\n [linkClassName, isActive && \"active\"].filter(Boolean).join(\" \")\n }\n >\n {item.text}\n </NavLink>\n ) : (\n <span className={textClassName} onClick={() => hasChildren && setCollapsed(!collapsed)}>\n {item.text}\n </span>\n )}\n\n {hasChildren && (\n <button\n className={[\"ardo-sidebar-collapse\", collapsed && \"collapsed\"]\n .filter(Boolean)\n .join(\" \")}\n onClick={() => setCollapsed(!collapsed)}\n aria-label={collapsed ? \"Expand\" : \"Collapse\"}\n >\n <ChevronDownIcon size={16} />\n </button>\n )}\n </div>\n\n {hasChildren && !collapsed && <SidebarItems items={item.items!} depth={depth + 1} />}\n </li>\n )\n}\n\n// =============================================================================\n// Utility Functions\n// =============================================================================\n\nfunction checkChildrenActive(children: ReactNode, currentPath: string): boolean {\n let isActive = false\n\n Children.forEach(children, (child) => {\n if (isActive) return\n\n if (isValidElement(child)) {\n // Check SidebarLink\n if (child.type === SidebarLink && (child.props as SidebarLinkProps).to === currentPath) {\n isActive = true\n return\n }\n\n // Check nested SidebarGroup\n if (child.type === SidebarGroup) {\n const groupProps = child.props as SidebarGroupProps\n if (groupProps.to === currentPath) {\n isActive = true\n return\n }\n if (groupProps.children && checkChildrenActive(groupProps.children, currentPath)) {\n isActive = true\n return\n }\n }\n }\n })\n\n return isActive\n}\n","import { type ReactNode } from \"react\"\nimport type { ProjectMeta, SponsorConfig } from \"../config/types\"\nimport { useConfig, useThemeConfig } from \"../runtime/hooks\"\n\n// =============================================================================\n// Footer Component\n// =============================================================================\n\nexport interface FooterProps {\n /** Footer message (supports HTML string) */\n message?: string\n /** Copyright text (supports HTML string) */\n copyright?: string\n /** Custom content (overrides all automatic rendering) */\n children?: ReactNode\n /** Additional CSS classes */\n className?: string\n /** Project metadata — renders linked \"name vX.Y.Z\" */\n project?: ProjectMeta\n /** Sponsor link — renders \"Sponsored by X\" */\n sponsor?: SponsorConfig\n /** Build timestamp (ISO string) — renders formatted date */\n buildTime?: string\n /** Git commit hash — rendered next to the build date */\n buildHash?: string\n /** Show \"Built with Ardo\" link (default: true) */\n ardoLink?: boolean\n}\n\nfunction formatBuildTime(iso: string): string {\n try {\n const date = new Date(iso)\n return date.toLocaleDateString(\"en-US\", {\n month: \"long\",\n day: \"numeric\",\n year: \"numeric\",\n })\n } catch {\n return iso\n }\n}\n\n/**\n * Footer component with structured layout for project info, sponsor, and build metadata.\n *\n * Automatically pulls data from Ardo context (`config.project`, `config.buildTime`,\n * `config.buildHash`, `themeConfig.footer.*`). Props serve as overrides.\n *\n * When `children` is provided, all automatic rendering is skipped.\n *\n * @example Automatic (zero-config)\n * ```tsx\n * <Footer />\n * ```\n *\n * @example With overrides\n * ```tsx\n * <Footer\n * sponsor={{ text: \"Sebastian Software\", link: \"https://sebastian-software.com/oss\" }}\n * message=\"Released under the MIT License.\"\n * copyright=\"Copyright 2026 Sebastian Software GmbH\"\n * />\n * ```\n *\n * @example Custom content\n * ```tsx\n * <Footer>\n * <CustomFooterContent />\n * </Footer>\n * ```\n */\nexport function Footer({\n message,\n copyright,\n children,\n className,\n project,\n sponsor,\n buildTime,\n buildHash,\n ardoLink = true,\n}: FooterProps) {\n const config = useConfig()\n const themeConfig = useThemeConfig()\n\n const resolvedProject = project ?? config.project\n const resolvedBuildTime = buildTime ?? config.buildTime\n const resolvedBuildHash = buildHash ?? config.buildHash\n const resolvedMessage = message ?? themeConfig.footer?.message\n const resolvedCopyright = copyright ?? themeConfig.footer?.copyright\n const resolvedSponsor = sponsor ?? themeConfig.footer?.sponsor\n\n const hasContent =\n resolvedMessage ||\n resolvedCopyright ||\n children ||\n resolvedProject ||\n resolvedSponsor ||\n resolvedBuildTime ||\n ardoLink\n\n if (!hasContent) {\n return null\n }\n\n return (\n <footer className={className ?? \"ardo-footer\"}>\n <div className=\"ardo-footer-container\">\n {children ?? (\n <>\n {/* Primary line: project · ardo · sponsor */}\n {(resolvedProject || ardoLink || resolvedSponsor) && (\n <p className=\"ardo-footer-primary\">\n {resolvedProject?.name && (\n <>\n {resolvedProject.homepage ? (\n <a href={resolvedProject.homepage} className=\"ardo-footer-link\">\n {resolvedProject.name}\n {resolvedProject.version ? ` v${resolvedProject.version}` : \"\"}\n </a>\n ) : (\n <span>\n {resolvedProject.name}\n {resolvedProject.version ? ` v${resolvedProject.version}` : \"\"}\n </span>\n )}\n </>\n )}\n {resolvedProject?.name && ardoLink && (\n <span className=\"ardo-footer-separator\" aria-hidden=\"true\" />\n )}\n {ardoLink && (\n <a href=\"https://ardo-docs.dev\" className=\"ardo-footer-link\">\n Built with Ardo\n </a>\n )}\n {(resolvedProject?.name || ardoLink) && resolvedSponsor && (\n <span className=\"ardo-footer-separator\" aria-hidden=\"true\" />\n )}\n {resolvedSponsor && (\n <a href={resolvedSponsor.link} className=\"ardo-footer-link\">\n Sponsored by {resolvedSponsor.text}\n </a>\n )}\n </p>\n )}\n {/* Secondary line: message / copyright */}\n {resolvedMessage && (\n <p\n className=\"ardo-footer-message\"\n dangerouslySetInnerHTML={{ __html: resolvedMessage }}\n />\n )}\n {resolvedCopyright && (\n <p\n className=\"ardo-footer-copyright\"\n dangerouslySetInnerHTML={{ __html: resolvedCopyright }}\n />\n )}\n {/* Tertiary line: build timestamp */}\n {resolvedBuildTime && (\n <p className=\"ardo-footer-build-time\">\n Built on {formatBuildTime(resolvedBuildTime)}\n {resolvedBuildHash && <> ({resolvedBuildHash})</>}\n </p>\n )}\n </>\n )}\n </div>\n </footer>\n )\n}\n\n// Type exports for compound pattern (kept for backwards compatibility)\nexport interface FooterMessageProps {\n children: ReactNode\n className?: string\n}\n\nexport interface FooterCopyrightProps {\n children: ReactNode\n className?: string\n}\n","import { type ReactNode, type ComponentProps, useState, createContext, useContext } from \"react\"\nimport { NavLink as RouterNavLink } from \"react-router\"\n\n/** Route path type - uses React Router's NavLink 'to' prop type for type-safe routes */\ntype RoutePath = ComponentProps<typeof RouterNavLink>[\"to\"]\n\n// Nav context for shared state\ninterface NavContextValue {\n mobileMenuOpen: boolean\n setMobileMenuOpen: (open: boolean) => void\n}\n\nconst NavContext = createContext<NavContextValue | null>(null)\n\nfunction useNavContext() {\n return useContext(NavContext)\n}\n\n// =============================================================================\n// Nav Component\n// =============================================================================\n\nexport interface NavProps {\n children?: ReactNode\n className?: string\n}\n\n/**\n * Navigation container component for composing navigation links.\n *\n * @example\n * ```tsx\n * <Nav>\n * <NavLink to=\"/guide\">Guide</NavLink>\n * <NavLink to=\"/api\">API</NavLink>\n * <NavLink href=\"https://github.com/...\">GitHub</NavLink>\n * </Nav>\n * ```\n */\nexport function Nav({ children, className }: NavProps) {\n return <nav className={className ?? \"ardo-nav\"}>{children}</nav>\n}\n\n// =============================================================================\n// NavLink Component\n// =============================================================================\n\nexport interface NavLinkProps {\n /** Internal route path (type-safe with React Router's registered routes) */\n to?: RoutePath\n /** External URL (uses anchor tag) */\n href?: string\n /** Link text or children */\n children: ReactNode\n /** Additional CSS classes */\n className?: string\n /** Active state match pattern */\n activeMatch?: string\n}\n\n/**\n * Navigation link component supporting both internal routes and external URLs.\n *\n * @example\n * ```tsx\n * // Internal link\n * <NavLink to=\"/guide\">Guide</NavLink>\n *\n * // External link\n * <NavLink href=\"https://github.com/...\">GitHub</NavLink>\n * ```\n */\nexport function NavLink({\n to,\n href,\n children,\n className,\n activeMatch: _activeMatch,\n}: NavLinkProps) {\n const navContext = useNavContext()\n const baseClassName = className ?? \"ardo-nav-link\"\n\n // Handle click for mobile menu\n const handleClick = () => {\n navContext?.setMobileMenuOpen(false)\n }\n\n // External link\n if (href) {\n return (\n <a\n href={href}\n className={baseClassName}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={handleClick}\n >\n {children}\n </a>\n )\n }\n\n // Internal link\n if (to) {\n return (\n <RouterNavLink\n to={to}\n className={({ isActive }: { isActive: boolean }) =>\n [baseClassName, isActive && \"active\"].filter(Boolean).join(\" \")\n }\n onClick={handleClick}\n >\n {children}\n </RouterNavLink>\n )\n }\n\n // Text-only (no link)\n return <span className={baseClassName}>{children}</span>\n}\n\n// =============================================================================\n// NavDropdown Component\n// =============================================================================\n\nexport interface NavDropdownProps {\n /** Dropdown trigger text */\n text: string\n /** Dropdown items */\n children: ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\n/**\n * Dropdown navigation menu for grouping related links.\n *\n * @example\n * ```tsx\n * <NavDropdown text=\"Resources\">\n * <NavLink to=\"/docs\">Documentation</NavLink>\n * <NavLink to=\"/blog\">Blog</NavLink>\n * </NavDropdown>\n * ```\n */\nexport function NavDropdown({ text, children, className }: NavDropdownProps) {\n const [open, setOpen] = useState(false)\n\n return (\n <div\n className={className ?? \"ardo-nav-dropdown\"}\n onMouseEnter={() => setOpen(true)}\n onMouseLeave={() => setOpen(false)}\n >\n <button className=\"ardo-nav-dropdown-button\">\n {text}\n <span className=\"ardo-nav-dropdown-icon\">▼</span>\n </button>\n {open && <div className=\"ardo-nav-dropdown-menu\">{children}</div>}\n </div>\n )\n}\n\n// =============================================================================\n// NavProvider Component\n// =============================================================================\n\nexport interface NavProviderProps {\n children: ReactNode\n}\n\n/**\n * Provider for Nav context (mobile menu state).\n * Used internally by Header component.\n */\nexport function NavProvider({ children }: NavProviderProps) {\n const [mobileMenuOpen, setMobileMenuOpen] = useState(false)\n\n return (\n <NavContext.Provider value={{ mobileMenuOpen, setMobileMenuOpen }}>\n {children}\n </NavContext.Provider>\n )\n}\n\n// Export context hook for external use\nexport { useNavContext }\n","import { useState, useEffect } from \"react\"\nimport { useTOC, useThemeConfig } from \"../runtime/hooks\"\nimport type { TOCItem } from \"../config/types\"\n\nexport function TOC() {\n const toc = useTOC()\n const themeConfig = useThemeConfig()\n const [activeId, setActiveId] = useState<string>(\"\")\n\n const label = themeConfig.outline?.label ?? \"On this page\"\n\n useEffect(() => {\n if (toc.length === 0) return\n\n const headingElements = toc.map((item) => document.getElementById(item.id)).filter(Boolean)\n\n if (headingElements.length === 0) return\n\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n setActiveId(entry.target.id)\n break\n }\n }\n },\n {\n rootMargin: \"-80px 0px -80% 0px\",\n threshold: 0,\n }\n )\n\n headingElements.forEach((el) => el && observer.observe(el))\n\n return () => {\n headingElements.forEach((el) => el && observer.unobserve(el))\n }\n }, [toc])\n\n if (toc.length === 0) {\n return null\n }\n\n return (\n <aside className=\"ardo-toc\">\n <div className=\"ardo-toc-container\">\n <h3 className=\"ardo-toc-title\">{label}</h3>\n <nav className=\"ardo-toc-nav\" aria-label=\"Table of contents\">\n <TOCItems items={toc} activeId={activeId} />\n </nav>\n </div>\n </aside>\n )\n}\n\ninterface TOCItemsProps {\n items: TOCItem[]\n activeId: string\n}\n\nfunction TOCItems({ items, activeId }: TOCItemsProps) {\n return (\n <ul className=\"ardo-toc-list\">\n {items.map((item) => (\n <TOCItemComponent key={item.id} item={item} activeId={activeId} />\n ))}\n </ul>\n )\n}\n\ninterface TOCItemComponentProps {\n item: TOCItem\n activeId: string\n}\n\nfunction TOCItemComponent({ item, activeId }: TOCItemComponentProps) {\n const isActive = item.id === activeId\n const hasActiveChild = hasActiveDescendant(item, activeId)\n\n return (\n <li className=\"ardo-toc-item\">\n <a\n href={`#${item.id}`}\n className={[\n `ardo-toc-link ardo-toc-link-${item.level}`,\n isActive && \"active\",\n hasActiveChild && \"child-active\",\n ]\n .filter(Boolean)\n .join(\" \")}\n onClick={(e) => {\n e.preventDefault()\n const element = document.getElementById(item.id)\n if (element) {\n element.scrollIntoView({ behavior: \"smooth\" })\n window.history.pushState(null, \"\", `#${item.id}`)\n }\n }}\n >\n {item.text}\n </a>\n {item.children && item.children.length > 0 && (\n <TOCItems items={item.children} activeId={activeId} />\n )}\n </li>\n )\n}\n\nfunction hasActiveDescendant(item: TOCItem, activeId: string): boolean {\n if (!item.children) return false\n\n for (const child of item.children) {\n if (child.id === activeId) return true\n if (hasActiveDescendant(child, activeId)) return true\n }\n\n return false\n}\n","import { type ReactNode } from \"react\"\nimport { usePageData } from \"../runtime/hooks\"\nimport { Layout } from \"./Layout\"\nimport { Content } from \"./Content\"\nimport { TOC } from \"./TOC\"\n\n// =============================================================================\n// DocPage Component (includes Layout - for backwards compatibility)\n// =============================================================================\n\ninterface DocPageProps {\n children: ReactNode\n}\n\n/**\n * Full documentation page with Layout wrapper.\n * Use this when you don't have a _layout.tsx file.\n *\n * @example\n * ```tsx\n * <DocPage>\n * <Content />\n * </DocPage>\n * ```\n */\nexport function DocPage({ children }: DocPageProps) {\n const pageData = usePageData()\n const showToc =\n pageData?.frontmatter.outline !== false && pageData?.toc && pageData.toc.length > 0\n\n return (\n <Layout>\n <div className=\"ardo-doc-page\">\n <Content>{children}</Content>\n {showToc && <TOC />}\n </div>\n </Layout>\n )\n}\n\n// =============================================================================\n// DocContent Component (without Layout - for use with _layout.tsx)\n// =============================================================================\n\ninterface DocContentProps {\n children: ReactNode\n}\n\n/**\n * Documentation content without Layout wrapper.\n * Use this when you have a _layout.tsx that provides the Layout.\n *\n * @example\n * ```tsx\n * // In _layout.tsx:\n * <Layout>\n * <Header ... />\n * <Sidebar ... />\n * <Outlet />\n * <Footer ... />\n * </Layout>\n *\n * // In page routes:\n * <DocContent>\n * <MarkdownContent />\n * </DocContent>\n * ```\n */\nexport function DocContent({ children }: DocContentProps) {\n const pageData = usePageData()\n const showToc =\n pageData?.frontmatter.outline !== false && pageData?.toc && pageData.toc.length > 0\n\n return (\n <div className=\"ardo-doc-page\">\n <Content>{children}</Content>\n {showToc && <TOC />}\n </div>\n )\n}\n\n// =============================================================================\n// DocLayout Component (legacy alias)\n// =============================================================================\n\ninterface DocLayoutProps {\n content: ReactNode\n}\n\n/**\n * @deprecated Use DocPage or DocContent instead\n */\nexport function DocLayout({ content }: DocLayoutProps) {\n return <DocPage>{content}</DocPage>\n}\n","import { Link } from \"react-router\"\nimport { usePageData, useConfig, useThemeConfig } from \"../runtime/hooks\"\nimport { Header, SocialLink } from \"./Header\"\nimport { Footer } from \"./Footer\"\nimport { Nav, NavLink } from \"./Nav\"\n\nexport function HomePage() {\n const pageData = usePageData()\n const config = useConfig()\n const themeConfig = useThemeConfig()\n\n const hero = pageData?.frontmatter.hero\n const features = pageData?.frontmatter.features\n\n return (\n <div className=\"ardo-home\">\n <Header\n logo={themeConfig.logo}\n title={themeConfig.siteTitle !== false ? config.title : undefined}\n nav={\n themeConfig.nav && themeConfig.nav.length > 0 ? (\n <Nav>\n {themeConfig.nav.map((item, index) => (\n <NavLink key={index} to={item.link}>\n {item.text}\n </NavLink>\n ))}\n </Nav>\n ) : undefined\n }\n actions={themeConfig.socialLinks?.map((link, index) => (\n <SocialLink key={index} href={link.link} icon={link.icon} ariaLabel={link.ariaLabel} />\n ))}\n />\n\n <main className=\"ardo-home-main\">\n {hero && (\n <section className=\"ardo-hero\">\n <div className=\"ardo-hero-container\">\n {hero.image && (\n <div className=\"ardo-hero-image\">\n <img\n src={typeof hero.image === \"string\" ? hero.image : hero.image.light}\n alt={hero.name || config.title}\n />\n </div>\n )}\n\n <div className=\"ardo-hero-content\">\n {hero.name && <h1 className=\"ardo-hero-name\">{hero.name}</h1>}\n {hero.text && <p className=\"ardo-hero-text\">{hero.text}</p>}\n {hero.tagline && <p className=\"ardo-hero-tagline\">{hero.tagline}</p>}\n\n {hero.actions && hero.actions.length > 0 && (\n <div className=\"ardo-hero-actions\">\n {hero.actions.map((action, index) => (\n <Link\n key={index}\n to={action.link}\n className={`ardo-hero-action ardo-hero-action-${action.theme || \"brand\"}`}\n >\n {action.text}\n </Link>\n ))}\n </div>\n )}\n </div>\n </div>\n </section>\n )}\n\n {features && features.length > 0 && (\n <section className=\"ardo-features\">\n <div className=\"ardo-features-container\">\n {features.map((feature, index) => (\n <div key={index} className=\"ardo-feature\">\n {feature.icon && <div className=\"ardo-feature-icon\">{feature.icon}</div>}\n <h3 className=\"ardo-feature-title\">{feature.title}</h3>\n <p className=\"ardo-feature-details\">{feature.details}</p>\n {feature.link && (\n <Link to={feature.link} className=\"ardo-feature-link\">\n {feature.linkText || \"Learn more\"}\n </Link>\n )}\n </div>\n ))}\n </div>\n </section>\n )}\n </main>\n\n <Footer />\n </div>\n )\n}\n","import { type ComponentProps, type ReactNode } from \"react\"\nimport { Link } from \"react-router\"\n\n/** Internal route path from React Router */\ntype RoutePath = ComponentProps<typeof Link>[\"to\"]\n\n/** External URL starting with http:// or https:// */\ntype ExternalUrl = `http://${string}` | `https://${string}`\n\nexport interface HeroAction {\n /** Button text */\n text: string\n /** Link destination - internal route path or external URL */\n link: RoutePath | ExternalUrl\n /** Visual theme: \"brand\" for primary, \"alt\" for secondary */\n theme?: \"brand\" | \"alt\"\n /** Optional icon as ReactNode (e.g. Lucide icon component) */\n icon?: ReactNode\n}\n\nexport interface HeroImage {\n /** Image for light mode */\n light: string\n /** Image for dark mode */\n dark?: string\n /** Alt text for the image */\n alt?: string\n}\n\nexport interface HeroProps {\n /** Large title displayed prominently */\n name?: string\n /** Secondary text below the name */\n text?: string\n /** Descriptive tagline */\n tagline?: string\n /** Hero image - can be a string URL or an object with light/dark variants */\n image?: string | HeroImage\n /** Call-to-action buttons */\n actions?: HeroAction[]\n /** Additional CSS class */\n className?: string\n /** Version string displayed as a pill badge above the name */\n version?: string\n}\n\n/**\n * Hero section component for landing pages.\n *\n * @example\n * ```tsx\n * import { ArrowRight, Github } from \"lucide-react\"\n *\n * <Hero\n * name=\"Ardo\"\n * text=\"React-first Documentation\"\n * tagline=\"Build beautiful documentation sites with React.\"\n * image=\"/logo.svg\"\n * actions={[\n * { text: \"Get Started\", link: \"/guide/getting-started\", theme: \"brand\", icon: <ArrowRight size={16} /> },\n * { text: \"GitHub\", link: \"https://github.com/...\", theme: \"alt\", icon: <Github size={16} /> }\n * ]}\n * />\n * ```\n */\nexport function Hero({ name, text, tagline, image, actions, className, version }: HeroProps) {\n const imageUrl = typeof image === \"string\" ? image : image?.light\n const imageAlt = typeof image === \"string\" ? name : (image?.alt ?? name)\n\n return (\n <section className={className ?? \"ardo-hero\"}>\n <div className=\"ardo-hero-container ardo-hero-animate\">\n {image && (\n <div className=\"ardo-hero-image\">\n <img src={imageUrl} alt={imageAlt} />\n </div>\n )}\n\n <div className=\"ardo-hero-content\">\n {version && <span className=\"ardo-hero-version\">v{version}</span>}\n {name && <h1 className=\"ardo-hero-name\">{name}</h1>}\n {text && <p className=\"ardo-hero-text\">{text}</p>}\n {tagline && <p className=\"ardo-hero-tagline\">{tagline}</p>}\n\n {actions && actions.length > 0 && (\n <div className=\"ardo-hero-actions\">\n {actions.map((action, index) => {\n const link = action.link\n const isExternal =\n typeof link === \"string\" &&\n (link.startsWith(\"http://\") || link.startsWith(\"https://\"))\n const className = `ardo-hero-action ardo-hero-action-${action.theme || \"brand\"}`\n\n const content = (\n <>\n {action.icon}\n {action.text}\n </>\n )\n\n if (isExternal) {\n return (\n <a\n key={index}\n href={link}\n className={className}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {content}\n </a>\n )\n }\n\n return (\n <Link key={index} to={link} className={className}>\n {content}\n </Link>\n )\n })}\n </div>\n )}\n </div>\n </div>\n </section>\n )\n}\n","import { Link } from \"react-router\"\nimport type { CSSProperties, ReactNode } from \"react\"\n\nexport interface FeatureItem {\n /** Feature title */\n title: string\n /** Icon as ReactNode (emoji, Lucide icon component, or any JSX) */\n icon?: ReactNode\n /** Feature description */\n details: string\n /** Optional link */\n link?: string\n /** Link text (defaults to \"Learn more\") */\n linkText?: string\n}\n\nexport interface FeaturesProps {\n /** Array of feature items to display */\n items: FeatureItem[]\n /** Section title */\n title?: string\n /** Section subtitle */\n subtitle?: string\n /** Additional CSS class */\n className?: string\n}\n\nexport interface FeatureCardProps extends FeatureItem {\n /** Additional CSS class */\n className?: string\n}\n\n/**\n * Individual feature card component.\n *\n * @example\n * ```tsx\n * import { Zap } from \"lucide-react\"\n *\n * // Using emoji\n * <FeatureCard title=\"Fast\" icon=\"⚡\" details=\"Lightning fast.\" />\n *\n * // Using Lucide icon (tree-shakeable)\n * <FeatureCard title=\"Fast\" icon={<Zap size={28} />} details=\"Lightning fast.\" />\n * ```\n */\nexport function FeatureCard({\n title,\n icon,\n details,\n link,\n linkText,\n className,\n style,\n}: FeatureCardProps & { style?: CSSProperties }) {\n return (\n <div className={className ?? \"ardo-feature\"} style={style}>\n {icon && <div className=\"ardo-feature-icon\">{icon}</div>}\n <h3 className=\"ardo-feature-title\">{title}</h3>\n <p className=\"ardo-feature-details\">{details}</p>\n {link && (\n <Link to={link} className=\"ardo-feature-link\">\n {linkText || \"Learn more\"}\n </Link>\n )}\n </div>\n )\n}\n\n/**\n * Features grid component for displaying multiple feature cards.\n *\n * @example\n * ```tsx\n * <Features\n * title=\"Key Features\"\n * subtitle=\"Everything you need to build great docs\"\n * items={[\n * { title: \"React-First\", icon: \"⚛️\", details: \"Built on React.\" },\n * { title: \"Fast\", icon: \"⚡\", details: \"Powered by Vite.\" },\n * { title: \"Type-Safe\", icon: \"📝\", details: \"Full TypeScript support.\" },\n * ]}\n * />\n * ```\n */\nexport function Features({ items, title, subtitle, className }: FeaturesProps) {\n if (!items || items.length === 0) {\n return null\n }\n\n return (\n <section className={className ?? \"ardo-features\"}>\n {(title || subtitle) && (\n <div className=\"ardo-features-header\">\n {title && <h2 className=\"ardo-features-title\">{title}</h2>}\n {subtitle && <p className=\"ardo-features-subtitle\">{subtitle}</p>}\n </div>\n )}\n <div className=\"ardo-features-container\">\n {items.map((feature, index) => (\n <FeatureCard key={index} {...feature} style={{ animationDelay: `${index * 80}ms` }} />\n ))}\n </div>\n </section>\n )\n}\n","import { type ReactNode } from \"react\"\n\nexport interface StepsProps {\n /** Content to display — expects an ordered list (`<ol>`) from MDX */\n children: ReactNode\n}\n\n/**\n * A wrapper for ordered lists that renders numbered step indicators.\n *\n * @example\n * ```mdx\n * <Steps>\n * 1. Install the package\n * 2. Configure your site\n * 3. Start writing\n * </Steps>\n * ```\n */\nexport function Steps({ children }: StepsProps) {\n return <div className=\"ardo-steps\">{children}</div>\n}\n","import {\n type ReactNode,\n type ReactElement,\n type HTMLAttributes,\n Children,\n isValidElement,\n cloneElement,\n} from \"react\"\n\nexport interface FileTreeProps {\n /** Content to display — expects an unordered list (`<ul>`) from MDX */\n children: ReactNode\n}\n\n/**\n * Extracts text content from nested React nodes.\n */\nfunction getTextContent(node: ReactNode): string {\n if (typeof node === \"string\") return node\n if (typeof node === \"number\") return String(node)\n if (!isValidElement(node)) return \"\"\n const children = (node.props as { children?: ReactNode }).children\n if (!children) return \"\"\n return Children.toArray(children).map(getTextContent).join(\"\")\n}\n\n/**\n * Checks whether a list item represents a directory (text ends with `/`).\n */\nfunction isDirectory(node: ReactElement): boolean {\n const children = (node.props as { children?: ReactNode }).children\n const childArray = Children.toArray(children)\n\n // If the item has a nested <ul>, it's a directory\n for (const child of childArray) {\n if (isValidElement(child) && (child.type === \"ul\" || child.type === \"ol\")) {\n return true\n }\n }\n\n // If text content ends with `/`, it's a directory\n const text = getTextContent(node).trim()\n return text.endsWith(\"/\")\n}\n\n/**\n * Recursively processes `<ul>` / `<li>` children, applying CSS classes\n * for directory vs. file styling.\n */\nfunction processChildren(children: ReactNode): ReactNode {\n return Children.map(children, (child) => {\n if (!isValidElement(child)) return child\n\n const props = child.props as { children?: ReactNode; className?: string }\n\n const el = child as ReactElement<HTMLAttributes<HTMLElement>>\n\n if (child.type === \"li\") {\n const isDir = isDirectory(child)\n const className = [props.className, isDir ? \"ardo-filetree-dir\" : \"ardo-filetree-file\"]\n .filter(Boolean)\n .join(\" \")\n\n return cloneElement(el, { className }, processChildren(props.children))\n }\n\n if (child.type === \"ul\" || child.type === \"ol\") {\n return cloneElement(el, {}, processChildren(props.children))\n }\n\n return child\n })\n}\n\n/**\n * A wrapper for unordered lists that renders a file/folder tree with icons.\n *\n * @example\n * ```mdx\n * <FileTree>\n * - src/\n * - components/\n * - Header.tsx\n * - Footer.tsx\n * - index.ts\n * - package.json\n * - README.md\n * </FileTree>\n * ```\n */\nexport function FileTree({ children }: FileTreeProps) {\n return <div className=\"ardo-filetree\">{processChildren(children)}</div>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAyB,kBAAkB;AAC3C,SAAS,OAAO,MAAM,SAAS,yBAAyB;AAyClD,SACE,KADF;AAlCN,IAAM,eACJ;AA0BK,SAAS,WAAW,EAAE,UAAU,SAAS,KAAK,GAAoB;AAEvE,QAAM,UAAU,WAAW,WAAW;AACtC,QAA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I,EAAE,KAAK;AACvC,SAAO,KAAK,SAAS,GAAG;AAC1B;AAMA,SAAS,gBAAgB,UAAgC;AACvD,SAAOD,UAAS,IAAI,UAAU,CAAC,UAAU;AACvC,QAAI,CAACC,gBAAe,KAAK,EAAG,QAAO;AAEnC,UAAM,QAAQ,MAAM;AAEpB,UAAM,KAAK;AAEX,QAAI,MAAM,SAAS,MAAM;AACvB,YAAM,QAAQ,YAAY,KAAK;AAC/B,YAAM,YAAY,CAAC,MAAM,WAAW,QAAQ,sBAAsB,oBAAoB,EACnF,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,aAAO,aAAa,IAAI,EAAE,UAAU,GAAG,gBAAgB,MAAM,QAAQ,CAAC;AAAA,IACxE;AAEA,QAAI,MAAM,SAAS,QAAQ,MAAM,SAAS,MAAM;AAC9C,aAAO,aAAa,IAAI,CAAC,GAAG,gBAAgB,MAAM,QAAQ,CAAC;AAAA,IAC7D;AAEA,WAAO;AAAA,EACT,CAAC;AACH;AAkBO,SAAS,SAAS,EAAE,SAAS,GAAkB;AACpD,SAAO,gBAAAC,MAAC,SAAI,WAAU,iBAAiB,0BAAgB,QAAQ,GAAE;AACnE;","names":["useLocation","useState","jsx","jsxs","jsx","jsxs","useState","useState","useContext","jsx","jsxs","useContext","useState","jsx","jsxs","jsx","useLocation","useState","createContext","useContext","RouterNavLink","jsx","jsxs","NavLink","useState","useEffect","jsx","jsxs","useState","useEffect","jsx","jsxs","Link","jsx","jsxs","NavLink","Link","Link","Fragment","jsx","jsxs","className","Link","jsx","jsxs","jsx","Children","isValidElement","jsx"]}
@@ -7,11 +7,13 @@ import {
7
7
  } from "typedoc";
8
8
  import path from "path";
9
9
  import fs from "fs/promises";
10
+ import { readPackageUp } from "read-package-up";
10
11
  var TypeDocGenerator = class {
11
12
  config;
12
13
  app;
13
14
  project;
14
15
  basePath;
16
+ packageNameCache = /* @__PURE__ */ new Map();
15
17
  constructor(config) {
16
18
  this.config = {
17
19
  out: "api",
@@ -36,6 +38,7 @@ var TypeDocGenerator = class {
36
38
  this.basePath = "/" + this.config.out;
37
39
  }
38
40
  async generate(outputDir) {
41
+ await Promise.all(this.config.entryPoints.map((ep) => this.resolvePackageName(ep)));
39
42
  const typedocOptions = {
40
43
  entryPoints: this.config.entryPoints,
41
44
  tsconfig: this.config.tsconfig,
@@ -337,6 +340,17 @@ var TypeDocGenerator = class {
337
340
  }
338
341
  };
339
342
  }
343
+ async resolvePackageName(filePath) {
344
+ const dir = path.dirname(path.resolve(filePath));
345
+ if (this.packageNameCache.has(dir)) {
346
+ return this.packageNameCache.get(dir);
347
+ }
348
+ const result = await readPackageUp({ cwd: dir });
349
+ const name = result?.packageJson.name;
350
+ const resolved = name ? name.replace(/^@[^/]+\//, "") : void 0;
351
+ this.packageNameCache.set(dir, resolved);
352
+ return resolved;
353
+ }
340
354
  getModuleNameFromPath(filePath) {
341
355
  const parts = filePath.split("/");
342
356
  const basename = (parts.pop() || filePath).replace(/\.(ts|tsx|js|jsx)$/, "");
@@ -344,6 +358,11 @@ var TypeDocGenerator = class {
344
358
  if (parent && parent !== "src") {
345
359
  return `${parent}/${basename}`;
346
360
  }
361
+ if (basename === "index") {
362
+ for (const packageName of this.packageNameCache.values()) {
363
+ if (packageName) return packageName;
364
+ }
365
+ }
347
366
  return basename;
348
367
  }
349
368
  generateIndexPage() {
@@ -1013,4 +1032,4 @@ export {
1013
1032
  TypeDocGenerator,
1014
1033
  generateApiDocs
1015
1034
  };
1016
- //# sourceMappingURL=chunk-7L64KVOU.js.map
1035
+ //# sourceMappingURL=chunk-CYZLI4AU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/typedoc/generator.ts"],"sourcesContent":["import {\n Application,\n TSConfigReader,\n TypeDocReader,\n type ProjectReflection,\n ReflectionKind,\n type DeclarationReflection,\n type SignatureReflection,\n type TypeParameterReflection,\n} from \"typedoc\"\nimport path from \"path\"\nimport fs from \"fs/promises\"\nimport { readPackageUp } from \"read-package-up\"\nimport type { TypeDocConfig, GeneratedApiDoc } from \"./types\"\n\nexport class TypeDocGenerator {\n private config: TypeDocConfig\n private app: Application | undefined\n private project: ProjectReflection | undefined\n private basePath: string\n private packageNameCache = new Map<string, string | undefined>()\n\n constructor(config: TypeDocConfig) {\n this.config = {\n out: \"api\",\n excludeExternals: true,\n excludePrivate: true,\n excludeProtected: false,\n excludeInternal: true,\n sort: [\"source-order\"],\n sidebar: {\n title: \"API Reference\",\n position: 100,\n collapsed: false,\n },\n markdown: {\n breadcrumbs: true,\n hierarchy: true,\n sourceLinks: true,\n codeBlocks: true,\n },\n ...config,\n }\n // Use the output directory as the base path for links\n this.basePath = \"/\" + this.config.out!\n }\n\n async generate(outputDir: string): Promise<GeneratedApiDoc[]> {\n // Pre-populate package name cache for all entry points\n await Promise.all(this.config.entryPoints.map((ep) => this.resolvePackageName(ep)))\n\n const typedocOptions: Record<string, unknown> = {\n entryPoints: this.config.entryPoints,\n tsconfig: this.config.tsconfig,\n excludeExternals: this.config.excludeExternals,\n excludePrivate: this.config.excludePrivate,\n excludeProtected: this.config.excludeProtected,\n excludeInternal: this.config.excludeInternal,\n sort: this.config.sort,\n }\n\n // Only pass array/string options when explicitly set to avoid\n // TypeDoc errors like \"option must be set to an array of strings\"\n if (this.config.exclude) typedocOptions.exclude = this.config.exclude\n if (this.config.categoryOrder) typedocOptions.categoryOrder = this.config.categoryOrder\n if (this.config.groupOrder) typedocOptions.groupOrder = this.config.groupOrder\n if (this.config.plugin) typedocOptions.plugin = this.config.plugin\n if (this.config.readme) typedocOptions.readme = this.config.readme\n\n this.app = await Application.bootstrapWithPlugins(typedocOptions, [\n new TSConfigReader(),\n new TypeDocReader(),\n ])\n\n this.project = await this.app.convert()\n\n if (!this.project) {\n throw new Error(\"TypeDoc conversion failed\")\n }\n\n const docs = this.generateMarkdownDocs()\n const apiDir = path.join(outputDir, this.config.out!)\n\n await fs.mkdir(apiDir, { recursive: true })\n\n for (const doc of docs) {\n const filePath = path.join(apiDir, doc.path)\n const dir = path.dirname(filePath)\n await fs.mkdir(dir, { recursive: true })\n\n const frontmatterLines = [\n \"---\",\n `title: ${doc.frontmatter.title}`,\n doc.frontmatter.description ? `description: ${doc.frontmatter.description}` : null,\n doc.frontmatter.sidebar_position !== undefined\n ? `sidebar_position: ${doc.frontmatter.sidebar_position}`\n : null,\n doc.frontmatter.sidebar === false ? `sidebar: false` : null,\n \"---\",\n ].filter((line): line is string => line !== null)\n\n const frontmatter = frontmatterLines.join(\"\\n\") + \"\\n\\n\"\n\n await fs.writeFile(filePath, frontmatter + doc.content)\n }\n\n return docs\n }\n\n private generateMarkdownDocs(): GeneratedApiDoc[] {\n if (!this.project) return []\n\n const docs: GeneratedApiDoc[] = []\n\n // Generate index page\n docs.push(this.generateIndexPage())\n\n const children = this.project.children || []\n\n // Group functions and type aliases by source file\n // React components (PascalCase) get their own pages\n const functionsByFile = new Map<string, DeclarationReflection[]>()\n const typesByFile = new Map<string, DeclarationReflection[]>()\n const componentItems: DeclarationReflection[] = []\n const standaloneItems: DeclarationReflection[] = []\n\n for (const child of children) {\n const sourceFile = child.sources?.[0]?.fileName\n\n if (child.kind === ReflectionKind.Function && sourceFile) {\n // React components are PascalCase and get individual pages\n if (this.isReactComponent(child.name)) {\n componentItems.push(child)\n } else {\n const existing = functionsByFile.get(sourceFile) || []\n existing.push(child)\n functionsByFile.set(sourceFile, existing)\n }\n } else if (child.kind === ReflectionKind.TypeAlias && sourceFile) {\n const existing = typesByFile.get(sourceFile) || []\n existing.push(child)\n typesByFile.set(sourceFile, existing)\n } else {\n standaloneItems.push(child)\n }\n }\n\n // Generate grouped pages for functions (by source file)\n for (const [sourceFile, functions] of functionsByFile) {\n docs.push(this.generateGroupedFunctionsPage(sourceFile, functions))\n }\n\n // Generate grouped pages for types (by source file)\n for (const [sourceFile, types] of typesByFile) {\n docs.push(this.generateGroupedTypesPage(sourceFile, types))\n }\n\n // Generate individual pages for React components\n // Sort alphabetically for consistent prev/next navigation\n const sortedComponents = [...componentItems].sort((a, b) => a.name.localeCompare(b.name))\n for (let i = 0; i < sortedComponents.length; i++) {\n const prev = i > 0 ? sortedComponents[i - 1] : null\n const next = i < sortedComponents.length - 1 ? sortedComponents[i + 1] : null\n docs.push(this.generateComponentPage(sortedComponents[i], prev, next))\n }\n\n // Group standalone items by kind for prev/next navigation within each group\n const itemsByKind = new Map<number, DeclarationReflection[]>()\n for (const child of standaloneItems) {\n const kind = child.kind\n const existing = itemsByKind.get(kind) || []\n existing.push(child)\n itemsByKind.set(kind, existing)\n }\n\n // Generate individual pages for classes, interfaces, enums, etc. with prev/next within group\n for (const [, items] of itemsByKind) {\n const sortedItems = [...items].sort((a, b) => a.name.localeCompare(b.name))\n for (let i = 0; i < sortedItems.length; i++) {\n const prev = i > 0 ? sortedItems[i - 1] : null\n const next = i < sortedItems.length - 1 ? sortedItems[i + 1] : null\n docs.push(...this.generateReflectionDocs(sortedItems[i], \"\", prev, next))\n }\n }\n\n // Generate category index pages for non-empty categories\n docs.push(\n ...this.generateCategoryIndexPages(\n docs,\n componentItems,\n functionsByFile,\n typesByFile,\n standaloneItems\n )\n )\n\n return docs\n }\n\n private generateCategoryIndexPages(\n docs: GeneratedApiDoc[],\n componentItems: DeclarationReflection[],\n functionsByFile: Map<string, DeclarationReflection[]>,\n typesByFile: Map<string, DeclarationReflection[]>,\n standaloneItems: DeclarationReflection[]\n ): GeneratedApiDoc[] {\n const indexPages: GeneratedApiDoc[] = []\n\n // Components index\n if (componentItems.length > 0) {\n const sorted = [...componentItems].sort((a, b) => a.name.localeCompare(b.name))\n const content = [\n `# Components`,\n \"\",\n ...sorted.map((c) => {\n const desc = c.comment?.summary ? ` - ${this.renderCommentShort(c.comment.summary)}` : \"\"\n return `- [${c.name}](${this.buildLink(\"components\", this.getSlug(c.name))})${desc}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"components/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Components\", sidebar: false },\n })\n }\n\n // Functions index\n if (functionsByFile.size > 0) {\n const sortedModules = [...functionsByFile.entries()].sort((a, b) =>\n this.getModuleNameFromPath(a[0]).localeCompare(this.getModuleNameFromPath(b[0]))\n )\n const content = [\n `# Functions`,\n \"\",\n ...sortedModules.map(([sourceFile, functions]) => {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const funcNames = functions\n .map((f) => f.name)\n .sort()\n .join(\", \")\n return `- [${moduleName}](${this.buildLink(\"functions\", slug)}) - ${funcNames}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"functions/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Functions\", sidebar: false },\n })\n }\n\n // Group standalone items by kind for category indexes\n const interfaces = standaloneItems.filter((c) => c.kind === ReflectionKind.Interface)\n const classes = standaloneItems.filter((c) => c.kind === ReflectionKind.Class)\n\n // Interfaces index\n if (interfaces.length > 0) {\n const sorted = [...interfaces].sort((a, b) => a.name.localeCompare(b.name))\n const content = [\n `# Interfaces`,\n \"\",\n ...sorted.map((item) => {\n const desc = item.comment?.summary\n ? ` - ${this.renderCommentShort(item.comment.summary)}`\n : \"\"\n return `- [${item.name}](${this.buildLink(\"interfaces\", this.getSlug(item.name))})${desc}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"interfaces/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Interfaces\", sidebar: false },\n })\n }\n\n // Types index\n if (typesByFile.size > 0) {\n const sortedModules = [...typesByFile.entries()].sort((a, b) =>\n this.getModuleNameFromPath(a[0]).localeCompare(this.getModuleNameFromPath(b[0]))\n )\n const content = [\n `# Types`,\n \"\",\n ...sortedModules.map(([sourceFile, types]) => {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const typeNames = types\n .map((t) => t.name)\n .sort()\n .join(\", \")\n return `- [${moduleName}](${this.buildLink(\"types\", slug)}) - ${typeNames}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"types/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Types\", sidebar: false },\n })\n }\n\n // Classes index\n if (classes.length > 0) {\n const sorted = [...classes].sort((a, b) => a.name.localeCompare(b.name))\n const content = [\n `# Classes`,\n \"\",\n ...sorted.map((item) => {\n const desc = item.comment?.summary\n ? ` - ${this.renderCommentShort(item.comment.summary)}`\n : \"\"\n return `- [${item.name}](${this.buildLink(\"classes\", this.getSlug(item.name))})${desc}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"classes/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Classes\", sidebar: false },\n })\n }\n\n return indexPages\n }\n\n private generateGroupedFunctionsPage(\n sourceFile: string,\n functions: DeclarationReflection[]\n ): GeneratedApiDoc {\n // Extract module name from source file path (e.g., \"src/utils/string.ts\" -> \"string\")\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const content: string[] = []\n\n content.push(`# ${moduleName} Functions`)\n content.push(\"\")\n content.push(`Functions exported from \\`${sourceFile}\\``)\n content.push(\"\")\n\n // Sort functions alphabetically\n const sortedFunctions = [...functions].sort((a, b) => a.name.localeCompare(b.name))\n\n for (const func of sortedFunctions) {\n content.push(`## ${func.name}`)\n content.push(\"\")\n\n // Description\n if (func.comment?.summary) {\n content.push(this.renderComment(func.comment.summary))\n content.push(\"\")\n }\n\n // Signature\n if (func.signatures) {\n for (const sig of func.signatures) {\n content.push(this.renderSignature(sig))\n content.push(\"\")\n }\n }\n\n // Examples\n if (func.comment?.blockTags) {\n const examples = func.comment.blockTags.filter((t) => t.tag === \"@example\")\n if (examples.length > 0) {\n content.push(\"### Example\")\n content.push(\"\")\n for (const example of examples) {\n content.push(this.renderComment(example.content))\n content.push(\"\")\n }\n }\n }\n\n // Source link\n if (this.config.markdown?.sourceLinks && func.sources?.[0]) {\n const source = func.sources[0]\n const sourceUrl = this.getSourceUrl(source.fileName, source.line)\n if (sourceUrl) {\n content.push(`[Source](${sourceUrl})`)\n content.push(\"\")\n }\n }\n\n content.push(\"---\")\n content.push(\"\")\n }\n\n return {\n path: `functions/${slug}.md`,\n content: content.join(\"\\n\"),\n frontmatter: {\n title: `${moduleName} Functions`,\n description: `Functions from ${sourceFile}`,\n },\n }\n }\n\n private generateGroupedTypesPage(\n sourceFile: string,\n types: DeclarationReflection[]\n ): GeneratedApiDoc {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const content: string[] = []\n\n content.push(`# ${moduleName} Types`)\n content.push(\"\")\n content.push(`Type definitions from \\`${sourceFile}\\``)\n content.push(\"\")\n\n // Sort types alphabetically\n const sortedTypes = [...types].sort((a, b) => a.name.localeCompare(b.name))\n\n for (const typeAlias of sortedTypes) {\n content.push(`## ${typeAlias.name}`)\n content.push(\"\")\n\n // Description\n if (typeAlias.comment?.summary) {\n content.push(this.renderComment(typeAlias.comment.summary))\n content.push(\"\")\n }\n\n // Type definition\n if (typeAlias.type) {\n content.push(\"```typescript\")\n content.push(`type ${typeAlias.name} = ${typeAlias.type.toString()}`)\n content.push(\"```\")\n content.push(\"\")\n }\n\n // Source link\n if (this.config.markdown?.sourceLinks && typeAlias.sources?.[0]) {\n const source = typeAlias.sources[0]\n const sourceUrl = this.getSourceUrl(source.fileName, source.line)\n if (sourceUrl) {\n content.push(`[Source](${sourceUrl})`)\n content.push(\"\")\n }\n }\n\n content.push(\"---\")\n content.push(\"\")\n }\n\n return {\n path: `types/${slug}.md`,\n content: content.join(\"\\n\"),\n frontmatter: {\n title: `${moduleName} Types`,\n description: `Type definitions from ${sourceFile}`,\n },\n }\n }\n\n private async resolvePackageName(filePath: string): Promise<string | undefined> {\n const dir = path.dirname(path.resolve(filePath))\n if (this.packageNameCache.has(dir)) {\n return this.packageNameCache.get(dir)\n }\n\n const result = await readPackageUp({ cwd: dir })\n const name = result?.packageJson.name\n const resolved = name ? name.replace(/^@[^/]+\\//, \"\") : undefined\n this.packageNameCache.set(dir, resolved)\n return resolved\n }\n\n private getModuleNameFromPath(filePath: string): string {\n // Include parent directory to avoid naming conflicts\n // \"src/utils/string.ts\" -> \"utils/string\"\n // \"src/ui/Sidebar.tsx\" -> \"ui/Sidebar\"\n // \"runtime/sidebar.ts\" -> \"runtime/sidebar\"\n const parts = filePath.split(\"/\")\n const basename = (parts.pop() || filePath).replace(/\\.(ts|tsx|js|jsx)$/, \"\")\n\n // Get parent directory if available\n const parent = parts.pop()\n if (parent && parent !== \"src\") {\n return `${parent}/${basename}`\n }\n if (basename === \"index\") {\n // Find the first cached package name. We cannot use path.resolve() here\n // because TypeDoc reports sourceFile paths relative to the project root,\n // while entry points were resolved relative to a different CWD (e.g. docs/).\n for (const packageName of this.packageNameCache.values()) {\n if (packageName) return packageName\n }\n }\n return basename\n }\n\n private generateIndexPage(): GeneratedApiDoc {\n const content = [\n `# ${this.config.sidebar?.title || \"API Reference\"}`,\n \"\",\n this.project?.comment?.summary\n ? this.renderComment(this.project.comment.summary)\n : \"Auto-generated API documentation.\",\n \"\",\n ]\n\n const children = this.project?.children || []\n\n // Group functions and types by source file for linking\n // Separate React components from regular functions\n const functionsByFile = new Map<string, DeclarationReflection[]>()\n const typesByFile = new Map<string, DeclarationReflection[]>()\n const componentItems: DeclarationReflection[] = []\n const standaloneItems: DeclarationReflection[] = []\n\n for (const child of children) {\n const sourceFile = child.sources?.[0]?.fileName\n\n if (child.kind === ReflectionKind.Function && sourceFile) {\n if (this.isReactComponent(child.name)) {\n componentItems.push(child)\n } else {\n const existing = functionsByFile.get(sourceFile) || []\n existing.push(child)\n functionsByFile.set(sourceFile, existing)\n }\n } else if (child.kind === ReflectionKind.TypeAlias && sourceFile) {\n const existing = typesByFile.get(sourceFile) || []\n existing.push(child)\n typesByFile.set(sourceFile, existing)\n } else {\n standaloneItems.push(child)\n }\n }\n\n // Render components\n if (componentItems.length > 0) {\n content.push(\"## Components\")\n content.push(\"\")\n\n const sortedComponents = [...componentItems].sort((a, b) => a.name.localeCompare(b.name))\n\n for (const component of sortedComponents) {\n const description = component.comment?.summary\n ? this.renderCommentShort(component.comment.summary)\n : \"\"\n const descSuffix = description ? ` - ${description}` : \"\"\n content.push(\n `- [${component.name}](${this.buildLink(\"components\", this.getSlug(component.name))})${descSuffix}`\n )\n }\n\n content.push(\"\")\n }\n\n // Render grouped function modules\n if (functionsByFile.size > 0) {\n content.push(\"## Functions\")\n content.push(\"\")\n\n // Sort modules alphabetically\n const sortedModules = [...functionsByFile.entries()].sort((a, b) =>\n this.getModuleNameFromPath(a[0]).localeCompare(this.getModuleNameFromPath(b[0]))\n )\n\n for (const [sourceFile, functions] of sortedModules) {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const funcNames = functions\n .map((f) => f.name)\n .sort()\n .join(\", \")\n content.push(`- [${moduleName}](${this.buildLink(\"functions\", slug)}) - ${funcNames}`)\n }\n\n content.push(\"\")\n }\n\n // Render grouped type modules\n if (typesByFile.size > 0) {\n content.push(\"## Type Aliases\")\n content.push(\"\")\n\n const sortedModules = [...typesByFile.entries()].sort((a, b) =>\n this.getModuleNameFromPath(a[0]).localeCompare(this.getModuleNameFromPath(b[0]))\n )\n\n for (const [sourceFile, types] of sortedModules) {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const typeNames = types\n .map((t) => t.name)\n .sort()\n .join(\", \")\n content.push(`- [${moduleName}](${this.buildLink(\"types\", slug)}) - ${typeNames}`)\n }\n\n content.push(\"\")\n }\n\n // Group remaining items by kind\n const groups: Record<string, DeclarationReflection[]> = {}\n\n for (const child of standaloneItems) {\n const kindName = this.getKindGroupName(child.kind, child.name)\n if (!groups[kindName]) {\n groups[kindName] = []\n }\n groups[kindName].push(child)\n }\n\n // Sort each group alphabetically\n for (const group of Object.values(groups)) {\n group.sort((a, b) => a.name.localeCompare(b.name))\n }\n\n // Define the order of groups (excluding Functions and Types which are handled above)\n const groupOrder = [\"Interfaces\", \"Classes\", \"Variables\", \"Enums\", \"Other\"]\n\n // Render each group\n for (const groupName of groupOrder) {\n const group = groups[groupName]\n if (!group || group.length === 0) continue\n\n content.push(`## ${groupName}`)\n content.push(\"\")\n\n for (const child of group) {\n const description = child.comment?.summary\n ? this.renderCommentShort(child.comment.summary)\n : \"\"\n const descSuffix = description ? ` - ${description}` : \"\"\n const groupUrlPrefix = this.getGroupUrlPrefix(child.kind)\n content.push(\n `- [${child.name}](${this.buildLink(groupUrlPrefix, this.getSlug(child.name))})${descSuffix}`\n )\n }\n\n content.push(\"\")\n }\n\n return {\n path: \"index.md\",\n content: content.join(\"\\n\"),\n frontmatter: {\n title: this.config.sidebar?.title || \"API Reference\",\n description: \"Auto-generated API documentation\",\n sidebar_position: 0,\n },\n }\n }\n\n private getKindGroupName(kind: ReflectionKind, name: string): string {\n // Group hooks and components separately from regular functions\n if (kind === ReflectionKind.Function) {\n // React hooks start with \"use\"\n if (name.startsWith(\"use\")) {\n return \"React Hooks\"\n }\n // React components are PascalCase and typically don't start with lowercase\n if (name[0] === name[0].toUpperCase() && !name.includes(\"_\")) {\n return \"React Components\"\n }\n return \"Functions\"\n }\n\n switch (kind) {\n case ReflectionKind.Interface:\n return \"Interfaces\"\n case ReflectionKind.TypeAlias:\n return \"Types\"\n case ReflectionKind.Class:\n return \"Classes\"\n case ReflectionKind.Variable:\n return \"Variables\"\n case ReflectionKind.Enum:\n return \"Enums\"\n default:\n return \"Other\"\n }\n }\n\n private generateReflectionDocs(\n reflection: DeclarationReflection,\n parentPath: string,\n prev: DeclarationReflection | null = null,\n next: DeclarationReflection | null = null\n ): GeneratedApiDoc[] {\n const docs: GeneratedApiDoc[] = []\n const slug = this.getSlug(reflection.name)\n // Use group prefix (e.g., \"interfaces\", \"classes\") when at top level\n const groupPrefix = parentPath ? \"\" : this.getGroupUrlPrefix(reflection.kind)\n const currentPath = parentPath\n ? `${parentPath}/${slug}`\n : groupPrefix\n ? `${groupPrefix}/${slug}`\n : slug\n\n // Generate main page for this reflection\n docs.push(this.generateReflectionPage(reflection, currentPath, prev, next))\n\n // Generate pages for child classes, interfaces, etc.\n // Functions are grouped by source file, not individual pages\n const children = reflection.children || []\n const hasOwnPage = [\n ReflectionKind.Class,\n ReflectionKind.Interface,\n ReflectionKind.Enum,\n ReflectionKind.Namespace,\n ReflectionKind.Module,\n ]\n\n for (const child of children) {\n if (hasOwnPage.includes(child.kind)) {\n docs.push(...this.generateReflectionDocs(child, currentPath))\n }\n }\n\n return docs\n }\n\n private generateReflectionPage(\n reflection: DeclarationReflection,\n pagePath: string,\n prev: DeclarationReflection | null = null,\n next: DeclarationReflection | null = null\n ): GeneratedApiDoc {\n const kind = this.getKindName(reflection.kind)\n const content: string[] = []\n\n // Breadcrumbs\n if (this.config.markdown?.breadcrumbs) {\n content.push(this.generateBreadcrumbs(pagePath))\n content.push(\"\")\n }\n\n // Title\n content.push(`# ${kind}: ${reflection.name}`)\n content.push(\"\")\n\n // Description\n if (reflection.comment?.summary) {\n content.push(this.renderComment(reflection.comment.summary))\n content.push(\"\")\n }\n\n // Type parameters\n if (reflection.typeParameters && reflection.typeParameters.length > 0) {\n content.push(\"## Type Parameters\")\n content.push(\"\")\n content.push(this.renderTypeParameters(reflection.typeParameters))\n content.push(\"\")\n }\n\n // Hierarchy\n if (this.config.markdown?.hierarchy) {\n const hierarchy = this.renderHierarchy(reflection)\n if (hierarchy) {\n content.push(\"## Hierarchy\")\n content.push(\"\")\n content.push(hierarchy)\n content.push(\"\")\n }\n }\n\n // Signature (for functions)\n if (reflection.signatures) {\n content.push(\"## Signature\")\n content.push(\"\")\n for (const sig of reflection.signatures) {\n content.push(this.renderSignature(sig))\n content.push(\"\")\n }\n }\n\n // Properties\n const properties = (reflection.children || []).filter((c) => c.kind === ReflectionKind.Property)\n if (properties.length > 0) {\n content.push(\"## Properties\")\n content.push(\"\")\n for (const prop of properties) {\n content.push(this.renderProperty(prop))\n content.push(\"\")\n }\n }\n\n // Methods\n const methods = (reflection.children || []).filter((c) => c.kind === ReflectionKind.Method)\n if (methods.length > 0) {\n content.push(\"## Methods\")\n content.push(\"\")\n for (const method of methods) {\n content.push(this.renderMethod(method))\n content.push(\"\")\n }\n }\n\n // Enum members\n const enumMembers = (reflection.children || []).filter(\n (c) => c.kind === ReflectionKind.EnumMember\n )\n if (enumMembers.length > 0) {\n content.push(\"## Members\")\n content.push(\"\")\n content.push(\"| Member | Value | Description |\")\n content.push(\"|--------|-------|-------------|\")\n for (const member of enumMembers) {\n const value = member.defaultValue || \"\"\n const desc = member.comment?.summary ? this.renderCommentShort(member.comment.summary) : \"\"\n content.push(`| \\`${member.name}\\` | \\`${value}\\` | ${desc} |`)\n }\n content.push(\"\")\n }\n\n // Type alias definition\n if (reflection.kind === ReflectionKind.TypeAlias && reflection.type) {\n content.push(\"## Type\")\n content.push(\"\")\n content.push(\"```typescript\")\n content.push(`type ${reflection.name} = ${reflection.type.toString()}`)\n content.push(\"```\")\n content.push(\"\")\n }\n\n // Source link\n if (this.config.markdown?.sourceLinks && reflection.sources?.[0]) {\n const source = reflection.sources[0]\n const sourceUrl = this.getSourceUrl(source.fileName, source.line)\n content.push(\"## Source\")\n content.push(\"\")\n if (sourceUrl) {\n content.push(`[${source.fileName}:${source.line}](${sourceUrl})`)\n } else {\n content.push(`${source.fileName}:${source.line}`)\n }\n content.push(\"\")\n }\n\n // Tags (deprecated, example, etc.)\n if (reflection.comment?.blockTags) {\n const examples = reflection.comment.blockTags.filter((t) => t.tag === \"@example\")\n if (examples.length > 0) {\n content.push(\"## Examples\")\n content.push(\"\")\n for (const example of examples) {\n content.push(this.renderComment(example.content))\n content.push(\"\")\n }\n }\n\n const deprecated = reflection.comment.blockTags.find((t) => t.tag === \"@deprecated\")\n if (deprecated) {\n content.push(\":::warning Deprecated\")\n content.push(this.renderComment(deprecated.content))\n content.push(\":::\")\n content.push(\"\")\n }\n\n const see = reflection.comment.blockTags.filter((t) => t.tag === \"@see\")\n if (see.length > 0) {\n content.push(\"## See Also\")\n content.push(\"\")\n for (const s of see) {\n content.push(`- ${this.renderComment(s.content)}`)\n }\n content.push(\"\")\n }\n }\n\n // Prev/Next navigation within group\n if (prev || next) {\n content.push(\"---\")\n content.push(\"\")\n const groupPrefix = this.getGroupUrlPrefix(reflection.kind)\n const prevLink = prev\n ? `[← ${prev.name}](${this.buildLink(groupPrefix, this.getSlug(prev.name))})`\n : \"\"\n const nextLink = next\n ? `[${next.name} →](${this.buildLink(groupPrefix, this.getSlug(next.name))})`\n : \"\"\n if (prev && next) {\n content.push(`${prevLink} | ${nextLink}`)\n } else {\n content.push(prevLink || nextLink)\n }\n content.push(\"\")\n }\n\n return {\n path: `${pagePath}.md`,\n content: content.join(\"\\n\"),\n frontmatter: {\n title: reflection.name,\n description: reflection.comment?.summary\n ? this.renderCommentShort(reflection.comment.summary)\n : `${kind} ${reflection.name}`,\n },\n }\n }\n\n private renderSignature(sig: SignatureReflection): string {\n const lines: string[] = []\n\n if (this.config.markdown?.codeBlocks) {\n lines.push(\"```typescript\")\n }\n\n const typeParams = sig.typeParameters\n ? `<${sig.typeParameters.map((tp) => tp.name).join(\", \")}>`\n : \"\"\n\n const params = (sig.parameters || [])\n .map((p) => {\n const optional = p.flags.isOptional ? \"?\" : \"\"\n const type = p.type ? `: ${p.type.toString()}` : \"\"\n return `${p.name}${optional}${type}`\n })\n .join(\", \")\n\n const returnType = sig.type ? `: ${sig.type.toString()}` : \"\"\n\n lines.push(`function ${sig.name}${typeParams}(${params})${returnType}`)\n\n if (this.config.markdown?.codeBlocks) {\n lines.push(\"```\")\n }\n\n // Parameters table\n if (sig.parameters && sig.parameters.length > 0) {\n lines.push(\"\")\n lines.push(\"### Parameters\")\n lines.push(\"\")\n lines.push(\"| Name | Type | Description |\")\n lines.push(\"|------|------|-------------|\")\n\n for (const param of sig.parameters) {\n const type = param.type ? `\\`${param.type.toString()}\\`` : \"-\"\n const desc = param.comment?.summary ? this.renderCommentShort(param.comment.summary) : \"-\"\n const optional = param.flags.isOptional ? \" (optional)\" : \"\"\n lines.push(`| ${param.name}${optional} | ${type} | ${desc} |`)\n }\n }\n\n // Return value\n if (sig.type && sig.type.toString() !== \"void\") {\n lines.push(\"\")\n lines.push(\"### Returns\")\n lines.push(\"\")\n lines.push(`\\`${sig.type.toString()}\\``)\n\n if (sig.comment?.blockTags) {\n const returns = sig.comment.blockTags.find((t) => t.tag === \"@returns\")\n if (returns) {\n lines.push(\"\")\n lines.push(this.renderComment(returns.content))\n }\n }\n }\n\n return lines.join(\"\\n\")\n }\n\n private renderProperty(prop: DeclarationReflection): string {\n const lines: string[] = []\n\n const flags: string[] = []\n if (prop.flags.isOptional) flags.push(\"optional\")\n if (prop.flags.isReadonly) flags.push(\"readonly\")\n if (prop.flags.isStatic) flags.push(\"static\")\n\n lines.push(`### ${prop.name}`)\n if (flags.length > 0) {\n lines.push(`*${flags.join(\", \")}*`)\n }\n lines.push(\"\")\n\n if (prop.type) {\n lines.push(\"```typescript\")\n lines.push(`${prop.name}: ${prop.type.toString()}`)\n lines.push(\"```\")\n lines.push(\"\")\n }\n\n if (prop.comment?.summary) {\n lines.push(this.renderComment(prop.comment.summary))\n }\n\n if (prop.defaultValue) {\n lines.push(\"\")\n lines.push(`**Default:** \\`${prop.defaultValue}\\``)\n }\n\n return lines.join(\"\\n\")\n }\n\n private renderMethod(method: DeclarationReflection): string {\n const lines: string[] = []\n\n lines.push(`### ${method.name}()`)\n lines.push(\"\")\n\n if (method.signatures) {\n for (const sig of method.signatures) {\n if (sig.comment?.summary) {\n lines.push(this.renderComment(sig.comment.summary))\n lines.push(\"\")\n }\n\n lines.push(this.renderSignature(sig))\n lines.push(\"\")\n }\n }\n\n return lines.join(\"\\n\")\n }\n\n private renderTypeParameters(typeParams: TypeParameterReflection[]): string {\n const lines: string[] = []\n lines.push(\"| Name | Constraint | Default | Description |\")\n lines.push(\"|------|------------|---------|-------------|\")\n\n for (const tp of typeParams) {\n const constraint = tp.type ? `\\`${tp.type.toString()}\\`` : \"-\"\n const defaultVal = tp.default ? `\\`${tp.default.toString()}\\`` : \"-\"\n const desc = tp.comment?.summary ? this.renderCommentShort(tp.comment.summary) : \"-\"\n lines.push(`| ${tp.name} | ${constraint} | ${defaultVal} | ${desc} |`)\n }\n\n return lines.join(\"\\n\")\n }\n\n private renderHierarchy(reflection: DeclarationReflection): string | null {\n const lines: string[] = []\n\n if (reflection.extendedTypes && reflection.extendedTypes.length > 0) {\n lines.push(\"**Extends:**\")\n for (const t of reflection.extendedTypes) {\n lines.push(`- \\`${t.toString()}\\``)\n }\n }\n\n if (reflection.implementedTypes && reflection.implementedTypes.length > 0) {\n lines.push(\"**Implements:**\")\n for (const t of reflection.implementedTypes) {\n lines.push(`- \\`${t.toString()}\\``)\n }\n }\n\n if (reflection.extendedBy && reflection.extendedBy.length > 0) {\n lines.push(\"**Extended by:**\")\n for (const t of reflection.extendedBy) {\n lines.push(`- \\`${t.toString()}\\``)\n }\n }\n\n if (reflection.implementedBy && reflection.implementedBy.length > 0) {\n lines.push(\"**Implemented by:**\")\n for (const t of reflection.implementedBy) {\n lines.push(`- \\`${t.toString()}\\``)\n }\n }\n\n return lines.length > 0 ? lines.join(\"\\n\") : null\n }\n\n private renderComment(parts: { kind: string; text: string }[]): string {\n return parts.map((p) => p.text).join(\"\")\n }\n\n private renderCommentShort(parts: { kind: string; text: string }[]): string {\n const text = this.renderComment(parts)\n const firstSentence = text.split(/[.!?]\\s/)[0]\n return firstSentence.length < text.length ? firstSentence + \".\" : text\n }\n\n private generateBreadcrumbs(pagePath: string): string {\n const parts = pagePath.split(\"/\")\n const breadcrumbs: string[] = [`[API](${this.basePath})`]\n\n let currentPath = \"\"\n for (let i = 0; i < parts.length - 1; i++) {\n currentPath += (currentPath ? \"/\" : \"\") + parts[i]\n breadcrumbs.push(`[${parts[i]}](${this.basePath}/${currentPath})`)\n }\n\n breadcrumbs.push(parts[parts.length - 1])\n\n return breadcrumbs.join(\" / \")\n }\n\n private getKindName(kind: ReflectionKind): string {\n const kindNames: Partial<Record<ReflectionKind, string>> = {\n [ReflectionKind.Class]: \"Class\",\n [ReflectionKind.Interface]: \"Interface\",\n [ReflectionKind.Enum]: \"Enum\",\n [ReflectionKind.TypeAlias]: \"Type\",\n [ReflectionKind.Function]: \"Function\",\n [ReflectionKind.Variable]: \"Variable\",\n [ReflectionKind.Namespace]: \"Namespace\",\n [ReflectionKind.Module]: \"Module\",\n [ReflectionKind.Property]: \"Property\",\n [ReflectionKind.Method]: \"Method\",\n }\n return kindNames[kind] || \"Unknown\"\n }\n\n private getGroupUrlPrefix(kind: ReflectionKind): string {\n const prefixes: Partial<Record<ReflectionKind, string>> = {\n [ReflectionKind.Class]: \"classes\",\n [ReflectionKind.Interface]: \"interfaces\",\n [ReflectionKind.Enum]: \"enums\",\n [ReflectionKind.Variable]: \"variables\",\n [ReflectionKind.Namespace]: \"namespaces\",\n [ReflectionKind.Module]: \"modules\",\n }\n return prefixes[kind] || \"other\"\n }\n\n private getSlug(name: string): string {\n return name\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-|-$/g, \"\")\n }\n\n /**\n * Build a route-compatible link path for a category/slug pair.\n * React Router maps \"category/index.md\" to the \"/category\" route,\n * so links must not include a trailing \"/index\".\n */\n private buildLink(category: string, slug: string): string {\n if (slug === \"index\") {\n return `${this.basePath}/${category}`\n }\n return `${this.basePath}/${category}/${slug}`\n }\n\n private getSourceUrl(fileName: string, line: number): string | null {\n if (!this.config.markdown?.sourceBaseUrl) return null\n const baseUrl = this.config.markdown.sourceBaseUrl.replace(/\\/$/, \"\")\n return `${baseUrl}/${fileName}#L${line}`\n }\n\n /**\n * Check if a function name looks like a React component (PascalCase)\n */\n private isReactComponent(name: string): boolean {\n // React components start with uppercase and don't contain underscores\n // Also check for common component patterns\n if (name[0] !== name[0].toUpperCase()) return false\n if (name.includes(\"_\")) return false\n // Exclude common non-component patterns\n if (name.startsWith(\"use\")) return false // hooks\n if (name.endsWith(\"Props\") || name.endsWith(\"Options\") || name.endsWith(\"Config\")) return false\n return true\n }\n\n /**\n * Generate a page for a React component\n */\n private generateComponentPage(\n component: DeclarationReflection,\n prev: DeclarationReflection | null,\n next: DeclarationReflection | null\n ): GeneratedApiDoc {\n const slug = this.getSlug(component.name)\n const groupPrefix = \"components\"\n const content: string[] = []\n\n content.push(`# ${component.name}`)\n content.push(\"\")\n\n // Description\n if (component.comment?.summary) {\n content.push(this.renderComment(component.comment.summary))\n content.push(\"\")\n }\n\n // Signature\n if (component.signatures) {\n content.push(\"## Usage\")\n content.push(\"\")\n for (const sig of component.signatures) {\n content.push(this.renderComponentSignature(sig, component.name))\n content.push(\"\")\n }\n }\n\n // Examples\n if (component.comment?.blockTags) {\n const examples = component.comment.blockTags.filter((t) => t.tag === \"@example\")\n if (examples.length > 0) {\n content.push(\"## Example\")\n content.push(\"\")\n for (const example of examples) {\n content.push(this.renderComment(example.content))\n content.push(\"\")\n }\n }\n }\n\n // Source link\n if (this.config.markdown?.sourceLinks && component.sources?.[0]) {\n const source = component.sources[0]\n const sourceUrl = this.getSourceUrl(source.fileName, source.line)\n if (sourceUrl) {\n content.push(`[Source](${sourceUrl})`)\n content.push(\"\")\n }\n }\n\n // Prev/Next navigation\n if (prev || next) {\n content.push(\"---\")\n content.push(\"\")\n const prevLink = prev\n ? `[← ${prev.name}](${this.buildLink(groupPrefix, this.getSlug(prev.name))})`\n : \"\"\n const nextLink = next\n ? `[${next.name} →](${this.buildLink(groupPrefix, this.getSlug(next.name))})`\n : \"\"\n if (prev && next) {\n content.push(`${prevLink} | ${nextLink}`)\n } else {\n content.push(prevLink || nextLink)\n }\n content.push(\"\")\n }\n\n return {\n path: `${groupPrefix}/${slug}.md`,\n content: content.join(\"\\n\"),\n frontmatter: {\n title: component.name,\n description: component.comment?.summary\n ? this.renderCommentShort(component.comment.summary)\n : `${component.name} component`,\n },\n }\n }\n\n /**\n * Get the name of a TypeDoc type (handles reference types, etc.)\n */\n private getTypeName(paramType: unknown): string | null {\n if (!paramType || typeof paramType !== \"object\") return null\n\n // Direct name property\n if (\"name\" in paramType && typeof (paramType as { name: unknown }).name === \"string\") {\n return (paramType as { name: string }).name\n }\n\n // Reference type with target\n if (\"type\" in paramType && (paramType as { type: string }).type === \"reference\") {\n const refType = paramType as { name?: string; qualifiedName?: string }\n return refType.name || refType.qualifiedName || null\n }\n\n return null\n }\n\n /**\n * Get props from a component's parameter type\n */\n private getPropsFromType(\n paramType: unknown\n ): Array<{ name: string; type: string; optional: boolean; description: string }> {\n const props: Array<{ name: string; type: string; optional: boolean; description: string }> = []\n\n // Check if it's a reflection type with inline declaration\n if (paramType && typeof paramType === \"object\" && \"declaration\" in paramType) {\n const declaration = (paramType as { declaration: DeclarationReflection }).declaration\n const children = declaration.children || []\n for (const child of children) {\n props.push({\n name: child.name,\n type: child.type ? child.type.toString() : \"unknown\",\n optional: child.flags.isOptional,\n description: child.comment?.summary ? this.renderCommentShort(child.comment.summary) : \"\",\n })\n }\n }\n // Check if it's a reference type - look up the interface in the project\n else {\n const typeName = this.getTypeName(paramType)\n if (typeName) {\n // Find the interface/type alias in the project\n let propsInterface = this.project?.getChildByName(typeName)\n\n // If not found directly, search all children\n if (!propsInterface && this.project?.children) {\n for (const child of this.project.children) {\n if (child.name === typeName) {\n propsInterface = child\n break\n }\n }\n }\n\n if (propsInterface && \"children\" in propsInterface) {\n const children = (propsInterface as DeclarationReflection).children || []\n for (const child of children) {\n props.push({\n name: child.name,\n type: child.type ? child.type.toString() : \"unknown\",\n optional: child.flags.isOptional,\n description: child.comment?.summary\n ? this.renderCommentShort(child.comment.summary)\n : \"\",\n })\n }\n }\n }\n }\n\n return props\n }\n\n /**\n * Render a component signature in a more readable format\n */\n private renderComponentSignature(sig: SignatureReflection, componentName: string): string {\n const lines: string[] = []\n\n // Get props from the first parameter\n const propsParam = sig.parameters?.[0]\n const props = propsParam ? this.getPropsFromType(propsParam.type) : []\n\n // Get the props interface name for linking\n const propsTypeName = propsParam?.type ? this.getTypeName(propsParam.type) : null\n\n // Check if component has children prop\n const hasChildren = props.some((p) => p.name === \"children\")\n // Filter out children from props display (shown in JSX structure instead)\n const displayProps = props.filter((p) => p.name !== \"children\")\n\n lines.push(\"```tsx\")\n lines.push(`<${componentName}`)\n\n if (displayProps.length > 0) {\n for (const prop of displayProps) {\n const optMark = prop.optional ? \"?\" : \"\"\n lines.push(` ${prop.name}${optMark}={${prop.type}}`)\n }\n } else if (!hasChildren) {\n lines.push(` {...props}`)\n }\n\n if (hasChildren) {\n lines.push(`>`)\n lines.push(` {children}`)\n lines.push(`</${componentName}>`)\n } else {\n lines.push(`/>`)\n }\n lines.push(\"```\")\n\n // Props table with link to props interface\n if (props.length > 0) {\n lines.push(\"\")\n if (propsTypeName) {\n lines.push(`## [Props](${this.basePath}/interfaces/${this.getSlug(propsTypeName)})`)\n } else {\n lines.push(\"## Props\")\n }\n lines.push(\"\")\n lines.push(\"| Prop | Type | Required | Description |\")\n lines.push(\"|------|------|----------|-------------|\")\n\n for (const prop of props) {\n const type = `\\`${prop.type}\\``\n const required = prop.optional ? \"No\" : \"Yes\"\n const desc = prop.description || \"-\"\n lines.push(`| ${prop.name} | ${type} | ${required} | ${desc} |`)\n }\n }\n\n // Skip return value for components - it's always Element/JSX.Element\n\n return lines.join(\"\\n\")\n }\n}\n\nexport async function generateApiDocs(\n config: TypeDocConfig,\n outputDir: string\n): Promise<GeneratedApiDoc[]> {\n const generator = new TypeDocGenerator(config)\n return generator.generate(outputDir)\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,OAIK;AACP,OAAO,UAAU;AACjB,OAAO,QAAQ;AACf,SAAS,qBAAqB;AAGvB,IAAM,mBAAN,MAAuB;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAmB,oBAAI,IAAgC;AAAA,EAE/D,YAAY,QAAuB;AACjC,SAAK,SAAS;AAAA,MACZ,KAAK;AAAA,MACL,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,MAChB,kBAAkB;AAAA,MAClB,iBAAiB;AAAA,MACjB,M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AC7C,SAAO,UAAU,SAAS,SAAS;AACrC;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  generateApiDocs
3
- } from "./chunk-7L64KVOU.js";
3
+ } from "./chunk-CYZLI4AU.js";
4
4
 
5
5
  // src/typedoc/vite-plugin.ts
6
6
  import path from "path";
@@ -271,4 +271,4 @@ export {
271
271
  ApiKindBadge,
272
272
  ApiHierarchy
273
273
  };
274
- //# sourceMappingURL=chunk-M5VLOQYV.js.map
274
+ //# sourceMappingURL=chunk-KOYIKUSW.js.map
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-NBRHGTR2.js";
5
5
  import {
6
6
  generateApiDocs
7
- } from "./chunk-7L64KVOU.js";
7
+ } from "./chunk-CYZLI4AU.js";
8
8
 
9
9
  // src/vite/plugin.ts
10
10
  import { reactRouter } from "@react-router/dev/vite";
@@ -1297,4 +1297,4 @@ export {
1297
1297
  getPageDataForRoute,
1298
1298
  generateSidebar2 as generateSidebar
1299
1299
  };
1300
- //# sourceMappingURL=chunk-ASEDNN4I.js.map
1300
+ //# sourceMappingURL=chunk-WSEWAHW3.js.map
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  loadDoc,
8
8
  transformMarkdown,
9
9
  transformMarkdownToReact
10
- } from "./chunk-ASEDNN4I.js";
10
+ } from "./chunk-WSEWAHW3.js";
11
11
  import {
12
12
  defineConfig,
13
13
  loadConfig,
@@ -29,7 +29,7 @@ import {
29
29
  Steps,
30
30
  TOC,
31
31
  ThemeToggle
32
- } from "./chunk-6CQBZBXD.js";
32
+ } from "./chunk-2JWOR7PG.js";
33
33
  import {
34
34
  Search
35
35
  } from "./chunk-BHHI2BO4.js";
@@ -42,11 +42,11 @@ import {
42
42
  ApiSignature,
43
43
  createTypedocWatcher,
44
44
  typedocPlugin
45
- } from "./chunk-M5VLOQYV.js";
45
+ } from "./chunk-KOYIKUSW.js";
46
46
  import {
47
47
  TypeDocGenerator,
48
48
  generateApiDocs
49
- } from "./chunk-7L64KVOU.js";
49
+ } from "./chunk-CYZLI4AU.js";
50
50
  import {
51
51
  CodeBlock,
52
52
  CodeGroup,
@@ -185,12 +185,14 @@ declare class TypeDocGenerator {
185
185
  private app;
186
186
  private project;
187
187
  private basePath;
188
+ private packageNameCache;
188
189
  constructor(config: TypeDocConfig);
189
190
  generate(outputDir: string): Promise<GeneratedApiDoc[]>;
190
191
  private generateMarkdownDocs;
191
192
  private generateCategoryIndexPages;
192
193
  private generateGroupedFunctionsPage;
193
194
  private generateGroupedTypesPage;
195
+ private resolvePackageName;
194
196
  private getModuleNameFromPath;
195
197
  private generateIndexPage;
196
198
  private getKindGroupName;
@@ -7,11 +7,11 @@ import {
7
7
  ApiSignature,
8
8
  createTypedocWatcher,
9
9
  typedocPlugin
10
- } from "../chunk-M5VLOQYV.js";
10
+ } from "../chunk-KOYIKUSW.js";
11
11
  import {
12
12
  TypeDocGenerator,
13
13
  generateApiDocs
14
- } from "../chunk-7L64KVOU.js";
14
+ } from "../chunk-CYZLI4AU.js";
15
15
  export {
16
16
  ApiHierarchy,
17
17
  ApiItem,
package/dist/ui/index.js CHANGED
@@ -22,7 +22,7 @@ import {
22
22
  Steps,
23
23
  TOC,
24
24
  ThemeToggle
25
- } from "../chunk-6CQBZBXD.js";
25
+ } from "../chunk-2JWOR7PG.js";
26
26
  import {
27
27
  Search
28
28
  } from "../chunk-BHHI2BO4.js";
@@ -10,9 +10,9 @@ import {
10
10
  loadDoc,
11
11
  transformMarkdown,
12
12
  transformMarkdownToReact
13
- } from "../chunk-ASEDNN4I.js";
13
+ } from "../chunk-WSEWAHW3.js";
14
14
  import "../chunk-NBRHGTR2.js";
15
- import "../chunk-7L64KVOU.js";
15
+ import "../chunk-CYZLI4AU.js";
16
16
  export {
17
17
  ardoPlugin as ardo,
18
18
  ardoPlugin,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ardo",
3
- "version": "2.7.0",
3
+ "version": "2.7.2",
4
4
  "description": "React-first Static Documentation Framework",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -54,16 +54,17 @@
54
54
  ],
55
55
  "dependencies": {
56
56
  "@mdx-js/rollup": "^3.1.1",
57
- "@react-router/dev": "^7.13.0",
58
- "@shikijs/rehype": "^3.22.0",
59
- "@vitejs/plugin-react": "^5.1.3",
57
+ "@react-router/dev": "^7.13.1",
58
+ "@shikijs/rehype": "^3.23.0",
59
+ "@vitejs/plugin-react": "^5.1.4",
60
60
  "gray-matter": "^4.0.3",
61
61
  "hast-util-to-jsx-runtime": "^2.3.6",
62
62
  "mdast-util-directive": "^3.1.0",
63
63
  "minisearch": "^7.2.0",
64
64
  "react": "^19.2.4",
65
65
  "react-dom": "^19.2.4",
66
- "react-router": "^7.13.0",
66
+ "react-router": "^7.13.1",
67
+ "read-package-up": "^12.0.0",
67
68
  "rehype-parse": "^9.0.1",
68
69
  "rehype-stringify": "^10.0.1",
69
70
  "remark-directive": "^4.0.0",
@@ -72,9 +73,9 @@
72
73
  "remark-mdx-frontmatter": "^5.2.0",
73
74
  "remark-parse": "^11.0.0",
74
75
  "remark-rehype": "^11.1.2",
75
- "shiki": "^3.22.0",
76
- "tailwindcss": "^4.1.18",
77
- "typedoc": "^0.28.16",
76
+ "shiki": "^3.23.0",
77
+ "tailwindcss": "^4.2.1",
78
+ "typedoc": "^0.28.17",
78
79
  "unified": "^11.0.5",
79
80
  "unist-util-visit": "^5.1.0"
80
81
  },
@@ -91,7 +92,7 @@
91
92
  "@types/hast": "^3.0.4",
92
93
  "@types/mdast": "^4.0.4",
93
94
  "@types/mdx": "^2.0.13",
94
- "@types/react": "^19.2.13",
95
+ "@types/react": "^19.2.14",
95
96
  "@types/react-dom": "^19.2.3",
96
97
  "tsup": "^8.5.1",
97
98
  "typescript": "^5.9.3",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/ui/Layout.tsx","../src/ui/ArdoRoot.tsx","../src/ui/Header.tsx","../src/ui/components/ThemeToggle.tsx","../src/ui/Sidebar.tsx","../src/ui/Footer.tsx","../src/ui/Nav.tsx","../src/ui/TOC.tsx","../src/ui/DocPage.tsx","../src/ui/HomePage.tsx","../src/ui/components/Hero.tsx","../src/ui/components/Features.tsx","../src/ui/components/Steps.tsx","../src/ui/components/FileTree.tsx"],"sourcesContent":["import { type ReactNode, useContext } from \"react\"\nimport { Links, Meta, Scripts, ScrollRestoration } from \"react-router\"\nimport { ArdoContext } from \"../runtime/hooks\"\n\n// =============================================================================\n// RootLayout Component (html/head/body shell)\n// =============================================================================\n\nexport interface RootLayoutProps {\n children: ReactNode\n /** Favicon URL (renders <link rel=\"icon\">) */\n favicon?: string\n /** Language attribute for <html> (default: from config or \"en\") */\n lang?: string\n}\n\n/**\n * Default HTML shell for Ardo sites. Replaces the boilerplate `Layout` export\n * that every root.tsx must define for React Router.\n *\n * @example Basic usage\n * ```tsx\n * // app/root.tsx\n * export { RootLayout as Layout } from \"ardo/ui\"\n * ```\n *\n * @example With favicon\n * ```tsx\n * import logo from \"./assets/logo.svg\"\n * export const Layout = (props) => <RootLayout favicon={logo} {...props} />\n * ```\n */\nexport function RootLayout({ children, favicon, lang }: RootLayoutProps) {\n // Use optional context (RootLayout renders before ArdoProvider is available)\n const context = useContext(ArdoContext)\n const resolvedLang = lang ?? context?.config.lang ?? \"en\"\n\n return (\n <html lang={resolvedLang} suppressHydrationWarning>\n <head>\n <meta charSet=\"utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\n {favicon && <link rel=\"icon\" type=\"image/svg+xml\" href={favicon} />}\n <Meta />\n <Links />\n </head>\n <body suppressHydrationWarning>\n {children}\n <ScrollRestoration />\n <Scripts />\n </body>\n </html>\n )\n}\n\n// =============================================================================\n// Layout Component\n// =============================================================================\n\nexport interface LayoutProps {\n /** Header content */\n header?: ReactNode\n /** Sidebar content */\n sidebar?: ReactNode\n /** Footer content */\n footer?: ReactNode\n /** Main content */\n children: ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\n/**\n * Layout component with explicit slot props.\n *\n * @example\n * ```tsx\n * <Layout\n * header={<Header logo=\"/logo.svg\" title=\"Ardo\" nav={...} />}\n * sidebar={<Sidebar>...</Sidebar>}\n * footer={<Footer message=\"MIT License\" />}\n * >\n * <Outlet />\n * </Layout>\n * ```\n */\nexport function Layout({ header, sidebar, footer, children, className }: LayoutProps) {\n return (\n <div className={className ?? \"ardo-layout\"}>\n <a href=\"#main-content\" className=\"ardo-skip-link\">\n Skip to content\n </a>\n {header}\n <div className=\"ardo-layout-container\">\n {sidebar}\n <main id=\"main-content\" className=\"ardo-main\">\n {children}\n </main>\n </div>\n {footer}\n </div>\n )\n}\n","import { type ReactNode } from \"react\"\nimport { Outlet, useLocation } from \"react-router\"\nimport { ArdoProvider } from \"../runtime/hooks\"\nimport type { ArdoConfig, SidebarItem } from \"../config/types\"\nimport { Layout } from \"./Layout\"\nimport { Header, type HeaderProps } from \"./Header\"\nimport { Sidebar, type SidebarProps } from \"./Sidebar\"\nimport { Footer, type FooterProps } from \"./Footer\"\n\n// =============================================================================\n// ArdoRoot Component\n// =============================================================================\n\nexport interface ArdoRootProps {\n /** Ardo config (from virtual:ardo/config) */\n config: ArdoConfig\n /** Sidebar data (from virtual:ardo/sidebar) */\n sidebar: SidebarItem[]\n /** Custom header element (overrides auto-generated header) */\n header?: ReactNode\n /** Custom sidebar element (overrides auto-generated sidebar) */\n sidebarContent?: ReactNode\n /** Custom footer element (overrides auto-generated footer) */\n footer?: ReactNode\n /** Props passed to auto-generated Header (ignored when header is provided) */\n headerProps?: HeaderProps\n /** Props passed to auto-generated Sidebar (ignored when sidebarContent is provided) */\n sidebarProps?: SidebarProps\n /** Props passed to auto-generated Footer (ignored when footer is provided) */\n footerProps?: FooterProps\n /** Additional CSS classes for the layout */\n className?: string\n /** Content to render (defaults to <Outlet />) */\n children?: ReactNode\n}\n\n/**\n * All-in-one root component that combines ArdoProvider, Layout, Header,\n * Sidebar, Footer, and homepage detection into a single component.\n *\n * @example Minimal usage\n * ```tsx\n * import config from \"virtual:ardo/config\"\n * import sidebar from \"virtual:ardo/sidebar\"\n *\n * export default function Root() {\n * return <ArdoRoot config={config} sidebar={sidebar} />\n * }\n * ```\n *\n * @example With custom nav and footer overrides\n * ```tsx\n * export default function Root() {\n * return (\n * <ArdoRoot\n * config={config}\n * sidebar={sidebar}\n * headerProps={{\n * nav: (\n * <Nav>\n * <NavLink to=\"/guide\">Guide</NavLink>\n * <NavLink to=\"/api\">API</NavLink>\n * </Nav>\n * ),\n * }}\n * footerProps={{\n * message: \"Released under the MIT License.\",\n * }}\n * />\n * )\n * }\n * ```\n */\nexport function ArdoRoot({\n config,\n sidebar,\n header,\n sidebarContent,\n footer,\n headerProps,\n sidebarProps,\n footerProps,\n className,\n children,\n}: ArdoRootProps) {\n const location = useLocation()\n const isHomePage = location.pathname === \"/\" || location.pathname === \"\"\n\n const resolvedHeader = header ?? <Header {...headerProps} />\n const resolvedSidebar = isHomePage ? undefined : (sidebarContent ?? <Sidebar {...sidebarProps} />)\n const resolvedFooter = footer ?? <Footer {...footerProps} />\n const resolvedClassName = className ?? (isHomePage ? \"ardo-layout ardo-home\" : \"ardo-layout\")\n\n return (\n <ArdoProvider config={config} sidebar={sidebar}>\n <Layout\n className={resolvedClassName}\n header={resolvedHeader}\n sidebar={resolvedSidebar}\n footer={resolvedFooter}\n >\n {children ?? <Outlet />}\n </Layout>\n </ArdoProvider>\n )\n}\n","import { useState, lazy, Suspense, type ReactNode } from \"react\"\nimport { Link, NavLink as RouterNavLink } from \"react-router\"\nimport {\n GithubIcon,\n TwitterIcon,\n MessageCircleIcon,\n LinkedinIcon,\n YoutubeIcon,\n PackageIcon,\n} from \"./icons\"\nimport { ThemeToggle } from \"./components/ThemeToggle\"\nimport { useConfig, useThemeConfig } from \"../runtime/hooks\"\nimport type { NavItem } from \"../config/types\"\n\nconst LazySearch = lazy(() => import(\"./components/Search\").then((m) => ({ default: m.Search })))\n\n// =============================================================================\n// Header Component\n// =============================================================================\n\nexport interface HeaderProps {\n /** Logo image URL or light/dark variants */\n logo?: string | { light: string; dark: string }\n /** Site title displayed next to logo */\n title?: string\n /** Navigation content (Nav component or custom) */\n nav?: ReactNode\n /** Actions/right side content (social links, custom buttons) */\n actions?: ReactNode\n /** Show search (default: true) */\n search?: boolean\n /** Show theme toggle (default: true) */\n themeToggle?: boolean\n /** Additional CSS classes */\n className?: string\n}\n\n/**\n * Header component with explicit slot props.\n *\n * Automatically pulls `title` from config and `logo`/`siteTitle` from themeConfig.\n * Props serve as overrides.\n *\n * @example Zero-config\n * ```tsx\n * <Header />\n * ```\n *\n * @example With overrides\n * ```tsx\n * <Header\n * logo=\"/logo.svg\"\n * title=\"Ardo\"\n * nav={\n * <Nav>\n * <NavLink to=\"/guide\">Guide</NavLink>\n * <NavLink to=\"/api\">API</NavLink>\n * </Nav>\n * }\n * />\n * ```\n */\nexport function Header({\n logo,\n title,\n nav,\n actions,\n search = true,\n themeToggle = true,\n className,\n}: HeaderProps) {\n const config = useConfig()\n const themeConfig = useThemeConfig()\n const [mobileMenuOpen, setMobileMenuOpen] = useState(false)\n\n const resolvedLogo = logo ?? themeConfig.logo\n const resolvedTitle =\n title ?? (themeConfig.siteTitle !== false ? (themeConfig.siteTitle ?? config.title) : undefined)\n\n // Auto-render nav from themeConfig.nav when no nav prop given\n const resolvedNav =\n nav ?? (themeConfig.nav?.length ? <AutoNav items={themeConfig.nav} /> : undefined)\n\n // Auto-render social links from themeConfig.socialLinks when no actions prop given\n const resolvedActions =\n actions ??\n (themeConfig.socialLinks?.length\n ? themeConfig.socialLinks.map((link, i) => (\n <SocialLink key={i} href={link.link} icon={link.icon} ariaLabel={link.ariaLabel} />\n ))\n : undefined)\n\n return (\n <header className={className ?? \"ardo-header\"}>\n <div className=\"ardo-header-container\">\n {/* Left: Mobile menu button + Logo/Title */}\n <div className=\"ardo-header-left\">\n <button\n className=\"ardo-mobile-menu-button\"\n onClick={() => setMobileMenuOpen(!mobileMenuOpen)}\n aria-label=\"Toggle menu\"\n aria-expanded={mobileMenuOpen}\n >\n <span className=\"ardo-hamburger\">\n <span></span>\n <span></span>\n <span></span>\n </span>\n </button>\n\n <Link to=\"/\" className=\"ardo-logo-link\">\n {resolvedLogo && (\n <img\n src={typeof resolvedLogo === \"string\" ? resolvedLogo : resolvedLogo.light}\n alt={resolvedTitle ?? \"Logo\"}\n className=\"ardo-logo\"\n />\n )}\n {resolvedTitle && <span className=\"ardo-site-title\">{resolvedTitle}</span>}\n </Link>\n </div>\n\n {/* Center: Navigation */}\n {resolvedNav && <div className=\"ardo-nav\">{resolvedNav}</div>}\n\n {/* Right: Search, Theme Toggle, Actions */}\n <div className=\"ardo-header-right\">\n {search && (\n <Suspense fallback={<span className=\"ardo-search-placeholder\" />}>\n <LazySearch />\n </Suspense>\n )}\n {themeToggle && <ThemeToggle />}\n {resolvedActions}\n </div>\n </div>\n\n {/* Mobile menu */}\n {mobileMenuOpen && (\n <div className=\"ardo-mobile-menu\">\n <nav className=\"ardo-mobile-nav\" onClick={() => setMobileMenuOpen(false)}>\n {resolvedNav}\n </nav>\n </div>\n )}\n </header>\n )\n}\n\n// =============================================================================\n// SocialLink Component\n// =============================================================================\n\nexport interface SocialLinkProps {\n /** URL to link to */\n href: string\n /** Social icon type */\n icon: \"github\" | \"twitter\" | \"discord\" | \"linkedin\" | \"youtube\" | \"npm\"\n /** Accessible label */\n ariaLabel?: string\n /** Additional CSS classes */\n className?: string\n}\n\n/**\n * Social media link with icon.\n *\n * @example\n * ```tsx\n * <SocialLink href=\"https://github.com/...\" icon=\"github\" />\n * ```\n */\nexport function SocialLink({ href, icon, ariaLabel, className }: SocialLinkProps) {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={className ?? \"ardo-social-link\"}\n aria-label={ariaLabel ?? icon}\n >\n <SocialIcon icon={icon} />\n </a>\n )\n}\n\n// =============================================================================\n// Auto Nav Component (internal, renders from NavItem[])\n// =============================================================================\n\nfunction AutoNav({ items }: { items: NavItem[] }) {\n return (\n <nav className=\"ardo-nav\">\n {items.map((item, i) => (\n <AutoNavItem key={i} item={item} />\n ))}\n </nav>\n )\n}\n\nfunction AutoNavItem({ item }: { item: NavItem }) {\n if (item.link?.startsWith(\"http\")) {\n return (\n <a href={item.link} className=\"ardo-nav-link\" target=\"_blank\" rel=\"noopener noreferrer\">\n {item.text}\n </a>\n )\n }\n\n if (item.link) {\n return (\n <RouterNavLink\n to={item.link}\n className={({ isActive }: { isActive: boolean }) =>\n [\"ardo-nav-link\", isActive && \"active\"].filter(Boolean).join(\" \")\n }\n >\n {item.text}\n </RouterNavLink>\n )\n }\n\n return <span className=\"ardo-nav-link\">{item.text}</span>\n}\n\n// =============================================================================\n// Social Icon Component (internal)\n// =============================================================================\n\nconst socialIcons = {\n github: GithubIcon,\n twitter: TwitterIcon,\n discord: MessageCircleIcon,\n linkedin: LinkedinIcon,\n youtube: YoutubeIcon,\n npm: PackageIcon,\n} as const\n\nfunction SocialIcon({ icon }: { icon: string }) {\n const IconComponent = socialIcons[icon as keyof typeof socialIcons] ?? GithubIcon\n return <IconComponent size={20} />\n}\n","import { useState, useEffect } from \"react\"\nimport { SunIcon, MoonIcon, MonitorIcon } from \"../icons\"\n\ntype Theme = \"light\" | \"dark\" | \"system\"\n\nexport function ThemeToggle() {\n const [theme, setTheme] = useState<Theme>(\"system\")\n const [mounted, setMounted] = useState(false)\n\n useEffect(() => {\n setMounted(true)\n\n const stored = localStorage.getItem(\"ardo-theme\") as Theme | null\n if (stored) {\n setTheme(stored)\n applyTheme(stored)\n } else {\n applyTheme(\"system\")\n }\n }, [])\n\n const toggleTheme = () => {\n const nextTheme: Theme = theme === \"light\" ? \"dark\" : theme === \"dark\" ? \"system\" : \"light\"\n setTheme(nextTheme)\n localStorage.setItem(\"ardo-theme\", nextTheme)\n applyTheme(nextTheme)\n }\n\n if (!mounted) {\n return (\n <button className=\"ardo-theme-toggle\" aria-label=\"Toggle theme\">\n <span className=\"ardo-theme-icon\">\n <SunIcon size={20} />\n </span>\n </button>\n )\n }\n\n return (\n <button\n className=\"ardo-theme-toggle\"\n onClick={toggleTheme}\n aria-label={`Switch to ${theme === \"light\" ? \"dark\" : theme === \"dark\" ? \"system\" : \"light\"} theme`}\n >\n <span className=\"ardo-theme-icon\">\n {theme === \"light\" && <SunIcon size={20} />}\n {theme === \"dark\" && <MoonIcon size={20} />}\n {theme === \"system\" && <MonitorIcon size={20} />}\n </span>\n </button>\n )\n}\n\nfunction applyTheme(theme: Theme) {\n const root = document.documentElement\n\n if (theme === \"system\") {\n const isDark = window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n root.classList.toggle(\"dark\", isDark)\n root.classList.toggle(\"light\", !isDark)\n } else {\n root.classList.toggle(\"dark\", theme === \"dark\")\n root.classList.toggle(\"light\", theme === \"light\")\n }\n}\n","import {\n useState,\n type ReactNode,\n type ComponentProps,\n Children,\n isValidElement,\n createContext,\n useContext,\n} from \"react\"\nimport { NavLink, useLocation } from \"react-router\"\nimport { ChevronDownIcon } from \"./icons\"\nimport type { SidebarItem as SidebarItemType } from \"../config/types\"\nimport { useSidebar } from \"../runtime/hooks\"\n\n/** Route path type - uses React Router's NavLink 'to' prop type for type-safe routes */\ntype RoutePath = ComponentProps<typeof NavLink>[\"to\"]\n\n// =============================================================================\n// Sidebar Context\n// =============================================================================\n\ninterface SidebarContextValue {\n currentPath: string\n}\n\nconst SidebarContext = createContext<SidebarContextValue>({ currentPath: \"\" })\n\nfunction useSidebarContext() {\n return useContext(SidebarContext)\n}\n\n// =============================================================================\n// Sidebar Component Types\n// =============================================================================\n\nexport interface SidebarProps {\n /** Sidebar items (for data-driven approach) */\n items?: SidebarItemType[]\n /** Children for JSX composition (SidebarGroup, SidebarLink) */\n children?: ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\n// =============================================================================\n// Sidebar Main Component\n// =============================================================================\n\n/**\n * Sidebar component supporting data-driven, JSX composition, and zero-config patterns.\n *\n * When neither `items` nor `children` are provided, automatically renders from\n * the Ardo sidebar context (`virtual:ardo/sidebar`).\n *\n * @example Zero-config (from context)\n * ```tsx\n * <Sidebar />\n * ```\n *\n * @example Data-driven (items prop)\n * ```tsx\n * <Sidebar items={[\n * { text: 'Introduction', link: '/intro' },\n * { text: 'Guide', items: [\n * { text: 'Getting Started', link: '/guide/getting-started' }\n * ]}\n * ]} />\n * ```\n *\n * @example JSX composition\n * ```tsx\n * <Sidebar>\n * <SidebarLink to=\"/intro\">Introduction</SidebarLink>\n * <SidebarGroup title=\"Guide\">\n * <SidebarLink to=\"/guide/getting-started\">Getting Started</SidebarLink>\n * </SidebarGroup>\n * </Sidebar>\n * ```\n */\nexport function Sidebar({ items, children, className }: SidebarProps) {\n const { pathname } = useLocation()\n const contextSidebar = useSidebar()\n const resolvedItems = items ?? (children ? undefined : contextSidebar)\n\n return (\n <SidebarContext.Provider value={{ currentPath: pathname }}>\n <aside className={className ?? \"ardo-sidebar\"}>\n <nav className=\"ardo-sidebar-nav\" aria-label=\"Main navigation\">\n {children ? (\n <ul className=\"ardo-sidebar-list ardo-sidebar-list-0\">{children}</ul>\n ) : resolvedItems?.length ? (\n <SidebarItems items={resolvedItems} depth={0} />\n ) : null}\n </nav>\n </aside>\n </SidebarContext.Provider>\n )\n}\n\n// =============================================================================\n// SidebarGroup Component\n// =============================================================================\n\nexport interface SidebarGroupProps {\n /** Group title */\n title: string\n /** Optional link for the group title */\n to?: string\n /** Initial collapsed state (default: false) */\n collapsed?: boolean\n /** Whether group is collapsible (default: true if has children) */\n collapsible?: boolean\n /** Children (SidebarLink, nested SidebarGroup) */\n children?: ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\n/**\n * Group component for organizing sidebar links.\n *\n * @example\n * ```tsx\n * <SidebarGroup title=\"Guide\">\n * <SidebarLink to=\"/guide/intro\">Introduction</SidebarLink>\n * <SidebarLink to=\"/guide/setup\">Setup</SidebarLink>\n * </SidebarGroup>\n * ```\n *\n * @example With collapsible state\n * ```tsx\n * <SidebarGroup title=\"Advanced\" collapsed>\n * <SidebarLink to=\"/advanced/config\">Configuration</SidebarLink>\n * </SidebarGroup>\n * ```\n */\nexport function SidebarGroup({\n title,\n to,\n collapsed: initialCollapsed = false,\n collapsible = true,\n children,\n className,\n}: SidebarGroupProps) {\n const [collapsed, setCollapsed] = useState(initialCollapsed)\n const { currentPath } = useSidebarContext()\n\n // Check if any child is active\n const isChildActive = checkChildrenActive(children, currentPath)\n\n const textClassName = [\"ardo-sidebar-text\", isChildActive && \"child-active\"]\n .filter(Boolean)\n .join(\" \")\n\n const hasChildren = Children.count(children) > 0\n\n return (\n <li className={className ?? \"ardo-sidebar-item\"}>\n <div className=\"ardo-sidebar-item-header\">\n {to ? (\n <NavLink\n to={to}\n end\n className={({ isActive }) =>\n [textClassName, isActive && \"active\"].filter(Boolean).join(\" \")\n }\n >\n {title}\n </NavLink>\n ) : (\n <span\n className={textClassName}\n onClick={() => collapsible && hasChildren && setCollapsed(!collapsed)}\n style={collapsible && hasChildren ? { cursor: \"pointer\" } : undefined}\n >\n {title}\n </span>\n )}\n\n {collapsible && hasChildren && (\n <button\n className={[\"ardo-sidebar-collapse\", collapsed && \"collapsed\"]\n .filter(Boolean)\n .join(\" \")}\n onClick={() => setCollapsed(!collapsed)}\n aria-label={collapsed ? \"Expand\" : \"Collapse\"}\n >\n <ChevronDownIcon size={16} />\n </button>\n )}\n </div>\n\n {hasChildren && !collapsed && (\n <ul className=\"ardo-sidebar-list ardo-sidebar-list-1\">{children}</ul>\n )}\n </li>\n )\n}\n\n// =============================================================================\n// SidebarLink Component\n// =============================================================================\n\nexport interface SidebarLinkProps {\n /** Internal route path (type-safe with React Router's registered routes) */\n to: RoutePath\n /** Link text */\n children: ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\n/**\n * Sidebar navigation link.\n *\n * @example\n * ```tsx\n * <SidebarLink to=\"/guide/getting-started\">Getting Started</SidebarLink>\n * ```\n */\nexport function SidebarLink({ to, children, className }: SidebarLinkProps) {\n const baseClassName = className ?? \"ardo-sidebar-link\"\n return (\n <li className=\"ardo-sidebar-item\">\n <NavLink\n to={to}\n className={({ isActive }) =>\n [baseClassName, isActive && \"active\"].filter(Boolean).join(\" \")\n }\n >\n {children}\n </NavLink>\n </li>\n )\n}\n\n// =============================================================================\n// Internal: Data-driven sidebar rendering\n// =============================================================================\n\ninterface SidebarItemsProps {\n items: SidebarItemType[]\n depth: number\n}\n\nfunction SidebarItems({ items, depth }: SidebarItemsProps) {\n return (\n <ul className={`ardo-sidebar-list ardo-sidebar-list-${depth}`}>\n {items.map((item, index) => (\n <SidebarItemComponent key={index} item={item} depth={depth} />\n ))}\n </ul>\n )\n}\n\ninterface SidebarItemComponentProps {\n item: SidebarItemType\n depth: number\n}\n\nfunction SidebarItemComponent({ item, depth }: SidebarItemComponentProps) {\n const { currentPath } = useSidebarContext()\n const [collapsed, setCollapsed] = useState(item.collapsed ?? false)\n\n const hasChildren = item.items && item.items.length > 0\n\n const isChildActive =\n hasChildren &&\n item.items!.some(\n (child) =>\n child.link === currentPath ||\n (child.items && child.items.some((grandchild) => grandchild.link === currentPath))\n )\n\n const linkClassName = [\"ardo-sidebar-link\", isChildActive && \"child-active\"]\n .filter(Boolean)\n .join(\" \")\n\n const textClassName = [\"ardo-sidebar-text\", isChildActive && \"child-active\"]\n .filter(Boolean)\n .join(\" \")\n\n return (\n <li className=\"ardo-sidebar-item\">\n <div className=\"ardo-sidebar-item-header\">\n {item.link ? (\n <NavLink\n to={item.link}\n className={({ isActive }) =>\n [linkClassName, isActive && \"active\"].filter(Boolean).join(\" \")\n }\n >\n {item.text}\n </NavLink>\n ) : (\n <span className={textClassName} onClick={() => hasChildren && setCollapsed(!collapsed)}>\n {item.text}\n </span>\n )}\n\n {hasChildren && (\n <button\n className={[\"ardo-sidebar-collapse\", collapsed && \"collapsed\"]\n .filter(Boolean)\n .join(\" \")}\n onClick={() => setCollapsed(!collapsed)}\n aria-label={collapsed ? \"Expand\" : \"Collapse\"}\n >\n <ChevronDownIcon size={16} />\n </button>\n )}\n </div>\n\n {hasChildren && !collapsed && <SidebarItems items={item.items!} depth={depth + 1} />}\n </li>\n )\n}\n\n// =============================================================================\n// Utility Functions\n// =============================================================================\n\nfunction checkChildrenActive(children: ReactNode, currentPath: string): boolean {\n let isActive = false\n\n Children.forEach(children, (child) => {\n if (isActive) return\n\n if (isValidElement(child)) {\n // Check SidebarLink\n if (child.type === SidebarLink && (child.props as SidebarLinkProps).to === currentPath) {\n isActive = true\n return\n }\n\n // Check nested SidebarGroup\n if (child.type === SidebarGroup) {\n const groupProps = child.props as SidebarGroupProps\n if (groupProps.to === currentPath) {\n isActive = true\n return\n }\n if (groupProps.children && checkChildrenActive(groupProps.children, currentPath)) {\n isActive = true\n return\n }\n }\n }\n })\n\n return isActive\n}\n","import { type ReactNode } from \"react\"\nimport type { ProjectMeta, SponsorConfig } from \"../config/types\"\nimport { useConfig, useThemeConfig } from \"../runtime/hooks\"\n\n// =============================================================================\n// Footer Component\n// =============================================================================\n\nexport interface FooterProps {\n /** Footer message (supports HTML string) */\n message?: string\n /** Copyright text (supports HTML string) */\n copyright?: string\n /** Custom content (overrides all automatic rendering) */\n children?: ReactNode\n /** Additional CSS classes */\n className?: string\n /** Project metadata — renders linked \"name vX.Y.Z\" */\n project?: ProjectMeta\n /** Sponsor link — renders \"Sponsored by X\" */\n sponsor?: SponsorConfig\n /** Build timestamp (ISO string) — renders formatted date */\n buildTime?: string\n /** Git commit hash — rendered next to the build date */\n buildHash?: string\n /** Show \"Built with Ardo\" link (default: true) */\n ardoLink?: boolean\n}\n\nfunction formatBuildTime(iso: string): string {\n try {\n const date = new Date(iso)\n return date.toLocaleDateString(\"en-US\", {\n month: \"long\",\n day: \"numeric\",\n year: \"numeric\",\n })\n } catch {\n return iso\n }\n}\n\n/**\n * Footer component with structured layout for project info, sponsor, and build metadata.\n *\n * Automatically pulls data from Ardo context (`config.project`, `config.buildTime`,\n * `config.buildHash`, `themeConfig.footer.*`). Props serve as overrides.\n *\n * When `children` is provided, all automatic rendering is skipped.\n *\n * @example Automatic (zero-config)\n * ```tsx\n * <Footer />\n * ```\n *\n * @example With overrides\n * ```tsx\n * <Footer\n * sponsor={{ text: \"Sebastian Software\", link: \"https://sebastian-software.com/oss\" }}\n * message=\"Released under the MIT License.\"\n * copyright=\"Copyright 2026 Sebastian Software GmbH\"\n * />\n * ```\n *\n * @example Custom content\n * ```tsx\n * <Footer>\n * <CustomFooterContent />\n * </Footer>\n * ```\n */\nexport function Footer({\n message,\n copyright,\n children,\n className,\n project,\n sponsor,\n buildTime,\n buildHash,\n ardoLink = true,\n}: FooterProps) {\n const config = useConfig()\n const themeConfig = useThemeConfig()\n\n const resolvedProject = project ?? config.project\n const resolvedBuildTime = buildTime ?? config.buildTime\n const resolvedBuildHash = buildHash ?? config.buildHash\n const resolvedMessage = message ?? themeConfig.footer?.message\n const resolvedCopyright = copyright ?? themeConfig.footer?.copyright\n const resolvedSponsor = sponsor ?? themeConfig.footer?.sponsor\n\n const hasContent =\n resolvedMessage ||\n resolvedCopyright ||\n children ||\n resolvedProject ||\n resolvedSponsor ||\n resolvedBuildTime ||\n ardoLink\n\n if (!hasContent) {\n return null\n }\n\n return (\n <footer className={className ?? \"ardo-footer\"}>\n <div className=\"ardo-footer-container\">\n {children ?? (\n <>\n {/* Primary line: project · ardo · sponsor */}\n {(resolvedProject || ardoLink || resolvedSponsor) && (\n <p className=\"ardo-footer-primary\">\n {resolvedProject?.name && (\n <>\n {resolvedProject.homepage ? (\n <a href={resolvedProject.homepage} className=\"ardo-footer-link\">\n {resolvedProject.name}\n {resolvedProject.version ? ` v${resolvedProject.version}` : \"\"}\n </a>\n ) : (\n <span>\n {resolvedProject.name}\n {resolvedProject.version ? ` v${resolvedProject.version}` : \"\"}\n </span>\n )}\n </>\n )}\n {resolvedProject?.name && ardoLink && (\n <span className=\"ardo-footer-separator\" aria-hidden=\"true\" />\n )}\n {ardoLink && (\n <a href=\"https://ardo-docs.dev\" className=\"ardo-footer-link\">\n Built with Ardo\n </a>\n )}\n {(resolvedProject?.name || ardoLink) && resolvedSponsor && (\n <span className=\"ardo-footer-separator\" aria-hidden=\"true\" />\n )}\n {resolvedSponsor && (\n <a href={resolvedSponsor.link} className=\"ardo-footer-link\">\n Sponsored by {resolvedSponsor.text}\n </a>\n )}\n </p>\n )}\n {/* Secondary line: message / copyright */}\n {resolvedMessage && (\n <p\n className=\"ardo-footer-message\"\n dangerouslySetInnerHTML={{ __html: resolvedMessage }}\n />\n )}\n {resolvedCopyright && (\n <p\n className=\"ardo-footer-copyright\"\n dangerouslySetInnerHTML={{ __html: resolvedCopyright }}\n />\n )}\n {/* Tertiary line: build timestamp */}\n {resolvedBuildTime && (\n <p className=\"ardo-footer-build-time\">\n Built on {formatBuildTime(resolvedBuildTime)}\n {resolvedBuildHash && <> ({resolvedBuildHash})</>}\n </p>\n )}\n </>\n )}\n </div>\n </footer>\n )\n}\n\n// Type exports for compound pattern (kept for backwards compatibility)\nexport interface FooterMessageProps {\n children: ReactNode\n className?: string\n}\n\nexport interface FooterCopyrightProps {\n children: ReactNode\n className?: string\n}\n","import { type ReactNode, type ComponentProps, useState, createContext, useContext } from \"react\"\nimport { NavLink as RouterNavLink } from \"react-router\"\n\n/** Route path type - uses React Router's NavLink 'to' prop type for type-safe routes */\ntype RoutePath = ComponentProps<typeof RouterNavLink>[\"to\"]\n\n// Nav context for shared state\ninterface NavContextValue {\n mobileMenuOpen: boolean\n setMobileMenuOpen: (open: boolean) => void\n}\n\nconst NavContext = createContext<NavContextValue | null>(null)\n\nfunction useNavContext() {\n return useContext(NavContext)\n}\n\n// =============================================================================\n// Nav Component\n// =============================================================================\n\nexport interface NavProps {\n children?: ReactNode\n className?: string\n}\n\n/**\n * Navigation container component for composing navigation links.\n *\n * @example\n * ```tsx\n * <Nav>\n * <NavLink to=\"/guide\">Guide</NavLink>\n * <NavLink to=\"/api\">API</NavLink>\n * <NavLink href=\"https://github.com/...\">GitHub</NavLink>\n * </Nav>\n * ```\n */\nexport function Nav({ children, className }: NavProps) {\n return <nav className={className ?? \"ardo-nav\"}>{children}</nav>\n}\n\n// =============================================================================\n// NavLink Component\n// =============================================================================\n\nexport interface NavLinkProps {\n /** Internal route path (type-safe with React Router's registered routes) */\n to?: RoutePath\n /** External URL (uses anchor tag) */\n href?: string\n /** Link text or children */\n children: ReactNode\n /** Additional CSS classes */\n className?: string\n /** Active state match pattern */\n activeMatch?: string\n}\n\n/**\n * Navigation link component supporting both internal routes and external URLs.\n *\n * @example\n * ```tsx\n * // Internal link\n * <NavLink to=\"/guide\">Guide</NavLink>\n *\n * // External link\n * <NavLink href=\"https://github.com/...\">GitHub</NavLink>\n * ```\n */\nexport function NavLink({\n to,\n href,\n children,\n className,\n activeMatch: _activeMatch,\n}: NavLinkProps) {\n const navContext = useNavContext()\n const baseClassName = className ?? \"ardo-nav-link\"\n\n // Handle click for mobile menu\n const handleClick = () => {\n navContext?.setMobileMenuOpen(false)\n }\n\n // External link\n if (href) {\n return (\n <a\n href={href}\n className={baseClassName}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={handleClick}\n >\n {children}\n </a>\n )\n }\n\n // Internal link\n if (to) {\n return (\n <RouterNavLink\n to={to}\n className={({ isActive }: { isActive: boolean }) =>\n [baseClassName, isActive && \"active\"].filter(Boolean).join(\" \")\n }\n onClick={handleClick}\n >\n {children}\n </RouterNavLink>\n )\n }\n\n // Text-only (no link)\n return <span className={baseClassName}>{children}</span>\n}\n\n// =============================================================================\n// NavDropdown Component\n// =============================================================================\n\nexport interface NavDropdownProps {\n /** Dropdown trigger text */\n text: string\n /** Dropdown items */\n children: ReactNode\n /** Additional CSS classes */\n className?: string\n}\n\n/**\n * Dropdown navigation menu for grouping related links.\n *\n * @example\n * ```tsx\n * <NavDropdown text=\"Resources\">\n * <NavLink to=\"/docs\">Documentation</NavLink>\n * <NavLink to=\"/blog\">Blog</NavLink>\n * </NavDropdown>\n * ```\n */\nexport function NavDropdown({ text, children, className }: NavDropdownProps) {\n const [open, setOpen] = useState(false)\n\n return (\n <div\n className={className ?? \"ardo-nav-dropdown\"}\n onMouseEnter={() => setOpen(true)}\n onMouseLeave={() => setOpen(false)}\n >\n <button className=\"ardo-nav-dropdown-button\">\n {text}\n <span className=\"ardo-nav-dropdown-icon\">▼</span>\n </button>\n {open && <div className=\"ardo-nav-dropdown-menu\">{children}</div>}\n </div>\n )\n}\n\n// =============================================================================\n// NavProvider Component\n// =============================================================================\n\nexport interface NavProviderProps {\n children: ReactNode\n}\n\n/**\n * Provider for Nav context (mobile menu state).\n * Used internally by Header component.\n */\nexport function NavProvider({ children }: NavProviderProps) {\n const [mobileMenuOpen, setMobileMenuOpen] = useState(false)\n\n return (\n <NavContext.Provider value={{ mobileMenuOpen, setMobileMenuOpen }}>\n {children}\n </NavContext.Provider>\n )\n}\n\n// Export context hook for external use\nexport { useNavContext }\n","import { useState, useEffect } from \"react\"\nimport { useTOC, useThemeConfig } from \"../runtime/hooks\"\nimport type { TOCItem } from \"../config/types\"\n\nexport function TOC() {\n const toc = useTOC()\n const themeConfig = useThemeConfig()\n const [activeId, setActiveId] = useState<string>(\"\")\n\n const label = themeConfig.outline?.label ?? \"On this page\"\n\n useEffect(() => {\n if (toc.length === 0) return\n\n const headingElements = toc.map((item) => document.getElementById(item.id)).filter(Boolean)\n\n if (headingElements.length === 0) return\n\n const observer = new IntersectionObserver(\n (entries) => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n setActiveId(entry.target.id)\n break\n }\n }\n },\n {\n rootMargin: \"-80px 0px -80% 0px\",\n threshold: 0,\n }\n )\n\n headingElements.forEach((el) => el && observer.observe(el))\n\n return () => {\n headingElements.forEach((el) => el && observer.unobserve(el))\n }\n }, [toc])\n\n if (toc.length === 0) {\n return null\n }\n\n return (\n <aside className=\"ardo-toc\">\n <div className=\"ardo-toc-container\">\n <h3 className=\"ardo-toc-title\">{label}</h3>\n <nav className=\"ardo-toc-nav\" aria-label=\"Table of contents\">\n <TOCItems items={toc} activeId={activeId} />\n </nav>\n </div>\n </aside>\n )\n}\n\ninterface TOCItemsProps {\n items: TOCItem[]\n activeId: string\n}\n\nfunction TOCItems({ items, activeId }: TOCItemsProps) {\n return (\n <ul className=\"ardo-toc-list\">\n {items.map((item) => (\n <TOCItemComponent key={item.id} item={item} activeId={activeId} />\n ))}\n </ul>\n )\n}\n\ninterface TOCItemComponentProps {\n item: TOCItem\n activeId: string\n}\n\nfunction TOCItemComponent({ item, activeId }: TOCItemComponentProps) {\n const isActive = item.id === activeId\n const hasActiveChild = hasActiveDescendant(item, activeId)\n\n return (\n <li className=\"ardo-toc-item\">\n <a\n href={`#${item.id}`}\n className={[\n `ardo-toc-link ardo-toc-link-${item.level}`,\n isActive && \"active\",\n hasActiveChild && \"child-active\",\n ]\n .filter(Boolean)\n .join(\" \")}\n onClick={(e) => {\n e.preventDefault()\n const element = document.getElementById(item.id)\n if (element) {\n element.scrollIntoView({ behavior: \"smooth\" })\n window.history.pushState(null, \"\", `#${item.id}`)\n }\n }}\n >\n {item.text}\n </a>\n {item.children && item.children.length > 0 && (\n <TOCItems items={item.children} activeId={activeId} />\n )}\n </li>\n )\n}\n\nfunction hasActiveDescendant(item: TOCItem, activeId: string): boolean {\n if (!item.children) return false\n\n for (const child of item.children) {\n if (child.id === activeId) return true\n if (hasActiveDescendant(child, activeId)) return true\n }\n\n return false\n}\n","import { type ReactNode } from \"react\"\nimport { usePageData } from \"../runtime/hooks\"\nimport { Layout } from \"./Layout\"\nimport { Content } from \"./Content\"\nimport { TOC } from \"./TOC\"\n\n// =============================================================================\n// DocPage Component (includes Layout - for backwards compatibility)\n// =============================================================================\n\ninterface DocPageProps {\n children: ReactNode\n}\n\n/**\n * Full documentation page with Layout wrapper.\n * Use this when you don't have a _layout.tsx file.\n *\n * @example\n * ```tsx\n * <DocPage>\n * <Content />\n * </DocPage>\n * ```\n */\nexport function DocPage({ children }: DocPageProps) {\n const pageData = usePageData()\n const showToc =\n pageData?.frontmatter.outline !== false && pageData?.toc && pageData.toc.length > 0\n\n return (\n <Layout>\n <div className=\"ardo-doc-page\">\n <Content>{children}</Content>\n {showToc && <TOC />}\n </div>\n </Layout>\n )\n}\n\n// =============================================================================\n// DocContent Component (without Layout - for use with _layout.tsx)\n// =============================================================================\n\ninterface DocContentProps {\n children: ReactNode\n}\n\n/**\n * Documentation content without Layout wrapper.\n * Use this when you have a _layout.tsx that provides the Layout.\n *\n * @example\n * ```tsx\n * // In _layout.tsx:\n * <Layout>\n * <Header ... />\n * <Sidebar ... />\n * <Outlet />\n * <Footer ... />\n * </Layout>\n *\n * // In page routes:\n * <DocContent>\n * <MarkdownContent />\n * </DocContent>\n * ```\n */\nexport function DocContent({ children }: DocContentProps) {\n const pageData = usePageData()\n const showToc =\n pageData?.frontmatter.outline !== false && pageData?.toc && pageData.toc.length > 0\n\n return (\n <div className=\"ardo-doc-page\">\n <Content>{children}</Content>\n {showToc && <TOC />}\n </div>\n )\n}\n\n// =============================================================================\n// DocLayout Component (legacy alias)\n// =============================================================================\n\ninterface DocLayoutProps {\n content: ReactNode\n}\n\n/**\n * @deprecated Use DocPage or DocContent instead\n */\nexport function DocLayout({ content }: DocLayoutProps) {\n return <DocPage>{content}</DocPage>\n}\n","import { Link } from \"react-router\"\nimport { usePageData, useConfig, useThemeConfig } from \"../runtime/hooks\"\nimport { Header, SocialLink } from \"./Header\"\nimport { Footer } from \"./Footer\"\nimport { Nav, NavLink } from \"./Nav\"\n\nexport function HomePage() {\n const pageData = usePageData()\n const config = useConfig()\n const themeConfig = useThemeConfig()\n\n const hero = pageData?.frontmatter.hero\n const features = pageData?.frontmatter.features\n\n return (\n <div className=\"ardo-home\">\n <Header\n logo={themeConfig.logo}\n title={themeConfig.siteTitle !== false ? config.title : undefined}\n nav={\n themeConfig.nav && themeConfig.nav.length > 0 ? (\n <Nav>\n {themeConfig.nav.map((item, index) => (\n <NavLink key={index} to={item.link}>\n {item.text}\n </NavLink>\n ))}\n </Nav>\n ) : undefined\n }\n actions={themeConfig.socialLinks?.map((link, index) => (\n <SocialLink key={index} href={link.link} icon={link.icon} ariaLabel={link.ariaLabel} />\n ))}\n />\n\n <main className=\"ardo-home-main\">\n {hero && (\n <section className=\"ardo-hero\">\n <div className=\"ardo-hero-container\">\n {hero.image && (\n <div className=\"ardo-hero-image\">\n <img\n src={typeof hero.image === \"string\" ? hero.image : hero.image.light}\n alt={hero.name || config.title}\n />\n </div>\n )}\n\n <div className=\"ardo-hero-content\">\n {hero.name && <h1 className=\"ardo-hero-name\">{hero.name}</h1>}\n {hero.text && <p className=\"ardo-hero-text\">{hero.text}</p>}\n {hero.tagline && <p className=\"ardo-hero-tagline\">{hero.tagline}</p>}\n\n {hero.actions && hero.actions.length > 0 && (\n <div className=\"ardo-hero-actions\">\n {hero.actions.map((action, index) => (\n <Link\n key={index}\n to={action.link}\n className={`ardo-hero-action ardo-hero-action-${action.theme || \"brand\"}`}\n >\n {action.text}\n </Link>\n ))}\n </div>\n )}\n </div>\n </div>\n </section>\n )}\n\n {features && features.length > 0 && (\n <section className=\"ardo-features\">\n <div className=\"ardo-features-container\">\n {features.map((feature, index) => (\n <div key={index} className=\"ardo-feature\">\n {feature.icon && <div className=\"ardo-feature-icon\">{feature.icon}</div>}\n <h3 className=\"ardo-feature-title\">{feature.title}</h3>\n <p className=\"ardo-feature-details\">{feature.details}</p>\n {feature.link && (\n <Link to={feature.link} className=\"ardo-feature-link\">\n {feature.linkText || \"Learn more\"}\n </Link>\n )}\n </div>\n ))}\n </div>\n </section>\n )}\n </main>\n\n <Footer />\n </div>\n )\n}\n","import { type ComponentProps, type ReactNode } from \"react\"\nimport { Link } from \"react-router\"\n\n/** Internal route path from React Router */\ntype RoutePath = ComponentProps<typeof Link>[\"to\"]\n\n/** External URL starting with http:// or https:// */\ntype ExternalUrl = `http://${string}` | `https://${string}`\n\nexport interface HeroAction {\n /** Button text */\n text: string\n /** Link destination - internal route path or external URL */\n link: RoutePath | ExternalUrl\n /** Visual theme: \"brand\" for primary, \"alt\" for secondary */\n theme?: \"brand\" | \"alt\"\n /** Optional icon as ReactNode (e.g. Lucide icon component) */\n icon?: ReactNode\n}\n\nexport interface HeroImage {\n /** Image for light mode */\n light: string\n /** Image for dark mode */\n dark?: string\n /** Alt text for the image */\n alt?: string\n}\n\nexport interface HeroProps {\n /** Large title displayed prominently */\n name?: string\n /** Secondary text below the name */\n text?: string\n /** Descriptive tagline */\n tagline?: string\n /** Hero image - can be a string URL or an object with light/dark variants */\n image?: string | HeroImage\n /** Call-to-action buttons */\n actions?: HeroAction[]\n /** Additional CSS class */\n className?: string\n /** Version string displayed as a pill badge above the name */\n version?: string\n}\n\n/**\n * Hero section component for landing pages.\n *\n * @example\n * ```tsx\n * import { ArrowRight, Github } from \"lucide-react\"\n *\n * <Hero\n * name=\"Ardo\"\n * text=\"React-first Documentation\"\n * tagline=\"Build beautiful documentation sites with React.\"\n * image=\"/logo.svg\"\n * actions={[\n * { text: \"Get Started\", link: \"/guide/getting-started\", theme: \"brand\", icon: <ArrowRight size={16} /> },\n * { text: \"GitHub\", link: \"https://github.com/...\", theme: \"alt\", icon: <Github size={16} /> }\n * ]}\n * />\n * ```\n */\nexport function Hero({ name, text, tagline, image, actions, className, version }: HeroProps) {\n const imageUrl = typeof image === \"string\" ? image : image?.light\n const imageAlt = typeof image === \"string\" ? name : (image?.alt ?? name)\n\n return (\n <section className={className ?? \"ardo-hero\"}>\n <div className=\"ardo-hero-container ardo-hero-animate\">\n {image && (\n <div className=\"ardo-hero-image\">\n <img src={imageUrl} alt={imageAlt} />\n </div>\n )}\n\n <div className=\"ardo-hero-content\">\n {version && <span className=\"ardo-hero-version\">v{version}</span>}\n {name && <h1 className=\"ardo-hero-name\">{name}</h1>}\n {text && <p className=\"ardo-hero-text\">{text}</p>}\n {tagline && <p className=\"ardo-hero-tagline\">{tagline}</p>}\n\n {actions && actions.length > 0 && (\n <div className=\"ardo-hero-actions\">\n {actions.map((action, index) => {\n const link = action.link\n const isExternal =\n typeof link === \"string\" &&\n (link.startsWith(\"http://\") || link.startsWith(\"https://\"))\n const className = `ardo-hero-action ardo-hero-action-${action.theme || \"brand\"}`\n\n const content = (\n <>\n {action.icon}\n {action.text}\n </>\n )\n\n if (isExternal) {\n return (\n <a\n key={index}\n href={link}\n className={className}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n {content}\n </a>\n )\n }\n\n return (\n <Link key={index} to={link} className={className}>\n {content}\n </Link>\n )\n })}\n </div>\n )}\n </div>\n </div>\n </section>\n )\n}\n","import { Link } from \"react-router\"\nimport type { CSSProperties, ReactNode } from \"react\"\n\nexport interface FeatureItem {\n /** Feature title */\n title: string\n /** Icon as ReactNode (emoji, Lucide icon component, or any JSX) */\n icon?: ReactNode\n /** Feature description */\n details: string\n /** Optional link */\n link?: string\n /** Link text (defaults to \"Learn more\") */\n linkText?: string\n}\n\nexport interface FeaturesProps {\n /** Array of feature items to display */\n items: FeatureItem[]\n /** Section title */\n title?: string\n /** Section subtitle */\n subtitle?: string\n /** Additional CSS class */\n className?: string\n}\n\nexport interface FeatureCardProps extends FeatureItem {\n /** Additional CSS class */\n className?: string\n}\n\n/**\n * Individual feature card component.\n *\n * @example\n * ```tsx\n * import { Zap } from \"lucide-react\"\n *\n * // Using emoji\n * <FeatureCard title=\"Fast\" icon=\"⚡\" details=\"Lightning fast.\" />\n *\n * // Using Lucide icon (tree-shakeable)\n * <FeatureCard title=\"Fast\" icon={<Zap size={28} />} details=\"Lightning fast.\" />\n * ```\n */\nexport function FeatureCard({\n title,\n icon,\n details,\n link,\n linkText,\n className,\n style,\n}: FeatureCardProps & { style?: CSSProperties }) {\n return (\n <div className={className ?? \"ardo-feature\"} style={style}>\n {icon && <div className=\"ardo-feature-icon\">{icon}</div>}\n <h3 className=\"ardo-feature-title\">{title}</h3>\n <p className=\"ardo-feature-details\">{details}</p>\n {link && (\n <Link to={link} className=\"ardo-feature-link\">\n {linkText || \"Learn more\"}\n </Link>\n )}\n </div>\n )\n}\n\n/**\n * Features grid component for displaying multiple feature cards.\n *\n * @example\n * ```tsx\n * <Features\n * title=\"Key Features\"\n * subtitle=\"Everything you need to build great docs\"\n * items={[\n * { title: \"React-First\", icon: \"⚛️\", details: \"Built on React.\" },\n * { title: \"Fast\", icon: \"⚡\", details: \"Powered by Vite.\" },\n * { title: \"Type-Safe\", icon: \"📝\", details: \"Full TypeScript support.\" },\n * ]}\n * />\n * ```\n */\nexport function Features({ items, title, subtitle, className }: FeaturesProps) {\n if (!items || items.length === 0) {\n return null\n }\n\n return (\n <section className={className ?? \"ardo-features\"}>\n {(title || subtitle) && (\n <div className=\"ardo-features-header\">\n {title && <h2 className=\"ardo-features-title\">{title}</h2>}\n {subtitle && <p className=\"ardo-features-subtitle\">{subtitle}</p>}\n </div>\n )}\n <div className=\"ardo-features-container\">\n {items.map((feature, index) => (\n <FeatureCard key={index} {...feature} style={{ animationDelay: `${index * 80}ms` }} />\n ))}\n </div>\n </section>\n )\n}\n","import { type ReactNode } from \"react\"\n\nexport interface StepsProps {\n /** Content to display — expects an ordered list (`<ol>`) from MDX */\n children: ReactNode\n}\n\n/**\n * A wrapper for ordered lists that renders numbered step indicators.\n *\n * @example\n * ```mdx\n * <Steps>\n * 1. Install the package\n * 2. Configure your site\n * 3. Start writing\n * </Steps>\n * ```\n */\nexport function Steps({ children }: StepsProps) {\n return <div className=\"ardo-steps\">{children}</div>\n}\n","import {\n type ReactNode,\n type ReactElement,\n type HTMLAttributes,\n Children,\n isValidElement,\n cloneElement,\n} from \"react\"\n\nexport interface FileTreeProps {\n /** Content to display — expects an unordered list (`<ul>`) from MDX */\n children: ReactNode\n}\n\n/**\n * Extracts text content from nested React nodes.\n */\nfunction getTextContent(node: ReactNode): string {\n if (typeof node === \"string\") return node\n if (typeof node === \"number\") return String(node)\n if (!isValidElement(node)) return \"\"\n const children = (node.props as { children?: ReactNode }).children\n if (!children) return \"\"\n return Children.toArray(children).map(getTextContent).join(\"\")\n}\n\n/**\n * Checks whether a list item represents a directory (text ends with `/`).\n */\nfunction isDirectory(node: ReactElement): boolean {\n const children = (node.props as { children?: ReactNode }).children\n const childArray = Children.toArray(children)\n\n // If the item has a nested <ul>, it's a directory\n for (const child of childArray) {\n if (isValidElement(child) && (child.type === \"ul\" || child.type === \"ol\")) {\n return true\n }\n }\n\n // If text content ends with `/`, it's a directory\n const text = getTextContent(node).trim()\n return text.endsWith(\"/\")\n}\n\n/**\n * Recursively processes `<ul>` / `<li>` children, applying CSS classes\n * for directory vs. file styling.\n */\nfunction processChildren(children: ReactNode): ReactNode {\n return Children.map(children, (child) => {\n if (!isValidElement(child)) return child\n\n const props = child.props as { children?: ReactNode; className?: string }\n\n const el = child as ReactElement<HTMLAttributes<HTMLElement>>\n\n if (child.type === \"li\") {\n const isDir = isDirectory(child)\n const className = [props.className, isDir ? \"ardo-filetree-dir\" : \"ardo-filetree-file\"]\n .filter(Boolean)\n .join(\" \")\n\n return cloneElement(el, { className }, processChildren(props.children))\n }\n\n if (child.type === \"ul\" || child.type === \"ol\") {\n return cloneElement(el, {}, processChildren(props.children))\n }\n\n return child\n })\n}\n\n/**\n * A wrapper for unordered lists that renders a file/folder tree with icons.\n *\n * @example\n * ```mdx\n * <FileTree>\n * - src/\n * - components/\n * - Header.tsx\n * - Footer.tsx\n * - index.ts\n * - package.json\n * - README.md\n * </FileTree>\n * ```\n */\nexport function FileTree({ children }: FileTreeProps) {\n return <div className=\"ardo-filetree\">{processChildren(children)}</div>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAyB,kBAAkB;AAC3C,SAAS,OAAO,MAAM,SAAS,yBAAyB;AAsClD,SACE,KADF;AAPC,SAAS,WAAW,EAAE,UAAU,SAAS,KAAK,GAAoB;AAEvE,QAAM,UAAU,WAAW,WAAW;AACtC,QAAM,eAAe,QAAQ,SAAS,OAAO,QAAQ;AAErD,SACE,qBAAC,UAAK,MAAM,cAAc,0BAAwB,MAChD;AAAA,yBAAC,UACC;AAAA,0BAAC,UAAK,SAAQ,SAAQ;AAAA,MACtB,oBAA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EAAG,QAAO;AAEnC,UAAM,QAAQ,MAAM;AAEpB,UAAM,KAAK;AAEX,QAAI,MAAM,SAAS,MAAM;AACvB,YAAM,QAAQ,YAAY,KAAK;AAC/B,YAAM,YAAY,CAAC,MAAM,WAAW,QAAQ,sBAAsB,oBAAoB,EACnF,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,aAAO,aAAa,IAAI,EAAE,UAAU,GAAG,gBAAgB,MAAM,QAAQ,CAAC;AAAA,IACxE;AAEA,QAAI,MAAM,SAAS,QAAQ,MAAM,SAAS,MAAM;AAC9C,aAAO,aAAa,IAAI,CAAC,GAAG,gBAAgB,MAAM,QAAQ,CAAC;AAAA,IAC7D;AAEA,WAAO;AAAA,EACT,CAAC;AACH;AAkBO,SAAS,SAAS,EAAE,SAAS,GAAkB;AACpD,SAAO,gBAAAC,MAAC,SAAI,WAAU,iBAAiB,0BAAgB,QAAQ,GAAE;AACnE;","names":["useLocation","useState","jsx","jsxs","jsx","jsxs","useState","useState","useContext","jsx","jsxs","useContext","useState","jsx","jsxs","jsx","useLocation","useState","createContext","useContext","RouterNavLink","jsx","jsxs","NavLink","useState","useEffect","jsx","jsxs","useState","useEffect","jsx","jsxs","Link","jsx","jsxs","NavLink","Link","Link","Fragment","jsx","jsxs","className","Link","jsx","jsxs","jsx","Children","isValidElement","jsx"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/typedoc/generator.ts"],"sourcesContent":["import {\n Application,\n TSConfigReader,\n TypeDocReader,\n type ProjectReflection,\n ReflectionKind,\n type DeclarationReflection,\n type SignatureReflection,\n type TypeParameterReflection,\n} from \"typedoc\"\nimport path from \"path\"\nimport fs from \"fs/promises\"\nimport type { TypeDocConfig, GeneratedApiDoc } from \"./types\"\n\nexport class TypeDocGenerator {\n private config: TypeDocConfig\n private app: Application | undefined\n private project: ProjectReflection | undefined\n private basePath: string\n\n constructor(config: TypeDocConfig) {\n this.config = {\n out: \"api\",\n excludeExternals: true,\n excludePrivate: true,\n excludeProtected: false,\n excludeInternal: true,\n sort: [\"source-order\"],\n sidebar: {\n title: \"API Reference\",\n position: 100,\n collapsed: false,\n },\n markdown: {\n breadcrumbs: true,\n hierarchy: true,\n sourceLinks: true,\n codeBlocks: true,\n },\n ...config,\n }\n // Use the output directory as the base path for links\n this.basePath = \"/\" + this.config.out!\n }\n\n async generate(outputDir: string): Promise<GeneratedApiDoc[]> {\n const typedocOptions: Record<string, unknown> = {\n entryPoints: this.config.entryPoints,\n tsconfig: this.config.tsconfig,\n excludeExternals: this.config.excludeExternals,\n excludePrivate: this.config.excludePrivate,\n excludeProtected: this.config.excludeProtected,\n excludeInternal: this.config.excludeInternal,\n sort: this.config.sort,\n }\n\n // Only pass array/string options when explicitly set to avoid\n // TypeDoc errors like \"option must be set to an array of strings\"\n if (this.config.exclude) typedocOptions.exclude = this.config.exclude\n if (this.config.categoryOrder) typedocOptions.categoryOrder = this.config.categoryOrder\n if (this.config.groupOrder) typedocOptions.groupOrder = this.config.groupOrder\n if (this.config.plugin) typedocOptions.plugin = this.config.plugin\n if (this.config.readme) typedocOptions.readme = this.config.readme\n\n this.app = await Application.bootstrapWithPlugins(typedocOptions, [\n new TSConfigReader(),\n new TypeDocReader(),\n ])\n\n this.project = await this.app.convert()\n\n if (!this.project) {\n throw new Error(\"TypeDoc conversion failed\")\n }\n\n const docs = this.generateMarkdownDocs()\n const apiDir = path.join(outputDir, this.config.out!)\n\n await fs.mkdir(apiDir, { recursive: true })\n\n for (const doc of docs) {\n const filePath = path.join(apiDir, doc.path)\n const dir = path.dirname(filePath)\n await fs.mkdir(dir, { recursive: true })\n\n const frontmatterLines = [\n \"---\",\n `title: ${doc.frontmatter.title}`,\n doc.frontmatter.description ? `description: ${doc.frontmatter.description}` : null,\n doc.frontmatter.sidebar_position !== undefined\n ? `sidebar_position: ${doc.frontmatter.sidebar_position}`\n : null,\n doc.frontmatter.sidebar === false ? `sidebar: false` : null,\n \"---\",\n ].filter((line): line is string => line !== null)\n\n const frontmatter = frontmatterLines.join(\"\\n\") + \"\\n\\n\"\n\n await fs.writeFile(filePath, frontmatter + doc.content)\n }\n\n return docs\n }\n\n private generateMarkdownDocs(): GeneratedApiDoc[] {\n if (!this.project) return []\n\n const docs: GeneratedApiDoc[] = []\n\n // Generate index page\n docs.push(this.generateIndexPage())\n\n const children = this.project.children || []\n\n // Group functions and type aliases by source file\n // React components (PascalCase) get their own pages\n const functionsByFile = new Map<string, DeclarationReflection[]>()\n const typesByFile = new Map<string, DeclarationReflection[]>()\n const componentItems: DeclarationReflection[] = []\n const standaloneItems: DeclarationReflection[] = []\n\n for (const child of children) {\n const sourceFile = child.sources?.[0]?.fileName\n\n if (child.kind === ReflectionKind.Function && sourceFile) {\n // React components are PascalCase and get individual pages\n if (this.isReactComponent(child.name)) {\n componentItems.push(child)\n } else {\n const existing = functionsByFile.get(sourceFile) || []\n existing.push(child)\n functionsByFile.set(sourceFile, existing)\n }\n } else if (child.kind === ReflectionKind.TypeAlias && sourceFile) {\n const existing = typesByFile.get(sourceFile) || []\n existing.push(child)\n typesByFile.set(sourceFile, existing)\n } else {\n standaloneItems.push(child)\n }\n }\n\n // Generate grouped pages for functions (by source file)\n for (const [sourceFile, functions] of functionsByFile) {\n docs.push(this.generateGroupedFunctionsPage(sourceFile, functions))\n }\n\n // Generate grouped pages for types (by source file)\n for (const [sourceFile, types] of typesByFile) {\n docs.push(this.generateGroupedTypesPage(sourceFile, types))\n }\n\n // Generate individual pages for React components\n // Sort alphabetically for consistent prev/next navigation\n const sortedComponents = [...componentItems].sort((a, b) => a.name.localeCompare(b.name))\n for (let i = 0; i < sortedComponents.length; i++) {\n const prev = i > 0 ? sortedComponents[i - 1] : null\n const next = i < sortedComponents.length - 1 ? sortedComponents[i + 1] : null\n docs.push(this.generateComponentPage(sortedComponents[i], prev, next))\n }\n\n // Group standalone items by kind for prev/next navigation within each group\n const itemsByKind = new Map<number, DeclarationReflection[]>()\n for (const child of standaloneItems) {\n const kind = child.kind\n const existing = itemsByKind.get(kind) || []\n existing.push(child)\n itemsByKind.set(kind, existing)\n }\n\n // Generate individual pages for classes, interfaces, enums, etc. with prev/next within group\n for (const [, items] of itemsByKind) {\n const sortedItems = [...items].sort((a, b) => a.name.localeCompare(b.name))\n for (let i = 0; i < sortedItems.length; i++) {\n const prev = i > 0 ? sortedItems[i - 1] : null\n const next = i < sortedItems.length - 1 ? sortedItems[i + 1] : null\n docs.push(...this.generateReflectionDocs(sortedItems[i], \"\", prev, next))\n }\n }\n\n // Generate category index pages for non-empty categories\n docs.push(\n ...this.generateCategoryIndexPages(\n docs,\n componentItems,\n functionsByFile,\n typesByFile,\n standaloneItems\n )\n )\n\n return docs\n }\n\n private generateCategoryIndexPages(\n docs: GeneratedApiDoc[],\n componentItems: DeclarationReflection[],\n functionsByFile: Map<string, DeclarationReflection[]>,\n typesByFile: Map<string, DeclarationReflection[]>,\n standaloneItems: DeclarationReflection[]\n ): GeneratedApiDoc[] {\n const indexPages: GeneratedApiDoc[] = []\n\n // Components index\n if (componentItems.length > 0) {\n const sorted = [...componentItems].sort((a, b) => a.name.localeCompare(b.name))\n const content = [\n `# Components`,\n \"\",\n ...sorted.map((c) => {\n const desc = c.comment?.summary ? ` - ${this.renderCommentShort(c.comment.summary)}` : \"\"\n return `- [${c.name}](${this.buildLink(\"components\", this.getSlug(c.name))})${desc}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"components/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Components\", sidebar: false },\n })\n }\n\n // Functions index\n if (functionsByFile.size > 0) {\n const sortedModules = [...functionsByFile.entries()].sort((a, b) =>\n this.getModuleNameFromPath(a[0]).localeCompare(this.getModuleNameFromPath(b[0]))\n )\n const content = [\n `# Functions`,\n \"\",\n ...sortedModules.map(([sourceFile, functions]) => {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const funcNames = functions\n .map((f) => f.name)\n .sort()\n .join(\", \")\n return `- [${moduleName}](${this.buildLink(\"functions\", slug)}) - ${funcNames}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"functions/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Functions\", sidebar: false },\n })\n }\n\n // Group standalone items by kind for category indexes\n const interfaces = standaloneItems.filter((c) => c.kind === ReflectionKind.Interface)\n const classes = standaloneItems.filter((c) => c.kind === ReflectionKind.Class)\n\n // Interfaces index\n if (interfaces.length > 0) {\n const sorted = [...interfaces].sort((a, b) => a.name.localeCompare(b.name))\n const content = [\n `# Interfaces`,\n \"\",\n ...sorted.map((item) => {\n const desc = item.comment?.summary\n ? ` - ${this.renderCommentShort(item.comment.summary)}`\n : \"\"\n return `- [${item.name}](${this.buildLink(\"interfaces\", this.getSlug(item.name))})${desc}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"interfaces/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Interfaces\", sidebar: false },\n })\n }\n\n // Types index\n if (typesByFile.size > 0) {\n const sortedModules = [...typesByFile.entries()].sort((a, b) =>\n this.getModuleNameFromPath(a[0]).localeCompare(this.getModuleNameFromPath(b[0]))\n )\n const content = [\n `# Types`,\n \"\",\n ...sortedModules.map(([sourceFile, types]) => {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const typeNames = types\n .map((t) => t.name)\n .sort()\n .join(\", \")\n return `- [${moduleName}](${this.buildLink(\"types\", slug)}) - ${typeNames}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"types/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Types\", sidebar: false },\n })\n }\n\n // Classes index\n if (classes.length > 0) {\n const sorted = [...classes].sort((a, b) => a.name.localeCompare(b.name))\n const content = [\n `# Classes`,\n \"\",\n ...sorted.map((item) => {\n const desc = item.comment?.summary\n ? ` - ${this.renderCommentShort(item.comment.summary)}`\n : \"\"\n return `- [${item.name}](${this.buildLink(\"classes\", this.getSlug(item.name))})${desc}`\n }),\n \"\",\n ]\n indexPages.push({\n path: \"classes/index.md\",\n content: content.join(\"\\n\"),\n frontmatter: { title: \"Classes\", sidebar: false },\n })\n }\n\n return indexPages\n }\n\n private generateGroupedFunctionsPage(\n sourceFile: string,\n functions: DeclarationReflection[]\n ): GeneratedApiDoc {\n // Extract module name from source file path (e.g., \"src/utils/string.ts\" -> \"string\")\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const content: string[] = []\n\n content.push(`# ${moduleName} Functions`)\n content.push(\"\")\n content.push(`Functions exported from \\`${sourceFile}\\``)\n content.push(\"\")\n\n // Sort functions alphabetically\n const sortedFunctions = [...functions].sort((a, b) => a.name.localeCompare(b.name))\n\n for (const func of sortedFunctions) {\n content.push(`## ${func.name}`)\n content.push(\"\")\n\n // Description\n if (func.comment?.summary) {\n content.push(this.renderComment(func.comment.summary))\n content.push(\"\")\n }\n\n // Signature\n if (func.signatures) {\n for (const sig of func.signatures) {\n content.push(this.renderSignature(sig))\n content.push(\"\")\n }\n }\n\n // Examples\n if (func.comment?.blockTags) {\n const examples = func.comment.blockTags.filter((t) => t.tag === \"@example\")\n if (examples.length > 0) {\n content.push(\"### Example\")\n content.push(\"\")\n for (const example of examples) {\n content.push(this.renderComment(example.content))\n content.push(\"\")\n }\n }\n }\n\n // Source link\n if (this.config.markdown?.sourceLinks && func.sources?.[0]) {\n const source = func.sources[0]\n const sourceUrl = this.getSourceUrl(source.fileName, source.line)\n if (sourceUrl) {\n content.push(`[Source](${sourceUrl})`)\n content.push(\"\")\n }\n }\n\n content.push(\"---\")\n content.push(\"\")\n }\n\n return {\n path: `functions/${slug}.md`,\n content: content.join(\"\\n\"),\n frontmatter: {\n title: `${moduleName} Functions`,\n description: `Functions from ${sourceFile}`,\n },\n }\n }\n\n private generateGroupedTypesPage(\n sourceFile: string,\n types: DeclarationReflection[]\n ): GeneratedApiDoc {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const content: string[] = []\n\n content.push(`# ${moduleName} Types`)\n content.push(\"\")\n content.push(`Type definitions from \\`${sourceFile}\\``)\n content.push(\"\")\n\n // Sort types alphabetically\n const sortedTypes = [...types].sort((a, b) => a.name.localeCompare(b.name))\n\n for (const typeAlias of sortedTypes) {\n content.push(`## ${typeAlias.name}`)\n content.push(\"\")\n\n // Description\n if (typeAlias.comment?.summary) {\n content.push(this.renderComment(typeAlias.comment.summary))\n content.push(\"\")\n }\n\n // Type definition\n if (typeAlias.type) {\n content.push(\"```typescript\")\n content.push(`type ${typeAlias.name} = ${typeAlias.type.toString()}`)\n content.push(\"```\")\n content.push(\"\")\n }\n\n // Source link\n if (this.config.markdown?.sourceLinks && typeAlias.sources?.[0]) {\n const source = typeAlias.sources[0]\n const sourceUrl = this.getSourceUrl(source.fileName, source.line)\n if (sourceUrl) {\n content.push(`[Source](${sourceUrl})`)\n content.push(\"\")\n }\n }\n\n content.push(\"---\")\n content.push(\"\")\n }\n\n return {\n path: `types/${slug}.md`,\n content: content.join(\"\\n\"),\n frontmatter: {\n title: `${moduleName} Types`,\n description: `Type definitions from ${sourceFile}`,\n },\n }\n }\n\n private getModuleNameFromPath(filePath: string): string {\n // Include parent directory to avoid naming conflicts\n // \"src/utils/string.ts\" -> \"utils/string\"\n // \"src/ui/Sidebar.tsx\" -> \"ui/Sidebar\"\n // \"runtime/sidebar.ts\" -> \"runtime/sidebar\"\n const parts = filePath.split(\"/\")\n const basename = (parts.pop() || filePath).replace(/\\.(ts|tsx|js|jsx)$/, \"\")\n\n // Get parent directory if available\n const parent = parts.pop()\n if (parent && parent !== \"src\") {\n return `${parent}/${basename}`\n }\n return basename\n }\n\n private generateIndexPage(): GeneratedApiDoc {\n const content = [\n `# ${this.config.sidebar?.title || \"API Reference\"}`,\n \"\",\n this.project?.comment?.summary\n ? this.renderComment(this.project.comment.summary)\n : \"Auto-generated API documentation.\",\n \"\",\n ]\n\n const children = this.project?.children || []\n\n // Group functions and types by source file for linking\n // Separate React components from regular functions\n const functionsByFile = new Map<string, DeclarationReflection[]>()\n const typesByFile = new Map<string, DeclarationReflection[]>()\n const componentItems: DeclarationReflection[] = []\n const standaloneItems: DeclarationReflection[] = []\n\n for (const child of children) {\n const sourceFile = child.sources?.[0]?.fileName\n\n if (child.kind === ReflectionKind.Function && sourceFile) {\n if (this.isReactComponent(child.name)) {\n componentItems.push(child)\n } else {\n const existing = functionsByFile.get(sourceFile) || []\n existing.push(child)\n functionsByFile.set(sourceFile, existing)\n }\n } else if (child.kind === ReflectionKind.TypeAlias && sourceFile) {\n const existing = typesByFile.get(sourceFile) || []\n existing.push(child)\n typesByFile.set(sourceFile, existing)\n } else {\n standaloneItems.push(child)\n }\n }\n\n // Render components\n if (componentItems.length > 0) {\n content.push(\"## Components\")\n content.push(\"\")\n\n const sortedComponents = [...componentItems].sort((a, b) => a.name.localeCompare(b.name))\n\n for (const component of sortedComponents) {\n const description = component.comment?.summary\n ? this.renderCommentShort(component.comment.summary)\n : \"\"\n const descSuffix = description ? ` - ${description}` : \"\"\n content.push(\n `- [${component.name}](${this.buildLink(\"components\", this.getSlug(component.name))})${descSuffix}`\n )\n }\n\n content.push(\"\")\n }\n\n // Render grouped function modules\n if (functionsByFile.size > 0) {\n content.push(\"## Functions\")\n content.push(\"\")\n\n // Sort modules alphabetically\n const sortedModules = [...functionsByFile.entries()].sort((a, b) =>\n this.getModuleNameFromPath(a[0]).localeCompare(this.getModuleNameFromPath(b[0]))\n )\n\n for (const [sourceFile, functions] of sortedModules) {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const funcNames = functions\n .map((f) => f.name)\n .sort()\n .join(\", \")\n content.push(`- [${moduleName}](${this.buildLink(\"functions\", slug)}) - ${funcNames}`)\n }\n\n content.push(\"\")\n }\n\n // Render grouped type modules\n if (typesByFile.size > 0) {\n content.push(\"## Type Aliases\")\n content.push(\"\")\n\n const sortedModules = [...typesByFile.entries()].sort((a, b) =>\n this.getModuleNameFromPath(a[0]).localeCompare(this.getModuleNameFromPath(b[0]))\n )\n\n for (const [sourceFile, types] of sortedModules) {\n const moduleName = this.getModuleNameFromPath(sourceFile)\n const slug = this.getSlug(moduleName)\n const typeNames = types\n .map((t) => t.name)\n .sort()\n .join(\", \")\n content.push(`- [${moduleName}](${this.buildLink(\"types\", slug)}) - ${typeNames}`)\n }\n\n content.push(\"\")\n }\n\n // Group remaining items by kind\n const groups: Record<string, DeclarationReflection[]> = {}\n\n for (const child of standaloneItems) {\n const kindName = this.getKindGroupName(child.kind, child.name)\n if (!groups[kindName]) {\n groups[kindName] = []\n }\n groups[kindName].push(child)\n }\n\n // Sort each group alphabetically\n for (const group of Object.values(groups)) {\n group.sort((a, b) => a.name.localeCompare(b.name))\n }\n\n // Define the order of groups (excluding Functions and Types which are handled above)\n const groupOrder = [\"Interfaces\", \"Classes\", \"Variables\", \"Enums\", \"Other\"]\n\n // Render each group\n for (const groupName of groupOrder) {\n const group = groups[groupName]\n if (!group || group.length === 0) continue\n\n content.push(`## ${groupName}`)\n content.push(\"\")\n\n for (const child of group) {\n const description = child.comment?.summary\n ? this.renderCommentShort(child.comment.summary)\n : \"\"\n const descSuffix = description ? ` - ${description}` : \"\"\n const groupUrlPrefix = this.getGroupUrlPrefix(child.kind)\n content.push(\n `- [${child.name}](${this.buildLink(groupUrlPrefix, this.getSlug(child.name))})${descSuffix}`\n )\n }\n\n content.push(\"\")\n }\n\n return {\n path: \"index.md\",\n content: content.join(\"\\n\"),\n frontmatter: {\n title: this.config.sidebar?.title || \"API Reference\",\n description: \"Auto-generated API documentation\",\n sidebar_position: 0,\n },\n }\n }\n\n private getKindGroupName(kind: ReflectionKind, name: string): string {\n // Group hooks and components separately from regular functions\n if (kind === ReflectionKind.Function) {\n // React hooks start with \"use\"\n if (name.startsWith(\"use\")) {\n return \"React Hooks\"\n }\n // React components are PascalCase and typically don't start with lowercase\n if (name[0] === name[0].toUpperCase() && !name.includes(\"_\")) {\n return \"React Components\"\n }\n return \"Functions\"\n }\n\n switch (kind) {\n case ReflectionKind.Interface:\n return \"Interfaces\"\n case ReflectionKind.TypeAlias:\n return \"Types\"\n case ReflectionKind.Class:\n return \"Classes\"\n case ReflectionKind.Variable:\n return \"Variables\"\n case ReflectionKind.Enum:\n return \"Enums\"\n default:\n return \"Other\"\n }\n }\n\n private generateReflectionDocs(\n reflection: DeclarationReflection,\n parentPath: string,\n prev: DeclarationReflection | null = null,\n next: DeclarationReflection | null = null\n ): GeneratedApiDoc[] {\n const docs: GeneratedApiDoc[] = []\n const slug = this.getSlug(reflection.name)\n // Use group prefix (e.g., \"interfaces\", \"classes\") when at top level\n const groupPrefix = parentPath ? \"\" : this.getGroupUrlPrefix(reflection.kind)\n const currentPath = parentPath\n ? `${parentPath}/${slug}`\n : groupPrefix\n ? `${groupPrefix}/${slug}`\n : slug\n\n // Generate main page for this reflection\n docs.push(this.generateReflectionPage(reflection, currentPath, prev, next))\n\n // Generate pages for child classes, interfaces, etc.\n // Functions are grouped by source file, not individual pages\n const children = reflection.children || []\n const hasOwnPage = [\n ReflectionKind.Class,\n ReflectionKind.Interface,\n ReflectionKind.Enum,\n ReflectionKind.Namespace,\n ReflectionKind.Module,\n ]\n\n for (const child of children) {\n if (hasOwnPage.includes(child.kind)) {\n docs.push(...this.generateReflectionDocs(child, currentPath))\n }\n }\n\n return docs\n }\n\n private generateReflectionPage(\n reflection: DeclarationReflection,\n pagePath: string,\n prev: DeclarationReflection | null = null,\n next: DeclarationReflection | null = null\n ): GeneratedApiDoc {\n const kind = this.getKindName(reflection.kind)\n const content: string[] = []\n\n // Breadcrumbs\n if (this.config.markdown?.breadcrumbs) {\n content.push(this.generateBreadcrumbs(pagePath))\n content.push(\"\")\n }\n\n // Title\n content.push(`# ${kind}: ${reflection.name}`)\n content.push(\"\")\n\n // Description\n if (reflection.comment?.summary) {\n content.push(this.renderComment(reflection.comment.summary))\n content.push(\"\")\n }\n\n // Type parameters\n if (reflection.typeParameters && reflection.typeParameters.length > 0) {\n content.push(\"## Type Parameters\")\n content.push(\"\")\n content.push(this.renderTypeParameters(reflection.typeParameters))\n content.push(\"\")\n }\n\n // Hierarchy\n if (this.config.markdown?.hierarchy) {\n const hierarchy = this.renderHierarchy(reflection)\n if (hierarchy) {\n content.push(\"## Hierarchy\")\n content.push(\"\")\n content.push(hierarchy)\n content.push(\"\")\n }\n }\n\n // Signature (for functions)\n if (reflection.signatures) {\n content.push(\"## Signature\")\n content.push(\"\")\n for (const sig of reflection.signatures) {\n content.push(this.renderSignature(sig))\n content.push(\"\")\n }\n }\n\n // Properties\n const properties = (reflection.children || []).filter((c) => c.kind === ReflectionKind.Property)\n if (properties.length > 0) {\n content.push(\"## Properties\")\n content.push(\"\")\n for (const prop of properties) {\n content.push(this.renderProperty(prop))\n content.push(\"\")\n }\n }\n\n // Methods\n const methods = (reflection.children || []).filter((c) => c.kind === ReflectionKind.Method)\n if (methods.length > 0) {\n content.push(\"## Methods\")\n content.push(\"\")\n for (const method of methods) {\n content.push(this.renderMethod(method))\n content.push(\"\")\n }\n }\n\n // Enum members\n const enumMembers = (reflection.children || []).filter(\n (c) => c.kind === ReflectionKind.EnumMember\n )\n if (enumMembers.length > 0) {\n content.push(\"## Members\")\n content.push(\"\")\n content.push(\"| Member | Value | Description |\")\n content.push(\"|--------|-------|-------------|\")\n for (const member of enumMembers) {\n const value = member.defaultValue || \"\"\n const desc = member.comment?.summary ? this.renderCommentShort(member.comment.summary) : \"\"\n content.push(`| \\`${member.name}\\` | \\`${value}\\` | ${desc} |`)\n }\n content.push(\"\")\n }\n\n // Type alias definition\n if (reflection.kind === ReflectionKind.TypeAlias && reflection.type) {\n content.push(\"## Type\")\n content.push(\"\")\n content.push(\"```typescript\")\n content.push(`type ${reflection.name} = ${reflection.type.toString()}`)\n content.push(\"```\")\n content.push(\"\")\n }\n\n // Source link\n if (this.config.markdown?.sourceLinks && reflection.sources?.[0]) {\n const source = reflection.sources[0]\n const sourceUrl = this.getSourceUrl(source.fileName, source.line)\n content.push(\"## Source\")\n content.push(\"\")\n if (sourceUrl) {\n content.push(`[${source.fileName}:${source.line}](${sourceUrl})`)\n } else {\n content.push(`${source.fileName}:${source.line}`)\n }\n content.push(\"\")\n }\n\n // Tags (deprecated, example, etc.)\n if (reflection.comment?.blockTags) {\n const examples = reflection.comment.blockTags.filter((t) => t.tag === \"@example\")\n if (examples.length > 0) {\n content.push(\"## Examples\")\n content.push(\"\")\n for (const example of examples) {\n content.push(this.renderComment(example.content))\n content.push(\"\")\n }\n }\n\n const deprecated = reflection.comment.blockTags.find((t) => t.tag === \"@deprecated\")\n if (deprecated) {\n content.push(\":::warning Deprecated\")\n content.push(this.renderComment(deprecated.content))\n content.push(\":::\")\n content.push(\"\")\n }\n\n const see = reflection.comment.blockTags.filter((t) => t.tag === \"@see\")\n if (see.length > 0) {\n content.push(\"## See Also\")\n content.push(\"\")\n for (const s of see) {\n content.push(`- ${this.renderComment(s.content)}`)\n }\n content.push(\"\")\n }\n }\n\n // Prev/Next navigation within group\n if (prev || next) {\n content.push(\"---\")\n content.push(\"\")\n const groupPrefix = this.getGroupUrlPrefix(reflection.kind)\n const prevLink = prev\n ? `[← ${prev.name}](${this.buildLink(groupPrefix, this.getSlug(prev.name))})`\n : \"\"\n const nextLink = next\n ? `[${next.name} →](${this.buildLink(groupPrefix, this.getSlug(next.name))})`\n : \"\"\n if (prev && next) {\n content.push(`${prevLink} | ${nextLink}`)\n } else {\n content.push(prevLink || nextLink)\n }\n content.push(\"\")\n }\n\n return {\n path: `${pagePath}.md`,\n content: content.join(\"\\n\"),\n frontmatter: {\n title: reflection.name,\n description: reflection.comment?.summary\n ? this.renderCommentShort(reflection.comment.summary)\n : `${kind} ${reflection.name}`,\n },\n }\n }\n\n private renderSignature(sig: SignatureReflection): string {\n const lines: string[] = []\n\n if (this.config.markdown?.codeBlocks) {\n lines.push(\"```typescript\")\n }\n\n const typeParams = sig.typeParameters\n ? `<${sig.typeParameters.map((tp) => tp.name).join(\", \")}>`\n : \"\"\n\n const params = (sig.parameters || [])\n .map((p) => {\n const optional = p.flags.isOptional ? \"?\" : \"\"\n const type = p.type ? `: ${p.type.toString()}` : \"\"\n return `${p.name}${optional}${type}`\n })\n .join(\", \")\n\n const returnType = sig.type ? `: ${sig.type.toString()}` : \"\"\n\n lines.push(`function ${sig.name}${typeParams}(${params})${returnType}`)\n\n if (this.config.markdown?.codeBlocks) {\n lines.push(\"```\")\n }\n\n // Parameters table\n if (sig.parameters && sig.parameters.length > 0) {\n lines.push(\"\")\n lines.push(\"### Parameters\")\n lines.push(\"\")\n lines.push(\"| Name | Type | Description |\")\n lines.push(\"|------|------|-------------|\")\n\n for (const param of sig.parameters) {\n const type = param.type ? `\\`${param.type.toString()}\\`` : \"-\"\n const desc = param.comment?.summary ? this.renderCommentShort(param.comment.summary) : \"-\"\n const optional = param.flags.isOptional ? \" (optional)\" : \"\"\n lines.push(`| ${param.name}${optional} | ${type} | ${desc} |`)\n }\n }\n\n // Return value\n if (sig.type && sig.type.toString() !== \"void\") {\n lines.push(\"\")\n lines.push(\"### Returns\")\n lines.push(\"\")\n lines.push(`\\`${sig.type.toString()}\\``)\n\n if (sig.comment?.blockTags) {\n const returns = sig.comment.blockTags.find((t) => t.tag === \"@returns\")\n if (returns) {\n lines.push(\"\")\n lines.push(this.renderComment(returns.content))\n }\n }\n }\n\n return lines.join(\"\\n\")\n }\n\n private renderProperty(prop: DeclarationReflection): string {\n const lines: string[] = []\n\n const flags: string[] = []\n if (prop.flags.isOptional) flags.push(\"optional\")\n if (prop.flags.isReadonly) flags.push(\"readonly\")\n if (prop.flags.isStatic) flags.push(\"static\")\n\n lines.push(`### ${prop.name}`)\n if (flags.length > 0) {\n lines.push(`*${flags.join(\", \")}*`)\n }\n lines.push(\"\")\n\n if (prop.type) {\n lines.push(\"```typescript\")\n lines.push(`${prop.name}: ${prop.type.toString()}`)\n lines.push(\"```\")\n lines.push(\"\")\n }\n\n if (prop.comment?.summary) {\n lines.push(this.renderComment(prop.comment.summary))\n }\n\n if (prop.defaultValue) {\n lines.push(\"\")\n lines.push(`**Default:** \\`${prop.defaultValue}\\``)\n }\n\n return lines.join(\"\\n\")\n }\n\n private renderMethod(method: DeclarationReflection): string {\n const lines: string[] = []\n\n lines.push(`### ${method.name}()`)\n lines.push(\"\")\n\n if (method.signatures) {\n for (const sig of method.signatures) {\n if (sig.comment?.summary) {\n lines.push(this.renderComment(sig.comment.summary))\n lines.push(\"\")\n }\n\n lines.push(this.renderSignature(sig))\n lines.push(\"\")\n }\n }\n\n return lines.join(\"\\n\")\n }\n\n private renderTypeParameters(typeParams: TypeParameterReflection[]): string {\n const lines: string[] = []\n lines.push(\"| Name | Constraint | Default | Description |\")\n lines.push(\"|------|------------|---------|-------------|\")\n\n for (const tp of typeParams) {\n const constraint = tp.type ? `\\`${tp.type.toString()}\\`` : \"-\"\n const defaultVal = tp.default ? `\\`${tp.default.toString()}\\`` : \"-\"\n const desc = tp.comment?.summary ? this.renderCommentShort(tp.comment.summary) : \"-\"\n lines.push(`| ${tp.name} | ${constraint} | ${defaultVal} | ${desc} |`)\n }\n\n return lines.join(\"\\n\")\n }\n\n private renderHierarchy(reflection: DeclarationReflection): string | null {\n const lines: string[] = []\n\n if (reflection.extendedTypes && reflection.extendedTypes.length > 0) {\n lines.push(\"**Extends:**\")\n for (const t of reflection.extendedTypes) {\n lines.push(`- \\`${t.toString()}\\``)\n }\n }\n\n if (reflection.implementedTypes && reflection.implementedTypes.length > 0) {\n lines.push(\"**Implements:**\")\n for (const t of reflection.implementedTypes) {\n lines.push(`- \\`${t.toString()}\\``)\n }\n }\n\n if (reflection.extendedBy && reflection.extendedBy.length > 0) {\n lines.push(\"**Extended by:**\")\n for (const t of reflection.extendedBy) {\n lines.push(`- \\`${t.toString()}\\``)\n }\n }\n\n if (reflection.implementedBy && reflection.implementedBy.length > 0) {\n lines.push(\"**Implemented by:**\")\n for (const t of reflection.implementedBy) {\n lines.push(`- \\`${t.toString()}\\``)\n }\n }\n\n return lines.length > 0 ? lines.join(\"\\n\") : null\n }\n\n private renderComment(parts: { kind: string; text: string }[]): string {\n return parts.map((p) => p.text).join(\"\")\n }\n\n private renderCommentShort(parts: { kind: string; text: string }[]): string {\n const text = this.renderComment(parts)\n const firstSentence = text.split(/[.!?]\\s/)[0]\n return firstSentence.length < text.length ? firstSentence + \".\" : text\n }\n\n private generateBreadcrumbs(pagePath: string): string {\n const parts = pagePath.split(\"/\")\n const breadcrumbs: string[] = [`[API](${this.basePath})`]\n\n let currentPath = \"\"\n for (let i = 0; i < parts.length - 1; i++) {\n currentPath += (currentPath ? \"/\" : \"\") + parts[i]\n breadcrumbs.push(`[${parts[i]}](${this.basePath}/${currentPath})`)\n }\n\n breadcrumbs.push(parts[parts.length - 1])\n\n return breadcrumbs.join(\" / \")\n }\n\n private getKindName(kind: ReflectionKind): string {\n const kindNames: Partial<Record<ReflectionKind, string>> = {\n [ReflectionKind.Class]: \"Class\",\n [ReflectionKind.Interface]: \"Interface\",\n [ReflectionKind.Enum]: \"Enum\",\n [ReflectionKind.TypeAlias]: \"Type\",\n [ReflectionKind.Function]: \"Function\",\n [ReflectionKind.Variable]: \"Variable\",\n [ReflectionKind.Namespace]: \"Namespace\",\n [ReflectionKind.Module]: \"Module\",\n [ReflectionKind.Property]: \"Property\",\n [ReflectionKind.Method]: \"Method\",\n }\n return kindNames[kind] || \"Unknown\"\n }\n\n private getGroupUrlPrefix(kind: ReflectionKind): string {\n const prefixes: Partial<Record<ReflectionKind, string>> = {\n [ReflectionKind.Class]: \"classes\",\n [ReflectionKind.Interface]: \"interfaces\",\n [ReflectionKind.Enum]: \"enums\",\n [ReflectionKind.Variable]: \"variables\",\n [ReflectionKind.Namespace]: \"namespaces\",\n [ReflectionKind.Module]: \"modules\",\n }\n return prefixes[kind] || \"other\"\n }\n\n private getSlug(name: string): string {\n return name\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, \"-\")\n .replace(/^-|-$/g, \"\")\n }\n\n /**\n * Build a route-compatible link path for a category/slug pair.\n * React Router maps \"category/index.md\" to the \"/category\" route,\n * so links must not include a trailing \"/index\".\n */\n private buildLink(category: string, slug: string): string {\n if (slug === \"index\") {\n return `${this.basePath}/${category}`\n }\n return `${this.basePath}/${category}/${slug}`\n }\n\n private getSourceUrl(fileName: string, line: number): string | null {\n if (!this.config.markdown?.sourceBaseUrl) return null\n const baseUrl = this.config.markdown.sourceBaseUrl.replace(/\\/$/, \"\")\n return `${baseUrl}/${fileName}#L${line}`\n }\n\n /**\n * Check if a function name looks like a React component (PascalCase)\n */\n private isReactComponent(name: string): boolean {\n // React components start with uppercase and don't contain underscores\n // Also check for common component patterns\n if (name[0] !== name[0].toUpperCase()) return false\n if (name.includes(\"_\")) return false\n // Exclude common non-component patterns\n if (name.startsWith(\"use\")) return false // hooks\n if (name.endsWith(\"Props\") || name.endsWith(\"Options\") || name.endsWith(\"Config\")) return false\n return true\n }\n\n /**\n * Generate a page for a React component\n */\n private generateComponentPage(\n component: DeclarationReflection,\n prev: DeclarationReflection | null,\n next: DeclarationReflection | null\n ): GeneratedApiDoc {\n const slug = this.getSlug(component.name)\n const groupPrefix = \"components\"\n const content: string[] = []\n\n content.push(`# ${component.name}`)\n content.push(\"\")\n\n // Description\n if (component.comment?.summary) {\n content.push(this.renderComment(component.comment.summary))\n content.push(\"\")\n }\n\n // Signature\n if (component.signatures) {\n content.push(\"## Usage\")\n content.push(\"\")\n for (const sig of component.signatures) {\n content.push(this.renderComponentSignature(sig, component.name))\n content.push(\"\")\n }\n }\n\n // Examples\n if (component.comment?.blockTags) {\n const examples = component.comment.blockTags.filter((t) => t.tag === \"@example\")\n if (examples.length > 0) {\n content.push(\"## Example\")\n content.push(\"\")\n for (const example of examples) {\n content.push(this.renderComment(example.content))\n content.push(\"\")\n }\n }\n }\n\n // Source link\n if (this.config.markdown?.sourceLinks && component.sources?.[0]) {\n const source = component.sources[0]\n const sourceUrl = this.getSourceUrl(source.fileName, source.line)\n if (sourceUrl) {\n content.push(`[Source](${sourceUrl})`)\n content.push(\"\")\n }\n }\n\n // Prev/Next navigation\n if (prev || next) {\n content.push(\"---\")\n content.push(\"\")\n const prevLink = prev\n ? `[← ${prev.name}](${this.buildLink(groupPrefix, this.getSlug(prev.name))})`\n : \"\"\n const nextLink = next\n ? `[${next.name} →](${this.buildLink(groupPrefix, this.getSlug(next.name))})`\n : \"\"\n if (prev && next) {\n content.push(`${prevLink} | ${nextLink}`)\n } else {\n content.push(prevLink || nextLink)\n }\n content.push(\"\")\n }\n\n return {\n path: `${groupPrefix}/${slug}.md`,\n content: content.join(\"\\n\"),\n frontmatter: {\n title: component.name,\n description: component.comment?.summary\n ? this.renderCommentShort(component.comment.summary)\n : `${component.name} component`,\n },\n }\n }\n\n /**\n * Get the name of a TypeDoc type (handles reference types, etc.)\n */\n private getTypeName(paramType: unknown): string | null {\n if (!paramType || typeof paramType !== \"object\") return null\n\n // Direct name property\n if (\"name\" in paramType && typeof (paramType as { name: unknown }).name === \"string\") {\n return (paramType as { name: string }).name\n }\n\n // Reference type with target\n if (\"type\" in paramType && (paramType as { type: string }).type === \"reference\") {\n const refType = paramType as { name?: string; qualifiedName?: string }\n return refType.name || refType.qualifiedName || null\n }\n\n return null\n }\n\n /**\n * Get props from a component's parameter type\n */\n private getPropsFromType(\n paramType: unknown\n ): Array<{ name: string; type: string; optional: boolean; description: string }> {\n const props: Array<{ name: string; type: string; optional: boolean; description: string }> = []\n\n // Check if it's a reflection type with inline declaration\n if (paramType && typeof paramType === \"object\" && \"declaration\" in paramType) {\n const declaration = (paramType as { declaration: DeclarationReflection }).declaration\n const children = declaration.children || []\n for (const child of children) {\n props.push({\n name: child.name,\n type: child.type ? child.type.toString() : \"unknown\",\n optional: child.flags.isOptional,\n description: child.comment?.summary ? this.renderCommentShort(child.comment.summary) : \"\",\n })\n }\n }\n // Check if it's a reference type - look up the interface in the project\n else {\n const typeName = this.getTypeName(paramType)\n if (typeName) {\n // Find the interface/type alias in the project\n let propsInterface = this.project?.getChildByName(typeName)\n\n // If not found directly, search all children\n if (!propsInterface && this.project?.children) {\n for (const child of this.project.children) {\n if (child.name === typeName) {\n propsInterface = child\n break\n }\n }\n }\n\n if (propsInterface && \"children\" in propsInterface) {\n const children = (propsInterface as DeclarationReflection).children || []\n for (const child of children) {\n props.push({\n name: child.name,\n type: child.type ? child.type.toString() : \"unknown\",\n optional: child.flags.isOptional,\n description: child.comment?.summary\n ? this.renderCommentShort(child.comment.summary)\n : \"\",\n })\n }\n }\n }\n }\n\n return props\n }\n\n /**\n * Render a component signature in a more readable format\n */\n private renderComponentSignature(sig: SignatureReflection, componentName: string): string {\n const lines: string[] = []\n\n // Get props from the first parameter\n const propsParam = sig.parameters?.[0]\n const props = propsParam ? this.getPropsFromType(propsParam.type) : []\n\n // Get the props interface name for linking\n const propsTypeName = propsParam?.type ? this.getTypeName(propsParam.type) : null\n\n // Check if component has children prop\n const hasChildren = props.some((p) => p.name === \"children\")\n // Filter out children from props display (shown in JSX structure instead)\n const displayProps = props.filter((p) => p.name !== \"children\")\n\n lines.push(\"```tsx\")\n lines.push(`<${componentName}`)\n\n if (displayProps.length > 0) {\n for (const prop of displayProps) {\n const optMark = prop.optional ? \"?\" : \"\"\n lines.push(` ${prop.name}${optMark}={${prop.type}}`)\n }\n } else if (!hasChildren) {\n lines.push(` {...props}`)\n }\n\n if (hasChildren) {\n lines.push(`>`)\n lines.push(` {children}`)\n lines.push(`</${componentName}>`)\n } else {\n lines.push(`/>`)\n }\n lines.push(\"```\")\n\n // Props table with link to props interface\n if (props.length > 0) {\n lines.push(\"\")\n if (propsTypeName) {\n lines.push(`## [Props](${this.basePath}/interfaces/${this.getSlug(propsTypeName)})`)\n } else {\n lines.push(\"## Props\")\n }\n lines.push(\"\")\n lines.push(\"| Prop | Type | Required | Description |\")\n lines.push(\"|------|------|----------|-------------|\")\n\n for (const prop of props) {\n const type = `\\`${prop.type}\\``\n const required = prop.optional ? \"No\" : \"Yes\"\n const desc = prop.description || \"-\"\n lines.push(`| ${prop.name} | ${type} | ${required} | ${desc} |`)\n }\n }\n\n // Skip return value for components - it's always Element/JSX.Element\n\n return lines.join(\"\\n\")\n }\n}\n\nexport async function generateApiDocs(\n config: TypeDocConfig,\n outputDir: string\n): Promise<GeneratedApiDoc[]> {\n const generator = new TypeDocGenerator(config)\n return generator.generate(outputDir)\n}\n"],"mappings":";AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,OAIK;AACP,OAAO,UAAU;AACjB,OAAO,QAAQ;AAGR,IAAM,mBAAN,MAAuB;AAAA,EACpB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAER,YAAY,QAAuB;AACjC,SAAK,SAAS;AAAA,MACZ,KAAK;AAAA,MACL,kBAAkB;AAAA,MAClB,gBAAgB;AAAA,MAChB,kBAAkB;AAAA,MAClB,iBAAiB;AAAA,MACjB,MAAM,CAAC,cAAc;AAAA,MACrB,SAAS;AAAA,QACP,OAAO;AAAA,QACP,UAAU;AAAA,QACV,WAAW;AAAA,MACb;AAAA,MACA,UAAU;AAAA,QACR,aAAa;AAAA,QACb,WAAW;AAAA,QACX,aAAa;AAAA,QACb,YAAY;AAAA,MACd;AAAA,MACA,GAAG;AAAA,IACL;AAEA,SAAK,WAAW,MAAM,KAAK,OAAO;AAAA,EACpC;AAAA,EAEA,MAAM,SAAS,WAA+C;AAC5D,UAAM,iBAA0C;AAAA,MAC9C,aAAa,KAAK,OAAO;AAAA,MACzB,UAAU,KAAK,OAAO;AAAA,MACtB,kBAAkB,KAAK,OAAO;AAAA,MAC9B,gBAAgB,KAAK,OAAO;AAAA,MAC5B,kBAAkB,KAAK,OAAO;AAAA,MAC9B,iBAAiB,KAAK,OAAO;AAAA,MAC7B,MAAM,KAAK,OAAO;AAAA,IACpB;AAIA,QAAI,KAAK,OAAO,QAAS,gBAAe,UAAU,KAAK,OAAO;AAC9D,QAAI,KAAK,OAAO,cAAe,gBAAe,gBAAgB,KAAK,OAAO;AAC1E,QAAI,KAAK,OAAO,WAAY,gBAAe,aAAa,KAAK,OAAO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