gutterpress 0.10.2-beta.2 → 0.10.3

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 CHANGED
@@ -95,12 +95,12 @@ import {
95
95
  syncProject,
96
96
  testRemoteAccess,
97
97
  validateProjectPlugins
98
- } from "../index-hg8avmn1.js";
98
+ } from "../index-wdkvhdzj.js";
99
99
  import {
100
100
  BuildError,
101
101
  DEFAULT_PRINT_OPTS,
102
102
  readyProbeExpr
103
- } from "../index-d1es8g3a.js";
103
+ } from "../index-wbm6p5j3.js";
104
104
  import {
105
105
  AUTO_SNAPSHOT_MESSAGE,
106
106
  HISTORY_PAGE_LIMIT,
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  executeAndReport
3
- } from "./cli-m9p2n10a.js";
3
+ } from "./cli-qx6mak9k.js";
4
4
  import {
5
5
  log
6
- } from "./cli-1whka4dr.js";
6
+ } from "./cli-qbasg0r3.js";
7
7
  import {
8
8
  UsageError,
9
9
  rejectExtraPositionals,
10
10
  rejectUnknownFlags
11
- } from "./cli-zhmw9zjd.js";
12
- import"./cli-2h1s42gy.js";
11
+ } from "./cli-yezsxehb.js";
12
+ import"./cli-c2yvktan.js";
13
13
  import"./cli-c41yr7he.js";
14
14
  import {
15
15
  EXIT_CODES
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  runBuild,
3
3
  splitOutPath
4
- } from "./cli-m9p2n10a.js";
4
+ } from "./cli-qx6mak9k.js";
5
5
  import {
6
6
  log
7
- } from "./cli-1whka4dr.js";
7
+ } from "./cli-qbasg0r3.js";
8
8
  import {
9
9
  UsageError,
10
10
  parseEngine,
@@ -12,8 +12,8 @@ import {
12
12
  parsePdfxFlavor,
13
13
  rejectExtraPositionals,
14
14
  rejectUnknownFlags
15
- } from "./cli-zhmw9zjd.js";
16
- import"./cli-2h1s42gy.js";
15
+ } from "./cli-yezsxehb.js";
16
+ import"./cli-c2yvktan.js";
17
17
  import"./cli-c41yr7he.js";
