gutterpress 0.11.20-alpha.4 → 0.11.20-beta.1
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/dist/api/index.js +2 -2
- package/dist/{build-epdcrm2c.js → build-3bv5hgez.js} +4 -4
- package/dist/{cli-0ey902sx.js → cli-4d25xvs2.js} +45 -32
- package/dist/{cli-61vd4ews.js → cli-cyej3p9v.js} +4 -4
- package/dist/{cli-fmksazej.js → cli-gxqxn3sf.js} +1 -1
- package/dist/{cli-h4tfmpg3.js → cli-tsdrvrff.js} +1 -1
- package/dist/cli.js +12 -12
- package/dist/{doctor-78es5scm.js → doctor-x9vjqhfk.js} +2 -2
- package/dist/engine/shared/pin-edges.d.ts +5 -5
- package/dist/engine/shared/print-area.d.ts +12 -7
- package/dist/{engine-67f68bxs.js → engine-4rkhv5ga.js} +1 -1
- package/dist/{engine-7ha27n2b.js → engine-5fw55dfb.js} +2 -2
- package/dist/{ext-9mc7sr0d.js → ext-9wafdrps.js} +4 -4
- package/dist/{gutterpress-agent-mrdnwktc.js → gutterpress-agent-yvd8w8my.js} +1 -0
- package/dist/{gutterpress-viewer-jr30yw8t.js → gutterpress-viewer-w7njnkj7.js} +115 -20
- package/dist/{index-gm5xbx5w.js → index-crys9951.js} +3 -3
- package/dist/{index-t13p8y08.js → index-pjw7trb8.js} +63 -39
- package/dist/{index-ad95fws8.js → index-yw16cfm8.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/lib/markdown/assemble.d.ts +1 -1
- package/dist/lib/markdown/gutterpress-css.d.ts +8 -8
- package/dist/lib/page-size.d.ts +5 -3
- package/dist/{manifest.schema-13dfax80.json → manifest.schema-c4wfpg6g.json} +8 -2
- package/dist/{new-s4f0tnya.js → new-zwfmqf9t.js} +4 -4
- package/dist/{preflight-7ck4rbsq.js → preflight-pfhbrhdb.js} +4 -4
- package/dist/preview/file-watcher.d.ts +1 -0
- package/dist/{preview-j91sxadd.js → preview-6bc098rf.js} +4 -4
- package/dist/{publish-f12xaenm.js → publish-pev62kc6.js} +4 -4
- package/dist/render.js +22 -13
- package/dist/schema/manifest.types.d.ts +20 -6
- package/dist/{validate-pb5gysvr.js → validate-x00gjxgb.js} +4 -4
- package/package.json +1 -1
package/dist/api/index.js
CHANGED
|
@@ -137,11 +137,11 @@ import {
|
|
|
137
137
|
testRemoteAccess,
|
|
138
138
|
updateExtensions,
|
|
139
139
|
validateProjectExtensions
|
|
140
|
-
} from "../index-
|
|
140
|
+
} from "../index-pjw7trb8.js";
|
|
141
141
|
import"../index-ht1bcqdd.js";
|
|
142
142
|
import {
|
|
143
143
|
BuildError
|
|
144
|
-
} from "../index-
|
|
144
|
+
} from "../index-crys9951.js";
|
|
145
145
|
import"../index-sth219v1.js";
|
|
146
146
|
import {
|
|
147
147
|
DEFAULT_PRINT_OPTS,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runBuild,
|
|
3
3
|
splitOutPath
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-4d25xvs2.js";
|
|
5
5
|
import {
|
|
6
6
|
log
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-tsdrvrff.js";
|
|
8
8
|
import {
|
|
9
9
|
UsageError,
|
|
10
10
|
parseFormat,
|
|
11
11
|
parsePdfxFlavor,
|
|
12
12
|
rejectExtraPositionals,
|
|
13
13
|
rejectUnknownFlags
|
|
14
|
-
} from "./cli-
|
|
14
|
+
} from "./cli-gxqxn3sf.js";
|
|
15
15
|
import"./cli-ht1bcqdd.js";
|
|
16
|
-
import"./cli-
|
|
16
|
+
import"./cli-cyej3p9v.js";
|
|
17
17
|
import {
|
|
18
18
|
BuildError
|
|
19
19
|
} from "./cli-46ycxe6r.js";
|
|
@@ -16,12 +16,12 @@ import {
|
|
|
16
16
|
stripAnnotations,
|
|
17
17
|
transparentPages,
|
|
18
18
|
warn
|
|
19
|
-
} from "./cli-
|
|
19
|
+
} from "./cli-tsdrvrff.js";
|
|
20
20
|
import {
|
|
21
21
|
DEBOUNCE,
|
|
22
22
|
UsageError,
|
|
23
23
|
resolvePort
|
|
24
|
-
} from "./cli-
|
|
24
|
+
} from "./cli-gxqxn3sf.js";
|
|
25
25
|
import {
|
|
26
26
|
blackTextToGray
|
|
27
27
|
} from "./cli-ht1bcqdd.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
getAssetPath,
|
|
31
31
|
getAssetsDir,
|
|
32
32
|
lastPageMode
|
|
33
|
-
} from "./cli-
|
|
33
|
+
} from "./cli-cyej3p9v.js";
|
|
34
34
|
import {
|
|
35
35
|
BuildError,
|
|
36
36
|
EXIT_CODES
|
|
@@ -147,7 +147,8 @@ var DTRPG_PRESET = {
|
|
|
147
147
|
tolerance: 0.5,
|
|
148
148
|
bleed: 9,
|
|
149
149
|
safe: 36,
|
|
150
|
-
artSafe: 18
|
|
150
|
+
artSafe: 18,
|
|
151
|
+
gutter: undefined
|
|
151
152
|
},
|
|
152
153
|
ink: {
|
|
153
154
|
maxTac: 240,
|
|
@@ -234,7 +235,8 @@ var BOOK_PRESET = {
|
|
|
234
235
|
tolerance: 0.5,
|
|
235
236
|
bleed: undefined,
|
|
236
237
|
safe: 18,
|
|
237
|
-
artSafe: undefined
|
|
238
|
+
artSafe: undefined,
|
|
239
|
+
gutter: undefined
|
|
238
240
|
},
|
|
239
241
|
ink: {
|
|
240
242
|
maxTac: 400,
|
|
@@ -592,7 +594,8 @@ function resolveCustomPage(c, m) {
|
|
|
592
594
|
tolerance: c.page?.tolerance ?? m.page?.tolerance ?? 0.5,
|
|
593
595
|
bleed: c.page?.bleed ?? m.page?.bleed,
|
|
594
596
|
safe: c.page?.safe ?? m.page?.safe,
|
|
595
|
-
artSafe: c.page?.artSafe ?? m.page?.artSafe
|
|
597
|
+
artSafe: c.page?.artSafe ?? m.page?.artSafe,
|
|
598
|
+
gutter: c.page?.gutter ?? m.page?.gutter
|
|
596
599
|
};
|
|
597
600
|
}
|
|
598
601
|
function resolveWithPreset(cliOverrides, manifest, preset) {
|
|
@@ -2042,11 +2045,15 @@ var GUTTERPRESS_CSS = `
|
|
|
2042
2045
|
|
|
2043
2046
|
/* sizes — AFTER the flow positions so max-width:100% lifts the floats' 50%
|
|
2044
2047
|
cap at equal specificity */
|
|
2045
|
-
.gp-
|
|
2046
|
-
.gp-
|
|
2047
|
-
.gp-
|
|
2048
|
-
.gp-
|
|
2049
|
-
.gp-
|
|
2048
|
+
.gp-size-10 { width: 10%; max-width: 100%; }
|
|
2049
|
+
.gp-size-20 { width: 20%; max-width: 100%; }
|
|
2050
|
+
.gp-size-30 { width: 30%; max-width: 100%; }
|
|
2051
|
+
.gp-size-40 { width: 40%; max-width: 100%; }
|
|
2052
|
+
.gp-size-50 { width: 50%; max-width: 100%; }
|
|
2053
|
+
.gp-size-60 { width: 60%; max-width: 100%; }
|
|
2054
|
+
.gp-size-70 { width: 70%; max-width: 100%; }
|
|
2055
|
+
.gp-size-80 { width: 80%; max-width: 100%; }
|
|
2056
|
+
.gp-size-90 { width: 90%; max-width: 100%; }
|
|
2050
2057
|
|
|
2051
2058
|
/* float clearance presets — consumed by var(--gp-gap) in the float rules
|
|
2052
2059
|
above and by .gp-shape's shape-margin below; --gp-gap itself is
|
|
@@ -2244,11 +2251,15 @@ var GP_CLASSES = new Set([
|
|
|
2244
2251
|
"gp-center",
|
|
2245
2252
|
"gp-full",
|
|
2246
2253
|
"gp-bleed",
|
|
2247
|
-
"gp-
|
|
2248
|
-
"gp-
|
|
2249
|
-
"gp-
|
|
2250
|
-
"gp-
|
|
2251
|
-
"gp-
|
|
2254
|
+
"gp-size-10",
|
|
2255
|
+
"gp-size-20",
|
|
2256
|
+
"gp-size-30",
|
|
2257
|
+
"gp-size-40",
|
|
2258
|
+
"gp-size-50",
|
|
2259
|
+
"gp-size-60",
|
|
2260
|
+
"gp-size-70",
|
|
2261
|
+
"gp-size-80",
|
|
2262
|
+
"gp-size-90",
|
|
2252
2263
|
"gp-tight",
|
|
2253
2264
|
"gp-loose",
|
|
2254
2265
|
"gp-columns",
|
|
@@ -2283,10 +2294,10 @@ var GP_CLASSES = new Set([
|
|
|
2283
2294
|
]);
|
|
2284
2295
|
|
|
2285
2296
|
// src/lib/markdown/gp-pin-scope.js
|
|
2286
|
-
function warn3(env, line, type, message,
|
|
2297
|
+
function warn3(env, line, type, message, severity) {
|
|
2287
2298
|
if (!env.layoutWarnings)
|
|
2288
2299
|
env.layoutWarnings = [];
|
|
2289
|
-
env.layoutWarnings.push({ line, type, message,
|
|
2300
|
+
env.layoutWarnings.push(severity ? { line, type, message, severity } : { line, type, message });
|
|
2290
2301
|
}
|
|
2291
2302
|
function editDistance2(a, b) {
|
|
2292
2303
|
let prev = Array.from({ length: b.length + 1 }, (_, j) => j);
|
|
@@ -2329,7 +2340,7 @@ function checkFlushArt(token, env, line) {
|
|
|
2329
2340
|
return;
|
|
2330
2341
|
if (!classes.some((c) => PIN_EDGES.includes(c)))
|
|
2331
2342
|
return;
|
|
2332
|
-
warn3(env, line, "flush_art", FLUSH_ART_MSG);
|
|
2343
|
+
warn3(env, line, "flush_art", FLUSH_ART_MSG, "info");
|
|
2333
2344
|
}
|
|
2334
2345
|
function elementNameFor(token) {
|
|
2335
2346
|
switch (token.type) {
|
|
@@ -5041,11 +5052,11 @@ var inches = (pt) => `${+(pt / 72).toFixed(2)}in`;
|
|
|
5041
5052
|
var check3 = {
|
|
5042
5053
|
id: "pdf.print.safe-margins",
|
|
5043
5054
|
name: "Safe margins",
|
|
5044
|
-
description: "Fails when text sits closer to the trim than `page.safe` (DriveThruRPG: 0.5in on every edge). Text only: art is judged in the preview's safe-area overlay, not here. Skipped when `page.safe` is not set",
|
|
5055
|
+
description: "Fails when text sits closer to the trim than `page.safe` (DriveThruRPG: 0.5in on every edge), or than `page.gutter` at the binding edge where one is set. Text only: art is judged in the preview's safe-area overlay, not here. Skipped when `page.safe` is not set",
|
|
5045
5056
|
category: "pdf",
|
|
5046
5057
|
phase: "post-build",
|
|
5047
5058
|
async run(ctx) {
|
|
5048
|
-
const { width, height, bleed = 0, safe = 0 } = ctx.config.page;
|
|
5059
|
+
const { width, height, bleed = 0, safe = 0, gutter = safe } = ctx.config.page;
|
|
5049
5060
|
if (!ctx.pdfPath || !safe)
|
|
5050
5061
|
return [];
|
|
5051
5062
|
const doc = await loadPdf(ctx.pdfPath);
|
|
@@ -5083,8 +5094,7 @@ var check3 = {
|
|
|
5083
5094
|
["bottom", Math.min(...ys) - trim.bottom],
|
|
5084
5095
|
["top", trim.top - Math.max(...ys)]
|
|
5085
5096
|
];
|
|
5086
|
-
const [edge,
|
|
5087
|
-
const shortfall = safe - gap;
|
|
5097
|
+
const [edge, shortfall] = gaps.map(([name, gap]) => [name, (name === "binding" ? gutter : safe) - gap]).reduce((worst, g) => g[1] > worst[1] ? g : worst);
|
|
5088
5098
|
if (shortfall <= TOLERANCE_PT)
|
|
5089
5099
|
continue;
|
|
5090
5100
|
const text = item.str.trim();
|
|
@@ -5092,7 +5102,7 @@ var check3 = {
|
|
|
5092
5102
|
severity: "error",
|
|
5093
5103
|
message: `Page ${pageNum}: "${text.slice(0, 40)}${text.length > 40 ? "…" : ""}" is ${inches(shortfall)} too close to the ${edge} edge.`,
|
|
5094
5104
|
file: ctx.pdfPath,
|
|
5095
|
-
detail: `${rule}: text must stay at least ${inches(safe)} inside the trim on every edge.`,
|
|
5105
|
+
detail: gutter === safe ? `${rule}: text must stay at least ${inches(safe)} inside the trim on every edge.` : `${rule}: text must stay at least ${inches(safe)} inside the trim, ${inches(gutter)} at the binding.`,
|
|
5096
5106
|
code: "text-outside-safe-margin",
|
|
5097
5107
|
data: { page: pageNum, edge, shortfallPt: +shortfall.toFixed(2) }
|
|
5098
5108
|
}));
|
|
@@ -8944,6 +8954,7 @@ function printAreaMeta(page) {
|
|
|
8944
8954
|
bleed: page.bleed ?? 0,
|
|
8945
8955
|
safe: page.safe ?? 0,
|
|
8946
8956
|
artSafe: page.artSafe,
|
|
8957
|
+
gutter: page.gutter,
|
|
8947
8958
|
preset: page.preset,
|
|
8948
8959
|
spec: page.spec
|
|
8949
8960
|
});
|
|
@@ -10120,7 +10131,7 @@ class PdfOutput {
|
|
|
10120
10131
|
const rawPdf = pdfxMode ? path13.join(stage, "raw.pdf") : path13.resolve(pdfFile);
|
|
10121
10132
|
await fsp2.mkdir(path13.dirname(path13.resolve(pdfFile)), { recursive: true });
|
|
10122
10133
|
log.info("Rendering HTML to PDF via the Gutterpress engine (native Chromium pagination)");
|
|
10123
|
-
const { buildNativePdf } = await import("./engine-
|
|
10134
|
+
const { buildNativePdf } = await import("./engine-4rkhv5ga.js");
|
|
10124
10135
|
const engineDiagnostics = await buildNativePdf(htmlFile, rawPdf, {
|
|
10125
10136
|
title: config.title,
|
|
10126
10137
|
author: config.authors.length > 0 ? config.authors.join(", ") : undefined,
|
|
@@ -11415,16 +11426,18 @@ import path18 from "node:path";
|
|
|
11415
11426
|
|
|
11416
11427
|
// src/lib/page-size.ts
|
|
11417
11428
|
import postcss5 from "postcss";
|
|
11418
|
-
import { Scalar as Scalar2 } from "yaml";
|
|
11429
|
+
import { isMap as isMap2, Scalar as Scalar2 } from "yaml";
|
|
11419
11430
|
function isPositivePoints(value) {
|
|
11420
11431
|
return typeof value === "number" && Number.isFinite(value) && value > 0;
|
|
11421
11432
|
}
|
|
11422
11433
|
function writePageBounds(doc, page) {
|
|
11423
|
-
const out = { width: page.width, height: page.height };
|
|
11424
11434
|
const tolerance = page.tolerance ?? numberAt(doc, ["page", "tolerance"]);
|
|
11435
|
+
if (!isMap2(doc.get("page", true)))
|
|
11436
|
+
doc.set("page", doc.createNode({}));
|
|
11437
|
+
doc.setIn(["page", "width"], page.width);
|
|
11438
|
+
doc.setIn(["page", "height"], page.height);
|
|
11425
11439
|
if (tolerance !== undefined)
|
|
11426
|
-
|
|
11427
|
-
doc.set("page", doc.createNode(out));
|
|
11440
|
+
doc.setIn(["page", "tolerance"], tolerance);
|
|
11428
11441
|
}
|
|
11429
11442
|
function numberAt(doc, keyPath) {
|
|
11430
11443
|
const v = doc.getIn(keyPath);
|
|
@@ -11772,7 +11785,7 @@ function substitute(text, table) {
|
|
|
11772
11785
|
}
|
|
11773
11786
|
|
|
11774
11787
|
// src/lib/project-templates.ts
|
|
11775
|
-
import { isMap as
|
|
11788
|
+
import { isMap as isMap3, isScalar as isScalar2, isSeq as isSeq3, parseDocument as parseDocument2 } from "yaml";
|
|
11776
11789
|
var BUILT_IN_TEMPLATE_IDS = [
|
|
11777
11790
|
"book",
|
|
11778
11791
|
"zine",
|
|
@@ -14080,7 +14093,7 @@ async function disconnectPublishCredential(key, deps, options = {}) {
|
|
|
14080
14093
|
}
|
|
14081
14094
|
}
|
|
14082
14095
|
// src/lib/manifest-config.ts
|
|
14083
|
-
import { isSeq as isSeq4, isMap as
|
|
14096
|
+
import { isSeq as isSeq4, isMap as isMap4, YAMLSeq as YAMLSeq3, Scalar as Scalar3 } from "yaml";
|
|
14084
14097
|
// src/lib/host-policy.ts
|
|
14085
14098
|
var AUTO_SYNC_MAX_MINUTES = 24 * 60;
|
|
14086
14099
|
// src/lib/remote-auth/github-repos.ts
|
|
@@ -14286,5 +14299,5 @@ function normalizeProjectKey(projectDir) {
|
|
|
14286
14299
|
return projectDir.replace(/[\\/]+$/, "");
|
|
14287
14300
|
}
|
|
14288
14301
|
// src/lib/publish/manifest-publish.ts
|
|
14289
|
-
import { isMap as
|
|
14302
|
+
import { isMap as isMap5 } from "yaml";
|
|
14290
14303
|
export { isPathSpecifier, parseExtensionSpecifier, PRESET_IDS, PRESETS, TARGETS, TARGET_IDS, publishTargetFor, loadManifestWithPath, BUILT_IN_STYLE_SET_IDS, listProjectExtensions, setExtensionEnabled, removeExtension, addExtension, checkExtensionUpdates, updateExtensions, addBuiltInStyleSet, reportMissingTools, executeValidation, executeAndReport, splitOutPath, runBuild, openPath, startPreviewServer, scaffoldProject, EXTENSION_KINDS, scaffoldExtension, BUILT_IN_TEMPLATE_IDS, importExtensionFromFile, importExtensionFromUrl, searchNpmExtensions, publishCredentialKey, publishConnectionStatus, listPublishAccounts, connectGoogleDrive, listPublishProviders, publishProviderFor, resolvePublishFormat, runPublish, connectPublishProvider, disconnectPublishCredential };
|
|
@@ -587,7 +587,7 @@ function flushMargins(margin, edges) {
|
|
|
587
587
|
}
|
|
588
588
|
function pinInsets(area, side, edges) {
|
|
589
589
|
const binding = side === "recto" ? "left" : "right";
|
|
590
|
-
const inset = (edge) => !area || !edges.includes(edge) ? 0 : edge === binding ? area.
|
|
590
|
+
const inset = (edge) => !area || !edges.includes(edge) ? 0 : edge === binding ? area.gutter : area.bleed + area.artSafe;
|
|
591
591
|
return { top: inset("top"), right: inset("right"), bottom: inset("bottom"), left: inset("left") };
|
|
592
592
|
}
|
|
593
593
|
var NO_PADDING = { top: 0, right: 0, bottom: 0, left: 0 };
|
|
@@ -1134,7 +1134,7 @@ import { fileURLToPath } from "node:url";
|
|
|
1134
1134
|
var favicon_default = "./favicon-272ga6y0.ico";
|
|
1135
1135
|
|
|
1136
1136
|
// src/assets/manifest.schema.json
|
|
1137
|
-
var manifest_schema_default = "./manifest.schema-
|
|
1137
|
+
var manifest_schema_default = "./manifest.schema-c4wfpg6g.json";
|
|
1138
1138
|
|
|
1139
1139
|
// src/assets/preview/scripts/preview-interface.js
|
|
1140
1140
|
var preview_interface_default = "./preview-interface-nnmrxyqm.js";
|
|
@@ -1149,10 +1149,10 @@ var preview_shell_default = "./preview-shell-wk9k3gcd.js";
|
|
|
1149
1149
|
var CGATS21_CRPC1_default = "./CGATS21_CRPC1-g0e3k7kr.icc";
|
|
1150
1150
|
|
|
1151
1151
|
// src/assets/engine/gutterpress-viewer.js
|
|
1152
|
-
var gutterpress_viewer_default = "./gutterpress-viewer-
|
|
1152
|
+
var gutterpress_viewer_default = "./gutterpress-viewer-w7njnkj7.js";
|
|
1153
1153
|
|
|
1154
1154
|
// src/assets/engine/gutterpress-agent.js
|
|
1155
|
-
var gutterpress_agent_default = "./gutterpress-agent-
|
|
1155
|
+
var gutterpress_agent_default = "./gutterpress-agent-yvd8w8my.js";
|
|
1156
1156
|
|
|
1157
1157
|
// src/assets/templates/book/manifest.yaml
|
|
1158
1158
|
var manifest_default = "./manifest-n1gh3qw5.yaml";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
// package.json
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "gutterpress",
|
|
7
|
-
version: "0.11.20-
|
|
7
|
+
version: "0.11.20-beta.1",
|
|
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",
|
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-gxqxn3sf.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-zwfmqf9t.js").then((m) => m.default),
|
|
22
|
+
preview: () => import("./preview-6bc098rf.js").then((m) => m.default),
|
|
23
|
+
build: () => import("./build-3bv5hgez.js").then((m) => m.default),
|
|
24
|
+
publish: () => import("./publish-pev62kc6.js").then((m) => m.default),
|
|
25
|
+
validate: () => import("./validate-x00gjxgb.js").then((m) => m.default),
|
|
26
|
+
preflight: () => import("./preflight-pfhbrhdb.js").then((m) => m.default),
|
|
27
|
+
doctor: () => import("./doctor-x9vjqhfk.js").then((m) => m.default),
|
|
28
|
+
ext: () => import("./ext-9wafdrps.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-zwfmqf9t.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-pfhbrhdb.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-9wafdrps.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-tsdrvrff.js";
|
|
5
5
|
import {
|
|
6
6
|
UsageError,
|
|
7
7
|
rejectExtraPositionals,
|
|
8
8
|
rejectUnknownFlags
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-gxqxn3sf.js";
|
|
10
10
|
import"./cli-46ycxe6r.js";
|
|
11
11
|
import"./cli-asap4t1z.js";
|
|
12
12
|
import"./cli-37x76zdn.js";
|
|
@@ -31,10 +31,10 @@
|
|
|
31
31
|
* the pinned edges — inset by the printer's ART-SAFE line: `--gp-pin-<edge>`
|
|
32
32
|
* on the root, read by `.gp-pin`'s four insets (GUTTERPRESS_CSS). On the
|
|
33
33
|
* top, bottom and outside edge that is the bleed plus `page.artSafe`; at
|
|
34
|
-
* the binding edge `page.
|
|
34
|
+
* the binding edge `page.gutter` (no bleed there) — the manifest's print
|
|
35
35
|
* area (print-area.ts), so a book with none sets 0, the paper's edge.
|
|
36
36
|
* 4. `.gp-flush` on the pin zeroes the four properties in plain CSS: the
|
|
37
|
-
* opt-in escape hatch to the paper's edge (the markdown pipeline
|
|
37
|
+
* opt-in escape hatch to the paper's edge (the markdown pipeline notes it).
|
|
38
38
|
* Nothing else here knows about it.
|
|
39
39
|
*
|
|
40
40
|
* Sides. Recto values are the defaults (`@page :right`'s margins, the
|
|
@@ -92,12 +92,12 @@ export declare function pinPageName(authorPage: string | undefined, edges: reado
|
|
|
92
92
|
export declare function flushMargins(margin: PageGeometry["margin"], edges: readonly PinEdge[]): PageGeometry["margin"];
|
|
93
93
|
/**
|
|
94
94
|
* The art-safe line's distance from the sheet edge on each pinned edge, in pt:
|
|
95
|
-
* the bleed plus `artSafe` on the top, bottom and outside edge, `
|
|
95
|
+
* the bleed plus `artSafe` on the top, bottom and outside edge, `gutter` on the
|
|
96
96
|
* binding edge (the left of a recto, the right of a verso), 0 on an edge the
|
|
97
97
|
* pins do not use (the pin box's edge is the text block's there). No print
|
|
98
98
|
* area means 0 everywhere: the paper's edge.
|
|
99
99
|
*/
|
|
100
|
-
export declare function pinInsets(area: Pick<PrintArea, "bleed" | "
|
|
100
|
+
export declare function pinInsets(area: Pick<PrintArea, "bleed" | "artSafe" | "gutter"> | null, side: PageSide, edges: readonly PinEdge[]): Record<PinEdge, number>;
|
|
101
101
|
/** No padding of the root's own. */
|
|
102
102
|
export declare const NO_PADDING: Readonly<Record<PinEdge, number>>;
|
|
103
103
|
/**
|
|
@@ -109,7 +109,7 @@ export declare const NO_PADDING: Readonly<Record<PinEdge, number>>;
|
|
|
109
109
|
* so a padded root's text stays put too. All four properties are set, so a
|
|
110
110
|
* pin never reads another root's values.
|
|
111
111
|
*/
|
|
112
|
-
export declare function pinRootStyle(margin: PageGeometry["margin"], area: Pick<PrintArea, "bleed" | "
|
|
112
|
+
export declare function pinRootStyle(margin: PageGeometry["margin"], area: Pick<PrintArea, "bleed" | "artSafe" | "gutter"> | null, side: PageSide, edges: readonly PinEdge[], padding?: Readonly<Record<PinEdge, number>>): Record<string, string>;
|
|
113
113
|
/** A computed style's four paddings, in px. */
|
|
114
114
|
export declare function paddingOf(cs: {
|
|
115
115
|
paddingTop: string;
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
* Only the manifest feeds it — `page.width` x `page.height` (the sheet),
|
|
10
10
|
* `page.bleed` (a bleed the sheet already contains on the top, bottom and
|
|
11
11
|
* OUTER edge; the binding edge has none, as DriveThruRPG cuts it),
|
|
12
|
-
* `page.safe` (the TEXT rule: its inset from the trim on every edge)
|
|
13
|
-
* `page.artSafe` (the ART rule: its inset on the top, bottom and outer edge
|
|
14
|
-
*
|
|
15
|
-
*
|
|
12
|
+
* `page.safe` (the TEXT rule: its inset from the trim on every edge),
|
|
13
|
+
* `page.artSafe` (the ART rule: its inset on the top, bottom and outer edge;
|
|
14
|
+
* absent = `safe`) and `page.gutter` (the binding edge's inset, for text and
|
|
15
|
+
* art alike; absent = `safe`) — plus the preset's id and the printer spec it
|
|
16
|
+
* follows, which only word what the overlay finds.
|
|
16
17
|
* No book or plugin CSS feeds it: not the `@page` margins (they are where the
|
|
17
18
|
* author put the TEXT, which is not the printer's safe area), not
|
|
18
19
|
* `@page { bleed }`.
|
|
@@ -26,10 +27,12 @@ export interface PrintArea {
|
|
|
26
27
|
height: number;
|
|
27
28
|
/** in-sheet bleed on the top, bottom and outer edge; 0 = none */
|
|
28
29
|
bleed: number;
|
|
29
|
-
/** the TEXT rule: inset from the trim on every edge; 0 = none */
|
|
30
|
+
/** the TEXT rule: inset from the trim on every edge, the binding edge too unless `gutter` is set; 0 = none */
|
|
30
31
|
safe: number;
|
|
31
|
-
/** the ART rule: inset on the top, bottom and outer edge (the binding edge takes `
|
|
32
|
+
/** the ART rule: inset on the top, bottom and outer edge (the binding edge takes `gutter`) */
|
|
32
33
|
artSafe: number;
|
|
34
|
+
/** the binding allowance: inset from the trim at the binding edge, for text and art alike; absent in the manifest = `safe` */
|
|
35
|
+
gutter: number;
|
|
33
36
|
/** the manifest's preset id, and the printer spec it follows: they only word what is found */
|
|
34
37
|
preset?: string;
|
|
35
38
|
spec?: {
|
|
@@ -46,6 +49,7 @@ export interface PrintAreaSource {
|
|
|
46
49
|
bleed?: number;
|
|
47
50
|
safe?: number;
|
|
48
51
|
artSafe?: number;
|
|
52
|
+
gutter?: number;
|
|
49
53
|
preset?: string;
|
|
50
54
|
spec?: {
|
|
51
55
|
label: string;
|
|
@@ -54,7 +58,8 @@ export interface PrintAreaSource {
|
|
|
54
58
|
}
|
|
55
59
|
/**
|
|
56
60
|
* The `<meta>` tag for one book. An unset bleed or text rule is written as 0,
|
|
57
|
-
* never left out; an unset art rule stays out (the reader takes
|
|
61
|
+
* never left out; an unset art rule or gutter stays out (the reader takes each
|
|
62
|
+
* as `safe`).
|
|
58
63
|
* Anything else the config's `page` block holds (`tolerance`) is not part of it.
|
|
59
64
|
*/
|
|
60
65
|
export declare function printAreaMeta(page: PrintAreaSource): string;
|
|
@@ -12,17 +12,17 @@ import {
|
|
|
12
12
|
searchNpmExtensions,
|
|
13
13
|
setExtensionEnabled,
|
|
14
14
|
updateExtensions
|
|
15
|
-
} from "./cli-
|
|
16
|
-
import"./cli-
|
|
15
|
+
} from "./cli-4d25xvs2.js";
|
|
16
|
+
import"./cli-tsdrvrff.js";
|
|
17
17
|
import {
|
|
18
18
|
UsageError,
|
|
19
19
|
exitForUsage,
|
|
20
20
|
rejectExtraPositionals,
|
|
21
21
|
rejectUnknownFlags,
|
|
22
22
|
resolveProjectDir
|
|
23
|
-
} from "./cli-
|
|
23
|
+
} from "./cli-gxqxn3sf.js";
|
|
24
24
|
import"./cli-ht1bcqdd.js";
|
|
25
|
-
import"./cli-
|
|
25
|
+
import"./cli-cyej3p9v.js";
|
|
26
26
|
import {
|
|
27
27
|
EXIT_CODES
|
|
28
28
|
} from "./cli-46ycxe6r.js";
|