From 22e8aff1e69fd77a083c7d1eb7f342482936d280 Mon Sep 17 00:00:00 2001 From: DanielArnould Date: Thu, 4 Jul 2024 12:41:38 +1000 Subject: [PATCH] Switched arxiv link format --- example/src/App.tsx | 8 ++--- example/src/test-highlights.ts | 4 +-- package-lock.json | 64 ++++++++++++---------------------- 3 files changed, 28 insertions(+), 48 deletions(-) diff --git a/example/src/App.tsx b/example/src/App.tsx index 9f6ac4d0c..96cf6639d 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -19,10 +19,8 @@ import { testHighlights as _testHighlights } from "./test-highlights"; import { CommentedHighlight } from "./types"; const TEST_HIGHLIGHTS = _testHighlights; -const PRIMARY_PDF_URL = "https://arxiv.org/pdf/2203.11115.pdf"; -const SECONDARY_PDF_URL = "https://arxiv.org/pdf/1604.02480.pdf"; -const LONG_LOADING_PDF_URL = - "https://cdn.filestackcontent.com/wcrjf9qPTCKXV3hMXDwK"; +const PRIMARY_PDF_URL = "https://arxiv.org/pdf/2203.11115"; +const SECONDARY_PDF_URL = "https://arxiv.org/pdf/1604.02480"; const getNextId = () => String(Math.random()).slice(2); @@ -49,7 +47,7 @@ const App = () => { const highlighterUtilsRef = useRef(); const toggleDocument = () => { - const urls = [PRIMARY_PDF_URL, SECONDARY_PDF_URL, LONG_LOADING_PDF_URL]; + const urls = [PRIMARY_PDF_URL, SECONDARY_PDF_URL]; currentPdfIndexRef.current = (currentPdfIndexRef.current + 1) % urls.length; setUrl(urls[currentPdfIndexRef.current]); setHighlights(TEST_HIGHLIGHTS[urls[currentPdfIndexRef.current]] ?? []); diff --git a/example/src/test-highlights.ts b/example/src/test-highlights.ts index fa822c22a..022c5db13 100644 --- a/example/src/test-highlights.ts +++ b/example/src/test-highlights.ts @@ -1,7 +1,7 @@ import { CommentedHighlight } from "./types"; export const testHighlights: Record> = { - "https://arxiv.org/pdf/2203.11115.pdf": [ + "https://arxiv.org/pdf/2203.11115": [ { content: { text: "The analysis indicates that TS applications exhibit significantly better code quality and understandability than JS applications.", @@ -163,7 +163,7 @@ export const testHighlights: Record> = { id: "9298580906684795", }, ], - "https://arxiv.org/pdf/1604.02480.pdf": [ + "https://arxiv.org/pdf/1604.02480": [ { content: { text: "SSA", diff --git a/package-lock.json b/package-lock.json index 3b65d0100..f5d40043b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,19 +1,17 @@ { "name": "react-pdf-highlighter-extended", - "version": "7.0.0", + "version": "8.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "react-pdf-highlighter-extended", - "version": "7.0.0", + "version": "8.0.0", "license": "MIT", "dependencies": { "lodash.debounce": "^4.0.8", "pdfjs-dist": "2.16.105", - "react-rnd": "^10.4.1", - "typedoc-material-theme": "^1.0.2", - "typedoc-theme-category-nav": "^0.0.3" + "react-rnd": "^10.4.1" }, "devDependencies": { "@types/lodash.debounce": "^4.0.9", @@ -23,6 +21,7 @@ "@vitejs/plugin-react": "^4.2.0", "prettier": "^3.1.0", "typedoc": "^0.25.8", + "typedoc-theme-category-nav": "^0.0.3", "typescript": "^5.3.2", "vite": "^4.5.0" }, @@ -771,11 +770,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@material/material-color-utilities": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/@material/material-color-utilities/-/material-color-utilities-0.2.7.tgz", - "integrity": "sha512-0FCeqG6WvK4/Cc06F/xXMd/pv4FeisI0c1tUpBbfhA2n9Y8eZEv4Karjbmf2ZqQCPUWMrGp8A571tCjizxoTiQ==" - }, "node_modules/@types/babel__core": { "version": "7.20.5", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", @@ -895,7 +889,8 @@ "node_modules/ansi-sequence-parser": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", - "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==" + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", + "dev": true }, "node_modules/ansi-styles": { "version": "3.2.1", @@ -912,12 +907,14 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true }, "node_modules/brace-expansion": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, "dependencies": { "balanced-match": "^1.0.0" } @@ -1185,7 +1182,8 @@ "node_modules/jsonc-parser": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==" + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", + "dev": true }, "node_modules/lodash.debounce": { "version": "4.0.8", @@ -1215,12 +1213,14 @@ "node_modules/lunr": { "version": "2.3.9", "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", - "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==" + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true }, "node_modules/marked": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "dev": true, "bin": { "marked": "bin/marked.js" }, @@ -1232,6 +1232,7 @@ "version": "9.0.3", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, "dependencies": { "brace-expansion": "^2.0.1" }, @@ -1477,6 +1478,7 @@ "version": "0.14.7", "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", + "dev": true, "dependencies": { "ansi-sequence-parser": "^1.1.0", "jsonc-parser": "^3.2.0", @@ -1518,6 +1520,7 @@ "version": "0.25.8", "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.8.tgz", "integrity": "sha512-mh8oLW66nwmeB9uTa0Bdcjfis+48bAjSH3uqdzSuSawfduROQLlXw//WSNZLYDdhmMVB7YcYZicq6e8T0d271A==", + "dev": true, "dependencies": { "lunr": "^2.3.9", "marked": "^4.3.0", @@ -1534,35 +1537,11 @@ "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x" } }, - "node_modules/typedoc-material-theme": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/typedoc-material-theme/-/typedoc-material-theme-1.0.2.tgz", - "integrity": "sha512-/nH/twYeHrnz5sZaaXzYJ85EOgKqnbl1ivzBKmuEAga1dBsARttwQUTPKAT7XrCPD+rRcoqxuCOdXZ6EGiqRQA==", - "funding": [ - { - "type": "individual", - "url": "https://paypal.me/dmnsgn" - }, - { - "type": "individual", - "url": "https://commerce.coinbase.com/checkout/56cbdf28-e323-48d8-9c98-7019e72c97f3" - } - ], - "dependencies": { - "@material/material-color-utilities": "^0.2.7" - }, - "engines": { - "node": ">=18.0.0", - "npm": ">=8.6.0" - }, - "peerDependencies": { - "typedoc": "^0.25.3" - } - }, "node_modules/typedoc-theme-category-nav": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/typedoc-theme-category-nav/-/typedoc-theme-category-nav-0.0.3.tgz", "integrity": "sha512-ADTf9iVuNHzc0T2i7Qw4ah3I6fXZehEsQVyfY2HZBchfbLk+8/5v5dDC0yDqHa5aJ5vg6+OjOMHmmzjr8FQMFg==", + "dev": true, "engines": { "node": ">= 18" }, @@ -1574,6 +1553,7 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", + "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -1676,12 +1656,14 @@ "node_modules/vscode-oniguruma": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", - "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==" + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "dev": true }, "node_modules/vscode-textmate": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", - "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==" + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", + "dev": true }, "node_modules/web-streams-polyfill": { "version": "3.3.3",