@jekrch/react-viewport-lightbox 0.3.1 → 0.4.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/dist/styles.css CHANGED
@@ -210,7 +210,11 @@
210
210
  width: 100%;
211
211
  height: 100%;
212
212
  touch-action: none;
213
- pointer-events: none;
213
+ /* The track spans the stage and owns every gesture (swipe/pan/pinch) plus the
214
+ backdrop close, so it must receive pointer/touch events across its whole
215
+ area — not just where the image sits. Adjacent panels stay
216
+ pointer-events:none so they never intercept a gesture in flight. */
217
+ pointer-events: auto;
214
218
  opacity: 0;
215
219
  transition: opacity var(--rvl-anim-duration) ease-out;
216
220
  }
@@ -225,6 +229,15 @@
225
229
  .rvl-track-visible {
226
230
  opacity: 1;
227
231
  }
232
+ /* Promote the track to its own compositing layer only while a swipe is in
233
+ flight (dragging or the commit/snap-back animation). The track is what the
234
+ swipe transforms, so this is where the hint belongs — a permanent
235
+ `will-change` on the images promoted the wrong elements and pinned three
236
+ full-size image layers for the viewer's whole life, which iOS flickers on.
237
+ Cleared the moment the gesture settles so the layers are released. */
238
+ .rvl-track-swiping {
239
+ will-change: transform;
240
+ }
228
241
 
229
242
  .rvl-adjacent {
230
243
  position: absolute;
@@ -255,7 +268,6 @@
255
268
  object-fit: contain;
256
269
  border-radius: var(--rvl-radius);
257
270
  max-width: 96vw;
258
- will-change: transform;
259
271
  }
260
272
 
261
273
  /* Loading spinner: shown only when the opening image is slow to load. Centered
@@ -414,6 +426,14 @@
414
426
  edge slots) stays visible and on top — even while an overlay slides in. */
415
427
  z-index: 15;
416
428
  pointer-events: none;
429
+ /* Fade the overlay with the rest of the chrome (backdrop/bars/track) so an
430
+ open drawer/graph fades out on close instead of popping out of existence
431
+ the instant the viewer unmounts. */
432
+ opacity: 0;
433
+ transition: opacity var(--rvl-anim-duration) ease-out;
434
+ }
435
+ .rvl-root.rvl-visible .rvl-overlay {
436
+ opacity: 1;
417
437
  }
418
438
  .rvl-overlay > * {
419
439
  pointer-events: auto;
@@ -427,6 +447,7 @@
427
447
  .rvl-bar,
428
448
  .rvl-stage,
429
449
  .rvl-track,
450
+ .rvl-overlay,
430
451
  .rvl-btn,
431
452
  .rvl-nav-btn {
432
453
  transition-duration: 0.01ms !important;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jekrch/react-viewport-lightbox",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "A headless-capable, touch-friendly React image viewer and lightbox with zoom, pan, and swipe.",
5
5
  "type": "module",
6
6
  "sideEffects": [