import type { Block, KssPluginData, MarkdownPluginData, TsDocBase, TypescriptPluginData } from "@documentalist/client"; import { type ReactNode } from "react"; /** This docs theme requires Markdown data and optionally supports Typescript and KSS data. */ export type DocsData = MarkdownPluginData & (TypescriptPluginData | {}) & (KssPluginData | {}); export declare function hasTypescriptData(docs: DocsData): docs is MarkdownPluginData & TypescriptPluginData; export declare function hasKssData(docs: DocsData): docs is MarkdownPluginData & KssPluginData; /** * Use React context to provide data and rendering functions from the root `Documentation` * component to other ancestor components defined by the docs-theme package. */ export interface DocumentationContextApi { /** * Get the Documentalist data. * Use the `hasTypescriptData` and `hasKssData` typeguards before accessing those plugins' data. */ getDocsData: () => DocsData; /** Render a block of Documentalist documentation to a React node. */ renderBlock: (block: Block) => ReactNode; /** Render a Documentalist Typescript type string to a React node. */ renderType: (type: string) => ReactNode; /** Render the text of a "View source" link. */ renderViewSourceLinkText: (entry: TsDocBase) => ReactNode; /** Open the API browser to the given member name. */ showApiDocs: (name: string) => void; } export declare const DocumentationContext: import("react").Context;