@pdfme/common 4.5.0 → 4.5.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pdfme/common",
3
- "version": "4.5.0",
3
+ "version": "4.5.1",
4
4
  "sideEffects": false,
5
5
  "author": "hand-dot",
6
6
  "license": "MIT",
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 heights = await getDynamicHeights(input?.[key] || '', opt);
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