@micromag/screen-image 0.3.103 → 0.3.107

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
@@ -111,8 +111,9 @@ var ImageScreen = function ImageScreen(_ref) {
111
111
  isStatic = _useScreenRenderConte.isStatic,
112
112
  isCapture = _useScreenRenderConte.isCapture;
113
113
 
114
- var backgroundPlaying = current && (isView || isEdit);
115
- var backgroundShouldLoad = current || active || !isView;
114
+ var backgroundPlaying = current && (isView || isEdit); // const mediaShouldLoad = current || active;
115
+
116
+ var mediaShouldLoad = current || active;
116
117
  var hasImage = image !== null;
117
118
  var hasTitle = isTextFilled(title);
118
119
  var hasText = isTextFilled(text);
@@ -180,6 +181,7 @@ var ImageScreen = function ImageScreen(_ref) {
180
181
  height: imageHeight,
181
182
  resolution: resolution,
182
183
  playing: backgroundPlaying,
184
+ shouldLoad: mediaShouldLoad,
183
185
  onLoaded: onImageLoaded
184
186
  })) : null)), withTitle && /*#__PURE__*/React.createElement(ScreenElement, {
185
187
  key: "title",
@@ -295,7 +297,7 @@ var ImageScreen = function ImageScreen(_ref) {
295
297
  height: height,
296
298
  resolution: resolution,
297
299
  playing: backgroundPlaying,
298
- shouldLoad: backgroundShouldLoad
300
+ shouldLoad: mediaShouldLoad
299
301
  }) : null, /*#__PURE__*/React.createElement(Container, {
300
302
  width: width,
301
303
  height: height
package/lib/index.js CHANGED
@@ -133,8 +133,9 @@ var ImageScreen = function ImageScreen(_ref) {
133
133
  isStatic = _useScreenRenderConte.isStatic,
134
134
  isCapture = _useScreenRenderConte.isCapture;
135
135
 
136
- var backgroundPlaying = current && (isView || isEdit);
137
- var backgroundShouldLoad = current || active || !isView;
136
+ var backgroundPlaying = current && (isView || isEdit); // const mediaShouldLoad = current || active;
137
+
138
+ var mediaShouldLoad = current || active;
138
139
  var hasImage = image !== null;
139
140
  var hasTitle = utils.isTextFilled(title);
140
141
  var hasText = utils.isTextFilled(text);
@@ -202,6 +203,7 @@ var ImageScreen = function ImageScreen(_ref) {
202
203
  height: imageHeight,
203
204
  resolution: resolution,
204
205
  playing: backgroundPlaying,
206
+ shouldLoad: mediaShouldLoad,
205
207
  onLoaded: onImageLoaded
206
208
  })) : null)), withTitle && /*#__PURE__*/React__default["default"].createElement(components.ScreenElement, {
207
209
  key: "title",
@@ -317,7 +319,7 @@ var ImageScreen = function ImageScreen(_ref) {
317
319
  height: height,
318
320
  resolution: resolution,
319
321
  playing: backgroundPlaying,
320
- shouldLoad: backgroundShouldLoad
322
+ shouldLoad: mediaShouldLoad
321
323
  }) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
322
324
  width: width,
323
325
  height: height
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-image",
3
- "version": "0.3.103",
3
+ "version": "0.3.107",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -40,24 +40,24 @@
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
- "@micromag/core": "^0.3.91",
53
- "@micromag/element-background": "^0.3.91",
54
- "@micromag/element-call-to-action": "^0.3.103",
55
- "@micromag/element-container": "^0.3.91",
56
- "@micromag/element-heading": "^0.3.91",
57
- "@micromag/element-layout": "^0.3.91",
58
- "@micromag/element-text": "^0.3.91",
59
- "@micromag/element-visual": "^0.3.91",
60
- "@micromag/transforms": "^0.3.91",
52
+ "@micromag/core": "^0.3.107",
53
+ "@micromag/element-background": "^0.3.107",
54
+ "@micromag/element-call-to-action": "^0.3.107",
55
+ "@micromag/element-container": "^0.3.107",
56
+ "@micromag/element-heading": "^0.3.107",
57
+ "@micromag/element-layout": "^0.3.107",
58
+ "@micromag/element-text": "^0.3.107",
59
+ "@micromag/element-visual": "^0.3.107",
60
+ "@micromag/transforms": "^0.3.107",
61
61
  "classnames": "^2.2.6",
62
62
  "lodash": "^4.17.21",
63
63
  "prop-types": "^15.7.2",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "660b2ada7b03941feb841470abf5cd2cc6e3e68f"
70
+ "gitHead": "952ef450fe62328a0ae3ab6dbb3c3079bb66d17a"
71
71
  }