@micromag/element-visual 0.3.88 → 0.3.106

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 CHANGED
@@ -11,7 +11,7 @@ import Video from '@micromag/element-video';
11
11
 
12
12
  var styles = {"container":"micromag-element-visual-container","videoContainer":"micromag-element-visual-videoContainer"};
13
13
 
14
- var _excluded = ["media", "width", "height", "resolution", "objectFit", "playing", "videoLoop", "videoInitialMuted", "onLoaded", "className", "videoClassName"];
14
+ var _excluded = ["media", "width", "height", "resolution", "objectFit", "playing", "shouldLoad", "videoLoop", "videoInitialMuted", "onLoaded", "className", "videoClassName"];
15
15
  var propTypes = {
16
16
  media: PropTypes.media,
17
17
  width: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
@@ -19,6 +19,7 @@ var propTypes = {
19
19
  resolution: PropTypes$1.number,
20
20
  objectFit: PropTypes.objectFit,
21
21
  playing: PropTypes$1.bool,
22
+ shouldLoad: PropTypes$1.bool,
22
23
  videoLoop: PropTypes$1.bool,
23
24
  videoInitialMuted: PropTypes$1.bool,
24
25
  onLoaded: PropTypes$1.func,
@@ -32,6 +33,7 @@ var defaultProps = {
32
33
  resolution: 1,
33
34
  objectFit: null,
34
35
  playing: true,
36
+ shouldLoad: true,
35
37
  videoLoop: true,
36
38
  videoInitialMuted: true,
37
39
  onLoaded: null,
@@ -46,6 +48,7 @@ var Visual = function Visual(_ref) {
46
48
  resolution = _ref.resolution,
47
49
  objectFit = _ref.objectFit,
48
50
  playing = _ref.playing,
51
+ shouldLoad = _ref.shouldLoad,
49
52
  videoLoop = _ref.videoLoop,
50
53
  videoInitialMuted = _ref.videoInitialMuted,
51
54
  onLoaded = _ref.onLoaded,
@@ -121,6 +124,7 @@ var Visual = function Visual(_ref) {
121
124
  width: width,
122
125
  height: height,
123
126
  resolution: resolution,
127
+ shouldLoad: shouldLoad,
124
128
  onLoaded: onLoaded,
125
129
  className: classNames([styles.container, _defineProperty({}, className, className !== null)])
126
130
  })) : null, isVideo && playing ? /*#__PURE__*/React.createElement("div", {
@@ -137,6 +141,7 @@ var Visual = function Visual(_ref) {
137
141
  height: objectFit === null ? height : null,
138
142
  autoPlay: true,
139
143
  loop: videoLoop,
144
+ shouldLoad: shouldLoad,
140
145
  initialMuted: videoInitialMuted,
141
146
  onReady: onLoaded
142
147
  })))) : null) : null;
package/lib/index.js CHANGED
@@ -24,7 +24,7 @@ var Video__default = /*#__PURE__*/_interopDefaultLegacy(Video);
24
24
 
25
25
  var styles = {"container":"micromag-element-visual-container","videoContainer":"micromag-element-visual-videoContainer"};
26
26
 
27
- var _excluded = ["media", "width", "height", "resolution", "objectFit", "playing", "videoLoop", "videoInitialMuted", "onLoaded", "className", "videoClassName"];
27
+ var _excluded = ["media", "width", "height", "resolution", "objectFit", "playing", "shouldLoad", "videoLoop", "videoInitialMuted", "onLoaded", "className", "videoClassName"];
28
28
  var propTypes = {
29
29
  media: core.PropTypes.media,
30
30
  width: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
@@ -32,6 +32,7 @@ var propTypes = {
32
32
  resolution: PropTypes__default["default"].number,
33
33
  objectFit: core.PropTypes.objectFit,
34
34
  playing: PropTypes__default["default"].bool,
35
+ shouldLoad: PropTypes__default["default"].bool,
35
36
  videoLoop: PropTypes__default["default"].bool,
36
37
  videoInitialMuted: PropTypes__default["default"].bool,
37
38
  onLoaded: PropTypes__default["default"].func,
@@ -45,6 +46,7 @@ var defaultProps = {
45
46
  resolution: 1,
46
47
  objectFit: null,
47
48
  playing: true,
49
+ shouldLoad: true,
48
50
  videoLoop: true,
49
51
  videoInitialMuted: true,
50
52
  onLoaded: null,
@@ -59,6 +61,7 @@ var Visual = function Visual(_ref) {
59
61
  resolution = _ref.resolution,
60
62
  objectFit = _ref.objectFit,
61
63
  playing = _ref.playing,
64
+ shouldLoad = _ref.shouldLoad,
62
65
  videoLoop = _ref.videoLoop,
63
66
  videoInitialMuted = _ref.videoInitialMuted,
64
67
  onLoaded = _ref.onLoaded,
@@ -134,6 +137,7 @@ var Visual = function Visual(_ref) {
134
137
  width: width,
135
138
  height: height,
136
139
  resolution: resolution,
140
+ shouldLoad: shouldLoad,
137
141
  onLoaded: onLoaded,
138
142
  className: classNames__default["default"]([styles.container, _defineProperty__default["default"]({}, className, className !== null)])
139
143
  })) : null, isVideo && playing ? /*#__PURE__*/React__default["default"].createElement("div", {
@@ -150,6 +154,7 @@ var Visual = function Visual(_ref) {
150
154
  height: objectFit === null ? height : null,
151
155
  autoPlay: true,
152
156
  loop: videoLoop,
157
+ shouldLoad: shouldLoad,
153
158
  initialMuted: videoInitialMuted,
154
159
  onReady: onLoaded
155
160
  })))) : null) : null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-visual",
3
- "version": "0.3.88",
3
+ "version": "0.3.106",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -40,19 +40,19 @@
40
40
  "prepare": "../../scripts/prepare-package.sh"
41
41
  },
42
42
  "devDependencies": {
43
- "react": "^16.8.0 || ^17.0.0",
44
- "react-dom": "^16.8.0 || ^17.0.0"
43
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
44
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
45
45
  },
46
46
  "peerDependencies": {
47
- "react": "^16.8.0 || ^17.0.0",
48
- "react-dom": "^16.8.0 || ^17.0.0"
47
+ "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
48
+ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0"
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
52
  "@folklore/size": "^0.1.20",
53
- "@micromag/core": "^0.3.88",
54
- "@micromag/element-image": "^0.3.88",
55
- "@micromag/element-video": "^0.3.88",
53
+ "@micromag/core": "^0.3.106",
54
+ "@micromag/element-image": "^0.3.106",
55
+ "@micromag/element-video": "^0.3.106",
56
56
  "classnames": "^2.2.6",
57
57
  "prop-types": "^15.7.2",
58
58
  "uuid": "^8.3.2"
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "d0fb1f7d4ae6bfa1fd07dc856307c1c4225ab889"
63
+ "gitHead": "865842ef7fbdc41f89dd0891857989ded63d44c4"
64
64
  }