AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He
fix(pptx-to-svg): block table-cell run-effect loss
hugohe33d5a8c75c8f4
diff --git a/docs/powerpoint-svg-mapping.md b/docs/powerpoint-svg-mapping.mdindex 2e146915..a806bae3 100644--- a/docs/powerpoint-svg-mapping.md+++ b/docs/powerpoint-svg-mapping.md@@ -160,7 +160,7 @@ preset selection and authoring behavior are documented in| Line arrowheads | Registered start/end markers | Native head/tail end properties | `Approximate` for marker size | See the conditional marker contract || Outer shadow | One supported shadow filter graph | Native outer shadow in `a:effectLst` | `Approximate`; one imported shape/connector source `outerShdw` is reconstructed only when its non-zero offset remains classifiable | Zero-offset source shadows and unsupported graph shapes are not silently reclassified || Glow | One supported glow filter graph | Native glow in `a:effectLst` | `Approximate`; one imported shape/connector source glow keeps the registered radius conversion | Review when the glow carries semantic emphasis |-| Imported text-run effect | Unchanged `metadata[data-pptx-part="txbody"]` on a logical shape; import-only blocking effect status for separate vertical-text and relationship-bearing output | Original native run effect inside `p:txBody` | `Native-stable` only while the raw payload remains usable; edits or fallback routes that would drop a non-empty run `effectLst` / `effectDag` block | Not public authoring syntax; table-cell text bodies remain outside this guard |+| Imported text-run effect | Unchanged `metadata[data-pptx-part="txbody"]` on a logical shape; import-only blocking effect status for vertical, relationship-bearing, and table-cell fallback routes | Original native run effect inside `p:txBody` | `Native-stable` only while the raw payload remains usable; edits or fallback routes that would drop a non-empty run `effectLst` / `effectDag` block | Not public authoring syntax; a table-cell run effect also disables the native Table replacement payload || Whole-object transparency | Atomic element `opacity` | Alpha distributed into supported native channels | `Native-normalized` | Prefer channel-specific alpha unless the whole atomic object fades || Group transparency | Compatible `<g opacity>` | Descendant-normalized approximation | `Approximate` with a warning | Generated SVG should prefer descendant alpha || Inner shadow, soft edge, reflection, blur, turbulence, blend mode, or arbitrary mask | No registered native mapping | Explicit geometry alternative or raster asset | `Bake-required`; PPTX import keeps the base object and emits blocking diagnostics for unsupported shape/connector effects, picture/group effect DAGs, and non-empty picture/group effect lists | Handled object effects cannot be reclassified or omitted; text-run safety follows the unchanged-`txBody` row above |@@ -172,7 +172,7 @@ preset selection and authoring behavior are documented in| 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 || 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 |+| 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; imported non-empty run effects block instead of normalizing into an effect-free cell || 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 |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.diff --git a/docs/technical-design.md b/docs/technical-design.mdindex 42c8a914..ef9b8ddd 100644--- a/docs/technical-design.md+++ b/docs/technical-design.md@@ -526,7 +526,7 @@ 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 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.+**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 without a non-empty `effectLst` / `effectDag` normalizes into that schema; a table-cell run effect instead disables native replacement and adds a blocking effect diagnostic. 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 `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.diff --git a/docs/zh/powerpoint-svg-mapping.md b/docs/zh/powerpoint-svg-mapping.mdindex 0b31e0a8..5d458f8a 100644--- a/docs/zh/powerpoint-svg-mapping.md+++ b/docs/zh/powerpoint-svg-mapping.md@@ -155,7 +155,7 @@ PowerPoint 意图| 线条箭头 | 已登记起点/终点 marker | 原生 head/tail end 属性 | marker 大小为 `Approximate` | 见条件 marker 合同 || 外阴影 | 一个受支持 shadow filter 图 | `a:effectLst` 中的原生外阴影 | `Approximate`;仅当非零偏移仍可稳定分类时,才重建单一 shape/connector 来源 `outerShdw` | 零偏移来源阴影和不支持的图结构不会被静默改成其他效果 || 发光 | 一个受支持 glow filter 图 | `a:effectLst` 中的原生发光 | `Approximate`;单一 shape/connector 来源发光保持已登记的半径换算 | 发光承载语义强调时需复核 |-| 导入的文字 run 效果 | 逻辑 shape 上未变更的 `metadata[data-pptx-part="txbody"]`;独立竖排及含关系引用的输出使用仅限导入的阻塞效果状态 | `p:txBody` 内原始原生 run 效果 | 仅在原始 payload 仍可用时为 `Native-stable`;会丢失非空 run `effectLst` / `effectDag` 的编辑或降级路径将被阻断 | 不是公开创作语法;表格单元格文本尚不在该保护范围内 |+| 导入的文字 run 效果 | 逻辑 shape 上未变更的 `metadata[data-pptx-part="txbody"]`;竖排、含关系引用及表格单元格降级路径使用仅限导入的阻塞效果状态 | `p:txBody` 内原始原生 run 效果 | 仅在原始 payload 仍可用时为 `Native-stable`;会丢失非空 run `effectLst` / `effectDag` 的编辑或降级路径将被阻断 | 不是公开创作语法;表格单元格 run 效果还会禁用原生 Table 替换 payload || 整个对象透明度 | 原子元素 `opacity` | alpha 分发至受支持原生通道 | `Native-normalized` | 除非整个原子对象需要淡出,否则优先通道专属 alpha || 组透明度 | 兼容 `<g opacity>` | 后代归一化近似 | `Approximate`,并产生 warning | 生成 SVG 应优先后代 alpha || 内阴影、柔化边缘、倒影、模糊、湍流、混合模式或任意 mask | 无已登记原生映射 | 显式几何替代或栅格资产 | `Bake-required`;PPTX 回导保留基础对象,并对不支持的 shape/connector 效果、图片/组效果 DAG 及非空图片/组效果列表产生阻塞诊断 | 已处理的对象效果不能被改成其他类型或静默省略;文字 run 安全边界见上方未变更 `txBody` 行 |@@ -167,7 +167,7 @@ PowerPoint 意图| 视觉绘制表格 | 普通 SVG shape、line 与 text | 相互独立的可编辑 PowerPoint shape | 保真度遵循各组件对应行 | 它不是原生表格,也没有 PowerPoint 表格编辑模型 || 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 以外的字段 |+| 表格单元格格式 | 已登记原生表格单元格格式字段 | 原生单元格 fill、border、text 与 alignment | `Native-normalized` | 不猜测封闭 schema 以外的字段;导入的非空 run 效果会阻断,而不是归一化成无效果单元格 || 不受支持的原生表格功能 | SVG fallback 或直接源保留 | 保留可见 fallback,或在直接路线保留源 OOXML | 显式 fallback / `Direct preservation` | 不得临时扩展 JSON |PowerPoint 原生 Chart/Table 对象是可选功能。默认导出保留 SVG fallback,并转换为仍可独立编辑的 DrawingML shape,以保持视觉稳定;原生导出改为提供对象的数据源以及图表/表格专属编辑模型,并可能归一化外观。diff --git a/docs/zh/technical-design.md b/docs/zh/technical-design.mdindex 68da809f..c0a502f4 100644--- a/docs/zh/technical-design.md+++ b/docs/zh/technical-design.md@@ -528,7 +528,7 @@ PowerPoint 的 DrawingML 是 SVG 表达力的严格子集,因此主编译路**为什么模板 SVG 保持完整却仍能编译成原生结构。** 模板 SVG 会重复携带继承的 Master/Layout 视觉和示例 Slide 内容,因此可独立打开。生成时由 `page_layouts` 选择该原型,输出 SVG 仍保持视觉闭包。导出器移除重复继承原子、生成真实 Master/Layout part,并把槽位 carrier 与 Slide-local 内容留在 Slide。-**为什么 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。+**为什么 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`。不含非空 `effectLst` / `effectDag` 的来源展示型 run XML 会归一化到该 schema;表格单元格 run 效果则会禁用原生替换,并添加阻塞效果诊断。带 relationship 的文本、扩展节点、换行、字段、tab、项目符号、破损文本 topology、非规范 merge、不安全 border 与非纯色填充仍保持 fallback-only。表格样式 `{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}` 的规范化 fallback 会解析 `wholeTbl`、`firstRow`、横向带状行、主题颜色 / 字体和直接格式覆盖;这不代表完整 built-in/custom style registry。受支持的柱 / 条 / 折线 / 面积、饼 / 圆环、散点 / 气泡图在没有 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` 开关。diff --git a/skills/ppt-master/SKILL.md b/skills/ppt-master/SKILL.mdindex 60fe053d..d77c7365 100644--- a/skills/ppt-master/SKILL.md+++ b/skills/ppt-master/SKILL.md@@ -848,10 +848,12 @@ python3 ${SKILL_DIR}/scripts/svg_to_pptx.py <project_path>> run-level rich text. A rich paragraph contains non-empty `runs`; each run> requires `text` and may use only> `bold` / `italic` / `underline` / `strike` / `color` / `font_size` /-> `font_family` / `lang` / `alt_lang`. Presentation-only source run XML-> normalizes, while relationship-bearing text, extensions, line breaks, fields,-> tabs, bullets, broken text topology, noncanonical merges, and unsafe direct-> formatting remain fallback-only. Imported classic charts+> `font_family` / `lang` / `alt_lang`. Presentation-only source run XML without+> a non-empty `effectLst` / `effectDag` normalizes; a table-cell run effect+> disables native replacement and adds a blocking effect diagnostic.+> Relationship-bearing text, extensions, line breaks, fields, tabs, bullets,+> broken text topology, noncanonical merges, and unsafe direct formatting+> remain fallback-only. Imported classic charts> additionally cover verified column/line/area combos, canonical OHLC stock,> area date-axis cases, verified scatter/bubble axes, radar, safe `of_pie`> `serLines`, and the closed axis/title/legend plus bar-gap/overlap normalizationdiff --git a/skills/ppt-master/references/shared-standards.md b/skills/ppt-master/references/shared-standards.mdindex 897263d5..711acd24 100644--- a/skills/ppt-master/references/shared-standards.md+++ b/skills/ppt-master/references/shared-standards.md@@ -276,7 +276,7 @@ attributes, and no separate source-payload opt-in marker exists.| `data-pptx-geometry-kind="custom"` + `data-pptx-custgeom` | Custom-geometry carrier | Preserve the validated original `a:custGeom` subtree. If the visible path hash is unchanged, export restores formulas, handles, connection sites, text rectangle, and path list exactly; edited paths compile from current SVG geometry. || `data-pptx-start/end-shape-id/site` | Connector logical `<g>` and carrier | Restore `a:stCxn` / `a:endCxn` after scoped shape-id allocation. A connector may retain one zero frame axis; it must not be expanded from visible stroke or marker bounds. || `data-pptx-shape-style` | Native carrier | Preserve a relationship-free `p:style` independently of text, including shapes with no visible text. |-| `data-pptx-effect-status="unsupported"` + `data-pptx-effect-reason` | Imported `p:sp` / `p:cxnSp` logical object and native carrier; imported `p:pic` carrier and logical object; imported `p:grpSp` logical group | Record why an encountered source object or text-run `effectLst` / `effectDag` cannot enter the registered target-specific effect mapping without changing semantics. Checker and export stop with the recorded reason; these attributes are diagnostics, not a preserved effect payload or authoring syntax. |+| `data-pptx-effect-status="unsupported"` + `data-pptx-effect-reason` | Imported `p:sp` / `p:cxnSp` logical object and native carrier; imported `p:pic` carrier and logical object; imported `p:grpSp` logical group; imported table `p:graphicFrame` logical group | Record why an encountered source object or text-run `effectLst` / `effectDag` cannot enter the registered target-specific effect mapping without changing semantics. Checker and export stop with the recorded reason; these attributes are diagnostics, not a preserved effect payload or authoring syntax. || `metadata[data-pptx-part="txbody"]` | Logical shape `<g>` | Preserve unchanged `p:txBody`, including an empty text body. Content, whitespace, positioning, visible typography, or incompatible child-topology edits invalidate the payload. A source payload with run-level effects then blocks checker/export instead of losing those effects; an effect-free payload uses the normal SVG text fallback. |**Import/authoring representation split**:@@ -799,8 +799,13 @@ parts. When such a body contains a non-empty run effect, import keeps itsrebuilt visible text but stamps the same two blocking object markers;relationship-bearing text without a run effect keeps the existing visualfallback.-This conditional guard is not a public run-effect authoring surface and does-not cover table-cell text bodies.+Table-cell text bodies use neither the opaque payload nor the public filter+mapping. A non-empty run effect disables the native Table replacement payload,+keeps the visible table fallback, and stamps its imported `p:graphicFrame`+logical group with the blocking effect status. The existing replacement status+still records any independent table fallback reason; empty effect containers+and effect-free cells remain eligible for the closed native Table schema.+This conditional guard is not a public run-effect authoring surface.The quality checker and exporter preflight enforce the same definition,reference, primitive, target, and numeric-value contract; malformed values arenever replaced by effect defaults during native export.@@ -1533,8 +1538,11 @@ boolean `bold`, `italic`, `underline`, and `strike`, plus optional `color`,`font_size`, one-typeface `font_family`, `lang`, and `alt_lang`. Unknown fields,wrong types, empty run lists, multi-typeface `font_family`, and unsupportedcolors fail fast. PPTX import requires exact physical row/grid topology and-normalizes source presentation-only run XML outside this closed schema, but-relationship-bearing text, extensions, structural line breaks, fields, tabs,+normalizes source presentation-only run XML outside this closed schema only+when it contains no non-empty `rPr` / `defRPr` / `endParaRPr` `effectLst` or+`effectDag`. A table-cell run effect follows the blocking effect contract above+instead of entering either the native payload or an effect-free fallback.+Relationship-bearing text, extensions, structural line breaks, fields, tabs,bullets, malformed run topology, and unsupported text-body structure remainfallback-only.Per-side cell borders use `borders.left|right|top|bottom`, where each value isdiff --git a/skills/ppt-master/scripts/README.md b/skills/ppt-master/scripts/README.mdindex 37658120..aa092f51 100644--- a/skills/ppt-master/scripts/README.md+++ b/skills/ppt-master/scripts/README.md@@ -169,7 +169,7 @@ 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-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.+`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 without a non-empty `effectLst` / `effectDag` normalizes; a table-cell run effect disables native replacement and adds a blocking effect diagnostic. 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-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.diff --git a/skills/ppt-master/scripts/docs/conversion.md b/skills/ppt-master/scripts/docs/conversion.mdindex 49ce4ea8..6089ba2b 100644--- a/skills/ppt-master/scripts/docs/conversion.md+++ b/skills/ppt-master/scripts/docs/conversion.md@@ -255,10 +255,12 @@ safe solid/no-fill per-side borders, plain multi-paragraph cells, and a closedrun-rich paragraph schema.Each run requires `text` and may use only `bold`, `italic`, `underline`,`strike`, `color`, `font_size`, one `font_family`, `lang`, and `alt_lang`.-Presentation-only source run XML normalizes. Relationship-bearing text,-extensions, noncanonical/overlapping merges, nonblank merge slaves, unsafe-border XML, non-solid fills, structural line breaks/fields/tabs/bullets, and-broken text topology remain fallback-only.+Presentation-only source run XML without a non-empty `effectLst` / `effectDag`+normalizes. A table-cell run effect disables native replacement and adds a+blocking effect diagnostic. Relationship-bearing text, extensions,+noncanonical/overlapping merges, nonblank merge slaves, unsafe border XML,+non-solid fills, structural line breaks/fields/tabs/bullets, and broken text+topology remain fallback-only.Markers remain dormantunless a later export uses `--native-charts-and-tables`. That opt-in isdata-object-first: the default fallback still exports as editable DrawingMLdiff --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 b88b0283..7f560199 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@@ -902,6 +902,10 @@ def _render_graphic_table('data-pptx-replacement-status="'f'{_xml_escape(result.native_status)}"')+ if result.effect_reason:+ replacement_attrs.extend(_metadata_group_attrs(+ unsupported_effect_metadata(result.effect_reason)+ ))return result.svg, replacement_attrs, payload_metadatadiff --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 e59ccc53..1f1ce210 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@@ -42,6 +42,8 @@ from dataclasses import dataclassfrom typing import Anyfrom xml.etree import ElementTree as ET+from pptx_effects import txbody_has_run_effects+from .color_resolver import ColorPalette, find_color_elem, resolve_colorfrom .emu_units import (NS,@@ -100,12 +102,13 @@ _BUILTIN_MEDIUM_STYLE_2_ACCENT_1_XML = ET.fromstring(@dataclassclass TableResult:- """Composite render output plus optional native table metadata."""+ """Composite render output, replacement metadata, and effect diagnostics."""svg: str = ""defs: list[str] = Nonenative_payload: dict[str, Any] | None = Nonenative_status: str | None = None+ effect_reason: str | None = Nonedef __post_init__(self) -> None:if self.defs is None:@@ -320,6 +323,14 @@ def convert_tbl(# gridSpan/rowSpan on the anchor cell + hMerge/vMerge on the dropped cells.cells = _build_cell_grid(rows, len(col_widths))merge_status = _canonical_native_merge_status(rows, len(col_widths))+ effect_reason = (+ "unsupported-run-effect-route:table-cell-text"+ if any(+ txbody_has_run_effects(tc.find("a:txBody", NS))+ for tc in tbl.findall(".//a:tc", NS)+ )+ else None+ )if xfrm.rot or xfrm.flip_h or xfrm.flip_v:native_status = "unsupported-native-transform"elif merge_status:@@ -335,7 +346,10 @@ def convert_tbl(native_status = "unsupported-table-geometry"elif _table_has_unsupported_style(tbl):native_status = "unsupported-table-style"- elif _table_has_unsupported_direct_formatting(tbl, palette):+ elif (+ effect_reason+ or _table_has_unsupported_direct_formatting(tbl, palette)+ ):native_status = "unsupported-table-direct-formatting"else:native_status = None@@ -434,6 +448,7 @@ def convert_tbl(defs=defs,native_payload=native_payload,native_status=native_status,+ effect_reason=effect_reason,)diff --git a/skills/ppt-master/scripts/test_svg_quality_checker.py b/skills/ppt-master/scripts/test_svg_quality_checker.pyindex 28b25736..01f69ccb 100644--- a/skills/ppt-master/scripts/test_svg_quality_checker.py+++ b/skills/ppt-master/scripts/test_svg_quality_checker.py@@ -2,6 +2,7 @@"""Regression tests for SVG checker compatibility severity."""import base64+import copyimport contextlibimport ioimport json@@ -411,6 +412,117 @@ class SVGQualityCheckerCompatibilityTests(unittest.TestCase):target.writestr(info, replacements.get(info.filename, data))rewritten.replace(path)+ @staticmethod+ def _write_table_run_effect_fixture(+ path: Path,+ cases: list[tuple[str, bool]],+ ) -> None:+ """Write one real table per run-effect placement and transform case."""+ presentation = Presentation()+ blank = presentation.slide_layouts[6]+ for index, (_placement, _rotated) in enumerate(cases, start=1):+ slide = presentation.slides.add_slide(blank)+ frame = slide.shapes.add_table(+ 1,+ 1,+ Emu(914400),+ Emu(914400),+ Emu(2743200),+ Emu(914400),+ )+ frame.name = f'TABLE EFFECT TEXT {index}'+ frame.table.cell(0, 0).text = f'CELL {index}'+ presentation.save(path)++ pml = 'http://schemas.openxmlformats.org/presentationml/2006/main'+ dml = 'http://schemas.openxmlformats.org/drawingml/2006/main'+ effect_list = ET.fromstring(f'''<a:effectLst xmlns:a="{dml}">+ <a:glow rad="38100"><a:srgbClr val="2563EB"/></a:glow>+</a:effectLst>''')+ with zipfile.ZipFile(path, 'r') as source:+ members = [+ (info, source.read(info.filename))+ for info in source.infolist()+ ]+ member_data = {info.filename: data for info, data in members}+ replacements: dict[str, bytes] = {}++ for index, (placement, rotated) in enumerate(cases, start=1):+ slide_part = f'ppt/slides/slide{index}.xml'+ slide_root = ET.fromstring(member_data[slide_part])+ frame = next(+ candidate+ for candidate in slide_root.findall(f'.//{{{pml}}}graphicFrame')+ if (+ candidate.find(+ f'{{{pml}}}nvGraphicFramePr/{{{pml}}}cNvPr'+ ) is not None+ and candidate.find(+ f'{{{pml}}}nvGraphicFramePr/{{{pml}}}cNvPr'+ ).get('name') == f'TABLE EFFECT TEXT {index}'+ )+ )+ tx_body = frame.find(f'.//{{{dml}}}tc/{{{dml}}}txBody')+ assert tx_body is not None+ paragraph = tx_body.find(f'{{{dml}}}p')+ assert paragraph is not None+ run = paragraph.find(f'{{{dml}}}r')+ assert run is not None++ if placement.startswith('rPr:'):+ run_properties = run.find(f'{{{dml}}}rPr')+ if run_properties is None:+ run_properties = ET.Element(f'{{{dml}}}rPr')+ run.insert(0, run_properties)+ container = placement.split(':', 1)[1]+ if container == 'effectLst':+ run_properties.insert(0, copy.deepcopy(effect_list))+ elif container.startswith('empty-'):+ run_properties.insert(+ 0,+ ET.Element(f'{{{dml}}}{container.removeprefix("empty-")}'),+ )+ else:+ raise AssertionError(+ f'unknown run effect container: {container}'+ )+ elif placement == 'defRPr':+ paragraph_properties = paragraph.find(f'{{{dml}}}pPr')+ if paragraph_properties is None:+ paragraph_properties = ET.Element(f'{{{dml}}}pPr')+ paragraph.insert(0, paragraph_properties)+ default_properties = ET.SubElement(+ paragraph_properties,+ f'{{{dml}}}defRPr',+ )+ default_properties.append(copy.deepcopy(effect_list))+ elif placement == 'endParaRPr':+ end_properties = paragraph.find(f'{{{dml}}}endParaRPr')+ if end_properties is None:+ end_properties = ET.SubElement(+ paragraph,+ f'{{{dml}}}endParaRPr',+ )+ end_properties.insert(0, copy.deepcopy(effect_list))+ elif placement != 'none':+ raise AssertionError(f'unknown table effect placement: {placement}')++ if rotated:+ xfrm = frame.find(f'{{{pml}}}xfrm')+ assert xfrm is not None+ xfrm.set('rot', '60000')+ replacements[slide_part] = ET.tostring(+ slide_root,+ encoding='utf-8',+ xml_declaration=True,+ )++ rewritten = path.with_name(f'{path.stem}-rewritten.pptx')+ with zipfile.ZipFile(rewritten, 'w') as target:+ for info, data in members:+ target.writestr(info, replacements.get(info.filename, data))+ rewritten.replace(path)+@classmethoddef _write_picture_group_effect_fixture(cls, path: Path) -> None:"""Write one real picture and one group with source effects."""@@ -2864,6 +2976,119 @@ class SVGQualityCheckerCompatibilityTests(unittest.TestCase):native_xml = convert_svg_to_slide_shapes(native_path)[0]self.assertEqual(native_xml.count('<a:glow'), 1)+ def test_table_cell_run_effect_import_fails_closed(self):+ cases = [+ ('rPr:effectLst', False),+ ('defRPr', False),+ ('endParaRPr', False),+ ('rPr:empty-effectLst', False),+ ('rPr:empty-effectDag', False),+ ('none', False),+ ('rPr:effectLst', True),+ ]+ effect_slides = {1, 2, 3, 7}+ with tempfile.TemporaryDirectory() as tmp_dir:+ root_dir = Path(tmp_dir)+ pptx_path = root_dir / 'table-run-effects.pptx'+ self._write_table_run_effect_fixture(pptx_path, cases)+ imported = convert_pptx_to_svg(+ pptx_path,+ options=ConvertOptions(inheritance_mode='flat'),+ )+ self.assertEqual(len(imported.slides), len(cases))++ for artifact in imported.slides:+ with self.subTest(slide=artifact.index):+ root = ET.fromstring(artifact.svg)+ group = next(+ elem+ for elem in root.iter()+ if (+ elem.tag.rsplit('}', 1)[-1] == 'g'+ and elem.get('data-name')+ == f'TABLE EFFECT TEXT {artifact.index}'+ )+ )+ self.assertIn(+ f'CELL {artifact.index}',+ ''.join(root.itertext()),+ )+ svg_path = root_dir / f'table-{artifact.index}.svg'+ svg_path.write_text(artifact.svg, encoding='utf-8')++ if artifact.index in effect_slides:+ self.assertIsNone(+ group.get('data-pptx-replace-with')+ )+ expected_status = (+ 'unsupported-native-transform'+ if artifact.index == 7+ else 'unsupported-table-direct-formatting'+ )+ self.assertEqual(+ group.get('data-pptx-replacement-status'),+ expected_status,+ )+ self.assertEqual(+ group.get('data-pptx-effect-status'),+ 'unsupported',+ )+ self.assertEqual(+ group.get('data-pptx-effect-reason'),+ 'unsupported-run-effect-route:table-cell-text',+ )+ self.assertFalse(any(+ elem.tag.rsplit('}', 1)[-1] == 'metadata'+ and elem.get('type') == 'application/json'+ for elem in group+ ))+ status_errors = project_effect_status_errors(root)+ self.assertEqual(len(status_errors), 1)+ checker_result = SVGQualityChecker().check_file(+ str(svg_path)+ )+ self.assertFalse(checker_result['passed'])+ self.assertIn(+ 'unsupported-run-effect-route:table-cell-text',+ '\n'.join(checker_result['errors']),+ )+ for native_objects in (False, True):+ with self.assertRaisesRegex(+ SvgNativeConversionError,+ 'unsupported imported PPTX effect',+ ):+ convert_svg_to_slide_shapes(+ svg_path,+ native_objects=native_objects,+ )+ continue++ self.assertEqual(project_effect_status_errors(root), [])+ self.assertEqual(+ group.get('data-pptx-replace-with'),+ 'table',+ )+ self.assertIsNone(+ group.get('data-pptx-replacement-status')+ )+ self.assertIsNone(group.get('data-pptx-effect-status'))+ self.assertTrue(any(+ elem.tag.rsplit('}', 1)[-1] == 'metadata'+ and elem.get('type') == 'application/json'+ for elem in group+ ))+ checker_result = SVGQualityChecker().check_file(+ str(svg_path)+ )+ self.assertTrue(checker_result['passed'])+ default_xml = convert_svg_to_slide_shapes(svg_path)[0]+ native_xml = convert_svg_to_slide_shapes(+ svg_path,+ native_objects=True,+ )[0]+ self.assertNotIn('<a:tbl>', default_xml)+ self.assertIn('<a:tbl>', native_xml)+def test_picture_and_group_effect_import_is_explicit(self):dml = 'http://schemas.openxmlformats.org/drawingml/2006/main'empty_sp_pr = ET.fromstring(