@react-pdf-viewer/zoom
Advanced tools
Comparing version 3.7.0 to 3.8.0
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var core = require('@react-pdf-viewer/core'); | ||
var React = require('react'); | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) return e; | ||
function _interopNamespaceDefault(e) { | ||
var n = Object.create(null); | ||
@@ -22,7 +19,7 @@ if (e) { | ||
} | ||
n["default"] = e; | ||
n.default = e; | ||
return Object.freeze(n); | ||
} | ||
var React__namespace = /*#__PURE__*/_interopNamespace(React); | ||
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React); | ||
@@ -29,0 +26,0 @@ var ZoomInIcon = function () { return (React__namespace.createElement(core.Icon, { ignoreDirection: true, size: 16 }, |
@@ -1,1 +0,1 @@ | ||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@react-pdf-viewer/core");function t(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var n=t(require("react")),o=function(){return n.createElement(e.Icon,{ignoreDirection:!0,size:16},n.createElement("path",{d:"M10.5,0.499c5.523,0,10,4.477,10,10s-4.477,10-10,10s-10-4.477-10-10S4.977,0.499,10.5,0.499z\n M23.5,23.499\n l-5.929-5.929\n M5.5,10.499h10\n M10.5,5.499v10"}))},r=function(){return n.createElement(e.Icon,{ignoreDirection:!0,size:16},n.createElement("path",{d:"M10.5,0.499c5.523,0,10,4.477,10,10s-4.477,10-10,10s-10-4.477-10-10S4.977,0.499,10.5,0.499z\n M23.5,23.499\n l-5.929-5.929\n M5.5,10.499h10"}))},c=function(){return c=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)},a=function(e){var t=n.useState(e.get("scale")||0),o=t[0],r=t[1],c=function(e){r(e)};return n.useEffect((function(){return e.subscribe("scale",c),function(){e.unsubscribe("scale",c)}}),[]),{scale:o}},u=function(e){var t=e.children,o=e.store;return(t||function(e){return n.createElement(n.Fragment,null,"".concat(Math.round(100*e.scale),"%"))})({scale:a(o).scale})},i=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.3,1.5,1.7,1.9,2.1,2.4,2.7,3,3.3,3.7,4.1,4.6,5.1,5.7,6.3,7,7.7,8.5,9.4,10],l=function(e){return i.find((function(t){return t>e}))||e},m=function(e){var t=i.findIndex((function(t){return t>=e}));return-1===t||0===t?e:i[t-1]},s=function(t){var o=t.containerRef,r=t.store,c=function(t){if(!t.shiftKey&&!t.altKey&&(e.isMac()?t.metaKey:t.ctrlKey)){var n=o.current;if(n&&document.activeElement&&n.contains(document.activeElement)){var c=r.get("zoom");if(c){var a=r.get("scale")||1,u=1;switch(t.key){case"-":u=m(a);break;case"=":u=l(a);break;case"0":u=1;break;default:u=a}u!==a&&(t.preventDefault(),c(u))}}}};return n.useEffect((function(){if(o.current)return document.addEventListener("keydown",c),function(){document.removeEventListener("keydown",c)}}),[o.current]),n.createElement(n.Fragment,null)},f=[.5,.75,1,1.25,1.5,2,3,4],v={left:0,top:8},p=function(t){var o=t.levels,r=void 0===o?f:o,c=t.scale,a=t.onZoom,u=n.useContext(e.LocalizationContext).l10n,i=n.useContext(e.ThemeContext).direction===e.TextDirection.RightToLeft,l=u&&u.zoom?u.zoom.zoomDocument:"Zoom document";return n.createElement(e.Popover,{ariaControlsSuffix:"zoom",ariaHasPopup:"menu",position:e.Position.BottomCenter,target:function(t){return n.createElement(e.MinimalButton,{ariaLabel:l,testId:"zoom__popover-target",onClick:function(){t()}},n.createElement("span",{className:"rpv-zoom__popover-target"},n.createElement("span",{"data-testid":"zoom__popover-target-scale",className:e.classNames({"rpv-zoom__popover-target-scale":!0,"rpv-zoom__popover-target-scale--ltr":!i,"rpv-zoom__popover-target-scale--rtl":i})},Math.round(100*c),"%"),n.createElement("span",{className:"rpv-zoom__popover-target-arrow"})))},content:function(t){return n.createElement(e.Menu,null,Object.keys(e.SpecialZoomLevel).map((function(o){var r=o;return n.createElement(e.MenuItem,{key:r,onClick:function(){t(),a(r)}},function(t){switch(t){case e.SpecialZoomLevel.ActualSize:return u&&u.zoom?u.zoom.actualSize:"Actual size";case e.SpecialZoomLevel.PageFit:return u&&u.zoom?u.zoom.pageFit:"Page fit";case e.SpecialZoomLevel.PageWidth:return u&&u.zoom?u.zoom.pageWidth:"Page width"}}(r))})),n.createElement(e.MenuDivider,null),r.map((function(o){return n.createElement(e.MenuItem,{key:o,onClick:function(){t(),a(o)}},"".concat(Math.round(100*o),"%"))})))},offset:v,closeOnClickOutside:!0,closeOnEscape:!0})},z=function(e){var t=e.children,o=e.levels,r=e.store;return(t||function(e){return n.createElement(p,{levels:o,scale:e.scale,onZoom:e.onZoom})})({scale:a(r).scale,onZoom:function(e){var t=r.get("zoom");t&&t(e)}})},E={left:0,top:8},d=function(t){var r=t.enableShortcuts,c=t.onClick,a=n.useContext(e.LocalizationContext).l10n,u=a&&a.zoom?a.zoom.zoomIn:"Zoom in",i=r?e.isMac()?"Meta+=":"Ctrl+=":"";return n.createElement(e.Tooltip,{ariaControlsSuffix:"zoom-in",position:e.Position.BottomCenter,target:n.createElement(e.MinimalButton,{ariaKeyShortcuts:i,ariaLabel:u,testId:"zoom__in-button",onClick:c},n.createElement(o,null)),content:function(){return u},offset:E})},C=function(e){var t=e.children,n=e.enableShortcuts,o=e.store,r=a(o).scale;return(t||d)({enableShortcuts:n,onClick:function(){var e=o.get("zoom");e&&e(l(r))}})},h=function(t){var r=t.onClick,c=n.useContext(e.LocalizationContext).l10n,a=c&&c.zoom?c.zoom.zoomIn:"Zoom in";return n.createElement(e.MenuItem,{icon:n.createElement(o,null),testId:"zoom__in-menu",onClick:r},a)},g={left:0,top:8},b=function(t){var o=t.enableShortcuts,c=t.onClick,a=n.useContext(e.LocalizationContext).l10n,u=a&&a.zoom?a.zoom.zoomOut:"Zoom out",i=o?e.isMac()?"Meta+-":"Ctrl+-":"";return n.createElement(e.Tooltip,{ariaControlsSuffix:"zoom-out",position:e.Position.BottomCenter,target:n.createElement(e.MinimalButton,{ariaKeyShortcuts:i,ariaLabel:u,testId:"zoom__out-button",onClick:c},n.createElement(r,null)),content:function(){return u},offset:g})},k=function(e){var t=e.children,n=e.enableShortcuts,o=e.store,r=a(o).scale;return(t||b)({enableShortcuts:n,onClick:function(){var e=o.get("zoom");e&&e(m(r))}})},M=function(t){var o=t.onClick,c=n.useContext(e.LocalizationContext).l10n,a=c&&c.zoom?c.zoom.zoomOut:"Zoom out";return n.createElement(e.MenuItem,{icon:n.createElement(r,null),testId:"zoom__out-menu",onClick:o},a)};exports.ZoomInIcon=o,exports.ZoomOutIcon=r,exports.zoomPlugin=function(t){var o=n.useMemo((function(){return Object.assign({},{enableShortcuts:!0},t)}),[]),r=n.useMemo((function(){return e.createStore({})}),[]),a=function(e){return n.createElement(C,c({enableShortcuts:o.enableShortcuts},e,{store:r}))},i=function(e){return n.createElement(k,c({enableShortcuts:o.enableShortcuts},e,{store:r}))},l=function(e){return n.createElement(z,c({},e,{store:r}))};return{renderViewer:function(e){var t=e.slot;if(!o.enableShortcuts)return t;var a={children:n.createElement(n.Fragment,null,n.createElement(s,{containerRef:e.containerRef,store:r}),t.children)};return c(c({},t),a)},install:function(e){r.update("zoom",e.zoom)},onViewerStateChange:function(e){return r.update("scale",e.scale),e},zoomTo:function(e){var t=r.get("zoom");t&&t(e)},CurrentScale:function(e){return n.createElement(u,c({},e,{store:r}))},ZoomIn:a,ZoomInButton:function(){return n.createElement(a,null,(function(e){return n.createElement(d,c({},e))}))},ZoomInMenuItem:function(e){return n.createElement(a,null,(function(t){return n.createElement(h,{onClick:function(){t.onClick(),e.onClick()}})}))},ZoomOut:i,ZoomOutButton:function(){return n.createElement(i,null,(function(e){return n.createElement(b,c({},e))}))},ZoomOutMenuItem:function(e){return n.createElement(i,null,(function(t){return n.createElement(M,{onClick:function(){t.onClick(),e.onClick()}})}))},Zoom:l,ZoomPopover:function(e){return n.createElement(l,null,(function(t){return n.createElement(p,c({levels:null==e?void 0:e.levels},t))}))}}}; | ||
"use strict";var e=require("@react-pdf-viewer/core");function t(e){var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var n=t(require("react")),o=function(){return n.createElement(e.Icon,{ignoreDirection:!0,size:16},n.createElement("path",{d:"M10.5,0.499c5.523,0,10,4.477,10,10s-4.477,10-10,10s-10-4.477-10-10S4.977,0.499,10.5,0.499z\n M23.5,23.499\n l-5.929-5.929\n M5.5,10.499h10\n M10.5,5.499v10"}))},r=function(){return n.createElement(e.Icon,{ignoreDirection:!0,size:16},n.createElement("path",{d:"M10.5,0.499c5.523,0,10,4.477,10,10s-4.477,10-10,10s-10-4.477-10-10S4.977,0.499,10.5,0.499z\n M23.5,23.499\n l-5.929-5.929\n M5.5,10.499h10"}))},c=function(){return c=Object.assign||function(e){for(var t,n=1,o=arguments.length;n<o;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},c.apply(this,arguments)},a=function(e){var t=n.useState(e.get("scale")||0),o=t[0],r=t[1],c=function(e){r(e)};return n.useEffect((function(){return e.subscribe("scale",c),function(){e.unsubscribe("scale",c)}}),[]),{scale:o}},u=function(e){var t=e.children,o=e.store;return(t||function(e){return n.createElement(n.Fragment,null,"".concat(Math.round(100*e.scale),"%"))})({scale:a(o).scale})},i=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.3,1.5,1.7,1.9,2.1,2.4,2.7,3,3.3,3.7,4.1,4.6,5.1,5.7,6.3,7,7.7,8.5,9.4,10],l=function(e){return i.find((function(t){return t>e}))||e},m=function(e){var t=i.findIndex((function(t){return t>=e}));return-1===t||0===t?e:i[t-1]},s=function(t){var o=t.containerRef,r=t.store,c=function(t){if(!t.shiftKey&&!t.altKey&&(e.isMac()?t.metaKey:t.ctrlKey)){var n=o.current;if(n&&document.activeElement&&n.contains(document.activeElement)){var c=r.get("zoom");if(c){var a=r.get("scale")||1,u=1;switch(t.key){case"-":u=m(a);break;case"=":u=l(a);break;case"0":u=1;break;default:u=a}u!==a&&(t.preventDefault(),c(u))}}}};return n.useEffect((function(){if(o.current)return document.addEventListener("keydown",c),function(){document.removeEventListener("keydown",c)}}),[o.current]),n.createElement(n.Fragment,null)},f=[.5,.75,1,1.25,1.5,2,3,4],v={left:0,top:8},p=function(t){var o=t.levels,r=void 0===o?f:o,c=t.scale,a=t.onZoom,u=n.useContext(e.LocalizationContext).l10n,i=n.useContext(e.ThemeContext).direction===e.TextDirection.RightToLeft,l=u&&u.zoom?u.zoom.zoomDocument:"Zoom document";return n.createElement(e.Popover,{ariaControlsSuffix:"zoom",ariaHasPopup:"menu",position:e.Position.BottomCenter,target:function(t){return n.createElement(e.MinimalButton,{ariaLabel:l,testId:"zoom__popover-target",onClick:function(){t()}},n.createElement("span",{className:"rpv-zoom__popover-target"},n.createElement("span",{"data-testid":"zoom__popover-target-scale",className:e.classNames({"rpv-zoom__popover-target-scale":!0,"rpv-zoom__popover-target-scale--ltr":!i,"rpv-zoom__popover-target-scale--rtl":i})},Math.round(100*c),"%"),n.createElement("span",{className:"rpv-zoom__popover-target-arrow"})))},content:function(t){return n.createElement(e.Menu,null,Object.keys(e.SpecialZoomLevel).map((function(o){var r=o;return n.createElement(e.MenuItem,{key:r,onClick:function(){t(),a(r)}},function(t){switch(t){case e.SpecialZoomLevel.ActualSize:return u&&u.zoom?u.zoom.actualSize:"Actual size";case e.SpecialZoomLevel.PageFit:return u&&u.zoom?u.zoom.pageFit:"Page fit";case e.SpecialZoomLevel.PageWidth:return u&&u.zoom?u.zoom.pageWidth:"Page width"}}(r))})),n.createElement(e.MenuDivider,null),r.map((function(o){return n.createElement(e.MenuItem,{key:o,onClick:function(){t(),a(o)}},"".concat(Math.round(100*o),"%"))})))},offset:v,closeOnClickOutside:!0,closeOnEscape:!0})},z=function(e){var t=e.children,o=e.levels,r=e.store;return(t||function(e){return n.createElement(p,{levels:o,scale:e.scale,onZoom:e.onZoom})})({scale:a(r).scale,onZoom:function(e){var t=r.get("zoom");t&&t(e)}})},E={left:0,top:8},d=function(t){var r=t.enableShortcuts,c=t.onClick,a=n.useContext(e.LocalizationContext).l10n,u=a&&a.zoom?a.zoom.zoomIn:"Zoom in",i=r?e.isMac()?"Meta+=":"Ctrl+=":"";return n.createElement(e.Tooltip,{ariaControlsSuffix:"zoom-in",position:e.Position.BottomCenter,target:n.createElement(e.MinimalButton,{ariaKeyShortcuts:i,ariaLabel:u,testId:"zoom__in-button",onClick:c},n.createElement(o,null)),content:function(){return u},offset:E})},C=function(e){var t=e.children,n=e.enableShortcuts,o=e.store,r=a(o).scale;return(t||d)({enableShortcuts:n,onClick:function(){var e=o.get("zoom");e&&e(l(r))}})},h=function(t){var r=t.onClick,c=n.useContext(e.LocalizationContext).l10n,a=c&&c.zoom?c.zoom.zoomIn:"Zoom in";return n.createElement(e.MenuItem,{icon:n.createElement(o,null),testId:"zoom__in-menu",onClick:r},a)},g={left:0,top:8},b=function(t){var o=t.enableShortcuts,c=t.onClick,a=n.useContext(e.LocalizationContext).l10n,u=a&&a.zoom?a.zoom.zoomOut:"Zoom out",i=o?e.isMac()?"Meta+-":"Ctrl+-":"";return n.createElement(e.Tooltip,{ariaControlsSuffix:"zoom-out",position:e.Position.BottomCenter,target:n.createElement(e.MinimalButton,{ariaKeyShortcuts:i,ariaLabel:u,testId:"zoom__out-button",onClick:c},n.createElement(r,null)),content:function(){return u},offset:g})},k=function(e){var t=e.children,n=e.enableShortcuts,o=e.store,r=a(o).scale;return(t||b)({enableShortcuts:n,onClick:function(){var e=o.get("zoom");e&&e(m(r))}})},S=function(t){var o=t.onClick,c=n.useContext(e.LocalizationContext).l10n,a=c&&c.zoom?c.zoom.zoomOut:"Zoom out";return n.createElement(e.MenuItem,{icon:n.createElement(r,null),testId:"zoom__out-menu",onClick:o},a)};exports.ZoomInIcon=o,exports.ZoomOutIcon=r,exports.zoomPlugin=function(t){var o=n.useMemo((function(){return Object.assign({},{enableShortcuts:!0},t)}),[]),r=n.useMemo((function(){return e.createStore({})}),[]),a=function(e){return n.createElement(C,c({enableShortcuts:o.enableShortcuts},e,{store:r}))},i=function(e){return n.createElement(k,c({enableShortcuts:o.enableShortcuts},e,{store:r}))},l=function(e){return n.createElement(z,c({},e,{store:r}))};return{renderViewer:function(e){var t=e.slot;if(!o.enableShortcuts)return t;var a={children:n.createElement(n.Fragment,null,n.createElement(s,{containerRef:e.containerRef,store:r}),t.children)};return c(c({},t),a)},install:function(e){r.update("zoom",e.zoom)},onViewerStateChange:function(e){return r.update("scale",e.scale),e},zoomTo:function(e){var t=r.get("zoom");t&&t(e)},CurrentScale:function(e){return n.createElement(u,c({},e,{store:r}))},ZoomIn:a,ZoomInButton:function(){return n.createElement(a,null,(function(e){return n.createElement(d,c({},e))}))},ZoomInMenuItem:function(e){return n.createElement(a,null,(function(t){return n.createElement(h,{onClick:function(){t.onClick(),e.onClick()}})}))},ZoomOut:i,ZoomOutButton:function(){return n.createElement(i,null,(function(e){return n.createElement(b,c({},e))}))},ZoomOutMenuItem:function(e){return n.createElement(i,null,(function(t){return n.createElement(S,{onClick:function(){t.onClick(),e.onClick()}})}))},Zoom:l,ZoomPopover:function(e){return n.createElement(l,null,(function(t){return n.createElement(p,c({levels:null==e?void 0:e.levels},t))}))}}}; |
{ | ||
"name": "@react-pdf-viewer/zoom", | ||
"version": "3.7.0", | ||
"version": "3.8.0", | ||
"description": "A React component to view a PDF document", | ||
@@ -36,3 +36,3 @@ "license": "https://react-pdf-viewer.dev/license", | ||
"dependencies": { | ||
"@react-pdf-viewer/core": "3.7.0" | ||
"@react-pdf-viewer/core": "3.8.0" | ||
}, | ||
@@ -49,7 +49,7 @@ "peerDependencies": { | ||
"build": "npm run clean && npm run js && npm run css", | ||
"js": "cp src/index.d.ts lib && cp dist/index.js lib && rollup -c ../../rollup.config.js", | ||
"css": "sass --no-source-map src/styles/index.scss lib/styles/index.temp.css && postcss lib/styles/index.temp.css > lib/styles/index.css && rm -rf lib/styles/index.temp.css", | ||
"js": "cp src/index.d.ts lib && cp dist/index.js lib && rollup -c ../../rollup.config.cjs", | ||
"css": "sass --no-source-map --style compressed src/styles/index.scss lib/styles/index.css", | ||
"test": "jest --config ../../jest.config.js" | ||
}, | ||
"gitHead": "ccba5d4f68fa44ca7c242837280fcebf92b4f6a6" | ||
"gitHead": "62b141a0ceb569147ca765ab6bbff76c5e480bf8" | ||
} |
Sorry, the diff of this file is not supported yet
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
28222
+ Added@mapbox/node-pre-gyp@1.0.11(transitive)
+ Added@react-pdf-viewer/core@3.8.0(transitive)
+ Addedabbrev@1.1.1(transitive)
+ Addedagent-base@6.0.2(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedaproba@2.0.0(transitive)
+ Addedare-we-there-yet@2.0.0(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedcanvas@2.11.2(transitive)
+ Addedchownr@2.0.0(transitive)
+ Addedcolor-support@1.1.3(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedconsole-control-strings@1.1.0(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addeddecompress-response@4.2.1(transitive)
+ Addeddelegates@1.0.0(transitive)
+ Addeddetect-libc@2.0.3(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedfs-minipass@2.1.0(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedgauge@3.0.2(transitive)
+ Addedglob@7.2.3(transitive)
+ Addedhas-unicode@2.0.1(transitive)
+ Addedhttps-proxy-agent@5.0.1(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedmake-dir@3.1.0(transitive)
+ Addedmimic-response@2.1.0(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedminipass@3.3.65.0.0(transitive)
+ Addedminizlib@2.1.2(transitive)
+ Addedmkdirp@1.0.4(transitive)
+ Addedms@2.1.3(transitive)
+ Addednan@2.22.0(transitive)
+ Addednode-fetch@2.7.0(transitive)
+ Addednopt@5.0.0(transitive)
+ Addednpmlog@5.0.1(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpath2d@0.1.1(transitive)
+ Addedpath2d-polyfill@2.1.1(transitive)
+ Addedpdfjs-dist@3.11.174(transitive)
+ Addedreadable-stream@3.6.2(transitive)
+ Addedrimraf@3.0.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsemver@6.3.17.6.3(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsimple-concat@1.0.1(transitive)
+ Addedsimple-get@3.1.1(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedtar@6.2.1(transitive)
+ Addedtr46@0.0.3(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedwebidl-conversions@3.0.1(transitive)
+ Addedwhatwg-url@5.0.0(transitive)
+ Addedwide-align@1.1.5(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedyallist@4.0.0(transitive)
- Removed@react-pdf-viewer/core@3.7.0(transitive)
- Removeddommatrix@1.0.3(transitive)
- Removedpdfjs-dist@2.16.105(transitive)
- Removedweb-streams-polyfill@3.3.3(transitive)
Updated@react-pdf-viewer/core@3.8.0