decklight 0.8.1 → 0.10.0

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.
Files changed (138) hide show
  1. package/PLATFORM.md +707 -0
  2. package/README.md +226 -150
  3. package/SPEC.md +803 -888
  4. package/cli/agent-review.mjs +246 -0
  5. package/cli/agents.mjs +35 -9
  6. package/cli/associate.mjs +12 -12
  7. package/cli/audit.mjs +42 -10
  8. package/cli/banner.mjs +41 -17
  9. package/cli/bundle-audio.mjs +190 -0
  10. package/cli/bundle-module.mjs +95 -0
  11. package/cli/bundle.mjs +439 -35
  12. package/cli/cast.mjs +48 -12
  13. package/cli/check-fixes.mjs +186 -0
  14. package/cli/check.mjs +988 -0
  15. package/cli/clone-deck.mjs +179 -0
  16. package/cli/commands.mjs +345 -0
  17. package/cli/comments.mjs +64 -18
  18. package/cli/commit-flow.mjs +51 -22
  19. package/cli/commit-message.mjs +51 -74
  20. package/cli/commit-split.mjs +601 -0
  21. package/cli/deck-refs.mjs +64 -0
  22. package/cli/deck-routes.mjs +67 -0
  23. package/cli/deckfile.mjs +3 -5
  24. package/cli/decklight.mjs +68 -289
  25. package/cli/design-system-deps.mjs +209 -0
  26. package/cli/design-system-edit.mjs +194 -0
  27. package/cli/design-system-refs.mjs +666 -0
  28. package/cli/design-system.mjs +497 -0
  29. package/cli/doctor.mjs +115 -0
  30. package/cli/edit-git.mjs +353 -0
  31. package/cli/edit-handover.mjs +551 -0
  32. package/cli/edit-look.mjs +631 -0
  33. package/cli/edit-slides.mjs +683 -0
  34. package/cli/edit.mjs +2585 -855
  35. package/cli/enhance.mjs +485 -0
  36. package/cli/extension.mjs +10 -10
  37. package/cli/font-refs.mjs +273 -0
  38. package/cli/font.mjs +246 -0
  39. package/cli/git-tree.mjs +1 -1
  40. package/cli/git.mjs +78 -11
  41. package/cli/import.mjs +56 -10
  42. package/cli/init.mjs +407 -236
  43. package/cli/library.mjs +127 -0
  44. package/cli/loader.mjs +3 -1
  45. package/cli/marketplace-autocheck.mjs +200 -0
  46. package/cli/marketplace.mjs +460 -29
  47. package/cli/narrate.mjs +251 -0
  48. package/cli/open-browser.mjs +63 -0
  49. package/cli/open.mjs +961 -0
  50. package/cli/pdf.mjs +64 -17
  51. package/cli/pkg.mjs +44 -2
  52. package/cli/plugin.mjs +43 -41
  53. package/cli/port-conflict.mjs +53 -23
  54. package/cli/pptx-export.mjs +63 -27
  55. package/cli/publish.mjs +8 -4
  56. package/cli/qr.mjs +1 -1
  57. package/cli/record.mjs +85 -23
  58. package/cli/remote.mjs +43 -17
  59. package/cli/restore.mjs +11 -4
  60. package/cli/review-ref.mjs +125 -0
  61. package/cli/review-remote.mjs +92 -48
  62. package/cli/review-routes.mjs +254 -0
  63. package/cli/review-store.mjs +47 -7
  64. package/cli/review-submit.mjs +47 -57
  65. package/cli/runtime-link.mjs +560 -0
  66. package/cli/serve.mjs +236 -45
  67. package/cli/setup.mjs +112 -0
  68. package/cli/sign.mjs +1 -1
  69. package/cli/skill-content.mjs +229 -35
  70. package/cli/skills.mjs +353 -26
  71. package/cli/start.mjs +110 -0
  72. package/cli/supervise.mjs +6 -6
  73. package/cli/theme-refs.mjs +527 -0
  74. package/cli/theme.mjs +181 -137
  75. package/cli/trust.mjs +83 -0
  76. package/cli/units.mjs +112 -47
  77. package/cli/update-check.mjs +1 -5
  78. package/cli/upgrade.mjs +194 -28
  79. package/cli/upstream.mjs +4 -3
  80. package/cli/util.mjs +4 -4
  81. package/cli/wizard.mjs +6 -6
  82. package/dist/build-info.json +1 -1
  83. package/dist/decklight.css +1533 -59
  84. package/dist/decklight.js +258 -115
  85. package/dist/decklight.js.map +4 -4
  86. package/docs/GLOSSARY.md +141 -0
  87. package/docs/architecture.svg +17 -17
  88. package/package.json +4 -2
  89. package/themes/README.md +9 -8
  90. package/themes/reveal-solarized.css +10 -0
  91. package/tools/args.mjs +20 -0
  92. package/tools/atomic-write.mjs +48 -0
  93. package/tools/brand-palette.mjs +717 -0
  94. package/tools/bridge.mjs +1 -1
  95. package/tools/build-groups.mjs +42 -0
  96. package/tools/color.mjs +48 -0
  97. package/tools/deck-html.mjs +396 -11
  98. package/tools/design-system-format.mjs +778 -0
  99. package/tools/design-system-migrations.mjs +207 -0
  100. package/tools/elevenlabs-tts.mjs +110 -17
  101. package/tools/exec.mjs +11 -3
  102. package/tools/extension-check.mjs +31 -7
  103. package/tools/font-format.mjs +190 -0
  104. package/tools/font-stacks.mjs +24 -0
  105. package/tools/gemini-tts.mjs +3 -0
  106. package/tools/lipsync-config.mjs +103 -0
  107. package/tools/lipsync-engines.mjs +205 -2
  108. package/tools/lipsync-server.mjs +264 -41
  109. package/tools/lipsync.mjs +37 -18
  110. package/tools/local-voice.mjs +32 -42
  111. package/tools/narration-manifest.mjs +270 -0
  112. package/tools/narration-synth.mjs +416 -0
  113. package/tools/pptx.mjs +776 -19
  114. package/tools/publish-targets.mjs +1 -1
  115. package/tools/publish-voices.mjs +3 -3
  116. package/tools/recording-impact.mjs +7 -3
  117. package/tools/render-theme.mjs +33 -0
  118. package/tools/review-anchor.mjs +28 -12
  119. package/tools/semver.mjs +40 -0
  120. package/tools/sentences.mjs +180 -0
  121. package/tools/shot.mjs +14 -7
  122. package/tools/site-clip.mjs +114 -0
  123. package/tools/site-voices.mjs +232 -0
  124. package/tools/template-theme.mjs +1 -1
  125. package/tools/test-impact.mjs +17 -10
  126. package/tools/theme-check.mjs +30 -3
  127. package/tools/tts-cache.mjs +4 -3
  128. package/tools/tts-engines.mjs +38 -20
  129. package/tools/tts-setup.mjs +7 -7
  130. package/tools/video-options.mjs +34 -0
  131. package/tools/video.mjs +530 -54
  132. package/tools/voiceover-server.mjs +185 -104
  133. package/tools/voiceover.mjs +119 -261
  134. package/tools/zip.mjs +1 -1
  135. package/cli/dev.mjs +0 -623
  136. package/cli/present.mjs +0 -853
  137. package/cli/review.mjs +0 -361
  138. package/tools/publish-site-voices.mjs +0 -75
