gutterpress 0.11.6-alpha.2 → 0.11.6-alpha.3

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 (29) hide show
  1. package/dist/api/index.js +3 -3
  2. package/dist/{audit-fdba6axw.js → audit-t4r954ff.js} +5 -5
  3. package/dist/{build-2gjr2rj6.js → build-8gx90w22.js} +5 -5
  4. package/dist/{cli-ersw5g7j.js → cli-5c2xfsmz.js} +1 -1
  5. package/dist/{cli-sekhwex4.js → cli-5vdgncmm.js} +2 -2
  6. package/dist/{cli-c9h2bk2k.js → cli-c5360prx.js} +7 -7
  7. package/dist/{cli-7k2v2sya.js → cli-g6vshy3f.js} +21 -21
  8. package/dist/{cli-wmvvkwcc.js → cli-rra50cp6.js} +1 -1
  9. package/dist/cli.js +14 -14
  10. package/dist/{doctor-vgarhrsg.js → doctor-b1awtn7m.js} +2 -2
  11. package/dist/{engine-w5ed5hmb.js → engine-15dfcy85.js} +2 -2
  12. package/dist/{engine-cbc17ne4.js → engine-amxqsfka.js} +1 -1
  13. package/dist/{ext-hb5k5gga.js → ext-mxxz3p8t.js} +7 -7
  14. package/dist/{gutterpress-viewer-k0xrt5hw.js → gutterpress-viewer-swz6bwfa.js} +25 -3
  15. package/dist/{index-nmykzwb4.js → index-0h00ve4y.js} +32 -32
  16. package/dist/{index-c5ev4r1y.js → index-8xkw284t.js} +7 -7
  17. package/dist/{index-6n15e1ze.js → index-gf1shk3y.js} +1 -1
  18. package/dist/{index-12pvhbyz.js → index-yeej2vhs.js} +2 -2
  19. package/dist/index.js +4 -4
  20. package/dist/lib/remote-auth/sync-messages.d.ts +7 -7
  21. package/dist/{lint-0pfqbs5r.js → lint-vyxf5zmw.js} +5 -5
  22. package/dist/{new-nxxx2mv2.js → new-r3s74yfv.js} +7 -7
  23. package/dist/{preflight-g7xjme17.js → preflight-j9e9m4ea.js} +5 -5
  24. package/dist/{preview-j59b5hg3.js → preview-aprv0c49.js} +6 -6
  25. package/dist/{publish-mzct8ggw.js → publish-4y1kztbd.js} +6 -6
  26. package/dist/{source-provider-54a52bpd.js → source-provider-exy1wakv.js} +1 -1
  27. package/dist/{source-provider-a458mmec.js → source-provider-y9ktprbx.js} +1 -1
  28. package/dist/{validate-z2drbha6.js → validate-sf6hga9e.js} +5 -5
  29. package/package.json +1 -1
package/dist/api/index.js CHANGED
@@ -124,12 +124,12 @@ import {
124
124
  syncProject,
125
125
  testRemoteAccess,
126
126
  validateProjectExtensions
127
- } from "../index-nmykzwb4.js";
127
+ } from "../index-0h00ve4y.js";
128
128
  import {
129
129
  BuildError,
130
130
  DEFAULT_PRINT_OPTS,
131
131
  readyProbeExpr
132
- } from "../index-6n15e1ze.js";
132
+ } from "../index-gf1shk3y.js";
133
133
  import {
134
134
  AUTO_SNAPSHOT_MESSAGE,
135
135
  HISTORY_PAGE_LIMIT,
@@ -141,7 +141,7 @@ import {
141
141
  resolveLogger,
142
142
  restoreVersionWithBackup,
143
143
  switchBranch
144
- } from "../index-c5ev4r1y.js";
144
+ } from "../index-8xkw284t.js";
145
145
  import {
146
146
  capabilitiesFor,
147
147
  detectProjectSource,
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  executeAndReport
3
- } from "./cli-7k2v2sya.js";
3
+ } from "./cli-g6vshy3f.js";
4
4
  import {
5
5
  log
6
- } from "./cli-wmvvkwcc.js";
6
+ } from "./cli-rra50cp6.js";
7
7
  import {
8
8
  UsageError,
9
9
  rejectExtraPositionals,
10
10
  rejectUnknownFlags
11
- } from "./cli-ersw5g7j.js";
12
- import"./cli-sekhwex4.js";
11
+ } from "./cli-5c2xfsmz.js";
12
+ import"./cli-5vdgncmm.js";
13
13
  import"./cli-c41yr7he.js";
14
14
  import {
15
15
  EXIT_CODES
16
16
  } from "./cli-46ycxe6r.js";
17
- import"./cli-c9h2bk2k.js";
17
+ import"./cli-c5360prx.js";
18
18
  import"./cli-v5mp7a6q.js";
19
19
  import"./cli-37x76zdn.js";
20
20
 
@@ -1,23 +1,23 @@
1
1
  import {
2
2
  runBuild,
3
3
  splitOutPath
4
- } from "./cli-7k2v2sya.js";
4
+ } from "./cli-g6vshy3f.js";
5
5
  import {
6
6
  log
7
- } from "./cli-wmvvkwcc.js";
7
+ } from "./cli-rra50cp6.js";
8
8
  import {
9
9
  UsageError,
10
10
  parseFormat,
11
11
  parsePdfxFlavor,
12
12
  rejectExtraPositionals,
13
13
  rejectUnknownFlags
14
- } from "./cli-ersw5g7j.js";
15
- import"./cli-sekhwex4.js";
14
+ } from "./cli-5c2xfsmz.js";
15
+ import"./cli-5vdgncmm.js";
16
16
  import"./cli-c41yr7he.js";
17
17
  import {
18
18
  BuildError
19
19
  } from "./cli-46ycxe6r.js";
20
- import"./cli-c9h2bk2k.js";
20
+ import"./cli-c5360prx.js";
21
21
  import"./cli-v5mp7a6q.js";
22
22
  import"./cli-37x76zdn.js";
23
23
 
