@atlaskit/media-card 70.9.0 → 72.0.0

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.
Files changed (181) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/dist/cjs/errors.js +109 -6
  3. package/dist/cjs/files/cardImageView/index.js +58 -89
  4. package/dist/cjs/files/index.js +0 -6
  5. package/dist/cjs/index.js +16 -6
  6. package/dist/cjs/root/card/cardAnalytics.js +33 -19
  7. package/dist/cjs/root/card/cardConstants.js +8 -0
  8. package/dist/cjs/root/card/cardSSRView.js +114 -0
  9. package/dist/cjs/root/card/cardState.js +50 -0
  10. package/dist/cjs/root/card/getCardPreview/cache.js +49 -0
  11. package/dist/cjs/root/card/getCardPreview/filePreviewStatus.js +50 -0
  12. package/dist/cjs/root/card/getCardPreview/helpers.js +215 -0
  13. package/dist/cjs/root/card/getCardPreview/index.js +225 -0
  14. package/dist/cjs/root/card/getCardStatus.js +16 -21
  15. package/dist/cjs/root/card/index.js +339 -398
  16. package/dist/cjs/root/cardView.js +108 -56
  17. package/dist/cjs/root/index.js +9 -1
  18. package/dist/cjs/root/inline/loader.js +22 -21
  19. package/dist/cjs/root/inline/{inlineMediaCard.js → mediaInlineCard.js} +66 -24
  20. package/dist/cjs/root/inlinePlayer.js +5 -15
  21. package/dist/cjs/root/ui/Breakpoint.js +13 -0
  22. package/dist/cjs/root/ui/common.js +5 -11
  23. package/dist/cjs/root/ui/iconMessage/index.js +17 -9
  24. package/dist/cjs/root/ui/imageRenderer/imageRenderer.js +32 -115
  25. package/dist/cjs/root/ui/loadingRateLimited/loadingRateLimited.js +2 -2
  26. package/dist/cjs/root/ui/progressBar/progressBar.js +2 -2
  27. package/dist/cjs/root/ui/progressBar/styled.js +3 -1
  28. package/dist/cjs/root/ui/styled.js +17 -80
  29. package/dist/cjs/root/ui/styledSSR.js +108 -0
  30. package/dist/cjs/root/ui/titleBox/failedTitleBox.js +7 -3
  31. package/dist/cjs/root/ui/titleBox/styled.js +3 -1
  32. package/dist/cjs/utils/analytics.js +26 -43
  33. package/dist/cjs/utils/dimensionComparer.js +1 -1
  34. package/dist/cjs/utils/document.js +12 -0
  35. package/dist/cjs/utils/getDataURIDimension.js +13 -2
  36. package/dist/cjs/utils/metadata.js +11 -3
  37. package/dist/cjs/utils/objectURLCache.js +6 -0
  38. package/dist/cjs/utils/resizeModeToMediaImageProps.js +13 -0
  39. package/dist/cjs/utils/shouldDisplayImageThumbnail.js +1 -1
  40. package/dist/cjs/utils/videoSnapshot.js +45 -0
  41. package/dist/cjs/version.json +1 -1
  42. package/dist/es2019/errors.js +52 -2
  43. package/dist/es2019/files/cardImageView/index.js +12 -46
  44. package/dist/es2019/files/index.js +1 -1
  45. package/dist/es2019/index.js +3 -3
  46. package/dist/es2019/root/card/cardAnalytics.js +23 -17
  47. package/dist/es2019/root/card/cardConstants.js +1 -0
  48. package/dist/es2019/root/card/cardSSRView.js +93 -0
  49. package/dist/es2019/root/card/cardState.js +26 -0
  50. package/dist/es2019/root/card/getCardPreview/cache.js +29 -0
  51. package/dist/es2019/root/card/getCardPreview/filePreviewStatus.js +35 -0
  52. package/dist/es2019/root/card/getCardPreview/helpers.js +83 -0
  53. package/dist/es2019/root/card/getCardPreview/index.js +129 -0
  54. package/dist/es2019/root/card/getCardStatus.js +11 -15
  55. package/dist/es2019/root/card/index.js +292 -276
  56. package/dist/es2019/root/cardView.js +107 -53
  57. package/dist/es2019/root/index.js +2 -1
  58. package/dist/es2019/root/inline/loader.js +16 -15
  59. package/dist/es2019/root/inline/mediaInlineCard.js +127 -0
  60. package/dist/es2019/root/inlinePlayer.js +5 -13
  61. package/dist/es2019/root/ui/Breakpoint.js +6 -0
  62. package/dist/es2019/root/ui/common.js +1 -7
  63. package/dist/es2019/root/ui/iconMessage/index.js +10 -6
  64. package/dist/es2019/root/ui/imageRenderer/imageRenderer.js +22 -74
  65. package/dist/es2019/root/ui/loadingRateLimited/loadingRateLimited.js +1 -1
  66. package/dist/es2019/root/ui/progressBar/progressBar.js +1 -1
  67. package/dist/es2019/root/ui/progressBar/styled.js +2 -1
  68. package/dist/es2019/root/ui/styled.js +4 -64
  69. package/dist/es2019/root/ui/styledSSR.js +93 -0
  70. package/dist/es2019/root/ui/titleBox/failedTitleBox.js +5 -3
  71. package/dist/es2019/root/ui/titleBox/styled.js +2 -1
  72. package/dist/es2019/utils/analytics.js +29 -40
  73. package/dist/es2019/utils/dimensionComparer.js +1 -1
  74. package/dist/es2019/utils/document.js +1 -0
  75. package/dist/es2019/utils/getDataURIDimension.js +8 -0
  76. package/dist/es2019/utils/metadata.js +12 -4
  77. package/dist/es2019/utils/objectURLCache.js +5 -0
  78. package/dist/es2019/utils/resizeModeToMediaImageProps.js +6 -0
  79. package/dist/es2019/utils/shouldDisplayImageThumbnail.js +1 -1
  80. package/dist/es2019/utils/videoSnapshot.js +7 -0
  81. package/dist/es2019/version.json +1 -1
  82. package/dist/esm/errors.js +85 -2
  83. package/dist/esm/files/cardImageView/index.js +55 -87
  84. package/dist/esm/files/index.js +1 -1
  85. package/dist/esm/index.js +3 -3
  86. package/dist/esm/root/card/cardAnalytics.js +23 -18
  87. package/dist/esm/root/card/cardConstants.js +1 -0
  88. package/dist/esm/root/card/cardSSRView.js +92 -0
  89. package/dist/esm/root/card/cardState.js +32 -0
  90. package/dist/esm/root/card/getCardPreview/cache.js +33 -0
  91. package/dist/esm/root/card/getCardPreview/filePreviewStatus.js +35 -0
  92. package/dist/esm/root/card/getCardPreview/helpers.js +194 -0
  93. package/dist/esm/root/card/getCardPreview/index.js +174 -0
  94. package/dist/esm/root/card/getCardStatus.js +13 -17
  95. package/dist/esm/root/card/index.js +349 -401
  96. package/dist/esm/root/cardView.js +105 -52
  97. package/dist/esm/root/index.js +2 -1
  98. package/dist/esm/root/inline/loader.js +23 -22
  99. package/dist/esm/root/inline/{inlineMediaCard.js → mediaInlineCard.js} +62 -22
  100. package/dist/esm/root/inlinePlayer.js +5 -13
  101. package/dist/esm/root/ui/Breakpoint.js +6 -0
  102. package/dist/esm/root/ui/common.js +1 -7
  103. package/dist/esm/root/ui/iconMessage/index.js +12 -7
  104. package/dist/esm/root/ui/imageRenderer/imageRenderer.js +24 -106
  105. package/dist/esm/root/ui/loadingRateLimited/loadingRateLimited.js +1 -1
  106. package/dist/esm/root/ui/progressBar/progressBar.js +1 -1
  107. package/dist/esm/root/ui/progressBar/styled.js +2 -1
  108. package/dist/esm/root/ui/styled.js +13 -61
  109. package/dist/esm/root/ui/styledSSR.js +76 -0
  110. package/dist/esm/root/ui/titleBox/failedTitleBox.js +6 -3
  111. package/dist/esm/root/ui/titleBox/styled.js +2 -1
  112. package/dist/esm/utils/analytics.js +22 -35
  113. package/dist/esm/utils/dimensionComparer.js +1 -1
  114. package/dist/esm/utils/document.js +3 -0
  115. package/dist/esm/utils/getDataURIDimension.js +8 -0
  116. package/dist/esm/utils/metadata.js +12 -4
  117. package/dist/esm/utils/objectURLCache.js +6 -0
  118. package/dist/esm/utils/resizeModeToMediaImageProps.js +6 -0
  119. package/dist/esm/utils/shouldDisplayImageThumbnail.js +1 -1
  120. package/dist/esm/utils/videoSnapshot.js +31 -0
  121. package/dist/esm/version.json +1 -1
  122. package/dist/types/__tests_external__/page-objects/MediaCard.d.ts +4 -3
  123. package/dist/types/errors.d.ts +24 -2
  124. package/dist/types/files/cardImageView/index.d.ts +5 -12
  125. package/dist/types/files/cardImageView/styled.d.ts +1 -1
  126. package/dist/types/files/index.d.ts +1 -1
  127. package/dist/types/index.d.ts +9 -12
  128. package/dist/types/root/card/cardAnalytics.d.ts +5 -7
  129. package/dist/types/root/card/cardConstants.d.ts +1 -0
  130. package/dist/types/root/card/cardSSRView.d.ts +13 -0
  131. package/dist/types/root/card/cardState.d.ts +5 -0
  132. package/dist/types/root/card/getCardPreview/cache.d.ts +18 -0
  133. package/dist/types/root/card/getCardPreview/filePreviewStatus.d.ts +5 -0
  134. package/dist/types/root/card/getCardPreview/helpers.d.ts +9 -0
  135. package/dist/types/root/card/getCardPreview/index.d.ts +44 -0
  136. package/dist/types/root/card/getCardStatus.d.ts +4 -14
  137. package/dist/types/root/card/index.d.ts +17 -21
  138. package/dist/types/root/cardView.d.ts +12 -8
  139. package/dist/types/root/index.d.ts +1 -0
  140. package/dist/types/root/inline/loader.d.ts +8 -8
  141. package/dist/types/root/inline/{inlineMediaCard.d.ts → mediaInlineCard.d.ts} +4 -4
  142. package/dist/types/root/inlinePlayer.d.ts +1 -1
  143. package/dist/types/root/ui/Breakpoint.d.ts +4 -0
  144. package/dist/types/root/ui/common.d.ts +1 -4
  145. package/dist/types/root/ui/iconMessage/index.d.ts +7 -2
  146. package/dist/types/root/ui/iconWrapper/styled.d.ts +1 -1
  147. package/dist/types/root/ui/imageRenderer/imageRenderer.d.ts +2 -16
  148. package/dist/types/root/ui/loadingRateLimited/loadingRateLimited.d.ts +1 -1
  149. package/dist/types/root/ui/loadingRateLimited/styled.d.ts +1 -1
  150. package/dist/types/root/ui/progressBar/progressBar.d.ts +1 -1
  151. package/dist/types/root/ui/progressBar/styled.d.ts +1 -1
  152. package/dist/types/root/ui/styled.d.ts +3 -10
  153. package/dist/types/root/ui/styledSSR.d.ts +16 -0
  154. package/dist/types/root/ui/titleBox/failedTitleBox.d.ts +3 -1
  155. package/dist/types/root/ui/titleBox/styled.d.ts +1 -1
  156. package/dist/types/root/ui/titleBox/titleBox.d.ts +1 -1
  157. package/dist/types/types.d.ts +15 -1
  158. package/dist/types/utils/analytics.d.ts +20 -21
  159. package/dist/types/utils/cardDimensions.d.ts +5 -1
  160. package/dist/types/utils/dimensionComparer.d.ts +1 -1
  161. package/dist/types/utils/document.d.ts +2 -0
  162. package/dist/types/utils/getDataURIDimension.d.ts +3 -1
  163. package/dist/types/utils/index.d.ts +1 -0
  164. package/dist/types/utils/lazyContent/styled.d.ts +1 -1
  165. package/dist/types/utils/lightCards/types.d.ts +1 -1
  166. package/dist/types/utils/metadata.d.ts +2 -2
  167. package/dist/types/utils/objectURLCache.d.ts +2 -1
  168. package/dist/types/utils/resizeModeToMediaImageProps.d.ts +5 -0
  169. package/dist/types/utils/shouldDisplayImageThumbnail.d.ts +1 -1
  170. package/dist/types/utils/videoSnapshot.d.ts +1 -0
  171. package/example-helpers/index.tsx +21 -0
  172. package/package.json +19 -17
  173. package/dist/cjs/root/card/getCardPreview.js +0 -173
  174. package/dist/cjs/utils/fileAttributesContext.js +0 -40
  175. package/dist/es2019/root/card/getCardPreview.js +0 -86
  176. package/dist/es2019/root/inline/inlineMediaCard.js +0 -92
  177. package/dist/es2019/utils/fileAttributesContext.js +0 -19
  178. package/dist/esm/root/card/getCardPreview.js +0 -153
  179. package/dist/esm/utils/fileAttributesContext.js +0 -18
  180. package/dist/types/root/card/getCardPreview.d.ts +0 -8
  181. package/dist/types/utils/fileAttributesContext.d.ts +0 -10
