@embedpdf/models 2.2.0 → 2.3.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
@@ -829,6 +829,35 @@ export declare enum PdfAnnotationLineEnding {
829
829
  */
830
830
  Unknown = 10
831
831
  }
832
+ /**
833
+ * Reply type of annotation (RT property per ISO 32000-2)
834
+ *
835
+ * Specifies how an annotation relates to another annotation when it is
836
+ * a reply (via IRT - In Reply To). Valid values are:
837
+ * - Reply (/R): Normal comment reply (default if RT is missing)
838
+ * - Group (/Group): Logical grouping of annotations
839
+ *
840
+ * @public
841
+ */
842
+ export declare enum PdfAnnotationReplyType {
843
+ /**
844
+ * Unknown or invalid reply type
845
+ */
846
+ Unknown = 0,
847
+ /**
848
+ * /R - Comment reply (default if RT is missing)
849
+ * The annotation is a child comment of the annotation referenced by IRT.
850
+ * Used for comment threads, reviewer discussions, sticky-note replies.
851
+ */
852
+ Reply = 1,
853
+ /**
854
+ * /Group - Logical grouping
855
+ * The annotation is grouped with the annotation referenced by IRT.
856
+ * They represent the same logical object. Used when multiple annotations
857
+ * act as one unit (e.g., visual shape + metadata/label).
858
+ */
859
+ Group = 2
860
+ }
832
861
  /**
833
862
  * Basic information of pdf annotation
834
863
  *
@@ -883,6 +912,14 @@ export interface PdfAnnotationObjectBase {
883
912
  * Custom data of the annotation
884
913
  */
885
914
  custom?: any;
915
+ /**
916
+ * In reply to annotation id (IRT - for grouping or reply threads)
917
+ */
918
+ inReplyToId?: string;
919
+ /**
920
+ * Reply type (how this annotation relates to the parent via IRT)
921
+ */
922
+ replyType?: PdfAnnotationReplyType;
886
923
  }
887
924
  /**
888
925
  * Popup annotation
@@ -900,10 +937,6 @@ export interface PdfPopupAnnoObject extends PdfAnnotationObjectBase {
900
937
  * Whether the popup is opened or not
901
938
  */
902
939
  open: boolean;
903
- /**
904
- * In reply to id
905
- */
906
- inReplyToId?: string;
907
940
  }
908
941
  /**
909
942
  * Pdf Link annotation
@@ -917,6 +950,22 @@ export interface PdfLinkAnnoObject extends PdfAnnotationObjectBase {
917
950
  * target of the link
918
951
  */
919
952
  target: PdfLinkTarget | undefined;
953
+ /**
954
+ * Stroke color of the link border (e.g., "#00A5E4")
955
+ */
956
+ strokeColor?: string;
957
+ /**
958
+ * Width of the link border (default: 2)
959
+ */
960
+ strokeWidth?: number;
961
+ /**
962
+ * Style of the link border (default: UNDERLINE)
963
+ */
964
+ strokeStyle?: PdfAnnotationBorderStyle;
965
+ /**
966
+ * Dash pattern for dashed border style
967
+ */
968
+ strokeDashArray?: number[];
920
969
  }
921
970
  /**
922
971
  * Pdf Text annotation
@@ -938,10 +987,6 @@ export interface PdfTextAnnoObject extends PdfAnnotationObjectBase {
938
987
  * opacity of text annotation
939
988
  */
940
989
  opacity?: number;
941
- /**
942
- * In reply to id
943
- */
944
- inReplyToId?: string;
945
990
  /**
946
991
  * State of the text annotation
947
992
  */
