pdfjs-viewer-element 2.5.4 → 2.5.5

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.
Files changed (2) hide show
  1. package/README.md +10 -7
  2. package/package.json +12 -12
package/README.md CHANGED
@@ -1,11 +1,10 @@
1
1
  <p align="center">
2
- <img src="https://alekswebnet.github.io/pdfjs-viewer-element/logo.svg" width="64"/>
2
+ <img src="https://alekswebnet.github.io/pdfjs-viewer-element/logo.svg" width="60"/>
3
3
  </p>
4
4
  <h1 align="center">pdfjs-viewer-element</h1>
5
5
 
6
- A custom element, based on [PDF.js default viewer](https://mozilla.github.io/pdf.js/web/viewer.html) and supported in all [major browsers](https://caniuse.com/custom-elementsv1), works with most used [JS frameworks](https://custom-elements-everywhere.com/).
7
-
8
- See [examples](https://alekswebnet.github.io/pdfjs-viewer-element/#demo) of usage in Vue, React and Svelte or static HTML page.
6
+ Probably the simplest integration of PDF.js viewer.
7
+ The package provide a custom element, based on [PDF.js default viewer](https://mozilla.github.io/pdf.js/web/viewer.html), supported in all [major browsers](https://caniuse.com/custom-elementsv1), and works with most [JS frameworks](https://custom-elements-everywhere.com/).
9
8
 
10
9
  ⚠️ `pdfjs-viewer-element` requires PDF.js [prebuilt](http://mozilla.github.io/pdf.js/getting_started/), that includes the generic build of PDF.js and the viewer.
11
10
 
@@ -20,7 +19,9 @@ The prebuilt comes with each PDF.js release. Supported releases:
20
19
 
21
20
  To use the package you should download and **place the prebuilt** files to some directory of your project.
22
21
 
23
- Then specify the path to this directory with `viewer-path` property (`/pdfjs` by default).
22
+ Then specify the path to the directory with `viewer-path` property (`/pdfjs` by default).
23
+
24
+ See [examples](https://alekswebnet.github.io/pdfjs-viewer-element/#demo) of usage in Vue, React, Svelte or simple HTML page.
24
25
 
25
26
  ## Status
26
27
 
@@ -45,6 +46,8 @@ Using module bundlers:
45
46
  npm install pdfjs-viewer-element
46
47
  # With yarn
47
48
  yarn add pdfjs-viewer-element
49
+ # With pnpm
50
+ pnpm add pdfjs-viewer-element
48
51
  ```
49
52
 
50
53
  ```javascript
@@ -60,7 +63,7 @@ Using browser:
60
63
  ## Usage
61
64
 
62
65
  ```html
63
- <pdfjs-viewer-element src="/file.pdf" viewer-path="/path-to-viewer"></pdfjs-viewer-element>
66
+ <pdfjs-viewer-element src="/pdf-file.pdf" viewer-path="/pdfjs-4.0.379-dist"></pdfjs-viewer-element>
64
67
  ```
65
68
 
66
69
  ## Attributes
@@ -87,7 +90,7 @@ Using browser:
87
90
 
88
91
  `viewer-extra-styles` - Add your CSS rules to viewer application
89
92
 
90
- For more clarity, see the [Api docs page](https://alekswebnet.github.io/pdfjs-viewer-element/#api).
93
+ Play with attributes on [Api docs page](https://alekswebnet.github.io/pdfjs-viewer-element/#api).
91
94
 
92
95
  ## Viewer CSS theme
93
96
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pdfjs-viewer-element",
3
- "version": "2.5.4",
3
+ "version": "2.5.5",
4
4
  "license": "MIT",
5
5
  "author": {
6
6
  "name": "Oleksandr Shevchuk",
@@ -29,20 +29,20 @@
29
29
  "dist",
30
30
  "types"
31
31
  ],
32
- "scripts": {
33
- "dev": "vite",
34
- "build": "tsc && vite build",
35
- "test": "vitest",
36
- "coverage": "vitest run --coverage"
37
- },
38
32
  "devDependencies": {
39
33
  "@types/node": "^18.7.1",
40
- "@vitest/browser": "^0.34.3",
34
+ "@vitest/browser": "^1.2.1",
41
35
  "jsdom": "^22.1.0",
42
36
  "perfect-debounce": "^1.0.0",
43
37
  "typescript": "^4.6.4",
44
- "vite": "^4.5.2",
45
- "vitest": "^0.34.3",
46
- "webdriverio": "^8.16.7"
38
+ "vite": "^5.0.12",
39
+ "vitest": "^1.2.1",
40
+ "webdriverio": "^8.28.8"
41
+ },
42
+ "scripts": {
43
+ "dev": "vite",
44
+ "build": "tsc && vite build",
45
+ "test": "vitest",
46
+ "coverage": "vitest run --coverage"
47
47
  }
48
- }
48
+ }