@@ -1,109 +1,27 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
- import _createClass from "@babel/runtime/helpers/createClass";
4
- import _assertThisInitialized from "@babel/runtime/helpers/assertThisInitialized";
5
- import _inherits from "@babel/runtime/helpers/inherits";
6
- import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
7
- import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
-
10
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
11
-
12
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
13
-
14
- import React from 'react';
2
+ import React, { useEffect } from 'react';
15
3
  import { MediaImage } from '@atlaskit/media-ui';
16
- import { withAnalyticsEvents } from '@atlaskit/analytics-next';
17
- import { fireMediaCardEvent, RenderEventAction, getRenderSucceededEventPayload, getRenderFailedFileUriPayload, getRenderFailedExternalUriPayload } from '../../../utils/analytics';
18
- import { withFileAttributes } from '../../../utils/fileAttributesContext';
19
- export var resizeModeToMediaImageProps = function resizeModeToMediaImageProps(resizeMode) {
20
- return {
21
- crop: resizeMode === 'crop',
22
- stretch: resizeMode === 'stretchy-fit'
23
- };
24
- };
25
- export var ImageRendererBase = /*#__PURE__*/function (_React$Component) {
26
- _inherits(ImageRendererBase, _React$Component);
27
-
28
- var _super = _createSuper(ImageRendererBase);
29
-
30
- function ImageRendererBase() {
31
- var _this;
32
-
33
- _classCallCheck(this, ImageRendererBase);
34
-
35
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
36
- args[_key] = arguments[_key];
4
+ import { resizeModeToMediaImageProps } from '../../../utils/resizeModeToMediaImageProps';
5
+ export var ImageRenderer = function ImageRenderer(_ref) {
6
+ var dataURI = _ref.dataURI,
7
+ previewOrientation = _ref.previewOrientation,
8
+ alt = _ref.alt,
9
+ resizeMode = _ref.resizeMode,
10
+ onImageLoad = _ref.onImageLoad,
11
+ onImageError = _ref.onImageError,
12
+ onDisplayImage = _ref.onDisplayImage,
13
+ mediaType = _ref.mediaType;
14
+ useEffect(function () {
15
+ // TODO: trigger accordingly with the succeeded event. This could be a breaking change
16
+ if (mediaType === 'image' && onDisplayImage) {
17
+ onDisplayImage();
37
18
  }
38
-
39
- _this = _super.call.apply(_super, [this].concat(args));
40
-
41
- _defineProperty(_assertThisInitialized(_this), "onImageLoad", function () {
42
- var _this$props = _this.props,
43
- createAnalyticsEvent = _this$props.createAnalyticsEvent,
44
- fileAttributes = _this$props.fileAttributes;
45
-
46
- if (fileAttributes && _this.shouldFireEvent(RenderEventAction.SUCCEEDED)) {
47
- fireMediaCardEvent(getRenderSucceededEventPayload(fileAttributes), createAnalyticsEvent);
48
- }
49
- });
50
-
51
- _defineProperty(_assertThisInitialized(_this), "onImageError", function () {
52
- var _this$props2 = _this.props,
53
- onImageError = _this$props2.onImageError,
54
- fileAttributes = _this$props2.fileAttributes;
55
- onImageError && onImageError();
56
-
57
- if (fileAttributes && _this.shouldFireEvent(RenderEventAction.FAILED)) {
58
- var _this$props3 = _this.props,
59
- createAnalyticsEvent = _this$props3.createAnalyticsEvent,
60
- mediaItemType = _this$props3.mediaItemType;
61
-
62
- if (mediaItemType === 'file') {
63
- fireMediaCardEvent(getRenderFailedFileUriPayload(fileAttributes), createAnalyticsEvent);
64
- } else if (mediaItemType === 'external-image') {
65
- fireMediaCardEvent(getRenderFailedExternalUriPayload(fileAttributes), createAnalyticsEvent);
66
- }
67
- }
68
- });
69
-
70
- _defineProperty(_assertThisInitialized(_this), "shouldFireEvent", function (action) {
71
- return !_this.lastAnalyticsAction || _this.lastAnalyticsAction !== action;
72
- });
73
-
74
- return _this;
75
- }
76
-
77
- _createClass(ImageRendererBase, [{
78
- key: "componentDidMount",
79
- value: function componentDidMount() {
80
- // TODO: trigger accordingly with the succeeded event. This could be a breaking change
81
- var _this$props4 = this.props,
82
- onDisplayImage = _this$props4.onDisplayImage,
83
- mediaType = _this$props4.mediaType;
84
-
85
- if (mediaType === 'image' && onDisplayImage) {
86
- onDisplayImage();
87
- }
88
- }
89
- }, {
90
- key: "render",
91
- value: function render() {
92
- var _this$props5 = this.props,
93
- dataURI = _this$props5.dataURI,
94
- previewOrientation = _this$props5.previewOrientation,
95
- alt = _this$props5.alt,
96
- resizeMode = _this$props5.resizeMode;
97
- return /*#__PURE__*/React.createElement(MediaImage, _extends({
98
- dataURI: dataURI,
99
- alt: alt,
100
- previewOrientation: previewOrientation,
101
- onImageLoad: this.onImageLoad,
102
- onImageError: this.onImageError
103
- }, resizeModeToMediaImageProps(resizeMode)));
104
- }
105
- }]);
106
-
107
- return ImageRendererBase;
108
- }(React.Component);
109
- export var ImageRenderer = withAnalyticsEvents()(withFileAttributes(ImageRendererBase));
19
+ }, [mediaType, onDisplayImage]);
20
+ return /*#__PURE__*/React.createElement(MediaImage, _extends({
21
+ dataURI: dataURI,
22
+ alt: alt,
23
+ previewOrientation: previewOrientation,
24
+ onImageLoad: onImageLoad,
25
+ onImageError: onImageError
26
+ }, resizeModeToMediaImageProps(resizeMode)));
27
+ };
@@ -3,7 +3,7 @@ import { errorIcon } from '@atlaskit/media-ui/errorIcon';
3
3
  import { WarningIconWrapper, LoadingRateLimitedContainer, CouldntLoadWrapper, ErrorWrapper, LoadingRateLimitedTextWrapper } from './styled';
