react-motion-gallery 1.0.0 → 2.0.1
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/LICENSE.md +94 -0
- package/README.md +46 -1
- package/dist/index.css +691 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.mts +521 -0
- package/dist/index.d.ts +499 -32
- package/dist/index.js +10465 -3514
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12233 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +36 -36
- package/dist/Slider.module-BIDZBG7Y.module.css +0 -177
- package/dist/ThumbnailSlider.module-PUTK2PEE.module.css +0 -32
- package/dist/index.cjs +0 -5296
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.cts +0 -54
- package/dist/index.module-DIGTXCJL.module.css +0 -192
package/dist/index.d.cts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import React, { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
type MediaItem = {
|
|
5
|
-
kind: 'image';
|
|
6
|
-
src: string;
|
|
7
|
-
alt?: string;
|
|
8
|
-
} | {
|
|
9
|
-
kind: 'video';
|
|
10
|
-
src: string;
|
|
11
|
-
alt?: string;
|
|
12
|
-
thumb?: string;
|
|
13
|
-
};
|
|
14
|
-
type ThumbnailPosition = 'top' | 'right' | 'bottom' | 'left' | null;
|
|
15
|
-
type FSImageRender = (args: {
|
|
16
|
-
item: {
|
|
17
|
-
kind: 'image';
|
|
18
|
-
src: string;
|
|
19
|
-
alt?: string;
|
|
20
|
-
};
|
|
21
|
-
index: number;
|
|
22
|
-
isZoomed: boolean;
|
|
23
|
-
className: string;
|
|
24
|
-
baseStyle: React.CSSProperties;
|
|
25
|
-
}) => React.ReactNode;
|
|
26
|
-
type PlyrSourceBuilder = (item: MediaItem, index: number) => Plyr.SourceInfo;
|
|
27
|
-
type PlyrOptionsResolver = Plyr.Options | ((item: MediaItem, index: number) => Plyr.Options);
|
|
28
|
-
type Props = {
|
|
29
|
-
children: ReactNode;
|
|
30
|
-
thumbnailChildren?: ReactNode;
|
|
31
|
-
items?: MediaItem[];
|
|
32
|
-
urls?: string[];
|
|
33
|
-
thumbnails?: ThumbnailPosition;
|
|
34
|
-
thumbnailWidth?: number | string;
|
|
35
|
-
thumbnailHeight?: number | string;
|
|
36
|
-
loop?: boolean;
|
|
37
|
-
freeScroll?: boolean;
|
|
38
|
-
autoPlay?: boolean;
|
|
39
|
-
autoScroll?: boolean;
|
|
40
|
-
groupCells?: boolean;
|
|
41
|
-
centerAlign?: boolean;
|
|
42
|
-
gap?: number;
|
|
43
|
-
backgroundColor?: string;
|
|
44
|
-
fsRenderImage?: FSImageRender;
|
|
45
|
-
plyrSourceBuilder?: PlyrSourceBuilder;
|
|
46
|
-
plyrOptions?: PlyrOptionsResolver;
|
|
47
|
-
responsive?: boolean;
|
|
48
|
-
containerStyle?: React.CSSProperties;
|
|
49
|
-
sliderColumnStyle?: React.CSSProperties;
|
|
50
|
-
sliderHeight?: string;
|
|
51
|
-
};
|
|
52
|
-
declare function Gallery({ children, thumbnailChildren, items, urls, thumbnails, thumbnailWidth, thumbnailHeight, loop, freeScroll, autoPlay, autoScroll, groupCells, centerAlign, gap, backgroundColor, fsRenderImage, plyrSourceBuilder, plyrOptions, responsive, containerStyle, sliderColumnStyle, sliderHeight }: Props): react_jsx_runtime.JSX.Element;
|
|
53
|
-
|
|
54
|
-
export { type MediaItem, Gallery as default };
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
overflow: hidden;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.right_column_container {
|
|
6
|
-
display: flex;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.right_column {
|
|
10
|
-
display: block;
|
|
11
|
-
position: relative;
|
|
12
|
-
width: 400px;
|
|
13
|
-
overflow: hidden
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.right_column_image_container {
|
|
17
|
-
display: block;
|
|
18
|
-
position: absolute;
|
|
19
|
-
left: 0;
|
|
20
|
-
max-width: 400px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.right_column_image {
|
|
24
|
-
display: block;
|
|
25
|
-
width: 100%;
|
|
26
|
-
object-fit: contain;
|
|
27
|
-
cursor: zoom-in;
|
|
28
|
-
user-select: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.image {
|
|
32
|
-
display: block;
|
|
33
|
-
object-fit: contain;
|
|
34
|
-
cursor: zoom-in;
|
|
35
|
-
user-select: none;
|
|
36
|
-
position: absolute;
|
|
37
|
-
left: 0;
|
|
38
|
-
height: 300px;
|
|
39
|
-
overflow: hidden;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.responsive_image_container {
|
|
43
|
-
display: flex;
|
|
44
|
-
position: absolute;
|
|
45
|
-
left: 0;
|
|
46
|
-
flex-direction: column;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.image:active {
|
|
50
|
-
cursor: grabbing;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.image_container {
|
|
54
|
-
position: relative;
|
|
55
|
-
display: flex;
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.responsive_image_container {
|
|
60
|
-
display: flex;
|
|
61
|
-
position: absolute;
|
|
62
|
-
left: 0;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
.responsive_image {
|
|
67
|
-
display: block;
|
|
68
|
-
width: 100%;
|
|
69
|
-
object-fit: contain;
|
|
70
|
-
cursor: zoom-in;
|
|
71
|
-
user-select: none;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.responsive_videoShell {
|
|
75
|
-
display: flex;
|
|
76
|
-
position: absolute;
|
|
77
|
-
left: 0;
|
|
78
|
-
flex-direction: column;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@media (max-width: 600px) {
|
|
82
|
-
.image,
|
|
83
|
-
.videoShell {
|
|
84
|
-
height: 50vw !important;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.fullscreenImages:active {
|
|
89
|
-
cursor: grabbing !important;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.imgMargin:active {
|
|
93
|
-
cursor: grabbing !important;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.videoShell {
|
|
97
|
-
position: absolute;
|
|
98
|
-
left: 0;
|
|
99
|
-
height: 300px;
|
|
100
|
-
display: inline-block;
|
|
101
|
-
user-select: none;
|
|
102
|
-
cursor: zoom-in;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.videoImg {
|
|
106
|
-
display: block;
|
|
107
|
-
height: 100%;
|
|
108
|
-
width: auto;
|
|
109
|
-
object-fit: contain;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.videoImg:active {
|
|
113
|
-
cursor: grabbing;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.playBadge {
|
|
117
|
-
position: absolute;
|
|
118
|
-
top: 50%;
|
|
119
|
-
left: 50%;
|
|
120
|
-
width: 30%;
|
|
121
|
-
height: 30%;
|
|
122
|
-
transform: translate(-50%, -50%);
|
|
123
|
-
opacity: 0.95;
|
|
124
|
-
pointer-events: none;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.loadingShell {
|
|
128
|
-
position: absolute;
|
|
129
|
-
left: 0;
|
|
130
|
-
height: 300px;
|
|
131
|
-
aspect-ratio: 16 / 9;
|
|
132
|
-
display: inline-block;
|
|
133
|
-
border-radius: 8px;
|
|
134
|
-
overflow: hidden;
|
|
135
|
-
cursor: zoom-in;
|
|
136
|
-
user-select: none;
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
.loadingFill {
|
|
140
|
-
position: absolute;
|
|
141
|
-
inset: 0;
|
|
142
|
-
background: linear-gradient(
|
|
143
|
-
110deg,
|
|
144
|
-
rgba(0,0,0,.06) 8%,
|
|
145
|
-
rgba(0,0,0,.12) 18%,
|
|
146
|
-
rgba(0,0,0,.06) 33%
|
|
147
|
-
);
|
|
148
|
-
background-size: 200% 100%;
|
|
149
|
-
animation: thumbShimmer 1.2s linear infinite;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
@keyframes thumbShimmer {
|
|
153
|
-
to { background-position-x: -200%; }
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
.loadingShimmer {
|
|
157
|
-
position: absolute;
|
|
158
|
-
inset: 0;
|
|
159
|
-
background: linear-gradient(100deg, #e9eef4 20%, #f6f8fb 40%, #e9eef4 60%);
|
|
160
|
-
background-size: 200% 100%;
|
|
161
|
-
animation: thumb-shine 1.1s ease-in-out infinite;
|
|
162
|
-
}
|
|
163
|
-
@keyframes thumb-shine {
|
|
164
|
-
0% { background-position: 200% 0; }
|
|
165
|
-
100% { background-position: -200% 0; }
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.loadingSpinner {
|
|
169
|
-
position: absolute;
|
|
170
|
-
top: 8px;
|
|
171
|
-
right: 8px;
|
|
172
|
-
width: 16px;
|
|
173
|
-
height: 16px;
|
|
174
|
-
border: 2px solid rgba(0,0,0,.16);
|
|
175
|
-
border-top-color: rgba(0,0,0,.45);
|
|
176
|
-
border-radius: 50%;
|
|
177
|
-
animation: spin .9s linear infinite;
|
|
178
|
-
}
|
|
179
|
-
@keyframes spin { to { transform: rotate(360deg); } }
|
|
180
|
-
|
|
181
|
-
@media (prefers-reduced-motion: reduce) {
|
|
182
|
-
.loadingShimmer { animation: none; }
|
|
183
|
-
.loadingSpinner { animation: none; }
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.myPlayer {
|
|
187
|
-
aspect-ratio: 16 / 9 !important;
|
|
188
|
-
height: auto !important;
|
|
189
|
-
max-width: calc(100dvh * (16 / 9)) !important;
|
|
190
|
-
margin: 0 auto !important;
|
|
191
|
-
width: 100dvw !important;
|
|
192
|
-
}
|