Socket
Socket
Sign inDemoInstall

yet-another-react-lightbox

Package Overview
Dependencies
Maintainers
1
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yet-another-react-lightbox - npm Package Compare versions

Comparing version 1.9.0 to 1.9.1

6

dist/plugins/Zoom.js

@@ -95,8 +95,8 @@ import * as React from "react";

const getSlideRects = (slide, cover, maxZoomPixelRatio, rect) => {
var _a, _b;
var _a, _b, _c;
let slideRect = { width: 0, height: 0 };
let maxSlideRect = { width: 0, height: 0 };
if (rect && !("type" in slide) && "src" in slide) {
const width = Math.max(...(((_a = slide.srcSet) === null || _a === void 0 ? void 0 : _a.map((x) => x.width)) || []), ...[...(slide.width ? [slide.width] : [])]);
const height = Math.max(...(((_b = slide.srcSet) === null || _b === void 0 ? void 0 : _b.map((x) => x.width)) || (slide.aspectRatio ? [width / slide.aspectRatio] : [])), ...[...(slide.height ? [slide.height] : [])]);
const width = Math.max(...(((_a = slide.srcSet) === null || _a === void 0 ? void 0 : _a.map((x) => x.width)) || []).concat(slide.width ? [slide.width] : []));
const height = Math.max(...((_c = (_b = slide.srcSet) === null || _b === void 0 ? void 0 : _b.map((x) => x.height).filter((x) => Boolean(x))) !== null && _c !== void 0 ? _c : (slide.aspectRatio ? [width / slide.aspectRatio] : [])).concat(slide.height ? [slide.height] : []));
if (width > 0 && height > 0 && rect.width > 0 && rect.height > 0) {

@@ -103,0 +103,0 @@ maxSlideRect = cover

{
"name": "yet-another-react-lightbox",
"version": "1.9.0",
"version": "1.9.1",
"description": "Modern React lightbox component",

@@ -5,0 +5,0 @@ "author": "Igor Danchenko",

@@ -139,3 +139,3 @@ # Yet Another React Lightbox

- [Video](https://yet-another-react-lightbox.vercel.app/plugins/video) - adds support for video slides
- [Zoom](https://yet-another-react-lightbox.vercel.app/plugins/zoom) - adds zoom feature
- [Zoom](https://yet-another-react-lightbox.vercel.app/plugins/zoom) - adds image zoom feature

@@ -142,0 +142,0 @@ ## License

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