4
4
  import { messages } from '@atlaskit/media-ui';
5
5
  import { FormattedMessage } from 'react-intl';
6
- import { Breakpoint } from '../common';
6
+ import { Breakpoint } from '../Breakpoint';
7
7
  export var LoadingRateLimited = function LoadingRateLimited(_ref) {
8
8
  var _ref$breakpoint = _ref.breakpoint,
9
9
  breakpoint = _ref$breakpoint === void 0 ? Breakpoint.SMALL : _ref$breakpoint,
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { StyledBar } from './styled';
3
- import { Breakpoint } from '../common';
3
+ import { Breakpoint } from '../Breakpoint';
4
4
  export var ProgressBar = function ProgressBar(_ref) {
5
5
  var progress = _ref.progress,
6
6
  _ref$breakpoint = _ref.breakpoint,
@@ -6,7 +6,8 @@ import styled from 'styled-components';
6
6
  import { borderRadius } from '@atlaskit/media-ui';
7
7
  import { rgba } from '../../../styles/mixins';
8
8
  import { N0, N400 } from '@atlaskit/theme/colors';
9
- import { Breakpoint, getTitleBoxHeight, responsiveSettings } from '../common';
9
+ import { getTitleBoxHeight, responsiveSettings } from '../common';
10
+ import { Breakpoint } from '../Breakpoint';
10
11
  var height = 3;
11
12
  var padding = 1;
12
13
  var width = 95; // %
@@ -1,68 +1,26 @@
1
1
  import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
2
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
2
 
4
- var _templateObject, _templateObject2;
3
+ var _templateObject;
5
4
 
6
5
  import styled from 'styled-components';
7
6
  import { getCSSUnitValue } from '../../utils/getCSSUnitValue';
8
7
  import { getDefaultCardDimensions } from '../../utils/cardDimensions';
9
- import { fontFamily } from '@atlaskit/theme/constants';
10
- import { borderRadius } from '@atlaskit/media-ui';
11
- import { N20, N60A } from '@atlaskit/theme/colors';
12
- import { akEditorSelectedBoxShadow } from '@atlaskit/editor-shared-styles/consts';
13
8
  import { hideNativeBrowserTextSelectionStyles } from '@atlaskit/editor-shared-styles/selection';
14
- import { transition } from '../../styles';
15
9
  import { tickBoxClassName, tickboxFixedStyles } from './tickBox/styled';
16
- import { fixedBlanketStyles, blanketClassName } from './blanket/styled';
17
10
  import { fixedActionBarStyles, actionsBarClassName } from './actionsBar/styled';
18
11
  import { fixedPlayButtonStyles, playButtonClassName } from './playButton/styled';
19
- import { Breakpoint, responsiveSettings } from './common';
20
- var breakpointSizes = [[Breakpoint.SMALL, 599], [Breakpoint.LARGE, Infinity]];
21
- export var calcBreakpointSize = function calcBreakpointSize() {
22
- var wrapperWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
23
-
24
- var _ref = breakpointSizes.find(function (_ref3) {
25
- var _ref4 = _slicedToArray(_ref3, 2),
26
- _breakpoint = _ref4[0],
27
- limit = _ref4[1];
28
-
29
- return wrapperWidth <= limit;
30
- }) || [Breakpoint.SMALL],
31
- _ref2 = _slicedToArray(_ref, 1),
32
- breakpoint = _ref2[0];
33
-
34
- return breakpoint;
35
- };
36
-
37
- var generateResponsiveStyles = function generateResponsiveStyles() {
38
- var breakpoint = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Breakpoint.SMALL;
39
- var setting = responsiveSettings[breakpoint];
40
- return "\n font-size: ".concat(setting.fontSize, "px;\n line-height: ").concat(setting.lineHeight, "px;\n ");
41
- };
12
+ import { SSRFileExperienceWrapper } from './styledSSR';
42
13
 
43
14
  var getWrapperDimensions = function getWrapperDimensions(dimensions, appearance) {
44
- var _ref5 = dimensions || {},
45
- width = _ref5.width,
46
- height = _ref5.height;
15
+ var _ref = dimensions || {},
16
+ width = _ref.width,
17
+ height = _ref.height;
47
18
 
48
19
  var _getDefaultCardDimens = getDefaultCardDimensions(appearance),
49
20
  defaultWidth = _getDefaultCardDimens.width,
50
21
  defaultHeight = _getDefaultCardDimens.height;
51
22
 
52
23
  return "\n width: ".concat(getCSSUnitValue(width || defaultWidth), ";\n max-width: 100%;\n height: ").concat(getCSSUnitValue(height || defaultHeight), ";\n max-height: 100%;\n ");
53
- }; // This is a trick to simulate the blue border without affecting the dimensions.
54
- // CSS outline has no 'radius', therefore we can't achieve the same effect with it
55
-
56
-
57
- var getWrapperShadow = function getWrapperShadow(disableOverlay, selected) {
58
- var withOverlayShadow = !disableOverlay ? "0 1px 1px ".concat(N60A, ", 0 0 1px 0 ").concat(N60A) : '';
59
- var selectedShadow = selected ? akEditorSelectedBoxShadow : '';
60
- var shadow = [selectedShadow, withOverlayShadow].filter(Boolean).join(', ');
61
- return shadow ? "box-shadow: ".concat(shadow, ";") : '';
62
- };
63
-
64
- var getCursorStyle = function getCursorStyle(shouldUsePointerCursor) {
65
- return "cursor: ".concat(shouldUsePointerCursor ? 'pointer' : 'default', ";");
66
24
  };
67
25
 
68
26
  var getClickablePlayButtonStyles = function getClickablePlayButtonStyles(isPlayButtonClickable) {
@@ -81,18 +39,12 @@ var getSelectableTickBoxStyles = function getSelectableTickBoxStyles(isTickBoxSe
81
39
  return "\n &:hover .".concat(tickBoxClassName, " {\n ").concat(tickboxFixedStyles, "\n }\n ");
82
40
  };
83
41
 
84
- export var NewFileExperienceWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref6) {
85
- var breakpoint = _ref6.breakpoint,
86
- dimensions = _ref6.dimensions,
87
- appearance = _ref6.appearance,
88
- shouldUsePointerCursor = _ref6.shouldUsePointerCursor,
89
- disableOverlay = _ref6.disableOverlay,
90
- displayBackground = _ref6.displayBackground,
91
- selected = _ref6.selected,
92
- isPlayButtonClickable = _ref6.isPlayButtonClickable,
93
- isTickBoxSelectable = _ref6.isTickBoxSelectable,
94
- shouldDisplayTooltip = _ref6.shouldDisplayTooltip;
95
- return "\n ".concat(transition(), "\n box-sizing: border-box;\n * {\n box-sizing: border-box;\n }\n position: relative;\n font-family: ").concat(fontFamily(), ";\n ").concat(getWrapperDimensions(dimensions, appearance), "\n ").concat(displayBackground ? "background-color: ".concat(N20, ";") : '', "\n ").concat(borderRadius, "\n ").concat(getCursorStyle(shouldUsePointerCursor), "\n ").concat(getWrapperShadow(disableOverlay, selected), "\n ").concat(generateResponsiveStyles(breakpoint), "\n ").concat(hideNativeBrowserTextSelectionStyles, "\n\n /* We use classnames from here exceptionally to be able to handle styles when the Card is on hover */\n ").concat(getClickablePlayButtonStyles(isPlayButtonClickable), "\n ").concat(getSelectableTickBoxStyles(isTickBoxSelectable), "\n &:hover .").concat(blanketClassName, " {\n ").concat(fixedBlanketStyles, "\n }\n &:hover .").concat(actionsBarClassName, " {\n ").concat(fixedActionBarStyles, "\n }\n\n /* Tooltip does not support percentage dimensions. We enforce them here */\n ").concat(shouldDisplayTooltip ? "> div { ".concat(getWrapperDimensions(dimensions, appearance), " }") : '', "\n");
42
+ export var NewFileExperienceWrapper = styled(SSRFileExperienceWrapper)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n"])), function (_ref2) {
43
+ var dimensions = _ref2.dimensions,
44
+ appearance = _ref2.appearance,
45
+ isPlayButtonClickable = _ref2.isPlayButtonClickable,
46
+ isTickBoxSelectable = _ref2.isTickBoxSelectable,
47
+ shouldDisplayTooltip = _ref2.shouldDisplayTooltip;
48
+ return "\n ".concat(hideNativeBrowserTextSelectionStyles, "\n\n /* We use classnames from here exceptionally to be able to handle styles when the Card is on hover */\n ").concat(getClickablePlayButtonStyles(isPlayButtonClickable), "\n ").concat(getSelectableTickBoxStyles(isTickBoxSelectable), "\n\n &:hover .").concat(actionsBarClassName, " {\n ").concat(fixedActionBarStyles, "\n }\n\n /* Tooltip does not support percentage dimensions. We enforce them here */\n ").concat(shouldDisplayTooltip ? "> div { ".concat(getWrapperDimensions(dimensions, appearance), " }") : '', "\n");
96
49
  });
97
- NewFileExperienceWrapper.displayName = 'NewFileExperienceWrapper';
98
- export var CardImageContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n position: relative;\n max-width: 100%;\n width: 100%;\n height: 100%;\n max-height: 100%;\n overflow: hidden;\n ", "\n"])), borderRadius);
50
+ NewFileExperienceWrapper.displayName = 'NewFileExperienceWrapper';
@@ -0,0 +1,76 @@
1
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
+ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
3
+
4
+ var _templateObject, _templateObject2;
5
+
6
+ import styled from 'styled-components';
7
+ import { akEditorSelectedBoxShadow } from '@atlaskit/editor-shared-styles/consts';
8
+ import { N20, N60A } from '@atlaskit/theme/colors';
9
+ import { fontFamily } from '@atlaskit/theme/constants';
10
+ import { hideNativeBrowserTextSelectionStyles } from '@atlaskit/editor-shared-styles/selection';
11
+ import { borderRadius } from '@atlaskit/media-ui';
12
+ import { transition } from '../../styles';
13
+ import { getDefaultCardDimensions } from '../../utils/cardDimensions';
14
+ import { getCSSUnitValue } from '../../utils/getCSSUnitValue';
15
+ import { fixedBlanketStyles, blanketClassName } from './blanket/styled';
16
+ import { responsiveSettings } from './common';
17
+ import { Breakpoint } from './Breakpoint';
18
+ export var SSRFileExperienceWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n &:hover .", " {\n ", "\n }\n"])), function (_ref) {
19
+ var breakpoint = _ref.breakpoint,
20
+ dimensions = _ref.dimensions,
21
+ appearance = _ref.appearance,
22
+ shouldUsePointerCursor = _ref.shouldUsePointerCursor,
23
+ displayBackground = _ref.displayBackground,
24
+ disableOverlay = _ref.disableOverlay,
25
+ selected = _ref.selected;
26
+ return "\n ".concat(transition(), "\n box-sizing: border-box;\n * {\n box-sizing: border-box;\n }\n position: relative;\n font-family: ").concat(fontFamily(), ";\n ").concat(getWrapperDimensions(dimensions, appearance), "\n ").concat(displayBackground ? "background-color: ".concat(N20, ";") : '', "\n ").concat(borderRadius, "\n ").concat(getCursorStyle(shouldUsePointerCursor), "\n ").concat(generateResponsiveStyles(breakpoint), "\n ").concat(hideNativeBrowserTextSelectionStyles, "\n ").concat(getWrapperShadow(disableOverlay, selected), "\n ");
27
+ }, blanketClassName, fixedBlanketStyles);
28
+ SSRFileExperienceWrapper.displayName = 'SSRFileExperienceWrapper';
29
+ export var getWrapperDimensions = function getWrapperDimensions(dimensions, appearance) {
30
+ var _ref2 = dimensions || {},
31
+ width = _ref2.width,
32
+ height = _ref2.height;
33
+
34
+ var _getDefaultCardDimens = getDefaultCardDimensions(appearance),
35
+ defaultWidth = _getDefaultCardDimens.width,
36
+ defaultHeight = _getDefaultCardDimens.height;
37
+
38
+ return "\n width: ".concat(getCSSUnitValue(width || defaultWidth), ";\n max-width: 100%;\n height: ").concat(getCSSUnitValue(height || defaultHeight), ";\n max-height: 100%;\n ");
39
+ };
40
+
41
+ var generateResponsiveStyles = function generateResponsiveStyles() {
42
+ var breakpoint = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Breakpoint.SMALL;
43
+ var setting = responsiveSettings[breakpoint];
44
+ return "\n font-size: ".concat(setting.fontSize, "px;\n line-height: ").concat(setting.lineHeight, "px;\n ");
45
+ };
46
+
47
+ var getCursorStyle = function getCursorStyle(shouldUsePointerCursor) {
48
+ return "cursor: ".concat(shouldUsePointerCursor ? 'pointer' : 'default', ";");
49
+ }; // This is a trick to simulate the blue border without affecting the dimensions.
50
+ // CSS outline has no 'radius', therefore we can't achieve the same effect with it
51
+
52
+
53
+ var getWrapperShadow = function getWrapperShadow(disableOverlay, selected) {
54
+ var withOverlayShadow = !disableOverlay ? "0 1px 1px ".concat(N60A, ", 0 0 1px 0 ").concat(N60A) : '';
55
+ var selectedShadow = selected ? akEditorSelectedBoxShadow : '';
56
+ var shadow = [selectedShadow, withOverlayShadow].filter(Boolean).join(', ');
57
+ return shadow ? "box-shadow: ".concat(shadow, ";") : '';
58
+ };
59
+
60
+ export var CardImageContainer = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n position: relative;\n max-width: 100%;\n width: 100%;\n height: 100%;\n max-height: 100%;\n overflow: hidden;\n ", "\n"])), borderRadius);
61
+ var breakpointSizes = [[Breakpoint.SMALL, 599], [Breakpoint.LARGE, Infinity]];
62
+ export var calcBreakpointSize = function calcBreakpointSize() {
63
+ var wrapperWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
64
+
65
+ var _ref3 = breakpointSizes.find(function (_ref5) {
66
+ var _ref6 = _slicedToArray(_ref5, 2),
67
+ _breakpoint = _ref6[0],
68
+ limit = _ref6[1];
69
+
70
+ return wrapperWidth <= limit;
71
+ }) || [Breakpoint.SMALL],
72
+ _ref4 = _slicedToArray(_ref3, 1),
73
+ breakpoint = _ref4[0];
74
+
75
+ return breakpoint;
76
+ };
@@ -1,15 +1,18 @@
1
1
  import React from 'react';
