@micromag/element-visual 0.3.606 → 0.3.608
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 +7 -7
- package/package.json +5 -5
package/es/index.js
CHANGED
|
@@ -77,11 +77,11 @@ var Visual = function Visual(_ref) {
|
|
|
77
77
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
78
78
|
var _ref2 = media || {},
|
|
79
79
|
_ref2$type = _ref2.type,
|
|
80
|
-
type = _ref2$type ===
|
|
80
|
+
type = _ref2$type === undefined ? null : _ref2$type,
|
|
81
81
|
_ref2$thumbnail_url = _ref2.thumbnail_url,
|
|
82
|
-
thumbnailUrl = _ref2$thumbnail_url ===
|
|
82
|
+
thumbnailUrl = _ref2$thumbnail_url === undefined ? null : _ref2$thumbnail_url,
|
|
83
83
|
_ref2$url = _ref2.url,
|
|
84
|
-
url = _ref2$url ===
|
|
84
|
+
url = _ref2$url === undefined ? null : _ref2$url;
|
|
85
85
|
var isVideo = type === 'video';
|
|
86
86
|
var elProps = useMemo(function () {
|
|
87
87
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -104,15 +104,15 @@ var Visual = function Visual(_ref) {
|
|
|
104
104
|
if (type === 'video' && objectFit !== null && shouldLoad) {
|
|
105
105
|
var _ref3 = objectFit || {},
|
|
106
106
|
_ref3$fit = _ref3.fit,
|
|
107
|
-
fit = _ref3$fit ===
|
|
107
|
+
fit = _ref3$fit === undefined ? 'cover' : _ref3$fit;
|
|
108
108
|
var _ref4 = media || {},
|
|
109
109
|
_ref4$metadata = _ref4.metadata,
|
|
110
|
-
videoMetadata = _ref4$metadata ===
|
|
110
|
+
videoMetadata = _ref4$metadata === undefined ? null : _ref4$metadata;
|
|
111
111
|
var _ref5 = videoMetadata || {},
|
|
112
112
|
_ref5$width = _ref5.width,
|
|
113
|
-
videoWidth = _ref5$width ===
|
|
113
|
+
videoWidth = _ref5$width === undefined ? 0 : _ref5$width,
|
|
114
114
|
_ref5$height = _ref5.height,
|
|
115
|
-
videoHeight = _ref5$height ===
|
|
115
|
+
videoHeight = _ref5$height === undefined ? 0 : _ref5$height;
|
|
116
116
|
var _getSizeWithinBounds = getSizeWithinBounds(videoWidth, videoHeight, width, height, {
|
|
117
117
|
cover: fit === 'cover'
|
|
118
118
|
}),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-visual",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.608",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@babel/runtime": "^7.13.10",
|
|
62
62
|
"@folklore/size": "^0.1.20",
|
|
63
|
-
"@micromag/core": "^0.3.
|
|
64
|
-
"@micromag/element-image": "^0.3.
|
|
65
|
-
"@micromag/element-video": "^0.3.
|
|
63
|
+
"@micromag/core": "^0.3.608",
|
|
64
|
+
"@micromag/element-image": "^0.3.608",
|
|
65
|
+
"@micromag/element-video": "^0.3.608",
|
|
66
66
|
"classnames": "^2.2.6",
|
|
67
67
|
"prop-types": "^15.7.2",
|
|
68
68
|
"uuid": "^9.0.0"
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"access": "public",
|
|
72
72
|
"registry": "https://registry.npmjs.org/"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "02f8cfe4dde0c33bec9ed7c3bdb671cd8acf78bc"
|
|
75
75
|
}
|