react-pdf-levelup 1.0.4 → 1.0.8

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.
Files changed (73) hide show
  1. package/dist/index.cjs +652 -0
  2. package/dist/index.d.cts +123 -0
  3. package/dist/index.d.ts +123 -0
  4. package/dist/index.js +575 -0
  5. package/package.json +8 -2
  6. package/fn/aggAlias.js +0 -21
  7. package/fn/moveComponents.js +0 -129
  8. package/fn/postinstall.js +0 -66
  9. package/fn/upVersion.js +0 -12
  10. package/fn/updateTsconfig.js +0 -10
  11. package/next.config.mjs +0 -6
  12. package/public/bg-login.jpg +0 -0
  13. package/public/codigo_guardado.js +0 -1
  14. package/public/css/style.css +0 -751
  15. package/public/dboard/logo.png +0 -0
  16. package/public/favicon.ico +0 -0
  17. package/public/fonts/TimesNewerRoman-Bold.otf +0 -0
  18. package/public/fonts/TimesNewerRoman-BoldItalic.otf +0 -0
  19. package/public/fonts/TimesNewerRoman-Italic.otf +0 -0
  20. package/public/fonts/TimesNewerRoman-Regular.otf +0 -0
  21. package/public/header-pdf.jpg +0 -0
  22. package/public/home/bgHome.jpg +0 -0
  23. package/public/home/bgHome2.jpg +0 -0
  24. package/public/home/download.jpg +0 -0
  25. package/public/home/undraw_elements_re_25t9.svg +0 -1
  26. package/public/home/undraw_project_completed_re_jr7u.svg +0 -1
  27. package/public/home/undraw_shared_goals_re_jvqd.svg +0 -1
  28. package/public/home/undraw_spread_love_re_v3cl.svg +0 -1
  29. package/public/home/undraw_target_re_fi8j.svg +0 -1
  30. package/public/home/undraw_visionary_technology_re_jfp7.svg +0 -1
  31. package/public/logo.png +0 -0
  32. package/public/marca/logo.svg +0 -1
  33. package/src/components/PDF/components/DocumentoTemplate.tsx +0 -140
  34. package/src/components/PDF/components/PDFContent.tsx +0 -192
  35. package/src/components/PDF/core/Etiquetas.tsx +0 -152
  36. package/src/components/PDF/core/Grid.tsx +0 -101
  37. package/src/components/PDF/core/Img.tsx +0 -22
  38. package/src/components/PDF/core/LayoutPDF.tsx +0 -186
  39. package/src/components/PDF/core/Listas.tsx +0 -10
  40. package/src/components/PDF/core/MakePDF.tsx +0 -50
  41. package/src/components/PDF/core/PageElements.tsx +0 -50
  42. package/src/components/PDF/core/Position.tsx +0 -33
  43. package/src/components/PDF/core/Tablet.tsx +0 -121
  44. package/src/components/PDF/core/index.tsx +0 -56
  45. package/src/components/PDF/lib/pdfParser.ts +0 -620
  46. package/src/components/PDF/services/apiService.ts +0 -17
  47. package/src/components/PDF/templates/AllTemplate.tsx +0 -134
  48. package/src/components/PDF/templates/BusinessCardTemplate.tsx +0 -139
  49. package/src/components/PDF/templates/CertificateTemplate.tsx +0 -31
  50. package/src/components/PDF/templates/HeaderFooterTemplate.tsx +0 -61
  51. package/src/components/PDF/templates/InvoiceTemplate.tsx +0 -53
  52. package/src/components/PDF/templates/ProposalTemplate.tsx +0 -246
  53. package/src/components/PDF/templates/ReportTemplate.tsx +0 -57
  54. package/src/components/PDF/templates/ResumeTemplate.tsx +0 -170
  55. package/src/components/PDF/templates/TablasTemplate.tsx +0 -307
  56. package/src/components/PDF/templates/index.ts +0 -9
  57. package/src/components/PDF/view/ColorPicker.tsx +0 -147
  58. package/src/components/PDF/view/Header.tsx +0 -102
  59. package/src/components/PDF/view/HomePDF.tsx +0 -177
  60. package/src/components/PDF/view/SettingsPanel.tsx +0 -703
  61. package/src/pages/AllTemplate.tsx +0 -53
  62. package/src/pages/Documento2.tsx +0 -45
  63. package/src/pages/_app.tsx +0 -6
  64. package/src/pages/_document.tsx +0 -13
  65. package/src/pages/api/generatePDF.ts +0 -74
  66. package/src/pages/api/hello.ts +0 -13
  67. package/src/pages/api/readFile.ts +0 -18
  68. package/src/pages/api/readTemplateFile.ts +0 -26
  69. package/src/pages/api/save.ts +0 -22
  70. package/src/pages/api/saveFile.ts +0 -20
  71. package/src/pages/index.tsx +0 -13
  72. package/src/pages/template/[template].tsx +0 -250
  73. package/tsconfig.json +0 -63
