react-image-gallery 2.0.5 → 2.0.6

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/README.md CHANGED
@@ -1,196 +1,181 @@
1
1
  # React Image Gallery
2
2
 
3
+ **A responsive, customizable image gallery component for React**
4
+
5
+ <br />
6
+
3
7
  [![npm version](https://badge.fury.io/js/react-image-gallery.svg)](https://badge.fury.io/js/react-image-gallery)
4
8
  [![Download Count](http://img.shields.io/npm/dm/react-image-gallery.svg?style=flat)](https://www.npmjs.com/package/react-image-gallery)
5
9
  [![Bundle size](https://badgen.net/bundlephobia/minzip/react-image-gallery)](https://bundlephobia.com/package/react-image-gallery)
10
+ [![CI](https://github.com/xiaolin/react-image-gallery/actions/workflows/ci.yml/badge.svg)](https://github.com/xiaolin/react-image-gallery/actions/workflows/ci.yml)
11
+ [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
12
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
13
+
14
+ <br />
6
15
 
7
- ### Live Demo (try it on mobile for swipe support)
16
+ **[🚀 View Live Demo](http://linxtion.com/demo/react-image-gallery)**
8
17
 
9
- [`linxtion.com/demo/react-image-gallery`](http://linxtion.com/demo/react-image-gallery)
18
+ <br />
10
19
 
11
- ![demo gif](https://github.com/xiaolin/react-image-gallery/raw/master/static/image_gallery_v1.0.2.gif)
20
+ ![React Image Gallery Demo](https://github.com/xiaolin/react-image-gallery/raw/master/static/ig-demo.gif)
12
21
 
13
- React image gallery is a React component for building image galleries and carousels
22
+ <br />
14
23
 
15
- ## Features
24
+ ## Features
16
25
 
17
- - Mobile swipe gestures
18
- - Thumbnail navigation
19
- - Fullscreen support
20
- - Custom rendered slides
21
- - RTL support
22
- - Responsive design
23
- - CSS custom properties for theming
24
- - Tons of customization options (see props below)
26
+ | Feature | Description |
27
+ | -------------------- | --------------------------------------------------------- |
28
+ | 📱 **Mobile Swipe** | Native touch gestures for smooth mobile navigation |
29
+ | 🖼️ **Thumbnails** | Customizable thumbnail navigation with multiple positions |
30
+ | 📺 **Fullscreen** | Browser fullscreen or CSS-based fullscreen modes |
31
+ | 🎨 **Theming** | CSS custom properties for easy styling |
32
+ | ⌨️ **Keyboard Nav** | Arrow keys, escape, and custom key bindings |
33
+ | 🔄 **RTL Support** | Right-to-left language support |
34
+ | ↕️ **Vertical Mode** | Slide vertically instead of horizontally |
35
+ | 🎬 **Custom Slides** | Render videos, iframes, or any custom content |
25
36
 
26
- ## Getting started
37
+ <br />
27
38
 
28
- React Image Gallery requires **React 16.0.0 or later.**
39
+ ## 🚀 Getting Started
29
40
 
30
41
  ```
31
42
  npm install react-image-gallery
32
43
  ```
33
44
 
34
- ### Zero-config (Recommended)
35
-
36
- Styles are automatically injected when you import the component. No separate CSS import required!
37
-
38
- ```js
45
+ ```jsx
39
46
  import ImageGallery from "react-image-gallery";
40
47
 
41
- // That's it! Styles are automatically injected.
42
- ```
43
-
44
- ### Manual style import (Optional)
45
-
46
- If you prefer to manage styles yourself (for customization, bundling optimization, or to prevent auto-injection):
47
-
48
- ```css
49
- /* CSS @import */
50
- @import "~react-image-gallery/styles/image-gallery.css";
51
- ```
52
-
53
- ```js
54
- // JS import (using webpack or similar bundler)
55
- import "react-image-gallery/styles/image-gallery.css";
56
- ```
57
-
58
- Note: If you import the CSS manually, it will be detected and auto-injection will be skipped.
59
-
60
- ### Theming with CSS Custom Properties
61
-
62
- Customize the gallery appearance by overriding CSS custom properties:
48
+ const images = [
49
+ {
50
+ original: "https://picsum.photos/id/1018/1000/600/",
51
+ thumbnail: "https://picsum.photos/id/1018/250/150/",
52
+ },
53
+ {
54
+ original: "https://picsum.photos/id/1015/1000/600/",
55
+ thumbnail: "https://picsum.photos/id/1015/250/150/",
56
+ },
57
+ ];
63
58
 
64
- ```css
65
- /* In your CSS or styled component */
66
- .image-gallery {
67
- --ig-primary-color: #ff6b6b; /* Primary/accent color */
68
- --ig-white: #ffffff; /* Icon and text color */
69
- --ig-black: #000000; /* Background color in fullscreen */
70
- --ig-background-overlay: rgba(0, 0, 0, 0.5); /* Overlay background */
71
- --ig-thumbnail-size: 120px; /* Thumbnail dimensions */
72
- --ig-thumbnail-border-width: 3px; /* Thumbnail border width */
59
+ function MyGallery() {
60
+ return <ImageGallery items={images} />;
73
61
  }
74
62
  ```
75
63
 
76
- Or apply globally:
64
+ For more examples, see [`example/App.jsx`](https://github.com/xiaolin/react-image-gallery/blob/master/example/App.jsx)
77
65
 
78
- ```css
79
- :root {
80
- --ig-primary-color: #e91e63;
81
- }
82
- ```
66
+ <br />
83
67
 
84
- ### Example
68
+ ## 📘 TypeScript
85
69
 
86
- Need more example? See [`example/App.jsx`](https://github.com/xiaolin/react-image-gallery/blob/master/example/App.jsx)
70
+ This package includes TypeScript definitions. Import types for props, items, and refs:
87
71
 
88
- ```js
72
+ ```tsx
89
73
  import ImageGallery from "react-image-gallery";
74
+ import type {
75
+ GalleryItem,
76
+ ImageGalleryProps,
77
+ ImageGalleryRef,
78
+ } from "react-image-gallery";
90
79
 
91
- const images = [
80
+ const images: GalleryItem[] = [
92
81
  {
93
82
  original: "https://picsum.photos/id/1018/1000/600/",
94
83
  thumbnail: "https://picsum.photos/id/1018/250/150/",
84
+ originalAlt: "Mountain landscape",
85
+ description: "A beautiful mountain view",
95
86
  },
96
87
  {
97
88
  original: "https://picsum.photos/id/1015/1000/600/",
98
89
  thumbnail: "https://picsum.photos/id/1015/250/150/",
90
+ originalAlt: "Flowing river",
99
91
  },
100
92
  {
101
93
  original: "https://picsum.photos/id/1019/1000/600/",
102
94
  thumbnail: "https://picsum.photos/id/1019/250/150/",
95
+ originalAlt: "Sunset over the ocean",
103
96
  },
104
97
  ];
105
98
 
106
99
  function MyGallery() {
107
- return <ImageGallery items={images} />;
100
+ const galleryRef = useRef<ImageGalleryRef>(null);
101
+
102
+ const handleClick = () => {
103
+ galleryRef.current?.fullScreen();
104
+ };
105
+
106
+ return (
107
+ <>
108
+ <ImageGallery ref={galleryRef} items={images} />
109
+ <button onClick={handleClick}>Enter Fullscreen</button>
110
+ </>
111
+ );
108
112
  }
109
113
  ```
110
114
 
111
- # Props
112
-
113
- - `items`: (required) Array of objects, see example above,
114
- - Available Properties
115
- - `original` - image src url
116
- - `thumbnail` - image thumbnail src url
117
- - `fullscreen` - image for fullscreen (defaults to original)
118
- - `originalHeight` - image height (html5 attribute)
119
- - `originalWidth` - image width (html5 attribute)
120
- - `loading` - image loading. Either "lazy" or "eager" (html5 attribute)
121
- - `thumbnailHeight` - image height (html5 attribute)
122
- - `thumbnailWidth` - image width (html5 attribute)
123
- - `thumbnailLoading` - image loading. Either "lazy" or "eager" (html5 attribute)
124
- - `originalClass` - custom image class
125
- - `thumbnailClass` - custom thumbnail class
126
- - `renderItem` - Function for custom rendering a specific slide (see renderItem below)
127
- - `renderThumbInner` - Function for custom thumbnail renderer (see renderThumbInner below)
128
- - `originalAlt` - image alt
129
- - `thumbnailAlt` - thumbnail image alt
130
- - `originalTitle` - image title
131
- - `thumbnailTitle` - thumbnail image title
132
- - `thumbnailLabel` - label for thumbnail
133
- - `description` - description for image
134
- - `srcSet` - image srcset (html5 attribute)
135
- - `sizes` - image sizes (html5 attribute)
136
- - `bulletClass` - extra class for the bullet of the item
137
- - `infinite`: Boolean, default `true`
138
- - infinite sliding
115
+ <br />
116
+
117
+ ## ⚙️ Props
118
+
119
+ - `items`: (required) Array of objects. Available properties:
120
+ - `original` - image source URL
121
+ - `thumbnail` - thumbnail source URL
122
+ - `fullscreen` - fullscreen image URL (defaults to original)
123
+ - `originalHeight` - image height (html5 attribute)
124
+ - `originalWidth` - image width (html5 attribute)
125
+ - `loading` - "lazy" or "eager" (HTML5 attribute)
126
+ - `thumbnailHeight` - image height (html5 attribute)
127
+ - `thumbnailWidth` - image width (html5 attribute)
128
+ - `thumbnailLoading` - "lazy" or "eager" (HTML5 attribute)
129
+ - `originalClass` - custom image class
130
+ - `thumbnailClass` - custom thumbnail class
131
+ - `renderItem` - Function for custom rendering a specific slide (see renderItem below)
132
+ - `renderThumbInner` - Function for custom thumbnail renderer (see renderThumbInner below)
133
+ - `originalAlt` - image alt
134
+ - `thumbnailAlt` - thumbnail image alt
135
+ - `originalTitle` - image title
136
+ - `thumbnailTitle` - thumbnail image title
137
+ - `thumbnailLabel` - label for thumbnail
138
+ - `description` - description for image
139
+ - `srcSet` - image srcset (html5 attribute)
140
+ - `sizes` - image sizes (html5 attribute)
141
+ - `bulletClass` - extra class for the bullet of the item
142
+ - `infinite`: Boolean, default `true` - loop infinitely
139
143
  - `lazyLoad`: Boolean, default `false`
140
144
  - `showNav`: Boolean, default `true`
141
145
  - `showThumbnails`: Boolean, default `true`
142
- - `thumbnailPosition`: String, default `bottom`
143
- - available positions: `top, right, bottom, left`
146
+ - `thumbnailPosition`: String, default `bottom` - options: `top`, `right`, `bottom`, `left`
144
147
  - `showFullscreenButton`: Boolean, default `true`
145
- - `useBrowserFullscreen`: Boolean, default `true`
146
- - if false, fullscreen will be done via css within the browser
147
- - `useTranslate3D`: Boolean, default `true`
148
- - if false, will use `translate` instead of `translate3d` css property to transition slides
148
+ - `useBrowserFullscreen`: Boolean, default `true` - if false, uses CSS-based fullscreen
149
+ - `useTranslate3D`: Boolean, default `true` - if false, uses `translate` instead of `translate3d`
149
150
  - `showPlayButton`: Boolean, default `true`
150
- - `isRTL`: Boolean, default `false`
151
- - if true, gallery's direction will be from right-to-left (to support right-to-left languages)
151
+ - `isRTL`: Boolean, default `false` - right-to-left mode
152
152
  - `showBullets`: Boolean, default `false`
153
- - `maxBullets`: Number, default `undefined`
154
- - Maximum number of bullets to show at once. Active bullet stays centered while bullets slide. Minimum value is 3.
153
+ - `maxBullets`: Number, default `undefined` - max bullets shown (minimum 3, active bullet stays centered)
155
154
  - `showIndex`: Boolean, default `false`
156
155
  - `autoPlay`: Boolean, default `false`
157
- - `disableThumbnailScroll`: Boolean, default `false`
158
- - disables the thumbnail container from adjusting
159
- - `disableKeyDown`: Boolean, default `false`
160
- - disables keydown listener for keyboard shortcuts (left arrow, right arrow, esc key)
156
+ - `disableThumbnailScroll`: Boolean, default `false` - disable thumbnail auto-scroll
157
+ - `disableKeyDown`: Boolean, default `false` - disable keyboard navigation
161
158
  - `disableSwipe`: Boolean, default `false`
162
159
  - `disableThumbnailSwipe`: Boolean, default `false`
163
- - `onErrorImageURL`: String, default `undefined`
164
- - an image src pointing to your default image if an image fails to load
165
- - handles both slide image, and thumbnail image
160
+ - `onErrorImageURL`: String, default `undefined` - fallback image URL for failed loads
166
161
  - `indexSeparator`: String, default `' / '`, ignored if `showIndex` is false
167
- - `slideDuration`: Number, default `550`
168
- - transition duration during image slide in milliseconds
169
- - `swipingTransitionDuration`: Number, default `0`
170
- - transition duration while swiping in milliseconds
162
+ - `slideDuration`: Number, default `550` - slide transition duration (ms)
163
+ - `swipingTransitionDuration`: Number, default `0` - transition duration while swiping (ms)
171
164
  - `slideInterval`: Number, default `3000`
172
165
  - `slideOnThumbnailOver`: Boolean, default `false`
173
- - `slideVertically`: Boolean, default `false`
174
- - if true, slides will transition vertically instead of horizontally
175
- - `flickThreshold`: Number (float), default `0.4`
176
- - Determines the max velocity of a swipe before it's considered a flick (lower = more sensitive)
177
- - `swipeThreshold`: Number, default `30`
178
- - A percentage of how far the offset of the current slide is swiped to trigger a slide event.
179
- e.g. If the current slide is swiped less than 30% to the left or right, it will not trigger a slide event.
180
- - `stopPropagation`: Boolean, default `false`
181
- - Automatically calls stopPropagation on all 'swipe' events.
166
+ - `slideVertically`: Boolean, default `false` - slide vertically instead of horizontally
167
+ - `flickThreshold`: Number, default `0.4` - swipe velocity threshold (lower = more sensitive)
168
+ - `swipeThreshold`: Number, default `30` - percentage of slide width needed to trigger navigation
169
+ - `stopPropagation`: Boolean, default `false` - call stopPropagation on swipe events
182
170
  - `startIndex`: Number, default `0`
183
- - `onImageError`: Function, `callback(event)`
184
- - overrides onErrorImage
185
- - `onThumbnailError`: Function, `callback(event)`
186
- - overrides onErrorImage
171
+ - `onImageError`: Function, `callback(event)` - overrides `onErrorImageURL`
172
+ - `onThumbnailError`: Function, `callback(event)` - overrides `onErrorImageURL`
187
173
  - `onThumbnailClick`: Function, `callback(event, index)`
188
174
  - `onBulletClick`: Function, `callback(event, index)`
189
175
  - `onImageLoad`: Function, `callback(event)`
190
176
  - `onSlide`: Function, `callback(currentIndex)`
191
177
  - `onBeforeSlide`: Function, `callback(nextIndex)`
192
- - `onScreenChange`: Function, `callback(boolean)`
193
- - When fullscreen is toggled a boolean is passed to the callback
178
+ - `onScreenChange`: Function, `callback(isFullscreen)`
194
179
  - `onPause`: Function, `callback(currentIndex)`
195
180
  - `onPlay`: Function, `callback(currentIndex)`
196
181
  - `onClick`: Function, `callback(event)`
@@ -199,113 +184,47 @@ function MyGallery() {
199
184
  - `onTouchStart`: Function, `callback(event) on gallery slide`
200
185
  - `onMouseOver`: Function, `callback(event) on gallery slide`
201
186
  - `onMouseLeave`: Function, `callback(event) on gallery slide`
202
- - `additionalClass`: String,
203
- - Additional class that will be added to the root node of the component.
204
- - `renderCustomControls`: Function, custom controls rendering
205
- - Use this to render custom controls or other elements on the currently displayed image (like the fullscreen button)
206
- ```javascript
207
- _renderCustomControls() {
208
- return <a href='' className='image-gallery-custom-action' onClick={this._customAction.bind(this)}/>
209
- }
210
- ```
211
- - `renderItem`: Function, custom item rendering
212
- - NOTE: Highly suggest looking into a render cache such as React.memo if you plan to override renderItem
213
- - On a specific item `[{thumbnail: '...', renderItem: this.myRenderItem}]`
214
- - As a prop passed into `ImageGallery` to completely override `renderItem`, see source for renderItem implementation
187
+ - `additionalClass`: String, additional class for the root node
188
+ - `renderCustomControls`: Function, render custom controls on the current slide
189
+ - `renderItem`: Function, custom slide rendering
215
190
  - `renderThumbInner`: Function, custom thumbnail rendering
216
-
217
- - On a specific item `[{thumbnail: '...', renderThumbInner: this.myRenderThumbInner}]`
218
- - As a prop passed into `ImageGallery` to completely override `_renderThumbInner`, see source for reference
219
-
220
191
  - `renderLeftNav`: Function, custom left nav component
221
- - See [`<LeftNav />`](https://github.com/xiaolin/react-image-gallery/blob/master/src/components/controls/LeftNav.jsx)
222
- - Use this to render a custom left nav control
223
- - Args:
224
- - `onClick` callback that will slide to the previous item
225
- - `disabled` boolean for when the nav is disabled
226
- ```javascript
227
- renderLeftNav: (onClick, disabled) => (
228
- <LeftNav onClick={onClick} disabled={disabled} />
229
- );
230
- ```
231
192
  - `renderRightNav`: Function, custom right nav component
232
- - See [`<RightNav />`](https://github.com/xiaolin/react-image-gallery/blob/master/src/components/controls/RightNav.jsx)
233
- - Use this to render a custom right nav control
234
- - Args:
235
- - `onClick` callback that will slide to the next item
236
- - `disabled` boolean for when the nav is disabled
237
- ```javascript
238
- renderRightNav: (onClick, disabled) => (
239
- <RightNav onClick={onClick} disabled={disabled} />
240
- );
241
- ```
242
- - `renderTopNav`: Function, custom top nav component (for vertical sliding)
243
- - See [`<TopNav />`](https://github.com/xiaolin/react-image-gallery/blob/master/src/components/controls/TopNav.jsx)
244
- - Use this to render a custom top nav control when `slideVertically` is true
245
- - Args:
246
- - `onClick` callback that will slide to the previous item
247
- - `disabled` boolean for when the nav is disabled
248
- ```javascript
249
- renderTopNav: (onClick, disabled) => (
250
- <TopNav onClick={onClick} disabled={disabled} />
251
- );
252
- ```
253
- - `renderBottomNav`: Function, custom bottom nav component (for vertical sliding)
254
- - See [`<BottomNav />`](https://github.com/xiaolin/react-image-gallery/blob/master/src/components/controls/BottomNav.jsx)
255
- - Use this to render a custom bottom nav control when `slideVertically` is true
256
- - Args:
257
- - `onClick` callback that will slide to the next item
258
- - `disabled` boolean for when the nav is disabled
259
- ```javascript
260
- renderBottomNav: (onClick, disabled) => (
261
- <BottomNav onClick={onClick} disabled={disabled} />
262
- );
263
- ```
264
- - `renderPlayPauseButton`: Function, play pause button component
265
- - See [`<PlayPause />`](https://github.com/xiaolin/react-image-gallery/blob/master/src/components/controls/PlayPause.jsx)
266
- - Use this to render a custom play pause button
267
- - Args:
268
- - `onClick` callback that will toggle play/pause
269
- - `isPlaying` boolean for when gallery is playing
270
- ```javascript
271
- renderPlayPauseButton: (onClick, isPlaying) => (
272
- <PlayPause onClick={onClick} isPlaying={isPlaying} />
273
- );
274
- ```
275
- - `renderFullscreenButton`: Function, custom fullscreen button component
276
- - See [`<Fullscreen />`](https://github.com/xiaolin/react-image-gallery/blob/master/src/components/controls/Fullscreen.jsx)
277
- - Use this to render a custom fullscreen button
278
- - Args:
279
- - `onClick` callback that will toggle fullscreen
280
- - `isFullscreen` argument for when fullscreen is active
281
- ```javascript
282
- renderFullscreenButton: (onClick, isFullscreen) => (
283
- <Fullscreen onClick={onClick} isFullscreen={isFullscreen} />
284
- ),
285
- ```
286
- - `useWindowKeyDown`: Boolean, default `true`
287
- - If `true`, listens to keydown events on window (window.addEventListener)
288
- - If `false`, listens to keydown events on image gallery element (imageGalleryElement.addEventListener)
289
-
290
- # Functions
193
+ - `renderTopNav`: Function, custom top nav component (vertical mode)
194
+ - `renderBottomNav`: Function, custom bottom nav component (vertical mode)
195
+ - `renderPlayPauseButton`: Function, custom play/pause button
196
+ - `renderFullscreenButton`: Function, custom fullscreen button
197
+ - `useWindowKeyDown`: Boolean, default `true` - use window or element for key events
198
+
199
+ <br />
200
+
201
+ ## 🔧 Functions
291
202
 
292
203
  The following functions can be accessed using [refs](https://reactjs.org/docs/refs-and-the-dom.html)
293
204
 
294
- - `play()`: plays the slides
295
- - `pause()`: pauses the slides
296
- - `toggleFullScreen()`: toggles full screen
205
+ - `play()`: starts the slideshow
206
+ - `pause()`: pauses the slideshow
207
+ - `togglePlay()`: toggles between play and pause
208
+ - `fullScreen()`: enters fullscreen mode
209
+ - `exitFullScreen()`: exits fullscreen mode
210
+ - `toggleFullScreen()`: toggles fullscreen mode
297
211
  - `slideToIndex(index)`: slides to a specific index
298
212
  - `getCurrentIndex()`: returns the current index
299
213
 
300
- # Contributing
214
+ <br />
215
+
216
+ ## 🤝 Contributing
301
217
 
302
- Each pull request (PR) should be specific and isolated to the issue you're trying to fix. Please do not stack features, chores, refactors, or enhancements in one PR. Describe your feature/implementation in the PR. If you're unsure whether it's useful or if it involves a major change, please open an issue first and seek feedback.
218
+ Pull requests should be focused on a single issue. If you're unsure whether a change is useful or involves a major modification, please open an issue first.
303
219
 
304
- - Follow eslint provided
220
+ - Follow the eslint config
305
221
  - Comment your code
306
- - Write [clean](https://github.com/ryanmcdermott/clean-code-javascript) code
307
222
 
308
- # Build the example locally (requires node >= 18.18)
223
+ <br />
224
+
225
+ ## 🛠️ Build the example locally
226
+
227
+ Requires Node.js >= 18.18
309
228
 
310
229
  ```
311
230
  git clone https://github.com/xiaolin/react-image-gallery.git
@@ -316,6 +235,8 @@ npm start
316
235
 
317
236
  Then open [`localhost:8001`](http://localhost:8001) in a browser.
318
237
 
319
- # License
238
+ <br />
239
+
240
+ ## 📄 License
320
241
 
321
- MIT
242
+ MIT © [Xiao Lin](https://github.com/xiaolin)
@@ -1,4 +1,5 @@
1
1
  import { CSSProperties, KeyboardEvent, MouseEvent, ReactNode, SyntheticEvent, TouchEvent } from "react";
2
+ import type React from "react";
2
3
  /**
3
4
  * Image set for responsive images
4
5
  */
@@ -406,3 +407,5 @@ export type SwipeDirection = "Left" | "Right" | "Up" | "Down";
406
407
  export interface SVGProps {
407
408
  strokeWidth?: number;
408
409
  }
410
+ declare const ImageGallery: React.ForwardRefExoticComponent<ImageGalleryProps & React.RefAttributes<ImageGalleryRef>>;
411
+ export default ImageGallery;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-image-gallery",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "React carousel image gallery component with thumbnail and mobile support",
5
5
  "main": "./build/image-gallery.cjs",
6
6
  "module": "./build/image-gallery.es.js",
@@ -20,7 +20,7 @@
20
20
  "lint": "eslint src",
21
21
  "start": "webpack serve --hot --mode development --static ./example",
22
22
  "build": "webpack --config webpack.build.cjs && rm -rf build/types/components",
23
- "deploy-demo": "bash scripts/deploy-demo.sh",
23
+ "deploy-demo": "npm run build && bash scripts/deploy-demo.sh",
24
24
  "preversion": "npm run lint && npm test",
25
25
  "version": "npm run build && git add -A",
26
26
  "postversion": "git push && git push --tags && npm run deploy-demo"
@@ -31,6 +31,7 @@
31
31
  },
32
32
  "exports": {
33
33
  ".": {
34
+ "types": "./build/types/types.d.ts",
34
35
  "import": "./build/image-gallery.es.js",
35
36
  "require": "./build/image-gallery.cjs"
36
37
  },
@@ -84,7 +85,7 @@
84
85
  "clsx": "^2.1.1",
85
86
  "css-loader": "^7.1.2",
86
87
  "css-minimizer-webpack-plugin": "^7.0.4",
87
- "eslint": "9.19.0",
88
+ "eslint": "^9.39.2",
88
89
  "eslint-config-prettier": "^10.0.1",
89
90
  "eslint-import-resolver-alias": "^1.1.2",
90
91
  "eslint-plugin-import": "^2.31.0",