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(native-shapes): support one authored preset shadow or glow
hugohe3f81d522dc088
diff --git a/skills/ppt-master/references/executor-base.md b/skills/ppt-master/references/executor-base.mdindex 4e33f243..591d0663 100644--- a/skills/ppt-master/references/executor-base.md+++ b/skills/ppt-master/references/executor-base.md@@ -167,7 +167,7 @@ Before drawing each page, look up its entry in `page_rhythm` (key format `P<NN>`- **Reference — prefer semantic geometry over preset stacks**: for relationships such as ascending, converging, breaking through, or stacking, first seek a basic primitive, one exact preset, or a clear Boolean result. Only when none can faithfully express the relationship should one page-specific polygon/path replace a stack of generic arrows.- **Reference — create depth with restraint**: use rhythm, spacing, typography, accent bars, and subtle tints before shadows. Reserve lift for a few genuinely floating elements; keep peer grids, dividers, and ordinary body containers flat. When material layering itself is part of the resolved visual style, follow that style's hierarchy instead of flattening its body planes.- **Phased generation** (recommended):- 1. **Visual Construction Phase**: generate all SVG pages sequentially for visual consistency. Apply every triggered information-model branch while drawing. **MUST embed one object-scoped plot-area marker** per §IX-named or Quick-promoted value-driven chart object under [`executor-chart.md`](./executor-chart.md) §2; coordinate calibration is a post-generation step (see [`verify-charts`](../workflows/stages/verify-charts.md)). Write every `<object-key>=yes` native marker plus JSON metadata atomically under [`native-data-interface.md`](./native-data-interface.md) §2. **Reach for native presets** per §3.0 as you draw each page: a block arrow, chevron, banner/ribbon, callout, standard flowchart node, or star is authored through `preset_shape_svg.py` at draw time — decided by the object's intent as you create it, never by scanning finished paths, and never committed to a bare `<path>`/`<polygon>` when a preset expresses it (a gradient fill/stroke or a pattern fill is the one paint exception — keep those ordinary SVG). **First-page gate (Mandatory)**: after completing the first page, run `python3 ${SKILL_DIR}/scripts/svg_quality_checker.py <project_path> --stage first-page --json` directly without output filtering. Review the whole P01 issue set, make one consolidated edit pass for every error and any selected warnings, then perform one verification rerun. If it still fails, treat that complete output as the next batch; never check between individual fixes. After it passes, draw P02 through the last page without checker calls.+ 1. **Visual Construction Phase**: generate all SVG pages sequentially for visual consistency. Apply every triggered information-model branch while drawing. **MUST embed one object-scoped plot-area marker** per §IX-named or Quick-promoted value-driven chart object under [`executor-chart.md`](./executor-chart.md) §2; coordinate calibration is a post-generation step (see [`verify-charts`](../workflows/stages/verify-charts.md)). Write every `<object-key>=yes` native marker plus JSON metadata atomically under [`native-data-interface.md`](./native-data-interface.md) §2. **Reach for native presets** per §3.0 as you draw each page: a block arrow, chevron, banner/ribbon, callout, standard flowchart node, or star is authored through `preset_shape_svg.py` at draw time — decided by the object's intent as you create it, never by scanning finished paths, and never committed to a bare `<path>`/`<polygon>` when a preset expresses it (a gradient fill/stroke or a pattern fill is the one paint exception — keep those ordinary SVG; when justified, one registered [`svg-effects.md`](./svg-effects.md) §6.4 shadow/glow stays on the helper-authored shape). **First-page gate (Mandatory)**: after completing the first page, run `python3 ${SKILL_DIR}/scripts/svg_quality_checker.py <project_path> --stage first-page --json` directly without output filtering. Review the whole P01 issue set, make one consolidated edit pass for every error and any selected warnings, then perform one verification rerun. If it still fails, treat that complete output as the next batch; never check between individual fixes. After it passes, draw P02 through the last page without checker calls.2. **Quality Check Gate**: only after every planned SVG exists, run `python3 ${SKILL_DIR}/scripts/svg_quality_checker.py <project_path> --stage final --json` directly on `svg_output/` without `tail` / `head` / `grep` filtering. One run already reports all pages. Review its complete issue set, fix every `error` plus any selected advisory warnings in one consolidated edit pass, then perform one verification rerun. If it still fails, its complete output begins the next batch cycle; never use checker calls to discover or fix one next issue at a time. Every `warning` is advisory: it never sends the page back for required modification, never authorizes automatic rewriting of compatible user syntax, and needs no acknowledgement/disposition line. Recommendation warnings describe the generated-SVG default; fidelity/quality warnings may be surfaced when material, while the existing input remains releasable. Prototype-identical diagnostics are recorded as `inherited`, source conversion losses as `source-import`, changed/new advisories as `introduced`, and release failures as `blocking` in `validation/svg_quality_report.json`. If release truly depends on a condition, it belongs in `errors`. On success, use the exit status and terminal summary; do not open or `cat` the complete JSON into model context. If terminal output is truncated on failure, read only the relevant issue arrays from the report written by that same run. Do NOT defer error handling to after `finalize_svg.py` — finalize rewrites SVG and masks some violations.3. **Logic Construction Phase (conditional)**: after SVGs pass the quality check, batch-generate speaker notes for narrative continuity only when the effective Speaker Notes outcome is enabled.diff --git a/skills/ppt-master/references/native-shape-authoring.md b/skills/ppt-master/references/native-shape-authoring.mdindex 0e95c69f..1980a616 100644--- a/skills/ppt-master/references/native-shape-authoring.md+++ b/skills/ppt-master/references/native-shape-authoring.md@@ -33,7 +33,7 @@ Apply this decision order before drawing any new geometric contour.**Hard rule**: `preset_shape_svg.py` is the only authoring entry for`data-pptx-authoring="preset"`. Never add `data-pptx-prst`, frame, adjustment,or registry path data by hand. Insert the helper's complete compact `<g>` and-rerun the helper whenever its geometry or paint changes.+rerun the helper whenever its geometry, paint, or filter reference changes.---@@ -100,6 +100,10 @@ python3 ${SKILL_DIR}/scripts/preset_shape_svg.py render rightArrow \--adjust "adj1=val 50000"```+When one native effect is justified, append `--filter-id softShadow`.+`softShadow` must already be one direct page-level `<defs><filter>` id under+[`svg-effects.md`](./svg-effects.md) §6.4. Omit the option otherwise.+For a stock bent / curved contour that does not require endpoint attachment:```bash@@ -133,7 +137,7 @@ the locked preset registry.| Component | Ownership ||---|---|-| Logical `<g data-pptx-authoring="preset">` | Stable id, object kind, preset, frame, adjustments, and explicit local base paint. |+| Logical `<g data-pptx-authoring="preset">` | Stable id, object kind, preset, frame, adjustments, explicit local base paint, and an optional helper-authored shape filter reference. || Direct `<path>` children | Ordered browser-visible registry layers. A child writes only a path-specific fill/stroke override when the preset requires one. || Deliberately absent transport fields | No hidden carrier, preview wrapper, `data-pptx-part`, or stored fingerprint belongs in project-authored SVG. Those fields remain part of expanded PPTX import/round-trip transport. |@@ -154,7 +158,8 @@ atom. It may be Slide-local, the single carrier of an `object` slot, or a directMaster/Layout fixed atom. This narrow exception does not permit ordinary nested`<g>` structures in Master/Layout layers or placeholder carriers. The templateworkflow may add the registered structural ownership attributes to the complete-helper group; it still must not alter preset metadata, paint, or direct paths.+helper group; it still must not alter preset metadata, paint, the filter+reference, or direct paths.**Frame coordinate space**: `--frame x y w h` is expressed in the coordinatespace where you insert the fragment. At the page root that is page coordinates;@@ -165,17 +170,17 @@ the shape off-canvas. Keep the helper's exact space-separated ordinary-decimalspellings.**Regeneration rule**: rerun the helper when preset, frame, adjustment, fill,-stroke, or stroke width changes. Moving, scaling, rotating, or flipping the-complete logical group is allowed; zero-scale transforms and shear/skew are-forbidden, and the transformed frame must remain inside DrawingML's coordinate-range. Stroke width must remain inside DrawingML's line-width range. To freely-edit the contour, replace the whole fragment with ordinary SVG rather than-modifying a generated direct path.+stroke, stroke width, or the filter id changes. Moving, scaling, rotating, or+flipping the complete logical group is allowed; zero-scale transforms and+shear/skew are forbidden, and the transformed frame must remain inside+DrawingML's coordinate range. Stroke width must remain inside DrawingML's+line-width range. To freely edit the contour, replace the whole fragment with+ordinary SVG rather than modifying a generated direct path.For a canonical reusable template, the complete helper fragment may remain asan executable exemplar. A final-page adaptation may copy it unchanged only-when all registry metadata, frame, adjustments, and paint remain unchanged;-otherwise regenerate the complete compact group.+when all registry metadata, frame, adjustments, paint, and the optional filter+reference remain unchanged; otherwise regenerate the complete compact group.---@@ -187,14 +192,17 @@ otherwise regenerate the complete compact group.| Connector attachment | Authoring helper v1 creates an unconnected `p:cxnSp` and does not accept endpoint/site metadata. Do not hand-add it. The imported-shape contract may preserve an attachment that already exists in a source PPTX; creating a new attached connector is currently unsupported. || Action button behavior | `actionButton*` presets map visual geometry only. No action, navigation target, or hyperlink is created automatically. || Gradient/pattern paint | Authoring helper v1 accepts solid HEX paint only. Use ordinary SVG when a complex paint treatment is essential. |+| Shadow/glow | Shape presets may reference one existing [`svg-effects.md`](./svg-effects.md) §6.4 filter through `--filter-id`; it applies once to the complete native shape. Connector presets, multiple effects, child-path filters, and other effect graphs remain unsupported. || Multi-path darken/lighten | Direct visible layers use the shared normalized paint behavior from the PPTX importer. Their registry-derived HEX values are authorized derivatives of the selected base color and need no separate lock row. || Expanded compatibility | Existing helper-authored carrier/preview fragments remain readable as ordinary Slide-local input and receive a non-blocking migration warning; they do not become structured fixed atoms or object-slot carriers. Imported expanded fragments remain the lossless mirror/preserve form. || External edits | Any registry-path, style, or semantic mismatch fails quality check and export; regenerate the fragment. |**Validation**: `svg_quality_checker.py` independently rerenders every compactauthored preset from registry metadata and compares its direct visible paths-and paint. The exporter performs the same validation, then expands the compact-group only in memory to reuse the lossless native-shape conversion path.+and paint. It also validates the optional shape filter through the shared+[`svg-effects.md`](./svg-effects.md) §6.4 contract. The exporter performs the+same validation, then expands the compact group only in memory to reuse the+lossless native-shape conversion path.Compatible expanded authored input remains under its separate carrier/previewfreshness contract.@@ -218,7 +226,7 @@ python3 ${SKILL_DIR}/scripts/shape_boolean_svg.py render <svg-file> \| Concern | Contract ||---|---|-| Sources | Closed `path`, `polygon`, `rect`, `circle`, `ellipse`, one validated compact authored shape preset, or supported horizontal implicit-LTR direct `<text>` with a resolvable exact OpenType weight/style (`--font-dir` adds search roots). Text becomes glyph geometry and is no longer editable text. Open geometry, groups, nested text, images, definitions, and nested SVG viewports fail closed. |+| Sources | Closed `path`, `polygon`, `rect`, `circle`, `ellipse`, one validated unfiltered compact authored shape preset, or supported horizontal implicit-LTR direct `<text>` with a resolvable exact OpenType weight/style (`--font-dir` adds search roots). Text becomes glyph geometry and is no longer editable text. A filtered preset is not a Boolean operand; materialize the geometry without the effect, then reapply one supported filter to the result. Open geometry, groups, nested text, images, definitions, and nested SVG viewports fail closed. || Primary shape | The first `--source` supplies result paint. For `subtract`, all later operands are removed from that primary geometry. Explicit paint flags override only their named channels. || Coordinates | Ancestor and local transforms are baked into SVG-root coordinate space. Place stdout in the primary operand's z-order with no additional transform; never reinsert it under an original transformed ancestor. Root-coordinate space does not require each result path to be a direct `<svg>` child. || Placement | Ordinary Slide-local results belong in the applicable untransformed direct-root semantic `<g>` with its normal `id` / `data-pptx-bounds`. Master/Layout results remain direct-root path atoms and redeclare `data-pptx-layer`. One non-fragment result may be the direct `data-pptx-carrier="true"` child of an `object` slot. |diff --git a/skills/ppt-master/references/shared-standards-core.md b/skills/ppt-master/references/shared-standards-core.mdindex b25ffc92..03269a42 100644--- a/skills/ppt-master/references/shared-standards-core.md+++ b/skills/ppt-master/references/shared-standards-core.md@@ -392,8 +392,9 @@ complete geometric object into a native DrawingML preset through thedeterministic fragment helper. Selection behavior lives in[`native-shape-authoring.md`](./native-shape-authoring.md); this section ownsthe machine contract. This compact canonical form describes the intended-preset, frame, adjustments, and paint once, keeps only registry-generated-visible SVG paths, and embeds no source OOXML or serialized preview fingerprint.+preset, frame, adjustments, paint, and an optional shape effect once, keeps only+registry-generated visible SVG paths, and embeds no source OOXML or serialized+preview fingerprint.| Metadata / structure | Required behavior ||---|---|@@ -401,6 +402,7 @@ visible SVG paths, and embeds no source OOXML or serialized preview fingerprint.| `data-pptx-object` | `shape` or `connector`; connector-family presets must use `connector`, and `connector` must use a connector-family preset. Authored connectors require `fill="none"` plus a visible stroke and export as unconnected `p:cxnSp`. || `data-pptx-prst`, `data-pptx-frame`, `data-pptx-av-*` | Generated together from the locked registry and written once on the logical group. The frame is the helper's exact four-part, space-separated ordinary-decimal spelling and remains authoritative even when visible path bounds differ; commas, scientific notation, leading `+`, and redundant decimal spellings are rejected. || Local `fill` / `stroke` plus supported paint attributes | Base paint is written once on the group; a visible stroke also carries an explicit width. Canonical page/template authoring keeps channel paint local. Compatible ancestor paint/opacity may compose under the general SVG rules and receives a recommendation warning. |+| Optional direct `filter="url(#id)"` | Shape presets only: the helper writes one exact local reference to a direct [`svg-effects.md`](./svg-effects.md) §6.4 filter definition. It compiles once on the complete native shape; connector presets, inline style, ordinary group filters, and child-path filters remain unsupported. || Ordered direct `<path>` children | Browser-visible registry layers only. Each child writes just its required path-level fill/stroke override; labels and decorations stay outside the atomic group. || No carrier / wrapper / fingerprint | `data-pptx-part`, hidden geometry carriers, preview wrappers, and `data-pptx-preview-sha256` belong to expanded import/compatibility transport, not canonical project authoring. |@@ -415,26 +417,31 @@ python3 ${SKILL_DIR}/scripts/preset_shape_svg.py render rightArrow \--adjust "adj1=val 50000"```+When one native effect is justified, append `--filter-id softShadow`; that id+must already name one direct page-level §6.4 filter definition.+**Hard rule — helper-only metadata**: never add or edit authored presetmetadata or registry paths by hand. The compact helper output is atomic.-Regenerate it when preset, frame, adjustment, fill, stroke, or stroke width-changes. Replace the whole fragment with ordinary SVG when free contour editing-is required.+Regenerate it when preset, frame, adjustment, fill, stroke, stroke width, or the+filter reference changes. Replace the whole fragment with ordinary SVG when+free contour editing is required.Template ownership metadata is orthogonal to preset geometry. After insertingthe complete helper output, `create-template` may add only the registered`data-pptx-layer`, `data-pptx-editable`, `data-pptx-carrier`, or`data-pptx-role` attribute needed by the surrounding structured contract. It-must not change preset/frame/adjustment/paint metadata or any direct path.+must not change preset/frame/adjustment/paint metadata, the filter reference, or+any direct path.**Reusable-template boundary**: a project-owned canonical template may retainone complete helper-generated atomic fragment when the stock preset is an exact-semantic match and its paint stays inside the authoring boundary below. The-fragment is an executable exemplar and one semantic atom, not a freely editable+semantic match and both its paint and optional effect stay inside the authoring+boundary below. The fragment is an executable exemplar and one semantic atom,+not a freely editabletemplate primitive. It may be Slide-local, the one carrier of an `object` slot,or a direct Master/Layout fixed atom. An adaptation may reuse it unchanged only-when preset, frame, adjustments, and paint are unchanged; otherwise regenerate-the whole fragment with the helper.+when preset, frame, adjustments, paint, and the optional filter reference are+unchanged; otherwise regenerate the whole fragment with the helper.Imported, mirror, and third-party templates are never upgraded by contourinference.@@ -443,23 +450,27 @@ fragment to stdout; export never invents its preview. The main Agent insertsthat output into the hand-authored page or canonical reusable template. Thehelper cannot write a project, select layout, or generate a page.-**Authoring paint boundary**: v1 accepts `none` or six-digit solid HEX fill and-stroke, optional fill/stroke opacity, stroke width, line cap, and line join.+**Authoring paint/effect boundary**: v1 accepts `none` or six-digit solid HEX+fill and stroke, optional fill/stroke opacity, stroke width, line cap, line join,+and one shape-only local filter id under [`svg-effects.md`](./svg-effects.md)+§6.4.Normal generated pages use `spec_lock.md` for stable semantic color anchors andchoose page-local paint from the retained Design Spec, style, and composition context.The lockless [`quick-generate`](../workflows/profiles/quick-generate.md) profilekeeps every chosen paint value explicit in the SVG.`create-template` authored templates take their values from the confirmed briefand template `design_spec.md`.-Use ordinary SVG for gradients, patterns, filters, or other treatments outside-this narrow contract. Registry-derived multi-path darken/lighten colors and+Use ordinary SVG for gradients, patterns, or other treatments outside this+narrow contract. Registry-derived multi-path darken/lighten colors andother contextual derivatives need no separate lock row unless they become arecurring named role. Mirror preserves source paint under §1.4 instead.**Validation**: quality check and export both rerender authored fragments from`preset + frame + adjustments + group paint` and compare every visible path and-path-level paint override directly. Registry-path edits, geometry metadata that-leaves those paths stale, unknown adjustments, out-of-range frames/transforms,+path-level paint override directly. They separately validate the optional effect+reference through §6.4. Registry-path edits, geometry metadata that leaves those+paths stale, unknown adjustments, invalid or unresolved filter references,+out-of-range frames/transforms,zero-scale transforms, and shear/skew fail closed. Export expands the validatedcompact group only in memory and reuses the lossless native-shape conversionpath. Older authored carrier/preview fragments remain compatible as ordinarydiff --git a/skills/ppt-master/references/svg-effects.md b/skills/ppt-master/references/svg-effects.mdindex f9978ae3..884c8bdc 100644--- a/skills/ppt-master/references/svg-effects.md+++ b/skills/ppt-master/references/svg-effects.md@@ -257,7 +257,7 @@ Filters are native-effect metadata, not a general pixel-filter surface.| Concern | Contract ||---|---|| Definition/reference | Direct `<defs><filter id="...">` child with unique id; direct `filter="url(#id)"` attribute, never inline style |-| Public targets | `<rect>`, `<circle>`, `<image>`, `<path>`, `<text>`; an exact outer `<g filter>` is also registered when its sole visual child is one clipped `<image>` |+| Public targets | `<rect>`, `<circle>`, `<image>`, `<path>`, `<text>`; one validated compact authored shape-preset `<g>` from [`native-shape-authoring.md`](./native-shape-authoring.md) §4; an exact outer `<g filter>` whose sole visual child is one clipped `<image>` || Required primitive | `feDropShadow` or `feGaussianBlur` || Generated glow form | Zero-offset `feDropShadow` with flood paint, or the complete blur + flood + composite + merge graph below; never bare blur || Required parameters | Explicit `stdDeviation` on either effect primitive; explicit `dx`, `dy`, and `flood-opacity` on `feDropShadow`; explicit `flood-opacity` on `feFlood`; explicit `slope` on linear `feFuncA` |@@ -276,13 +276,14 @@ Native export does not preserve filter-region, `in/in2/result`, merge order, orcomposite topology. Other primitives, multiple independent effects, filters on`<tspan>` / ordinary `<g>` / unsupported targets are forbidden; apply theeffect to supported objects or use explicit layers.-Special `<g filter>` carriers are limited to the exact single clipped-image-form in §6.5, the hash-locked+Special `<g filter>` targets are limited to the helper-authored compact shape+preset above, the exact single clipped-image form in §6.5, the hash-locked`data-pptx-part="geometry-preview"` transport in §1.4—a direct child of animported preset object referencing the hidden geometry carrier's filter—and theexact imported picture-crop carrier in §6.5, which keeps the effect outside its-viewport. Neither authorizes ordinary group filters or creates a second-PowerPoint object.+viewport. The compact preset applies its filter once to the logical shape; its+direct registry paths remain unfiltered. None of these cases authorizes ordinary+group filters or creates a second PowerPoint object.PPTX import maps one classifiable shape/connector/picture outer shadow or glowto this contract. Unsupported effects and outer-shadow variants whose scale,skew, alignment, or rotation semantics cannot be retained become importdiff --git a/skills/ppt-master/scripts/README.md b/skills/ppt-master/scripts/README.mdindex a3fa4dff..0fb3c54e 100644--- a/skills/ppt-master/scripts/README.md+++ b/skills/ppt-master/scripts/README.md@@ -205,8 +205,12 @@ python3 scripts/preset_shape_svg.py render rightArrow --id process-arrow --frameThe helper never writes a page or project file. Select one exact semanticstock-shape match, inspect the emitted fragment, and insert it into thehand-authored SVG with the normal patch workflow. Its project-authored output-is one compact atomic `<g>` with direct registry-generated visible paths;-quality check and export rerender the registry instead of relying on a hidden+is one compact atomic `<g>` with direct registry-generated visible paths. When+one effect is justified, optional `--filter-id softShadow` references one+existing direct page-level filter under the shared shadow/glow contract and+applies it once to a shape preset. Connector presets do not accept that option.+The helper does not create the filter definition.+Quality check and export rerender the registry instead of relying on a hiddencarrier, preview wrapper, or stored preview fingerprint. PPTX import andround-trip SVGs deliberately keep their expanded carrier/preview evidence andare not rewritten into this authored form. Keep ordinary rectangles, ellipses,diff --git a/skills/ppt-master/scripts/pptx_to_svg/preset_authoring.py b/skills/ppt-master/scripts/pptx_to_svg/preset_authoring.pyindex 74ced55f..04b200e6 100644--- a/skills/ppt-master/scripts/pptx_to_svg/preset_authoring.py+++ b/skills/ppt-master/scripts/pptx_to_svg/preset_authoring.py@@ -64,6 +64,8 @@ _STYLE_ATTRS = ("stroke-opacity","stroke-width",)+_EFFECT_ATTRS = ("filter",)+_PRESENTATION_ATTRS = (*_STYLE_ATTRS, *_EFFECT_ATTRS)_SEMANTIC_ATTRS = (AUTHORING_ATTR,"data-pptx-object",@@ -87,6 +89,7 @@ def render_preset_shape_fragment(element_id: str,name: str | None = None,style: Mapping[str, str] | None = None,+ filter_id: str | None = None,) -> str:"""Render one compact authored preset fragment for SVG insertion."""registry = get_preset_registry()@@ -104,6 +107,15 @@ def render_preset_shape_fragment(raise ValueError(f"Authored connector requires a connector preset, got {preset!r}")+ filter_ref: str | None = None+ if filter_id is not None:+ normalized_filter_id = str(filter_id).strip()+ if _ID_RE.fullmatch(normalized_filter_id) is None:+ raise ValueError(f"Invalid SVG filter id: {filter_id!r}")+ filter_ref = _validate_filter_reference(+ f"url(#{normalized_filter_id})",+ object_kind,+ )x, y, width, height = _validate_frame(frame, object_kind)adjustment_values = _normalize_adjustments(adjustments or {})@@ -157,6 +169,8 @@ def render_preset_shape_fragment(**semantic_attrs,**style_attrs,}+ if filter_ref is not None:+ group_attrs["filter"] = filter_refreturn (f'<g{attrs_to_xml(group_attrs)}>\n'f"{serialize_compact_preset_layers(rendered.paths, style_attrs)}\n"@@ -290,6 +304,7 @@ def _validate_compact_authored_preset_group(group: ET.Element) -> list[str]:"Compact authored preset requires explicit local fill and stroke")style_attrs = _validate_style(raw_style)+ _validate_filter_reference(group.get("filter"), object_kind)noncanonical_style = sorted(name for name, value in style_attrs.items()if raw_style.get(name) != value@@ -467,6 +482,12 @@ def _validate_expanded_authored_preset_group(group: ET.Element) -> list[str]:for name in _STYLE_ATTRSif name in carrier.attrib})+ filter_ref = _validate_filter_reference(+ carrier.get("filter"),+ object_kind,+ )+ if filter_ref is not None:+ style_attrs["filter"] = filter_refif object_kind == "connector":if style_attrs.get("fill", "none") != "none":raise ValueError("Authored connector fill must be none")@@ -592,6 +613,12 @@ def materialize_compact_authored_preset_tree(root: ET.Element) -> int:for name in _STYLE_ATTRSif name in group.attrib})+ filter_ref = _validate_filter_reference(+ group.get("filter"),+ object_kind,+ )+ if filter_ref is not None:+ style_attrs["filter"] = filter_refsemantic_attrs = {name: valuefor name, value in group.attrib.items()@@ -605,7 +632,7 @@ def materialize_compact_authored_preset_tree(root: ET.Element) -> int:style_attrs,)- for name in _STYLE_ATTRS:+ for name in _PRESENTATION_ATTRS:group.attrib.pop(name, None)group.set("data-pptx-preview-sha256", markup.preview_hash)for child in list(group):@@ -712,6 +739,22 @@ def _validate_style(style: Mapping[str, str]) -> dict[str, str]:return normalized+def _validate_filter_reference(+ raw_filter: str | None,+ object_kind: str,+) -> str | None:+ """Validate one canonical authored-preset effect reference."""+ if raw_filter is None:+ return None+ if object_kind != "shape":+ raise ValueError("Authored preset filters are supported only for shapes")+ if re.fullmatch(r"url\(#[A-Za-z_][A-Za-z0-9_.:-]*\)", raw_filter) is None:+ raise ValueError(+ 'Authored preset filter must use exact local filter="url(#id)" syntax'+ )+ return raw_filter++def _normalize_adjustments(adjustments: Mapping[str, str | int | float],) -> dict[str, str]:@@ -802,7 +845,7 @@ def _is_unexpected_carrier_attr(name: str) -> bool:"visibility","pointer-events",*_SEMANTIC_ATTRS,- *_STYLE_ATTRS,+ *_PRESENTATION_ATTRS,}:return Falsereturn not name.startswith(_ADJUSTMENT_PREFIX)@@ -817,7 +860,7 @@ def _is_unexpected_group_attr(name: str, *, compact: bool) -> bool:*_SEMANTIC_ATTRS,}if compact:- allowed.update(_STYLE_ATTRS)+ allowed.update(_PRESENTATION_ATTRS)allowed.update(_TEMPLATE_ATOM_ATTRS)if name in allowed:return Falsediff --git a/skills/ppt-master/scripts/preset_shape_svg.py b/skills/ppt-master/scripts/preset_shape_svg.pyindex 24b8a0ab..8ef40480 100644--- a/skills/ppt-master/scripts/preset_shape_svg.py+++ b/skills/ppt-master/scripts/preset_shape_svg.py@@ -123,6 +123,13 @@ def build_parser() -> argparse.ArgumentParser:"--stroke-linejoin",choices=("miter", "round", "bevel"),)+ render_parser.add_argument(+ "--filter-id",+ help=(+ "Optional local SVG filter id for one registered native shadow or "+ "glow; the complete page must define it in direct <defs>."+ ),+ )render_parser.add_argument("--adjust",action="append",@@ -183,6 +190,7 @@ def main(argv: Sequence[str] | None = None) -> int:element_id=args.element_id,name=args.name,style=style,+ filter_id=args.filter_id,)except ValueError as exc:print(f"Error: {exc}", file=sys.stderr)diff --git a/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.py b/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.pyindex 098c467d..58b9d675 100644--- a/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.py+++ b/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.py@@ -2749,13 +2749,14 @@ def project_filter_errors(root: ET.Element) -> list[str]:continueif (tag not in PROJECT_FILTER_PUBLIC_TARGETS+ and not _is_compact_authored_preset_filter_target(elem)and not _is_imported_preset_preview_filter_target(elem, parents)and not is_picture_effect_carrier(elem)):errors.add(f'{label} cannot use filter; supported native targets are '- 'rect, circle, image, path, text, and an exact single clipped-'- 'image carrier group'+ 'rect, circle, image, path, text, a validated compact authored-'+ 'preset shape, and an exact registered carrier group')if tag == 'image' and elem.get('clip-path') is not None:errors.add(@@ -2905,6 +2906,26 @@ def project_filter_errors(root: ET.Element) -> list[str]:return sorted(errors)+def _is_compact_authored_preset_filter_target(elem: ET.Element) -> bool:+ """Recognize one validated project-authored preset shape filter target."""+ if (+ _svg_element_tag(elem) != 'g'+ or elem.get('data-pptx-authoring') != 'preset'+ or elem.get('data-pptx-object') != 'shape'+ or elem.get('data-pptx-part') is not None+ ):+ return False+ from pptx_to_svg.preset_authoring import ( # Local to avoid layer coupling.+ authored_preset_encoding,+ validate_authored_preset_group,+ )++ return (+ authored_preset_encoding(elem) == 'compact'+ and not validate_authored_preset_group(elem)+ )++def _is_imported_preset_preview_filter_target(elem: ET.Element,parents: dict[ET.Element, ET.Element],@@ -2915,8 +2936,8 @@ def _is_imported_preset_preview_filter_target(shape-level effect. The lossless importer therefore keeps the nativefilter on the hidden geometry carrier and mirrors the same reference ontoits hash-locked preview group. The preview group is never exported as a- separate PowerPoint object; ordinary authored ``<g filter>`` remains- outside the project contract.+ separate PowerPoint object; other ordinary or authored ``<g filter>``+ forms remain outside the project contract."""if (_svg_element_tag(elem) != 'g'