yet-another-react-lightbox 3.11.1 → 3.11.3

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/index.js CHANGED
@@ -491,9 +491,10 @@ function useForkRef(refA, refB) {
491
491
  }
492
492
 
493
493
  function useLoseFocus(focus, disabled = false) {
494
- const focused = React.useRef(disabled);
494
+ const focused = React.useRef();
495
495
  useLayoutEffect(() => {
496
- if (disabled) {
496
+ if (disabled && focused.current) {
497
+ focused.current = false;
497
498
  focus();
498
499
  }
499
500
  }, [disabled, focus]);
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { PluginProps, PLUGIN_CAPTIONS } from '../../types.js';
2
+ import { PluginProps, PLUGIN_CAPTIONS, Callback, RenderFunction } from '../../types.js';
3
3
 
4
4
  /** Captions plugin */
5
5
  declare function Captions({ augment, addModule }: PluginProps): void;
@@ -1,4 +1,4 @@
1
- import { PluginProps, PLUGIN_DOWNLOAD } from '../../types.js';
1
+ import { PluginProps, PLUGIN_DOWNLOAD, Callback, RenderFunction, Slide } from '../../types.js';
2
2
 
3
3
  declare function Download({ augment }: PluginProps): void;
4
4
 
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { PluginProps, PLUGIN_FULLSCREEN } from '../../types.js';
2
+ import { PluginProps, PLUGIN_FULLSCREEN, Callback, RenderFunction } from '../../types.js';
3
3
 
4
4
  /** Fullscreen plugin */
5
5
  declare function Fullscreen({ augment, contains, addParent }: PluginProps): void;
@@ -1,4 +1,4 @@
1
- import { PluginProps, PLUGIN_SHARE } from '../../types.js';
1
+ import { PluginProps, PLUGIN_SHARE, Callback, RenderFunction, Slide } from '../../types.js';
2
2
 
3
3
  declare function Share({ augment }: PluginProps): void;
4
4
 
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { PluginProps, PLUGIN_SLIDESHOW } from '../../types.js';
2
+ import { PluginProps, PLUGIN_SLIDESHOW, Callback, RenderFunction } from '../../types.js';
3
3
 
4
4
  /** Slideshow plugin */
5
5
  declare function Slideshow({ augment, addModule }: PluginProps): void;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { PluginProps, PLUGIN_THUMBNAILS } from '../../types.js';
2
+ import { PluginProps, PLUGIN_THUMBNAILS, Callback, ContainerRect, ImageFit, RenderFunction, Slide } from '../../types.js';
3
3
 
4
4
  /** Thumbnails plugin */
5
5
  declare function Thumbnails({ augment, contains, append, addParent }: PluginProps): void;
@@ -1,4 +1,4 @@
1
- import { PluginProps } from '../../types.js';
1
+ import { PluginProps, GenericSlide } from '../../types.js';
2
2
 
3
3
  /** Video plugin */
4
4
  declare function Video({ augment }: PluginProps): void;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { Plugin, PLUGIN_ZOOM } from '../../types.js';
2
+ import { Plugin, PLUGIN_ZOOM, Callback, RenderFunction } from '../../types.js';
3
3
 
4
4
  /** Zoom plugin */
5
5
  declare const Zoom: Plugin;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yet-another-react-lightbox",
3
- "version": "3.11.1",
3
+ "version": "3.11.3",
4
4
  "description": "Modern React lightbox component",
5
5
  "author": "Igor Danchenko",
6
6
  "license": "MIT",