/** * Documentation Content Type * * Represents technical documentation with navigation, * sections, and structured content blocks. */ import { ArticleMetadata } from '../../../components/organisms/article/types'; import { ContentDocument, ContentConfig } from '../types'; /** * Navigation link for prev/next page navigation */ export interface DocNavLink { /** Page title */ title: string; /** Page slug/URL */ slug: string; } /** * Documentation document interface */ export interface Documentation extends ContentDocument<'docs'> { /** Documentation page title */ title: string; /** Section name (e.g., "Getting Started", "API Reference") */ section?: string; /** Version of the documentation */ version?: string; /** Previous page navigation */ prevPage?: DocNavLink; /** Next page navigation */ nextPage?: DocNavLink; /** Table of contents items (auto-generated from headings if not provided) */ toc?: { text: string; level: number; id: string; }[]; } /** * DocsBuilder provides a fluent API for creating documentation pages. * * @example * ```typescript * const docs = new DocsBuilder() * .title('Installation Guide') * .section('Getting Started') * .version('1.0.0') * .heading('Prerequisites', 1) * .paragraph('Before you begin, ensure you have...') * .callout('Node.js 18+ is required', 'warning') * .heading('Installation', 1) * .code('npm install valtech-components', 'bash') * .prevPage('Introduction', '/docs/intro') * .nextPage('Configuration', '/docs/config') * .build(); * * // Convert to ArticleMetadata * const article = docs.toArticle(); * ``` */ export declare class DocsBuilder { private doc; /** * Sets the documentation page title */ title(title: string): this; /** * Sets the section name */ section(section: string): this; /** * Sets the documentation version */ version(version: string): this; /** * Sets the previous page navigation */ prevPage(title: string, slug: string): this; /** * Sets the next page navigation */ nextPage(title: string, slug: string): this; /** * Sets the slug for the page */ slug(slug: string): this; /** * Sets the ID for the page */ id(id: string): this; /** * Sets tags for the documentation page */ tags(...tags: string[]): this; /** * Sets the category */ category(category: string): this; /** * Adds a heading block */ heading(text: string, level?: 1 | 2 | 3): this; /** * Adds a paragraph block */ paragraph(text: string, emphasis?: boolean): this; /** * Adds a code block */ code(code: string, language?: string): this; /** * Adds a command/terminal block */ command(command: string): this; /** * Adds a callout/note block */ callout(text: string, variant?: 'info' | 'warning' | 'success' | 'error', title?: string): this; /** * Adds an info callout (alias for callout with info variant) */ info(text: string, title?: string): this; /** * Adds a warning callout */ warning(text: string, title?: string): this; /** * Adds an error callout */ error(text: string, title?: string): this; /** * Adds a success callout */ success(text: string, title?: string): this; /** * Adds an unordered list */ list(items: string[]): this; /** * Adds an ordered/numbered list */ orderedList(items: string[]): this; /** * Adds a checklist */ checklist(items: string[]): this; /** * Adds an image block */ image(src: string, alt: string, caption?: string): this; /** * Adds a quote block */ quote(text: string, author?: string, source?: string): this; /** * Adds a divider */ divider(style?: 'line' | 'dots' | 'space'): this; /** * Adds a button/CTA */ button(text: string, href?: string, color?: 'primary' | 'secondary' | 'success'): this; /** * Configures rendering options */ config(config: Partial): this; /** * Builds the final Documentation object */ build(): Documentation; /** * Builds and converts to ArticleMetadata */ toArticle(): ArticleMetadata; /** * Resets the builder for reuse */ clear(): this; } /** * Creates a new DocsBuilder instance */ export declare function docs(): DocsBuilder;