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
refactor(native-objects): define chart and table replacement contract
hugohe3809c224f3840
diff --git a/README.md b/README.mdindex c58952f9..9fe03698 100644--- a/README.md+++ b/README.md@@ -316,7 +316,7 @@ AI: Sure. Let's confirm the design spec:The AI handles everything — content analysis, visual design, SVG generation, and PPTX export.-> **Output:** The SVG pipeline has one PPTX export route: PPT Master's converter reads `svg_output/` and writes a directly editable native DrawingML deck to `exports/<name>_<timestamp>.pptx`. Step 7 still always runs `finalize_svg.py`, producing self-contained files in `svg_final/` for visual inspection or manual insertion as SVG pictures; PowerPoint's manual **Convert to Shape** command is outside the supported contract. A copy of `svg_output/` is always snapshotted to `backup/<timestamp>/svg_output/` for re-export / archival. By default charts and tables export as SVG-derived shapes (pixel-consistent across PowerPoint / Keynote / WPS); pass `--native-objects` to instead emit them as **real editable PowerPoint chart / table objects backed by data** (rendering may vary across apps), saved as `exports/<name>_<timestamp>_native_charts.pptx`.+> **Output:** The SVG pipeline has one PPTX export route: PPT Master's converter reads `svg_output/` and writes a directly editable native DrawingML deck to `exports/<name>_<timestamp>.pptx`. Step 7 still always runs `finalize_svg.py`, producing self-contained files in `svg_final/` for visual inspection or manual insertion as SVG pictures; PowerPoint's manual **Convert to Shape** command is outside the supported contract. A copy of `svg_output/` is always snapshotted to `backup/<timestamp>/svg_output/` for re-export / archival. By default charts and tables export as individually editable SVG-derived DrawingML shapes, which prioritize cross-app visual consistency. Pass `--native-charts-and-tables` to replace eligible groups with PowerPoint-native Chart/Table objects backed by data, which provide **Edit Data** and object-specific controls but may render differently across apps; this variant is saved as `exports/<name>_<timestamp>_native_charts_tables.pptx`. Both routes are editable—the distinction is the PowerPoint object model, not editability itself.> **Already have a `.pptx` you want to reuse?** Hand the AI that deck plus your material and ask it to "fill this deck with the new content" — it fills text, table, and chart data into your existing design and exports only the pages you pick, staying natively editable. See the [FAQ](./docs/faq.md) and [template-fill workflow](./skills/ppt-master/workflows/template-fill-pptx.md).diff --git a/README_CN.md b/README_CN.mdindex 95bae6ea..35eaa500 100644--- a/README_CN.md+++ b/README_CN.md@@ -326,7 +326,7 @@ AI:好的,先确认设计规范:AI 全程处理——内容分析、视觉设计、SVG 生成、PPTX 导出。-> **输出说明:** 标准导出从 `svg_output/` 经项目转换器生成原生 DrawingML `.pptx`,保存至 `exports/<name>_<timestamp>.pptx`;这是唯一的 PPTX 产物路线,文字和图形可直接编辑。`svg_output/` 始终镜像到 `backup/<timestamp>/svg_output/`,便于归档或后续重跑。流程仍会强制生成 `svg_final/`:它是一组自包含的视觉预览 SVG,可直接打开,也可作为 SVG 图片手动插入 PowerPoint;PowerPoint 手工“转换为形状”不在支持范围。图表和表格默认导出为 SVG 派生的 DrawingML 形状(在 PowerPoint / Keynote / WPS 间像素一致);加 `--native-objects` 则在同一原生导出路线中改为**带数据、可直接编辑的 PowerPoint 原生图表 / 表格对象**(跨软件渲染可能略有差异),保存为 `exports/<name>_<timestamp>_native_charts.pptx`。+> **输出说明:** 标准导出从 `svg_output/` 经项目转换器生成原生 DrawingML `.pptx`,保存至 `exports/<name>_<timestamp>.pptx`;这是唯一的 PPTX 产物路线,文字和图形可直接编辑。`svg_output/` 始终镜像到 `backup/<timestamp>/svg_output/`,便于归档或后续重跑。流程仍会强制生成 `svg_final/`:它是一组自包含的视觉预览 SVG,可直接打开,也可作为 SVG 图片手动插入 PowerPoint;PowerPoint 手工“转换为形状”不在支持范围。图表和表格默认导出为 SVG 派生、可逐形状编辑的 DrawingML 对象,优先保证 PowerPoint / Keynote / WPS 间的视觉一致性;加 `--native-charts-and-tables` 则把符合合同的组替换为带数据源和对象专属编辑能力的 PowerPoint 原生 Chart/Table 对象,跨软件渲染可能略有差异,保存为 `exports/<name>_<timestamp>_native_charts_tables.pptx`。两条路线都可编辑,区别在于 PowerPoint 对象模型,而不是“能否编辑”。> **已有一份想复用的 `.pptx`?** 把那份 deck 连同素材给 AI,说「套模板」即可——它会把新内容(文字、表格、图表数据)填进你现有的设计,只导出你挑选的页面,且保持原生可编辑。详见 [常见问题](./docs/zh/faq.md) 与 [套模板工作流](./skills/ppt-master/workflows/template-fill-pptx.md)。diff --git a/docs/faq.md b/docs/faq.mdindex b3d1c248..445b37ed 100644--- a/docs/faq.md+++ b/docs/faq.md@@ -132,7 +132,7 @@ For comparison, Gamma subscriptions run $8–20/month, Beautiful.ai $12–45/monBy default, charts are rendered as **custom-designed SVG graphics** converted to native PowerPoint shapes — fully editable as shapes (move, recolor, retype, restyle). This is a deliberate default over Excel-driven chart objects: PowerPoint's default charts look generic and dated, and lock decks into rigid templates. SVG charts give you publication-quality visuals you can fine-tune directly in PowerPoint, and they render pixel-consistently across PowerPoint / Keynote / LibreOffice / WPS.-If your workflow specifically requires Excel-driven data editing, export with `--native-objects`: supported data charts and pure text-grid tables then ship as **real editable PowerPoint chart / table objects backed by data** (saved as `exports/<name>_<timestamp>_native_charts.pptx`, keeping the deck's own colors instead of PowerPoint's default theme). The trade-off is cross-app rendering — native objects may look slightly different across PowerPoint / Keynote / LibreOffice / WPS, which is why SVG shapes stay the default.+If your workflow specifically requires Excel-driven data editing or PowerPoint's chart/table-specific controls, export with `--native-charts-and-tables`: supported data charts and pure text-grid tables then ship as **PowerPoint-native Chart / Table objects backed by data** (saved as `exports/<name>_<timestamp>_native_charts_tables.pptx`, keeping the deck's own colors instead of PowerPoint's default theme). The default SVG fallback also becomes editable DrawingML shapes, but it has no chart data workbook or table/chart object model. Native objects may look slightly different across PowerPoint / Keynote / LibreOffice / WPS, so the shape-based route remains the visual-stability default.## Q: Can I change page transitions and element animations?diff --git a/docs/powerpoint-svg-mapping.md b/docs/powerpoint-svg-mapping.mdindex 1f6bbe3e..8c44289c 100644--- a/docs/powerpoint-svg-mapping.md+++ b/docs/powerpoint-svg-mapping.md@@ -67,7 +67,7 @@ See [`canvas-formats.md`](../skills/ppt-master/references/canvas-formats.md) for| Body placeholder | Structured slot group with one text carrier | `p:ph` type `body` | `Native-stable` | A multiline carrier remains one text frame || Date, footer, and slide-number placeholders | Structured text slots | `p:ph` types `dt`, `ftr`, and `sldNum`, with matching Layout header/footer flags | `Native-stable` | Placeholder indices must be unique and legal || Picture placeholder | Structured slot with one image or supported crop carrier | `p:ph` type `pic` | `Native-stable` within the picture contract | The slot must contain exactly one compatible direct carrier |-| Chart or table placeholder | Structured slot with one matching native-object carrier | `p:ph` type `chart` or `tbl` | `Native-stable` only on native-object export | Requires valid JSON metadata and `--native-objects` |+| Chart or table placeholder | Structured slot with one matching native-object carrier | `p:ph` type `chart` or `tbl` | `Native-stable` only on native Chart/Table export | Requires valid JSON metadata and `--native-charts-and-tables` || Generic object placeholder | One compatible carrier, or an explicit composite proxy binding | `p:ph` type `obj` | Native binding; composite visible content remains ordinary shapes | Composite slots must use the registered proxy downgrade || Media placeholder | One image or supported crop carrier | `p:ph` type `media` | Native placeholder binding only | It does not synthesize video or audio from decorative SVG content || Empty text placeholder | Empty or whitespace-only marked text carrier | Invisible U+200B run at the legal 1 pt minimum, producing one native text shape | `Native-stable` | Do not add a dummy dash, sub-1 pt text, or background-colored visible glyph |@@ -161,26 +161,28 @@ Preset-shape selection and its exact atomic fragment contract are documented in| PowerPoint feature | Project representation | PPTX result | Import and fidelity | Validation boundary ||---|---|---|---|---|| Visually drawn table | Ordinary SVG shapes, lines, and text | Independent editable PowerPoint shapes | Fidelity follows each component row | It is not a native table and has no PowerPoint table editing model |-| Native editable table | One `<g data-pptx-native="table">` with child JSON metadata and visible fallback | `p:graphicFrame` containing `a:tbl` when native objects are enabled | Imported supported tables reconstruct a fallback plus native metadata | Metadata must form the registered rectangular schema; requires `--native-objects` |+| PowerPoint-native table | One `<g data-pptx-replace-with="table">` with child `<metadata type="application/json">` and a visible fallback | `p:graphicFrame` containing `a:tbl` when native Chart/Table replacement is enabled | Imported supported tables reconstruct a fallback plus replacement metadata | Metadata must form the registered rectangular schema; requires `--native-charts-and-tables` || Merged table cells | Canonical native-table merge metadata | Native horizontal/vertical merge semantics | `Native-stable` within the closed schema | Overlapping, ambiguous, or non-rectangular merges are rejected || Table cell formatting | Registered native-table cell formatting fields | Native cell fill, border, text, and alignment | `Native-normalized` | Fields outside the closed schema are not guessed || Unsupported native table feature | SVG fallback or direct source preservation | Visible fallback remains, or source OOXML stays on a direct route | Explicit fallback / `Direct preservation` | Do not extend JSON ad hoc |-Native objects are opt-in. Default export keeps the SVG fallback because it is visually stable; native export prioritizes PowerPoint editability and may normalize appearance.+PowerPoint-native Chart/Table objects are opt-in. Default export keeps the SVG fallback as independently editable DrawingML shapes for visual stability; native export instead provides the object's data-source and table/chart-specific editing model, and may normalize appearance.++Imported chart groups classify their visible fallback with `data-pptx-fallback-kind="source-preview|normalized|placeholder"`; `placeholder` alone denotes the reconstruction-only fallback. `data-pptx-replacement-status` instead records why a fallback-only chart or table import cannot make an active replacement claim. Imported groups in this contract use `data-pptx-import-source="pptx"` and active claims may carry `data-pptx-fallback-sha256` for stale-edit protection. Legacy `data-pptx-native*`, `data-pptx-visual-status`, and `data-pptx-route-status` spellings remain read-compatible but are not canonical authoring.## 8. PowerPoint charts| PowerPoint feature | Project representation | PPTX result | Import and fidelity | Validation boundary ||---|---|---|---|---|| Visually drawn chart | Ordinary SVG geometry and text | Independent editable PowerPoint shapes | Fidelity follows each component row | It has no “Edit Data” workbook |-| Native classic chart | One `<g data-pptx-native="chart">` with registered JSON data and a visible fallback | `p:graphicFrame`, classic chart part, and embedded workbook | Supported imports reconstruct a fallback plus native metadata | Chart type and data must match the closed schema; requires `--native-objects` |+| PowerPoint-native classic chart | One `<g data-pptx-replace-with="chart">` with registered JSON data in `<metadata type="application/json">` and a visible fallback | `p:graphicFrame`, classic chart part, and embedded workbook | Supported imports reconstruct a fallback plus replacement metadata | Chart type and data must match the closed schema; requires `--native-charts-and-tables` || Native ChartEx chart | Same marker interface with a supported ChartEx family | `cx:chart` part and embedded workbook | Supported families can reconstruct semantically | Only the registered family/field combinations are accepted || Chart title, legend, axes, labels, and series formatting | Registered native-chart metadata | Native chart properties | `Native-normalized` | Exact fields and supported families remain normative in `shared-standards.md` |-| Chart caption, source, or footnote | Ordinary companion SVG text outside the native marker | Editable slide text boxes beside the chart | `Native-stable` as text | Do not hide slide prose inside chart JSON |-| Edited SVG fallback with stale native metadata | Updated visible SVG plus stale hash | Default export keeps the visible SVG; native replacement fails | Explicit safety behavior | The compiler never discards a newer visual edit silently |+| Chart caption, source, or footnote | Ordinary companion SVG text outside the replacement marker | Editable slide text boxes beside the chart | `Native-stable` as text | Do not hide slide prose inside chart JSON |+| Edited SVG fallback with stale replacement metadata | Updated visible SVG plus stale hash | Default export keeps the visible SVG; native replacement fails | Explicit safety behavior | The compiler never discards a newer visual edit silently || Unsupported 3D or deferred chart family | SVG-drawn chart, baked asset, or direct source preservation | No guessed native chart | Fallback / `Direct preservation` | Unsupported aliases must fail native validation |-The exhaustive chart/table schemas and supported family list intentionally remain in the [normative native-object contract](../skills/ppt-master/references/shared-standards.md#native-pptx-table--chart-markers-opt-in).+The exhaustive chart/table schemas and supported family list intentionally remain in the [normative replacement contract](../skills/ppt-master/references/shared-standards.md#powerpoint-native-chart--table-replacement-markers-opt-in).## 9. PowerPoint playback and package featuresdiff --git a/docs/roadmap.md b/docs/roadmap.mdindex 8a6bba01..1bd8182c 100644--- a/docs/roadmap.md+++ b/docs/roadmap.md@@ -82,7 +82,7 @@ The past two months' structural capability growth. Single flags / incremental po- **Transitions and entrance-animation export hardened against silent downgrade** — the current defaults stay `fade` / 0.4 s for page transitions and `none` for element entrances; object motion remains opt-in through `-a` or `animations.json`. Unknown effects / Start modes, non-finite or out-of-range timing, invalid order values, and missing slide/group references now fail instead of falling back to `fade`, another Start mode, or inherited timing. Export reads the candidate PPTX back before replacement and validates root timing placement, unique time-node IDs, live shape targets, effect/duration/Start semantics, and narration timing merges. Direct-PPTX routes preserve existing object animation rather than translating it into the generated animation model. Microsoft PowerPoint is the primary behavior-validation target; other presentation apps remain compatibility targets without an identical-motion guarantee-- **`--native-objects` hardened from dormant marker to usable opt-in** — the narrow native-object exception (see Non-goals below) now emits charts and pure-text tables that keep the deck's own design instead of snapping to PowerPoint's white default theme. Classic native charts write explicit chart-area / plot-area / axis-line / gridline / label-text colors — inferred from the visible SVG fallback (largest panel `<rect>` → background, fallback text → labels, fallback strokes → axis/grid) or overridden per `style` (`chart_area_fill` / `plot_area_fill` / `text_color` / `axis_color` / `grid_color`, `"none"` for transparent); the color parser normalizes named CSS colors, `#RGB` shorthand, and `rgb()` / `rgba()` to OOXML hex; bar/column series disable negative-value fill inversion so negative bars keep their series color. The activated export is named `<name>_<ts>_native_charts.pptx` to tell it apart from the default flattened-shape export. **The default route is unchanged** — charts/tables still export as SVG-derived DrawingML shapes for cross-renderer fidelity; native objects stay the deliberate opt-in trade documented under Non-goals below+- **`--native-charts-and-tables` hardened from dormant marker to usable opt-in** — the narrow native Chart/Table exception (see Non-goals below) now emits charts and pure-text tables that keep the deck's own design instead of snapping to PowerPoint's white default theme. Classic native charts write explicit chart-area / plot-area / axis-line / gridline / label-text colors — inferred from the visible SVG fallback (largest panel `<rect>` → background, fallback text → labels, fallback strokes → axis/grid) or overridden per `style` (`chart_area_fill` / `plot_area_fill` / `text_color` / `axis_color` / `grid_color`, `"none"` for transparent); the color parser normalizes named CSS colors, `#RGB` shorthand, and `rgb()` / `rgba()` to OOXML hex; bar/column series disable negative-value fill inversion so negative bars keep their series color. The activated export is named `<name>_<ts>_native_charts_tables.pptx` to tell it apart from the default shape-based export. **The default route is unchanged** — charts/tables still export as editable SVG-derived DrawingML shapes for cross-renderer fidelity; PowerPoint-native Chart/Table objects add a data source and object-specific editing model and stay the deliberate opt-in trade documented under Non-goals below- **Native package structure + mode-specific template creation** — deck/layout-template SVG pages declare their final Master/Layout identity while they are authored. Fixed Master/Layout visuals are root-level atoms, reusable slots are bounded top-level groups with real carriers or an explicit composite proxy, and zero-slot Layouts remain valid. Structured export deterministically compiles only that contract and performs final package read-back; it never promotes repeated chrome or infers placeholders. Flat free-design/brand-only export keeps all content Slide-local while replacing the stock Office scaffold with one clean project-owned Master and Blank Layout plus a deck-named current-lock theme. It removes title/body and other stock content, prunes unused Layouts, and retains only the standard date/footer/slide-number capability hooks. Both generated routes write the locked title plus a deterministic nine-level body hierarchy into Master `p:txStyles`, preserving paragraph and bullet settings. `standard` / `fidelity` author new SVG rosters and new Master/Layout systems without preserving or distilling source topology. `mirror` restores the complete supported source graph—including definition-only prototypes for unused Layouts—without semantic synthesis; fixed-layer source groups are mechanically expanded into direct atoms. Lossless imports stay in analysis and lightweight projections stay inspection-only. Library and project outputs share required `templates/`, optional `images/` / `icons/`, and optional on-demand review output in `exports/`; only library registration differs. Legacy baseline/template/preserve SVG packages first run `restore-pptx-structure`. Raw one-off PPTX filling remains `template-fill-pptx`.@@ -129,7 +129,7 @@ PPT Master's main route is "AI generates SVG from scratch → DrawingML", with tPixel-fidelity across the four renderers (PowerPoint / Keynote / LibreOffice / WPS) is the project's spine. Switching the default route to native PowerPoint charts breaks that — the same PPTX renders different chart layouts across renderers. Charts as SVG is **by design**, not a capability gap.-The narrow exception is the `data-pptx-native` marker: supported data charts and pure text-grid tables carry native-object metadata at generation time, and exporting with `--native-objects` activates it for users who deliberately trade cross-renderer fidelity for PowerPoint-side editability on those objects — the activated objects now preserve the deck's chart-area / plot / axis / gridline / label colors and native table formatting rather than snapping to PowerPoint's default theme (see 2026-07 above). The default export path and the SVG chart/table system are unchanged.+The narrow exception is the `data-pptx-replace-with` marker: supported data charts and pure text-grid tables carry a PowerPoint-native Chart/Table replacement payload at generation time, and exporting with `--native-charts-and-tables` activates it for users who deliberately trade cross-renderer fidelity for a data-backed object and its chart/table-specific editing model — the activated objects preserve the deck's chart-area / plot / axis / gridline / label colors and native table formatting rather than snapping to PowerPoint's default theme (see 2026-07 above). The default export path and editable SVG-derived shape system are unchanged.### uv as default / required dependencydiff --git a/docs/technical-design.md b/docs/technical-design.mdindex dcf2a691..97869d1d 100644--- a/docs/technical-design.md+++ b/docs/technical-design.md@@ -72,7 +72,7 @@ Output:# Every PPTX variant below is produced through the svg_output → native DrawingML routeexports/├── presentation_<timestamp>.pptx ← Native shapes (DrawingML) — canonical output, edit & deliver from here- ├── presentation_<timestamp>_native_charts.pptx ← Native chart/table objects instead of flattened shapes (opt-in via --native-objects)+ ├── presentation_<timestamp>_native_charts_tables.pptx ← PowerPoint-native Chart/Table replacements (opt-in via --native-charts-and-tables)└── presentation_<timestamp>_narrated.pptx ← Narrated version — embedded per-slide audio + auto-advance timings (via --recorded-narration audio)# Always written in default-flow mode (no -o)@@ -453,7 +453,7 @@ The post-processing and export stages work with distinct artifacts. Each one ser| `svg_output/` | source of truth, manual editing, `update_spec.py`, `svg_quality_checker.py` | only directory whose contents are authored, not derived || `svg_final/` | mandatory self-contained visual preview; IDE/browser inspection; manual insertion as an SVG picture | `.pptx` is not openable in IDEs; `svg_output/` won't render fully because of external icon / image refs. PowerPoint Convert to Shape is not supported || `exports/<name>_<ts>.pptx` (native) | primary deliverable — editable in PowerPoint with DrawingML shapes | only artifact whose shapes the user can resize / recolor / restyle natively in PowerPoint |-| `exports/<name>_<ts>_native_charts.pptx` (opt-in via `--native-objects`) | when `data-pptx-native` chart/table markers should ship as real editable PowerPoint objects instead of flattened shapes | data-backed chart/table objects the user can edit in PowerPoint; name marks it apart from the plain shape export |+| `exports/<name>_<ts>_native_charts_tables.pptx` (opt-in via `--native-charts-and-tables`) | when `data-pptx-replace-with` markers should replace SVG-derived, shape-based charts/tables with PowerPoint-native Chart/Table objects | data-backed objects with chart/table-specific controls; the default DrawingML shapes remain independently editable || `exports/<name>_<ts>_narrated.pptx` (via `--recorded-narration audio`) | narrated deck for auto-play and PowerPoint video export | embedded per-slide audio plus auto-advance timings; name marks it apart from silent exports || `backup/<ts>/svg_output/` (always written in default-flow mode) | re-export from frozen SVG sources without re-running the LLM, archival | the only persisted copy of the Executor's raw SVG source after the project has been edited downstream |@@ -526,11 +526,11 @@ These direct routes share some analysis primitives with the main pipeline, espec**Why each template SVG stays complete while still compiling to native structure.** A template SVG repeats the inherited Master/Layout visuals together with sample Slide content so it opens as a complete standalone page. During generation, `page_layouts` selects that prototype and the output SVG remains complete. Export removes repeated inherited atoms, emits real Master/Layout parts, and leaves actual slot carriers and Slide-local content on the Slide.-**Why native-object reconstruction uses markers, not automatic object replacement.** The standalone `pptx_to_svg.py` importer emits visible SVG fallback plus `data-pptx-native` metadata only for validated table/chart subsets. Table import covers exact physical row/grid topology, canonical rectangular merges with empty slaves, safe solid/no-fill per-side borders, plain multi-paragraph cells, and a closed run-rich paragraph form. A rich paragraph contains non-empty `runs`; every run requires `text` and may use only `bold`, `italic`, `underline`, `strike`, `color`, `font_size`, one `font_family`, `lang`, and `alt_lang`. Unknown source presentation-only run XML normalizes into that schema, while relationship-bearing text, extensions, line breaks, fields, tabs, bullets, malformed text topology, noncanonical merges, unsafe borders, and non-solid fills remain fallback-only. The normalized fallback for table style `{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}` resolves `wholeTbl`, `firstRow`, horizontal banding, theme colors/fonts, and direct overrides; this is not a full built-in/custom style registry.+**Why PowerPoint-native Chart/Table reconstruction uses explicit replacement markers, not automatic object replacement.** The standalone `pptx_to_svg.py` importer emits a visible SVG fallback plus `data-pptx-replace-with` and `<metadata type="application/json">` only for validated table/chart subsets. The parent marker determines the payload schema; ordinary shapes and connectors never use this contract. Table import covers exact physical row/grid topology, canonical rectangular merges with empty slaves, safe solid/no-fill per-side borders, plain multi-paragraph cells, and a closed run-rich paragraph form. A rich paragraph contains non-empty `runs`; every run requires `text` and may use only `bold`, `italic`, `underline`, `strike`, `color`, `font_size`, one `font_family`, `lang`, and `alt_lang`. Unknown source presentation-only run XML normalizes into that schema, while relationship-bearing text, extensions, line breaks, fields, tabs, bullets, malformed text topology, noncanonical merges, unsafe borders, and non-solid fills remain fallback-only. The normalized fallback for table style `{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}` resolves `wholeTbl`, `firstRow`, horizontal banding, theme colors/fonts, and direct overrides; this is not a full built-in/custom style registry.-For supported parsed column/bar/line/area, pie/doughnut, scatter, and bubble charts, a missing baked preview is replaced by a deterministic readable SVG fallback marked `visual=normalized`. The importer also covers the verified column/line/area combo subset, canonical four-series OHLC stock, area charts with numeric date axes, verified scatter/bubble charts with the closed `axes.x` / `axes.y` contract, radar, safe `of_pie` `serLines`, axis/title/legend normalization, and bounded bar/column gap/overlap cases. `gapWidth` is accepted only as one integer in `0..500`, and `overlap` only as one integer in `-100..100`; these presentation values intentionally normalize in native output, while malformed, duplicate, or out-of-range input fails closed. Combo plots may retain independent primary/secondary category caches and workbook ranges. XY import derives `scatter_style` from uniform effective series line/marker/smooth state. The closed category/value and XY axis contracts retain kind, position, visibility, label position, number format, min/max/major unit, reversal, and major gridlines for native read-back; the normalized XY fallback consumes only the two `major_gridlines` flags.+For supported parsed column/bar/line/area, pie/doughnut, scatter, and bubble charts, a missing baked preview is replaced by a deterministic readable SVG fallback marked `data-pptx-fallback-kind="normalized"`. The importer also covers the verified column/line/area combo subset, canonical four-series OHLC stock, area charts with numeric date axes, verified scatter/bubble charts with the closed `axes.x` / `axes.y` contract, radar, safe `of_pie` `serLines`, axis/title/legend normalization, and bounded bar/column gap/overlap cases. `gapWidth` is accepted only as one integer in `0..500`, and `overlap` only as one integer in `-100..100`; these presentation values intentionally normalize in native output, while malformed, duplicate, or out-of-range input fails closed. Combo plots may retain independent primary/secondary category caches and workbook ranges. XY import derives `scatter_style` from uniform effective series line/marker/smooth state. The closed category/value and XY axis contracts retain kind, position, visibility, label position, number format, min/max/major unit, reversal, and major gridlines for native read-back; the normalized XY fallback consumes only the two `major_gridlines` flags.-ChartEx import is deliberately closed to seven validated data models: `treemap`, `sunburst`, `histogram`, `pareto`, `box_whisker`, `waterfall`, and `funnel`. Their supported hierarchy/category/value/series/subtotal data topology round-trips through native output and reimport. Numeric caches must be non-empty and finite, with canonical non-negative counts/indexes and exact contiguous point topology. Source ChartEx style, axes, labels, and binning may normalize; this is not arbitrary ChartEx import or presentation fidelity. C4/C5 do not expand the normalized renderer, so valid active types outside it still use `visual=placeholder` / `route=reconstruction-only` without a source preview. Full `AxisSpec`, arbitrary ChartEx families, arbitrary rich OOXML, rotated/flipped/3D charts, unverified combo/stock/date-axis variants, and other unmodeled semantics remain outside the active import subset. Native replacement may normalize payload-external presentation details and retains the editable-first warning. Default export keeps fallback children as ordinary DrawingML shapes; only `--native-objects` activates editable tables/charts. Every active imported marker carries `data-pptx-fallback-sha256`: stale visible edits, reachable SVG definition/reference changes, or marker transforms make native replacement fail rather than discard the SVG edit, while hashless legacy markers remain compatible with a warning. This importer/exporter pairing is a reconstruction aid, not a preservation-route substitute for `template-fill-pptx` or `native-enhance-pptx`.+ChartEx import is deliberately closed to seven validated data models: `treemap`, `sunburst`, `histogram`, `pareto`, `box_whisker`, `waterfall`, and `funnel`. Their supported hierarchy/category/value/series/subtotal data topology round-trips through native output and reimport. Numeric caches must be non-empty and finite, with canonical non-negative counts/indexes and exact contiguous point topology. Source ChartEx style, axes, labels, and binning may normalize; this is not arbitrary ChartEx import or presentation fidelity. C4/C5 do not expand the normalized renderer, so valid active types outside it still use `data-pptx-fallback-kind="placeholder"` without a source preview. Full `AxisSpec`, arbitrary ChartEx families, arbitrary rich OOXML, rotated/flipped/3D charts, unverified combo/stock/date-axis variants, and other unmodeled semantics remain outside the active import subset. Native replacement may normalize payload-external presentation details and retains the data-model-first warning. Default export keeps fallback children as editable DrawingML shapes; only `--native-charts-and-tables` activates PowerPoint-native Chart/Table objects with a data source and object-specific editing model. Every active imported marker carries `data-pptx-import-source="pptx"` and `data-pptx-fallback-sha256`: stale visible edits, reachable SVG definition/reference changes, or marker transforms make native replacement fail rather than discard the SVG edit, while hashless legacy markers remain compatible with a warning. This importer/exporter pairing is a reconstruction aid, not a preservation-route substitute for `template-fill-pptx` or `native-enhance-pptx`.---diff --git a/docs/zh/faq.md b/docs/zh/faq.mdindex ae30bcb9..37c70084 100644--- a/docs/zh/faq.md+++ b/docs/zh/faq.md@@ -134,7 +134,7 @@ PPT Master 本身免费开源,唯一的成本来自你自己的 AI 模型用默认情况下,图表以**自定义设计的 SVG 图形**形式渲染,转换为原生 PowerPoint 形状——形状级别完全可编辑(移动、改色、改文字、调样式)。默认不用 Excel 驱动的图表对象是有意为之:PowerPoint 默认图表样式陈旧、视觉受限于固定模板。SVG 图表则提供出版物级的视觉质量,可以在 PowerPoint 中直接精修,且在 PowerPoint / Keynote / LibreOffice / WPS 间像素一致。-如果你的工作流明确需要 Excel 驱动的数据编辑,导出时加 `--native-objects`:受支持的数据图表和纯文本表格会以**带数据、可直接编辑的 PowerPoint 原生图表 / 表格对象**形式导出(保存为 `exports/<name>_<timestamp>_native_charts.pptx`,并保留这份 deck 自己的配色,而不是套用 PowerPoint 默认主题)。代价是跨软件渲染——原生对象在 PowerPoint / Keynote / LibreOffice / WPS 间可能略有差异,所以 SVG 形状仍是默认路径。+如果你的工作流明确需要 Excel 驱动的数据编辑或 PowerPoint 的图表/表格专属控制,导出时加 `--native-charts-and-tables`:受支持的数据图表和纯文本表格会以**带数据源的 PowerPoint 原生 Chart / Table 对象**形式导出(保存为 `exports/<name>_<timestamp>_native_charts_tables.pptx`,并保留这份 deck 自己的配色,而不是套用 PowerPoint 默认主题)。默认 SVG fallback 同样会转换成可编辑 DrawingML shape,但不具备图表数据工作簿或图表/表格对象模型。原生对象在 PowerPoint / Keynote / LibreOffice / WPS 间可能略有差异,因此形状路线仍是视觉稳定性的默认选择。## Q: 页面切换和元素动画可以调吗?diff --git a/docs/zh/powerpoint-svg-mapping.md b/docs/zh/powerpoint-svg-mapping.mdindex d3c34742..9222e50b 100644--- a/docs/zh/powerpoint-svg-mapping.md+++ b/docs/zh/powerpoint-svg-mapping.md@@ -67,7 +67,7 @@ PowerPoint 意图| 正文占位符 | 含一个文本 carrier 的结构化 slot 组 | `body` 类型 `p:ph` | `Native-stable` | 多行 carrier 仍必须是一个文本框 || 日期、页脚与页码占位符 | 结构化文本 slot | `dt`、`ftr` 与 `sldNum` 类型 `p:ph`,带匹配的 Layout 页眉/页脚标志 | `Native-stable` | 占位符 index 必须唯一且合法 || 图片占位符 | 含一个图片或受支持 crop carrier 的结构化 slot | `pic` 类型 `p:ph` | 在图片合同内为 `Native-stable` | slot 必须恰好含一个兼容的直接 carrier |-| 图表或表格占位符 | 含一个匹配原生对象 carrier 的结构化 slot | `chart` 或 `tbl` 类型 `p:ph` | 仅原生对象导出时为 `Native-stable` | 需要合法 JSON metadata 与 `--native-objects` |+| 图表或表格占位符 | 含一个匹配原生对象 carrier 的结构化 slot | `chart` 或 `tbl` 类型 `p:ph` | 仅原生 Chart/Table 导出时为 `Native-stable` | 需要合法 JSON metadata 与 `--native-charts-and-tables` || 通用对象占位符 | 一个兼容 carrier,或显式复合 proxy binding | `obj` 类型 `p:ph` | 原生 binding;复合可见内容仍为普通 shape | 复合 slot 必须使用已登记 proxy 降级方案 || 媒体占位符 | 一个图片或受支持 crop carrier | `media` 类型 `p:ph` | 仅为原生占位符 binding | 不会从装饰性 SVG 内容生成视频或音频 || 空文本占位符 | 空或仅空白的已标记 text carrier | 使用合法 1 pt 下限的不可见 U+200B run,生成一个原生文本 shape | `Native-stable` | 不得添加假破折号、小于 1 pt 的文字或与背景同色的可见字符 |@@ -161,26 +161,28 @@ preset 形状选择与精确原子片段合同见 [`native-shape-authoring.md`](| PowerPoint 功能 | 项目表达 | PPTX 结果 | 回导与保真度 | 校验边界 ||---|---|---|---|---|| 视觉绘制表格 | 普通 SVG shape、line 与 text | 相互独立的可编辑 PowerPoint shape | 保真度遵循各组件对应行 | 它不是原生表格,也没有 PowerPoint 表格编辑模型 |-| 原生可编辑表格 | 一个带子 JSON metadata 和可见 fallback 的 `<g data-pptx-native="table">` | 启用原生对象时产生含 `a:tbl` 的 `p:graphicFrame` | 导入受支持表格重建 fallback 加原生 metadata | metadata 必须形成已登记矩形 schema;需要 `--native-objects` |+| PowerPoint 原生表格 | 一个带 `<metadata type="application/json">` 和可见 fallback 的 `<g data-pptx-replace-with="table">` | 启用原生 Chart/Table 替换时产生含 `a:tbl` 的 `p:graphicFrame` | 导入受支持表格重建 fallback 加替换 metadata | metadata 必须形成已登记矩形 schema;需要 `--native-charts-and-tables` || 合并表格单元格 | 规范原生表格 merge metadata | 原生水平/垂直合并语义 | 封闭 schema 内为 `Native-stable` | 拒绝重叠、歧义或非矩形合并 || 表格单元格格式 | 已登记原生表格单元格格式字段 | 原生单元格 fill、border、text 与 alignment | `Native-normalized` | 不猜测封闭 schema 以外的字段 || 不受支持的原生表格功能 | SVG fallback 或直接源保留 | 保留可见 fallback,或在直接路线保留源 OOXML | 显式 fallback / `Direct preservation` | 不得临时扩展 JSON |-原生对象是可选功能。默认导出保留 SVG fallback,因为它的视觉稳定;原生导出优先 PowerPoint 可编辑性,并可能对外观做归一化。+PowerPoint 原生 Chart/Table 对象是可选功能。默认导出保留 SVG fallback,并转换为仍可独立编辑的 DrawingML shape,以保持视觉稳定;原生导出改为提供对象的数据源以及图表/表格专属编辑模型,并可能归一化外观。++导入的图表组使用 `data-pptx-fallback-kind="source-preview|normalized|placeholder"` 对可见 fallback 分类;其中 `placeholder` 自身即表示仅用于重建的 fallback。`data-pptx-replacement-status` 则记录 fallback-only 图表或表格导入无法提出有效替换声明的原因。该合同下的导入组均使用 `data-pptx-import-source="pptx"`,有效声明还可携带 `data-pptx-fallback-sha256` 防止陈旧 metadata 覆盖后续视觉编辑。旧 `data-pptx-native*`、`data-pptx-visual-status` 和 `data-pptx-route-status` 写法仍可读,但不再是规范创作格式。## 8. PowerPoint 图表| PowerPoint 功能 | 项目表达 | PPTX 结果 | 回导与保真度 | 校验边界 ||---|---|---|---|---|| 视觉绘制图表 | 普通 SVG 几何与文本 | 相互独立的可编辑 PowerPoint shape | 保真度遵循各组件对应行 | 没有“编辑数据”工作簿 |-| 原生经典图表 | 一个带已登记 JSON 数据和可见 fallback 的 `<g data-pptx-native="chart">` | `p:graphicFrame`、经典 chart part 与嵌入工作簿 | 受支持的导入重建 fallback 加原生 metadata | chart type 与数据必须匹配封闭 schema;需要 `--native-objects` |+| PowerPoint 原生经典图表 | 一个带 `<metadata type="application/json">` 已登记 JSON 数据和可见 fallback 的 `<g data-pptx-replace-with="chart">` | `p:graphicFrame`、经典 chart part 与嵌入工作簿 | 受支持的导入重建 fallback 加替换 metadata | chart type 与数据必须匹配封闭 schema;需要 `--native-charts-and-tables` || 原生 ChartEx 图表 | 具有受支持 ChartEx family 的相同 marker 接口 | `cx:chart` part 与嵌入工作簿 | 受支持 family 可按语义重建 | 仅接受已登记 family/field 组合 || 图表标题、图例、坐标轴、标签与系列格式 | 已登记原生图表 metadata | 原生 chart 属性 | `Native-normalized` | 精确字段与受支持 family 仍以 `shared-standards.md` 为规范 |-| 图表说明、来源或脚注 | native marker 之外的普通伴随 SVG text | 图表旁边可编辑的 Slide 文本框 | 作为文本时为 `Native-stable` | 不得把 Slide 文案隐藏在 chart JSON 里 |-| 已编辑 SVG fallback 与过期原生 metadata | 更新后的可见 SVG 加过期 hash | 默认导出保留可见 SVG;原生替换失败 | 显式安全行为 | 编译器绝不默默丢弃更新的视觉编辑 |+| 图表说明、来源或脚注 | replacement marker 之外的普通伴随 SVG text | 图表旁边可编辑的 Slide 文本框 | 作为文本时为 `Native-stable` | 不得把 Slide 文案隐藏在 chart JSON 里 |+| 已编辑 SVG fallback 与过期替换 metadata | 更新后的可见 SVG 加过期 hash | 默认导出保留可见 SVG;原生替换失败 | 显式安全行为 | 编译器绝不默默丢弃更新的视觉编辑 || 不支持的 3D 或延后图表 family | SVG 绘制图表、烘焙资产或直接源保留 | 不猜测原生图表 | fallback / `Direct preservation` | 不支持的 alias 必须使原生校验失败 |-完整图表/表格 schema 和受支持 family 列表有意仅保留在[规范化原生对象合同](../../skills/ppt-master/references/shared-standards.md#native-pptx-table--chart-markers-opt-in)中。+完整图表/表格 schema 和受支持 family 列表有意仅保留在[规范化替换合同](../../skills/ppt-master/references/shared-standards.md#powerpoint-native-chart--table-replacement-markers-opt-in)中。## 9. PowerPoint 播放与打包功能diff --git a/docs/zh/roadmap.md b/docs/zh/roadmap.mdindex 2473e425..f6753777 100644--- a/docs/zh/roadmap.md+++ b/docs/zh/roadmap.md@@ -82,7 +82,7 @@- **页间转场与元素入场动画完成无静默降级加固** — 当前默认保持页间 `fade` / 0.4 秒、元素入场 `none`,对象动画仍通过 `-a` 或 `animations.json` 按需开启。未知效果 / Start 模式、非有限或越界时长、非法顺序,以及缺失 slide/group 引用都会直接失败,不再偷换为 `fade`、其它 Start 模式或继承值。公开产物替换前会回读候选 PPTX,校验根级 timing 位置、时间节点 ID 唯一性、shape 引用、效果 / 时长 / Start 语义及旁白 timing 合并。直接 PPTX 路线只保留源对象动画,不把它翻译成生成路线的动画模型。Microsoft PowerPoint 是动效行为的主要验证目标;其它演示软件仅作为兼容目标,不承诺完全相同的播放结果-- **`--native-objects` 从休眠 marker 硬化为可用级 opt-in** — 那条窄「原生对象」例外(见下文 Non-goals)现在导出的图表与纯文本表格会**保留 deck 自己的设计**,不再塌回 PowerPoint 的白底默认主题。classic 原生图表显式写入 chart-area / plot-area / 轴线 / 网格线 / 标签文字颜色——从可见的 SVG fallback 推断(最大面板型 `<rect>` → 背景、fallback 文字 → 标签、fallback 描边 → 轴线/网格),或用 `style` 显式覆盖(`chart_area_fill` / `plot_area_fill` / `text_color` / `axis_color` / `grid_color`,`"none"` 表透明);颜色解析把命名色、`#RGB` 简写、`rgb()` / `rgba()` 归一为 OOXML hex;bar/column 系列关掉负值反色,负值柱保持系列色。激活导出命名为 `<name>_<ts>_native_charts.pptx` 以与默认压平形状导出区分。**默认路线不变**——图表/表格仍以 SVG 派生的 DrawingML 形状导出以保跨渲染器保真;原生对象仍是下文 Non-goals 里那条刻意的 opt-in 取舍+- **`--native-charts-and-tables` 从休眠 marker 硬化为可用级 opt-in** — 那条窄「原生 Chart/Table」例外(见下文 Non-goals)现在导出的图表与纯文本表格会**保留 deck 自己的设计**,不再塌回 PowerPoint 的白底默认主题。classic 原生图表显式写入 chart-area / plot-area / 轴线 / 网格线 / 标签文字颜色——从可见的 SVG fallback 推断(最大面板型 `<rect>` → 背景、fallback 文字 → 标签、fallback 描边 → 轴线/网格),或用 `style` 显式覆盖(`chart_area_fill` / `plot_area_fill` / `text_color` / `axis_color` / `grid_color`,`"none"` 表透明);颜色解析把命名色、`#RGB` 简写、`rgb()` / `rgba()` 归一为 OOXML hex;bar/column 系列关掉负值反色,负值柱保持系列色。激活导出命名为 `<name>_<ts>_native_charts_tables.pptx`,以与默认形状导出区分。**默认路线不变**——图表/表格仍以可编辑的 SVG 派生 DrawingML 形状导出以保跨渲染器保真;PowerPoint 原生 Chart/Table 增加数据源和对象专属编辑模型,仍是下文 Non-goals 里那条刻意的 opt-in 取舍- **原生 package 结构 + 按模式创建模板** — deck/layout-template SVG 页面在创作时就声明最终 Master/Layout 身份。固定 Master/Layout 视觉是根级原子,可复用槽位是带真实 carrier 或显式 composite proxy 的有界顶层 group,零槽位 Layout 也合法。`structured` 导出只确定性编译该合同并执行最终 package 回读;不提升重复 chrome,也不推断 placeholder。`flat` 自由设计 / brand-only 导出则保持所有内容 Slide-local,同时把 stock Office 脚手架替换成一个属于项目的干净 Master、一个 Blank Layout 和按 deck 命名的当前 lock 主题;删除 title/body 等 stock 内容、裁掉未使用 Layout,仅保留标准日期、页脚和页码能力钩子。两条生成路线都把锁定 title 与确定性的九级 body 层级写入母版 `p:txStyles`,同时保留段落和项目符号设置。`standard` / `fidelity` 重新创作 SVG roster 和新的 Master/Layout 系统,不保留、也不蒸馏来源拓扑。`mirror` 恢复完整且受支持的来源图谱,包括未使用 Layout 的定义专用原型;固定结构层的来源 group 只允许机械展开成直接原子,不做语义归纳。无损导入保留在分析区,轻量 projection 仅供检查。`library` 与 `project` 都要求 `templates/`,`images/` / `icons/` 可选,`exports/` 仅在按需生成评审文件时出现;只有全局注册不同。旧 baseline/template/preserve SVG 包先运行 `restore-pptx-structure`;原始 PPTX 的一次性回填仍走 `template-fill-pptx`。@@ -129,7 +129,7 @@ PPT Master 主路线是「AI 从零生成 SVG → DrawingML」,整条管线围跨四渲染器(PowerPoint / Keynote / LibreOffice / WPS)的位置保真是项目主轴。把默认路线改成 PowerPoint 原生图表会让「像素级一致性」破功——同一个 PPTX 在不同渲染器里图表会显示不同布局。图表默认用 SVG 是 **by design**,不是能力缺失。-窄例外是 `data-pptx-native` marker:受支持的数据图表与纯文本网格表格在生成时携带原生对象元数据,导出加 `--native-objects` 才激活——供主动用跨渲染器保真换取 PowerPoint 内可编辑性的用户使用;激活后的对象现在会保留 deck 的 chart-area / plot / 轴线 / 网格线 / 标签颜色与原生表格格式,不再塌回 PowerPoint 默认主题(见上文 2026-07)。默认导出路径与 SVG 图表 / 表格系统不变。+窄例外是 `data-pptx-replace-with` marker:受支持的数据图表与纯文本网格表格在生成时携带 PowerPoint 原生 Chart/Table 替换 payload,导出加 `--native-charts-and-tables` 才激活——供主动用跨渲染器保真换取带数据源对象及图表/表格专属编辑模型的用户使用;激活后的对象会保留 deck 的 chart-area / plot / 轴线 / 网格线 / 标签颜色与原生表格格式,不再塌回 PowerPoint 默认主题(见上文 2026-07)。默认导出路径与可编辑的 SVG 派生形状系统不变。### uv 作为默认 / 必需依赖diff --git a/docs/zh/technical-design.md b/docs/zh/technical-design.mdindex d220f5fc..7933ba11 100644--- a/docs/zh/technical-design.md+++ b/docs/zh/technical-design.md@@ -71,7 +71,7 @@ PPT Master 不以“任意 SVG 都能转成 PPTX”为目标。`svg_output/` 使exports/├── presentation_<timestamp>.pptx ← 原生形状版(DrawingML)— 唯一 PPTX 生成路线的标准文件- ├── presentation_<timestamp>_native_charts.pptx ← 同一路线的原生图表/表格对象变体(加 --native-objects 时生成)+ ├── presentation_<timestamp>_native_charts_tables.pptx ← 同一路线的 PowerPoint 原生 Chart/Table 替换变体(加 --native-charts-and-tables 时生成)└── presentation_<timestamp>_narrated.pptx ← 同一路线的旁白变体(加 --recorded-narration audio 时生成)# 默认流程(未指定 -o)始终写入@@ -455,7 +455,7 @@ PowerPoint 的 DrawingML 是 SVG 表达力的严格子集,因此主编译路| `svg_output/` | 唯一源、手工编辑入口、`update_spec.py`、`svg_quality_checker.py` | 流水线中唯一**手写**而非派生的目录 || `svg_final/` | IDE 内即时预览(VSCode/Cursor 直接打开 `.svg`)、浏览器单页预览、手动作为 SVG 图片插入 | `.pptx` 在 IDE 里打不开;`svg_output/` 因图标 / 图片是外部引用,IDE 中渲染不完整。PowerPoint 手工“转换为形状”不在支持范围 || `exports/<name>_<ts>.pptx`(native) | 主交付物——PowerPoint 中以 DrawingML 形状形态可编辑 | 唯一一份用户可在 PowerPoint 中原生改尺寸 / 改色 / 改样式的产物 |-| `exports/<name>_<ts>_native_charts.pptx`(需 `--native-objects` 显式开启) | 让带 `data-pptx-native` 标记的图表/表格以真·PowerPoint 原生对象交付,而非压平形状 | 带数据、可在 PowerPoint 中直接编辑的图表/表格对象;命名与普通压平形状导出区分开 |+| `exports/<name>_<ts>_native_charts_tables.pptx`(需 `--native-charts-and-tables` 显式开启) | 让带 `data-pptx-replace-with` 标记的 SVG 派生形状图表/表格替换为 PowerPoint 原生 Chart/Table 对象 | 带数据源和图表/表格专属控制的对象;默认 DrawingML shape 本身仍可独立编辑 || `exports/<name>_<ts>_narrated.pptx`(经 `--recorded-narration audio` 生成) | 自动放映与 PowerPoint 视频导出用的旁白版 deck | 逐页嵌入音频并写入自动推进时间;命名与无声导出区分开 || `backup/<ts>/svg_output/`(默认流程下始终生成) | 不重跑 LLM 的前提下从冻结 SVG 源重建 pptx、长期存档 | 项目下游被改动后,Executor 原始 SVG 唯一的留存副本 |@@ -528,11 +528,11 @@ PowerPoint 的 DrawingML 是 SVG 表达力的严格子集,因此主编译路**为什么模板 SVG 保持完整却仍能编译成原生结构。** 模板 SVG 会重复携带继承的 Master/Layout 视觉和示例 Slide 内容,因此可独立打开。生成时由 `page_layouts` 选择该原型,输出 SVG 仍保持视觉闭包。导出器移除重复继承原子、生成真实 Master/Layout part,并把槽位 carrier 与 Slide-local 内容留在 Slide。-**为什么原生对象重建使用 marker,而不是自动替换对象。** 独立的 `pptx_to_svg.py` 导入器只为已验证的表格 / 图表子集输出可见 SVG fallback 与 `data-pptx-native` 元数据。表格导入覆盖精确的物理行列 topology、slave 为空的规范矩形 merge、安全的 solid/no-fill 逐边 border、纯文本多段落,以及封闭的 run 级富文本段落。富文本段落包含非空 `runs`;每个 run 必须有 `text`,并且只能使用 `bold`、`italic`、`underline`、`strike`、`color`、`font_size`、单一 `font_family`、`lang` 和 `alt_lang`。来源中未建模但只影响表现的 run XML 会归一化到该 schema;带 relationship 的文本、扩展节点、换行、字段、tab、项目符号、破损文本 topology、非规范 merge、不安全 border 与非纯色填充仍保持 fallback-only。表格样式 `{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}` 的规范化 fallback 会解析 `wholeTbl`、`firstRow`、横向带状行、主题颜色 / 字体和直接格式覆盖;这不代表完整 built-in/custom style registry。+**为什么 PowerPoint 原生 Chart/Table 重建使用显式替换 marker,而不是自动替换对象。** 独立的 `pptx_to_svg.py` 导入器只为已验证的表格 / 图表子集输出可见 SVG fallback、`data-pptx-replace-with` 与 `<metadata type="application/json">`。父组 marker 决定 payload schema;普通 shape 与 connector 不使用该合同。表格导入覆盖精确的物理行列 topology、slave 为空的规范矩形 merge、安全的 solid/no-fill 逐边 border、纯文本多段落,以及封闭的 run 级富文本段落。富文本段落包含非空 `runs`;每个 run 必须有 `text`,并且只能使用 `bold`、`italic`、`underline`、`strike`、`color`、`font_size`、单一 `font_family`、`lang` 和 `alt_lang`。来源中未建模但只影响表现的 run XML 会归一化到该 schema;带 relationship 的文本、扩展节点、换行、字段、tab、项目符号、破损文本 topology、非规范 merge、不安全 border 与非纯色填充仍保持 fallback-only。表格样式 `{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}` 的规范化 fallback 会解析 `wholeTbl`、`firstRow`、横向带状行、主题颜色 / 字体和直接格式覆盖;这不代表完整 built-in/custom style registry。-受支持的柱 / 条 / 折线 / 面积、饼 / 圆环、散点 / 气泡图在没有 baked preview 时会生成确定性、可读的 SVG fallback,并标记 `visual=normalized`。导入器还覆盖已验证的柱 / 折线 / 面积组合图、规范四系列 OHLC stock、数值日期轴面积图、采用封闭 `axes.x` / `axes.y` 合同的散点 / 气泡图、radar、安全的 `of_pie` `serLines`、坐标轴 / 标题 / 图例归一化,以及有界的柱 / 条图 gap/overlap 场景。`gapWidth` 只接受 `0..500` 内的单个整数,`overlap` 只接受 `-100..100` 内的单个整数;这两个表现字段在 native 输出中有意归一化,非法、重复或越界输入 fail closed。组合图可保留主 / 次 plot 各自的 category cache 与 workbook range。XY 导入根据各系列一致的有效 line/marker/smooth 状态推导 `scatter_style`。封闭的 category/value 与 XY 轴合同为 native read-back 保留 kind、position、visibility、label position、number format、min/max/major unit、reverse 和 major gridlines;规范化 XY fallback 只消费两个 `major_gridlines` 开关。+受支持的柱 / 条 / 折线 / 面积、饼 / 圆环、散点 / 气泡图在没有 baked preview 时会生成确定性、可读的 SVG fallback,并标记 `data-pptx-fallback-kind="normalized"`。导入器还覆盖已验证的柱 / 折线 / 面积组合图、规范四系列 OHLC stock、数值日期轴面积图、采用封闭 `axes.x` / `axes.y` 合同的散点 / 气泡图、radar、安全的 `of_pie` `serLines`、坐标轴 / 标题 / 图例归一化,以及有界的柱 / 条图 gap/overlap 场景。`gapWidth` 只接受 `0..500` 内的单个整数,`overlap` 只接受 `-100..100` 内的单个整数;这两个表现字段在 native 输出中有意归一化,非法、重复或越界输入 fail closed。组合图可保留主 / 次 plot 各自的 category cache 与 workbook range。XY 导入根据各系列一致的有效 line/marker/smooth 状态推导 `scatter_style`。封闭的 category/value 与 XY 轴合同为 native read-back 保留 kind、position、visibility、label position、number format、min/max/major unit、reverse 和 major gridlines;规范化 XY fallback 只消费两个 `major_gridlines` 开关。-ChartEx 导入被有意限制为 7 个已验证数据模型:`treemap`、`sunburst`、`histogram`、`pareto`、`box_whisker`、`waterfall` 与 `funnel`。其受支持的层级 / 分类 / 数值 / 系列 / 小计数据 topology 可经 native 输出再导入回读。数值 cache 必须非空且有限,count/index 必须是规范非负整数,并满足精确连续的 point topology。来源 ChartEx 的样式、坐标轴、标签与 binning 可能归一化;这不代表任意 ChartEx 导入或表现层保真。C4/C5 不扩展 normalized renderer,因此 renderer 外的有效 active 类型在没有源 preview 时仍使用 `visual=placeholder` / `route=reconstruction-only`。完整 `AxisSpec`、任意 ChartEx 家族、任意富文本 OOXML、旋转 / 翻转 / 3D 图表、未验证的 combo/stock/date-axis 变体及其他未建模语义仍不在 active 导入子集内。native replacement 仍可能归一化 payload 外的表现细节,并保留 editable-first warning。默认导出把 fallback 子元素作为普通 DrawingML shape;只有 `--native-objects` 才启用可编辑表格 / 图表。每个 active 导入 marker 都带有 `data-pptx-fallback-sha256`:可见 fallback、可达 SVG definition/reference 或 marker transform 变更后,native replacement 会 fail,而不是丢弃 SVG 编辑;无 hash 的旧 marker 仍兼容并给出 warning。该 importer/exporter 组合只用于重建,不替代 `template-fill-pptx` 或 `native-enhance-pptx` 的保留型路线。+ChartEx 导入被有意限制为 7 个已验证数据模型:`treemap`、`sunburst`、`histogram`、`pareto`、`box_whisker`、`waterfall` 与 `funnel`。其受支持的层级 / 分类 / 数值 / 系列 / 小计数据 topology 可经 native 输出再导入回读。数值 cache 必须非空且有限,count/index 必须是规范非负整数,并满足精确连续的 point topology。来源 ChartEx 的样式、坐标轴、标签与 binning 可能归一化;这不代表任意 ChartEx 导入或表现层保真。C4/C5 不扩展 normalized renderer,因此 renderer 外的有效 active 类型在没有源 preview 时仍使用 `data-pptx-fallback-kind="placeholder"`。完整 `AxisSpec`、任意 ChartEx 家族、任意富文本 OOXML、旋转 / 翻转 / 3D 图表、未验证的 combo/stock/date-axis 变体及其他未建模语义仍不在 active 导入子集内。native replacement 仍可能归一化 payload 外的表现细节,并保留数据模型优先 warning。默认导出把 fallback 子元素作为可编辑 DrawingML shape;只有 `--native-charts-and-tables` 才启用带数据源和对象专属编辑模型的 PowerPoint 原生 Chart/Table。每个 active 导入 marker 都带有 `data-pptx-import-source="pptx"` 与 `data-pptx-fallback-sha256`:可见 fallback、可达 SVG definition/reference 或 marker transform 变更后,native replacement 会 fail,而不是丢弃 SVG 编辑;无 hash 的旧 marker 仍兼容并给出 warning。该 importer/exporter 组合只用于重建,不替代 `template-fill-pptx` 或 `native-enhance-pptx` 的保留型路线。---diff --git a/skills/ppt-master/SKILL.md b/skills/ppt-master/SKILL.mdindex 2b52a704..a69ef401 100644--- a/skills/ppt-master/SKILL.md+++ b/skills/ppt-master/SKILL.md@@ -639,7 +639,7 @@ Template pages MUST start from the complete `page_layouts` SVG, keep all inheritFree-design and brand-only pages use `pptx_structure.mode: flat`. Draw the complete page directly: keep backgrounds, repeated chrome, headings, text, images, and decoration as ordinary Slide-local SVG content. Do not plan `pptx_masters` / `pptx_layouts` / `page_pptx_layouts`, do not add root Master/Layout identity, and do not add `data-pptx-layer` or `data-pptx-placeholder` metadata. Group logical content normally with top-level `<g id>` elements. Export materializes one clean project-owned Master plus one Blank Layout, applies the locked theme colors/fonts/title-body defaults, removes stock content placeholders and unused built-in Layouts, and retains only the standard date/footer/slide-number capability hooks. It does not promote or deduplicate page content.-Do not duplicate specialized identity with `data-pptx-role`. Add it only to structural page-frame objects whose package, page-number, or animation behavior is not already expressed by `data-pptx-layer`, `data-pptx-placeholder`, or `data-pptx-native`; such an element needs a stable unique `id`. Do not add generic content roles to ordinary titles, body text, cards, KPIs, diagrams, charts, icons, or images. Full contract: [`references/semantic-svg.md`](references/semantic-svg.md).+Do not duplicate specialized identity with `data-pptx-role`. Add it only to structural page-frame objects whose package, page-number, or animation behavior is not already expressed by `data-pptx-layer`, `data-pptx-placeholder`, or `data-pptx-replace-with`; such an element needs a stable unique `id`. Do not add generic content roles to ordinary titles, body text, cards, KPIs, diagrams, charts, icons, or images. Full contract: [`references/semantic-svg.md`](references/semantic-svg.md).**First-page gate (Mandatory)** — after the **first** SVG page, before drawing page 2:```bash@@ -709,8 +709,8 @@ python3 ${SKILL_DIR}/scripts/svg_to_pptx.py <project_path># Output (default-flow mode):# exports/<project_name>_<timestamp>.pptx ← native pptx (canonical output, reads svg_output/)# backup/<timestamp>/svg_output/ ← Executor SVG source backup (always written)-# Add --native-objects to emit real editable chart/table objects instead of flattened shapes:-# exports/<project_name>_<timestamp>_native_charts.pptx ← native chart/table objects (data-pptx-native markers)+# Add --native-charts-and-tables to replace marked fallbacks with PowerPoint-native Chart/Table objects:+# exports/<project_name>_<timestamp>_native_charts_tables.pptx ← native Chart/Table replacements (data-pptx-replace-with markers)# Re-export with --recorded-narration audio (generate-audio workflow) embeds per-slide narration:# exports/<project_name>_<timestamp>_narrated.pptx ← narrated pptx (embedded audio + auto-advance timings)```@@ -804,35 +804,41 @@ python3 ${SKILL_DIR}/scripts/svg_to_pptx.py <project_path>> it with `--no-merge`. Strict-line text stays Slide-local rather than claiming> one PowerPoint placeholder.-> **Native table/chart objects** — supported data charts and pure text-grid-> tables carry `data-pptx-native` markers by default (Executor transcribes+> **PowerPoint-native Chart/Table replacements** — supported data charts and pure text-grid+> tables carry `data-pptx-replace-with` markers by default (Executor transcribes> them at draw time; see `references/executor-base.md` §3.2) and the markers> stay dormant.-> Add `--native-objects` only when the user explicitly wants-> PowerPoint-editable native tables/charts and accepts that those objects may+> Add `--native-charts-and-tables` only when the user explicitly wants+> data-backed PowerPoint-native Chart/Table objects and their object-specific+> editing controls, and accepts that those objects may> render differently across PowerPoint / Keynote / LibreOffice / WPS; marker-local-> details not represented by native metadata may be omitted. This is a lossy-> editable-first contract, not a reason to disable an otherwise supported marker. Without-> the flag, marked groups export through their SVG fallback children like-> ordinary SVG content. Imported objects that carry-> `data-pptx-native-status` are fallback-only; the quality checker and-> `--native-objects` export surface their reason as warnings rather than silently-> claiming editability. An imported chart with no baked preview is a different-> case: `data-pptx-visual-status="placeholder"` plus-> `data-pptx-route-status="reconstruction-only"` records a diagnostic route.+> details not represented by the replacement payload may be omitted. This is a lossy+> data-object-first contract, not a reason to disable an otherwise supported+> marker. Without the flag, marked groups export through their SVG fallback+> children as independently editable DrawingML shapes. Imported objects that carry+> `data-pptx-replacement-status` are fallback-only; the quality checker and+> `--native-charts-and-tables` export surface their reason as warnings rather than silently+> claiming a native data object. An imported chart with no baked preview is a different+> case: `data-pptx-fallback-kind="placeholder"` records its+> reconstruction-only fallback.> Default export keeps that placeholder with a warning; when the same group has-> a valid active `data-pptx-native="chart"` payload, `--native-objects` may still-> reconstruct the editable chart. Invalid or contradictory status declarations+> a valid active `data-pptx-replace-with="chart"` payload,+> `--native-charts-and-tables` may still+> reconstruct the PowerPoint-native chart. Invalid or contradictory status declarations> remain export errors. For supported parsed classic families, the importer> instead emits a deterministic visible fallback with-> `data-pptx-visual-status="normalized"`; this is readable reconstruction, not+> `data-pptx-fallback-kind="normalized"`; this is readable reconstruction, not> a claim of Office pixel parity. Active imported table/chart markers also carry+> `data-pptx-import-source="pptx"` and> `data-pptx-fallback-sha256`. If their fallback, reachable SVG fragment> definition, local reference target, or marker transform changes later, default> export keeps that SVG, the mandatory quality checker warns, and-> `--native-objects` fails rather than discard the edit. Legacy markers+> `--native-charts-and-tables` fails rather than discard the edit. Legacy markers> without a baseline remain native-compatible and only warn that stale detection-> is unavailable.+> is unavailable. Legacy `data-pptx-native*`, `data-pptx-visual-status`, and+> `data-pptx-route-status` spellings remain read-compatible; generated SVG uses+> only the canonical replacement/fallback attributes. `--native-objects`+> remains a compatibility alias for `--native-charts-and-tables`.> Imported table markers may also cover the verified narrow P2 subset:> exact physical row/grid topology, canonical rectangular merges with blank> covered cells, safe per-side borders, plain multi-paragraph cells, and closeddiff --git a/skills/ppt-master/references/executor-base.md b/skills/ppt-master/references/executor-base.mdindex 5cc7c869..014524ef 100644--- a/skills/ppt-master/references/executor-base.md+++ b/skills/ppt-master/references/executor-base.md@@ -341,13 +341,13 @@ grep "chart-plot-area" <project_path>/svg_output/<current_page>.svg- **Reference — prefer semantic shapes over preset stacks (not a constraint)**: when a slide needs to express "ascending / converging / breaking through / stacking" — i.e., a relationship that goes beyond a generic arrow — prefer a single custom `<polygon>` or `<path>` that encodes the semantics geometrically, rather than stacking multiple preset arrows. A converging-tip path or a podium polygon reads faster than three arrows pointing at a label. Examples of this technique appear in many imported corporate decks; see `projects/01_template_import/svg_output/slide_01.svg` shape-158 for a reference (gradient-filled inward-pointing arrow). Do not codify these as templates — they are page-specific; the rule is just "consider polygon before stacking presets."- **Reference — visual depth through restraint (not a constraint)**: layered depth comes from rhythm (flat vs lifted, dense vs spacious), not from shadows everywhere. Shadow typically suits 2-3 genuinely floating elements per page (cards on photos, primary CTA, overlays); keep peer-grid cards, dividers, body containers flat. Reach for typography weight, spacing, accent bars, subtle tints **before** shadow.-### 3.2 Native Object Metadata Marker (MANDATORY on eligible data-chart and text-grid table pages)+### 3.2 PowerPoint-Native Chart/Table Replacement Marker (MANDATORY on eligible data-chart and text-grid table pages)-> `svg_to_pptx.py --native-objects` converts marked groups into real PowerPoint chart/table objects (charts get an embedded Excel workbook). Markers stay dormant in the default export — pages render from their SVG children — but a deck without markers can never form native objects. Write the marker at draw time: the data is already in hand, and recovering it later costs a full re-read pass.+> `svg_to_pptx.py --native-charts-and-tables` replaces marked groups with PowerPoint-native Chart/Table objects (charts get an embedded Excel workbook). Markers stay dormant in the default export, whose SVG children become independently editable DrawingML shapes, but a deck without markers can never form data-backed native Chart/Table objects. Write the marker at draw time: the data is already in hand, and recovering it later costs a full re-read pass.-**Hard rule**: every data chart whose type appears in the **Supported chart types** list of [shared-standards.md](shared-standards.md) "Native PPTX Table / Chart Markers" (the single authority for the eligible set, marker contract, and JSON schemas) gets `data-pptx-native="chart"` plus a `<metadata data-pptx-native="chart">` JSON child on its top-level `<g>`, transcribing the same data just plotted. Every pure text-grid data table gets `data-pptx-native="table"` the same way, transcribing all visible cell text into `columns` / `rows`.+**Hard rule**: every data chart whose type appears in the **Supported chart types** list of [shared-standards.md](shared-standards.md) "PowerPoint-Native Chart / Table Replacement Markers" (the single authority for the eligible set, marker contract, and JSON schemas) gets `data-pptx-replace-with="chart"` plus one `<metadata type="application/json">` JSON child on its top-level `<g>`, transcribing the same data just plotted. Every pure text-grid data table gets `data-pptx-replace-with="table"` the same way, transcribing all visible cell text into `columns` / `rows`. The parent marker determines the JSON schema; do not duplicate a chart/table kind on the metadata child.-`data-pptx-native` is a **data-backed replacement claim**, not a generic label for a group that contains numbers. Add it only when the matching JSON payload can be written in the same edit; if the object is meant to remain SVG geometry, do not add the marker.+`data-pptx-replace-with` is a **data-backed replacement claim**, not a generic label for a group that contains numbers and not a marker for ordinary PowerPoint shapes or connectors. Add it only when the matching JSON payload can be written in the same edit; if the object is meant to remain SVG geometry, do not add the marker.- Chart types absent from that list and conceptual/diagrammatic graphics (process flows, cycles, quadrant cards, timelines, KPI cards) get **no marker** — `svg_quality_checker.py` rejects unsupported marker types.- Canonical rectangular merged text cells may carry a table marker by putting anchor-only `row_span` / `col_span` in metadata and leaving covered cells blank. Nonrectangular/overlapping merges, nonblank covered cells, and graphical cells (icons, harvey balls, rating dots) get **no table marker** and stay on the SVG fallback route.@@ -362,12 +362,12 @@ grep "chart-plot-area" <project_path>/svg_output/<current_page>.svg- Native chart typography mirrors the SVG fallback. Copy the fallback's shared chart font into `style.font_family` and visible chart text sizes into the matching metadata fields (`title_font_size`, `subtitle_font_size`, `axis_font_size`, `note_font_size`, etc.) only when role sizes differ; otherwise let the exporter infer them from visible fallback text. When a visible chart title, subtitle, or axis title needs its own size/color/font, write that field as an object with `text`, `font_size`, `font_family`, and `color`. Use `axis_title_font_size`, `legend_font_size`, or companion per-entry `font_size` only when the fallback visibly uses a separate size.- Native table typography mirrors the SVG fallback. Write `style.font_family` and `style.font_size` from the visible table text; use `header_font_size` or per-cell `font_size` only when the fallback visibly does so. If the fallback has no explicit table font, fall back to the deck body family and locked body size from `spec_lock.md typography`.- The marker group's transform stays translate/scale only (no rotate / matrix / skew).-- Visual parity is not a goal: the SVG drawing remains the designed visual; the native object is a data-editable counterpart with PowerPoint-default styling that users restyle by hand after export. Never simplify the SVG design to match what a native object could show.+- Visual parity is not a goal: the SVG drawing remains the designed visual and exports as editable DrawingML shapes; the native object is the data-backed counterpart with PowerPoint's chart/table-specific model. Never simplify the SVG design to match what a native object could show.**Per-page verification** — after writing each eligible data-chart or text-grid table page, confirm the marker exists:```bash-grep "data-pptx-native" <project_path>/svg_output/<current_page>.svg+grep "data-pptx-replace-with" <project_path>/svg_output/<current_page>.svg```### SVG File Naming Conventiondiff --git a/skills/ppt-master/references/semantic-svg.md b/skills/ppt-master/references/semantic-svg.mdindex 2e57943f..bf12550b 100644--- a/skills/ppt-master/references/semantic-svg.md+++ b/skills/ppt-master/references/semantic-svg.md@@ -18,7 +18,7 @@ The completed SVG remains the full visible page. Removing the metadata must not**Hard rule — route boundary**: Free-design and brand-only pages use `pptx_structure.mode: flat`, declare one canonical root `data-pptx-page-role`, and omit every Master/Layout/layer/placeholder marker in this document. Deck/layout template pages declare their final Master and Layout before drawing begins and omit `data-pptx-page-role`; the structured exporter compiles that contract and never selects, clusters, distills, or visually infers it.-**Hard rule — specialized metadata wins**: Use Master/Layout/placeholder metadata for native structure, `data-pptx-native` for chart/table reconstruction, and the imported/authored shape metadata defined in [`shared-standards.md`](./shared-standards.md) §§1.4–1.5. Do not duplicate those facts with `data-pptx-role`.+**Hard rule — specialized metadata wins**: Use Master/Layout/placeholder metadata for native structure, `data-pptx-replace-with` for optional PowerPoint-native Chart/Table replacement, and the imported/authored shape metadata defined in [`shared-standards.md`](./shared-standards.md) §§1.4–1.5. Do not duplicate those facts with `data-pptx-role`.---diff --git a/skills/ppt-master/references/shared-standards.md b/skills/ppt-master/references/shared-standards.mdindex 9545bd1f..bbdd2e09 100644--- a/skills/ppt-master/references/shared-standards.md+++ b/skills/ppt-master/references/shared-standards.md@@ -214,7 +214,7 @@ the original `<use>` / `<symbol>` structure.| Aspect ratio | Default/aligned `meet` values and plain `preserveAspectRatio="none"` are supported. `slice`, `refX`, and `refY` are forbidden. || Viewport boundary | Symbol artwork MUST stay inside its `viewBox`; expansion does not reproduce symbol overflow clipping. || Internal references | Author exact `href="#id"` and `url(#id)` fragments. The expander also reads legacy `xlink:href="#id"` and rewrites all instance-local cloned IDs. |-| Structural metadata | Neither the `<use>` instance nor its referenced subtree may carry `data-pptx-layer*`, `data-pptx-native*`, or `data-pptx-placeholder*`. Author those objects directly instead of reusing them. |+| Structural metadata | Neither the `<use>` instance nor its referenced subtree may carry `data-pptx-layer*`, chart/table replacement metadata (`data-pptx-replace-with`, `data-pptx-replacement-*`, `data-pptx-import-source`, or `data-pptx-fallback-*`), or `data-pptx-placeholder*`. Author those objects directly instead of reusing them. || Safety limits | A reachable reference chain may contain at most 64 instances, and one SVG may expand at most 10,000 local `<use>` instances. |**Forbidden — unsafe local references**:@@ -289,8 +289,8 @@ SVG fallback. Do not use this normalization to change ownership or appearance.an authored template. Keep the full lossless import SVG separately as theaudit/fallback source. Mirror may reuse only metadata already supported by theconverter on unchanged Slide-local/slot objects; unsupported or edited objects-use the current SVG fallback. `data-pptx-native` remains reserved for native-chart/table markers.+use the current SVG fallback. `data-pptx-replace-with` remains reserved for the+optional PowerPoint-native Chart/Table replacement contract.**Registry and rendering rules**:@@ -450,7 +450,7 @@ group value is distributed across them.The converter nevertheless accepts `<g opacity="...">` and inline group`opacity` by multiplying group alpha into descendants. That path is-`Approximate`; nested group/child alpha multiplies, and `--native-objects`+`Approximate`; nested group/child alpha multiplies, and `--native-charts-and-tables`rejects transparent native table/chart markers. The quality checker reports anon-blocking fidelity warning so existing or intentionally authored input cancontinue without modification.@@ -1159,22 +1159,27 @@ itself is never used as a repeatable tile.it errors when the pattern uses `patternTransform` or names a preset outsidethis enum.-### Native PPTX Table / Chart Markers (Opt-in)+### PowerPoint-Native Chart / Table Replacement Markers (Opt-in)Native PowerPoint tables and Excel-backed charts activate at export time only. The default chart/table route remains hand-authored SVG geometry so the deck stays pixel-stable across PowerPoint / Keynote / LibreOffice / WPS.**Authoring — markers are standard on supported data charts and text-grid tables**: Executor writes the marker at draw time on every data chart whose type falls in the supported set and on every pure text-grid data table ([executor-base.md §3.2](executor-base.md)), so any deck can later form native objects without regeneration. Canonical rectangular merged text cells may use the narrow `row_span` / `col_span` contract below; graphical cells stay unmarked on the SVG fallback route. The marker group supplies both: visible SVG fallback children for browser/live-preview rendering, and JSON metadata for `svg_to_pptx` native export.-**Hard rule — activation is the opt-in, dormant unless exported with `--native-objects`**: A marker only declares that a group is eligible for native export. Normal `svg_to_pptx.py` runs keep the fallback SVG children. Pass `--native-objects` only when editability in PowerPoint matters more than cross-renderer layout fidelity: it emits the PowerPoint object and skips the fallback children to avoid duplicates. Native styling preserves the core palette, text, axis, grid, and background colors where possible, but it is still a PowerPoint chart/table object rather than a pixel-identical SVG drawing.+**Hard rule — activation is the opt-in, dormant unless exported with `--native-charts-and-tables`**: A marker only declares that a group is eligible for PowerPoint-native Chart/Table replacement. Normal `svg_to_pptx.py` runs keep the fallback SVG children and convert them into independently editable DrawingML shapes. Pass `--native-charts-and-tables` only when the data source and chart/table-specific object model matter more than cross-renderer layout fidelity: it emits the PowerPoint Chart/Table object and skips the fallback children to avoid duplicates. Native styling preserves the core palette, text, axis, grid, and background colors where possible, but it is still a PowerPoint Chart/Table object rather than a pixel-identical SVG drawing.-The native route is deliberately editable-first and may be lossy: marker-local labels, callouts, KPIs, guide lines, custom split/bin semantics, or styling that is absent from the payload may disappear or normalize. Export warns about this route-level risk and any narrower issue it can detect. Loss of visual parity is not grounds to remove an active marker that the emitter can otherwise convert; use the default SVG-fallback export when exact authored artwork matters more than editability.+The native route is deliberately data-object-first and may be lossy: marker-local labels, callouts, KPIs, guide lines, custom split/bin semantics, or styling that is absent from the payload may disappear or normalize. Export warns about this route-level risk and any narrower issue it can detect. Loss of visual parity is not grounds to remove an active marker that the emitter can otherwise convert; use the default SVG-fallback export when exact authored artwork matters more than a native data source and object-specific controls.-| Marker | Native output | Required metadata |+| Replacement marker | Native output | Required metadata ||---|---|---|-| `<g data-pptx-native="table">` | `<p:graphicFrame>` with `<a:tbl>` | bounds + `columns` or `rows` |-| `<g data-pptx-native="chart">` | `<p:graphicFrame>` with `c:chart` / `cx:chart` + chart part + embedded workbook | bounds + `type`, plus chart data |+| `<g data-pptx-replace-with="table">` | `<p:graphicFrame>` with `<a:tbl>` | bounds + `columns` or `rows` |+| `<g data-pptx-replace-with="chart">` | `<p:graphicFrame>` with `c:chart` / `cx:chart` + chart part + embedded workbook | bounds + `type`, plus chart data |-**Metadata placement**: Put JSON in a child `<metadata data-pptx-native="...">`. Attribute JSON (`data-pptx-json="..."`) is supported but harder to XML-escape correctly.+**Metadata placement**: Put JSON in one child+`<metadata type="application/json">`. The parent group's+`data-pptx-replace-with` value selects the table or chart schema, so the+metadata child does not repeat an object-kind attribute. Attribute JSON+(`data-pptx-json="..."`) remains read-compatible but is harder to XML-escape+correctly and is not canonical authoring.**Bounds**: Provide `x`, `y`, `width`, and `height` in metadata, or as`data-pptx-x` / `data-pptx-y` / `data-pptx-width` / `data-pptx-height` on the@@ -1187,7 +1192,7 @@ inside PowerPoint's 32-bit DrawingML coordinate range; `width` and `height`must resolve to at least one EMU. Native table frames must additionally resolveto at least one EMU per resolved row and column.-**Validation**: `svg_quality_checker.py` validates native marker kind, JSON+**Validation**: `svg_quality_checker.py` validates replacement marker kind, JSONmetadata, bounds/fallback availability, table rows/columns, supported charttype, chart data shape, and any imported fallback baseline before export.@@ -1196,8 +1201,8 @@ by `pptx_to_svg.py` carry `data-pptx-fallback-sha256`, a canonical hash of themarker fallback plus reachable document-level SVG fragment definitions. Editinggeometry/text/paint, switching a local `url(#...)` or `href="#..."` target,changing a reachable definition, or changing the marker transform makes the-native metadata stale. The mandatory quality checker warns and the default route-keeps the edited SVG; `--native-objects` hard-fails before replacement so it+replacement metadata stale. The mandatory quality checker warns and the default route+keeps the edited SVG; `--native-charts-and-tables` hard-fails before replacement so itcannot discard that edit. Metadata/title/description nodes, `data-pptx-*`runtime attributes, marker-local stable ID renames, and marker-local`display:none` subtrees are excluded. `visibility:hidden` content,@@ -1208,23 +1213,42 @@ Hashless legacy markers remain native-compatible and warn in the checker/nativeroute that stale detection is unavailable. A stale hash is an integrity mismatch,not a visual-parity gate on an unchanged active marker.-**Hard rule — imported visual/route status**: A PPTX chart with a complete baked preview-may carry `data-pptx-visual-status="source-preview"`. Supported parsed classic-families without a preview use a deterministic readable fallback marked-`data-pptx-visual-status="normalized"`; it is explicitly not source-exact.-When no current renderer exists, the importer emits its typed reconstruction aid with both-`data-pptx-visual-status="placeholder"` and-`data-pptx-route-status="reconstruction-only"`. The valid pair is diagnostic:-quality checking and export warn, default export keeps the placeholder, and-`--native-objects` may reconstruct an editable chart when the same group has a-valid active `data-pptx-native="chart"` payload. The allowed values and pair-remain closed; unknown, whitespace-padded, or contradictory values fail.-`data-pptx-native` and `data-pptx-native-status` are mutually exclusive on the-same visible group.+**Hard rule — imported fallback kind**: A PPTX chart with a complete baked+preview may carry `data-pptx-fallback-kind="source-preview"`. Supported parsed+classic families without a preview use a deterministic readable fallback+marked `data-pptx-fallback-kind="normalized"`; it is explicitly not+source-exact. When no current renderer exists, the importer emits its typed+reconstruction aid with `data-pptx-fallback-kind="placeholder"`. That value+alone records the diagnostic reconstruction-only fallback: quality checking+and export warn, default export keeps the placeholder, and+`--native-charts-and-tables` may reconstruct a PowerPoint-native chart when the same+group has a valid active `data-pptx-replace-with="chart"` payload. The allowed+values remain closed; unknown, whitespace-padded, or contradictory values fail.+`data-pptx-replacement-status` records the closed reason code when imported+content has a complete visual fallback but cannot make an active replacement+claim. It and `data-pptx-replace-with` are mutually exclusive on the same+visible group.++**Imported replacement provenance**: A table/chart group created by+`pptx_to_svg.py` under this contract—whether it has an active replacement claim+or a fallback-only status—carries `data-pptx-import-source="pptx"`. This records+provenance for the imported-style normalization path; it does not identify the+replacement kind, and generated authoring omits it.++**Legacy read compatibility**: The converter and checker continue to read+`data-pptx-native`, `data-pptx-native-status`, `data-pptx-native-source`, and+`data-pptx-visual-status`. The legacy pair+`data-pptx-visual-status="placeholder"` plus+`data-pptx-route-status="reconstruction-only"` maps to canonical+`data-pptx-fallback-kind="placeholder"`; canonical authoring has no route-status+attribute. `--native-objects` remains a compatibility alias for+`--native-charts-and-tables`. New generated SVG and documented commands MUST+use the canonical spellings. If a legacy and canonical attribute are both+present, they must resolve to the same value; a conflict fails validation.```xml-<g id="p03-revenue-chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+<g id="p03-revenue-chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"x": 120, "y": 150, "width": 520, "height": 320,"type": "column",@@ -1281,7 +1305,7 @@ has no explicit table font, use the deck body family and locked body size from**Hard rule — table metadata is the native source of truth**: Every row,summary line, value, and cell-level style that must survive-`--native-objects` must be present in `columns` / `rows`. SVG fallback text is+`--native-charts-and-tables` must be present in `columns` / `rows`. SVG fallback text isdiscarded during native export. `svg_quality_checker.py` warns when visiblefallback `<text>` inside a native table marker does not appear in metadata.For numeric or currency columns, use cell objects with `align: "r"`; SVG@@ -1385,8 +1409,8 @@ becomes the second rich-text line of that classic chart title. `title`,`subtitle`, and axis-title values may be strings or objects with `text`,`font_size`, `font_family`, and `color` when the fallback uses local roletypography. `svg_quality_checker.py` rejects `title`, `subtitle`, or axis-title-metadata whose text is not visible inside the native marker's fallback. Direct-`--native-objects` export keeps the chart native but omits that inconsistent+metadata whose text is not visible inside the replacement marker's fallback. Direct+`--native-charts-and-tables` export keeps the chart native but omits that inconsistentchrome with a warning. chartEx keeps PowerPoint's empty `<cx:title>` and emitsthe title / subtitle as companion editable text boxes until chartEx rich titlesare validated. Axis@@ -1450,7 +1474,7 @@ order. Use either `series` with four entries, or top-level `open`, `high`,stock charts with shared numeric date caches, `hiLowLines`, and `upDownBars`.Safe stock series style may pass the structural gate, but stock series,`hiLowLines`, and up-down bar local styling can still normalize under the-editable-first contract. HLC, volume, noncanonical structure, and style XML+data-object-first contract. HLC, volume, noncanonical structure, and style XMLoutside the safe parsing boundary stay fallback-only.**PPTX chart-import boundary**: The importer recognizes conservative classic@@ -1504,7 +1528,7 @@ cylinder, pyramid variants, and `surface`) are unsupported.Native legends are opt-in through `show_legend: true`; `legend_position`defaults to `bottom` and accepts `top`, `left`, or `right`.-**Forbidden — native marker transforms**: Do not rotate, skew, or matrix-transform native table/chart marker groups. Translate / scale is accepted; complex transforms fail export because PowerPoint native table/chart frames do not preserve arbitrary SVG transforms.+**Forbidden — replacement marker transforms**: Do not rotate, skew, or matrix-transform table/chart replacement groups. Translate / scale is accepted; complex transforms fail export because PowerPoint-native table/chart frames do not preserve arbitrary SVG transforms.### PPTX Structure Routing@@ -1596,7 +1620,7 @@ and visible-stroke rects also remain ordinary objects.| `title`, `subtitle`, `body` | one `<text data-pptx-placeholder-carrier="true">` | `title`, `subTitle`, `body` || `date`, `footer`, `slide-number` | one `<text data-pptx-placeholder-carrier="true">` | `dt`, `ftr`, `sldNum` || `picture` | one `<image>` or supported imported crop `<svg>`, marked as carrier | `pic` |-| `chart`, `table` | one matching `data-pptx-native` marker group, marked as carrier | `chart`, `tbl` |+| `chart`, `table` | one matching `data-pptx-replace-with` marker group, marked as carrier | `chart`, `tbl` || `object` | one text, image, or basic SVG shape marked as carrier; alternatively the slot group declares `binding="proxy"` | `obj` || `media` | one `<image>` or supported imported crop `<svg>`, marked as carrier | `media` |@@ -1650,7 +1674,7 @@ generated OOXML must be identical within the affected master/layout group.Static structure may carry shapes, text, or images; non-image/external relationships are rejected. Every static object is atomic; a `<g data-pptx-layer="master|layout">` is forbidden. A full-canvas first rect may be marked as a Master or Layout background.**Native object slot carriers**: `chart` / `table` slots require-`--native-objects`; fallback groups contain several shapes and cannot map to one+`--native-charts-and-tables`; fallback groups contain several shapes and cannot map to onePowerPoint placeholder. `object` is the generic PowerPoint content slot anduses either one carrier object or the explicit composite proxy downgrade. `media` currently bindsan authored image/crop to a native `media` placeholder; it does not synthesizediff --git a/skills/ppt-master/references/template-designer.md b/skills/ppt-master/references/template-designer.mdindex c97132a3..8eb11c72 100644--- a/skills/ppt-master/references/template-designer.md+++ b/skills/ppt-master/references/template-designer.md@@ -287,8 +287,8 @@ template.projection. If an imported object cannot use the converter's supported nativemetadata after normalization, keep its current SVG fallback and report thelimitation. `standard` / `fidelity` regenerate compact canonical shapes instead-of transplanting opaque source payload. `data-pptx-native` remains reserved for-native chart/table markers.+of transplanting opaque source payload. `data-pptx-replace-with` remains+reserved for optional PowerPoint-native Chart/Table replacement markers.**Explicit template SVG contract**:diff --git a/skills/ppt-master/scripts/README.md b/skills/ppt-master/scripts/README.mdindex f8bba05d..b09b9dbe 100644--- a/skills/ppt-master/scripts/README.md+++ b/skills/ppt-master/scripts/README.md@@ -156,13 +156,13 @@ Template `page_layouts` records authoring-input provenance, `pptx_masters` / `ppLegacy structured/template contracts using `baseline`, `template`, `preserve`, `layout_strategy`, `data-pptx-layout-kind`, `distilled`/`utility`, direct atomic placeholders, or incomplete root Master identity must run [`restore-pptx-structure`](../workflows/restore-pptx-structure.md) before release export. Explicit flat free-design/brand-only projects intentionally omit root Master identity.-`pptx_to_svg.py` annotates verified text-grid tables and conservative chart data with `data-pptx-native` metadata. Table import covers exact physical row/grid topology, canonical rectangular merges, safe solid/no-fill per-side borders, plain multi-paragraph cells, and a closed run-rich paragraph schema. Each rich run requires `text` and may use only `bold`, `italic`, `underline`, `strike`, `color`, `font_size`, one `font_family`, `lang`, and `alt_lang`. A merge must use the exact `rowSpan` / `gridSpan` / `hMerge` / `vMerge` physical topology with empty merge slaves. Presentation-only source run XML normalizes, while relationship-bearing text, extensions, line breaks, fields, tabs, bullets, broken text topology, unsafe border XML, non-solid fills, and other merge encodings remain fallback-only. For table style `{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}`, the normalized SVG fallback resolves `wholeTbl`, `firstRow`, horizontal banding, theme colors/fonts, and direct cell/run overrides; other built-in/custom style families are not implied.+`pptx_to_svg.py` annotates verified text-grid tables and conservative chart data with `data-pptx-replace-with` beside the visible SVG fallback and places the payload in `<metadata type="application/json">`; the parent claim selects the chart or table schema. Imported table/chart groups under this contract carry `data-pptx-import-source="pptx"`, whether active or fallback-only. Table import covers exact physical row/grid topology, canonical rectangular merges, safe solid/no-fill per-side borders, plain multi-paragraph cells, and a closed run-rich paragraph schema. Each rich run requires `text` and may use only `bold`, `italic`, `underline`, `strike`, `color`, `font_size`, one `font_family`, `lang`, and `alt_lang`. A merge must use the exact `rowSpan` / `gridSpan` / `hMerge` / `vMerge` physical topology with empty merge slaves. Presentation-only source run XML normalizes, while relationship-bearing text, extensions, line breaks, fields, tabs, bullets, broken text topology, unsafe border XML, non-solid fills, and other merge encodings remain fallback-only. For table style `{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}`, the normalized SVG fallback resolves `wholeTbl`, `firstRow`, horizontal banding, theme colors/fonts, and direct cell/run overrides; other built-in/custom style families are not implied.-Supported parsed column/bar/line/area, pie/doughnut, scatter, and bubble charts without a baked preview receive a deterministic readable fallback marked `data-pptx-visual-status="normalized"`. The importer additionally activates verified column/line/area combo charts, canonical OHLC stock charts, area charts with numeric date axes, verified scatter/bubble charts whose two value axes fit the closed `axes.x` / `axes.y` contract, radar charts, safe `of_pie` `serLines`, axis/title/legend normalization, and validated bar/column gap/overlap cases. Combo plots may retain independent primary/secondary category caches and workbook ranges. Both the category/value and XY contracts retain kind/position/visibility/label position/number format/min/max/major unit/reverse/major gridlines for native read-back. Scatter import derives effective `scatter_style` from uniform per-series line/marker/smooth state. The normalized XY fallback consumes only the two major-gridline flags; the C4/C5 additions do not expand the normalized renderer. `gapWidth` is accepted only as an integer in `0..500` and `overlap` only as an integer in `-100..100`; both normalize in native output, while malformed or out-of-range values fail closed. Safe common series paint forms and theme scheme colors are resolved; unknown series paint/style XML outside the explicit normalization boundaries still fails closed. Safe stock series style may pass the structural gate, but stock series, `hiLowLines`, and up-down bar local styling can still normalize under the editable-first contract. The editable native replacement remains allowed to normalize unmodeled no-fill/alpha/line/marker details and reports the route-level loss risk. Chart title/legend/axis titles and supported data-label flags are retained when the current schema can represent them. Fallback-only objects keep rendered SVG content or a baked chart preview and carry `data-pptx-native-status`, which validation and `--native-objects` export report as a warning. An active marker without a renderer keeps `data-pptx-visual-status="placeholder"` plus `data-pptx-route-status="reconstruction-only"`; default export keeps the placeholder and native opt-in may still reconstruct it.+Supported parsed column/bar/line/area, pie/doughnut, scatter, and bubble charts without a baked preview receive a deterministic readable fallback marked `data-pptx-fallback-kind="normalized"`. The importer additionally activates verified column/line/area combo charts, canonical OHLC stock charts, area charts with numeric date axes, verified scatter/bubble charts whose two value axes fit the closed `axes.x` / `axes.y` contract, radar charts, safe `of_pie` `serLines`, axis/title/legend normalization, and validated bar/column gap/overlap cases. Combo plots may retain independent primary/secondary category caches and workbook ranges. Both the category/value and XY contracts retain kind/position/visibility/label position/number format/min/max/major unit/reverse/major gridlines for native read-back. Scatter import derives effective `scatter_style` from uniform per-series line/marker/smooth state. The normalized XY fallback consumes only the two major-gridline flags; the C4/C5 additions do not expand the normalized renderer. `gapWidth` is accepted only as an integer in `0..500` and `overlap` only as an integer in `-100..100`; both normalize in native output, while malformed or out-of-range values fail closed. Safe common series paint forms and theme scheme colors are resolved; unknown series paint/style XML outside the explicit normalization boundaries still fails closed. Safe stock series style may pass the structural gate, but stock series, `hiLowLines`, and up-down bar local styling can still normalize under the data-object-first contract. The PowerPoint-native replacement remains allowed to normalize unmodeled no-fill/alpha/line/marker details and reports the route-level loss risk. Chart title/legend/axis titles and supported data-label flags are retained when the current schema can represent them. Fallback-only objects keep rendered SVG content or a baked chart preview and carry `data-pptx-replacement-status`, which validation and `--native-charts-and-tables` export report as a warning. An active marker without a renderer keeps `data-pptx-fallback-kind="placeholder"`; default export keeps the reconstruction-only placeholder and the native Chart/Table opt-in may still reconstruct it.The ChartEx importer accepts exactly the validated treemap, sunburst, histogram, pareto, box-whisker, waterfall, and funnel data models. Supported hierarchy/category/value/series/subtotal data round-trips to native output; source style, axes, labels, and binning may normalize. Numeric caches must be non-empty and finite with exact contiguous point topology. This is not arbitrary ChartEx import or presentation fidelity, and the ChartEx native writer still only promises valid payload palette entries rather than full source styling.-Active imported table/chart markers carry `data-pptx-fallback-sha256`. Visible fallback edits, reachable SVG fragment-definition changes, marker-local reference-target changes, and marker transforms make the baseline stale: the mandatory quality checker warns, default export remains available, and `--native-objects` fails instead of discarding the SVG edit. Legacy markers without a baseline remain convertible with a checker/native-route warning.+Active imported table/chart markers carry `data-pptx-fallback-sha256`. Visible fallback edits, reachable SVG fragment-definition changes, marker-local reference-target changes, and marker transforms make the baseline stale: the mandatory quality checker warns, default export remains available, and `--native-charts-and-tables` fails instead of discarding the SVG edit. Legacy markers without a baseline remain convertible with a checker/replacement-route warning. Legacy `data-pptx-native*`, `data-pptx-visual-status`, and `data-pptx-route-status` spellings and the `--native-objects` option remain read-compatible; generated output and canonical commands use the replacement/fallback names and `--native-charts-and-tables`.Exporter-canonical classic charts also recover canonical solid series/slicecolors and exact one- or two-paragraph title styling; two paragraphs retaindiff --git a/skills/ppt-master/scripts/docs/conversion.md b/skills/ppt-master/scripts/docs/conversion.mdindex f1b5c204..975f0365 100644--- a/skills/ppt-master/scripts/docs/conversion.md+++ b/skills/ppt-master/scripts/docs/conversion.md@@ -246,8 +246,10 @@ python3 scripts/pptx_to_svg.py deck.pptx --inheritance-mode flat| `layered` | Only the layered `svg/` view and inheritance metadata || `flat` | One self-contained slide SVG per page under `svg/` |-Supported text-grid tables and conservative classic-chart caches carry-`data-pptx-native` metadata beside their SVG fallback. Table import requires+Supported text-grid tables and conservative classic-chart caches carry a+`data-pptx-replace-with` claim beside their SVG fallback, with the replacement+payload in a child `<metadata type="application/json">`. The parent claim+selects the table or chart schema. Table import requiresexact physical row/grid topology and accepts canonical rectangular merges,safe solid/no-fill per-side borders, plain multi-paragraph cells, and a closedrun-rich paragraph schema.@@ -258,15 +260,18 @@ extensions, noncanonical/overlapping merges, nonblank merge slaves, unsafeborder XML, non-solid fills, structural line breaks/fields/tabs/bullets, andbroken text topology remain fallback-only.Markers remain dormant-unless a later export uses `--native-objects`. That opt-in is editable-first:-it may normalize styling or omit marker-local details not represented by the+unless a later export uses `--native-charts-and-tables`. That opt-in is+data-object-first: the default fallback still exports as editable DrawingML+shapes, while the opt-in supplies a data source and PowerPoint's+chart/table-specific object model.+The native-object route may normalize styling or omit marker-local details not represented by thepayload, and export reports that risk without disabling an otherwise supportedactive marker. Unsupported tables keep theirrendered SVG table; unsupported charts keep a baked preview when one exists.For the currently supported parsed classic families (column/bar/line/area,pie/doughnut, scatter, and bubble), a chart without a baked preview receives adeterministic readable fallback marked-`data-pptx-visual-status="normalized"`. Unknown style XML still fails closed;+`data-pptx-fallback-kind="normalized"`. Unknown style XML still fails closed;common solid/no-fill/line/marker forms and scheme colors are normalized for theSVG fallback and core payload colors, while native opt-in may still normalizeunmodeled alpha, line, marker, or no-fill details. Common General, decimal,@@ -274,21 +279,22 @@ grouped, percent, and simple currency-prefix data-label formats renderdeterministically; an unknown Excel format program keeps the active payload butdoes not claim a normalized fallback. Active types outside the current renderercontinue to use an explicit placeholder marked-`data-pptx-visual-status="placeholder"` and-`data-pptx-route-status="reconstruction-only"`. Validation and export report-that route as a warning. Default export keeps the placeholder; when the same-group has a valid active native-chart payload, `--native-objects` may still-reconstruct the editable chart. Invalid or contradictory status declarations-remain errors.-Fallback-only native capability uses `data-pptx-native-status` and remains a-warning when the SVG fallback itself is complete.+`data-pptx-fallback-kind="placeholder"`. Validation and export report that+reconstruction-only fallback as a warning. Default export keeps the+placeholder; when the same group has a valid active chart replacement payload,+`--native-charts-and-tables` may still reconstruct the PowerPoint-native chart.+Invalid or contradictory fallback declarations remain errors. Fallback-only+replacement capability uses `data-pptx-replacement-status` and remains a+warning when the SVG fallback itself is complete. Imported table/chart groups+under this contract carry `data-pptx-import-source="pptx"`, whether active or+fallback-only; generated authoring omits this provenance attribute.Active imported markers also carry `data-pptx-fallback-sha256`, computed overtheir canonical fallback plus reachable document-level SVG fragment definitions.A later visible edit, reachable definition change, local reference-target-change, or marker transform makes the native metadata stale. The mandatory+change, or marker transform makes the replacement metadata stale. The mandatoryquality checker reports the mismatch; default export keeps the edited fallback,-while `--native-objects` fails before replacement so it cannot discard that edit.+while `--native-charts-and-tables` fails before replacement so it cannot discard that edit.`visibility:hidden` content, marker-local unused definitions, and explicitlyreferenced document-level target roots (even when hidden) are includedconservatively; marker-local `display:none` subtrees are excluded, and external@@ -296,6 +302,12 @@ file bytes are not read.A legacy marker without the hash remains native-compatible and warns in thechecker/native route that stale detection is unavailable.+Legacy `data-pptx-native*`, `data-pptx-visual-status`, and+`data-pptx-route-status` spellings remain read-compatible. New importer output+and generated SVG use the replacement/fallback names above. The old+`--native-objects` option remains a compatibility alias for+`--native-charts-and-tables`.+For table style `{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}`, the importer resolvesthe normalized `wholeTbl`, `firstRow`, `band1H`/`band2H`, theme color/font, anddirect-format override subset. Other built-in/custom style families remain@@ -319,7 +331,7 @@ out-of-range values fail closed. These additions do not expand the normalizedrenderer.Safe stock series style may pass the structural gate, while stock series,`hiLowLines`, and up-down bar local styling can still normalize under the-editable-first contract.+data-object-first contract.ChartEx import accepts exactly the validated treemap, sunburst, histogram,pareto, box-whisker, waterfall, and funnel data models. Their supportedhierarchy/category/value/series/subtotal topology round-trips to native output.diff --git a/skills/ppt-master/scripts/docs/svg-pipeline.md b/skills/ppt-master/scripts/docs/svg-pipeline.mdindex 9eec546a..8d692bcd 100644--- a/skills/ppt-master/scripts/docs/svg-pipeline.md+++ b/skills/ppt-master/scripts/docs/svg-pipeline.md@@ -65,7 +65,7 @@ Convert project SVGs into PPTX.```bashpython3 scripts/svg_to_pptx.py <project_path>-python3 scripts/svg_to_pptx.py <project_path> --native-objects+python3 scripts/svg_to_pptx.py <project_path> --native-charts-and-tablespython3 scripts/svg_to_pptx.py <project_path> --pptx-structure structured # deck/layout template overridepython3 scripts/svg_to_pptx.py <project_path> --pptx-structure flat # free-design/brand-only override# Template-import visual round-trip diagnostic only:diff --git a/skills/ppt-master/scripts/pptx_to_svg.py b/skills/ppt-master/scripts/pptx_to_svg.pyindex 54f84144..98679313 100644--- a/skills/ppt-master/scripts/pptx_to_svg.py+++ b/skills/ppt-master/scripts/pptx_to_svg.py@@ -48,7 +48,11 @@ def _reconstruction_only_graphics(result: object) -> list[tuple[int, str]]:except ET.ParseError:continuefor elem in root.iter():- if elem.get("data-pptx-route-status") != "reconstruction-only":+ fallback_kind = (+ elem.get("data-pptx-fallback-kind")+ or elem.get("data-pptx-visual-status")+ )+ if fallback_kind != "placeholder":continuemarker_id = elem.get("id") or elem.get("data-name") or "<unnamed>"diagnostics.append((artifact.index, marker_id))@@ -133,7 +137,8 @@ def main() -> int:print("Warning: chart placeholder(s) without a baked preview are ""reconstruction-only. Default export keeps the placeholder; "- "--native-objects may reconstruct entries with a valid active marker:",+ "--native-charts-and-tables may reconstruct entries with a valid "+ "replacement marker:",file=sys.stderr,)for slide_index, marker_id in reconstruction_only[:20]:diff --git a/skills/ppt-master/scripts/pptx_to_svg/chart_to_svg.py b/skills/ppt-master/scripts/pptx_to_svg/chart_to_svg.pyindex 05646f7d..e2568b1f 100644--- a/skills/ppt-master/scripts/pptx_to_svg/chart_to_svg.py+++ b/skills/ppt-master/scripts/pptx_to_svg/chart_to_svg.py@@ -1,8 +1,8 @@-"""Extract editable native chart metadata from PPTX chart parts.+"""Extract native Chart replacement metadata from PPTX chart parts.The visual chart preview still comes from the existing graphicFrame fallback.-This module only builds a conservative ``data-pptx-native="chart"`` payload-when the chart XML cache can be mapped to the current native chart schema.+This module only builds a conservative ``data-pptx-replace-with="chart"``+payload when the chart XML cache can be mapped to the current chart schema."""from __future__ import annotationsdiff --git a/skills/ppt-master/scripts/pptx_to_svg/chartex_to_svg.py b/skills/ppt-master/scripts/pptx_to_svg/chartex_to_svg.pyindex 4356f9a0..669028d9 100644--- a/skills/ppt-master/scripts/pptx_to_svg/chartex_to_svg.py+++ b/skills/ppt-master/scripts/pptx_to_svg/chartex_to_svg.py@@ -51,8 +51,9 @@ def extract_native_chartex_payload() -> dict[str, Any]:"""Return a writer-valid payload for one supported ChartEx reference.- ``UnsupportedChartEx.status`` is suitable for ``data-pptx-native-status``- when the reference, relationship, data topology, or cache is unusable.+ ``UnsupportedChartEx.status`` is suitable for+ ``data-pptx-replacement-status`` when the reference, relationship, data+ topology, or cache is unusable.Style-part failures never reject an otherwise valid data payload."""if graphic_data is None:diff --git a/skills/ppt-master/scripts/pptx_to_svg/slide_to_svg.py b/skills/ppt-master/scripts/pptx_to_svg/slide_to_svg.pyindex 2cbb5270..76ba03be 100644--- a/skills/ppt-master/scripts/pptx_to_svg/slide_to_svg.py+++ b/skills/ppt-master/scripts/pptx_to_svg/slide_to_svg.py@@ -714,26 +714,43 @@ def _convert_graphic_fallback(node: ShapeNode, ctx: AssemblyContext,uri = graphic_data.attrib.get("uri", "graphicFrame") if graphic_data is not None else "graphicFrame"if uri == "http://schemas.openxmlformats.org/drawingml/2006/table":- rendered, native_attrs = _render_graphic_table(node, ctx, graphic_data)+ rendered, replacement_attrs, payload_metadata = _render_graphic_table(+ node,+ ctx,+ graphic_data,+ )if rendered:+ inner = (+ f"{payload_metadata}\n{rendered}"+ if payload_metadata+ else rendered+ )return _wrap_shape_group(- rendered,+ inner,node,ctx,top_level=top_level,- extra_attrs=native_attrs,+ extra_attrs=replacement_attrs,)- chart_native_attrs: list[str] = []+ chart_replacement_attrs: list[str] = []+ chart_payload_metadata = ""if uri in {CHART_URI, CHARTEX_URI}:- rendered, chart_native_attrs = _render_graphic_chart(node, ctx, graphic_data)+ rendered, chart_replacement_attrs, chart_payload_metadata = (+ _render_graphic_chart(node, ctx, graphic_data)+ )if rendered:+ inner = (+ f"{chart_payload_metadata}\n{rendered}"+ if chart_payload_metadata+ else rendered+ )return _wrap_shape_group(- rendered,+ inner,node,ctx,top_level=top_level,- extra_attrs=chart_native_attrs,+ extra_attrs=chart_replacement_attrs,)if uri == "http://schemas.openxmlformats.org/presentationml/2006/ole" and ctx.render_graphic_previews:@@ -758,8 +775,14 @@ def _convert_graphic_fallback(node: ShapeNode, ctx: AssemblyContext,f'text-anchor="middle" font-size="14" fill="#999999">'f"[{_xml_escape(label)}]</text>")+ if chart_payload_metadata:+ placeholder = f"{chart_payload_metadata}\n{placeholder}"return _wrap_shape_group(- placeholder, node, ctx, top_level=top_level, extra_attrs=chart_native_attrs,+ placeholder,+ node,+ ctx,+ top_level=top_level,+ extra_attrs=chart_replacement_attrs,)@@ -773,17 +796,30 @@ def _graphic_preview_label(node: ShapeNode, label: str) -> str:)+def _replacement_payload_metadata(payload: object) -> str:+ payload_json = json.dumps(+ payload,+ allow_nan=False,+ ensure_ascii=False,+ separators=(",", ":"),+ )+ return (+ '<metadata type="application/json">'+ f'{_xml_text_escape(payload_json)}</metadata>'+ )++def _render_graphic_table(node: ShapeNode,ctx: AssemblyContext,graphic_data: ET.Element | None,-) -> tuple[str, list[str]]:+) -> tuple[str, list[str], str]:"""Convert the <a:tbl> child of a graphicFrame to SVG plus metadata."""if graphic_data is None:- return "", []+ return "", [], ""tbl = graphic_data.find("a:tbl", NS)if tbl is None:- return "", []+ return "", [], ""table_styles_part = ctx.pkg.resolve_table_styles()result = convert_tbl(tbl, node.xfrm, ctx.palette,@@ -798,33 +834,27 @@ def _render_graphic_table()if result.defs:ctx.defs.extend(result.defs)- native_attrs: list[str] = ['data-pptx-native-source="pptx"']+ replacement_attrs: list[str] = ['data-pptx-import-source="pptx"']+ payload_metadata = ""if result.native_payload:if node.name and not result.native_payload.get("name"):result.native_payload["name"] = node.name- payload_json = json.dumps(- result.native_payload,- allow_nan=False,- ensure_ascii=False,- separators=(",", ":"),- )- native_attrs.extend([- 'data-pptx-native="table"',- f'data-pptx-json="{_xml_escape(payload_json)}"',- ])+ payload_metadata = _replacement_payload_metadata(result.native_payload)+ replacement_attrs.append('data-pptx-replace-with="table"')elif result.native_status:- native_attrs.append(- f'data-pptx-native-status="{_xml_escape(result.native_status)}"'+ replacement_attrs.append(+ 'data-pptx-replacement-status="'+ f'{_xml_escape(result.native_status)}"')- return result.svg, native_attrs+ return result.svg, replacement_attrs, payload_metadatadef _render_graphic_chart(node: ShapeNode,ctx: AssemblyContext,graphic_data: ET.Element | None,-) -> tuple[str, list[str]]:- """Return a chart preview plus native chart marker attributes."""+) -> tuple[str, list[str], str]:+ """Return a chart fallback plus native Chart replacement metadata."""result = extract_native_chart_payload(graphic_data,node.xfrm,@@ -832,39 +862,30 @@ def _render_graphic_chart(ctx.pkg,ctx.palette,)- native_attrs: list[str] = ['data-pptx-native-source="pptx"']+ replacement_attrs: list[str] = ['data-pptx-import-source="pptx"']+ payload_metadata = ""if result.native_payload:if node.name and not result.native_payload.get("name"):result.native_payload["name"] = node.name- payload_json = json.dumps(- result.native_payload,- allow_nan=False,- ensure_ascii=False,- separators=(",", ":"),- )- native_attrs.extend([- 'data-pptx-native="chart"',- f'data-pptx-json="{_xml_escape(payload_json)}"',- ])+ payload_metadata = _replacement_payload_metadata(result.native_payload)+ replacement_attrs.append('data-pptx-replace-with="chart"')elif result.native_status:- native_attrs.append(- f'data-pptx-native-status="{_xml_escape(result.native_status)}"'+ replacement_attrs.append(+ 'data-pptx-replacement-status="'+ f'{_xml_escape(result.native_status)}"')rendered = ""if ctx.render_graphic_previews:rendered = _render_graphic_preview(node, ctx)if rendered:- native_attrs.append('data-pptx-visual-status="source-preview"')+ replacement_attrs.append('data-pptx-fallback-kind="source-preview"')elif result.normalized_svg:rendered = result.normalized_svg- native_attrs.append('data-pptx-visual-status="normalized"')+ replacement_attrs.append('data-pptx-fallback-kind="normalized"')else:- native_attrs.extend([- 'data-pptx-visual-status="placeholder"',- 'data-pptx-route-status="reconstruction-only"',- ])- return rendered, native_attrs+ replacement_attrs.append('data-pptx-fallback-kind="placeholder"')+ return rendered, replacement_attrs, payload_metadatadef _render_graphic_preview(node: ShapeNode, ctx: AssemblyContext) -> str:@@ -1145,7 +1166,7 @@ def _wrap_shape_group(if extra_attrs:attrs.extend(extra_attrs)if any(- attribute.split("=", 1)[0] == "data-pptx-native"+ attribute.split("=", 1)[0] == "data-pptx-replace-with"for attribute in extra_attrs):fallback_hash = svg_native_fallback_markup_fingerprint(@@ -1250,7 +1271,10 @@ def _connector_metadata(node: ShapeNode, scope: str) -> dict[str, str]:def _xml_escape(text: str) -> str:+ return _xml_text_escape(text).replace('"', """)+++def _xml_text_escape(text: str) -> str:return (text.replace("&", "&").replace("<", "<")- .replace(">", ">")- .replace('"', """))+ .replace(">", ">"))diff --git a/skills/ppt-master/scripts/pptx_to_svg/tbl_to_svg.py b/skills/ppt-master/scripts/pptx_to_svg/tbl_to_svg.pyindex 5ddedb84..e59ccc53 100644--- a/skills/ppt-master/scripts/pptx_to_svg/tbl_to_svg.py+++ b/skills/ppt-master/scripts/pptx_to_svg/tbl_to_svg.py@@ -1141,7 +1141,7 @@ def _native_table_payload(palette: ColorPalette | None,theme_fonts: dict[str, str],) -> dict[str, Any]:- """Build the SVG data-pptx-native payload for an unmerged table."""+ """Build the SVG native Table replacement payload for an unmerged table."""tbl_pr = tbl.find("a:tblPr", NS)payload: dict[str, Any] = {"x": _round_payload_number(xfrm.x),diff --git a/skills/ppt-master/scripts/project_manager.py b/skills/ppt-master/scripts/project_manager.pyindex 1fd744dd..672f06f7 100644--- a/skills/ppt-master/scripts/project_manager.py+++ b/skills/ppt-master/scripts/project_manager.py@@ -175,7 +175,7 @@ class ProjectManager:"- `live_preview/`: browser preview runtime files and history (lock.json, server.log, edits.jsonl, annotations.jsonl)\n""- `sources/`: source materials and normalized markdown\n""- `analysis/`: machine-extracted intermediate analysis (PPTX intake, image_analysis.csv) — the pipeline's canonical must-read source/asset facts\n"- "- `exports/`: native DrawingML pptx (timestamped); `_native_charts.pptx` name with `--native-objects`, `_narrated.pptx` name when narration audio is embedded\n"+ "- `exports/`: native DrawingML pptx (timestamped); `_native_charts_tables.pptx` name with `--native-charts-and-tables`, `_narrated.pptx` name when narration audio is embedded\n""- `backup/<timestamp>/`: svg_output/ archive (always written in default-flow mode; safe to delete old timestamps)\n"),encoding="utf-8",diff --git a/skills/ppt-master/scripts/svg_quality_checker.py b/skills/ppt-master/scripts/svg_quality_checker.pyindex 5bbb9e0c..acce6902 100644--- a/skills/ppt-master/scripts/svg_quality_checker.py+++ b/skills/ppt-master/scripts/svg_quality_checker.py@@ -211,6 +211,19 @@ try:except ImportError:_native_object_marker_warnings = None+try:+ from svg_to_pptx.native_objects import (+ native_fallback_kind as _native_fallback_kind,+ native_marker_legacy_warnings as _native_marker_legacy_warnings,+ native_replacement_kind as _native_replacement_kind,+ native_replacement_status as _native_replacement_status,+ )+except ImportError:+ _native_fallback_kind = None+ _native_marker_legacy_warnings = None+ _native_replacement_kind = None+ _native_replacement_status = None+try:from svg_to_pptx.native_objects.marker_status import (native_marker_release_block_reason as _native_marker_release_block_reason,@@ -2744,19 +2757,25 @@ class SVGQualityChecker:"""Validate opt-in native table/chart markers before PPTX export."""invalid_status_elements: set[ET.Element] = set()for elem in root.iter():+ marker_id = elem.get('id') or elem.get('data-name') or '<unnamed>'if elem.tag.rsplit('}', 1)[-1] == 'metadata':continuehas_status = any(elem.get(name) is not Nonefor name in (+ 'data-pptx-replace-with',+ 'data-pptx-native',+ 'data-pptx-fallback-kind','data-pptx-visual-status','data-pptx-route-status',+ 'data-pptx-replacement-status','data-pptx-native-status',+ 'data-pptx-import-source',+ 'data-pptx-native-source',))if not has_status:continue- marker_id = elem.get('id') or elem.get('data-name') or '<unnamed>'if (_native_marker_status_errors is Noneor _native_marker_release_block_reason is None@@ -2774,10 +2793,27 @@ class SVGQualityChecker:if status_errors:invalid_status_elements.add(elem)continue- if elem.get('data-pptx-route-status') == 'reconstruction-only':+ if _native_marker_legacy_warnings is not None:+ for warning in _native_marker_legacy_warnings(elem):+ result['warnings'].append(+ f"PPTX replacement marker {marker_id}: {warning}"+ )+ try:+ fallback_kind = (+ _native_fallback_kind(elem)+ if _native_fallback_kind is not None else None+ )+ replacement_kind = (+ _native_replacement_kind(elem)+ if _native_replacement_kind is not None else ''+ )+ except ValueError:+ # The shared status validator reported the alias conflict.+ continue+ if fallback_kind == 'placeholder':route = (- "--native-objects may reconstruct its active native marker"- if (elem.get('data-pptx-native') or '').strip()+ "the native Chart/Table route may reconstruct its active marker"+ if replacement_kindelse "default export keeps the visible placeholder")result['warnings'].append(@@ -2786,10 +2822,16 @@ class SVGQualityChecker:)for elem in root.iter():- status = elem.get('data-pptx-native-status')- if not status or elem.tag.rsplit('}', 1)[-1] == 'metadata':+ if elem.tag.rsplit('}', 1)[-1] == 'metadata':+ continue+ if _native_replacement_status is None or _native_replacement_kind is None:+ continue+ try:+ status = _native_replacement_status(elem)+ replacement_kind = _native_replacement_kind(elem)+ except ValueError:continue- if elem.get('data-pptx-native'):+ if not status or replacement_kind:continuemarker_id = elem.get('id') or elem.get('data-name') or '<unnamed>'result['warnings'].append(@@ -2799,16 +2841,17 @@ class SVGQualityChecker:markers = [elem for elem in root.iter()if (- elem.get('data-pptx-native')+ _native_replacement_kind is not Noneand elem.tag.rsplit('}', 1)[-1] != 'metadata'and elem not in invalid_status_elements+ and _native_replacement_kind(elem))]if not markers:returnif _validate_native_object_marker is None:result['warnings'].append(- "Detected data-pptx-native markers, but native-object validator "+ "Detected data-pptx-replace-with markers, but replacement validator ""could not be imported; export-time validation will still run.")return@@ -2819,6 +2862,18 @@ class SVGQualityChecker:for child in parent}+ def append_metadata_legacy_warnings(marker: ET.Element) -> None:+ if _native_marker_legacy_warnings is None:+ return+ marker_id = marker.get('id') or '<unnamed>'+ for child in marker:+ if child.tag.rsplit('}', 1)[-1] != 'metadata':+ continue+ for warning in _native_marker_legacy_warnings(child):+ result['warnings'].append(+ f"PPTX replacement marker {marker_id}: {warning}"+ )+for marker in markers:marker_id = marker.get('id') or '<unnamed>'ancestors = []@@ -2837,22 +2892,24 @@ class SVGQualityChecker:)except RuntimeError as exc:result['errors'].append(- f"Invalid data-pptx-native marker {marker_id}: {exc}"+ f"Invalid data-pptx-replace-with marker {marker_id}: {exc}")continuefor warning in warnings:result['warnings'].append(- f"data-pptx-native marker {marker_id}: {warning}"+ f"data-pptx-replace-with marker {marker_id}: {warning}")+ append_metadata_legacy_warnings(marker)continuetry:_validate_native_object_marker(marker, ancestors=ancestors_tuple)except RuntimeError as exc:result['errors'].append(- f"Invalid data-pptx-native marker {marker_id}: {exc}"+ f"Invalid data-pptx-replace-with marker {marker_id}: {exc}")continue+ append_metadata_legacy_warnings(marker)if _native_object_marker_warnings is None:continuefor warning in _native_object_marker_warnings(@@ -2861,7 +2918,7 @@ class SVGQualityChecker:document_root=root,):result['warnings'].append(- f"data-pptx-native marker {marker_id}: {warning}"+ f"data-pptx-replace-with marker {marker_id}: {warning}")def _check_pptx_structure_metadata(diff --git a/skills/ppt-master/scripts/svg_to_pptx/drawingml/context.py b/skills/ppt-master/scripts/svg_to_pptx/drawingml/context.pyindex 4d677e87..1b7cbc8b 100644--- a/skills/ppt-master/scripts/svg_to_pptx/drawingml/context.py+++ b/skills/ppt-master/scripts/svg_to_pptx/drawingml/context.py@@ -71,8 +71,8 @@ class ConvertContext:# Default-on flag: merge mergeable paragraph blocks into one editable# text frame with multiple <a:p>. Disable it for strict line fidelity.merge_paragraphs: bool = True- # Explicit opt-in: convert data-pptx-native table/chart marker groups to- # native PowerPoint graphicFrames. Default stays off to preserve SVG output.+ # Explicit opt-in: replace marked chart/table fallback groups with editable+ # PowerPoint graphicFrames. Default stays off to preserve SVG output.native_objects_enabled: bool = False# Native PPTX image optimization. Keeps generated decks compact by# downsampling oversized raster assets to their rendered size.diff --git a/skills/ppt-master/scripts/svg_to_pptx/drawingml/converter.py b/skills/ppt-master/scripts/svg_to_pptx/drawingml/converter.pyindex 7b2e24ec..d60bc969 100644--- a/skills/ppt-master/scripts/svg_to_pptx/drawingml/converter.py+++ b/skills/ppt-master/scripts/svg_to_pptx/drawingml/converter.py@@ -65,10 +65,14 @@ from .elements import ()from ..animation_config import is_chrome_idfrom ..native_objects import (+ NativeMarkerAttributeError,convert_native_object,+ native_metadata_payload_matches,+ native_replacement_kind,native_marker_transform,snapshot_native_fallback_freshness,)+from ..native_objects.marker_status import native_marker_status_errorsfrom ..semantic_markers import is_static_page_frame@@ -76,6 +80,41 @@ class SvgNativeConversionError(RuntimeError):"""Raised when an SVG cannot be faithfully converted to native DrawingML."""+def _require_chart_table_marker_attributes(+ root: ET.Element,+ svg_path: Path | str,+) -> None:+ """Reject contradictory chart/table marker aliases before either route."""+ errors: list[str] = []+ for elem in root.iter():+ if elem.tag.rsplit('}', 1)[-1] == 'metadata':+ continue+ marker_errors = native_marker_status_errors(elem)+ if marker_errors:+ marker_id = elem.get('id') or elem.get('data-name') or '<unnamed>'+ errors.extend(f'{marker_id}: {error}' for error in marker_errors)+ continue+ marker_id = elem.get('id') or elem.get('data-name') or '<unnamed>'+ kind = native_replacement_kind(elem)+ if not kind:+ continue+ for child in elem:+ if child.tag.rsplit('}', 1)[-1] != 'metadata':+ continue+ try:+ native_metadata_payload_matches(child, kind)+ except NativeMarkerAttributeError as exc:+ errors.append(f'{marker_id}: {exc}')+ if not errors:+ return+ preview = '; '.join(errors[:8])+ suffix = '' if len(errors) <= 8 else f'; +{len(errors) - 8} more'+ raise SvgNativeConversionError(+ f'{Path(svg_path).name}: invalid chart/table replacement metadata: '+ f'{preview}{suffix}'+ )++def _require_project_freeform_geometry(root: ET.Element,svg_path: Path | str,@@ -454,7 +493,7 @@ def convert_g(elem: ET.Element, ctx: ConvertContext) -> ShapeResult | None:"""transform = elem.get('transform', '')native_subtree_active = ctx.native_objects_enabled and any(- descendant.get('data-pptx-native')+ native_replacement_kind(descendant)and descendant.tag.replace(f'{{{SVG_NS}}}', '') != 'metadata'for descendant in elem.iter())@@ -540,8 +579,9 @@ def convert_g(elem: ET.Element, ctx: ConvertContext) -> ShapeResult | None:if native_subtree_active and child_ctx.opacity_multiplier < 1.0:raise SvgNativeConversionError(- "Group opacity cannot be applied to data-pptx-native table/chart "- "objects; export without --native-objects to use the SVG fallback"+ "Group opacity cannot be applied to data-pptx-replace-with chart/table "+ "objects; export without --native-charts-and-tables to use the "+ "shape-based SVG fallback")if child_ctx.native_objects_enabled:@@ -1192,8 +1232,8 @@ def convert_svg_to_slide_shapes(size from rendered SVG boxes.image_scale: Target image pixels per SVG display pixel.image_quality: JPEG quality used for opaque optimized rasters.- native_objects: Convert explicit ``data-pptx-native`` table/chart- markers to native PowerPoint objects. Default off.+ native_objects: Convert explicit ``data-pptx-replace-with`` chart/table+ markers to native PowerPoint Chart/Table objects. Default off.animation_group_overrides: Explicit top-level SVG group ids from``animations.json`` that override the legacy chrome-name fallback.Explicit structural layer/role/placeholder markers remain excluded.@@ -1223,6 +1263,7 @@ def convert_svg_to_slide_shapes("""tree = ET.parse(str(svg_path))root = tree.getroot()+ _require_chart_table_marker_attributes(root, svg_path)authored_errors = validate_authored_preset_tree(root)if authored_errors:raise SvgNativeConversionError(@@ -1231,7 +1272,13 @@ def convert_svg_to_slide_shapes(_mark_unchanged_txbody_groups(root)_mark_unchanged_preset_previews(root)if native_objects:- snapshot_native_fallback_freshness(root)+ try:+ snapshot_native_fallback_freshness(root)+ except NativeMarkerAttributeError as exc:+ raise SvgNativeConversionError(+ f'{Path(svg_path).name}: conflicting chart/table replacement '+ f'metadata: {exc}'+ ) from exctrace_events: list[dict[str, Any]] | None = [] if trace_out is not None else Nonetrace_steps: list[dict[str, Any]] = []diff --git a/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.py b/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.pyindex b7ce73b2..6db05676 100644--- a/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.py+++ b/skills/ppt-master/scripts/svg_to_pptx/drawingml/utils.py@@ -946,8 +946,12 @@ def _contains_rounded_rect(elem: ET.Element) -> bool:def _contains_native_marker(elem: ET.Element) -> bool:+ # Import lazily to avoid the native-object package's dependency on this+ # shared DrawingML utility module during initialization.+ from ..native_objects.marker_attributes import native_replacement_kind+return any(- descendant.get('data-pptx-native') in {'table', 'chart'}+ native_replacement_kind(descendant) in {'table', 'chart'}for descendant in _iter_visual_transform_tree(elem))diff --git a/skills/ppt-master/scripts/svg_to_pptx/native_objects/__init__.py b/skills/ppt-master/scripts/svg_to_pptx/native_objects/__init__.pyindex ac03d4e9..5332bb4a 100644--- a/skills/ppt-master/scripts/svg_to_pptx/native_objects/__init__.py+++ b/skills/ppt-master/scripts/svg_to_pptx/native_objects/__init__.py@@ -50,6 +50,15 @@ from .marker_common import (_validate_bounds_inputs,native_marker_transform,)+from .marker_attributes import (+ NativeMarkerAttributeError,+ native_fallback_kind,+ native_import_source,+ native_metadata_payload_matches,+ native_marker_legacy_warnings,+ native_replacement_kind,+ native_replacement_status,+)from .marker_status import native_marker_status_errorsfrom .table import (_build_native_table,@@ -64,7 +73,14 @@ from .workbook import (__all__ = ["convert_native_object",+ "NativeMarkerAttributeError",+ "native_fallback_kind",+ "native_import_source",+ "native_metadata_payload_matches",+ "native_marker_legacy_warnings","native_object_marker_warnings",+ "native_replacement_kind",+ "native_replacement_status","native_marker_transform","snapshot_native_fallback_freshness","stamp_native_fallback_baseline",@@ -181,21 +197,27 @@ def _validate_native_object_marker_payload(ancestors: tuple[ET.Element, ...] = (),require_fresh_fallback: bool = False,) -> tuple[str, dict[str, Any], list[list[Any]] | None]:- kind = (elem.get("data-pptx-native") or "").strip().lower()+ try:+ kind = native_replacement_kind(elem)+ except NativeMarkerAttributeError as exc:+ raise RuntimeError(str(exc)) from excif not kind:return "", {}, Nonestatus_errors = native_marker_status_errors(elem)if status_errors:raise RuntimeError("; ".join(status_errors))if kind not in _NATIVE_KINDS:- raise RuntimeError(f"Unsupported data-pptx-native value: {kind}")+ raise RuntimeError(f"Unsupported data-pptx-replace-with value: {kind}")if _local_tag(elem) != "g":raise RuntimeError("Native PPTX table/chart markers must be <g> elements")native_marker_transform(elem.get("transform"))if require_fresh_fallback:require_fresh_native_fallback(elem, use_runtime_snapshot=True)- payload = _load_payload(elem, kind)+ try:+ payload = _load_payload(elem, kind)+ except NativeMarkerAttributeError as exc:+ raise RuntimeError(str(exc)) from excbounds_ctx = ctx or _native_marker_validation_context(elem, ancestors)off_x, off_y, ext_cx, ext_cy, _ = _validate_bounds_inputs(elem, payload, bounds_ctx)table_rows = None@@ -213,7 +235,7 @@ def _validate_native_object_marker_payload(include_title=chart_data["kind"] == "chartex",include_subtitle_as_caption=chart_data["kind"] == "chartex",)- if validate_chrome and elem.get("data-pptx-native-source") != "pptx":+ if validate_chrome and native_import_source(elem) != "pptx":chrome_errors = _native_chart_chrome_errors(elem, payload)if chrome_errors:raise RuntimeError("; ".join(chrome_errors))@@ -225,7 +247,7 @@ def validate_native_object_marker(*,ancestors: tuple[ET.Element, ...] = (),) -> None:- """Validate a data-pptx-native marker without mutating the PPTX package."""+ """Validate a chart/table replacement marker without mutating the package."""_validate_native_object_marker_payload(elem, ancestors=ancestors)@@ -235,7 +257,7 @@ def validate_native_object_marker_with_warnings(ancestors: tuple[ET.Element, ...] = (),document_root: ET.Element | None = None,) -> list[str]:- """Validate a data-pptx-native marker and return non-fatal warnings."""+ """Validate a chart/table replacement marker and return non-fatal warnings."""kind, payload, table_rows = _validate_native_object_marker_payload(elem,ancestors=ancestors,@@ -260,7 +282,7 @@ def native_object_marker_warnings(ancestors: tuple[ET.Element, ...] = (),document_root: ET.Element | None = None,) -> list[str]:- """Return non-fatal warnings for a data-pptx-native marker."""+ """Return non-fatal warnings for a chart/table replacement marker."""return validate_native_object_marker_with_warnings(elem,ancestors=ancestors,@@ -270,7 +292,10 @@ def native_object_marker_warnings(def convert_native_object(elem: ET.Element, ctx: ConvertContext) -> ShapeResult | None:"""Convert a marked SVG group to a native PowerPoint table or chart."""- kind = (elem.get("data-pptx-native") or "").strip().lower()+ try:+ kind = native_replacement_kind(elem)+ except NativeMarkerAttributeError as exc:+ raise RuntimeError(str(exc)) from excif not kind:return None@@ -286,7 +311,7 @@ def convert_native_object(elem: ET.Element, ctx: ConvertContext) -> ShapeResultuse_runtime_snapshot=True,):print(- f" Warning: data-pptx-native marker {marker_id}: {warning}",+ f" Warning: data-pptx-replace-with marker {marker_id}: {warning}",file=sys.stderr,)if kind == "table":@@ -294,7 +319,7 @@ def convert_native_object(elem: ET.Element, ctx: ConvertContext) -> ShapeResultpayload, warnings = _native_chart_export_payload(elem, payload)for warning in warnings:print(- f" Warning: data-pptx-native marker {marker_id}: {warning}",+ f" Warning: data-pptx-replace-with marker {marker_id}: {warning}",file=sys.stderr,)return _build_native_chart(elem, ctx, payload)diff --git a/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_style.py b/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_style.pyindex 18e6e089..18f607e8 100644--- a/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_style.py+++ b/skills/ppt-master/scripts/svg_to_pptx/native_objects/chart_style.py@@ -6,6 +6,8 @@ import mathfrom typing import Anyfrom xml.etree import ElementTree as ET+from .marker_attributes import native_import_source+from ..drawingml.context import ConvertContextfrom ..drawingml.utils import detect_text_lang, parse_font_family, px_to_emu, _xml_escapefrom .chart_data import _DEFAULT_CHART_COLORS@@ -472,7 +474,8 @@ def _native_chart_chrome_errors(elem: ET.Element, payload: dict[str, Any]) -> lisuffix = "" if len(missing) <= 5 else f", and {len(missing) - 5} more"return ["Native PPTX chart metadata contains title/axis text that is not visible "- f"inside the fallback marker and would appear only after --native-objects: {sample}{suffix}. "+ "inside the fallback marker and would appear only after "+ f"--native-charts-and-tables: {sample}{suffix}. ""Use `name` for object naming, or draw the same text in the chart fallback."]@@ -481,7 +484,7 @@ def _native_chart_export_payload(elem: ET.Element,payload: dict[str, Any],) -> tuple[dict[str, Any], list[str]]:- if elem.get("data-pptx-native-source") == "pptx":+ if native_import_source(elem) == "pptx":return payload, []fallback_texts = set(_visible_fallback_texts(elem))output = payload@@ -619,7 +622,8 @@ def _native_chart_chrome_warnings(elem: ET.Element, payload: dict[str, Any]) ->suffix = "" if len(missing_companion) <= 5 else f", and {len(missing_companion) - 5} more"warnings.append("Native PPTX chart companion text is not visible inside the fallback "- f"marker and may appear only after --native-objects: {sample}{suffix}. "+ "marker and may appear only after --native-charts-and-tables: "+ f"{sample}{suffix}. ""Keep companion metadata aligned with visible chart annotations.")return warningsdiff --git a/skills/ppt-master/scripts/svg_to_pptx/native_objects/fallback_hash.py b/skills/ppt-master/scripts/svg_to_pptx/native_objects/fallback_hash.pyindex 04b19251..b68f1300 100644--- a/skills/ppt-master/scripts/svg_to_pptx/native_objects/fallback_hash.py+++ b/skills/ppt-master/scripts/svg_to_pptx/native_objects/fallback_hash.py@@ -11,6 +11,8 @@ from pptx_shapes import (svg_native_fallback_fingerprint,)+from .marker_attributes import native_replacement_kind+NATIVE_FALLBACK_RUNTIME_ATTR = "data-pptx-runtime-fallback-unchanged"_NATIVE_FALLBACK_RUNTIME_TOKEN_ATTR = "data-pptx-runtime-fallback-token"@@ -39,7 +41,7 @@ def snapshot_native_fallback_freshness(root: ET.Element) -> None:for elem in root.iter():if elem.tag.rsplit("}", 1)[-1] == "metadata":continue- if not (elem.get("data-pptx-native") or "").strip():+ if not native_replacement_kind(elem):continueexpected, invalid = _expected_native_fallback_hash(elem)if invalid:@@ -71,13 +73,14 @@ def native_fallback_contract_warnings(if invalid:return [f"{NATIVE_FALLBACK_SHA256_ATTR} must be a 64-digit SHA-256; "- "default SVG fallback export remains available, but "- "--native-objects will fail"+ "the shape-based SVG fallback remains available, but "+ "--native-charts-and-tables will fail"]if expected is None:return [- f"has no {NATIVE_FALLBACK_SHA256_ATTR} baseline; legacy marker "- "remains native-compatible, but stale fallback edits cannot be detected"+ f"has no {NATIVE_FALLBACK_SHA256_ATTR} baseline; the marker remains "+ "compatible with Chart/Table replacement, but stale fallback edits "+ "cannot be detected"]if _native_fallback_is_fresh(elem,@@ -88,7 +91,8 @@ def native_fallback_contract_warnings(return []return ["visible SVG fallback differs from its recorded baseline; default "- "fallback export remains available, but --native-objects will fail"+ "shape-based fallback export remains available, but "+ "--native-charts-and-tables will fail"]@@ -98,7 +102,7 @@ def require_fresh_native_fallback(use_runtime_snapshot: bool = False,document_root: ET.Element | None = None,) -> None:- """Fail the editable replacement route when a recorded fallback is stale."""+ """Fail Chart/Table replacement when a recorded fallback is stale."""expected, invalid = _expected_native_fallback_hash(elem)if invalid:raise RuntimeError(@@ -115,7 +119,8 @@ def require_fresh_native_fallback(returnraise RuntimeError("Visible native-object SVG fallback was edited after its baseline was "- "recorded; --native-objects stopped to avoid discarding the SVG edit. "+ "recorded; --native-charts-and-tables stopped to avoid discarding the "+ "SVG edit. ""Use the default fallback export, or deliberately update the native ""metadata and baseline together")diff --git a/skills/ppt-master/scripts/svg_to_pptx/native_objects/marker_attributes.py b/skills/ppt-master/scripts/svg_to_pptx/native_objects/marker_attributes.pynew file mode 100644index 00000000..20b6f1f5--- /dev/null+++ b/skills/ppt-master/scripts/svg_to_pptx/native_objects/marker_attributes.py@@ -0,0 +1,182 @@+"""Canonical and compatible attribute access for chart/table replacements."""++from __future__ import annotations++from collections.abc import Callable+from xml.etree import ElementTree as ET+++REPLACE_WITH_ATTR = "data-pptx-replace-with"+LEGACY_REPLACE_WITH_ATTR = "data-pptx-native"+REPLACEMENT_STATUS_ATTR = "data-pptx-replacement-status"+LEGACY_REPLACEMENT_STATUS_ATTR = "data-pptx-native-status"+IMPORT_SOURCE_ATTR = "data-pptx-import-source"+LEGACY_IMPORT_SOURCE_ATTR = "data-pptx-native-source"+FALLBACK_KIND_ATTR = "data-pptx-fallback-kind"+LEGACY_FALLBACK_KIND_ATTR = "data-pptx-visual-status"+LEGACY_ROUTE_STATUS_ATTR = "data-pptx-route-status"+++class NativeMarkerAttributeError(ValueError):+ """Raised when canonical and compatible marker attributes conflict."""+++def _normalized_token(value: str) -> str:+ return value.strip().lower()+++def _resolved_alias(+ elem: ET.Element,+ canonical: str,+ legacy: str,+ *,+ normalize: Callable[[str], str] = _normalized_token,+) -> str | None:+ canonical_raw = elem.get(canonical)+ legacy_raw = elem.get(legacy)+ canonical_value = normalize(canonical_raw) if canonical_raw is not None else None+ legacy_value = normalize(legacy_raw) if legacy_raw is not None else None+ if (+ canonical_value is not None+ and legacy_value is not None+ and canonical_value != legacy_value+ ):+ raise NativeMarkerAttributeError(+ f"{canonical}={canonical_raw!r} conflicts with compatible "+ f"{legacy}={legacy_raw!r}"+ )+ return canonical_value if canonical_value is not None else legacy_value+++def native_replacement_kind(elem: ET.Element) -> str:+ """Return the requested chart/table replacement kind, or an empty string."""+ return _resolved_alias(elem, REPLACE_WITH_ATTR, LEGACY_REPLACE_WITH_ATTR) or ""+++def native_replacement_status(elem: ET.Element) -> str:+ """Return the fallback-only replacement status, or an empty string."""+ return (+ _resolved_alias(+ elem,+ REPLACEMENT_STATUS_ATTR,+ LEGACY_REPLACEMENT_STATUS_ATTR,+ normalize=str.strip,+ )+ or ""+ )+++def native_import_source(elem: ET.Element) -> str:+ """Return replacement payload provenance, or an empty string."""+ return (+ _resolved_alias(+ elem,+ IMPORT_SOURCE_ATTR,+ LEGACY_IMPORT_SOURCE_ATTR,+ normalize=str.strip,+ )+ or ""+ )+++def native_fallback_kind(elem: ET.Element) -> str | None:+ """Return the visible fallback classification when declared."""+ return _resolved_alias(+ elem,+ FALLBACK_KIND_ATTR,+ LEGACY_FALLBACK_KIND_ATTR,+ normalize=str.strip,+ )+++def native_metadata_payload_matches(+ elem: ET.Element,+ parent_kind: str,+) -> bool:+ """Return whether one metadata node carries this replacement payload.++ Compatible metadata kind attributes remain readable, but any declared+ kind must agree with both its alias and the parent replacement marker.+ """+ native_kind = elem.get(LEGACY_REPLACE_WITH_ATTR)+ compatible_kind = elem.get("data-pptx-kind")+ for attr, raw in (+ (LEGACY_REPLACE_WITH_ATTR, native_kind),+ ("data-pptx-kind", compatible_kind),+ ):+ if raw is not None and raw != raw.strip():+ raise NativeMarkerAttributeError(+ f"metadata {attr} must not contain surrounding whitespace"+ )+ if native_kind is not None and compatible_kind is not None:+ if _normalized_token(native_kind) != _normalized_token(compatible_kind):+ raise NativeMarkerAttributeError(+ "metadata data-pptx-native conflicts with data-pptx-kind"+ )+ declared_raw = native_kind if native_kind is not None else compatible_kind+ declared_kind = _normalized_token(declared_raw) if declared_raw is not None else None+ if declared_kind is not None and declared_kind != parent_kind:+ raise NativeMarkerAttributeError(+ f"metadata kind {declared_kind!r} conflicts with parent "+ f"replacement kind {parent_kind!r}"+ )+ metadata_type_raw = elem.get("type")+ if metadata_type_raw is not None and metadata_type_raw != metadata_type_raw.strip():+ raise NativeMarkerAttributeError(+ "metadata type must not contain surrounding whitespace"+ )+ metadata_type = (metadata_type_raw or "").lower()+ return metadata_type == "application/json" or declared_kind == parent_kind+++def native_marker_legacy_warnings(elem: ET.Element) -> list[str]:+ """Return migration advice for compatible legacy marker spellings."""+ tag = elem.tag.rsplit("}", 1)[-1]+ if tag == "metadata":+ native_kind = elem.get(LEGACY_REPLACE_WITH_ATTR)+ compatible_kind = elem.get("data-pptx-kind")+ if (+ native_kind is not None+ and compatible_kind is not None+ and _normalized_token(native_kind) != _normalized_token(compatible_kind)+ ):+ return []+ warnings = []+ for legacy in (LEGACY_REPLACE_WITH_ATTR, "data-pptx-kind"):+ if elem.get(legacy) is not None:+ warnings.append(+ f"legacy metadata attribute {legacy} is compatible; use "+ 'type="application/json" because the parent replacement '+ "marker determines the payload kind. No change is required "+ "for export."+ )+ return warnings++ try:+ native_replacement_kind(elem)+ native_replacement_status(elem)+ native_import_source(elem)+ native_fallback_kind(elem)+ except NativeMarkerAttributeError:+ return []++ warnings = []+ replacements = (+ (LEGACY_REPLACE_WITH_ATTR, REPLACE_WITH_ATTR),+ (LEGACY_REPLACEMENT_STATUS_ATTR, REPLACEMENT_STATUS_ATTR),+ (LEGACY_IMPORT_SOURCE_ATTR, IMPORT_SOURCE_ATTR),+ (LEGACY_FALLBACK_KIND_ATTR, FALLBACK_KIND_ATTR),+ )+ for legacy, canonical in replacements:+ if elem.get(legacy) is not None:+ warnings.append(+ f"legacy attribute {legacy} is compatible; use {canonical} "+ "for project-canonical SVG. No change is required for export."+ )+ if elem.get(LEGACY_ROUTE_STATUS_ATTR) is not None:+ warnings.append(+ f"legacy attribute {LEGACY_ROUTE_STATUS_ATTR} is compatible; omit it "+ f"because {FALLBACK_KIND_ATTR}='placeholder' already implies the "+ "reconstruction-only route. No change is required for export."+ )+ return warningsdiff --git a/skills/ppt-master/scripts/svg_to_pptx/native_objects/marker_common.py b/skills/ppt-master/scripts/svg_to_pptx/native_objects/marker_common.pyindex b1809cea..f667f70c 100644--- a/skills/ppt-master/scripts/svg_to_pptx/native_objects/marker_common.py+++ b/skills/ppt-master/scripts/svg_to_pptx/native_objects/marker_common.py@@ -28,6 +28,10 @@ from ..drawingml.utils import (parse_transform_matrix,transform_point,)+from .marker_attributes import (+ NativeMarkerAttributeError,+ native_metadata_payload_matches,+)TABLE_URI = "http://schemas.openxmlformats.org/drawingml/2006/table"CHART_URI = "http://schemas.openxmlformats.org/drawingml/2006/chart"@@ -728,17 +732,15 @@ def _load_payload(elem: ET.Element, kind: str) -> dict[str, Any]:for child in elem:if _local_tag(child) != "metadata":continue- metadata_kind = (child.get("data-pptx-native") or child.get("data-pptx-kind") or kind).lower()- metadata_type = (child.get("type") or "").lower()- if metadata_kind == kind or metadata_type == "application/json":+ if native_metadata_payload_matches(child, kind):raw = "".join(child.itertext()).strip()breakif not raw:raise RuntimeError(- f"Native PPTX {kind} marker requires JSON metadata; add a matching "- f"<metadata data-pptx-native=\"{kind}\"> payload for a real "- "data-backed object, or remove data-pptx-native from SVG-only "+ f"PPTX {kind} replacement marker requires JSON metadata; add "+ '<metadata type="application/json"> for a real data-backed '+ "object, or remove data-pptx-replace-with from SVG-only ""KPI/diagram groups")diff --git a/skills/ppt-master/scripts/svg_to_pptx/native_objects/marker_status.py b/skills/ppt-master/scripts/svg_to_pptx/native_objects/marker_status.pyindex 05dbc3ed..cd59e20e 100644--- a/skills/ppt-master/scripts/svg_to_pptx/native_objects/marker_status.py+++ b/skills/ppt-master/scripts/svg_to_pptx/native_objects/marker_status.py@@ -1,48 +1,176 @@-"""Validate native-object fallback and release-route status attributes."""+"""Validate chart/table replacement fallback and release-route attributes."""from __future__ import annotationsfrom xml.etree import ElementTree as ET+from .marker_attributes import (+ FALLBACK_KIND_ATTR,+ IMPORT_SOURCE_ATTR,+ LEGACY_FALLBACK_KIND_ATTR,+ LEGACY_IMPORT_SOURCE_ATTR,+ LEGACY_REPLACEMENT_STATUS_ATTR,+ LEGACY_REPLACE_WITH_ATTR,+ LEGACY_ROUTE_STATUS_ATTR,+ REPLACEMENT_STATUS_ATTR,+ REPLACE_WITH_ATTR,+ NativeMarkerAttributeError,+ native_fallback_kind,+ native_import_source,+ native_replacement_kind,+ native_replacement_status,+)+VISUAL_STATUSES = frozenset({"source-preview", "normalized", "placeholder"})ROUTE_STATUSES = frozenset({"reconstruction-only"})+REPLACEMENT_KINDS = frozenset({"chart", "table"})+# Closed importer outputs from chart_to_svg, chartex_to_svg, and tbl_to_svg.+# This includes codes forwarded through their dynamic ``status`` parameters.+REPLACEMENT_STATUS_CODES = frozenset({+ "unsupported-3d-chart",+ "unsupported-chart-analysis-features",+ "unsupported-chart-axis-number-format",+ "unsupported-chart-axis-options",+ "unsupported-chart-axis-titles",+ "unsupported-chart-bar-options",+ "unsupported-chart-bubble-options",+ "unsupported-chart-cache",+ "unsupported-chart-category-format",+ "unsupported-chart-data-labels",+ "unsupported-chart-data-table",+ "unsupported-chart-doughnut-options",+ "unsupported-chart-legend-position",+ "unsupported-chart-line-style",+ "unsupported-chart-of-pie-options",+ "unsupported-chart-parse",+ "unsupported-chart-part",+ "unsupported-chart-pie-options",+ "unsupported-chart-plot",+ "unsupported-chart-point-labels",+ "unsupported-chart-radar-style",+ "unsupported-chart-reference",+ "unsupported-chart-relationship",+ "unsupported-chart-scatter-style",+ "unsupported-chart-schema",+ "unsupported-chart-series-data-labels",+ "unsupported-chart-series-order",+ "unsupported-chart-series-style",+ "unsupported-chart-type",+ "unsupported-chart-uri",+ "unsupported-chartex-cache",+ "unsupported-chartex-data-id",+ "unsupported-chartex-dimension",+ "unsupported-chartex-parse",+ "unsupported-chartex-part",+ "unsupported-chartex-schema",+ "unsupported-chartex-series",+ "unsupported-chartex-structure",+ "unsupported-chartex-type",+ "unsupported-combo-category-format",+ "unsupported-combo-category-layout",+ "unsupported-combo-chart",+ "unsupported-combo-series-order",+ "unsupported-date-axis",+ "unsupported-date-system",+ "unsupported-formatted-category-cache",+ "unsupported-merge-topology",+ "unsupported-native-transform",+ "unsupported-stock-chart",+ "unsupported-table-direct-formatting",+ "unsupported-table-geometry",+ "unsupported-table-size",+ "unsupported-table-style",+})def native_marker_status_errors(elem: ET.Element) -> list[str]:- """Return invalid or contradictory native-object status declarations."""+ """Return invalid or contradictory replacement status declarations."""errors: list[str] = []- visual_raw = elem.get("data-pptx-visual-status")- route_raw = elem.get("data-pptx-route-status")- native_raw = elem.get("data-pptx-native")- fallback_raw = elem.get("data-pptx-native-status")+ native_raw_values = {+ REPLACE_WITH_ATTR: elem.get(REPLACE_WITH_ATTR),+ LEGACY_REPLACE_WITH_ATTR: elem.get(LEGACY_REPLACE_WITH_ATTR),+ }+ fallback_status_raw_values = {+ REPLACEMENT_STATUS_ATTR: elem.get(REPLACEMENT_STATUS_ATTR),+ LEGACY_REPLACEMENT_STATUS_ATTR: elem.get(LEGACY_REPLACEMENT_STATUS_ATTR),+ }+ import_source_raw_values = {+ IMPORT_SOURCE_ATTR: elem.get(IMPORT_SOURCE_ATTR),+ LEGACY_IMPORT_SOURCE_ATTR: elem.get(LEGACY_IMPORT_SOURCE_ATTR),+ }+ visual_raw = elem.get(FALLBACK_KIND_ATTR)+ legacy_visual_raw = elem.get(LEGACY_FALLBACK_KIND_ATTR)+ route_raw = elem.get(LEGACY_ROUTE_STATUS_ATTR)+ try:+ visual = native_fallback_kind(elem)+ native = native_replacement_kind(elem)+ fallback = native_replacement_status(elem)+ native_import_source(elem)+ except NativeMarkerAttributeError as exc:+ errors.append(str(exc))+ return errors- visual = visual_raw.strip() if visual_raw is not None else Noneroute = route_raw.strip() if route_raw is not None else None- native = native_raw.strip() if native_raw is not None else ""- fallback = fallback_raw.strip() if fallback_raw is not None else ""- if visual_raw is not None and visual_raw != visual:- errors.append("data-pptx-visual-status must not contain surrounding whitespace")+ for attr, raw in (+ *native_raw_values.items(),+ *fallback_status_raw_values.items(),+ *import_source_raw_values.items(),+ ):+ if raw is not None and raw != raw.strip():+ errors.append(f"{attr} must not contain surrounding whitespace")+ canonical_kind_raw = native_raw_values[REPLACE_WITH_ATTR]+ if (+ canonical_kind_raw is not None+ and canonical_kind_raw == canonical_kind_raw.strip()+ and canonical_kind_raw != canonical_kind_raw.lower()+ ):+ errors.append(f"{REPLACE_WITH_ATTR} must use lowercase chart or table")+ if visual_raw is not None and visual_raw != visual_raw.strip():+ errors.append(f"{FALLBACK_KIND_ATTR} must not contain surrounding whitespace")+ if legacy_visual_raw is not None and legacy_visual_raw != legacy_visual_raw.strip():+ errors.append(+ f"{LEGACY_FALLBACK_KIND_ATTR} must not contain surrounding whitespace"+ )if route_raw is not None and route_raw != route:- errors.append("data-pptx-route-status must not contain surrounding whitespace")+ errors.append(f"{LEGACY_ROUTE_STATUS_ATTR} must not contain surrounding whitespace")if visual is not None and visual not in VISUAL_STATUSES:- errors.append(f"unsupported data-pptx-visual-status value: {visual!r}")+ errors.append(f"unsupported {FALLBACK_KIND_ATTR} value: {visual!r}")if route is not None and route not in ROUTE_STATUSES:- errors.append(f"unsupported data-pptx-route-status value: {route!r}")- if visual == "placeholder" and route != "reconstruction-only":+ errors.append(f"unsupported {LEGACY_ROUTE_STATUS_ATTR} value: {route!r}")+ if any(raw is not None for raw in native_raw_values.values()):+ if native not in REPLACEMENT_KINDS:+ errors.append(f"unsupported {REPLACE_WITH_ATTR} value: {native!r}")+ if any(raw is not None for raw in fallback_status_raw_values.values()):+ if not fallback:+ errors.append(f"{REPLACEMENT_STATUS_ATTR} must not be empty")+ elif fallback not in REPLACEMENT_STATUS_CODES:+ errors.append(+ f"unsupported {REPLACEMENT_STATUS_ATTR} value: {fallback!r}"+ )+ if any(raw is not None for raw in import_source_raw_values.values()):+ source = native_import_source(elem)+ if source != "pptx":+ errors.append(f"unsupported {IMPORT_SOURCE_ATTR} value: {source!r}")+ if (+ visual_raw is None+ and legacy_visual_raw is not None+ and visual == "placeholder"+ and route != "reconstruction-only"+ ):errors.append(- "data-pptx-visual-status='placeholder' requires "- "data-pptx-route-status='reconstruction-only'"+ f"{LEGACY_FALLBACK_KIND_ATTR}='placeholder' requires "+ f"{LEGACY_ROUTE_STATUS_ATTR}='reconstruction-only'")if route == "reconstruction-only" and visual != "placeholder":errors.append(- "data-pptx-route-status='reconstruction-only' requires "- "data-pptx-visual-status='placeholder'"+ f"{LEGACY_ROUTE_STATUS_ATTR}='reconstruction-only' requires "+ f"{FALLBACK_KIND_ATTR}='placeholder'")if native and fallback:errors.append(- "data-pptx-native and data-pptx-native-status are mutually exclusive"+ f"data-pptx-replace-with and {REPLACEMENT_STATUS_ATTR} are mutually exclusive")return errors@@ -52,7 +180,7 @@ def native_marker_release_block_reason(elem: ET.Element) -> str | None:A valid ``reconstruction-only`` declaration is diagnostic rather than arelease block: default export keeps its visible placeholder, while an- active native marker may still reconstruct the editable object.+ an active replacement marker may still reconstruct a native Chart/Table."""errors = native_marker_status_errors(elem)if errors:diff --git a/skills/ppt-master/scripts/svg_to_pptx/native_objects/table.py b/skills/ppt-master/scripts/svg_to_pptx/native_objects/table.pyindex 78d5f4c6..07bb0b57 100644--- a/skills/ppt-master/scripts/svg_to_pptx/native_objects/table.py+++ b/skills/ppt-master/scripts/svg_to_pptx/native_objects/table.py@@ -6,6 +6,8 @@ from dataclasses import dataclassfrom typing import Anyfrom xml.etree import ElementTree as ET+from .marker_attributes import native_import_source+from ..drawingml.context import ConvertContext, ShapeResultfrom ..drawingml.theme_colors import ThemeColorSpec, color_node_xmlfrom ..drawingml.utils import _xml_escape, detect_text_lang, font_px_to_hpt@@ -556,7 +558,7 @@ def _native_table_warnings(elem: ET.Element, table_rows: list[list[Any]]) -> lissuffix = "" if len(missing) <= 5 else f", and {len(missing) - 5} more"return ["Native PPTX table fallback text is missing from metadata columns/rows "- f"and will disappear with --native-objects: {sample}{suffix}"+ f"and will disappear with --native-charts-and-tables: {sample}{suffix}"]@@ -838,7 +840,7 @@ def _table_merge_attrs(def _build_native_table(elem: ET.Element, ctx: ConvertContext, payload: dict[str, Any]) -> ShapeResult:table_rows, col_count, merge_layout = _validate_table_payload(payload)header_rows = _table_header_rows(payload, len(table_rows))- preserve_source_style = elem.get("data-pptx-native-source") == "pptx"+ preserve_source_style = native_import_source(elem) == "pptx"style = payload.get("style") if isinstance(payload.get("style"), dict) else {}header_fill = _clean_hex(style.get("header_fill"), "#1F4E79")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 93d28d5f..87f9bc73 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@@ -4496,8 +4496,8 @@ def create_pptx_with_native_svg(from rendered SVG boxes.image_scale: Target image pixels per SVG display pixel.image_quality: JPEG quality used for opaque optimized rasters.- native_objects: Convert explicit ``data-pptx-native`` table/chart- markers to native PowerPoint objects. Default off.+ native_objects: Replace explicit ``data-pptx-replace-with`` chart/table+ fallback groups with native PowerPoint Chart/Table objects. Default off.conversion_trace_path: Optional JSON path for native conversion diagnostics.structure_name: Current deck identity used to name a flat Master, Layout,and theme.@@ -4621,8 +4621,9 @@ def create_pptx_with_native_svg(pptx_structure.capitalize())raise TemplateStructureError(- f"{context} {kinds} placeholder(s) require --native-objects so each "- "marker becomes one native PowerPoint object"+ f"{context} {kinds} placeholder(s) require "+ "--native-charts-and-tables so each marker becomes one native "+ "PowerPoint Chart/Table object")# Check compatibility mode dependenciesdiff --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 c08ba1df..3b483106 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@@ -38,6 +38,11 @@ if __package__ in {None, ''}:from .dimensions import CANVAS_FORMATS, get_project_info, get_viewbox_dimensionsfrom .discovery import find_svg_files, find_notes_filesfrom .builder import create_pptx_with_native_svg+from ..native_objects import (+ native_fallback_kind,+ native_replacement_kind,+ native_replacement_status,+)from ..native_objects.marker_status import native_marker_release_block_reasonfrom ..drawingml.theme_colors import ThemeColorError, load_theme_color_specfrom ..drawingml.theme_fonts import (@@ -114,7 +119,7 @@ def _print_structure_migration_error(mode: str | None) -> None:def _native_object_fallbacks(svg_files: list[Path]) -> list[tuple[str, str, str]]:- """Return fallback-only native object statuses from SVG inputs."""+ """Return fallback-only chart/table replacement statuses from SVG inputs."""fallbacks: list[tuple[str, str, str]] = []for svg_path in svg_files:try:@@ -122,7 +127,7 @@ def _native_object_fallbacks(svg_files: list[Path]) -> list[tuple[str, str, str]except (OSError, ET.ParseError):continuefor elem in root.iter():- status = elem.get('data-pptx-native-status')+ status = native_replacement_status(elem)if not status or elem.tag.rsplit('}', 1)[-1] == 'metadata':continuemarker_id = elem.get('id') or elem.get('data-name') or '<unnamed>'@@ -164,12 +169,12 @@ def _reconstruction_only_graphics(for elem in root.iter():if elem.tag.rsplit('}', 1)[-1] == 'metadata':continue- if elem.get('data-pptx-route-status') != 'reconstruction-only':+ if native_fallback_kind(elem) != 'placeholder':continueif native_marker_release_block_reason(elem) is not None:continuemarker_id = elem.get('id') or elem.get('data-name') or '<unnamed>'- active_native = bool((elem.get('data-pptx-native') or '').strip())+ active_native = bool(native_replacement_kind(elem))diagnostics.append((svg_path.name, marker_id, active_native))return diagnostics@@ -303,14 +308,25 @@ Recorded narration:help='Write a JSON diagnostics report next to the native PPTX ''(<output>.trace.json). Records per-slide SVG element ''conversion decisions for debugging.')- parser.add_argument('--native-objects', action='store_true', default=False,- help='Opt in to converting explicit data-pptx-native table/chart '- 'markers into editable PowerPoint objects. This editable-first '- 'replacement may normalize styling or omit unmodeled marker-local '- 'visuals. Default off: marked groups export through their SVG '- 'fallback children. When set, '- 'the default-flow export is named <project>_<ts>_native_charts.pptx '- 'to tell it apart from a plain shape export.')+ parser.add_argument(+ '--native-charts-and-tables',+ dest='native_objects',+ action='store_true',+ default=False,+ help=(+ 'Replace explicit data-pptx-replace-with chart/table groups with '+ 'PowerPoint native Chart/Table objects. This data-object route may '+ 'normalize styling or omit fallback-only visuals. Default off: groups '+ 'export as editable SVG-derived DrawingML shapes. The default-flow '+ 'output uses <project>_<ts>_native_charts_tables.pptx.'+ ),+ )+ parser.add_argument(+ '--native-objects',+ dest='native_objects',+ action='store_true',+ help=argparse.SUPPRESS,+ )parser.add_argument('--pptx-structure',choices=[@@ -407,7 +423,15 @@ Recorded narration:parser.add_argument('--narration-padding', type=non_negative_float, default=0.5,help='Seconds to add after each narration before auto-advance (default: 0.5)')- args = parser.parse_args(argv)+ raw_argv = list(argv) if argv is not None else sys.argv[1:]+ legacy_native_objects = '--native-objects' in raw_argv+ args = parser.parse_args(raw_argv)+ if legacy_native_objects:+ print(+ 'Warning: --native-objects is deprecated; use '+ '--native-charts-and-tables.',+ file=sys.stderr,+ )project_path = Path(args.project_path)if not project_path.exists():@@ -547,7 +571,7 @@ Recorded narration:if release_blocked:print("Error: invalid PPTX graphic status metadata cannot enter an export. "- "Correct the reported visual/route/native status attributes first.",+ "Correct the reported replacement/fallback/import-source attributes first.",file=sys.stderr,)for filename, marker_id, status in release_blocked[:20]:@@ -563,12 +587,16 @@ Recorded narration:if reconstruction_only:print("Warning: reconstruction-only PPTX chart placeholder(s) have no baked "- "preview. Default export keeps the placeholder; --native-objects "- "reconstructs entries that carry a valid active native marker.",+ "preview. Default export keeps the placeholder; "+ "--native-charts-and-tables "+ "reconstructs entries that carry a valid active replacement marker.",file=sys.stderr,)for filename, marker_id, active_native in reconstruction_only[:20]:- route = "active native reconstruction" if active_native else "placeholder fallback"+ route = (+ "active native Chart/Table replacement"+ if active_native else "placeholder fallback"+ )print(f" {filename}: {marker_id} ({route})", file=sys.stderr)if len(reconstruction_only) > 20:print(@@ -578,17 +606,18 @@ Recorded narration:if args.native_objects:print(- "Warning: --native-objects is an editable-first replacement route. "- "Native charts/tables may normalize styling or omit SVG details that "- "are not represented by marker metadata; use the default export when "- "exact fallback artwork is required.",+ "Warning: --native-charts-and-tables replaces shape-based SVG fallbacks "+ "with PowerPoint Chart/Table objects. The native objects may normalize "+ "styling or omit SVG details that are not represented by marker metadata; "+ "use the default shape-based export when exact fallback artwork is required.",file=sys.stderr,)fallbacks = _native_object_fallbacks(native_files)if fallbacks:print(- "Warning: --native-objects found fallback-only PPTX objects; "- "they will export through their SVG preview instead of editable objects.",+ "Warning: --native-charts-and-tables found fallback-only PPTX objects; "+ "they will export through their SVG-derived DrawingML shapes instead "+ "of native Chart/Table objects.",file=sys.stderr,)for filename, marker_id, status in fallbacks[:20]:@@ -604,13 +633,13 @@ Recorded narration:else:exports_dir = project_path / "exports"exports_dir.mkdir(parents=True, exist_ok=True)- # --native-objects yields a materially different file (real editable- # PowerPoint chart/table objects instead of flattened shapes), so mark- # it in the default-flow name to tell it apart from a plain shape export.+ # --native-charts-and-tables yields a materially different file (PowerPoint+ # Chart/Table objects instead of SVG-derived DrawingML shapes), so mark it+ # in the default-flow name to distinguish the two editable object models.# Narration flags likewise mark _narrated (audio embedded per slide +# auto-advance timings). Flag-driven (not content-sniffed) so the name# is predictable; an explicit -o keeps the caller's exact name untouched.- native_tag = "_native_charts" if args.native_objects else ""+ native_tag = "_native_charts_tables" if args.native_objects else ""narrated_tag = "_narrated" if (args.recorded_narration or args.narration_audio_dir) else ""native_path = exports_dir / f"{project_name}_{timestamp}{native_tag}{narrated_tag}.pptx"# Preserve the authored svg_output/ beside every default-flow export.diff --git a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/template_structure.py b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/template_structure.pyindex 33bb4db5..d667a9b1 100644--- a/skills/ppt-master/scripts/svg_to_pptx/pptx_package/template_structure.py+++ b/skills/ppt-master/scripts/svg_to_pptx/pptx_package/template_structure.py@@ -34,6 +34,7 @@ from ..geometry_properties import (GeometryStyleError,materialize_inline_geometry_properties,)+from ..native_objects import NativeMarkerAttributeError, native_replacement_kind_NON_VISUAL_TAGS = frozenset({"defs", "title", "desc", "metadata", "style"})@@ -1160,11 +1161,18 @@ def _validate_placeholder_carrier("one direct text, image, or basic SVG shape")if placeholder in {"chart", "table"}:- native_kind = (carrier.get("data-pptx-native") or "").strip().lower()+ try:+ native_kind = native_replacement_kind(carrier)+ except NativeMarkerAttributeError as exc:+ raise TemplateStructureError(+ f"{svg_path.name}: {element_id} placeholder '{placeholder}' has "+ f"conflicting chart/table replacement metadata: {exc}"+ ) from excif tag != "g" or native_kind != placeholder:raise TemplateStructureError(f"{svg_path.name}: {element_id} placeholder '{placeholder}' must be "- f"carried by one direct <g data-pptx-native=\"{placeholder}\"> marker"+ f"carried by one direct <g data-pptx-replace-with=\"{placeholder}\"> "+ "marker")diff --git a/skills/ppt-master/scripts/svg_to_pptx/use_expander.py b/skills/ppt-master/scripts/svg_to_pptx/use_expander.pyindex 44b15678..505f36b4 100644--- a/skills/ppt-master/scripts/svg_to_pptx/use_expander.py+++ b/skills/ppt-master/scripts/svg_to_pptx/use_expander.py@@ -48,7 +48,13 @@ _MAX_LOCAL_USE_DEPTH = 64_MAX_LOCAL_USE_INSTANCES = 10_000_NON_REUSABLE_METADATA_PREFIXES = ('data-pptx-layer',+ 'data-pptx-replace-with',+ 'data-pptx-replacement-',+ 'data-pptx-import-source',+ 'data-pptx-fallback-','data-pptx-native',+ 'data-pptx-visual-status',+ 'data-pptx-route-status','data-pptx-placeholder',)_REFERENCE_TAGS = frozenset({diff --git a/skills/ppt-master/scripts/test_svg_quality_checker.py b/skills/ppt-master/scripts/test_svg_quality_checker.pyindex 872f46b8..c4078e0c 100644--- a/skills/ppt-master/scripts/test_svg_quality_checker.py+++ b/skills/ppt-master/scripts/test_svg_quality_checker.py@@ -15,6 +15,18 @@ from svg_to_pptx.drawingml.converter import (SvgNativeConversionError,convert_svg_to_slide_shapes,)+from svg_to_pptx.native_objects import (+ NativeMarkerAttributeError,+ native_fallback_kind,+ native_import_source,+ native_replacement_kind,+ native_replacement_status,+)+from svg_to_pptx.pptx_package.template_structure import (+ TemplateStructureError,+ _validate_placeholder_carrier,+)+from svg_to_pptx.use_expander import UseExpansionError, expand_local_use_referencesclass SVGQualityCheckerCompatibilityTests(unittest.TestCase):@@ -180,6 +192,355 @@ class SVGQualityCheckerCompatibilityTests(unittest.TestCase):'invalid project paint reference',)+ def test_chart_table_replacement_attributes_resolve_canonical_and_legacy(self):+ import xml.etree.ElementTree as ET++ canonical = ET.fromstring(+ '<g data-pptx-replace-with="table" '+ 'data-pptx-replacement-status="unsupported-table-style" '+ 'data-pptx-import-source="pptx" '+ 'data-pptx-fallback-kind="normalized"/>'+ )+ legacy = ET.fromstring(+ '<g data-pptx-native="table" '+ 'data-pptx-native-status="unsupported-table-style" '+ 'data-pptx-native-source="pptx" '+ 'data-pptx-visual-status="normalized"/>'+ )+ for elem in (canonical, legacy):+ self.assertEqual(native_replacement_kind(elem), 'table')+ self.assertEqual(+ native_replacement_status(elem),+ 'unsupported-table-style',+ )+ self.assertEqual(native_import_source(elem), 'pptx')+ self.assertEqual(native_fallback_kind(elem), 'normalized')++ def test_conflicting_chart_table_replacement_aliases_are_errors(self):+ import xml.etree.ElementTree as ET++ elem = ET.fromstring(+ '<g data-pptx-replace-with="chart" data-pptx-native="table"/>'+ )+ with self.assertRaisesRegex(+ NativeMarkerAttributeError,+ 'data-pptx-replace-with.*conflicts',+ ):+ native_replacement_kind(elem)++ result = self._check(+ '''<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <g id="conflict" data-pptx-replace-with="chart" data-pptx-native="table"/>+</svg>'''+ )+ self.assertFalse(result['passed'])+ self.assertIn(+ 'data-pptx-replace-with',+ '\n'.join(result['errors']),+ )+ self.assertNotIn(+ 'legacy attribute data-pptx-native',+ '\n'.join(result['warnings']),+ )+ with tempfile.TemporaryDirectory() as tmp_dir:+ svg_path = Path(tmp_dir) / 'conflict.svg'+ svg_path.write_text(+ '''<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <g id="conflict" data-pptx-replace-with="chart" data-pptx-native="table"/>+</svg>''',+ encoding='utf-8',+ )+ with self.assertRaisesRegex(+ SvgNativeConversionError,+ 'invalid chart/table replacement metadata',+ ):+ convert_svg_to_slide_shapes(svg_path)++ def test_all_chart_table_replacement_alias_pairs_reject_conflicts(self):+ import xml.etree.ElementTree as ET++ cases = (+ (+ 'data-pptx-replace-with="chart" data-pptx-native="table"',+ native_replacement_kind,+ ),+ (+ 'data-pptx-replacement-status="one" data-pptx-native-status="two"',+ native_replacement_status,+ ),+ (+ 'data-pptx-import-source="pptx" data-pptx-native-source="other"',+ native_import_source,+ ),+ (+ 'data-pptx-fallback-kind="normalized" '+ 'data-pptx-visual-status="source-preview"',+ native_fallback_kind,+ ),+ )+ for attributes, getter in cases:+ with self.subTest(attributes=attributes):+ elem = ET.fromstring(f'<g {attributes}/>')+ with self.assertRaises(NativeMarkerAttributeError):+ getter(elem)++ def test_matching_chart_table_replacement_aliases_are_accepted(self):+ import xml.etree.ElementTree as ET++ cases = (+ (+ '<g data-pptx-replace-with="chart" data-pptx-native="chart"/>',+ native_replacement_kind,+ 'chart',+ ),+ (+ '<g data-pptx-replacement-status="reason" '+ 'data-pptx-native-status="reason"/>',+ native_replacement_status,+ 'reason',+ ),+ (+ '<g data-pptx-import-source="pptx" '+ 'data-pptx-native-source="pptx"/>',+ native_import_source,+ 'pptx',+ ),+ (+ '<g data-pptx-fallback-kind="normalized" '+ 'data-pptx-visual-status="normalized"/>',+ native_fallback_kind,+ 'normalized',+ ),+ )+ for markup, getter, expected in cases:+ with self.subTest(markup=markup):+ self.assertEqual(getter(ET.fromstring(markup)), expected)++ def test_invalid_replacement_tokens_block_checker_and_default_export(self):+ cases = (+ ('data-pptx-replace-with="diagram"', 'unsupported data-pptx-replace-with'),+ ('data-pptx-replace-with="Chart"', 'must use lowercase chart or table'),+ ('data-pptx-replace-with=" chart "', 'surrounding whitespace'),+ ('data-pptx-replacement-status=""', 'must not be empty'),+ ('data-pptx-replacement-status=" reason "', 'surrounding whitespace'),+ ('data-pptx-import-source="other"', 'unsupported data-pptx-import-source'),+ ('data-pptx-fallback-kind="Normalized"', 'unsupported data-pptx-fallback-kind'),+ )+ for attributes, expected in cases:+ content = (+ '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">'+ f'<g id="marker" {attributes}/></svg>'+ )+ with self.subTest(attributes=attributes):+ result = self._check(content)+ self.assertFalse(result['passed'])+ self.assertIn(expected, '\n'.join(result['errors']))+ with tempfile.TemporaryDirectory() as tmp_dir:+ svg_path = Path(tmp_dir) / 'invalid-token.svg'+ svg_path.write_text(content, encoding='utf-8')+ with self.assertRaisesRegex(+ SvgNativeConversionError,+ 'invalid chart/table replacement metadata',+ ):+ convert_svg_to_slide_shapes(svg_path)++ def test_replacement_status_uses_closed_importer_reason_codes(self):+ legal = '''<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <g id="fallback" data-pptx-replacement-status="unsupported-table-style">+ <rect x="80" y="80" width="320" height="180" fill="#FFFFFF"/>+ </g>+</svg>'''+ made_up = legal.replace('unsupported-table-style', 'made-up-reason')++ legal_result = self._check(legal)+ self.assertTrue(legal_result['passed'])+ self.assertEqual(legal_result['errors'], [])++ made_up_result = self._check(made_up)+ self.assertFalse(made_up_result['passed'])+ self.assertIn(+ "unsupported data-pptx-replacement-status value: 'made-up-reason'",+ '\n'.join(made_up_result['errors']),+ )++ with tempfile.TemporaryDirectory() as tmp_dir:+ legal_path = Path(tmp_dir) / 'legal.svg'+ made_up_path = Path(tmp_dir) / 'made-up.svg'+ legal_path.write_text(legal, encoding='utf-8')+ made_up_path.write_text(made_up, encoding='utf-8')+ convert_svg_to_slide_shapes(legal_path)+ with self.assertRaisesRegex(+ SvgNativeConversionError,+ 'unsupported data-pptx-replacement-status value',+ ):+ convert_svg_to_slide_shapes(made_up_path)++ def test_legacy_replacement_attributes_remain_non_blocking(self):+ result = self._check(+ '''<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <g id="legacy-table" data-pptx-native="table"+ data-pptx-native-source="pptx" data-pptx-visual-status="normalized"+ data-pptx-x="80" data-pptx-y="80"+ data-pptx-width="320" data-pptx-height="180">+ <metadata data-pptx-kind="table">{"rows":[["A"]]}</metadata>+ <rect x="80" y="80" width="320" height="180" fill="#FFFFFF"/>+ </g>+</svg>'''+ )+ warning_text = '\n'.join(result['warnings'])+ self.assertTrue(result['passed'])+ self.assertEqual(result['errors'], [])+ self.assertIn('legacy attribute data-pptx-native', warning_text)+ self.assertIn('legacy metadata attribute data-pptx-kind', warning_text)++ def test_canonical_placeholder_fallback_does_not_require_route_status(self):+ result = self._check(+ '''<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <g id="placeholder" data-pptx-fallback-kind="placeholder">+ <rect x="80" y="80" width="320" height="180" fill="#EEEEEE"/>+ </g>+</svg>'''+ )+ self.assertTrue(result['passed'])+ self.assertEqual(result['errors'], [])+ self.assertIn(+ 'reconstruction-only placeholder',+ '\n'.join(result['warnings']),+ )++ def test_legacy_placeholder_fallback_still_requires_legacy_route_status(self):+ result = self._check(+ '''<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <g id="placeholder" data-pptx-visual-status="placeholder">+ <rect x="80" y="80" width="320" height="180" fill="#EEEEEE"/>+ </g>+</svg>'''+ )+ self.assertFalse(result['passed'])+ self.assertIn(+ "data-pptx-route-status='reconstruction-only'",+ '\n'.join(result['errors']),+ )++ def test_metadata_kind_must_match_parent_replacement_kind(self):+ content = '''<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <g id="chart" data-pptx-replace-with="chart"+ data-pptx-x="80" data-pptx-y="80"+ data-pptx-width="320" data-pptx-height="180">+ <metadata type="application/json" data-pptx-kind="table">{"rows":[["A"]]}</metadata>+ <rect x="80" y="80" width="320" height="180" fill="#FFFFFF"/>+ </g>+</svg>'''+ result = self._check(content)+ self.assertFalse(result['passed'])+ self.assertIn(+ "metadata kind 'table' conflicts with parent replacement kind 'chart'",+ '\n'.join(result['errors']),+ )++ with tempfile.TemporaryDirectory() as tmp_dir:+ svg_path = Path(tmp_dir) / 'metadata-conflict.svg'+ svg_path.write_text(content, encoding='utf-8')+ for native_objects in (False, True):+ with self.subTest(native_objects=native_objects):+ with self.assertRaisesRegex(+ SvgNativeConversionError,+ "metadata kind 'table' conflicts",+ ):+ convert_svg_to_slide_shapes(+ svg_path,+ native_objects=native_objects,+ )++ def test_conflicting_legacy_metadata_kind_aliases_are_errors(self):+ content = '''<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <g id="chart" data-pptx-replace-with="chart"+ data-pptx-x="80" data-pptx-y="80"+ data-pptx-width="320" data-pptx-height="180">+ <metadata type="application/json" data-pptx-native="chart"+ data-pptx-kind="table">{"series":[]}</metadata>+ <rect x="80" y="80" width="320" height="180" fill="#FFFFFF"/>+ </g>+</svg>'''+ result = self._check(content)+ self.assertFalse(result['passed'])+ self.assertIn(+ 'metadata data-pptx-native conflicts with data-pptx-kind',+ '\n'.join(result['errors']),+ )+ self.assertNotIn(+ 'legacy metadata attribute',+ '\n'.join(result['warnings']),+ )++ def test_structured_placeholder_wraps_replacement_alias_conflicts(self):+ import xml.etree.ElementTree as ET++ carrier = ET.fromstring(+ '<g data-pptx-replace-with="chart" data-pptx-native="table"/>'+ )+ with self.assertRaisesRegex(+ TemplateStructureError,+ 'conflicting chart/table replacement metadata',+ ):+ _validate_placeholder_carrier(+ carrier,+ 'chart',+ svg_path=Path('template.svg'),+ element_id='chart-slot',+ )++ def test_local_use_rejects_all_canonical_replacement_metadata(self):+ import xml.etree.ElementTree as ET++ attributes = (+ 'data-pptx-replace-with="chart"',+ 'data-pptx-replacement-status="reason"',+ 'data-pptx-import-source="pptx"',+ 'data-pptx-fallback-kind="normalized"',+ 'data-pptx-fallback-sha256="' + ('0' * 64) + '"',+ )+ for attribute in attributes:+ root = ET.fromstring(+ '<svg xmlns="http://www.w3.org/2000/svg">'+ f'<defs><g id="source" {attribute}><rect width="10" height="10"/></g></defs>'+ '<use href="#source"/></svg>'+ )+ with self.subTest(attribute=attribute):+ with self.assertRaises(UseExpansionError):+ expand_local_use_references(root)++ def test_canonical_and_legacy_table_markers_export_identically(self):+ payload = '{"x":80,"y":80,"width":320,"height":180,"rows":[["A"]]}'+ canonical = f'''<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <g id="table" data-pptx-replace-with="table">+ <metadata type="application/json">{payload}</metadata>+ <rect x="80" y="80" width="320" height="180" fill="#FFFFFF"/>+ </g>+</svg>'''+ legacy = f'''<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1280 720">+ <g id="table" data-pptx-native="table">+ <metadata data-pptx-native="table">{payload}</metadata>+ <rect x="80" y="80" width="320" height="180" fill="#FFFFFF"/>+ </g>+</svg>'''++ with tempfile.TemporaryDirectory() as tmp_dir:+ canonical_path = Path(tmp_dir) / 'canonical.svg'+ legacy_path = Path(tmp_dir) / 'legacy.svg'+ canonical_path.write_text(canonical, encoding='utf-8')+ legacy_path.write_text(legacy, encoding='utf-8')+ canonical_result = convert_svg_to_slide_shapes(+ canonical_path,+ native_objects=True,+ )+ legacy_result = convert_svg_to_slide_shapes(+ legacy_path,+ native_objects=True,+ )++ self.assertEqual(canonical_result, legacy_result)+if __name__ == '__main__':unittest.main()diff --git a/skills/ppt-master/templates/charts/README.md b/skills/ppt-master/templates/charts/README.mdindex 47bc8b3b..9c7fecd4 100644--- a/skills/ppt-master/templates/charts/README.md+++ b/skills/ppt-master/templates/charts/README.md@@ -12,15 +12,15 @@ To browse the library, open `charts_index.json` and scan the `charts` block top-See [`CHART_STYLE_GUIDE.md`](./CHART_STYLE_GUIDE.md) for color palette, typography, and SVG authoring conventions all templates must follow.-## Native editable export markers+## Native Chart/Table replacement markers-Supported data chart templates include a `<g data-pptx-native="chart">` marker by default, and pure text-grid table templates include a `<g data-pptx-native="table">` marker the same way. The default SVG export path is unchanged: the fallback vector artwork is exported exactly as drawn. When `svg_to_pptx.py --native-objects` is enabled, that marked fallback group is replaced with an editable PowerPoint chart or table using the JSON metadata inside the child `<metadata data-pptx-native="...">` node.+Supported data chart templates include a `<g data-pptx-replace-with="chart">` marker by default, and pure text-grid table templates include a `<g data-pptx-replace-with="table">` marker the same way. The default SVG export path is unchanged: the fallback vector artwork is exported as shape-based DrawingML exactly as drawn. When `svg_to_pptx.py --native-charts-and-tables` is enabled, that fallback group is replaced with a native PowerPoint Chart or Table object using the JSON metadata inside its child `<metadata type="application/json">` node. The legacy `--native-objects` spelling remains a compatibility alias.-`--native-objects` is an explicit editable-first opt-in and may be lossy or visually normalized. Marker-local value labels, center KPIs, callouts, quadrant notes, fixed axis ranges, and custom binning/splits may not survive native replacement unless represented by the payload. ChartEx palette entries do survive when supplied through valid payload colors, but this does not preserve every ChartEx style detail. Detectable information-loss risks should be reported as warnings, not handled by disabling an otherwise supported native marker. Review those warnings and compare the native export with the default SVG export before delivery.+`--native-charts-and-tables` is an explicit native-object opt-in and may be lossy or visually normalized. Replacement-local value labels, center KPIs, callouts, quadrant notes, fixed axis ranges, and custom binning/splits may not survive native replacement unless represented by the payload. ChartEx palette entries do survive when supplied through valid payload colors, but this does not preserve every ChartEx style detail. Detectable information-loss risks should be reported as warnings, not handled by disabling an otherwise supported replacement marker. Review those warnings and compare the native-object export with the default shape-based export before delivery.-Native marker authoring remains active for all 23 currently supported data-chart templates:+Native replacement authoring remains active for all 23 currently supported data-chart templates:-| Family | Active native-marker templates | Native output |+| Family | Active replacement templates | Native output ||---|---|---|| Category comparison | `column_chart`, `horizontal_bar_chart`, `grouped_bar_chart`, `stacked_bar_chart` | Classic category charts || Time trend | `line_chart`, `area_chart`, `stacked_area_chart`, `dual_axis_line_chart` | Classic line/area/combo charts |@@ -29,7 +29,7 @@ Native marker authoring remains active for all 23 currently supported data-chart| Specialty business charts | `waterfall_chart`, `funnel_chart`, `stock_chart`, `radar_chart` | ChartEx or classic specialty charts || Text-grid tables | `basic_table`, `financial_statement_table` | Native DrawingML tables |-Markers must include explicit `name`, `x`, `y`, `width`, and `height` fields so the editable frame aligns with the fallback drawing. Keep legends, explanatory cards, source notes, center KPIs, and custom callouts outside the marker when they must remain as separate editable shapes; otherwise accept and review the native-export warning. Canonical rectangular merged text cells may use anchor-only `row_span` / `col_span` metadata with blank covered cells; nonrectangular merges and graphical cells (harvey balls, rating dots, avatars) stay unmarked on the SVG fallback route. Per-side borders, plain multi-paragraph cells, and the closed run-rich paragraph schema use the contracts in [`shared-standards.md`](../../references/shared-standards.md#native-pptx-table--chart-markers-opt-in). Relationship-bearing text, structural line breaks, fields, tabs, bullets, and arbitrary rich-text OOXML stay on the SVG fallback route.+Replacement payloads must include explicit `name`, `x`, `y`, `width`, and `height` fields so the native frame aligns with the fallback drawing. Keep legends, explanatory cards, source notes, center KPIs, and custom callouts outside the marked group when they must remain separate shapes; otherwise accept and review the native-object export warning. Canonical rectangular merged text cells may use anchor-only `row_span` / `col_span` metadata with blank covered cells; nonrectangular merges and graphical cells (harvey balls, rating dots, avatars) stay unmarked on the SVG fallback route. Per-side borders, plain multi-paragraph cells, and the closed run-rich paragraph schema use the contracts in [`shared-standards.md`](../../references/shared-standards.md#powerpoint-native-chart--table-replacement-markers-opt-in). Relationship-bearing text, structural line breaks, fields, tabs, bullets, and arbitrary rich-text OOXML stay on the SVG fallback route.## Usagediff --git a/skills/ppt-master/templates/charts/area_chart.svg b/skills/ppt-master/templates/charts/area_chart.svgindex d5cbd6e3..8a8354aa 100644--- a/skills/ppt-master/templates/charts/area_chart.svg+++ b/skills/ppt-master/templates/charts/area_chart.svg@@ -48,8 +48,8 @@font-size="15" fill="#475569">Mobile Visits</text></g><!-- Chart Area -->- <g id="area_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="area_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "area_chart","x": 105,diff --git a/skills/ppt-master/templates/charts/bar_of_pie_chart.svg b/skills/ppt-master/templates/charts/bar_of_pie_chart.svgindex 63c144d7..24745d09 100644--- a/skills/ppt-master/templates/charts/bar_of_pie_chart.svg+++ b/skills/ppt-master/templates/charts/bar_of_pie_chart.svg@@ -24,8 +24,8 @@<text x="60" y="112" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="14" font-weight="700" fill="#64748B" letter-spacing="1"><tspan>BAR OF PIE · STACKED DETAIL FOR SMALL SEGMENTS</tspan></text></g>- <g id="bar_of_pie_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="bar_of_pie_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "bar_of_pie_chart","x": 80,diff --git a/skills/ppt-master/templates/charts/basic_table.svg b/skills/ppt-master/templates/charts/basic_table.svgindex 4043cf3b..23b73e75 100644--- a/skills/ppt-master/templates/charts/basic_table.svg+++ b/skills/ppt-master/templates/charts/basic_table.svg@@ -10,8 +10,8 @@<text x="80" y="70" font-family="Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="32" font-weight="800" fill="#0F172A">Quarterly Resource Allocation</text><text x="80" y="100" font-family="Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="14" font-weight="700" fill="#64748B" letter-spacing="1">BASIC TABLE FORMAT · TRADITIONAL FULL GRID WITH ALIGNMENT RULES</text><!-- ==================== Table Structure ==================== -->- <g id="basic_table" data-pptx-native="table">- <metadata data-pptx-native="table">+ <g id="basic_table" data-pptx-replace-with="table">+ <metadata type="application/json">{"name": "basic_table","x": 80,diff --git a/skills/ppt-master/templates/charts/box_plot_chart.svg b/skills/ppt-master/templates/charts/box_plot_chart.svgindex bfac589d..c1b1e6d3 100644--- a/skills/ppt-master/templates/charts/box_plot_chart.svg+++ b/skills/ppt-master/templates/charts/box_plot_chart.svg@@ -47,8 +47,8 @@<text x="60" y="90" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"font-size="18" fill="#64748B">2025 Salary Report · Unit: 10K/Year</text><!-- Chart Area -->- <g id="box_plot_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="box_plot_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "box_plot_chart","x": 30,diff --git a/skills/ppt-master/templates/charts/bubble_chart.svg b/skills/ppt-master/templates/charts/bubble_chart.svgindex cd958459..e62e4545 100644--- a/skills/ppt-master/templates/charts/bubble_chart.svg+++ b/skills/ppt-master/templates/charts/bubble_chart.svg@@ -51,8 +51,8 @@<text x="60" y="90" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif"font-size="18" fill="#64748B">Market Size vs Growth vs Share · Bubble Size = Market Share</text><!-- Chart Area -->- <g id="bubble_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="bubble_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "bubble_chart","x": 20,diff --git a/skills/ppt-master/templates/charts/column_chart.svg b/skills/ppt-master/templates/charts/column_chart.svgindex f618d7f4..4219f318 100644--- a/skills/ppt-master/templates/charts/column_chart.svg+++ b/skills/ppt-master/templates/charts/column_chart.svg@@ -39,8 +39,8 @@<text x="60" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="18" fill="#64748B">Q3 2025 · Unit: Millions</text><!-- Chart Area -->- <g id="column_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="column_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "column_chart","x": 125,diff --git a/skills/ppt-master/templates/charts/donut_chart.svg b/skills/ppt-master/templates/charts/donut_chart.svgindex 3dd9299b..02cc9608 100644--- a/skills/ppt-master/templates/charts/donut_chart.svg+++ b/skills/ppt-master/templates/charts/donut_chart.svg@@ -23,8 +23,8 @@font-size="34" font-weight="bold" fill="#0F172A">Product Line Revenue Share</text><text x="60" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="18" fill="#64748B">Q3 2025 · Total Revenue $520M</text>- <g id="donut_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="donut_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "donut_chart","x": 140,diff --git a/skills/ppt-master/templates/charts/dual_axis_line_chart.svg b/skills/ppt-master/templates/charts/dual_axis_line_chart.svgindex 139343d7..1b3bf461 100644--- a/skills/ppt-master/templates/charts/dual_axis_line_chart.svg+++ b/skills/ppt-master/templates/charts/dual_axis_line_chart.svg@@ -55,8 +55,8 @@<text x="1009" y="155" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="13" font-weight="600" fill="#6C5CE7" text-anchor="middle">Phase 05: Recovery</text><!-- Chart Area -->- <g id="dual_axis_line_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="dual_axis_line_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "dual_axis_line_chart","x": 14,diff --git a/skills/ppt-master/templates/charts/financial_statement_table.svg b/skills/ppt-master/templates/charts/financial_statement_table.svgindex 57db45d6..6e563fb3 100644--- a/skills/ppt-master/templates/charts/financial_statement_table.svg+++ b/skills/ppt-master/templates/charts/financial_statement_table.svg@@ -19,8 +19,8 @@<text x="80" y="70" font-family="Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="32" font-weight="800" fill="#0F172A">Income Statement Summary</text><text x="80" y="100" font-family="Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="14" font-weight="700" fill="#64748B" letter-spacing="1">Q1 - Q3 2025 · IN MILLIONS USD (UNAUDITED)</text><!-- ==================== Table Structure ==================== -->- <g id="financial_statement_table" data-pptx-native="table">- <metadata data-pptx-native="table">+ <g id="financial_statement_table" data-pptx-replace-with="table">+ <metadata type="application/json">{"name": "financial_statement_table","x": 80,diff --git a/skills/ppt-master/templates/charts/funnel_chart.svg b/skills/ppt-master/templates/charts/funnel_chart.svgindex 3c43e4cc..aa490e43 100644--- a/skills/ppt-master/templates/charts/funnel_chart.svg+++ b/skills/ppt-master/templates/charts/funnel_chart.svg@@ -44,8 +44,8 @@<text x="60" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="18" fill="#64748B">Quarterly Performance · Total Volume: 10,000</text><!-- Funnel Chart -->- <g id="funnel_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="funnel_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "funnel_chart","x": 340,diff --git a/skills/ppt-master/templates/charts/grouped_bar_chart.svg b/skills/ppt-master/templates/charts/grouped_bar_chart.svgindex 79e57270..726e8d21 100644--- a/skills/ppt-master/templates/charts/grouped_bar_chart.svg+++ b/skills/ppt-master/templates/charts/grouped_bar_chart.svg@@ -50,8 +50,8 @@font-size="15" fill="#475569">Division C</text></g><!-- Chart Area -->- <g id="grouped_bar_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="grouped_bar_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "grouped_bar_chart","x": 125,diff --git a/skills/ppt-master/templates/charts/histogram_chart.svg b/skills/ppt-master/templates/charts/histogram_chart.svgindex b886210b..b2269d1c 100644--- a/skills/ppt-master/templates/charts/histogram_chart.svg+++ b/skills/ppt-master/templates/charts/histogram_chart.svg@@ -26,8 +26,8 @@font-size="34" font-weight="800" fill="#0F172A"><tspan>Order Value Distribution</tspan></text><text x="60" y="100" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="14" font-weight="700" fill="#64748B" letter-spacing="1"><tspan>SAMPLE ORDERS · USD THOUSANDS</tspan></text>- <g id="histogram_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="histogram_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "histogram_chart","x": 80,diff --git a/skills/ppt-master/templates/charts/horizontal_bar_chart.svg b/skills/ppt-master/templates/charts/horizontal_bar_chart.svgindex ec76e643..a3b2f1b3 100644--- a/skills/ppt-master/templates/charts/horizontal_bar_chart.svg+++ b/skills/ppt-master/templates/charts/horizontal_bar_chart.svg@@ -36,8 +36,8 @@<text x="60" y="105" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="18" fill="#64748B">2025 Consumer Survey Report · Sample Size N=5,000</text><!-- Chart Area -->- <g id="horizontal_bar_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="horizontal_bar_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "horizontal_bar_chart","x": 290,diff --git a/skills/ppt-master/templates/charts/line_chart.svg b/skills/ppt-master/templates/charts/line_chart.svgindex 5459caf3..b160c0c3 100644--- a/skills/ppt-master/templates/charts/line_chart.svg+++ b/skills/ppt-master/templates/charts/line_chart.svg@@ -41,8 +41,8 @@<text x="60" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="16" font-weight="600" fill="#64748B" letter-spacing="1">FISCAL YEAR 2025 · JAN TO DEC · VALUES IN USD MILLIONS</text><!-- Chart Area -->- <g id="line_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="line_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "line_chart","x": 120,diff --git a/skills/ppt-master/templates/charts/pareto_chart.svg b/skills/ppt-master/templates/charts/pareto_chart.svgindex 3a181d5c..cf080311 100644--- a/skills/ppt-master/templates/charts/pareto_chart.svg+++ b/skills/ppt-master/templates/charts/pareto_chart.svg@@ -32,8 +32,8 @@<circle cx="305" cy="6" r="4" fill="#FFFFFF" stroke="#F43F5E" stroke-width="2"/><text x="330" y="10" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="13" font-weight="600" fill="#475569">Cumulative %</text></g>- <g id="pareto_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="pareto_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "pareto_chart","x": 56,diff --git a/skills/ppt-master/templates/charts/pie_chart.svg b/skills/ppt-master/templates/charts/pie_chart.svgindex c861448b..971b75f9 100644--- a/skills/ppt-master/templates/charts/pie_chart.svg+++ b/skills/ppt-master/templates/charts/pie_chart.svg@@ -23,8 +23,8 @@font-size="32" font-weight="800" fill="#0F172A">Market Share Distribution</text><text x="60" y="115" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="14" font-weight="700" fill="#64748B" letter-spacing="1.5">Q3 2025 · TOTAL INDUSTRY MARKET SIZE: $12B</text>- <g id="pie_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="pie_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "pie_chart","x": 229.79,diff --git a/skills/ppt-master/templates/charts/pie_of_pie_chart.svg b/skills/ppt-master/templates/charts/pie_of_pie_chart.svgindex 669519d6..5e7b6542 100644--- a/skills/ppt-master/templates/charts/pie_of_pie_chart.svg+++ b/skills/ppt-master/templates/charts/pie_of_pie_chart.svg@@ -24,8 +24,8 @@<text x="60" y="112" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="14" font-weight="700" fill="#64748B" letter-spacing="1"><tspan>PIE OF PIE · SECONDARY DETAIL FOR SMALL SEGMENTS</tspan></text></g>- <g id="pie_of_pie_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="pie_of_pie_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "pie_of_pie_chart","x": 80,diff --git a/skills/ppt-master/templates/charts/radar_chart.svg b/skills/ppt-master/templates/charts/radar_chart.svgindex 185d7ca6..79c38fe7 100644--- a/skills/ppt-master/templates/charts/radar_chart.svg+++ b/skills/ppt-master/templates/charts/radar_chart.svg@@ -33,8 +33,8 @@<!-- ==================== Header ==================== --><text x="60" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="32" font-weight="800" fill="#0F172A">Comprehensive Capability Assessment</text><text x="60" y="100" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="14" font-weight="700" fill="#64748B" letter-spacing="1">PRODUCT A VS PRODUCT B · SIX-DIMENSIONAL ANALYSIS</text>- <g id="radar_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="radar_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "radar_chart","x": 290,diff --git a/skills/ppt-master/templates/charts/scatter_chart.svg b/skills/ppt-master/templates/charts/scatter_chart.svgindex 8bf6761a..1f337ab2 100644--- a/skills/ppt-master/templates/charts/scatter_chart.svg+++ b/skills/ppt-master/templates/charts/scatter_chart.svg@@ -35,8 +35,8 @@<text x="60" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="32" font-weight="800" fill="#0F172A">Ad Spend vs. Sales Revenue Correlation</text><text x="60" y="100" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="14" font-weight="700" fill="#64748B" letter-spacing="1">2025 REGIONAL DATA · SAMPLE SIZE N=28</text><!-- ==================== Chart Area ==================== -->- <g id="scatter_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="scatter_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "scatter_chart","x": 30,diff --git a/skills/ppt-master/templates/charts/stacked_area_chart.svg b/skills/ppt-master/templates/charts/stacked_area_chart.svgindex bd8beb8c..f314090d 100644--- a/skills/ppt-master/templates/charts/stacked_area_chart.svg+++ b/skills/ppt-master/templates/charts/stacked_area_chart.svg@@ -54,8 +54,8 @@<text x="400" y="11" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="14" font-weight="600" fill="#64748B">Other</text></g><!-- ==================== Chart Area ==================== -->- <g id="stacked_area_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="stacked_area_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "stacked_area_chart","x": 85,diff --git a/skills/ppt-master/templates/charts/stacked_bar_chart.svg b/skills/ppt-master/templates/charts/stacked_bar_chart.svgindex 6de138b6..008e22f3 100644--- a/skills/ppt-master/templates/charts/stacked_bar_chart.svg+++ b/skills/ppt-master/templates/charts/stacked_bar_chart.svg@@ -35,8 +35,8 @@<text x="60" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="32" font-weight="800" fill="#0F172A">Quarterly Revenue Breakdown</text><text x="60" y="100" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="14" font-weight="700" fill="#64748B" letter-spacing="1">2024-2025 FINANCIAL YEAR · UNIT: $M</text><!-- ==================== Chart Area ==================== -->- <g id="stacked_bar_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="stacked_bar_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "stacked_bar_chart","x": 120,diff --git a/skills/ppt-master/templates/charts/stock_chart.svg b/skills/ppt-master/templates/charts/stock_chart.svgindex 9f992263..5f39a2c2 100644--- a/skills/ppt-master/templates/charts/stock_chart.svg+++ b/skills/ppt-master/templates/charts/stock_chart.svg@@ -24,8 +24,8 @@<text x="60" y="112" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="14" font-weight="700" fill="#64748B" letter-spacing="1"><tspan>SAMPLE EQUITY PRICE · OPEN, HIGH, LOW, CLOSE</tspan></text></g>- <g id="stock_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="stock_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "stock_chart","x": 80,diff --git a/skills/ppt-master/templates/charts/sunburst_chart.svg b/skills/ppt-master/templates/charts/sunburst_chart.svgindex cf8c3b90..367dc974 100644--- a/skills/ppt-master/templates/charts/sunburst_chart.svg+++ b/skills/ppt-master/templates/charts/sunburst_chart.svg@@ -22,8 +22,8 @@font-size="34" font-weight="800" fill="#0F172A"><tspan>Revenue Mix by Segment</tspan></text><text x="60" y="100" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif"font-size="14" font-weight="700" fill="#64748B" letter-spacing="1"><tspan>2025 PORTFOLIO REVENUE · HIERARCHICAL SHARE VIEW</tspan></text>- <g id="sunburst_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="sunburst_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "sunburst_chart","x": 224,diff --git a/skills/ppt-master/templates/charts/treemap_chart.svg b/skills/ppt-master/templates/charts/treemap_chart.svgindex 0d6546e0..469714d9 100644--- a/skills/ppt-master/templates/charts/treemap_chart.svg+++ b/skills/ppt-master/templates/charts/treemap_chart.svg@@ -35,8 +35,8 @@<text x="60" y="70" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="32" font-weight="800" fill="#0F172A">Annual Budget Allocation</text><text x="60" y="100" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="14" font-weight="700" fill="#64748B" letter-spacing="1">2025 BUDGET · TOTAL $12.0M · AREA REPRESENTS ALLOCATION %</text><!-- ==================== Treemap Area (1000x480) ==================== -->- <g id="treemap_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="treemap_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "treemap_chart","x": 60,diff --git a/skills/ppt-master/templates/charts/waterfall_chart.svg b/skills/ppt-master/templates/charts/waterfall_chart.svgindex 9cdd1fd4..1546cd20 100644--- a/skills/ppt-master/templates/charts/waterfall_chart.svg+++ b/skills/ppt-master/templates/charts/waterfall_chart.svg@@ -49,8 +49,8 @@<text x="254" y="25" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif" font-size="14" font-weight="700" fill="#475569">Decrease</text></g><!-- ==================== Chart Area ==================== -->- <g id="waterfall_chart" data-pptx-native="chart">- <metadata data-pptx-native="chart">+ <g id="waterfall_chart" data-pptx-replace-with="chart">+ <metadata type="application/json">{"name": "waterfall_chart","x": 120,diff --git a/skills/ppt-master/templates/layouts/presentation_core/templates/19_chart_insight.svg b/skills/ppt-master/templates/layouts/presentation_core/templates/19_chart_insight.svgindex a8089845..d9534b58 100644--- a/skills/ppt-master/templates/layouts/presentation_core/templates/19_chart_insight.svg+++ b/skills/ppt-master/templates/layouts/presentation_core/templates/19_chart_insight.svg@@ -19,9 +19,9 @@<g id="chart-insight-chart-slot" data-pptx-placeholder="chart" data-pptx-placeholder-idx="1"data-pptx-placeholder-bounds="88 176 712 408"><g id="chart-insight-chart-carrier" data-pptx-placeholder-carrier="true"- data-pptx-native="chart"+ data-pptx-replace-with="chart"data-pptx-fallback-sha256="e39e729fbcd88647bc948bf86f6974592347d171897ee0568376b13330fdb95b">- <metadata data-pptx-native="chart">{"name":"chart_insight","x":88,"y":176,"width":712,"height":408,"type":"column","categories":["Q1","Q2","Q3","Q4"],"series":[{"name":"Actual","values":[42,55,63,78]},{"name":"Plan","values":[48,58,68,74]}],"show_legend":true,"legend_position":"bottom","style":{"colors":["#64748B","#CBD5E1"],"chart_area_fill":"#F4F6F8","plot_area_fill":"#FFFFFF","text_color":"#475569","axis_color":"#CBD5E1","grid_color":"#E2E8F0","font_family":"Arial"}}</metadata>+ <metadata type="application/json">{"name":"chart_insight","x":88,"y":176,"width":712,"height":408,"type":"column","categories":["Q1","Q2","Q3","Q4"],"series":[{"name":"Actual","values":[42,55,63,78]},{"name":"Plan","values":[48,58,68,74]}],"show_legend":true,"legend_position":"bottom","style":{"colors":["#64748B","#CBD5E1"],"chart_area_fill":"#F4F6F8","plot_area_fill":"#FFFFFF","text_color":"#475569","axis_color":"#CBD5E1","grid_color":"#E2E8F0","font_family":"Arial"}}</metadata><rect x="88" y="176" width="712" height="408" rx="8" fill="#FFFFFF"/><rect x="586" y="202" width="12" height="12" rx="2" fill="#64748B"/><text x="606" y="213" fill="#64748B" font-family="Arial, sans-serif" font-size="14">Actual</text>diff --git a/skills/ppt-master/templates/layouts/presentation_core/templates/20_table_summary.svg b/skills/ppt-master/templates/layouts/presentation_core/templates/20_table_summary.svgindex f0299ca5..75077e47 100644--- a/skills/ppt-master/templates/layouts/presentation_core/templates/20_table_summary.svg+++ b/skills/ppt-master/templates/layouts/presentation_core/templates/20_table_summary.svg@@ -19,9 +19,9 @@<g id="table-summary-table-slot" data-pptx-placeholder="table" data-pptx-placeholder-idx="1"data-pptx-placeholder-bounds="88 176 776 408"><g id="table-summary-table-carrier" data-pptx-placeholder-carrier="true"- data-pptx-native="table"+ data-pptx-replace-with="table"data-pptx-fallback-sha256="6537e9228a8e8691fd1870f794329de56b7c51a8c6c40fe4e37d2d8963659f61">- <metadata data-pptx-native="table">{"name":"table_summary","x":88,"y":176,"width":776,"height":408,"strict_grid":true,"column_widths":[3,2,2],"row_heights":[1,1,1,1,1],"style":{"font_family":"Arial","font_size":17,"header_font_size":16,"header_fill":"#E2E8F0","header_text":"#334155","body_fill":"#FFFFFF","body_text":"#475569","band_fill":"#F8FAFC","border_color":"#D6DCE3","border_width":1,"padding":{"left":12,"right":12,"top":6,"bottom":6},"valign":"middle"},"columns":[{"text":"Metric","bold":true},{"text":"Current","align":"r","bold":true},{"text":"Target","align":"r","bold":true}],"rows":[[{"text":"Adoption"},{"text":"68%","align":"r","bold":true},{"text":"80%","align":"r"}],[{"text":"Cycle time"},{"text":"12 d","align":"r","bold":true},{"text":"8 d","align":"r"}],[{"text":"Quality"},{"text":"94%","align":"r","bold":true},{"text":"97%","align":"r"}],[{"text":"Cost index"},{"text":"1.08","align":"r","bold":true},{"text":"1.00","align":"r"}]]}</metadata>+ <metadata type="application/json">{"name":"table_summary","x":88,"y":176,"width":776,"height":408,"strict_grid":true,"column_widths":[3,2,2],"row_heights":[1,1,1,1,1],"style":{"font_family":"Arial","font_size":17,"header_font_size":16,"header_fill":"#E2E8F0","header_text":"#334155","body_fill":"#FFFFFF","body_text":"#475569","band_fill":"#F8FAFC","border_color":"#D6DCE3","border_width":1,"padding":{"left":12,"right":12,"top":6,"bottom":6},"valign":"middle"},"columns":[{"text":"Metric","bold":true},{"text":"Current","align":"r","bold":true},{"text":"Target","align":"r","bold":true}],"rows":[[{"text":"Adoption"},{"text":"68%","align":"r","bold":true},{"text":"80%","align":"r"}],[{"text":"Cycle time"},{"text":"12 d","align":"r","bold":true},{"text":"8 d","align":"r"}],[{"text":"Quality"},{"text":"94%","align":"r","bold":true},{"text":"97%","align":"r"}],[{"text":"Cost index"},{"text":"1.08","align":"r","bold":true},{"text":"1.00","align":"r"}]]}</metadata><rect x="88" y="176" width="776" height="408" rx="8" fill="#FFFFFF" stroke="#D6DCE3" stroke-width="1"/><rect x="88" y="176" width="776" height="72" rx="8" fill="#E2E8F0"/><rect x="88" y="248" width="776" height="84" fill="#FFFFFF"/>diff --git a/skills/ppt-master/workflows/restore-pptx-structure.md b/skills/ppt-master/workflows/restore-pptx-structure.mdindex dcee5e28..4f98c554 100644--- a/skills/ppt-master/workflows/restore-pptx-structure.md+++ b/skills/ppt-master/workflows/restore-pptx-structure.md@@ -83,7 +83,7 @@ Classify each visible object:**Hard rule — no visual redesign**: Do not change wording, geometry, paint, assets, or z-order except for the normalization required to flatten a fixed Master/Layout group. Render before and after any transform-flattening edit and require pixel equivalence.-**Hard rule — native metadata below structural layers**: Keep the complete lossless import artifact in the backup/evidence set. An unchanged imported shape may keep the source metadata already supported by the converter when it remains Slide-local or inside a slot; no additional opt-in marker exists. A logical `<g>` cannot become Master/Layout because those layers require direct atoms. Normalize fixed-layer objects into direct atom(s), rebuilding a preset when supported and otherwise keeping the current SVG fallback. Any geometry, paint, text, or fingerprint change invalidates stale source metadata. `data-pptx-native` remains reserved for chart/table markers.+**Hard rule — native metadata below structural layers**: Keep the complete lossless import artifact in the backup/evidence set. An unchanged imported shape may keep the source metadata already supported by the converter when it remains Slide-local or inside a slot; no additional opt-in marker exists. A logical `<g>` cannot become Master/Layout because those layers require direct atoms. Normalize fixed-layer objects into direct atom(s), rebuilding a preset when supported and otherwise keeping the current SVG fallback. Any geometry, paint, text, or fingerprint change invalidates stale source metadata. `data-pptx-replace-with` remains reserved for optional PowerPoint-native Chart/Table replacement markers.---