pretext-pdf 1.0.4 → 1.0.6

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/CHANGELOG.md CHANGED
@@ -7,6 +7,92 @@ Format: [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/)
7
7
 
8
8
  ---
9
9
 
10
+ ## [1.0.6] — 2026-05-04
11
+
12
+ Audit bug fixes: validator correctness, internal export hygiene, schema gaps, README accuracy.
13
+
14
+ ### Fixed
15
+
16
+ - **lineHeight upper-bound cap removed** — `validate()` no longer rejects `lineHeight > 20`. The
17
+ field is in points (pt), not a multiplier; 36pt is valid for a large heading. The `> 20` cap in
18
+ `paragraph`, `heading`, and `defaultParagraphStyle` validators has been removed. The lower-bound
19
+ check (lineHeight >= fontSize) is preserved.
20
+
21
+ - **form-field error messages use `${prefix}` format** — Error messages from the `form-field` case
22
+ now follow the `content[N] (form-field): ...` format used by all other element types, instead of
23
+ the old `[N] form-field.` prefix.
24
+
25
+ - **`assertUnknownProps` hint punctuation fixed** — The "unknown property" message previously
26
+ produced `unknown property. did you mean "color"` (period before hint). Fixed to
27
+ `unknown property; did you mean "color"` — no period, semicolon separator.
28
+
29
+ - **British "colour" → "color" in JSDoc** — Two `QrCodeElement` field comments
30
+ (`foreground`, `background`) and the `ValidationError.path` JSDoc example corrected.
31
+
32
+ - **`TocEntryElement`, `RichLine`, `RichFragment` removed from public exports** — These types are
33
+ marked `@internal` in `types-public.ts` and should not be part of the npm API surface. Removed
34
+ from `src/index.ts`.
35
+
36
+ - **Signature error includes original cause** — `SIGNATURE_FAILED` now preserves the underlying
37
+ error message: `PDF signing failed: <original message>` instead of a static string.
38
+
39
+ - **Header-only table now valid** — `validate()` previously rejected tables where all rows are
40
+ headers (`headerRowCount === rows.length`). Changed `>=` to `>`: tables where every row is a
41
+ header are valid (useful for column-label-only tables).
42
+
43
+ - **Dead sub-condition removed in `float-group` floatWidth guard** — `fg.floatWidth <= 0` was a
44
+ dead branch (any value `<= 0` is already `< 30`). Removed to clarify intent.
45
+
46
+ - **`warningCount` JSDoc updated** — Documents that the validator currently only emits errors, so
47
+ `warningCount` is always 0 (reserved for future use).
48
+
49
+ - **`validateDocument` no longer re-throws unexpected errors** — Non-`PretextPdfError` exceptions
50
+ (e.g. circular JSON, unexpected runtime errors) are now caught and returned as a structured
51
+ `ValidationResult` instead of propagating. `validateDocument` now always returns, never throws.
52
+
53
+ ### Changed (Schema additions — `pretext-pdf/schema`)
54
+
55
+ - `qrCodeSchema`: added `margin` field.
56
+ - `imageSchema`: added `floatFontSize`, `floatFontFamily`, `floatColor` fields.
57
+ - `codeSchema`: added `dir` and `highlightTheme` fields.
58
+ - `tableSchema`: added `dir`, `headerRows`, and cell-level `dir`, `fontFamily`, `fontSize`,
59
+ `tabularNumbers` fields.
60
+
61
+ ### Docs
62
+
63
+ - README: `highlight.js` added to optional peer dependencies table.
64
+ - README: `validate_document` added to MCP server tool list.
65
+
66
+ ---
67
+
68
+ ## [1.0.5] — 2026-05-04
69
+
70
+ Schema coverage completion, `ValidationResult.warningCount`, and README API docs.
71
+
72
+ ### Added
73
+
74
+ - **`ValidationResult.warningCount`** — `validateDocument()` now returns `warningCount` alongside
75
+ `errorCount`. Computed by filtering `errors[]` by `severity === 'warning'`. MCP consumers no
76
+ longer need to derive it client-side.
77
+
78
+ - **JSON Schema: remaining field coverage** — `src/schema.ts` now covers all previously missing
79
+ fields across 9 element types:
80
+ - `inlineSpanSchema`: `dir`
81
+ - `paragraphSchema`: `columns`, `columnGap`, `tabularNumbers`, `hyphenate`
82
+ - `headingSchema`: `tabularNumbers`, `hyphenate`
83
+ - `blockquoteSchema`: `lineHeight`, `padding`, `paddingH`, `paddingV`, `underline`, `strikethrough`
84
+ - `calloutSchema`: `titleColor`, `fontWeight`, `lineHeight`, `padding`, `paddingH`, `paddingV`
85
+ - `listSchema`: `lineHeight`, `markerWidth`, `itemSpaceAfter`, `nestedNumberingStyle`; nested
86
+ items now carry `dir` and have a typed inner schema
87
+ - `tocSchema`: `titleFontSize`, `levelIndent`, `leader`, `entrySpacing`
88
+ - `formFieldSchema`: `borderColor`, `backgroundColor`, `keepTogether`, `defaultSelected`
89
+ - `richParagraphSchema`: `columns`, `columnGap`, `tabularNumbers`
90
+
91
+ - **README: `validateDocument` and `pretext-pdf/schema` documented** — both entry points now have
92
+ `### API reference` sections with code examples.
93
+
94
+ ---
95
+
10
96
  ## [1.0.4] — 2026-05-04
