@embedpdf/models 2.2.0 → 2.4.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.js CHANGED
@@ -218,6 +218,7 @@ function restoreOffset(offset, rotation, scaleFactor) {
218
218
  y: offsetY
219
219
  };
220
220
  }
221
+ const EMPTY_RECT = { origin: { x: 0, y: 0 }, size: { width: 0, height: 0 } };
221
222
  function boundingRect(rects) {
222
223
  if (rects.length === 0) return null;
223
224
  let minX = rects[0].origin.x, minY = rects[0].origin.y, maxX = rects[0].origin.x + rects[0].size.width, maxY = rects[0].origin.y + rects[0].size.height;
@@ -238,6 +239,9 @@ function boundingRect(rects) {
238
239
  }
239
240
  };
240
241
  }
242
+ function boundingRectOrEmpty(rects) {
243
+ return boundingRect(rects) ?? EMPTY_RECT;
244
+ }
241
245
  function buildUserToDeviceMatrix(rect, rotation, outW, outH) {
242
246
  const L = rect.origin.x;
243
247
  const B = rect.origin.y;
@@ -1088,6 +1092,12 @@ var PdfAnnotationLineEnding = /* @__PURE__ */ ((PdfAnnotationLineEnding2) => {
1088
1092
  PdfAnnotationLineEnding2[PdfAnnotationLineEnding2["Unknown"] = 10] = "Unknown";
1089
1093
  return PdfAnnotationLineEnding2;
1090
1094
  })(PdfAnnotationLineEnding || {});
1095
+ var PdfAnnotationReplyType = /* @__PURE__ */ ((PdfAnnotationReplyType2) => {
1096
+ PdfAnnotationReplyType2[PdfAnnotationReplyType2["Unknown"] = 0] = "Unknown";
1097
+ PdfAnnotationReplyType2[PdfAnnotationReplyType2["Reply"] = 1] = "Reply";
1098
+ PdfAnnotationReplyType2[PdfAnnotationReplyType2["Group"] = 2] = "Group";
1099
+ return PdfAnnotationReplyType2;
1100
+ })(PdfAnnotationReplyType || {});
1091
1101
  var PDF_FORM_FIELD_TYPE = /* @__PURE__ */ ((PDF_FORM_FIELD_TYPE2) => {
1092
1102
  PDF_FORM_FIELD_TYPE2[PDF_FORM_FIELD_TYPE2["UNKNOWN"] = 0] = "UNKNOWN";
1093
1103
  PDF_FORM_FIELD_TYPE2[PDF_FORM_FIELD_TYPE2["PUSHBUTTON"] = 1] = "PUSHBUTTON";
@@ -1110,6 +1120,7 @@ var PDF_FORM_FIELD_TYPE = /* @__PURE__ */ ((PDF_FORM_FIELD_TYPE2) => {
1110
1120
  var PdfAnnotationColorType = /* @__PURE__ */ ((PdfAnnotationColorType2) => {
1111
1121
  PdfAnnotationColorType2[PdfAnnotationColorType2["Color"] = 0] = "Color";
1112
1122
  PdfAnnotationColorType2[PdfAnnotationColorType2["InteriorColor"] = 1] = "InteriorColor";
1123
+ PdfAnnotationColorType2[PdfAnnotationColorType2["OverlayColor"] = 2] = "OverlayColor";
1113
1124
  return PdfAnnotationColorType2;
1114
1125
  })(PdfAnnotationColorType || {});
1115
1126
  var PdfAnnotationBorderStyle = /* @__PURE__ */ ((PdfAnnotationBorderStyle2) => {
@@ -2029,6 +2040,7 @@ export {
2029
2040
  PdfAnnotationIcon,
2030
2041
  PdfAnnotationLineEnding,
2031
2042
  PdfAnnotationObjectStatus,
2043
+ PdfAnnotationReplyType,
2032
2044
  PdfAnnotationState,
2033
2045
  PdfAnnotationStateModel,
2034
2046
  PdfAnnotationSubtype,
@@ -2071,6 +2083,7 @@ export {
2071
2083
  blendModeToCss,
2072
2084
  blendModeValues,
2073
2085
  boundingRect,
2086
+ boundingRectOrEmpty,
2074
2087
  buildPermissions,
2075
2088
  buildUserToDeviceMatrix,
2076
2089
  calculateAngle,