@atlaskit/media-card 81.12.7 → 81.12.9

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 (91) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/card/card.js +1 -1
  3. package/dist/cjs/card/cardLoader.js +1 -1
  4. package/dist/cjs/card/cardWithMediaClient.js +3 -3
  5. package/dist/cjs/card/fileCard.js +2 -2
  6. package/dist/cjs/card/fireOperationalEvent.js +1 -1
  7. package/dist/cjs/card/inlinePlayerWrapper-compiled.js +3 -3
  8. package/dist/cjs/card/inlinePlayerWrapperStyles.js +1 -1
  9. package/dist/cjs/card/media-card-analytics-error-boundary.js +3 -3
  10. package/dist/cjs/card/svgView/svgViewV2.js +2 -2
  11. package/dist/cjs/card/ui/actionsBar/cardActions/cardActionIconButton.js +1 -1
  12. package/dist/cjs/card/ui/actionsBar/cardActions/cardActionsDropdownMenu.js +3 -3
  13. package/dist/cjs/card/ui/imageRenderer/imageRenderer.js +1 -1
  14. package/dist/cjs/card/ui/imageRenderer/index.js +1 -1
  15. package/dist/cjs/card/ui/playButton/playButton.js +1 -1
  16. package/dist/cjs/card/ui/wrapper/wrapper-compiled.js +2 -2
  17. package/dist/cjs/ensureMediaCardError.js +1 -1
  18. package/dist/cjs/inline/loader.js +2 -2
  19. package/dist/cjs/utils/lightCards/cardError.js +1 -1
  20. package/dist/cjs/utils/ufoExperiences.js +1 -1
  21. package/dist/es2019/card/card.js +1 -1
  22. package/dist/es2019/card/cardLoader.js +1 -1
  23. package/dist/es2019/card/cardWithMediaClient.js +3 -3
  24. package/dist/es2019/card/fileCard.js +2 -2
  25. package/dist/es2019/card/fireOperationalEvent.js +2 -1
  26. package/dist/es2019/card/inlinePlayerWrapper-compiled.js +3 -3
  27. package/dist/es2019/card/inlinePlayerWrapperStyles.js +1 -1
  28. package/dist/es2019/card/media-card-analytics-error-boundary.js +3 -3
  29. package/dist/es2019/card/svgView/svgViewV2.js +4 -3
  30. package/dist/es2019/card/ui/actionsBar/cardActions/cardActionButton-compiled.js +1 -0
  31. package/dist/es2019/card/ui/actionsBar/cardActions/cardActionIconButton.js +1 -1
  32. package/dist/es2019/card/ui/actionsBar/cardActions/cardActionsDropdownMenu.js +3 -3
  33. package/dist/es2019/card/ui/imageRenderer/imageRenderer.js +1 -1
  34. package/dist/es2019/card/ui/imageRenderer/index.js +1 -1
  35. package/dist/es2019/card/ui/playButton/playButton.js +1 -1
  36. package/dist/es2019/card/ui/playButton/playButtonBackground.js +1 -0
  37. package/dist/es2019/card/ui/wrapper/wrapper-compiled.js +2 -2
  38. package/dist/es2019/ensureMediaCardError.js +1 -1
  39. package/dist/es2019/inline/loader.js +2 -2
  40. package/dist/es2019/inline/mediaInlineCardAnalytics.js +1 -0
  41. package/dist/es2019/utils/getMediaCardCursor.js +1 -0
  42. package/dist/es2019/utils/lightCards/cardError.js +1 -1
  43. package/dist/es2019/utils/lightCards/errorIcon/index.js +2 -1
  44. package/dist/es2019/utils/lightCards/errorIcon/styles.js +0 -1
  45. package/dist/es2019/utils/lightCards/lightCardWrappers.js +1 -0
  46. package/dist/es2019/utils/ufoExperiences.js +1 -1
  47. package/dist/esm/card/card.js +1 -1
  48. package/dist/esm/card/cardLoader.js +1 -1
  49. package/dist/esm/card/cardWithMediaClient.js +3 -3
  50. package/dist/esm/card/fileCard.js +2 -2
  51. package/dist/esm/card/fireOperationalEvent.js +2 -1
  52. package/dist/esm/card/inlinePlayerWrapper-compiled.js +3 -3
  53. package/dist/esm/card/inlinePlayerWrapperStyles.js +1 -1
  54. package/dist/esm/card/media-card-analytics-error-boundary.js +3 -3
  55. package/dist/esm/card/svgView/svgViewV2.js +4 -3
  56. package/dist/esm/card/ui/actionsBar/cardActions/cardActionButton-compiled.js +1 -0
  57. package/dist/esm/card/ui/actionsBar/cardActions/cardActionIconButton.js +1 -1
  58. package/dist/esm/card/ui/actionsBar/cardActions/cardActionsDropdownMenu.js +3 -3
  59. package/dist/esm/card/ui/imageRenderer/imageRenderer.js +1 -1
  60. package/dist/esm/card/ui/imageRenderer/index.js +1 -1
  61. package/dist/esm/card/ui/playButton/playButton.js +1 -1
  62. package/dist/esm/card/ui/playButton/playButtonBackground.js +1 -0
  63. package/dist/esm/card/ui/wrapper/wrapper-compiled.js +2 -2
  64. package/dist/esm/ensureMediaCardError.js +1 -1
  65. package/dist/esm/inline/loader.js +2 -2
  66. package/dist/esm/inline/mediaInlineCardAnalytics.js +1 -0
  67. package/dist/esm/utils/getMediaCardCursor.js +1 -0
  68. package/dist/esm/utils/lightCards/cardError.js +1 -1
  69. package/dist/esm/utils/lightCards/errorIcon/index.js +2 -1
  70. package/dist/esm/utils/lightCards/errorIcon/styles.js +0 -1
  71. package/dist/esm/utils/lightCards/lightCardWrappers.js +1 -0
  72. package/dist/esm/utils/ufoExperiences.js +1 -1
  73. package/dist/types/card/inlinePlayerWrapper-compiled.d.ts +4 -0
  74. package/dist/types/card/media-card-analytics-error-boundary.d.ts +1 -1
  75. package/dist/types/card/ui/actionsBar/cardActions/styles.d.ts +1 -1
  76. package/dist/types/card/ui/aiBorder/aiBorder.d.ts +4 -0
  77. package/dist/types/card/ui/imageRenderer/wrapper.d.ts +4 -0
  78. package/dist/types/card/ui/titleBox/types.d.ts +1 -1
  79. package/dist/types/card/ui/wrapper/types.d.ts +1 -1
  80. package/dist/types/inline/mediaInlineAnalyticsErrorBoundary.d.ts +1 -1
  81. package/dist/types/types.d.ts +1 -1
  82. package/dist/types/utils/getMediaCardCursor.d.ts +1 -1
  83. package/dist/types/utils/lightCards/types.d.ts +1 -1
  84. package/example-helpers/cardViewWrapper.tsx +2 -0
  85. package/example-helpers/cards.tsx +3 -3
  86. package/example-helpers/developmentUseMessage.tsx +1 -0
  87. package/example-helpers/index.tsx +3 -3
  88. package/example-helpers/selectableCard.tsx +3 -1
  89. package/example-helpers/ssrHelpers.tsx +2 -0
  90. package/example-helpers/styles.ts +2 -1
  91. package/package.json +6 -5
