gutterpress 0.11.20-alpha.4 → 0.11.20-alpha.5

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 (31) hide show
  1. package/dist/api/index.js +2 -2
  2. package/dist/{build-epdcrm2c.js → build-8ffhvydf.js} +4 -4
  3. package/dist/{cli-fmksazej.js → cli-553ce1d4.js} +1 -1
  4. package/dist/{cli-h4tfmpg3.js → cli-6xym15vm.js} +1 -1
  5. package/dist/{cli-61vd4ews.js → cli-cyej3p9v.js} +4 -4
  6. package/dist/{cli-0ey902sx.js → cli-sc5t7c74.js} +36 -25
  7. package/dist/cli.js +12 -12
  8. package/dist/{doctor-78es5scm.js → doctor-gyes0hxt.js} +2 -2
  9. package/dist/engine/shared/pin-edges.d.ts +5 -5
  10. package/dist/engine/shared/print-area.d.ts +12 -7
  11. package/dist/{engine-67f68bxs.js → engine-4rkhv5ga.js} +1 -1
  12. package/dist/{engine-7ha27n2b.js → engine-5fw55dfb.js} +2 -2
  13. package/dist/{ext-9mc7sr0d.js → ext-x61yptd1.js} +4 -4
  14. package/dist/{gutterpress-agent-mrdnwktc.js → gutterpress-agent-yvd8w8my.js} +1 -0
  15. package/dist/{gutterpress-viewer-jr30yw8t.js → gutterpress-viewer-w7njnkj7.js} +115 -20
  16. package/dist/{index-t13p8y08.js → index-bta8hc2q.js} +35 -24
  17. package/dist/{index-gm5xbx5w.js → index-crys9951.js} +3 -3
  18. package/dist/{index-ad95fws8.js → index-yw16cfm8.js} +2 -2
  19. package/dist/index.js +3 -3
  20. package/dist/lib/markdown/assemble.d.ts +1 -1
  21. package/dist/lib/markdown/gutterpress-css.d.ts +8 -8
  22. package/dist/{manifest.schema-13dfax80.json → manifest.schema-c4wfpg6g.json} +8 -2
  23. package/dist/{new-s4f0tnya.js → new-87dqcxtn.js} +4 -4
  24. package/dist/{preflight-7ck4rbsq.js → preflight-nb4wndqf.js} +4 -4
  25. package/dist/preview/file-watcher.d.ts +1 -0
  26. package/dist/{preview-j91sxadd.js → preview-7bcr5j2p.js} +4 -4
  27. package/dist/{publish-f12xaenm.js → publish-4qfm5ch9.js} +4 -4
  28. package/dist/render.js +22 -13
  29. package/dist/schema/manifest.types.d.ts +20 -6
  30. package/dist/{validate-pb5gysvr.js → validate-dzht9qxk.js} +4 -4
  31. package/package.json +1 -1
package/dist/api/index.js CHANGED
@@ -137,11 +137,11 @@ import {
137
137
  testRemoteAccess,
138
138
  updateExtensions,
139
139
  validateProjectExtensions
140
- } from "../index-t13p8y08.js";
140
+ } from "../index-bta8hc2q.js";
141
141
  import"../index-ht1bcqdd.js";
142
142
  import {
143
143
  BuildError
144
- } from "../index-gm5xbx5w.js";
144
+ } from "../index-crys9951.js";
145
145
  import"../index-sth219v1.js";
146
146
  import {
147
147
  DEFAULT_PRINT_OPTS,
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  runBuild,
3
3
  splitOutPath
4
- } from "./cli-0ey902sx.js";
4
+ } from "./cli-sc5t7c74.js";
5
5
  import {
6
6
  log
7
- } from "./cli-h4tfmpg3.js";
7
+ } from "./cli-6xym15vm.js";
8
8
  import {
9
9
  UsageError,
10
10
  parseFormat,
11
11
  parsePdfxFlavor,
12
12
  rejectExtraPositionals,
13
13
  rejectUnknownFlags
14
- } from "./cli-fmksazej.js";
14
+ } from "./cli-553ce1d4.js";
15
15
  import"./cli-ht1bcqdd.js";
