pdf-factory 0.8.9 → 0.8.10

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.
@@ -4,12 +4,26 @@ export interface ReportColumn {
4
4
  key: string;
5
5
  title: string;
6
6
  type?: 'string' | 'number' | 'boolean' | 'date';
7
+ /** UI (Tabulator) hint in **pixels** — scaled to document units for the PDF. */
7
8
  width?: number;
9
+ /** Size to content and do not absorb spare table width (columns without
10
+ * `fitData` and without `width` take the slack). */
11
+ fitData?: boolean;
8
12
  }
9
13
  export interface ReportPDFOptions {
10
14
  header?: TournamentHeader;
11
15
  orientation?: 'portrait' | 'landscape';
12
16
  title?: string;
13
17
  }
18
+ /**
19
+ * Translate our `ReportColumn[]` into jspdf-autotable `columnStyles`.
20
+ * Pure and exported for testing.
21
+ * - `type: 'number'` → right-aligned.
22
+ * - `width` (px) → fixed `cellWidth` in mm.
23
+ * - `fitData` → `cellWidth: 'wrap'` (fit content, don't absorb slack).
24
+ * - neither → omitted, so autotable's default `'auto'` lets it absorb the
25
+ * remaining table width (keep exactly one such flexible column per report).
26
+ */
27
+ export declare function buildReportColumnStyles(columns: ReportColumn[]): Record<string, any>;
14
28
  export declare function generateReportPDF(columns: ReportColumn[], rows: Record<string, any>[], options?: ReportPDFOptions): jsPDF;
15
29
  //# sourceMappingURL=report.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/generators/report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAwC,KAAK,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAIhG,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,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