gutterpress 0.11.11-alpha.1 → 0.11.11-alpha.2
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 +3 -3
- package/dist/api/index.js +2 -2
- package/dist/{build-ycaavzsb.js → build-pjd42x09.js} +4 -4
- package/dist/checks/asset/extensions.d.ts +2 -2
- package/dist/checks/policy.d.ts +5 -7
- package/dist/checks/register-builtins.d.ts +6 -6
- package/dist/checks/registry.d.ts +1 -1
- package/dist/{cli-kgd355eh.js → cli-1kdtzgxm.js} +1 -1
- package/dist/{cli-g3xd0x9z.js → cli-d2he8zph.js} +6 -6
- package/dist/{cli-wtw5nfsx.js → cli-ny50k8md.js} +1 -1
- package/dist/{cli-p40641zw.js → cli-tjhn2mdn.js} +3 -3
- package/dist/cli.js +12 -12
- package/dist/{doctor-71dxjkpz.js → doctor-qkh9byxa.js} +2 -2
- package/dist/engine/shared/cdp.d.ts +5 -9
- package/dist/engine/shared/pdf-inspect.d.ts +0 -4
- package/dist/{engine-fv61tyn7.js → engine-132czsq9.js} +1 -1
- package/dist/{engine-sq1kpg5s.js → engine-bgd4aa99.js} +2 -2
- package/dist/{ext-rkfntmtv.js → ext-271xnh70.js} +4 -4
- package/dist/{index-dxt4t7et.js → index-b6p1fh61.js} +1 -1
- package/dist/{index-b7q4wev1.js → index-mw8b25yx.js} +3 -3
- package/dist/{index-wdqymw2k.js → index-ssjh6tnd.js} +5 -5
- package/dist/index.js +3 -3
- package/dist/lib/asset-inline.d.ts +1 -2
- package/dist/lib/build-error.d.ts +4 -6
- package/dist/lib/build-fingerprint.d.ts +3 -4
- package/dist/lib/build-preflight.d.ts +4 -6
- package/dist/lib/build-runner.d.ts +24 -35
- package/dist/lib/build-staging.d.ts +3 -5
- package/dist/lib/cli-args.d.ts +1 -1
- package/dist/lib/desktop.d.ts +2 -8
- package/dist/lib/engine.d.ts +2 -2
- package/dist/lib/exec.d.ts +3 -6
- package/dist/lib/fetch-timeout.d.ts +3 -4
- package/dist/lib/ghostscript.d.ts +1 -1
- package/dist/lib/host-policy.d.ts +6 -8
- package/dist/lib/image-inspect.d.ts +2 -2
- package/dist/lib/install-hints.d.ts +2 -3
- package/dist/lib/manifest-config.d.ts +2 -3
- package/dist/lib/manifest-doc.d.ts +2 -3
- package/dist/lib/manifest.d.ts +4 -7
- package/dist/lib/markdown/assemble.d.ts +7 -13
- package/dist/lib/markdown/gutterpress-css.d.ts +6 -9
- package/dist/lib/markdown/images.d.ts +0 -7
- package/dist/lib/markdown/index.d.ts +7 -11
- package/dist/lib/markdown/markers.d.ts +3 -4
- package/dist/lib/markdown/plugins.d.ts +9 -12
- package/dist/lib/markdown/renderer.d.ts +10 -14
- package/dist/lib/missing-asset-placeholder.d.ts +2 -5
- package/dist/lib/output-paths.d.ts +4 -5
- package/dist/lib/pdf-inspect.d.ts +5 -5
- package/dist/lib/pdf-parse.d.ts +6 -7
- package/dist/lib/presets.d.ts +2 -3
- package/dist/lib/project-source.d.ts +3 -4
- package/dist/lib/publish/command-runner.d.ts +1 -1
- package/dist/lib/publish/connect-google.d.ts +2 -2
- package/dist/lib/publish/types.d.ts +3 -3
- package/dist/lib/remote-auth/clone.d.ts +2 -2
- package/dist/lib/remote-auth/converge-merge.d.ts +1 -1
- package/dist/lib/remote-auth/diagnose.d.ts +3 -3
- package/dist/lib/remote-auth/generic-auth.d.ts +1 -1
- package/dist/lib/remote-auth/git-http.d.ts +5 -5
- package/dist/lib/remote-auth/github-auth.d.ts +3 -3
- package/dist/lib/remote-auth/github-repos.d.ts +4 -4
- package/dist/lib/remote-auth/sync-types.d.ts +1 -1
- package/dist/lib/remote-auth/sync.d.ts +1 -1
- package/dist/lib/remote-auth/test-access.d.ts +1 -1
- package/dist/lib/remote-auth/token-store.d.ts +1 -1
- package/dist/lib/remote-auth/transport.d.ts +3 -3
- package/dist/lib/render-parity-raster.d.ts +28 -0
- package/dist/lib/render-parity.d.ts +4 -1
- package/dist/lib/source-provider.d.ts +4 -5
- package/dist/lib/static-serve.d.ts +8 -13
- package/dist/lib/style-resolver.d.ts +1 -1
- package/dist/lib/targets.d.ts +1 -5
- package/dist/lib/tool-probe.d.ts +2 -3
- package/dist/lib/validation-exec.d.ts +3 -4
- package/dist/{new-c6pmpvhw.js → new-7w4ezfpy.js} +4 -4
- package/dist/platform.d.ts +8 -41
- package/dist/{preflight-9vq1ygh4.js → preflight-f3h6arjp.js} +4 -4
- package/dist/preview/file-watcher.d.ts +3 -5
- package/dist/preview/lifecycle.d.ts +9 -17
- package/dist/{preview-bridge-b4jbtb79.js → preview-bridge-8jhd1wpb.js} +1 -1
- package/dist/{preview-interface-x22vcqyw.js → preview-interface-twd6nsf5.js} +8 -10
- package/dist/{preview-shell-tqndvhbx.js → preview-shell-y8yrm3f0.js} +8 -19
- package/dist/{preview-6n5ava6c.js → preview-y39jrpbs.js} +4 -4
- package/dist/{publish-9an2a1ma.js → publish-tvj3xh8m.js} +4 -4
- package/dist/render.d.ts +5 -5
- package/dist/render.js +2 -2
- package/dist/schema/manifest.types.d.ts +2 -2
- package/dist/utils/logger.d.ts +1 -2
- package/dist/{validate-0rrjva48.js → validate-9enr4ecc.js} +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -170,9 +170,9 @@ gutterpress new <name> [--kind <id>] [options]
|
|
|
170
170
|
|
|
171
171
|
### `gutterpress preview`
|
|
172
172
|
|
|
173
|
-
Live HTML preview server by default.
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
Live HTML preview server by default. Every change — a single Markdown edit,
|
|
174
|
+
CSS, manifest, multi-file, deletion, or other structural change — reloads the
|
|
175
|
+
full document over WebSocket. This path is pure JS and
|
|
176
176
|
needs no external tools. Pass `--format pdf` or `--format pdfx` for a one-shot
|
|
177
177
|
build-and-open instead. `--manifest` applies only to those one-shot PDF/PDF-X
|
|
178
178
|
modes; live HTML preview discovers the project manifest from its input
|
package/dist/api/index.js
CHANGED
|
@@ -127,10 +127,10 @@ import {
|
|
|
127
127
|
syncProject,
|
|
128
128
|
testRemoteAccess,
|
|
129
129
|
validateProjectExtensions
|
|
130
|
-
} from "../index-
|
|
130
|
+
} from "../index-ssjh6tnd.js";
|
|
131
131
|
import {
|
|
132
132
|
BuildError
|
|
133
|
-
} from "../index-
|
|
133
|
+
} from "../index-mw8b25yx.js";
|
|
134
134
|
import {
|
|
135
135
|
DEFAULT_PRINT_OPTS,
|
|
136
136
|
assertMilestone,
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runBuild,
|
|
3
3
|
splitOutPath
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-d2he8zph.js";
|
|
5
5
|
import {
|
|
6
6
|
log
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-1kdtzgxm.js";
|
|
8
8
|
import {
|
|
9
9
|
UsageError,
|
|
10
10
|
parseFormat,
|
|
11
11
|
parsePdfxFlavor,
|
|
12
12
|
rejectExtraPositionals,
|
|
13
13
|
rejectUnknownFlags
|
|
14
|
-
} from "./cli-
|
|
15
|
-
import"./cli-
|
|
14
|
+
} from "./cli-ny50k8md.js";
|
|
15
|
+
import"./cli-tjhn2mdn.js";
|
|
16
16
|
import {
|
|
17
17
|
BuildError
|
|
18
18
|
} from "./cli-46ycxe6r.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Canonical file-extension sets shared by every asset check.
|
|
3
3
|
*
|
|
4
|
-
* Keeping these in ONE place prevents
|
|
5
|
-
*
|
|
4
|
+
* Keeping these in ONE place prevents divergent glob lists that would let
|
|
5
|
+
* some formats be size-checked but silently skipped by the header-reader
|
|
6
6
|
* checks. Divergence here is a validation-coverage bug, so the sets and their
|
|
7
7
|
* relationship are pinned by image-extension-coverage.test.ts.
|
|
8
8
|
*/
|
package/dist/checks/policy.d.ts
CHANGED
|
@@ -31,13 +31,11 @@ export interface CheckSelection {
|
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* The check-selection sequence shared by {@link runChecks} and
|
|
34
|
-
* {@link checkToolAvailability}
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
* surface them (the runner errors on them; tool probing deliberately ignores
|
|
40
|
-
* them to avoid double-warning).
|
|
34
|
+
* {@link checkToolAvailability}: resolve `only`/`skip` selectors, then drop
|
|
35
|
+
* manifest-disabled checks via {@link isCheckEnabled}. Shared so the two
|
|
36
|
+
* callers can never disagree on WHICH checks are in scope. Returns `unmatched`
|
|
37
|
+
* selectors so each caller decides whether to surface them (the runner errors
|
|
38
|
+
* on them; tool probing deliberately ignores them to avoid double-warning).
|
|
41
39
|
*/
|
|
42
40
|
export declare function selectChecks(opts: CheckSelectionOptions, config: ResolvedConfig): CheckSelection;
|
|
43
41
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Central registration of the built-in checks
|
|
2
|
+
* Central registration of the built-in checks.
|
|
3
3
|
*
|
|
4
4
|
* The check registry (registry.ts) is a module-level Map populated purely as a
|
|
5
|
-
* side effect of importing each category's index module.
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* side effect of importing each category's index module. If those four
|
|
6
|
+
* imports lived in one caller, `runChecks`/`getChecks` reached any other way
|
|
7
|
+
* (a direct import of `checks/runner`, a reordering of the package entry's
|
|
8
|
+
* re-exports) would see an EMPTY registry and silently validate nothing.
|
|
9
|
+
* Importing THIS module makes the registry self-populating regardless
|
|
10
10
|
* of who the first caller is; `runner.ts` imports it at load, so anything that
|
|
11
11
|
* can reach `runChecks` has already registered the built-ins. ESM evaluates a
|
|
12
12
|
* module once, so importing this from several places registers exactly once.
|
|
@@ -24,7 +24,7 @@ export declare function getAllCheckIds(): string[];
|
|
|
24
24
|
* Derived from the registry (rather than a hand-maintained literal list) so
|
|
25
25
|
* it can never drift from `CheckCategory`'s real members — used to validate
|
|
26
26
|
* `--category` input against something other than a bare `as CheckCategory`
|
|
27
|
-
* cast, which
|
|
27
|
+
* cast, which would accept any string.
|
|
28
28
|
*/
|
|
29
29
|
export declare function getKnownCategories(): CheckCategory[];
|
|
30
30
|
export interface ResolvedSelectors {
|
|
@@ -13,17 +13,17 @@ import {
|
|
|
13
13
|
stampCreator,
|
|
14
14
|
stripAnnotations,
|
|
15
15
|
warn
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-1kdtzgxm.js";
|
|
17
17
|
import {
|
|
18
18
|
DEBOUNCE,
|
|
19
19
|
UsageError,
|
|
20
20
|
resolvePort
|
|
21
|
-
} from "./cli-
|
|
21
|
+
} from "./cli-ny50k8md.js";
|
|
22
22
|
import {
|
|
23
23
|
MARGIN_BOX_IGNORED_PROPERTIES,
|
|
24
24
|
getAssetPath,
|
|
25
25
|
getAssetsDir
|
|
26
|
-
} from "./cli-
|
|
26
|
+
} from "./cli-tjhn2mdn.js";
|
|
27
27
|
import {
|
|
28
28
|
BuildError
|
|
29
29
|
} from "./cli-46ycxe6r.js";
|
|
@@ -3690,8 +3690,8 @@ var GUTTERPRESS_CSS = `
|
|
|
3690
3690
|
|
|
3691
3691
|
/* the per-shape decisions the paragraph above deliberately leaves to the
|
|
3692
3692
|
author, named instead of left as raw CSS every book was reinventing
|
|
3693
|
-
(
|
|
3694
|
-
|
|
3693
|
+
(CLAUDE.md §0: "behavior broadly useful to non-technical authors belongs
|
|
3694
|
+
in core").
|
|
3695
3695
|
Permanent vocabulary, standard properties verbatim — same rationale as
|
|
3696
3696
|
the column/grid runs above. One name each, no aliases:
|
|
3697
3697
|
.gp-columns-all column-span: all a heading or block that
|
|
@@ -7728,7 +7728,7 @@ class PdfOutput {
|
|
|
7728
7728
|
const rawPdf = pdfxMode ? path8.join(stage, "raw.pdf") : path8.resolve(pdfFile);
|
|
7729
7729
|
await fsp2.mkdir(path8.dirname(path8.resolve(pdfFile)), { recursive: true });
|
|
7730
7730
|
log.info("Rendering HTML to PDF via the Gutterpress engine (native Chromium pagination)");
|
|
7731
|
-
const { buildNativePdf } = await import("./engine-
|
|
7731
|
+
const { buildNativePdf } = await import("./engine-132czsq9.js");
|
|
7732
7732
|
const engineDiagnostics = await buildNativePdf(htmlFile, rawPdf, {
|
|
7733
7733
|
title: config.title,
|
|
7734
7734
|
author: config.authors.length > 0 ? config.authors.join(", ") : undefined,
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "gutterpress",
|
|
7
|
-
version: "0.11.11-alpha.
|
|
7
|
+
version: "0.11.11-alpha.2",
|
|
8
8
|
description: "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
|
|
9
9
|
author: "itlackey",
|
|
10
10
|
license: "MPL-2.0",
|
|
@@ -1109,13 +1109,13 @@ var favicon_default = "./favicon-wkbm9cjn.ico";
|
|
|
1109
1109
|
var manifest_schema_default = "./manifest.schema-61bsspsb.json";
|
|
1110
1110
|
|
|
1111
1111
|
// src/assets/preview/scripts/preview-interface.js
|
|
1112
|
-
var preview_interface_default = "./preview-interface-
|
|
1112
|
+
var preview_interface_default = "./preview-interface-twd6nsf5.js";
|
|
1113
1113
|
|
|
1114
1114
|
// src/assets/preview/scripts/preview-bridge.js
|
|
1115
|
-
var preview_bridge_default = "./preview-bridge-
|
|
1115
|
+
var preview_bridge_default = "./preview-bridge-8jhd1wpb.js";
|
|
1116
1116
|
|
|
1117
1117
|
// src/assets/preview/scripts/preview-shell.js
|
|
1118
|
-
var preview_shell_default = "./preview-shell-
|
|
1118
|
+
var preview_shell_default = "./preview-shell-y8yrm3f0.js";
|
|
1119
1119
|
|
|
1120
1120
|
// profiles/CGATS21_CRPC1.icc
|
|
1121
1121
|
var CGATS21_CRPC1_default = "./CGATS21_CRPC1-g0e3k7kr.icc";
|
package/dist/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
UsageError,
|
|
7
7
|
package_default,
|
|
8
8
|
rejectUnknownFlags
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-ny50k8md.js";
|
|
10
10
|
import {
|
|
11
11
|
EXIT_CODES
|
|
12
12
|
} from "./cli-46ycxe6r.js";
|
|
@@ -18,14 +18,14 @@ import {
|
|
|
18
18
|
import { defineCommand, parseArgs, runMain } from "citty";
|
|
19
19
|
import { statSync } from "node:fs";
|
|
20
20
|
var SUBCOMMANDS = {
|
|
21
|
-
new: () => import("./new-
|
|
22
|
-
preview: () => import("./preview-
|
|
23
|
-
build: () => import("./build-
|
|
24
|
-
publish: () => import("./publish-
|
|
25
|
-
validate: () => import("./validate-
|
|
26
|
-
preflight: () => import("./preflight-
|
|
27
|
-
doctor: () => import("./doctor-
|
|
28
|
-
ext: () => import("./ext-
|
|
21
|
+
new: () => import("./new-7w4ezfpy.js").then((m) => m.default),
|
|
22
|
+
preview: () => import("./preview-y39jrpbs.js").then((m) => m.default),
|
|
23
|
+
build: () => import("./build-pjd42x09.js").then((m) => m.default),
|
|
24
|
+
publish: () => import("./publish-tvj3xh8m.js").then((m) => m.default),
|
|
25
|
+
validate: () => import("./validate-9enr4ecc.js").then((m) => m.default),
|
|
26
|
+
preflight: () => import("./preflight-f3h6arjp.js").then((m) => m.default),
|
|
27
|
+
doctor: () => import("./doctor-qkh9byxa.js").then((m) => m.default),
|
|
28
|
+
ext: () => import("./ext-271xnh70.js").then((m) => m.default)
|
|
29
29
|
};
|
|
30
30
|
var VERSION = package_default.version;
|
|
31
31
|
var main = defineCommand({
|
|
@@ -50,7 +50,7 @@ async function preflightRequiredInvocations(rawArgs) {
|
|
|
50
50
|
const [command, ...commandArgs] = rawArgs;
|
|
51
51
|
try {
|
|
52
52
|
if (command === "new") {
|
|
53
|
-
const { newArgs } = await import("./new-
|
|
53
|
+
const { newArgs } = await import("./new-7w4ezfpy.js");
|
|
54
54
|
rejectUnknownFlags(commandArgs, newArgs, "new");
|
|
55
55
|
const parsed = parseArgs(commandArgs, {
|
|
56
56
|
...newArgs,
|
|
@@ -62,7 +62,7 @@ async function preflightRequiredInvocations(rawArgs) {
|
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
if (command === "preflight") {
|
|
65
|
-
const { preflightArgs } = await import("./preflight-
|
|
65
|
+
const { preflightArgs } = await import("./preflight-f3h6arjp.js");
|
|
66
66
|
rejectUnknownFlags(commandArgs, preflightArgs, "preflight");
|
|
67
67
|
const parsed = parseArgs(commandArgs, {
|
|
68
68
|
...preflightArgs,
|
|
@@ -82,7 +82,7 @@ async function preflightRequiredInvocations(rawArgs) {
|
|
|
82
82
|
}
|
|
83
83
|
if (subcommand.startsWith("-"))
|
|
84
84
|
return;
|
|
85
|
-
const { EXT_SUBCOMMANDS, extAddArgs, extRemoveArgs, extEnableArgs, extDisableArgs } = await import("./ext-
|
|
85
|
+
const { EXT_SUBCOMMANDS, extAddArgs, extRemoveArgs, extEnableArgs, extDisableArgs } = await import("./ext-271xnh70.js");
|
|
86
86
|
if (!EXT_SUBCOMMANDS.includes(subcommand)) {
|
|
87
87
|
throw new UsageError(`gutterpress ext: unknown command "${subcommand}"`);
|
|
88
88
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSystemDiagnostics,
|
|
3
3
|
log
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-1kdtzgxm.js";
|
|
5
5
|
import {
|
|
6
6
|
UsageError,
|
|
7
7
|
rejectExtraPositionals,
|
|
8
8
|
rejectUnknownFlags
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-ny50k8md.js";
|
|
10
10
|
import"./cli-46ycxe6r.js";
|
|
11
11
|
import"./cli-7fkhgtfn.js";
|
|
12
12
|
import"./cli-37x76zdn.js";
|
|
@@ -20,11 +20,9 @@
|
|
|
20
20
|
* `getComputedStyle(el, '::after').content` instead of trusting
|
|
21
21
|
* `CSS.supports` — i.e. the thing that actually defends against this class of
|
|
22
22
|
* silent-content-loss regression is the probe, not the milestone pin. Measured
|
|
23
|
-
* 148 vs 151 head-to-head: the
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* byte-identical, and real 34pp/53pp book builds produce identical page counts
|
|
27
|
-
* and sizes on both milestones. So 151 was a *floor for the incident's
|
|
23
|
+
* 148 vs 151 head-to-head: the parity gate output is byte-identical, and real
|
|
24
|
+
* 34pp/53pp book builds produce identical page counts and sizes on both
|
|
25
|
+
* milestones. So 151 was a *floor for the incident's
|
|
28
26
|
* discovery*, not a requirement of the fix. It is pinned rather than probed —
|
|
29
27
|
* running on anything below 148 is still an error rather than a guess — but
|
|
30
28
|
* 148 is the honestly-supported floor because it's also what Electron's
|
|
@@ -32,10 +30,8 @@
|
|
|
32
30
|
* desktop app needs to drive its own Chromium for native-engine PDF export
|
|
33
31
|
* (see packages/desktop/electron's engine-browser module). Raising or
|
|
34
32
|
* lowering this floor again means re-measuring and treating every changed
|
|
35
|
-
* measurement as a finding
|
|
36
|
-
*
|
|
37
|
-
* the rest of the pre-native-engine scaffolding and no command in this repo
|
|
38
|
-
* re-runs it, so it would have to be rebuilt first. See the provenance note
|
|
33
|
+
* measurement as a finding. No command in this repo re-runs that
|
|
34
|
+
* measurement, so it would have to be rebuilt first. See the provenance note
|
|
39
35
|
* at the top of docs/engine/ENGINE.md.
|
|
40
36
|
*/
|
|
41
37
|
export declare const REQUIRED_MILESTONE = 148;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export declare const PT_PER_IN = 72;
|
|
2
1
|
export interface PageBoxes {
|
|
3
2
|
media: number[];
|
|
4
3
|
crop?: number[];
|
|
@@ -19,6 +18,3 @@ export interface PdfFacts {
|
|
|
19
18
|
}>;
|
|
20
19
|
}
|
|
21
20
|
export declare function inspectPdf(bytes: Uint8Array): Promise<PdfFacts>;
|
|
22
|
-
/** Extract per-page text as a rough sanity channel (not used for measurement). */
|
|
23
|
-
export declare function ptToIn(pt: number): number;
|
|
24
|
-
export declare function boxesEqual(a: number[] | undefined, b: number[], tol?: number): boolean;
|
|
@@ -10,16 +10,16 @@ import {
|
|
|
10
10
|
removeExtension,
|
|
11
11
|
searchNpmExtensions,
|
|
12
12
|
setExtensionEnabled
|
|
13
|
-
} from "./cli-
|
|
14
|
-
import"./cli-
|
|
13
|
+
} from "./cli-d2he8zph.js";
|
|
14
|
+
import"./cli-1kdtzgxm.js";
|
|
15
15
|
import {
|
|
16
16
|
UsageError,
|
|
17
17
|
exitForUsage,
|
|
18
18
|
rejectExtraPositionals,
|
|
19
19
|
rejectUnknownFlags,
|
|
20
20
|
resolveProjectDir
|
|
21
|
-
} from "./cli-
|
|
22
|
-
import"./cli-
|
|
21
|
+
} from "./cli-ny50k8md.js";
|
|
22
|
+
import"./cli-tjhn2mdn.js";
|
|
23
23
|
import {
|
|
24
24
|
EXIT_CODES
|
|
25
25
|
} from "./cli-46ycxe6r.js";
|
|
@@ -29,13 +29,13 @@ var favicon_default = "./favicon-wkbm9cjn.ico";
|
|
|
29
29
|
var manifest_schema_default = "./manifest.schema-61bsspsb.json";
|
|
30
30
|
|
|
31
31
|
// src/assets/preview/scripts/preview-interface.js
|
|
32
|
-
var preview_interface_default = "./preview-interface-
|
|
32
|
+
var preview_interface_default = "./preview-interface-twd6nsf5.js";
|
|
33
33
|
|
|
34
34
|
// src/assets/preview/scripts/preview-bridge.js
|
|
35
|
-
var preview_bridge_default = "./preview-bridge-
|
|
35
|
+
var preview_bridge_default = "./preview-bridge-8jhd1wpb.js";
|
|
36
36
|
|
|
37
37
|
// src/assets/preview/scripts/preview-shell.js
|
|
38
|
-
var preview_shell_default = "./preview-shell-
|
|
38
|
+
var preview_shell_default = "./preview-shell-y8yrm3f0.js";
|
|
39
39
|
|
|
40
40
|
// profiles/CGATS21_CRPC1.icc
|
|
41
41
|
var CGATS21_CRPC1_default = "./CGATS21_CRPC1-g0e3k7kr.icc";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
MARGIN_BOX_IGNORED_PROPERTIES,
|
|
5
5
|
getAssetPath,
|
|
6
6
|
getAssetsDir
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-mw8b25yx.js";
|
|
8
8
|
import {
|
|
9
9
|
INSTALL_HINTS,
|
|
10
10
|
execCapture,
|
|
@@ -1575,8 +1575,8 @@ var GUTTERPRESS_CSS = `
|
|
|
1575
1575
|
|
|
1576
1576
|
/* the per-shape decisions the paragraph above deliberately leaves to the
|
|
1577
1577
|
author, named instead of left as raw CSS every book was reinventing
|
|
1578
|
-
(
|
|
1579
|
-
|
|
1578
|
+
(CLAUDE.md §0: "behavior broadly useful to non-technical authors belongs
|
|
1579
|
+
in core").
|
|
1580
1580
|
Permanent vocabulary, standard properties verbatim — same rationale as
|
|
1581
1581
|
the column/grid runs above. One name each, no aliases:
|
|
1582
1582
|
.gp-columns-all column-span: all a heading or block that
|
|
@@ -3858,7 +3858,7 @@ import git from "isomorphic-git";
|
|
|
3858
3858
|
// package.json
|
|
3859
3859
|
var package_default = {
|
|
3860
3860
|
name: "gutterpress",
|
|
3861
|
-
version: "0.11.11-alpha.
|
|
3861
|
+
version: "0.11.11-alpha.2",
|
|
3862
3862
|
description: "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
|
|
3863
3863
|
author: "itlackey",
|
|
3864
3864
|
license: "MPL-2.0",
|
|
@@ -8218,7 +8218,7 @@ class PdfOutput {
|
|
|
8218
8218
|
const rawPdf = pdfxMode ? path8.join(stage, "raw.pdf") : path8.resolve(pdfFile);
|
|
8219
8219
|
await fsp2.mkdir(path8.dirname(path8.resolve(pdfFile)), { recursive: true });
|
|
8220
8220
|
log.info("Rendering HTML to PDF via the Gutterpress engine (native Chromium pagination)");
|
|
8221
|
-
const { buildNativePdf } = await import("./engine-
|
|
8221
|
+
const { buildNativePdf } = await import("./engine-bgd4aa99.js");
|
|
8222
8222
|
const engineDiagnostics = await buildNativePdf(htmlFile, rawPdf, {
|
|
8223
8223
|
title: config.title,
|
|
8224
8224
|
author: config.authors.length > 0 ? config.authors.join(", ") : undefined,
|
package/dist/index.js
CHANGED
|
@@ -144,13 +144,13 @@ import {
|
|
|
144
144
|
syncProject,
|
|
145
145
|
testRemoteAccess,
|
|
146
146
|
validateProjectExtensions
|
|
147
|
-
} from "./index-
|
|
147
|
+
} from "./index-ssjh6tnd.js";
|
|
148
148
|
import {
|
|
149
149
|
BUILD_DIAGNOSTIC_CODES
|
|
150
|
-
} from "./index-
|
|
150
|
+
} from "./index-b6p1fh61.js";
|
|
151
151
|
import {
|
|
152
152
|
BuildError
|
|
153
|
-
} from "./index-
|
|
153
|
+
} from "./index-mw8b25yx.js";
|
|
154
154
|
import {
|
|
155
155
|
DEFAULT_PRINT_OPTS,
|
|
156
156
|
assertMilestone,
|
|
@@ -61,8 +61,7 @@ export declare function escapesProjectRoot(projectDir: string, absPath: string):
|
|
|
61
61
|
* `source.links.local-refs` check consume, so validation and the build agree
|
|
62
62
|
* on the rule — an image referenced from Markdown prose must live inside the
|
|
63
63
|
* book folder — AND on the exact decode (`stripUrlSuffix(decodeRef(...))`) and
|
|
64
|
-
* wording.
|
|
65
|
-
* check decoded without stripping the `?query`/`#frag` suffix).
|
|
64
|
+
* wording.
|
|
66
65
|
*/
|
|
67
66
|
export declare function proseImageRefError(ref: string, projectDir: string): string | null;
|
|
68
67
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The CLI's exit-code contract
|
|
2
|
+
* The CLI's exit-code contract — ONE place the numbers are
|
|
3
3
|
* defined. Every command's process exit code means the same thing across
|
|
4
4
|
* `build`/`preview`/`validate`/`preflight`/`publish`/`ext`/`new`/`doctor`,
|
|
5
5
|
* so CI can branch on it without parsing output:
|
|
@@ -9,11 +9,9 @@
|
|
|
9
9
|
* failures (validate/preflight findings, a build's
|
|
10
10
|
* quality-gate rejection). The invocation itself was fine;
|
|
11
11
|
* the content wasn't. `gutterpress build`'s CSS
|
|
12
|
-
* print-safety check (`source.stylelint`)
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* `build` pipeline's former separate CSS-lint gate, and its
|
|
16
|
-
* own exit code 2, are gone.
|
|
12
|
+
* print-safety check (`source.stylelint`) runs as one of
|
|
13
|
+
* pre-build validation's checks (#272 — one CSS gate, not
|
|
14
|
+
* two) and fails the build through this same code.
|
|
17
15
|
* 2 USAGE — the invocation itself was wrong: a bad flag, positional,
|
|
18
16
|
* preset, or value. See {@link UsageError} in ./cli-args.ts.
|
|
19
17
|
* 3 PIPELINE — the build/render/export pipeline failed for a reason
|
|
@@ -15,10 +15,9 @@ export type BuildFingerprintInput = {
|
|
|
15
15
|
* These are the same for a caller that writes straight to its destination, but
|
|
16
16
|
* a build always assembles into a scratch work dir and only then publishes it
|
|
17
17
|
* atomically — so the file must be created in the work dir while the value
|
|
18
|
-
* anyone later reads has to be the delivered destination. One field
|
|
19
|
-
* roles
|
|
20
|
-
* (`.dist-build-a1b2c3…`, or an OS temp dir) that no longer
|
|
21
|
-
* (2026-07-29 audit).
|
|
18
|
+
* anyone later reads has to be the delivered destination. One field for both
|
|
19
|
+
* roles would make shipped fingerprints record a scratch path
|
|
20
|
+
* (`.dist-build-a1b2c3…`, or an OS temp dir) that no longer exists.
|
|
22
21
|
*/
|
|
23
22
|
recordedOutputDir?: string;
|
|
24
23
|
sourceDir?: string;
|
|
@@ -27,12 +27,10 @@ export interface Gates {
|
|
|
27
27
|
/**
|
|
28
28
|
* Disable the `source.stylelint` check (CSS print-safety: remote urls,
|
|
29
29
|
* risky print effects, page-containment) for this run, without touching
|
|
30
|
-
* `preValidate` itself (#272 — one CSS gate, not two
|
|
31
|
-
*
|
|
32
|
-
* `
|
|
33
|
-
*
|
|
34
|
-
* also true — with `preValidate` off, no pre-build check (CSS included)
|
|
35
|
-
* runs at all, `--skip-lint` or not.
|
|
30
|
+
* `preValidate` itself (#272 — one CSS gate, not two). `true` when
|
|
31
|
+
* `--skip-lint` was passed or `config.lint.enabled === false`; consulted
|
|
32
|
+
* only when `preValidate` is also true — with `preValidate` off, no
|
|
33
|
+
* pre-build check (CSS included) runs at all, `--skip-lint` or not.
|
|
36
34
|
*/
|
|
37
35
|
skipStylelint: boolean;
|
|
38
36
|
preValidate: boolean;
|
|
@@ -19,9 +19,8 @@ export interface BuildRunnerOptions {
|
|
|
19
19
|
manifestPath?: string;
|
|
20
20
|
stripAnnotations?: boolean;
|
|
21
21
|
/**
|
|
22
|
-
* Skip the CSS print-safety check (#272 — one CSS gate, not two)
|
|
23
|
-
*
|
|
24
|
-
* `source.stylelint` check inside pre-build validation (see
|
|
22
|
+
* Skip the CSS print-safety check (#272 — one CSS gate, not two): disables
|
|
23
|
+
* just the `source.stylelint` check inside pre-build validation (see
|
|
25
24
|
* {@link computeGates}'s `skipStylelint`). Has no effect when
|
|
26
25
|
* `skipPreValidate` is also set — pre-build validation, CSS check
|
|
27
26
|
* included, does not run at all in that case.
|
|
@@ -132,17 +131,15 @@ export interface BuildContext {
|
|
|
132
131
|
inputDir: string;
|
|
133
132
|
/**
|
|
134
133
|
* THE anchor every manifest-relative path resolves against: `styles:`,
|
|
135
|
-
* `source.files`, authored plugin `path:` entries, and the
|
|
136
|
-
* stylesheet resolution. Equal to {@link BuildContext.manifestDir}.
|
|
134
|
+
* `source.files`, authored plugin `path:` entries, and the CSS print-safety
|
|
135
|
+
* check's stylesheet resolution. Equal to {@link BuildContext.manifestDir}.
|
|
137
136
|
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
* `
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
*
|
|
144
|
-
* so the lint gate was checking a different set of stylesheets than the ones
|
|
145
|
-
* that shipped.
|
|
137
|
+
* It is NOT `inputDir`. The two are identical in the normative layout (the
|
|
138
|
+
* manifest lives in the book folder) and diverge only under an explicit
|
|
139
|
+
* `--manifest` pointing outside `--input` — where the docs are unambiguous
|
|
140
|
+
* that all of these are manifest-relative. Anchoring any of them on
|
|
141
|
+
* `inputDir` would check a different set of stylesheets than the ones that
|
|
142
|
+
* ship.
|
|
146
143
|
*/
|
|
147
144
|
renderDir: string;
|
|
148
145
|
outDir: string;
|
|
@@ -195,17 +192,12 @@ export declare function resolveBuildContext(opts: BuildRunnerOptions): Promise<B
|
|
|
195
192
|
* `loadPluginsWithCss` directly, and only the first caller does real work —
|
|
196
193
|
* the other gets the cached result back, whichever stage happens to run
|
|
197
194
|
* first (a test calling {@link renderBook} directly, without going through
|
|
198
|
-
* `runQualityGates`, gets a fresh load here
|
|
199
|
-
* this existed).
|
|
195
|
+
* `runQualityGates`, gets a fresh load here).
|
|
200
196
|
*
|
|
201
|
-
* Fail-fast (no `onError`)
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
* as soon as quality gates start, instead of (as before) the lint gate's own
|
|
206
|
-
* degrade-and-report call warning-and-skipping that same plugin only for
|
|
207
|
-
* `renderBook` to hard-fail on it moments later — the build failed either
|
|
208
|
-
* way, this just stops wasting the lint pass first.
|
|
197
|
+
* Fail-fast (no `onError`): a build/export must never silently omit
|
|
198
|
+
* author-configured formatting (see `loadPlugins`'s doc comment in
|
|
199
|
+
* markdown/plugins.ts on the two failure modes), so a plugin that fails to
|
|
200
|
+
* load aborts the build as soon as quality gates start.
|
|
209
201
|
*
|
|
210
202
|
* Resolves plugin `path:` entries against `ctx.renderDir`, which is by
|
|
211
203
|
* construction identical to `ctx.manifestDir` for the life of one
|
|
@@ -222,13 +214,12 @@ export declare function loadBuildPlugins(ctx: BuildContext): Promise<LoadedPlugi
|
|
|
222
214
|
* rendered book.html both output strategies then paginate. This is the shared
|
|
223
215
|
* pre-format work; the per-format tails live in the strategies.
|
|
224
216
|
*
|
|
225
|
-
*
|
|
226
|
-
*
|
|
227
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
230
|
-
*
|
|
231
|
-
* without driving the full `runBuild` pagination/PDF machinery.
|
|
217
|
+
* Gutterpress's marker parser computes typed, line-numbered author-mistake
|
|
218
|
+
* warnings (`env.layoutWarnings`). `renderChaptersToFile`'s
|
|
219
|
+
* `onChapterWarnings` threads them back out here so a final artifact never
|
|
220
|
+
* omits a marker mistake without at least telling the author about it in the
|
|
221
|
+
* build log. Exported (not just for the pipeline) so this stage is
|
|
222
|
+
* unit-testable without driving the full `runBuild` pagination/PDF machinery.
|
|
232
223
|
*/
|
|
233
224
|
export declare function renderBook(ctx: BuildContext): Promise<string>;
|
|
234
225
|
/**
|
|
@@ -265,12 +256,10 @@ export declare function publishToDirectory(workDir: string, targetDir: string, f
|
|
|
265
256
|
* The browser is this function's to own: there is ONE launcher
|
|
266
257
|
* (`engine/shared/cdp.ts`'s `launchChromium`, or the host's injected
|
|
267
258
|
* `engineBrowser` factory in its place), it is started un-awaited so the
|
|
268
|
-
* ~1–2s Chromium cold start overlaps
|
|
259
|
+
* ~1–2s Chromium cold start overlaps validation + markdown render, it
|
|
269
260
|
* is awaited right before rendering (so a missing or too-old Chromium fails
|
|
270
261
|
* there, with the launcher's own message, rather than deep inside the engine),
|
|
271
|
-
* and it is closed in a `finally` that runs on every exit
|
|
272
|
-
*
|
|
273
|
-
* `finalizeBuild`), so a pre-launched Chromium leaked whenever a quality gate
|
|
274
|
-
* or the render itself threw.
|
|
262
|
+
* and it is closed in a `finally` that runs on every exit, so a pre-launched
|
|
263
|
+
* Chromium never leaks when a quality gate or the render itself throws.
|
|
275
264
|
*/
|
|
276
265
|
export declare function runBuild(opts: BuildRunnerOptions): Promise<BuildRunnerResult>;
|
|
@@ -28,11 +28,9 @@ export interface StagedAssets {
|
|
|
28
28
|
*
|
|
29
29
|
* THE one implementation: `renderBook` (every real build/export) and the
|
|
30
30
|
* preview/print parity gate both call this, so the gate can never measure a
|
|
31
|
-
* document the build would not have produced
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* parity could not run on the real books that need it — and (b) skipped
|
|
35
|
-
* `inlineShapeUrls`, so `.gp-shape` wrapping silently differed from the build.
|
|
31
|
+
* document the build would not have produced (a hand-rolled `copyFile` loop
|
|
32
|
+
* in the gate would crash on a stale image path and skip `inlineShapeUrls`,
|
|
33
|
+
* silently diverging from the build).
|
|
36
34
|
*
|
|
37
35
|
* A missing image is NOT fatal: the same magenta placeholder the build ships
|
|
38
36
|
* (see missing-asset-placeholder.ts) is substituted and every reference
|