2
2
  import { TitleBoxWrapper, ErrorMessageWrapper } from './styled';
3
3
  import EditorWarningIcon from '@atlaskit/icon/glyph/editor/warning';
4
+ import { messages } from '@atlaskit/media-ui';
4
5
  import { R300 } from '@atlaskit/theme/colors';
5
- import { getErrorMessage } from '../../../utils/getErrorMessage';
6
+ import { FormattedMessage } from 'react-intl';
6
7
  export var FailedTitleBox = function FailedTitleBox(_ref) {
7
- var breakpoint = _ref.breakpoint;
8
+ var breakpoint = _ref.breakpoint,
9
+ _ref$customMessage = _ref.customMessage,
10
+ customMessage = _ref$customMessage === void 0 ? messages.failed_to_load : _ref$customMessage;
8
11
  return /*#__PURE__*/React.createElement(TitleBoxWrapper, {
9
12
  breakpoint: breakpoint
10
13
  }, /*#__PURE__*/React.createElement(ErrorMessageWrapper, null, /*#__PURE__*/React.createElement(EditorWarningIcon, {
11
14
  label: 'Warning',
12
15
  size: 'small',
13
16
  primaryColor: R300
14
- }), getErrorMessage('error')));
17
+ }), /*#__PURE__*/React.createElement(FormattedMessage, customMessage)));
15
18
  };
