react-pdf
Advanced tools
Comparing version 7.1.2 to 7.1.3
@@ -5,3 +5,11 @@ import * as pdfjs from 'pdfjs-dist'; | ||
import Page from './Page'; | ||
import Thumbnail from './Thumbnail'; | ||
import useDocumentContext from './shared/hooks/useDocumentContext'; | ||
import useOutlineContext from './shared/hooks/useOutlineContext'; | ||
import usePageContext from './shared/hooks/usePageContext'; | ||
export type { DocumentProps } from './Document'; | ||
export type { OutlineProps } from './Outline'; | ||
export type { PageProps } from './Page'; | ||
export type { ThumbnailProps } from './Thumbnail'; | ||
import './pdf.worker.entry'; | ||
export { pdfjs, Document, Outline, Page }; | ||
export { pdfjs, Document, Outline, Page, Thumbnail, useDocumentContext, useOutlineContext, usePageContext, }; |
@@ -29,3 +29,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Page = exports.Outline = exports.Document = exports.pdfjs = void 0; | ||
exports.usePageContext = exports.useOutlineContext = exports.useDocumentContext = exports.Thumbnail = exports.Page = exports.Outline = exports.Document = exports.pdfjs = void 0; | ||
const pdfjs = __importStar(require("pdfjs-dist")); | ||
@@ -39,2 +39,10 @@ exports.pdfjs = pdfjs; | ||
exports.Page = Page_1.default; | ||
const Thumbnail_1 = __importDefault(require("./Thumbnail")); | ||
exports.Thumbnail = Thumbnail_1.default; | ||
const useDocumentContext_1 = __importDefault(require("./shared/hooks/useDocumentContext")); | ||
exports.useDocumentContext = useDocumentContext_1.default; | ||
const useOutlineContext_1 = __importDefault(require("./shared/hooks/useOutlineContext")); | ||
exports.useOutlineContext = useOutlineContext_1.default; | ||
const usePageContext_1 = __importDefault(require("./shared/hooks/usePageContext")); | ||
exports.usePageContext = usePageContext_1.default; | ||
require("./pdf.worker.entry"); |
@@ -57,2 +57,3 @@ "use strict"; | ||
} | ||
// eslint-disable-next-line @typescript-eslint/class-literal-property-style | ||
get rotation() { | ||
@@ -59,0 +60,0 @@ return 0; |
@@ -5,3 +5,11 @@ import * as pdfjs from 'pdfjs-dist'; | ||
import Page from './Page'; | ||
import Thumbnail from './Thumbnail'; | ||
import useDocumentContext from './shared/hooks/useDocumentContext'; | ||
import useOutlineContext from './shared/hooks/useOutlineContext'; | ||
import usePageContext from './shared/hooks/usePageContext'; | ||
export type { DocumentProps } from './Document'; | ||
export type { OutlineProps } from './Outline'; | ||
export type { PageProps } from './Page'; | ||
export type { ThumbnailProps } from './Thumbnail'; | ||
import './pdf.worker.entry'; | ||
export { pdfjs, Document, Outline, Page }; | ||
export { pdfjs, Document, Outline, Page, Thumbnail, useDocumentContext, useOutlineContext, usePageContext, }; |
@@ -5,3 +5,7 @@ import * as pdfjs from 'pdfjs-dist'; | ||
import Page from './Page'; | ||
import Thumbnail from './Thumbnail'; | ||
import useDocumentContext from './shared/hooks/useDocumentContext'; | ||
import useOutlineContext from './shared/hooks/useOutlineContext'; | ||
import usePageContext from './shared/hooks/usePageContext'; | ||
import './pdf.worker.entry'; | ||
export { pdfjs, Document, Outline, Page }; | ||
export { pdfjs, Document, Outline, Page, Thumbnail, useDocumentContext, useOutlineContext, usePageContext, }; |
@@ -52,2 +52,3 @@ /* Copyright 2015 Mozilla Foundation | ||
} | ||
// eslint-disable-next-line @typescript-eslint/class-literal-property-style | ||
get rotation() { | ||
@@ -54,0 +55,0 @@ return 0; |
{ | ||
"name": "react-pdf", | ||
"version": "7.1.2", | ||
"version": "7.1.3", | ||
"description": "Display PDFs in your React app as easily as if they were images.", | ||
@@ -24,3 +24,3 @@ "main": "dist/cjs/index.js", | ||
"tsc": "tsc --noEmit", | ||
"unit": "vitest run" | ||
"unit": "vitest" | ||
}, | ||
@@ -38,6 +38,6 @@ "keywords": [ | ||
"dependencies": { | ||
"clsx": "^1.2.1", | ||
"make-cancellable-promise": "^1.0.0", | ||
"clsx": "^2.0.0", | ||
"make-cancellable-promise": "^1.3.1", | ||
"make-event-props": "^1.5.0", | ||
"merge-refs": "^1.1.3", | ||
"merge-refs": "^1.2.1", | ||
"pdfjs-dist": "3.6.172", | ||
@@ -55,3 +55,3 @@ "prop-types": "^15.6.2", | ||
"eslint": "^8.26.0", | ||
"eslint-config-wojtekmaj": "^0.8.4", | ||
"eslint-config-wojtekmaj": "^0.9.0", | ||
"husky": "^8.0.0", | ||
@@ -73,2 +73,6 @@ "jsdom": "^21.1.0", | ||
}, | ||
"publishConfig": { | ||
"access": "public", | ||
"provenance": true | ||
}, | ||
"files": [ | ||
@@ -75,0 +79,0 @@ "dist", |
@@ -130,14 +130,2 @@ [![npm](https://img.shields.io/npm/v/react-pdf.svg)](https://www.npmjs.com/package/react-pdf) ![downloads](https://img.shields.io/npm/dt/react-pdf.svg) [![CI](https://github.com/wojtekmaj/react-pdf/workflows/CI/badge.svg)](https://github.com/wojtekmaj/react-pdf/actions) | ||
##### Parcel 1 | ||
For Parcel 1, you will have use the following code: | ||
```js | ||
import { pdfjs } from 'react-pdf'; | ||
pdfjs.GlobalWorkerOptions.workerPort = new Worker( | ||
'node_modules/pdfjs-dist/build/pdf.worker.entry.js', | ||
); | ||
``` | ||
##### Parcel 2 | ||
@@ -144,0 +132,0 @@ |
import * as pdfjs from 'pdfjs-dist'; | ||
import Document from './Document'; | ||
import Outline from './Outline'; | ||
import Page from './Page'; | ||
import Thumbnail from './Thumbnail'; | ||
import useDocumentContext from './shared/hooks/useDocumentContext'; | ||
import useOutlineContext from './shared/hooks/useOutlineContext'; | ||
import usePageContext from './shared/hooks/usePageContext'; | ||
export type { DocumentProps } from './Document'; | ||
export type { OutlineProps } from './Outline'; | ||
export type { PageProps } from './Page'; | ||
export type { ThumbnailProps } from './Thumbnail'; | ||
import './pdf.worker.entry'; | ||
export { pdfjs, Document, Outline, Page }; | ||
export { | ||
pdfjs, | ||
Document, | ||
Outline, | ||
Page, | ||
Thumbnail, | ||
useDocumentContext, | ||
useOutlineContext, | ||
usePageContext, | ||
}; |
@@ -88,2 +88,3 @@ /* Copyright 2015 Mozilla Foundation | ||
// eslint-disable-next-line @typescript-eslint/class-literal-property-style | ||
get rotation() { | ||
@@ -90,0 +91,0 @@ return 0; |
@@ -58,3 +58,3 @@ import PropTypes from 'prop-types'; | ||
if (typeof Blob !== 'undefined') { | ||
(fileTypes as Array<PropTypes.Validator<unknown>>).push(PropTypes.instanceOf(Blob)); | ||
(fileTypes as PropTypes.Validator<unknown>[]).push(PropTypes.instanceOf(Blob)); | ||
} | ||
@@ -61,0 +61,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
608785
13263
541
+ Addedclsx@2.1.1(transitive)
- Removedclsx@1.2.1(transitive)
Updatedclsx@^2.0.0
Updatedmerge-refs@^1.2.1