import { ModuleConfig, Operation, PageDefine, UIElement } from './types/module.types'; import { clearMermaidCache, closeMermaidRenderer } from './mermaid-renderer.js'; export declare function validatePageJsonFile(pageJsonFile: string): PageDefine; /** * 通过配置生成PRD * * @param templatePath 模板路径 * @param outputPath 输出路径 * @param moduleConfig 模块配置 */ export declare function generatePRDByConfig(templatePath: string, outputPath: string, moduleConfig: ModuleConfig): Promise; declare function parseTsvToUiElements(uiElementsTsv: string): UIElement[]; declare function parseTsvToOperations(operationsTsv: string): Operation[]; /** * 基于模板生成docx文件 * @param templatePath 模板文件路径 * @param outputPath 输出文件路径 * @param data 数据 */ export declare function generateDocxFromTemplate(templatePath: string, outputPath: string, data: Record): Promise; /** * 将mermaid字符串转换为图片Buffer(使用离线渲染器) * @param mermaidCode mermaid代码字符串 * @param options 渲染选项 * @returns 图片Buffer */ export declare function mermaidToImage(mermaidCode: string, options?: { timeout?: number; useCache?: boolean; }): Promise; export { clearMermaidCache, closeMermaidRenderer }; export { parseTsvToUiElements, parseTsvToOperations }; /** * 从 JSON 文件读取数据并渲染 DOCX 模板 * @param templatePath DOCX 模板文件的绝对路径 * @param jsonFilePath JSON 数据文件的绝对路径 * @param outputPath 输出文件的绝对路径 * @returns 输出文件路径 */ export declare function generateDocxFromTemplateWithJsonFile(templatePath: string, jsonFilePath: string, outputPath: string): Promise; /** * 使用 JSON Schema 校验 JSON 文件 * @param jsonFilePath JSON 文件的绝对路径 * @param schemaFilePath JSON Schema 文件的绝对路径 * @returns 校验结果对象,包含是否有效和错误详情 */ export declare function validateJsonFileWithSchema(jsonFilePath: string, schemaFilePath: string): Promise<{ valid: boolean; errors?: string; }>; //# sourceMappingURL=docx-template-utils.d.ts.map