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

@react-pdf-viewer/theme

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-pdf-viewer/theme - npm Package Compare versions

Comparing version 2.11.0 to 3.0.0

4

lib/cjs/theme.js

@@ -75,3 +75,3 @@ 'use strict';

: 'Switch to the dark theme';
return (React__namespace.createElement(core.Tooltip, { ariaControlsSuffix: "theme-switch", position: core.Position.BottomCenter, target: React__namespace.createElement(core.MinimalButton, { ariaLabel: label, onClick: onClick }, isDarkTheme ? React__namespace.createElement(LightIcon, null) : React__namespace.createElement(DarkIcon, null)), content: function () { return label; }, offset: TOOLTIP_OFFSET }));
return (React__namespace.createElement(core.Tooltip, { ariaControlsSuffix: "theme-switch", position: core.Position.BottomCenter, target: React__namespace.createElement(core.MinimalButton, { ariaLabel: label, testId: "theme__switch-button", onClick: onClick }, isDarkTheme ? React__namespace.createElement(LightIcon, null) : React__namespace.createElement(DarkIcon, null)), content: function () { return label; }, offset: TOOLTIP_OFFSET }));
};

@@ -101,3 +101,3 @@

: 'Switch to the dark theme';
return (React__namespace.createElement(core.MenuItem, { icon: isDarkTheme ? React__namespace.createElement(LightIcon, null) : React__namespace.createElement(DarkIcon, null), onClick: onClick }, label));
return (React__namespace.createElement(core.MenuItem, { icon: isDarkTheme ? React__namespace.createElement(LightIcon, null) : React__namespace.createElement(DarkIcon, null), testId: "theme__switch-menu", onClick: onClick }, label));
};