16
- import"./cli-61vd4ews.js";
16
+ import"./cli-cyej3p9v.js";
17
17
  import {
18
18
  BuildError
19
19
  } from "./cli-46ycxe6r.js";
@@ -4,7 +4,7 @@ import {
4
4
  // package.json
5
5
  var package_default = {
6
6
  name: "gutterpress",
7
- version: "0.11.20-alpha.4",
7
+ version: "0.11.20-alpha.5",
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",
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "./cli-fmksazej.js";
3
+ } from "./cli-553ce1d4.js";
4
4
  import {
5
5
  enhancedPath,
6
6
  execCapture,
@@ -587,7 +587,7 @@ function flushMargins(margin, edges) {
587
587
  }
588
588
  function pinInsets(area, side, edges) {
589
589
  const binding = side === "recto" ? "left" : "right";
590
- const inset = (edge) => !area || !edges.includes(edge) ? 0 : edge === binding ? area.safe : area.bleed + area.artSafe;
590
+ const inset = (edge) => !area || !edges.includes(edge) ? 0 : edge === binding ? area.gutter : area.bleed + area.artSafe;
591
591
  return { top: inset("top"), right: inset("right"), bottom: inset("bottom"), left: inset("left") };
592
592
  }
593
593
  var NO_PADDING = { top: 0, right: 0, bottom: 0, left: 0 };
@@ -1134,7 +1134,7 @@ import { fileURLToPath } from "node:url";
1134
1134
  var favicon_default = "./favicon-272ga6y0.ico";
1135
1135
 
1136
1136
  // src/assets/manifest.schema.json
1137
- var manifest_schema_default = "./manifest.schema-13dfax80.json";
1137
+ var manifest_schema_default = "./manifest.schema-c4wfpg6g.json";
1138
1138
 
1139
1139
  // src/assets/preview/scripts/preview-interface.js
1140
1140
  var preview_interface_default = "./preview-interface-nnmrxyqm.js";
@@ -1149,10 +1149,10 @@ var preview_shell_default = "./preview-shell-wk9k3gcd.js";
1149
1149
  var CGATS21_CRPC1_default = "./CGATS21_CRPC1-g0e3k7kr.icc";
1150
1150
 
1151
1151
  // src/assets/engine/gutterpress-viewer.js
1152
- var gutterpress_viewer_default = "./gutterpress-viewer-jr30yw8t.js";
1152
+ var gutterpress_viewer_default = "./gutterpress-viewer-w7njnkj7.js";
1153
1153
 
1154
1154
  // src/assets/engine/gutterpress-agent.js
1155
- var gutterpress_agent_default = "./gutterpress-agent-mrdnwktc.js";
1155
+ var gutterpress_agent_default = "./gutterpress-agent-yvd8w8my.js";
1156
1156
 
1157
1157
  // src/assets/templates/book/manifest.yaml
1158
1158
  var manifest_default = "./manifest-n1gh3qw5.yaml";
@@ -16,12 +16,12 @@ import {
16
16
  stripAnnotations,
17
17
  transparentPages,
18
18
  warn
19
- } from "./cli-h4tfmpg3.js";
19
+ } from "./cli-6xym15vm.js";
20
20
  import {
21
21
  DEBOUNCE,
22
22
  UsageError,
23
23
  resolvePort
24
- } from "./cli-fmksazej.js";
24
+ } from "./cli-553ce1d4.js";
25
25
  import {
26
26
  blackTextToGray
27
27
  } from "./cli-ht1bcqdd.js";
