import type { DocsContentItem, LlmsDoc, SearchDoc } from '../../core/content.js'; import type { DocsVersions } from '../../core/version.js'; import { type SourcePage } from './pages.js'; /** Where the pages sit, which is what turns a page's file into a URL and a version. */ export type IndexOptions = { /** The docs root the pages were read from. */ contentDir: string; /** Routes root, so `/docs/intro/+page.md` becomes `/docs/intro`. */ routesDir: string; /** Declared versions, when the site has them. */ versions?: DocsVersions; }; /** * The sidebar's index: the frontmatter fields navigation needs, plus the heading * list for a server-rendered TOC and an estimated reading time. Served as the * eagerly-imported `svelte-docsmith/content` virtual module. * * `lastUpdated` is read off the page rather than looked up here, so pass pages * that have been through `withCommitDates` or the column comes out blank. */ export declare function contentIndex(pages: SourcePage[], options: IndexOptions): DocsContentItem[]; /** * The search index: title, section, description, heading list, and plain-text * body. Served as the lazy-loaded `svelte-docsmith/search` virtual module so * search can index bodies without bloating the eagerly-imported content index. */ export declare function searchIndex(pages: SourcePage[], options: IndexOptions): SearchDoc[]; /** * The LLM index: title, section, description, and the full markdown content. * Served as the `svelte-docsmith/llms` virtual module and consumed server-side * by `llms.txt` / `llms-full.txt` routes, so it never ships to the client. */ export declare function llmsIndex(pages: SourcePage[], options: IndexOptions): LlmsDoc[];