Files
MorphDoc/packages/docx-theme-engine/README.md
T

29 lines
1.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# @md-to-pdf/docx-theme-engine
DOCX 主题映射引擎负责在浏览器主题 CSS 与 Word 样式之间建立稳定、可诊断
的中间协议。
当前阶段包含:
- 56 个标准 Markdown 与结构化文档语义槽位;
- 覆盖普通文档、公文、简报、项目报告和标书的标准探针 DOM;
- Chromium/Electron 计算样式快照协议;
- 不绑定具体浏览器实现的计算样式采集器;
- Word 目标样式令牌;
- 自动映射、显式覆盖和预设降级配置;
- 样式来源、映射置信度和诊断协议;
- 旧版 `docxStyle.preset` 兼容归一化。
本包不负责:
- 启动 Playwright 或 Electron
- 读取主题目录或网络资源;
- 执行 Pandoc
- 直接修改 OOXML
- 按主题 ID 维护专属转换分支。
后续 Chromium 与 Electron 适配器只负责挂载探针、应用主题 CSS,并将
平台的 `getComputedStyle()` 接入本包采集器。本包负责将快照归一化为
DOCX 样式令牌,`@md-to-pdf/docx-engine` 再消费令牌生成
`reference.docx` 和最终 OOXML。