lifeastroapi 0.8.0 → 0.9.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.
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/pdf/index.ts
21
21
  var pdf_exports = {};
22
22
  __export(pdf_exports, {
23
+ A4_PRINT_OPTIONS: () => A4_PRINT_OPTIONS,
23
24
  addPdfOutline: () => addPdfOutline,
24
25
  cleanNarrative: () => cleanNarrative,
25
26
  dashaAnalysisPdf: () => dashaAnalysisPdf,
@@ -357,6 +358,10 @@ html, body {
357
358
  margin: 0;
358
359
  }
359
360
  @page { size: A4; margin: 18mm 15mm 22mm 15mm; }
361
+ /* Print the brand colours (table headers, cards) as designed. Chromium does so
362
+ with printBackground; the iOS and Android print engines drop backgrounds
363
+ unless the page asks for exact colours. */
364
+ html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
360
365
  h2 {
361
366
  color: var(--brand-primary);
362
367
  border-bottom: 2px solid var(--brand-primary);
@@ -8244,6 +8249,13 @@ ${xrefStart}
8244
8249
  return concat(chunks);
8245
8250
  }
8246
8251
 
8252
+ // src/pdf/html.ts
8253
+ var A4_PRINT_OPTIONS = {
8254
+ width: 595,
8255
+ height: 842,
8256
+ margins: { top: 51, right: 43, bottom: 62, left: 43 }
8257
+ };
8258
+
8247
8259
  // src/pdf/index.ts
8248
8260
  function toPdf(render, data, opts) {
8249
8261
  return htmlToPdf(render(data, opts?.branding), opts);
@@ -8328,6 +8340,7 @@ var horoscopePdf = (data, opts) => toPdf(renderHoroscopeHtml, data, opts);
8328
8340
  var mangalDoshaPdf = (data, opts) => toPdf(renderMangalDoshaHtml, data, opts);
8329
8341
  // Annotate the CommonJS export names for ESM import in node:
8330
8342
  0 && (module.exports = {
8343
+ A4_PRINT_OPTIONS,
8331
8344
  addPdfOutline,
8332
8345
  cleanNarrative,
8333
8346
  dashaAnalysisPdf,