@micromag/screen-slideshow 0.2.404 → 0.2.408

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
@@ -26,6 +26,7 @@ var propTypes = {
26
26
  background: PropTypes$1.backgroundElement,
27
27
  callToAction: PropTypes$1.callToAction,
28
28
  current: PropTypes.bool,
29
+ active: PropTypes.bool,
29
30
  transitions: PropTypes$1.transitions,
30
31
  // transitionStagger: PropTypes.number,
31
32
  className: PropTypes.string
@@ -39,12 +40,13 @@ var defaultProps = {
39
40
  background: null,
40
41
  callToAction: null,
41
42
  current: true,
43
+ active: true,
42
44
  transitions: null,
43
45
  // transitionStagger: 50,
44
46
  className: null
45
47
  };
46
48
 
47
- function SlideshowScreen(_ref) {
49
+ var SlideshowScreen = function SlideshowScreen(_ref) {
48
50
  var _ref4;
49
51
 
50
52
  _ref.layout;
@@ -53,6 +55,7 @@ function SlideshowScreen(_ref) {
53
55
  background = _ref.background,
54
56
  callToAction = _ref.callToAction,
55
57
  current = _ref.current,
58
+ active = _ref.active,
56
59
  spacing = _ref.spacing,
57
60
  captionMaxLines = _ref.captionMaxLines,
58
61
  transitions = _ref.transitions,
@@ -75,6 +78,7 @@ function SlideshowScreen(_ref) {
75
78
  isCapture = _useScreenRenderConte.isCapture;
76
79
 
77
80
  var backgroundPlaying = current && (isView || isEdit);
81
+ var backgroundShouldLoad = current || active || !isView;
78
82
  var finalSpacing = isPlaceholder ? 5 : spacing;
79
83
 
80
84
  var _useState = useState(0),
@@ -183,7 +187,8 @@ function SlideshowScreen(_ref) {
183
187
  background: background,
184
188
  width: width,
185
189
  height: height,
186
- playing: backgroundPlaying
190
+ playing: backgroundPlaying,
191
+ shouldLoad: backgroundShouldLoad
187
192
  }) : null, /*#__PURE__*/React.createElement(Container, {
188
193
  width: width,
189
194
  height: height
@@ -204,7 +209,7 @@ function SlideshowScreen(_ref) {
204
209
  animationDisabled: isPreview,
205
210
  focusable: current && isView
206
211
  })) : null)));
207
- }
212
+ };
208
213
 
209
214
  SlideshowScreen.propTypes = propTypes;
210
215
  SlideshowScreen.defaultProps = defaultProps;
package/lib/index.js CHANGED
@@ -43,6 +43,7 @@ var propTypes = {
43
43
  background: core.PropTypes.backgroundElement,
44
44
  callToAction: core.PropTypes.callToAction,
45
45
  current: PropTypes__default["default"].bool,
46
+ active: PropTypes__default["default"].bool,
46
47
  transitions: core.PropTypes.transitions,
47
48
  // transitionStagger: PropTypes.number,
48
49
  className: PropTypes__default["default"].string
@@ -56,12 +57,13 @@ var defaultProps = {
56
57
  background: null,
57
58
  callToAction: null,
58
59
  current: true,
60
+ active: true,
59
61
  transitions: null,
60
62
  // transitionStagger: 50,
61
63
  className: null
62
64
  };
63
65
 
64
- function SlideshowScreen(_ref) {
66
+ var SlideshowScreen = function SlideshowScreen(_ref) {
65
67
  var _ref4;
66
68
 
67
69
  _ref.layout;
@@ -70,6 +72,7 @@ function SlideshowScreen(_ref) {
70
72
  background = _ref.background,
71
73
  callToAction = _ref.callToAction,
72
74
  current = _ref.current,
75
+ active = _ref.active,
73
76
  spacing = _ref.spacing,
74
77
  captionMaxLines = _ref.captionMaxLines,
75
78
  transitions = _ref.transitions,
@@ -92,6 +95,7 @@ function SlideshowScreen(_ref) {
92
95
  isCapture = _useScreenRenderConte.isCapture;
93
96
 
94
97
  var backgroundPlaying = current && (isView || isEdit);
98
+ var backgroundShouldLoad = current || active || !isView;
95
99
  var finalSpacing = isPlaceholder ? 5 : spacing;
96
100
 
97
101
  var _useState = React.useState(0),
@@ -200,7 +204,8 @@ function SlideshowScreen(_ref) {
200
204
  background: background,
201
205
  width: width,
202
206
  height: height,
203
- playing: backgroundPlaying
207
+ playing: backgroundPlaying,
208
+ shouldLoad: backgroundShouldLoad
204
209
  }) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
205
210
  width: width,
206
211
  height: height
@@ -221,7 +226,7 @@ function SlideshowScreen(_ref) {
221
226
  animationDisabled: isPreview,
222
227
  focusable: current && isView
223
228
  })) : null)));
224
- }
229
+ };
225
230
 
226
231
  SlideshowScreen.propTypes = propTypes;
227
232
  SlideshowScreen.defaultProps = defaultProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-slideshow",
3
- "version": "0.2.404",
3
+ "version": "0.2.408",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -49,14 +49,14 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
- "@micromag/core": "^0.2.404",
53
- "@micromag/element-background": "^0.2.404",
54
- "@micromag/element-call-to-action": "^0.2.404",
55
- "@micromag/element-container": "^0.2.404",
56
- "@micromag/element-layout": "^0.2.404",
57
- "@micromag/element-text": "^0.2.404",
58
- "@micromag/element-visual": "^0.2.404",
59
- "@micromag/transforms": "^0.2.404",
52
+ "@micromag/core": "^0.2.405",
53
+ "@micromag/element-background": "^0.2.407",
54
+ "@micromag/element-call-to-action": "^0.2.405",
55
+ "@micromag/element-container": "^0.2.405",
56
+ "@micromag/element-layout": "^0.2.405",
57
+ "@micromag/element-text": "^0.2.405",
58
+ "@micromag/element-visual": "^0.2.407",
59
+ "@micromag/transforms": "^0.2.405",
60
60
  "classnames": "^2.2.6",
61
61
  "lodash": "^4.17.21",
62
62
  "prop-types": "^15.7.2",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "34d5345cb0dad79206bb6b7a25f02742663023ee"
69
+ "gitHead": "4bc2ba99622adef74bd0da42cb52d1a575c1a544"
70
70
  }