import type { BasePlugin } from './base-plugin'; import type { Processor } from 'unified'; import type { Node, Parent } from 'unist'; import type { AsyncTaskQueueManager, TranslateFunction, EscapeHtmlFunction, PluginRenderer } from '../types/index'; /** * Visit function type from unist-util-visit */ type VisitFn = (tree: Node, test: string, visitor: (node: Node, index: number | undefined, parent: Parent | undefined) => void) => void; /** * DOCX helper objects */ interface DOCXHelpers { [key: string]: unknown; } export declare const plugins: BasePlugin[]; /** * Register all plugins to a remark processor * This creates a single unified plugin that processes all node types in document order * @param processor - Unified/remark processor * @param renderer - Renderer instance * @param asyncTask - Async task creator from AsyncTaskQueueManager * @param translate - Translation function * @param escapeHtml - HTML escape function * @param visit - unist-util-visit function * @returns The processor (for chaining) */ export declare function registerRemarkPlugins(processor: Processor, renderer: PluginRenderer, asyncTask: AsyncTaskQueueManager['asyncTask'], translate: TranslateFunction, escapeHtml: EscapeHtmlFunction, visit: VisitFn): Processor; /** * Get a plugin by type * @param type - Plugin type (e.g., 'mermaid', 'svg', 'html') * @returns Plugin instance or null if not found */ export declare function getPluginByType(type: string): BasePlugin | null; /** * Get a plugin that can handle a specific AST node * @param node - AST node (e.g., code block or html node) * @returns Plugin instance or null if no plugin can handle */ export declare function getPluginForNode(node: Node): BasePlugin | null; /** * Get all plugin types * @returns Array of plugin types */ export declare function getPluginTypes(): string[]; /** * Convert AST node to DOCX element using appropriate plugin * High-level wrapper that encapsulates plugin lookup, content extraction, and conversion * * @param node - AST node to convert * @param renderer - Renderer instance for generating images * @param docxHelpers - DOCX helper objects and functions * @param progressCallback - Optional callback to report progress * @returns DOCX element (Paragraph/ImageRun) or null if no plugin handles this node */ export declare function convertNodeToDOCX(node: Node, renderer: PluginRenderer, docxHelpers: DOCXHelpers, progressCallback?: (() => void) | null): Promise; export {};