@micromag/element-image 0.3.67 → 0.3.71

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
@@ -15,6 +15,7 @@ var propTypes = {
15
15
  alt: PropTypes$1.string,
16
16
  width: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
17
17
  height: PropTypes$1.oneOfType([PropTypes$1.number, PropTypes$1.string]),
18
+ resolution: PropTypes$1.number,
18
19
  objectFit: PropTypes.objectFit,
19
20
  containerStyle: PropTypes.containerStyle,
20
21
  imageStyle: PropTypes.containerStyle,
@@ -28,6 +29,7 @@ var defaultProps = {
28
29
  alt: null,
29
30
  width: null,
30
31
  height: null,
32
+ resolution: 1,
31
33
  objectFit: null,
32
34
  containerStyle: {},
33
35
  //
@@ -43,6 +45,7 @@ var Image = function Image(_ref) {
43
45
  alt = _ref.alt,
44
46
  width = _ref.width,
45
47
  height = _ref.height,
48
+ resolution = _ref.resolution,
46
49
  objectFit = _ref.objectFit,
47
50
  containerStyle = _ref.containerStyle,
48
51
  imageStyle = _ref.imageStyle,
@@ -185,7 +188,9 @@ var Image = function Image(_ref) {
185
188
  finalWidth = _finalImageStyle$widt === void 0 ? null : _finalImageStyle$widt,
186
189
  _finalImageStyle$heig = _finalImageStyle.height,
187
190
  finalHeight = _finalImageStyle$heig === void 0 ? null : _finalImageStyle$heig;
188
- var finalUrl = getOptimalImageUrl(media, finalWidth, finalHeight);
191
+ var finalUrl = getOptimalImageUrl(media, finalWidth, finalHeight, {
192
+ resolution: resolution
193
+ });
189
194
  return /*#__PURE__*/React.createElement("div", {
190
195
  className: classNames([styles.container, _defineProperty({}, className, className !== null)]),
191
196
  style: finalContainerStyle
package/lib/index.js CHANGED
@@ -26,6 +26,7 @@ var propTypes = {
26
26
  alt: PropTypes__default["default"].string,
27
27
  width: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
28
28
  height: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].string]),
29
+ resolution: PropTypes__default["default"].number,
29
30
  objectFit: core.PropTypes.objectFit,
30
31
  containerStyle: core.PropTypes.containerStyle,
31
32
  imageStyle: core.PropTypes.containerStyle,
@@ -39,6 +40,7 @@ var defaultProps = {
39
40
  alt: null,
40
41
  width: null,
41
42
  height: null,
43
+ resolution: 1,
42
44
  objectFit: null,
43
45
  containerStyle: {},
44
46
  //
@@ -54,6 +56,7 @@ var Image = function Image(_ref) {
54
56
  alt = _ref.alt,
55
57
  width = _ref.width,
56
58
  height = _ref.height,
59
+ resolution = _ref.resolution,
57
60
  objectFit = _ref.objectFit,
58
61
  containerStyle = _ref.containerStyle,
59
62
  imageStyle = _ref.imageStyle,
@@ -196,7 +199,9 @@ var Image = function Image(_ref) {
196
199
  finalWidth = _finalImageStyle$widt === void 0 ? null : _finalImageStyle$widt,
197
200
  _finalImageStyle$heig = _finalImageStyle.height,
198
201
  finalHeight = _finalImageStyle$heig === void 0 ? null : _finalImageStyle$heig;
199
- var finalUrl = utils.getOptimalImageUrl(media, finalWidth, finalHeight);
202
+ var finalUrl = utils.getOptimalImageUrl(media, finalWidth, finalHeight, {
203
+ resolution: resolution
204
+ });
200
205
  return /*#__PURE__*/React__default["default"].createElement("div", {
201
206
  className: classNames__default["default"]([styles.container, _defineProperty__default["default"]({}, className, className !== null)]),
202
207
  style: finalContainerStyle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-image",
3
- "version": "0.3.67",
3
+ "version": "0.3.71",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -50,7 +50,7 @@
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
52
  "@folklore/size": "^0.1.20",
53
- "@micromag/core": "^0.3.67",
53
+ "@micromag/core": "^0.3.71",
54
54
  "classnames": "^2.2.6",
55
55
  "prop-types": "^15.7.2",
56
56
  "react-intl": "^5.12.1",
@@ -59,5 +59,5 @@
59
59
  "publishConfig": {
60
60
  "access": "public"
61
61
  },
62
- "gitHead": "f78a94a94a05f1f60f97b48b9cb4477b6ceae14c"
62
+ "gitHead": "50093d0adc731dfb58656015179c4ac0b1c6765f"
63
63
  }