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 1.2.2 to 1.2.3

46

dist/Lightbox.d.ts

@@ -1,43 +0,3 @@

import * as React from "react";
import { LightboxDefaultProps, LightboxProps } from "./types.js";
declare const LightboxComponent: {
(props: LightboxProps & typeof LightboxDefaultProps): JSX.Element | null;
propTypes: {
open: import("prop-types").Validator<boolean>;
close: import("prop-types").Validator<(...args: any[]) => any>;
index: import("prop-types").Validator<number>;
slides: import("prop-types").Validator<any[]>;
render: import("prop-types").Validator<import("prop-types").InferProps<{}>>;
plugins: import("prop-types").Validator<((...args: any[]) => any)[]>;
toolbar: import("prop-types").Validator<import("prop-types").InferProps<{
buttons: import("prop-types").Validator<(string | number | boolean | import("prop-types").ReactElementLike | import("prop-types").ReactNodeArray | null | undefined)[]>;
}>>;
labels: import("prop-types").Validator<import("prop-types").InferProps<{}>>;
carousel: import("prop-types").Validator<import("prop-types").InferProps<{
finite: import("prop-types").Validator<boolean>;
preload: import("prop-types").Validator<number>;
padding: import("prop-types").Validator<string | number>;
spacing: import("prop-types").Validator<string | number>;
}>>;
animation: import("prop-types").Validator<import("prop-types").InferProps<{
fade: import("prop-types").Validator<number>;
swipe: import("prop-types").Validator<number>;
}>>;
on: import("prop-types").Validator<import("prop-types").InferProps<{}>>;
};
defaultProps: {
open: boolean;
close: () => void;
index: number;
slides: import("./types.js").Slide[];
render: import("./types.js").Render;
plugins: import("./types.js").Plugin[];
toolbar: import("./types.js").Toolbar;
labels: import("./types.js").Labels;
animation: import("./types.js").Animation;
carousel: import("./types.js").Carousel;
on: import("./types.js").Callbacks;
};
};
declare type LightboxComponentProps<T> = T extends React.ComponentType<infer P> | React.Component<infer P> ? JSX.LibraryManagedAttributes<T, P> : never;
/// <reference types="react" />
import { LightboxProps } from "./types.js";
declare type MakePartial<T> = T extends object ? Partial<T> : T;

@@ -48,3 +8,3 @@ declare type NestedPartial<T extends object> = {

declare type NestedOptional<T, K extends keyof T> = Omit<T, K> & NestedPartial<Pick<T, K>>;
export declare const Lightbox: (props: NestedOptional<LightboxComponentProps<typeof LightboxComponent>, "carousel" | "animation">) => JSX.Element;
export declare const Lightbox: (props: NestedOptional<Partial<LightboxProps>, "carousel" | "animation" | "render" | "toolbar" | "on">) => JSX.Element;
export {};

7

dist/Lightbox.js

@@ -27,7 +27,6 @@ import * as React from "react";

LightboxComponent.propTypes = LightboxPropTypes;
LightboxComponent.defaultProps = LightboxDefaultProps;
export const Lightbox = (props) => {
const { carousel, animation, ...restProps } = props;
const { carousel: defaultCarousel, animation: defaultAnimation, ...restDefaultProps } = LightboxDefaultProps;
return (React.createElement(LightboxComponent, { carousel: { ...defaultCarousel, ...carousel }, animation: { ...defaultAnimation, ...animation }, ...restDefaultProps, ...restProps }));
const { carousel, animation, render, toolbar, on, ...restProps } = props;
const { carousel: defaultCarousel, animation: defaultAnimation, render: defaultRender, toolbar: defaultToolbar, on: defaultOn, ...restDefaultProps } = LightboxDefaultProps;
return (React.createElement(LightboxComponent, { carousel: { ...defaultCarousel, ...carousel }, animation: { ...defaultAnimation, ...animation }, render: { ...defaultRender, ...render }, toolbar: { ...defaultToolbar, ...toolbar }, on: { ...defaultOn, ...on }, ...restDefaultProps, ...restProps }));
};

@@ -63,3 +63,13 @@ import * as React from "react";

slides: PropTypes.Validator<any[]>;
render: PropTypes.Validator<PropTypes.InferProps<{}>>;
render: PropTypes.Validator<PropTypes.InferProps<{
slide: PropTypes.Requireable<(...args: any[]) => any>;
iconPrev: PropTypes.Requireable<(...args: any[]) => any>;
iconNext: PropTypes.Requireable<(...args: any[]) => any>;
iconClose: PropTypes.Requireable<(...args: any[]) => any>;
iconLoading: PropTypes.Requireable<(...args: any[]) => any>;
iconError: PropTypes.Requireable<(...args: any[]) => any>;
buttonPrev: PropTypes.Requireable<(...args: any[]) => any>;
buttonNext: PropTypes.Requireable<(...args: any[]) => any>;
buttonClose: PropTypes.Requireable<(...args: any[]) => any>;
}>>;
plugins: PropTypes.Validator<((...args: any[]) => any)[]>;

@@ -80,3 +90,9 @@ toolbar: PropTypes.Validator<PropTypes.InferProps<{

}>>;
on: PropTypes.Validator<PropTypes.InferProps<{}>>;
on: PropTypes.Validator<PropTypes.InferProps<{
view: PropTypes.Requireable<(...args: any[]) => any>;
entering: PropTypes.Requireable<(...args: any[]) => any>;
entered: PropTypes.Requireable<(...args: any[]) => any>;
exiting: PropTypes.Requireable<(...args: any[]) => any>;
exited: PropTypes.Requireable<(...args: any[]) => any>;
}>>;
};

@@ -83,0 +99,0 @@ export declare const LightboxDefaultProps: {

@@ -21,3 +21,13 @@ import PropTypes from "prop-types";

slides: PropTypes.arrayOf(PropTypes.oneOfType(SlideTypesPropTypes).isRequired).isRequired,
render: PropTypes.shape({}).isRequired,
render: PropTypes.shape({
slide: PropTypes.func,
iconPrev: PropTypes.func,
iconNext: PropTypes.func,
iconClose: PropTypes.func,
iconLoading: PropTypes.func,
iconError: PropTypes.func,
buttonPrev: PropTypes.func,
buttonNext: PropTypes.func,
buttonClose: PropTypes.func,
}).isRequired,
plugins: PropTypes.arrayOf(PropTypes.func.isRequired).isRequired,

@@ -38,3 +48,9 @@ toolbar: PropTypes.shape({

}).isRequired,
on: PropTypes.shape({}).isRequired,
on: PropTypes.shape({
view: PropTypes.func,
entering: PropTypes.func,
entered: PropTypes.func,
exiting: PropTypes.func,
exited: PropTypes.func,
}).isRequired,
};

@@ -41,0 +57,0 @@ export const LightboxDefaultProps = {

{
"name": "yet-another-react-lightbox",
"version": "1.2.2",
"version": "1.2.3",
"description": "Modern lightbox component for React",

@@ -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