You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

yet-another-react-lightbox

Package Overview
Dependencies
Maintainers
1
Versions
143
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

to
3.21.8

10

dist/index.d.ts

@@ -48,3 +48,3 @@ import * as React from 'react';

declare function makeInertWhen(condition: boolean): {
inert: string | boolean | undefined;
inert: boolean;
};

@@ -76,3 +76,3 @@

setContainerRef: (node: T | null) => void;
containerRef: React.MutableRefObject<T | null>;
containerRef: React.RefObject<T | null>;
containerRect: ContainerRect | undefined;

@@ -113,3 +113,3 @@ };

declare function useThrottle(callback: (...args: any[]) => void, delay: number): (...args: any[]) => void;
declare function useThrottle(callback: (...args: unknown[]) => void, delay: number): (...args: unknown[]) => void;

@@ -123,3 +123,3 @@ type DocumentContextType = {

type DocumentContextProviderProps = React.PropsWithChildren & {
nodeRef: React.RefObject<Node>;
nodeRef: React.RefObject<Node | null>;
};

@@ -248,3 +248,3 @@ declare function DocumentContextProvider({ nodeRef, children }: DocumentContextProviderProps): React.JSX.Element;

subscribeSensors: SubscribeSensors<HTMLDivElement>;
containerRef: React.RefObject<HTMLDivElement>;
containerRef: React.RefObject<HTMLDivElement | null>;
setCarouselRef: React.Ref<HTMLDivElement>;

@@ -251,0 +251,0 @@ toolbarWidth: number | undefined;

@@ -66,5 +66,3 @@ import * as React from 'react';

} }, typeof description === "string"
? description
.split("\n")
.flatMap((line, index) => [...(index > 0 ? [React.createElement("br", { key: index })] : []), line])
? description.split("\n").flatMap((line, index) => [...(index > 0 ? [React.createElement("br", { key: index })] : []), line])
: description)));

@@ -71,0 +69,0 @@ }

@@ -31,3 +31,3 @@ import * as React from 'react';

}
catch (e) {
catch (_) {
}

@@ -40,3 +40,3 @@ return xhr.status >= 200 && xhr.status <= 299;

}
catch (e) {
catch (_) {
const event = document.createEvent("MouseEvents");

@@ -43,0 +43,0 @@ event.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);

@@ -53,3 +53,3 @@ import * as React from 'react';

}
catch (err) {
catch (_) {
}

@@ -75,3 +75,3 @@ }, []);

}
catch (err) {
catch (_) {
}

@@ -78,0 +78,0 @@ }, [getFullscreenElement, getOwnerDocument]);

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

import { LightboxRoot, clsx, cssClass, cssVar, createModule } from '../../index.js';
import { LightboxRoot, cssVar, clsx, cssClass, createModule } from '../../index.js';
import * as React from 'react';

@@ -3,0 +3,0 @@ import { ACTION_CLOSE, MODULE_NO_SCROLL, MODULE_PORTAL, PLUGIN_INLINE } from '../../types.js';

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

const [playing, setPlaying] = React.useState(autoplay);
const scheduler = React.useRef();
const slideStatus = React.useRef();
const scheduler = React.useRef(undefined);
const slideStatus = React.useRef(undefined);
const { slides, currentIndex } = useLightboxState();

@@ -25,0 +25,0 @@ const { setTimeout, clearTimeout } = useTimeouts();

import * as React from 'react';
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';
import { useLightboxProps, composePrefix, createIcon, ImageSlide, isImageSlide, cssClass, makeComposePrefix, useDocumentContext, useEventCallback, cssVar, clsx, getSlideKey, useRTL, useEvents, useLightboxState, useSensors, useKeyboardNavigation, useAnimation, cleanup, calculatePreload, hasSlides, getSlide, makeUseContext, LightboxPropsProvider, createIconDisabled, IconButton, addToolbarButton, createModule } from '../../index.js';
import { PLUGIN_THUMBNAILS, ELEMENT_ICON, CLASS_FLEX_CENTER, ACTION_SWIPE, ACTION_NEXT, ACTION_PREV, PLUGIN_FULLSCREEN, MODULE_CONTROLLER } from '../../types.js';