@@ -3,7 +3,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
3
3
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5;
4
4
 
5
5
  import styled from 'styled-components';
6
- import { responsiveSettings, getTitleBoxHeight, Breakpoint } from '../common';
6
+ import { responsiveSettings, getTitleBoxHeight } from '../common';
7
+ import { Breakpoint } from '../Breakpoint';
7
8
  import { N0 } from '@atlaskit/theme/colors';
8
9
  import { rgba } from '../../../styles/mixins';
9
10
 
@@ -2,14 +2,6 @@ import { getMediaClientErrorReason, isRequestError } from '@atlaskit/media-clien
2
2
  import { ANALYTICS_MEDIA_CHANNEL } from '@atlaskit/media-common';
3
3
  import { createAndFireEvent } from '@atlaskit/analytics-next';
4
4
  import { isMediaCardError } from '../errors';
5
- export var RenderEventAction;
6
-
7
- (function (RenderEventAction) {
8
- RenderEventAction["COMMENCED"] = "commenced";
9
- RenderEventAction["SUCCEEDED"] = "succeeded";
10
- RenderEventAction["FAILED"] = "failed";
11
- })(RenderEventAction || (RenderEventAction = {}));
12
-
13
5
  export var getFileAttributes = function getFileAttributes(metadata, fileStatus) {
14
6
  return {
15
7
  fileMediatype: metadata.mediaType,
@@ -19,56 +11,49 @@ export var getFileAttributes = function getFileAttributes(metadata, fileStatus)
19
11
  fileStatus: fileStatus
20
12
  };
21
13
  };
