Since content isn't actually needed for anything in the PdfHighlighter, it should be removed from the Highlight type. As stated in #5 , for large numbers of highlights, especially images, this can be beneficial for performance and storage since image content no longer needs to be loaded on every render or stored in a database if not required.
Since developers might already be using content to determine whether a highlight is an area highlight or text highlight, we simply add a new type property that makes this explicit. However, to avoid any breaking changes, type has been marked as optional and content is kept in Highlight but made optional.
Since
content
isn't actually needed for anything in thePdfHighlighter
, it should be removed from theHighlight
type. As stated in #5 , for large numbers of highlights, especially images, this can be beneficial for performance and storage since image content no longer needs to be loaded on every render or stored in a database if not required.Since developers might already be using
content
to determine whether a highlight is an area highlight or text highlight, we simply add a newtype
property that makes this explicit. However, to avoid any breaking changes,type
has been marked as optional andcontent
is kept inHighlight
but made optional.