yet-another-react-lightbox 3.10.1 → 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.
@@ -10,6 +10,8 @@ declare module "yet-another-react-lightbox" {
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
  },
package/dist/types.d.ts CHANGED
@@ -102,6 +102,8 @@ interface GenericSlide {
102
102
  }
103
103
  /** Image slide properties */
104
104
  interface SlideImage extends GenericSlide {
105
+ /** image slide type */
106
+ type?: "image";
105
107
  /** image URL */
106
108
  src: string;
107
109
  /** image 'alt' attribute */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yet-another-react-lightbox",
3
- "version": "3.10.1",
3
+ "version": "3.10.2",
4
4
  "description": "Modern React lightbox component",
5
5
  "author": "Igor Danchenko",
6
6
  "license": "MIT",