@@ -104,0 +104,0 @@

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

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@react-pdf-viewer/core");function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r=n(e),c=function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var c in t=arguments[n])Object.prototype.hasOwnProperty.call(t,c)&&(e[c]=t[c]);return e},c.apply(this,arguments)},o=function(){return r.createElement(t.Icon,{size:16},r.createElement("path",{d:"M19.5,15.106l2.4-2.4a1,1,0,0,0,0-1.414l-2.4-2.4V5.5a1,1,0,0,0-1-1H15.106l-2.4-2.4a1,1,0,0,0-1.414,0l-2.4,2.4H5.5a1,1,0,0,0-1,1V8.894l-2.4,2.4a1,1,0,0,0,0,1.414l2.4,2.4V18.5a1,1,0,0,0,1,1H8.894l2.4,2.4a1,1,0,0,0,1.414,0l2.4-2.4H18.5a1,1,0,0,0,1-1Z"}),r.createElement("path",{d:"M10,6.349a6,6,0,0,1,0,11.3,6,6,0,1,0,0-11.3Z"}))},a=function(){return r.createElement(t.Icon,{size:16},r.createElement("path",{d:"M19.491,15.106l2.4-2.4a1,1,0,0,0,0-1.414l-2.4-2.4V5.5a1,1,0,0,0-1-1H15.1L12.7,2.1a1,1,0,0,0-1.414,0l-2.4,2.4H5.491a1,1,0,0,0-1,1V8.894l-2.4,2.4a1,1,0,0,0,0,1.414l2.4,2.4V18.5a1,1,0,0,0,1,1H8.885l2.4,2.4a1,1,0,0,0,1.414,0l2.4-2.4h3.394a1,1,0,0,0,1-1Z"}),r.createElement("path",{d:"M11.491,6c4,0,6,2.686,6,6s-2,6-6,6Z"}))},l={left:0,top:8},i=function(e){var n=e.onClick,c=r.useContext(t.ThemeContext),i=r.useContext(t.LocalizationContext).l10n,u="dark"===c.currentTheme,h=i&&i.theme?u?i.theme.switchLightTheme:i.theme.switchDarkTheme:u?"Switch to the light theme":"Switch to the dark theme";return r.createElement(t.Tooltip,{ariaControlsSuffix:"theme-switch",position:t.Position.BottomCenter,target:r.createElement(t.MinimalButton,{ariaLabel:h,onClick:n},u?r.createElement(a,null):r.createElement(o,null)),content:function(){return h},offset:l})},u=function(e){var n=e.children,c=r.useContext(t.ThemeContext);return(n||function(e){return r.createElement(i,{onClick:e.onClick})})({onClick:function(){return c.setCurrentTheme("dark"===c.currentTheme?"light":"dark")}})},h=function(e){var n=e.onClick,c=r.useContext(t.ThemeContext),l=r.useContext(t.LocalizationContext).l10n,i="dark"===c.currentTheme,u=l&&l.theme?i?l.theme.switchLightTheme:l.theme.switchDarkTheme:i?"Switch to the light theme":"Switch to the dark theme";return r.createElement(t.MenuItem,{icon:i?r.createElement(a,null):r.createElement(o,null),onClick:n},u)};
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@react-pdf-viewer/core");function n(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r=n(e),c=function(){return c=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var c in t=arguments[n])Object.prototype.hasOwnProperty.call(t,c)&&(e[c]=t[c]);return e},c.apply(this,arguments)},o=function(){return r.createElement(t.Icon,{size:16},r.createElement("path",{d:"M19.5,15.106l2.4-2.4a1,1,0,0,0,0-1.414l-2.4-2.4V5.5a1,1,0,0,0-1-1H15.106l-2.4-2.4a1,1,0,0,0-1.414,0l-2.4,2.4H5.5a1,1,0,0,0-1,1V8.894l-2.4,2.4a1,1,0,0,0,0,1.414l2.4,2.4V18.5a1,1,0,0,0,1,1H8.894l2.4,2.4a1,1,0,0,0,1.414,0l2.4-2.4H18.5a1,1,0,0,0,1-1Z"}),r.createElement("path",{d:"M10,6.349a6,6,0,0,1,0,11.3,6,6,0,1,0,0-11.3Z"}))},a=function(){return r.createElement(t.Icon,{size:16},r.createElement("path",{d:"M19.491,15.106l2.4-2.4a1,1,0,0,0,0-1.414l-2.4-2.4V5.5a1,1,0,0,0-1-1H15.1L12.7,2.1a1,1,0,0,0-1.414,0l-2.4,2.4H5.491a1,1,0,0,0-1,1V8.894l-2.4,2.4a1,1,0,0,0,0,1.414l2.4,2.4V18.5a1,1,0,0,0,1,1H8.885l2.4,2.4a1,1,0,0,0,1.414,0l2.4-2.4h3.394a1,1,0,0,0,1-1Z"}),r.createElement("path",{d:"M11.491,6c4,0,6,2.686,6,6s-2,6-6,6Z"}))},l={left:0,top:8},i=function(e){var n=e.onClick,c=r.useContext(t.ThemeContext),i=r.useContext(t.LocalizationContext).l10n,u="dark"===c.currentTheme,h=i&&i.theme?u?i.theme.switchLightTheme:i.theme.switchDarkTheme:u?"Switch to the light theme":"Switch to the dark theme";return r.createElement(t.Tooltip,{ariaControlsSuffix:"theme-switch",position:t.Position.BottomCenter,target:r.createElement(t.MinimalButton,{ariaLabel:h,testId:"theme__switch-button",onClick:n},u?r.createElement(a,null):r.createElement(o,null)),content:function(){return h},offset:l})},u=function(e){var n=e.children,c=r.useContext(t.ThemeContext);return(n||function(e){return r.createElement(i,{onClick:e.onClick})})({onClick:function(){return c.setCurrentTheme("dark"===c.currentTheme?"light":"dark")}})},h=function(e){var n=e.onClick,c=r.useContext(t.ThemeContext),l=r.useContext(t.LocalizationContext).l10n,i="dark"===c.currentTheme,u=l&&l.theme?i?l.theme.switchLightTheme:l.theme.switchDarkTheme:i?"Switch to the light theme":"Switch to the dark theme";return r.createElement(t.MenuItem,{icon:i?r.createElement(a,null):r.createElement(o,null),testId:"theme__switch-menu",onClick:n},u)};
/*! *****************************************************************************

@@ -3,0 +3,0 @@ Copyright (c) Microsoft Corporation.

{
"name": "@react-pdf-viewer/theme",
"version": "2.11.0",
"version": "3.0.0",
"description": "A React component to view a PDF document",

@@ -35,3 +35,3 @@ "license": "https://react-pdf-viewer.dev/license",

"dependencies": {
"@react-pdf-viewer/core": "2.11.0"
"@react-pdf-viewer/core": "3.0.0"
},

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

},
"gitHead": "5e4074055f48210e89c1fdf5b1cc53d78d56be44"
"gitHead": "db24bf8b47a1ef4ee9da726af7f66268468c3420"
}
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