feat: MS Office-style pptx editor with live editing and i18n - #287
Draft
baseballyama wants to merge 2 commits into
Draft
feat: MS Office-style pptx editor with live editing and i18n#287baseballyama wants to merge 2 commits into
baseballyama wants to merge 2 commits into
Conversation
… has none A preset shape authored without `text` (e.g. `addSlideShape` with no `text`) has no `<p:txBody>`, so setting text on it later threw `shape "…" has no <p:txBody>`. PowerPoint always gives an autoshape a text body so you can click in and type; these functions now create the body on demand via a shared `ensureTxBody` helper and populate it, matching that behavior. Picture / table shapes still throw, since they are not text-bearing. This surfaced through the editor: inserting a shape and typing into it failed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQKrXTQDSr6XQ4Pb75Yirv
A PowerPoint-style editor at the SvelteKit `/editor` route (Svelte 5), built on the public API. Its defining constraint is *capability coverage*: a generated manifest enumerates all 147 mutating public exports, the command registry binds each to the real library function by name, and a test in the library's own `pnpm test` fails if the manifest drifts — so no authoring function is silently left unreachable. Reachability layers: Ctrl+K command palette (all 147) → auto-generated properties panel → PowerPoint-style ribbon → direct manipulation on the canvas. Direct manipulation aims to match / surpass Google Slides: shapes move for real each frame (one undo per gesture), smart-guide snapping, marquee + multi-select, resize / rotate handles, double-click or type-to-edit inline text, arrow-nudge, Ctrl+D/C/X/V, zoom / fit, and a right-click context menu. A consistent inline SVG icon set replaces emoji. Fully localized (English / Japanese) with a live language switcher; command and category labels come from the manifest's built-in `labelJa` / `labelEn`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HQKrXTQDSr6XQ4Pb75Yirv
baseballyama
force-pushed
the
feat/pptx-editor
branch
from
July 6, 2026 02:25
a2bdec7 to
08e43b4
Compare
baseballyama
marked this pull request as draft
July 24, 2026 06:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a PowerPoint/Google-Slides-style editor at the SvelteKit
/editorroute (Svelte 5), built on the@office-kit/pptxpublic API, and fixes a library bug it surfaced: you could not type text into a freshly-inserted shape. The editor is designed around a capability-coverage guarantee — all 147 mutating public exports are reachable — and is fully localized (English / Japanese).Motivation
Goal: an MS-Office-compatible editing UI that can express everything the library can author, with a mechanism that guarantees feature coverage rather than hand-wiring a subset. A generated manifest + registry + enforcement test provides that guarantee. A second round of work brought direct manipulation up to (and past) Google Slides, then added i18n. While testing text entry with a real mouse,
setShapeTextwas found to throw on shapes authored without a text body — fixed here.No pre-existing issue; this is net-new tooling plus the bug fix it exposed.
Changes
@office-kit/pptx, patch):setShapeText/appendShapeTextnow create the<p:txBody>on demand (via a sharedensureTxBodyhelper) instead of throwinghas no <p:txBody>. Picture / table shapes still throw. Changeset included./editorroute (site/, not published): ribbon, command palette (Ctrl+K, all 147 capabilities), auto-generated properties panel + argument dialogs, slide navigator.labelJa/labelEn.pnpm test):test/editor-capability-coverage.test.tsfails if the manifest drifts from the mutating-export set;test/editor-command-smoke.test.tsdrives the registry end-to-end.Testing
pnpm vitest run— 1240 passed; the 59 failures are pre-existing and allschema-validassertions that need the missingreferences/ecma-376-5thXSD submodule (unrelated to this change; 0 new failures).test/fn-set-shape-text-creates-txbody.test.ts(setShapeText/appendShapeText on a body-less shape + save/load round-trip).tsc --noEmitclean;svelte-checkclean (0/0);oxlintclean.Repro for the fix:
Breaking changes
None.
setShapeText/appendShapeTextcalls that previously threw now succeed; nothing that worked before changes behavior.Checklist
🤖 Generated with Claude Code
https://claude.ai/code/session_01HQKrXTQDSr6XQ4Pb75Yirv