import type { TraversedEntry } from '@scalar/workspace-store/schemas/navigation'; /** A single ancestor in the tag hierarchy leading to the section in view. */ export type Crumb = { id: string; title: string; }; /** A placeholder crumb standing in for the hidden middle of a long trail. */ export type EllipsisCrumb = { ellipsis: true; hiddenTitles: string[]; }; /** Narrow a rendered crumb to the collapsed-middle placeholder. */ export declare const isEllipsis: (crumb: Crumb | EllipsisCrumb) => crumb is EllipsisCrumb; /** * Collapse the middle of a trail to `first … secondLast last`. * * Only the middle is folded away: the root gives the top-level context and the * last two keep the immediate parent and current section visible. Trails with no * real middle to hide (fewer than four crumbs) are returned untouched. */ export declare const collapseTrail: (chain: Crumb[]) => (Crumb | EllipsisCrumb)[]; /** * Whether the navigation contains nested tags that render their own headings. * Legacy tag-group wrappers only render headings in the classic layout, so they * do not reserve an empty context bar in the modern layout. */ export declare const hasRenderableTagHierarchy: (entries: TraversedEntry[], layout: "classic" | "modern") => boolean; /** * Find the first nested tag trail to show before scrolling selects a section. * This keeps the context bar useful during the Introduction instead of leaving * its reserved space empty. */ export declare const getInitialContextChain: (entries: TraversedEntry[], layout: "classic" | "modern") => Crumb[]; //# sourceMappingURL=helpers.d.ts.map