pdf-tsx 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -16,6 +16,16 @@ npm install react react-dom pdfjs-dist
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
+
## CSS
|
|
20
|
+
|
|
21
|
+
The library requires its stylesheet to be imported explicitly:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
import 'pdf-tsx/style.css'
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
19
29
|
## Quick start
|
|
20
30
|
|
|
21
31
|
`PDFViewer` requires a `workerSrc` prop — the URL of the pdfjs worker script. The easiest way is to serve it from the `pdfjs-dist` package directly:
|
package/package.json
CHANGED
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pdf-tsx",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "A fully-featured, composable PDF viewer component for React",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/cjs/index.cjs",
|
|
7
7
|
"module": "./dist/es/index.js",
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
|
-
"sideEffects":
|
|
9
|
+
"sideEffects": [
|
|
10
|
+
"*.css"
|
|
11
|
+
],
|
|
10
12
|
"exports": {
|
|
11
13
|
".": {
|
|
12
14
|
"types": "./dist/index.d.ts",
|
|
13
15
|
"import": "./dist/es/index.js",
|
|
14
16
|
"require": "./dist/cjs/index.cjs"
|
|
15
|
-
}
|
|
17
|
+
},
|
|
18
|
+
"./style.css": "./dist/es/pdf-tsx.css",
|
|
19
|
+
"./dist/es/pdf-tsx.css": "./dist/es/pdf-tsx.css",
|
|
20
|
+
"./dist/cjs/pdf-tsx.css": "./dist/cjs/pdf-tsx.css"
|
|
16
21
|
},
|
|
17
22
|
"keywords": [
|
|
18
23
|
"pdf",
|