ghost-paper 0.3.0 → 0.3.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.
@@ -2,7 +2,7 @@ import {
2
2
  build,
3
3
  buildPdf,
4
4
  buildPrintHtml
5
- } from "./chunk-B7BSOHDL.js";
5
+ } from "./chunk-QUOENJTZ.js";
6
6
  export {
7
7
  build,
8
8
  buildPdf,
@@ -284,6 +284,10 @@ function parse(markdown) {
284
284
  }
285
285
  continue;
286
286
  }
287
+ if (node.type === "thematicBreak") {
288
+ currentTab.elements.push({ kind: "pagebreak" });
289
+ continue;
290
+ }
287
291
  if (node.type === "blockquote") {
288
292
  const html = blockquoteToHtml(node);
289
293
  currentTab.elements.push({ kind: "aside", html });
@@ -957,6 +961,12 @@ var CSS = `
957
961
  color: var(--text-primary);
958
962
  }
959
963
 
964
+ hr.pagebreak {
965
+ border: none;
966
+ border-top: 1px solid var(--border);
967
+ margin: 32px 0;
968
+ }
969
+
960
970
  .tab-content .footnote {
961
971
  font-size: 13px;
962
972
  color: var(--text-muted);
@@ -1267,6 +1277,16 @@ var PRINT_CSS = `
1267
1277
  thead { display: table-header-group; }
1268
1278
  tr { break-inside: avoid; }
1269
1279
 
1280
+ hr.pagebreak {
1281
+ border: none;
1282
+ margin: 0;
1283
+ padding: 0;
1284
+ height: 0;
1285
+ column-span: all;
1286
+ break-after: page;
1287
+ page-break-after: always;
1288
+ }
1289
+
1270
1290
  /* First appendix section starts on a new page */
1271
1291
  .tab-appendix-start { page-break-before: always; break-before: page; }
1272
1292
 
@@ -1365,6 +1385,8 @@ function renderElement(el) {
1365
1385
  return renderTable(el.table);
1366
1386
  case "aside":
1367
1387
  return ` <aside>${el.html}</aside>`;
1388
+ case "pagebreak":
1389
+ return ` <hr class="pagebreak">`;
1368
1390
  }
1369
1391
  }
1370
1392
  function buildSidebar(doc) {
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  build
4
- } from "./chunk-B7BSOHDL.js";
4
+ } from "./chunk-QUOENJTZ.js";
5
5
 
6
6
  // src/cli.ts
7
7
  import { Command } from "commander";
@@ -72,7 +72,7 @@ buildCmd.command("pdf").description("Convert a markdown file to a PDF report").a
72
72
  const inputPath = resolve(input);
73
73
  const markdown = readFileSync(inputPath, "utf-8");
74
74
  const outputPath = opts.output ? resolve(opts.output) : inputPath.replace(/\.md$/, ".pdf");
75
- const { buildPdf } = await import("./-G2AWPUXZ.js");
75
+ const { buildPdf } = await import("./-7SCHCOLC.js");
76
76
  await buildPdf(markdown, outputPath, {
77
77
  pageSize: opts.pageSize ?? "A4",
78
78
  landscape: opts.landscape ?? false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ghost-paper",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "Turn markdown into beautiful HTML reports",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",