gutterpress 0.11.23-alpha.3 → 0.11.23-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -6
- package/dist/{README-8db7btxb.md → README-syg2hn83.md} +1 -1
- package/dist/api/index.js +5 -5
- package/dist/{build-m78jcpf7.js → build-c48eer6f.js} +8 -8
- package/dist/checks/asset/extensions.d.ts +1 -1
- package/dist/checks/asset/index.d.ts +0 -1
- package/dist/checks/policy.d.ts +5 -4
- package/dist/checks/source/config-file.d.ts +9 -6
- package/dist/checks/source/dangling-links.d.ts +1 -1
- package/dist/checks/types.d.ts +2 -2
- package/dist/{cli-xsrffqzt.js → cli-54xt7pjg.js} +8 -8
- package/dist/{cli-2ppw6q9v.js → cli-5crpmz42.js} +80 -1
- package/dist/{cli-1h17ktsg.js → cli-93mkaw6v.js} +96 -209
- package/dist/{cli-n2tsxqpn.js → cli-d9mm3vvh.js} +7 -2
- package/dist/{cli-5jzyw06s.js → cli-gnpea9dx.js} +1 -1
- package/dist/{cli-s6djx4ma.js → cli-pspjxnc8.js} +1 -1
- package/dist/{cli-t8be9yeb.js → cli-rqh295j9.js} +12 -7
- package/dist/{cli-h4x81x97.js → cli-y6d1arem.js} +207 -142
- package/dist/cli.js +12 -12
- package/dist/{doctor-j71jqce3.js → doctor-ptb346k8.js} +4 -3
- package/dist/{engine-m4y10shc.js → engine-4rzdx6af.js} +1 -1
- package/dist/{engine-1r6q80tq.js → engine-6txhxmmv.js} +2 -2
- package/dist/{ext-fq2hg9va.js → ext-gy8szg3x.js} +8 -8
- package/dist/{extension-restore-9dh7c4tp.js → extension-restore-dymzcasz.js} +2 -2
- package/dist/{extension-restore-tmxtzkm0.js → extension-restore-m8tj43e7.js} +4 -4
- package/dist/{index-2ppw6q9v.js → index-5crpmz42.js} +80 -1
- package/dist/{index-nedd07bk.js → index-5kh4c78h.js} +8 -8
- package/dist/{index-0wee4408.js → index-8ywkd2sv.js} +12 -7
- package/dist/{index-prqvz3xm.js → index-ea94zbq4.js} +132 -228
- package/dist/{index-7pck1q9c.js → index-kaks3mm2.js} +206 -141
- package/dist/{index-nvmf22rt.js → index-yc3xj266.js} +1 -1
- package/dist/index.js +6 -6
- package/dist/lib/build-preflight.d.ts +4 -10
- package/dist/lib/build-runner.d.ts +1 -1
- package/dist/lib/ghostscript.d.ts +5 -2
- package/dist/lib/lint-rules.d.ts +5 -1
- package/dist/lib/manifest-config.d.ts +3 -2
- package/dist/lib/manifest-old-spellings.d.ts +64 -0
- package/dist/lib/markdown/chapter-id.d.ts +1 -1
- package/dist/lib/markdown/index.d.ts +1 -1
- package/dist/lib/markdown/table.d.ts +5 -3
- package/dist/lib/page-size.d.ts +14 -9
- package/dist/lib/pdf-inspect.d.ts +27 -0
- package/dist/lib/presets.d.ts +10 -8
- package/dist/lib/printsafe.d.ts +1 -1
- package/dist/lib/project-scaffold.d.ts +1 -1
- package/dist/lib/remote-auth/sync-messages.d.ts +2 -2
- package/dist/lib/targets.d.ts +4 -4
- package/dist/lib/validation-exec.d.ts +4 -4
- package/dist/{manifest-my7mdv8j.yaml → manifest-2kc56wvw.yaml} +3 -4
- package/dist/{manifest-8afhrk30.yaml → manifest-41ddzm13.yaml} +3 -4
- package/dist/{manifest-gf13sjp8.yaml → manifest-79zsgkpn.yaml} +3 -4
- package/dist/{manifest-d4f9q79e.yaml → manifest-sqzm4681.yaml} +3 -4
- package/dist/{manifest.schema-650pe0d1.json → manifest.schema-w86c1xw1.json} +19 -309
- package/dist/{new-s4zcaepg.js → new-t2t28ccb.js} +9 -15
- package/dist/{page-rules-fj09xct5.css → page-rules-ytj9p04v.css} +1 -1
- package/dist/{pdf-inspect-wnw4za71.js → pdf-inspect-b3mf81ex.js} +3 -1
- package/dist/{plugins-80emnf31.js → plugins-fec8t2bh.js} +1 -1
- package/dist/{plugins-4vaf27n9.js → plugins-sqa4msdk.js} +3 -3
- package/dist/{preflight-c7w1xdn3.js → preflight-srq8fktp.js} +8 -8
- package/dist/preview/file-watcher.d.ts +1 -3
- package/dist/{preview-mzytcwyk.js → preview-zsp9hstd.js} +8 -8
- package/dist/{publish-fez14ad4.js → publish-hhy31gr9.js} +8 -8
- package/dist/render.js +6 -1
- package/dist/schema/manifest.types.d.ts +40 -107
- package/dist/{tokens-ye64p899.css → tokens-n82t4k9h.css} +11 -4
- package/dist/{validate-p2chr6hr.js → validate-r9jdz85h.js} +8 -8
- package/package.json +1 -1
- package/dist/checks/asset/approved-fonts.d.ts +0 -3
|
@@ -116,24 +116,19 @@
|
|
|
116
116
|
]
|
|
117
117
|
]
|
|
118
118
|
},
|
|
119
|
-
"
|
|
119
|
+
"chapters": {
|
|
120
|
+
"type": ["array", "null"],
|
|
121
|
+
"description": "The book's markdown files, in reading order, relative to the manifest directory. Omit it (or set it to null) to use every top-level .md file in natural order. Book setup > Details in the app edits it. Assets are not listed anywhere: the build copies exactly what the book references.",
|
|
122
|
+
"items": { "type": "string" },
|
|
123
|
+
"examples": [["chapter-01.md", "chapter-02.md"]]
|
|
124
|
+
},
|
|
125
|
+
"checks": {
|
|
120
126
|
"type": "object",
|
|
121
|
-
"description": "
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
"default": null,
|
|
127
|
-
"items": {
|
|
128
|
-
"type": "string",
|
|
129
|
-
"minLength": 1
|
|
130
|
-
},
|
|
131
|
-
"examples": [
|
|
132
|
-
["chapter-01.md", "chapter-02.md"],
|
|
133
|
-
["frontmatter/title.md", "chapters/intro.md", "appendix.md"]
|
|
134
|
-
]
|
|
135
|
-
}
|
|
136
|
-
}
|
|
127
|
+
"description": "Per-check and per-rule levels, keyed by a check id (pdf.print.image-resolution, source.markdownlint, …) or a lint rule id (printsafe/no-risky-print-effects). `off` switches it off; `on` switches on a check the preset leaves off, at its own severity; `info`, `warn` and `error` set the severity its findings are reported at. The numbers the checks measure against come from the preset and the publish targets. Linter config files (.markdownlint.yaml, .htmlhintrc, .gutterpress/css-contract.yaml) are found by name in the book's folder or a folder above it, up to the repository.",
|
|
128
|
+
"additionalProperties": {
|
|
129
|
+
"enum": ["off", "on", "info", "warn", "warning", "error", true, false]
|
|
130
|
+
},
|
|
131
|
+
"examples": [{ "pdf.structure.qpdf": "off", "heuristic.whitespace.text-density": "info", "pdf.nav.bookmarks": "warn" }]
|
|
137
132
|
},
|
|
138
133
|
"pdfx": {
|
|
139
134
|
"type": "object",
|
|
@@ -164,7 +159,7 @@
|
|
|
164
159
|
},
|
|
165
160
|
"transparency": {
|
|
166
161
|
"type": "string",
|
|
167
|
-
"description": "What a PDF/X build does with a page that uses transparency (an alpha-channel image, a soft `rgba()` shadow, CSS `opacity` or `mix-blend-mode`), which PDF/X (PDF 1.3) cannot represent. `flatten-page` leaves the page to Ghostscript, which rasterizes the WHOLE page: it looks right but loses the page's text and fonts. `preserve-text` flattens only the artwork to a picture (300 DPI, or `rasterDpi`) and draws the text live on top, so the page stays searchable. Text is then always the top layer (text another element covers shows through). A page whose text is translucent or blended, set in a Type 3 font (e.g. a synthetic bold or a text stroke), filled with a pattern or used as a clip, or that has a repeating or conic gradient, falls back to `flatten-page`, and so does any page listed in `flattenPages`. Set `
|
|
162
|
+
"description": "What a PDF/X build does with a page that uses transparency (an alpha-channel image, a soft `rgba()` shadow, CSS `opacity` or `mix-blend-mode`), which PDF/X (PDF 1.3) cannot represent. `flatten-page` leaves the page to Ghostscript, which rasterizes the WHOLE page: it looks right but loses the page's text and fonts. `preserve-text` flattens only the artwork to a picture (300 DPI, or `rasterDpi`) and draws the text live on top, so the page stays searchable. Text is then always the top layer (text another element covers shows through). A page whose text is translucent or blended, set in a Type 3 font (e.g. a synthetic bold or a text stroke), filled with a pattern or used as a clip, or that has a repeating or conic gradient, falls back to `flatten-page`, and so does any page listed in `flattenPages`. Set `checks: { asset.image.alpha-channel: off }` to use alpha-channel images. Same for every preset: `flatten-page`.",
|
|
168
163
|
"enum": ["flatten-page", "preserve-text"],
|
|
169
164
|
"default": "flatten-page"
|
|
170
165
|
},
|
|
@@ -221,12 +216,6 @@
|
|
|
221
216
|
"exclusiveMinimum": 0,
|
|
222
217
|
"examples": [792, 810, 648]
|
|
223
218
|
},
|
|
224
|
-
"tolerance": {
|
|
225
|
-
"type": "number",
|
|
226
|
-
"description": "Allowed deviation, in points, between the expected and the actual page size.",
|
|
227
|
-
"default": 0.5,
|
|
228
|
-
"minimum": 0
|
|
229
|
-
},
|
|
230
219
|
"bleed": {
|
|
231
220
|
"type": "number",
|
|
232
221
|
"description": "A bleed, in points, that the page width x height ALREADY CONTAINS on the top, bottom and OUTER edges (none on the binding edge) — how DriveThruRPG's interior file is cut (8.625 x 11.25in for an 8.5 x 11in book). It tells the preview's safe area & bleed overlay, the `pdf.print.safe-margins` check and pinned art where the trim is, and by itself changes nothing in the PDF. Preset default: dtrpg 9 (0.125in); book and custom none.",
|
|
@@ -253,7 +242,7 @@
|
|
|
253
242
|
},
|
|
254
243
|
"margin": {
|
|
255
244
|
"type": "object",
|
|
256
|
-
"description": "Page margins, in points (1in = 72pt): the space between the trim and the text on each edge. `inside` is the binding edge (the left of a right-hand page, the right of a left-hand one), `outside` the other. When set, the book prints with these margins and any `@page` margin in a stylesheet is overridden; when left out, the stylesheets' `@page` margins apply (a look's design), else 1in. Setup >
|
|
245
|
+
"description": "Page margins, in points (1in = 72pt): the space between the trim and the text on each edge. `inside` is the binding edge (the left of a right-hand page, the right of a left-hand one), `outside` the other. When set, the book prints with these margins and any `@page` margin in a stylesheet is overridden; when left out, the stylesheets' `@page` margins apply (a look's design), else 1in. Setup > Book in the app edits it. All four edges are required together.",
|
|
257
246
|
"properties": {
|
|
258
247
|
"top": { "type": "number", "description": "Top margin in points.", "minimum": 0, "examples": [61.2, 72] },
|
|
259
248
|
"bottom": { "type": "number", "description": "Bottom margin in points.", "minimum": 0, "examples": [61.2, 72] },
|
|
@@ -265,254 +254,6 @@
|
|
|
265
254
|
}
|
|
266
255
|
}
|
|
267
256
|
},
|
|
268
|
-
"ink": {
|
|
269
|
-
"type": "object",
|
|
270
|
-
"description": "Ink coverage limits used by the `pdf.print.ink-coverage` check.",
|
|
271
|
-
"properties": {
|
|
272
|
-
"maxTac": {
|
|
273
|
-
"type": "number",
|
|
274
|
-
"description": "Maximum total area coverage (TAC), as a percentage summed across C+M+Y+K. 400 is the physical ceiling (100% of each plate), so it effectively disables the cap. Preset defaults: dtrpg 240 (DriveThruRPG's limit), book 400.",
|
|
275
|
-
"minimum": 0,
|
|
276
|
-
"examples": [240, 300, 400]
|
|
277
|
-
},
|
|
278
|
-
"tacTolerance": {
|
|
279
|
-
"type": "number",
|
|
280
|
-
"description": "Allowed percentage of sampled pixels that may exceed `maxTac` before the check fails.",
|
|
281
|
-
"default": 0.5,
|
|
282
|
-
"minimum": 0
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
},
|
|
286
|
-
"lint": {
|
|
287
|
-
"type": "object",
|
|
288
|
-
"description": "Lint settings: whether the pre-build lint runs, the markdownlint config, and per-rule level overrides.",
|
|
289
|
-
"properties": {
|
|
290
|
-
"enabled": {
|
|
291
|
-
"type": "boolean",
|
|
292
|
-
"description": "Whether linting runs.",
|
|
293
|
-
"default": true
|
|
294
|
-
},
|
|
295
|
-
"configPath": {
|
|
296
|
-
"type": ["string", "null"],
|
|
297
|
-
"description": "Path to a markdownlint config file, relative to the manifest directory. null uses the built-in defaults.",
|
|
298
|
-
"default": null
|
|
299
|
-
},
|
|
300
|
-
"rules": {
|
|
301
|
-
"type": "object",
|
|
302
|
-
"description": "Per-rule level overrides, keyed by rule id: a printsafe rule (printsafe/no-risky-print-effects, printsafe/page-containment, printsafe/preview-cannot-follow, printsafe/no-remote-urls) or a check id such as source.accessibility.heading-order. \"off\" silences the rule; \"warn\" / \"error\" set its severity. An id that matches no rule is ignored. To silence one site instead, put a `gutterpress-disable-next-line <rule-id> -- reason` comment (CSS `/* */` or markdown `<!-- -->`) on the line above it.",
|
|
303
|
-
"additionalProperties": { "enum": ["off", "warn", "error"] },
|
|
304
|
-
"examples": [{ "printsafe/no-risky-print-effects": "off" }]
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
},
|
|
308
|
-
"validate": {
|
|
309
|
-
"type": "object",
|
|
310
|
-
"description": "Preflight/validation configuration. Individual checks are addressed by id (see `checks`); the sections below supply the thresholds those checks read.",
|
|
311
|
-
"properties": {
|
|
312
|
-
"enabled": {
|
|
313
|
-
"type": "boolean",
|
|
314
|
-
"description": "Whether validation runs.",
|
|
315
|
-
"default": true
|
|
316
|
-
},
|
|
317
|
-
"checks": {
|
|
318
|
-
"type": "object",
|
|
319
|
-
"description": "Per-check overrides, keyed by check id. This is an OPEN dictionary — any registered check id may appear, including ids contributed by plugins. Built-in ids are namespaced source.*, asset.*, pdf.* and heuristic.* (e.g. pdf.structure.qpdf, pdf.print.embedded-fonts, pdf.print.pdfx-markers, pdf.print.page-size, asset.image.file-size, source.markdownlint, heuristic.whitespace.text-density). A boolean value is shorthand for enabled/disabled.",
|
|
320
|
-
"propertyNames": {
|
|
321
|
-
"description": "A registered check id, e.g. \"pdf.print.embedded-fonts\"."
|
|
322
|
-
},
|
|
323
|
-
"additionalProperties": {
|
|
324
|
-
"oneOf": [
|
|
325
|
-
{
|
|
326
|
-
"type": "boolean",
|
|
327
|
-
"description": "Shorthand for { enabled: <value> }."
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
"type": "object",
|
|
331
|
-
"properties": {
|
|
332
|
-
"enabled": {
|
|
333
|
-
"type": "boolean",
|
|
334
|
-
"description": "Whether this check runs.",
|
|
335
|
-
"default": true
|
|
336
|
-
},
|
|
337
|
-
"severity": {
|
|
338
|
-
"type": "string",
|
|
339
|
-
"description": "How a failure of this check is reported.",
|
|
340
|
-
"enum": ["error", "warning", "info"]
|
|
341
|
-
},
|
|
342
|
-
"options": {
|
|
343
|
-
"type": "object",
|
|
344
|
-
"description": "Check-specific options.",
|
|
345
|
-
"additionalProperties": true
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
]
|
|
350
|
-
},
|
|
351
|
-
"examples": [
|
|
352
|
-
{
|
|
353
|
-
"pdf.structure.qpdf": { "enabled": true, "severity": "error" },
|
|
354
|
-
"pdf.print.pdfx-markers": false
|
|
355
|
-
}
|
|
356
|
-
]
|
|
357
|
-
},
|
|
358
|
-
"source": {
|
|
359
|
-
"type": "object",
|
|
360
|
-
"description": "Source-linting checks (markdown, generated HTML, CSS). Each entry is a path to that linter's config file, or false to disable the check.",
|
|
361
|
-
"properties": {
|
|
362
|
-
"markdownlint": {
|
|
363
|
-
"description": "Path to a markdownlint config, or false to disable the source.markdownlint check.",
|
|
364
|
-
"default": null,
|
|
365
|
-
"oneOf": [
|
|
366
|
-
{ "type": "string", "minLength": 1 },
|
|
367
|
-
{ "type": "boolean", "const": false }
|
|
368
|
-
]
|
|
369
|
-
},
|
|
370
|
-
"htmlhint": {
|
|
371
|
-
"description": "Path to an htmlhint config, or false to disable the source.htmlhint check.",
|
|
372
|
-
"default": null,
|
|
373
|
-
"oneOf": [
|
|
374
|
-
{ "type": "string", "minLength": 1 },
|
|
375
|
-
{ "type": "boolean", "const": false }
|
|
376
|
-
]
|
|
377
|
-
},
|
|
378
|
-
"stylelint": {
|
|
379
|
-
"description": "Path to a stylelint config, or false to disable the source.stylelint check.",
|
|
380
|
-
"default": null,
|
|
381
|
-
"oneOf": [
|
|
382
|
-
{ "type": "string", "minLength": 1 },
|
|
383
|
-
{ "type": "boolean", "const": false }
|
|
384
|
-
]
|
|
385
|
-
},
|
|
386
|
-
"cssOwnership": {
|
|
387
|
-
"description": "Path to a CSS ownership contract (default discovery: .gutterpress/css-contract.yaml), or false to disable the source.css-ownership check. Optional — absent means no contract, so the check reports nothing.",
|
|
388
|
-
"default": null,
|
|
389
|
-
"oneOf": [
|
|
390
|
-
{ "type": "string", "minLength": 1 },
|
|
391
|
-
{ "type": "boolean", "const": false }
|
|
392
|
-
]
|
|
393
|
-
},
|
|
394
|
-
"allowedCallouts": {
|
|
395
|
-
"type": "array",
|
|
396
|
-
"deprecated": true,
|
|
397
|
-
"description": "DEPRECATED and IGNORED (no-op). The `:::name` container syntax this gated was removed 2026-05-17, along with the callout-validation check it configured. Kept only so older manifests still parse; setting it logs a deprecation warning. See docs/migrations/2026-05-removing-container-syntax.md.",
|
|
398
|
-
"items": { "type": "string" }
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
},
|
|
402
|
-
"assets": {
|
|
403
|
-
"type": "object",
|
|
404
|
-
"description": "Thresholds for the asset.* checks (images and fonts on disk).",
|
|
405
|
-
"properties": {
|
|
406
|
-
"maxImageSize": {
|
|
407
|
-
"type": "integer",
|
|
408
|
-
"description": "Maximum image file size in bytes (asset.image.file-size).",
|
|
409
|
-
"default": 10000000,
|
|
410
|
-
"minimum": 0
|
|
411
|
-
},
|
|
412
|
-
"minImageDpi": {
|
|
413
|
-
"type": "integer",
|
|
414
|
-
"deprecated": true,
|
|
415
|
-
"description": "DEPRECATED and IGNORED (no-op). The source-image check it configured read DPI metadata, which says nothing about the printed size. The build warns about each image placed below 300 DPI, and `validate.pdf.minImageResolution` checks the built PDF. Kept only so older manifests still parse.",
|
|
416
|
-
"minimum": 0
|
|
417
|
-
},
|
|
418
|
-
"allowedColorSpaces": {
|
|
419
|
-
"type": "array",
|
|
420
|
-
"deprecated": true,
|
|
421
|
-
"description": "DEPRECATED and IGNORED (no-op). The source-image colour-space check it configured was removed: a PDF/X build converts every image to the output intent, and `pdf.print.color-spaces` checks the result. Kept only so older manifests still parse.",
|
|
422
|
-
"items": { "type": "string" }
|
|
423
|
-
},
|
|
424
|
-
"allowAlpha": {
|
|
425
|
-
"type": "boolean",
|
|
426
|
-
"description": "Whether images may carry an alpha channel (asset.image.alpha-channel). Preset defaults: dtrpg false (PDF/X forbids transparency), book true."
|
|
427
|
-
},
|
|
428
|
-
"approvedFontFiles": {
|
|
429
|
-
"type": "array",
|
|
430
|
-
"description": "Allow-list of font files (asset.font.approved-files). Empty means no restriction.",
|
|
431
|
-
"default": [],
|
|
432
|
-
"items": { "type": "string" }
|
|
433
|
-
},
|
|
434
|
-
"requireFontLicense": {
|
|
435
|
-
"type": "boolean",
|
|
436
|
-
"description": "Require a license record for each embedded font (asset.font.license).",
|
|
437
|
-
"default": false
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
},
|
|
441
|
-
"pdf": {
|
|
442
|
-
"type": "object",
|
|
443
|
-
"description": "Thresholds for the pdf.* checks (run against the produced PDF).",
|
|
444
|
-
"properties": {
|
|
445
|
-
"requireBookmarks": {
|
|
446
|
-
"type": "boolean",
|
|
447
|
-
"description": "Require a PDF outline/bookmark tree (pdf.nav.bookmarks).",
|
|
448
|
-
"default": false
|
|
449
|
-
},
|
|
450
|
-
"requireTocLinks": {
|
|
451
|
-
"type": "boolean",
|
|
452
|
-
"description": "Require the table of contents to use real internal links (pdf.nav.toc-links).",
|
|
453
|
-
"default": false
|
|
454
|
-
},
|
|
455
|
-
"minImageResolution": {
|
|
456
|
-
"type": "integer",
|
|
457
|
-
"description": "Minimum placed-image resolution in DPI (pdf.print.image-resolution).",
|
|
458
|
-
"default": 300,
|
|
459
|
-
"minimum": 0
|
|
460
|
-
},
|
|
461
|
-
"forbidTransparency": {
|
|
462
|
-
"type": "boolean",
|
|
463
|
-
"description": "Fail on transparency in the PDF (pdf.print.transparency). Preset defaults: dtrpg true (required by PDF/X), book false."
|
|
464
|
-
},
|
|
465
|
-
"requireBleed": {
|
|
466
|
-
"type": "boolean",
|
|
467
|
-
"description": "Require a bleed box on every page (pdf.print.bleed).",
|
|
468
|
-
"default": false
|
|
469
|
-
},
|
|
470
|
-
"bleedSize": {
|
|
471
|
-
"type": "number",
|
|
472
|
-
"description": "Expected bleed, in points (9pt = 0.125in).",
|
|
473
|
-
"default": 9,
|
|
474
|
-
"minimum": 0
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
},
|
|
478
|
-
"heuristics": {
|
|
479
|
-
"type": "object",
|
|
480
|
-
"description": "Thresholds for the heuristic.* layout-quality checks. These are advisory design heuristics, not hard print requirements.",
|
|
481
|
-
"properties": {
|
|
482
|
-
"maxDecorativeLayers": {
|
|
483
|
-
"type": "integer",
|
|
484
|
-
"description": "Maximum stacked decorative layers per page (heuristic.decoration.layer-count).",
|
|
485
|
-
"default": 5,
|
|
486
|
-
"minimum": 0
|
|
487
|
-
},
|
|
488
|
-
"textDensityRange": {
|
|
489
|
-
"type": "object",
|
|
490
|
-
"description": "Acceptable characters-per-page range (heuristic.whitespace.text-density).",
|
|
491
|
-
"properties": {
|
|
492
|
-
"min": {
|
|
493
|
-
"type": "number",
|
|
494
|
-
"description": "Minimum characters per page.",
|
|
495
|
-
"default": 200,
|
|
496
|
-
"minimum": 0
|
|
497
|
-
},
|
|
498
|
-
"max": {
|
|
499
|
-
"type": "number",
|
|
500
|
-
"description": "Maximum characters per page.",
|
|
501
|
-
"default": 5000,
|
|
502
|
-
"minimum": 0
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
},
|
|
506
|
-
"maxParagraphsPerSection": {
|
|
507
|
-
"type": "integer",
|
|
508
|
-
"description": "Maximum paragraphs in one section before it is flagged as under-chunked (heuristic.chunking.section-density).",
|
|
509
|
-
"default": 10,
|
|
510
|
-
"minimum": 0
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
},
|
|
516
257
|
"publish": {
|
|
517
258
|
"type": "object",
|
|
518
259
|
"description": "Publish provider settings, keyed by the same provider id `gutterpress publish --provider <id>` takes. Non-secret configuration only — API keys and tokens are stored in the host credential store, never in this file.",
|
|
@@ -634,53 +375,22 @@
|
|
|
634
375
|
"authors": ["Author Name"],
|
|
635
376
|
"preset": "book",
|
|
636
377
|
"styles": ["styles/book.css"],
|
|
637
|
-
"
|
|
638
|
-
"files": ["chapter-01.md", "chapter-02.md"]
|
|
639
|
-
}
|
|
378
|
+
"chapters": ["chapter-01.md", "chapter-02.md"]
|
|
640
379
|
},
|
|
641
380
|
{
|
|
642
381
|
"title": "Print-Ready Supplement",
|
|
643
382
|
"authors": ["Author Name"],
|
|
644
383
|
"preset": "dtrpg",
|
|
645
|
-
"
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
"priority": 100
|
|
649
|
-
}
|
|
650
|
-
],
|
|
651
|
-
"styles": ["css/index.css"],
|
|
652
|
-
"source": {
|
|
653
|
-
"files": ["chapter-00.md", "chapter-01.md"]
|
|
654
|
-
},
|
|
655
|
-
"page": {
|
|
656
|
-
"width": 621,
|
|
657
|
-
"height": 810,
|
|
658
|
-
"tolerance": 0.5
|
|
659
|
-
},
|
|
660
|
-
"pdfx": {
|
|
661
|
-
"flavor": "x1a",
|
|
662
|
-
"icc": ".gutterpress/profiles/CGATS21_CRPC1.icc"
|
|
663
|
-
},
|
|
664
|
-
"ink": {
|
|
665
|
-
"maxTac": 240
|
|
666
|
-
}
|
|
384
|
+
"extensions": ["clean-book"],
|
|
385
|
+
"chapters": ["chapter-00.md", "chapter-01.md"],
|
|
386
|
+
"pdfx": { "flavor": "x1a" }
|
|
667
387
|
},
|
|
668
388
|
{
|
|
669
389
|
"title": "Technical Documentation",
|
|
670
390
|
"authors": ["Tech Team"],
|
|
671
391
|
"preset": "book",
|
|
672
392
|
"styles": ["styles/book.css"],
|
|
673
|
-
"
|
|
674
|
-
"enabled": true,
|
|
675
|
-
"checks": {
|
|
676
|
-
"pdf.nav.bookmarks": { "enabled": true, "severity": "warning" },
|
|
677
|
-
"pdf.print.pdfx-markers": false
|
|
678
|
-
},
|
|
679
|
-
"pdf": {
|
|
680
|
-
"requireBookmarks": true,
|
|
681
|
-
"requireTocLinks": true
|
|
682
|
-
}
|
|
683
|
-
}
|
|
393
|
+
"checks": { "pdf.nav.bookmarks": "warn", "pdf.nav.toc-links": "warn" }
|
|
684
394
|
}
|
|
685
395
|
]
|
|
686
396
|
}
|
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
EXTENSION_KINDS,
|
|
4
4
|
scaffoldExtension,
|
|
5
5
|
scaffoldProject
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-93mkaw6v.js";
|
|
7
7
|
import {
|
|
8
8
|
resolveGhostscript
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-d9mm3vvh.js";
|
|
10
10
|
import"./cli-ht1bcqdd.js";
|
|
11
|
-
import"./cli-
|
|
12
|
-
import"./cli-
|
|
11
|
+
import"./cli-54xt7pjg.js";
|
|
12
|
+
import"./cli-5crpmz42.js";
|
|
13
13
|
import"./cli-eyyggect.js";
|
|
14
14
|
import {
|
|
15
15
|
isToolAvailable
|
|
@@ -22,15 +22,15 @@ import {
|
|
|
22
22
|
TARGET_IDS,
|
|
23
23
|
loadManifest,
|
|
24
24
|
resolveConfig
|
|
25
|
-
} from "./cli-
|
|
26
|
-
import"./cli-
|
|
27
|
-
import"./cli-
|
|
25
|
+
} from "./cli-y6d1arem.js";
|
|
26
|
+
import"./cli-rqh295j9.js";
|
|
27
|
+
import"./cli-pspjxnc8.js";
|
|
28
28
|
import {
|
|
29
29
|
UsageError,
|
|
30
30
|
rejectExtraPositionals,
|
|
31
31
|
rejectUnknownFlags
|
|
32
32
|
} from "./cli-d8xjns66.js";
|
|
33
|
-
import"./cli-
|
|
33
|
+
import"./cli-gnpea9dx.js";
|
|
34
34
|
import {
|
|
35
35
|
EXIT_CODES
|
|
36
36
|
} from "./cli-46ycxe6r.js";
|
|
@@ -90,10 +90,6 @@ var newArgs = {
|
|
|
90
90
|
type: "string",
|
|
91
91
|
description: "Trim height in points, 72pt = 1in (required with --preset custom; optional override otherwise)"
|
|
92
92
|
},
|
|
93
|
-
"page-tolerance": {
|
|
94
|
-
type: "string",
|
|
95
|
-
description: "Allowed trim deviation in points when validating a built PDF (default: 0.5)"
|
|
96
|
-
},
|
|
97
93
|
git: {
|
|
98
94
|
type: "boolean",
|
|
99
95
|
description: "Initialise local version history (default: true; use --no-git to skip)",
|
|
@@ -122,7 +118,6 @@ var BOOK_ONLY_FLAGS = [
|
|
|
122
118
|
"template",
|
|
123
119
|
"page-width",
|
|
124
120
|
"page-height",
|
|
125
|
-
"page-tolerance",
|
|
126
121
|
"git"
|
|
127
122
|
];
|
|
128
123
|
var EXTENSION_ONLY_FLAGS = ["prefix", "description"];
|
|
@@ -243,8 +238,7 @@ var new_default = defineCommand({
|
|
|
243
238
|
}
|
|
244
239
|
const pageWidth = parsePoints(args["page-width"], "--page-width");
|
|
245
240
|
const pageHeight = parsePoints(args["page-height"], "--page-height");
|
|
246
|
-
const
|
|
247
|
-
const customPage = pageWidth !== undefined && pageHeight !== undefined ? { width: pageWidth, height: pageHeight, ...pageTolerance !== undefined ? { tolerance: pageTolerance } : {} } : undefined;
|
|
241
|
+
const customPage = pageWidth !== undefined && pageHeight !== undefined ? { width: pageWidth, height: pageHeight } : undefined;
|
|
248
242
|
if (preset === "custom" && !customPage) {
|
|
249
243
|
console.error("The custom preset needs a trim size: --page-width and --page-height in points (72pt = 1in — e.g. US Letter is 612 x 792).");
|
|
250
244
|
process.exit(EXIT_CODES.USAGE);
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* to a CSS `@page name`.
|
|
8
8
|
*
|
|
9
9
|
* NOT the page geometry. The trim size and the margins are the BOOK's,
|
|
10
|
-
* recorded in its manifest (`preset:`, `page:` — Setup >
|
|
10
|
+
* recorded in its manifest (`preset:`, `page:` — Setup > Book in the
|
|
11
11
|
* app) and written by the build after every stylesheet, so a `size` here
|
|
12
12
|
* would be ignored (and reported) and a `margin` here would hold only
|
|
13
13
|
* until the author sets margins in the app. Design the furniture below to
|
|
@@ -11,15 +11,17 @@ import {
|
|
|
11
11
|
isLoadable,
|
|
12
12
|
loadPdf,
|
|
13
13
|
pageHasMarks,
|
|
14
|
+
pagesWithVisibleShadingPaints,
|
|
14
15
|
pendingGraceDestroyCount,
|
|
15
16
|
retainPdfCache,
|
|
16
17
|
unsplittableTextReasons
|
|
17
|
-
} from "./cli-
|
|
18
|
+
} from "./cli-5crpmz42.js";
|
|
18
19
|
import"./cli-37x76zdn.js";
|
|
19
20
|
export {
|
|
20
21
|
unsplittableTextReasons,
|
|
21
22
|
retainPdfCache,
|
|
22
23
|
pendingGraceDestroyCount,
|
|
24
|
+
pagesWithVisibleShadingPaints,
|
|
23
25
|
pageHasMarks,
|
|
24
26
|
loadPdf,
|
|
25
27
|
isLoadable,
|
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
loadPlugins,
|
|
9
9
|
loadPluginsWithCss,
|
|
10
10
|
loadPublishFunction
|
|
11
|
-
} from "./cli-
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
11
|
+
} from "./cli-rqh295j9.js";
|
|
12
|
+
import"./cli-pspjxnc8.js";
|
|
13
|
+
import"./cli-gnpea9dx.js";
|
|
14
14
|
import"./cli-y28j019d.js";
|
|
15
15
|
import"./cli-37x76zdn.js";
|
|
16
16
|
export {
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeValidation,
|
|
3
3
|
reportMissingTools
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-93mkaw6v.js";
|
|
5
|
+
import"./cli-d9mm3vvh.js";
|
|
6
6
|
import"./cli-ht1bcqdd.js";
|
|
7
|
-
import"./cli-
|
|
8
|
-
import"./cli-
|
|
7
|
+
import"./cli-54xt7pjg.js";
|
|
8
|
+
import"./cli-5crpmz42.js";
|
|
9
9
|
import"./cli-eyyggect.js";
|
|
10
10
|
import"./cli-asap4t1z.js";
|
|
11
11
|
import"./cli-a35w7wzg.js";
|
|
12
12
|
import"./cli-v5mp7a6q.js";
|
|
13
13
|
import {
|
|
14
14
|
publishTargetFor
|
|
15
|
-
} from "./cli-
|
|
16
|
-
import"./cli-
|
|
15
|
+
} from "./cli-y6d1arem.js";
|
|
16
|
+
import"./cli-rqh295j9.js";
|
|
17
17
|
import {
|
|
18
18
|
log
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-pspjxnc8.js";
|
|
20
20
|
import {
|
|
21
21
|
UsageError,
|
|
22
22
|
rejectExtraPositionals,
|
|
23
23
|
rejectUnknownFlags
|
|
24
24
|
} from "./cli-d8xjns66.js";
|
|
25
|
-
import"./cli-
|
|
25
|
+
import"./cli-gnpea9dx.js";
|
|
26
26
|
import {
|
|
27
27
|
BuildError,
|
|
28
28
|
EXIT_CODES
|
|
@@ -43,9 +43,7 @@ export declare function generateAndWriteHtml(inputPath: string, tempDir: string,
|
|
|
43
43
|
title?: string;
|
|
44
44
|
language?: string;
|
|
45
45
|
styles?: string[];
|
|
46
|
-
|
|
47
|
-
files?: string[] | null;
|
|
48
|
-
};
|
|
46
|
+
chapters?: string[] | null;
|
|
49
47
|
extensions?: ResolvedExtensionConfig[];
|
|
50
48
|
print?: PrintPadding;
|
|
51
49
|
page?: {
|
|
@@ -3,23 +3,23 @@ import {
|
|
|
3
3
|
runBuild,
|
|
4
4
|
splitOutPath,
|
|
5
5
|
startPreviewServer
|
|
6
|
-
} from "./cli-
|
|
7
|
-
import"./cli-
|
|
6
|
+
} from "./cli-93mkaw6v.js";
|
|
7
|
+
import"./cli-d9mm3vvh.js";
|
|
8
8
|
import {
|
|
9
9
|
previewArgs
|
|
10
10
|
} from "./cli-75qkn0k5.js";
|
|
11
11
|
import"./cli-ht1bcqdd.js";
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
12
|
+
import"./cli-54xt7pjg.js";
|
|
13
|
+
import"./cli-5crpmz42.js";
|
|
14
14
|
import"./cli-eyyggect.js";
|
|
15
15
|
import"./cli-asap4t1z.js";
|
|
16
16
|
import"./cli-a35w7wzg.js";
|
|
17
17
|
import"./cli-v5mp7a6q.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
18
|
+
import"./cli-y6d1arem.js";
|
|
19
|
+
import"./cli-rqh295j9.js";
|
|
20
20
|
import {
|
|
21
21
|
log
|
|
22
|
-
} from "./cli-
|
|
22
|
+
} from "./cli-pspjxnc8.js";
|
|
23
23
|
import {
|
|
24
24
|
UsageError,
|
|
25
25
|
parseFormat,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
rejectUnknownFlags,
|
|
29
29
|
resolvePort
|
|
30
30
|
} from "./cli-d8xjns66.js";
|
|
31
|
-
import"./cli-
|
|
31
|
+
import"./cli-gnpea9dx.js";
|
|
32
32
|
import {
|
|
33
33
|
BuildError
|
|
34
34
|
} from "./cli-46ycxe6r.js";
|
|
@@ -10,30 +10,30 @@ import {
|
|
|
10
10
|
resolvePublishFormat,
|
|
11
11
|
resolvePublishProvider,
|
|
12
12
|
runPublish
|
|
13
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-93mkaw6v.js";
|
|
14
14
|
import {
|
|
15
15
|
FileTokenStore
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-d9mm3vvh.js";
|
|
17
17
|
import"./cli-ht1bcqdd.js";
|
|
18
|
-
import"./cli-
|
|
19
|
-
import"./cli-
|
|
18
|
+
import"./cli-54xt7pjg.js";
|
|
19
|
+
import"./cli-5crpmz42.js";
|
|
20
20
|
import"./cli-eyyggect.js";
|
|
21
21
|
import"./cli-asap4t1z.js";
|
|
22
22
|
import"./cli-a35w7wzg.js";
|
|
23
23
|
import"./cli-v5mp7a6q.js";
|
|
24
24
|
import {
|
|
25
25
|
loadManifestWithPath
|
|
26
|
-
} from "./cli-
|
|
27
|
-
import"./cli-
|
|
26
|
+
} from "./cli-y6d1arem.js";
|
|
27
|
+
import"./cli-rqh295j9.js";
|
|
28
28
|
import {
|
|
29
29
|
log
|
|
30
|
-
} from "./cli-
|
|
30
|
+
} from "./cli-pspjxnc8.js";
|
|
31
31
|
import {
|
|
32
32
|
UsageError,
|
|
33
33
|
rejectExtraPositionals,
|
|
34
34
|
rejectUnknownFlags
|
|
35
35
|
} from "./cli-d8xjns66.js";
|
|
36
|
-
import"./cli-
|
|
36
|
+
import"./cli-gnpea9dx.js";
|
|
37
37
|
import {
|
|
38
38
|
BuildError,
|
|
39
39
|
EXIT_CODES
|
package/dist/render.js
CHANGED
|
@@ -1997,7 +1997,12 @@ function splitCells(str, spans) {
|
|
|
1997
1997
|
lastPos = pos;
|
|
1998
1998
|
}
|
|
1999
1999
|
} else if (!isEscaped && spans[ch]) {
|
|
2000
|
-
|
|
2000
|
+
const end = spans[ch](str, pos, max);
|
|
2001
|
+
if (ch === 96) {
|
|
2002
|
+
current += str.substring(lastPos, pos) + str.substring(pos, end).replace(/\\\|/g, "|");
|
|
2003
|
+
lastPos = end;
|
|
2004
|
+
}
|
|
2005
|
+
pos = end;
|
|
2001
2006
|
continue;
|
|
2002
2007
|
}
|
|
2003
2008
|
isEscaped = ch === 92;
|