11
97
 
12
98
  Schema export hardening: post-release audit fixes addressing coverage gaps and a
package/README.md CHANGED
@@ -92,6 +92,7 @@ Optional peer dependencies — install only what you use:
92
92
  | `vega` + `vega-lite` | `chart` element |
93
93
  | `marked` | `pretext-pdf/markdown` entry point and `--markdown` CLI flag |
94
94
  | `@signpdf/signpdf` | PKCS#7 cryptographic signing |
95
+ | `highlight.js` | `code` element syntax highlighting (requires `language` field on code element) |
95
96
 
96
97
  > **Encryption is built-in** since v0.4.0 — no extra install.
97
98
 
@@ -290,7 +291,7 @@ Drop into any MCP-aware AI agent in 60 seconds:
290
291
  }
291
292
  ```
292
293
 
293
- Exposes: `generate_pdf`, `generate_invoice`, `generate_report`, `generate_from_markdown`, `list_element_types`. Versioned alongside this library — see [`pretext-pdf-mcp`](https://www.npmjs.com/package/pretext-pdf-mcp).
294
+ Exposes: `generate_pdf`, `generate_invoice`, `generate_report`, `generate_from_markdown`, `list_element_types`, `validate_document`. Versioned alongside this library — see [`pretext-pdf-mcp`](https://www.npmjs.com/package/pretext-pdf-mcp).
294
295
 
295
296
  ---
296
297
 
@@ -433,6 +434,35 @@ const pdf = await createPdf({ pageSize: 'A4' })
433
434
 
434
435
  ### `fromPdfmake(doc, opts?)` *(from `pretext-pdf/compat`)*
435
436
 
437
+ ### `validateDocument(doc, opts?)` — non-throwing validation
438
+
439
+ ```typescript
440
+ import { validateDocument } from 'pretext-pdf'
441
+
442
+ const result = validateDocument(doc, { strict: true })
443
+ // result: { valid, errors[], errorCount, warningCount }
444
+
445
+ if (!result.valid) {
446
+ for (const err of result.errors) {
447
+ console.log(`${err.severity} at ${err.path}: ${err.message}`)
448
+ if (err.suggestion) console.log(` → did you mean '${err.suggestion}'?`)
449
+ }
450
+ }
451
+ ```
452
+
453
+ Unlike `validate()` which throws, `validateDocument()` always returns. Useful for MCP tools and agent preflight checks.
454
+
455
+ ### `pdfDocumentSchema` *(from `pretext-pdf/schema`)*
456
+
457
+ Machine-readable JSON Schema for the `PdfDocument` type. Intended for editor tooling, MCP clients, and LLM context injection.
458
+
459
+ ```typescript
460
+ import { pdfDocumentSchema } from 'pretext-pdf/schema'
461
+
462
+ // Use with ajv, json-schema-to-typescript, Smithery UI, or inject into LLM context:
463
+ const schemaString = JSON.stringify(pdfDocumentSchema, null, 2)
464
+ ```
465
+
436
466
  ---
437
467
 
438
468
  ## Strict validation
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { PdfDocument, FootnoteDefElement, RenderOptions } from './types.js';
2
- export type { ValidationError, ValidationResult, Logger, PdfDocument, DocumentMetadata, ContentElement, ParagraphElement, HeadingElement, SpacerElement, TableElement, ColumnDef, TableRow, TableCell, ImageElement, SvgElement, QrCodeElement, BarcodeElement, ChartElement, ListElement, ListItem, HorizontalRuleElement, PageBreakElement, CodeBlockElement, RichParagraphElement, BlockquoteElement, InlineSpan, RichLine, RichFragment, FontSpec, HeaderFooterSpec, WatermarkSpec, EncryptionSpec, SignatureSpec, BookmarkConfig, HyphenationConfig, Margins, CommentElement, CalloutElement, AnnotationSpec, AssemblyPart, FormFieldElement, TocElement, TocEntryElement, FootnoteDefElement, FloatGroupElement, RenderOptions, } from './types.js';
2
+ export type { ValidationError, ValidationResult, Logger, PdfDocument, DocumentMetadata, ContentElement, ParagraphElement, HeadingElement, SpacerElement, TableElement, ColumnDef, TableRow, TableCell, ImageElement, SvgElement, QrCodeElement, BarcodeElement, ChartElement, ListElement, ListItem, HorizontalRuleElement, PageBreakElement, CodeBlockElement, RichParagraphElement, BlockquoteElement, InlineSpan, FontSpec, HeaderFooterSpec, WatermarkSpec, EncryptionSpec, SignatureSpec, BookmarkConfig, HyphenationConfig, Margins, CommentElement, CalloutElement, AnnotationSpec, AssemblyPart, FormFieldElement, TocElement, FootnoteDefElement, FloatGroupElement, RenderOptions, } from './types.js';
3
3
  export { PretextPdfError } from './errors.js';
4
4
  export type { ErrorCode } from './errors.js';
5
5
  export type { NamedPageSize } from './page-sizes.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAOhF,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,UAAU,EACV,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,OAAO,EACP,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,aAAa,GACd,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAC7C,YAAY,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACxC,YAAY,E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C3B,MAAM,IAAI,eAAe,CAAC,kBAAkB,EAAE,2DAA2D,CAAC,CAAA;QAC5G,CAAC;QACD,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,IAAI,MAAM,MAAM,CAAC,IAAI,CAAC,GAAI,CAAC,CAAA;QACjD,IAAI,GAAgB,CAAA;QACpB,IAAI,CAAC;YACH,GAAG,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;QACrC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,MAAM,IAAI,eAAe,CAAC,iBAAiB,EAAE,yBAAyB,CAAC,CAAA;QACzE,CAAC;QACD,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,CAAC,cAAc,EAAE,CAAC,CAAA;QAC/D,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;IACzC,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,EAAE,CAAA;AACtB,CAAC;AAED,iFAAiF;AAEjF,OAAO,EAAE,aAAa,EAAoB,MAAM,oBAAoB,CAAA"}
@@ -48,7 +48,7 @@ export async function applySignature(pdfBytes, sig) {
48
48
  signedBuffer = await signer.sign(Buffer.from(pdfWithPlaceholder), p12Buffer, sig.passphrase !== undefined ? { passphrase: sig.passphrase } : undefined);
49
49
  }
50
50
  catch (e) {
51
- throw new PretextPdfError('SIGNATURE_FAILED', 'PDF signing failed check P12 certificate path, format, and passphrase');
51
+ throw new PretextPdfError('SIGNATURE_FAILED', `PDF signing failed: ${e instanceof Error ? e.message : String(e)}`);
52
52
  }
53
53
  return new Uint8Array(signedBuffer);
54
54
  }
@@ -1 +1 @@
1
- {"version":3,"file":"post-process.js","sourceRoot":"","sources":["../src/post-process.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAA;AAC5B,OAAO,EAAE,WAAW,EAAE,M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;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,QAAoB,EACpB,GAAgB;IAEhB,MAAM,WAAW,GAAG,GAAG,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,cAAc,CAAC,QAAQ,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAA;IACjG,OAAO,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,eAAe,CAAC,WAAW,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,CAAA;AAC1F,CAAC"}
package/dist/schema.d.ts CHANGED
@@ -88,6 +88,23 @@ export declare const pdfDocumentSchema: {
88
88
  readonly smallCaps: {
89
89
  readonly type: "boolean";
90
90
  };
91
+ readonly tabularNumbers: {
92
+ readonly type: "boolean";
93
+ readonly description: "Render digits at fixed slot width for aligned numeric columns.";
94
+ };
95
+ readonly columns: {
96
+ readonly type: "number";
97
+ readonly description: "Number of columns for multi-column layout. Default: 1";
98
+ };
99
+ readonly columnGap: {
100
+ readonly type: "number";
101
+ readonly description: "Gap between columns in pt. Default: 24";
102
+ };
103
+ readonly hyphenate: {
104
+ readonly type: "boolean";
105
+ readonly const: false;
106
+ readonly description: "Set to false to disable hyphenation for this element.";
107
+ };
91
108
  readonly annotation: {
92
109
  readonly type: "object";
93
110
  readonly required: readonly ["contents"];
@@ -189,6 +206,15 @@ export declare const pdfDocumentSchema: {
189
206
  readonly smallCaps: {
190
207
  readonly type: "boolean";
191
208
  };
209
+ readonly tabularNumbers: {
210
+ readonly type: "boolean";
211
+ readonly description: "Render digits at fixed slot width for aligned numeric columns.";
212
+ };
213
+ readonly hyphenate: {
214
+ readonly type: "boolean";
215
+ readonly const: false;
216
+ readonly description: "Set to false to disable hyphenation for this element.";
217
+ };
192
218
  readonly annotation: {
193
219
  readonly type: "object";
194
220
  readonly required: readonly ["contents"];
@@ -323,6 +349,10 @@ export declare const pdfDocumentSchema: {
323
349
  readonly text: {
324
350
  readonly type: "string";
325
351
  };
352
+ readonly dir: {
353
+ readonly type: "string";
354
+ readonly enum: readonly ["ltr", "rtl", "auto"];
355
+ };
326
356
  readonly fontFamily: {
327
357
  readonly type: "string";
328
358
  };
@@ -371,6 +401,19 @@ export declare const pdfDocumentSchema: {
371
401
  };
372
402
  readonly description: "Rich-text spans rendered alongside the image. Alternative to floatText.";
373
403
  };
404
+ readonly floatFontSize: {
405
+ readonly type: "number";
406
+ readonly description: "Font size for floatText in pt.";
407
+ };
408
+ readonly floatFontFamily: {
409
+ readonly type: "string";
410
+ readonly description: "Font family for floatText.";
411
+ };
412
+ readonly floatColor: {
413
+ readonly type: "string";
414
+ readonly pattern: "^#[0-9A-Fa-f]{6}$";
415
+ readonly description: "6-digit hex color e.g. #FF0000";
416
+ };
374
417
  };
375
418
  }, {
376
419
  readonly type: "object";
@@ -459,6 +502,12 @@ export declare const pdfDocumentSchema: {
459
502
  readonly type: "number";
460
503
  readonly enum: readonly [400, 700];
461
504
  };
505
+ readonly fontFamily: {
506
+ readonly type: "string";
507
+ };
508
+ readonly fontSize: {
509
+ readonly type: "number";
510
+ };
462
511
  readonly color: {
463
512
  readonly type: "string";
464
513
  readonly pattern: "^#[0-9A-Fa-f]{6}$";
@@ -475,6 +524,14 @@ export declare const pdfDocumentSchema: {
475
524
  readonly rowspan: {
476
525
  readonly type: "number";
477
526
  };
527
+ readonly dir: {
528
+ readonly type: "string";
529
+ readonly enum: readonly ["ltr", "rtl", "auto"];
530
+ };
531
+ readonly tabularNumbers: {
532
+ readonly type: "boolean";
533
+ readonly description: "Render digits at fixed slot width.";
534
+ };
478
535
  };
479
536
  };
480
537
  };
@@ -516,6 +573,14 @@ export declare const pdfDocumentSchema: {
516
573
  readonly type: "number";
517
574
  readonly description: "Space in points (pt)";
518
575
  };
576
+ readonly dir: {
577
+ readonly type: "string";
578
+ readonly enum: readonly ["ltr", "rtl", "auto"];
579
+ };
580
+ readonly headerRows: {
581
+ readonly type: "number";
582
+ readonly description: "Number of header rows (repeated on continuation pages).";
583
+ };
519
584
  };
520
585
  }, {
521
586
  readonly type: "object";
@@ -538,6 +603,10 @@ export declare const pdfDocumentSchema: {
538
603
  readonly text: {
539
604
  readonly type: "string";
540
605
  };
606
+ readonly dir: {
607
+ readonly type: "string";
608
+ readonly enum: readonly ["ltr", "rtl", "auto"];
609
+ };
541
610
  readonly fontWeight: {
542
611
  readonly type: "number";
543
612
  readonly enum: readonly [400, 700];
@@ -545,6 +614,23 @@ export declare const pdfDocumentSchema: {
545
614
  readonly items: {
546
615
  readonly type: "array";
547
616
  readonly description: "Nested list items (up to 2 levels)";
617
+ readonly items: {
618
+ readonly type: "object";
619
+ readonly required: readonly ["text"];
620
+ readonly properties: {
621
+ readonly text: {
622
+ readonly type: "string";
623
+ };
624
+ readonly dir: {
625
+ readonly type: "string";
626
+ readonly enum: readonly ["ltr", "rtl", "auto"];
627
+ };
628
+ readonly fontWeight: {
629
+ readonly type: "number";
630
+ readonly enum: readonly [400, 700];
631
+ };
632
+ };
633
+ };
548
634
  };
549
635
  };
550
636
  };
@@ -555,9 +641,25 @@ export declare const pdfDocumentSchema: {
555
641
  readonly indent: {
556
642
  readonly type: "number";
557
643
  };
644
+ readonly markerWidth: {
645
+ readonly type: "number";
646
+ readonly description: "Width reserved for marker column in pt. Default: 20";
647
+ };
558
648
  readonly fontSize: {
559
649
  readonly type: "number";
560
650
  };
651
+ readonly lineHeight: {
652
+ readonly type: "number";
653
+ };
654
+ readonly itemSpaceAfter: {
655
+ readonly type: "number";
656
+ readonly description: "Space between list items in pt. Default: 4";
657
+ };
658
+ readonly nestedNumberingStyle: {
659
+ readonly type: "string";
660
+ readonly enum: readonly ["continue", "restart"];
661
+ readonly description: "How nested ordered counters behave. Default: continue";
662
+ };
561
663
  readonly color: {
562
664
  readonly type: "string";
563
665
  readonly pattern: "^#[0-9A-Fa-f]{6}$";
@@ -619,6 +721,21 @@ export declare const pdfDocumentSchema: {
619
721
  readonly fontSize: {
620
722
  readonly type: "number";
621
723
  };
724
+ readonly lineHeight: {
725
+ readonly type: "number";
726
+ };
727
+ readonly padding: {
728
+ readonly type: "number";
729
+ readonly description: "Shorthand for paddingH and paddingV.";
730
+ };
731
+ readonly paddingH: {
732
+ readonly type: "number";
733
+ readonly description: "Horizontal padding inside box in pt. Default: 16";
734
+ };
735
+ readonly paddingV: {
736
+ readonly type: "number";
737
+ readonly description: "Vertical padding inside box in pt. Default: 10";
738
+ };
622
739
  readonly align: {
623
740
  readonly type: "string";
624
741
  readonly enum: readonly ["left", "center", "right", "justify"];
@@ -634,6 +751,12 @@ export declare const pdfDocumentSchema: {
634
751
  readonly keepTogether: {
635
752
  readonly type: "boolean";
636
753
  };
754
+ readonly underline: {
755
+ readonly type: "boolean";
756
+ };
757
+ readonly strikethrough: {
758
+ readonly type: "boolean";
759
+ };
637
760
  };
638
761
  }, {
639
762
  readonly type: "object";
@@ -684,6 +807,61 @@ export declare const pdfDocumentSchema: {
684
807
  readonly type: "string";
685
808
  readonly description: "e.g. 'javascript', 'typescript', 'python'";
686
809
  };
810
+ readonly dir: {
811
+ readonly type: "string";
812
+ readonly enum: readonly ["ltr", "rtl", "auto"];
813
+ };
814
+ readonly highlightTheme: {
815
+ readonly type: "object";
816
+ readonly description: "Custom syntax highlight colors (6-digit hex). Overrides default GitHub-light theme.";
817
+ readonly properties: {
818
+ readonly keyword: {
819
+ readonly type: "string";
820
+ readonly pattern: "^#[0-9A-Fa-f]{6}$";
821
+ readonly description: "6-digit hex color e.g. #FF0000";
822
+ };
823
+ readonly string: {
824
+ readonly type: "string";
825
+ readonly pattern: "^#[0-9A-Fa-f]{6}$";
826
+ readonly description: "6-digit hex color e.g. #FF0000";
827
+ };
828
+ readonly comment: {
829
+ readonly type: "string";
830
+ readonly pattern: "^#[0-9A-Fa-f]{6}$";
831
+ readonly description: "6-digit hex color e.g. #FF0000";
832
+ };
833
+ readonly number: {
834
+ readonly type: "string";
835
+ readonly pattern: "^#[0-9A-Fa-f]{6}$";
836
+ readonly description: "6-digit hex color e.g. #FF0000";
837
+ };
838
+ readonly function: {
839
+ readonly type: "string";
840
+ readonly pattern: "^#[0-9A-Fa-f]{6}$";
841
+ readonly description: "6-digit hex color e.g. #FF0000";
842
+ };
843
+ readonly punctuation: {
844
+ readonly type: "string";
845
+ readonly pattern: "^#[0-9A-Fa-f]{6}$";
846
+ readonly description: "6-digit hex color e.g. #FF0000";
847
+ };
848
+ readonly type: {
849
+ readonly type: "string";
850
+ readonly pattern: "^#[0-9A-Fa-f]{6}$";
851
+ readonly description: "6-digit hex color e.g. #FF0000";
852
+ };
853
+ readonly built_in: {
854
+ readonly type: "string";
855
+ readonly pattern: "^#[0-9A-Fa-f]{6}$";
856
+ readonly description: "6-digit hex color e.g. #FF0000";
857
+ };
858
+ readonly literal: {
859
+ readonly type: "string";
860
+ readonly pattern: "^#[0-9A-Fa-f]{6}$";
861
+ readonly description: "6-digit hex color e.g. #FF0000";
862
+ };
863
+ };
864
+ };
687
865
  };
688
866
  }, {
689
867
  readonly type: "object";
@@ -718,12 +896,36 @@ export declare const pdfDocumentSchema: {
718
896
  readonly pattern: "^#[0-9A-Fa-f]{6}$";
719
897
  readonly description: "6-digit hex color e.g. #FF0000";
720
898
  };
899
+ readonly titleColor: {
900
+ readonly type: "string";
901
+ readonly pattern: "^#[0-9A-Fa-f]{6}$";
902
+ readonly description: "6-digit hex color e.g. #FF0000";
903
+ };
721
904
  readonly fontFamily: {
722
905
  readonly type: "string";
723
906
  };
907
+ readonly fontWeight: {
908
+ readonly type: "number";
909
+ readonly enum: readonly [400, 700];
910
+ };
724
911
  readonly fontSize: {
725
912
  readonly type: "number";
726
913
  };
914
+ readonly lineHeight: {
915
+ readonly type: "number";
916
+ };
917
+ readonly padding: {
918
+ readonly type: "number";
919
+ readonly description: "Shorthand for paddingH and paddingV. Default: 12";
920
+ };
921
+ readonly paddingH: {
922
+ readonly type: "number";
923
+ readonly description: "Horizontal padding inside box in pt. Default: 16";
924
+ };
925
+ readonly paddingV: {
926
+ readonly type: "number";
927
+ readonly description: "Vertical padding inside box in pt. Default: 10";
928
+ };
727
929
  readonly spaceBefore: {
728
930
  readonly type: "number";
729
931
  readonly description: "Space in points (pt)";
@@ -757,6 +959,10 @@ export declare const pdfDocumentSchema: {
757
959
  readonly text: {
758
960
  readonly type: "string";
759
961
  };
962
+ readonly dir: {
963
+ readonly type: "string";
964
+ readonly enum: readonly ["ltr", "rtl", "auto"];
965
+ };
760
966
  readonly fontFamily: {
761
967
  readonly type: "string";
762
968
  };
@@ -840,6 +1046,18 @@ export declare const pdfDocumentSchema: {
840
1046
  readonly smallCaps: {
841
1047
  readonly type: "boolean";
842
1048
  };
1049
+ readonly tabularNumbers: {
1050
+ readonly type: "boolean";
1051
+ readonly description: "Render digits at fixed slot width for aligned numeric columns.";
1052
+ };
1053
+ readonly columns: {
1054
+ readonly type: "number";
1055
+ readonly description: "Number of columns for multi-column layout. Default: 1";
1056
+ };
1057
+ readonly columnGap: {
1058
+ readonly type: "number";
1059
+ readonly description: "Gap between columns in pt. Default: 24";
1060
+ };
843
1061
  };
844
1062
  }, {
845
1063
  readonly type: "object";
@@ -866,6 +1084,22 @@ export declare const pdfDocumentSchema: {
866
1084
  readonly fontSize: {
867
1085
  readonly type: "number";
868
1086
  };
1087
+ readonly titleFontSize: {
1088
+ readonly type: "number";
1089
+ readonly description: "Font size for TOC title. Default: fontSize + 4";
1090
+ };
1091
+ readonly levelIndent: {
1092
+ readonly type: "number";
1093
+ readonly description: "Indentation per level in pt. Default: 16";
1094
+ };
1095
+ readonly leader: {
1096
+ readonly type: "string";
1097
+ readonly description: "Leader character between entry and page number. Default: .";
1098
+ };
1099
+ readonly entrySpacing: {
1100
+ readonly type: "number";
1101
+ readonly description: "Space after each entry line in pt. Default: 4";
1102
+ };
869
1103
  readonly fontFamily: {
870
1104
  readonly type: "string";
871
1105
  };
@@ -931,6 +1165,10 @@ export declare const pdfDocumentSchema: {
931
1165
  readonly pattern: "^#[0-9A-Fa-f]{6}$";
932
1166
  readonly description: "6-digit hex color e.g. #FF0000";
933
1167
  };
1168
+ readonly margin: {
1169
+ readonly type: "number";
1170
+ readonly description: "Quiet-zone modules around the symbol. Default: 4";
1171
+ };
934
1172
  readonly align: {
935
1173
  readonly type: "string";
936
1174
  readonly enum: readonly ["left", "center", "right"];
@@ -1065,6 +1303,24 @@ export declare const pdfDocumentSchema: {
1065
1303
  readonly fontSize: {
1066
1304
  readonly type: "number";
1067
1305
  };
1306
+ readonly borderColor: {
1307
+ readonly type: "string";
1308
+ readonly pattern: "^#[0-9A-Fa-f]{6}$";
1309
+ readonly description: "6-digit hex color e.g. #FF0000";
1310
+ };
1311
+ readonly backgroundColor: {
1312
+ readonly type: "string";
1313
+ readonly pattern: "^#[0-9A-Fa-f]{6}$";
1314
+ readonly description: "6-digit hex color e.g. #FF0000";
1315
+ };
1316
+ readonly defaultSelected: {
1317
+ readonly type: "string";
1318
+ readonly description: "Pre-selected value for radio groups and dropdowns.";
1319
+ };
1320
+ readonly keepTogether: {
1321
+ readonly type: "boolean";
1322
+ readonly description: "If true, never break this element across pages. Default: true";
1323
+ };
1068
1324
  readonly spaceAfter: {
1069
1325
  readonly type: "number";
1070
1326
  readonly description: "Space in points (pt)";
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAmeH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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