@micromag/screen-text 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 +6 -1
- package/lib/index.js +6 -1
- package/package.json +10 -10
package/es/index.js
CHANGED
|
@@ -29,6 +29,7 @@ var propTypes = {
|
|
|
29
29
|
background: PropTypes$1.backgroundElement,
|
|
30
30
|
callToAction: PropTypes$1.callToAction,
|
|
31
31
|
current: PropTypes.bool,
|
|
32
|
+
active: PropTypes.bool,
|
|
32
33
|
transitions: PropTypes$1.transitions,
|
|
33
34
|
transitionStagger: PropTypes.number,
|
|
34
35
|
className: PropTypes.string
|
|
@@ -42,6 +43,7 @@ var defaultProps = {
|
|
|
42
43
|
background: null,
|
|
43
44
|
callToAction: null,
|
|
44
45
|
current: true,
|
|
46
|
+
active: true,
|
|
45
47
|
transitions: null,
|
|
46
48
|
transitionStagger: 100,
|
|
47
49
|
className: null
|
|
@@ -58,6 +60,7 @@ var TextScreen = function TextScreen(_ref) {
|
|
|
58
60
|
background = _ref.background,
|
|
59
61
|
callToAction = _ref.callToAction,
|
|
60
62
|
current = _ref.current,
|
|
63
|
+
active = _ref.active,
|
|
61
64
|
transitions = _ref.transitions,
|
|
62
65
|
transitionStagger = _ref.transitionStagger,
|
|
63
66
|
className = _ref.className;
|
|
@@ -88,6 +91,7 @@ var TextScreen = function TextScreen(_ref) {
|
|
|
88
91
|
var transitionPlaying = current;
|
|
89
92
|
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
90
93
|
var backgroundPlaying = current && (isView || isEdit);
|
|
94
|
+
var backgroundShouldLoad = current || active || !isView;
|
|
91
95
|
var hasCallToAction = callToAction !== null && callToAction.active === true; // Create elements
|
|
92
96
|
|
|
93
97
|
var items = [!isPlaceholder && hasCallToAction && isMiddleLayout ? /*#__PURE__*/React.createElement(Spacer, {
|
|
@@ -144,7 +148,8 @@ var TextScreen = function TextScreen(_ref) {
|
|
|
144
148
|
background: background,
|
|
145
149
|
width: width,
|
|
146
150
|
height: height,
|
|
147
|
-
playing: backgroundPlaying
|
|
151
|
+
playing: backgroundPlaying,
|
|
152
|
+
shouldLoad: backgroundShouldLoad
|
|
148
153
|
}) : null, /*#__PURE__*/React.createElement(Container, {
|
|
149
154
|
width: width,
|
|
150
155
|
height: height
|
package/lib/index.js
CHANGED
|
@@ -49,6 +49,7 @@ var propTypes = {
|
|
|
49
49
|
background: core.PropTypes.backgroundElement,
|
|
50
50
|
callToAction: core.PropTypes.callToAction,
|
|
51
51
|
current: PropTypes__default["default"].bool,
|
|
52
|
+
active: PropTypes__default["default"].bool,
|
|
52
53
|
transitions: core.PropTypes.transitions,
|
|
53
54
|
transitionStagger: PropTypes__default["default"].number,
|
|
54
55
|
className: PropTypes__default["default"].string
|
|
@@ -62,6 +63,7 @@ var defaultProps = {
|
|
|
62
63
|
background: null,
|
|
63
64
|
callToAction: null,
|
|
64
65
|
current: true,
|
|
66
|
+
active: true,
|
|
65
67
|
transitions: null,
|
|
66
68
|
transitionStagger: 100,
|
|
67
69
|
className: null
|
|
@@ -78,6 +80,7 @@ var TextScreen = function TextScreen(_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
|
className = _ref.className;
|
|
@@ -108,6 +111,7 @@ var TextScreen = function TextScreen(_ref) {
|
|
|
108
111
|
var transitionPlaying = current;
|
|
109
112
|
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
110
113
|
var backgroundPlaying = current && (isView || isEdit);
|
|
114
|
+
var backgroundShouldLoad = current || active || !isView;
|
|
111
115
|
var hasCallToAction = callToAction !== null && callToAction.active === true; // Create elements
|
|
112
116
|
|
|
113
117
|
var items = [!isPlaceholder && hasCallToAction && isMiddleLayout ? /*#__PURE__*/React__default["default"].createElement(Layout.Spacer, {
|
|
@@ -164,7 +168,8 @@ var TextScreen = function TextScreen(_ref) {
|
|
|
164
168
|
background: background,
|
|
165
169
|
width: width,
|
|
166
170
|
height: height,
|
|
167
|
-
playing: backgroundPlaying
|
|
171
|
+
playing: backgroundPlaying,
|
|
172
|
+
shouldLoad: backgroundShouldLoad
|
|
168
173
|
}) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
|
|
169
174
|
width: width,
|
|
170
175
|
height: height
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-text",
|
|
3
|
-
"version": "0.2.
|
|
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.
|
|
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.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-heading": "^0.2.405",
|
|
57
|
+
"@micromag/element-layout": "^0.2.405",
|
|
58
|
+
"@micromag/element-text": "^0.2.405",
|
|
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": "
|
|
69
|
+
"gitHead": "4bc2ba99622adef74bd0da42cb52d1a575c1a544"
|
|
70
70
|
}
|