Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-pdf-viewer/full-screen

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-pdf-viewer/full-screen - npm Package Compare versions

Comparing version 2.7.2 to 2.8.0

8

lib/cjs/full-screen.js

@@ -193,2 +193,4 @@ 'use strict';

var l10n = React__namespace.useContext(core.LocalizationContext).l10n;
var direction = React__namespace.useContext(core.ThemeContext).direction;
var isRtl = direction === core.TextDirection.RightToLeft;
var exitFullScreenLabel = l10n && l10n.fullScreen ? l10n.fullScreen.exitFullScreen : 'Exit full screen';

@@ -219,3 +221,7 @@ var handleFullScreen = function (fullScreen) {

}, []);
return (React__namespace.createElement(React__namespace.Fragment, null, isFullScreen && (React__namespace.createElement("div", { className: "rpv-full-screen__exit-button" },
return (React__namespace.createElement(React__namespace.Fragment, null, isFullScreen && (React__namespace.createElement("div", { className: core.classNames({
'rpv-full-screen__exit-button': true,
'rpv-full-screen__exit-button--ltr': !isRtl,
'rpv-full-screen__exit-button--rtl': isRtl,
}) },
React__namespace.createElement("div", { className: "rpv-full-screen__exit-button-content" },

@@ -222,0 +228,0 @@ React__namespace.createElement(core.MinimalButton, { ariaLabel: exitFullScreenLabel, onClick: handleExitFullScreen },

4

lib/cjs/full-screen.min.js

@@ -1,2 +0,2 @@

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("@react-pdf-viewer/core");function t(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,l.get?l:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var l,r=t(e),u=function(){return(u=Object.assign||function(e){for(var n,t=1,l=arguments.length;t<l;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)},c=function(){return r.createElement(n.Icon,{size:16},r.createElement("path",{d:"M0.5 12L23.5 12"}),r.createElement("path",{d:"M11.5 1L11.5 23"}),r.createElement("path",{d:"M8.5 4L11.5 1 14.5 4"}),r.createElement("path",{d:"M20.5 9L23.5 12 20.5 15"}),r.createElement("path",{d:"M3.5 15L0.5 12 3.5 9"}),r.createElement("path",{d:"M14.5 20L11.5 23 8.5 20"}))},o={left:0,top:8},a=function(e){var t=e.onClick,l=r.useContext(n.LocalizationContext).l10n,u=l&&l.fullScreen?l.fullScreen.enterFullScreen:"Full screen";return r.createElement(n.Tooltip,{ariaControlsSuffix:"full-screen-enter",position:n.Position.BottomCenter,target:r.createElement(n.MinimalButton,{ariaLabel:u,onClick:t},r.createElement(c,null)),content:function(){return u},offset:o})};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("@react-pdf-viewer/core");function t(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var l=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,l.get?l:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var l,r=t(e),u=function(){return(u=Object.assign||function(e){for(var n,t=1,l=arguments.length;t<l;t++)for(var r in n=arguments[t])Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r]);return e}).apply(this,arguments)},c=function(){return r.createElement(n.Icon,{size:16},r.createElement("path",{d:"M0.5 12L23.5 12"}),r.createElement("path",{d:"M11.5 1L11.5 23"}),r.createElement("path",{d:"M8.5 4L11.5 1 14.5 4"}),r.createElement("path",{d:"M20.5 9L23.5 12 20.5 15"}),r.createElement("path",{d:"M3.5 15L0.5 12 3.5 9"}),r.createElement("path",{d:"M14.5 20L11.5 23 8.5 20"}))},o={left:0,top:8},i=function(e){var t=e.onClick,l=r.useContext(n.LocalizationContext).l10n,u=l&&l.fullScreen?l.fullScreen.enterFullScreen:"Full screen";return r.createElement(n.Tooltip,{ariaControlsSuffix:"full-screen-enter",position:n.Position.BottomCenter,target:r.createElement(n.MinimalButton,{ariaLabel:u,onClick:t},r.createElement(c,null)),content:function(){return u},offset:o})};
/*! *****************************************************************************

@@ -15,2 +15,2 @@ Copyright (c) Microsoft Corporation.

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */!function(e){e[e.ExitFullScreen=0]="ExitFullScreen",e[e.FullScreenChange=1]="FullScreenChange",e[e.FullScreenElement=2]="FullScreenElement",e[e.FullScreenEnabled=3]="FullScreenEnabled",e[e.RequestFullScreen=4]="RequestFullScreen"}(l||(l={}));var i={ExitFullScreen:"exitFullscreen",FullScreenChange:"fullscreenchange",FullScreenElement:"fullscreenElement",FullScreenEnabled:"fullscreenEnabled",RequestFullScreen:"requestFullscreen"},s={ExitFullScreen:"webkitExitFullscreen",FullScreenChange:"webkitfullscreenchange",FullScreenElement:"webkitFullscreenElement",FullScreenEnabled:"webkitFullscreenEnabled",RequestFullScreen:"webkitRequestFullscreen"},f={ExitFullScreen:"msExitFullscreen",FullScreenChange:"MSFullscreenChange",FullScreenElement:"msFullscreenElement",FullScreenEnabled:"msFullscreenEnabled",RequestFullScreen:"msRequestFullscreen"},E="undefined"!=typeof window,m=E&&(l.FullScreenEnabled in document&&i||s.FullScreenEnabled in document&&s||f.FullScreenEnabled in document&&f)||i,F=function(e){return E?e[m.ExitFullScreen]():Promise.resolve({})},S=function(){return E?document[m.FullScreenElement]:null},d=function(e){var n=e.children,t=e.store,l=e.onEnterFullScreen,u=e.onExitFullScreen,c=r.useRef(t.get("getPagesContainer")?t.get("getPagesContainer")():null),o=function(){var e=S()===c.current;t.update("isFullScreen",e);var n=t.get("zoom");n&&(e?l(n):u(n))},i=function(e){var n;c.current=e(),n=o,E&&document.addEventListener(m.FullScreenChange,n)};r.useEffect((function(){return t.subscribe("getPagesContainer",i),function(){t.unsubscribe("getPagesContainer",i)}}),[]);return(n||function(e){return r.createElement(a,{onClick:e.onClick})})({onClick:function(){var e=c.current;e&&function(){var e=c.current;if(!e)return Promise.resolve();var n=S();return n&&n!==e?F(n):Promise.resolve()}().then((function(){var n;n=e,E&&n[m.RequestFullScreen]()}))}})},b=function(e){var t=e.onClick,l=r.useContext(n.LocalizationContext).l10n,u=l&&l.fullScreen?l.fullScreen.enterFullScreen:"Full screen";return r.createElement(n.MenuItem,{icon:r.createElement(c,null),onClick:t},u)},g=function(){return r.createElement(n.Icon,{size:16},r.createElement("path",{d:"M11.5 23.499L11.5 14.499"}),r.createElement("path",{d:"M7.5 18.499L11.5 14.499 15.5 18.499"}),r.createElement("path",{d:"M11.5 1.499L11.5 10.499"}),r.createElement("path",{d:"M7.5 6.499L11.5 10.499 15.5 6.499"}),r.createElement("path",{d:"M20.5 12.499L1.5 12.499"}))},p=function(e){var t=e.store,l=r.useState(!1),u=l[0],c=l[1],o=r.useContext(n.LocalizationContext).l10n,a=o&&o.fullScreen?o.fullScreen.exitFullScreen:"Exit full screen",i=function(e){c(e)};return r.useEffect((function(){return t.subscribe("isFullScreen",i),function(){t.unsubscribe("isFullScreen",i)}}),[]),r.createElement(r.Fragment,null,u&&r.createElement("div",{className:"rpv-full-screen__exit-button"},r.createElement("div",{className:"rpv-full-screen__exit-button-content"},r.createElement(n.MinimalButton,{ariaLabel:a,onClick:function(){c(!1);var e=t.get("getPagesContainer");if(e){var n=e();if(n){var l=S();l&&l===n&&F(document)}}}},r.createElement(g,null)))))};exports.ExitFullScreenIcon=g,exports.FullScreenIcon=c,exports.fullScreenPlugin=function(e){var t=r.useMemo((function(){return n.createStore({})}),[]),l=e&&e.onEnterFullScreen?e.onEnterFullScreen:function(){},c=e&&e.onExitFullScreen?e.onExitFullScreen:function(){},o=function(e){return r.createElement(d,u({},e,{store:t,onEnterFullScreen:l,onExitFullScreen:c}))},i=function(){return r.createElement(p,{store:t})};return{install:function(e){t.update("getPagesContainer",e.getPagesContainer),t.update("zoom",e.zoom)},renderViewer:function(e){var n=e.slot;return n.subSlot&&(n.subSlot.children=r.createElement(r.Fragment,null,r.createElement(i,null),n.subSlot.children)),n},EnterFullScreen:o,EnterFullScreenButton:function(){return r.createElement(o,null,(function(e){return r.createElement(a,u({},e))}))},EnterFullScreenMenuItem:function(e){return r.createElement(o,null,(function(n){return r.createElement(b,{onClick:function(){n.onClick(),e.onClick()}})}))}}};
***************************************************************************** */!function(e){e[e.ExitFullScreen=0]="ExitFullScreen",e[e.FullScreenChange=1]="FullScreenChange",e[e.FullScreenElement=2]="FullScreenElement",e[e.FullScreenEnabled=3]="FullScreenEnabled",e[e.RequestFullScreen=4]="RequestFullScreen"}(l||(l={}));var a={ExitFullScreen:"exitFullscreen",FullScreenChange:"fullscreenchange",FullScreenElement:"fullscreenElement",FullScreenEnabled:"fullscreenEnabled",RequestFullScreen:"requestFullscreen"},s={ExitFullScreen:"webkitExitFullscreen",FullScreenChange:"webkitfullscreenchange",FullScreenElement:"webkitFullscreenElement",FullScreenEnabled:"webkitFullscreenEnabled",RequestFullScreen:"webkitRequestFullscreen"},f={ExitFullScreen:"msExitFullscreen",FullScreenChange:"MSFullscreenChange",FullScreenElement:"msFullscreenElement",FullScreenEnabled:"msFullscreenEnabled",RequestFullScreen:"msRequestFullscreen"},E="undefined"!=typeof window,m=E&&(l.FullScreenEnabled in document&&a||s.FullScreenEnabled in document&&s||f.FullScreenEnabled in document&&f)||a,F=function(e){return E?e[m.ExitFullScreen]():Promise.resolve({})},S=function(){return E?document[m.FullScreenElement]:null},d=function(e){var n=e.children,t=e.store,l=e.onEnterFullScreen,u=e.onExitFullScreen,c=r.useRef(t.get("getPagesContainer")?t.get("getPagesContainer")():null),o=function(){var e=S()===c.current;t.update("isFullScreen",e);var n=t.get("zoom");n&&(e?l(n):u(n))},a=function(e){var n;c.current=e(),n=o,E&&document.addEventListener(m.FullScreenChange,n)};r.useEffect((function(){return t.subscribe("getPagesContainer",a),function(){t.unsubscribe("getPagesContainer",a)}}),[]);return(n||function(e){return r.createElement(i,{onClick:e.onClick})})({onClick:function(){var e=c.current;e&&function(){var e=c.current;if(!e)return Promise.resolve();var n=S();return n&&n!==e?F(n):Promise.resolve()}().then((function(){var n;n=e,E&&n[m.RequestFullScreen]()}))}})},b=function(e){var t=e.onClick,l=r.useContext(n.LocalizationContext).l10n,u=l&&l.fullScreen?l.fullScreen.enterFullScreen:"Full screen";return r.createElement(n.MenuItem,{icon:r.createElement(c,null),onClick:t},u)},g=function(){return r.createElement(n.Icon,{size:16},r.createElement("path",{d:"M11.5 23.499L11.5 14.499"}),r.createElement("path",{d:"M7.5 18.499L11.5 14.499 15.5 18.499"}),r.createElement("path",{d:"M11.5 1.499L11.5 10.499"}),r.createElement("path",{d:"M7.5 6.499L11.5 10.499 15.5 6.499"}),r.createElement("path",{d:"M20.5 12.499L1.5 12.499"}))},p=function(e){var t=e.store,l=r.useState(!1),u=l[0],c=l[1],o=r.useContext(n.LocalizationContext).l10n,i=r.useContext(n.ThemeContext).direction===n.TextDirection.RightToLeft,a=o&&o.fullScreen?o.fullScreen.exitFullScreen:"Exit full screen",s=function(e){c(e)};return r.useEffect((function(){return t.subscribe("isFullScreen",s),function(){t.unsubscribe("isFullScreen",s)}}),[]),r.createElement(r.Fragment,null,u&&r.createElement("div",{className:n.classNames({"rpv-full-screen__exit-button":!0,"rpv-full-screen__exit-button--ltr":!i,"rpv-full-screen__exit-button--rtl":i})},r.createElement("div",{className:"rpv-full-screen__exit-button-content"},r.createElement(n.MinimalButton,{ariaLabel:a,onClick:function(){c(!1);var e=t.get("getPagesContainer");if(e){var n=e();if(n){var l=S();l&&l===n&&F(document)}}}},r.createElement(g,null)))))};exports.ExitFullScreenIcon=g,exports.FullScreenIcon=c,exports.fullScreenPlugin=function(e){var t=r.useMemo((function(){return n.createStore({})}),[]),l=e&&e.onEnterFullScreen?e.onEnterFullScreen:function(){},c=e&&e.onExitFullScreen?e.onExitFullScreen:function(){},o=function(e){return r.createElement(d,u({},e,{store:t,onEnterFullScreen:l,onExitFullScreen:c}))},a=function(){return r.createElement(p,{store:t})};return{install:function(e){t.update("getPagesContainer",e.getPagesContainer),t.update("zoom",e.zoom)},renderViewer:function(e){var n=e.slot;return n.subSlot&&(n.subSlot.children=r.createElement(r.Fragment,null,r.createElement(a,null),n.subSlot.children)),n},EnterFullScreen:o,EnterFullScreenButton:function(){return r.createElement(o,null,(function(e){return r.createElement(i,u({},e))}))},EnterFullScreenMenuItem:function(e){return r.createElement(o,null,(function(n){return r.createElement(b,{onClick:function(){n.onClick(),e.onClick()}})}))}}};
{
"name": "@react-pdf-viewer/full-screen",
"version": "2.7.2",
"version": "2.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": "2.7.2"
"@react-pdf-viewer/core": "2.8.0"
},

@@ -52,3 +52,3 @@ "peerDependencies": {

},
"gitHead": "156fdaa17d841cc90ce4e9bf6ec9e5a9e23bb014"
"gitHead": "5a7ff547bbdcf8b51c10907ad706e4edc397fc4f"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc