yet-another-react-lightbox 1.3.4 → 1.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/plugins/Fullscreen.d.ts +1 -1
- package/dist/plugins/Inline.d.ts +1 -1
- package/dist/plugins/Video.d.ts +3 -3
- package/dist/types.d.ts +9 -0
- package/dist/types.js +9 -13
- package/package.json +2 -2
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { LightboxProps, Plugin, Render } from "../types.js";
|
|
3
3
|
declare module "../types.js" {
|
|
4
4
|
interface LightboxProps {
|
|
5
|
-
/** enter fullscreen mode automatically when the lightbox opens */
|
|
5
|
+
/** if `true`, enter fullscreen mode automatically when the lightbox opens */
|
|
6
6
|
fullscreen?: boolean;
|
|
7
7
|
}
|
|
8
8
|
interface Render {
|
package/dist/plugins/Inline.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { Component, Plugin } from "../types.js";
|
|
3
3
|
declare module "../types.js" {
|
|
4
4
|
interface LightboxProps {
|
|
5
|
-
/** HTML div element attributes to be passed to inline plugin container */
|
|
5
|
+
/** HTML div element attributes to be passed to the inline plugin container */
|
|
6
6
|
inline?: React.HTMLAttributes<HTMLDivElement>;
|
|
7
7
|
}
|
|
8
8
|
}
|
package/dist/plugins/Video.d.ts
CHANGED
|
@@ -6,11 +6,11 @@ export interface SlideVideo {
|
|
|
6
6
|
type: "video";
|
|
7
7
|
/** video placeholder image */
|
|
8
8
|
poster?: string;
|
|
9
|
-
/** video width */
|
|
9
|
+
/** video width in pixels */
|
|
10
10
|
width?: number;
|
|
11
|
-
/** video height */
|
|
11
|
+
/** video height in pixels */
|
|
12
12
|
height?: number;
|
|
13
|
-
/**
|
|
13
|
+
/** an array of video files */
|
|
14
14
|
sources?: {
|
|
15
15
|
/** video source URL */
|
|
16
16
|
src: string;
|
package/dist/types.d.ts
CHANGED
|
@@ -110,6 +110,15 @@ export interface LightboxProps {
|
|
|
110
110
|
/** lifecycle callbacks */
|
|
111
111
|
on: Callbacks;
|
|
112
112
|
}
|
|
113
|
+
export declare const ImageSlidePropTypes: PropTypes.Requireable<PropTypes.InferProps<{
|
|
114
|
+
src: PropTypes.Validator<string>;
|
|
115
|
+
alt: PropTypes.Requireable<string>;
|
|
116
|
+
aspectRatio: PropTypes.Requireable<number>;
|
|
117
|
+
srcSet: PropTypes.Requireable<PropTypes.InferProps<{
|
|
118
|
+
src: PropTypes.Validator<string>;
|
|
119
|
+
width: PropTypes.Validator<number>;
|
|
120
|
+
}>[]>;
|
|
121
|
+
}>>;
|
|
113
122
|
export declare const SlideTypesPropTypes: PropTypes.Validator<any>[];
|
|
114
123
|
export declare const LightboxPropTypes: {
|
|
115
124
|
open: PropTypes.Validator<boolean>;
|
package/dist/types.js
CHANGED
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
import PropTypes from "prop-types";
|
|
2
|
-
export const
|
|
3
|
-
PropTypes.
|
|
2
|
+
export const ImageSlidePropTypes = PropTypes.shape({
|
|
3
|
+
src: PropTypes.string.isRequired,
|
|
4
|
+
alt: PropTypes.string,
|
|
5
|
+
aspectRatio: PropTypes.number,
|
|
6
|
+
srcSet: PropTypes.arrayOf(PropTypes.shape({
|
|
4
7
|
src: PropTypes.string.isRequired,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
PropTypes.arrayOf(PropTypes.shape({
|
|
10
|
-
src: PropTypes.string.isRequired,
|
|
11
|
-
width: PropTypes.number.isRequired,
|
|
12
|
-
}).isRequired).isRequired,
|
|
13
|
-
]),
|
|
14
|
-
}),
|
|
15
|
-
];
|
|
8
|
+
width: PropTypes.number.isRequired,
|
|
9
|
+
}).isRequired),
|
|
10
|
+
});
|
|
11
|
+
export const SlideTypesPropTypes = [ImageSlidePropTypes];
|
|
16
12
|
export const LightboxPropTypes = {
|
|
17
13
|
open: PropTypes.bool.isRequired,
|
|
18
14
|
close: PropTypes.func.isRequired,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yet-another-react-lightbox",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.5",
|
|
4
4
|
"description": "Modern React lightbox component",
|
|
5
5
|
"author": "Igor Danchenko",
|
|
6
6
|
"license": "MIT",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@testing-library/jest-dom": "^5.16.4",
|
|
81
81
|
"@testing-library/react": "^13.3.0",
|
|
82
82
|
"@testing-library/user-event": "^14.2.0",
|
|
83
|
-
"@types/jest": "^27.5.
|
|
83
|
+
"@types/jest": "^27.5.2",
|
|
84
84
|
"@types/react": "^18.0.10",
|
|
85
85
|
"@types/react-dom": "^18.0.5",
|
|
86
86
|
"@typescript-eslint/eslint-plugin": "^5.27.0",
|