Skip to content

7.0.0

Compare
Choose a tag to compare
@DanielArnould DanielArnould released this 28 Nov 10:12
· 76 commits to main since this release

7.0.0

Here are some brief notes on what has been changed in this fork of react-pdf-highlighter. Note: this list is certainly not exhaustive, but efforts will be made to ensure future releases have clearer changelogs.

  • Exposed pdfScaleValue as a stateful prop
  • Made all components functional based
  • Updated PDF.js dependency to 3.8.162
  • Added onContextMenu event listeners to Highlight components
  • Fixed clamping bug / tips not being displayed correctly on ultrawide monitors
  • Exposed styling on all componenets
  • Added default dark grey background to PdfHighlighter
  • Removed generic types for Highlight and added GhostHighlight as a public type.
  • Exposed selection color styling and changed default color to blue.
  • Replaced callbacks for afterSelection with selectionTip prop and onSelectionFinished events.
  • Created useHighlightUtils, useTipContainerUtils, useTipViewerUtils, and useSelectionUtils hooks.
  • Removed callbacks for rendering highlights in PdfHighlighter and instead replaced it with expecting a user-defined HighlightContainer which will be supplied useHighlightUtils
  • Expoed viewer and tipViewerUtils as optionl reference callbacks in the PdfHighlighter. This allows more customisable control of displaying tips or accessing PDF.js settings
  • Changed PdfLoader props to accept document parameters inside of document. Also added onProgressParameters as a variable to beforeLoad
  • Added option to specify bounds for AreaHighlight, defaulted to the page in the example app.
  • Added documentation to almost all components
  • Lots of refactoring.