package/cli/git.mjs CHANGED
@@ -7,12 +7,24 @@
7
7
  // between them (init learned `auto-detect`, edit never did). One home now.
8
8
 
9
9
  import { execFileSync } from 'node:child_process';
10
- import { existsSync, writeFileSync } from 'node:fs';
10
+ import { existsSync, readFileSync, writeFileSync } from 'node:fs';
11
11
  import { resolve, basename } from 'node:path';
12
12
 
13
+ /**
14
+ * How much a git command may print before Node gives up on it.
15
+ *
16
+ * `execFileSync` caps stdout at 1 MB unless told otherwise, and a bundled deck
17
+ * is routinely bigger than that — the runtime, the themes and the talk in one
18
+ * file. Past the cap the call does not truncate, it THROWS `ENOBUFS`, which
19
+ * read as "no such revision" two layers up and painted the history preview
20
+ * black for every large deck (#508). 128 MB is the number `decorateHistory`
21
+ * already picked for the same reason; this is that decision, named once.
22
+ */
23
+ export const GIT_MAX_BUFFER = 128 * 1024 * 1024;
24
+
13
25
  /** Run git in `cwd`, return trimmed stdout; throws on failure (stderr on e.stderr). */
14
26
  export const git = (args, cwd, exec = execFileSync) =>
15
- exec('git', args, { cwd, encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }).trim();
27
+ exec('git', args, { cwd, encoding: 'utf8', maxBuffer: GIT_MAX_BUFFER, stdio: ['ignore', 'pipe', 'pipe'] }).trim();
16
28
 