18
18
  import {
19
19
  BuildError
@@ -1445,7 +1445,7 @@ var preview_shell_default = "./preview-shell-gqnc5xxe.js";
1445
1445
  var CGATS21_CRPC1_default = "./CGATS21_CRPC1-g0e3k7kr.icc";
1446
1446
 
1447
1447
  // src/assets/engine/gutterpress-viewer.js
1448
- var gutterpress_viewer_default = "./gutterpress-viewer-h031snh8.js";
1448
+ var gutterpress_viewer_default = "./gutterpress-viewer-mfeccbys.js";
1449
1449
 
1450
1450
  // src/assets/engine/gutterpress-agent.js
1451
1451
  var gutterpress_agent_default = "./gutterpress-agent-cazqstr1.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  package_default
3
- } from "./cli-zhmw9zjd.js";
3
+ } from "./cli-yezsxehb.js";
4
4
  import {
5
5
  execCapture,
6
6
  findTool,
@@ -13,12 +13,12 @@ import {
13
13
  stampCreator,
14
14
  stripAnnotations,
15
15
  warn
16
- } from "./cli-1whka4dr.js";
16
+ } from "./cli-qbasg0r3.js";
17
17
  import {
18
18
  DEBOUNCE,
19
19
  UsageError,
20
20
  resolvePort
21
- } from "./cli-zhmw9zjd.js";
21
+ } from "./cli-yezsxehb.js";
22
22
  import {
23
23
  MARGIN_BOX_IGNORED_PROPERTIES,
24
24
  RENDER_TIMEOUT_MS,
@@ -27,7 +27,7 @@ import {
27
27
  getAssetPath,
28
28
  getBrowser,
29
29
  prewarmBrowser
30
- } from "./cli-2h1s42gy.js";
30
+ } from "./cli-c2yvktan.js";
31
31
  import {
32
32
  INSTALL_HINTS,
33
33
  execCapture,
@@ -7538,7 +7538,7 @@ class PdfOutput {
7538
7538
  const rawPdf = pdfxMode ? path8.join(stage, "raw.pdf") : path8.resolve(pdfFile);
7539
7539
  await fsp2.mkdir(path8.dirname(path8.resolve(pdfFile)), { recursive: true });
7540
7540
  log.info("Rendering HTML to PDF via the Gutterpress engine (native Chromium pagination)");
7541
- const { buildNativePdf } = await import("./engine-a8qa7wr5.js");
7541
+ const { buildNativePdf } = await import("./engine-36jts441.js");
7542
7542
  const engineDiagnostics = await buildNativePdf(htmlFile, rawPdf, {
7543
7543
  title: config.title,
7544
7544
  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.10.2-beta.2",
7
+ version: "0.10.3",
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-zhmw9zjd.js";
9
+ } from "./cli-yezsxehb.js";
10
10
  import {
11
11
  EXIT_CODES
12
12
  } from "./cli-46ycxe6r.js";
@@ -18,16 +18,16 @@ import {
18
18
  import { defineCommand, parseArgs, runMain } from "citty";
19
19
  import { statSync } from "node:fs";
20
20
  var SUBCOMMANDS = {
21
- new: () => import("./new-d276t1pm.js").then((m) => m.default),
22
- preview: () => import("./preview-99n2gpbq.js").then((m) => m.default),
23
- build: () => import("./build-f0amjmt7.js").then((m) => m.default),
24
- publish: () => import("./publish-143rk34g.js").then((m) => m.default),
25
- lint: () => import("./lint-583vfha8.js").then((m) => m.default),
26
- validate: () => import("./validate-xa6yjjm1.js").then((m) => m.default),
27
- audit: () => import("./audit-skjyq0dv.js").then((m) => m.default),
28
- preflight: () => import("./preflight-w4yb0vwg.js").then((m) => m.default),
29
- doctor: () => import("./doctor-nr287gjh.js").then((m) => m.default),
30
- plugin: () => import("./plugin-8zjmjb0j.js").then((m) => m.default)
21
+ new: () => import("./new-2d5a06r1.js").then((m) => m.default),
22
+ preview: () => import("./preview-9s96vvsy.js").then((m) => m.default),
23
+ build: () => import("./build-g16kk5hn.js").then((m) => m.default),
24
+ publish: () => import("./publish-fznwgzsz.js").then((m) => m.default),
25
+ lint: () => import("./lint-qr8qcft3.js").then((m) => m.default),
26
+ validate: () => import("./validate-64hafnaa.js").then((m) => m.default),
27
+ audit: () => import("./audit-sd4p4dq5.js").then((m) => m.default),
28
+ preflight: () => import("./preflight-gxxw4391.js").then((m) => m.default),
29
+ doctor: () => import("./doctor-kx4th8g4.js").then((m) => m.default),
30
+ plugin: () => import("./plugin-kjextnnb.js").then((m) => m.default)
31
31
  };
32
32
  var VERSION = package_default.version;
33
33
  var main = defineCommand({
@@ -52,7 +52,7 @@ async function preflightRequiredInvocations(rawArgs) {
52
52
  const [command, ...commandArgs] = rawArgs;
53
53
  try {
54
54
  if (command === "new") {
55
- const { newArgs } = await import("./new-d276t1pm.js");
55
+ const { newArgs } = await import("./new-2d5a06r1.js");
56
56
  rejectUnknownFlags(commandArgs, newArgs, "new");
57
57
  const parsed2 = parseArgs(commandArgs, {
58
58
  ...newArgs,
@@ -64,7 +64,7 @@ async function preflightRequiredInvocations(rawArgs) {
64
64
  return;
65
65
  }
66
66
  if (command === "preflight") {
67
- const { preflightArgs } = await import("./preflight-w4yb0vwg.js");
67
+ const { preflightArgs } = await import("./preflight-gxxw4391.js");
68
68
  rejectUnknownFlags(commandArgs, preflightArgs, "preflight");
69
69
  const parsed2 = parseArgs(commandArgs, {
70
70
  ...preflightArgs,
@@ -88,7 +88,7 @@ async function preflightRequiredInvocations(rawArgs) {
88
88
  if (subcommand !== "add") {
89
89
  throw new UsageError(`gutterpress plugin: unknown command "${subcommand}"`);
90
90
  }
91
- const { pluginAddArgs } = await import("./plugin-8zjmjb0j.js");
91
+ const { pluginAddArgs } = await import("./plugin-kjextnnb.js");
92
92
  rejectUnknownFlags(subcommandArgs, pluginAddArgs, "plugin add");
93
93
  const parsed = parseArgs(subcommandArgs, {
94
94
  ...pluginAddArgs,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  getSystemDiagnostics,
3
3
  log
4
- } from "./cli-1whka4dr.js";
4
+ } from "./cli-qbasg0r3.js";
5
5
  import {
6
6
  UsageError,
7
7
  rejectExtraPositionals,
8
8
  rejectUnknownFlags
9
- } from "./cli-zhmw9zjd.js";
9
+ } from "./cli-yezsxehb.js";
10
10
  import"./cli-c41yr7he.js";
11
11
  import"./cli-46ycxe6r.js";
12
12
  import"./cli-37x76zdn.js";
@@ -4,7 +4,7 @@ import {
4
4
  build,
5
5
  connectChromium,
6
6
  getBrowser
7
- } from "./cli-2h1s42gy.js";
7
+ } from "./cli-c2yvktan.js";
8
8
  import"./cli-c41yr7he.js";
9
9
  import {
10
10
  BuildError
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  build
3
- } from "./index-s69b3t18.js";
3
+ } from "./index-my3v298z.js";
4
4
  import {
5
5
  BuildError,
6
6
  RENDER_TIMEOUT_MS,
7
7
  assertMilestone,
8
8
  connectChromium,
9
9
  getBrowser
10
- } from "./index-d1es8g3a.js";
10
+ } from "./index-wbm6p5j3.js";
11
11
  import"./index-37x76zdn.js";
12
12
 
13
13
  // src/lib/engine.ts
@@ -1092,6 +1092,8 @@
1092
1092
  }
1093
1093
  sites.sort((a, b) => a.el.compareDocumentPosition(b.el) & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : 1);
1094
1094
  for (const { el, prop } of sites) {
1095
+ if (prop === "break-before" && el.style.breakBefore === "auto")
1096
+ continue;
1095
1097
  const strip = el.closest(".gp-strip");
1096
1098
  if (!strip)
1097
1099
  continue;
@@ -1225,6 +1227,14 @@
1225
1227
  pushRun(runs, undefined, trailing);
1226
1228
  return runs;
1227
1229
  }
1230
+ var FORCED_BREAK = /^(column|page|left|right|recto|verso|always)$/;
1231
+ function clearLeadingForcedBreaks(strip) {
1232
+ for (let el = strip.firstElementChild;el; el = el.firstElementChild) {
1233
+ const cs = getComputedStyle(el);
1234
+ if (FORCED_BREAK.test(cs.breakBefore))
1235
+ el.style.breakBefore = "auto";
1236
+ }
1237
+ }
1228
1238
  function stabilizeFullHeightPageRoots(model, strips) {
1229
1239
  let stabilized = 0;
1230
1240
  for (const strip of strips) {
@@ -1436,6 +1446,8 @@
1436
1446
  offset: 0
1437
1447
  });
1438
1448
  }
1449
+ for (const s of strips)
1450
+ clearLeadingForcedBreaks(s.el);
1439
1451
  return strips;
1440
1452
  }
1441
1453
  function compensateRepeatedHeaders(strips, maxPasses = 24) {
@@ -4,7 +4,7 @@ import {
4
4
  launchChromium,
5
5
  marginBoxAlign,
6
6
  marginBoxRectPt
7
- } from "./index-d1es8g3a.js";
7
+ } from "./index-wbm6p5j3.js";
8
8
 
9
9
  // src/engine/compiler/build.ts
10
10
  import { readFile } from "node:fs/promises";
@@ -608,7 +608,7 @@ var preview_shell_default = "./preview-shell-gqnc5xxe.js";
608
608
  var CGATS21_CRPC1_default = "./CGATS21_CRPC1-g0e3k7kr.icc";
609
609
 
610
610
  // src/assets/engine/gutterpress-viewer.js
611
- var gutterpress_viewer_default = "./gutterpress-viewer-h031snh8.js";
611
+ var gutterpress_viewer_default = "./gutterpress-viewer-mfeccbys.js";
612
612
 
613
613
  // src/assets/engine/gutterpress-agent.js
614
614
  var gutterpress_agent_default = "./gutterpress-agent-cazqstr1.js";
@@ -17,7 +17,7 @@ import {
17
17
  resolveChromiumExecutable,
18
18
  run,
19
19
  spawnCapture
20
- } from "./index-d1es8g3a.js";
20
+ } from "./index-wbm6p5j3.js";
21
21
  import {
22
22
  gitFs,
23
23
  gitScopeFor,
@@ -3978,7 +3978,7 @@ import git from "isomorphic-git";
3978
3978
  // package.json
3979
3979
  var package_default = {
3980
3980
  name: "gutterpress",
3981
- version: "0.10.2-beta.2",
3981
+ version: "0.10.3",
3982
3982
  description: "Markdown-to-PDF converter for professional print layout using a native Chromium print engine and Ghostscript.",
3983
3983
  author: "itlackey",
3984
3984
  license: "MPL-2.0",
@@ -8033,7 +8033,7 @@ class PdfOutput {
8033
8033
  const rawPdf = pdfxMode ? path8.join(stage, "raw.pdf") : path8.resolve(pdfFile);
8034
8034
  await fsp2.mkdir(path8.dirname(path8.resolve(pdfFile)), { recursive: true });
8035
8035
  log.info("Rendering HTML to PDF via the Gutterpress engine (native Chromium pagination)");
8036
- const { buildNativePdf } = await import("./engine-gf90g9vk.js");
8036
+ const { buildNativePdf } = await import("./engine-qg5tdaqv.js");
8037
8037
  const engineDiagnostics = await buildNativePdf(htmlFile, rawPdf, {
8038
8038
  title: config.title,
8039
8039
  author: config.authors.length > 0 ? config.authors.join(", ") : undefined,
package/dist/index.js CHANGED
@@ -113,15 +113,15 @@ import {
113
113
  syncProject,
114
114
  testRemoteAccess,
115
115
  validateProjectPlugins
116
- } from "./index-hg8avmn1.js";
116
+ } from "./index-wdkvhdzj.js";
117
117
  import {
118
118
  BUILD_DIAGNOSTIC_CODES
119
- } from "./index-s69b3t18.js";
119
+ } from "./index-my3v298z.js";
120
120
  import {
121
121
  BuildError,
122
122
  DEFAULT_PRINT_OPTS,
123
123
  readyProbeExpr
124
- } from "./index-d1es8g3a.js";
124
+ } from "./index-wbm6p5j3.js";
125
125
  import {
126
126
  AUTO_SNAPSHOT_MESSAGE,
127
127
  HISTORY_PAGE_LIMIT,
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  MANIFEST_FILENAMES,
3
3
  runLint
4
- } from "./cli-m9p2n10a.js";
4
+ } from "./cli-qx6mak9k.js";
5
5
  import {
6
6
  log
7
- } from "./cli-1whka4dr.js";
7
+ } from "./cli-qbasg0r3.js";
8
8
  import {
9
9
  UsageError,
10
10
  rejectExtraPositionals,
11
11
  rejectUnknownFlags
12
- } from "./cli-zhmw9zjd.js";
13
- import"./cli-2h1s42gy.js";
12
+ } from "./cli-yezsxehb.js";
13
+ import"./cli-c2yvktan.js";
14
14
  import"./cli-c41yr7he.js";
15
15
  import {
16
16
  EXIT_CODES
@@ -5,16 +5,16 @@ import {
5
5
  TARGETS,
6
6
  TARGET_IDS,
7
7
  scaffoldProject
8
- } from "./cli-m9p2n10a.js";
8
+ } from "./cli-qx6mak9k.js";
9
9
  import {
10
10
  resolveGhostscript
11
- } from "./cli-1whka4dr.js";
11
+ } from "./cli-qbasg0r3.js";
12
12
  import {
13
13
  UsageError,
14
14
  rejectExtraPositionals,
15
15
  rejectUnknownFlags
16
- } from "./cli-zhmw9zjd.js";
17
- import"./cli-2h1s42gy.js";
16
+ } from "./cli-yezsxehb.js";
17
+ import"./cli-c2yvktan.js";
18
18
  import {
19
19
  isToolAvailable
20
20
  } from "./cli-c41yr7he.js";
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  addNpmPlugin,
3
3
  parseNpmPluginSpec
4
- } from "./cli-m9p2n10a.js";
5
- import"./cli-1whka4dr.js";
4
+ } from "./cli-qx6mak9k.js";
5
+ import"./cli-qbasg0r3.js";
6
6
  import {
7
7
  UsageError,
8
8
  rejectExtraPositionals,
9
9
  rejectUnknownFlags
10
- } from "./cli-zhmw9zjd.js";
11
- import"./cli-2h1s42gy.js";
10
+ } from "./cli-yezsxehb.js";
11
+ import"./cli-c2yvktan.js";
12
12
  import"./cli-c41yr7he.js";
13
13
  import {
14
14
  EXIT_CODES
@@ -2,16 +2,16 @@ import {
2
2
  executeValidation,
3
3
  publishTargetFor,
4
4
  reportMissingTools
5
- } from "./cli-m9p2n10a.js";
5
+ } from "./cli-qx6mak9k.js";
6
6
  import {
7
7
  log
8
- } from "./cli-1whka4dr.js";
8
+ } from "./cli-qbasg0r3.js";
9
9
  import {
10
10
  UsageError,
11
11
  rejectExtraPositionals,
12
12
  rejectUnknownFlags
13
- } from "./cli-zhmw9zjd.js";
14
- import"./cli-2h1s42gy.js";
13
+ } from "./cli-yezsxehb.js";
14
+ import"./cli-c2yvktan.js";
15
15
  import"./cli-c41yr7he.js";
