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(roundtrip): keep a new full-canvas rect instead of dropping it
hugohe3523e5bd972f9
diff --git a/skills/ppt-master/scripts/docs/svg-contract.md b/skills/ppt-master/scripts/docs/svg-contract.mdindex ec5411c9..0953fd2d 100644--- a/skills/ppt-master/scripts/docs/svg-contract.md+++ b/skills/ppt-master/scripts/docs/svg-contract.md@@ -421,7 +421,9 @@ eligible visual layer may be a direct full-canvas `<rect>` or one inside asimple single-child group. Its fill must have a registered native mapping(solid, linear/radial gradient, or preset pattern), and it must have notransform, filter, clip, rounding, or visible stroke. Export writes the fill as-Slide `p:bg`; image elements remain pictures. Structured routes use the+Slide `p:bg`; image elements remain pictures. A rebuilt round-trip slide keeps+its source `p:bg`, so a new full-canvas `<rect>` there stays a shape at its SVG+paint position. Structured routes use thenarrower explicit solid-background ownership contract in[`pptx-structure-interface.md`](../../references/pptx-structure-interface.md).diff --git a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/builder.py b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/builder.pyindex d7341586..81b8bd85 100644--- a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/builder.py+++ b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/builder.py@@ -7721,7 +7721,12 @@ def create_pptx_with_native_svg(theme_font_spec=active_theme_font_spec,theme_color_spec=active_theme_color_spec,primary_language=primary_language,- promote_background=pptx_structure != "structured",+ # A round-trip overlay keeps the source p:bg, so a+ # new full-canvas rect must stay a shape to survive.+ promote_background=(+ pptx_structure != "structured"+ and slide_patch is None+ ),dangerous_nonconforming_export=(dangerous_nonconforming_export),diff --git a/skills/ppt-master/scripts/tests/test_edit_native_batch_d.py b/skills/ppt-master/scripts/tests/test_edit_native_batch_d.pyindex 8a7beb29..c2b59e5a 100644--- a/skills/ppt-master/scripts/tests/test_edit_native_batch_d.py+++ b/skills/ppt-master/scripts/tests/test_edit_native_batch_d.py@@ -139,3 +139,10 @@ class EditNativeBatchDTests(unittest.TestCase):self._author(project, 'base', 'mid', 'callout')names, _slide = self._export_roster(project)self.assertEqual(names, ['base', 'mid', 'tab', 'callout'])++ def test_new_full_canvas_rect_stays_a_shape_under_the_source_background(self) -> None:+ project = self._workspace()+ self._author(project, 'full:new-under', 'base', 'tab', 'callout')+ names, slide = self._export_roster(project)+ self.assertEqual(names, ['new-under', 'base', 'tab', 'callout'])+ self.assertIsNone(slide.find('p:cSld/p:bg', NS))