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

Function parseTextBody

apps/sim/lib/pptx-renderer/model/nodes/shape-node.ts:112–128  ·  view source on GitHub ↗
(txBody: SafeXmlNode)

Source from the content-addressed store, hash-verified

110 * Parse a text body (`p:txBody` or `a:txBody`).
111 */
112export function parseTextBody(txBody: SafeXmlNode): TextBody | undefined {
113 if (!txBody.exists()) return undefined
114
115 const bodyPr = txBody.child('bodyPr')
116 const lstStyle = txBody.child('lstStyle')
117
118 const paragraphs: TextParagraph[] = []
119 for (const pNode of txBody.children('p')) {
120 paragraphs.push(parseParagraph(pNode))
121 }
122
123 return {
124 bodyProperties: bodyPr.exists() ? bodyPr : undefined,
125 listStyle: lstStyle.exists() ? lstStyle : undefined,
126 paragraphs,
127 }
128}
129
130/** Fill type local names in priority order. */
131const FILL_TYPES = ['solidFill', 'gradFill', 'blipFill', 'pattFill', 'grpFill', 'noFill'] as const

Callers 2

parseCellFunction · 0.90
parseShapeNodeFunction · 0.85

Calls 5

parseParagraphFunction · 0.85
existsMethod · 0.80
childMethod · 0.80
childrenMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected