yet-another-react-lightbox 3.10.0 → 3.10.2
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/captions/index.d.ts +2 -3
- package/dist/plugins/counter/index.d.ts +1 -1
- package/dist/plugins/download/index.d.ts +1 -1
- package/dist/plugins/fullscreen/index.d.ts +1 -1
- package/dist/plugins/inline/index.d.ts +1 -1
- package/dist/plugins/share/index.d.ts +1 -1
- package/dist/plugins/slideshow/index.d.ts +1 -1
- package/dist/plugins/thumbnails/index.d.ts +4 -4
- package/dist/plugins/video/index.d.ts +3 -1
- package/dist/plugins/video/index.js +2 -1
- package/dist/plugins/zoom/index.d.ts +2 -1
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -4,8 +4,7 @@ import { PluginProps, PLUGIN_CAPTIONS } from '../../types.js';
|
|
|
4
4
|
/** Captions plugin */
|
|
5
5
|
declare function Captions({ augment, addModule }: PluginProps): void;
|
|
6
6
|
|
|
7
|
-
declare module "
|
|
8
|
-
type TextAlignment = "start" | "end" | "center";
|
|
7
|
+
declare module "yet-another-react-lightbox" {
|
|
9
8
|
interface GenericSlide {
|
|
10
9
|
/** slide title */
|
|
11
10
|
title?: React.ReactNode;
|
|
@@ -23,7 +22,7 @@ declare module "../../types.js" {
|
|
|
23
22
|
/** if `true`, show Captions Toggle button in the toolbar */
|
|
24
23
|
showToggle?: boolean;
|
|
25
24
|
/** description text alignment */
|
|
26
|
-
descriptionTextAlign?:
|
|
25
|
+
descriptionTextAlign?: "start" | "end" | "center";
|
|
27
26
|
/** maximum number of lines to display in the description section */
|
|
28
27
|
descriptionMaxLines?: number;
|
|
29
28
|
};
|
|
@@ -4,7 +4,7 @@ import { PluginProps } from '../../types.js';
|
|
|
4
4
|
/** Counter plugin */
|
|
5
5
|
declare function Counter({ augment, addChild }: PluginProps): void;
|
|
6
6
|
|
|
7
|
-
declare module "
|
|
7
|
+
declare module "yet-another-react-lightbox" {
|
|
8
8
|
interface LightboxProps {
|
|
9
9
|
/** Counter plugin settings */
|
|
10
10
|
counter?: React.HTMLAttributes<HTMLDivElement> & {
|
|
@@ -2,7 +2,7 @@ import { PluginProps, PLUGIN_DOWNLOAD } from '../../types.js';
|
|
|
2
2
|
|
|
3
3
|
declare function Download({ augment }: PluginProps): void;
|
|
4
4
|
|
|
5
|
-
declare module "
|
|
5
|
+
declare module "yet-another-react-lightbox" {
|
|
6
6
|
interface GenericSlide {
|
|
7
7
|
/** @deprecated - use `download` instead */
|
|
8
8
|
downloadUrl?: string;
|
|
@@ -4,7 +4,7 @@ import { PluginProps, PLUGIN_FULLSCREEN } from '../../types.js';
|
|
|
4
4
|
/** Fullscreen plugin */
|
|
5
5
|
declare function Fullscreen({ augment, contains, addParent }: PluginProps): void;
|
|
6
6
|
|
|
7
|
-
declare module "
|
|
7
|
+
declare module "yet-another-react-lightbox" {
|
|
8
8
|
interface LightboxProps {
|
|
9
9
|
/** Fullscreen plugin settings */
|
|
10
10
|
fullscreen?: {
|
|
@@ -4,7 +4,7 @@ import { PluginProps } from '../../types.js';
|
|
|
4
4
|
/** Inline plugin */
|
|
5
5
|
declare function Inline({ augment, replace, remove }: PluginProps): void;
|
|
6
6
|
|
|
7
|
-
declare module "
|
|
7
|
+
declare module "yet-another-react-lightbox" {
|
|
8
8
|
interface LightboxProps {
|
|
9
9
|
/** HTML div element attributes to be passed to the Inline plugin container */
|
|
10
10
|
inline?: React.HTMLAttributes<HTMLDivElement>;
|
|
@@ -4,7 +4,7 @@ declare function Share({ augment }: PluginProps): void;
|
|
|
4
4
|
|
|
5
5
|
declare function isShareSupported(): boolean;
|
|
6
6
|
|
|
7
|
-
declare module "
|
|
7
|
+
declare module "yet-another-react-lightbox" {
|
|
8
8
|
interface GenericSlide {
|
|
9
9
|
/** share url or share props */
|
|
10
10
|
share?: boolean | string | {
|
|
@@ -4,7 +4,7 @@ import { PluginProps, PLUGIN_SLIDESHOW } from '../../types.js';
|
|
|
4
4
|
/** Slideshow plugin */
|
|
5
5
|
declare function Slideshow({ augment, addModule }: PluginProps): void;
|
|
6
6
|
|
|
7
|
-
declare module "
|
|
7
|
+
declare module "yet-another-react-lightbox" {
|
|
8
8
|
interface LightboxProps {
|
|
9
9
|
/** Slideshow plugin settings */
|
|
10
10
|
slideshow?: {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { PluginProps, PLUGIN_THUMBNAILS } from '../../types.js';
|
|
2
3
|
|
|
3
4
|
/** Thumbnails plugin */
|
|
4
5
|
declare function Thumbnails({ augment, contains, append, addParent }: PluginProps): void;
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
declare module "../../types.js" {
|
|
7
|
+
declare module "yet-another-react-lightbox" {
|
|
8
8
|
interface LightboxProps {
|
|
9
9
|
/** Thumbnails plugin settings */
|
|
10
10
|
thumbnails?: {
|
|
11
11
|
/** Thumbnails plugin ref */
|
|
12
12
|
ref?: React.ForwardedRef<ThumbnailsRef>;
|
|
13
13
|
/** thumbnails position */
|
|
14
|
-
position?:
|
|
14
|
+
position?: "top" | "bottom" | "start" | "end";
|
|
15
15
|
/** thumbnail width */
|
|
16
16
|
width?: number;
|
|
17
17
|
/** thumbnail height */
|
|
@@ -66,7 +66,7 @@ declare module "../../types.js" {
|
|
|
66
66
|
visible: boolean;
|
|
67
67
|
/** show thumbnails */
|
|
68
68
|
show: Callback;
|
|
69
|
-
/** hide
|
|
69
|
+
/** hide thumbnails */
|
|
70
70
|
hide: Callback;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -3,13 +3,15 @@ import { PluginProps } from '../../types.js';
|
|
|
3
3
|
/** Video plugin */
|
|
4
4
|
declare function Video({ augment }: PluginProps): void;
|
|
5
5
|
|
|
6
|
-
declare module "
|
|
6
|
+
declare module "yet-another-react-lightbox" {
|
|
7
7
|
interface SlideTypes {
|
|
8
8
|
/** video slide type */
|
|
9
9
|
video: SlideVideo;
|
|
10
10
|
}
|
|
11
11
|
/** Video slide attributes */
|
|
12
12
|
interface SlideVideo extends GenericSlide {
|
|
13
|
+
/** video slide type */
|
|
14
|
+
type: "video";
|
|
13
15
|
/** video placeholder image */
|
|
14
16
|
poster?: string;
|
|
15
17
|
/** video width in pixels */
|
|
@@ -94,8 +94,9 @@ function Video({ augment }) {
|
|
|
94
94
|
augment(({ render: { slide: renderSlide, ...restRender }, video, ...restProps }) => ({
|
|
95
95
|
render: {
|
|
96
96
|
slide: ({ slide, offset, rect }) => {
|
|
97
|
+
var _a;
|
|
97
98
|
if (isVideoSlide(slide)) {
|
|
98
|
-
return (React.createElement(VideoSlide, { key: `${slide.sources.map((source) => source.src).join(" ")}`, slide: slide, offset: offset }));
|
|
99
|
+
return (React.createElement(VideoSlide, { key: `${(_a = slide.sources) === null || _a === void 0 ? void 0 : _a.map((source) => source.src).join(" ")}`, slide: slide, offset: offset }));
|
|
99
100
|
}
|
|
100
101
|
return renderSlide === null || renderSlide === void 0 ? void 0 : renderSlide({ slide, offset, rect });
|
|
101
102
|
},
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { Plugin, PLUGIN_ZOOM } from '../../types.js';
|
|
2
3
|
|
|
3
4
|
/** Zoom plugin */
|
|
4
5
|
declare const Zoom: Plugin;
|
|
5
6
|
|
|
6
|
-
declare module "
|
|
7
|
+
declare module "yet-another-react-lightbox" {
|
|
7
8
|
interface LightboxProps {
|
|
8
9
|
/** Zoom plugin settings */
|
|
9
10
|
zoom?: {
|
package/dist/types.d.ts
CHANGED