@@ -4,7 +4,7 @@ import {
4
4
  // package.json
5
5
  var package_default = {
6
6
  name: "gutterpress",
7
- version: "0.11.6-alpha.2",
7
+ version: "0.11.6-alpha.3",
8
8
  description: "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
9
9
  author: "itlackey",
10
10
  license: "MPL-2.0",
@@ -1445,7 +1445,7 @@ var preview_shell_default = "./preview-shell-gqnc5xxe.js";
1445
1445
  var CGATS21_CRPC1_default = "./CGATS21_CRPC1-g0e3k7kr.icc";
1446
1446
 
1447
1447
  // src/assets/engine/gutterpress-viewer.js
1448
- var gutterpress_viewer_default = "./gutterpress-viewer-k0xrt5hw.js";
1448
+ var gutterpress_viewer_default = "./gutterpress-viewer-swz6bwfa.js";
1449
1449
 
1450
1450
  // src/assets/engine/gutterpress-agent.js
1451
1451
  var gutterpress_agent_default = "./gutterpress-agent-cazqstr1.js";
@@ -2542,7 +2542,7 @@ ${mapCss}`;
2542
2542
  if (layerTraps.length)
2543
2543
  log(`audit: ${layerTraps.length} trapped layer warning(s)`);
2544
2544
  for (const hit of pageBackgrounds)
2545
- diagnose("engine.page-background.unreferenced", `"${hit.url}" is only referenced from "${hit.where}", and Chromium will not print an image referenced nowhere else — the page prints with its background colour alone, with no error. Gutterpress stages and preloads every image your project stylesheets reference, so this one is outside that: it is remote (a url(https://...), which is never staged), or it comes from CSS that does not pass through your stylesheets, or an element in the document uses the same URL as its src, which drops it on its own. Use a local image, referenced from one of your project stylesheets, and not also used as an <img>.`);
2545
+ diagnose("engine.page-background.unreferenced", `"${hit.url}" is only referenced from "${hit.where}", and Chromium will not print an image referenced nowhere else — the page prints with its background color alone, with no error. Gutterpress stages and preloads every image your book's stylesheets reference, so this one is outside that: it is remote (a url(https://...), which is never staged), or it comes from CSS that does not pass through your stylesheets, or an element in the document uses the same URL as its src, which drops it on its own. Use a local image, referenced from one of your book's stylesheets, and not also used as an <img>.`);
2546
2546
  if (pageBackgrounds.length)
2547
2547
  log(`audit: ${pageBackgrounds.length} unreferenced @page background image(s)`);
2548
2548
  for (const d of multicol)
@@ -298,7 +298,7 @@ class LocalFolderSourceProvider {
298
298
  async initVersionHistory(options) {
299
299
  const dir = options.projectDir;
300
300
  if (await findEnclosingRepoDir(dir) !== undefined) {
301
- throw new Error("This folder is already inside a versioned project, so gutterpress " + "won't create a separate history here.");
301
+ throw new Error("This folder is already inside a versioned book, so gutterpress " + "won't create a separate history here.");
302
302
  }
303
303
  return withRepoLock(dir, async () => {
304
304
  const cache = {};
@@ -322,7 +322,7 @@ class LocalFolderSourceProvider {
322
322
  });
323
323
  }
324
324
  snapshot() {
325
- return Promise.reject(new Error("This project has no version history yet. Enable version history first."));
325
+ return Promise.reject(new Error("This book has no version history yet. Enable version history first."));
326
326
  }
327
327
  listHistory() {
328
328
  return Promise.resolve([]);
@@ -331,7 +331,7 @@ class LocalFolderSourceProvider {
331
331
  return Promise.resolve({ entries: [], hasMore: false });
332
332
  }
333
333
  restore() {
334
- return Promise.reject(new Error("This project has no version history yet. Enable version history first."));
334
+ return Promise.reject(new Error("This book has no version history yet. Enable version history first."));
335
335
  }
336
336
  }
337
337
 
@@ -477,7 +477,7 @@ function providerFor(source) {
477
477
  case "local-git-folder":
478
478
  return new LocalGitSourceProvider(source);
479
479
  case "managed-github":
480
- throw new Error("Managed GitHub projects are not supported yet (#15/#16).");
480
+ throw new Error("Managed GitHub books are not supported yet (#15/#16).");
481
481
  }
482
482
  }
483
483
  function gitDirFor(projectDir) {
@@ -492,7 +492,7 @@ async function restoreVersionWithBackup(options) {
492
492
  const { projectDir, id, authorName, authorEmail } = options;
493
493
  const source = await detectProjectSource(projectDir);
494
494
  if (source.type !== "local-git-folder") {
495
- throw new Error("This project has no version history yet. Enable version history first.");
495
+ throw new Error("This book has no version history yet. Enable version history first.");
496
496
  }
497
497
  const provider = new LocalGitSourceProvider(source);
498
498
  const repoDir = gitScopeFor(source);
@@ -510,7 +510,7 @@ async function restoreVersionWithBackup(options) {
510
510
  try {
511
511
  await provider.restoreUnlocked({ projectDir, id });
512
512
  } catch (cause) {
513
- throw new Error(backupId ? "The restore could not be completed, but your work is safe — it was " + `automatically saved as a backup snapshot (${backupId.slice(0, 7)}) ` + "and appears in your version history." : "The restore could not be completed. Your project files were not changed.", { cause });
513
+ throw new Error(backupId ? "The restore could not be completed, but your work is safe — it was " + `automatically saved as a backup snapshot (${backupId.slice(0, 7)}) ` + "and appears in your version history." : "The restore could not be completed. Your book files were not changed.", { cause });
514
514
  }
515
515
  return { restoredId: id, backupId };
516
516
  });
@@ -597,7 +597,7 @@ async function switchBranch(options) {
597
597
  const { projectDir, branch, authorName, authorEmail } = options;
598
598
  const source = await detectProjectSource(projectDir);
599
599
  if (source.type !== "local-git-folder") {
600
- throw new Error("This project has no version history yet. Enable version history first.");
600
+ throw new Error("This book has no version history yet. Enable version history first.");
601
601
  }
602
602
  const repoDir = gitScopeFor(source);
603
603
  return withRepoLock(repoDir, async () => {
@@ -13,12 +13,12 @@ import {
13
13
  stampCreator,
14
14
  stripAnnotations,
15
15
  warn
16
- } from "./cli-wmvvkwcc.js";
16
+ } from "./cli-rra50cp6.js";
17
17
  import {
18
18
  DEBOUNCE,
19
19
  UsageError,
20
20
  resolvePort
21
- } from "./cli-ersw5g7j.js";
21
+ } from "./cli-5c2xfsmz.js";
22
22
  import {
23
23
  MARGIN_BOX_IGNORED_PROPERTIES,
24
24
  RENDER_TIMEOUT_MS,
@@ -28,7 +28,7 @@ import {
28
28
  getAssetsDir,
29
29
  getBrowser,
30
30
  prewarmBrowser
31
- } from "./cli-sekhwex4.js";
31
+ } from "./cli-5vdgncmm.js";
32
32
  import {
33
33
  INSTALL_HINTS,
34
34
  execCapture,
@@ -43,7 +43,7 @@ import {
43
43
  import {
44
44
  hasUncommittedChanges,
45
45
  listWorkdirChanges
46
- } from "./cli-c9h2bk2k.js";
46
+ } from "./cli-c5360prx.js";
47
47
  import {
48
48
  detectProjectSource,
49
49
  repoSubPath
@@ -432,7 +432,7 @@ async function resolveVendoredPluginInstallRoot(projectDir, expectedName, expect
432
432
  realpath(requestedInstallRoot)
433
433
  ]);
434
434
  if (!isContained(realProjectRoot, installRoot)) {
435
- throw new Error("Vendor install root resolves outside the project.");
435
+ throw new Error("Vendor install root resolves outside the book folder.");
436
436
  }
437
437
  return installRoot;
438
438
  }
@@ -3120,12 +3120,12 @@ function escapesProjectRoot(projectDir, absPath) {
3120
3120
  function proseImageRefError(ref, projectDir) {
3121
3121
  const cleaned = stripUrlSuffix(decodeRef(ref));
3122
3122
  if (/^file:/i.test(cleaned) || path3.isAbsolute(cleaned)) {
3123
- return `Image reference must be relative to the project: ${ref}
3124
- ` + ` Copy the file into your project folder and reference it from there.`;
3123
+ return `Image reference must be relative to the book folder: ${ref}
3124
+ ` + ` Copy the file into your book folder and reference it from there.`;
3125
3125
  }
3126
3126
  if (escapesProjectRoot(projectDir, path3.resolve(projectDir, cleaned))) {
3127
- return `Image reference points outside the project: ${ref}
3128
- ` + ` Copy the file into your project folder and reference it from there.`;
3127
+ return `Image reference points outside the book folder: ${ref}
3128
+ ` + ` Copy the file into your book folder and reference it from there.`;
3129
3129
  }
3130
3130
  return null;
3131
3131
  }
@@ -3197,7 +3197,7 @@ async function inlineOne(cssPath, copies, warnings, seen) {
3197
3197
  if (seen.has(abs))
3198
3198
  return "";
3199
3199
  seen.add(abs);
3200
- const source = await readOrThrow(abs, "stylesheet", "the project manifest");
3200
+ const source = await readOrThrow(abs, "stylesheet", "the book manifest");
3201
3201
  const cssDir = path3.dirname(abs);
3202
3202
  let root;
3203
3203
  try {
@@ -6768,7 +6768,7 @@ var check25 = {
6768
6768
  results.push(finding(check25.id, {
6769
6769
  severity: "warning",
6770
6770
  code: "kept-both-versions",
6771
- message: `Two versions of ${withoutOnlineTag(rel)} are in your project — keep the one you want, then delete the other.`,
6771
+ message: `Two versions of ${withoutOnlineTag(rel)} are in your book — keep the one you want, then delete the other.`,
6772
6772
  file: sibling
6773
6773
  }));
6774
6774
  }
@@ -7770,7 +7770,7 @@ async function uncommittedAmong(inputDir, files) {
7770
7770
  async function applyMarkdownlintFixes(ctx) {
7771
7771
  const sourceConfig = ctx.config.validate.source;
7772
7772
  if (sourceConfig.markdownlint === false) {
7773
- log.warn("--fix: source.markdownlint is disabled for this project — no files were fixed.");
7773
+ log.warn("--fix: source.markdownlint is disabled for this book — no files were fixed.");
7774
7774
  return [];
7775
7775
  }
7776
7776
  const files = ctx.markdownFiles;
@@ -8541,7 +8541,7 @@ async function resolveBuildContext(opts) {
8541
8541
  const inputDir = path9.resolve(opts.inputDir);
8542
8542
  const { manifest, manifestDir, manifestPath } = await loadManifestWithPath(opts.manifestPath ?? inputDir, { explicit: opts.manifestPath !== undefined });
8543
8543
  if (manifestPath === null) {
8544
- throw new UsageError(`No project manifest found in ${inputDir}. Looked for ${MANIFEST_FILENAMES.join(" or ")}. ` + "Run from your project folder or pass that folder with `gutterpress build <project-dir>`. " + "For a custom manifest filename, pass `--manifest <path>`.");
8544
+ throw new UsageError(`No book manifest found in ${inputDir}. Looked for ${MANIFEST_FILENAMES.join(" or ")}. ` + "Run from your book folder or pass that folder with `gutterpress build <book-dir>`. " + "For a custom manifest filename, pass `--manifest <path>`.");
8545
8545
  }
8546
8546
  const pdfxConfigOverride = format === "pdfx" ? {
8547
8547
  flavor: opts.pdfxFlavor,
@@ -8768,7 +8768,7 @@ class PdfOutput {
8768
8768
  const rawPdf = pdfxMode ? path9.join(stage, "raw.pdf") : path9.resolve(pdfFile);
8769
8769
  await fsp2.mkdir(path9.dirname(path9.resolve(pdfFile)), { recursive: true });
8770
8770
  log.info("Rendering HTML to PDF via the Gutterpress engine (native Chromium pagination)");
8771
- const { buildNativePdf } = await import("./engine-cbc17ne4.js");
8771
+ const { buildNativePdf } = await import("./engine-amxqsfka.js");
8772
8772
  const engineDiagnostics = await buildNativePdf(htmlFile, rawPdf, {
8773
8773
  title: config.title,
8774
8774
  author: config.authors.length > 0 ? config.authors.join(", ") : undefined,
@@ -10324,7 +10324,7 @@ function resolveScaffoldTargets(requested, preset) {
10324
10324
  async function scaffoldProject(options) {
10325
10325
  const name = (options.name ?? "").trim();
10326
10326
  if (!name) {
10327
- throw new CreateProjectErrorImpl("invalid-name", "A project name is required.");
10327
+ throw new CreateProjectErrorImpl("invalid-name", "A book name is required.");
10328
10328
  }
10329
10329
  const slug = slugifyProjectName(name);
10330
10330
  const folderName = (options.folderName ?? slug).trim();
@@ -10374,7 +10374,7 @@ async function scaffoldProject(options) {
10374
10374
  await writeFile6(path15.join(projectDir, "styles", "book.css"), starterOverridesCss(), "utf8");
10375
10375
  }
10376
10376
  } catch (e) {
10377
- throw new CreateProjectErrorImpl("scaffold-io", `Could not create the project files: ${e instanceof Error ? e.message : String(e)}`);
10377
+ throw new CreateProjectErrorImpl("scaffold-io", `Could not create the book files: ${e instanceof Error ? e.message : String(e)}`);
10378
10378
  }
10379
10379
  try {
10380
10380
  await ensureGitignoreHasDist(projectDir);
@@ -10411,14 +10411,14 @@ async function scaffoldProject(options) {
10411
10411
  openFile = path15.join(projectDir, firstSource);
10412
10412
  await fillTemplateFile(openFile, { "{{TITLE}}": name }).catch(() => {});
10413
10413
  } catch (e) {
10414
- throw new CreateProjectErrorImpl("scaffold-io", `Could not finalise the project files: ${e instanceof Error ? e.message : String(e)}`);
10414
+ throw new CreateProjectErrorImpl("scaffold-io", `Could not finalize the book files: ${e instanceof Error ? e.message : String(e)}`);
10415
10415
  }
10416
10416
  const requested = options.versionHistory ?? "local-git";
10417
10417
  let versionHistory = "none";
10418
10418
  let versionHistoryError;
10419
10419
  if (requested === "local-git") {
10420
10420
  try {
10421
- const { providerFor } = await import("./source-provider-54a52bpd.js");
10421
+ const { providerFor } = await import("./source-provider-exy1wakv.js");
10422
10422
  const provider = providerFor({ type: "local-folder", path: projectDir });
10423
10423
  await provider.initVersionHistory({
10424
10424
  projectDir,
@@ -11244,7 +11244,7 @@ async function prepareVendorParent(projectDir, name) {
11244
11244
  realpath2(packageParent)
11245
11245
  ]);
11246
11246
  if (!isContained2(projectDir, realNpm) || !isContained2(projectDir, realPackageParent)) {
11247
- throw new Error("Plugin install path resolves outside the project.");
11247
+ throw new Error("Plugin install path resolves outside the book folder.");
11248
11248
  }
11249
11249
  return realNpm;
11250
11250
  }
@@ -11326,7 +11326,7 @@ async function installNpmPlugin(projectDirInput, packageSpec, options = {}) {
11326
11326
  finalRoot = vendoredNpmPluginRoot(projectDir, rootRecord.name, rootRecord.version);
11327
11327
  const realFinalParent = await realpath2(path17.dirname(finalRoot));
11328
11328
  if (!isContained2(projectDir, realFinalParent)) {
11329
- throw new Error("Plugin install destination resolves outside the project.");
11329
+ throw new Error("Plugin install destination resolves outside the book folder.");
11330
11330
  }
11331
11331
  try {
11332
11332
  await lstat2(finalRoot);
@@ -11466,7 +11466,7 @@ function indexOfUse(seq, use) {
11466
11466
  function manifestPathFor(projectDir, abs) {
11467
11467
  const rel = path18.relative(path18.resolve(projectDir), abs).split(path18.sep).join("/");
11468
11468
  if (rel === "") {
11469
- throw new Error("An extension cannot be the project folder itself.");
11469
+ throw new Error("An extension cannot be the book folder itself.");
11470
11470
  }
11471
11471
  if (isPathSpecifier(rel))
11472
11472
  return rel;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "./cli-ersw5g7j.js";
3
+ } from "./cli-5c2xfsmz.js";
4
4
  import {
5
5
  execCapture,
6
6
  findTool,
package/dist/cli.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  UsageError,
7
7
  package_default,
8
8
  rejectUnknownFlags
9
- } from "./cli-ersw5g7j.js";
9
+ } from "./cli-5c2xfsmz.js";
10
10
  import {
11
11
  EXIT_CODES
12
12
  } from "./cli-46ycxe6r.js";
@@ -18,16 +18,16 @@ import {
18
18
  import { defineCommand, parseArgs, runMain } from "citty";
19
19
  import { statSync } from "node:fs";
20
20
  var SUBCOMMANDS = {
21
- new: () => import("./new-nxxx2mv2.js").then((m) => m.default),
22
- preview: () => import("./preview-j59b5hg3.js").then((m) => m.default),
23
- build: () => import("./build-2gjr2rj6.js").then((m) => m.default),
24
- publish: () => import("./publish-mzct8ggw.js").then((m) => m.default),
25
- lint: () => import("./lint-0pfqbs5r.js").then((m) => m.default),
26
- validate: () => import("./validate-z2drbha6.js").then((m) => m.default),
27
- audit: () => import("./audit-fdba6axw.js").then((m) => m.default),
28
- preflight: () => import("./preflight-g7xjme17.js").then((m) => m.default),
29
- doctor: () => import("./doctor-vgarhrsg.js").then((m) => m.default),
30
- ext: () => import("./ext-hb5k5gga.js").then((m) => m.default)
21
+ new: () => import("./new-r3s74yfv.js").then((m) => m.default),
22
+ preview: () => import("./preview-aprv0c49.js").then((m) => m.default),
23
+ build: () => import("./build-8gx90w22.js").then((m) => m.default),
24
+ publish: () => import("./publish-4y1kztbd.js").then((m) => m.default),
25
+ lint: () => import("./lint-vyxf5zmw.js").then((m) => m.default),
26
+ validate: () => import("./validate-sf6hga9e.js").then((m) => m.default),
27
+ audit: () => import("./audit-t4r954ff.js").then((m) => m.default),
28
+ preflight: () => import("./preflight-j9e9m4ea.js").then((m) => m.default),
29
+ doctor: () => import("./doctor-b1awtn7m.js").then((m) => m.default),
30
+ ext: () => import("./ext-mxxz3p8t.js").then((m) => m.default)
31
31
  };
32
32
  var VERSION = package_default.version;
33
33
  var main = defineCommand({
@@ -52,7 +52,7 @@ async function preflightRequiredInvocations(rawArgs) {
52
52
  const [command, ...commandArgs] = rawArgs;
53
53
  try {
54
54
  if (command === "new") {
55
- const { newArgs } = await import("./new-nxxx2mv2.js");
55
+ const { newArgs } = await import("./new-r3s74yfv.js");
56
56
  rejectUnknownFlags(commandArgs, newArgs, "new");
57
57
  const parsed = parseArgs(commandArgs, {
58
58
  ...newArgs,
@@ -64,7 +64,7 @@ async function preflightRequiredInvocations(rawArgs) {
64
64
  return;
65
65
  }
66
66
  if (command === "preflight") {
67
- const { preflightArgs } = await import("./preflight-g7xjme17.js");
67
+ const { preflightArgs } = await import("./preflight-j9e9m4ea.js");
68
68
  rejectUnknownFlags(commandArgs, preflightArgs, "preflight");
69
69
  const parsed = parseArgs(commandArgs, {
70
70
  ...preflightArgs,
@@ -84,7 +84,7 @@ async function preflightRequiredInvocations(rawArgs) {
84
84
  }
85
85
  if (subcommand.startsWith("-"))
86
86
  return;
87
- const { EXT_SUBCOMMANDS, extAddArgs, extRemoveArgs, extEnableArgs, extDisableArgs } = await import("./ext-hb5k5gga.js");
87
+ const { EXT_SUBCOMMANDS, extAddArgs, extRemoveArgs, extEnableArgs, extDisableArgs } = await import("./ext-mxxz3p8t.js");
88
88
  if (!EXT_SUBCOMMANDS.includes(subcommand)) {
89
89
  throw new UsageError(`gutterpress ext: unknown command "${subcommand}"`);
90
90
  }
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  getSystemDiagnostics,
3
3
  log
4
- } from "./cli-wmvvkwcc.js";
4
+ } from "./cli-rra50cp6.js";
5
5
  import {
6
6
  UsageError,
7
7
  rejectExtraPositionals,
8
8
  rejectUnknownFlags
9
- } from "./cli-ersw5g7j.js";
9
+ } from "./cli-5c2xfsmz.js";
10
10
  import"./cli-c41yr7he.js";
11
11
  import"./cli-46ycxe6r.js";
12
12
  import"./cli-37x76zdn.js";
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  build
3
- } from "./index-12pvhbyz.js";
3
+ } from "./index-yeej2vhs.js";
4
4
  import {
5
5
  BuildError,
6
6
  RENDER_TIMEOUT_MS,
7
7
  assertMilestone,
8
8
  connectChromium,
9
9
  getBrowser
10
- } from "./index-6n15e1ze.js";
10
+ } from "./index-gf1shk3y.js";
11
11
  import"./index-37x76zdn.js";
12
12
 
13
13
  // src/lib/engine.ts
@@ -4,7 +4,7 @@ import {
4
4
  build,
5
5
  connectChromium,
6
6
  getBrowser
7
- } from "./cli-sekhwex4.js";
7
+ } from "./cli-5vdgncmm.js";
8
8
  import"./cli-c41yr7he.js";
9
9
  import {
10
10
  BuildError
@@ -10,21 +10,21 @@ import {
10
10
  removeExtension,
11
11
  searchNpmExtensions,
12
12
  setExtensionEnabled
13
- } from "./cli-7k2v2sya.js";
14
- import"./cli-wmvvkwcc.js";
13
+ } from "./cli-g6vshy3f.js";
14
+ import"./cli-rra50cp6.js";
15
15
  import {
16
16
  UsageError,
17
17
  exitForUsage,
18
18
  rejectExtraPositionals,
19
19
  rejectUnknownFlags,
20
20
  resolveProjectDir
21
- } from "./cli-ersw5g7j.js";
22
- import"./cli-sekhwex4.js";
21
+ } from "./cli-5c2xfsmz.js";
22
+ import"./cli-5vdgncmm.js";
23
23
  import"./cli-c41yr7he.js";
24
24
  import {
25
25
  EXIT_CODES
26
26
  } from "./cli-46ycxe6r.js";
27
- import"./cli-c9h2bk2k.js";
27
+ import"./cli-c5360prx.js";
28
28
  import"./cli-v5mp7a6q.js";
29
29
  import"./cli-37x76zdn.js";
30
30
 
@@ -92,12 +92,12 @@ async function requireProjectDir(dir, verb) {
92
92
  info = await stat(projectDir);
93
93
  } catch (error) {
94
94
  if (error.code === "ENOENT") {
95
- throw new UsageError(`Project directory does not exist: ${projectDir}`);
95
+ throw new UsageError(`Book folder does not exist: ${projectDir}`);
96
96
  }
97
97
  throw error;
98
98
  }
99
99
  if (!info.isDirectory()) {
100
- throw new UsageError(`Project path is not a directory: ${projectDir}`);
100
+ throw new UsageError(`Book path is not a folder: ${projectDir}`);
101
101
  }
102
102
  return projectDir;
103
103
  }
@@ -65,7 +65,26 @@
65
65
  overflow: auto;
66
66
  /* Standalone pages use \`--gutterpress-fit-zoom\`; embedded previews use the
67
67
  host-owned \`--gutterpress-zoom\`. fitZoom() guarantees only one is active. */
68
- zoom: calc(var(--gutterpress-zoom, 1) * var(--gutterpress-fit-zoom, 1));
68
+ --gp-zoom: calc(var(--gutterpress-zoom, 1) * var(--gutterpress-fit-zoom, 1));
69
+ /* Zoom is a pure paint transform, NEVER CSS \`zoom\`. \`zoom\` changes layout
70
+ inputs (font sizes and lengths are scaled before text shaping and
71
+ LayoutUnit snapping), so Chromium's column fragmentation broke lines at
72
+ different points per zoom level: in the user guide a paragraph sat on
73
+ page 6 at 50% and page 7 at 25%, and the same book paginated differently
74
+ at 25/50/75/100/150% (#318). \`transform\` leaves layout untouched, so the
75
+ pages are the ones print produces at every zoom.
76
+ Layout width is the visible width / zoom, which is what \`zoom\` gave.
77
+ A transform does not shrink the parent's layout box, so a scaled-down
78
+ stage would leave dead scroll space below it. Taking the stage out of
79
+ flow makes the viewport's scrollable overflow exactly its transformed
80
+ extent, as \`zoom\` had it. */
81
+ position: absolute;
82
+ top: 0;
83
+ left: 0;
84
+ box-sizing: border-box;
85
+ width: calc(100% / var(--gp-zoom));
86
+ transform: scale(var(--gp-zoom));
87
+ transform-origin: 0 0;
69
88
  }
70
89
 
71
90
  /* One flow strip per named-page run. Chromium fragments its content into
@@ -281,7 +300,9 @@
281
300
  background: none;
282
301
  padding: 0;
283
302
  overflow: visible;
284
- zoom: 1;
303
+ position: static;
304
+ width: auto;
305
+ transform: none;
285
306
  }
286
307
  .gp-layer,
287
308
  .gp-warning,
@@ -1565,7 +1586,8 @@
1565
1586
  return stripMetrics(strip).stride;
1566
1587
  }
1567
1588
  function cssZoomOf(el) {
1568
- return el.currentCSSZoom ?? 1;
1589
+ const stage = el.closest(".gp-stage") ?? document.body;
1590
+ return new DOMMatrixReadOnly(getComputedStyle(stage).transform).a || 1;
1569
1591
  }
1570
1592
  function stripMetrics(strip) {
1571
1593
  const cs = getComputedStyle(strip);
@@ -18,7 +18,7 @@ import {
18
18
  resolveChromiumExecutable,
19
19
  run,
20
20
  spawnCapture
21
- } from "./index-6n15e1ze.js";
21
+ } from "./index-gf1shk3y.js";
22
22
  import {
23
23
  errorLogData,
24
24
  gitFs,
@@ -31,7 +31,7 @@ import {
31
31
  snapshotStagingMarkerPath,
32
32
  snapshotWorkingTreeUnlocked,
33
33
  withRepoLock
34
- } from "./index-c5ev4r1y.js";
34
+ } from "./index-8xkw284t.js";
35
35
  import {
36
36
  detectProjectSource,
37
37
  repoSubPath,
@@ -434,7 +434,7 @@ async function resolveVendoredPluginInstallRoot(projectDir, expectedName, expect
434
434
  realpath(requestedInstallRoot)
435
435
  ]);
436
436
  if (!isContained(realProjectRoot, installRoot)) {
437
- throw new Error("Vendor install root resolves outside the project.");
437
+ throw new Error("Vendor install root resolves outside the book folder.");
438
438
  }
439
439
  return installRoot;
440
440
  }
@@ -1224,13 +1224,13 @@ var MSG_SYNCED = "Your changes are online.";
1224
1224
  var MSG_SYNCED_MERGED = "Your changes are online, combined with changes from the online copy.";
1225
1225
  var MSG_OFFLINE = "Your changes are saved on this computer. gutterpress couldn't reach the online repository — try syncing again when you're back online.";
1226
1226
  var MSG_AUTH = "The online repository didn't accept the saved connection. Reconnect and try again.";
1227
- var MSG_INSECURE_TRANSPORT = "This project's online address isn't secure, so the saved connection wasn't sent — connections are never sent over an insecure address. Switch the address to a secure one (starting with https), or to a local loopback address for a server on this computer, to sync.";
1227
+ var MSG_INSECURE_TRANSPORT = "This book's online address isn't secure, so the saved connection wasn't sent — connections are never sent over an insecure address. Switch the address to a secure one (starting with https), or to a local loopback address for a server on this computer, to sync.";
1228
1228
  var MSG_BUSY = "The online copy is changing very quickly right now. Your work is saved on this computer — try Sync again in a moment.";
1229
- var MSG_HISTORY_UNREADABLE = "This project's version history can't be read, so syncing can't continue. Your writing is safe — every file is still here on this computer. To get history and syncing working again, download a fresh copy of the project from online, then move any recent changes into it.";
1230
- var MSG_UNRELATED = "This project and the online copy have no history in common, so they can't be combined. Either the online address points at a different project, or this project's own history was lost and started over. Your writing is safe — every file is still here on this computer. Check the online address; if it is correct, download a fresh copy from online and move any recent changes into it.";
1231
- var MSG_NO_REMOTE = "This project isn't connected to an online repository yet.";
1232
- var MSG_SSH_REMOTE = "This project's online address uses SSH (git@…), which gutterpress can't sync to. Switch it to the web (HTTPS) address to sync from here.";
1233
- var MSG_NO_BRANCH = "This project's version history isn't on a named branch, so it can't be synced right now.";
1229
+ var MSG_HISTORY_UNREADABLE = "This book's version history can't be read, so syncing can't continue. Your writing is safe — every file is still here on this computer. To get history and syncing working again, download a fresh copy of the book from online, then move any recent changes into it.";
1230
+ var MSG_UNRELATED = "This book and the online copy have no history in common, so they can't be combined. Either the online address points at a different book, or this book's own history was lost and started over. Your writing is safe — every file is still here on this computer. Check the online address; if it is correct, download a fresh copy from online and move any recent changes into it.";
1231
+ var MSG_NO_REMOTE = "This book isn't connected to an online repository yet.";
1232
+ var MSG_SSH_REMOTE = "This book's online address uses SSH (git@…), which gutterpress can't sync to. Switch it to the web (HTTPS) address to sync from here.";
1233
+ var MSG_NO_BRANCH = "This book's version history isn't on a named branch, so it can't be synced right now.";
1234
1234
  var SYNC_SNAPSHOT_MESSAGE = "Automatic backup of your work";
1235
1235
  var SYNC_LATE_EDIT_MESSAGE = "Saved the edit you made while syncing";
1236
1236
  function onlineSiblingPath(filepath) {
@@ -3368,12 +3368,12 @@ function escapesProjectRoot(projectDir, absPath) {
3368
3368
  function proseImageRefError(ref, projectDir) {
3369
3369
  const cleaned = stripUrlSuffix(decodeRef(ref));
3370
3370
  if (/^file:/i.test(cleaned) || path3.isAbsolute(cleaned)) {
3371
- return `Image reference must be relative to the project: ${ref}
3372
- ` + ` Copy the file into your project folder and reference it from there.`;
3371
+ return `Image reference must be relative to the book folder: ${ref}
3372
+ ` + ` Copy the file into your book folder and reference it from there.`;
3373
3373
  }
3374
3374
  if (escapesProjectRoot(projectDir, path3.resolve(projectDir, cleaned))) {
3375
- return `Image reference points outside the project: ${ref}
3376
- ` + ` Copy the file into your project folder and reference it from there.`;
3375
+ return `Image reference points outside the book folder: ${ref}
3376
+ ` + ` Copy the file into your book folder and reference it from there.`;
3377
3377
  }
3378
3378
  return null;
3379
3379
  }
@@ -3445,7 +3445,7 @@ async function inlineOne(cssPath, copies, warnings, seen) {
3445
3445
  if (seen.has(abs))
3446
3446
  return "";
3447
3447
  seen.add(abs);
3448
- const source = await readOrThrow(abs, "stylesheet", "the project manifest");
3448
+ const source = await readOrThrow(abs, "stylesheet", "the book manifest");
3449
3449
  const cssDir = path3.dirname(abs);
3450
3450
  let root;
3451
3451
  try {
@@ -4875,7 +4875,7 @@ import git from "isomorphic-git";
4875
4875
  // package.json
4876
4876
  var package_default = {
4877
4877
  name: "gutterpress",
4878
- version: "0.11.6-alpha.2",
4878
+ version: "0.11.6-alpha.3",
4879
4879
  description: "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
4880
4880
  author: "itlackey",
4881
4881
  license: "MPL-2.0",
@@ -5329,7 +5329,7 @@ async function uncommittedAmong(inputDir, files) {
5329
5329
  async function applyMarkdownlintFixes(ctx) {
5330
5330
  const sourceConfig = ctx.config.validate.source;
5331
5331
  if (sourceConfig.markdownlint === false) {
5332
- log.warn("--fix: source.markdownlint is disabled for this project — no files were fixed.");
5332
+ log.warn("--fix: source.markdownlint is disabled for this book — no files were fixed.");
5333
5333
  return [];
5334
5334
  }
5335
5335
  const files = ctx.markdownFiles;
@@ -7760,7 +7760,7 @@ var check25 = {
7760
7760
  results.push(finding(check25.id, {
7761
7761
  severity: "warning",
7762
7762
  code: "kept-both-versions",
7763
- message: `Two versions of ${withoutOnlineTag(rel)} are in your project — keep the one you want, then delete the other.`,
7763
+ message: `Two versions of ${withoutOnlineTag(rel)} are in your book — keep the one you want, then delete the other.`,
7764
7764
  file: sibling
7765
7765
  }));
7766
7766
  }
@@ -9031,7 +9031,7 @@ async function resolveBuildContext(opts) {
9031
9031
  const inputDir = path9.resolve(opts.inputDir);
9032
9032
  const { manifest, manifestDir, manifestPath } = await loadManifestWithPath(opts.manifestPath ?? inputDir, { explicit: opts.manifestPath !== undefined });
9033
9033
  if (manifestPath === null) {
9034
- throw new UsageError(`No project manifest found in ${inputDir}. Looked for ${MANIFEST_FILENAMES.join(" or ")}. ` + "Run from your project folder or pass that folder with `gutterpress build <project-dir>`. " + "For a custom manifest filename, pass `--manifest <path>`.");
9034
+ throw new UsageError(`No book manifest found in ${inputDir}. Looked for ${MANIFEST_FILENAMES.join(" or ")}. ` + "Run from your book folder or pass that folder with `gutterpress build <book-dir>`. " + "For a custom manifest filename, pass `--manifest <path>`.");
9035
9035
  }
9036
9036
  const pdfxConfigOverride = format === "pdfx" ? {
9037
9037
  flavor: opts.pdfxFlavor,
@@ -9258,7 +9258,7 @@ class PdfOutput {
9258
9258
  const rawPdf = pdfxMode ? path9.join(stage, "raw.pdf") : path9.resolve(pdfFile);
9259
9259
  await fsp2.mkdir(path9.dirname(path9.resolve(pdfFile)), { recursive: true });
9260
9260
  log.info("Rendering HTML to PDF via the Gutterpress engine (native Chromium pagination)");
9261
- const { buildNativePdf } = await import("./engine-w5ed5hmb.js");
9261
+ const { buildNativePdf } = await import("./engine-15dfcy85.js");
9262
9262
  const engineDiagnostics = await buildNativePdf(htmlFile, rawPdf, {
9263
9263
  title: config.title,
9264
9264
  author: config.authors.length > 0 ? config.authors.join(", ") : undefined,
@@ -11066,7 +11066,7 @@ function resolveScaffoldTargets(requested, preset) {
11066
11066
  async function scaffoldProject(options) {
11067
11067
  const name = (options.name ?? "").trim();
11068
11068
  if (!name) {
11069
- throw new CreateProjectErrorImpl("invalid-name", "A project name is required.");
11069
+ throw new CreateProjectErrorImpl("invalid-name", "A book name is required.");
11070
11070
  }
11071
11071
  const slug = slugifyProjectName(name);
11072
11072
  const folderName = (options.folderName ?? slug).trim();
@@ -11116,7 +11116,7 @@ async function scaffoldProject(options) {
11116
11116
  await writeFile8(path16.join(projectDir, "styles", "book.css"), starterOverridesCss(), "utf8");
11117
11117
  }
11118
11118
  } catch (e) {
11119
- throw new CreateProjectErrorImpl("scaffold-io", `Could not create the project files: ${e instanceof Error ? e.message : String(e)}`);
11119
+ throw new CreateProjectErrorImpl("scaffold-io", `Could not create the book files: ${e instanceof Error ? e.message : String(e)}`);
11120
11120
  }
11121
11121
  try {
11122
11122
  await ensureGitignoreHasDist(projectDir);
@@ -11153,14 +11153,14 @@ async function scaffoldProject(options) {
11153
11153
  openFile = path16.join(projectDir, firstSource);
11154
11154
  await fillTemplateFile(openFile, { "{{TITLE}}": name }).catch(() => {});
11155
11155
  } catch (e) {
11156
- throw new CreateProjectErrorImpl("scaffold-io", `Could not finalise the project files: ${e instanceof Error ? e.message : String(e)}`);
11156
+ throw new CreateProjectErrorImpl("scaffold-io", `Could not finalize the book files: ${e instanceof Error ? e.message : String(e)}`);
11157
11157
  }
11158
11158
  const requested = options.versionHistory ?? "local-git";
11159
11159
  let versionHistory = "none";
11160
11160
  let versionHistoryError;
11161
11161
  if (requested === "local-git") {
11162
11162
  try {
11163
- const { providerFor } = await import("./source-provider-a458mmec.js");
11163
+ const { providerFor } = await import("./source-provider-y9ktprbx.js");
11164
11164
  const provider = providerFor({ type: "local-folder", path: projectDir });
11165
11165
  await provider.initVersionHistory({
11166
11166
  projectDir,
@@ -11205,7 +11205,7 @@ async function adoptFolder(options) {
11205
11205
  throw new CreateProjectErrorImpl("scaffold-io", `Not a folder: ${dir}`);
11206
11206
  }
11207
11207
  if (MANIFEST_FILENAMES.some((name) => existsSync12(path16.join(dir, name)))) {
11208
- throw new CreateProjectErrorImpl("target-exists", "This folder is already a Gutterpress project.");
11208
+ throw new CreateProjectErrorImpl("target-exists", "This folder is already a Gutterpress book.");
11209
11209
  }
11210
11210
  const template = options.template ?? "book";
11211
11211
  const title = (options.title ?? "").trim() || prettifyFolderName(path16.basename(dir));
@@ -11252,7 +11252,7 @@ styles:
11252
11252
  let versionHistoryError;
11253
11253
  if (requested === "local-git") {
11254
11254
  try {
11255
- const { providerFor } = await import("./source-provider-a458mmec.js");
11255
+ const { providerFor } = await import("./source-provider-y9ktprbx.js");
11256
11256
  const provider = providerFor({ type: "local-folder", path: dir });
11257
11257
  await provider.initVersionHistory({
11258
11258
  projectDir: dir,
@@ -12301,7 +12301,7 @@ async function prepareVendorParent(projectDir, name) {
12301
12301
  realpath2(packageParent)
12302
12302
  ]);
12303
12303
  if (!isContained2(projectDir, realNpm) || !isContained2(projectDir, realPackageParent)) {
12304
- throw new Error("Plugin install path resolves outside the project.");
12304
+ throw new Error("Plugin install path resolves outside the book folder.");
12305
12305
  }
12306
12306
  return realNpm;
12307
12307
  }
@@ -12383,7 +12383,7 @@ async function installNpmPlugin(projectDirInput, packageSpec, options = {}) {
12383
12383
  finalRoot = vendoredNpmPluginRoot(projectDir, rootRecord.name, rootRecord.version);
12384
12384
  const realFinalParent = await realpath2(path19.dirname(finalRoot));
12385
12385
  if (!isContained2(projectDir, realFinalParent)) {
12386
- throw new Error("Plugin install destination resolves outside the project.");
12386
+ throw new Error("Plugin install destination resolves outside the book folder.");
12387
12387
  }
12388
12388
  try {
12389
12389
  await lstat2(finalRoot);
@@ -12523,7 +12523,7 @@ function indexOfUse(seq, use) {
12523
12523
  function manifestPathFor(projectDir, abs) {
12524
12524
  const rel = path20.relative(path20.resolve(projectDir), abs).split(path20.sep).join("/");
12525
12525
  if (rel === "") {
12526
- throw new Error("An extension cannot be the project folder itself.");
12526
+ throw new Error("An extension cannot be the book folder itself.");
12527
12527
  }
12528
12528
  if (isPathSpecifier(rel))
12529
12529
  return rel;
@@ -14449,7 +14449,7 @@ async function assertCloneTarget(dir) {
14449
14449
  try {
14450
14450
  const entries = await readdir9(dir);
14451
14451
  if (entries.length > 0) {
14452
- throw new Error("That folder already has files in it. Choose an empty folder for the project.");
14452
+ throw new Error("That folder already has files in it. Choose an empty folder for the book.");
14453
14453
  }
14454
14454
  } catch (e) {
14455
14455
  if (e.code === "ENOENT")
@@ -14474,7 +14474,7 @@ function friendlyCloneError(e) {
14474
14474
  if (e instanceof Error && /already has files/i.test(e.message)) {
14475
14475
  return e;
14476
14476
  }
14477
- return new Error("The project couldn't be downloaded from GitHub. Please try again.", { cause: e });
14477
+ return new Error("The book couldn't be downloaded from GitHub. Please try again.", { cause: e });
14478
14478
  }
14479
14479
  async function cloneRepository(options) {
14480
14480
  const { dir, onProgress, tokenStore } = options;
@@ -14550,7 +14550,7 @@ var FAILURE_MESSAGES = {
14550
14550
  auth: "The Git server didn't accept the saved connection. Reconnect to this server with a current access token and try again.",
14551
14551
  "not-found": "The server answered, but no repository was found at that address. It may have been moved, renamed, or you may no longer have access.",
14552
14552
  unreachable: "Couldn't reach the Git server. Check your internet connection (and VPN, if this is a private server), then try again.",
14553
- "ssh-unsupported": "This project's online address uses SSH (git@…), which gutterpress can't check or sync with. Everything on this computer still works — sync with your usual Git tool.",
14553
+ "ssh-unsupported": "This book's online address uses SSH (git@…), which gutterpress can't check or sync with. Everything on this computer still works — sync with your usual Git tool.",
14554
14554
  "insecure-transport": "This address isn't secure, so the saved connection wasn't sent — connections are never sent over an insecure address. Switch the address to a secure one (starting with https), or to a local loopback address for a server on this computer, to use a saved connection.",
14555
14555
  tls: "The server's security certificate couldn't be verified. If this is a private server with its own certificate, ask its administrator about trusting it (NODE_EXTRA_CA_CERTS).",
14556
14556
  unknown: "The connection test failed unexpectedly. The server may not be a Git server, or it may be temporarily unavailable."
@@ -15237,7 +15237,7 @@ async function syncProject(options) {
15237
15237
  if (setupMsg)
15238
15238
  return { status: "error", message: setupMsg, ...base() };
15239
15239
  if (await historyUnreadable(dir)) {
15240
- logger.error("sync", "the project's history could not be read");
15240
+ logger.error("sync", "the book's history could not be read");
15241
15241
  return { status: "error", message: MSG_HISTORY_UNREADABLE, ...base() };
15242
15242
  }
15243
15243
  return { ...failureOutcome(e, snapshotId), ...filesChanged ? { filesChanged: true } : {} };
@@ -349,7 +349,7 @@ class LocalFolderSourceProvider {
349
349
  async initVersionHistory(options) {
350
350
  const dir = options.projectDir;
351
351
  if (await findEnclosingRepoDir(dir) !== undefined) {
352
- throw new Error("This folder is already inside a versioned project, so gutterpress " + "won't create a separate history here.");
352
+ throw new Error("This folder is already inside a versioned book, so gutterpress " + "won't create a separate history here.");
353
353
  }
354
354
  return withRepoLock(dir, async () => {
355
355
  const cache = {};
@@ -373,7 +373,7 @@ class LocalFolderSourceProvider {
373
373
  });
374
374
  }
375
375
  snapshot() {
376
- return Promise.reject(new Error("This project has no version history yet. Enable version history first."));
376
+ return Promise.reject(new Error("This book has no version history yet. Enable version history first."));
377
377
  }
378
378
  listHistory() {
379
379
  return Promise.resolve([]);
@@ -382,7 +382,7 @@ class LocalFolderSourceProvider {
382
382
  return Promise.resolve({ entries: [], hasMore: false });
383
383
  }
384
384
  restore() {
385
- return Promise.reject(new Error("This project has no version history yet. Enable version history first."));
385
+ return Promise.reject(new Error("This book has no version history yet. Enable version history first."));
386
386
  }
387
387
  }
388
388
 
@@ -528,7 +528,7 @@ function providerFor(source) {
528
528
  case "local-git-folder":
529
529
  return new LocalGitSourceProvider(source);
530
530
  case "managed-github":
531
- throw new Error("Managed GitHub projects are not supported yet (#15/#16).");
531
+ throw new Error("Managed GitHub books are not supported yet (#15/#16).");
532
532
  }
533
533
  }
534
534
  function gitDirFor(projectDir) {
@@ -543,7 +543,7 @@ async function restoreVersionWithBackup(options) {
543
543
  const { projectDir, id, authorName, authorEmail } = options;
544
544
  const source = await detectProjectSource(projectDir);
545
545
  if (source.type !== "local-git-folder") {
546
- throw new Error("This project has no version history yet. Enable version history first.");
546
+ throw new Error("This book has no version history yet. Enable version history first.");
547
547
  }
548
548
  const provider = new LocalGitSourceProvider(source);
549
549
  const repoDir = gitScopeFor(source);
@@ -561,7 +561,7 @@ async function restoreVersionWithBackup(options) {
561
561
  try {
562
562
  await provider.restoreUnlocked({ projectDir, id });
563
563
  } catch (cause) {
564
- throw new Error(backupId ? "The restore could not be completed, but your work is safe — it was " + `automatically saved as a backup snapshot (${backupId.slice(0, 7)}) ` + "and appears in your version history." : "The restore could not be completed. Your project files were not changed.", { cause });
564
+ throw new Error(backupId ? "The restore could not be completed, but your work is safe — it was " + `automatically saved as a backup snapshot (${backupId.slice(0, 7)}) ` + "and appears in your version history." : "The restore could not be completed. Your book files were not changed.", { cause });
565
565
  }
566
566
  return { restoredId: id, backupId };
567
567
  });
@@ -648,7 +648,7 @@ async function switchBranch(options) {
648
648
  const { projectDir, branch, authorName, authorEmail } = options;
649
649
  const source = await detectProjectSource(projectDir);
650
650
  if (source.type !== "local-git-folder") {
651
- throw new Error("This project has no version history yet. Enable version history first.");
651
+ throw new Error("This book has no version history yet. Enable version history first.");
652
652
  }
653
653
  const repoDir = gitScopeFor(source);
654
654
  return withRepoLock(repoDir, async () => {
@@ -608,7 +608,7 @@ var preview_shell_default = "./preview-shell-gqnc5xxe.js";
608
608
  var CGATS21_CRPC1_default = "./CGATS21_CRPC1-g0e3k7kr.icc";
609
609
 
610
610
  // src/assets/engine/gutterpress-viewer.js
611
- var gutterpress_viewer_default = "./gutterpress-viewer-k0xrt5hw.js";
611
+ var gutterpress_viewer_default = "./gutterpress-viewer-swz6bwfa.js";
612
612
 
613
613
  // src/assets/engine/gutterpress-agent.js
614
614
  var gutterpress_agent_default = "./gutterpress-agent-cazqstr1.js";
@@ -4,7 +4,7 @@ import {
4
4
  launchChromium,
5
5
  marginBoxAlign,
6
6
  marginBoxRectPt
7
- } from "./index-6n15e1ze.js";
7
+ } from "./index-gf1shk3y.js";
8
8
 
9
9
  // src/engine/compiler/build.ts
10
10
  import { readFile } from "node:fs/promises";
@@ -1985,7 +1985,7 @@ ${mapCss}`;
1985
1985
  if (layerTraps.length)
1986
1986
  log(`audit: ${layerTraps.length} trapped layer warning(s)`);
1987
1987
  for (const hit of pageBackgrounds)
1988
- diagnose("engine.page-background.unreferenced", `"${hit.url}" is only referenced from "${hit.where}", and Chromium will not print an image referenced nowhere else — the page prints with its background colour alone, with no error. Gutterpress stages and preloads every image your project stylesheets reference, so this one is outside that: it is remote (a url(https://...), which is never staged), or it comes from CSS that does not pass through your stylesheets, or an element in the document uses the same URL as its src, which drops it on its own. Use a local image, referenced from one of your project stylesheets, and not also used as an <img>.`);
1988
+ diagnose("engine.page-background.unreferenced", `"${hit.url}" is only referenced from "${hit.where}", and Chromium will not print an image referenced nowhere else — the page prints with its background color alone, with no error. Gutterpress stages and preloads every image your book's stylesheets reference, so this one is outside that: it is remote (a url(https://...), which is never staged), or it comes from CSS that does not pass through your stylesheets, or an element in the document uses the same URL as its src, which drops it on its own. Use a local image, referenced from one of your book's stylesheets, and not also used as an <img>.`);
1989
1989
  if (pageBackgrounds.length)
1990
1990
  log(`audit: ${pageBackgrounds.length} unreferenced @page background image(s)`);
1991
1991
  for (const d of multicol)
package/dist/index.js CHANGED
@@ -143,15 +143,15 @@ import {
143
143
  syncProject,
144
144
  testRemoteAccess,
145
145
  validateProjectExtensions
146
- } from "./index-nmykzwb4.js";
146
+ } from "./index-0h00ve4y.js";
147
147
  import {
148
148
  BUILD_DIAGNOSTIC_CODES
149
- } from "./index-12pvhbyz.js";
149
+ } from "./index-yeej2vhs.js";
150
150
  import {
151
151
  BuildError,
152
152
  DEFAULT_PRINT_OPTS,
153
153
  readyProbeExpr
154
- } from "./index-6n15e1ze.js";
154
+ } from "./index-gf1shk3y.js";
155
155
  import {
156
156
  AUTO_SNAPSHOT_MESSAGE,
157
157
  HISTORY_PAGE_LIMIT,
@@ -163,7 +163,7 @@ import {
163
163
  resolveLogger,
164
164
  restoreVersionWithBackup,
165
165
  switchBranch
166
- } from "./index-c5ev4r1y.js";
166
+ } from "./index-8xkw284t.js";
167
167
  import {
168
168
  capabilitiesFor,
169
169
  detectProjectSource,
@@ -10,19 +10,19 @@ export declare const MSG_SYNCED = "Your changes are online.";
10
10
  export declare const MSG_SYNCED_MERGED = "Your changes are online, combined with changes from the online copy.";
11
11
  export declare const MSG_OFFLINE = "Your changes are saved on this computer. gutterpress couldn't reach the online repository \u2014 try syncing again when you're back online.";
12
12
  export declare const MSG_AUTH = "The online repository didn't accept the saved connection. Reconnect and try again.";
13
- export declare const MSG_INSECURE_TRANSPORT = "This project's online address isn't secure, so the saved connection wasn't sent \u2014 connections are never sent over an insecure address. Switch the address to a secure one (starting with https), or to a local loopback address for a server on this computer, to sync.";
13
+ export declare const MSG_INSECURE_TRANSPORT = "This book's online address isn't secure, so the saved connection wasn't sent \u2014 connections are never sent over an insecure address. Switch the address to a secure one (starting with https), or to a local loopback address for a server on this computer, to sync.";
14
14
  export declare const MSG_BUSY = "The online copy is changing very quickly right now. Your work is saved on this computer \u2014 try Sync again in a moment.";
15
15
  /**
16
- * The project's own version history is unreadable — a damaged or missing
16
+ * The book's own version history is unreadable — a damaged or missing
17
17
  * `.git`. Says the three things that are actually true and useful: the writing
18
18
  * is safe, the HISTORY is what broke, and (sync always has a remote, so this
19
19
  * always applies here) a fresh copy from online is the way back.
20
20
  */
21
- export declare const MSG_HISTORY_UNREADABLE = "This project's version history can't be read, so syncing can't continue. Your writing is safe \u2014 every file is still here on this computer. To get history and syncing working again, download a fresh copy of the project from online, then move any recent changes into it.";
22
- export declare const MSG_UNRELATED = "This project and the online copy have no history in common, so they can't be combined. Either the online address points at a different project, or this project's own history was lost and started over. Your writing is safe \u2014 every file is still here on this computer. Check the online address; if it is correct, download a fresh copy from online and move any recent changes into it.";
23
- export declare const MSG_NO_REMOTE = "This project isn't connected to an online repository yet.";
24
- export declare const MSG_SSH_REMOTE = "This project's online address uses SSH (git@\u2026), which gutterpress can't sync to. Switch it to the web (HTTPS) address to sync from here.";
25
- export declare const MSG_NO_BRANCH = "This project's version history isn't on a named branch, so it can't be synced right now.";
21
+ export declare const MSG_HISTORY_UNREADABLE = "This book's version history can't be read, so syncing can't continue. Your writing is safe \u2014 every file is still here on this computer. To get history and syncing working again, download a fresh copy of the book from online, then move any recent changes into it.";
22
+ export declare const MSG_UNRELATED = "This book and the online copy have no history in common, so they can't be combined. Either the online address points at a different book, or this book's own history was lost and started over. Your writing is safe \u2014 every file is still here on this computer. Check the online address; if it is correct, download a fresh copy from online and move any recent changes into it.";
23
+ export declare const MSG_NO_REMOTE = "This book isn't connected to an online repository yet.";
24
+ export declare const MSG_SSH_REMOTE = "This book's online address uses SSH (git@\u2026), which gutterpress can't sync to. Switch it to the web (HTTPS) address to sync from here.";
25
+ export declare const MSG_NO_BRANCH = "This book's version history isn't on a named branch, so it can't be synced right now.";
26
26
  /** Message recorded on the automatic pre-sync snapshot (D5 invariant).
27
27
  * Pre-0.10.1 history carries the old spelling "Snapshot before syncing". */
28
28
  export declare const SYNC_SNAPSHOT_MESSAGE = "Automatic backup of your work";
@@ -1,21 +1,21 @@
1
1
  import {
2
2
  MANIFEST_FILENAMES,
3
3
  runLint
4
- } from "./cli-7k2v2sya.js";
4
+ } from "./cli-g6vshy3f.js";
5
5
  import {
6
6
  log
7
- } from "./cli-wmvvkwcc.js";
7
+ } from "./cli-rra50cp6.js";
8
8
  import {
9
9
  UsageError,
10
10
  rejectExtraPositionals,
11
11
  rejectUnknownFlags
12
- } from "./cli-ersw5g7j.js";
13
- import"./cli-sekhwex4.js";
12
+ } from "./cli-5c2xfsmz.js";
13
+ import"./cli-5vdgncmm.js";
14
14
  import"./cli-c41yr7he.js";
15
15
  import {
16
16
  EXIT_CODES
17
17
  } from "./cli-46ycxe6r.js";
18
- import"./cli-c9h2bk2k.js";
18
+ import"./cli-c5360prx.js";
19
19
  import"./cli-v5mp7a6q.js";
20
20
  import"./cli-37x76zdn.js";
21
21
 
@@ -7,23 +7,23 @@ import {
7
7
  TARGET_IDS,
8
8
  scaffoldExtension,
9
9
  scaffoldProject
10
- } from "./cli-7k2v2sya.js";
10
+ } from "./cli-g6vshy3f.js";
11
11
  import {
12
12
  resolveGhostscript
13
- } from "./cli-wmvvkwcc.js";
13
+ } from "./cli-rra50cp6.js";
14
14
  import {
15
15
  UsageError,
16
16
  rejectExtraPositionals,
17
17
  rejectUnknownFlags
18
- } from "./cli-ersw5g7j.js";
19
- import"./cli-sekhwex4.js";
18
+ } from "./cli-5c2xfsmz.js";
19
+ import"./cli-5vdgncmm.js";
20
20
  import {
21
21
  isToolAvailable
22
22
  } from "./cli-c41yr7he.js";
23
23
  import {
24
24
  EXIT_CODES
25
25
  } from "./cli-46ycxe6r.js";
26
- import"./cli-c9h2bk2k.js";
26
+ import"./cli-c5360prx.js";
27
27
  import"./cli-v5mp7a6q.js";
28
28
  import"./cli-37x76zdn.js";
29
29
 
@@ -252,7 +252,7 @@ var new_default = defineCommand({
252
252
  versionHistory: args.git === false ? "none" : "local-git"
253
253
  });
254
254
  const effectiveTargets = targets ?? [...PRESETS[preset].defaultTargets];
255
- console.log(`Created project: ${result.projectDir}`);
255
+ console.log(`Created book: ${result.projectDir}`);
256
256
  console.log(` manifest: ${result.manifestPath}`);
257
257
  console.log(` publish targets: ${effectiveTargets.length > 0 ? effectiveTargets.join(", ") : "none"}`);
258
258
  console.log(` start writing in: ${result.openFile}`);
@@ -282,7 +282,7 @@ var new_default = defineCommand({
282
282
  } catch (e) {
283
283
  const err = e;
284
284
  const code = err && typeof err.code === "string" ? err.code : "scaffold-io";
285
- console.error(`Could not create project: ${err?.message ?? String(e)}`);
285
+ console.error(`Could not create book: ${err?.message ?? String(e)}`);
286
286
  process.exit(code === "scaffold-io" ? EXIT_CODES.PIPELINE : EXIT_CODES.USAGE);
287
287
  }
288
288
  }
@@ -2,21 +2,21 @@ import {
2
2
  executeValidation,
3
3
  publishTargetFor,
4
4
  reportMissingTools
5
- } from "./cli-7k2v2sya.js";
5
+ } from "./cli-g6vshy3f.js";
6
6
  import {
7
7
  log
8
- } from "./cli-wmvvkwcc.js";
8
+ } from "./cli-rra50cp6.js";
9
9
  import {
10
10
  UsageError,
11
11
  rejectExtraPositionals,
12
12
  rejectUnknownFlags
13
- } from "./cli-ersw5g7j.js";
14
- import"./cli-sekhwex4.js";
13
+ } from "./cli-5c2xfsmz.js";
14
+ import"./cli-5vdgncmm.js";
15
15
  import"./cli-c41yr7he.js";
16
16
  import {
17
17
  EXIT_CODES
18
18
  } from "./cli-46ycxe6r.js";
19
- import"./cli-c9h2bk2k.js";
19
+ import"./cli-c5360prx.js";
20
20
  import"./cli-v5mp7a6q.js";
21
21
  import"./cli-37x76zdn.js";
22
22
 
@@ -6,10 +6,10 @@ import {
6
6
  runBuild,
7
7
  splitOutPath,
8
8
  startPreviewServer
9
- } from "./cli-7k2v2sya.js";
9
+ } from "./cli-g6vshy3f.js";
10
10
  import {
11
11
  log
12
- } from "./cli-wmvvkwcc.js";
12
+ } from "./cli-rra50cp6.js";
13
13
  import {
14
14
  UsageError,
15
15
  parseFormat,
@@ -17,13 +17,13 @@ import {
17
17
  rejectExtraPositionals,
18
18
  rejectUnknownFlags,
19
19
  resolvePort
20
- } from "./cli-ersw5g7j.js";
21
- import"./cli-sekhwex4.js";
20
+ } from "./cli-5c2xfsmz.js";
21
+ import"./cli-5vdgncmm.js";
22
22
  import"./cli-c41yr7he.js";
23
23
  import {
24
24
  BuildError
25
25
  } from "./cli-46ycxe6r.js";
26
- import"./cli-c9h2bk2k.js";
26
+ import"./cli-c5360prx.js";
27
27
  import"./cli-v5mp7a6q.js";
28
28
  import"./cli-37x76zdn.js";
29
29
 
@@ -49,7 +49,7 @@ var preview_default = defineCommand({
49
49
  const openFlag = args.open;
50
50
  if (format === "html") {
51
51
  if (typeof args.manifest === "string") {
52
- throw new UsageError("--manifest is only supported by preview --format pdf or pdfx; live HTML preview discovers the project manifest from its input directory.");
52
+ throw new UsageError("--manifest is only supported by preview --format pdf or pdfx; live HTML preview discovers the book manifest from its input directory.");
53
53
  }
54
54
  await startPreviewServer({
55
55
  input: inputPath,
@@ -11,22 +11,22 @@ import {
11
11
  publishProviderFor,
12
12
  resolvePublishFormat,
13
13
  runPublish
14
- } from "./cli-7k2v2sya.js";
14
+ } from "./cli-g6vshy3f.js";
15
15
  import {
16
16
  FileTokenStore,
17
17
  log
18
- } from "./cli-wmvvkwcc.js";
18
+ } from "./cli-rra50cp6.js";
19
19
  import {
20
20
  UsageError,
21
21
  rejectExtraPositionals,
22
22
  rejectUnknownFlags
23
- } from "./cli-ersw5g7j.js";
24
- import"./cli-sekhwex4.js";
23
+ } from "./cli-5c2xfsmz.js";
24
+ import"./cli-5vdgncmm.js";
25
25
  import"./cli-c41yr7he.js";
26
26
  import {
27
27
  EXIT_CODES
28
28
  } from "./cli-46ycxe6r.js";
29
- import"./cli-c9h2bk2k.js";
29
+ import"./cli-c5360prx.js";
30
30
  import"./cli-v5mp7a6q.js";
31
31
  import"./cli-37x76zdn.js";
32
32
 
@@ -251,7 +251,7 @@ Create one at: ${provider.info.credential.tokenUrl}` : ""));
251
251
  log.error(e instanceof Error ? e.message : String(e));
252
252
  process.exit(e instanceof UsageError ? e.exitCode : EXIT_CODES.FINDINGS);
253
253
  }
254
- log.success(`Connected ${provider.info.label}${account ? ` (${account})` : ""}. The key is stored in your user config, not the project.`);
254
+ log.success(`Connected ${provider.info.label}${account ? ` (${account})` : ""}. The key is stored in your user config, not the book.`);
255
255
  return;
256
256
  }
257
257
  let result;
@@ -19,7 +19,7 @@ import {
19
19
  stageChanges,
20
20
  switchBranch,
21
21
  withRepoLock
22
- } from "./cli-c9h2bk2k.js";
22
+ } from "./cli-c5360prx.js";
23
23
  import"./cli-v5mp7a6q.js";
24
24
  import"./cli-37x76zdn.js";
25
25
  export {
@@ -19,7 +19,7 @@ import {
19
19
  stageChanges,
20
20
  switchBranch,
21
21
  withRepoLock
22
- } from "./index-c5ev4r1y.js";
22
+ } from "./index-8xkw284t.js";
23
23
  import"./index-v5mp7a6q.js";
24
24
  import"./index-37x76zdn.js";
25
25
  export {
@@ -1,20 +1,20 @@
1
1
  import {
2
2
  executeAndReport
3
- } from "./cli-7k2v2sya.js";
3
+ } from "./cli-g6vshy3f.js";
4
4
  import {
5
5
  log
6
- } from "./cli-wmvvkwcc.js";
6
+ } from "./cli-rra50cp6.js";
7
7
  import {
8
8
  UsageError,
9
9
  rejectExtraPositionals,
10
10
  rejectUnknownFlags
11
- } from "./cli-ersw5g7j.js";
12
- import"./cli-sekhwex4.js";
11
+ } from "./cli-5c2xfsmz.js";
12
+ import"./cli-5vdgncmm.js";
13
13
  import"./cli-c41yr7he.js";
14
14
  import {
15
15
  EXIT_CODES
16
16
  } from "./cli-46ycxe6r.js";
17
- import"./cli-c9h2bk2k.js";
17
+ import"./cli-c5360prx.js";
18
18
  import"./cli-v5mp7a6q.js";
19
19
  import"./cli-37x76zdn.js";
20
20
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gutterpress",
3
- "version": "0.11.6-alpha.2",
3
+ "version": "0.11.6-alpha.3",
4
4
  "description": "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
5
5
  "author": "itlackey",
6
6
  "license": "MPL-2.0",