@micromag/screen-contribution 0.2.405 → 0.2.409

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
@@ -37,6 +37,7 @@ var propTypes = {
37
37
  background: PropTypes$1.backgroundElement,
38
38
  callToAction: PropTypes$1.callToAction,
39
39
  current: PropTypes.bool,
40
+ active: PropTypes.bool,
40
41
  transitions: PropTypes$1.transitions,
41
42
  transitionStagger: PropTypes.number,
42
43
  resizeTransitionDuration: PropTypes.number,
@@ -56,6 +57,7 @@ var defaultProps = {
56
57
  background: null,
57
58
  callToAction: null,
58
59
  current: true,
60
+ active: true,
59
61
  transitions: null,
60
62
  transitionStagger: 100,
61
63
  resizeTransitionDuration: 750,
@@ -78,6 +80,7 @@ var ContributionScreen = function ContributionScreen(_ref) {
78
80
  background = _ref.background,
79
81
  callToAction = _ref.callToAction,
80
82
  current = _ref.current,
83
+ active = _ref.active,
81
84
  transitions = _ref.transitions,
82
85
  transitionStagger = _ref.transitionStagger,
83
86
  resizeTransitionDuration = _ref.resizeTransitionDuration,
@@ -103,6 +106,7 @@ var ContributionScreen = function ContributionScreen(_ref) {
103
106
  isCapture = _useScreenRenderConte.isCapture;
104
107
 
105
108
  var backgroundPlaying = current && (isView || isEdit);
109
+ var backgroundShouldLoad = current || active || !isView;
106
110
  var transitionPlaying = current;
107
111
  var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
108
112
  var scrollingDisabled = !isEdit && transitionDisabled || !current;
@@ -412,7 +416,8 @@ var ContributionScreen = function ContributionScreen(_ref) {
412
416
  background: background,
413
417
  width: width,
414
418
  height: height,
415
- playing: backgroundPlaying
419
+ playing: backgroundPlaying,
420
+ shouldLoad: backgroundShouldLoad
416
421
  }) : null, /*#__PURE__*/React.createElement(Container, {
417
422
  width: width,
418
423
  height: height
package/lib/index.js CHANGED
@@ -58,6 +58,7 @@ var propTypes = {
58
58
  background: core.PropTypes.backgroundElement,
59
59
  callToAction: core.PropTypes.callToAction,
60
60
  current: PropTypes__default["default"].bool,
61
+ active: PropTypes__default["default"].bool,
61
62
  transitions: core.PropTypes.transitions,
62
63
  transitionStagger: PropTypes__default["default"].number,
63
64
  resizeTransitionDuration: PropTypes__default["default"].number,
@@ -77,6 +78,7 @@ var defaultProps = {
77
78
  background: null,
78
79
  callToAction: null,
79
80
  current: true,
81
+ active: true,
80
82
  transitions: null,
81
83
  transitionStagger: 100,
82
84
  resizeTransitionDuration: 750,
@@ -99,6 +101,7 @@ var ContributionScreen = function ContributionScreen(_ref) {
99
101
  background = _ref.background,
100
102
  callToAction = _ref.callToAction,
101
103
  current = _ref.current,
104
+ active = _ref.active,
102
105
  transitions = _ref.transitions,
103
106
  transitionStagger = _ref.transitionStagger,
104
107
  resizeTransitionDuration = _ref.resizeTransitionDuration,
@@ -124,6 +127,7 @@ var ContributionScreen = function ContributionScreen(_ref) {
124
127
  isCapture = _useScreenRenderConte.isCapture;
125
128
 
126
129
  var backgroundPlaying = current && (isView || isEdit);
130
+ var backgroundShouldLoad = current || active || !isView;
127
131
  var transitionPlaying = current;
128
132
  var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
129
133
  var scrollingDisabled = !isEdit && transitionDisabled || !current;
@@ -433,7 +437,8 @@ var ContributionScreen = function ContributionScreen(_ref) {
433
437
  background: background,
434
438
  width: width,
435
439
  height: height,
436
- playing: backgroundPlaying
440
+ playing: backgroundPlaying,
441
+ shouldLoad: backgroundShouldLoad
437
442
  }) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
438
443
  width: width,
439
444
  height: height
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-contribution",
3
- "version": "0.2.405",
3
+ "version": "0.2.409",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -52,17 +52,17 @@
52
52
  "@fortawesome/fontawesome-svg-core": "^1.2.32",
53
53
  "@fortawesome/free-solid-svg-icons": "^5.15.1",
54
54
  "@fortawesome/react-fontawesome": "^0.1.13",
55
- "@micromag/core": "^0.2.405",
56
- "@micromag/data": "^0.2.405",
57
- "@micromag/element-background": "^0.2.405",
58
- "@micromag/element-button": "^0.2.405",
59
- "@micromag/element-call-to-action": "^0.2.405",
60
- "@micromag/element-container": "^0.2.405",
61
- "@micromag/element-heading": "^0.2.405",
62
- "@micromag/element-scroll": "^0.2.405",
63
- "@micromag/element-text": "^0.2.405",
64
- "@micromag/element-text-input": "^0.2.405",
65
- "@micromag/transforms": "^0.2.405",
55
+ "@micromag/core": "^0.2.409",
56
+ "@micromag/data": "^0.2.409",
57
+ "@micromag/element-background": "^0.2.409",
58
+ "@micromag/element-button": "^0.2.409",
59
+ "@micromag/element-call-to-action": "^0.2.409",
60
+ "@micromag/element-container": "^0.2.409",
61
+ "@micromag/element-heading": "^0.2.409",
62
+ "@micromag/element-scroll": "^0.2.409",
63
+ "@micromag/element-text": "^0.2.409",
64
+ "@micromag/element-text-input": "^0.2.409",
65
+ "@micromag/transforms": "^0.2.409",
66
66
  "classnames": "^2.2.6",
67
67
  "lodash": "^4.17.21",
68
68
  "prop-types": "^15.7.2",
@@ -72,5 +72,5 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "gitHead": "e3d172d92d78222d5307cc1513fee7eef9f28402"
75
+ "gitHead": "4c16c3bb63644d1bd5b7d50086098337317ee3f6"
76
76
  }