pretext-pdf 1.9.0 → 2.0.13
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 +414 -0
- package/dist/allowed-props.d.ts +23 -8
- package/dist/allowed-props.d.ts.map +1 -1
- package/dist/allowed-props.js +38 -6
- package/dist/allowed-props.js.map +1 -1
- package/dist/assets/index.d.ts +1 -1
- package/dist/assets/index.d.ts.map +1 -1
- package/dist/assets/index.js +1 -1
- package/dist/assets/index.js.map +1 -1
- package/dist/assets/loaders/images.d.ts.map +1 -1
- package/dist/assets/loaders/images.js +4 -1
- package/dist/assets/loaders/images.js.map +1 -1
- package/dist/assets/security/path-allowlist.d.ts.map +1 -1
- package/dist/assets/security/path-allowlist.js +10 -1
- package/dist/assets/security/path-allowlist.js.map +1 -1
- package/dist/assets/svg/resolve-content.d.ts.map +1 -1
- package/dist/assets/svg/resolve-content.js +4 -1
- package/dist/assets/svg/resolve-content.js.map +1 -1
- package/dist/assets/svg/sanitize.d.ts +2 -0
- package/dist/assets/svg/sanitize.d.ts.map +1 -1
- package/dist/assets/svg/sanitize.js +41 -10
- package/dist/assets/svg/sanitize.js.map +1 -1
- package/dist/builder.js +2 -2
- package/dist/builder.js.map +1 -1
- package/dist/compat/normalize.d.ts +13 -0
- package/dist/compat/normalize.d.ts.map +1 -0
- package/dist/compat/normalize.js +146 -0
- package/dist/compat/normalize.js.map +1 -0
- package/dist/compat/pdfmake-types.d.ts +91 -0
- package/dist/compat/pdfmake-types.d.ts.map +1 -0
- package/dist/compat/pdfmake-types.js +8 -0
- package/dist/compat/pdfmake-types.js.map +1 -0
- package/dist/compat/translate.d.ts +7 -0
- package/dist/compat/translate.d.ts.map +1 -0
- package/dist/compat/translate.js +205 -0
- package/dist/compat/translate.js.map +1 -0
- package/dist/compat.d.ts +6 -161
- package/dist/compat.d.ts.map +1 -1
- package/dist/compat.js +13 -404
- package/dist/compat.js.map +1 -1
- package/dist/fonts/bundled-paths.d.ts +13 -0
- package/dist/fonts/bundled-paths.d.ts.map +1 -0
- package/dist/fonts/bundled-paths.js +43 -0
- package/dist/fonts/bundled-paths.js.map +1 -0
- package/dist/fonts/collect-needed.d.ts +10 -0
- package/dist/fonts/collect-needed.d.ts.map +1 -0
- package/dist/fonts/collect-needed.js +85 -0
- package/dist/fonts/collect-needed.js.map +1 -0
- package/dist/fonts/collect-text.d.ts +9 -0
- package/dist/fonts/collect-text.d.ts.map +1 -0
- package/dist/fonts/collect-text.js +162 -0
- package/dist/fonts/collect-text.js.map +1 -0
- package/dist/fonts/load-bytes.d.ts +10 -0
- package/dist/fonts/load-bytes.d.ts.map +1 -0
- package/dist/fonts/load-bytes.js +56 -0
- package/dist/fonts/load-bytes.js.map +1 -0
- package/dist/fonts.d.ts +11 -10
- package/dist/fonts.d.ts.map +1 -1
- package/dist/fonts.js +17 -419
- package/dist/fonts.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/measure-blocks/simple-blocks.js +3 -3
- package/dist/measure-blocks/simple-blocks.js.map +1 -1
- package/dist/measure-text.d.ts.map +1 -1
- package/dist/measure-text.js +7 -0
- package/dist/measure-text.js.map +1 -1
- package/dist/pipeline-footnotes.d.ts +2 -2
- package/dist/pipeline-footnotes.d.ts.map +1 -1
- package/dist/pipeline-footnotes.js +5 -2
- package/dist/pipeline-footnotes.js.map +1 -1
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/pipeline.js +45 -12
- package/dist/pipeline.js.map +1 -1
- package/dist/plugin-types.d.ts +3 -3
- package/dist/plugin-types.d.ts.map +1 -1
- package/dist/render-blocks/hr.d.ts.map +1 -1
- package/dist/render-blocks/hr.js +2 -3
- package/dist/render-blocks/hr.js.map +1 -1
- package/dist/render-extras.d.ts +0 -2
- package/dist/render-extras.d.ts.map +1 -1
- package/dist/render-extras.js +15 -78
- package/dist/render-extras.js.map +1 -1
- package/dist/render-utils.d.ts +1 -7
- package/dist/render-utils.d.ts.map +1 -1
- package/dist/render-utils.js +18 -35
- package/dist/render-utils.js.map +1 -1
- package/dist/render.js +2 -1
- package/dist/render.js.map +1 -1
- package/dist/schema/document.d.ts +2115 -0
- package/dist/schema/document.d.ts.map +1 -0
- package/dist/schema/document.js +275 -0
- package/dist/schema/document.js.map +1 -0
- package/dist/schema/elements-block.d.ts +481 -0
- package/dist/schema/elements-block.d.ts.map +1 -0
- package/dist/schema/elements-block.js +155 -0
- package/dist/schema/elements-block.js.map +1 -0
- package/dist/schema/elements-media.d.ts +282 -0
- package/dist/schema/elements-media.d.ts.map +1 -0
- package/dist/schema/elements-media.js +83 -0
- package/dist/schema/elements-media.js.map +1 -0
- package/dist/schema/elements-table.d.ts +134 -0
- package/dist/schema/elements-table.d.ts.map +1 -0
- package/dist/schema/elements-table.js +60 -0
- package/dist/schema/elements-table.js.map +1 -0
- package/dist/schema/elements-text.d.ts +782 -0
- package/dist/schema/elements-text.d.ts.map +1 -0
- package/dist/schema/elements-text.js +260 -0
- package/dist/schema/elements-text.js.map +1 -0
- package/dist/schema/shared.d.ts +84 -0
- package/dist/schema/shared.d.ts.map +1 -0
- package/dist/schema/shared.js +29 -0
- package/dist/schema/shared.js.map +1 -0
- package/dist/schema.d.ts +10 -1869
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +10 -793
- package/dist/schema.js.map +1 -1
- package/dist/signing/index.d.ts +3 -0
- package/dist/signing/index.d.ts.map +1 -0
- package/dist/signing/index.js +3 -0
- package/dist/signing/index.js.map +1 -0
- package/dist/signing/placeholder.d.ts +5 -0
- package/dist/signing/placeholder.d.ts.map +1 -0
- package/dist/signing/placeholder.js +75 -0
- package/dist/signing/placeholder.js.map +1 -0
- package/dist/signing/post-process.d.ts +16 -0
- package/dist/signing/post-process.d.ts.map +1 -0
- package/dist/signing/post-process.js +125 -0
- package/dist/signing/post-process.js.map +1 -0
- package/dist/types-public/document.d.ts +106 -110
- package/dist/types-public/document.d.ts.map +1 -1
- package/dist/types-public/elements-block.d.ts +54 -35
- package/dist/types-public/elements-block.d.ts.map +1 -1
- package/dist/types-public/validation.d.ts +9 -15
- package/dist/types-public/validation.d.ts.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/validate/document.d.ts.map +1 -1
- package/dist/validate/document.js +5 -1
- package/dist/validate/document.js.map +1 -1
- package/dist/validate/elements/forms-floats.d.ts +1 -1
- package/dist/validate/elements/forms-floats.d.ts.map +1 -1
- package/dist/validate/elements/forms-floats.js +44 -6
- package/dist/validate/elements/forms-floats.js.map +1 -1
- package/dist/validate/elements/media.d.ts.map +1 -1
- package/dist/validate/elements/media.js +14 -0
- package/dist/validate/elements/media.js.map +1 -1
- package/dist/validate/elements/structural-simple.js +4 -4
- package/dist/validate/elements/structural-simple.js.map +1 -1
- package/dist/validate/helpers.d.ts +6 -6
- package/dist/validate/helpers.d.ts.map +1 -1
- package/dist/validate/helpers.js +7 -7
- package/dist/validate/helpers.js.map +1 -1
- package/dist/validate/index.d.ts.map +1 -1
- package/dist/validate/index.js +4 -6
- package/dist/validate/index.js.map +1 -1
- package/package.json +7 -3
|
@@ -13,83 +13,81 @@ import type { ContentElement } from './union.js';
|
|
|
13
13
|
*/
|
|
14
14
|
export interface PdfDocument {
|
|
15
15
|
/** Page size. Default: 'A4' (595×842 pt). Custom: [width, height] in pt. */
|
|
16
|
-
pageSize?: NamedPageSize | [number, number];
|
|
16
|
+
readonly pageSize?: NamedPageSize | [number, number];
|
|
17
17
|
/** Page margins in pt. Default: all 72pt (1 inch). */
|
|
18
|
-
margins?: Partial<Margins>;
|
|
18
|
+
readonly margins?: Partial<Margins>;
|
|
19
19
|
/** Default font family for body text. Default: 'Inter' */
|
|
20
|
-
defaultFont?: string;
|
|
20
|
+
readonly defaultFont?: string;
|
|
21
21
|
/** Default font size in pt. Default: 12 */
|
|
22
|
-
defaultFontSize?: number;
|
|
22
|
+
readonly defaultFontSize?: number;
|
|
23
23
|
/** Default line height in pt. Default: fontSize * 1.5 */
|
|
24
|
-
defaultLineHeight?: number;
|
|
24
|
+
readonly defaultLineHeight?: number;
|
|
25
25
|
/** Custom fonts to load and embed. Inter 400 is always available without specifying. */
|
|
26
|
-
fonts?: FontSpec[];
|
|
26
|
+
readonly fonts?: FontSpec[];
|
|
27
27
|
/** Header rendered at top of every page. Supports \{\{pageNumber\}\} and \{\{totalPages\}\}. */
|
|
28
|
-
header?: HeaderFooterSpec;
|
|
28
|
+
readonly header?: HeaderFooterSpec;
|
|
29
29
|
/** Footer rendered at bottom of every page. Supports \{\{pageNumber\}\} and \{\{totalPages\}\}. */
|
|
30
|
-
footer?: HeaderFooterSpec;
|
|
30
|
+
readonly footer?: HeaderFooterSpec;
|
|
31
31
|
/** Watermark overlay rendered on every page behind content. Text or image. */
|
|
32
|
-
watermark?: WatermarkSpec;
|
|
32
|
+
readonly watermark?: WatermarkSpec;
|
|
33
33
|
/** Password protection and permission control for the output PDF. */
|
|
34
|
-
encryption?: EncryptionSpec;
|
|
34
|
+
readonly encryption?: EncryptionSpec;
|
|
35
35
|
/** Visual signature placeholder drawn on the specified page. */
|
|
36
|
-
signature?: SignatureSpec;
|
|
36
|
+
readonly signature?: SignatureSpec;
|
|
37
37
|
/** PDF bookmark outline (sidebar navigation). Defaults to enabled. Set to false to disable bookmarks entirely. */
|
|
38
|
-
bookmarks?: false | BookmarkConfig;
|
|
38
|
+
readonly bookmarks?: false | BookmarkConfig;
|
|
39
39
|
/** Automatic word hyphenation using Liang's algorithm. Requires installing the matching `hyphenation.XX` npm package. */
|
|
40
|
-
hyphenation?: HyphenationConfig;
|
|
40
|
+
readonly hyphenation?: HyphenationConfig;
|
|
41
41
|
/** PDF document metadata written into the file's properties. */
|
|
42
|
-
metadata?: DocumentMetadata;
|
|
42
|
+
readonly metadata?: DocumentMetadata;
|
|
43
43
|
/**
|
|
44
44
|
* Default style applied to every paragraph and heading that does not
|
|
45
45
|
* explicitly set the field. Explicit element-level values always win.
|
|
46
46
|
*/
|
|
47
|
-
defaultParagraphStyle?: {
|
|
48
|
-
fontSize?: number;
|
|
49
|
-
lineHeight?: number;
|
|
50
|
-
fontFamily?: string;
|
|
51
|
-
fontWeight?: 400 | 700;
|
|
52
|
-
color?: string;
|
|
53
|
-
align?: 'left' | 'center' | 'right' | 'justify';
|
|
54
|
-
letterSpacing?: number;
|
|
55
|
-
spaceBefore?: number;
|
|
56
|
-
spaceAfter?: number;
|
|
47
|
+
readonly defaultParagraphStyle?: {
|
|
48
|
+
readonly fontSize?: number;
|
|
49
|
+
readonly lineHeight?: number;
|
|
50
|
+
readonly fontFamily?: string;
|
|
51
|
+
readonly fontWeight?: 400 | 700;
|
|
52
|
+
readonly color?: string;
|
|
53
|
+
readonly align?: 'left' | 'center' | 'right' | 'justify';
|
|
54
|
+
readonly letterSpacing?: number;
|
|
55
|
+
readonly spaceBefore?: number;
|
|
56
|
+
readonly spaceAfter?: number;
|
|
57
57
|
};
|
|
58
58
|
/**
|
|
59
59
|
* Page-range overrides for header/footer. Sections are matched by page number
|
|
60
60
|
* (1-based). The first matching section wins. Falls back to doc.header/footer.
|
|
61
61
|
*/
|
|
62
|
-
sections?: Array<{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
header?: PdfDocument['header'];
|
|
68
|
-
footer?: PdfDocument['footer'];
|
|
62
|
+
readonly sections?: Array<{
|
|
63
|
+
readonly fromPage?: number;
|
|
64
|
+
readonly toPage?: number;
|
|
65
|
+
readonly header?: PdfDocument['header'];
|
|
66
|
+
readonly footer?: PdfDocument['footer'];
|
|
69
67
|
}>;
|
|
70
68
|
/** Document content elements, rendered top-to-bottom. */
|
|
71
|
-
content: ContentElement[];
|
|
69
|
+
readonly content: readonly ContentElement[];
|
|
72
70
|
/** If true, flatten all form fields into static content (no longer interactive). Default: false */
|
|
73
|
-
flattenForms?: boolean;
|
|
71
|
+
readonly flattenForms?: boolean;
|
|
74
72
|
/**
|
|
75
73
|
* Called when an image fails to load (file not found, URL error, embed failure).
|
|
76
74
|
* Return 'skip' to silently omit the image (default behavior).
|
|
77
75
|
* Return 'throw' to abort rendering with the original error.
|
|
78
76
|
* If omitted, failures are logged as warnings and the image is skipped.
|
|
79
77
|
*/
|
|
80
|
-
onImageLoadError?: (src: string | Uint8Array, error: Error) => 'skip' | 'throw';
|
|
78
|
+
readonly onImageLoadError?: (src: string | Uint8Array, error: Error) => 'skip' | 'throw';
|
|
81
79
|
/**
|
|
82
80
|
* Called when a form field fails to render (field type error, font missing, etc.).
|
|
83
81
|
* Return 'skip' to silently omit the field.
|
|
84
82
|
* Return 'throw' to abort rendering with the original error.
|
|
85
83
|
* If omitted, failures are logged as warnings and the field is skipped.
|
|
86
84
|
*/
|
|
87
|
-
onFormFieldError?: (fieldName: string | undefined, error: Error) => 'skip' | 'throw';
|
|
85
|
+
readonly onFormFieldError?: (fieldName: string | undefined, error: Error) => 'skip' | 'throw';
|
|
88
86
|
/**
|
|
89
87
|
* Document creation date written into PDF metadata.
|
|
90
88
|
* Accepts an ISO 8601 string or a Date object. Default: current date/time.
|
|
91
89
|
*/
|
|
92
|
-
renderDate?: string | Date;
|
|
90
|
+
readonly renderDate?: string | Date;
|
|
93
91
|
/**
|
|
94
92
|
* Restrict filesystem access to these absolute directory paths.
|
|
95
93
|
* When set, any image/SVG/font `src` pointing outside these directories
|
|
@@ -98,179 +96,177 @@ export interface PdfDocument {
|
|
|
98
96
|
*
|
|
99
97
|
* Example: `allowedFileDirs: ['/app/assets', '/tmp/uploads']`
|
|
100
98
|
*/
|
|
101
|
-
allowedFileDirs?: string[];
|
|
99
|
+
readonly allowedFileDirs?: string[];
|
|
102
100
|
}
|
|
103
101
|
/** @public */
|
|
104
102
|
export interface DocumentMetadata {
|
|
105
103
|
/** Document title shown in PDF viewer title bar. */
|
|
106
|
-
title?: string;
|
|
104
|
+
readonly title?: string;
|
|
107
105
|
/** Author name. */
|
|
108
|
-
author?: string;
|
|
106
|
+
readonly author?: string;
|
|
109
107
|
/** Subject / description. */
|
|
110
|
-
subject?: string;
|
|
108
|
+
readonly subject?: string;
|
|
111
109
|
/** Searchable keywords. */
|
|
112
|
-
keywords?: string[];
|
|
110
|
+
readonly keywords?: string[];
|
|
113
111
|
/** Producing application name. Default: 'pretext-pdf' */
|
|
114
|
-
creator?: string;
|
|
112
|
+
readonly creator?: string;
|
|
115
113
|
/** BCP47 language tag e.g. 'en-US', 'hi', 'ar'. Sets the PDF /Lang catalog attribute for accessibility. */
|
|
116
|
-
language?: string;
|
|
114
|
+
readonly language?: string;
|
|
117
115
|
/** PDF producer field shown in document properties e.g. 'MyApp v2.1'. */
|
|
118
|
-
producer?: string;
|
|
116
|
+
readonly producer?: string;
|
|
119
117
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* store values here but MUST NOT rely on them having any render-time effect.
|
|
124
|
-
* @alpha
|
|
118
|
+
* Accessibility metadata for PDF/UA and WCAG tooling.
|
|
119
|
+
* Serialized as JSON into the PDF Info dictionary under the `Accessibility` key.
|
|
120
|
+
* @public
|
|
125
121
|
*/
|
|
126
|
-
accessibility?: Record<string, unknown>;
|
|
122
|
+
readonly accessibility?: Record<string, unknown>;
|
|
127
123
|
/**
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* @
|
|
124
|
+
* Semantic document structure metadata (e.g. document class, schema version,
|
|
125
|
+
* AI-generation provenance). Serialized as JSON into the PDF Info dictionary
|
|
126
|
+
* under the `Semantic` key.
|
|
127
|
+
* @public
|
|
132
128
|
*/
|
|
133
|
-
semantic?: Record<string, unknown>;
|
|
129
|
+
readonly semantic?: Record<string, unknown>;
|
|
134
130
|
}
|
|
135
131
|
/** @public */
|
|
136
132
|
export interface Margins {
|
|
137
|
-
top: number;
|
|
138
|
-
bottom: number;
|
|
139
|
-
left: number;
|
|
140
|
-
right: number;
|
|
133
|
+
readonly top: number;
|
|
134
|
+
readonly bottom: number;
|
|
135
|
+
readonly left: number;
|
|
136
|
+
readonly right: number;
|
|
141
137
|
}
|
|
142
138
|
/** @public */
|
|
143
139
|
export interface FontSpec {
|
|
144
140
|
/** Font family name, e.g. 'Roboto'. Used in fontFamily fields. */
|
|
145
|
-
family: string;
|
|
141
|
+
readonly family: string;
|
|
146
142
|
/** Font weight. Default: 400 */
|
|
147
|
-
weight?: 400 | 700;
|
|
143
|
+
readonly weight?: 400 | 700;
|
|
148
144
|
/** Font style. Default: 'normal' */
|
|
149
|
-
style?: 'normal' | 'italic';
|
|
145
|
+
readonly style?: 'normal' | 'italic';
|
|
150
146
|
/** Absolute file path (Node.js) or font bytes (browser). */
|
|
151
|
-
src: string | Uint8Array;
|
|
147
|
+
readonly src: string | Uint8Array;
|
|
152
148
|
}
|
|
153
149
|
/** @public */
|
|
154
150
|
export interface HeaderFooterSpec {
|
|
155
151
|
/** Text content. Use \{\{pageNumber\}\} and \{\{totalPages\}\} as tokens. */
|
|
156
|
-
text: string;
|
|
152
|
+
readonly text: string;
|
|
157
153
|
/** Font size in pt. Default: 10 */
|
|
158
|
-
fontSize?: number;
|
|
154
|
+
readonly fontSize?: number;
|
|
159
155
|
/** Alignment. Default: 'center' */
|
|
160
|
-
align?: 'left' | 'center' | 'right';
|
|
156
|
+
readonly align?: 'left' | 'center' | 'right';
|
|
161
157
|
/** Font family. Default: document.defaultFont */
|
|
162
|
-
fontFamily?: string;
|
|
158
|
+
readonly fontFamily?: string;
|
|
163
159
|
/** Font weight. Default: 400 */
|
|
164
|
-
fontWeight?: 400 | 700;
|
|
160
|
+
readonly fontWeight?: 400 | 700;
|
|
165
161
|
/** Text color as 6-digit hex. Default: '#666666' */
|
|
166
|
-
color?: string;
|
|
162
|
+
readonly color?: string;
|
|
167
163
|
}
|
|
168
164
|
interface WatermarkBase {
|
|
169
165
|
/** Font family for text watermark. Default: document.defaultFont */
|
|
170
|
-
fontFamily?: string;
|
|
166
|
+
readonly fontFamily?: string;
|
|
171
167
|
/** Font weight. Default: 400 */
|
|
172
|
-
fontWeight?: 400 | 700;
|
|
168
|
+
readonly fontWeight?: 400 | 700;
|
|
173
169
|
/** Font size in pt. Default: auto-computed from page diagonal */
|
|
174
|
-
fontSize?: number;
|
|
170
|
+
readonly fontSize?: number;
|
|
175
171
|
/** Color as 6-digit hex. Default: '#CCCCCC' */
|
|
176
|
-
color?: string;
|
|
172
|
+
readonly color?: string;
|
|
177
173
|
/** Opacity 0.0–1.0. Default: 0.3 */
|
|
178
|
-
opacity?: number;
|
|
174
|
+
readonly opacity?: number;
|
|
179
175
|
/** Rotation in degrees (counter-clockwise). Default: -45 */
|
|
180
|
-
rotation?: number;
|
|
176
|
+
readonly rotation?: number;
|
|
181
177
|
}
|
|
182
178
|
/** @public */
|
|
183
179
|
export type WatermarkSpec = (WatermarkBase & {
|
|
184
|
-
text: string;
|
|
185
|
-
image?: never;
|
|
180
|
+
readonly text: string;
|
|
181
|
+
readonly image?: never;
|
|
186
182
|
}) | (WatermarkBase & {
|
|
187
|
-
image: string | Uint8Array;
|
|
188
|
-
text?: never;
|
|
183
|
+
readonly image: string | Uint8Array;
|
|
184
|
+
readonly text?: never;
|
|
189
185
|
});
|
|
190
186
|
/** @public */
|
|
191
187
|
export interface EncryptionSpec {
|
|
192
188
|
/** Password required to OPEN the document. If omitted, document opens without a password
|
|
193
189
|
* but permissions still apply. */
|
|
194
|
-
userPassword?: string;
|
|
190
|
+
readonly userPassword?: string;
|
|
195
191
|
/** Password for full unrestricted access. If omitted, a random owner password is generated
|
|
196
192
|
* (preventing tools from bypassing permissions). */
|
|
197
|
-
ownerPassword?: string;
|
|
193
|
+
readonly ownerPassword?: string;
|
|
198
194
|
/** Permissions granted to anyone who opens the document (with or without user password).
|
|
199
195
|
* Only applied when encryption is active. */
|
|
200
|
-
permissions?: {
|
|
196
|
+
readonly permissions?: {
|
|
201
197
|
/** Allow printing. Default: true */
|
|
202
|
-
printing?: boolean;
|
|
198
|
+
readonly printing?: boolean;
|
|
203
199
|
/** Allow copying text/graphics. Default: true */
|
|
204
|
-
copying?: boolean;
|
|
200
|
+
readonly copying?: boolean;
|
|
205
201
|
/** Allow modifying content. Default: false */
|
|
206
|
-
modifying?: boolean;
|
|
202
|
+
readonly modifying?: boolean;
|
|
207
203
|
/** Allow adding/editing annotations and forms. Default: true */
|
|
208
|
-
annotating?: boolean;
|
|
204
|
+
readonly annotating?: boolean;
|
|
209
205
|
};
|
|
210
206
|
}
|
|
211
207
|
/** @public */
|
|
212
208
|
export interface SignatureSpec {
|
|
213
209
|
/** Name shown as "Signed by: X" inside the box. Optional. */
|
|
214
|
-
signerName?: string;
|
|
210
|
+
readonly signerName?: string;
|
|
215
211
|
/** Short reason e.g. "I approve this document". Shown at bottom. Optional. */
|
|
216
|
-
reason?: string;
|
|
212
|
+
readonly reason?: string;
|
|
217
213
|
/** Location string e.g. "New Delhi, India". Shown at bottom. Optional. */
|
|
218
|
-
location?: string;
|
|
214
|
+
readonly location?: string;
|
|
219
215
|
/** X position from left edge of page in pt. Default: left margin (72pt). */
|
|
220
|
-
x?: number;
|
|
216
|
+
readonly x?: number;
|
|
221
217
|
/** Y position from TOP of page in pt. Default: 40pt from bottom of page. */
|
|
222
|
-
y?: number;
|
|
218
|
+
readonly y?: number;
|
|
223
219
|
/** Width of signature box in pt. Default: 200 */
|
|
224
|
-
width?: number;
|
|
220
|
+
readonly width?: number;
|
|
225
221
|
/** Height of signature box in pt. Default: 60 */
|
|
226
|
-
height?: number;
|
|
222
|
+
readonly height?: number;
|
|
227
223
|
/** Page index (0-based). Default: last page. */
|
|
228
|
-
page?: number;
|
|
224
|
+
readonly page?: number;
|
|
229
225
|
/** Border color as 6-digit hex. Default: '#000000' */
|
|
230
|
-
borderColor?: string;
|
|
226
|
+
readonly borderColor?: string;
|
|
231
227
|
/** Font size for text inside box in pt. Default: 8 */
|
|
232
|
-
fontSize?: number;
|
|
228
|
+
readonly fontSize?: number;
|
|
233
229
|
/**
|
|
234
230
|
* Path to a PKCS#12 (.p12/.pfx) certificate file, or Uint8Array of cert bytes.
|
|
235
231
|
* When provided, a real PKCS#7/CMS digital signature is embedded in the PDF.
|
|
236
232
|
* Requires the `@signpdf/signpdf` optional peer dependency.
|
|
237
233
|
*/
|
|
238
|
-
p12?: string | Uint8Array;
|
|
234
|
+
readonly p12?: string | Uint8Array;
|
|
239
235
|
/** Passphrase to decrypt the P12 certificate. Omit if cert has no passphrase. */
|
|
240
|
-
passphrase?: string;
|
|
236
|
+
readonly passphrase?: string;
|
|
241
237
|
/** Contact info (e.g. email) embedded in the signature dictionary. Default: '' */
|
|
242
|
-
contactInfo?: string;
|
|
238
|
+
readonly contactInfo?: string;
|
|
243
239
|
/** If true, skip rendering the visual signature box (crypto-only invisible signing). Default: false */
|
|
244
|
-
invisible?: boolean;
|
|
240
|
+
readonly invisible?: boolean;
|
|
245
241
|
}
|
|
246
242
|
/** @public */
|
|
247
243
|
export interface BookmarkConfig {
|
|
248
244
|
/** Minimum heading level to include in outline. Default: 1 */
|
|
249
|
-
minLevel?: 1 | 2 | 3 | 4;
|
|
245
|
+
readonly minLevel?: 1 | 2 | 3 | 4;
|
|
250
246
|
/** Maximum heading level to include in outline. Default: 4 */
|
|
251
|
-
maxLevel?: 1 | 2 | 3 | 4;
|
|
247
|
+
readonly maxLevel?: 1 | 2 | 3 | 4;
|
|
252
248
|
}
|
|
253
249
|
/** @public */
|
|
254
250
|
export interface HyphenationConfig {
|
|
255
251
|
/** Language code matching the `hyphenation.XX` npm package. e.g. 'en-us', 'de', 'fr'. Required. */
|
|
256
|
-
language: string;
|
|
252
|
+
readonly language: string;
|
|
257
253
|
/** Minimum word length to attempt hyphenation. Default: 6 */
|
|
258
|
-
minWordLength?: number;
|
|
254
|
+
readonly minWordLength?: number;
|
|
259
255
|
/** Minimum characters before the hyphen. Default: 2 */
|
|
260
|
-
leftMin?: number;
|
|
256
|
+
readonly leftMin?: number;
|
|
261
257
|
/** Minimum characters after the hyphen. Default: 3 */
|
|
262
|
-
rightMin?: number;
|
|
258
|
+
readonly rightMin?: number;
|
|
263
259
|
}
|
|
264
260
|
/** @public */
|
|
265
261
|
export interface AnnotationSpec {
|
|
266
262
|
/** Text content shown in the popup. Required. */
|
|
267
|
-
contents: string;
|
|
263
|
+
readonly contents: string;
|
|
268
264
|
/** Author name shown in popup header. Optional. */
|
|
269
|
-
author?: string;
|
|
265
|
+
readonly author?: string;
|
|
270
266
|
/** Annotation color as 6-digit hex. Default: '#FFFF00' (yellow) */
|
|
271
|
-
color?: string;
|
|
267
|
+
readonly color?: string;
|
|
272
268
|
/** Whether the popup is open by default. Default: false */
|
|
273
|
-
open?: boolean;
|
|
269
|
+
readonly open?: boolean;
|
|
274
270
|
}
|
|
275
271
|
export {};
|
|
276
272
|
//# sourceMappingURL=document.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/types-public/document.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/types-public/document.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAEhD;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,4EAA4E;IAC5E,QAAQ,CAAC,QAAQ,CAAC,EAAE,aAAa,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpD,sDAAsD;IACtD,QAAQ,C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AAuG;IACvG,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAC7B;AAED,cAAc;AACd,MAAM,WAAW,cAAc;IAC7B,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACjC,8DAA8D;IAC9D,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;CAClC;AAED,cAAc;AACd,MAAM,WAAW,iBAAiB;IAChC,mGAAmG;IACnG,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,6DAA6D;IAC7D,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAA;IAC/B,uDAAuD;IACvD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;IACzB,sDAAsD;IACtD,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAC3B;AAED,cAAc;AACd,MAAM,WAAW,cAAc;IAC7B,iDAAiD;IACjD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,mDAAmD;IACnD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,mEAAmE;IACnE,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAA;IACvB,2DAA2D;IAC3D,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CACxB"}
|
|
@@ -124,16 +124,6 @@ export interface HorizontalRuleElement {
|
|
|
124
124
|
thickness?: number;
|
|
125
125
|
/** Line color (hex). Default: '#cccccc' */
|
|
126
126
|
color?: string;
|
|
127
|
-
/**
|
|
128
|
-
* Space above line in pt. Default: 12.
|
|
129
|
-
* @deprecated Use `spaceBefore` instead — consistent with paragraph/heading naming. Removed in v2.0.
|
|
130
|
-
*/
|
|
131
|
-
spaceAbove?: number;
|
|
132
|
-
/**
|
|
133
|
-
* Space below line in pt. Default: 12.
|
|
134
|
-
* @deprecated Use `spaceAfter` instead — consistent with paragraph/heading naming. Removed in v2.0.
|
|
135
|
-
*/
|
|
136
|
-
spaceBelow?: number;
|
|
137
127
|
/** Space above line in pt. Default: 12. */
|
|
138
128
|
spaceBefore?: number;
|
|
139
129
|
/** Space below line in pt. Default: 12. */
|
|
@@ -206,32 +196,13 @@ export interface CommentElement {
|
|
|
206
196
|
/** Extra space below in pt. Default: 0 */
|
|
207
197
|
spaceAfter?: number;
|
|
208
198
|
}
|
|
209
|
-
/** @public */
|
|
210
|
-
export interface
|
|
199
|
+
/** Shared fields across all AcroForm field types. @public */
|
|
200
|
+
export interface BaseFormField {
|
|
211
201
|
type: 'form-field';
|
|
212
|
-
/** AcroForm field type. */
|
|
213
|
-
fieldType: 'text' | 'checkbox' | 'radio' | 'dropdown' | 'button';
|
|
214
202
|
/** Unique field name within the document. Required. */
|
|
215
203
|
name: string;
|
|
216
204
|
/** Label text rendered above the interactive field. Optional. */
|
|
217
205
|
label?: string;
|
|
218
|
-
/** Placeholder text for text fields. */
|
|
219
|
-
placeholder?: string;
|
|
220
|
-
/** Pre-filled default value for text fields. */
|
|
221
|
-
defaultValue?: string;
|
|
222
|
-
/** Makes text field multi-line. Default: false */
|
|
223
|
-
multiline?: boolean;
|
|
224
|
-
/** Maximum character length for text fields. */
|
|
225
|
-
maxLength?: number;
|
|
226
|
-
/** Initial checked state for checkboxes. Default: false */
|
|
227
|
-
checked?: boolean;
|
|
228
|
-
/** Option list for radio groups and dropdowns. */
|
|
229
|
-
options?: Array<{
|
|
230
|
-
value: string;
|
|
231
|
-
label: string;
|
|
232
|
-
}>;
|
|
233
|
-
/** Pre-selected value for radio groups and dropdowns. */
|
|
234
|
-
defaultSelected?: string;
|
|
235
206
|
/** Field width in pt. Default: full content width */
|
|
236
207
|
width?: number;
|
|
237
208
|
/** Field height in pt. Default: auto per fieldType (text=24, multiline=60, radio=20×options, others=24) */
|
|
@@ -249,11 +220,59 @@ export interface FormFieldElement {
|
|
|
249
220
|
/** If true, never break this element across pages. Default: true */
|
|
250
221
|
keepTogether?: boolean;
|
|
251
222
|
/**
|
|
252
|
-
* Accessible label for the field, used for screen-reader announcements
|
|
253
|
-
*
|
|
254
|
-
*
|
|
255
|
-
* @alpha
|
|
223
|
+
* Accessible label for the field, used for screen-reader announcements and PDF assistive technology.
|
|
224
|
+
* Written to the AcroForm /TU (tooltip/alt-text) annotation dictionary entry.
|
|
225
|
+
* @public
|
|
256
226
|
*/
|
|
257
227
|
accessibilityLabel?: string;
|
|
258
228
|
}
|
|
229
|
+
/** Single-line or multi-line text input. @public */
|
|
230
|
+
export interface TextFormField extends BaseFormField {
|
|
231
|
+
fieldType: 'text';
|
|
232
|
+
/** Placeholder text shown when the field is empty. */
|
|
233
|
+
placeholder?: string;
|
|
234
|
+
/** Pre-filled default value. */
|
|
235
|
+
defaultValue?: string;
|
|
236
|
+
/** Makes the field multi-line. Default: false */
|
|
237
|
+
multiline?: boolean;
|
|
238
|
+
/** Maximum character length. */
|
|
239
|
+
maxLength?: number;
|
|
240
|
+
}
|
|
241
|
+
/** Boolean checkbox. @public */
|
|
242
|
+
export interface CheckboxFormField extends BaseFormField {
|
|
243
|
+
fieldType: 'checkbox';
|
|
244
|
+
/** Initial checked state. Default: false */
|
|
245
|
+
checked?: boolean;
|
|
246
|
+
}
|
|
247
|
+
/** Mutually-exclusive radio button group. @public */
|
|
248
|
+
export interface RadioFormField extends BaseFormField {
|
|
249
|
+
fieldType: 'radio';
|
|
250
|
+
/** Option list (required). */
|
|
251
|
+
options: Array<{
|
|
252
|
+
value: string;
|
|
253
|
+
label: string;
|
|
254
|
+
}>;
|
|
255
|
+
/** Pre-selected value. */
|
|
256
|
+
defaultSelected?: string;
|
|
257
|
+
}
|
|
258
|
+
/** Single-selection dropdown list. @public */
|
|
259
|
+
export interface DropdownFormField extends BaseFormField {
|
|
260
|
+
fieldType: 'dropdown';
|
|
261
|
+
/** Option list (required). */
|
|
262
|
+
options: Array<{
|
|
263
|
+
value: string;
|
|
264
|
+
label: string;
|
|
265
|
+
}>;
|
|
266
|
+
/** Pre-selected value. */
|
|
267
|
+
defaultSelected?: string;
|
|
268
|
+
}
|
|
269
|
+
/** Push button (no value, triggers actions). @public */
|
|
270
|
+
export interface ButtonFormField extends BaseFormField {
|
|
271
|
+
fieldType: 'button';
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* AcroForm interactive field. Discriminated union — narrow by `fieldType`.
|
|
275
|
+
* @public
|
|
276
|
+
*/
|
|
277
|
+
export type FormFieldElement = TextFormField | CheckboxFormField | RadioFormField | DropdownFormField | ButtonFormField;
|
|
259
278
|
//# sourceMappingURL=elements-block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements-block.d.ts","sourceRoot":"","sources":["../../src/types-public/elements-block.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,cAAc;AACd,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,QAAQ,CAAA;IACd,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAA;CACf;AAID,cAAc;AACd,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,OAAO,CAAA;IACb,OAAO,EAAE,SAAS,EAAE,CAAA;IACpB,IAAI,EAAE,QAAQ,EAAE,CAAA;IAChB,6FAA6F;IAC7F,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAA;IAC5B,wHAAwH;IACxH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iEAAiE;IACjE,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,gDAAgD;IAChD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,8CAA8C;IAC9C,YAAY,CAAC,EAAE,MAAM,CAAA;I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;IACjB,sDAAsD;IACtD,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,qCAAqC;IACrC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,0DAA0D;IAC1D,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,iDAAiD;IACjD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8DAA8D;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,UAAU,GAAG,SAAS,CAAA;CAC9C;AAED,cAAc;AACd,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,+DAA+D;IAC/D,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,MAAM,CAAA;IAC5B,8CAA8C;IAC9C,UAAU,CAAC,EAAE,GAAG,GAAG,GAAG,CAAA;IACtB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAA;CACnB;AAID,cAAc;AACd,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,IAAI,CAAA;IACV,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;IACd
|
|
1
|
+
{"version":3,"file":"elements-block.d.ts","sourceRoot":"","sources":["../../src/types-public/elements-block.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,cAAc;AACd,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,QAAQ,CAAA;IACd,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAA;CACf;AAID,cAAc;AACd,MAAM,WAAW,YAAY;IAC3B,I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|
9
9
|
export interface ValidationError {
|
|
10
10
|
/** JSONPath-style location — e.g. "doc.pageSize" or "doc.content[3].color" */
|
|
11
|
-
path: string;
|
|
11
|
+
readonly path: string;
|
|
12
12
|
/** Human-readable description of the issue */
|
|
13
|
-
message: string;
|
|
13
|
+
readonly message: string;
|
|
14
14
|
/** The unknown property name, when code is UNKNOWN_PROPERTY */
|
|
15
|
-
unknownProp?: string;
|
|
15
|
+
readonly unknownProp?: string;
|
|
16
16
|
/** Levenshtein-nearest valid property name, when available */
|
|
17
|
-
suggestion?: string;
|
|
17
|
+
readonly suggestion?: string;
|
|
18
18
|
/** Severity of the issue */
|
|
19
|
-
severity: 'error' | 'warning';
|
|
19
|
+
readonly severity: 'error' | 'warning';
|
|
20
20
|
/** Machine-readable error code */
|
|
21
|
-
code: ErrorCode;
|
|
21
|
+
readonly code: ErrorCode;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
24
|
* Return value of {@link validateDocument}.
|
|
@@ -26,17 +26,11 @@ export interface ValidationError {
|
|
|
26
26
|
*/
|
|
27
27
|
export interface ValidationResult {
|
|
28
28
|
/** True when the document passed validation with zero errors */
|
|
29
|
-
valid: boolean;
|
|
29
|
+
readonly valid: boolean;
|
|
30
30
|
/** All validation errors found (empty when valid is true) */
|
|
31
|
-
errors: ValidationError[];
|
|
31
|
+
readonly errors: readonly ValidationError[];
|
|
32
32
|
/** Total number of validation issues. May exceed errors.length when errors are capped at 20. */
|
|
33
|
-
errorCount: number;
|
|
34
|
-
/**
|
|
35
|
-
* Warning-severity issue count. Always 0 in v1.x — the validator currently emits errors only.
|
|
36
|
-
* @deprecated Will be removed in v2.0. Use `errors.filter(e => e.severity === 'warning').length`
|
|
37
|
-
* directly when warning-severity items are introduced.
|
|
38
|
-
*/
|
|
39
|
-
warningCount: number;
|
|
33
|
+
readonly errorCount: number;
|
|
40
34
|
}
|
|
41
35
|
/**
|
|
42
36
|
* Optional logger interface for routing pretext-pdf diagnostic messages.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/types-public/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAI7C;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,IAAI,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/types-public/validation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAI7C;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,8EAA8E;IAC9E,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,8CAA8C;IAC9C,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,+DAA+D;IAC/D,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAA;IAC7B,8DAA8D;IAC9D,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;IAC5B,4BAA4B;IAC5B,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IACtC,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,gEAAgE;IAChE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAA;IACvB,6DAA6D;IAC7D,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;IAC3C,gGAAgG;IAChG,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAC5B;AAID;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,MAAM;IACrB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;CAChD"}
|
package/dist/types.d.ts
CHANGED
|
@@ -5,5 +5,5 @@
|
|
|
5
5
|
* Internal types are kept separate in types-internal.ts to prevent
|
|
6
6
|
* accidental public API surface expansion.
|
|
7
7
|
*/
|
|
8
|
-
export type { ValidationError, ValidationResult, Logger, PdfDocument, DocumentMetadata, Margins, FontSpec, HeaderFooterSpec, WatermarkSpec, EncryptionSpec, SignatureSpec, BookmarkConfig, HyphenationConfig, AnnotationSpec, CommentElement, AssemblyPart, FormFieldElement, ContentElement, ParagraphElement, HeadingElement, SpacerElement, TableElement, ColumnDef, TableRow, TableCell, ImageElement, FloatGroupElement, SvgElement, QrCodeElement, BarcodeElement, ChartElement, ListElement, ListItem, HorizontalRuleElement, PageBreakElement, CodeBlockElement, RichParagraphElement, InlineSpan, BlockquoteElement, CalloutElement, FootnoteDefElement, TocElement, RenderOptions, } from './types-public/index.js';
|
|
8
|
+
export type { ValidationError, ValidationResult, Logger, PdfDocument, DocumentMetadata, Margins, FontSpec, HeaderFooterSpec, WatermarkSpec, EncryptionSpec, SignatureSpec, BookmarkConfig, HyphenationConfig, AnnotationSpec, CommentElement, AssemblyPart, FormFieldElement, BaseFormField, TextFormField, CheckboxFormField, RadioFormField, DropdownFormField, ButtonFormField, ContentElement, ParagraphElement, HeadingElement, SpacerElement, TableElement, ColumnDef, TableRow, TableCell, ImageElement, FloatGroupElement, SvgElement, QrCodeElement, BarcodeElement, ChartElement, ListElement, ListItem, HorizontalRuleElement, PageBreakElement, CodeBlockElement, RichParagraphElement, InlineSpan, BlockquoteElement, CalloutElement, FootnoteDefElement, TocElement, RenderOptions, } from './types-public/index.js';
|
|
9
9
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,aAAa,GACd,MAAM,yBAAyB,CAAA"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,OAAO,EACP,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,aAAa,EACb,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,YAAY,EACZ,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,cAAc,EACd,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EAClB,UAAU,EACV,aAAa,GACd,MAAM,yBAAyB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/validate/document.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAI9C,OAAO,EAQL,KAAK,iBAAiB,EACvB,MAAM,cAAc,CAAA;AAErB;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,iBAAiB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/validate/document.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAI9C,OAAO,EAQL,KAAK,iBAAiB,EACvB,MAAM,cAAc,CAAA;AAErB;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,iBAAiB,GAAG,IAAI,CAgTpF"}
|