@@ -12,7 +12,7 @@ import { extractErrorInfo } from './analytics/extractErrorInfo';
12
12
  import { getRenderErrorRequestMetadata } from './analytics/getRenderErrorRequestMetadata';
13
13
  import { getMediaGlobalScope } from './globalScope/getMediaGlobalScope';
14
14
  const packageName = "@atlaskit/media-card";
15
- const packageVersion = "81.12.6";
15
+ const packageVersion = "81.12.8";
16
16
  const SAMPLE_RATE = 0.05;
17
17
 
18
18
  /**
@@ -2,7 +2,7 @@ import { injectIntl } from 'react-intl';
2
2
  import { withMediaAnalyticsContext } from '@atlaskit/media-common';
3
3
  import { CardWithPerformanceObserver } from './CardWithPerformanceObserver';
4
4
  var packageName = "@atlaskit/media-card";
5
- var packageVersion = "81.12.6";
5
+ var packageVersion = "81.12.8";
6
6
  export var Card = withMediaAnalyticsContext({
7
7
  packageVersion: packageVersion,
8
8
  packageName: packageName,
@@ -2,8 +2,8 @@ import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { Suspense, useContext } from 'react';
3
3
  import Loadable from 'react-loadable';
4
4
  import { fg } from '@atlaskit/platform-feature-flags/fg';
5
- import { CardLoading } from '../utils/lightCards/cardLoading';
6
5
  import UFOSegment from '@atlaskit/react-ufo/ufo-segment';
6
+ import { CardLoading } from '../utils/lightCards/cardLoading';
7
7
  var MediaCardContext = /*#__PURE__*/React.createContext({});
