(presentation: string)
| 6 | import type { PptxFiles } from '@/lib/pptx-renderer/parser/zip-parser' |
| 7 | |
| 8 | function createFiles(presentation: string): PptxFiles { |
| 9 | return { |
| 10 | contentTypes: '<Types />', |
| 11 | presentation, |
| 12 | presentationRels: `<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"> |
| 13 | <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide" Target="slides/slide1.xml" /> |
| 14 | <Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide" Target="slides/slide2.xml" /> |
| 15 | </Relationships>`, |
| 16 | slides: new Map([ |
| 17 | ['ppt/slides/slide1.xml', createSlideXml()], |
| 18 | ['ppt/slides/slide2.xml', createSlideXml()], |
| 19 | ]), |
| 20 | slideRels: new Map([ |
| 21 | ['ppt/slides/_rels/slide1.xml.rels', '<Relationships />'], |
| 22 | ['ppt/slides/_rels/slide2.xml.rels', '<Relationships />'], |
| 23 | ]), |
| 24 | slideLayouts: new Map(), |
| 25 | slideLayoutRels: new Map(), |
| 26 | slideMasters: new Map(), |
| 27 | slideMasterRels: new Map(), |
| 28 | themes: new Map(), |
| 29 | media: new Map(), |
| 30 | charts: new Map(), |
| 31 | chartStyles: new Map(), |
| 32 | chartColors: new Map(), |
| 33 | diagramDrawings: new Map(), |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | function createPresentationXml(markers = ''): string { |
| 38 | return `<p:presentation xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" ${markers}> |
no test coverage detected