7.0.0
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, anduseSelectionUtilshooks. - Removed callbacks for rendering highlights in PdfHighlighter and instead replaced it with expecting a user-defined HighlightContainer which will be supplied
useHighlightUtils - Expoed
viewerandtipViewerUtilsas 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 addedonProgressParametersas a variable tobeforeLoad - Added option to specify bounds for AreaHighlight, defaulted to the page in the example app.
- Added documentation to almost all components
- Lots of refactoring.