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

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 3.19.0 to 3.20.0

2

dist/plugins/captions/index.d.ts

@@ -22,2 +22,4 @@ import * as React from 'react';

ref?: React.ForwardedRef<CaptionsRef>;
/** if `true`, captions are hidden when the lightbox opens */
hidden?: boolean;
/** if `true`, show Captions Toggle button in the toolbar */

@@ -24,0 +26,0 @@ showToggle?: boolean;

5

dist/plugins/captions/index.js

@@ -11,2 +11,3 @@ import { cssClass, useLightboxProps, makeUseContext, useController, clsx, cssVar, createIcon, createIconDisabled, IconButton, addToolbarButton, createModule } from '../../index.js';

showToggle: false,
hidden: false,
};

@@ -25,4 +26,4 @@ const resolveCaptionsProps = (captions) => ({

function CaptionsContextProvider({ captions, children }) {
const { ref } = resolveCaptionsProps(captions);
const [visible, setVisible] = React.useState(true);
const { ref, hidden } = resolveCaptionsProps(captions);
const [visible, setVisible] = React.useState(!hidden);
const context = React.useMemo(() => ({

@@ -29,0 +30,0 @@ visible,

@@ -39,2 +39,4 @@ import * as React from 'react';

vignette?: boolean;
/** if `true`, thumbnails are hidden when the lightbox opens */
hidden?: boolean;
/** if `true`, show the Toggle Thumbnails button in the toolbar */

@@ -41,0 +43,0 @@ showToggle?: boolean;

@@ -16,2 +16,4 @@ import { useLightboxProps, composePrefix, createIcon, ImageSlide, isImageSlide, cssClass, makeComposePrefix, useDocumentContext, useEventCallback, clsx, cssVar, getSlideKey, useRTL, useEvents, useLightboxState, useSensors, useKeyboardNavigation, useAnimation, cleanup, calculatePreload, hasSlides, getSlide, makeUseContext, LightboxPropsProvider, createIconDisabled, IconButton, addToolbarButton, createModule } from '../../index.js';

vignette: true,
hidden: false,
showToggle: false,
};

@@ -209,5 +211,5 @@ const resolveThumbnailsProps = (thumbnails) => ({

function ThumbnailsContextProvider({ children, ...props }) {
const [visible, setVisible] = React.useState(true);
const { ref, position, hidden } = resolveThumbnailsProps(props.thumbnails);
const [visible, setVisible] = React.useState(!hidden);
const containerRef = React.useRef(null);
const { ref, position } = resolveThumbnailsProps(props.thumbnails);
const context = React.useMemo(() => ({

@@ -214,0 +216,0 @@ visible,

{
"name": "yet-another-react-lightbox",
"version": "3.19.0",
"version": "3.20.0",
"description": "Modern React lightbox component",

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

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