(xml: string)
| 88 | } |
| 89 | |
| 90 | function parseThemeXml(xml: string): NonNullable<DocumentStyleSummary['theme']> { |
| 91 | const slots: Array<keyof ThemeColors> = [ |
| 92 | 'dk1', |
| 93 | 'lt1', |
| 94 | 'dk2', |
| 95 | 'lt2', |
| 96 | 'accent1', |
| 97 | 'accent2', |
| 98 | 'accent3', |
| 99 | 'accent4', |
| 100 | 'accent5', |
| 101 | 'accent6', |
| 102 | ] |
| 103 | const colors: Partial<ThemeColors> = {} |
| 104 | for (const slot of slots) { |
| 105 | const hex = parseColorSlot(xml, slot) |
| 106 | if (hex) colors[slot] = hex |
| 107 | } |
| 108 | return { colors, fonts: parseFontScheme(xml) } |
| 109 | } |
| 110 | |
| 111 | type StyleRaw = { |
| 112 | id: string |
no test coverage detected