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
@@ -2,17 +2,17 @@ import {
2
2
  executeValidation,
3
3
  publishTargetFor,
4
4
  reportMissingTools
5
- } from "./cli-0ey902sx.js";
5
+ } from "./cli-sc5t7c74.js";
6
6
  import {
7
7
  log
8
- } from "./cli-h4tfmpg3.js";
8
+ } from "./cli-6xym15vm.js";
9
9
  import {
10
10
  UsageError,
11
11
  rejectExtraPositionals,
12
12
  rejectUnknownFlags
13
- } from "./cli-fmksazej.js";
13
+ } from "./cli-553ce1d4.js";
14
14
  import"./cli-ht1bcqdd.js";
15
- import"./cli-61vd4ews.js";
15
+ import"./cli-cyej3p9v.js";
16
16
  import {
17
17
  BuildError,
18
18
  EXIT_CODES
@@ -53,6 +53,7 @@ export declare function generateAndWriteHtml(inputPath: string, tempDir: string,
53
53
  bleed?: number;
54
54
  safe?: number;
55
55
  artSafe?: number;
56
+ gutter?: number;
56
57
  };
57
58
  preset?: string;
58
59
  spec?: PrintSpec;
@@ -6,10 +6,10 @@ import {
6
6
  runBuild,
7
7
  splitOutPath,
8
8
  startPreviewServer
9
- } from "./cli-0ey902sx.js";
9
+ } from "./cli-sc5t7c74.js";
10
10
  import {
11
11
  log
12
- } from "./cli-h4tfmpg3.js";
12
+ } from "./cli-6xym15vm.js";
13
13
  import {
14
14
  UsageError,
15
15
  parseFormat,
@@ -17,9 +17,9 @@ import {
17
17
  rejectExtraPositionals,
18
18
  rejectUnknownFlags,
19
19
  resolvePort
20
- } from "./cli-fmksazej.js";
20
+ } from "./cli-553ce1d4.js";
21
21
  import"./cli-ht1bcqdd.js";
22
- import"./cli-61vd4ews.js";
22
+ import"./cli-cyej3p9v.js";
23
23
  import {
24
24
  BuildError
25
25
  } from "./cli-46ycxe6r.js";
