MCPcopy Index your code
hub / github.com/simstudioai/sim / parseThemeXml

Function parseThemeXml

apps/sim/lib/copilot/vfs/document-style.ts:90–109  ·  view source on GitHub ↗
(xml: string)

Source from the content-addressed store, hash-verified

88}
89
90function 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
111type StyleRaw = {
112 id: string

Callers 1

extractDocumentStyleFunction · 0.85

Calls 2

parseColorSlotFunction · 0.85
parseFontSchemeFunction · 0.85

Tested by

no test coverage detected