@atlaskit/media-ui 25.13.0 → 25.14.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 CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/media-ui
2
2
 
3
+ ## 25.14.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#141583](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/141583)
8
+ [`ba6def6b9d3ce`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ba6def6b9d3ce) -
9
+ Updated Media card and UI to avoid contributing to TTVC metrics
10
+
11
+ - Media card will always render the `img`, even while it is still loading (in that case, the `img`
12
+ will just be hidden). It will also use a custom loading spinner with no interaction context.
13
+ - Media image will allow a null value for the image source. It will also always render the `img`
14
+ tag and switch the css prop `display` according to the `src` value.
15
+
3
16
  ## 25.13.0
4
17
 
5
18
  ### Minor Changes
@@ -53,7 +53,7 @@ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function
53
53
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */ // Keep media player components used in media-viewer to use static colors from the new color palette to
54
54
  // support the hybrid theming in media viewer https://product-fabric.atlassian.net/browse/DSP-6067
55
55
  var packageName = "@atlaskit/media-ui";
56
- var packageVersion = "25.13.0";
56
+ var packageVersion = "25.14.0";
57
57
  var MEDIUM_VIDEO_MAX_WIDTH = 400;
58
58
  var SMALL_VIDEO_MAX_WIDTH = 160;
59
59
  var MINIMUM_DURATION_BEFORE_SAVING_TIME = 60;
@@ -365,7 +365,7 @@ var MediaImage = exports.MediaImage = /*#__PURE__*/function (_Component) {
365
365
  style.maxWidth = percentSize;
366
366
  }
367
367
  }
368
- if (!showImage) {
368
+ if (!showImage || !dataURI) {
369
369
  style.display = 'none';
370
370
  }
371
371
  if (previewOrientation === 'from-image') {
@@ -36,7 +36,7 @@ import Tooltip from '@atlaskit/tooltip';
36
36
  import { SkipTenBackwardIcon, SkipTenForwardIcon } from './icons';
37
37
  import { getControlsWrapperClassName } from './getControlsWrapperClassName';
38
38
  const packageName = "@atlaskit/media-ui";
39
- const packageVersion = "25.13.0";
39
+ const packageVersion = "25.14.0";
40
40
  const MEDIUM_VIDEO_MAX_WIDTH = 400;
41
41
  const SMALL_VIDEO_MAX_WIDTH = 160;
42
42
  const MINIMUM_DURATION_BEFORE_SAVING_TIME = 60;
@@ -343,7 +343,7 @@ export class MediaImage extends Component {
343
343
  style.maxWidth = percentSize;
344
344
  }
345
345
  }
346
- if (!showImage) {
346
+ if (!showImage || !dataURI) {
347
347
  style.display = 'none';
348
348
  }
349
349
  if (previewOrientation === 'from-image') {
@@ -46,7 +46,7 @@ import Tooltip from '@atlaskit/tooltip';
46
46
  import { SkipTenBackwardIcon, SkipTenForwardIcon } from './icons';
47
47
  import { getControlsWrapperClassName } from './getControlsWrapperClassName';
48
48
  var packageName = "@atlaskit/media-ui";
49
- var packageVersion = "25.13.0";
49
+ var packageVersion = "25.14.0";
50
50
  var MEDIUM_VIDEO_MAX_WIDTH = 400;
51
51
  var SMALL_VIDEO_MAX_WIDTH = 160;
52
52
  var MINIMUM_DURATION_BEFORE_SAVING_TIME = 60;
@@ -356,7 +356,7 @@ export var MediaImage = /*#__PURE__*/function (_Component) {
356
356
  style.maxWidth = percentSize;
357
357
  }
358
358
  }
359
- if (!showImage) {
359
+ if (!showImage || !dataURI) {
360
360
  style.display = 'none';
361
361
  }
362
362
  if (previewOrientation === 'from-image') {
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Component } from 'react';
3
3
  export interface MediaImageProps {
4
- dataURI: string;
4
+ dataURI?: string;
5
5
  alt?: string;
6
6
  crop?: boolean;
7
7
  stretch?: boolean;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Component } from 'react';
3
3
  export interface MediaImageProps {
4
- dataURI: string;
4
+ dataURI?: string;
5
5
  alt?: string;
6
6
  crop?: boolean;
7
7
  stretch?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-ui",
3
- "version": "25.13.0",
3
+ "version": "25.14.0",
4
4
  "description": "Includes common components and utilities used by other media packages",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"