@@ -30,7 +30,7 @@ import {
30
30
  getAssetPath,
31
31
  getAssetsDir,
32
32
  lastPageMode
33
- } from "./cli-61vd4ews.js";
33
+ } from "./cli-cyej3p9v.js";
34
34
  import {
35
35
  BuildError,
36
36
  EXIT_CODES
@@ -147,7 +147,8 @@ var DTRPG_PRESET = {
147
147
  tolerance: 0.5,
148
148
  bleed: 9,
149
149
  safe: 36,
150
- artSafe: 18
150
+ artSafe: 18,
151
+ gutter: undefined
151
152
  },
152
153
  ink: {
153
154
  maxTac: 240,
@@ -234,7 +235,8 @@ var BOOK_PRESET = {
234
235
  tolerance: 0.5,
235
236
  bleed: undefined,
236
237
  safe: 18,
237
- artSafe: undefined
238
+ artSafe: undefined,
239
+ gutter: undefined
238
240
  },
239
241
  ink: {
240
242
  maxTac: 400,
@@ -592,7 +594,8 @@ function resolveCustomPage(c, m) {
592
594
  tolerance: c.page?.tolerance ?? m.page?.tolerance ?? 0.5,
593
595
  bleed: c.page?.bleed ?? m.page?.bleed,
594
596
  safe: c.page?.safe ?? m.page?.safe,
595
- artSafe: c.page?.artSafe ?? m.page?.artSafe
597
+ artSafe: c.page?.artSafe ?? m.page?.artSafe,
598
+ gutter: c.page?.gutter ?? m.page?.gutter
596
599
  };
597
600
  }
598
601
  function resolveWithPreset(cliOverrides, manifest, preset) {
@@ -2042,11 +2045,15 @@ var GUTTERPRESS_CSS = `
2042
2045
 
2043
2046
  /* sizes — AFTER the flow positions so max-width:100% lifts the floats' 50%
2044
2047
  cap at equal specificity */
2045
- .gp-small { width: 25%; max-width: 100%; }
2046
- .gp-medium { width: 50%; max-width: 100%; }
2047
- .gp-large { width: 60%; max-width: 100%; }
2048
- .gp-xl { width: 80%; max-width: 100%; }
2049
- .gp-xxl { width: 90%; max-width: 100%; }
2048
+ .gp-size-10 { width: 10%; max-width: 100%; }
2049
+ .gp-size-20 { width: 20%; max-width: 100%; }
2050
+ .gp-size-30 { width: 30%; max-width: 100%; }
2051
+ .gp-size-40 { width: 40%; max-width: 100%; }
2052
+ .gp-size-50 { width: 50%; max-width: 100%; }
2053
+ .gp-size-60 { width: 60%; max-width: 100%; }
2054
+ .gp-size-70 { width: 70%; max-width: 100%; }
2055
+ .gp-size-80 { width: 80%; max-width: 100%; }
2056
+ .gp-size-90 { width: 90%; max-width: 100%; }
2050
2057
 
2051
2058
  /* float clearance presets — consumed by var(--gp-gap) in the float rules
2052
2059
  above and by .gp-shape's shape-margin below; --gp-gap itself is
@@ -2244,11 +2251,15 @@ var GP_CLASSES = new Set([
2244
2251
  "gp-center",
2245
2252
  "gp-full",
2246
2253
  "gp-bleed",
2247
- "gp-small",
2248
- "gp-medium",
2249
- "gp-large",
2250
- "gp-xl",
2251
- "gp-xxl",
2254
+ "gp-size-10",
2255
+ "gp-size-20",
2256
+ "gp-size-30",
2257
+ "gp-size-40",
2258
+ "gp-size-50",
2259
+ "gp-size-60",
2260
+ "gp-size-70",
2261
+ "gp-size-80",
2262
+ "gp-size-90",
2252
2263
  "gp-tight",
2253
2264
  "gp-loose",
2254
2265
  "gp-columns",
@@ -2283,10 +2294,10 @@ var GP_CLASSES = new Set([
2283
2294
  ]);
2284
2295
 
2285
2296
  // src/lib/markdown/gp-pin-scope.js
2286
- function warn3(env, line, type, message, marker) {
2297
+ function warn3(env, line, type, message, severity) {
2287
2298
  if (!env.layoutWarnings)
2288
2299
  env.layoutWarnings = [];
2289
- env.layoutWarnings.push({ line, type, message, marker });
2300
+ env.layoutWarnings.push(severity ? { line, type, message, severity } : { line, type, message });
2290
2301
  }
2291
2302
  function editDistance2(a, b) {
2292
2303
  let prev = Array.from({ length: b.length + 1 }, (_, j) => j);
@@ -2329,7 +2340,7 @@ function checkFlushArt(token, env, line) {
2329
2340
  return;
2330
2341
  if (!classes.some((c) => PIN_EDGES.includes(c)))
2331
2342
  return;
2332
- warn3(env, line, "flush_art", FLUSH_ART_MSG);
2343
+ warn3(env, line, "flush_art", FLUSH_ART_MSG, "info");
2333
2344
  }
2334
2345
  function elementNameFor(token) {
2335
2346
  switch (token.type) {
@@ -5041,11 +5052,11 @@ var inches = (pt) => `${+(pt / 72).toFixed(2)}in`;
5041
5052
  var check3 = {
5042
5053
  id: "pdf.print.safe-margins",
5043
5054
  name: "Safe margins",
5044
- description: "Fails when text sits closer to the trim than `page.safe` (DriveThruRPG: 0.5in on every edge). Text only: art is judged in the preview's safe-area overlay, not here. Skipped when `page.safe` is not set",
5055
+ description: "Fails when text sits closer to the trim than `page.safe` (DriveThruRPG: 0.5in on every edge), or than `page.gutter` at the binding edge where one is set. Text only: art is judged in the preview's safe-area overlay, not here. Skipped when `page.safe` is not set",
5045
5056
  category: "pdf",
5046
5057
  phase: "post-build",
5047
5058
  async run(ctx) {
5048
- const { width, height, bleed = 0, safe = 0 } = ctx.config.page;
5059
+ const { width, height, bleed = 0, safe = 0, gutter = safe } = ctx.config.page;
5049
5060
  if (!ctx.pdfPath || !safe)
5050
5061
  return [];
5051
5062
  const doc = await loadPdf(ctx.pdfPath);
@@ -5083,8 +5094,7 @@ var check3 = {
5083
5094
  ["bottom", Math.min(...ys) - trim.bottom],
5084
5095
  ["top", trim.top - Math.max(...ys)]
5085
5096
  ];
5086
- const [edge, gap] = gaps.reduce((worst, g) => g[1] < worst[1] ? g : worst);
5087
- const shortfall = safe - gap;
5097
+ const [edge, shortfall] = gaps.map(([name, gap]) => [name, (name === "binding" ? gutter : safe) - gap]).reduce((worst, g) => g[1] > worst[1] ? g : worst);
5088
5098
  if (shortfall <= TOLERANCE_PT)
5089
5099
  continue;
5090
5100
  const text = item.str.trim();
@@ -5092,7 +5102,7 @@ var check3 = {
5092
5102
  severity: "error",
5093
5103
  message: `Page ${pageNum}: "${text.slice(0, 40)}${text.length > 40 ? "…" : ""}" is ${inches(shortfall)} too close to the ${edge} edge.`,
5094
5104
  file: ctx.pdfPath,
5095
- detail: `${rule}: text must stay at least ${inches(safe)} inside the trim on every edge.`,
5105
+ detail: gutter === safe ? `${rule}: text must stay at least ${inches(safe)} inside the trim on every edge.` : `${rule}: text must stay at least ${inches(safe)} inside the trim, ${inches(gutter)} at the binding.`,
5096
5106
  code: "text-outside-safe-margin",
5097
5107
  data: { page: pageNum, edge, shortfallPt: +shortfall.toFixed(2) }
5098
5108
  }));
@@ -8944,6 +8954,7 @@ function printAreaMeta(page) {
8944
8954
  bleed: page.bleed ?? 0,
8945
8955
  safe: page.safe ?? 0,
8946
8956
  artSafe: page.artSafe,
8957
+ gutter: page.gutter,
8947
8958
  preset: page.preset,
8948
8959
  spec: page.spec
8949
8960
  });
@@ -10120,7 +10131,7 @@ class PdfOutput {
10120
10131
  const rawPdf = pdfxMode ? path13.join(stage, "raw.pdf") : path13.resolve(pdfFile);
10121
10132
  await fsp2.mkdir(path13.dirname(path13.resolve(pdfFile)), { recursive: true });
10122
10133
  log.info("Rendering HTML to PDF via the Gutterpress engine (native Chromium pagination)");
10123
- const { buildNativePdf } = await import("./engine-67f68bxs.js");
10134
+ const { buildNativePdf } = await import("./engine-4rkhv5ga.js");
10124
10135
  const engineDiagnostics = await buildNativePdf(htmlFile, rawPdf, {
10125
10136
  title: config.title,
10126
10137
  author: config.authors.length > 0 ? config.authors.join(", ") : undefined,
package/dist/cli.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  UsageError,
7
7
  package_default,
8
8
  rejectUnknownFlags
9
- } from "./cli-fmksazej.js";
9
+ } from "./cli-553ce1d4.js";
10
10
  import {
11
11
  EXIT_CODES
12
12
  } from "./cli-46ycxe6r.js";
@@ -18,14 +18,14 @@ import {
18
18
  import { defineCommand, parseArgs, runMain } from "citty";
19
19
  import { statSync } from "node:fs";
20
20
  var SUBCOMMANDS = {
21
- new: () => import("./new-s4f0tnya.js").then((m) => m.default),
22
- preview: () => import("./preview-j91sxadd.js").then((m) => m.default),
23
- build: () => import("./build-epdcrm2c.js").then((m) => m.default),
24
- publish: () => import("./publish-f12xaenm.js").then((m) => m.default),
25
- validate: () => import("./validate-pb5gysvr.js").then((m) => m.default),
26
- preflight: () => import("./preflight-7ck4rbsq.js").then((m) => m.default),
27
- doctor: () => import("./doctor-78es5scm.js").then((m) => m.default),
28
- ext: () => import("./ext-9mc7sr0d.js").then((m) => m.default)
21
+ new: () => import("./new-87dqcxtn.js").then((m) => m.default),
22
+ preview: () => import("./preview-7bcr5j2p.js").then((m) => m.default),
23
+ build: () => import("./build-8ffhvydf.js").then((m) => m.default),
24
+ publish: () => import("./publish-4qfm5ch9.js").then((m) => m.default),
25
+ validate: () => import("./validate-dzht9qxk.js").then((m) => m.default),
26
+ preflight: () => import("./preflight-nb4wndqf.js").then((m) => m.default),
27
+ doctor: () => import("./doctor-gyes0hxt.js").then((m) => m.default),
28
+ ext: () => import("./ext-x61yptd1.js").then((m) => m.default)
29
29
  };
30
30
  var VERSION = package_default.version;
31
31
  var main = defineCommand({
@@ -50,7 +50,7 @@ async function preflightRequiredInvocations(rawArgs) {
50
50
  const [command, ...commandArgs] = rawArgs;
51
51
  try {
52
52
  if (command === "new") {
53
- const { newArgs } = await import("./new-s4f0tnya.js");
53
+ const { newArgs } = await import("./new-87dqcxtn.js");
54
54
  rejectUnknownFlags(commandArgs, newArgs, "new");
55
55
  const parsed = parseArgs(commandArgs, {
56
56
  ...newArgs,
@@ -62,7 +62,7 @@ async function preflightRequiredInvocations(rawArgs) {
62
62
  return;
63
63
  }
64
64
  if (command === "preflight") {
65
- const { preflightArgs } = await import("./preflight-7ck4rbsq.js");
65
+ const { preflightArgs } = await import("./preflight-nb4wndqf.js");
66
66
  rejectUnknownFlags(commandArgs, preflightArgs, "preflight");
67
67
  const parsed = parseArgs(commandArgs, {
68
68
  ...preflightArgs,
@@ -82,7 +82,7 @@ async function preflightRequiredInvocations(rawArgs) {
82
82
  }
83
83
  if (subcommand.startsWith("-"))
84
84
  return;
85
- const { EXT_SUBCOMMANDS, extAddArgs, extRemoveArgs, extEnableArgs, extDisableArgs } = await import("./ext-9mc7sr0d.js");
85
+ const { EXT_SUBCOMMANDS, extAddArgs, extRemoveArgs, extEnableArgs, extDisableArgs } = await import("./ext-x61yptd1.js");
86
86
  if (!EXT_SUBCOMMANDS.includes(subcommand)) {
87
87
  throw new UsageError(`gutterpress ext: unknown command "${subcommand}"`);
88
88
  }
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  getSystemDiagnostics,
3
3
  log
4
- } from "./cli-h4tfmpg3.js";
4
+ } from "./cli-6xym15vm.js";
5
5
  import {
6
6
  UsageError,
7
7
  rejectExtraPositionals,
8
8
  rejectUnknownFlags
9
- } from "./cli-fmksazej.js";
9
+ } from "./cli-553ce1d4.js";
10
10
  import"./cli-46ycxe6r.js";
11
11
  import"./cli-asap4t1z.js";
12
12
  import"./cli-37x76zdn.js";
@@ -31,10 +31,10 @@
31
31
  * the pinned edges — inset by the printer's ART-SAFE line: `--gp-pin-<edge>`
32
32
  * on the root, read by `.gp-pin`'s four insets (GUTTERPRESS_CSS). On the
33
33
  * top, bottom and outside edge that is the bleed plus `page.artSafe`; at
34
- * the binding edge `page.safe` (no bleed there) — the manifest's print
34
+ * the binding edge `page.gutter` (no bleed there) — the manifest's print
35
35
  * area (print-area.ts), so a book with none sets 0, the paper's edge.
36
36
  * 4. `.gp-flush` on the pin zeroes the four properties in plain CSS: the
37
- * opt-in escape hatch to the paper's edge (the markdown pipeline warns).
37
+ * opt-in escape hatch to the paper's edge (the markdown pipeline notes it).
38
38
  * Nothing else here knows about it.
39
39
  *
40
40
  * Sides. Recto values are the defaults (`@page :right`'s margins, the
@@ -92,12 +92,12 @@ export declare function pinPageName(authorPage: string | undefined, edges: reado
92
92
  export declare function flushMargins(margin: PageGeometry["margin"], edges: readonly PinEdge[]): PageGeometry["margin"];
93
93
  /**
94
94
  * The art-safe line's distance from the sheet edge on each pinned edge, in pt:
95
- * the bleed plus `artSafe` on the top, bottom and outside edge, `safe` on the
95
+ * the bleed plus `artSafe` on the top, bottom and outside edge, `gutter` on the
96
96
  * binding edge (the left of a recto, the right of a verso), 0 on an edge the
97
97
  * pins do not use (the pin box's edge is the text block's there). No print
98
98
  * area means 0 everywhere: the paper's edge.
99
99
  */
100
- export declare function pinInsets(area: Pick<PrintArea, "bleed" | "safe" | "artSafe"> | null, side: PageSide, edges: readonly PinEdge[]): Record<PinEdge, number>;
100
+ export declare function pinInsets(area: Pick<PrintArea, "bleed" | "artSafe" | "gutter"> | null, side: PageSide, edges: readonly PinEdge[]): Record<PinEdge, number>;
101
101
  /** No padding of the root's own. */
102
102
  export declare const NO_PADDING: Readonly<Record<PinEdge, number>>;
103
103
  /**
@@ -109,7 +109,7 @@ export declare const NO_PADDING: Readonly<Record<PinEdge, number>>;
109
109
  * so a padded root's text stays put too. All four properties are set, so a
110
110
  * pin never reads another root's values.
111
111
  */
112
- export declare function pinRootStyle(margin: PageGeometry["margin"], area: Pick<PrintArea, "bleed" | "safe" | "artSafe"> | null, side: PageSide, edges: readonly PinEdge[], padding?: Readonly<Record<PinEdge, number>>): Record<string, string>;
112
+ export declare function pinRootStyle(margin: PageGeometry["margin"], area: Pick<PrintArea, "bleed" | "artSafe" | "gutter"> | null, side: PageSide, edges: readonly PinEdge[], padding?: Readonly<Record<PinEdge, number>>): Record<string, string>;
113
113
  /** A computed style's four paddings, in px. */
114
114
  export declare function paddingOf(cs: {
115
115
  paddingTop: string;
@@ -9,10 +9,11 @@
9
9
  * Only the manifest feeds it — `page.width` x `page.height` (the sheet),
10
10
  * `page.bleed` (a bleed the sheet already contains on the top, bottom and
11
11
  * OUTER edge; the binding edge has none, as DriveThruRPG cuts it),
12
- * `page.safe` (the TEXT rule: its inset from the trim on every edge) and
13
- * `page.artSafe` (the ART rule: its inset on the top, bottom and outer edge,
14
- * while the binding edge takes `safe`; absent = `safe`) — plus the preset's
15
- * id and the printer spec it follows, which only word what the overlay finds.
12
+ * `page.safe` (the TEXT rule: its inset from the trim on every edge),
13
+ * `page.artSafe` (the ART rule: its inset on the top, bottom and outer edge;
14
+ * absent = `safe`) and `page.gutter` (the binding edge's inset, for text and
15
+ * art alike; absent = `safe`) — plus the preset's id and the printer spec it
16
+ * follows, which only word what the overlay finds.
16
17
  * No book or plugin CSS feeds it: not the `@page` margins (they are where the
17
18
  * author put the TEXT, which is not the printer's safe area), not
18
19
  * `@page { bleed }`.
@@ -26,10 +27,12 @@ export interface PrintArea {
26
27
  height: number;
27
28
  /** in-sheet bleed on the top, bottom and outer edge; 0 = none */
28
29
  bleed: number;
29
- /** the TEXT rule: inset from the trim on every edge; 0 = none */
30
+ /** the TEXT rule: inset from the trim on every edge, the binding edge too unless `gutter` is set; 0 = none */
30
31
  safe: number;
31
- /** the ART rule: inset on the top, bottom and outer edge (the binding edge takes `safe`) */
32
+ /** the ART rule: inset on the top, bottom and outer edge (the binding edge takes `gutter`) */
32
33
  artSafe: number;
34
+ /** the binding allowance: inset from the trim at the binding edge, for text and art alike; absent in the manifest = `safe` */
35
+ gutter: number;
33
36
  /** the manifest's preset id, and the printer spec it follows: they only word what is found */
34
37
  preset?: string;
35
38
  spec?: {
@@ -46,6 +49,7 @@ export interface PrintAreaSource {
46
49
  bleed?: number;
47
50
  safe?: number;
48
51
  artSafe?: number;
52
+ gutter?: number;
49
53
  preset?: string;
50
54
  spec?: {
51
55
  label: string;
@@ -54,7 +58,8 @@ export interface PrintAreaSource {
54
58
  }
55
59
  /**
56
60
  * The `<meta>` tag for one book. An unset bleed or text rule is written as 0,
57
- * never left out; an unset art rule stays out (the reader takes it as `safe`).
61
+ * never left out; an unset art rule or gutter stays out (the reader takes each
62
+ * as `safe`).
58
63
  * Anything else the config's `page` block holds (`tolerance`) is not part of it.
59
64
  */
60
65
  export declare function printAreaMeta(page: PrintAreaSource): string;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  build
3
- } from "./cli-61vd4ews.js";
3
+ } from "./cli-cyej3p9v.js";
4
4
  import {
5
5
  BuildError
6
6
  } from "./cli-46ycxe6r.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  build
3
- } from "./index-ad95fws8.js";
3
+ } from "./index-yw16cfm8.js";
4
4
  import {
5
5
  BuildError
6
- } from "./index-gm5xbx5w.js";
6
+ } from "./index-crys9951.js";
7
7
  import"./index-bt0qws5c.js";
8
8
  import"./index-37x76zdn.js";
9
9
 
@@ -12,17 +12,17 @@ import {
12
12
  searchNpmExtensions,
13
13
  setExtensionEnabled,
14
14
  updateExtensions
15
- } from "./cli-0ey902sx.js";
16
- import"./cli-h4tfmpg3.js";
15
+ } from "./cli-sc5t7c74.js";
16
+ import"./cli-6xym15vm.js";
17
17
  import {
18
18
  UsageError,
19
19
  exitForUsage,
20
20
  rejectExtraPositionals,
21
21
  rejectUnknownFlags,
22
22
  resolveProjectDir
23
- } from "./cli-fmksazej.js";
23
+ } from "./cli-553ce1d4.js";
24
24
  import"./cli-ht1bcqdd.js";
25
- import"./cli-61vd4ews.js";
25
+ import"./cli-cyej3p9v.js";
26
26
  import {
27
27
  EXIT_CODES
28
28
  } from "./cli-46ycxe6r.js";
@@ -341,6 +341,7 @@
341
341
  bleed: n(v.bleed),
342
342
  safe,
343
343
  artSafe: typeof v.artSafe === "number" ? n(v.artSafe) : safe,
344
+ gutter: typeof v.gutter === "number" ? n(v.gutter) : safe,
344
345
  preset: typeof v.preset === "string" ? v.preset : undefined,
345
346
  spec
346
347
  };