Compare commits
17 Commits
Author | SHA1 | Date |
---|---|---|
![]() |
2079bdc8b4 | |
![]() |
c01f8c6a06 | |
![]() |
aa454b058d | |
![]() |
14ba80fed5 | |
![]() |
bd833cd530 | |
![]() |
3a444d289b | |
![]() |
89b674c513 | |
![]() |
57d7ba6ce3 | |
![]() |
d69a91111c | |
![]() |
b6588b7079 | |
![]() |
e129617119 | |
![]() |
40427e399c | |
![]() |
1079e67338 | |
![]() |
4e430a7e55 | |
![]() |
b12e8226c5 | |
![]() |
30c429c7b4 | |
![]() |
e5b8bbec96 |
17
CHANGELOG.md
17
CHANGELOG.md
|
@ -1,3 +1,20 @@
|
|||
#### 0.1.15 (2024-07-31)
|
||||
|
||||
#### 0.1.14 (2024-07-31)
|
||||
|
||||
##### Bug Fixes
|
||||
|
||||
* readded missing library ([bd833cd5](https://github.com/Alcumus/react-doc-viewer/commit/bd833cd53083a634f3aa685608b733119cb87f92))
|
||||
* possible fix for cjs support ([d69a9111](https://github.com/Alcumus/react-doc-viewer/commit/d69a91111cd65abf8865a9beabeda1b292e3fc0c))
|
||||
|
||||
##### Other Changes
|
||||
|
||||
* possible fix for cjs support" ([89b674c5](https://github.com/Alcumus/react-doc-viewer/commit/89b674c513a8733d2fe30adf893b2879dfa26a23))
|
||||
|
||||
#### 0.1.13 (2024-06-21)
|
||||
|
||||
#### 0.1.12 (2024-06-21)
|
||||
|
||||
#### 0.1.11 (2024-05-14)
|
||||
|
||||
#### 0.1.10 (2024-05-14)
|
||||
|
|
14
package.json
14
package.json
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "react-doc-viewer",
|
||||
"version": "0.1.11",
|
||||
"version": "0.1.14",
|
||||
"description": "Document viewer for react. Renders online/local documents.",
|
||||
"author": "Matthew Mogford",
|
||||
"license": "ISC",
|
||||
|
@ -10,8 +10,8 @@
|
|||
"main": "build/index.js",
|
||||
"types": "build/index.d.ts",
|
||||
"dependencies": {
|
||||
"pdfjs-dist": "4.2.67",
|
||||
"react-pdf": "8.0.2",
|
||||
"pdfjs-dist": "^4.5.136",
|
||||
"react-pdf": "9.0.0",
|
||||
"styled-components": "^5.3.11",
|
||||
"wl-msg-reader": "^0.2.0"
|
||||
},
|
||||
|
@ -19,6 +19,8 @@
|
|||
"@testing-library/jest-dom": "^4.2.4",
|
||||
"@testing-library/react": "^9.3.2",
|
||||
"@testing-library/user-event": "^7.1.2",
|
||||
"@types/babel__core": "7.1.19",
|
||||
"@types/babel__traverse": "7.17.1",
|
||||
"@types/jest": "^24.0.0",
|
||||
"@types/node": "^12.0.0",
|
||||
"@types/react": "^16.9.46",
|
||||
|
@ -27,10 +29,8 @@
|
|||
"generate-changelog": "^1.8.0",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1",
|
||||
"react-scripts": "3.4.3",
|
||||
"typescript": "^3.9.7",
|
||||
"@types/babel__core": "7.1.19",
|
||||
"@types/babel__traverse": "7.17.1"
|
||||
"react-scripts": "4.0.3",
|
||||
"typescript": "^4.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "react-scripts start",
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
// @ts-ignore
|
||||
import * as pdfjsWorker from "pdfjs-dist/build/pdf.worker.min.mjs";
|
||||
import React from "react";
|
||||
import { pdfjs } from "react-pdf";
|
||||
import styled from "styled-components";
|
||||
import { DocRenderer, IStyledProps } from "../../types";
|
||||
import PDFPages from "./components/pages/PDFPages";
|
||||
import { getMetaURL } from "../../utils/importMeta";
|
||||
import PDFControls from "./components/PDFControls";
|
||||
import PDFPages from "./components/pages/PDFPages";
|
||||
import { PDFProvider } from "./state";
|
||||
|
||||
pdfjs.GlobalWorkerOptions.workerSrc = pdfjsWorker;
|
||||
pdfjs.GlobalWorkerOptions.workerSrc = new URL(
|
||||
"pdfjs-dist/build/pdf.worker.min.mjs",
|
||||
getMetaURL()
|
||||
).toString();
|
||||
|
||||
const PDFRenderer: DocRenderer = ({ mainState }) => {
|
||||
return (
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
export const getMetaURL = () => import.meta.url;
|
|
@ -2,7 +2,7 @@
|
|||
"compilerOptions": {
|
||||
"outDir": "./build",
|
||||
"target": "es5",
|
||||
"module": "commonjs",
|
||||
"module": "esnext",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"declaration": true,
|
||||
"allowJs": true,
|
||||
|
|
Loading…
Reference in New Issue