@papack/pdf 1.0.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.
- package/dist/index.cjs +342 -0
- package/dist/index.d.cts +453 -0
- package/dist/index.d.mts +454 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +337 -0
- package/dist/index.mjs.map +1 -0
- package/licence.md +41 -0
- package/package.json +29 -0
- package/readme.md +194 -0
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
import { Circle, ClipPath, Defs, Document, Ellipse, Font, G, Line, LinearGradient, PageProps, Path, Polygon, Polyline, RadialGradient, Rect, Stop, Svg, TextProps, Tspan, ViewProps } from "@react-pdf/renderer";
|
|
2
|
+
import React$1 from "react";
|
|
3
|
+
|
|
4
|
+
//#region core/fragment.d.ts
|
|
5
|
+
declare const fragment: React$1.ExoticComponent<React$1.FragmentProps>;
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region core/jsx.d.ts
|
|
8
|
+
declare global {
|
|
9
|
+
namespace JSX {
|
|
10
|
+
interface IntrinsicAttributes {
|
|
11
|
+
key?: React$1.Key;
|
|
12
|
+
}
|
|
13
|
+
interface ElementChildrenAttribute {
|
|
14
|
+
children: {};
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
declare function jsx(type: any, props: any, ...children: any): React$1.DetailedReactHTMLElement<React$1.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region core/render.d.ts
|
|
21
|
+
declare function render(doc: any): Promise<NodeJS.ReadableStream>;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region helper/repeat.d.ts
|
|
24
|
+
interface RepeatPropertiesInterface {
|
|
25
|
+
n: number;
|
|
26
|
+
children: React$1.ReactNode;
|
|
27
|
+
}
|
|
28
|
+
declare const Repeat: ({
|
|
29
|
+
n,
|
|
30
|
+
children
|
|
31
|
+
}: RepeatPropertiesInterface) => React$1.JSX.Element;
|
|
32
|
+
//#endregion
|
|
33
|
+
//#region layout/box.d.ts
|
|
34
|
+
interface BoxPropertiesInterface extends ViewProps {
|
|
35
|
+
children?: React.ReactNode;
|
|
36
|
+
m?: string;
|
|
37
|
+
mb?: string;
|
|
38
|
+
ml?: string;
|
|
39
|
+
mr?: string;
|
|
40
|
+
mt?: string;
|
|
41
|
+
mx?: string;
|
|
42
|
+
my?: string;
|
|
43
|
+
p?: string;
|
|
44
|
+
pb?: string;
|
|
45
|
+
pl?: string;
|
|
46
|
+
pr?: string;
|
|
47
|
+
pt?: string;
|
|
48
|
+
px?: string;
|
|
49
|
+
py?: string;
|
|
50
|
+
bg?: string;
|
|
51
|
+
b?: string;
|
|
52
|
+
bt?: string;
|
|
53
|
+
br?: string;
|
|
54
|
+
bb?: string;
|
|
55
|
+
bl?: string;
|
|
56
|
+
bx?: string;
|
|
57
|
+
by?: string;
|
|
58
|
+
r?: string;
|
|
59
|
+
rt?: string;
|
|
60
|
+
rr?: string;
|
|
61
|
+
rb?: string;
|
|
62
|
+
rl?: string;
|
|
63
|
+
rtr?: string;
|
|
64
|
+
rtl?: string;
|
|
65
|
+
rbr?: string;
|
|
66
|
+
rbl?: string;
|
|
67
|
+
s?: string;
|
|
68
|
+
h?: string;
|
|
69
|
+
w?: string;
|
|
70
|
+
maxH?: string;
|
|
71
|
+
maxW?: string;
|
|
72
|
+
minH?: string;
|
|
73
|
+
minW?: string;
|
|
74
|
+
}
|
|
75
|
+
declare function Box(p: BoxPropertiesInterface): any;
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region layout/absolute.d.ts
|
|
78
|
+
interface AbsolutePropertiesInterface extends BoxPropertiesInterface {
|
|
79
|
+
zIndex?: string;
|
|
80
|
+
top?: string;
|
|
81
|
+
right?: string;
|
|
82
|
+
bottom?: string;
|
|
83
|
+
left?: string;
|
|
84
|
+
}
|
|
85
|
+
declare function Absolute(p: AbsolutePropertiesInterface): any;
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region layout/flex-item.d.ts
|
|
88
|
+
/**
|
|
89
|
+
* Flex item component properties extending Box with flex layout controls
|
|
90
|
+
* Extends BoxPropertiesInterface with flex-specific properties
|
|
91
|
+
*/
|
|
92
|
+
interface FlexItemPropertiesInterface extends BoxPropertiesInterface {
|
|
93
|
+
flx?: string;
|
|
94
|
+
as?: "auto" | "flex-start" | "flex-end" | "center" | "baseline" | "stretch";
|
|
95
|
+
flxGrow?: number;
|
|
96
|
+
flxShrink?: number;
|
|
97
|
+
flxBasis?: string;
|
|
98
|
+
}
|
|
99
|
+
declare function FlexItem(p: FlexItemPropertiesInterface): any;
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region layout/flex.d.ts
|
|
102
|
+
/**
|
|
103
|
+
* Flex container component properties extending FlexItem with container controls
|
|
104
|
+
* Extends FlexItemPropertiesInterface with flex container properties
|
|
105
|
+
*/
|
|
106
|
+
interface FlexPropertiesInterface extends FlexItemPropertiesInterface {
|
|
107
|
+
jc?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly";
|
|
108
|
+
ai?: "stretch" | "flex-start" | "flex-end" | "center" | "baseline";
|
|
109
|
+
ac?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "stretch";
|
|
110
|
+
g?: string;
|
|
111
|
+
flxDirection?: "row" | "row-reverse" | "column" | "column-reverse";
|
|
112
|
+
flxWrap?: "nowrap" | "wrap" | "wrap-reverse";
|
|
113
|
+
flxFlow?: number;
|
|
114
|
+
}
|
|
115
|
+
declare function Flex(p: FlexPropertiesInterface): any;
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region layout/stack.d.ts
|
|
118
|
+
interface StackPropertiesInterface extends FlexPropertiesInterface {}
|
|
119
|
+
declare function Stack(p: StackPropertiesInterface): any;
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region layout/center.d.ts
|
|
122
|
+
interface CenterPropertiesInterface extends StackPropertiesInterface {}
|
|
123
|
+
declare function Center(p: CenterPropertiesInterface): any;
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region layout/page.d.ts
|
|
126
|
+
interface PdfPagePropertiesInterface extends PageProps {
|
|
127
|
+
children?: React.ReactNode;
|
|
128
|
+
m?: string;
|
|
129
|
+
mb?: string;
|
|
130
|
+
ml?: string;
|
|
131
|
+
mr?: string;
|
|
132
|
+
mt?: string;
|
|
133
|
+
mx?: string;
|
|
134
|
+
my?: string;
|
|
135
|
+
p?: string;
|
|
136
|
+
pb?: string;
|
|
137
|
+
pl?: string;
|
|
138
|
+
pr?: string;
|
|
139
|
+
pt?: string;
|
|
140
|
+
px?: string;
|
|
141
|
+
py?: string;
|
|
142
|
+
bg?: string;
|
|
143
|
+
b?: string;
|
|
144
|
+
bt?: string;
|
|
145
|
+
br?: string;
|
|
146
|
+
bb?: string;
|
|
147
|
+
bl?: string;
|
|
148
|
+
bx?: string;
|
|
149
|
+
by?: string;
|
|
150
|
+
r?: string;
|
|
151
|
+
rt?: string;
|
|
152
|
+
rr?: string;
|
|
153
|
+
rb?: string;
|
|
154
|
+
rl?: string;
|
|
155
|
+
rtr?: string;
|
|
156
|
+
rtl?: string;
|
|
157
|
+
rbr?: string;
|
|
158
|
+
rbl?: string;
|
|
159
|
+
}
|
|
160
|
+
declare function Page(p: PdfPagePropertiesInterface): any;
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region layout/relative.d.ts
|
|
163
|
+
interface RelativePropertiesInterface extends BoxPropertiesInterface {
|
|
164
|
+
zIndex?: string;
|
|
165
|
+
}
|
|
166
|
+
declare function Relative(p: RelativePropertiesInterface): any;
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region layout/text.d.ts
|
|
169
|
+
interface TextPropertiesInterface extends TextProps {
|
|
170
|
+
a?: "left" | "right" | "center" | "justify";
|
|
171
|
+
ff?: string;
|
|
172
|
+
fw?: number;
|
|
173
|
+
fs?: string;
|
|
174
|
+
s?: "normal" | "italic";
|
|
175
|
+
lh?: string;
|
|
176
|
+
ls?: string;
|
|
177
|
+
c?: string;
|
|
178
|
+
}
|
|
179
|
+
declare function Text(p: TextPropertiesInterface): any;
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region style/color.d.ts
|
|
182
|
+
declare const color: {
|
|
183
|
+
brand: string;
|
|
184
|
+
onBrand: string;
|
|
185
|
+
gray0: string;
|
|
186
|
+
gray100: string;
|
|
187
|
+
gray200: string;
|
|
188
|
+
gray300: string;
|
|
189
|
+
gray400: string;
|
|
190
|
+
gray500: string;
|
|
191
|
+
gray600: string;
|
|
192
|
+
gray700: string;
|
|
193
|
+
gray800: string;
|
|
194
|
+
gray900: string;
|
|
195
|
+
red0: string;
|
|
196
|
+
red100: string;
|
|
197
|
+
red200: string;
|
|
198
|
+
red300: string;
|
|
199
|
+
red400: string;
|
|
200
|
+
red500: string;
|
|
201
|
+
red600: string;
|
|
202
|
+
red700: string;
|
|
203
|
+
red800: string;
|
|
204
|
+
red900: string;
|
|
205
|
+
pink0: string;
|
|
206
|
+
pink100: string;
|
|
207
|
+
pink200: string;
|
|
208
|
+
pink300: string;
|
|
209
|
+
pink400: string;
|
|
210
|
+
pink500: string;
|
|
211
|
+
pink600: string;
|
|
212
|
+
pink700: string;
|
|
213
|
+
pink800: string;
|
|
214
|
+
pink900: string;
|
|
215
|
+
grape0: string;
|
|
216
|
+
grape100: string;
|
|
217
|
+
grape200: string;
|
|
218
|
+
grape300: string;
|
|
219
|
+
grape400: string;
|
|
220
|
+
grape500: string;
|
|
221
|
+
grape600: string;
|
|
222
|
+
grape700: string;
|
|
223
|
+
grape800: string;
|
|
224
|
+
grape900: string;
|
|
225
|
+
violet0: string;
|
|
226
|
+
violet100: string;
|
|
227
|
+
violet200: string;
|
|
228
|
+
violet300: string;
|
|
229
|
+
violet400: string;
|
|
230
|
+
violet500: string;
|
|
231
|
+
violet600: string;
|
|
232
|
+
violet700: string;
|
|
233
|
+
violet800: string;
|
|
234
|
+
violet900: string;
|
|
235
|
+
indigo0: string;
|
|
236
|
+
indigo100: string;
|
|
237
|
+
indigo200: string;
|
|
238
|
+
indigo300: string;
|
|
239
|
+
indigo400: string;
|
|
240
|
+
indigo500: string;
|
|
241
|
+
indigo600: string;
|
|
242
|
+
indigo700: string;
|
|
243
|
+
indigo800: string;
|
|
244
|
+
indigo900: string;
|
|
245
|
+
blue0: string;
|
|
246
|
+
blue100: string;
|
|
247
|
+
blue200: string;
|
|
248
|
+
blue300: string;
|
|
249
|
+
blue400: string;
|
|
250
|
+
blue500: string;
|
|
251
|
+
blue600: string;
|
|
252
|
+
blue700: string;
|
|
253
|
+
blue800: string;
|
|
254
|
+
blue900: string;
|
|
255
|
+
cyan0: string;
|
|
256
|
+
cyan100: string;
|
|
257
|
+
cyan200: string;
|
|
258
|
+
cyan300: string;
|
|
259
|
+
cyan400: string;
|
|
260
|
+
cyan500: string;
|
|
261
|
+
cyan600: string;
|
|
262
|
+
cyan700: string;
|
|
263
|
+
cyan800: string;
|
|
264
|
+
cyan900: string;
|
|
265
|
+
teal0: string;
|
|
266
|
+
teal100: string;
|
|
267
|
+
teal200: string;
|
|
268
|
+
teal300: string;
|
|
269
|
+
teal400: string;
|
|
270
|
+
teal500: string;
|
|
271
|
+
teal600: string;
|
|
272
|
+
teal700: string;
|
|
273
|
+
teal800: string;
|
|
274
|
+
teal900: string;
|
|
275
|
+
green0: string;
|
|
276
|
+
green100: string;
|
|
277
|
+
green200: string;
|
|
278
|
+
green300: string;
|
|
279
|
+
green400: string;
|
|
280
|
+
green500: string;
|
|
281
|
+
green600: string;
|
|
282
|
+
green700: string;
|
|
283
|
+
green800: string;
|
|
284
|
+
green900: string;
|
|
285
|
+
lime0: string;
|
|
286
|
+
lime100: string;
|
|
287
|
+
lime200: string;
|
|
288
|
+
lime300: string;
|
|
289
|
+
lime400: string;
|
|
290
|
+
lime500: string;
|
|
291
|
+
lime600: string;
|
|
292
|
+
lime700: string;
|
|
293
|
+
lime800: string;
|
|
294
|
+
lime900: string;
|
|
295
|
+
yellow0: string;
|
|
296
|
+
yellow100: string;
|
|
297
|
+
yellow200: string;
|
|
298
|
+
yellow300: string;
|
|
299
|
+
yellow400: string;
|
|
300
|
+
yellow500: string;
|
|
301
|
+
yellow600: string;
|
|
302
|
+
yellow700: string;
|
|
303
|
+
yellow800: string;
|
|
304
|
+
yellow900: string;
|
|
305
|
+
orange0: string;
|
|
306
|
+
orange100: string;
|
|
307
|
+
orange200: string;
|
|
308
|
+
orange300: string;
|
|
309
|
+
orange400: string;
|
|
310
|
+
orange500: string;
|
|
311
|
+
orange600: string;
|
|
312
|
+
orange700: string;
|
|
313
|
+
orange800: string;
|
|
314
|
+
orange900: string;
|
|
315
|
+
};
|
|
316
|
+
//#endregion
|
|
317
|
+
//#region style/font.d.ts
|
|
318
|
+
declare const font: {
|
|
319
|
+
family: {
|
|
320
|
+
sans: string;
|
|
321
|
+
serif: string;
|
|
322
|
+
mono: string;
|
|
323
|
+
};
|
|
324
|
+
size: {
|
|
325
|
+
xs: string;
|
|
326
|
+
sm: string;
|
|
327
|
+
md: string;
|
|
328
|
+
lg: string;
|
|
329
|
+
xl: string;
|
|
330
|
+
"2xl": string;
|
|
331
|
+
"3xl": string;
|
|
332
|
+
"4xl": string;
|
|
333
|
+
"5xl": string;
|
|
334
|
+
"6xl": string;
|
|
335
|
+
"7xl": string;
|
|
336
|
+
"8xl": string;
|
|
337
|
+
"9xl": string;
|
|
338
|
+
};
|
|
339
|
+
weight: {
|
|
340
|
+
thin: number;
|
|
341
|
+
extralight: number;
|
|
342
|
+
light: number;
|
|
343
|
+
normal: number;
|
|
344
|
+
medium: number;
|
|
345
|
+
semibold: number;
|
|
346
|
+
bold: number;
|
|
347
|
+
extrabold: number;
|
|
348
|
+
black: number;
|
|
349
|
+
};
|
|
350
|
+
lineHeight: {
|
|
351
|
+
xs: string;
|
|
352
|
+
sm: string;
|
|
353
|
+
md: string;
|
|
354
|
+
lg: string;
|
|
355
|
+
xl: string;
|
|
356
|
+
"2xl": string;
|
|
357
|
+
"3xl": string;
|
|
358
|
+
"4xl": string;
|
|
359
|
+
"5xl": string;
|
|
360
|
+
"6xl": string;
|
|
361
|
+
"7xl": string;
|
|
362
|
+
"8xl": string;
|
|
363
|
+
"9xl": string;
|
|
364
|
+
};
|
|
365
|
+
letterSpacing: {
|
|
366
|
+
xs: string;
|
|
367
|
+
sm: string;
|
|
368
|
+
md: string;
|
|
369
|
+
lg: string;
|
|
370
|
+
xl: string;
|
|
371
|
+
"2xl": string;
|
|
372
|
+
"3xl": string;
|
|
373
|
+
"4xl": string;
|
|
374
|
+
"5xl": string;
|
|
375
|
+
"6xl": string;
|
|
376
|
+
"7xl": string;
|
|
377
|
+
"8xl": string;
|
|
378
|
+
"9xl": string;
|
|
379
|
+
};
|
|
380
|
+
style: {
|
|
381
|
+
normal: string;
|
|
382
|
+
italic: string;
|
|
383
|
+
};
|
|
384
|
+
};
|
|
385
|
+
//#endregion
|
|
386
|
+
//#region style/radius.d.ts
|
|
387
|
+
declare const radius: {
|
|
388
|
+
sm: string;
|
|
389
|
+
md: string;
|
|
390
|
+
lg: string;
|
|
391
|
+
xl: string;
|
|
392
|
+
"2xl": string;
|
|
393
|
+
"3xl": string;
|
|
394
|
+
full: string;
|
|
395
|
+
};
|
|
396
|
+
//#endregion
|
|
397
|
+
//#region style/size.d.ts
|
|
398
|
+
declare const size: {
|
|
399
|
+
xs: string;
|
|
400
|
+
sm: string;
|
|
401
|
+
md: string;
|
|
402
|
+
lg: string;
|
|
403
|
+
xl: string;
|
|
404
|
+
"2xl": string;
|
|
405
|
+
"3xl": string;
|
|
406
|
+
"4xl": string;
|
|
407
|
+
"5xl": string;
|
|
408
|
+
"6xl": string;
|
|
409
|
+
"7xl": string;
|
|
410
|
+
"8xl": string;
|
|
411
|
+
"9xl": string;
|
|
412
|
+
"10xl": string;
|
|
413
|
+
"11xl": string;
|
|
414
|
+
"1/12": string;
|
|
415
|
+
"2/12": string;
|
|
416
|
+
"3/12": string;
|
|
417
|
+
"4/12": string;
|
|
418
|
+
"5/12": string;
|
|
419
|
+
"6/12": string;
|
|
420
|
+
"7/12": string;
|
|
421
|
+
"8/12": string;
|
|
422
|
+
"9/12": string;
|
|
423
|
+
"10/12": string;
|
|
424
|
+
"11/12": string;
|
|
425
|
+
"1/5": string;
|
|
426
|
+
"2/5": string;
|
|
427
|
+
"3/5": string;
|
|
428
|
+
"4/5": string;
|
|
429
|
+
"1/4": string;
|
|
430
|
+
"3/4": string;
|
|
431
|
+
"1/3": string;
|
|
432
|
+
"2/3": string;
|
|
433
|
+
"1/2": string;
|
|
434
|
+
full: string;
|
|
435
|
+
};
|
|
436
|
+
//#endregion
|
|
437
|
+
//#region style/space.d.ts
|
|
438
|
+
declare const space: {
|
|
439
|
+
xs: string;
|
|
440
|
+
sm: string;
|
|
441
|
+
md: string;
|
|
442
|
+
lg: string;
|
|
443
|
+
xl: string;
|
|
444
|
+
xxl: string;
|
|
445
|
+
"3xl": string;
|
|
446
|
+
"4xl": string;
|
|
447
|
+
"5xl": string;
|
|
448
|
+
"6xl": string;
|
|
449
|
+
"7xl": string;
|
|
450
|
+
"8xl": string;
|
|
451
|
+
};
|
|
452
|
+
//#endregion
|
|
453
|
+
export { Absolute, AbsolutePropertiesInterface, Box, BoxPropertiesInterface, Center, CenterPropertiesInterface, Circle, ClipPath, Defs, Document, Ellipse, Flex, FlexItem, FlexItemPropertiesInterface, FlexPropertiesInterface, Font, G, Line, LinearGradient, Page, Path, PdfPagePropertiesInterface, Polygon, Polyline, RadialGradient, Rect, Relative, RelativePropertiesInterface, Repeat, Stack, StackPropertiesInterface, Stop, Svg, Text, TextPropertiesInterface, Tspan, color, font, fragment, jsx, radius, render, size, space };
|