gutterpress 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (230) hide show
  1. package/README.md +422 -0
  2. package/dist/CGATS21_CRPC1-g0e3k7kr.icc +0 -0
  3. package/dist/api/index.d.ts +76 -0
  4. package/dist/api/index.js +272 -0
  5. package/dist/assets/preview/scripts/pagedjs-bridge.d.ts +1 -0
  6. package/dist/assets/preview/scripts/pagedjs-interface.d.ts +1 -0
  7. package/dist/assets/preview/scripts/preview-shell.d.ts +1 -0
  8. package/dist/audit-1jrwwacz.js +66 -0
  9. package/dist/build-5s92kgpc.js +77 -0
  10. package/dist/chapter-01-6fn9pvd0.md +31 -0
  11. package/dist/chapter-01-7jwqg1ct.md +20 -0
  12. package/dist/chapter-01-jj8ftn4c.md +29 -0
  13. package/dist/chapter-01-rkpyvjna.md +26 -0
  14. package/dist/checks/asset/approved-fonts.d.ts +3 -0
  15. package/dist/checks/asset/extensions.d.ts +41 -0
  16. package/dist/checks/asset/font-license.d.ts +3 -0
  17. package/dist/checks/asset/image-alpha.d.ts +3 -0
  18. package/dist/checks/asset/image-color-space.d.ts +3 -0
  19. package/dist/checks/asset/image-file-size.d.ts +3 -0
  20. package/dist/checks/asset/image-resolution.d.ts +3 -0
  21. package/dist/checks/asset/image-tac.d.ts +3 -0
  22. package/dist/checks/asset/index.d.ts +7 -0
  23. package/dist/checks/formatter.d.ts +3 -0
  24. package/dist/checks/heuristic/index.d.ts +4 -0
  25. package/dist/checks/heuristic/layer-count.d.ts +3 -0
  26. package/dist/checks/heuristic/placement-variance.d.ts +3 -0
  27. package/dist/checks/heuristic/section-density.d.ts +3 -0
  28. package/dist/checks/heuristic/text-density.d.ts +3 -0
  29. package/dist/checks/pdf/bleed.d.ts +3 -0
  30. package/dist/checks/pdf/bookmarks.d.ts +3 -0
  31. package/dist/checks/pdf/color-spaces.d.ts +3 -0
  32. package/dist/checks/pdf/cross-refs.d.ts +3 -0
  33. package/dist/checks/pdf/embedded-fonts.d.ts +3 -0
  34. package/dist/checks/pdf/image-resolution.d.ts +3 -0
  35. package/dist/checks/pdf/index.d.ts +15 -0
  36. package/dist/checks/pdf/ink-coverage.d.ts +3 -0
  37. package/dist/checks/pdf/page-labels.d.ts +3 -0
  38. package/dist/checks/pdf/page-size.d.ts +3 -0
  39. package/dist/checks/pdf/pdfx-markers.d.ts +3 -0
  40. package/dist/checks/pdf/pdfx-metadata.d.ts +3 -0
  41. package/dist/checks/pdf/pdfx-structure.d.ts +6 -0
  42. package/dist/checks/pdf/qpdf-structure.d.ts +3 -0
  43. package/dist/checks/pdf/rasterized-pages.d.ts +3 -0
  44. package/dist/checks/pdf/toc-links.d.ts +3 -0
  45. package/dist/checks/pdf/transparency.d.ts +3 -0
  46. package/dist/checks/policy.d.ts +61 -0
  47. package/dist/checks/register-builtins.d.ts +17 -0
  48. package/dist/checks/registry.d.ts +40 -0
  49. package/dist/checks/runner.d.ts +25 -0
  50. package/dist/checks/source/accessibility-alt-text.d.ts +3 -0
  51. package/dist/checks/source/accessibility-heading-order.d.ts +3 -0
  52. package/dist/checks/source/config-file.d.ts +8 -0
  53. package/dist/checks/source/htmlhint.d.ts +3 -0
  54. package/dist/checks/source/index.d.ts +6 -0
  55. package/dist/checks/source/local-refs.d.ts +3 -0
  56. package/dist/checks/source/markdownlint.d.ts +3 -0
  57. package/dist/checks/source/stylelint.d.ts +3 -0
  58. package/dist/checks/tool-check.d.ts +23 -0
  59. package/dist/checks/types.d.ts +52 -0
  60. package/dist/cli-1tyj4bk3.js +124 -0
  61. package/dist/cli-37x76zdn.js +4 -0
  62. package/dist/cli-506tg37g.js +26 -0
  63. package/dist/cli-5bxx0c4y.js +464 -0
  64. package/dist/cli-7ykx7pp0.js +12378 -0
  65. package/dist/cli-h7phg3ka.js +746 -0
  66. package/dist/cli-hvqjs342.js +284 -0
  67. package/dist/cli-yja077f6.js +92 -0
  68. package/dist/cli.js +157 -0
  69. package/dist/constants.d.ts +17 -0
  70. package/dist/doctor-25zjt8dz.js +57 -0
  71. package/dist/favicon-wkbm9cjn.ico +0 -0
  72. package/dist/git-http-yrb4ag6z.js +17 -0
  73. package/dist/index-1tyj4bk3.js +124 -0
  74. package/dist/index-37x76zdn.js +4 -0
  75. package/dist/index-3h3fef7r.js +15218 -0
  76. package/dist/index-5bxx0c4y.js +464 -0
  77. package/dist/index-yja077f6.js +92 -0
  78. package/dist/index.d.ts +32 -0
  79. package/dist/index.js +310 -0
  80. package/dist/lib/app-heartbeat.d.ts +102 -0
  81. package/dist/lib/asset-inline.d.ts +73 -0
  82. package/dist/lib/browser-pool.d.ts +17 -0
  83. package/dist/lib/build-error.d.ts +52 -0
  84. package/dist/lib/build-fingerprint.d.ts +15 -0
  85. package/dist/lib/build-preflight.d.ts +43 -0
  86. package/dist/lib/build-runner.d.ts +161 -0
  87. package/dist/lib/build-staging.d.ts +64 -0
  88. package/dist/lib/chromium.d.ts +20 -0
  89. package/dist/lib/cli-args.d.ts +45 -0
  90. package/dist/lib/desktop.d.ts +14 -0
  91. package/dist/lib/diagnostics.d.ts +64 -0
  92. package/dist/lib/embedded-assets.d.ts +29 -0
  93. package/dist/lib/exec.d.ts +84 -0
  94. package/dist/lib/fetch-timeout.d.ts +41 -0
  95. package/dist/lib/ghostscript.d.ts +48 -0
  96. package/dist/lib/host-policy.d.ts +75 -0
  97. package/dist/lib/image-inspect.d.ts +32 -0
  98. package/dist/lib/install-hints.d.ts +21 -0
  99. package/dist/lib/lint-runner.d.ts +10 -0
  100. package/dist/lib/manifest-config.d.ts +31 -0
  101. package/dist/lib/manifest-doc.d.ts +25 -0
  102. package/dist/lib/manifest.d.ts +41 -0
  103. package/dist/lib/markdown/assemble.d.ts +78 -0
  104. package/dist/lib/markdown/chapter-id.d.ts +24 -0
  105. package/dist/lib/markdown/images.d.ts +34 -0
  106. package/dist/lib/markdown/index.d.ts +78 -0
  107. package/dist/lib/markdown/markdown-it-paged.d.ts +30 -0
  108. package/dist/lib/markdown/plugins.d.ts +69 -0
  109. package/dist/lib/markdown/renderer.d.ts +111 -0
  110. package/dist/lib/npm-plugin-installer.d.ts +33 -0
  111. package/dist/lib/open-path.d.ts +5 -0
  112. package/dist/lib/output-paths.d.ts +23 -0
  113. package/dist/lib/pagedjs-marker.d.ts +42 -0
  114. package/dist/lib/pagedjs.d.ts +26 -0
  115. package/dist/lib/pagination.d.ts +169 -0
  116. package/dist/lib/pdf-inspect.d.ts +123 -0
  117. package/dist/lib/pdf-parse.d.ts +57 -0
  118. package/dist/lib/plugin-manager.d.ts +108 -0
  119. package/dist/lib/plugin-vendor.d.ts +107 -0
  120. package/dist/lib/presets.d.ts +45 -0
  121. package/dist/lib/printsafe.d.ts +17 -0
  122. package/dist/lib/project-scaffold.d.ts +116 -0
  123. package/dist/lib/project-source.d.ts +140 -0
  124. package/dist/lib/project-templates.d.ts +49 -0
  125. package/dist/lib/publish/butler.d.ts +10 -0
  126. package/dist/lib/publish/command-runner.d.ts +18 -0
  127. package/dist/lib/publish/connect.d.ts +23 -0
  128. package/dist/lib/publish/manifest-publish.d.ts +9 -0
  129. package/dist/lib/publish/providers/azure-swa.d.ts +3 -0
  130. package/dist/lib/publish/providers/drivethrurpg.d.ts +10 -0
  131. package/dist/lib/publish/providers/guided.d.ts +3 -0
  132. package/dist/lib/publish/providers/itch.d.ts +5 -0
  133. package/dist/lib/publish/providers/kdp.d.ts +9 -0
  134. package/dist/lib/publish/providers/shopify.d.ts +5 -0
  135. package/dist/lib/publish/registry.d.ts +5 -0
  136. package/dist/lib/publish/run-publish.d.ts +30 -0
  137. package/dist/lib/publish/selections.d.ts +25 -0
  138. package/dist/lib/publish/types.d.ts +258 -0
  139. package/dist/lib/remote-auth/clone.d.ts +87 -0
  140. package/dist/lib/remote-auth/conflict-resolution.d.ts +29 -0
  141. package/dist/lib/remote-auth/diagnose.d.ts +77 -0
  142. package/dist/lib/remote-auth/generic-auth.d.ts +97 -0
  143. package/dist/lib/remote-auth/git-http.d.ts +85 -0
  144. package/dist/lib/remote-auth/github-auth.d.ts +69 -0
  145. package/dist/lib/remote-auth/github-repos.d.ts +64 -0
  146. package/dist/lib/remote-auth/operation-log.d.ts +66 -0
  147. package/dist/lib/remote-auth/recovery/abort-interrupted-operation.d.ts +103 -0
  148. package/dist/lib/remote-auth/recovery/backup.d.ts +113 -0
  149. package/dist/lib/remote-auth/recovery/classify.d.ts +109 -0
  150. package/dist/lib/remote-auth/recovery/context.d.ts +47 -0
  151. package/dist/lib/remote-auth/recovery/dispatch.d.ts +33 -0
  152. package/dist/lib/remote-auth/recovery/failsafe.d.ts +33 -0
  153. package/dist/lib/remote-auth/recovery/inspect.d.ts +74 -0
  154. package/dist/lib/remote-auth/recovery/manual-guidance.d.ts +28 -0
  155. package/dist/lib/remote-auth/recovery/outcome-mapping.d.ts +58 -0
  156. package/dist/lib/remote-auth/recovery/policy.d.ts +47 -0
  157. package/dist/lib/remote-auth/recovery/recover-auth.d.ts +42 -0
  158. package/dist/lib/remote-auth/recovery/recover-binary-conflict.d.ts +37 -0
  159. package/dist/lib/remote-auth/recovery/recover-corrupt-index.d.ts +40 -0
  160. package/dist/lib/remote-auth/recovery/recover-detached-head.d.ts +70 -0
  161. package/dist/lib/remote-auth/recovery/recover-interrupted-cherry-pick.d.ts +23 -0
  162. package/dist/lib/remote-auth/recovery/recover-interrupted-merge.d.ts +28 -0
  163. package/dist/lib/remote-auth/recovery/recover-interrupted-rebase.d.ts +39 -0
  164. package/dist/lib/remote-auth/recovery/recover-merge-conflict.d.ts +34 -0
  165. package/dist/lib/remote-auth/recovery/recover-missing-git-dir.d.ts +37 -0
  166. package/dist/lib/remote-auth/recovery/recover-missing-objects.d.ts +56 -0
  167. package/dist/lib/remote-auth/recovery/recover-network.d.ts +34 -0
  168. package/dist/lib/remote-auth/recovery/recover-non-fast-forward.d.ts +27 -0
  169. package/dist/lib/remote-auth/recovery/recover-stale-lock.d.ts +76 -0
  170. package/dist/lib/remote-auth/recovery/recover-unrelated-histories.d.ts +44 -0
  171. package/dist/lib/remote-auth/recovery/recover-wrong-remote.d.ts +35 -0
  172. package/dist/lib/remote-auth/recovery/types.d.ts +235 -0
  173. package/dist/lib/remote-auth/resolution-plan.d.ts +64 -0
  174. package/dist/lib/remote-auth/sync-messages.d.ts +26 -0
  175. package/dist/lib/remote-auth/sync-types.d.ts +225 -0
  176. package/dist/lib/remote-auth/sync.d.ts +45 -0
  177. package/dist/lib/remote-auth/test-access.d.ts +47 -0
  178. package/dist/lib/remote-auth/test-support/git-http-server.d.ts +71 -0
  179. package/dist/lib/remote-auth/token-store.d.ts +95 -0
  180. package/dist/lib/remote-auth/transport.d.ts +105 -0
  181. package/dist/lib/slug.d.ts +28 -0
  182. package/dist/lib/snippets.d.ts +39 -0
  183. package/dist/lib/source-provider.d.ts +244 -0
  184. package/dist/lib/static-serve.d.ts +54 -0
  185. package/dist/lib/style-resolver.d.ts +30 -0
  186. package/dist/lib/theme-import.d.ts +70 -0
  187. package/dist/lib/theme-manager.d.ts +128 -0
  188. package/dist/lib/tool-probe.d.ts +37 -0
  189. package/dist/lib/validation-exec.d.ts +47 -0
  190. package/dist/lib/validation-profile.d.ts +18 -0
  191. package/dist/lib/version.d.ts +9 -0
  192. package/dist/lint-f63nxjfj.js +65 -0
  193. package/dist/manifest-n1gh3qw5.yaml +9 -0
  194. package/dist/manifest-ryyg71nf.yaml +9 -0
  195. package/dist/manifest.schema-rn1dpdpn.json +564 -0
  196. package/dist/new-7b08a42h.js +105 -0
  197. package/dist/paged.polyfill-n95pbxfn.js +33288 -0
  198. package/dist/pagedjs-bridge-vn4hk9fx.js +111 -0
  199. package/dist/pagedjs-interface-80g3xa8p.js +498 -0
  200. package/dist/platform.d.ts +100 -0
  201. package/dist/plugin-wf2cbmwc.js +129 -0
  202. package/dist/preflight-tg4mpz1h.js +222 -0
  203. package/dist/preview/file-watcher.d.ts +174 -0
  204. package/dist/preview/http-server.d.ts +45 -0
  205. package/dist/preview/lifecycle.d.ts +67 -0
  206. package/dist/preview/server-context.d.ts +36 -0
  207. package/dist/preview-h2bwbb2x.js +102 -0
  208. package/dist/preview-shell-rghtfmc8.js +155 -0
  209. package/dist/project-source-0tg0r6vm.js +17 -0
  210. package/dist/publish-ztaet53r.js +233 -0
  211. package/dist/render.d.ts +20 -0
  212. package/dist/render.js +682 -0
  213. package/dist/repair-jkp4n3j8.js +171 -0
  214. package/dist/schema/manifest.types.d.ts +218 -0
  215. package/dist/server.d.ts +34 -0
  216. package/dist/source-provider-hp96b5jf.js +46 -0
  217. package/dist/test-helpers/testkit.d.ts +91 -0
  218. package/dist/theme-0yzvthe8.css +65 -0
  219. package/dist/theme-570zmh2t.css +58 -0
  220. package/dist/theme-6a2fngc8.json +6 -0
  221. package/dist/theme-cd6efzjw.json +6 -0
  222. package/dist/theme-nya4nqh6.css +70 -0
  223. package/dist/theme-tqfypc1w.json +6 -0
  224. package/dist/theme-xt0hjb1b.json +6 -0
  225. package/dist/theme-zz2ktzqs.css +60 -0
  226. package/dist/types.d.ts +31 -0
  227. package/dist/utils/file-utils.d.ts +53 -0
  228. package/dist/utils/logger.d.ts +59 -0
  229. package/dist/validate-k2drs19j.js +99 -0
  230. package/package.json +102 -0
