import type { MarkdownDocument, RendererOptions } from 'comark'; export * from 'comark/render'; export interface AnsiRendererOptions extends RendererOptions { /** * Whether to emit ANSI escape codes. * Defaults to `true` unless the `NO_COLOR` environment variable is set. */ colors?: boolean; /** * Terminal width used for horizontal rules and code block borders. * @default 80 */ width?: number; } /** * Render a Markdown document to an ANSI-styled terminal string. * * @param document - The markdown document to render (parsed markdown) * @param options - Optional ANSI rendering options * @returns The ANSI-styled string * * @example * ```typescript * import { parseMarkdown } from 'comark' * import { renderAnsiFromDocument } from '@comark/ansi' * * const doc = await parseMarkdown('# Hello\n\nThis is **bold** and _italic_.') * console.log(await renderAnsiFromDocument(doc)) * ``` */ export declare function renderAnsiFromDocument(document: MarkdownDocument | { nodes: MarkdownDocument['nodes']; }, options?: AnsiRendererOptions): Promise;