16
16
  import {
17
17
  EXIT_CODES
@@ -6,10 +6,10 @@ import {
6
6
  runBuild,
7
7
  splitOutPath,
8
8
  startPreviewServer
9
- } from "./cli-m9p2n10a.js";
9
+ } from "./cli-qx6mak9k.js";
10
10
  import {
11
11
  log
12
- } from "./cli-1whka4dr.js";
12
+ } from "./cli-qbasg0r3.js";
13
13
  import {
14
14
  UsageError,
15
15
  parseEngine,
@@ -18,8 +18,8 @@ import {
18
18
  rejectExtraPositionals,
19
19
  rejectUnknownFlags,
20
20
  resolvePort
21
- } from "./cli-zhmw9zjd.js";
22
- import"./cli-2h1s42gy.js";
21
+ } from "./cli-yezsxehb.js";
22
+ import"./cli-c2yvktan.js";
23
23
  import"./cli-c41yr7he.js";
24
24
  import {
25
25
  BuildError
@@ -7,17 +7,17 @@ import {
7
7
  publishCredentialKey,
8
8
  publishProviderFor,
9
9
  runPublish
10
- } from "./cli-m9p2n10a.js";
10
+ } from "./cli-qx6mak9k.js";
11
11
  import {
12
12
  FileTokenStore,
13
13
  log
14
- } from "./cli-1whka4dr.js";
14
+ } from "./cli-qbasg0r3.js";
15
15
  import {
16
16
  UsageError,
17
17
  rejectExtraPositionals,
18
18
  rejectUnknownFlags
19
- } from "./cli-zhmw9zjd.js";
20
- import"./cli-2h1s42gy.js";
19
+ } from "./cli-yezsxehb.js";
20
+ import"./cli-c2yvktan.js";
21
21
  import"./cli-c41yr7he.js";
22
22
  import {
23
23
  EXIT_CODES
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  executeAndReport
3
- } from "./cli-m9p2n10a.js";
3
+ } from "./cli-qx6mak9k.js";
4
4
  import {
5
5
  log
6
- } from "./cli-1whka4dr.js";
6
+ } from "./cli-qbasg0r3.js";
7
7
  import {
8
8
  UsageError,
9
9
  rejectExtraPositionals,
10
10
  rejectUnknownFlags
11
- } from "./cli-zhmw9zjd.js";
12
- import"./cli-2h1s42gy.js";
11
+ } from "./cli-yezsxehb.js";
12
+ import"./cli-c2yvktan.js";
13
13
  import"./cli-c41yr7he.js";
14
14
  import {
15
15
  EXIT_CODES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gutterpress",
3
- "version": "0.10.2-beta.2",
3
+ "version": "0.10.3",
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",