@micromag/screen-title 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 +6 -1
- package/lib/index.js +6 -1
- package/package.json +10 -10
package/es/index.js
CHANGED
|
@@ -33,6 +33,7 @@ var propTypes$1 = {
|
|
|
33
33
|
background: PropTypes$1.backgroundElement,
|
|
34
34
|
callToAction: PropTypes$1.callToAction,
|
|
35
35
|
current: PropTypes.bool,
|
|
36
|
+
active: PropTypes.bool,
|
|
36
37
|
transitions: PropTypes$1.transitions,
|
|
37
38
|
transitionStagger: PropTypes.number,
|
|
38
39
|
className: PropTypes.string
|
|
@@ -55,6 +56,7 @@ var defaultProps$1 = {
|
|
|
55
56
|
background: null,
|
|
56
57
|
callToAction: null,
|
|
57
58
|
current: true,
|
|
59
|
+
active: true,
|
|
58
60
|
transitions: null,
|
|
59
61
|
transitionStagger: 100,
|
|
60
62
|
className: null
|
|
@@ -74,6 +76,7 @@ var TitleScreen = function TitleScreen(_ref) {
|
|
|
74
76
|
background = _ref.background,
|
|
75
77
|
callToAction = _ref.callToAction,
|
|
76
78
|
current = _ref.current,
|
|
79
|
+
active = _ref.active,
|
|
77
80
|
transitions = _ref.transitions,
|
|
78
81
|
transitionStagger = _ref.transitionStagger,
|
|
79
82
|
className = _ref.className;
|
|
@@ -107,6 +110,7 @@ var TitleScreen = function TitleScreen(_ref) {
|
|
|
107
110
|
var transitionPlaying = current;
|
|
108
111
|
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
109
112
|
var backgroundPlaying = current && (isView || isEdit);
|
|
113
|
+
var backgroundShouldLoad = current || active || !isView;
|
|
110
114
|
var hasCallToAction = callToAction !== null && callToAction.active === true; // Create elements
|
|
111
115
|
|
|
112
116
|
var items = [!isPlaceholder && hasCallToAction && isMiddleLayout ? /*#__PURE__*/React.createElement(Spacer, {
|
|
@@ -173,7 +177,8 @@ var TitleScreen = function TitleScreen(_ref) {
|
|
|
173
177
|
background: background,
|
|
174
178
|
width: width,
|
|
175
179
|
height: height,
|
|
176
|
-
playing: backgroundPlaying
|
|
180
|
+
playing: backgroundPlaying,
|
|
181
|
+
shouldLoad: backgroundShouldLoad
|
|
177
182
|
}) : null, /*#__PURE__*/React.createElement(Container, {
|
|
178
183
|
width: width,
|
|
179
184
|
height: height
|
package/lib/index.js
CHANGED
|
@@ -54,6 +54,7 @@ var propTypes$1 = {
|
|
|
54
54
|
background: core.PropTypes.backgroundElement,
|
|
55
55
|
callToAction: core.PropTypes.callToAction,
|
|
56
56
|
current: PropTypes__default["default"].bool,
|
|
57
|
+
active: PropTypes__default["default"].bool,
|
|
57
58
|
transitions: core.PropTypes.transitions,
|
|
58
59
|
transitionStagger: PropTypes__default["default"].number,
|
|
59
60
|
className: PropTypes__default["default"].string
|
|
@@ -76,6 +77,7 @@ var defaultProps$1 = {
|
|
|
76
77
|
background: null,
|
|
77
78
|
callToAction: null,
|
|
78
79
|
current: true,
|
|
80
|
+
active: true,
|
|
79
81
|
transitions: null,
|
|
80
82
|
transitionStagger: 100,
|
|
81
83
|
className: null
|
|
@@ -95,6 +97,7 @@ var TitleScreen = function TitleScreen(_ref) {
|
|
|
95
97
|
background = _ref.background,
|
|
96
98
|
callToAction = _ref.callToAction,
|
|
97
99
|
current = _ref.current,
|
|
100
|
+
active = _ref.active,
|
|
98
101
|
transitions = _ref.transitions,
|
|
99
102
|
transitionStagger = _ref.transitionStagger,
|
|
100
103
|
className = _ref.className;
|
|
@@ -128,6 +131,7 @@ var TitleScreen = function TitleScreen(_ref) {
|
|
|
128
131
|
var transitionPlaying = current;
|
|
129
132
|
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
130
133
|
var backgroundPlaying = current && (isView || isEdit);
|
|
134
|
+
var backgroundShouldLoad = current || active || !isView;
|
|
131
135
|
var hasCallToAction = callToAction !== null && callToAction.active === true; // Create elements
|
|
132
136
|
|
|
133
137
|
var items = [!isPlaceholder && hasCallToAction && isMiddleLayout ? /*#__PURE__*/React__default["default"].createElement(Layout.Spacer, {
|
|
@@ -194,7 +198,8 @@ var TitleScreen = function TitleScreen(_ref) {
|
|
|
194
198
|
background: background,
|
|
195
199
|
width: width,
|
|
196
200
|
height: height,
|
|
197
|
-
playing: backgroundPlaying
|
|
201
|
+
playing: backgroundPlaying,
|
|
202
|
+
shouldLoad: backgroundShouldLoad
|
|
198
203
|
}) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
|
|
199
204
|
width: width,
|
|
200
205
|
height: height
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-title",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.409",
|
|
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.
|
|
53
|
-
"@micromag/element-background": "^0.2.
|
|
54
|
-
"@micromag/element-call-to-action": "^0.2.
|
|
55
|
-
"@micromag/element-container": "^0.2.
|
|
56
|
-
"@micromag/element-heading": "^0.2.
|
|
57
|
-
"@micromag/element-layout": "^0.2.
|
|
58
|
-
"@micromag/element-text": "^0.2.
|
|
59
|
-
"@micromag/transforms": "^0.2.
|
|
52
|
+
"@micromag/core": "^0.2.409",
|
|
53
|
+
"@micromag/element-background": "^0.2.409",
|
|
54
|
+
"@micromag/element-call-to-action": "^0.2.409",
|
|
55
|
+
"@micromag/element-container": "^0.2.409",
|
|
56
|
+
"@micromag/element-heading": "^0.2.409",
|
|
57
|
+
"@micromag/element-layout": "^0.2.409",
|
|
58
|
+
"@micromag/element-text": "^0.2.409",
|
|
59
|
+
"@micromag/transforms": "^0.2.409",
|
|
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": "
|
|
69
|
+
"gitHead": "4c16c3bb63644d1bd5b7d50086098337317ee3f6"
|
|
70
70
|
}
|