/** * Generic documentation pipeline for lexicons. * * Reads manifest.json and meta.json from a packaged lexicon's dist/ directory, * collects rule metadata from source, and generates structured MDX reference * pages. Individual lexicons supply callbacks for provider-specific formatting * (service grouping, resource type URLs, custom overview content). */ import type { DocsConfig, DocsResult, ManifestJSON } from "./docs-types.js"; export { expandFileMarkers } from "./docs-file-markers.js"; export type { DocsConfig, DocsResult, Quadrant, SidebarPage } from "./docs-types.js"; export { QUADRANTS, QUADRANT_LABELS, readAuthoredPages } from "./docs-pages.js"; /** * The version rendered into the docs (chant #1377). * * `dist/manifest.json` is written by `npm run bundle`, which runs only under * `prepack`, so its `version` is whatever was last bundled on this machine * and can trail `package.json` by several releases. `package.json` is the * source of truth and is never stale, so it wins whenever it is present. * The manifest's own version is the fallback for a dist with no package * beside it (test fixtures, relocated dist directories). */ export declare function lexiconVersion(config: DocsConfig, manifest: ManifestJSON): string; /** * Run the documentation pipeline with the supplied config. */ export declare function docsPipeline(config: DocsConfig): DocsResult; /** * Render the complete rules table for a lexicon that has no {@link docsPipeline} * site of its own. * * The docker lexicon hand-authors its docs, which left its rule table the only * one in the repo that could drift from source without anything noticing * (#1312). This is the one page worth generating even when the rest of a site * is hand-written; the caller writes the result to `rules.mdx` and links it. * Returns null when the lexicon declares no rules. */ export declare function generateRulesPage(config: DocsConfig, srcDir: string): string | null; /** * Marks a page as pipeline output. Used both to warn readers off editing the * file and, in {@link writeDocsSite}, to tell a page this pipeline owns from a * hand-written one when reaping pages it no longer emits. */ export declare const GENERATED_MARKER_TAG = "GENERATED-BY-CHANT-DOCS"; /** * Every slug a Starlight sidebar reaches, including nested group items. */ export declare function collectSidebarSlugs(items: Array>): Set; /** * Content pages that no sidebar entry points at. * * `index` is always the site root and never needs an entry of its own. */ export declare function unreachablePages(contentDir: string, sidebar: Array>): string[]; /** * Write generated docs pages to disk. */ export declare function writeDocsPages(result: DocsResult, outDir: string): void; /** * Scaffold a standalone Starlight docs site from pipeline results. * * Writes: package.json, astro.config.mjs, tsconfig.json, and all content * pages under src/content/docs/. The resulting directory can be built with * `npm install && npm run build`. */ export declare function writeDocsSite(config: DocsConfig, result: DocsResult): void; //# sourceMappingURL=docs.d.ts.map