@micromag/element-visual 0.3.443 → 0.3.445

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.
@@ -1 +1 @@
1
- .micromag-element-visual-container{overflow:hidden;position:relative}.micromag-element-visual-container .micromag-element-visual-videoContainer{overflow:hidden;position:absolute}
1
+ .micromag-element-visual-container{overflow:hidden;position:relative}.micromag-element-visual-container .micromag-element-visual-videoContainer{overflow:hidden;position:absolute}.micromag-element-visual-container .micromag-element-visual-videoTag{pointer-events:auto}.micromag-element-visual-container .micromag-element-visual-videoTouchOverlay{bottom:0;left:0;position:absolute;right:0;top:0}
package/es/index.js CHANGED
@@ -9,7 +9,7 @@ import { PropTypes } from '@micromag/core';
9
9
  import Image from '@micromag/element-image';
10
10
  import Video from '@micromag/element-video';
11
11
 
12
- var styles = {"container":"micromag-element-visual-container","videoContainer":"micromag-element-visual-videoContainer"};
12
+ var styles = {"container":"micromag-element-visual-container","videoContainer":"micromag-element-visual-videoContainer","videoTag":"micromag-element-visual-videoTag","videoTouchOverlay":"micromag-element-visual-videoTouchOverlay"};
13
13
 
14
14
  var _excluded = ["media", "mediaRef", "width", "height", "resolution", "objectFit", "playing", "muted", "shouldLoad", "videoLoop", "videoInitialMuted", "onLoaded", "className", "imageClassName", "videoClassName", "withoutVideo"];
15
15
  var propTypes = {
@@ -89,9 +89,9 @@ var Visual = function Visual(_ref) {
89
89
  }
90
90
  }) : elProps;
91
91
  return shouldLoad && !withoutVideo ? _objectSpread(_objectSpread({}, elProps), {}, {
92
- media: {
92
+ media: _objectSpread(_objectSpread({}, media), {}, {
93
93
  url: url
94
- }
94
+ })
95
95
  }) : tmpProps;
96
96
  }, [isVideo, elProps, thumbnailUrl, url, shouldLoad]);
97
97
  var videoContainerStyle = null;
@@ -145,6 +145,7 @@ var Visual = function Visual(_ref) {
145
145
  className: classNames([styles.videoContainer, _defineProperty({}, videoClassName, videoClassName !== null)]),
146
146
  style: videoContainerStyle
147
147
  }, /*#__PURE__*/React.createElement(Video, Object.assign({}, elProps, {
148
+ innerClassName: styles.videoTag,
148
149
  mediaRef: mediaRef,
149
150
  width: objectFit === null ? width : null,
150
151
  height: objectFit === null ? height : null,
@@ -154,7 +155,9 @@ var Visual = function Visual(_ref) {
154
155
  shouldLoad: shouldLoad,
155
156
  onReady: onLoaded,
156
157
  autoPlay: true
157
- })))) : null) : null;
158
+ })), /*#__PURE__*/React.createElement("div", {
159
+ className: styles.videoTouchOverlay
160
+ }))) : null) : null;
158
161
  };
159
162
  Visual.propTypes = propTypes;
160
163
  Visual.defaultProps = defaultProps;
package/lib/index.js CHANGED
@@ -11,7 +11,7 @@ var core = require('@micromag/core');
11
11
  var Image = require('@micromag/element-image');
12
12
  var Video = require('@micromag/element-video');
13
13
 
14
- var styles = {"container":"micromag-element-visual-container","videoContainer":"micromag-element-visual-videoContainer"};
14
+ var styles = {"container":"micromag-element-visual-container","videoContainer":"micromag-element-visual-videoContainer","videoTag":"micromag-element-visual-videoTag","videoTouchOverlay":"micromag-element-visual-videoTouchOverlay"};
15
15
 
16
16
  var _excluded = ["media", "mediaRef", "width", "height", "resolution", "objectFit", "playing", "muted", "shouldLoad", "videoLoop", "videoInitialMuted", "onLoaded", "className", "imageClassName", "videoClassName", "withoutVideo"];
17
17
  var propTypes = {
@@ -91,9 +91,9 @@ var Visual = function Visual(_ref) {
91
91
  }
92
92
  }) : elProps;
93
93
  return shouldLoad && !withoutVideo ? _objectSpread(_objectSpread({}, elProps), {}, {
94
- media: {
94
+ media: _objectSpread(_objectSpread({}, media), {}, {
95
95
  url: url
96
- }
96
+ })
97
97
  }) : tmpProps;
98
98
  }, [isVideo, elProps, thumbnailUrl, url, shouldLoad]);
99
99
  var videoContainerStyle = null;
@@ -147,6 +147,7 @@ var Visual = function Visual(_ref) {
147
147
  className: classNames([styles.videoContainer, _defineProperty({}, videoClassName, videoClassName !== null)]),
148
148
  style: videoContainerStyle
149
149
  }, /*#__PURE__*/React.createElement(Video, Object.assign({}, elProps, {
150
+ innerClassName: styles.videoTag,
150
151
  mediaRef: mediaRef,
151
152
  width: objectFit === null ? width : null,
152
153
  height: objectFit === null ? height : null,
@@ -156,7 +157,9 @@ var Visual = function Visual(_ref) {
156
157
  shouldLoad: shouldLoad,
157
158
  onReady: onLoaded,
158
159
  autoPlay: true
159
- })))) : null) : null;
160
+ })), /*#__PURE__*/React.createElement("div", {
161
+ className: styles.videoTouchOverlay
162
+ }))) : null) : null;
160
163
  };
161
164
  Visual.propTypes = propTypes;
162
165
  Visual.defaultProps = defaultProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-visual",
3
- "version": "0.3.443",
3
+ "version": "0.3.445",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -59,9 +59,9 @@
59
59
  "dependencies": {
60
60
  "@babel/runtime": "^7.13.10",
61
61
  "@folklore/size": "^0.1.20",
62
- "@micromag/core": "^0.3.443",
63
- "@micromag/element-image": "^0.3.443",
64
- "@micromag/element-video": "^0.3.443",
62
+ "@micromag/core": "^0.3.444",
63
+ "@micromag/element-image": "^0.3.445",
64
+ "@micromag/element-video": "^0.3.444",
65
65
  "classnames": "^2.2.6",
66
66
  "prop-types": "^15.7.2",
67
67
  "uuid": "^9.0.0"
@@ -70,5 +70,5 @@
70
70
  "access": "public",
71
71
  "registry": "https://registry.npmjs.org/"
72
72
  },
73
- "gitHead": "c6da9d6483b9fca577e875637405f35b2c480d05"
73
+ "gitHead": "15e070c18292ffd521c340a035bc8dc7395c3bc1"
74
74
  }