@pdfme/common 4.5.0-dev.1 → 4.5.0-dev.2
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/cjs/src/helper.js +2 -1
- package/dist/cjs/src/helper.js.map +1 -1
- package/dist/cjs/src/schema.js +2 -0
- package/dist/cjs/src/schema.js.map +1 -1
- package/dist/esm/src/helper.js +2 -1
- package/dist/esm/src/helper.js.map +1 -1
- package/dist/esm/src/schema.js +2 -0
- package/dist/esm/src/schema.js.map +1 -1
- package/dist/types/src/schema.d.ts +637 -0
- package/package.json +1 -1
- package/src/helper.ts +2 -1
- package/src/schema.ts +2 -0
package/package.json
CHANGED
package/src/helper.ts
CHANGED
@@ -349,7 +349,8 @@ async function createOnePage(
|
|
349
349
|
const { position, width } = schema;
|
350
350
|
|
351
351
|
const opt = { schema, basePdf, options, _cache };
|
352
|
-
const
|
352
|
+
const value = (schema.readOnly ? schema.content : input?.[key]) || '';
|
353
|
+
const heights = await getDynamicHeights(value, opt);
|
353
354
|
|
354
355
|
const heightsSum = heights.reduce((acc, cur) => acc + cur, 0);
|
355
356
|
const originalHeight = schema.height;
|
package/src/schema.ts
CHANGED
@@ -93,6 +93,8 @@ export const Schema = z
|
|
93
93
|
opacity: z.number().optional(),
|
94
94
|
readOnly: z.boolean().optional(),
|
95
95
|
required: z.boolean().optional(),
|
96
|
+
__bodyRange: z.object({ start: z.number(), end: z.number().optional() }).optional(),
|
97
|
+
__isSplit: z.boolean().optional(),
|
96
98
|
})
|
97
99
|
.passthrough();
|
98
100
|
|