@@ -1208,9 +1253,13 @@ export interface PdfInkAnnoObject extends PdfAnnotationObjectBase {
1208
1253
  */
1209
1254
  inkList: PdfInkListObject[];
1210
1255
  /**
1211
- * color of ink annotation
1256
+ * Color of the ink stroke (preferred over deprecated `color`)
1212
1257
  */
1213
- color: string;
1258
+ strokeColor?: string;
1259
+ /**
1260
+ * @deprecated Use strokeColor instead. Will be removed in next major version.
1261
+ */
1262
+ color?: string;
1214
1263
  /**
1215
1264
  * opacity of ink annotation
1216
1265
  */
@@ -1364,9 +1413,13 @@ export interface PdfHighlightAnnoObject extends PdfAnnotationObjectBase {
1364
1413
  */
1365
1414
  contents?: string;
1366
1415
  /**
1367
- * color of highlight annotation
1416
+ * Color of the highlight markup (preferred over deprecated `color`)
1368
1417
  */
1369
- color: string;
1418
+ strokeColor?: string;
1419
+ /**
1420
+ * @deprecated Use strokeColor instead. Will be removed in next major version.
1421
+ */
1422
+ color?: string;
1370
1423
  /**
1371
1424
  * opacity of highlight annotation
1372
1425
  */
@@ -1608,19 +1661,23 @@ export interface PdfSquigglyAnnoObject extends PdfAnnotationObjectBase {
1608
1661
  /** {@inheritDoc PdfAnnotationObjectBase.type} */
1609
1662
  type: PdfAnnotationSubtype.SQUIGGLY;
1610
1663
  /**
1611
- * Text contents of the highlight annotation
1664
+ * Text contents of the squiggly annotation
1612
1665
  */
1613
1666
  contents?: string;
1614
1667
  /**
1615
- * color of strike out annotation
1668
+ * Color of the squiggly markup (preferred over deprecated `color`)
1616
1669
  */
1617
- color: string;
1670
+ strokeColor?: string;
1618
1671
  /**
1619
- * opacity of strike out annotation
1672
+ * @deprecated Use strokeColor instead. Will be removed in next major version.
1673
+ */
1674
+ color?: string;
1675
+ /**
1676
+ * opacity of squiggly annotation
1620
1677
  */
1621
1678
  opacity: number;
1622
1679
  /**
1623
- * quads of highlight area
1680
+ * quads of squiggly area
1624
1681
  */
1625
1682
  segmentRects: Rect[];
1626
1683
  }
@@ -1633,19 +1690,23 @@ export interface PdfUnderlineAnnoObject extends PdfAnnotationObjectBase {
1633
1690
  /** {@inheritDoc PdfAnnotationObjectBase.type} */
1634
1691
  type: PdfAnnotationSubtype.UNDERLINE;
1635
1692
  /**
1636
- * Text contents of the highlight annotation
1693
+ * Text contents of the underline annotation
1637
1694
  */
1638
1695
  contents?: string;
1639
1696
  /**
1640
- * color of strike out annotation
1697
+ * Color of the underline markup (preferred over deprecated `color`)
1641
1698
  */
1642
- color: string;
1699
+ strokeColor?: string;
1643
1700
  /**
1644
- * opacity of strike out annotation
1701
+ * @deprecated Use strokeColor instead. Will be removed in next major version.
1702
+ */
1703
+ color?: string;
1704
+ /**
1705
+ * opacity of underline annotation
1645
1706
  */
1646
1707
  opacity: number;
1647
1708
  /**
1648
- * quads of highlight area
1709
+ * quads of underline area
1649
1710
  */
1650
1711
  segmentRects: Rect[];
1651
1712
  }
@@ -1662,15 +1723,19 @@ export interface PdfStrikeOutAnnoObject extends PdfAnnotationObjectBase {
1662
1723
  */
1663
1724
  contents?: string;
1664
1725
  /**
1665
- * color of strike out annotation
1726
+ * Color of the strikeout markup (preferred over deprecated `color`)
1666
1727
  */
1667
- color: string;
1728
+ strokeColor?: string;
1729
+ /**
1730
+ * @deprecated Use strokeColor instead. Will be removed in next major version.
1731
+ */
1732
+ color?: string;
1668
1733
  /**
1669
1734
  * opacity of strike out annotation
1670
1735
  */
1671
1736
  opacity: number;
1672
1737
  /**
1673
- * quads of highlight area
1738
+ * quads of strikeout area
1674
1739
  */
1675
1740
  segmentRects: Rect[];
1676
1741
  }
@@ -1720,7 +1785,11 @@ export interface PdfFreeTextAnnoObject extends PdfAnnotationObjectBase {
1720
1785
  */
1721
1786
  opacity: number;
1722
1787
  /**
1723
- * Background color of the free text annotation
1788
+ * Background/fill color of the free text annotation (matches shape convention)
1789
+ */
1790
+ color?: string;
1791
+ /**
1792
+ * @deprecated Use color instead. Will be removed in next major version.
1724
1793
  */
1725
1794
  backgroundColor?: string;
1726
1795
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@embedpdf/models",
3
- "version": "2.2.0",
3
+ "version": "2.3.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",