/** * Markdown Documentation Formatter * Converts documentation objects to well-formatted markdown files */ import type { ToolDocumentation, CategoryDocumentation, TypeDocumentation, DocumentationOutput } from "./DocumentationGenerator.js"; export declare class MarkdownFormatter { /** * Generate main API overview documentation */ generateApiOverview(output: DocumentationOutput): string; /** * Generate tool documentation */ generateToolDocumentation(tool: ToolDocumentation): string; /** * Generate category documentation */ generateCategoryDocumentation(category: CategoryDocumentation): string; /** * Flattens text for use inside a Markdown table cell. * * Tool descriptions are free-form and several embed newlines and bulleted "Usage * Examples:" blocks. Interpolated raw, those newlines terminate the table row, so the * generated index collapsed into unparseable prose partway down. Collapse whitespace, * escape pipes, and clip to a length that stays readable in a table; the tool page * linked from the row carries the full text. */ private toTableCell; /** * Builds the Examples section of a category page from the tools the category actually * registers. * * These examples used to be synthesised from the category name, with a naive * `slice(0, -1)` standing in for de-pluralisation. That emitted commands that do not * exist — the System category advertised `wp_list_system`, `wp_get_syste` and * `wp_create_syste` while registering only `wp_check_version` — so anyone following * a category page got unknown-tool errors. Naming a real tool or omitting the section * is the only honest option. */ private buildCategoryExamples; /** * Generate type documentation */ generateTypeDocumentation(type: TypeDocumentation): string; /** * Generate parameters table */ private generateParametersTable; /** * Generate examples section */ private generateExamples; /** * Generate error example */ private generateErrorExample; /** * Generate WordPress mapping section */ private generateWordPressMapping; /** * Generate permissions section */ private generatePermissions; /** * Generate response example */ private generateResponseExample; /** * Generate error documentation */ private generateErrorDocumentation; /** * Generate related tools section */ private generateRelatedTools; /** * Generate categories table */ private generateCategoriesTable; /** * Generate tools table */ private generateToolsTable; /** * Generate type properties table */ private generateTypePropertiesTable; /** * Generate badges for overview */ private generateBadges; /** * Generate tool category badge */ private generateToolBadge; /** * Format parameters for command examples */ private formatParameters; /** * Generate additional examples */ private generateAdditionalExamples; } //# sourceMappingURL=MarkdownFormatter.d.ts.map