@atlaskit/media-card 78.2.4 → 78.4.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.
- package/CHANGELOG.md +24 -0
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/fileCard.js +4 -6
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/ui/tickBox/tickBoxWrapper.js +1 -1
- package/dist/cjs/card/ui/unhandledErrorCard/index.js +1 -2
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/mediaPerformanceObserver/mediaPerformanceObserver.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/fileCard.js +4 -6
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/ui/tickBox/tickBoxWrapper.js +1 -1
- package/dist/es2019/card/ui/unhandledErrorCard/index.js +1 -2
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/mediaPerformanceObserver/mediaPerformanceObserver.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/fileCard.js +4 -6
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/ui/tickBox/tickBoxWrapper.js +1 -1
- package/dist/esm/card/ui/unhandledErrorCard/index.js +1 -2
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/mediaPerformanceObserver/mediaPerformanceObserver.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/package.json +9 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @atlaskit/media-card
|
|
2
2
|
|
|
3
|
+
## 78.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#140915](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/140915)
|
|
8
|
+
[`36b5acc412af5`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/36b5acc412af5) -
|
|
9
|
+
Design system typography uplift
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 78.3.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- [#139803](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/139803)
|
|
20
|
+
[`573e2dccbc940`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/573e2dccbc940) -
|
|
21
|
+
Render SVG Images natively when overlay is disabled (no longer behind a featue flag)
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
3
27
|
## 78.2.4
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/dist/cjs/card/card.js
CHANGED
|
@@ -21,7 +21,7 @@ var _excluded = ["identifier"];
|
|
|
21
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
22
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
23
|
var packageName = "@atlaskit/media-card";
|
|
24
|
-
var packageVersion = "78.
|
|
24
|
+
var packageVersion = "78.4.0";
|
|
25
25
|
var CardBase = exports.CardBase = function CardBase(_ref) {
|
|
26
26
|
var identifier = _ref.identifier,
|
|
27
27
|
otherProps = (0, _objectWithoutProperties2.default)(_ref, _excluded);
|
|
@@ -10,7 +10,6 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
12
12
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
13
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
14
13
|
var _download = _interopRequireDefault(require("@atlaskit/icon/glyph/download"));
|
|
15
14
|
var _mediaClient = require("@atlaskit/media-client");
|
|
16
15
|
var _mediaClientReact = require("@atlaskit/media-client-react");
|
|
@@ -328,7 +327,7 @@ var FileCard = exports.FileCard = function FileCard(_ref) {
|
|
|
328
327
|
setShouldRenderSVG(false);
|
|
329
328
|
};
|
|
330
329
|
var onImageError = function onImageError(newCardPreview) {
|
|
331
|
-
if (metadata.mimeType === 'image/svg+xml'
|
|
330
|
+
if (metadata.mimeType === 'image/svg+xml') {
|
|
332
331
|
return;
|
|
333
332
|
}
|
|
334
333
|
onImageErrorBase(newCardPreview);
|
|
@@ -337,7 +336,7 @@ var FileCard = exports.FileCard = function FileCard(_ref) {
|
|
|
337
336
|
setPreviewDidRender(true);
|
|
338
337
|
};
|
|
339
338
|
var onImageLoad = function onImageLoad(newCardPreview) {
|
|
340
|
-
if (metadata.mimeType === 'image/svg+xml'
|
|
339
|
+
if (metadata.mimeType === 'image/svg+xml') {
|
|
341
340
|
return;
|
|
342
341
|
}
|
|
343
342
|
onImageLoadBase(newCardPreview);
|
|
@@ -470,9 +469,8 @@ var FileCard = exports.FileCard = function FileCard(_ref) {
|
|
|
470
469
|
* in order to avoid race conditions of the ViewportDector being unmounted before
|
|
471
470
|
* it is able to set isCardVisible to true.
|
|
472
471
|
*/
|
|
473
|
-
isCardVisible && metadata.mimeType === 'image/svg+xml' && disableOverlay
|
|
474
|
-
|
|
475
|
-
(0, _platformFeatureFlags.fg)('platform.media-card-svg-rendering_6tdbv')) {
|
|
472
|
+
isCardVisible && metadata.mimeType === 'image/svg+xml' && disableOverlay // SVG won't be supported when overlay is on
|
|
473
|
+
) {
|
|
476
474
|
setShouldRenderSVG(true);
|
|
477
475
|
}
|
|
478
476
|
}, [isCardVisible, disableOverlay, metadata.mimeType, finalStatus]);
|
|
@@ -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.
|
|
93
|
+
var packageVersion = "78.4.0";
|
|
94
94
|
|
|
95
95
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
96
96
|
var MediaCardAnalyticsErrorBoundary = (0, _mediaCommon.withMediaAnalyticsContext)({
|
|
@@ -23,7 +23,7 @@ var wrapperStyles = function wrapperStyles(selected) {
|
|
|
23
23
|
return (0, _react.css)(
|
|
24
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
25
25
|
_styles2.transition && (0, _styles2.transition)(), {
|
|
26
|
-
|
|
26
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
27
27
|
width: '14px',
|
|
28
28
|
height: '14px',
|
|
29
29
|
position: 'absolute',
|
|
@@ -14,7 +14,6 @@ var _react = require("react");
|
|
|
14
14
|
var _react2 = require("@emotion/react");
|
|
15
15
|
var _warning = _interopRequireDefault(require("@atlaskit/icon/glyph/editor/warning"));
|
|
16
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
17
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
18
17
|
var _mediaUi = require("@atlaskit/media-ui");
|
|
19
18
|
var _utils = require("../../../utils");
|
|
20
19
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
@@ -66,7 +65,7 @@ var wrapperStyles = function wrapperStyles() {
|
|
|
66
65
|
flexDirection: 'column',
|
|
67
66
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
68
67
|
p: {
|
|
69
|
-
|
|
68
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
70
69
|
textAlign: 'center',
|
|
71
70
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
72
71
|
display: shouldShowText(getConvertedDimension(dimensions)) ? 'block' : 'none'
|
|
@@ -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.
|
|
122
|
+
packageName: "78.4.0",
|
|
123
123
|
componentName: 'mediaInlineCard',
|
|
124
124
|
component: 'mediaInlineCard'
|
|
125
125
|
};
|
|
@@ -41,7 +41,7 @@ var createAndGetResourceObserver = function createAndGetResourceObserver() {
|
|
|
41
41
|
mediaClientId: clientId,
|
|
42
42
|
startedAt: entry.startTime - ((navigationTime === null || navigationTime === void 0 ? void 0 : navigationTime.domContentLoadedEventEnd) || 0),
|
|
43
43
|
featureFlags: {
|
|
44
|
-
|
|
44
|
+
'media-cdn-single-host': (0, _platformFeatureFlags.fg)('platform.media-cdn-single-host')
|
|
45
45
|
},
|
|
46
46
|
/**
|
|
47
47
|
* Performance resource timing data regarding the loading of an
|
|
@@ -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.
|
|
18
|
+
var packageVersion = "78.4.0";
|
|
19
19
|
var concurrentExperience;
|
|
20
20
|
var getExperience = function getExperience(id) {
|
|
21
21
|
if (!concurrentExperience) {
|
package/dist/es2019/card/card.js
CHANGED
|
@@ -9,7 +9,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
|
|
|
9
9
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
10
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
11
|
const packageName = "@atlaskit/media-card";
|
|
12
|
-
const packageVersion = "78.
|
|
12
|
+
const packageVersion = "78.4.0";
|
|
13
13
|
export const CardBase = ({
|
|
14
14
|
identifier,
|
|
15
15
|
...otherProps
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import DownloadIcon from '@atlaskit/icon/glyph/download';
|
|
4
3
|
import { globalMediaEventEmitter, RECENTS_COLLECTION, imageResizeModeToFileImageMode, isProcessedFileState } from '@atlaskit/media-client';
|
|
5
4
|
import { MediaFileStateError, useFileState, useMediaClient } from '@atlaskit/media-client-react';
|
|
@@ -279,7 +278,7 @@ export const FileCard = ({
|
|
|
279
278
|
setShouldRenderSVG(false);
|
|
280
279
|
};
|
|
281
280
|
const onImageError = newCardPreview => {
|
|
282
|
-
if (metadata.mimeType === 'image/svg+xml'
|
|
281
|
+
if (metadata.mimeType === 'image/svg+xml') {
|
|
283
282
|
return;
|
|
284
283
|
}
|
|
285
284
|
onImageErrorBase(newCardPreview);
|
|
@@ -288,7 +287,7 @@ export const FileCard = ({
|
|
|
288
287
|
setPreviewDidRender(true);
|
|
289
288
|
};
|
|
290
289
|
const onImageLoad = newCardPreview => {
|
|
291
|
-
if (metadata.mimeType === 'image/svg+xml'
|
|
290
|
+
if (metadata.mimeType === 'image/svg+xml') {
|
|
292
291
|
return;
|
|
293
292
|
}
|
|
294
293
|
onImageLoadBase(newCardPreview);
|
|
@@ -422,9 +421,8 @@ export const FileCard = ({
|
|
|
422
421
|
* in order to avoid race conditions of the ViewportDector being unmounted before
|
|
423
422
|
* it is able to set isCardVisible to true.
|
|
424
423
|
*/
|
|
425
|
-
isCardVisible && metadata.mimeType === 'image/svg+xml' && disableOverlay
|
|
426
|
-
|
|
427
|
-
fg('platform.media-card-svg-rendering_6tdbv')) {
|
|
424
|
+
isCardVisible && metadata.mimeType === 'image/svg+xml' && disableOverlay // SVG won't be supported when overlay is on
|
|
425
|
+
) {
|
|
428
426
|
setShouldRenderSVG(true);
|
|
429
427
|
}
|
|
430
428
|
}, [isCardVisible, disableOverlay, metadata.mimeType, finalStatus]);
|
|
@@ -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.
|
|
69
|
+
const packageVersion = "78.4.0";
|
|
70
70
|
|
|
71
71
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
72
72
|
const MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
@@ -14,7 +14,7 @@ const getSelectedStyles = selected => selected ? `background-color: ${`var(--ds-
|
|
|
14
14
|
const wrapperStyles = selected => css(
|
|
15
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
16
16
|
transition && transition(), {
|
|
17
|
-
|
|
17
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
18
18
|
width: '14px',
|
|
19
19
|
height: '14px',
|
|
20
20
|
position: 'absolute',
|
|
@@ -7,7 +7,6 @@ import { Component } from 'react';
|
|
|
7
7
|
import { css, jsx } from '@emotion/react';
|
|
8
8
|
import WarningIcon from '@atlaskit/icon/glyph/editor/warning';
|
|
9
9
|
import { N20, N800, Y500 } from '@atlaskit/theme/colors';
|
|
10
|
-
import { fontSize } from '@atlaskit/theme/constants';
|
|
11
10
|
import { center, borderRadius } from '@atlaskit/media-ui';
|
|
12
11
|
import { defaultImageCardDimensions } from '../../../utils';
|
|
13
12
|
const isPercentage = value => /^\d+(\.\d+)?%$/.test(value);
|
|
@@ -52,7 +51,7 @@ const wrapperStyles = (dimensions = defaultImageCardDimensions) => {
|
|
|
52
51
|
flexDirection: 'column',
|
|
53
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
54
53
|
p: {
|
|
55
|
-
|
|
54
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
56
55
|
textAlign: 'center',
|
|
57
56
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
58
57
|
display: shouldShowText(getConvertedDimension(dimensions)) ? 'block' : 'none'
|
|
@@ -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.
|
|
40
|
+
packageName: "78.4.0",
|
|
41
41
|
componentName: 'mediaInlineCard',
|
|
42
42
|
component: 'mediaInlineCard'
|
|
43
43
|
};
|
|
@@ -35,7 +35,7 @@ const createAndGetResourceObserver = () => {
|
|
|
35
35
|
mediaClientId: clientId,
|
|
36
36
|
startedAt: entry.startTime - ((navigationTime === null || navigationTime === void 0 ? void 0 : navigationTime.domContentLoadedEventEnd) || 0),
|
|
37
37
|
featureFlags: {
|
|
38
|
-
|
|
38
|
+
'media-cdn-single-host': fg('platform.media-cdn-single-host')
|
|
39
39
|
},
|
|
40
40
|
/**
|
|
41
41
|
* Performance resource timing data regarding the loading of an
|
|
@@ -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.
|
|
8
|
+
const packageVersion = "78.4.0";
|
|
9
9
|
let concurrentExperience;
|
|
10
10
|
const getExperience = id => {
|
|
11
11
|
if (!concurrentExperience) {
|
package/dist/esm/card/card.js
CHANGED
|
@@ -11,7 +11,7 @@ import { startResourceObserver, setAnalyticsContext } from '../utils/mediaPerfor
|
|
|
11
11
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
13
|
var packageName = "@atlaskit/media-card";
|
|
14
|
-
var packageVersion = "78.
|
|
14
|
+
var packageVersion = "78.4.0";
|
|
15
15
|
export var CardBase = function CardBase(_ref) {
|
|
16
16
|
var identifier = _ref.identifier,
|
|
17
17
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
@@ -4,7 +4,6 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
|
4
4
|
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; }
|
|
5
5
|
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) { _defineProperty(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; }
|
|
6
6
|
import { useAnalyticsEvents } from '@atlaskit/analytics-next';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
8
7
|
import DownloadIcon from '@atlaskit/icon/glyph/download';
|
|
9
8
|
import { globalMediaEventEmitter, RECENTS_COLLECTION, imageResizeModeToFileImageMode, isProcessedFileState } from '@atlaskit/media-client';
|
|
10
9
|
import { MediaFileStateError, useFileState, useMediaClient } from '@atlaskit/media-client-react';
|
|
@@ -319,7 +318,7 @@ export var FileCard = function FileCard(_ref) {
|
|
|
319
318
|
setShouldRenderSVG(false);
|
|
320
319
|
};
|
|
321
320
|
var onImageError = function onImageError(newCardPreview) {
|
|
322
|
-
if (metadata.mimeType === 'image/svg+xml'
|
|
321
|
+
if (metadata.mimeType === 'image/svg+xml') {
|
|
323
322
|
return;
|
|
324
323
|
}
|
|
325
324
|
onImageErrorBase(newCardPreview);
|
|
@@ -328,7 +327,7 @@ export var FileCard = function FileCard(_ref) {
|
|
|
328
327
|
setPreviewDidRender(true);
|
|
329
328
|
};
|
|
330
329
|
var onImageLoad = function onImageLoad(newCardPreview) {
|
|
331
|
-
if (metadata.mimeType === 'image/svg+xml'
|
|
330
|
+
if (metadata.mimeType === 'image/svg+xml') {
|
|
332
331
|
return;
|
|
333
332
|
}
|
|
334
333
|
onImageLoadBase(newCardPreview);
|
|
@@ -461,9 +460,8 @@ export var FileCard = function FileCard(_ref) {
|
|
|
461
460
|
* in order to avoid race conditions of the ViewportDector being unmounted before
|
|
462
461
|
* it is able to set isCardVisible to true.
|
|
463
462
|
*/
|
|
464
|
-
isCardVisible && metadata.mimeType === 'image/svg+xml' && disableOverlay
|
|
465
|
-
|
|
466
|
-
fg('platform.media-card-svg-rendering_6tdbv')) {
|
|
463
|
+
isCardVisible && metadata.mimeType === 'image/svg+xml' && disableOverlay // SVG won't be supported when overlay is on
|
|
464
|
+
) {
|
|
467
465
|
setShouldRenderSVG(true);
|
|
468
466
|
}
|
|
469
467
|
}, [isCardVisible, disableOverlay, metadata.mimeType, finalStatus]);
|
|
@@ -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.
|
|
86
|
+
var packageVersion = "78.4.0";
|
|
87
87
|
|
|
88
88
|
// @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
|
|
89
89
|
var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
|
|
@@ -16,7 +16,7 @@ var wrapperStyles = function wrapperStyles(selected) {
|
|
|
16
16
|
return css(
|
|
17
17
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
18
|
transition && transition(), {
|
|
19
|
-
|
|
19
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
20
20
|
width: '14px',
|
|
21
21
|
height: '14px',
|
|
22
22
|
position: 'absolute',
|
|
@@ -14,7 +14,6 @@ import { Component } from 'react';
|
|
|
14
14
|
import { css, jsx } from '@emotion/react';
|
|
15
15
|
import WarningIcon from '@atlaskit/icon/glyph/editor/warning';
|
|
16
16
|
import { N20, N800, Y500 } from '@atlaskit/theme/colors';
|
|
17
|
-
import { fontSize } from '@atlaskit/theme/constants';
|
|
18
17
|
import { center, borderRadius } from '@atlaskit/media-ui';
|
|
19
18
|
import { defaultImageCardDimensions } from '../../../utils';
|
|
20
19
|
var isPercentage = function isPercentage(value) {
|
|
@@ -61,7 +60,7 @@ var wrapperStyles = function wrapperStyles() {
|
|
|
61
60
|
flexDirection: 'column',
|
|
62
61
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
63
62
|
p: {
|
|
64
|
-
|
|
63
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
|
|
65
64
|
textAlign: 'center',
|
|
66
65
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
67
66
|
display: shouldShowText(getConvertedDimension(dimensions)) ? 'block' : 'none'
|
|
@@ -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.
|
|
106
|
+
packageName: "78.4.0",
|
|
107
107
|
componentName: 'mediaInlineCard',
|
|
108
108
|
component: 'mediaInlineCard'
|
|
109
109
|
};
|
|
@@ -35,7 +35,7 @@ var createAndGetResourceObserver = function createAndGetResourceObserver() {
|
|
|
35
35
|
mediaClientId: clientId,
|
|
36
36
|
startedAt: entry.startTime - ((navigationTime === null || navigationTime === void 0 ? void 0 : navigationTime.domContentLoadedEventEnd) || 0),
|
|
37
37
|
featureFlags: {
|
|
38
|
-
|
|
38
|
+
'media-cdn-single-host': fg('platform.media-cdn-single-host')
|
|
39
39
|
},
|
|
40
40
|
/**
|
|
41
41
|
* Performance resource timing data regarding the loading of an
|
|
@@ -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.
|
|
11
|
+
var packageVersion = "78.4.0";
|
|
12
12
|
var concurrentExperience;
|
|
13
13
|
var getExperience = function getExperience(id) {
|
|
14
14
|
if (!concurrentExperience) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "78.
|
|
3
|
+
"version": "78.4.0",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
"@atlaskit/analytics-next": "^10.1.0",
|
|
39
39
|
"@atlaskit/dropdown-menu": "^12.18.0",
|
|
40
40
|
"@atlaskit/editor-shared-styles": "^2.13.0",
|
|
41
|
-
"@atlaskit/icon": "^22.
|
|
42
|
-
"@atlaskit/media-client": "^
|
|
41
|
+
"@atlaskit/icon": "^22.18.0",
|
|
42
|
+
"@atlaskit/media-client": "^28.0.0",
|
|
43
43
|
"@atlaskit/media-client-react": "^2.2.0",
|
|
44
44
|
"@atlaskit/media-common": "^11.4.0",
|
|
45
|
-
"@atlaskit/media-file-preview": "^0.
|
|
45
|
+
"@atlaskit/media-file-preview": "^0.9.0",
|
|
46
46
|
"@atlaskit/media-svg": "^0.2.0",
|
|
47
|
-
"@atlaskit/media-ui": "^25.
|
|
48
|
-
"@atlaskit/media-viewer": "^48.
|
|
47
|
+
"@atlaskit/media-ui": "^25.12.0",
|
|
48
|
+
"@atlaskit/media-viewer": "^48.9.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^0.3.0",
|
|
50
50
|
"@atlaskit/primitives": "^12.1.0",
|
|
51
51
|
"@atlaskit/spinner": "^16.3.0",
|
|
52
52
|
"@atlaskit/theme": "^13.0.0",
|
|
53
|
-
"@atlaskit/tokens": "^1.
|
|
53
|
+
"@atlaskit/tokens": "^1.60.0",
|
|
54
54
|
"@atlaskit/tooltip": "^18.7.0",
|
|
55
55
|
"@atlaskit/ufo": "^0.3.0",
|
|
56
56
|
"@atlaskit/ufo-interaction-ignore": "^1.3.0",
|
|
@@ -75,10 +75,10 @@
|
|
|
75
75
|
"@atlaskit/form": "^10.5.0",
|
|
76
76
|
"@atlaskit/inline-message": "^12.3.0",
|
|
77
77
|
"@atlaskit/media-core": "^34.3.0",
|
|
78
|
-
"@atlaskit/media-picker": "^66.
|
|
78
|
+
"@atlaskit/media-picker": "^66.6.0",
|
|
79
79
|
"@atlaskit/media-state": "^1.1.0",
|
|
80
80
|
"@atlaskit/media-test-data": "^2.6.0",
|
|
81
|
-
"@atlaskit/media-test-helpers": "^34.
|
|
81
|
+
"@atlaskit/media-test-helpers": "^34.3.0",
|
|
82
82
|
"@atlaskit/radio": "^6.5.0",
|
|
83
83
|
"@atlaskit/range": "^7.4.0",
|
|
84
84
|
"@atlaskit/ssr": "*",
|
|
@@ -103,9 +103,6 @@
|
|
|
103
103
|
"wait-for-expect": "^1.2.0"
|
|
104
104
|
},
|
|
105
105
|
"platform-feature-flags": {
|
|
106
|
-
"platform.media-card-svg-rendering_6tdbv": {
|
|
107
|
-
"type": "boolean"
|
|
108
|
-
},
|
|
109
106
|
"platform.media-card-performance-observer_a803k": {
|
|
110
107
|
"type": "boolean"
|
|
111
108
|
},
|