Appearance
Interface: ThemeContext ​
The source theme subgraph a slide, notes slide, layout or master resolves against: the ColorContext maps, the live a:fmtScheme for style-matrix resolution, and the roots of the inheritance chain a placeholder reads through.
Every root here is read-only — nothing in this module or in placeholder-inherit.ts mutates one. The import-time flatten pass extends this with the one field it needs to write from (see FlattenContext in read/api/ops/flatten.ts).
Extends ​
Properties ​
clrMap ​
clrMap:
Map<string,string>
Inherited from ​
clrScheme ​
clrScheme:
Map<string,string>
Inherited from ​
defaultTextStyle? ​
optionaldefaultTextStyle?:Element|null
The presentation's p:defaultTextStyle (a CT_TextListStyle from presentation.xml), keyed by level — PowerPoint's lowest-priority text fallback, applying to any run (placeholder or not) that resolves nothing above it. Only ever set on a slide context (see resolveSlideColorContext); absent on notes/master/layout contexts, so their chains are unaffected. A table cell's text is read against a copy that holds the slide master's p:otherStyle here instead, the tier PowerPoint resolves cell text through (TableCell.textFrame). Read-only — never mutated.
fmtScheme ​
fmtScheme:
Element|null
fontScheme? ​
optionalfontScheme?:Element|null
The theme's a:fontScheme, for resolving a +mj-*/+mn-* major/minor font token (the placeholder-inherited typeface chain bottoms out in one) to a literal face name via resolveThemeFont in this module. (Named rather than linked: it is internal, so a reference link to it resolves to nothing in the published reference.) null/absent leaves such a token unresolved.
layoutRoot? ​
optionallayoutRoot?:Element|null
The source slideLayout root element, for resolving what a placeholder inherits. null/absent disables the layout tier.
masterRoot? ​
optionalmasterRoot?:Element|null
The source slideMaster root element, for resolving placeholder inheritance via its placeholder a:lstStyle and p:txStyles.
notesStyle? ​
optionalnotesStyle?:Element|null
The notesMaster's p:notesStyle (a CT_TextListStyle), for resolving the character properties a notes-body run inherits when it sets none of its own. Only ever set on a notes context (see resolveNotesColorContext); on a slide context it is absent, so the slide placeholder chain (layout/master a:lstStyle → p:txStyles) is unaffected. It is the notes analogue of the master p:txStyles category style, keyed by level rather than placeholder type. Read-only — never mutated.
placeholderMemo? ​
optionalplaceholderMemo?:Map<string,Element|null>
Memo for the placeholder lookups findPlaceholder (read/oxml/placeholder-inherit.ts) performs against layoutRoot and masterRoot, keyed by tier, placeholder type and idx.
The lookup is a full subtree scan, and reading one run's five inherited properties used to perform ten of them: each property walks the tier chain, and each tier walk scans a layout and a master. The answer depends only on the roots and the (type, idx) asked for, and the roots on a context never change — so it is computed once per context.
The memo lives here rather than in a module-level cache keyed by the root element because that is what scopes it correctly: a context is built per Slide/TemplatePart proxy, so the memo lasts exactly as long as the captured roots it agrees with, and a caller who mutates the deck and reads again gets a fresh context along with a fresh everything else. Written by placeholder-inherit.ts and read by nothing else.