import type { DocsContentItem } from './content.js'; /** A single sidebar link (a leaf). */ export type NavItem = { title: string; url: string; }; /** A titled group of sidebar entries, which may themselves be nested groups. */ export type NavGroup = { title: string; items: NavNode[]; }; /** A sidebar entry: either a link or a nested group. */ export type NavNode = NavItem | NavGroup; /** Narrow a {@link NavNode} to a {@link NavGroup} (an entry with children). */ export declare function isNavGroup(node: NavNode): node is NavGroup; /** * Derive sidebar nav from a content collection. Each page's `section` (a string * or a nested path) places it in the tree; within every level, entries order by * `order` (then title), and a group inherits the smallest `order` of its * descendants so groups sort by their earliest child. Top-level entries are * always groups; pages without a section fall under "Docs". */ export declare function navFromContent(content: DocsContentItem[]): NavGroup[]; /** * Flatten the nav tree to its leaf links in sidebar reading order (depth-first), * for the prev/next pager. */ export declare function flattenNav(nodes: NavNode[]): NavItem[]; /** One step in a breadcrumb trail: a label, and an optional jump target. */ export type Breadcrumb = { title: string; url?: string; }; /** * The trail of groups leading to the page at `url` (top group first, excluding * the page itself), or `undefined` if the page is not in the tree. Each group * step carries a `url` to its first leaf so breadcrumbs are navigable. */ export declare function navTrail(nodes: NavNode[], url: string): Breadcrumb[] | undefined;