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
feat(transitions): support the full PowerPoint transition gallery
hugohe34bd2aefca6f6
diff --git a/docs/animations.md b/docs/animations.mdindex 5604fa58..d31d273f 100644--- a/docs/animations.md+++ b/docs/animations.md@@ -29,7 +29,22 @@ Changing animation settings does not require regenerating the slides. Rerun `svg| Animate all elements together | `python3 skills/ppt-master/scripts/svg_to_pptx.py <project> -a auto --animation-trigger with-previous` || Slow the reveal sequence | `python3 skills/ppt-master/scripts/svg_to_pptx.py <project> -a auto --animation-duration 0.5 --animation-stagger 0.8` |-Available page-transition effects are `fade`, `push`, `wipe`, `split`, `strips`, `cover`, and `random`. `-t none` removes the visual effect but does not remove an explicitly configured auto-advance timer.+The transition vocabulary covers all three sections in the current PowerPoint+gallery:++- Subtle: `morph`, `fade`, `push`, `wipe`, `split`, `reveal`, `cut`,+ `random_bars`, `shape`, `uncover`, `cover`, `flash`.+- Exciting: `fall_over`, `drape`, `curtains`, `wind`, `prestige`, `fracture`,+ `crush`, `peel_off`, `page_curl`, `airplane`, `origami`, `dissolve`,+ `checkerboard`, `blinds`, `clock`, `ripple`, `honeycomb`, `glitter`,+ `vortex`, `shred`, `switch`, `flip`, `gallery`, `cube`, `doors`, `box`,+ `comb`, `zoom`, `random`.+- Dynamic Content: `pan`, `ferris_wheel`, `conveyor`, `rotate`, `window`,+ `orbit`, `fly_through`.++Compatibility aliases `strips`, `circle`, `diamond`, `newsflash`, `plus`,+`pull`, `wedge`, and `wheel` also remain valid. `-t none` removes the visual+effect but does not remove an explicitly configured auto-advance timer.## Choose a Start Modediff --git a/docs/zh/animations.md b/docs/zh/animations.mdindex d63debba..bd49c5ae 100644--- a/docs/zh/animations.md+++ b/docs/zh/animations.md@@ -29,7 +29,25 @@ PPT Master 会把**页间转场**和可选的**元素入场动画**写成真正| 所有元素同时入场 | `python3 skills/ppt-master/scripts/svg_to_pptx.py <project> -a auto --animation-trigger with-previous` || 放慢逐步揭示节奏 | `python3 skills/ppt-master/scripts/svg_to_pptx.py <project> -a auto --animation-duration 0.5 --animation-stagger 0.8` |-页间转场可选 `fade`、`push`、`wipe`、`split`、`strips`、`cover`、`random`。`-t none` 只关闭视觉效果,不会移除显式设置的自动翻页计时。+页间转场已经覆盖当前 PowerPoint 效果库的三个完整分组:++- 细微:平滑 `morph`、淡入/淡出 `fade`、推入 `push`、擦除 `wipe`、+ 分割 `split`、显示 `reveal`、切入 `cut`、随机线条 `random_bars`、+ 形状 `shape`、揭开 `uncover`、覆盖 `cover`、闪光 `flash`。+- 华丽:跌落 `fall_over`、悬挂 `drape`、帘式 `curtains`、风 `wind`、+ 上拉帷幕 `prestige`、折断 `fracture`、压碎 `crush`、剥离 `peel_off`、+ 页面卷曲 `page_curl`、飞机 `airplane`、日式折纸 `origami`、溶解+ `dissolve`、棋盘 `checkerboard`、百叶窗 `blinds`、时钟 `clock`、+ 涟漪 `ripple`、蜂巢 `honeycomb`、闪耀 `glitter`、涡流 `vortex`、+ 碎片 `shred`、切换 `switch`、翻转 `flip`、库 `gallery`、立方体+ `cube`、门 `doors`、框 `box`、梳理 `comb`、缩放 `zoom`、随机+ `random`。+- 动态内容:平移 `pan`、摩天轮 `ferris_wheel`、传送带 `conveyor`、+ 旋转 `rotate`、窗口 `window`、轨道 `orbit`、飞过 `fly_through`。++兼容标识 `strips`、`circle`、`diamond`、`newsflash`、`plus`、`pull`、+`wedge`、`wheel` 仍然有效。`-t none` 只关闭视觉效果,不会移除显式设置的+自动翻页计时。## 选择 Start 模式diff --git a/skills/ppt-master/references/animations.md b/skills/ppt-master/references/animations.mdindex 6dc258e7..d2e03e51 100644--- a/skills/ppt-master/references/animations.md+++ b/skills/ppt-master/references/animations.md@@ -101,7 +101,24 @@ python3 skills/ppt-master/scripts/svg_to_pptx.py <project> --auto-advance 5python3 skills/ppt-master/scripts/svg_to_pptx.py <project> -t none --auto-advance 5```-Available effects: `fade`, `push`, `wipe`, `split`, `strips`, `cover`, `random`.+The named effects cover the complete current PowerPoint transition gallery:++- Subtle: `morph`, `fade`, `push`, `wipe`, `split`, `reveal`, `cut`,+ `random_bars`, `shape`, `uncover`, `cover`, `flash`.+- Exciting: `fall_over`, `drape`, `curtains`, `wind`, `prestige`, `fracture`,+ `crush`, `peel_off`, `page_curl`, `airplane`, `origami`, `dissolve`,+ `checkerboard`, `blinds`, `clock`, `ripple`, `honeycomb`, `glitter`,+ `vortex`, `shred`, `switch`, `flip`, `gallery`, `cube`, `doors`, `box`,+ `comb`, `zoom`, `random`.+- Dynamic Content: `pan`, `ferris_wheel`, `conveyor`, `rotate`, `window`,+ `orbit`, `fly_through`.++Established low-level aliases remain available for compatibility: `strips`,+`circle`, `diamond`, `newsflash`, `plus`, `pull`, `wedge`, and `wheel`.+`none` removes the visual effect. Effects that require newer Office namespaces+carry a real PowerPoint effect in `mc:Choice` and a `fade` fallback for older+consumers; validation requires the requested primary effect and never accepts+the fallback as a silent substitute.Flags:diff --git a/skills/ppt-master/scripts/README.md b/skills/ppt-master/scripts/README.mdindex d5923fec..faffdb6e 100644--- a/skills/ppt-master/scripts/README.md+++ b/skills/ppt-master/scripts/README.md@@ -174,7 +174,7 @@ python3 scripts/template_fill_pptx.py apply <project_path>/sources/<source.pptx>python3 scripts/template_fill_pptx.py validate <project_path>```-`apply` requires `fill_plan.json` to have top-level `"status": "confirmed"` unless `--force` is passed. It automatically writes `filled_YYYYMMDD_HHMMSS.pptx` unless the output stem already ends with a timestamp. It applies a `fade` page transition by default; `--transition <effect>` (fade/push/wipe/split/strips/cover/random, `--transition-duration` in seconds) changes it, `--transition none` removes it, `--transition keep` preserves the source transitions, and a per-slide `transition` field in the plan overrides whatever the CLI selects.+`apply` requires `fill_plan.json` to have top-level `"status": "confirmed"` unless `--force` is passed. It automatically writes `filled_YYYYMMDD_HHMMSS.pptx` unless the output stem already ends with a timestamp. It applies a `fade` page transition by default; `--transition <effect>` accepts any effect in the shared gallery registry documented by [`docs/pptx-transitions.md`](docs/pptx-transitions.md), and `--transition-duration <seconds>` changes its duration. `--transition none` removes the visual effect, `--transition keep` preserves the source transitions, and a per-slide `transition` field in the plan overrides whatever the CLI selects.Native existing-PPTX enhancement (direct PPTX, no SVG conversion):diff --git a/skills/ppt-master/scripts/docs/pptx-transitions.md b/skills/ppt-master/scripts/docs/pptx-transitions.mdindex a1e9602e..79aad044 100644--- a/skills/ppt-master/scripts/docs/pptx-transitions.md+++ b/skills/ppt-master/scripts/docs/pptx-transitions.md@@ -52,17 +52,84 @@ a timing-only p:transition with no visual-effect child.## 3. Compatibility Contract-The Phase 1 registry preserves the established seven effects:+The registry covers the complete current PowerPoint transition gallery:+12 Subtle effects, 29 Exciting effects, and 7 Dynamic Content effects.+It also retains eight established low-level aliases that remain valid public+inputs.-| Effect | Required child and attributes |+Standard PresentationML effects use a direct `p:transition` carrier:++| Effect | Required primary child and attributes ||---|---|| fade | p:fade || push | p:push dir=r || wipe | p:wipe dir=r || split | p:split orient=horz dir=out |-| strips | p:strips dir=rd |+| cut | p:cut thruBlk=0 |+| random_bars | p:randomBar dir=vert |+| shape | p:circle |+| uncover | p:pull dir=r || cover | p:cover dir=r |+| dissolve | p:dissolve |+| checkerboard | p:checker dir=horz |+| blinds | p:blinds dir=vert |+| clock | p:wheel spokes=1 || random | p:random |+| box | p:zoom |+| comb | p:comb dir=horz |+| strips | p:strips dir=rd |+| circle | p:circle |+| diamond | p:diamond |+| newsflash | p:newsflash |+| plus | p:plus |+| pull | p:pull dir=r |+| wedge | p:wedge |+| wheel | p:wheel spokes=1 |++Office 2010 effects use a `p14` Choice with a `p:fade` Fallback:++| Effect | Required primary child and attributes |+|---|---|+| reveal | p14:reveal dir=r |+| flash | p14:flash |+| ripple | p14:ripple |+| honeycomb | p14:honeycomb |+| glitter | p14:glitter |+| vortex | p14:vortex dir=r |+| shred | p14:shred dir=out |+| switch | p14:switch dir=r |+| flip | p14:flip dir=r |+| gallery | p14:gallery dir=r |+| cube | p14:prism dir=r |+| doors | p14:doors dir=vert |+| zoom | p14:warp dir=in |+| pan | p14:pan dir=r |+| ferris_wheel | p14:ferris dir=r |+| conveyor | p14:conveyor dir=r |+| rotate | p14:prism dir=r isContent=1 |+| window | p14:window |+| orbit | p14:prism dir=r isContent=1 isInverted=1 |+| fly_through | p14:flythrough |++Office 2012 effects use a `p15` Choice with a `p:fade` Fallback:++| Effect | Required primary child and attributes |+|---|---|+| fall_over | p15:prstTrans prst=fallOver invX=1 |+| drape | p15:prstTrans prst=drape invX=1 |+| curtains | p15:prstTrans prst=curtains |+| wind | p15:prstTrans prst=wind |+| prestige | p15:prstTrans prst=prestige |+| fracture | p15:prstTrans prst=fracture |+| crush | p15:prstTrans prst=crush |+| peel_off | p15:prstTrans prst=peelOff invX=1 |+| page_curl | p15:prstTrans prst=pageCurlSingle invX=1 |+| airplane | p15:prstTrans prst=airplane |+| origami | p15:prstTrans prst=origami |++`morph` uses `p159:morph option=byObject` in an Office 2015 Choice with a+`p:fade` Fallback. `none` is the explicit no-visual-effect input and therefore+is not a registry entry.**Hard rule — no downgrade**:@@ -70,8 +137,8 @@ The Phase 1 registry preserves the established seven effects:- Never omit its established direction or split attributes.- Reject an unknown requested effect; never substitute fade.- Preserve an unknown source effect when the route selects preserve.-- A future PowerPoint extension counts as successful only when the primary- Choice contains the requested effect. A fallback alone is not success.+- An extension counts as successful only when the primary Choice contains the+ requested effect. A fallback alone is not success.---@@ -84,7 +151,7 @@ The Phase 1 registry preserves the established seven effects:| Template Fill v1 | fade, 0.5s | click | keep preserves source; legacy advance_after maps to both || Native Enhance v1 | Confirmed plan effect | Confirmed timing module | Disabled transitions preserve unless the v1 plan explicitly selected none |-Template Fill and Native Enhance keep their v1 route defaults in Phase 1.+Template Fill and Native Enhance keep their v1 route defaults.The public `create_pptx_with_native_svg` Python API also retains its legacy0.5s default; the CLI explicitly passes 0.4s. Changing a default policy is aseparate migration decision.diff --git a/skills/ppt-master/scripts/native_enhance_pptx_core.py b/skills/ppt-master/scripts/native_enhance_pptx_core.pyindex 041c2f51..0cf2bd23 100644--- a/skills/ppt-master/scripts/native_enhance_pptx_core.py+++ b/skills/ppt-master/scripts/native_enhance_pptx_core.py@@ -916,7 +916,11 @@ def build_parser() -> argparse.ArgumentParser:init.add_argument("--name", default=None, help="ASCII project name slug")init.add_argument("--project-dir", default=None, help="explicit project directory")init.add_argument("--projects-root", default="projects", help="projects root (default: projects)")- init.add_argument("--transition", default="fade", choices=sorted(TRANSITIONS.keys()))+ init.add_argument(+ "--transition",+ default="fade",+ choices=sorted(TRANSITIONS.keys()) + ["none"],+ )init.add_argument("--transition-duration", type=_positive_seconds_arg, default=0.5)init.add_argument("--narration-padding", type=_non_negative_seconds_arg, default=0.4)init.add_argument(diff --git a/skills/ppt-master/scripts/pptx_animations.py b/skills/ppt-master/scripts/pptx_animations.pyindex c78bdc0f..cc97407c 100644--- a/skills/ppt-master/scripts/pptx_animations.py+++ b/skills/ppt-master/scripts/pptx_animations.py@@ -5,13 +5,10 @@ PPT Master - PPTX Animation ModuleProvides one strict entrance-animation registry plus OOXML read/write helpers.Supported transition effects:- - fade: Fade in/out- - push: Push- - wipe: Wipe- - split: Split- - strips: Strips (diagonal wipe)- - cover: Cover- - random: Random+ - Complete current PowerPoint gallery: Subtle, Exciting, Dynamic Content+ - Compatibility aliases: strips, circle, diamond, newsflash, plus, pull,+ wedge, wheel+ - none: no visual transition (handled by the shared transition core)Supported entrance animations (per-element):appear, fade, fly, fly_left, fly_right, fly_top, cut, zoom, wipe,diff --git a/skills/ppt-master/scripts/pptx_transitions.py b/skills/ppt-master/scripts/pptx_transitions.pyindex faf67e51..f7f6cac5 100644--- a/skills/ppt-master/scripts/pptx_transitions.py+++ b/skills/ppt-master/scripts/pptx_transitions.py@@ -38,6 +38,8 @@ except ImportError:PML_NS = "http://schemas.openxmlformats.org/presentationml/2006/main"P14_NS = "http://schemas.microsoft.com/office/powerpoint/2010/main"+P15_NS = "http://schemas.microsoft.com/office/powerpoint/2012/main"+P159_NS = "http://schemas.microsoft.com/office/powerpoint/2015/09/main"MC_NS = "http://schemas.openxmlformats.org/markup-compatibility/2006"PACKAGE_REL_NS = "http://schemas.openxmlformats.org/package/2006/relationships"CONTENT_TYPES_NS = "http://schemas.openxmlformats.org/package/2006/content-types"@@ -61,6 +63,7 @@ MAX_OOXML_UNSIGNED_INT = MAX_OOXML_MILLISECONDSTRANSITIONS: dict[str, dict[str, Any]] = {+ # Keep the original seven entries first for stable CLI/help ordering."fade": {"name": "Fade","element": "fade",@@ -96,10 +99,331 @@ TRANSITIONS: dict[str, dict[str, Any]] = {"element": "random","attrs": {},},+ "blinds": {+ "name": "Blinds",+ "element": "blinds",+ "attrs": {"dir": "vert"},+ },+ "checkerboard": {+ "name": "Checkerboard",+ "element": "checker",+ "attrs": {"dir": "horz"},+ },+ "circle": {+ "name": "Circle",+ "element": "circle",+ "attrs": {},+ },+ "comb": {+ "name": "Comb",+ "element": "comb",+ "attrs": {"dir": "horz"},+ },+ "cut": {+ "name": "Cut",+ "element": "cut",+ "attrs": {"thruBlk": "0"},+ },+ "diamond": {+ "name": "Diamond",+ "element": "diamond",+ "attrs": {},+ },+ "dissolve": {+ "name": "Dissolve",+ "element": "dissolve",+ "attrs": {},+ },+ "newsflash": {+ "name": "Newsflash",+ "element": "newsflash",+ "attrs": {},+ },+ "plus": {+ "name": "Plus",+ "element": "plus",+ "attrs": {},+ },+ "pull": {+ "name": "Pull",+ "element": "pull",+ "attrs": {"dir": "r"},+ },+ "random_bars": {+ "name": "Random Bars",+ "element": "randomBar",+ "attrs": {"dir": "vert"},+ },+ "wedge": {+ "name": "Wedge",+ "element": "wedge",+ "attrs": {},+ },+ "wheel": {+ "name": "Wheel",+ "element": "wheel",+ "attrs": {"spokes": "1"},+ },+ "zoom": {+ "name": "Zoom",+ "prefix": "p14",+ "element": "warp",+ "attrs": {"dir": "in"},+ "fallback": "fade",+ },+ # Current PowerPoint transition gallery: Subtle.+ "morph": {+ "name": "Morph",+ "prefix": "p159",+ "element": "morph",+ "attrs": {"option": "byObject"},+ "fallback": "fade",+ },+ "reveal": {+ "name": "Reveal",+ "prefix": "p14",+ "element": "reveal",+ "attrs": {"dir": "r"},+ "fallback": "fade",+ },+ "shape": {+ "name": "Shape",+ "element": "circle",+ "attrs": {},+ },+ "uncover": {+ "name": "Uncover",+ "element": "pull",+ "attrs": {"dir": "r"},+ },+ "flash": {+ "name": "Flash",+ "prefix": "p14",+ "element": "flash",+ "attrs": {},+ "fallback": "fade",+ },+ # Current PowerPoint transition gallery: Exciting.+ "fall_over": {+ "name": "Fall Over",+ "prefix": "p15",+ "element": "prstTrans",+ "attrs": {"prst": "fallOver", "invX": "1"},+ "fallback": "fade",+ },+ "drape": {+ "name": "Drape",+ "prefix": "p15",+ "element": "prstTrans",+ "attrs": {"prst": "drape", "invX": "1"},+ "fallback": "fade",+ },+ "curtains": {+ "name": "Curtains",+ "prefix": "p15",+ "element": "prstTrans",+ "attrs": {"prst": "curtains"},+ "fallback": "fade",+ },+ "wind": {+ "name": "Wind",+ "prefix": "p15",+ "element": "prstTrans",+ "attrs": {"prst": "wind"},+ "fallback": "fade",+ },+ "prestige": {+ "name": "Prestige",+ "prefix": "p15",+ "element": "prstTrans",+ "attrs": {"prst": "prestige"},+ "fallback": "fade",+ },+ "fracture": {+ "name": "Fracture",+ "prefix": "p15",+ "element": "prstTrans",+ "attrs": {"prst": "fracture"},+ "fallback": "fade",+ },+ "crush": {+ "name": "Crush",+ "prefix": "p15",+ "element": "prstTrans",+ "attrs": {"prst": "crush"},+ "fallback": "fade",+ },+ "peel_off": {+ "name": "Peel Off",+ "prefix": "p15",+ "element": "prstTrans",+ "attrs": {"prst": "peelOff", "invX": "1"},+ "fallback": "fade",+ },+ "page_curl": {+ "name": "Page Curl",+ "prefix": "p15",+ "element": "prstTrans",+ "attrs": {"prst": "pageCurlSingle", "invX": "1"},+ "fallback": "fade",+ },+ "airplane": {+ "name": "Airplane",+ "prefix": "p15",+ "element": "prstTrans",+ "attrs": {"prst": "airplane"},+ "fallback": "fade",+ },+ "origami": {+ "name": "Origami",+ "prefix": "p15",+ "element": "prstTrans",+ "attrs": {"prst": "origami"},+ "fallback": "fade",+ },+ "clock": {+ "name": "Clock",+ "element": "wheel",+ "attrs": {"spokes": "1"},+ },+ "ripple": {+ "name": "Ripple",+ "prefix": "p14",+ "element": "ripple",+ "attrs": {},+ "fallback": "fade",+ },+ "honeycomb": {+ "name": "Honeycomb",+ "prefix": "p14",+ "element": "honeycomb",+ "attrs": {},+ "fallback": "fade",+ },+ "glitter": {+ "name": "Glitter",+ "prefix": "p14",+ "element": "glitter",+ "attrs": {},+ "fallback": "fade",+ },+ "vortex": {+ "name": "Vortex",+ "prefix": "p14",+ "element": "vortex",+ "attrs": {"dir": "r"},+ "fallback": "fade",+ },+ "shred": {+ "name": "Shred",+ "prefix": "p14",+ "element": "shred",+ "attrs": {"dir": "out"},+ "fallback": "fade",+ },+ "switch": {+ "name": "Switch",+ "prefix": "p14",+ "element": "switch",+ "attrs": {"dir": "r"},+ "fallback": "fade",+ },+ "flip": {+ "name": "Flip",+ "prefix": "p14",+ "element": "flip",+ "attrs": {"dir": "r"},+ "fallback": "fade",+ },+ "gallery": {+ "name": "Gallery",+ "prefix": "p14",+ "element": "gallery",+ "attrs": {"dir": "r"},+ "fallback": "fade",+ },+ "cube": {+ "name": "Cube",+ "prefix": "p14",+ "element": "prism",+ "attrs": {"dir": "r"},+ "fallback": "fade",+ },+ "doors": {+ "name": "Doors",+ "prefix": "p14",+ "element": "doors",+ "attrs": {"dir": "vert"},+ "fallback": "fade",+ },+ "box": {+ "name": "Box",+ "element": "zoom",+ "attrs": {},+ },+ # Current PowerPoint transition gallery: Dynamic Content.+ "pan": {+ "name": "Pan",+ "prefix": "p14",+ "element": "pan",+ "attrs": {"dir": "r"},+ "fallback": "fade",+ },+ "ferris_wheel": {+ "name": "Ferris Wheel",+ "prefix": "p14",+ "element": "ferris",+ "attrs": {"dir": "r"},+ "fallback": "fade",+ },+ "conveyor": {+ "name": "Conveyor",+ "prefix": "p14",+ "element": "conveyor",+ "attrs": {"dir": "r"},+ "fallback": "fade",+ },+ "rotate": {+ "name": "Rotate",+ "prefix": "p14",+ "element": "prism",+ "attrs": {"dir": "r", "isContent": "1"},+ "fallback": "fade",+ },+ "window": {+ "name": "Window",+ "prefix": "p14",+ "element": "window",+ "attrs": {},+ "fallback": "fade",+ },+ "orbit": {+ "name": "Orbit",+ "prefix": "p14",+ "element": "prism",+ "attrs": {"dir": "r", "isContent": "1", "isInverted": "1"},+ "fallback": "fade",+ },+ "fly_through": {+ "name": "Fly Through",+ "prefix": "p14",+ "element": "flythrough",+ "attrs": {},+ "fallback": "fade",+ },}+TRANSITION_NAMESPACES = {+ "p": PML_NS,+ "p14": P14_NS,+ "p15": P15_NS,+ "p159": P159_NS,+}-for _prefix, _uri in (("p", PML_NS), ("p14", P14_NS), ("mc", MC_NS)):+for _prefix, _uri in (+ *TRANSITION_NAMESPACES.items(),+ ("mc", MC_NS),+):try:ET.register_namespace(_prefix, _uri)except (AttributeError, ValueError):@@ -216,14 +540,43 @@ def _seconds_to_ms(value: object, field: str, *, allow_zero: bool) -> int:return milliseconds if allow_zero else max(1, milliseconds)-def _effect_xml(effect: str) -> tuple[str, str]:+def _effect_spec(effect: str) -> tuple[str, str, str, dict[str, Any], str | None]:info = TRANSITIONS[effect]+ prefix = str(info.get("prefix", "p"))+ namespace = TRANSITION_NAMESPACES[prefix]+ element = str(info["element"])+ attrs = dict(info.get("attrs", {}))+ fallback = info.get("fallback")+ return prefix, namespace, element, attrs, str(fallback) if fallback else None+++def _effect_xml(effect: str) -> tuple[str, str, str]:+ prefix, _namespace, element, effect_attrs, _fallback = _effect_spec(effect)attrs = " ".join(f'{key}="{value}"'- for key, value in info.get("attrs", {}).items()+ for key, value in effect_attrs.items())suffix = f" {attrs}" if attrs else ""- return str(info["element"]), suffix+ return prefix, element, suffix+++def _transition_attributes(+ *,+ duration_ms: int | None,+ advance_after_ms: int | None,+ advance_on_click: bool | None,+ declare_p14: bool,+) -> str:+ attrs: list[str] = []+ if duration_ms is not None:+ attrs.append(f'p14:dur="{duration_ms}"')+ if declare_p14:+ attrs.append(f'xmlns:p14="{P14_NS}"')+ if advance_on_click is not None:+ attrs.append(f'advClick="{1 if advance_on_click else 0}"')+ if advance_after_ms is not None:+ attrs.append(f'advTm="{advance_after_ms}"')+ return " " + " ".join(attrs) if attrs else ""def create_transition_xml(@@ -232,44 +585,77 @@ def create_transition_xml(advance_after: float | None = None,advance_on_click: bool | None = None,) -> str:- """Build a legacy-compatible direct p:transition XML fragment."""+ """Build a direct or MCE-backed p:transition XML fragment."""normalized_effect = normalize_transition_effect(effect)- attrs: list[str] = []+ duration_ms = Noneif normalized_effect is not None:duration_ms = _seconds_to_ms(duration,"transition duration",allow_zero=False,)- attrs.extend((- f'p14:dur="{duration_ms}"',- f'xmlns:p14="{P14_NS}"',- ))if advance_on_click is not None:if not isinstance(advance_on_click, bool):raise ValueError("transition advance_on_click must be a boolean or None")- attrs.append(f'advClick="{1 if advance_on_click else 0}"')+ advance_ms = Noneif advance_after is not None:advance_ms = _seconds_to_ms(advance_after,"transition advance_after",allow_zero=True,)- attrs.append(f'advTm="{advance_ms}"')- if normalized_effect is None and not attrs:+ if (+ normalized_effect is None+ and advance_ms is None+ and advance_on_click is None+ ):return ""- attr_text = " " + " ".join(attrs) if attrs else ""+ attr_text = _transition_attributes(+ duration_ms=duration_ms,+ advance_after_ms=advance_ms,+ advance_on_click=advance_on_click,+ declare_p14=normalized_effect is not None,+ )if normalized_effect is None:return f" <p:transition{attr_text}/>"- element_name, effect_attrs = _effect_xml(normalized_effect)+ prefix, element_name, effect_attrs = _effect_xml(normalized_effect)+ if prefix != "p":+ _effect_prefix, _namespace, _element, _attrs, fallback = _effect_spec(+ normalized_effect+ )+ fallback_effect = fallback or "fade"+ fallback_prefix, fallback_name, fallback_attrs = _effect_xml(+ fallback_effect+ )+ fallback_attr_text = _transition_attributes(+ duration_ms=None,+ advance_after_ms=advance_ms,+ advance_on_click=advance_on_click,+ declare_p14=False,+ )+ return (+ f' <mc:AlternateContent xmlns:mc="{MC_NS}">\n'+ f' <mc:Choice xmlns:{prefix}="{TRANSITION_NAMESPACES[prefix]}" '+ f'Requires="{prefix}">\n'+ f" <p:transition{attr_text}>\n"+ f" <{prefix}:{element_name}{effect_attrs}/>\n"+ " </p:transition>\n"+ " </mc:Choice>\n"+ " <mc:Fallback>\n"+ f" <p:transition{fallback_attr_text}>\n"+ f" <{fallback_prefix}:{fallback_name}{fallback_attrs}/>\n"+ " </p:transition>\n"+ " </mc:Fallback>\n"+ " </mc:AlternateContent>"+ )return (f" <p:transition{attr_text}>\n"- f" <p:{element_name}{effect_attrs}/>\n"+ f" <{prefix}:{element_name}{effect_attrs}/>\n"" </p:transition>")@@ -305,47 +691,86 @@ def _build_transition_element():return None- nsmap = {"p": PML_NS}- if normalized_effect is not None:- nsmap["p14"] = P14_NS- transition = _new_element(- context,- _qn(PML_NS, "transition"),- nsmap=nsmap,- )-- if normalized_effect is not None:- duration_ms = _seconds_to_ms(- duration,- "transition duration",- allow_zero=False,- )- transition.set(_qn(P14_NS, "dur"), str(duration_ms))if advance_on_click is not None:if not isinstance(advance_on_click, bool):raise ValueError("transition advance_on_click must be a boolean or None")- transition.set("advClick", "1" if advance_on_click else "0")- if advance_after is not None:- transition.set(- "advTm",- str(- _seconds_to_ms(- advance_after,- "transition advance_after",- allow_zero=True,- )- ),+ duration_ms = (+ _seconds_to_ms(+ duration,+ "transition duration",+ allow_zero=False,)+ if normalized_effect is not None+ else None+ )+ advance_ms = (+ _seconds_to_ms(+ advance_after,+ "transition advance_after",+ allow_zero=True,+ )+ if advance_after is not None+ else None+ )- if normalized_effect is not None:- info = TRANSITIONS[normalized_effect]- child = _new_element(context, _qn(PML_NS, str(info["element"])))- for key, value in info.get("attrs", {}).items():- child.set(key, str(value))- transition.append(child)- return transition+ def build_transition(+ effect_name: str | None,+ *,+ include_duration: bool,+ ) -> Any:+ nsmap = {"p": PML_NS}+ if include_duration:+ nsmap["p14"] = P14_NS+ transition = _new_element(+ context,+ _qn(PML_NS, "transition"),+ nsmap=nsmap,+ )+ if include_duration and duration_ms is not None:+ transition.set(_qn(P14_NS, "dur"), str(duration_ms))+ if advance_on_click is not None:+ transition.set("advClick", "1" if advance_on_click else "0")+ if advance_ms is not None:+ transition.set("advTm", str(advance_ms))+ if effect_name is not None:+ _prefix, namespace, element_name, effect_attrs, _fallback = (+ _effect_spec(effect_name)+ )+ child = _new_element(context, _qn(namespace, element_name))+ for key, value in effect_attrs.items():+ child.set(key, str(value))+ transition.append(child)+ return transition++ if normalized_effect is None:+ return build_transition(None, include_duration=False)++ prefix, _namespace, _element, _attrs, fallback = _effect_spec(+ normalized_effect+ )+ if prefix == "p":+ return build_transition(normalized_effect, include_duration=True)++ carrier = _new_element(+ context,+ _qn(MC_NS, "AlternateContent"),+ nsmap={"mc": MC_NS},+ )+ choice = _new_element(+ context,+ _qn(MC_NS, "Choice"),+ nsmap={prefix: TRANSITION_NAMESPACES[prefix]},+ )+ choice.set("Requires", prefix)+ choice.append(build_transition(normalized_effect, include_duration=True))+ fallback_node = _new_element(context, _qn(MC_NS, "Fallback"))+ fallback_node.append(+ build_transition(fallback or "fade", include_duration=False)+ )+ carrier.extend((choice, fallback_node))+ return carrierdef _transition_elements(carrier: Any) -> list[Any]:@@ -645,6 +1070,31 @@ def _visual_identity(summary: TransitionSummary) -> tuple[Any, ...]:)+def _expected_visual_identity(+ effect: str,+) -> tuple[str, str, str, str | None, str | None, dict[str, Any]]:+ prefix, namespace, element, attrs, fallback = _effect_spec(effect)+ carrier = "direct" if prefix == "p" else "alternate-content"+ fallback_element = None+ fallback_namespace = None+ if carrier == "alternate-content":+ (+ _fallback_prefix,+ fallback_namespace,+ fallback_element,+ _fallback_attrs,+ _nested_fallback,+ ) = _effect_spec(fallback or "fade")+ return (+ carrier,+ element,+ namespace,+ fallback_element,+ fallback_namespace,+ attrs,+ )++def _validate_applied_motion(slide_root: Any,*,@@ -667,12 +1117,21 @@ def _validate_applied_motion("transition duration",allow_zero=False,)+ (+ expected_carrier,+ expected_effect,+ expected_namespace,+ expected_fallback,+ expected_fallback_namespace,+ expected_attrs,+ ) = _expected_visual_identity(effect)if (- after.carrier != "direct"+ after.carrier != expected_carrieror after.logical_count != 1- or after.effect != TRANSITIONS[effect]["element"]- or after.effect_namespace != PML_NS- or after.fallback_effect is not None+ or after.effect != expected_effect+ or after.effect_namespace != expected_namespace+ or after.fallback_effect != expected_fallback+ or after.fallback_effect_namespace != expected_fallback_namespaceor after.duration_ms != expected_duration):errors.append(@@ -688,7 +1147,7 @@ def _validate_applied_motion(]if effect_children:actual_attrs = effect_children[0].attrib- for name, value in TRANSITIONS[effect].get("attrs", {}).items():+ for name, value in expected_attrs.items():if actual_attrs.get(name) != str(value):errors.append(f"replace policy wrote invalid {effect} {name} attribute"@@ -885,6 +1344,12 @@ def serialize_source_xml(root: ET.Element, source_xml: str | bytes) -> bytes:)bindings = register_source_namespaces(source)prefixes = _required_mce_prefixes(root)+ for prefix in prefixes:+ namespace = TRANSITION_NAMESPACES.get(prefix)+ if namespace is None:+ continue+ bindings[prefix] = namespace+ ET.register_namespace(prefix, namespace)serialized = ET.tostring(root, encoding="utf-8", xml_declaration=True)serialized = _inject_root_namespace_declarations(serialized,@@ -963,7 +1428,7 @@ def validate_generated_transition_xml(advance_on_click: bool | None,advance_after: object | None,) -> TransitionSummary:- """Validate a generated direct transition against its resolved settings."""+ """Validate a generated transition against its resolved settings."""data = slide_xml.encode("utf-8") if isinstance(slide_xml, str) else slide_xmlroot = LET.fromstring(data) if LET is not None else parse_source_xml(data)errors = validate_slide_transition_structure(root) + validate_mce_prefixes(data)@@ -1000,16 +1465,28 @@ def validate_generated_transition_xml(if normalized_effect is not Noneelse None)- expected_effect = (- str(TRANSITIONS[normalized_effect]["element"])- if normalized_effect is not None- else None- )+ expected_carrier = "direct"+ expected_effect = None+ expected_namespace = None+ expected_fallback = None+ expected_fallback_namespace = None+ expected_attrs: dict[str, Any] = {}+ if normalized_effect is not None:+ (+ expected_carrier,+ expected_effect,+ expected_namespace,+ expected_fallback,+ expected_fallback_namespace,+ expected_attrs,+ ) = _expected_visual_identity(normalized_effect)if (- summary.carrier != "direct"+ summary.carrier != expected_carrieror summary.logical_count != 1or summary.effect != expected_effect- or summary.fallback_effect is not None+ or summary.effect_namespace != expected_namespace+ or summary.fallback_effect != expected_fallback+ or summary.fallback_effect_namespace != expected_fallback_namespaceor summary.duration_ms != expected_duration_msor summary.advance_on_click != expected_clickor summary.advance_after_ms != expected_after_ms@@ -1024,7 +1501,6 @@ def validate_generated_transition_xml(for child in (list(primary) if primary is not None else [])if child.tag != _qn(PML_NS, "sndAc")]- expected_attrs = TRANSITIONS[normalized_effect].get("attrs", {})if not effect_children:errors.append("generated transition has no visual effect child")else:diff --git a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/cli.py b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/cli.pyindex fdd6dd34..5ccf678f 100644--- a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/cli.py+++ b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/cli.py@@ -631,10 +631,7 @@ def _recorded_narration_on_click_slides(def main(argv: list[str] | None = None) -> int:"""CLI entry point for the SVG to PPTX conversion tool."""- transition_choices = (- ['none'] + (list(TRANSITIONS.keys()) if TRANSITIONS- else ['fade', 'push', 'wipe', 'split', 'strips', 'cover', 'random'])- )+ transition_choices = ['none', *TRANSITIONS]animation_choices = ['none', *ANIMATIONS, 'auto', 'mixed', 'random']diff --git a/skills/ppt-master/workflows/stages/customize-animations.md b/skills/ppt-master/workflows/stages/customize-animations.mdindex 8b05e1f7..a4527596 100644--- a/skills/ppt-master/workflows/stages/customize-animations.md+++ b/skills/ppt-master/workflows/stages/customize-animations.md@@ -183,16 +183,11 @@ supports them; never use them to satisfy an effect-variety quota.### 3.1 Supported Page Transitions-| Effect | Behavior |-|---|---|-| `none` | Remove visual page transition; timed advance may remain |-| `fade` | Neutral default for technical decks |-| `push` | Directional slide entry |-| `wipe` | Directional reveal |-| `split` | Split-open transition |-| `strips` | Diagonal strips transition |-| `cover` | Cover from the side |-| `random` | PowerPoint random transition |+Use any effect from the complete shared registry in+[`animations.md`](../../references/animations.md) §3. It covers all current+PowerPoint Subtle, Exciting, and Dynamic Content gallery effects, plus retained+compatibility aliases. Use the documented identifier exactly; `none` removes+the visual page transition while allowing timed advance to remain.**Transition fields**:diff --git a/skills/ppt-master/workflows/template-fill-pptx.md b/skills/ppt-master/workflows/template-fill-pptx.mdindex 2f50801c..d34c817c 100644--- a/skills/ppt-master/workflows/template-fill-pptx.md+++ b/skills/ppt-master/workflows/template-fill-pptx.md@@ -196,7 +196,7 @@ The plan structure:| `layout_rationale` | Human review aid for page selection. Include `layout_pattern`, `why_fit`, and `risk`; it is not a mechanical checker gate. || `accepted_warnings` | Optional audit trail for warnings the user or agent explicitly accepts. `check-plan` warnings remain non-blocking; errors must be fixed. || `notes` | Optional spoken speaker notes for the filled slide — see **Speaker notes** below; write prose, not a copy of the on-slide text |-| `transition` | Optional per-slide page transition; overrides the `apply --transition` default. Accepts an effect name (`fade` / `push` / `wipe` / `split` / `strips` / `cover` / `random`), `none` to remove the visual effect, `keep` to preserve the source, or an object such as `{ "effect": "push", "duration": 0.6, "advance_after": 5 }` |+| `transition` | Optional per-slide page transition; overrides the `apply --transition` default. Accepts any gallery effect or compatibility alias from [`animations.md`](../references/animations.md) §3, `none` to remove the visual effect, `keep` to preserve the source, or an object such as `{ "effect": "push", "duration": 0.6, "advance_after": 5 }` || `replacements` | Target by `slot_id` whenever possible; `shape_id` and `shape_name` are fallback selectors || `table_edits` | Optional native table cell edits; target by `table_id` whenever possible and use zero-based `row` / `col` || `chart_edits` | Optional native chart data edits; target by `chart_id`, set `categories`, and provide one or more `series` |@@ -272,7 +272,7 @@ Run:python3 skills/ppt-master/scripts/template_fill_pptx.py apply "<project_dir>/sources/<source.pptx>" "<project_dir>/analysis/fill_plan.json" -o "<project_dir>/exports/<output.pptx>"```-By default `apply` gives every cloned slide a `fade` transition (`0.5s`), preserving the v1 route contract. Override it with `--transition <effect>` (`fade` / `push` / `wipe` / `split` / `strips` / `cover` / `random`) and `--transition-duration <seconds>`; pass `--transition none` for no visual motion, or `--transition keep` to preserve each source slide's existing transition unchanged. A per-slide `transition` field overrides the CLI. `advance_after` keeps click advance enabled and adds timed advance; it also works with `none` (timing-only transition) and `keep` (source effect preserved, Choice/Fallback timing updated together).+By default `apply` gives every cloned slide a `fade` transition (`0.5s`), preserving the v1 route contract. Override it with `--transition <effect>` using any gallery effect or compatibility alias from [`animations.md`](../references/animations.md) §3 and `--transition-duration <seconds>`; pass `--transition none` for no visual motion, or `--transition keep` to preserve each source slide's existing transition unchanged. A per-slide `transition` field overrides the CLI. `advance_after` keeps click advance enabled and adds timed advance; it also works with `none` (timing-only transition) and `keep` (source effect preserved, Choice/Fallback timing updated together).`apply` appends a timestamp automatically. For example, `-o "<project_dir>/exports/demo.pptx"` writes `demo_YYYYMMDD_HHMMSS.pptx`. If the filename already ends with `_YYYYMMDD_HHMMSS`, it is left unchanged.