react-motion-gallery 1.0.0
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 +1 -0
- package/dist/Slider.module-BIDZBG7Y.module.css +177 -0
- package/dist/ThumbnailSlider.module-PUTK2PEE.module.css +32 -0
- package/dist/index.cjs +5296 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +54 -0
- package/dist/index.d.ts +54 -0
- package/dist/index.js +5287 -0
- package/dist/index.js.map +1 -0
- package/dist/index.module-DIGTXCJL.module.css +192 -0
- package/package.json +63 -0
|
@@ -0,0 +1,192 @@
|
|
|
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
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "react-motion-gallery",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "A high-performance media slider + fullscreen viewer for React/Next apps.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "David Medero",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/davidmedero/react-motion-gallery.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/davidmedero/react-motion-gallery/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/davidmedero/react-motion-gallery#readme",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "./dist/index.cjs",
|
|
17
|
+
"module": "./dist/index.mjs",
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"import": "./dist/index.mjs",
|
|
23
|
+
"require": "./dist/index.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./styles.css": "./dist/styles/index.css",
|
|
26
|
+
"./package.json": "./package.json"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"README.md",
|
|
31
|
+
"LICENSE"
|
|
32
|
+
],
|
|
33
|
+
"sideEffects": [
|
|
34
|
+
"*.css",
|
|
35
|
+
"**/*.css"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "tsup",
|
|
39
|
+
"prepublishOnly": "npm run build",
|
|
40
|
+
"test": "echo \"No tests yet\" && exit 0"
|
|
41
|
+
},
|
|
42
|
+
"keywords": [
|
|
43
|
+
"react",
|
|
44
|
+
"carousel",
|
|
45
|
+
"gallery",
|
|
46
|
+
"lightbox",
|
|
47
|
+
"fullscreen",
|
|
48
|
+
"slider",
|
|
49
|
+
"video",
|
|
50
|
+
"plyr"
|
|
51
|
+
],
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"plyr-react": ">=5",
|
|
54
|
+
"react": ">=18",
|
|
55
|
+
"react-dom": ">=18"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@types/react": "^19.2.2",
|
|
59
|
+
"@types/react-dom": "^19.2.2",
|
|
60
|
+
"tsup": "^8.5.0",
|
|
61
|
+
"typescript": "^5.9.3"
|
|
62
|
+
}
|
|
63
|
+
}
|