@@ -0,0 +1,65 @@
1
+ import {
2
+ MANIFEST_FILENAMES,
3
+ runLint
4
+ } from "./cli-7ykx7pp0.js";
5
+ import {
6
+ log
7
+ } from "./cli-h7phg3ka.js";
8
+ import {
9
+ EXIT_CODES,
10
+ UsageError,
11
+ rejectExtraPositionals,
12
+ rejectUnknownFlags
13
+ } from "./cli-hvqjs342.js";
14
+ import"./cli-5bxx0c4y.js";
15
+ import"./cli-1tyj4bk3.js";
16
+ import"./cli-yja077f6.js";
17
+ import"./cli-37x76zdn.js";
18
+
19
+ // src/commands/lint.ts
20
+ import { defineCommand } from "citty";
21
+ import { existsSync, statSync } from "node:fs";
22
+ import { join } from "node:path";
23
+ var commandArgs = {
24
+ files: {
25
+ type: "positional",
26
+ description: "Project directory with manifest.yaml, or glob pattern for CSS files to lint",
27
+ required: false
28
+ },
29
+ manifest: {
30
+ type: "string",
31
+ description: "Path to manifest.yaml"
32
+ }
33
+ };
34
+ var lint_default = defineCommand({
35
+ meta: {
36
+ name: "lint",
37
+ description: "Lint CSS for print-safety issues"
38
+ },
39
+ args: commandArgs,
40
+ async run({ args, rawArgs }) {
41
+ try {
42
+ rejectUnknownFlags(rawArgs, commandArgs, "lint");
43
+ rejectExtraPositionals(args._, 1, "lint");
44
+ const filesArg = typeof args.files === "string" ? args.files : undefined;
45
+ const manifestArg = typeof args.manifest === "string" ? args.manifest : undefined;
46
+ const filesArgIsManifestDir = filesArg && existsSync(filesArg) && statSync(filesArg).isDirectory() && MANIFEST_FILENAMES.some((name) => existsSync(join(filesArg, name)));
47
+ const result = await runLint({
48
+ files: filesArgIsManifestDir ? undefined : filesArg,
49
+ manifest: manifestArg ?? (filesArgIsManifestDir ? filesArg : undefined)
50
+ });
51
+ if (!result.ok) {
52
+ process.exit(EXIT_CODES.FINDINGS);
53
+ }
54
+ } catch (error) {
55
+ if (error instanceof UsageError) {
56
+ log.error(error.message);
57
+ process.exit(error.exitCode);
58
+ }
59
+ throw error;
60
+ }
61
+ }
62
+ });
63
+ export {
64
+ lint_default as default
65
+ };
@@ -0,0 +1,9 @@
1
+ title: "{{TITLE}}"
2
+ authors:
3
+ - "{{AUTHOR}}"
4
+ source:
5
+ files:
6
+ - chapter-01.md
7
+ styles:
8
+ - styles/book.css
9
+ preset: book
@@ -0,0 +1,9 @@
1
+ title: "{{TITLE}}"
2
+ authors:
3
+ - "{{AUTHOR}}"
4
+ source:
5
+ files:
6
+ - chapter-01.md
7
+ styles:
8
+ - styles/book.css
9
+ preset: dtrpg
@@ -0,0 +1,564 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://github.com/dimm-city/gutterpress/manifest.schema.json",
4
+ "title": "Gutterpress Manifest",
5
+ "description": "Configuration file for Gutterpress markdown-to-PDF converter. Mirrors the GutterpressManifest interface in packages/cli/src/schema/manifest.types.ts. Every field is optional — an absent field falls back to the resolved preset default (see packages/cli/src/lib/presets.ts).",
6
+ "type": "object",
7
+ "properties": {
8
+ "title": {
9
+ "type": "string",
10
+ "description": "Document title. Used for the HTML <title> and PDF metadata.",
11
+ "default": "Document",
12
+ "examples": ["My Book Title", "Technical Documentation", "Game Module"]
13
+ },
14
+ "authors": {
15
+ "type": "array",
16
+ "description": "List of document authors.",
17
+ "default": [],
18
+ "items": {
19
+ "type": "string"
20
+ },
21
+ "examples": [
22
+ ["John Doe"],
23
+ ["Jane Smith", "John Doe"]
24
+ ]
25
+ },
26
+ "preset": {
27
+ "type": "string",
28
+ "description": "Vendor preset supplying the defaults for every other section (page geometry, ink limits, PDF/X settings, validation checks). Omitting it defaults to \"dtrpg\" for backward compatibility and logs a warning — set it explicitly.",
29
+ "enum": ["dtrpg", "book"],
30
+ "examples": ["dtrpg", "book"]
31
+ },
32
+ "styles": {
33
+ "type": "array",
34
+ "description": "Project-relative CSS files to <link> into the rendered book, applied in order. If omitted, Gutterpress discovers one: styles/book.css, else css/print.css, css/index.css, css/style.css, css/main.css, else the first discovered .css, else none.",
35
+ "items": {
36
+ "type": "string",
37
+ "minLength": 1,
38
+ "description": "Path to a CSS file, relative to the manifest directory."
39
+ },
40
+ "examples": [
41
+ ["styles/book.css"],
42
+ ["css/index.css"],
43
+ ["themes/parchment.css", "styles/override.css"]
44
+ ]
45
+ },
46
+ "plugins": {
47
+ "type": "array",
48
+ "description": "markdown-it plugins to load. Each entry is either a shorthand string or a configuration object. Entries are loaded highest-priority first.",
49
+ "default": [],
50
+ "items": {
51
+ "oneOf": [
52
+ {
53
+ "type": "string",
54
+ "minLength": 1,
55
+ "description": "Shorthand. Treated as a local file path when it starts with ./, ../, / or a Windows drive letter, or when it contains a path separator and ends in .js/.mjs/.cjs. Otherwise treated as an npm package name.",
56
+ "examples": [
57
+ "./plugins/my-plugin.js",
58
+ "plugins/my-plugin.js",
59
+ "gutterpress-plugin-callouts"
60
+ ]
61
+ },
62
+ {
63
+ "type": "object",
64
+ "description": "Plugin configuration object. Supply either `path` (local file) or `name` (npm package).",
65
+ "properties": {
66
+ "path": {
67
+ "type": "string",
68
+ "minLength": 1,
69
+ "description": "Path to a local plugin module, relative to the manifest directory.",
70
+ "examples": ["plugins/dimm-city-plugin.js", "../shared/plugins/callouts.js"]
71
+ },
72
+ "name": {
73
+ "type": "string",
74
+ "minLength": 1,
75
+ "description": "npm package name of the plugin.",
76
+ "examples": ["gutterpress-plugin-callouts"]
77
+ },
78
+ "version": {
79
+ "type": "string",
80
+ "description": "Exact npm version installed under plugins/npm by Gutterpress. Legacy non-exact values remain informational and use legacy node_modules resolution.",
81
+ "examples": ["1.2.3", "2.1.0-beta.1"]
82
+ },
83
+ "export": {
84
+ "type": "string",
85
+ "minLength": 1,
86
+ "description": "Named module export to use as the markdown-it plugin function when the package has no default export.",
87
+ "examples": ["full"]
88
+ },
89
+ "priority": {
90
+ "type": "integer",
91
+ "description": "Load order. Higher priority loads first.",
92
+ "default": 100,
93
+ "examples": [100, 200]
94
+ },
95
+ "options": {
96
+ "type": "object",
97
+ "description": "Plugin-specific options, passed straight through to the plugin.",
98
+ "default": {},
99
+ "additionalProperties": true
100
+ },
101
+ "enabled": {
102
+ "type": "boolean",
103
+ "description": "Per-project enable flag. Absent or true = active. false keeps the entry in the manifest (so the toggle is reversible) but skips loading it at build and preview time.",
104
+ "default": true
105
+ }
106
+ }
107
+ }
108
+ ]
109
+ },
110
+ "examples": [
111
+ ["gutterpress-plugin-callouts", "./plugins/my-plugin.js"],
112
+ [
113
+ {
114
+ "path": "plugins/dimm-city-plugin.js",
115
+ "priority": 100
116
+ }
117
+ ]
118
+ ]
119
+ },
120
+ "source": {
121
+ "type": "object",
122
+ "description": "Where the book's content comes from. There is no `assets` list: the build discovers every file the book actually references (image src, CSS url()/@font-face, …) and copies exactly those — see lib/asset-inline.ts. An author-maintained asset directory list could drift from what the book uses; this can't.",
123
+ "properties": {
124
+ "files": {
125
+ "type": ["array", "null"],
126
+ "description": "Explicit, ordered list of markdown files to concatenate, relative to the manifest directory. Omit or set to null to include every .md file in the directory in alphabetical order.",
127
+ "default": null,
128
+ "items": {
129
+ "type": "string",
130
+ "minLength": 1
131
+ },
132
+ "examples": [
133
+ ["chapter-01.md", "chapter-02.md"],
134
+ ["frontmatter/title.md", "chapters/intro.md", "appendix.md"]
135
+ ]
136
+ }
137
+ }
138
+ },
139
+ "pdfx": {
140
+ "type": "object",
141
+ "description": "PDF/X conversion settings, used by `gutterpress build --format pdfx`.",
142
+ "properties": {
143
+ "flavor": {
144
+ "type": "string",
145
+ "description": "PDF/X flavor to target.",
146
+ "enum": ["x1a", "x3"],
147
+ "default": "x1a"
148
+ },
149
+ "icc": {
150
+ "type": "string",
151
+ "description": "Path to the ICC output-intent profile, relative to the manifest directory.",
152
+ "default": "profiles/CGATS21_CRPC1.icc",
153
+ "examples": ["profiles/CGATS21_CRPC1.icc", ".gutterpress/profiles/CGATS21_CRPC1.icc"]
154
+ },
155
+ "stripAnnotations": {
156
+ "type": "boolean",
157
+ "description": "Strip annotations (links, comments) during PDF/X conversion — PDF/X-1a does not permit them.",
158
+ "default": true
159
+ }
160
+ }
161
+ },
162
+ "page": {
163
+ "type": "object",
164
+ "description": "Expected page geometry, in POINTS. VALIDATION BOUNDS ONLY — these values do NOT set the trim size. The real PDF page size comes from the CSS `@page` rule in your stylesheet; these numbers are only what the `pdf.print.page-size` check compares the produced PDF against. Set them to the trim size you expect so a CSS mistake gets caught — and note that a bleed-inclusive @page size will legitimately differ from the trim size recorded here.",
165
+ "properties": {
166
+ "width": {
167
+ "type": "number",
168
+ "description": "Expected page width in points (1in = 72pt). Validation bound only — the CSS @page rule sets the real width. Preset defaults: dtrpg 621, book 432 (6in).",
169
+ "exclusiveMinimum": 0,
170
+ "examples": [612, 621, 432]
171
+ },
172
+ "height": {
173
+ "type": "number",
174
+ "description": "Expected page height in points (1in = 72pt). Validation bound only — the CSS @page rule sets the real height. Preset defaults: dtrpg 810, book 648 (9in).",
175
+ "exclusiveMinimum": 0,
176
+ "examples": [792, 810, 648]
177
+ },
178
+ "tolerance": {
179
+ "type": "number",
180
+ "description": "Allowed deviation, in points, between the expected and the actual page size.",
181
+ "default": 0.5,
182
+ "minimum": 0
183
+ }
184
+ }
185
+ },
186
+ "ink": {
187
+ "type": "object",
188
+ "description": "Ink coverage limits used by the `pdf.print.ink-coverage` and `asset.image.tac-raster` checks.",
189
+ "properties": {
190
+ "maxTac": {
191
+ "type": "number",
192
+ "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.",
193
+ "minimum": 0,
194
+ "examples": [240, 300, 400]
195
+ },
196
+ "tacTolerance": {
197
+ "type": "number",
198
+ "description": "Allowed percentage of sampled pixels that may exceed `maxTac` before the check fails.",
199
+ "default": 0.5,
200
+ "minimum": 0
201
+ }
202
+ }
203
+ },
204
+ "lint": {
205
+ "type": "object",
206
+ "description": "Markdown linting run before the build.",
207
+ "properties": {
208
+ "enabled": {
209
+ "type": "boolean",
210
+ "description": "Whether linting runs.",
211
+ "default": true
212
+ },
213
+ "configPath": {
214
+ "type": ["string", "null"],
215
+ "description": "Path to a markdownlint config file, relative to the manifest directory. null uses the built-in defaults.",
216
+ "default": null
217
+ }
218
+ }
219
+ },
220
+ "validate": {
221
+ "type": "object",
222
+ "description": "Preflight/validation configuration. Individual checks are addressed by id (see `checks`); the sections below supply the thresholds those checks read.",
223
+ "properties": {
224
+ "enabled": {
225
+ "type": "boolean",
226
+ "description": "Whether validation runs.",
227
+ "default": true
228
+ },
229
+ "checks": {
230
+ "type": "object",
231
+ "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.color-space, source.markdownlint, heuristic.whitespace.text-density). A boolean value is shorthand for enabled/disabled.",
232
+ "propertyNames": {
233
+ "description": "A registered check id, e.g. \"pdf.print.embedded-fonts\"."
234
+ },
235
+ "additionalProperties": {
236
+ "oneOf": [
237
+ {
238
+ "type": "boolean",
239
+ "description": "Shorthand for { enabled: <value> }."
240
+ },
241
+ {
242
+ "type": "object",
243
+ "properties": {
244
+ "enabled": {
245
+ "type": "boolean",
246
+ "description": "Whether this check runs.",
247
+ "default": true
248
+ },
249
+ "severity": {
250
+ "type": "string",
251
+ "description": "How a failure of this check is reported.",
252
+ "enum": ["error", "warning", "info"]
253
+ },
254
+ "options": {
255
+ "type": "object",
256
+ "description": "Check-specific options.",
257
+ "additionalProperties": true
258
+ }
259
+ }
260
+ }
261
+ ]
262
+ },
263
+ "examples": [
264
+ {
265
+ "pdf.structure.qpdf": { "enabled": true, "severity": "error" },
266
+ "pdf.print.pdfx-markers": false
267
+ }
268
+ ]
269
+ },
270
+ "source": {
271
+ "type": "object",
272
+ "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.",
273
+ "properties": {
274
+ "markdownlint": {
275
+ "description": "Path to a markdownlint config, or false to disable the source.markdownlint check.",
276
+ "default": null,
277
+ "oneOf": [
278
+ { "type": "string", "minLength": 1 },
279
+ { "type": "boolean", "const": false }
280
+ ]
281
+ },
282
+ "htmlhint": {
283
+ "description": "Path to an htmlhint config, or false to disable the source.htmlhint check.",
284
+ "default": null,
285
+ "oneOf": [
286
+ { "type": "string", "minLength": 1 },
287
+ { "type": "boolean", "const": false }
288
+ ]
289
+ },
290
+ "stylelint": {
291
+ "description": "Path to a stylelint config, or false to disable the source.stylelint check.",
292
+ "default": null,
293
+ "oneOf": [
294
+ { "type": "string", "minLength": 1 },
295
+ { "type": "boolean", "const": false }
296
+ ]
297
+ },
298
+ "allowedCallouts": {
299
+ "type": "array",
300
+ "deprecated": true,
301
+ "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.",
302
+ "items": { "type": "string" }
303
+ }
304
+ }
305
+ },
306
+ "assets": {
307
+ "type": "object",
308
+ "description": "Thresholds for the asset.* checks (images and fonts on disk).",
309
+ "properties": {
310
+ "maxImageSize": {
311
+ "type": "integer",
312
+ "description": "Maximum image file size in bytes (asset.image.file-size).",
313
+ "default": 10000000,
314
+ "minimum": 0
315
+ },
316
+ "minImageDpi": {
317
+ "type": "integer",
318
+ "description": "Minimum effective image resolution in DPI (asset.image.resolution).",
319
+ "default": 300,
320
+ "minimum": 0
321
+ },
322
+ "allowedColorSpaces": {
323
+ "type": "array",
324
+ "description": "Color spaces images may use (asset.image.color-space). Preset defaults: dtrpg [\"CMYK\", \"Grayscale\"], book [\"RGB\", \"CMYK\", \"Grayscale\"].",
325
+ "items": { "type": "string" },
326
+ "examples": [
327
+ ["CMYK", "Grayscale"],
328
+ ["RGB", "CMYK", "Grayscale"]
329
+ ]
330
+ },
331
+ "allowAlpha": {
332
+ "type": "boolean",
333
+ "description": "Whether images may carry an alpha channel (asset.image.alpha-channel). Preset defaults: dtrpg false (PDF/X forbids transparency), book true."
334
+ },
335
+ "approvedFontFiles": {
336
+ "type": "array",
337
+ "description": "Allow-list of font files (asset.font.approved-files). Empty means no restriction.",
338
+ "default": [],
339
+ "items": { "type": "string" }
340
+ },
341
+ "requireFontLicense": {
342
+ "type": "boolean",
343
+ "description": "Require a license record for each embedded font (asset.font.license).",
344
+ "default": false
345
+ }
346
+ }
347
+ },
348
+ "pdf": {
349
+ "type": "object",
350
+ "description": "Thresholds for the pdf.* checks (run against the produced PDF).",
351
+ "properties": {
352
+ "requireBookmarks": {
353
+ "type": "boolean",
354
+ "description": "Require a PDF outline/bookmark tree (pdf.nav.bookmarks).",
355
+ "default": false
356
+ },
357
+ "requireTocLinks": {
358
+ "type": "boolean",
359
+ "description": "Require the table of contents to use real internal links (pdf.nav.toc-links).",
360
+ "default": false
361
+ },
362
+ "minImageResolution": {
363
+ "type": "integer",
364
+ "description": "Minimum placed-image resolution in DPI (pdf.print.image-resolution).",
365
+ "default": 300,
366
+ "minimum": 0
367
+ },
368
+ "forbidTransparency": {
369
+ "type": "boolean",
370
+ "description": "Fail on transparency in the PDF (pdf.print.transparency). Preset defaults: dtrpg true (required by PDF/X), book false."
371
+ },
372
+ "requireBleed": {
373
+ "type": "boolean",
374
+ "description": "Require a bleed box on every page (pdf.print.bleed).",
375
+ "default": false
376
+ },
377
+ "bleedSize": {
378
+ "type": "number",
379
+ "description": "Expected bleed, in points (9pt = 0.125in).",
380
+ "default": 9,
381
+ "minimum": 0
382
+ }
383
+ }
384
+ },
385
+ "heuristics": {
386
+ "type": "object",
387
+ "description": "Thresholds for the heuristic.* layout-quality checks. These are advisory design heuristics, not hard print requirements.",
388
+ "properties": {
389
+ "maxDecorativeLayers": {
390
+ "type": "integer",
391
+ "description": "Maximum stacked decorative layers per page (heuristic.decoration.layer-count).",
392
+ "default": 5,
393
+ "minimum": 0
394
+ },
395
+ "textDensityRange": {
396
+ "type": "object",
397
+ "description": "Acceptable characters-per-page range (heuristic.whitespace.text-density).",
398
+ "properties": {
399
+ "min": {
400
+ "type": "number",
401
+ "description": "Minimum characters per page.",
402
+ "default": 200,
403
+ "minimum": 0
404
+ },
405
+ "max": {
406
+ "type": "number",
407
+ "description": "Maximum characters per page.",
408
+ "default": 5000,
409
+ "minimum": 0
410
+ }
411
+ }
412
+ },
413
+ "maxParagraphsPerSection": {
414
+ "type": "integer",
415
+ "description": "Maximum paragraphs in one section before it is flagged as under-chunked (heuristic.chunking.section-density).",
416
+ "default": 10,
417
+ "minimum": 0
418
+ }
419
+ }
420
+ }
421
+ }
422
+ },
423
+ "publish": {
424
+ "type": "object",
425
+ "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.",
426
+ "properties": {
427
+ "itch": {
428
+ "type": "object",
429
+ "description": "itch.io publishing (uploaded with butler)",
430
+ "properties": {
431
+ "target": {
432
+ "type": "string",
433
+ "description": "itch.io project as user/game (the butler push target)",
434
+ "pattern": "^[A-Za-z0-9._-]+/[A-Za-z0-9._-]+$",
435
+ "examples": ["dimm-city/operations-manual"]
436
+ },
437
+ "channel": {
438
+ "type": "string",
439
+ "description": "butler channel name",
440
+ "default": "pdf"
441
+ },
442
+ "credential": {
443
+ "type": "string",
444
+ "description": "Label of the saved credential to use when more than one is stored for this provider. Not a secret — just a reference into the host credential store. Empty or absent uses the default credential."
445
+ }
446
+ }
447
+ },
448
+ "drivethrurpg": {
449
+ "type": "object",
450
+ "description": "DriveThruRPG guided publishing (export package + open the publisher hub)",
451
+ "properties": {
452
+ "productUrl": {
453
+ "type": "string",
454
+ "description": "Existing product page URL, when updating a published title"
455
+ }
456
+ }
457
+ },
458
+ "kdp": {
459
+ "type": "object",
460
+ "description": "Amazon KDP guided publishing (export package + open kdp.amazon.com)",
461
+ "properties": {}
462
+ },
463
+ "azure-swa": {
464
+ "type": "object",
465
+ "description": "Azure Static Web Apps deployment of the HTML export",
466
+ "properties": {
467
+ "env": {
468
+ "type": "string",
469
+ "description": "Deploy environment",
470
+ "default": "production"
471
+ },
472
+ "credential": {
473
+ "type": "string",
474
+ "description": "Label of the saved credential to use when more than one is stored for this provider."
475
+ }
476
+ }
477
+ },
478
+ "shopify": {
479
+ "type": "object",
480
+ "description": "Shopify product publishing (Admin GraphQL API)",
481
+ "properties": {
482
+ "shop": {
483
+ "type": "string",
484
+ "description": "Store domain, e.g. my-store.myshopify.com"
485
+ },
486
+ "productId": {
487
+ "type": "string",
488
+ "description": "Existing product GID/id to update instead of creating a new one"
489
+ },
490
+ "apiVersion": {
491
+ "type": "string",
492
+ "description": "Admin GraphQL API version",
493
+ "default": "2026-04"
494
+ },
495
+ "credential": {
496
+ "type": "string",
497
+ "description": "Label of the saved credential to use when more than one is stored for this provider."
498
+ }
499
+ }
500
+ }
501
+ }
502
+ },
503
+ "themePrevious": {
504
+ "type": "string",
505
+ "description": "Id of the theme active before the current one (the 'Revert to previous theme' target, #106). Managed automatically by Gutterpress; not authored by hand.",
506
+ "examples": ["clean-book", "zine"]
507
+ }
508
+ },
509
+ "examples": [
510
+ {
511
+ "title": "My Book",
512
+ "authors": ["Author Name"],
513
+ "preset": "book",
514
+ "styles": ["styles/book.css"],
515
+ "source": {
516
+ "files": ["chapter-01.md", "chapter-02.md"]
517
+ }
518
+ },
519
+ {
520
+ "title": "TTRPG Supplement",
521
+ "authors": ["Game Master"],
522
+ "preset": "dtrpg",
523
+ "plugins": [
524
+ {
525
+ "path": "plugins/dimm-city-plugin.js",
526
+ "priority": 100
527
+ }
528
+ ],
529
+ "styles": ["css/index.css"],
530
+ "source": {
531
+ "files": ["chapter-00.md", "chapter-01.md"]
532
+ },
533
+ "page": {
534
+ "width": 621,
535
+ "height": 810,
536
+ "tolerance": 0.5
537
+ },
538
+ "pdfx": {
539
+ "flavor": "x1a",
540
+ "icc": ".gutterpress/profiles/CGATS21_CRPC1.icc"
541
+ },
542
+ "ink": {
543
+ "maxTac": 240
544
+ }
545
+ },
546
+ {
547
+ "title": "Technical Documentation",
548
+ "authors": ["Tech Team"],
549
+ "preset": "book",
550
+ "styles": ["styles/book.css"],
551
+ "validate": {
552
+ "enabled": true,
553
+ "checks": {
554
+ "pdf.nav.bookmarks": { "enabled": true, "severity": "warning" },
555
+ "pdf.print.pdfx-markers": false
556
+ },
557
+ "pdf": {
558
+ "requireBookmarks": true,
559
+ "requireTocLinks": true
560
+ }
561
+ }
562
+ }
563
+ ]
564
+ }