@office-kit/pptx-dev 0.6.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +78 -2
- package/dist/cli.mjs +519 -27
- package/dist/cli.mjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-CShdm4G1.mjs → src-CdlqA8pS.mjs} +7 -5
- package/dist/src-CdlqA8pS.mjs.map +1 -0
- package/dist/terminal-client.js +21 -17
- package/package.json +6 -6
- package/dist/src-CShdm4G1.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -16,11 +16,31 @@ npm install
|
|
|
16
16
|
npm run dev
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
For a single-command first launch (macOS/Linux):
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npx --yes @office-kit/pptx-dev@latest init my-slides && cd my-slides && npm install && npm run dev
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The built-in `init` is the starter generator: no separate `degit` checkout is
|
|
26
|
+
needed, and it selects compatible package versions. For an existing project,
|
|
27
|
+
start development with `npm run dev` or `npx office-pptx dev deck.tsx`.
|
|
28
|
+
If you prefer the bare `office-pptx dev deck.tsx` command, install the CLI once
|
|
29
|
+
with `npm install --global @office-kit/pptx-dev@latest`. The local npm script
|
|
30
|
+
continues to use the project's installed version.
|
|
31
|
+
|
|
32
|
+
To update an existing project, stop its dev server and run inside the project:
|
|
33
|
+
|
|
34
|
+
```sh
|
|
35
|
+
npm install -D @office-kit/pptx-dev@latest
|
|
36
|
+
npm run dev
|
|
37
|
+
```
|
|
38
|
+
|
|
19
39
|
Open the local URL printed by the server. Save a slide file, `theme.ts` or `deck.tsx` to rebuild. The viewer
|
|
20
40
|
has a vertical thumbnail strip, a large slide canvas and an AI chat panel on the right. Click a thumbnail or use
|
|
21
41
|
arrow keys, Page Up/Down, Home/End to navigate. Fit/zoom and Present (Escape to
|
|
22
|
-
exit) are viewing controls
|
|
23
|
-
|
|
42
|
+
exit) are viewing controls. Click an object or drag an area for an AI instruction, or double-click text
|
|
43
|
+
to save a literal directly. All edits are persisted in TSX.
|
|
24
44
|
Keep the server running throughout the edit/review loop. Saving updates only the
|
|
25
45
|
changed thumbnails and slide view, preserving zoom, scroll position and presentation
|
|
26
46
|
mode. The previous slide stays visible until its replacement is ready. Rapid edits
|
|
@@ -140,6 +160,62 @@ References: [Claude Code commands](https://code.claude.com/docs/en/commands),
|
|
|
140
160
|
[Claude Code hooks](https://code.claude.com/docs/en/hooks), and
|
|
141
161
|
[Codex non-interactive mode](https://developers.openai.com/codex/noninteractive).
|
|
142
162
|
|
|
163
|
+
## Edit from the slide
|
|
164
|
+
|
|
165
|
+
Hover to see an object's outline, **click an object** to give it an AI instruction,
|
|
166
|
+
or **drag a rectangle** to select an arbitrary area. No mode switching is needed.
|
|
167
|
+
Enter an instruction such as “Move this down a little,” choose an agent pane, and
|
|
168
|
+
click **Apply with AI**. The request includes the slide, preview revision, relative
|
|
169
|
+
bounds and intersecting text. Start Claude Code in that pane first; Codex starts
|
|
170
|
+
when you send. Click the background or press Escape to deselect. Selection also
|
|
171
|
+
clears when the preview or selected slide changes. Shift+Enter inserts a newline;
|
|
172
|
+
Cmd/Ctrl+Enter sends the request.
|
|
173
|
+
|
|
174
|
+
**Double-click a paragraph** to edit it in place. Enter inserts a newline;
|
|
175
|
+
Cmd/Ctrl+Enter or **Save text** saves, and Escape cancels. Direct saves require a
|
|
176
|
+
unique source literal within the entry directory and verify that other slides did
|
|
177
|
+
not change. Computed text, shared values and ambiguous matches use **Apply with AI**
|
|
178
|
+
instead.
|
|
179
|
+
|
|
180
|
+
### Undo and Redo
|
|
181
|
+
|
|
182
|
+
The toolbar's **Undo / Redo** restores actual source and asset changes, including
|
|
183
|
+
AI edits, direct text saves and saves from an external editor. Use **Cmd/Ctrl+Z**
|
|
184
|
+
and **Cmd/Ctrl+Shift+Z** (or Ctrl+Y) while focused on the preview. Inside a text
|
|
185
|
+
field or agent terminal, those keys keep their normal local meaning.
|
|
186
|
+
|
|
187
|
+
An AI turn includes its build repairs and screenshot correction passes. Overlapping
|
|
188
|
+
agent turns are grouped as **Concurrent edits**; Undo waits until all have finished.
|
|
189
|
+
A direct text save and any subsequent AI visual corrections are separate entries.
|
|
190
|
+
New edits clear Redo. File additions and deletions are included; newer external saves
|
|
191
|
+
are recorded as their own edit before Undo, and conflicting writes are refused.
|
|
192
|
+
Undo/Redo rebuilds the preview without asking an agent to reinterpret or change the
|
|
193
|
+
restored design. It also works when an AI edit broke the build.
|
|
194
|
+
|
|
195
|
+
History lasts for the dev server session (browser reloads preserve it), up to 50
|
|
196
|
+
entries / 128 MiB. It covers TS/JS, JSON, CSS, Markdown, YAML, PPTX and image files
|
|
197
|
+
inside the entry directory, excluding symlinks, `node_modules`, `.git`, `dist` and
|
|
198
|
+
`.office-kit`. The tracked project must fit within 64 MiB. Changes outside that
|
|
199
|
+
folder, CLI session state and conversation transcripts are not restored. Keep Git for
|
|
200
|
+
persistent project history.
|
|
201
|
+
|
|
202
|
+
After each successful agent edit or direct text save, the dev server captures
|
|
203
|
+
all changed slides, including slides offscreen. Codex receives PNG attachments;
|
|
204
|
+
Claude Code receives local PNG paths through its Stop hook and is instructed to
|
|
205
|
+
read them. The agent checks overlap, clipping, alignment, spacing and contrast,
|
|
206
|
+
and can make up to two correction passes followed by a final inspection. This is
|
|
207
|
+
AI-assisted review, not a guarantee of pixel-perfect rendering. The preview updates
|
|
208
|
+
as soon as the build finishes, independently of screenshot review.
|
|
209
|
+
|
|
210
|
+
Screenshot capture uses an installed Chrome, or falls back to Playwright Chromium.
|
|
211
|
+
Set `PLAYWRIGHT_CHANNEL` to use another installed Chromium channel. If neither is
|
|
212
|
+
available, install Chrome and restart the dev server. Capture failures are shown
|
|
213
|
+
explicitly; saved edits remain available. If the chosen agent is busy or not started,
|
|
214
|
+
use **Retry visual review** after making it available. Screenshots and review prompts
|
|
215
|
+
are stored locally under `.office-kit/reviews/`; new projects ignore this directory.
|
|
216
|
+
Add `.office-kit/` to `.gitignore` in existing projects. Images are provided to the
|
|
217
|
+
selected AI agent using its existing login and provider settings.
|
|
218
|
+
|
|
143
219
|
## Edit only what changed
|
|
144
220
|
|
|
145
221
|
New projects separate slide order, content and shared styling:
|