package/dist/index.js ADDED
@@ -0,0 +1,575 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
+
21
+ // src/components/PDF/core/LayoutPDF.tsx
22
+ import React from "react";
23
+ import { Page, Document, StyleSheet, Font, Text } from "@react-pdf/renderer";
24
+ Font.register({
25
+ family: "Times New Roman",
26
+ fonts: [
27
+ { src: "/fonts/TimesNewerRoman-Regular.otf", fontWeight: 400, fontStyle: "normal" },
28
+ { src: "/fonts/TimesNewerRoman-Bold.otf", fontWeight: 700, fontStyle: "normal" },
29
+ { src: "/fonts/TimesNewerRoman-Italic.otf", fontWeight: 400, fontStyle: "italic" },
30
+ { src: "/fonts/TimesNewerRoman-BoldItalic.otf", fontWeight: 700, fontStyle: "italic" }
31
+ // Bold Italic
32
+ ]
33
+ });
34
+ var PAPER_SIZES = {
35
+ A0: [2384, 3370],
36
+ // 841 × 1189 mm
37
+ A1: [1684, 2384],
38
+ // 594 × 841 mm
39
+ A2: [1191, 1684],
40
+ // 420 × 594 mm
41
+ A3: [842, 1191],
42
+ // 297 × 420 mm
43
+ A4: [595, 842],
44
+ // 210 × 297 mm
45
+ A5: [420, 595],
46
+ // 148 × 210 mm
47
+ A6: [298, 420],
48
+ // 105 × 148 mm
49
+ A7: [210, 298],
50
+ // 74 × 105 mm
51
+ A8: [147, 210],
52
+ // 52 × 74 mm
53
+ A9: [105, 147],
54
+ // 37 × 52 mm
55
+ A10: [74, 105]
56
+ // 26 × 37 mm
57
+ };
58
+ var styles = StyleSheet.create({
59
+ page: {
60
+ backgroundColor: "white",
61
+ padding: 72,
62
+ paddingBottom: 72 + 14,
63
+ fontFamily: "Times New Roman",
64
+ fontSize: 12,
65
+ lineHeight: 1.5,
66
+ position: "relative"
67
+ },
68
+ pageNumber: {
69
+ position: "absolute",
70
+ fontSize: 10,
71
+ top: 792 - 14,
72
+ left: 0,
73
+ right: 0,
74
+ textAlign: "center",
75
+ color: "grey"
76
+ }
77
+ });
78
+ var LayoutPDF = ({
79
+ children,
80
+ size = "A4",
81
+ orientation = "portrait",
82
+ backgroundColor = "white",
83
+ showPageNumbers = true,
84
+ padding = 72,
85
+ paddingTop,
86
+ paddingRight,
87
+ paddingBottom,
88
+ paddingLeft,
89
+ style = {},
90
+ width,
91
+ height,
92
+ fontFamily = "Helvetica",
93
+ fontSize = 12,
94
+ lineHeight = 1.5
95
+ }) => {
96
+ const pageStyle = __spreadValues(__spreadProps(__spreadValues({}, styles.page), {
97
+ backgroundColor,
98
+ fontFamily,
99
+ fontSize,
100
+ lineHeight
101
+ }), style);
102
+ if (paddingTop !== void 0 || paddingRight !== void 0 || paddingBottom !== void 0 || paddingLeft !== void 0) {
103
+ if (paddingTop !== void 0) pageStyle.paddingTop = paddingTop;
104
+ if (paddingRight !== void 0) pageStyle.paddingRight = paddingRight;
105
+ if (paddingBottom !== void 0) pageStyle.paddingBottom = paddingBottom;
106
+ if (paddingLeft !== void 0) pageStyle.paddingLeft = paddingLeft;
107
+ } else {
108
+ pageStyle.padding = padding;
109
+ if (showPageNumbers) {
110
+ pageStyle.paddingBottom = Number(padding) + 14;
111
+ }
112
+ }
113
+ let pageProps = {};
114
+ const customSize = PAPER_SIZES[size.toUpperCase()];
115
+ if (customSize) {
116
+ const [pageWidth, pageHeight] = customSize;
117
+ if (orientation === "landscape") {
118
+ pageProps = {
119
+ style: pageStyle,
120
+ size: [pageHeight, pageWidth]
121
+ };
122
+ } else {
123
+ pageProps = {
124
+ style: pageStyle,
125
+ size: [pageWidth, pageHeight]
126
+ };
127
+ }
128
+ console.log(`Using custom size for ${size}: ${JSON.stringify(pageProps.size)}`);
129
+ } else if (width && height) {
130
+ pageProps = {
131
+ style: pageStyle,
132
+ size: [width, height]
133
+ };
134
+ } else {
135
+ pageProps = {
136
+ size,
137
+ orientation,
138
+ style: pageStyle
139
+ };
140
+ }
141
+ let pageNumberStyle = __spreadValues({}, styles.pageNumber);
142
+ if (customSize) {
143
+ const [pageWidth, pageHeight] = customSize;
144
+ const actualHeight = orientation === "landscape" ? pageWidth : pageHeight;
145
+ pageNumberStyle = __spreadProps(__spreadValues({}, pageNumberStyle), {
146
+ top: actualHeight - 80
147
+ });
148
+ }
149
+ return /* @__PURE__ */ React.createElement(Document, null, /* @__PURE__ */ React.createElement(Page, __spreadValues({}, pageProps), children, /* @__PURE__ */ React.createElement(
150
+ Text,
151
+ {
152
+ style: pageNumberStyle,
153
+ render: ({ pageNumber, totalPages }) => `${pageNumber} / ${totalPages}`,
154
+ fixed: true
155
+ }
156
+ )));
157
+ };
158
+ var LayoutPDF_default = LayoutPDF;
159
+
160
+ // src/components/PDF/core/MakePDF.tsx
161
+ import React2 from "react";
162
+ import dynamic from "next/dynamic";
163
+ import { BlobProvider } from "@react-pdf/renderer";
164
+ var MakePDF = ({ namePDF = "documento.pdf", document, children = "Descargar PDF" }) => {
165
+ if (typeof window === "undefined") {
166
+ return null;
167
+ }
168
+ return /* @__PURE__ */ React2.createElement(BlobProvider, { document }, ({ blob, url, loading, error }) => {
169
+ if (loading) {
170
+ return "Cargando documento...";
171
+ }
172
+ if (error) {
173
+ return `Error: ${error.message}`;
174
+ }
175
+ let pdfURL = "";
176
+ if (blob !== null) {
177
+ pdfURL = URL.createObjectURL(blob);
178
+ }
179
+ return /* @__PURE__ */ React2.createElement("div", { className: "containerDownload" }, /* @__PURE__ */ React2.createElement("a", { href: pdfURL, download: namePDF }, children));
180
+ });
181
+ };
182
+ var MakePDF_default = dynamic(() => Promise.resolve(MakePDF), { ssr: false });
183
+
184
+ // src/components/PDF/core/Img.tsx
185
+ import React3 from "react";
186
+ import { Image, StyleSheet as StyleSheet2 } from "@react-pdf/renderer";
187
+ var styles2 = StyleSheet2.create({
188
+ image: {
189
+ width: "100%",
190
+ height: "auto",
191
+ marginBottom: 14
192
+ }
193
+ });
194
+ var Img = ({ src, alt, style }) => {
195
+ return /* @__PURE__ */ React3.createElement(Image, { src, style: [styles2.image, style] });
196
+ };
197
+ var Img_default = Img;
198
+
199
+ // src/components/PDF/core/Position.tsx
200
+ import React4 from "react";
201
+ import { View, StyleSheet as StyleSheet3 } from "@react-pdf/renderer";
202
+ var styles3 = StyleSheet3.create({
203
+ left: {
204
+ textAlign: "left"
205
+ },
206
+ right: {
207
+ textAlign: "right"
208
+ },
209
+ center: {
210
+ textAlign: "center"
211
+ }
212
+ });
213
+ var Left = ({ children, style }) => {
214
+ return /* @__PURE__ */ React4.createElement(View, { style: [styles3.left, style] }, children);
215
+ };
216
+ var Right = ({ children, style }) => {
217
+ return /* @__PURE__ */ React4.createElement(View, { style: [styles3.right, style] }, children);
218
+ };
219
+ var Center = ({ children, style }) => {
220
+ return /* @__PURE__ */ React4.createElement(View, { style: [styles3.center, style] }, children);
221
+ };
222
+
223
+ // src/components/PDF/core/Etiquetas.tsx
224
+ import React5 from "react";
225
+ import { Text as Text2, StyleSheet as StyleSheet4, Link } from "@react-pdf/renderer";
226
+ var styles4 = StyleSheet4.create({
227
+ p: {
228
+ fontSize: 12,
229
+ marginBottom: 14,
230
+ lineHeight: 1.5
231
+ },
232
+ h1: {
233
+ fontSize: 24,
234
+ fontWeight: "bold",
235
+ marginBottom: 12
236
+ },
237
+ h2: {
238
+ fontSize: 20,
239
+ fontWeight: "bold",
240
+ marginBottom: 10
241
+ },
242
+ h3: {
243
+ fontSize: 18,
244
+ fontWeight: "bold",
245
+ marginBottom: 8
246
+ },
247
+ h4: {
248
+ fontSize: 16,
249
+ fontWeight: "bold",
250
+ marginBottom: 6
251
+ },
252
+ h5: {
253
+ fontSize: 14,
254
+ fontWeight: "bold",
255
+ marginBottom: 4
256
+ },
257
+ h6: {
258
+ fontSize: 12,
259
+ fontWeight: "bold",
260
+ marginBottom: 0
261
+ },
262
+ strong: {
263
+ fontWeight: "bold"
264
+ },
265
+ em: {
266
+ fontStyle: "italic"
267
+ },
268
+ u: {
269
+ textDecoration: "underline"
270
+ },
271
+ small: {
272
+ fontSize: 10
273
+ },
274
+ blockquote: {
275
+ marginLeft: 20,
276
+ marginRight: 20,
277
+ fontStyle: "italic",
278
+ borderLeft: "4px solid #ccc",
279
+ paddingLeft: 10
280
+ },
281
+ mark: {
282
+ backgroundColor: "yellow"
283
+ },
284
+ A: {
285
+ color: "#3d65fd",
286
+ textDecoration: "none"
287
+ },
288
+ br: {
289
+ width: "100%",
290
+ height: 1,
291
+ marginTop: 7,
292
+ marginBottom: 7
293
+ }
294
+ });
295
+ var P = ({ children, style }) => {
296
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [styles4.p, style] }, children);
297
+ };
298
+ var H1 = ({ children, style }) => {
299
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [styles4.h1, style] }, children);
300
+ };
301
+ var H2 = ({ children, style }) => {
302
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [styles4.h2, style] }, children);
303
+ };
304
+ var H3 = ({ children, style }) => {
305
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [styles4.h3, style] }, children);
306
+ };
307
+ var H4 = ({ children, style }) => {
308
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [styles4.h4, style] }, children);
309
+ };
310
+ var H5 = ({ children, style }) => {
311
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [styles4.h5, style] }, children);
312
+ };
313
+ var H6 = ({ children, style }) => {
314
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [styles4.h6, style] }, children);
315
+ };
316
+ var Strong = ({ children, style }) => {
317
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [styles4.strong, style] }, children);
318
+ };
319
+ var Em = ({ children, style }) => {
320
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [styles4.em, style] }, children);
321
+ };
322
+ var U = ({ children, style }) => {
323
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [styles4.u, style] }, children);
324
+ };
325
+ var Small = ({ children, style }) => {
326
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [styles4.small, style] }, children);
327
+ };
328
+ var Blockquote = ({ children, style }) => {
329
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [styles4.blockquote, style] }, children);
330
+ };
331
+ var Mark = ({ children, style }) => {
332
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [styles4.mark, style] }, children);
333
+ };
334
+ var A = ({ children, style, href }) => {
335
+ return /* @__PURE__ */ React5.createElement(Link, { src: href, style: [styles4.A, style] }, children);
336
+ };
337
+ var BR = ({ style }) => {
338
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [styles4.br, style] }, "\n");
339
+ };
340
+ var Span = ({ children, style }) => {
341
+ return /* @__PURE__ */ React5.createElement(Text2, { style: [style] }, children);
342
+ };
343
+
344
+ // src/components/PDF/core/Tablet.tsx
345
+ import React6 from "react";
346
+ import { View as View2, Text as Text3, StyleSheet as StyleSheet5 } from "@react-pdf/renderer";
347
+ var styles5 = StyleSheet5.create({
348
+ table: {
349
+ width: "100%",
350
+ borderWidth: 1,
351
+ borderColor: "#000",
352
+ overflow: "hidden",
353
+ marginBottom: 20
354
+ },
355
+ thead: {
356
+ backgroundColor: "#f0f0f0"
357
+ },
358
+ tbody: {},
359
+ tr: {
360
+ flexDirection: "row",
361
+ borderBottomWidth: 1,
362
+ borderColor: "#000"
363
+ },
364
+ th: {
365
+ paddingTop: 4,
366
+ fontSize: 10,
367
+ fontFamily: "Helvetica",
368
+ fontWeight: "bold",
369
+ borderRight: 1,
370
+ borderColor: "#000",
371
+ textAlign: "center"
372
+ },
373
+ td: {
374
+ paddingTop: 4,
375
+ paddingLeft: 8,
376
+ paddingRight: 8,
377
+ fontSize: 10,
378
+ fontFamily: "Helvetica",
379
+ borderRight: 1,
380
+ borderColor: "#000"
381
+ },
382
+ cellSmall: {
383
+ width: "25%"
384
+ },
385
+ cellMedium: {
386
+ width: "33.33%"
387
+ },
388
+ cellLarge: {
389
+ width: "50%"
390
+ }
391
+ });
392
+ var cellSizeMapping = {
393
+ small: styles5.cellSmall,
394
+ medium: styles5.cellMedium,
395
+ large: styles5.cellLarge
396
+ };
397
+ var Table = ({ children, style }) => {
398
+ return /* @__PURE__ */ React6.createElement(View2, { style: [styles5.table, style] }, children);
399
+ };
400
+ var Thead = ({ children, style }) => {
401
+ return /* @__PURE__ */ React6.createElement(View2, { style: [styles5.thead, style] }, children);
402
+ };
403
+ var Tbody = ({ children, style }) => {
404
+ return /* @__PURE__ */ React6.createElement(View2, { style: [styles5.tbody, style] }, children);
405
+ };
406
+ var Tr = ({ children, style }) => {
407
+ return /* @__PURE__ */ React6.createElement(View2, { style: [styles5.tr, style] }, children);
408
+ };
409
+ var Th = ({ children, style, cellSize = "medium", width, height, colSpan }) => {
410
+ const spanWidth = colSpan ? `${100 / 3 * colSpan}%` : void 0;
411
+ const sizeStyle = cellSizeMapping[cellSize];
412
+ const customStyle = __spreadValues({
413
+ width: width || spanWidth || (sizeStyle == null ? void 0 : sizeStyle.width)
414
+ }, height !== void 0 && { height });
415
+ return /* @__PURE__ */ React6.createElement(View2, { style: [styles5.th, customStyle, style] }, /* @__PURE__ */ React6.createElement(Text3, null, children));
416
+ };
417
+ var Td = ({ children, style, cellSize = "medium", width, height, colSpan }) => {
418
+ const spanWidth = colSpan ? `${100 / 3 * colSpan}%` : void 0;
419
+ const sizeStyle = cellSizeMapping[cellSize];
420
+ const customStyle = __spreadValues({
421
+ width: width || spanWidth || (sizeStyle == null ? void 0 : sizeStyle.width)
422
+ }, height !== void 0 && { height });
423
+ return /* @__PURE__ */ React6.createElement(View2, { style: [styles5.td, customStyle, style] }, /* @__PURE__ */ React6.createElement(Text3, null, children));
424
+ };
425
+
426
+ // src/components/PDF/core/Grid.tsx
427
+ import React7 from "react";
428
+ import { View as View3, StyleSheet as StyleSheet6 } from "@react-pdf/renderer";
429
+ var styles6 = StyleSheet6.create({
430
+ container: {
431
+ width: "100%",
432
+ paddingHorizontal: 20
433
+ },
434
+ row: {
435
+ flexDirection: "row",
436
+ flexWrap: "wrap",
437
+ marginHorizontal: -5
438
+ // Negative margin to offset column padding
439
+ },
440
+ col: {
441
+ paddingHorizontal: 5
442
+ },
443
+ col1: { width: "8.33%" },
444
+ col2: { width: "16.66%" },
445
+ col3: { width: "25%" },
446
+ col4: { width: "33.33%" },
447
+ col5: { width: "41.66%" },
448
+ col6: { width: "50%" },
449
+ col7: { width: "58.33%" },
450
+ col8: { width: "66.66%" },
451
+ col9: { width: "75%" },
452
+ col10: { width: "83.33%" },
453
+ col11: { width: "91.66%" },
454
+ col12: { width: "100%" }
455
+ });
456
+ var Container = ({ children, style }) => {
457
+ return /* @__PURE__ */ React7.createElement(View3, { style: [styles6.container, style] }, children);
458
+ };
459
+ var Row = ({ children, style }) => {
460
+ return /* @__PURE__ */ React7.createElement(View3, { style: [styles6.row, style] }, children);
461
+ };
462
+ var Col1 = ({ children, style }) => {
463
+ return /* @__PURE__ */ React7.createElement(View3, { style: [styles6.col, styles6.col1, style] }, children);
464
+ };
465
+ var Col2 = ({ children, style }) => {
466
+ return /* @__PURE__ */ React7.createElement(View3, { style: [styles6.col, styles6.col2, style] }, children);
467
+ };
468
+ var Col3 = ({ children, style }) => {
469
+ return /* @__PURE__ */ React7.createElement(View3, { style: [styles6.col, styles6.col3, style] }, children);
470
+ };
471
+ var Col4 = ({ children, style }) => {
472
+ return /* @__PURE__ */ React7.createElement(View3, { style: [styles6.col, styles6.col4, style] }, children);
473
+ };
474
+ var Col5 = ({ children, style }) => {
475
+ return /* @__PURE__ */ React7.createElement(View3, { style: [styles6.col, styles6.col5, style] }, children);
476
+ };
477
+ var Col6 = ({ children, style }) => {
478
+ return /* @__PURE__ */ React7.createElement(View3, { style: [styles6.col, styles6.col6, style] }, children);
479
+ };
480
+ var Col7 = ({ children, style }) => {
481
+ return /* @__PURE__ */ React7.createElement(View3, { style: [styles6.col, styles6.col7, style] }, children);
482
+ };
483
+ var Col8 = ({ children, style }) => {
484
+ return /* @__PURE__ */ React7.createElement(View3, { style: [styles6.col, styles6.col8, style] }, children);
485
+ };
486
+ var Col9 = ({ children, style }) => {
487
+ return /* @__PURE__ */ React7.createElement(View3, { style: [styles6.col, styles6.col9, style] }, children);
488
+ };
489
+ var Col10 = ({ children, style }) => {
490
+ return /* @__PURE__ */ React7.createElement(View3, { style: [styles6.col, styles6.col10, style] }, children);
491
+ };
492
+ var Col11 = ({ children, style }) => {
493
+ return /* @__PURE__ */ React7.createElement(View3, { style: [styles6.col, styles6.col11, style] }, children);
494
+ };
495
+ var Col12 = ({ children, style }) => {
496
+ return /* @__PURE__ */ React7.createElement(View3, { style: [styles6.col, styles6.col12, style] }, children);
497
+ };
498
+
499
+ // src/components/PDF/core/PageElements.tsx
500
+ import React8 from "react";
501
+ import { Text as Text4, View as View4, StyleSheet as StyleSheet7 } from "@react-pdf/renderer";
502
+ var styles7 = StyleSheet7.create({
503
+ header: {
504
+ position: "absolute",
505
+ top: 20,
506
+ left: 0,
507
+ right: 0,
508
+ textAlign: "center",
509
+ fontSize: 10,
510
+ color: "#666",
511
+ paddingHorizontal: 40
512
+ },
513
+ footer: {
514
+ position: "absolute",
515
+ bottom: 20,
516
+ left: 0,
517
+ right: 0,
518
+ textAlign: "center",
519
+ fontSize: 10,
520
+ color: "#666",
521
+ paddingHorizontal: 40
522
+ }
523
+ });
524
+ var Header = ({ children, style, fixed = false }) => {
525
+ return /* @__PURE__ */ React8.createElement(View4, { style: [styles7.header, style], fixed }, typeof children === "string" ? /* @__PURE__ */ React8.createElement(Text4, null, children) : children);
526
+ };
527
+ var Footer = ({ children, style, fixed = false }) => {
528
+ return /* @__PURE__ */ React8.createElement(View4, { style: [styles7.footer, style], fixed }, typeof children === "string" ? /* @__PURE__ */ React8.createElement(Text4, null, children) : children);
529
+ };
530
+ export {
531
+ A,
532
+ BR,
533
+ Blockquote,
534
+ Center,
535
+ Col1,
536
+ Col10,
537
+ Col11,
538
+ Col12,
539
+ Col2,
540
+ Col3,
541
+ Col4,
542
+ Col5,
543
+ Col6,
544
+ Col7,
545
+ Col8,
546
+ Col9,
547
+ Container,
548
+ Em,
549
+ Footer,
550
+ H1,
551
+ H2,
552
+ H3,
553
+ H4,
554
+ H5,
555
+ H6,
556
+ Header,
557
+ Img_default as Img,
558
+ LayoutPDF_default as LayoutPDF,
559
+ Left,
560
+ MakePDF_default as MakePDF,
561
+ Mark,
562
+ P,
563
+ Right,
564
+ Row,
565
+ Small,
566
+ Span,
567
+ Strong,
568
+ Table,
569
+ Tbody,
570
+ Td,
571
+ Th,
572
+ Thead,
573
+ Tr,
574
+ U
575
+ };
package/package.json CHANGED
@@ -1,9 +1,13 @@
1
1
  {
2
2
  "name": "react-pdf-levelup",
3
- "version": "1.0.4",
3
+ "version": "1.0.8",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
7
+ "files": [
8
+ "dist"
9
+ ],
10
+ "license": "MIT",
7
11
  "scripts": {
8
12
  "dev": "next dev",
9
13
  "build": "next build",
@@ -11,7 +15,9 @@
11
15
  "lint": "next lint",
12
16
  "upVersion": "node ./fn/upVersion.js",
13
17
  "update:jsx": "node ./fn/updateTsconfig.js",
14
- "publicar": "npm run upVersion && npm run update:jsx && npm publish",
18
+ "clean-dist": "rimraf dist",
19
+ "build-lib": "npm run clean-dist && tsup",
20
+ "publicar": "npm run upVersion && npm run update:jsx && npm run build-lib && npm publish",
15
21
  "postinstall": "node ./fn/postinstall.js"
16
22
  },
17
23
  "dependencies": {
package/fn/aggAlias.js DELETED
@@ -1,21 +0,0 @@
1
- import fs from 'fs';
2
-
3
- const updateTsconfigPaths = () => {
4
- const tsconfigPath = './tsconfig.json';
5
- const tsconfig = JSON.parse(fs.readFileSync(tsconfigPath, 'utf8'));
6
-
7
- tsconfig.compilerOptions = tsconfig.compilerOptions || {};
8
- tsconfig.compilerOptions.paths = {
9
- "@components/*": ["./src/components/*"],
10
- "@fn/*": ["./src/functions/*"],
11
- "@env": ["./env.ts"],
12
- "@public/*": ["./public/*"],
13
- "@nano": ["./src/components/nano/index.tsx"],
14
- };
15
-
16
- fs.writeFileSync(tsconfigPath, JSON.stringify(tsconfig, null, 2), 'utf8');
17
-
18
- console.log('tsconfig.json actualizado correctamente');
19
- };
20
-
21
- updateTsconfigPaths();