@atlaskit/media-card 78.0.4 → 78.0.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/media-card
2
2
 
3
+ ## 78.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [#118216](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/118216)
8
+ [`b2f8064faf92d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b2f8064faf92d) -
9
+ Fixed logging of error events from file preview hook
10
+ - Updated dependencies
11
+
12
+ ## 78.0.5
13
+
14
+ ### Patch Changes
15
+
16
+ - [#119322](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/119322)
17
+ [`2f435f37f33e0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2f435f37f33e0) -
18
+ Allow alt text on image to be empty on decorative images to improve accessibility
19
+ - Updated dependencies
20
+
3
21
  ## 78.0.4
4
22
 
5
23
  ### Patch Changes
@@ -16,7 +16,7 @@ var _externalImageCard = require("./externalImageCard");
16
16
  var _fileCard = require("./fileCard");
17
17
  var _excluded = ["identifier"];
18
18
  var packageName = "@atlaskit/media-card";
19
- var packageVersion = "78.0.4";
19
+ var packageVersion = "78.0.6";
20
20
  var CardBase = exports.CardBase = function CardBase(_ref) {
21
21
  var identifier = _ref.identifier,
22
22
  otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
@@ -233,7 +233,7 @@ var CardViewBase = exports.CardViewBase = function CardViewBase(_ref) {
233
233
  })), renderImageRenderer && !!cardPreview && (0, _react.jsx)(_imageRenderer.ImageRenderer, {
234
234
  cardPreview: cardPreview,
235
235
  mediaType: (metadata === null || metadata === void 0 ? void 0 : metadata.mediaType) || 'unknown',
236
- alt: alt || name,
236
+ alt: alt !== null && alt !== void 0 ? alt : name,
237
237
  resizeMode: resizeMode,
238
238
  onDisplayImage: onDisplayImage,
239
239
  onImageLoad: handleOnImageLoad,
@@ -90,7 +90,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
90
90
  }(_react.default.Component);
91
91
  (0, _defineProperty2.default)(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
92
92
  var packageName = "@atlaskit/media-card";
93
- var packageVersion = "78.0.4";
93
+ var packageVersion = "78.0.6";
94
94
  var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
95
95
  packageVersion: packageVersion,
96
96
  packageName: packageName,
@@ -8,6 +8,7 @@ exports.ensureMediaCardError = exports.SsrPreviewError = exports.RemotePreviewEr
8
8
  exports.getFileStateErrorReason = getFileStateErrorReason;
9
9
  exports.getImageLoadPrimaryReason = void 0;
10
10
  exports.isImageLoadError = isImageLoadError;
11
+ exports.isKnownErrorType = isKnownErrorType;
11
12
  exports.isLocalPreviewError = void 0;
12
13
  exports.isMediaCardError = isMediaCardError;
13
14
  exports.isMediaFileStateError = isMediaFileStateError;
@@ -23,6 +24,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
23
24
  var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
24
25
  var _mediaClient = require("@atlaskit/media-client");
25
26
  var _mediaClientReact = require("@atlaskit/media-client-react");
27
+ var _mediaFilePreview = require("@atlaskit/media-file-preview");
26
28
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
27
29
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
28
30
  /**
@@ -145,6 +147,9 @@ var ImageLoadError = exports.ImageLoadError = /*#__PURE__*/function (_MediaCardE
145
147
  function isMediaCardError(err) {
146
148
  return err instanceof MediaCardError;
147
149
  }
150
+ function isKnownErrorType(err) {
151
+ return isMediaCardError(err) || (0, _mediaFilePreview.isMediaFilePreviewError)(err);
152
+ }
148
153
  var isLocalPreviewError = exports.isLocalPreviewError = function isLocalPreviewError(err) {
149
154
  return err instanceof LocalPreviewError;
150
155
  };
@@ -119,7 +119,7 @@ var MediaInlineCardLoader = exports.default = /*#__PURE__*/function (_React$Pure
119
119
  ErrorBoundary = _this$state.ErrorBoundary;
120
120
  var analyticsContext = {
121
121
  packageVersion: "@atlaskit/media-card",
122
- packageName: "78.0.4",
122
+ packageName: "78.0.6",
123
123
  componentName: 'mediaInlineCard',
124
124
  component: 'mediaInlineCard'
125
125
  };
@@ -99,14 +99,14 @@ var getRenderFailedExternalUriPayload = exports.getRenderFailedExternalUriPayloa
99
99
  };
100
100
  };
101
101
  var getRenderErrorFailReason = exports.getRenderErrorFailReason = function getRenderErrorFailReason(error) {
102
- if ((0, _errors.isMediaCardError)(error)) {
102
+ if ((0, _errors.isKnownErrorType)(error)) {
103
103
  return error.primaryReason;
104
104
  } else {
105
105
  return 'nativeError';
106
106
  }
107
107
  };
108
108
  var getRenderErrorErrorReason = exports.getRenderErrorErrorReason = function getRenderErrorErrorReason(error) {
109
- if ((0, _errors.isMediaCardError)(error) && error.secondaryError) {
109
+ if ((0, _errors.isKnownErrorType)(error) && error.secondaryError) {
110
110
  var mediaClientReason = (0, _errors.isMediaFileStateError)(error.secondaryError) ? (0, _errors.getFileStateErrorReason)(error.secondaryError) : (0, _mediaClient.getMediaClientErrorReason)(error.secondaryError);
111
111
  if (mediaClientReason !== 'unknown') {
112
112
  return mediaClientReason;
@@ -115,14 +115,14 @@ var getRenderErrorErrorReason = exports.getRenderErrorErrorReason = function get
115
115
  return 'nativeError';
116
116
  };
117
117
  var getRenderErrorErrorDetail = exports.getRenderErrorErrorDetail = function getRenderErrorErrorDetail(error) {
118
- if ((0, _errors.isMediaCardError)(error) && error.secondaryError) {
118
+ if ((0, _errors.isKnownErrorType)(error) && error.secondaryError) {
119
119
  return error.secondaryError.message;
120
120
  } else {
121
121
  return error.message;
122
122
  }
123
123
  };
124
124
  var getErrorTraceContext = exports.getErrorTraceContext = function getErrorTraceContext(error) {
125
- if ((0, _errors.isMediaCardError)(error) && !!error.secondaryError) {
125
+ if ((0, _errors.isKnownErrorType)(error) && !!error.secondaryError) {
126
126
  if ((0, _mediaClient.isRequestError)(error.secondaryError)) {
127
127
  var _error$secondaryError;
128
128
  return (_error$secondaryError = error.secondaryError.metadata) === null || _error$secondaryError === void 0 ? void 0 : _error$secondaryError.traceContext;
@@ -133,7 +133,7 @@ var getErrorTraceContext = exports.getErrorTraceContext = function getErrorTrace
133
133
  }
134
134
  };
135
135
  var getRenderErrorRequestMetadata = exports.getRenderErrorRequestMetadata = function getRenderErrorRequestMetadata(error) {
136
- if ((0, _errors.isMediaCardError)(error) && !!error.secondaryError) {
136
+ if ((0, _errors.isKnownErrorType)(error) && !!error.secondaryError) {
137
137
  if ((0, _mediaClient.isRequestError)(error.secondaryError)) {
138
138
  return error.secondaryError.metadata;
139
139
  } else if ((0, _errors.isMediaFileStateError)(error.secondaryError)) {
@@ -15,7 +15,7 @@ var _mediaClient = require("@atlaskit/media-client");
15
15
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16
16
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
17
17
  var packageName = "@atlaskit/media-card";
18
- var packageVersion = "78.0.4";
18
+ var packageVersion = "78.0.6";
19
19
  var concurrentExperience;
20
20
  var getExperience = function getExperience(id) {
21
21
  if (!concurrentExperience) {
@@ -7,7 +7,7 @@ import { IntlProvider, injectIntl } from 'react-intl-next';
7
7
  import { ExternalImageCard } from './externalImageCard';
8
8
  import { FileCard } from './fileCard';
9
9
  const packageName = "@atlaskit/media-card";
10
- const packageVersion = "78.0.4";
10
+ const packageVersion = "78.0.6";
11
11
  export const CardBase = ({
12
12
  identifier,
13
13
  ...otherProps
@@ -229,7 +229,7 @@ export const CardViewBase = ({
229
229
  })), renderImageRenderer && !!cardPreview && jsx(ImageRenderer, {
230
230
  cardPreview: cardPreview,
231
231
  mediaType: (metadata === null || metadata === void 0 ? void 0 : metadata.mediaType) || 'unknown',
232
- alt: alt || name,
232
+ alt: alt !== null && alt !== void 0 ? alt : name,
233
233
  resizeMode: resizeMode,
234
234
  onDisplayImage: onDisplayImage,
235
235
  onImageLoad: handleOnImageLoad,
@@ -66,7 +66,7 @@ class WrappedMediaCardAnalyticsErrorBoundary extends React.Component {
66
66
  }
67
67
  _defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
68
68
  const packageName = "@atlaskit/media-card";
69
- const packageVersion = "78.0.4";
69
+ const packageVersion = "78.0.6";
70
70
  const MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
71
71
  packageVersion,
72
72
  packageName,
@@ -1,5 +1,6 @@
1
1
  import { isPollingError as isMediaClientPollingError, isRateLimitedError as isMediaClientRateLimitedError } from '@atlaskit/media-client';
2
2
  import { MediaFileStateError } from '@atlaskit/media-client-react';
3
+ import { isMediaFilePreviewError } from '@atlaskit/media-file-preview';
3
4
  /**
4
5
  * Primary reason is logged through Data Portal.
5
6
  * Make sure all the values are whitelisted in Measure -> Event Regitry -> "mediaCardRender failed" event
@@ -92,6 +93,9 @@ export class ImageLoadError extends MediaCardError {
92
93
  export function isMediaCardError(err) {
93
94
  return err instanceof MediaCardError;
94
95
  }
96
+ export function isKnownErrorType(err) {
97
+ return isMediaCardError(err) || isMediaFilePreviewError(err);
98
+ }
95
99
  export const isLocalPreviewError = err => err instanceof LocalPreviewError;
96
100
  export const isRemotePreviewError = err => err instanceof RemotePreviewError;
97
101
  export const isUnsupportedLocalPreviewError = err => isMediaCardError(err) && err.primaryReason === 'local-preview-unsupported';
@@ -37,7 +37,7 @@ export default class MediaInlineCardLoader extends React.PureComponent {
37
37
  } = this.state;
38
38
  const analyticsContext = {
39
39
  packageVersion: "@atlaskit/media-card",
40
- packageName: "78.0.4",
40
+ packageName: "78.0.6",
41
41
  componentName: 'mediaInlineCard',
42
42
  component: 'mediaInlineCard'
43
43
  };
@@ -1,7 +1,7 @@
1
1
  import { getMediaClientErrorReason, isRequestError } from '@atlaskit/media-client';
2
2
  import { ANALYTICS_MEDIA_CHANNEL, sanitiseAnalyticsPayload } from '@atlaskit/media-common/analytics';
3
3
  import { createAndFireEvent } from '@atlaskit/analytics-next';
4
- import { isMediaCardError, getFileStateErrorReason, isMediaFileStateError } from '../../errors';
4
+ import { isKnownErrorType, getFileStateErrorReason, isMediaFileStateError } from '../../errors';
5
5
  export const getFileAttributes = (metadata, fileStatus) => ({
6
6
  fileMediatype: metadata.mediaType,
7
7
  fileMimetype: metadata.mimeType,
@@ -75,14 +75,14 @@ export const getRenderFailedExternalUriPayload = (fileAttributes, performanceAtt
75
75
  }
76
76
  });
77
77
  export const getRenderErrorFailReason = error => {
78
- if (isMediaCardError(error)) {
78
+ if (isKnownErrorType(error)) {
79
79
  return error.primaryReason;
80
80
  } else {
81
81
  return 'nativeError';
82
82
  }
83
83
  };
84
84
  export const getRenderErrorErrorReason = error => {
85
- if (isMediaCardError(error) && error.secondaryError) {
85
+ if (isKnownErrorType(error) && error.secondaryError) {
86
86
  const mediaClientReason = isMediaFileStateError(error.secondaryError) ? getFileStateErrorReason(error.secondaryError) : getMediaClientErrorReason(error.secondaryError);
87
87
  if (mediaClientReason !== 'unknown') {
88
88
  return mediaClientReason;
@@ -91,14 +91,14 @@ export const getRenderErrorErrorReason = error => {
91
91
  return 'nativeError';
92
92
  };
93
93
  export const getRenderErrorErrorDetail = error => {
94
- if (isMediaCardError(error) && error.secondaryError) {
94
+ if (isKnownErrorType(error) && error.secondaryError) {
95
95
  return error.secondaryError.message;
96
96
  } else {
97
97
  return error.message;
98
98
  }
99
99
  };
100
100
  export const getErrorTraceContext = error => {
101
- if (isMediaCardError(error) && !!error.secondaryError) {
101
+ if (isKnownErrorType(error) && !!error.secondaryError) {
102
102
  if (isRequestError(error.secondaryError)) {
103
103
  var _error$secondaryError;
104
104
  return (_error$secondaryError = error.secondaryError.metadata) === null || _error$secondaryError === void 0 ? void 0 : _error$secondaryError.traceContext;
@@ -109,7 +109,7 @@ export const getErrorTraceContext = error => {
109
109
  }
110
110
  };
111
111
  export const getRenderErrorRequestMetadata = error => {
112
- if (isMediaCardError(error) && !!error.secondaryError) {
112
+ if (isKnownErrorType(error) && !!error.secondaryError) {
113
113
  if (isRequestError(error.secondaryError)) {
114
114
  return error.secondaryError.metadata;
115
115
  } else if (isMediaFileStateError(error.secondaryError)) {
@@ -5,7 +5,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
5
5
  import { MediaCardError } from '../errors';
6
6
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
7
7
  const packageName = "@atlaskit/media-card";
8
- const packageVersion = "78.0.4";
8
+ const packageVersion = "78.0.6";
9
9
  let concurrentExperience;
10
10
  const getExperience = id => {
11
11
  if (!concurrentExperience) {
@@ -9,7 +9,7 @@ import { IntlProvider, injectIntl } from 'react-intl-next';
9
9
  import { ExternalImageCard } from './externalImageCard';
10
10
  import { FileCard } from './fileCard';
11
11
  var packageName = "@atlaskit/media-card";
12
- var packageVersion = "78.0.4";
12
+ var packageVersion = "78.0.6";
13
13
  export var CardBase = function CardBase(_ref) {
14
14
  var identifier = _ref.identifier,
15
15
  otherProps = _objectWithoutProperties(_ref, _excluded);
@@ -225,7 +225,7 @@ export var CardViewBase = function CardViewBase(_ref) {
225
225
  })), renderImageRenderer && !!cardPreview && jsx(ImageRenderer, {
226
226
  cardPreview: cardPreview,
227
227
  mediaType: (metadata === null || metadata === void 0 ? void 0 : metadata.mediaType) || 'unknown',
228
- alt: alt || name,
228
+ alt: alt !== null && alt !== void 0 ? alt : name,
229
229
  resizeMode: resizeMode,
230
230
  onDisplayImage: onDisplayImage,
231
231
  onImageLoad: handleOnImageLoad,
@@ -83,7 +83,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
83
83
  }(React.Component);
84
84
  _defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
85
85
  var packageName = "@atlaskit/media-card";
86
- var packageVersion = "78.0.4";
86
+ var packageVersion = "78.0.6";
87
87
  var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
88
88
  packageVersion: packageVersion,
89
89
  packageName: packageName,
@@ -9,6 +9,7 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
9
9
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
10
10
  import { isPollingError as isMediaClientPollingError, isRateLimitedError as isMediaClientRateLimitedError } from '@atlaskit/media-client';
11
11
  import { MediaFileStateError } from '@atlaskit/media-client-react';
12
+ import { isMediaFilePreviewError } from '@atlaskit/media-file-preview';
12
13
  /**
13
14
  * Primary reason is logged through Data Portal.
14
15
  * Make sure all the values are whitelisted in Measure -> Event Regitry -> "mediaCardRender failed" event
@@ -129,6 +130,9 @@ export var ImageLoadError = /*#__PURE__*/function (_MediaCardError4) {
129
130
  export function isMediaCardError(err) {
130
131
  return err instanceof MediaCardError;
131
132
  }
133
+ export function isKnownErrorType(err) {
134
+ return isMediaCardError(err) || isMediaFilePreviewError(err);
135
+ }
132
136
  export var isLocalPreviewError = function isLocalPreviewError(err) {
133
137
  return err instanceof LocalPreviewError;
134
138
  };
@@ -103,7 +103,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
103
103
  ErrorBoundary = _this$state.ErrorBoundary;
104
104
  var analyticsContext = {
105
105
  packageVersion: "@atlaskit/media-card",
106
- packageName: "78.0.4",
106
+ packageName: "78.0.6",
107
107
  componentName: 'mediaInlineCard',
108
108
  component: 'mediaInlineCard'
109
109
  };
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  import { getMediaClientErrorReason, isRequestError } from '@atlaskit/media-client';
5
5
  import { ANALYTICS_MEDIA_CHANNEL, sanitiseAnalyticsPayload } from '@atlaskit/media-common/analytics';
6
6
  import { createAndFireEvent } from '@atlaskit/analytics-next';
7
- import { isMediaCardError, getFileStateErrorReason, isMediaFileStateError } from '../../errors';
7
+ import { isKnownErrorType, getFileStateErrorReason, isMediaFileStateError } from '../../errors';
8
8
  export var getFileAttributes = function getFileAttributes(metadata, fileStatus) {
9
9
  return {
10
10
  fileMediatype: metadata.mediaType,
@@ -90,14 +90,14 @@ export var getRenderFailedExternalUriPayload = function getRenderFailedExternalU
90
90
  };
91
91
  };
92
92
  export var getRenderErrorFailReason = function getRenderErrorFailReason(error) {
93
- if (isMediaCardError(error)) {
93
+ if (isKnownErrorType(error)) {
94
94
  return error.primaryReason;
95
95
  } else {
96
96
  return 'nativeError';
97
97
  }
98
98
  };
99
99
  export var getRenderErrorErrorReason = function getRenderErrorErrorReason(error) {
100
- if (isMediaCardError(error) && error.secondaryError) {
100
+ if (isKnownErrorType(error) && error.secondaryError) {
101
101
  var mediaClientReason = isMediaFileStateError(error.secondaryError) ? getFileStateErrorReason(error.secondaryError) : getMediaClientErrorReason(error.secondaryError);
102
102
  if (mediaClientReason !== 'unknown') {
103
103
  return mediaClientReason;
@@ -106,14 +106,14 @@ export var getRenderErrorErrorReason = function getRenderErrorErrorReason(error)
106
106
  return 'nativeError';
107
107
  };
108
108
  export var getRenderErrorErrorDetail = function getRenderErrorErrorDetail(error) {
109
- if (isMediaCardError(error) && error.secondaryError) {
109
+ if (isKnownErrorType(error) && error.secondaryError) {
110
110
  return error.secondaryError.message;
111
111
  } else {
112
112
  return error.message;
113
113
  }
114
114
  };
115
115
  export var getErrorTraceContext = function getErrorTraceContext(error) {
116
- if (isMediaCardError(error) && !!error.secondaryError) {
116
+ if (isKnownErrorType(error) && !!error.secondaryError) {
117
117
  if (isRequestError(error.secondaryError)) {
118
118
  var _error$secondaryError;
119
119
  return (_error$secondaryError = error.secondaryError.metadata) === null || _error$secondaryError === void 0 ? void 0 : _error$secondaryError.traceContext;
@@ -124,7 +124,7 @@ export var getErrorTraceContext = function getErrorTraceContext(error) {
124
124
  }
125
125
  };
126
126
  export var getRenderErrorRequestMetadata = function getRenderErrorRequestMetadata(error) {
127
- if (isMediaCardError(error) && !!error.secondaryError) {
127
+ if (isKnownErrorType(error) && !!error.secondaryError) {
128
128
  if (isRequestError(error.secondaryError)) {
129
129
  return error.secondaryError.metadata;
130
130
  } else if (isMediaFileStateError(error.secondaryError)) {
@@ -8,7 +8,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
8
8
  import { MediaCardError } from '../errors';
9
9
  import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
10
10
  var packageName = "@atlaskit/media-card";
11
- var packageVersion = "78.0.4";
11
+ var packageVersion = "78.0.6";
12
12
  var concurrentExperience;
13
13
  var getExperience = function getExperience(id) {
14
14
  if (!concurrentExperience) {
@@ -40,6 +40,7 @@ export declare class ImageLoadError extends MediaCardError {
40
40
  constructor(source?: CardPreview['source']);
41
41
  }
42
42
  export declare function isMediaCardError(err: Error): err is MediaCardError;
43
+ export declare function isKnownErrorType(err: Error): boolean;
43
44
  export declare const isLocalPreviewError: (err: Error) => err is LocalPreviewError;
44
45
  export declare const isRemotePreviewError: (err: Error) => err is LocalPreviewError;
45
46
  export declare const isUnsupportedLocalPreviewError: (err: Error) => boolean;
@@ -40,6 +40,7 @@ export declare class ImageLoadError extends MediaCardError {
40
40
  constructor(source?: CardPreview['source']);
41
41
  }
42
42
  export declare function isMediaCardError(err: Error): err is MediaCardError;
43
+ export declare function isKnownErrorType(err: Error): boolean;
43
44
  export declare const isLocalPreviewError: (err: Error) => err is LocalPreviewError;
44
45
  export declare const isRemotePreviewError: (err: Error) => err is LocalPreviewError;
45
46
  export declare const isUnsupportedLocalPreviewError: (err: Error) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "78.0.4",
3
+ "version": "78.0.6",
4
4
  "description": "Includes all media card related components, CardView, CardViewSmall, Card...",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -43,7 +43,7 @@
43
43
  "@atlaskit/media-client": "^27.3.0",
44
44
  "@atlaskit/media-client-react": "^2.0.0",
45
45
  "@atlaskit/media-common": "^11.3.0",
46
- "@atlaskit/media-file-preview": "^0.5.0",
46
+ "@atlaskit/media-file-preview": "^0.6.0",
47
47
  "@atlaskit/media-svg": "^0.1.3",
48
48
  "@atlaskit/media-ui": "^25.10.0",
49
49
  "@atlaskit/media-viewer": "^48.6.0",
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/primitives": "^11.0.0",
52
52
  "@atlaskit/spinner": "^16.2.0",
53
53
  "@atlaskit/theme": "^12.11.0",
54
- "@atlaskit/tokens": "^1.53.0",
54
+ "@atlaskit/tokens": "^1.54.0",
55
55
  "@atlaskit/tooltip": "^18.5.0",
56
56
  "@atlaskit/ufo": "^0.2.0",
57
57
  "@atlaskit/ufo-interaction-ignore": "^1.1.0",