Alcumus / react-doc-viewer

Apache License 2.0
242 stars 103 forks source link

chore(deps): update dependency react-pdf to v8 #140

Closed mend-for-github-com[bot] closed 4 months ago

mend-for-github-com[bot] commented 4 months ago

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
react-pdf (source) 5.0.0 -> 8.0.2 age adoption passing confidence

By merging this PR, the issue #138 will be automatically resolved and closed:

Severity CVSS Score CVE
High High 7.1 CVE-2024-34342

Release Notes

wojtekmaj/react-pdf (react-pdf) ### [`v8.0.2`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v8.0.2) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v8.0.1...v8.0.2) #### Bug fixes - Force `isEvalSupported` to `false`. Fixes GHSA-87hq-q4gp-9wr4 (caused by GHSA-wgrm-67xf-hhpq). ### [`v8.0.1`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v8.0.1) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v8.0.0...v8.0.1) This version shipped an incorrect fix for a security vulnerability and thus has been deprecated. #### ~~Bug fixes~~ - \~~Force `isEvalSupported` to `true`. Fixes GHSA-87hq-q4gp-9wr4 (caused by GHSA-wgrm-67xf-hhpq).~~ ### [`v8.0.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v8.0.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.7.3...v8.0.0) ❗️ = breaking change #### What's new? - Added support for React 19. #### What's changed? - ❗️ [New JSX transform](https://legacy.reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html) is now required. Most likely, you’re already using it, but if you’re not, you’ll need to enable it by following the instructions in the linked blog post. - ❗️ `propTypes` were removed. If you’re using `propTypes`, we recommend migrating to TypeScript or another type-checking solution. ### [`v7.7.3`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.7.3) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.7.2...v7.7.3) #### Bug fixes - Force `isEvalSupported` to `false`. Fixes GHSA-87hq-q4gp-9wr4 (caused by GHSA-wgrm-67xf-hhpq). ### [`v7.7.2`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.7.2) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.7.1...v7.7.2) This version shipped an incorrect fix for a security vulnerability and thus has been deprecated. #### ~~Bug fixes~~ - \~~Force `isEvalSupported` to `true`. Fixes GHSA-87hq-q4gp-9wr4 (caused by GHSA-wgrm-67xf-hhpq).~~ ### [`v7.7.1`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.7.1) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.7.0...v7.7.1) #### Bug fixes - Fixed `Outline`, `Page` and `Thumbnail` components crashing when placed outside `Document`, but provided with `pdf` prop ([#​1709](https://togithub.com/wojtekmaj/react-pdf/issues/1709)). - Fixed documentation for using `vite-plugin-static-copy` suggesting a solution that doesn't work on Windows. ### [`v7.7.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.7.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.6.0...v7.7.0) #### What's new? - Detect not memoized file and options props. #### What's changed? - Updated documentation to make it clear SVG `renderMode` is deprecated and will be removed in the future. - Replaced `tiny-warning` with more popular (and equally tiny!) `warning`. ### [`v7.6.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.6.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.5.1...v7.6.0) #### What's new? - Improved developer experience by moving prop documentation to JSDoc. This means that you can now see descriptions, default values, and examples for all props in your IDE. - Improved documentation. ### [`v7.5.1`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.5.1) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.5.0...v7.5.1) #### What's new? - Package is now published with [npm provenance statements](https://github.blog/2023-04-19-introducing-npm-package-provenance/). ### [`v7.5.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.5.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.4.0...v7.5.0) #### What's new? - Exported `PasswordResponses` type to make it easier to create custom password prompts ([#​1615](https://togithub.com/wojtekmaj/react-pdf/issues/1615)). Thanks, [@​pstevovski](https://togithub.com/pstevovski)! - Updated documentation on `options` prop and usage with Next.js. #### Bug fixes - Fixed customTextRenderer not called on items outside of marked content ([#​1593](https://togithub.com/wojtekmaj/react-pdf/issues/1593), [#​1623](https://togithub.com/wojtekmaj/react-pdf/issues/1623)). ### [`v7.4.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.4.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.3.3...v7.4.0) #### What's new? - Improved Next.js compatibility. - Updated documentation - Added samples for Next.js App Router and Next.js Pages Router - Updated PDF.js to 3.11.174. - Accessibility improvements - Form rendering improvements - Font conversion and substitution improvements - Performance improvements - Text selection improvements - TypeScript improvements - Other features/bugfixes #### Bug fixes - Fixed `index.test.js` entry not working in pure ESM mode with "moduleResolution": "node16" TypeScript option enabled. ### [`v7.3.3`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.3.3) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.3.2...v7.3.3) #### Bug fixes - Fixed "Cannot set properties of undefined (setting 'workerSrc')" error in legacy Next.js setups ([#​1579](https://togithub.com/wojtekmaj/react-pdf/issues/1579)). ### [`v7.3.2`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.3.2) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.3.1...v7.3.2) #### Bug fixes - Fixed "Cannot destructure property 'PDFDataRangeTransport' of 'pdfjs' as it is undefined." in legacy Next.js setups. ### [`v7.3.1`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.3.1) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.3.0...v7.3.1) #### Bug fixes - Fixed "Named export 'PDFDataRangeTransport' not found." error in some environments ([#​1578](https://togithub.com/wojtekmaj/react-pdf/issues/1578)). ### [`v7.3.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.3.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.2.0...v7.3.0) #### What's new? - Added support for native ESM modules ([#​1574](https://togithub.com/wojtekmaj/react-pdf/issues/1574)). - Added documentation on cMaps and standard fonts for Vite. #### What's changed? - Improved propTypes. #### Bug fixes - Fixed propTypes declared twice in every declaration file ([#​1542](https://togithub.com/wojtekmaj/react-pdf/issues/1542)). - Fixed raw-loader installation instructions using Yarn ([#​1569](https://togithub.com/wojtekmaj/react-pdf/issues/1569)). Thanks, [@​felipelssilva](https://togithub.com/felipelssilva)! ### [`v7.2.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.2.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.1.3...v7.2.0) #### What's new? - Added support for new `renderMode`: `"custom"`. When set, you can pass custom renderer function to `customRenderer` prop ([#​1408](https://togithub.com/wojtekmaj/react-pdf/issues/1408)). - Improved [RSC](https://nextjs.org/docs/getting-started/react-essentials#server-components) compatibility. You no longer need to add `'use client';` to the parent component for this component to work. #### What's changed? - Improved documentation not to suggest using inline object as `options` prop value ([#​1567](https://togithub.com/wojtekmaj/react-pdf/issues/1567)). - Added guidelines for installation in Next.js app ([#​1508](https://togithub.com/wojtekmaj/react-pdf/issues/1508)). #### Bug fixes - `@types/react` and `@types/react-dom` are now optional peerDependencies, which eliminates errors caused by duplicate typings. ### [`v7.1.3`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.1.3) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.1.2...v7.1.3) #### What's changed? - Updated `clsx` dependency to `2.0.0` to enable ESM support in the near future. ### [`v7.1.2`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.1.2) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.1.1...v7.1.2) #### Bug fixes - Fixed `customTextRenderer` not working on documents without marked content ([#​1530](https://togithub.com/wojtekmaj/react-pdf/issues/1530), [#​1531](https://togithub.com/wojtekmaj/react-pdf/issues/1531)). Thanks, [@​MattL75](https://togithub.com/MattL75)! ### [`v7.1.1`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.1.1) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.1.0...v7.1.1) #### Bug fixes - Improved performance by avoiding unnecessary re-renders ([#​1526](https://togithub.com/wojtekmaj/react-pdf/issues/1526)). ### [`v7.1.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.1.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.0.3...v7.1.0) Large and exciting release, full of improvements and new features, mainly thanks to our contributors, [@​kostassite](https://togithub.com/kostassite), [@​iamandrewluca](https://togithub.com/iamandrewluca) and [@​MattL75](https://togithub.com/MattL75), and [sponsors](https://togithub.com/sponsors/wojtekmaj). [Become a sponsor](https://togithub.com/wojtekmaj/react-pdf?sponsor=1) and help making React-PDF even better! #### What's new? - Added `Thumbnail` component which lets you render thumbnails ([#​898](https://togithub.com/wojtekmaj/react-pdf/issues/898), [#​1519](https://togithub.com/wojtekmaj/react-pdf/issues/1519)). - Forms rendered by annotation layer are now using AnnotationStorage. This allows you to hook into `pdf.annotationStorage` in `pdf` provided in `onDocumentLoadSuccess` callback and listen for form data changes ([#​1518](https://togithub.com/wojtekmaj/react-pdf/issues/1518)). Thanks, [@​kostassite](https://togithub.com/kostassite)! - New hooks: `useDocumentContext`, `useOutlineContext` and `usePageContext`. These hooks allow you to build custom components that hook (pun not intended) into React-PDF API ([#​1505](https://togithub.com/wojtekmaj/react-pdf/issues/1505)). Thanks, [@​iamandrewluca](https://togithub.com/iamandrewluca)! - If `onItemClick` was not provided neither to `Document` nor `Outline` components, React-PDF will now attempt to navigate to the page of the clicked outline item on its own, just like it does for internal links. #### What's changed? - Improved accessibility by introducing structure tree. This also introduces new props in `Page`: `onGetStructTreeSuccess` and `onGetStructTreeError` ([#​1494](https://togithub.com/wojtekmaj/react-pdf/issues/1494), [#​1498](https://togithub.com/wojtekmaj/react-pdf/issues/1498)). Thanks, [@​MattL75](https://togithub.com/MattL75)! #### Bug fixes - Fixed `onItemClick` types incorrectly marking `dest` as required. - Fixed `onItemClick` not passed from `Document` to `Outline`. Previously, you had to manually pass `onItemClick` to `Outline` component. Now, you only need to pass it to `Document`. ### [`v7.0.3`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.0.3) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.0.2...v7.0.3) #### Bug fixes - Allowed all `DocumentInitParameters` to be passed to `options` prop. ### [`v7.0.2`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.0.2) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.0.1...v7.0.2) #### Bug fixes - Fixed "Worker was destroyed" error when Document was unmounted or updated before the worker finished loading the PDF file. - Fixed annotations not displaying properly when global CSS had `section` selector styled. ### [`v7.0.1`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.0.1) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v7.0.0...v7.0.1) #### Bug fixes - Fixed annotation layer rendered under text layer, resulting in some annotations not clickable ([#​1503](https://togithub.com/wojtekmaj/react-pdf/issues/1503)). Thanks, [@​iamandrewluca](https://togithub.com/iamandrewluca)! ### [`v7.0.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v7.0.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v6.2.2...v7.0.0) See [Upgrade guide from version 6.x to 7.x](https://togithub.com/wojtekmaj/react-pdf/wiki/Upgrade-guide-from-version-6.x-to-7.x). This is one of the biggest update - for React-PDF and for me personally. React-PDF has been rewritten from scratch using TypeScript and React Hooks. I've put a tremendous amount of effort to modernize the package without introducing any major breaking changes. If, however, something have slipped through 137 unit tests we have, please let me know. I hope you will like it. ❗️ = breaking change #### What's new? - Converted package to TypeScript ([#​1420](https://togithub.com/wojtekmaj/react-pdf/issues/1420)). - Rewritten package using React Hooks ([#​1370](https://togithub.com/wojtekmaj/react-pdf/issues/1370)). - Updated PDF.js to 3.6.172. - Preparations for editor mode support - Removed support for outdated browser versions - Font conversion/text selection improvements - Annotation improvements - Image rendering improvements that allow rendering big images even if they are larger than the canvas limits - Accessibility improvements - Improved overall performance - Reduced memory usage - Other features/bugfixes #### What's changed? - React-PDF is now considerably smaller. - ❗️ Bundler-specific entry points are no longer provided. Don't worry though, the setup should be straightforward. - ❗️ Dropped support for older browsers. - ❗️ Removed legacy `renderInteractiveForms` prop #### Bug fixes - Fixed "The `--scale-factor` CSS-variable must be set" error. - Fixed black flicker when rendering canvas ([#​1340](https://togithub.com/wojtekmaj/react-pdf/issues/1340), [#​1279](https://togithub.com/wojtekmaj/react-pdf/issues/1279)). Thanks, [@​MattL75](https://togithub.com/MattL75)! ### [`v6.2.2`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v6.2.2) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v6.2.1...v6.2.2) #### Bug fixes - Fixed rendering glitches on certain browsers & graphic cards ([#​1010](https://togithub.com/wojtekmaj/react-pdf/issues/1010)). ### [`v6.2.1`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v6.2.1) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v6.2.0...v6.2.1) #### What's changed? - Brought back `pageIndex` and `pageNumber` in `customTextRenderer` args that, despite undocumented, may have been used by some ([#​1190](https://togithub.com/wojtekmaj/react-pdf/issues/1190)). - Replace `typeof window` checks with `typeof document` checks to avoid Deno environment being falsely recognized as browser environment. #### Bug fixes - Fixed `onItemClick` callback working only once per item ([#​997](https://togithub.com/wojtekmaj/react-pdf/issues/997), [#​1192](https://togithub.com/wojtekmaj/react-pdf/issues/1192)). - Fixed first annotation item not clickable ([#​1231](https://togithub.com/wojtekmaj/react-pdf/issues/1231)). - Fixed typos in documentation ([#​1227](https://togithub.com/wojtekmaj/react-pdf/issues/1227)). Thanks, [@​flaxflour](https://togithub.com/flaxflour)! ### [`v6.2.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v6.2.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v6.1.1...v6.2.0) #### What's new? - Added support for `devicePixelRatio` prop in Page component. #### Bug fixes - Pass the actual `itemIndex` to the `customTextRenderer` ([#​1183](https://togithub.com/wojtekmaj/react-pdf/issues/1183)). Thanks, [@​paescuj](https://togithub.com/paescuj)! ### [`v6.1.1`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v6.1.1) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v6.1.0...v6.1.1) #### Bug fixes - Fixed text items misaligned when using `customTextRenderer` and if textContent items have both text and line break ([#​1173](https://togithub.com/wojtekmaj/react-pdf/issues/1173)). ### [`v6.1.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v6.1.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v6.0.3...v6.1.0) #### What's new? - Improved text selection behavior ([#​1034](https://togithub.com/wojtekmaj/react-pdf/issues/1034)). ### [`v6.0.3`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v6.0.3) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v6.0.2...v6.0.3) #### Bug fixes - Fixed `customTextRenderer` called too often and potentially with undefined `str` ([#​1151](https://togithub.com/wojtekmaj/react-pdf/issues/1151)). - Fixed text layer rendering twice when using React 18 w. StrictMode on. ### [`v6.0.2`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v6.0.2) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v6.0.1...v6.0.2) #### Bug fixes - Fixed Vite specific entry causing fake worker to be initialized ([#​1148](https://togithub.com/wojtekmaj/react-pdf/issues/1148)). ### [`v6.0.1`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v6.0.1) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v6.0.0...v6.0.1) #### Bug fixes - Fixed Vite specific entry causing build to fail ([#​1148](https://togithub.com/wojtekmaj/react-pdf/issues/1148)). ### [`v6.0.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v6.0.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v5.7.2...v6.0.0) See [Upgrade guide from version 5.x to 6.x](https://togithub.com/wojtekmaj/react-pdf/wiki/Upgrade-guide-from-version-5.x-to-6.x). Note: React <16.8 is not supported. If you're still using React older than 16.8, please use react-pdf@^5.0.0 instead. ❗️ = breaking change #### What's new? - ❗️ Vastly improved performance and bundle size thanks to the modern version of PDF.js that is now used. This drops support for legacy browsers. See README for details. - Added official support for Vite. - Updated PDF.js to 2.16.105 ([#​1019](https://togithub.com/wojtekmaj/react-pdf/issues/1019)). - Improvements for the text layer (space insertion) - Improvements for canvas rendering (thin line rendering) - Improvements for forms (printing/saving of choice lists) - Improvements for accessibility (sidebar and search results) - Bug fixes and optimizations, in particular for annotations, font/image conversion, SMask rendering, text layer rendering and TypeScript definitions - Performance improvements for rendering image masks, Type3 fonts and certain drawing instructions - Support for specifying custom background/foreground colors for rendering in the viewer (this will be soon be supported in React-PDF) - Bugfixes - Accessibility improvements - Rendering quality improvements. - Improved documentation. - Fixed instructions on PDF.js worker - Added missing documentation on `onRenderTextLayerError` and `onRenderTextLayerSuccess` - Added a note on SVG mode deprecation. - Refactored TextLayer to use pdfjs.renderTextLayer ([#​944](https://togithub.com/wojtekmaj/react-pdf/issues/944)). - Added support for `onRenderTextLayerError` prop - Added support for `onRenderTextLayerSuccess` prop. - React-PDF now warns if required CSS files are not imported. #### What's changed? - ❗️ Minimum React version is now 16.8. - ❗️ `onGetTextSuccess` is now called with an object containing `items` and `styles`. - ❗️ `TextLayer.css` now must be imported manually for TextLayer to work properly. - ❗️ Dropped support for React content in `customTextRenderer` ([#​1124](https://togithub.com/wojtekmaj/react-pdf/issues/1124)). - `file-loader` is now an optional peerDependency ([#​970](https://togithub.com/wojtekmaj/react-pdf/issues/970)). Thanks, [@​rpaasche](https://togithub.com/rpaasche)! - Improved documentation on Preact compatibility. - Replaced `merge-class-names` with `clsx`. #### Bug fixes - Fixed crash when attempting to cancel rendering of PageCanvas. - Fixed crash when text layer in PDFs rendered by React-PDF was used in Preact applications. - Fixed legacy `renderInteractiveForms` prop ignored. Thanks, [@​liquidautumn](https://togithub.com/liquidautumn)! - Fixed Page wrapper allowing to shrink causing children to overflow ([#​1118](https://togithub.com/wojtekmaj/react-pdf/issues/1118)). ### [`v5.7.2`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v5.7.2) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v5.7.1...v5.7.2) #### What's new? - Added instructions on support for standard fonts. - Make findDocumentSource cancellable, cancel running tasks in loadDocument before finding source ([#​947](https://togithub.com/wojtekmaj/react-pdf/issues/947)). #### Bug fixes - Fixed Page not rendering in `canvas` rendering mode (default) when using React 18 w. StrictMode on ([#​972](https://togithub.com/wojtekmaj/react-pdf/issues/972)). ### [`v5.7.1`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v5.7.1) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v5.7.0...v5.7.1) #### What's changed? - Replaced deprecated `renderInteractiveForms` option with `annotationMode` in `page.render` call ([#​946](https://togithub.com/wojtekmaj/react-pdf/issues/946)). #### Bug fixes - Use `workerPort` instead of `workerSrc` in Parcel 2 specific entry ([#​941](https://togithub.com/wojtekmaj/react-pdf/issues/941)). Thanks, [@​jamesjessian](https://togithub.com/jamesjessian)! - Fixed regression that caused interactive forms to be always rendered. ### [`v5.7.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v5.7.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v5.6.0...v5.7.0) Biggest one in *months*! #### What's new? - Added support for React 18. - Added official support for Parcel 2. - Added new Webpack 5-specific entry file. It uses Webpack's new [URL assets](https://webpack.js.org/guides/asset-modules/#url-assets) instead of `worker-loader`, which turned out to be quite problematic in the past. Don't worry, if you want to stick to the old Webpack-specific one, it should still work just fine! - Updated PDF.js to 2.12.313 ([#​936](https://togithub.com/wojtekmaj/react-pdf/issues/936)). - Improved XFA support - Improved pattern/tiling support - Rich text annotation support - Added support for `externalLinkRel` prop. - Added `dest` and `pageIndex` to `onItemClick` callbacks ([#​812](https://togithub.com/wojtekmaj/react-pdf/issues/812), [#​924](https://togithub.com/wojtekmaj/react-pdf/issues/924)). Thanks, [@​malwilley](https://togithub.com/malwilley)! #### What's changed? - Updated cMaps instructions to work with Yarn PnP. - Updated PDF.js worker instructions for clarity. - Specify how to make it work with Create React App 5. - Added instructions on how to manually copy cMaps directory. - Added instructions on how to manually copy `pdf.worker.js`. - Added Create React App 5 sample suite. - Added Parcel 2 sample suite. ### [`v5.6.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v5.6.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v5.5.0...v5.6.0) #### What's new? - Updated PDF.js to 2.10.377 ([#​900](https://togithub.com/wojtekmaj/react-pdf/issues/900)). - Improved XFA support ([#​856](https://togithub.com/wojtekmaj/react-pdf/issues/856)). ### [`v5.5.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v5.5.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v5.4.1...v5.5.0) #### What's new? - Added `canvasBackground` prop ([#​851](https://togithub.com/wojtekmaj/react-pdf/issues/851)). Thanks, [@​paescuj](https://togithub.com/paescuj)! ### [`v5.4.1`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v5.4.1) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v5.4.0...v5.4.1) #### Bug fixes - Fixed LinkService crashing given already-resolved dest ([#​869](https://togithub.com/wojtekmaj/react-pdf/issues/869)). ### [`v5.4.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v5.4.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v5.3.2...v5.4.0) #### What's new? - Updated PDF.js to 2.9.359 ([#​818](https://togithub.com/wojtekmaj/react-pdf/issues/818)). - Added support for Signatures ([#​559](https://togithub.com/wojtekmaj/react-pdf/issues/559), [#​691](https://togithub.com/wojtekmaj/react-pdf/issues/691), [#​772](https://togithub.com/wojtekmaj/react-pdf/issues/772), [#​817](https://togithub.com/wojtekmaj/react-pdf/issues/817)). - Fixed rendering on Chrome 92 and up ([#​819](https://togithub.com/wojtekmaj/react-pdf/issues/819)). - Replaced pdfjs-dist build with legacy ES5 version ([#​794](https://togithub.com/wojtekmaj/react-pdf/issues/794)). Thanks, [@​njleonzhang](https://togithub.com/njleonzhang)! - Changed async/await syntax to Promises, reducing build size significantly ([#​807](https://togithub.com/wojtekmaj/react-pdf/issues/807)). #### Bug fixes - Fixed annotation links no longer working in some cases ([#​816](https://togithub.com/wojtekmaj/react-pdf/issues/816)). ### [`v5.3.2`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v5.3.2) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v5.3.1...v5.3.2) #### Bug fixes - Fixed `file` prop type checker not accepting `data` as string ([#​800](https://togithub.com/wojtekmaj/react-pdf/issues/800)). ### [`v5.3.1`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v5.3.1) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v5.3.0...v5.3.1) #### What's changed? - Made documentation on bundler-specific entry files clearer. - Minor code optimizations for smaller bundle size. #### Bug fixes - Fixed `onLoadProgress` incorrectly listed as `Page` prop in README. - Fixed data URI not parsed properly when having multiple headers ([#​784](https://togithub.com/wojtekmaj/react-pdf/issues/784)). ### [`v5.3.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v5.3.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v5.2.0...v5.3.0) #### What's new? - Updated PDF.js from 2.5.207 to 2.6.347 ([#​746](https://togithub.com/wojtekmaj/react-pdf/issues/746)). Thanks, [@​andi-dev](https://togithub.com/andi-dev)! - Replaced worker-loader with file-loader in Webpack-specific entry file ([#​93](https://togithub.com/wojtekmaj/react-pdf/issues/93), [#​291](https://togithub.com/wojtekmaj/react-pdf/issues/291), [#​496](https://togithub.com/wojtekmaj/react-pdf/issues/496), [#​530](https://togithub.com/wojtekmaj/react-pdf/issues/530), [#​558](https://togithub.com/wojtekmaj/react-pdf/issues/558), [#​613](https://togithub.com/wojtekmaj/react-pdf/issues/613), [#​685](https://togithub.com/wojtekmaj/react-pdf/issues/685), [#​734](https://togithub.com/wojtekmaj/react-pdf/issues/734), [#​756](https://togithub.com/wojtekmaj/react-pdf/issues/756)). Webpack-specific entry file now works with Create React App. - Improved memory management by destroying previous worker when file changes ([#​288](https://togithub.com/wojtekmaj/react-pdf/issues/288), [#​305](https://togithub.com/wojtekmaj/react-pdf/issues/305), [#​755](https://togithub.com/wojtekmaj/react-pdf/issues/755)). Thanks, [@​jeetiss](https://togithub.com/jeetiss)! #### What's changed? - Replaced PDFLinkService with custom LinkService ([#​657](https://togithub.com/wojtekmaj/react-pdf/issues/657), [#​659](https://togithub.com/wojtekmaj/react-pdf/issues/659), [#​749](https://togithub.com/wojtekmaj/react-pdf/issues/749)). - Use public API for rendering cancellation ([#​757](https://togithub.com/wojtekmaj/react-pdf/issues/757)). Thanks, [@​jeetiss](https://togithub.com/jeetiss)! #### Bug fixes - Fixed file prop checked using function with the same name. ### [`v5.2.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v5.2.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v5.1.0...v5.2.0) #### What's new? - Allow overriding of `imageResourcesPath` ([#​728](https://togithub.com/wojtekmaj/react-pdf/issues/728)). Thanks, [@​hchevalier](https://togithub.com/hchevalier)! ### [`v5.1.0`](https://togithub.com/wojtekmaj/react-pdf/releases/tag/v5.1.0) [Compare Source](https://togithub.com/wojtekmaj/react-pdf/compare/v5.0.0...v5.1.0) #### What's new? - Added React 17 compatibility. - Updated PDF.js to 2.5.207 ([#​686](https://togithub.com/wojtekmaj/react-pdf/issues/686), [#​687](https://togithub.com/wojtekmaj/react-pdf/issues/687)).