@@ -4,0 +4,0 @@

import * as React from 'react';
import { useLightboxProps, useEvents, useContainerRect, useEventCallback, clsx, cssClass } from '../../index.js';
import { ACTIVE_SLIDE_LOADING, CLASS_FLEX_CENTER, CLASS_SLIDE_WRAPPER, ACTIVE_SLIDE_PLAYING, ACTIVE_SLIDE_COMPLETE } from '../../types.js';
import { ACTIVE_SLIDE_LOADING, CLASS_FLEX_CENTER, CLASS_SLIDE_WRAPPER, ACTIVE_SLIDE_COMPLETE, ACTIVE_SLIDE_PLAYING } from '../../types.js';

@@ -5,0 +5,0 @@ const defaultVideoProps = {

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

function useZoomAnimation(zoom, offsetX, offsetY, zoomWrapperRef) {
const zoomAnimation = React.useRef();
const zoomAnimationStart = React.useRef();
const zoomAnimation = React.useRef(undefined);
const zoomAnimationStart = React.useRef(undefined);
const { zoom: zoomAnimationDuration } = useLightboxProps().animation;

@@ -125,3 +125,3 @@ const reduceMotion = useMotionPreference();

const lastPointerDown = React.useRef(0);
const pinchZoomDistance = React.useRef();
const pinchZoomDistance = React.useRef(undefined);
const { globalIndex } = useLightboxState();

@@ -439,3 +439,3 @@ const { getOwnerWindow } = useDocumentContext();

return (React.createElement(React.Fragment, null,
preload && preload !== current && (React.createElement(ImageSlide, { key: "preload", ...props, slide: { ...image, src: preload, srcSet: undefined }, style: { position: "absolute", visibility: "hidden", ...style }, onLoad: () => handlePreload(preload), render: {
preload && preload !== current && (React.createElement(ImageSlide, { key: "preload", ...props, offset: undefined, slide: { ...image, src: preload, srcSet: undefined }, style: { position: "absolute", visibility: "hidden", ...style }, onLoad: () => handlePreload(preload), render: {
...render,

@@ -442,0 +442,0 @@ iconLoading: () => null,

@@ -428,6 +428,6 @@ import * as React from 'react';

/** Deep partial utility type */
type DeepPartial<T extends {}, K extends keyof T = keyof T, E extends string = never> = Omit<Partial<T>, K> & {
type DeepPartial<T extends object, K extends keyof T = keyof T, E extends string = never> = Omit<Partial<T>, K> & {
[P in K]?: DeepPartialValue<T[P], E>;
};
type DeepPartialValue<T, E extends string = never> = T extends any[] ? T : T extends (...props: any[]) => any ? T : T extends {} ? {
type DeepPartialValue<T, E extends string = never> = T extends any[] ? T : T extends (...props: any[]) => any ? T : T extends object ? {
[P in keyof T]?: P extends E ? T[P] : DeepPartialValue<T[P], E>;

@@ -434,0 +434,0 @@ } : T;

{
"name": "yet-another-react-lightbox",
"version": "3.21.7",
"version": "3.21.8",
"description": "Modern React lightbox component",

@@ -157,5 +157,15 @@ "author": "Igor Danchenko",

"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0"
"@types/react": "^16 || ^17 || ^18 || ^19",
"@types/react-dom": "^16 || ^17 || ^18 || ^19",
"react": "^16.8.0 || ^17 || ^18 || ^19",
"react-dom": "^16.8.0 || ^17 || ^18 || ^19"
},
"peerDependenciesMeta": {
"@types/react": {
"optional": true
},
"@types/react-dom": {
"optional": true
}
},
"keywords": [

@@ -162,0 +172,0 @@ "react",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.