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

Function extractPlaceholders

apps/sim/lib/pptx-renderer/model/master.ts:27–36  ·  view source on GitHub ↗

* Extract placeholder shape nodes from an spTree node. * A shape is considered a placeholder if it has a `p:ph` element in its nvPr.

(spTree: SafeXmlNode)

Source from the content-addressed store, hash-verified

25 * A shape is considered a placeholder if it has a `p:ph` element in its nvPr.
26 */
27function extractPlaceholders(spTree: SafeXmlNode): SafeXmlNode[] {
28 const placeholders: SafeXmlNode[] = []
29 const allChildren = spTree.allChildren()
30 for (const child of allChildren) {
31 if (isPlaceholder(child)) {
32 placeholders.push(child)
33 }
34 }
35 return placeholders
36}
37
38/**
39 * Parse a slide master XML root (`p:sldMaster`) into MasterData.

Callers 1

parseMasterFunction · 0.85

Calls 3

isPlaceholderFunction · 0.90
allChildrenMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected