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
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
import type { LastPageMode } from "../engine/shared/synthesis";
|
|
2
2
|
type CheckSeverity = "error" | "warning" | "info";
|
|
3
|
+
/**
|
|
4
|
+
* What a manifest's `checks:` entry may say about one check or lint rule:
|
|
5
|
+
* `off`, or the severity its findings are reported at (`info`, `warn`,
|
|
6
|
+
* `error`). `true` / `on` switch on a check its preset leaves off, at the
|
|
7
|
+
* check's own severity; `false` is `off`. `warning` is accepted for `warn`.
|
|
8
|
+
*/
|
|
9
|
+
export type CheckLevelInput = "off" | "on" | "info" | "warn" | "warning" | "error" | boolean;
|
|
10
|
+
/**
|
|
11
|
+
* A check's resolved level: `off`, `on` (runs at its own severity) or the
|
|
12
|
+
* severity every finding is reported at.
|
|
13
|
+
*/
|
|
14
|
+
export type CheckLevel = "off" | "on" | CheckSeverity;
|
|
3
15
|
/**
|
|
4
16
|
* The object form of an `extensions:` entry (#265) — only for an entry that
|
|
5
17
|
* has to say more than its specifier. The common case is the bare string;
|
|
@@ -126,9 +138,17 @@ export interface GutterpressManifest {
|
|
|
126
138
|
* project's own `styles` always load after every extension.
|
|
127
139
|
*/
|
|
128
140
|
extensions?: (string | ExtensionConfig)[];
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
141
|
+
/**
|
|
142
|
+
* The book's markdown files, in reading order, relative to the manifest.
|
|
143
|
+
* Absent or null: every top-level `.md` file in natural order.
|
|
144
|
+
*/
|
|
145
|
+
chapters?: string[] | null;
|
|
146
|
+
/**
|
|
147
|
+
* Per-check and per-rule levels, keyed by a check id
|
|
148
|
+
* (`pdf.print.image-resolution`) or a lint rule id
|
|
149
|
+
* (`printsafe/no-risky-print-effects`). A key that names nothing is ignored.
|
|
150
|
+
*/
|
|
151
|
+
checks?: Record<string, CheckLevelInput>;
|
|
132
152
|
pdfx?: {
|
|
133
153
|
flavor?: "x1a" | "x3";
|
|
134
154
|
icc?: string;
|
|
@@ -183,7 +203,6 @@ export interface GutterpressManifest {
|
|
|
183
203
|
page?: {
|
|
184
204
|
width?: number;
|
|
185
205
|
height?: number;
|
|
186
|
-
tolerance?: number;
|
|
187
206
|
/**
|
|
188
207
|
* A bleed (pt) the page `width` x `height` ALREADY CONTAINS, on the top,
|
|
189
208
|
* bottom and OUTER edges only (the binding edge has none) — how
|
|
@@ -238,82 +257,6 @@ export interface GutterpressManifest {
|
|
|
238
257
|
*/
|
|
239
258
|
margin?: PageMargin;
|
|
240
259
|
};
|
|
241
|
-
ink?: {
|
|
242
|
-
maxTac?: number;
|
|
243
|
-
tacTolerance?: number;
|
|
244
|
-
};
|
|
245
|
-
lint?: {
|
|
246
|
-
enabled?: boolean;
|
|
247
|
-
configPath?: string | null;
|
|
248
|
-
/**
|
|
249
|
-
* Per-rule level overrides, keyed by rule id (`printsafe/*`, or a check id
|
|
250
|
-
* such as `source.accessibility.heading-order`). `off` silences the rule;
|
|
251
|
-
* `warn` / `error` set its severity. Unknown ids are ignored.
|
|
252
|
-
*/
|
|
253
|
-
rules?: Record<string, "off" | "warn" | "error">;
|
|
254
|
-
};
|
|
255
|
-
validate?: {
|
|
256
|
-
enabled?: boolean;
|
|
257
|
-
checks?: Record<string, boolean | {
|
|
258
|
-
enabled?: boolean;
|
|
259
|
-
severity?: CheckSeverity;
|
|
260
|
-
options?: Record<string, unknown>;
|
|
261
|
-
}>;
|
|
262
|
-
source?: {
|
|
263
|
-
markdownlint?: string | false;
|
|
264
|
-
htmlhint?: string | false;
|
|
265
|
-
stylelint?: string | false;
|
|
266
|
-
/**
|
|
267
|
-
* Path to a CSS ownership contract (#232), or `false` to disable
|
|
268
|
-
* `source.css-ownership`. Optional — absent means no contract, so the
|
|
269
|
-
* check reports nothing. Default discovery: `.gutterpress/css-contract.yaml`
|
|
270
|
-
* (or `.yml`) in the project root. See docs/css-ownership-contract.md.
|
|
271
|
-
*/
|
|
272
|
-
cssOwnership?: string | false;
|
|
273
|
-
/**
|
|
274
|
-
* @deprecated `:::name` container syntax was removed 2026-05-17 and the
|
|
275
|
-
* callout-validation check it gated was removed at the same time. This
|
|
276
|
-
* field is now a no-op kept for backward-compatible manifest parsing.
|
|
277
|
-
* Will be removed in a future major version. See
|
|
278
|
-
* docs/migrations/2026-05-removing-container-syntax.md.
|
|
279
|
-
*/
|
|
280
|
-
allowedCallouts?: string[];
|
|
281
|
-
};
|
|
282
|
-
assets?: {
|
|
283
|
-
maxImageSize?: number;
|
|
284
|
-
/**
|
|
285
|
-
* @deprecated No-op. The source-image resolution check it configured
|
|
286
|
-
* read DPI metadata, which says nothing about the printed size; the
|
|
287
|
-
* build measures each placed image's printed DPI instead.
|
|
288
|
-
*/
|
|
289
|
-
minImageDpi?: number;
|
|
290
|
-
/**
|
|
291
|
-
* @deprecated No-op. The source-image colour-space check it configured
|
|
292
|
-
* was removed: a PDF/X build converts every image to the output intent,
|
|
293
|
-
* and `pdf.print.color-spaces` checks the result.
|
|
294
|
-
*/
|
|
295
|
-
allowedColorSpaces?: string[];
|
|
296
|
-
allowAlpha?: boolean;
|
|
297
|
-
approvedFontFiles?: string[];
|
|
298
|
-
requireFontLicense?: boolean;
|
|
299
|
-
};
|
|
300
|
-
pdf?: {
|
|
301
|
-
requireBookmarks?: boolean;
|
|
302
|
-
requireTocLinks?: boolean;
|
|
303
|
-
minImageResolution?: number;
|
|
304
|
-
forbidTransparency?: boolean;
|
|
305
|
-
requireBleed?: boolean;
|
|
306
|
-
bleedSize?: number;
|
|
307
|
-
};
|
|
308
|
-
heuristics?: {
|
|
309
|
-
maxDecorativeLayers?: number;
|
|
310
|
-
textDensityRange?: {
|
|
311
|
-
min?: number;
|
|
312
|
-
max?: number;
|
|
313
|
-
};
|
|
314
|
-
maxParagraphsPerSection?: number;
|
|
315
|
-
};
|
|
316
|
-
};
|
|
317
260
|
}
|
|
318
261
|
export interface ResolvedExtensionConfig {
|
|
319
262
|
/** The specifier exactly as written (pin included) — for messages and manifest edits. */
|
|
@@ -355,9 +298,14 @@ export interface ResolvedConfig {
|
|
|
355
298
|
styles?: string[];
|
|
356
299
|
/** Enabled extensions, in manifest (= load = cascade) order. */
|
|
357
300
|
extensions: ResolvedExtensionConfig[];
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
301
|
+
/** The book's markdown files in reading order, or null for every top-level `.md` file. */
|
|
302
|
+
chapters: string[] | null;
|
|
303
|
+
/**
|
|
304
|
+
* Each check's or lint rule's level, merged key by key: preset, then the
|
|
305
|
+
* publish target's policy, then the manifest's `checks:`, then the CLI. An
|
|
306
|
+
* id that is absent runs at its own severity.
|
|
307
|
+
*/
|
|
308
|
+
checks: Record<string, CheckLevel>;
|
|
361
309
|
pdfx: {
|
|
362
310
|
flavor: "x1a" | "x3";
|
|
363
311
|
icc: string;
|
|
@@ -375,6 +323,7 @@ export interface ResolvedConfig {
|
|
|
375
323
|
page: {
|
|
376
324
|
width: number;
|
|
377
325
|
height: number;
|
|
326
|
+
/** Allowed deviation (pt) of a built PDF's page size; the preset's, never the manifest's. */
|
|
378
327
|
tolerance: number;
|
|
379
328
|
/** In-sheet bleed in pt (top, bottom, outer edge; see the manifest field); absent = none. */
|
|
380
329
|
bleed?: number;
|
|
@@ -391,36 +340,20 @@ export interface ResolvedConfig {
|
|
|
391
340
|
maxTac: number;
|
|
392
341
|
tacTolerance: number;
|
|
393
342
|
};
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
343
|
+
/**
|
|
344
|
+
* The numbers the checks measure against. They come from the preset and
|
|
345
|
+
* the publish target (a printer's specification), not from the manifest:
|
|
346
|
+
* a book switches a check off, or changes how loudly it reports, in
|
|
347
|
+
* `checks:`.
|
|
348
|
+
*/
|
|
399
349
|
validate: {
|
|
400
|
-
enabled: boolean;
|
|
401
|
-
checks: Record<string, boolean | {
|
|
402
|
-
enabled?: boolean;
|
|
403
|
-
severity?: CheckSeverity;
|
|
404
|
-
options?: Record<string, unknown>;
|
|
405
|
-
}>;
|
|
406
|
-
source: {
|
|
407
|
-
markdownlint: string | false | null;
|
|
408
|
-
htmlhint: string | false | null;
|
|
409
|
-
stylelint: string | false | null;
|
|
410
|
-
cssOwnership: string | false | null;
|
|
411
|
-
};
|
|
412
350
|
assets: {
|
|
351
|
+
/** Largest image file in bytes; 0 = no limit. */
|
|
413
352
|
maxImageSize: number;
|
|
414
|
-
allowAlpha: boolean;
|
|
415
|
-
approvedFontFiles: string[];
|
|
416
|
-
requireFontLicense: boolean;
|
|
417
353
|
};
|
|
418
354
|
pdf: {
|
|
419
|
-
|
|
420
|
-
requireTocLinks: boolean;
|
|
355
|
+
/** Lowest effective image resolution in DPI; 0 = no floor. */
|
|
421
356
|
minImageResolution: number;
|
|
422
|
-
forbidTransparency: boolean;
|
|
423
|
-
requireBleed: boolean;
|
|
424
357
|
bleedSize: number;
|
|
425
358
|
};
|
|
426
359
|
heuristics: {
|
|
@@ -4,20 +4,27 @@
|
|
|
4
4
|
* OWNS
|
|
5
5
|
* `:root` custom properties, and nothing else. The palette, the type scale,
|
|
6
6
|
* the spacing scale, the measure. This is the file to edit to rebrand the
|
|
7
|
-
* look. The desktop app's
|
|
8
|
-
*
|
|
9
|
-
* stylesheet, never to this file.
|
|
7
|
+
* look. The desktop app's Book setup lists these tokens (the six shared
|
|
8
|
+
* ones under Look, every one under Advanced) and saves a book's changes
|
|
9
|
+
* to that book's own stylesheet, never to this file.
|
|
10
10
|
*
|
|
11
11
|
* MUST NOT CONTAIN
|
|
12
12
|
* - Any selector other than `:root`. The moment a rule here targets `h1`,
|
|
13
13
|
* "change the brand" and "change the look of a heading" stop being
|
|
14
|
-
* separable, and
|
|
14
|
+
* separable, and Book setup starts showing settings that do not
|
|
15
15
|
* do what they say.
|
|
16
16
|
* - `var()` references to component tokens. Tokens flow one way: brand →
|
|
17
17
|
* component. A brand token that depends on a component token is a cycle
|
|
18
18
|
* waiting to happen.
|
|
19
19
|
* - Anything a specific book needs. Book-specific values go in book.css.
|
|
20
20
|
*
|
|
21
|
+
* WHAT THE DESIGN TAB SHOWS is curated with comments. Right above one
|
|
22
|
+
* declaration: `@label Accent color` (its plain-words name), `@group Paper`
|
|
23
|
+
* (its heading), `@internal` (not shown). Right above a `:root` selector:
|
|
24
|
+
* `@group` or `@internal` for the whole block, which a declaration's own
|
|
25
|
+
* comment overrides. One `@internal` line above a block of component
|
|
26
|
+
* defaults keeps them off the tab.
|
|
27
|
+
*
|
|
21
28
|
* LOADS FIRST, and therefore declares the layer order for the whole stack.
|
|
22
29
|
* ======================================================================== */
|
|
23
30
|
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import {
|
|
2
2
|
executeAndReport
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-93mkaw6v.js";
|
|
4
|
+
import"./cli-d9mm3vvh.js";
|
|
5
5
|
import"./cli-ht1bcqdd.js";
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
6
|
+
import"./cli-54xt7pjg.js";
|
|
7
|
+
import"./cli-5crpmz42.js";
|
|
8
8
|
import"./cli-eyyggect.js";
|
|
9
9
|
import"./cli-asap4t1z.js";
|
|
10
10
|
import"./cli-a35w7wzg.js";
|
|
11
11
|
import"./cli-v5mp7a6q.js";
|
|
12
|
-
import"./cli-
|
|
13
|
-
import"./cli-
|
|
12
|
+
import"./cli-y6d1arem.js";
|
|
13
|
+
import"./cli-rqh295j9.js";
|
|
14
14
|
import {
|
|
15
15
|
log
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-pspjxnc8.js";
|
|
17
17
|
import {
|
|
18
18
|
UsageError,
|
|
19
19
|
rejectExtraPositionals,
|
|
20
20
|
rejectUnknownFlags
|
|
21
21
|
} from "./cli-d8xjns66.js";
|
|
22
|
-
import"./cli-
|
|
22
|
+
import"./cli-gnpea9dx.js";
|
|
23
23
|
import {
|
|
24
24
|
BuildError,
|
|
25
25
|
EXIT_CODES
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gutterpress",
|
|
3
|
-
"version": "0.11.23-alpha.
|
|
3
|
+
"version": "0.11.23-alpha.4",
|
|
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",
|