17
29
  /** Is `dir` inside a git work tree? (exec injectable for tests) */
18
30
  export function inGitRepo(dir, exec = execFileSync) {
@@ -53,12 +65,41 @@ voiceover/
53
65
  */
54
66
  export function createRepo(dir) {
55
67
  git(['init'], dir);
68
+ ensureReviewAttribute(dir);
56
69
  const ignorePath = resolve(dir, '.gitignore');
57
70
  if (existsSync(ignorePath)) return false;
58
71
  writeFileSync(ignorePath, STARTER_GITIGNORE);
59
72
  return true;
60
73
  }
61
74
 
75
+ /** The line that makes two sidecars merge by concatenation (REVIEW). */
76
+ export const REVIEW_ATTRIBUTE = '*.review.jsonl merge=union';
77
+
78
+ /**
79
+ * Make sure the repository around `dir` declares the union merge for review
80
+ * sidecars. The append-only store is a merge strategy only while git knows
81
+ * to concatenate: without this line a reviewer's first `git pull --rebase`
82
+ * after the author commits a resolve meets a plain add/add conflict on the
83
+ * sidecar and, resolved the usual way, loses their comment. Written the
84
+ * first time decklight touches a sidecar in a repository, and seeded by
85
+ * createRepo, so no one has to know the line exists. Appends to an existing
86
+ * `.gitattributes`, never rewrites one. Returns the file's path when it
87
+ * wrote (for the caller to commit beside the record), null when the line was
88
+ * there already, there is no repository, or the file could not be written.
89
+ */
90
+ export function ensureReviewAttribute(dir) {
91
+ let top;
92
+ try { top = git(['rev-parse', '--show-toplevel'], dir); } catch { return null; }
93
+ const file = resolve(top, '.gitattributes');
94
+ let text = '';
95
+ try { text = existsSync(file) ? readFileSync(file, 'utf8') : ''; } catch { return null; }
96
+ if (/^[ \t]*\*\.review\.jsonl[ \t]+(?:\S+[ \t]+)*merge=union\b/m.test(text)) return null;
97
+ try {
98
+ writeFileSync(file, (text && !text.endsWith('\n') ? `${text}\n` : text) + `${REVIEW_ATTRIBUTE}\n`);
99
+ } catch { return null; }
100
+ return file;
101
+ }
102
+
62
103
  /** Commit the deck if it changed. Returns true when a commit was made. */
63
104
  // ── when to commit (#71) ───────────────────────────────────────────────────
64
105
  // A timer is the wrong boundary for agent-authored edits: the commits land on
@@ -120,6 +161,19 @@ export function commitSubject(raw, fallback) {
120
161
  return /^-/.test(capped) ? `agent: ${capped}` : capped;
121
162
  }
122
163
 
164
+ /**
165
+ * The untracked files under `dir` git does not ignore, relative to it, a
166
+ * wholly new directory said once as `name/` — what an agent run may leave
167
+ * beside the deck. Null when git cannot answer.
168
+ */
169
+ export function untrackedFiles(dir) {
170
+ try {
171
+ const out = execFileSync('git', ['ls-files', '--others', '--exclude-standard', '--directory', '-z', '--', '.'],
172
+ { cwd: dir, encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] });
173
+ return out.split('\0').filter(Boolean).sort();
174
+ } catch { return null; }
175
+ }
176
+
123
177
  /**
124
178
  * The sha of the commit `gitAutocommit` last made, or null.
125
179
  *
@@ -131,19 +185,27 @@ export function commitSubject(raw, fallback) {
131
185
  */
132
186
  export let lastCommitSha = null;
133
187
 
