@embedpdf/models 2.7.0 → 2.9.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/pdf.d.ts CHANGED
@@ -893,6 +893,18 @@ export declare enum PdfAnnotationReplyType {
893
893
  */
894
894
  Group = 2
895
895
  }
896
+ /**
897
+ * Rectangle differences (/RD) defining the inset between an annotation's
898
+ * /Rect and the actual drawn appearance.
899
+ *
900
+ * @public
901
+ */
902
+ export interface PdfRectDifferences {
903
+ left: number;
904
+ top: number;
905
+ right: number;
906
+ bottom: number;
907
+ }
896
908
  /**
897
909
  * Basic information of pdf annotation
898
910
  *
@@ -1032,7 +1044,11 @@ export interface PdfTextAnnoObject extends PdfAnnotationObjectBase {
1032
1044
  */
1033
1045
  contents: string;
1034
1046
  /**
1035
- * color of text annotation
1047
+ * Color of the text annotation (preferred over deprecated `color`)
1048
+ */
1049
+ strokeColor?: string;
1050
+ /**
1051
+ * @deprecated Use strokeColor instead. Will be removed in next major version.
1036
1052
  */
1037
1053
  color?: string;
1038
1054
  /**
@@ -1362,6 +1378,14 @@ export interface PdfPolygonAnnoObject extends PdfAnnotationObjectBase {
1362
1378
  * stroke dash array of polygon annotation
1363
1379
  */
1364
1380
  strokeDashArray?: number[];
1381
+ /**
1382
+ * cloudy border intensity of polygon annotation
1383
+ */
1384
+ cloudyBorderIntensity?: number;
1385
+ /**
1386
+ * Rectangle Differences (/RD) - inset padding from Rect to the drawn area.
1387
+ */
1388
+ rectangleDifferences?: PdfRectDifferences;
1365
1389
  }
1366
1390
  /**
1367
1391
  * PDF polyline annotation
@@ -1652,9 +1676,9 @@ export interface PdfCircleAnnoObject extends PdfAnnotationObjectBase {
1652
1676
  */
1653
1677
  cloudyBorderIntensity?: number;
1654
1678
  /**
1655
- * cloudy border inset of circle annotation
1679
+ * Rectangle Differences (/RD) - inset padding from Rect to the drawn area.
1656
1680
  */
1657
- cloudyBorderInset?: number[];
1681
+ rectangleDifferences?: PdfRectDifferences;
1658
1682
  }
1659
1683
  /**
1660
1684
  * Pdf square annotation
@@ -1701,9 +1725,9 @@ export interface PdfSquareAnnoObject extends PdfAnnotationObjectBase {
1701
1725
  */
1702
1726
  cloudyBorderIntensity?: number;
1703
1727
  /**
1704
- * cloudy border inset of circle annotation
1728
+ * Rectangle Differences (/RD) - inset padding from Rect to the drawn area.
1705
1729
  */
1706
- cloudyBorderInset?: number[];
1730
+ rectangleDifferences?: PdfRectDifferences;
1707
1731
  }
1708
1732
  /**
1709
1733
  * Pdf squiggly annotation
@@ -1800,6 +1824,14 @@ export interface PdfStrikeOutAnnoObject extends PdfAnnotationObjectBase {
1800
1824
  export interface PdfCaretAnnoObject extends PdfAnnotationObjectBase {
1801
1825
  /** {@inheritDoc PdfAnnotationObjectBase.type} */
1802
1826
  type: PdfAnnotationSubtype.CARET;
1827
+ /** Stroke color of the caret symbol */
1828
+ strokeColor?: string;
1829
+ /** Opacity (0-1) */
1830
+ opacity?: number;
1831
+ /**
1832
+ * Rectangle Differences (/RD) - inset padding from Rect to the drawn area.
1833
+ */
1834
+ rectangleDifferences?: PdfRectDifferences;
1803
1835
  }
1804
1836
  /**
1805
1837
  * Pdf free text annotation
@@ -1853,6 +1885,10 @@ export interface PdfFreeTextAnnoObject extends PdfAnnotationObjectBase {
1853
1885
  * Rich content of the free text annotation
1854
1886
  */
1855
1887
  richContent?: string;
1888
+ /**
1889
+ * Rectangle Differences (/RD) - inset padding from Rect to the drawn area.
1890
+ */
1891
+ rectangleDifferences?: PdfRectDifferences;
1856
1892
  }
1857
1893
  /**
1858
1894
  * Pdf redact annotation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embedpdf/models",
3
- "version": "2.7.0",
3
+ "version": "2.9.0",
4
4
  "private": false,
5
5
  "description": "Shared type definitions, data models, and utility helpers (geometry, tasks, logging, PDF primitives) that underpin every package in the EmbedPDF ecosystem.",
6
6
  "type": "module",