22
- export var getRenderCommencedEventPayload = function getRenderCommencedEventPayload(fileAttributes) {
14
+ export var getRenderPreviewableCardPayload = function getRenderPreviewableCardPayload(fileAttributes) {
23
15
  return {
24
- eventType: 'operational',
25
- action: RenderEventAction.COMMENCED,
26
- actionSubject: 'mediaCardRender',
16
+ eventType: 'screen',
17
+ action: 'viewed',
18
+ actionSubject: 'mediaCardRenderScreen',
19
+ name: 'mediaCardRenderScreen',
27
20
  attributes: {
21
+ type: fileAttributes.fileMediatype,
28
22
  fileAttributes: fileAttributes
29
23
  }
30
24
  };
31
25
  };
32
- export var getRenderSucceededEventPayload = function getRenderSucceededEventPayload(fileAttributes) {
26
+ export var getRenderCommencedEventPayload = function getRenderCommencedEventPayload(fileAttributes, performanceAttributes) {
33
27
  return {
34
28
  eventType: 'operational',
35
- action: RenderEventAction.SUCCEEDED,
29
+ action: 'commenced',
36
30
  actionSubject: 'mediaCardRender',
37
31
  attributes: {
38
32
  fileAttributes: fileAttributes,
39
- status: 'success'
33
+ performanceAttributes: performanceAttributes
40
34
  }
41
35
  };
42
36
  };
43
- export var getFailedFileUriFailReason = function getFailedFileUriFailReason(fileStatus) {
44
- if (!fileStatus) {
45
- // This fail reason will come from a bug, most likely.
46
- return "unknown-uri";
47
- } else if (fileStatus === 'uploading') {
48
- return 'local-uri';
49
- }
50
-
51
- return 'remote-uri';
52
- };
53
- export var getRenderFailedFileUriPayload = function getRenderFailedFileUriPayload(fileAttributes) {
37
+ export var getRenderSucceededEventPayload = function getRenderSucceededEventPayload(fileAttributes, performanceAttributes) {
54
38
  return {
55
39
  eventType: 'operational',
56
- action: RenderEventAction.FAILED,
40
+ action: 'succeeded',
57
41
  actionSubject: 'mediaCardRender',
58
42
  attributes: {
59
43
  fileAttributes: fileAttributes,
60
- status: 'fail',
61
- failReason: getFailedFileUriFailReason(fileAttributes.fileStatus)
44
+ performanceAttributes: performanceAttributes,
45
+ status: 'success'
62
46
  }
63
47
  };
64
48
  };
65
- export var getRenderFailedExternalUriPayload = function getRenderFailedExternalUriPayload(fileAttributes) {
49
+ export var getRenderFailedExternalUriPayload = function getRenderFailedExternalUriPayload(fileAttributes, performanceAttributes) {
66
50
  return {
67
51
  eventType: 'operational',
68
- action: RenderEventAction.FAILED,
52
+ action: 'failed',
69
53
  actionSubject: 'mediaCardRender',
70
54
  attributes: {
71
55
  fileAttributes: fileAttributes,
56
+ performanceAttributes: performanceAttributes,
72
57
  status: 'fail',
73
58
  failReason: 'external-uri'
74
59
  }
@@ -104,13 +89,14 @@ export var getRenderErrorRequestMetadata = function getRenderErrorRequestMetadat
104
89
  return error.secondaryError.metadata;
105
90
  }
106
91
  };
107
- export var getRenderErrorEventPayload = function getRenderErrorEventPayload(fileAttributes, error) {
92
+ export var getRenderErrorEventPayload = function getRenderErrorEventPayload(fileAttributes, performanceAttributes, error) {
108
93
  return {
109
94
  eventType: 'operational',
110
- action: RenderEventAction.FAILED,
95
+ action: 'failed',
111
96
  actionSubject: 'mediaCardRender',
112
97
  attributes: {
113
98
  fileAttributes: fileAttributes,
99
+ performanceAttributes: performanceAttributes,
114
100
  status: 'fail',
115
101
  failReason: getRenderErrorFailReason(error),
116
102
  error: getRenderErrorErrorReason(error),
@@ -119,13 +105,14 @@ export var getRenderErrorEventPayload = function getRenderErrorEventPayload(file
119
105
  }
120
106
  };
121
107
  };
122
- export var getRenderFailedFileStatusPayload = function getRenderFailedFileStatusPayload(fileAttributes) {
108
+ export var getRenderFailedFileStatusPayload = function getRenderFailedFileStatusPayload(fileAttributes, performanceAttributes) {
123
109
  return {
124
110
  eventType: 'operational',
125
- action: RenderEventAction.FAILED,
111
+ action: 'failed',
126
112
  actionSubject: 'mediaCardRender',
127
113
  attributes: {
128
114
  fileAttributes: fileAttributes,
115
+ performanceAttributes: performanceAttributes,
129
116
  status: 'fail',
130
117
  failReason: 'failed-processing'
131
118
  }
@@ -20,7 +20,7 @@ export var canCompareDimension = function canCompareDimension(current, next) {
20
20
  return false;
21
21
  };
22
22
  export var isBigger = function isBigger(current, next) {
23
- if (canCompareDimension(current.width, next.width) && canCompareDimension(current.height, next.height)) {
23
+ if (!!current && !!next && canCompareDimension(current.width, next.width) && canCompareDimension(current.height, next.height)) {
24
24
  var nextIsHigher = parseInt("".concat(current.width), 10) < parseInt("".concat(next.width), 10);
25
25
  var nextIsWider = parseInt("".concat(current.height), 10) < parseInt("".concat(next.height), 10);
26
26
  return nextIsHigher || nextIsWider;
@@ -0,0 +1,3 @@
1
+ export default (function () {
2
+ return document;
3
+ });
@@ -20,4 +20,12 @@ export var getDataURIDimension = function getDataURIDimension(dimension, options
20
20
  }
21
21
 
22
22
  return defaultImageCardDimensions[dimension] * retinaFactor;
23
+ };
24
+ export var getRequestedDimensions = function getRequestedDimensions(options) {
25
+ var width = getDataURIDimension('width', options);
26
+ var height = getDataURIDimension('height', options);
27
+ return {
28
+ width: width,
29
+ height: height
30
+ };
23
31
  };
@@ -1,4 +1,4 @@
1
- import { isErrorFileState } from '@atlaskit/media-client';
1
+ import { isErrorFileState, isFileIdentifier } from '@atlaskit/media-client';
2
2
 
3
3
  var getProcessingStatusFromFileState = function getProcessingStatusFromFileState(status) {
4
4
  switch (status) {
@@ -13,8 +13,8 @@ var getProcessingStatusFromFileState = function getProcessingStatusFromFileState
13
13
  }
14
14
  };
15
15
 
16
- export var getFileDetails = function getFileDetails(state) {
17
- return !isErrorFileState(state) ? {
16
+ var getFileDetailsFromFileState = function getFileDetailsFromFileState(state) {
17
+ return {
18
18
  id: state.id,
19
19
  name: state.name,
20
20
  size: state.size,
@@ -22,7 +22,15 @@ export var getFileDetails = function getFileDetails(state) {
22
22
  createdAt: state.createdAt,
23
23
  mediaType: state.mediaType,
24
24
  processingStatus: getProcessingStatusFromFileState(state.status)
25
+ };
26
+ };
27
+
28
+ export var getFileDetails = function getFileDetails(identifier, fileState) {
29
+ return isFileIdentifier(identifier) ? fileState && !isErrorFileState(fileState) ? getFileDetailsFromFileState(fileState) : {
30
+ id: identifier.id
25
31
  } : {
26
- id: state.id
32
+ id: identifier.mediaItemType,
33
+ name: identifier.name || identifier.dataURI,
34
+ mediaType: 'image'
27
35
  };
28
36
  };
@@ -73,6 +73,12 @@ export var ObjectURLCache = /*#__PURE__*/function () {
73
73
  value: function set(key, value) {
74
74
  this.cache.set(key, value);
75
75
  }
76
+ }, {
77
+ key: "remove",
78
+ value: function remove(key) {
79
+ var removed = this.cache.remove(key);
80
+ removed && URL.revokeObjectURL(removed.dataURI);
81
+ }
76
82
  }]);
77
83
 
78
84
  return ObjectURLCache;
@@ -0,0 +1,6 @@
1
+ export function resizeModeToMediaImageProps(resizeMode) {
2
+ return {
3
+ crop: resizeMode === 'crop',
4
+ stretch: resizeMode === 'stretchy-fit'
5
+ };
6
+ }
@@ -5,7 +5,7 @@ export var shouldDisplayImageThumbnail = function shouldDisplayImageThumbnail(ca
5
5
  }
6
6
 
7
7
  if (dataURI) {
8
- return mediaItemType === 'external-image' || mimeType && isMimeTypeSupportedByBrowser(mimeType) || cardStatus === 'complete';
8
+ return mediaItemType === 'external-image' || mimeType && isMimeTypeSupportedByBrowser(mimeType) || cardStatus === 'complete' || cardStatus === 'loading-preview';
9
9
  }
10
10
 
11
11
  return false;
@@ -0,0 +1,31 @@
1
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
2
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
+ import VideoSnapshot from 'video-snapshot';
4
+ export var takeSnapshot = /*#__PURE__*/function () {
5
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(blob) {
6
+ var snapshooter, dataUri;
7
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
8
+ while (1) {
9
+ switch (_context.prev = _context.next) {
10
+ case 0:
11
+ snapshooter = new VideoSnapshot(blob);
12
+ _context.next = 3;
13
+ return snapshooter.takeSnapshot();
14
+
15
+ case 3:
16
+ dataUri = _context.sent;
17
+ snapshooter.end();
18
+ return _context.abrupt("return", dataUri);
19
+
20
+ case 6:
21
+ case "end":
22
+ return _context.stop();
23
+ }
24
+ }
25
+ }, _callee);
26
+ }));
27
+
28
+ return function takeSnapshot(_x) {
29
+ return _ref.apply(this, arguments);
30
+ };
31
+ }();
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "70.9.0",
3
+ "version": "72.0.0",
4
4
  "sideEffects": false
5
5
  }