gutterpress 0.11.17-alpha.5 → 0.11.17-alpha.7
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.d.ts +2 -2
- package/dist/api/index.js +4 -2
- package/dist/{build-jr9mqwgr.js → build-nbwgzcgv.js} +4 -4
- package/dist/{cli-2xpwjanr.js → cli-2yvrfr58.js} +1 -1
- package/dist/{cli-82tvm0sg.js → cli-v3xmpvs8.js} +191 -118
- package/dist/{cli-5sg6hcqa.js → cli-vsgj1n9s.js} +1 -1
- package/dist/{cli-c3enmb58.js → cli-ycbg7mxk.js} +4 -4
- package/dist/cli.js +12 -12
- package/dist/{components-dhgv2sm7.yaml → components-zzqdpt3m.yaml} +1 -1
- package/dist/{doctor-zxk3pamr.js → doctor-dmagdmyw.js} +2 -2
- package/dist/{engine-eactk9nn.js → engine-5d1rpxxq.js} +2 -2
- package/dist/{engine-63r7pxsy.js → engine-yf2w9hj7.js} +1 -1
- package/dist/{ext-4vapkh0p.js → ext-twnqxfba.js} +4 -4
- package/dist/{gutterpress-viewer-1n793gwd.js → gutterpress-viewer-ez7k4ha7.js} +19 -1
- package/dist/{index-mb8mzwye.js → index-09h3n36d.js} +2 -2
- package/dist/{index-5ez30g3a.js → index-k0k4syyd.js} +215 -120
- package/dist/{index-5gp6mkmf.js → index-vmcfahe2.js} +3 -3
- package/dist/index.js +5 -3
- package/dist/lib/markdown/assemble.d.ts +3 -1
- package/dist/lib/markdown/gutterpress-css.d.ts +1 -1
- package/dist/lib/markdown/markers.d.ts +27 -154
- package/dist/lib/markdown/renderer.d.ts +10 -1
- package/dist/lib/snippets.d.ts +23 -0
- package/dist/{new-hzs75cmd.js → new-mvtamd8q.js} +4 -4
- package/dist/{page-templates-7md4ev7d.css → page-templates-tx9ryt19.css} +4 -11
- package/dist/{preflight-4k8dtsfs.js → preflight-et7fnz7v.js} +4 -4
- package/dist/{preview-whg4rwg6.js → preview-xzvwzsyz.js} +4 -4
- package/dist/{publish-4vtd7qve.js → publish-2x100s48.js} +4 -4
- package/dist/render.js +187 -114
- package/dist/{validate-c32mm2bh.js → validate-nrpa6kah.js} +4 -4
- package/package.json +1 -1
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-2yvrfr58.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-mvtamd8q.js").then((m) => m.default),
|
|
22
|
+
preview: () => import("./preview-xzvwzsyz.js").then((m) => m.default),
|
|
23
|
+
build: () => import("./build-nbwgzcgv.js").then((m) => m.default),
|
|
24
|
+
publish: () => import("./publish-2x100s48.js").then((m) => m.default),
|
|
25
|
+
validate: () => import("./validate-nrpa6kah.js").then((m) => m.default),
|
|
26
|
+
preflight: () => import("./preflight-et7fnz7v.js").then((m) => m.default),
|
|
27
|
+
doctor: () => import("./doctor-dmagdmyw.js").then((m) => m.default),
|
|
28
|
+
ext: () => import("./ext-twnqxfba.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-mvtamd8q.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-et7fnz7v.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-twnqxfba.js");
|
|
86
86
|
if (!EXT_SUBCOMMANDS.includes(subcommand)) {
|
|
87
87
|
throw new UsageError(`gutterpress ext: unknown command "${subcommand}"`);
|
|
88
88
|
}
|
|
@@ -47,5 +47,5 @@ page_templates:
|
|
|
47
47
|
- name: reference
|
|
48
48
|
recipe: "@page .{{PREFIX}}reference"
|
|
49
49
|
emits: "div.page.{{PREFIX}}reference"
|
|
50
|
-
notes: "
|
|
50
|
+
notes: "Ruled headings for a reference page. For columns, use core's @columns 2 ... @end-columns inside it."
|
|
51
51
|
status: stable
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getSystemDiagnostics,
|
|
3
3
|
log
|
|
4
|
-
} from "./cli-
|
|
4
|
+
} from "./cli-vsgj1n9s.js";
|
|
5
5
|
import {
|
|
6
6
|
UsageError,
|
|
7
7
|
rejectExtraPositionals,
|
|
8
8
|
rejectUnknownFlags
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-2yvrfr58.js";
|
|
10
10
|
import"./cli-46ycxe6r.js";
|
|
11
11
|
import"./cli-7fkhgtfn.js";
|
|
12
12
|
import"./cli-37x76zdn.js";
|
|
@@ -12,17 +12,17 @@ import {
|
|
|
12
12
|
searchNpmExtensions,
|
|
13
13
|
setExtensionEnabled,
|
|
14
14
|
updateExtensions
|
|
15
|
-
} from "./cli-
|
|
16
|
-
import"./cli-
|
|
15
|
+
} from "./cli-v3xmpvs8.js";
|
|
16
|
+
import"./cli-vsgj1n9s.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-2yvrfr58.js";
|
|
24
24
|
import"./cli-ht1bcqdd.js";
|
|
25
|
-
import"./cli-
|
|
25
|
+
import"./cli-ycbg7mxk.js";
|
|
26
26
|
import {
|
|
27
27
|
EXIT_CODES
|
|
28
28
|
} from "./cli-46ycxe6r.js";
|
|
@@ -1415,6 +1415,18 @@
|
|
|
1415
1415
|
clearLeadingForcedBreaks(s.el);
|
|
1416
1416
|
return strips;
|
|
1417
1417
|
}
|
|
1418
|
+
var AVOID_BREAK = /^avoid(-page|-column)?$/;
|
|
1419
|
+
function keepChainHead(el) {
|
|
1420
|
+
let head = el;
|
|
1421
|
+
for (let prev = head.previousElementSibling;prev instanceof HTMLElement; prev = head.previousElementSibling) {
|
|
1422
|
+
const linked = AVOID_BREAK.test(getComputedStyle(prev).breakAfter) || AVOID_BREAK.test(getComputedStyle(head).breakBefore);
|
|
1423
|
+
if (!linked)
|
|
1424
|
+
break;
|
|
1425
|
+
head = prev;
|
|
1426
|
+
}
|
|
1427
|
+
return head;
|
|
1428
|
+
}
|
|
1429
|
+
var pushTargets = new WeakMap;
|
|
1418
1430
|
function compensateRepeatedHeaders(strips, maxPasses = 24) {
|
|
1419
1431
|
const warnings = [];
|
|
1420
1432
|
let passes = 0;
|
|
@@ -1427,6 +1439,10 @@
|
|
|
1427
1439
|
for (const shim of Array.from(table.querySelectorAll("tr.gp-thead-shim, tr.gp-tfoot-shim")))
|
|
1428
1440
|
shim.remove();
|
|
1429
1441
|
table.style.breakBefore = "";
|
|
1442
|
+
const target = pushTargets.get(table);
|
|
1443
|
+
if (target)
|
|
1444
|
+
target.style.breakBefore = "";
|
|
1445
|
+
pushTargets.delete(table);
|
|
1430
1446
|
}
|
|
1431
1447
|
const pushed = new Set;
|
|
1432
1448
|
const footClaims = new Map;
|
|
@@ -1487,7 +1503,9 @@
|
|
|
1487
1503
|
shim.remove();
|
|
1488
1504
|
if (plan.push && !pushed.has(plan.table)) {
|
|
1489
1505
|
pushed.add(plan.table);
|
|
1490
|
-
plan.table
|
|
1506
|
+
const target = keepChainHead(plan.table);
|
|
1507
|
+
target.style.breakBefore = "column";
|
|
1508
|
+
pushTargets.set(plan.table, target);
|
|
1491
1509
|
touched++;
|
|
1492
1510
|
continue;
|
|
1493
1511
|
}
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
stringValueAt,
|
|
20
20
|
toFolioPage,
|
|
21
21
|
wantsRecto
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-vmcfahe2.js";
|
|
23
23
|
import {
|
|
24
24
|
launchChromium
|
|
25
25
|
} from "./index-rzm1phg0.js";
|
|
@@ -1329,7 +1329,7 @@ ${mapCss}`;
|
|
|
1329
1329
|
if (pageBackgrounds.length)
|
|
1330
1330
|
log(`audit: ${pageBackgrounds.length} unreferenced @page background image(s)`);
|
|
1331
1331
|
for (const d of multicol)
|
|
1332
|
-
diagnose("engine.multicol.dead-column", `${d} runs over more than one page in columns, and only the last page's columns get balanced — earlier pages are left with an empty column.
|
|
1332
|
+
diagnose("engine.multicol.dead-column", `${d} runs over more than one page in columns, and only the last page's columns get balanced — earlier pages are left with an empty column. End the @columns run where the page ends and open a new @columns for the next page, or set column-fill: auto on ${d} in your stylesheet so every page's columns fill.`);
|
|
1333
1333
|
if (multicol.length)
|
|
1334
1334
|
log(`audit: ${multicol.length} fragmenting multicol warning(s)`);
|
|
1335
1335
|
}
|