@pdfme/common 6.2.3 → 6.2.4-dev.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/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import { Buffer } from "buffer";
3
3
  import { PDFName } from "@pdfme/pdf-lib";
4
4
  import * as acorn from "acorn";
5
5
  //#region src/version.ts
6
- var PDFME_VERSION = "6.2.3";
6
+ var PDFME_VERSION = "6.2.4";
7
7
  //#endregion
8
8
  //#region src/pageSize.ts
9
9
  var PAGE_SIZE_PRESETS = {
@@ -215,6 +215,14 @@ z.object({
215
215
  "schemas.table.headStyle": z.string(),
216
216
  "schemas.table.bodyStyle": z.string(),
217
217
  "schemas.table.columnStyle": z.string(),
218
+ "schemas.table.columnLabel": z.string(),
219
+ "schemas.table.cellType.text": z.string(),
220
+ "schemas.table.cellType.image": z.string(),
221
+ "schemas.table.imageHeightMode.fixed": z.string(),
222
+ "schemas.table.imageHeightMode.auto": z.string(),
223
+ "schemas.table.imageCell.select": z.string(),
224
+ "schemas.table.imageCell.remove": z.string(),
225
+ "schemas.table.imageCell.placeholder": z.string(),
218
226
  "schemas.date.format": z.string(),
219
227
  "schemas.date.locale": z.string(),
220
228
  "schemas.select.options": z.string(),
@@ -1082,8 +1090,11 @@ function placeUnitsOnPages(schema, dynamicLayout, startGlobalY, contentHeight, p
1082
1090
  const isAtPageTop = currentYInPage <= EPSILON;
1083
1091
  if (dynamicLayout.avoidFirstUnitOnly && isSplittable && startUnitIndex === 0 && currentUnitIndex === 1 && dynamicHeights.length > 1 && !isAtPageTop) {
1084
1092
  currentUnitIndex = 0;
1085
- currentPageIndex++;
1086
- currentYInPage = 0;
1093
+ if (pages[currentPageIndex].length === 0) currentYInPage = 0;
1094
+ else {
1095
+ currentPageIndex++;
1096
+ currentYInPage = 0;
1097
+ }
1087
1098
  continue;
1088
1099
  }
1089
1100
  if (currentUnitIndex === startUnitIndex) {