134
- export function gitAutocommit(deckPath, cwd, message = `decklight: autosave ${basename(deckPath)}`) {
188
+ /**
189
+ * Commit the deck, and with it whatever `also` names that exists and changed —
190
+ * the review sidecar beside it (REVIEW: in write mode the sidecar rides the
191
+ * deck's own commits, so a resolve the author pressed R for reaches the
192
+ * reviewer by the same push the deck does). Nothing else: a repository holding
193
+ * somebody's whole project is not decklight's to sweep.
194
+ */
195
+ export function gitAutocommit(deckPath, cwd, message = `decklight: autosave ${basename(deckPath)}`, { also = [] } = {}) {
135
196
  lastCommitSha = null;
197
+ const paths = [deckPath, ...also.filter((p) => p && existsSync(p))];
136
198
  try {
137
- if (!git(['status', '--porcelain', '--', deckPath], cwd)) return false;
138
- git(['add', '--', deckPath], cwd);
199
+ if (!git(['status', '--porcelain', '--', ...paths], cwd)) return false;
200
+ git(['add', '--', ...paths], cwd);
139
201
  try {
140
- git(['commit', '-m', message, '--', deckPath], cwd);
202
+ git(['commit', '-m', message, '--', ...paths], cwd);
141
203
  } catch (e) {
142
204
  // a fresh machine has no git identity — commit anyway rather than
143
205
  // silently dropping the safety net, without touching global config
144
206
  if (!isIdentityError(e)) throw e;
145
207
  git(['-c', 'user.name=decklight', '-c', 'user.email=decklight@localhost',
146
- 'commit', '-m', message, '--', deckPath], cwd);
208
+ 'commit', '-m', message, '--', ...paths], cwd);
147
209
  }
148
210
  try { lastCommitSha = git(['rev-parse', 'HEAD'], cwd); } catch { lastCommitSha = null; }
149
211
  return true;
@@ -178,18 +240,23 @@ export function gitAutocommit(deckPath, cwd, message = `decklight: autosave ${ba
178
240
  // therefore as fresh as your last fetch, and saying so is better than fetching
179
241
  // behind someone's back.
180
242
  //
181
- // ONE named exception: the review check at `decklight author` startup
243
+ // ONE named exception: the review check at `decklight <deck>` startup
182
244
  // (cli/review-remote.mjs), which exists precisely because "somebody reviewed
183
245
  // your deck" is only useful unasked. It is once, detached, off by three
184
246
  // switches that each say why, and nowhere near a SIGINT handler — the shape
185
247
  // update-check.mjs established. SPEC REVIEW states the contract; anything
186
248
  // else that wants to fetch unasked argues there, not here.
249
+ //
250
+ // A PUSH IS ONLY EVER ASKED FOR. The two that run from a request handler run
251
+ // on a click that says so: the reviewer's Submit (cli/review-submit.mjs) and
252
+ // the commit window's Push (cli/commit-split.mjs `pushBranch`). Neither runs
253
+ // on a timer, on startup, or on the way out, and both use noPromptEnv.
187
254
 
188
255
  /**
189
256
  * `owner/repo` from a GitHub remote URL, or null for anything else.
190
257
  *
191
258
  * THE one parser — `pagesUrl` (cli/publish.mjs) derives the Pages site from it
192
- * and `review submit` hands it to `gh --repo`. It lived in both files as the
259
+ * and `comments submit` hands it to `gh --repo`. It lived in both files as the
193
260
  * same regex for a while, which is exactly how one copy grows a spelling the
194
261
  * other refuses.
195
262
  */
@@ -370,7 +437,7 @@ export function remoteState(cwd, { run = git, exec = execFileSync } = {}) {
370
437
  // ── the words ──────────────────────────────────────────────────────────────
371
438
  //
372
439
  // Four places tell you about unpushed work — a toast while authoring, a line
373
- // when author mode exits, the history overlay's footer, and `decklight
440
+ // when write mode exits, the history overlay's footer, and `decklight
374
441
  // history` — and they must not disagree. So none of them writes a sentence:
375
442
  // they all call one of the three functions below. A wording change is then a
376
443
  // diff in one file with a test beside it, rather than four strings that were
@@ -399,7 +466,7 @@ export function pushHint(s) {
399
466
  }
400
467
 
401
468
  /**
402
- * The line author mode prints on its way out, or null for a clean exit.
469
+ * The line write mode prints on its way out, or null for a clean exit.
403
470
  *
404
471
  * This one DOES speak up when there is no remote, unlike `pushHint` — the end
405
472
  * of a session is the moment when "this only exists here" is worth knowing, and
package/cli/import.mjs CHANGED
@@ -26,6 +26,7 @@ import { tmpdir } from 'node:os';
26
26
  import { basename, join, resolve } from 'node:path';
27
27
  import { argReader, isMain } from '../tools/args.mjs';
28
28
  import { THEMES_DIR, themeCss as shippedThemeCss, runtimeCss, runtimeJs } from './pkg.mjs';
29
+ import { configBlockHtml } from './runtime-link.mjs';
29
30
  import { unzip } from '../tools/zip.mjs';
30
31
  import { decodeEntities } from '../tools/ooxml.mjs';
31
32
  import { parseRels, resolvePart, slideOrder, parseSlide, notesText, slideSection, mimeOf } from '../tools/pptx.mjs';
@@ -42,6 +43,15 @@ const USAGE = `usage: decklight import <deck.pptx | deck.key | google-slides-url
42
43
  --build all|none|auto
43
44
  which lists step in [auto]
44
45
  auto follows PowerPoint's own per-paragraph build list
46
+ --shapes auto|strict|text
47
+ when drawn shapes cross as one SVG diagram [auto]
48
+ auto: any two placed shapes where one was drawn — a
49
+ chevron, an ellipse, a loose line — not just typed
50
+ strict: only boxes with an arrow snapped between them
51
+ text: never; every shape's words cross as text
52
+ --inline write a self-contained deck (runtime and theme embedded)
53
+ instead of slides plus a configuration block, which
54
+ decklight plays it with the installed runtime, in either mode
45
55
  --force overwrite an existing output file
46
56
  -v, --verbose print every slide's line, not just the ones with drops
47
57
 
@@ -54,8 +64,8 @@ const USAGE = `usage: decklight import <deck.pptx | deck.key | google-slides-url
54
64
  A Google Slides URL is fetched as .pptx — the deck must be link-shared.
55
65
 
56
66
  A format decklight cannot read itself runs through an installed import
57
- adapter instead, if one is installed for that extension: decklight importer
58
- add <name>, then this command again. -v/--build/drop reporting are the
67
+ adapter instead, if one is installed for that extension: decklight library
68
+ add importer <name>, then this command again. -v/--build/drop reporting are the
59
69
  built-in PowerPoint path's own; a third-party adapter has no equivalent yet.`;
60
70
 
61
71
  /**
@@ -167,7 +177,7 @@ async function fetchSlides(url, { fetchImpl = fetch } = {}) {
167
177
  * The whole conversion, from archive bytes to sections and a report.
168
178
  * Pure apart from the parsing, so the mapping is testable without a CLI.
169
179
  */
170
- export function convert(zip, { build = 'auto' } = {}) {
180
+ export function convert(zip, { build = 'auto', shapes = 'auto' } = {}) {
171
181
  const part = (name) => zip.get(name)?.toString('utf8');
172
182
  const order = slideOrder(part('ppt/presentation.xml'), part('ppt/_rels/presentation.xml.rels'));
173
183
  if (!order.length) throw new Error('no slides found — is this really a PowerPoint file?');
@@ -180,6 +190,7 @@ export function convert(zip, { build = 'auto' } = {}) {
180
190
  if (!xml) continue;
181
191
  const rels = parseRels(part(`${slidePath.replace(/([^/]+)$/, '_rels/$1')}.rels`));
182
192
  const slide = parseSlide(xml, {
193
+ shapes,
183
194
  rels,
184
195
  mediaOf: (target) => {
185
196
  const p = resolvePart(slidePath, target);
@@ -187,6 +198,8 @@ export function convert(zip, { build = 'auto' } = {}) {
187
198
  return bytes ? { bytes, mime: mimeOf(p) } : null;
188
199
  },
189
200
  chartOf: (target) => zip.get(resolvePart(slidePath, target))?.toString() ?? null,
201
+ // the same seam, for the two parts a SmartArt graphic is made of
202
+ diagramOf: (target) => zip.get(resolvePart(slidePath, target))?.toString() ?? null,
190
203
  });
191
204
  n += 1;
192
205
 
@@ -204,8 +217,36 @@ export function convert(zip, { build = 'auto' } = {}) {
204
217
  return { sections, report };
205
218
  }
206
219
 
207
- /** The self-contained deck, runtime and theme inlined — the `init` output shape. */
208
- export function deckHtml(sections, { title, theme, themeCss = null }) {
220
+ /**
221
+ * The deck, in the `init` output shape: slides plus a configuration block, no
222
+ * runtime in the file (#520) — the servers reference the installed one on the
223
+ * way out, `bundle` embeds it at hand-over — or, with `inline`, self-contained.
224
+ * A theme derived from the template's own palette (`--theme template`) is not
225
+ * shipped, so it is always embedded, whatever the runtime does.
226
+ */
227
+ export function deckHtml(sections, { title, theme, themeCss = null, inline = false }) {
228
+ const safeTitle = title.replace(/[<&]/g, (c) => (c === '<' ? '&lt;' : '&amp;'));
229
+ if (!inline) {
230
+ const themeTag = themeCss
231
+ ? `\n <style data-theme="${theme}">\n${themeCss.replace(/<\/(script|style)/gi, '<\\/$1')}\n </style>`
232
+ : '';
233
+ return `<!doctype html>
234
+ <html lang="en">
235
+ <head>
236
+ <meta charset="utf-8">
237
+ <title>${safeTitle}</title>
238
+ ${configBlockHtml({ theme })}${themeTag}
239
+ </head>
240
+ <body>
241
+ <div class="decklight">
242
+
243
+ ${sections.join('\n\n')}
244
+
245
+ </div>
246
+ </body>
247
+ </html>
248
+ `;
249
+ }
209
250
  const css = runtimeCss();
210
251
  // `themeCss` is a theme that is not shipped — the one derived from the
211
252
  // template's own palette and fonts (tools/template-theme.mjs)
@@ -263,7 +304,7 @@ export async function adapterOffer(source, { home } = {}) {
263
304
  if (!offered) return out;
264
305
 
265
306
  out.push(` no adapter for ${ext} — ${offered.qualified} reads it:`,
266
- ` decklight importer add ${offered.qualified}`);
307
+ ` decklight library add importer ${offered.qualified}`);
267
308
  return out;
268
309
  }
269
310
 
@@ -273,7 +314,7 @@ export async function importMain(args = []) {
273
314
  return args.length ? 0 : 1;
274
315
  }
275
316
  const { opt } = argReader(args);
276
- const VALUE = new Set(['-o', '--theme', '--build']);
317
+ const VALUE = new Set(['-o', '--theme', '--build', '--shapes']);
277
318
  const source = args.find((a, i) => !a.startsWith('-') && !VALUE.has(args[i - 1]));
278
319
  if (!source) { console.error(`decklight import: needs a file or a Google Slides URL\n\n${USAGE}`); return 1; }
279
320
 
@@ -292,6 +333,11 @@ export async function importMain(args = []) {
292
333
  console.error(`decklight import: --build must be auto, all or none (got "${build}")`);
293
334
  return 1;
294
335
  }
336
+ const shapes = opt('--shapes', 'auto');
337
+ if (!['auto', 'strict', 'text'].includes(shapes)) {
338
+ console.error(`decklight import: --shapes must be auto, strict or text (got "${shapes}")`);
339
+ return 1;
340
+ }
295
341
 
296
342
  const out = outPath(source, opt('-o'));
297
343
  if (existsSync(out) && !args.includes('--force')) {
@@ -355,7 +401,7 @@ export async function importMain(args = []) {
355
401
  const { html: sectionsHtml } = await runImporter(offered.name, readFileSync(source));
356
402
 
357
403
  const title = basename(out).replace(/\.html$/, '').replace(/-/g, ' ').replace(/^./, (c) => c.toUpperCase());
358
- writeFileSync(out, deckHtml([sectionsHtml], { title, theme }));
404
+ writeFileSync(out, deckHtml([sectionsHtml], { title, theme, inline: args.includes('--inline') }));
359
405
  const slideCount = (sectionsHtml.match(/<section[\s>]/gi) ?? []).length;
360
406
  const kb = Math.round(readFileSync(out).length / 1024);
361
407
  console.error(`${out} · ${slideCount} slide(s) · theme ${theme} · ${kb} KB · imported via ${offered.name}`);
@@ -370,7 +416,7 @@ export async function importMain(args = []) {
370
416
  let result;
371
417
  try {
372
418
  const zip = unzip(bytes);
373
- result = convert(zip, { build });
419
+ result = convert(zip, { build, shapes });
374
420
  // The template's palette and fonts — most of what "our template" means —
375
421
  // are in ppt/theme/theme1.xml. Derived only when asked, because the
376
422
  // default (a shipped theme) is what every existing import produced.
@@ -416,7 +462,7 @@ export async function importMain(args = []) {
416
462
  }
417
463
 
418
464
  const title = basename(out).replace(/\.html$/, '').replace(/-/g, ' ').replace(/^./, (c) => c.toUpperCase());
419
- writeFileSync(out, deckHtml(result.sections, { title, theme, themeCss }));
465
+ writeFileSync(out, deckHtml(result.sections, { title, theme, themeCss, inline: args.includes('--inline') }));
420
466
  const kb = Math.round(readFileSync(out).length / 1024);
421
467
  const hiddenCount = result.report.filter((r) => r.hidden).length;
422
468
  console.error(`${out} · ${result.sections.length} slides${hiddenCount ? ` (${hiddenCount} hidden)` : ''} · theme ${theme} · ${kb} KB`