Skip to content

xdoc-v0.30.0

Latest

Choose a tag to compare

@hustcer hustcer released this 02 Dec 07:38
· 5 commits to main since this release

v0.30.0 - 2026/12/02

Compared with v0.26.0 (82d63a7f5), through tag v0.30.0 (d3e19de53).

Patch migration

  • Shape geometry. Replace set-shape.position and set-shape.size with independent x, y, w, and h fields. Omitted fields keep their effective values. Use dx and dy to move a shape relative to its current position in the parent coordinate space. Use only one of x and dx and one of y and dy. Relative moves require a resolvable starting coordinate. Group edits preserve the group's orientation and its children's coordinate space. Supplied widths and heights must be at least one EMU after conversion.
  • Mutation requirements. Supply a field that performs an edit. For example, set-slide-background requires fill or followMaster, and set-run requires text, font, or hyperlink. For axis lines, gridlines, trendlines, and error bars, use color or width. Title, series, and point outlines also support dash edits and explicit clears. Query the specific operation with xdoc schema --mode ops --ops set-shape, substituting the operation name as needed.
  • Classic chart refresh. set-chart-data and chart bindings in bind-data now preserve supported formatting by default, including titles, legends, axes, data labels, and series styles. Pass preserveFormatting: false to rebuild a classic chart and check the report for chart-formatting-reset. Omit this field for ChartEx targets, including when using legacy flat category data. For classic date axes, use YYYY-MM-DD category labels on or after the chart's date-system epoch. A preserving refresh can refuse unsupported workbook-linked formatting, opaque markup, or incompatible combination-chart layouts before replacing the workbook.
  • Saved patches and sidecars. The patch schema ID remains pptx-patch/v1. Review saved edits before retrying or replaying them. A sidecar containing the removed shape fields can fail, and a classic chart refresh with no explicit preserveFormatting uses the new default when replayed.

Agent preview and static checks

  • Preview. xdoc json-rpc now serves pptx.preview, and xdoc mcp exposes it as pptx_preview. Pass inputPath and a fresh outputDir to render PNGs and receive the pptx-preview/v1 manifest. Use a one-based slides selector such as "1,3-5" to select pages, and contactSheet: true to request a contact sheet. An explicit contactOutputPath must also be unused. If you supply intent, use feature: "convert" and outputType: "png". Selecting fewer pages still counts the whole input toward Free limits.
  • MCP image content. inlineImages defaults to none. Set it to slides with an explicit slides selector, or to contact-sheet with contactSheet: true. Returned images follow manifest order without gaps, up to four images, 720 KiB of original PNG bytes in total, and 3,000 pixels per side. Read the manifest for paths to the other PNGs. The full response has a separate 8 MiB frame limit. If it returns response_frame_too_large, check error.data for previewExitCode and any confirmed artifacts before retrying with fewer slides or with inlining disabled.
  • Cancellation and partial output. Cancel a queued or rendering preview with $/cancelRequest in JSON-RPC or notifications/cancelled in MCP. Once the host permits publication, use the returned result to determine what was written. On partial publication, both protocols report verified files in artifacts. Use a new destination for a retry when a failed call has already written files.
  • Static checks and discovery. pptx.vision-check in JSON-RPC and pptx_vision_check in MCP return pptx-vision/v1. A slide selection scopes the layout findings, while package checks still cover the full deck. Use preview separately to review rendered pixels. xdoc schema --command pptx.preview and xdoc schema --command pptx.vision-check expose agentAccess. Both actions run through the CLI and stdio protocols. The daemon supports inspect and apply for its PPTX actions.

Text, shapes, and tables

  • Replace one literal match across runs. Use replace-paragraph-text-range with slide, shape, paragraph, find, and replace. Slide and paragraph indices are zero-based. find must have exactly one case-sensitive occurrence, counting overlapping occurrences. Pass the exact inspected paragraph as sourceText to guard against stale edits. Use an empty replace to delete the match. Cross-run edits require equivalent formatting and link behavior and stop at breaks, tabs, fields, formulas, or unrecognized markup. The operation preserves stored frame geometry. Check the result visually for text fit.
  • Replace paragraph or frame text with a style template. On set-paragraph and set-text-frame, use preserveFormatting: true with text to carry over first-run formatting and the corresponding paragraph properties. Use set-run.text for individual runs with distinct styles. Replacement can be refused when it would move or discard structured content such as fields or extensions. Review text-formatting-discarded risks when rebuilding text without preservation.
  • Create styled objects in one operation. add-shape accepts fill, line, initial text, font, paragraph format, and rotation. add-text-box accepts fill, line, bullets, and either plain text or structured paragraphs with per-run fonts and hyperlinks. add-paragraph accepts format, and add-run accepts hyperlink. add-table accepts style and can infer both dimensions from non-empty rectangular data when rows and columns are omitted.

Images and asset replay

  • Size and replace pictures. For add-image, use sizing: "auto-aspect" to derive an omitted dimension, or sizing: "contain" to fit and center the image within both supplied dimensions. If intrinsic dimensions are unavailable, check for picture-intrinsic-size-unavailable. The operation uses the supplied bounds and fills omitted dimensions with the 2-inch fallback. set-image accepts replacement media through assetSource or bytesBase64 with mimeType. Replacement keeps the shape ID, transform, stacking order, animations, and click actions. Crop and mask are retained unless supplied in the same edit.
  • Validate assets after substitution. Inline assetSource images can infer MIME when it is omitted. Expanded pictures, picture fills, and image bullets go through asset preparation after substitution, and SVG resource limits cover supported picture slots and layout bindings. Use --asset-root for file-backed sources. Sidecars that need newer image or inline equation asset rules carry a versioned captured patch. An executable that lacks support for that patch version rejects it before editing. Replaying captured media uses the recorded bytes.

Inspection and diagnostics

  • xdoc pptx inspect deck.pptx --json includes layout placeholders and text-frame paragraph counts. Run font facts can include resolved size, bold, italic, and color alongside direct values. Classic chart series can include cached xValues for scatter and bubble charts and bubbleSizes for bubble charts. Treat missing cache entries as unavailable and use the inspected shape ID when names are ambiguous.
  • Patch diagnostics give more context for missing shape names and out-of-range indices. Dry-run reports can flag off-slide geometry, chart series with a different number of values than categories, and formatting that would be lost. pptx i18n-text-plan continues to take one-based slide numbers and emit zero-based patch indices. Generated set-run operations omit unitId when the translation has none.
  • Validate a proposed edit with xdoc pptx apply --input deck.pptx --patch patch.json --dry-run --json. Inspect the written deck before relying on its geometry or formatting in a subsequent patch.

Conversion and preview cleanup

  • Reduced temporary allocations in PPTX parsing and PDF rendering, including chart-cache and gradient processing. Layout previews release their temporary workspace before publishing the PNGs and reporting results.