@@ -11,18 +11,18 @@ import {
11
11
  publishProviderFor,
12
12
  resolvePublishFormat,
13
13
  runPublish
14
- } from "./cli-0ey902sx.js";
14
+ } from "./cli-sc5t7c74.js";
15
15
  import {
16
16
  FileTokenStore,
17
17
  log
18
- } from "./cli-h4tfmpg3.js";
18
+ } from "./cli-6xym15vm.js";
19
19
  import {
20
20
  UsageError,
21
21
  rejectExtraPositionals,
22
22
  rejectUnknownFlags
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";
package/dist/render.js CHANGED
@@ -1229,11 +1229,15 @@ var GUTTERPRESS_CSS = `
1229
1229
 
1230
1230
  /* sizes — AFTER the flow positions so max-width:100% lifts the floats' 50%
1231
1231
  cap at equal specificity */
1232
- .gp-small { width: 25%; max-width: 100%; }
1233
- .gp-medium { width: 50%; max-width: 100%; }
1234
- .gp-large { width: 60%; max-width: 100%; }
1235
- .gp-xl { width: 80%; max-width: 100%; }
1236
- .gp-xxl { width: 90%; max-width: 100%; }
1232
+ .gp-size-10 { width: 10%; max-width: 100%; }
1233
+ .gp-size-20 { width: 20%; max-width: 100%; }
1234
+ .gp-size-30 { width: 30%; max-width: 100%; }
1235
+ .gp-size-40 { width: 40%; max-width: 100%; }
1236
+ .gp-size-50 { width: 50%; max-width: 100%; }
1237
+ .gp-size-60 { width: 60%; max-width: 100%; }
1238
+ .gp-size-70 { width: 70%; max-width: 100%; }
1239
+ .gp-size-80 { width: 80%; max-width: 100%; }
1240
+ .gp-size-90 { width: 90%; max-width: 100%; }
1237
1241
 
1238
1242
  /* float clearance presets — consumed by var(--gp-gap) in the float rules
1239
1243
  above and by .gp-shape's shape-margin below; --gp-gap itself is
@@ -1431,11 +1435,15 @@ var GP_CLASSES = new Set([
1431
1435
  "gp-center",
1432
1436
  "gp-full",
1433
1437
  "gp-bleed",
1434
- "gp-small",
1435
- "gp-medium",
1436
- "gp-large",
1437
- "gp-xl",
1438
- "gp-xxl",
1438
+ "gp-size-10",
1439
+ "gp-size-20",
1440
+ "gp-size-30",
1441
+ "gp-size-40",
1442
+ "gp-size-50",
1443
+ "gp-size-60",
1444
+ "gp-size-70",
1445
+ "gp-size-80",
1446
+ "gp-size-90",
1439
1447
  "gp-tight",
1440
1448
  "gp-loose",
1441
1449
  "gp-columns",
@@ -1537,10 +1545,10 @@ import markdownItAttrs from "markdown-it-attrs";
1537
1545
  import markdownItFootnote from "markdown-it-footnote";
1538
1546
 
1539
1547
  // src/lib/markdown/gp-pin-scope.js
1540
- function warn2(env, line, type, message, marker) {
1548
+ function warn2(env, line, type, message, severity) {
1541
1549
  if (!env.layoutWarnings)
1542
1550
  env.layoutWarnings = [];
1543
- env.layoutWarnings.push({ line, type, message, marker });
1551
+ env.layoutWarnings.push(severity ? { line, type, message, severity } : { line, type, message });
1544
1552
  }
1545
1553
  function editDistance2(a, b) {
1546
1554
  let prev = Array.from({ length: b.length + 1 }, (_, j) => j);
@@ -1583,7 +1591,7 @@ function checkFlushArt(token, env, line) {
1583
1591
  return;
1584
1592
  if (!classes.some((c) => PIN_EDGES.includes(c)))
1585
1593
  return;
1586
- warn2(env, line, "flush_art", FLUSH_ART_MSG);
1594
+ warn2(env, line, "flush_art", FLUSH_ART_MSG, "info");
1587
1595
  }
1588
1596
  function elementNameFor(token) {
1589
1597
  switch (token.type) {
@@ -2387,6 +2395,7 @@ function printAreaMeta(page) {
2387
2395
  bleed: page.bleed ?? 0,
2388
2396
  safe: page.safe ?? 0,
2389
2397
  artSafe: page.artSafe,
2398
+ gutter: page.gutter,
2390
2399
  preset: page.preset,
2391
2400
  spec: page.spec
2392
2401
  });
@@ -178,22 +178,34 @@ export interface GutterpressManifest {
178
178
  bleed?: number;
179
179
  /**
180
180
  * The TEXT rule (pt): glyphs stay at least this far inside the trim on
181
- * EVERY edge — DriveThruRPG's "keep text 0.5in inside the trim" (`dtrpg`
182
- * sets 36). The preview's overlay outlines it and flags text outside it,
183
- * and `pdf.print.safe-margins` fails a built PDF whose text is closer. An
184
- * image pinned to the binding edge sits on it (and to any edge, where
185
- * `artSafe` is not set); nothing in a book's CSS moves it.
181
+ * EVERY edge, the binding edge too unless the book sets a `gutter` —
182
+ * DriveThruRPG's "keep text 0.5in inside the trim" (`dtrpg` sets 36). The
183
+ * preview's overlay outlines it and flags text outside it, and
184
+ * `pdf.print.safe-margins` fails a built PDF whose text is closer. An
185
+ * image pinned to an edge where `artSafe` is not set sits on it; nothing
186
+ * in a book's CSS moves it.
186
187
  */
187
188
  safe?: number;
188
189
  /**
189
190
  * The ART rule (pt): art that does not bleed — images, backgrounds,
190
191
  * borders, rules — stays at least this far inside the trim on the top,
191
- * bottom and OUTER edge; at the binding edge it uses `safe`. DriveThruRPG's
192
+ * bottom and OUTER edge; at the binding edge it uses `gutter`. DriveThruRPG's
192
193
  * "keep non-bleeding art 0.25in from the outside edges" (`dtrpg` sets 18).
193
194
  * An image pinned to the top, bottom or outer edge (`.gp-pin`) sits on this
194
195
  * line unless it carries `.gp-flush`. Absent = the same as `safe`.
195
196
  */
196
197
  artSafe?: number;
198
+ /**
199
+ * The binding allowance (pt): how far content stays from the spine — the
200
+ * binding edge, the left of a right-hand page and the right of a left-hand
201
+ * one — measured from the trim. It stands in for `safe` at the binding
202
+ * edge, for text and for art alike, so a book that keeps its text further
203
+ * from the spine than the printer's minimum says so here, not in its CSS
204
+ * (the Field Guide keeps 0.75in = 54 where DriveThruRPG asks for 0.5in).
205
+ * An image pinned to the binding edge sits on it. The other edges keep
206
+ * `safe` and `artSafe`. Absent = the same as `safe`; presets leave it unset.
207
+ */
208
+ gutter?: number;
197
209
  };
198
210
  ink?: {
199
211
  maxTac?: number;
@@ -327,6 +339,8 @@ export interface ResolvedConfig {
327
339
  safe?: number;
328
340
  /** The art rule's inset from the trim in pt, top/bottom/outer edge (see the manifest field); absent = same as `safe`. */
329
341
  artSafe?: number;
342
+ /** The binding edge's inset from the trim in pt, text and art alike (see the manifest field); absent = same as `safe`. */
343
+ gutter?: number;
330
344
  };
331
345
  ink: {
332
346
  maxTac: number;
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  executeAndReport
3
- } from "./cli-0ey902sx.js";
3
+ } from "./cli-sc5t7c74.js";
4
4
  import {
5
5
  log
6
- } from "./cli-h4tfmpg3.js";
6
+ } from "./cli-6xym15vm.js";
7
7
  import {
8
8
  UsageError,
9
9
  rejectExtraPositionals,
10
10
  rejectUnknownFlags
11
- } from "./cli-fmksazej.js";
11
+ } from "./cli-553ce1d4.js";
12
12
  import"./cli-ht1bcqdd.js";
13
- import"./cli-61vd4ews.js";
13
+ import"./cli-cyej3p9v.js";
14
14
  import {
15
15
  BuildError,
16
16
  EXIT_CODES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gutterpress",
3
- "version": "0.11.20-alpha.4",
3
+ "version": "0.11.20-alpha.5",
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",