feat: 建立统一语义文档模型

This commit is contained in:
SkyJourney
2026-07-30 23:47:51 +08:00
parent 7f72258126
commit 459a079f3b
22 changed files with 921 additions and 271 deletions
@@ -295,6 +295,14 @@ describe("共享应用服务", () => {
resources: []
});
expect(prepared.document.metadata.title).toBe("DOCX 文档");
expect(prepared.document.semanticDocument).toEqual({
schemaVersion: 1,
titlePolicy: {
metadataTitle: "suppress",
firstBodyHeading: "keep"
},
regions: []
});
expect(prepared.theme.manifest.id).toBe("test-theme");
expect(prepared.theme.source).toBe("bundled");
expect(prepared.theme.css).toContain(
@@ -59,6 +59,14 @@ const prepared: PreparedDocxExport = {
keywords: [],
language: "zh-CN"
},
semanticDocument: {
schemaVersion: 1,
titlePolicy: {
metadataTitle: "suppress",
firstBodyHeading: "keep"
},
regions: []
},
features: [],
warnings: []
},
@@ -70,6 +70,14 @@ const prepared: PreparedDocxExport = {
keywords: [],
language: "zh-CN"
},
semanticDocument: {
schemaVersion: 1,
titlePolicy: {
metadataTitle: "suppress",
firstBodyHeading: "keep"
},
regions: []
},
features: [],
warnings: ["原始图片已降级"]
},