Skip to content

AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He

fix(checker): icon references keep their fill local under compact authoring; template mode reports the roster contract beside a Brand or Style spec

hugohe3aa5cf55fec20
diff --git a/skills/ppt-master/scripts/compact_svg_styles.py b/skills/ppt-master/scripts/compact_svg_styles.py
index e6bc5424..edf4dd00 100644
--- a/skills/ppt-master/scripts/compact_svg_styles.py
+++ b/skills/ppt-master/scripts/compact_svg_styles.py
@@ -147,6 +147,13 @@ def _is_preset_atom(element: ET.Element) -> bool:
return isinstance(element.tag, str) and authored_preset_encoding(element) is not None
+def _keeps_local_paint(element: ET.Element) -> bool:
+ """Preset atoms and icon references resolve paint from their own attributes."""
+ return _is_preset_atom(element) or (
+ _local_name(element.tag) == "use" and element.get("data-icon") is not None
+ )
+
+
def is_canonical_presentation_value(
value: str,
*,
@@ -366,9 +373,9 @@ def _promote_common_group_defaults(
]
if len(children) < 2:
return
- # Helper-owned preset atoms keep their paint local; the preset contract
- # rejects paint that only arrives from an ancestor group.
- if any(_is_preset_atom(child) for child in children):
+ # Helper-owned preset atoms and icon references keep their paint local;
+ # both contracts reject paint that only arrives from an ancestor group.
+ if any(_keeps_local_paint(child) for child in children):
return
element_styles = _style_declarations(element.get("style"))
@@ -419,7 +426,7 @@ def _remove_redundant_inherited_styles(
) -> None:
if (
_local_name(element.tag) in _DEFINITION_SUBTREES
- or _is_preset_atom(element)
+ or _keeps_local_paint(element)
):
return
declarations = _style_declarations(element.get("style"))
diff --git a/skills/ppt-master/scripts/svg_quality/checker.py b/skills/ppt-master/scripts/svg_quality/checker.py
index cd81e011..6cde2bd2 100644
--- a/skills/ppt-master/scripts/svg_quality/checker.py
+++ b/skills/ppt-master/scripts/svg_quality/checker.py
@@ -1213,6 +1213,7 @@ class SVGQualityChecker:
# severity is 'error' or 'warning'. Printed in print_summary.
self._template_issues: List[Tuple[str, str, str]] = []
self._spec_only_template_kind: str | None = None
+ self._template_roster_pages = 0
self._animation_issues: List[Tuple[str, str]] = []
self._illustration_issues: List[Tuple[str, str, str]] = []
self._communication_trace_issues: List[Tuple[str, str]] = []
@@ -9282,6 +9283,7 @@ class SVGQualityChecker:
custom_contract = self._extract_frontmatter_placeholders(spec_text) if spec_text else {}
on_disk = {p.stem for p in svg_files}
+ self._template_roster_pages = len(spec_pages)
if spec_pages:
spec_set = set(spec_pages)
@@ -9921,6 +9923,11 @@ class SVGQualityChecker:
pretty_kind = self._spec_only_template_kind.title()
print(f" {pretty_kind} design_spec.md contract passed.")
if not errors:
+ if self._template_roster_pages:
+ print(
+ f" Roster contract passed "
+ f"({self._template_roster_pages} declared page(s) matched)."
+ )
if self._spec_only_template_kind is None:
print(" No structural roster issues.")
print(" Conventional placeholder-name hints may be declared through "