@micromag/screen-gallery 0.3.105 → 0.3.108

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/es/index.js CHANGED
@@ -267,7 +267,7 @@ var GalleryScreen = function GalleryScreen(_ref) {
267
267
  isCapture = _useScreenRenderConte.isCapture;
268
268
 
269
269
  var backgroundPlaying = current && (isView || isEdit);
270
- var backgroundShouldLoad = current || active || !isView;
270
+ var mediaShouldLoad = current || active;
271
271
  var finalSpacing = isPlaceholder ? 5 : spacing;
272
272
  var grid = isPlainObject(layoutProps[layout]) ? layoutProps[layout] : {};
273
273
  var _grid$layout = grid.layout,
@@ -372,7 +372,7 @@ var GalleryScreen = function GalleryScreen(_ref) {
372
372
  }),
373
373
  emptyClassName: styles.emptyImage,
374
374
  isEmpty: !hasImage
375
- }, /*#__PURE__*/React.createElement(Visual, Object.assign({
375
+ }, active || current ? /*#__PURE__*/React.createElement(Visual, Object.assign({
376
376
  className: styles.image
377
377
  }, finalImage, imageSize, {
378
378
  resolution: resolution,
@@ -380,8 +380,9 @@ var GalleryScreen = function GalleryScreen(_ref) {
380
380
  fit: 'cover'
381
381
  },
382
382
  playing: backgroundPlaying,
383
- onLoaded: onImageLoaded
384
- }))))), withCaptions ? /*#__PURE__*/React.createElement(Transitions, {
383
+ onLoaded: onImageLoaded,
384
+ shouldLoad: mediaShouldLoad
385
+ })) : null))), withCaptions ? /*#__PURE__*/React.createElement(Transitions, {
385
386
  transitions: transitions,
386
387
  delay: itemI * transitionStagger,
387
388
  playing: transitionPlaying,
@@ -414,7 +415,7 @@ var GalleryScreen = function GalleryScreen(_ref) {
414
415
  height: height,
415
416
  resolution: resolution,
416
417
  playing: backgroundPlaying,
417
- shouldLoad: backgroundShouldLoad
418
+ shouldLoad: mediaShouldLoad
418
419
  }) : null, /*#__PURE__*/React.createElement(Container, {
419
420
  width: width,
420
421
  height: height
package/lib/index.js CHANGED
@@ -289,7 +289,7 @@ var GalleryScreen = function GalleryScreen(_ref) {
289
289
  isCapture = _useScreenRenderConte.isCapture;
290
290
 
291
291
  var backgroundPlaying = current && (isView || isEdit);
292
- var backgroundShouldLoad = current || active || !isView;
292
+ var mediaShouldLoad = current || active;
293
293
  var finalSpacing = isPlaceholder ? 5 : spacing;
294
294
  var grid = isPlainObject__default["default"](layoutProps[layout]) ? layoutProps[layout] : {};
295
295
  var _grid$layout = grid.layout,
@@ -394,7 +394,7 @@ var GalleryScreen = function GalleryScreen(_ref) {
394
394
  }),
395
395
  emptyClassName: styles.emptyImage,
396
396
  isEmpty: !hasImage
397
- }, /*#__PURE__*/React__default["default"].createElement(Visual__default["default"], Object.assign({
397
+ }, active || current ? /*#__PURE__*/React__default["default"].createElement(Visual__default["default"], Object.assign({
398
398
  className: styles.image
399
399
  }, finalImage, imageSize, {
400
400
  resolution: resolution,
@@ -402,8 +402,9 @@ var GalleryScreen = function GalleryScreen(_ref) {
402
402
  fit: 'cover'
403
403
  },
404
404
  playing: backgroundPlaying,
405
- onLoaded: onImageLoaded
406
- }))))), withCaptions ? /*#__PURE__*/React__default["default"].createElement(components.Transitions, {
405
+ onLoaded: onImageLoaded,
406
+ shouldLoad: mediaShouldLoad
407
+ })) : null))), withCaptions ? /*#__PURE__*/React__default["default"].createElement(components.Transitions, {
407
408
  transitions: transitions,
408
409
  delay: itemI * transitionStagger,
409
410
  playing: transitionPlaying,
@@ -436,7 +437,7 @@ var GalleryScreen = function GalleryScreen(_ref) {
436
437
  height: height,
437
438
  resolution: resolution,
438
439
  playing: backgroundPlaying,
439
- shouldLoad: backgroundShouldLoad
440
+ shouldLoad: mediaShouldLoad
440
441
  }) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
441
442
  width: width,
442
443
  height: height
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-gallery",
3
- "version": "0.3.105",
3
+ "version": "0.3.108",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -49,15 +49,15 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
- "@micromag/core": "^0.3.105",
53
- "@micromag/element-background": "^0.3.105",
54
- "@micromag/element-call-to-action": "^0.3.105",
55
- "@micromag/element-container": "^0.3.105",
56
- "@micromag/element-grid": "^0.3.105",
57
- "@micromag/element-layout": "^0.3.105",
58
- "@micromag/element-text": "^0.3.105",
59
- "@micromag/element-visual": "^0.3.105",
60
- "@micromag/transforms": "^0.3.105",
52
+ "@micromag/core": "^0.3.108",
53
+ "@micromag/element-background": "^0.3.108",
54
+ "@micromag/element-call-to-action": "^0.3.108",
55
+ "@micromag/element-container": "^0.3.108",
56
+ "@micromag/element-grid": "^0.3.108",
57
+ "@micromag/element-layout": "^0.3.108",
58
+ "@micromag/element-text": "^0.3.108",
59
+ "@micromag/element-visual": "^0.3.108",
60
+ "@micromag/transforms": "^0.3.108",
61
61
  "classnames": "^2.2.6",
62
62
  "lodash": "^4.17.21",
63
63
  "prop-types": "^15.7.2",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "fb6c28846c08f30c035ebbc162a4135b8b4d42a5"
70
+ "gitHead": "d7681b84be82b08eff5ed444f910ed367f235f4e"
71
71
  }