@nxavis/pdf 0.1.0

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.
@@ -0,0 +1,1608 @@
1
+ import * as _react_pdf_types from '@react-pdf/types';
2
+ import { Style } from '@react-pdf/types';
3
+ import * as React$1 from 'react';
4
+ import React__default, { ReactNode } from 'react';
5
+ import { P as PdfxTheme } from './index-CvGTF-AE.js';
6
+ export { B as BorderRadiusScale, C as ColorTokens, F as FontWeights, L as LetterSpacingScale, a as LineHeights, b as PageTokens, c as PrimitiveTokens, S as SpacingScale, d as SpacingTokens, T as ThemePresetName, e as TypographyScale, f as TypographyTokens, g as defaultPrimitives, m as minimalTheme, h as modernTheme, p as professionalTheme, t as themePresets } from './index-CvGTF-AE.js';
7
+ import * as react_jsx_runtime from 'react/jsx-runtime';
8
+ import { Style as Style$1 } from '@react-pdf/types/style';
9
+
10
+ /**
11
+ * Base props shared by all PDFx PDF components.
12
+ * Every component in the library should extend this interface.
13
+ */
14
+ interface PDFComponentProps {
15
+ /** Custom styles to merge with component defaults */
16
+ style?: Style;
17
+ /** Content to render — string or nested React PDF elements */
18
+ children: ReactNode;
19
+ }
20
+
21
+ /** Base error class for all @nxavis/pdf errors */
22
+ declare class PdfxError extends Error {
23
+ readonly code: string;
24
+ readonly suggestion?: string | undefined;
25
+ constructor(message: string, code: string, suggestion?: string | undefined);
26
+ }
27
+ /** Thrown when input validation fails (theme, props, data) */
28
+ declare class ValidationError extends PdfxError {
29
+ constructor(message: string, suggestion?: string);
30
+ }
31
+
32
+ declare const PdfxThemeContext: React$1.Context<PdfxTheme>;
33
+ interface PdfxThemeProviderProps {
34
+ theme?: PdfxTheme;
35
+ children: ReactNode;
36
+ }
37
+ declare function PdfxThemeProvider({ theme, children }: PdfxThemeProviderProps): react_jsx_runtime.JSX.Element;
38
+ /**
39
+ * Returns the active PdfxTheme from context, or the default theme when called
40
+ * outside a React render tree (e.g. unit tests).
41
+ */
42
+ declare function usePdfxTheme(): PdfxTheme;
43
+
44
+ /**
45
+ * Create a tw() function from a PdfxTheme.
46
+ * Maps theme tokens to Tailwind custom colors so you can use
47
+ * `tw("text-primary bg-muted border-border")` etc.
48
+ */
49
+ declare function createThemeTw(theme: PdfxTheme, options?: {
50
+ ptPerRem?: number;
51
+ }): (input: string) => _react_pdf_types.Style;
52
+ /**
53
+ * Default tw() using the professional theme.
54
+ * Import and use directly for quick styling.
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * <View style={tw("flex-row gap-4 p-6 bg-muted")}>
59
+ * <Text style={tw("text-foreground font-bold")}>Label</Text>
60
+ * </View>
61
+ * ```
62
+ */
63
+ declare const tw: (input: string) => _react_pdf_types.Style;
64
+
65
+ /** Heading font weight override. */
66
+ type HeadingWeight = 'normal' | 'medium' | 'semibold' | 'bold';
67
+ /** Heading letter-spacing scale. */
68
+ type HeadingTracking = 'tighter' | 'tight' | 'normal' | 'wide' | 'wider';
69
+ interface HeadingProps extends PDFComponentProps {
70
+ level?: 1 | 2 | 3 | 4 | 5 | 6;
71
+ align?: 'left' | 'center' | 'right';
72
+ color?: string;
73
+ transform?: 'uppercase' | 'lowercase' | 'capitalize' | 'none';
74
+ weight?: HeadingWeight;
75
+ tracking?: HeadingTracking;
76
+ noMargin?: boolean;
77
+ /**
78
+ * Ensure the heading has enough space below it before a page break occurs.
79
+ * Uses `minPresenceAhead` to prevent orphaned headings at the bottom of a page.
80
+ * When true, at least 80pt of space must remain on the page or the heading moves to the next page.
81
+ * Defaults to **true** — headings never strand alone at the bottom of a page.
82
+ * Set to false only when you explicitly want a heading to be allowed at the bottom of a page.
83
+ * @default true
84
+ */
85
+ keepWithNext?: boolean;
86
+ }
87
+
88
+ declare function Heading({ level, align, color, transform, weight, tracking, noMargin, keepWithNext, children, style, }: HeadingProps): react_jsx_runtime.JSX.Element;
89
+
90
+ /** Typography scale variant. Maps to primitives.typography. */
91
+ type TextVariant = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl';
92
+ /** Font weight override. */
93
+ type TextWeight = 'normal' | 'medium' | 'semibold' | 'bold';
94
+ /** Text decoration style. */
95
+ type TextDecoration = 'underline' | 'line-through' | 'none';
96
+ interface TextProps extends PDFComponentProps {
97
+ /** Typography scale variant. Maps to primitives.typography. Default (undefined) uses typography.body. */
98
+ variant?: TextVariant;
99
+ /** Text alignment. Maps to textAlign. */
100
+ align?: 'left' | 'center' | 'right' | 'justify';
101
+ /** Text color. Use theme token (e.g. 'primary', 'muted') or any CSS color. */
102
+ color?: string;
103
+ /** Font weight override. */
104
+ weight?: TextWeight;
105
+ /** Render text in italic style. */
106
+ italic?: boolean;
107
+ /** Text decoration. 'line-through' is useful for strikethrough pricing. */
108
+ decoration?: TextDecoration;
109
+ /** Text transform (uppercase, lowercase, capitalize). */
110
+ transform?: 'uppercase' | 'lowercase' | 'capitalize';
111
+ /** Remove paragraph gap margin. Useful inside Stack or tight layouts. */
112
+ noMargin?: boolean;
113
+ }
114
+
115
+ declare function Text({ variant, align, color, weight, italic, decoration, transform, noMargin, children, style, }: TextProps): react_jsx_runtime.JSX.Element;
116
+
117
+ /** Link visual variant — controls default color. */
118
+ type LinkVariant = 'default' | 'muted' | 'primary';
119
+ /** Link underline style. */
120
+ type LinkUnderline = 'always' | 'none';
121
+ interface LinkProps extends PDFComponentProps {
122
+ /** URL or anchor ID (prefix with # for internal links). Maps to @react-pdf Link src. */
123
+ href: string;
124
+ /** Text alignment. Maps to textAlign. */
125
+ align?: 'left' | 'center' | 'right';
126
+ /** Text color. Use theme token (e.g. 'primary', 'accent') or any CSS color. Defaults to accent. */
127
+ color?: string;
128
+ /** Link visual variant. */
129
+ variant?: LinkVariant;
130
+ /** Underline style. always = underlined, none = no underline. */
131
+ underline?: LinkUnderline;
132
+ }
133
+
134
+ declare function Link({ href, align, color, variant, underline, children, style, }: LinkProps): react_jsx_runtime.JSX.Element;
135
+
136
+ /** Gap scale between Stack children. */
137
+ type StackGap = 'none' | 'sm' | 'md' | 'lg' | 'xl';
138
+ /** Stack layout direction. */
139
+ type StackDirection = 'vertical' | 'horizontal';
140
+ /** Cross-axis alignment (alignItems). */
141
+ type StackAlign = 'start' | 'center' | 'end' | 'stretch';
142
+ /** Main-axis distribution (justifyContent). */
143
+ type StackJustify = 'start' | 'center' | 'end' | 'between' | 'around';
144
+ interface StackProps extends PDFComponentProps {
145
+ /** Gap between children. Maps to theme spacing scale. */
146
+ gap?: StackGap;
147
+ /** Layout direction. vertical = column, horizontal = row. */
148
+ direction?: StackDirection;
149
+ /** Cross-axis alignment (alignItems). */
150
+ align?: StackAlign;
151
+ /** Main-axis distribution (justifyContent). */
152
+ justify?: StackJustify;
153
+ /** Enable CSS flex-wrap so children wrap onto multiple lines. */
154
+ wrap?: boolean;
155
+ /**
156
+ * Prevent the Stack from being split across PDF pages.
157
+ * Maps to react-pdf’s `wrap={false}` on the inner View.
158
+ * Use for short stacks that should always stay on a single page.
159
+ */
160
+ noWrap?: boolean;
161
+ }
162
+
163
+ declare function Stack({ gap, direction, align, justify, wrap, noWrap, children, style, }: StackProps): react_jsx_runtime.JSX.Element;
164
+
165
+ /** Vertical spacing (margin) scale around a section. */
166
+ type SectionSpacing = 'none' | 'sm' | 'md' | 'lg' | 'xl';
167
+ /** Inner padding scale of a section. */
168
+ type SectionPadding = 'none' | 'sm' | 'md' | 'lg';
169
+ /** Section visual style variant. */
170
+ type SectionVariant = 'default' | 'callout' | 'highlight' | 'card';
171
+ interface SectionProps extends PDFComponentProps {
172
+ /** Vertical spacing (margin) around the section. Maps to theme spacing. */
173
+ spacing?: SectionSpacing;
174
+ /** Inner padding. Maps to theme spacing. */
175
+ padding?: SectionPadding;
176
+ /** Background color. Use theme token (e.g. 'muted', 'primary') or any CSS color. */
177
+ background?: string;
178
+ /** Add a border around the section. */
179
+ border?: boolean;
180
+ /** Section visual variant. 'callout' adds left accent border. 'highlight' adds muted bg. 'card' adds border + rounded. */
181
+ variant?: SectionVariant;
182
+ /** Accent color for callout/highlight left border. Use theme token or CSS color. Defaults to 'primary'. */
183
+ accentColor?: string;
184
+ /**
185
+ * Prevent the section from splitting across page boundaries.
186
+ * @default false — opt in for callout/highlight/card sections you want kept together.
187
+ */
188
+ noWrap?: boolean;
189
+ }
190
+
191
+ declare function Section({ spacing, padding, background, border, variant, accentColor, noWrap, children, style, }: SectionProps): react_jsx_runtime.JSX.Element;
192
+
193
+ /** Table visual style variant. */
194
+ type TableVariant = 'line' | 'grid' | 'minimal' | 'striped' | 'compact' | 'bordered' | 'primary-header';
195
+ interface TableProps extends PDFComponentProps {
196
+ variant?: TableVariant;
197
+ zebraStripe?: boolean;
198
+ noWrap?: boolean;
199
+ }
200
+ interface TableSectionProps extends PDFComponentProps {
201
+ }
202
+ interface TableRowProps extends PDFComponentProps {
203
+ header?: boolean;
204
+ footer?: boolean;
205
+ stripe?: boolean;
206
+ variant?: TableVariant;
207
+ }
208
+ interface TableCellProps extends PDFComponentProps {
209
+ header?: boolean;
210
+ footer?: boolean;
211
+ align?: 'left' | 'center' | 'right';
212
+ width?: string | number;
213
+ variant?: TableVariant;
214
+ _last?: boolean;
215
+ }
216
+
217
+ declare function TableHeader({ children, style }: TableSectionProps): react_jsx_runtime.JSX.Element;
218
+ declare function TableBody({ children, style }: TableSectionProps): react_jsx_runtime.JSX.Element;
219
+ declare function TableFooter({ children, style }: TableSectionProps): react_jsx_runtime.JSX.Element;
220
+ declare function Table({ children, style, variant, zebraStripe, noWrap, }: TableProps): react_jsx_runtime.JSX.Element;
221
+ declare function TableRow({ header, footer, stripe, children, style, variant, }: TableRowProps): react_jsx_runtime.JSX.Element;
222
+ declare function TableCell({ header, footer, align, width, children, style, variant, _last, }: TableCellProps): react_jsx_runtime.JSX.Element;
223
+
224
+ /** DataTable row density size. */
225
+ type DataTableSize = 'default' | 'compact';
226
+ /** Column definition for a DataTable. */
227
+ interface DataTableColumn<T = Record<string, unknown>> {
228
+ key: keyof T & string;
229
+ header: string;
230
+ align?: 'left' | 'center' | 'right';
231
+ width?: string | number;
232
+ render?: (value: unknown, row: T) => React__default.ReactNode;
233
+ renderFooter?: (value: unknown) => React__default.ReactNode;
234
+ }
235
+ interface DataTableProps<T = Record<string, unknown>> extends Omit<PDFComponentProps, 'children'> {
236
+ columns: DataTableColumn<T>[];
237
+ data: T[];
238
+ variant?: TableVariant;
239
+ footer?: Partial<Record<keyof T & string, string | number>>;
240
+ stripe?: boolean;
241
+ size?: DataTableSize;
242
+ /** Prevent the entire table from splitting across pages. Use for short tables that fit on one page. */
243
+ noWrap?: boolean;
244
+ }
245
+
246
+ declare function DataTable<T extends Record<string, unknown>>({ columns, data, variant, footer, stripe, size, noWrap, style, }: DataTableProps<T>): react_jsx_runtime.JSX.Element;
247
+
248
+ /** Badge visual variant — controls background and border colors. */
249
+ type BadgeVariant = 'default' | 'primary' | 'success' | 'warning' | 'destructive' | 'info' | 'outline';
250
+ /** Badge size — controls font size and padding. */
251
+ type BadgeSize = 'sm' | 'md' | 'lg';
252
+ interface BadgeProps extends Omit<PDFComponentProps, 'children'> {
253
+ /** Display text of the badge. */
254
+ label: string;
255
+ /** Visual variant. Controls colors. Defaults to 'default'. */
256
+ variant?: BadgeVariant;
257
+ /** Badge size. Defaults to 'md'. */
258
+ size?: BadgeSize;
259
+ /** Override the background color. Use theme token or any CSS color. */
260
+ background?: string;
261
+ /** Override the text color. Use theme token or any CSS color. */
262
+ color?: string;
263
+ }
264
+
265
+ declare function Badge({ label, variant, size, background, color, style, }: BadgeProps): react_jsx_runtime.JSX.Element;
266
+
267
+ /**
268
+ * KeyValue layout direction.
269
+ *
270
+ * - `horizontal` — Key and value appear side by side on one row (ideal for metadata blocks)
271
+ * - `vertical` — Key is stacked above the value (ideal for form-like displays)
272
+ */
273
+ type KeyValueDirection = 'horizontal' | 'vertical';
274
+ /** KeyValue size — scales label/value font sizes together. */
275
+ type KeyValueSize = 'sm' | 'md' | 'lg';
276
+ /** A single key-value pair entry. */
277
+ interface KeyValueEntry {
278
+ /** The label / field name shown in muted style. */
279
+ key: string;
280
+ /** The display value. */
281
+ value: string;
282
+ /** Optional color for the value text. Use theme token or CSS color. */
283
+ valueColor?: string;
284
+ /** Optional custom styles for the value text. */
285
+ valueStyle?: Style$1;
286
+ /** Optional custom styles for the key text. */
287
+ keyStyle?: Style$1;
288
+ }
289
+ interface KeyValueProps extends Omit<PDFComponentProps, 'children'> {
290
+ /**
291
+ * Array of key-value pairs to display.
292
+ * Each entry has a `key` (label) and `value` (data).
293
+ */
294
+ items: KeyValueEntry[];
295
+ /**
296
+ * Layout direction. Defaults to 'horizontal'.
297
+ *
298
+ * - `horizontal` — Good for invoice headers, summary boxes
299
+ * - `vertical` — Good for form field displays
300
+ */
301
+ direction?: KeyValueDirection;
302
+ /**
303
+ * Show a horizontal divider line between each row.
304
+ * Most useful with the horizontal direction. Defaults to false.
305
+ */
306
+ divided?: boolean;
307
+ /** Font size scale. Defaults to 'md'. */
308
+ size?: KeyValueSize;
309
+ /**
310
+ * In horizontal layout, controls the label column width as a flex ratio.
311
+ * Value column takes the remaining space. Defaults to 1 (equal columns).
312
+ * Use 0.5 for a narrower label, 2 for a wider label.
313
+ */
314
+ labelFlex?: number;
315
+ /** Color override for all keys/labels. Use theme token or CSS color. */
316
+ labelColor?: string;
317
+ /** Color override for all values. Use theme token or CSS color. */
318
+ valueColor?: string;
319
+ /** Bold the value text. Defaults to false. */
320
+ boldValue?: boolean;
321
+ /**
322
+ * Prevent the KeyValue block from being split across PDF pages.
323
+ * Useful for short invoice-style metadata blocks that should stay on one page.
324
+ * @default false
325
+ */
326
+ noWrap?: boolean;
327
+ dividerColor?: string;
328
+ dividerThickness?: number;
329
+ dividerMargin?: number;
330
+ }
331
+
332
+ declare function KeyValue({ items, direction, divided, size, labelFlex, labelColor, valueColor, boldValue, noWrap, dividerColor, dividerThickness, dividerMargin, style, }: KeyValueProps): react_jsx_runtime.JSX.Element;
333
+
334
+ /** Divider line style. */
335
+ type DividerVariant = 'solid' | 'dashed' | 'dotted';
336
+ /** Divider line weight. */
337
+ type DividerThickness = 'thin' | 'medium' | 'thick';
338
+ /** Vertical spacing around the divider. */
339
+ type DividerSpacing = 'none' | 'sm' | 'md' | 'lg';
340
+ interface DividerProps extends Omit<PDFComponentProps, 'children'> {
341
+ spacing?: DividerSpacing;
342
+ variant?: DividerVariant;
343
+ color?: string;
344
+ thickness?: DividerThickness;
345
+ label?: string;
346
+ width?: string | number;
347
+ }
348
+
349
+ declare function Divider({ spacing, variant, color, thickness, label, width, style, }: DividerProps): react_jsx_runtime.JSX.Element;
350
+
351
+ interface PageBreakProps extends Omit<PDFComponentProps, 'children'> {
352
+ children?: never;
353
+ }
354
+ declare function PageBreak({ style }: PageBreakProps): react_jsx_runtime.JSX.Element;
355
+
356
+ /**
357
+ * Text alignment for the page number.
358
+ */
359
+ type PageNumberAlign = 'left' | 'center' | 'right';
360
+ /**
361
+ * Size preset for the page number text.
362
+ */
363
+ type PageNumberSize = 'xs' | 'sm' | 'md';
364
+ /**
365
+ * Props for the PdfPageNumber component.
366
+ */
367
+ interface PdfPageNumberProps extends Omit<PDFComponentProps, 'children'> {
368
+ /**
369
+ * Format string for the page number.
370
+ * Use `{page}` for current page and `{total}` for total pages.
371
+ * @default "Page {page} of {total}"
372
+ * @example "Page {page} of {total}"
373
+ * @example "{page} / {total}"
374
+ * @example "- {page} -"
375
+ */
376
+ format?: string;
377
+ /**
378
+ * Text alignment.
379
+ * @default "center"
380
+ */
381
+ align?: PageNumberAlign;
382
+ /**
383
+ * Size preset for the text.
384
+ * @default "sm"
385
+ */
386
+ size?: PageNumberSize;
387
+ /**
388
+ * Whether the page number should be fixed (appear on every page).
389
+ * Use this when placing inside a Page component to repeat on all pages.
390
+ * @default false
391
+ */
392
+ fixed?: boolean;
393
+ /**
394
+ * Use muted color (mutedForeground) instead of foreground.
395
+ * @default true
396
+ */
397
+ muted?: boolean;
398
+ /**
399
+ * No children allowed.
400
+ */
401
+ children?: never;
402
+ }
403
+
404
+ /**
405
+ * PdfPageNumber — Displays page numbers with "Page X of Y" format.
406
+ *
407
+ * Uses react-pdf's render prop to access pageNumber and totalPages dynamically.
408
+ * Can be placed inside PageFooter or anywhere in a Page, and supports the `fixed`
409
+ * prop to repeat on every page.
410
+ *
411
+ * @example Basic usage (centered, on every page)
412
+ * ```tsx
413
+ * <Page>
414
+ * <View style={{ position: 'absolute', bottom: 20, left: 0, right: 0 }}>
415
+ * <PdfPageNumber fixed />
416
+ * </View>
417
+ * {content}
418
+ * </Page>
419
+ * ```
420
+ *
421
+ * @example Custom format
422
+ * ```tsx
423
+ * <PdfPageNumber format="{page} / {total}" align="right" />
424
+ * ```
425
+ *
426
+ * @example Inside a PageFooter (recommended pattern)
427
+ * ```tsx
428
+ * <PageFooter variant="centered">
429
+ * <PdfPageNumber format="- {page} -" />
430
+ * </PageFooter>
431
+ * ```
432
+ */
433
+ declare function PdfPageNumber({ format, align, size, fixed, muted, style, }: PdfPageNumberProps): react_jsx_runtime.JSX.Element;
434
+
435
+ type PageHeaderVariant = 'simple' | 'centered' | 'minimal' | 'branded' | 'logo-left' | 'logo-right' | 'two-column';
436
+ interface PageHeaderProps extends Omit<PDFComponentProps, 'children'> {
437
+ title: string;
438
+ subtitle?: string;
439
+ rightText?: string;
440
+ rightSubText?: string;
441
+ variant?: PageHeaderVariant;
442
+ background?: string;
443
+ titleColor?: string;
444
+ marginBottom?: number;
445
+ address?: string;
446
+ phone?: string;
447
+ email?: string;
448
+ /**
449
+ * @example <Image src="/logo.png" style={{ width: 48, height: 48 }} />
450
+ */
451
+ logo?: React.ReactNode;
452
+ /**
453
+ * Fix this header to the top of the page, so it will always be visible regardless of content length. This is achieved using `position: 'fixed'` in the PDF layout.
454
+ * @default false
455
+ */
456
+ fixed?: boolean;
457
+ /**
458
+ * Prevent the header from being split across PDF pages when placed inline. A partially-rendered header is always visually broken, so this defaults to true. Set to false only for decorative banners that can tolerate splitting.
459
+ * @default true
460
+ */
461
+ noWrap?: boolean;
462
+ }
463
+ declare function PageHeader({ title, subtitle, rightText, rightSubText, variant, background, titleColor, marginBottom, logo, address, phone, email, fixed, noWrap, style, }: PageHeaderProps): react_jsx_runtime.JSX.Element;
464
+
465
+ type PageFooterVariant = 'simple' | 'centered' | 'branded' | 'minimal' | 'three-column' | 'detailed';
466
+ interface PageFooterProps extends Omit<PDFComponentProps, 'children'> {
467
+ leftText?: string;
468
+ rightText?: string;
469
+ centerText?: string;
470
+ variant?: PageFooterVariant;
471
+ background?: string;
472
+ textColor?: string;
473
+ marginTop?: number;
474
+ address?: string;
475
+ phone?: string;
476
+ email?: string;
477
+ website?: string;
478
+ /**
479
+ * Fix this footer to the bottom of the page, so it will always be visible regardless of content length. This is achieved using `position: 'fixed'` in the PDF layout.
480
+ * @default false
481
+ */
482
+ fixed?: boolean;
483
+ /**
484
+ * Render this footer at the bottom of the page, but allow it to scroll with the content if the page is long enough. This is achieved using absolute positioning with `position: 'absolute'` and `bottom: 0`.
485
+ * @default false
486
+ */
487
+ sticky?: boolean;
488
+ /**
489
+ * When using `sticky`, this value sets the `left` and `right` offsets to match the page's horizontal padding, ensuring the footer content is aligned with the rest of the page content.
490
+ * @default 0
491
+ */
492
+ pagePadding?: number;
493
+ /**
494
+ * Prevent the footer from being split across PDF pages when placed inline.
495
+ * @default true
496
+ */
497
+ noWrap?: boolean;
498
+ }
499
+ declare function PageFooter({ leftText, rightText, centerText, variant, background, textColor, marginTop, address, phone, email, website, fixed, sticky, pagePadding, noWrap, style, }: PageFooterProps): react_jsx_runtime.JSX.Element;
500
+
501
+ /**
502
+ * Position preset for the watermark.
503
+ */
504
+ type WatermarkPosition = 'center' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
505
+ /**
506
+ * Props for the PdfWatermark component.
507
+ */
508
+ interface PdfWatermarkProps extends Omit<PDFComponentProps, 'children'> {
509
+ /**
510
+ * The text to display as a watermark.
511
+ * Common values: "DRAFT", "CONFIDENTIAL", "PAID", "VOID", "COPY", "SAMPLE"
512
+ */
513
+ text: string;
514
+ /**
515
+ * Opacity of the watermark (0 to 1).
516
+ * @default 0.15
517
+ */
518
+ opacity?: number;
519
+ /**
520
+ * Font size in PDF points.
521
+ * @default 60
522
+ */
523
+ fontSize?: number;
524
+ /**
525
+ * Color of the watermark text.
526
+ * Can be a hex color or theme color key (e.g., "primary", "destructive").
527
+ * @default "mutedForeground"
528
+ */
529
+ color?: string;
530
+ /**
531
+ * Rotation angle in degrees.
532
+ * Use negative values for counter-clockwise rotation.
533
+ * @default -45
534
+ */
535
+ angle?: number;
536
+ /**
537
+ * Position of the watermark on the page.
538
+ * @default "center"
539
+ */
540
+ position?: WatermarkPosition;
541
+ /**
542
+ * Whether the watermark should be fixed (appear on every page).
543
+ * @default true
544
+ */
545
+ fixed?: boolean;
546
+ /**
547
+ * No children allowed.
548
+ */
549
+ children?: never;
550
+ }
551
+
552
+ /**
553
+ * PdfWatermark — Displays a diagonal or positioned text overlay on PDF pages.
554
+ *
555
+ * Common use cases include "DRAFT", "CONFIDENTIAL", "PAID", "VOID", "COPY", etc.
556
+ * The watermark uses absolute positioning and appears behind content.
557
+ * Use the `fixed` prop (default: true) to repeat on every page.
558
+ *
559
+ * @example Basic usage (diagonal "DRAFT" on every page)
560
+ * ```tsx
561
+ * <Page>
562
+ * <PdfWatermark text="DRAFT" />
563
+ * {content}
564
+ * </Page>
565
+ * ```
566
+ *
567
+ * @example Confidential document
568
+ * ```tsx
569
+ * <PdfWatermark text="CONFIDENTIAL" color="destructive" opacity={0.1} />
570
+ * ```
571
+ *
572
+ * @example Paid invoice stamp (no rotation)
573
+ * ```tsx
574
+ * <PdfWatermark text="PAID" angle={0} color="success" fontSize={80} />
575
+ * ```
576
+ *
577
+ * @example Corner watermark
578
+ * ```tsx
579
+ * <PdfWatermark text="COPY" position="top-right" angle={0} fontSize={24} />
580
+ * ```
581
+ */
582
+ declare function PdfWatermark({ text, opacity, fontSize, color, angle, position, fixed, style, }: PdfWatermarkProps): react_jsx_runtime.JSX.Element;
583
+
584
+ /**
585
+ * Alert variant determining color scheme and icon.
586
+ * - info: Blue theme, information icon (for general notices)
587
+ * - success: Green theme, checkmark icon (for confirmations)
588
+ * - warning: Yellow/amber theme, warning icon (for cautions)
589
+ * - error: Red theme, error icon (for critical alerts)
590
+ */
591
+ type AlertVariant = 'info' | 'success' | 'warning' | 'error';
592
+ /**
593
+ * Props for the PdfAlert component.
594
+ */
595
+ interface PdfAlertProps extends Omit<PDFComponentProps, 'children'> {
596
+ /**
597
+ * Alert variant determining color scheme and icon.
598
+ * @default "info"
599
+ */
600
+ variant?: AlertVariant;
601
+ /**
602
+ * Optional title displayed prominently at the top.
603
+ */
604
+ title?: string;
605
+ /**
606
+ * Description text or content.
607
+ * Can be a string or React nodes for more complex content.
608
+ */
609
+ children?: ReactNode;
610
+ /**
611
+ * Whether to show the icon.
612
+ * @default true
613
+ */
614
+ showIcon?: boolean;
615
+ /**
616
+ * Whether to show the left accent border.
617
+ * @default true
618
+ */
619
+ showBorder?: boolean;
620
+ }
621
+
622
+ /**
623
+ * PdfAlert — Displays info, success, warning, or error callout boxes.
624
+ *
625
+ * Use for important notices, confirmations, cautions, or critical alerts
626
+ * in reports, contracts, and documents.
627
+ *
628
+ * @example Basic info alert
629
+ * ```tsx
630
+ * <PdfAlert variant="info" title="Note">
631
+ * This document requires a signature before proceeding.
632
+ * </PdfAlert>
633
+ * ```
634
+ *
635
+ * @example Success confirmation
636
+ * ```tsx
637
+ * <PdfAlert variant="success" title="Payment Confirmed">
638
+ * Your payment of $500.00 has been received.
639
+ * </PdfAlert>
640
+ * ```
641
+ *
642
+ * @example Warning without icon
643
+ * ```tsx
644
+ * <PdfAlert variant="warning" title="Deadline Approaching" showIcon={false}>
645
+ * Please submit your documents by March 15, 2026.
646
+ * </PdfAlert>
647
+ * ```
648
+ *
649
+ * @example Error alert
650
+ * ```tsx
651
+ * <PdfAlert variant="error" title="Action Required">
652
+ * Missing required information. Please review and resubmit.
653
+ * </PdfAlert>
654
+ * ```
655
+ */
656
+ declare function PdfAlert({ variant, title, children, showIcon, showBorder, style, }: PdfAlertProps): react_jsx_runtime.JSX.Element | null;
657
+
658
+ /** List visual style variant. */
659
+ type ListVariant = 'bullet' | 'numbered' | 'checklist' | 'icon' | 'multi-level' | 'descriptive';
660
+ /** A single list item, optionally with nested children. */
661
+ interface ListItem {
662
+ /** Primary text / title of the item. */
663
+ text: string;
664
+ /** Optional description shown below the title (used by descriptive variant). */
665
+ description?: string;
666
+ /** Optional checked state (used by checklist variant). */
667
+ checked?: boolean;
668
+ /** Optional nested children (used by multi-level variant). */
669
+ children?: ListItem[];
670
+ }
671
+ interface PdfListProps {
672
+ /** Array of list items. */
673
+ items: ListItem[];
674
+ /** Visual style of the list. @default 'bullet' */
675
+ variant?: ListVariant;
676
+ /** Spacing between list items. @default 'sm' */
677
+ gap?: 'xs' | 'sm' | 'md';
678
+ /** Custom style override applied to the outer container. */
679
+ style?: Style;
680
+ /** Indent level for nested rendering (internal use). */
681
+ _level?: number;
682
+ /**
683
+ * Prevent the List from being split across PDF pages.
684
+ * Useful for short lists that should always stay together on a single page.
685
+ * @default false
686
+ */
687
+ noWrap?: boolean;
688
+ }
689
+
690
+ declare function PdfList({ items, variant, gap, style, noWrap, _level, }: PdfListProps): react_jsx_runtime.JSX.Element;
691
+
692
+ /** Card visual variant. */
693
+ type CardVariant = 'default' | 'bordered' | 'muted';
694
+ interface PdfCardProps {
695
+ /** Optional title displayed at the top of the card with a separator line. */
696
+ title?: string;
697
+ /** Card body content. */
698
+ children?: ReactNode;
699
+ /** Visual style of the card. @default 'default' */
700
+ variant?: CardVariant;
701
+ /** Internal padding size. @default 'md' */
702
+ padding?: 'sm' | 'md' | 'lg';
703
+ /**
704
+ * Allow the card to split across page boundaries.
705
+ * @default false — cards are kept on one page by default.
706
+ * Set wrap={true} only for tall cards whose content must span pages.
707
+ */
708
+ wrap?: boolean;
709
+ /** Custom style override. */
710
+ style?: Style;
711
+ }
712
+
713
+ declare function PdfCard({ title, children, variant, padding, wrap, style, }: PdfCardProps): react_jsx_runtime.JSX.Element;
714
+
715
+ /**
716
+ * Error correction level for the QR code.
717
+ * Higher levels allow more damage but require more space.
718
+ * - L: ~7% recovery
719
+ * - M: ~15% recovery
720
+ * - Q: ~25% recovery
721
+ * - H: ~30% recovery
722
+ */
723
+ type QRCodeErrorLevel = 'L' | 'M' | 'Q' | 'H';
724
+ /**
725
+ * Props for the PdfQRCode component.
726
+ */
727
+ interface PdfQRCodeProps extends Omit<PDFComponentProps, 'children'> {
728
+ /**
729
+ * The data to encode in the QR code.
730
+ * Can be a URL, text, or any string data.
731
+ */
732
+ value: string;
733
+ /**
734
+ * Size of the QR code in PDF points.
735
+ * The QR code is always square.
736
+ * @default 100
737
+ */
738
+ size?: number;
739
+ /**
740
+ * Color of the QR code modules (dark squares).
741
+ * Can be a hex color or theme color key.
742
+ * @default "foreground"
743
+ */
744
+ color?: string;
745
+ /**
746
+ * Background color of the QR code.
747
+ * Can be a hex color, theme color key, or "transparent".
748
+ * @default "background"
749
+ */
750
+ backgroundColor?: string;
751
+ /**
752
+ * Error correction level.
753
+ * Higher levels are more resilient but create denser codes.
754
+ * @default "M"
755
+ */
756
+ errorLevel?: QRCodeErrorLevel;
757
+ /**
758
+ * Margin around the QR code in modules (not points).
759
+ * @default 2
760
+ */
761
+ margin?: number;
762
+ /**
763
+ * Optional caption text below the QR code.
764
+ */
765
+ caption?: string;
766
+ /**
767
+ * No children allowed.
768
+ */
769
+ children?: never;
770
+ }
771
+
772
+ /**
773
+ * PdfQRCode — Renders a QR code using native SVG primitives.
774
+ *
775
+ * Uses the `qrcode` library for generation and react-pdf's SVG
776
+ * support for rendering. The result is a crisp, vector QR code
777
+ * that scales perfectly at any size.
778
+ *
779
+ * @example Basic usage
780
+ * ```tsx
781
+ * <PdfQRCode value="https://example.com" />
782
+ * ```
783
+ *
784
+ * @example Invoice with payment link
785
+ * ```tsx
786
+ * <PdfQRCode
787
+ * value="https://pay.example.com/invoice/123"
788
+ * size={80}
789
+ * caption="Scan to pay"
790
+ * />
791
+ * ```
792
+ *
793
+ * @example Styled QR code
794
+ * ```tsx
795
+ * <PdfQRCode
796
+ * value="https://example.com"
797
+ * size={120}
798
+ * color="primary"
799
+ * backgroundColor="muted"
800
+ * errorLevel="H"
801
+ * />
802
+ * ```
803
+ */
804
+ declare function PdfQRCode({ value, size, color, backgroundColor, errorLevel, margin, caption, style, }: PdfQRCodeProps): react_jsx_runtime.JSX.Element;
805
+
806
+ /**
807
+ * HTTP methods supported by react-pdf for authenticated image requests.
808
+ */
809
+ type PdfImageHTTPMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
810
+ /**
811
+ * Image source accepted by react-pdf's Image component.
812
+ * - string: URL, absolute file path, or base64 data URI (`data:image/png;base64,...`)
813
+ * - object: authenticated URL with custom headers
814
+ */
815
+ type PdfImageSrc = string | {
816
+ uri: string;
817
+ method?: PdfImageHTTPMethod;
818
+ headers?: Record<string, string>;
819
+ body?: string;
820
+ };
821
+ /**
822
+ * Controls how the image fills its container (mirrors CSS object-fit).
823
+ * - cover: fill, crop excess
824
+ * - contain: fit inside, preserve aspect ratio, may letterbox
825
+ * - fill: stretch to exactly fill (distorts aspect ratio)
826
+ * - none: render at intrinsic size
827
+ */
828
+ type PdfImageFit = 'cover' | 'contain' | 'fill' | 'none';
829
+ /**
830
+ * Visual layout variant.
831
+ *
832
+ * | Variant | Width | Height | fit | Notes |
833
+ * |-------------|------------|---------------|---------|--------------------------|
834
+ * | default | prop/auto | prop/auto | contain | Standard inline image |
835
+ * | full-width | 100% | prop required | cover | Banner / hero image |
836
+ * | thumbnail | 80pt | 80pt | cover | Small square preview |
837
+ * | avatar | 48pt | 48pt | cover | Circle-clipped portrait |
838
+ * | cover | 100% | 160pt | cover | Wide cover image |
839
+ * | bordered | 100%/prop | prop | contain | Framed with border |
840
+ * | rounded | prop/200pt | prop | contain | Rounded corners |
841
+ */
842
+ type PdfImageVariant = 'default' | 'full-width' | 'thumbnail' | 'avatar' | 'cover' | 'bordered' | 'rounded';
843
+ interface PdfImageProps {
844
+ /** Image source: URL, base64 data URI, file path, or authenticated object. */
845
+ src: PdfImageSrc;
846
+ /** Display variant controlling size and appearance. @default 'default' */
847
+ variant?: PdfImageVariant;
848
+ /** Width in PDF points. Required unless variant provides a default. */
849
+ width?: number | string;
850
+ /** Height in PDF points. Required unless variant provides a default. */
851
+ height?: number | string;
852
+ /** How the image fills its container. @default variant-dependent */
853
+ fit?: PdfImageFit;
854
+ /** Focal point for objectFit crop, e.g. '50% 50%' or 'top left'. @default '50% 50%' */
855
+ position?: string;
856
+ /** Optional caption text rendered below the image in muted style. */
857
+ caption?: string;
858
+ /**
859
+ * Aspect ratio helper: if width is provided but height is not,
860
+ * height = width / aspectRatio. E.g. 16/9 for widescreen images.
861
+ */
862
+ aspectRatio?: number;
863
+ /**
864
+ * Border radius override in PDF points.
865
+ * Defaults: avatar = 999 (circle), rounded = 8, others = 0.
866
+ */
867
+ borderRadius?: number;
868
+ /**
869
+ * Prevent the image (+ optional caption) from being split across page boundaries.
870
+ * @default true — images should never be clipped at the page edge.
871
+ */
872
+ noWrap?: boolean;
873
+ /** Custom style override applied to the image element. */
874
+ style?: Style;
875
+ }
876
+ /**
877
+ * PdfImage — a validated, theme-aware wrapper around react-pdf's `<Image>`.
878
+ *
879
+ * @example Basic usage
880
+ * ```tsx
881
+ * <PdfImage src="https://example.com/photo.jpg" width={200} height={150} />
882
+ * ```
883
+ *
884
+ * @example Base64 (recommended for reliability)
885
+ * ```tsx
886
+ * <PdfImage src="data:image/png;base64,iVBORw0KGgo..." variant="avatar" />
887
+ * ```
888
+ *
889
+ * @example Full-width banner with caption
890
+ * ```tsx
891
+ * <PdfImage src={bannerUrl} variant="cover" height={120} caption="Q1 2025 Team Photo" />
892
+ * ```
893
+ *
894
+ * @example Aspect ratio helper
895
+ * ```tsx
896
+ * <PdfImage src={chartPng} width={400} aspectRatio={16 / 9} />
897
+ * ```
898
+ *
899
+ * Supported formats: JPEG, PNG, GIF (first frame only), BMP, SVG.
900
+ * Unsupported: WebP, AVIF, HEIC — a console warning is emitted if detected.
901
+ */
902
+ declare function PdfImage({ src, variant, width, height, fit, position, caption, aspectRatio, borderRadius, noWrap, style, }: PdfImageProps): react_jsx_runtime.JSX.Element;
903
+
904
+ /**
905
+ * A4 page width in points (595pt).
906
+ * Used for calculating safe graph widths.
907
+ */
908
+ declare const A4_WIDTH = 595;
909
+ /**
910
+ * Options for calculating graph width.
911
+ */
912
+ interface GraphWidthOptions {
913
+ /** Additional container padding (e.g., Section padding). Default: 0 */
914
+ containerPadding?: number;
915
+ /** Additional wrapper padding (e.g., graphShell). Default: 0 */
916
+ wrapperPadding?: number;
917
+ /** Page size width override. Default: 595 (A4) */
918
+ pageWidth?: number;
919
+ }
920
+ /**
921
+ * Calculate the safe graph width based on theme page margins and container context.
922
+ *
923
+ * This utility ensures graphs don't overflow their container by accounting for:
924
+ * - Page margins (from theme)
925
+ * - Container padding (e.g., Section component)
926
+ * - Wrapper padding (e.g., a bordered graphShell View)
927
+ *
928
+ * @example
929
+ * ```tsx
930
+ * const width = getGraphWidth(theme);
931
+ * // For a graph inside a Section with padding="md" (12pt) and a graphShell (12pt):
932
+ * const width = getGraphWidth(theme, { containerPadding: 12, wrapperPadding: 12 });
933
+ * ```
934
+ */
935
+ declare function getGraphWidth(theme: PdfxTheme, options?: GraphWidthOptions): number;
936
+ /**
937
+ * Pre-calculated safe graph widths for common scenarios.
938
+ * These values work with all built-in themes on A4 pages.
939
+ */
940
+ declare const GRAPH_SAFE_WIDTHS: {
941
+ /** Safe width for graph directly in page content (no extra containers) */
942
+ readonly default: 420;
943
+ /** Safe width for graph inside a Section with md padding */
944
+ readonly inSection: 400;
945
+ /** Safe width for graph inside a Section + bordered wrapper (like graphShell) */
946
+ readonly inSectionWithWrapper: 380;
947
+ };
948
+ type GraphVariant = 'bar' | 'horizontal-bar' | 'line' | 'area' | 'pie' | 'donut';
949
+ type GraphLegendPosition = 'bottom' | 'right' | 'none';
950
+ interface GraphDataPoint {
951
+ /** Label displayed on axis or legend. */
952
+ label: string;
953
+ /** Numeric value. */
954
+ value: number;
955
+ /** Optional per-data-point color override (hex). */
956
+ color?: string;
957
+ }
958
+ interface GraphSeries {
959
+ /** Series name shown in the legend. */
960
+ name: string;
961
+ /** Data points for this series. */
962
+ data: GraphDataPoint[];
963
+ /** Optional series-level color override (hex). */
964
+ color?: string;
965
+ }
966
+ interface GraphProps {
967
+ /** Chart type. @default 'bar' */
968
+ variant?: GraphVariant;
969
+ /**
970
+ * Single-series data or multi-series data.
971
+ * - GraphDataPoint[]: single series, used as-is.
972
+ * - GraphSeries[]: multi-series (bar, line, area only).
973
+ */
974
+ data: GraphDataPoint[] | GraphSeries[];
975
+ /** Chart title rendered above the chart area. */
976
+ title?: string;
977
+ /** Optional subtitle / description below title. */
978
+ subtitle?: string;
979
+ /** X-axis label. */
980
+ xLabel?: string;
981
+ /** Y-axis label. */
982
+ yLabel?: string;
983
+ /**
984
+ * Total SVG width in PDF points.
985
+ * Ignored when `fullWidth` is true.
986
+ * @default 420
987
+ */
988
+ width?: number;
989
+ /** Total SVG height in PDF points. @default 260 */
990
+ height?: number;
991
+ /**
992
+ * When true, automatically calculates width based on theme page margins.
993
+ * Accounts for page margins and optional container/wrapper padding.
994
+ * @default false
995
+ */
996
+ fullWidth?: boolean;
997
+ /**
998
+ * Container padding to account for when using fullWidth.
999
+ * Use this when graph is inside a Section or Card with padding.
1000
+ * @default 0
1001
+ */
1002
+ containerPadding?: number;
1003
+ /**
1004
+ * Wrapper padding to account for when using fullWidth.
1005
+ * Use this when graph is wrapped in a bordered View (like graphShell).
1006
+ * @default 0
1007
+ */
1008
+ wrapperPadding?: number;
1009
+ /** Override the color palette (hex values). */
1010
+ colors?: string[];
1011
+ /** Show numeric value labels on bars or data points. @default false */
1012
+ showValues?: boolean;
1013
+ /** Show horizontal grid lines. @default true */
1014
+ showGrid?: boolean;
1015
+ /** Legend position. @default 'bottom' */
1016
+ legend?: GraphLegendPosition;
1017
+ /** For donut variant: text displayed in the center hole. */
1018
+ centerLabel?: string;
1019
+ /** For line/area: show dots at each data point. @default true */
1020
+ showDots?: boolean;
1021
+ /** For line/area: render smooth bezier curves (false = straight segments). @default false */
1022
+ smooth?: boolean;
1023
+ /** Number of Y-axis ticks. @default 5 */
1024
+ yTicks?: number;
1025
+ /**
1026
+ * Prevent the chart from splitting across page boundaries.
1027
+ * @default true
1028
+ */
1029
+ noWrap?: boolean;
1030
+ /** Custom style override applied to the outer container View. */
1031
+ style?: Style;
1032
+ }
1033
+ /**
1034
+ * PdfGraph — renders bar, horizontal-bar, line, area, pie, and donut charts
1035
+ * natively inside react-pdf documents using SVG primitives.
1036
+ *
1037
+ * No external chart libraries are required or used — all rendering is done via
1038
+ * react-pdf's built-in SVG support (`<Svg>`, `<Rect>`, `<Path>`, `<Line>`, etc.).
1039
+ *
1040
+ * @example Bar chart
1041
+ * ```tsx
1042
+ * <PdfGraph
1043
+ * variant="bar"
1044
+ * title="Monthly Revenue"
1045
+ * data={[
1046
+ * { label: 'Jan', value: 42000 },
1047
+ * { label: 'Feb', value: 38000 },
1048
+ * { label: 'Mar', value: 55000 },
1049
+ * ]}
1050
+ * />
1051
+ * ```
1052
+ *
1053
+ * @example Donut chart with center label
1054
+ * ```tsx
1055
+ * <PdfGraph
1056
+ * variant="donut"
1057
+ * data={[
1058
+ * { label: 'Product A', value: 45 },
1059
+ * { label: 'Product B', value: 30 },
1060
+ * { label: 'Other', value: 25 },
1061
+ * ]}
1062
+ * centerLabel="$1.2M"
1063
+ * />
1064
+ * ```
1065
+ *
1066
+ * **Limitations (by design):**
1067
+ * - No interactivity (PDFs are static)
1068
+ * - No animations
1069
+ * - SVG Text inside charts uses SVG font attributes (not react-pdf StyleSheet fonts)
1070
+ * - For print PDFs use SVG-friendly fonts registered with Font.register()
1071
+ */
1072
+ declare function PdfGraph({ variant, data, title, subtitle, xLabel, yLabel, width: explicitWidth, height, fullWidth, containerPadding, wrapperPadding, colors, showValues, showGrid, legend, centerLabel, showDots, smooth, yTicks: yTickCount, noWrap, style, }: GraphProps): react_jsx_runtime.JSX.Element;
1073
+
1074
+ /** Visual style variant for the fillable form. */
1075
+ type PdfFormVariant = 'underline' | 'box' | 'outlined' | 'ghost';
1076
+ /** Column layout for a form section. */
1077
+ type FormLayout = 'single' | 'two-column' | 'three-column';
1078
+ /** Label position relative to the field. */
1079
+ type FormLabelPosition = 'above' | 'left';
1080
+ /** A single fillable field definition. */
1081
+ interface PdfFormField {
1082
+ /** Field label shown above or beside the blank area. */
1083
+ label: string;
1084
+ /**
1085
+ * Hint text shown inside the blank area (lighter, smaller).
1086
+ * Use this for format hints like "DD/MM/YYYY" or "e.g. John Smith".
1087
+ * If omitted, the field area is completely blank.
1088
+ */
1089
+ hint?: string;
1090
+ /**
1091
+ * Height of the blank field area in points.
1092
+ * @default 18 (single-line) — use larger values for multi-line fields
1093
+ */
1094
+ height?: number;
1095
+ /** Optional flex or fixed width. Useful in multi-column grids. */
1096
+ width?: number | string;
1097
+ }
1098
+ /** A logical group of fields with an optional section title. */
1099
+ interface PdfFormGroup {
1100
+ /** Optional group heading rendered above the fields. */
1101
+ title?: string;
1102
+ /** Fields in this group. */
1103
+ fields: PdfFormField[];
1104
+ /** Column layout for this group's fields. @default 'single' */
1105
+ layout?: FormLayout;
1106
+ }
1107
+ /** Props for the PdfForm component. */
1108
+ interface PdfFormProps {
1109
+ /** Form-level title (e.g. "Application Form", "Service Request"). */
1110
+ title?: string;
1111
+ /** Optional subtitle shown below the title. */
1112
+ subtitle?: string;
1113
+ /** Ordered list of field groups. */
1114
+ groups: PdfFormGroup[];
1115
+ /**
1116
+ * Visual style of the blank field areas.
1117
+ * - `underline` — classic bottom-border only (default, most print-friendly)
1118
+ * - `box` — full rectangle outline (clearer for dense forms)
1119
+ * - `outlined` — rounded rectangle outline
1120
+ * - `ghost` — very light filled rectangle, no border
1121
+ */
1122
+ variant?: PdfFormVariant;
1123
+ /** Label position: above the field or to its left. @default 'above' */
1124
+ labelPosition?: FormLabelPosition;
1125
+ /** Prevent the form from splitting across pages. @default false */
1126
+ noWrap?: boolean;
1127
+ /** Custom @react-pdf/renderer styles applied to the root container. */
1128
+ style?: Style;
1129
+ }
1130
+
1131
+ declare function PdfForm({ title, subtitle, groups, variant, labelPosition, noWrap, style, }: PdfFormProps): react_jsx_runtime.JSX.Element;
1132
+
1133
+ /** Signature block layout variant. */
1134
+ type SignatureVariant = 'single' | 'double' | 'inline';
1135
+ /** Data for a single signer inside a signature block. */
1136
+ interface SignatureSigner {
1137
+ label?: string;
1138
+ name?: string;
1139
+ title?: string;
1140
+ date?: string;
1141
+ }
1142
+ interface PdfSignatureBlockProps {
1143
+ variant?: SignatureVariant;
1144
+ label?: string;
1145
+ name?: string;
1146
+ title?: string;
1147
+ date?: string;
1148
+ signers?: [SignatureSigner, SignatureSigner];
1149
+ style?: Style;
1150
+ }
1151
+
1152
+ declare function PdfSignatureBlock({ variant, label, name, title, date, signers, style, }: PdfSignatureBlockProps): react_jsx_runtime.JSX.Element;
1153
+
1154
+ interface KeepTogetherProps {
1155
+ /**
1156
+ * Content to keep on the same page.
1157
+ * The outer View is rendered with wrap={false} so the engine treats this subtree as atomic.
1158
+ * If the content is taller than one full page it will overflow (not split), so only use
1159
+ * this for content that is guaranteed to fit on a single page.
1160
+ */
1161
+ children?: ReactNode;
1162
+ /**
1163
+ * If provided, moves the entire block to the next page when fewer than
1164
+ * this many PDF points remain on the current page.
1165
+ * Useful as a softer alternative to wrap={false} for headings/labels with following content.
1166
+ */
1167
+ minPresenceAhead?: number;
1168
+ /** Custom style override applied to the wrapping View. */
1169
+ style?: Style;
1170
+ }
1171
+ /**
1172
+ * KeepTogether — prevents its children from being split across page boundaries.
1173
+ *
1174
+ * Wraps children in a `<View wrap={false}>` which tells react-pdf's layout engine
1175
+ * to treat the entire subtree as atomic: either the whole block fits on the current
1176
+ * page, or the whole block moves to the next page.
1177
+ *
1178
+ * @example
1179
+ * // Prevent a heading + table from being separated
1180
+ * <KeepTogether>
1181
+ * <Heading level={2}>Quarterly Financials</Heading>
1182
+ * <Table>...</Table>
1183
+ * </KeepTogether>
1184
+ *
1185
+ * @example
1186
+ * // Softer version: move to next page only if < 100pt remain
1187
+ * <KeepTogether minPresenceAhead={100}>
1188
+ * <Heading level={3}>Summary</Heading>
1189
+ * <Text>Short paragraph that should stay with its heading.</Text>
1190
+ * </KeepTogether>
1191
+ */
1192
+ declare function KeepTogether({ children, minPresenceAhead, style }: KeepTogetherProps): react_jsx_runtime.JSX.Element;
1193
+
1194
+ /**
1195
+ * Invoice template variants.
1196
+ * - classic: Traditional professional look with logo-left header and grid table
1197
+ * - modern: Full-width banner header with horizontal invoice strip
1198
+ * - minimal: Clean minimalist design with inline invoice stamp
1199
+ */
1200
+ type InvoiceVariant = 'classic' | 'modern' | 'minimal';
1201
+ /**
1202
+ * Company/sender information.
1203
+ */
1204
+ interface InvoiceCompany {
1205
+ /** Company or business name */
1206
+ name: string;
1207
+ /** Optional tagline or subtitle */
1208
+ subtitle?: string;
1209
+ /** Full address (can include city, state, country) */
1210
+ address: string;
1211
+ /** Contact email */
1212
+ email?: string;
1213
+ /** Contact phone */
1214
+ phone?: string;
1215
+ /** Tax ID, VAT, or GST number */
1216
+ taxId?: string;
1217
+ /** Logo image source (URL or base64) */
1218
+ logo?: string;
1219
+ }
1220
+ /**
1221
+ * Client/recipient information.
1222
+ */
1223
+ interface InvoiceClient {
1224
+ /** Client name or company */
1225
+ name: string;
1226
+ /** Full address */
1227
+ address: string;
1228
+ /** Contact email */
1229
+ email?: string;
1230
+ /** Contact phone */
1231
+ phone?: string;
1232
+ }
1233
+ /**
1234
+ * Single line item on the invoice.
1235
+ */
1236
+ interface InvoiceLineItem {
1237
+ /** Description of the product or service */
1238
+ description: string;
1239
+ /** Quantity */
1240
+ quantity: number;
1241
+ /** Unit price */
1242
+ unitPrice: number;
1243
+ /** Optional unit label (e.g., "hours", "units") */
1244
+ unit?: string;
1245
+ }
1246
+ /**
1247
+ * Invoice summary/totals section.
1248
+ */
1249
+ interface InvoiceSummary {
1250
+ /** Subtotal before tax */
1251
+ subtotal: number;
1252
+ /** Tax amount */
1253
+ tax?: number;
1254
+ /** Tax rate as percentage (e.g., 7.5 for 7.5%) */
1255
+ taxRate?: number;
1256
+ /** Optional discount amount */
1257
+ discount?: number;
1258
+ /** Optional shipping/handling */
1259
+ shipping?: number;
1260
+ /** Final total */
1261
+ total: number;
1262
+ }
1263
+ /**
1264
+ * Payment information.
1265
+ */
1266
+ interface InvoicePayment {
1267
+ /** Payment methods accepted */
1268
+ methods?: string;
1269
+ /** Bank details or payment instructions */
1270
+ bankDetails?: string;
1271
+ /** Terms (e.g., "Net 30", "Due on receipt") */
1272
+ terms?: string;
1273
+ }
1274
+ /**
1275
+ * Currency configuration.
1276
+ */
1277
+ interface InvoiceCurrency {
1278
+ /** Currency code (e.g., "USD", "EUR", "INR") */
1279
+ code?: string;
1280
+ /** Currency symbol (e.g., "$", "€", "₹") */
1281
+ symbol?: string;
1282
+ /** Decimal places (default: 2) */
1283
+ decimals?: number;
1284
+ /** Symbol position: 'before' or 'after' */
1285
+ position?: 'before' | 'after';
1286
+ }
1287
+ /**
1288
+ * Props for the InvoiceTemplate component.
1289
+ */
1290
+ interface InvoiceTemplateProps {
1291
+ /**
1292
+ * Visual variant of the invoice.
1293
+ * @default "classic"
1294
+ */
1295
+ variant?: InvoiceVariant;
1296
+ /**
1297
+ * Invoice number/identifier.
1298
+ */
1299
+ invoiceNumber: string;
1300
+ /**
1301
+ * Invoice issue date.
1302
+ */
1303
+ invoiceDate: string;
1304
+ /**
1305
+ * Payment due date.
1306
+ */
1307
+ dueDate: string;
1308
+ /**
1309
+ * Sender/company information.
1310
+ */
1311
+ company: InvoiceCompany;
1312
+ /**
1313
+ * Recipient/client information.
1314
+ */
1315
+ client: InvoiceClient;
1316
+ /**
1317
+ * Line items (products/services).
1318
+ */
1319
+ items: InvoiceLineItem[];
1320
+ /**
1321
+ * Invoice totals summary.
1322
+ * If not provided, will be calculated from items.
1323
+ */
1324
+ summary?: InvoiceSummary;
1325
+ /**
1326
+ * Tax rate as percentage (used if summary not provided).
1327
+ * @default 0
1328
+ */
1329
+ taxRate?: number;
1330
+ /**
1331
+ * Payment information.
1332
+ */
1333
+ payment?: InvoicePayment;
1334
+ /**
1335
+ * Currency configuration.
1336
+ * @default { symbol: '$', position: 'before', decimals: 2 }
1337
+ */
1338
+ currency?: InvoiceCurrency;
1339
+ /**
1340
+ * Additional notes or terms (displayed at bottom).
1341
+ */
1342
+ notes?: string;
1343
+ /**
1344
+ * Custom styles for the page.
1345
+ */
1346
+ style?: Style;
1347
+ /**
1348
+ * Document title for PDF metadata.
1349
+ */
1350
+ title?: string;
1351
+ }
1352
+
1353
+ /**
1354
+ * InvoiceTemplate — A data-driven invoice PDF generator.
1355
+ *
1356
+ * Supports three visual variants: classic, modern, and minimal.
1357
+ * Pass structured data (company, client, items) and get a professional invoice.
1358
+ *
1359
+ * @example Basic usage
1360
+ * ```tsx
1361
+ * <InvoiceTemplate
1362
+ * invoiceNumber="INV-001"
1363
+ * invoiceDate="March 1, 2026"
1364
+ * dueDate="March 31, 2026"
1365
+ * company={{ name: "Acme Inc", address: "123 Main St" }}
1366
+ * client={{ name: "Client Co", address: "456 Oak Ave" }}
1367
+ * items={[{ description: "Consulting", quantity: 10, unitPrice: 150 }]}
1368
+ * />
1369
+ * ```
1370
+ *
1371
+ * @example Modern variant with tax
1372
+ * ```tsx
1373
+ * <InvoiceTemplate
1374
+ * variant="modern"
1375
+ * invoiceNumber="INV-002"
1376
+ * invoiceDate="March 1, 2026"
1377
+ * dueDate="March 31, 2026"
1378
+ * company={{ name: "TechCorp", address: "789 Tech Blvd", logo: "/logo.png" }}
1379
+ * client={{ name: "StartupXYZ", address: "321 Innovation Dr" }}
1380
+ * items={[{ description: "Development", quantity: 1, unitPrice: 5000 }]}
1381
+ * taxRate={8.5}
1382
+ * />
1383
+ * ```
1384
+ */
1385
+ declare function InvoiceTemplate(props: InvoiceTemplateProps): react_jsx_runtime.JSX.Element;
1386
+
1387
+ /**
1388
+ * Resume template variants.
1389
+ * - professional: Traditional single-column professional layout
1390
+ * - modern: Two-column design with sidebar for skills/contact
1391
+ * - minimal: Clean minimalist single-column design
1392
+ */
1393
+ type ResumeVariant = 'professional' | 'modern' | 'minimal';
1394
+ /**
1395
+ * Personal/contact information.
1396
+ */
1397
+ interface ResumePersonal {
1398
+ /** Full name */
1399
+ name: string;
1400
+ /** Professional title or headline */
1401
+ title?: string;
1402
+ /** Email address */
1403
+ email?: string;
1404
+ /** Phone number */
1405
+ phone?: string;
1406
+ /** Location (city, country) */
1407
+ location?: string;
1408
+ /** LinkedIn URL or handle */
1409
+ linkedin?: string;
1410
+ /** GitHub URL or handle */
1411
+ github?: string;
1412
+ /** Personal website URL */
1413
+ website?: string;
1414
+ /** Profile photo URL (optional) */
1415
+ photo?: string;
1416
+ }
1417
+ /**
1418
+ * Professional summary/objective section.
1419
+ */
1420
+ interface ResumeSummary {
1421
+ /** Section title (defaults to "Summary" or "Professional Summary") */
1422
+ title?: string;
1423
+ /** Summary content - 2-4 sentences */
1424
+ content: string;
1425
+ }
1426
+ /**
1427
+ * Single work experience entry.
1428
+ */
1429
+ interface ResumeExperience {
1430
+ /** Company or organization name */
1431
+ company: string;
1432
+ /** Job title/role */
1433
+ role: string;
1434
+ /** Start date (e.g., "Jan 2022" or "2022") */
1435
+ startDate: string;
1436
+ /** End date (e.g., "Dec 2024" or "Present") */
1437
+ endDate?: string;
1438
+ /** Location (optional) */
1439
+ location?: string;
1440
+ /** List of achievements/responsibilities */
1441
+ highlights?: string[];
1442
+ /** Brief description (alternative to highlights) */
1443
+ description?: string;
1444
+ }
1445
+ /**
1446
+ * Single education entry.
1447
+ */
1448
+ interface ResumeEducation {
1449
+ /** Institution name */
1450
+ institution: string;
1451
+ /** Degree or certification */
1452
+ degree: string;
1453
+ /** Field of study */
1454
+ field?: string;
1455
+ /** Start date */
1456
+ startDate?: string;
1457
+ /** End date or expected graduation */
1458
+ endDate?: string;
1459
+ /** GPA or honors (optional) */
1460
+ gpa?: string;
1461
+ /** Additional details */
1462
+ highlights?: string[];
1463
+ }
1464
+ /**
1465
+ * Skill category with items.
1466
+ */
1467
+ interface ResumeSkillCategory {
1468
+ /** Category name (e.g., "Languages", "Frameworks", "Tools") */
1469
+ category: string;
1470
+ /** Skills in this category */
1471
+ skills: string[];
1472
+ }
1473
+ /**
1474
+ * Single project entry.
1475
+ */
1476
+ interface ResumeProject {
1477
+ /** Project name */
1478
+ name: string;
1479
+ /** Brief description */
1480
+ description?: string;
1481
+ /** Technologies used */
1482
+ technologies?: string[];
1483
+ /** Project URL (optional) */
1484
+ url?: string;
1485
+ /** Key achievements */
1486
+ highlights?: string[];
1487
+ }
1488
+ /**
1489
+ * Single certification entry.
1490
+ */
1491
+ interface ResumeCertification {
1492
+ /** Certification name */
1493
+ name: string;
1494
+ /** Issuing organization */
1495
+ issuer: string;
1496
+ /** Date obtained */
1497
+ date?: string;
1498
+ /** Credential ID or URL */
1499
+ credentialId?: string;
1500
+ }
1501
+ /**
1502
+ * Language proficiency entry.
1503
+ */
1504
+ interface ResumeLanguage {
1505
+ /** Language name */
1506
+ language: string;
1507
+ /** Proficiency level */
1508
+ proficiency: 'Native' | 'Fluent' | 'Advanced' | 'Intermediate' | 'Basic' | string;
1509
+ }
1510
+ /**
1511
+ * Props for the ResumeTemplate component.
1512
+ */
1513
+ interface ResumeTemplateProps {
1514
+ /**
1515
+ * Visual variant of the resume.
1516
+ * @default "professional"
1517
+ */
1518
+ variant?: ResumeVariant;
1519
+ /**
1520
+ * Personal/contact information (required).
1521
+ */
1522
+ personal: ResumePersonal;
1523
+ /**
1524
+ * Professional summary or objective.
1525
+ */
1526
+ summary?: ResumeSummary;
1527
+ /**
1528
+ * Work experience entries (most recent first).
1529
+ */
1530
+ experience?: ResumeExperience[];
1531
+ /**
1532
+ * Education entries.
1533
+ */
1534
+ education?: ResumeEducation[];
1535
+ /**
1536
+ * Skills organized by category.
1537
+ */
1538
+ skills?: ResumeSkillCategory[];
1539
+ /**
1540
+ * Projects or portfolio items.
1541
+ */
1542
+ projects?: ResumeProject[];
1543
+ /**
1544
+ * Certifications.
1545
+ */
1546
+ certifications?: ResumeCertification[];
1547
+ /**
1548
+ * Languages spoken.
1549
+ */
1550
+ languages?: ResumeLanguage[];
1551
+ /**
1552
+ * Accent color for modern variant.
1553
+ * Uses theme primary color by default.
1554
+ */
1555
+ accentColor?: string;
1556
+ /**
1557
+ * Custom styles for the page.
1558
+ */
1559
+ style?: Style;
1560
+ /**
1561
+ * Document title for PDF metadata.
1562
+ */
1563
+ title?: string;
1564
+ }
1565
+
1566
+ /**
1567
+ * ResumeTemplate — A data-driven resume/CV PDF generator.
1568
+ *
1569
+ * Supports three visual variants: professional, modern, and minimal.
1570
+ * Pass structured data (personal info, experience, education, skills)
1571
+ * and get a professional resume PDF.
1572
+ *
1573
+ * @example Basic usage
1574
+ * ```tsx
1575
+ * <ResumeTemplate
1576
+ * personal={{
1577
+ * name: 'John Doe',
1578
+ * title: 'Senior Software Engineer',
1579
+ * email: 'john@example.com',
1580
+ * phone: '+1 555-1234',
1581
+ * location: 'San Francisco, CA',
1582
+ * }}
1583
+ * experience={[
1584
+ * {
1585
+ * company: 'TechCorp',
1586
+ * role: 'Senior Engineer',
1587
+ * startDate: 'Jan 2020',
1588
+ * endDate: 'Present',
1589
+ * highlights: ['Led team of 5', 'Shipped key features'],
1590
+ * },
1591
+ * ]}
1592
+ * education={[
1593
+ * {
1594
+ * institution: 'MIT',
1595
+ * degree: 'B.S.',
1596
+ * field: 'Computer Science',
1597
+ * endDate: '2019',
1598
+ * },
1599
+ * ]}
1600
+ * skills={[
1601
+ * { category: 'Languages', skills: ['TypeScript', 'Python', 'Go'] },
1602
+ * ]}
1603
+ * />
1604
+ * ```
1605
+ */
1606
+ declare function ResumeTemplate(props: ResumeTemplateProps): react_jsx_runtime.JSX.Element;
1607
+
1608
+ export { A4_WIDTH, type AlertVariant, Badge, type BadgeProps, type BadgeSize, type BadgeVariant, type CardVariant, DataTable, type DataTableColumn, type DataTableProps, type DataTableSize, Divider, type DividerProps, type DividerSpacing, type DividerThickness, type DividerVariant, type FormLabelPosition, type FormLayout, GRAPH_SAFE_WIDTHS, type GraphDataPoint, type GraphLegendPosition, type GraphProps, type GraphSeries, type GraphVariant, type GraphWidthOptions, Heading, type HeadingProps, type HeadingTracking, type HeadingWeight, type InvoiceClient, type InvoiceCompany, type InvoiceCurrency, type InvoiceLineItem, type InvoicePayment, type InvoiceSummary, InvoiceTemplate, type InvoiceTemplateProps, type InvoiceVariant, KeepTogether, type KeepTogetherProps, KeyValue, type KeyValueDirection, type KeyValueEntry, type KeyValueProps, type KeyValueSize, Link, type LinkProps, type LinkUnderline, type LinkVariant, type ListItem, type ListVariant, type PDFComponentProps, PageBreak, type PageBreakProps, PageFooter, type PageFooterProps, type PageFooterVariant, PageHeader, type PageHeaderProps, type PageHeaderVariant, type PageNumberAlign, type PageNumberSize, PdfAlert, type PdfAlertProps, PdfCard, type PdfCardProps, PdfForm, type PdfFormField, type PdfFormGroup, type PdfFormProps, type PdfFormVariant, PdfGraph, PdfImage, type PdfImageFit, type PdfImageProps, type PdfImageSrc, type PdfImageVariant, PdfList, type PdfListProps, PdfPageNumber, type PdfPageNumberProps, PdfQRCode, type PdfQRCodeProps, PdfSignatureBlock, type PdfSignatureBlockProps, PdfWatermark, type PdfWatermarkProps, PdfxError, PdfxTheme, PdfxThemeContext, PdfxThemeProvider, type QRCodeErrorLevel, type ResumeCertification, type ResumeEducation, type ResumeExperience, type ResumeLanguage, type ResumePersonal, type ResumeProject, type ResumeSkillCategory, type ResumeSummary, ResumeTemplate, type ResumeTemplateProps, type ResumeVariant, Section, type SectionPadding, type SectionProps, type SectionSpacing, type SectionVariant, type SignatureSigner, type SignatureVariant, Stack, type StackAlign, type StackDirection, type StackGap, type StackJustify, type StackProps, Table, TableBody, TableCell, type TableCellProps, TableFooter, TableHeader, type TableProps, TableRow, type TableRowProps, type TableSectionProps, type TableVariant, Text, type TextDecoration, type TextProps, type TextVariant, type TextWeight, ValidationError, type WatermarkPosition, createThemeTw, getGraphWidth, tw, usePdfxTheme };