8
8
  var CardLoadingWithContext = function CardLoadingWithContext() {
9
9
  var props = useContext(MediaCardContext);
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { withMediaClientAndSettings } from '@atlaskit/media-client-react/with-media-client-and-settings';
3
2
  import { withMediaClient } from '@atlaskit/media-client-react/with-media-client';
4
- import MediaCardAnalyticsErrorBoundary from './media-card-analytics-error-boundary';
5
- import { Card as InternalCard } from './card';
3
+ import { withMediaClientAndSettings } from '@atlaskit/media-client-react/with-media-client-and-settings';
6
4
  import { fg } from '@atlaskit/platform-feature-flags/fg';
5
+ import { Card as InternalCard } from './card';
6
+ import MediaCardAnalyticsErrorBoundary from './media-card-analytics-error-boundary';
7
7
  export var CardWithMediaClient = function CardWithMediaClient(props) {
8
8
  var dimensions = props.dimensions,
9
9
  onClick = props.onClick;
@@ -22,12 +22,12 @@ import { fg } from '@atlaskit/platform-feature-flags/fg';
22
22
  import { getActiveTrace } from '@atlaskit/react-ufo/get-active-trace';
23
23
  import usePressTracing from '@atlaskit/react-ufo/use-press-tracing';
24
24
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
25
- import { MediaCardError } from '../MediaCardError';
26
25
  import { DateOverrideContext } from '../dateOverrideContext';
27
26
  import { isSSRPreview } from '../isSSRPreview';
27
+ import { MediaCardError } from '../MediaCardError';
28
28
  import { fireMediaCardEvent } from '../utils/analytics/fireMediaCardEvent';
29
- import { getAuthProviderSucceededPayload } from '../utils/analytics/getAuthProviderSucceededPayload';
30
29
  import { getAuthProviderFailedPayload } from '../utils/analytics/getAuthProviderFailedPayload';
30
+ import { getAuthProviderSucceededPayload } from '../utils/analytics/getAuthProviderSucceededPayload';
31
31
  import { getDefaultCardDimensions } from '../utils/cardDimensions';
32
32
  import { generateUniqueId } from '../utils/generateUniqueId';
33
33
  import { getMediaCardCursor } from '../utils/getMediaCardCursor';
@@ -1,9 +1,10 @@
1
1
  import { fg } from '@atlaskit/platform-feature-flags/fg';
2
2
  import { MediaCardError } from '../MediaCardError';
3
3
  import { fireMediaCardEvent } from '../utils/analytics/fireMediaCardEvent';
4
- import { getRenderSucceededEventPayload } from '../utils/analytics/getRenderSucceededEventPayload';
5
4
  import { getRenderErrorEventPayload } from '../utils/analytics/getRenderErrorEventPayload';
6
5
  import { getRenderFailedFileStatusPayload } from '../utils/analytics/getRenderFailedFileStatusPayload';
6
+ import { getRenderSucceededEventPayload } from '../utils/analytics/getRenderSucceededEventPayload';
7
+
7
8
  // Sampling rate for mediaCardRender success events (10%)
8
9
  var MEDIA_CARD_RENDER_SUCCESS_SAMPLE_RATE = 0.1;
9
10
  export var fireOperationalEvent = function fireOperationalEvent(createAnalyticsEvent, status, fileAttributes, performanceAttributes, ssrReliability) {
@@ -4,10 +4,10 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import "./inlinePlayerWrapper-compiled.compiled.css";
5
5
  import * as React from 'react';
6
6
  import { ax, ix } from "@compiled/react/runtime";
7
- import { getDimensionsWithDefault } from '../utils/lightCards/getDimensionsWithDefault';
8
- import { VcMediaWrapperProps } from '@atlaskit/react-ufo/vc-media';
9
- import UFOCustomData from '@atlaskit/react-ufo/custom-data';
10
7
  import { fg } from '@atlaskit/platform-feature-flags/fg';
8
+ import UFOCustomData from '@atlaskit/react-ufo/custom-data';
9
+ import { VcMediaWrapperProps } from '@atlaskit/react-ufo/vc-media';
10
+ import { getDimensionsWithDefault } from '../utils/lightCards/getDimensionsWithDefault';
11
11
  var hideNativeBrowserTextSelectionStyles = null;
12
12
  var selectedBorderStyle = null;
13
13
 
@@ -2,8 +2,8 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  var _templateObject;
3
3
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
4
4
  import { css } from '@emotion/react';
5
- import { getDimensionsWithDefault } from '../utils/lightCards/getDimensionsWithDefault';
6
5
  import { getSelectionStyles, SelectionStyle, hideNativeBrowserTextSelectionStyles } from '@atlaskit/editor-shared-styles/selection';
6
+ import { getDimensionsWithDefault } from '../utils/lightCards/getDimensionsWithDefault';
7
7
  /*
8
8
  * Used to display the blue border around a selected card without
9
9
  * shrinking the image OR growing the card size
@@ -9,10 +9,10 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
9
9
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
10
10
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
11
  import React from 'react';
12
- import { withMediaAnalyticsContext } from '@atlaskit/media-common';
13
- import { UnhandledErrorCard } from './ui/unhandledErrorCard';
14
12
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
13
+ import { withMediaAnalyticsContext } from '@atlaskit/media-common';
15
14
  import { fireMediaCardEvent } from '../utils/analytics/fireMediaCardEvent';
15
+ import { UnhandledErrorCard } from './ui/unhandledErrorCard';
16
16
  var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Component) {
17
17
  function WrappedMediaCardAnalyticsErrorBoundary(props) {
18
18
  var _this;
@@ -80,7 +80,7 @@ var WrappedMediaCardAnalyticsErrorBoundary = /*#__PURE__*/function (_React$Compo
80
80
  }(React.Component);
81
81
  _defineProperty(WrappedMediaCardAnalyticsErrorBoundary, "displayName", 'MediaCardAnalyticsErrorBoundary');
82
82
  var packageName = "@atlaskit/media-card";
83
- var packageVersion = "81.12.6";
83
+ var packageVersion = "81.12.8";
84
84
 
85
85
  // @ts-ignore: [PIT-1685] Fails in post-office due to backwards incompatibility issue with React 18
86
86
  var MediaCardAnalyticsErrorBoundary = withMediaAnalyticsContext({
@@ -4,12 +4,13 @@
4
4
  */
5
5
 
6
6
  import React from 'react';
7
+ import { useMemo } from 'react';
8
+
7
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
10
  import { jsx } from '@emotion/react';
9
- import { useMemo } from 'react';
10
- import { MediaCardError } from '../../MediaCardError';
11
- import { useResolveSvg } from '@atlaskit/media-svg/use-resolve-svg';
12
11
  import { MediaSVGError } from '@atlaskit/media-svg/media-svg-error';
12
+ import { useResolveSvg } from '@atlaskit/media-svg/use-resolve-svg';
13
+ import { MediaCardError } from '../../MediaCardError';
13
14
  import { ImageRenderer } from '../ui/imageRenderer/imageRendererV2';
14
15
  var getErrorReason = function getErrorReason(svgReason) {
15
16
  switch (svgReason) {
@@ -7,6 +7,7 @@ import { ax, ix } from "@compiled/react/runtime";
7
7
  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; }
8
8
  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; }
9
9
  import { forwardRef } from 'react';
10
+
10
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
11
12
 
12
13
  import { fg } from '@atlaskit/platform-feature-flags/fg';
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
3
- import { CardActionButton } from './cardActionButton';
4
3
  import Tooltip from '@atlaskit/tooltip/Tooltip';
5
4
  import { fireMediaCardEvent } from '../../../../utils/analytics/fireMediaCardEvent';
5
+ import { CardActionButton } from './cardActionButton';
6
6
  export var CardActionIconButton = function CardActionIconButton(_ref) {
7
7
  var icon = _ref.icon,
8
8
  label = _ref.label,
@@ -3,11 +3,11 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  var _excluded = ["triggerRef", "isSelected", "testId", "onClick"];
4
4
  import React from 'react';
5
5
  import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
6
- import MoreIcon from '@atlaskit/icon/core/show-more-horizontal';
6
+ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
7
7
  import DropdownMenu from '@atlaskit/dropdown-menu/dropdown-menu';
8
- import DropdownItemGroup from '@atlaskit/dropdown-menu/dropdown-menu-item-group';
9
8
  import DropdownItem from '@atlaskit/dropdown-menu/dropdown-menu-item';
10
- import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
9
+ import DropdownItemGroup from '@atlaskit/dropdown-menu/dropdown-menu-item-group';
10
+ import MoreIcon from '@atlaskit/icon/core/show-more-horizontal';
11
11
  import { createAndFireMediaCardEvent } from '../../../../utils/analytics/createAndFireMediaCardEvent';
12
12
  import { fireMediaCardEvent } from '../../../../utils/analytics/fireMediaCardEvent';
13
13
  import { CardActionButton } from './cardActionButton';
@@ -1,8 +1,8 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useEffect } from 'react';
3
3
  import { MediaImage } from '@atlaskit/media-ui/mediaImage';
4
- import { resizeModeToMediaImageProps } from './resizeModeToMediaImageProps';
5
4
  import { useCurrentValueRef } from '../../../utils/useCurrentValueRef';
5
+ import { resizeModeToMediaImageProps } from './resizeModeToMediaImageProps';
6
6
  export var ImageRenderer = function ImageRenderer(_ref) {
7
7
  var cardPreview = _ref.cardPreview,
8
8
  alt = _ref.alt,
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
2
3
  import { ImageRenderer as ImageRendererV1 } from './imageRenderer';
3
4
  import { ImageRenderer as ImageRendererV2 } from './imageRendererV2';
4
- import { fg } from '@atlaskit/platform-feature-flags/fg';
5
5
  export var ImageRenderer = function ImageRenderer(props) {
6
6
  return fg('platform_media_card_image_render') ? /*#__PURE__*/React.createElement(ImageRendererV2, props) : /*#__PURE__*/React.createElement(ImageRendererV1, props);
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import VidPlayIcon from '@atlaskit/icon/core/video-play-overlay';
3
- import { PlayButtonWrapper } from './playButtonWrapper';
4
3
  import { PlayButtonBackground } from './playButtonBackground';
4
+ import { PlayButtonWrapper } from './playButtonWrapper';
5
5
  export var PlayButton = function PlayButton() {
6
6
  return /*#__PURE__*/React.createElement(PlayButtonWrapper, null, /*#__PURE__*/React.createElement(PlayButtonBackground, null), /*#__PURE__*/React.createElement(VidPlayIcon, {
7
7
  color: "currentColor",
@@ -3,6 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
+
6
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
8
  import { jsx } from '@emotion/react';
8
9
  import { backgroundStyles, bkgClassName } from './styles';
@@ -6,11 +6,11 @@ import * as React from 'react';
6
6
  import { ax, ix } from "@compiled/react/runtime";
7
7
  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; }
8
8
  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; }
9
- import { newFileExperienceClassName } from '../../cardConstants';
9
+ import UFOCustomData from '@atlaskit/react-ufo/custom-data';
10
10
  import { VcMediaWrapperProps } from '@atlaskit/react-ufo/vc-media';
11
11
  import { getDefaultCardDimensions } from '../../../utils/cardDimensions';
12
12
  import { getCSSUnitValue } from '../../../utils/getCSSUnitValue';
13
- import UFOCustomData from '@atlaskit/react-ufo/custom-data';
13
+ import { newFileExperienceClassName } from '../../cardConstants';
14
14
  export var LOCAL_WIDTH_VARIABLE = '--media-wrapper-width';
15
15
  export var LOCAL_HEIGHT_VARIABLE = '--media-wrapper-height';
16
16
  var wrapperStyles = {
@@ -1,5 +1,5 @@
1
- import { MediaCardError } from './MediaCardError';
2
1
  import { isMediaCardError } from './isMediaCardError';
2
+ import { MediaCardError } from './MediaCardError';
3
3
 
4
4
  // In a try/catch statement, the error caught is the type of unknown.
5
5
  // We can use this helper to ensure that the error handled is the type of MediaCardError if unsure
@@ -10,8 +10,8 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
10
10
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
11
11
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
12
12
  import React from 'react';
13
- import { MediaInlineCardLoadingView } from '@atlaskit/media-ui/LoadingView';
14
13
  import AnalyticsContext from '@atlaskit/analytics-next/AnalyticsContext';
14
+ import { MediaInlineCardLoadingView } from '@atlaskit/media-ui/LoadingView';
15
15
  var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
16
16
  function MediaInlineCardLoader() {
17
17
  var _this;
@@ -101,7 +101,7 @@ var MediaInlineCardLoader = /*#__PURE__*/function (_React$PureComponent) {
101
101
  ErrorBoundary = _this$state.ErrorBoundary;
102
102
  var analyticsContext = {
103
103
  packageVersion: "@atlaskit/media-card",
104
- packageName: "81.12.6",
104
+ packageName: "81.12.8",
105
105
  componentName: 'mediaInlineCard',
106
106
  component: 'mediaInlineCard'
107
107
  };
@@ -2,6 +2,7 @@
2
2
  /**
3
3
  * @deprecated Use `import { getSucceededStatusPayload } from '@atlaskit/media-card/mediaInlineCardAnalytics'` instead.
4
4
  */
5
+
5
6
  export { getSucceededStatusPayload } from './getSucceededStatusPayload';
6
7
  /**
7
8
  * @deprecated Use `import { getErrorStatusPayload } from '@atlaskit/media-card/mediaInlineCardAnalytics'` instead.
@@ -1,4 +1,5 @@
1
1
  import { MediaCardCursor } from '../types';
2
+
2
3
  /**
3
4
  * When the returned value is undefined, we'd expect the media card to take the parent's cursor style.
4
5
  */
@@ -8,8 +8,8 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
8
8
  import React from 'react';
9
9
  import { Component } from 'react';
10
10
  import { ErrorIcon } from './errorIcon';
11
- import { Wrapper } from './lightCardWrappers';
12
11
  import { getDimensionsWithDefault } from './getDimensionsWithDefault';
12
+ import { Wrapper } from './lightCardWrappers';
13
13
  export var CardError = /*#__PURE__*/function (_Component) {
14
14
  function CardError() {
15
15
  _classCallCheck(this, CardError);
@@ -10,9 +10,10 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
10
10
  * @jsx jsx
11
11
  */
12
12
  import React from 'react';
13
+ import { Component } from 'react';
14
+
13
15
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
16
  import { jsx } from '@emotion/react';
15
- import { Component } from 'react';
16
17
  import WarningIcon from '@atlaskit/icon/core/status-warning';
17
18
  import { errorIconWrapperStyles } from './styles';
18
19
  export var ErrorIcon = /*#__PURE__*/function (_Component) {
@@ -1,6 +1,5 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import { css } from '@emotion/react';
3
-
4
3
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
5
4
  export var errorIconWrapperStyles = css({
6
5
  display: 'flex',
@@ -4,6 +4,7 @@ import _extends from "@babel/runtime/helpers/extends";
4
4
  * @jsx jsx
5
5
  */
6
6
  import React from 'react';
7
+
7
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
8
9
  import { jsx } from '@emotion/react';
9
10
  import { wrapperStyles } from './styles';
@@ -16,7 +16,7 @@ import { extractErrorInfo } from './analytics/extractErrorInfo';
16
16
  import { getRenderErrorRequestMetadata } from './analytics/getRenderErrorRequestMetadata';
17
17
  import { getMediaGlobalScope } from './globalScope/getMediaGlobalScope';
18
18
  var packageName = "@atlaskit/media-card";
19
- var packageVersion = "81.12.6";
19
+ var packageVersion = "81.12.8";
20
20
  var SAMPLE_RATE = 0.05;
21
21
 
22
22
  /**
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import { type InlinePlayerWrapperProps } from './types';
2
6
  export declare const inlinePlayerClassName = "media-card-inline-player";
3
7
  export declare const LOCAL_WIDTH_VARIABLE = "--media-inline-player-wrapper-width";
@@ -1,7 +1,7 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
+ import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
2
3
  import { type MediaFeatureFlags } from '@atlaskit/media-common';
3
4
  import { type CardDimensions, type CardOnClickCallback } from '../types';
4
- import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
5
5
  export type MediaCardAnalyticsErrorBoundaryProps = PropsWithChildren<{
6
6
  dimensions?: CardDimensions;
7
7
  data?: {
@@ -1,6 +1,6 @@
1
- import { type SerializedStyles } from '@emotion/react';
2
1
  import { type MouseEvent, type HTMLAttributes } from 'react';
3
2
  import type React from 'react';
3
+ import { type SerializedStyles } from '@emotion/react';
4
4
  import type UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
5
5
  export declare enum CardActionIconButtonVariant {
6
6
  default = "default",
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  export declare const AIBorder: React.FC & {
2
6
  displayName?: string;
3
7
  };
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
1
5
  import { type ReactNode } from 'react';
2
6
  export declare const ImageRendererWrapper: ({ children }: {
3
7
  children: ReactNode;
@@ -1,6 +1,6 @@
1
1
  import { type MessageDescriptor } from 'react-intl';
2
- import { type Breakpoint } from '../common';
3
2
  import { type TitleBoxIcon as TitleBoxIconType } from '../../../types';
3
+ import { type Breakpoint } from '../common';
4
4
  export type TitleBoxProps = {
5
5
  name?: string;
6
6
  breakpoint: Breakpoint;
@@ -2,8 +2,8 @@ import { type FocusEvent, type MouseEvent } from 'react';
2
2
  import type React from 'react';
3
3
  import type UIAnalyticsEvent from '@atlaskit/analytics-next/UIAnalyticsEvent';
4
4
  import { type CardDimensions, type CardAppearance } from '../../../types';
5
- import { type Breakpoint } from '../common';
6
5
  import { type MediaCardCursor } from '../../../types';
6
+ import { type Breakpoint } from '../common';
7
7
  export interface WrapperProps {
8
8
  testId?: string;
9
9
  breakpoint: Breakpoint;
@@ -1,6 +1,6 @@
1
1
  import React, { type PropsWithChildren } from 'react';
2
- import { type MediaFeatureFlags } from '@atlaskit/media-common';
3
2
  import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next/withAnalyticsEvents';
3
+ import { type MediaFeatureFlags } from '@atlaskit/media-common';
4
4
  export type MediaInlineAnalyticsErrorBoundaryProps = PropsWithChildren<{
5
5
  isSelected?: boolean;
6
6
  data?: {
@@ -9,8 +9,8 @@ import type { SsrMediaItem } from '@atlaskit/media-client/ssr-media-item';
9
9
  import { type MediaFeatureFlags, type NumericalCardDimensions, type SSR } from '@atlaskit/media-common';
10
10
  import type { MediaFilePreviewErrorPrimaryReason } from '@atlaskit/media-file-preview/media-file-preview-error';
11
11
  import { type ViewerOptionsProps, type MediaViewerExtensions } from '@atlaskit/media-viewer';
12
- import type { MediaCardError, MediaCardErrorPrimaryReason } from './MediaCardError';
13
12
  import { type CardAction } from './card/actions';
13
+ import type { MediaCardError, MediaCardErrorPrimaryReason } from './MediaCardError';
14
14
  export type CardStatus = 'uploading' | 'loading' | 'processing' | 'loading-preview' | 'complete' | 'error' | 'failed-processing';
15
15
  export type FilePreviewStatus = {
16
16
  hasFilesize: boolean;
@@ -1,5 +1,5 @@
1
- import { MediaCardCursor } from '../types';
2
1
  import { type MediaType } from '@atlaskit/media-client';
2
+ import { MediaCardCursor } from '../types';
3
3
  /**
4
4
  * When the returned value is undefined, we'd expect the media card to take the parent's cursor style.
5
5
  */
@@ -1,5 +1,5 @@
1
- import { type CardDimensions } from '../../types';
2
1
  import { type MediaFeatureFlags } from '@atlaskit/media-common';
2
+ import { type CardDimensions } from '../../types';
3
3
  export interface StaticCardProps {
4
4
  dimensions?: CardDimensions;
5
5
  testId?: string;
@@ -3,8 +3,10 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
+
6
7
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
8
  import { jsx } from '@emotion/react';
9
+
8
10
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
9
11
  import { Box, xcss } from '@atlaskit/primitives';
10
12
 
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
 
3
+ import { type FileIdentifier } from '@atlaskit/media-client';
3
4
  import {
4
5
  createStorybookMediaClientConfig,
5
6
  imageFileId,
@@ -12,12 +13,11 @@ import {
12
13
  wideImageFileId,
13
14
  largeImageFileId,
14
15
  } from '@atlaskit/media-test-helpers';
15
- import { type FileIdentifier } from '@atlaskit/media-client';
16
16
 
17
17
  import { createApiCards, actions } from '.';
18
- import { CardLoading } from '../src/utils/lightCards/cardLoading';
19
- import { CardError } from '../src/utils/lightCards/cardError';
20
18
  import Card from '../src/card/cardLoader';
19
+ import { CardError } from '../src/utils/lightCards/cardError';
20
+ import { CardLoading } from '../src/utils/lightCards/cardLoading';
21
21
 
22
22
  const mediaClientConfig = createStorybookMediaClientConfig();
23
23
  // standard
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+
2
3
  import InlineMessage from '@atlaskit/inline-message';
3
4
 
4
5
  const DevelopmentUseMessage: React.FC = () => (
@@ -1,9 +1,8 @@
1
1
  // eslint-disable-line no-console
2
2
 
3
3
  import React, { type PropsWithChildren } from 'react';
4
- import { IntlProvider } from 'react-intl';
5
4
 
6
- import { payloadPublisher } from '@atlassian/ufo/publisher';
5
+ import { IntlProvider } from 'react-intl';
7
6
 
8
7
  import FabricAnalyticsListeners from '@atlaskit/analytics-listeners/FabricAnalyticsListeners';
9
8
  import type { AnalyticsWebClient } from '@atlaskit/analytics-listeners/types';
@@ -19,9 +18,10 @@ import {
19
18
  enableMediaUfoLogger,
20
19
  FeatureFlagsWrapper,
21
20
  } from '@atlaskit/media-test-helpers';
21
+ import { payloadPublisher } from '@atlassian/ufo/publisher';
22
22
 
23
- import Card from '../src/card/cardLoader';
24
23
  import { type CardAction } from '../src/card/actions';
24
+ import Card from '../src/card/cardLoader';
25
25
  import { MediaCardError } from '../src/MediaCardError';
26
26
  import type { CardFocusEvent, CardAppearance, CardEvent } from '../src/types';
27
27
  import DevelopmentUseMessage from './developmentUseMessage';
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import { Component } from 'react';
3
- import type { MediaClientConfig } from '@atlaskit/media-core/auth';
3
+
4
4
  import { type Identifier } from '@atlaskit/media-client';
5
+ import type { MediaClientConfig } from '@atlaskit/media-core/auth';
6
+
5
7
  import Card from '../src/card/cardLoader';
6
8
 
7
9
  export interface SelectableCardProps {
@@ -1,6 +1,8 @@
1
1
  import React, { useEffect, useMemo } from 'react';
2
+
2
3
  import { hydrateRoot } from 'react-dom/client';
3
4
  import ReactDOMServer from 'react-dom/server';
5
+
4
6
  import { SSRAnalyticsWrapper } from '.';
5
7
 
6
8
  export interface SimulateSsrParams extends React.DetailedHTMLProps<
@@ -1,7 +1,8 @@
1
- import { token } from '@atlaskit/tokens';
2
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
2
  import { css, type SerializedStyles } from '@emotion/react';
4
3
 
4
+ import { token } from '@atlaskit/tokens';
5
+
5
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
6
7
  export const editableCardOptionsStyles: SerializedStyles = css({
7
8
  padding: token('space.250'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "81.12.7",
3
+ "version": "81.12.9",
4
4
  "description": "Includes all media card related components, CardView, CardViewSmall, Card...",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -51,11 +51,11 @@
51
51
  "@atlaskit/primitives": "^22.5.0",
52
52
  "@atlaskit/progress-bar": "^5.3.0",
53
53
  "@atlaskit/react-compiler-gating": "^0.2.0",
54
- "@atlaskit/react-ufo": "^7.11.0",
54
+ "@atlaskit/react-ufo": "^7.13.0",
55
55
  "@atlaskit/section-message": "^10.2.0",
56
56
  "@atlaskit/theme": "^28.2.0",
57
- "@atlaskit/tmp-editor-statsig": "^199.0.0",
58
- "@atlaskit/tokens": "^18.0.0",
57
+ "@atlaskit/tmp-editor-statsig": "^201.0.0",
58
+ "@atlaskit/tokens": "^18.2.0",
59
59
  "@atlaskit/tooltip": "^24.3.0",
60
60
  "@atlaskit/ufo": "^1.2.0",
61
61
  "@atlaskit/visually-hidden": "^4.4.0",
@@ -75,7 +75,7 @@
75
75
  },
76
76
  "devDependencies": {
77
77
  "@af/integration-testing": "workspace:^",
78
- "@atlaskit/analytics-listeners": "^11.3.0",
78
+ "@atlaskit/analytics-listeners": "^11.4.0",
79
79
  "@atlaskit/analytics-namespaced-context": "^8.2.0",
80
80
  "@atlaskit/button": "^25.3.0",
81
81
  "@atlaskit/checkbox": "^19.2.0",
@@ -95,6 +95,7 @@
95
95
  "@atlassian/feature-flags-test-utils": "^1.3.0",
96
96
  "@atlassian/testing-library": "^0.11.0",
97
97
  "@atlassian/ufo": "^0.10.0",
98
+ "@atlassian/workbench": "workspace:^",
98
99
  "@testing-library/dom": "^10.1.0",
99
100
  "@testing-library/react": "^16.3.0",
100
101
  "@testing-library/user-event": "^14.4.3",