@micromag/element-background 0.3.123 → 0.3.127
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 +3 -3
- package/lib/index.js +3 -3
- package/package.json +4 -4
package/es/index.js
CHANGED
|
@@ -91,7 +91,7 @@ var Background = function Background(_ref) {
|
|
|
91
91
|
}, getStyleFromColor(color)); // image
|
|
92
92
|
|
|
93
93
|
|
|
94
|
-
if (media !== null && (isImage || isVideo && !
|
|
94
|
+
if (media !== null && (isImage || isVideo && !shouldLoad)) {
|
|
95
95
|
var finalUrl = getOptimalImageUrl(isVideo ? {
|
|
96
96
|
url: mediaThumbnailUrl
|
|
97
97
|
} : media, width, height, {
|
|
@@ -111,7 +111,7 @@ var Background = function Background(_ref) {
|
|
|
111
111
|
|
|
112
112
|
var videoContainerStyle = {};
|
|
113
113
|
|
|
114
|
-
if (isVideo &&
|
|
114
|
+
if (isVideo && shouldLoad) {
|
|
115
115
|
if (width > 0 && height > 0) {
|
|
116
116
|
var _getSizeWithinBounds = getSizeWithinBounds(mediaWidth, mediaHeight, width, height, {
|
|
117
117
|
cover: fit === 'cover' || fit === null
|
|
@@ -133,7 +133,7 @@ var Background = function Background(_ref) {
|
|
|
133
133
|
return /*#__PURE__*/React.createElement("div", {
|
|
134
134
|
className: classNames([styles.container, _defineProperty({}, className, className !== null)]),
|
|
135
135
|
style: containerStyle
|
|
136
|
-
}, isVideo &&
|
|
136
|
+
}, isVideo && shouldLoad ? /*#__PURE__*/React.createElement("div", {
|
|
137
137
|
className: styles.videoContainer,
|
|
138
138
|
style: videoContainerStyle
|
|
139
139
|
}, /*#__PURE__*/React.createElement(Video, {
|
package/lib/index.js
CHANGED
|
@@ -105,7 +105,7 @@ var Background = function Background(_ref) {
|
|
|
105
105
|
}, utils.getStyleFromColor(color)); // image
|
|
106
106
|
|
|
107
107
|
|
|
108
|
-
if (media !== null && (isImage || isVideo && !
|
|
108
|
+
if (media !== null && (isImage || isVideo && !shouldLoad)) {
|
|
109
109
|
var finalUrl = utils.getOptimalImageUrl(isVideo ? {
|
|
110
110
|
url: mediaThumbnailUrl
|
|
111
111
|
} : media, width, height, {
|
|
@@ -125,7 +125,7 @@ var Background = function Background(_ref) {
|
|
|
125
125
|
|
|
126
126
|
var videoContainerStyle = {};
|
|
127
127
|
|
|
128
|
-
if (isVideo &&
|
|
128
|
+
if (isVideo && shouldLoad) {
|
|
129
129
|
if (width > 0 && height > 0) {
|
|
130
130
|
var _getSizeWithinBounds = size.getSizeWithinBounds(mediaWidth, mediaHeight, width, height, {
|
|
131
131
|
cover: fit === 'cover' || fit === null
|
|
@@ -147,7 +147,7 @@ var Background = function Background(_ref) {
|
|
|
147
147
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
148
148
|
className: classNames__default["default"]([styles.container, _defineProperty__default["default"]({}, className, className !== null)]),
|
|
149
149
|
style: containerStyle
|
|
150
|
-
}, isVideo &&
|
|
150
|
+
}, isVideo && shouldLoad ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
151
151
|
className: styles.videoContainer,
|
|
152
152
|
style: videoContainerStyle
|
|
153
153
|
}, /*#__PURE__*/React__default["default"].createElement(Video__default["default"], {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-background",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.127",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@babel/runtime": "^7.13.10",
|
|
50
50
|
"@folklore/size": "^0.1.20",
|
|
51
|
-
"@micromag/core": "^0.3.
|
|
52
|
-
"@micromag/element-video": "^0.3.
|
|
51
|
+
"@micromag/core": "^0.3.126",
|
|
52
|
+
"@micromag/element-video": "^0.3.126",
|
|
53
53
|
"classnames": "^2.2.6",
|
|
54
54
|
"lodash": "^4.17.21",
|
|
55
55
|
"prop-types": "^15.7.2",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "1ab0adecaed3d74de7f5d02018eb624546e251a5"
|
|
63
63
|
}
|