@atlaskit/media-ui 17.1.0 → 17.2.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 (64) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/cjs/BlockCard/components/Byline.js +4 -2
  3. package/dist/cjs/BlockCard/components/Content.js +6 -2
  4. package/dist/cjs/BlockCard/components/ContentHeader.js +6 -2
  5. package/dist/cjs/BlockCard/components/Icon.js +3 -3
  6. package/dist/cjs/BlockCard/components/Link.js +3 -1
  7. package/dist/cjs/BlockCard/components/Name.js +6 -2
  8. package/dist/cjs/BlockCard/views/ErroredView.js +5 -1
  9. package/dist/cjs/BlockCard/views/ForbiddenView.js +5 -2
  10. package/dist/cjs/BlockCard/views/NotFoundView.js +5 -1
  11. package/dist/cjs/BlockCard/views/ResolvedView.js +5 -2
  12. package/dist/cjs/EmbedCard/components/Frame.js +1 -1
  13. package/dist/cjs/MediaInlineCard/Frame/styled.js +1 -1
  14. package/dist/cjs/MediaInlineCard/IconAndTitleLayout/styled.js +1 -1
  15. package/dist/cjs/classNames.js +52 -0
  16. package/dist/cjs/codeViewer.js +8 -0
  17. package/dist/cjs/mediaImage/index.js +5 -3
  18. package/dist/cjs/version.json +1 -1
  19. package/dist/es2019/BlockCard/components/Byline.js +4 -2
  20. package/dist/es2019/BlockCard/components/Content.js +3 -1
  21. package/dist/es2019/BlockCard/components/ContentHeader.js +3 -1
  22. package/dist/es2019/BlockCard/components/Icon.js +3 -3
  23. package/dist/es2019/BlockCard/components/Link.js +3 -1
  24. package/dist/es2019/BlockCard/components/Name.js +3 -1
  25. package/dist/es2019/BlockCard/views/ErroredView.js +2 -0
  26. package/dist/es2019/BlockCard/views/ForbiddenView.js +3 -1
  27. package/dist/es2019/BlockCard/views/NotFoundView.js +2 -0
  28. package/dist/es2019/BlockCard/views/ResolvedView.js +3 -1
  29. package/dist/es2019/EmbedCard/components/Frame.js +1 -1
  30. package/dist/es2019/MediaInlineCard/Frame/styled.js +3 -2
  31. package/dist/es2019/MediaInlineCard/IconAndTitleLayout/styled.js +5 -1
  32. package/dist/es2019/classNames.js +8 -3
  33. package/dist/es2019/codeViewer.js +8 -0
  34. package/dist/es2019/mediaImage/index.js +5 -3
  35. package/dist/es2019/version.json +1 -1
  36. package/dist/esm/BlockCard/components/Byline.js +4 -2
  37. package/dist/esm/BlockCard/components/Content.js +3 -1
  38. package/dist/esm/BlockCard/components/ContentHeader.js +3 -1
  39. package/dist/esm/BlockCard/components/Icon.js +3 -3
  40. package/dist/esm/BlockCard/components/Link.js +3 -1
  41. package/dist/esm/BlockCard/components/Name.js +3 -1
  42. package/dist/esm/BlockCard/views/ErroredView.js +2 -0
  43. package/dist/esm/BlockCard/views/ForbiddenView.js +3 -1
  44. package/dist/esm/BlockCard/views/NotFoundView.js +2 -0
  45. package/dist/esm/BlockCard/views/ResolvedView.js +3 -1
  46. package/dist/esm/EmbedCard/components/Frame.js +1 -1
  47. package/dist/esm/MediaInlineCard/Frame/styled.js +2 -2
  48. package/dist/esm/MediaInlineCard/IconAndTitleLayout/styled.js +1 -1
  49. package/dist/esm/classNames.js +8 -3
  50. package/dist/esm/codeViewer.js +8 -0
  51. package/dist/esm/mediaImage/index.js +5 -3
  52. package/dist/esm/version.json +1 -1
  53. package/dist/types/BlockCard/components/Byline.d.ts +2 -1
  54. package/dist/types/BlockCard/components/Content.d.ts +1 -0
  55. package/dist/types/BlockCard/components/ContentHeader.d.ts +1 -0
  56. package/dist/types/BlockCard/components/Link.d.ts +2 -1
  57. package/dist/types/BlockCard/components/Name.d.ts +1 -0
  58. package/dist/types/BlockCard/views/ErroredView.d.ts +1 -0
  59. package/dist/types/BlockCard/views/ForbiddenView.d.ts +1 -0
  60. package/dist/types/BlockCard/views/NotFoundView.d.ts +1 -0
  61. package/dist/types/BlockCard/views/ResolvedView.d.ts +1 -0
  62. package/dist/types/classNames.d.ts +7 -2
  63. package/dist/types/mediaImage/index.d.ts +1 -0
  64. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @atlaskit/media-ui
2
2
 
3
+ ## 17.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`ca519a86b1d`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ca519a86b1d) - Add new prop forceSyncDisplay in MediaImage to provide an option of always showing images.
8
+ Enable MediaCard to turn on forceSyncDisplay when server side rendering is enabled.
9
+ - [`af29def3dac`](https://bitbucket.org/atlassian/atlassian-frontend/commits/af29def3dac) - expose missing smart-card classnames
10
+
11
+ ```
12
+ import {
13
+ blockCardResolvedViewByClassName,
14
+ blockCardForbiddenViewLinkClassName,
15
+ blockCardContentClassName,
16
+ blockCardContentHeaderClassName,
17
+ blockCardContentHeaderNameClassName,
18
+ blockCardNotFoundViewClassName,
19
+ blockCardErroredViewClassName,
20
+ } from '@atlaskit/smart-card'
21
+
22
+ css`
23
+ .${blockCardContentHeaderNameClassName} {
24
+ background-color: red;
25
+ }
26
+ `
27
+ ```
28
+
29
+ ### Patch Changes
30
+
31
+ - [`09f27f70093`](https://bitbucket.org/atlassian/atlassian-frontend/commits/09f27f70093) - Grant "clipboard-write" permission so that the browsing contexts within the iframe will have Clipboard API available
32
+ - [`f124adcb18f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f124adcb18f) - Adding .md, .lock, .yaml, .yml, .tsx, .jsx as known extension types
33
+ - [`fe8e5ca9a92`](https://bitbucket.org/atlassian/atlassian-frontend/commits/fe8e5ca9a92) - [ux] MediaInline package now correctly shows a border around it upon being selected
34
+ - Updated dependencies
35
+
3
36
  ## 17.1.0
4
37
 
5
38
  ### Minor Changes
@@ -15,7 +15,8 @@ var _utils = require("../utils");
15
15
  var Byline = function Byline(_ref) {
16
16
  var text = _ref.text,
17
17
  children = _ref.children,
18
- testId = _ref.testId;
18
+ testId = _ref.testId,
19
+ className = _ref.className;
19
20
  return (0, _core.jsx)("span", {
20
21
  css: (0, _utils.mq)({
21
22
  fontSize: (0, _utils.gs)(1.5),
@@ -37,7 +38,8 @@ var Byline = function Byline(_ref) {
37
38
  // due to HTML its unwrapping behaviour on paste.
38
39
  MozUserSelect: 'none'
39
40
  }),
40
- "data-testid": testId
41
+ "data-testid": testId,
42
+ className: className
41
43
  }, text || children);
42
44
  };
43
45
 
@@ -3,13 +3,16 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Content = void 0;
6
+ exports.Content = exports.blockCardContentClassName = void 0;
7
7
 
8
8
  var _core = require("@emotion/core");
9
9
 
10
10
  var _utils = require("../utils");
11
11
 
12
12
  /** @jsx jsx */
13
+ var blockCardContentClassName = 'block-card-content';
14
+ exports.blockCardContentClassName = blockCardContentClassName;
15
+
13
16
  var Content = function Content(_ref) {
14
17
  var children = _ref.children,
15
18
  _ref$isCompact = _ref.isCompact,
@@ -22,7 +25,8 @@ var Content = function Content(_ref) {
22
25
  justifyContent: isCompact ? 'unset' : ['unset', 'space-between'],
23
26
  flexGrow: 1
24
27
  }),
25
- "data-trello-do-not-use-override": "block-card-content"
28
+ "data-trello-do-not-use-override": "block-card-content",
29
+ className: blockCardContentClassName
26
30
  }, children);
27
31
  };
28
32
 
@@ -3,11 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ContentHeader = void 0;
6
+ exports.ContentHeader = exports.blockCardContentHeaderClassName = void 0;
7
7
 
8
8
  var _core = require("@emotion/core");
9
9
 
10
10
  /** @jsx jsx */
11
+ var blockCardContentHeaderClassName = 'block-card-content-header';
12
+ exports.blockCardContentHeaderClassName = blockCardContentHeaderClassName;
13
+
11
14
  var ContentHeader = function ContentHeader(_ref) {
12
15
  var onClick = _ref.onClick,
13
16
  link = _ref.link,
@@ -23,7 +26,8 @@ var ContentHeader = function ContentHeader(_ref) {
23
26
  // due to HTML its unwrapping behaviour on paste.
24
27
  MozUserSelect: 'none'
25
28
  },
26
- "data-trello-do-not-use-override": "block-card-content-header"
29
+ "data-trello-do-not-use-override": "block-card-content-header",
30
+ className: blockCardContentHeaderClassName
27
31
  }, children);
28
32
  };
29
33
 
@@ -40,8 +40,7 @@ var Icon = function Icon(_ref) {
40
40
  width: (0, _utils.gs)(2)
41
41
  },
42
42
  src: url,
43
- "data-testid": "".concat(testId, "-image"),
44
- className: blockCardIconImageClassName
43
+ "data-testid": "".concat(testId, "-image")
45
44
  }),
46
45
  errored: placeholder
47
46
  });
@@ -53,7 +52,8 @@ var Icon = function Icon(_ref) {
53
52
  alignItems: 'center',
54
53
  justifyContent: 'center'
55
54
  },
56
- "data-testid": testId
55
+ "data-testid": testId,
56
+ className: blockCardIconImageClassName
57
57
  }, icon || image || placeholder);
58
58
  };
59
59
 
@@ -13,9 +13,11 @@ var _colors = require("@atlaskit/theme/colors");
13
13
  var Link = function Link(_ref) {
14
14
  var url = _ref.url,
15
15
  _ref$testId = _ref.testId,
16
- testId = _ref$testId === void 0 ? 'block-card' : _ref$testId;
16
+ testId = _ref$testId === void 0 ? 'block-card' : _ref$testId,
17
+ className = _ref.className;
17
18
  return (0, _core.jsx)("span", {
18
19
  "data-testid": "".concat(testId, "-link"),
20
+ className: className,
19
21
  css: {
20
22
  color: _colors.B400,
21
23
  wordBreak: 'break-all'
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.Name = void 0;
6
+ exports.Name = exports.blockCardContentHeaderNameClassName = void 0;
7
7
 
8
8
  var _core = require("@emotion/core");
9
9
 
@@ -12,6 +12,9 @@ var _constants = require("@atlaskit/theme/constants");
12
12
  var _utils = require("../utils");
13
13
 
14
14
  /** @jsx jsx */
15
+ var blockCardContentHeaderNameClassName = 'block-card-content-header-name';
16
+ exports.blockCardContentHeaderNameClassName = blockCardContentHeaderNameClassName;
17
+
15
18
  var Name = function Name(_ref) {
16
19
  var name = _ref.name,
17
20
  _ref$isLeftPadded = _ref.isLeftPadded,
@@ -36,7 +39,8 @@ var Name = function Name(_ref) {
36
39
  maxHeight: (0, _utils.gs)(6)
37
40
  },
38
41
  "data-testid": testId,
39
- "data-trello-do-not-use-override": "block-card-content-header-name"
42
+ "data-trello-do-not-use-override": "block-card-content-header-name",
43
+ className: blockCardContentHeaderNameClassName
40
44
  }, name);
41
45
  };
42
46
 
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.ErroredView = void 0;
8
+ exports.ErroredView = exports.blockCardErroredViewClassName = void 0;
9
9
 
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
 
@@ -47,6 +47,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
47
47
 
48
48
  var textDescriptionProps = _objectSpread({}, _messages.messages.could_not_load_link);
49
49
 
50
+ var blockCardErroredViewClassName = 'block-card-errored-view';
51
+ exports.blockCardErroredViewClassName = blockCardErroredViewClassName;
52
+
50
53
  var ErroredView = function ErroredView(_ref) {
51
54
  var _ref$isSelected = _ref.isSelected,
52
55
  isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
@@ -70,6 +73,7 @@ var ErroredView = function ErroredView(_ref) {
70
73
  return (0, _core.jsx)(_Frame.Frame, {
71
74
  isSelected: isSelected,
72
75
  testId: testId,
76
+ className: blockCardErroredViewClassName,
73
77
  isFluidHeight: true,
74
78
  inheritDimensions: inheritDimensions
75
79
  }, (0, _core.jsx)(_Content.Content, {
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.ForbiddenView = exports.blockCardForbiddenViewClassName = void 0;
8
+ exports.ForbiddenView = exports.blockCardForbiddenViewLinkClassName = exports.blockCardForbiddenViewClassName = void 0;
9
9
 
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
 
@@ -44,6 +44,8 @@ var _UnresolvedText = require("../components/UnresolvedText");
44
44
  /** @jsx jsx */
45
45
  var blockCardForbiddenViewClassName = 'block-card-forbidden-view';
46
46
  exports.blockCardForbiddenViewClassName = blockCardForbiddenViewClassName;
47
+ var blockCardForbiddenViewLinkClassName = 'block-card-forbidden-view-link';
48
+ exports.blockCardForbiddenViewLinkClassName = blockCardForbiddenViewLinkClassName;
47
49
 
48
50
  var ForbiddenView = function ForbiddenView(_ref) {
49
51
  var _ref$context = _ref.context,
@@ -85,7 +87,8 @@ var ForbiddenView = function ForbiddenView(_ref) {
85
87
  link: link
86
88
  }, (0, _core.jsx)(_Link.Link, {
87
89
  url: link,
88
- testId: testId
90
+ testId: testId,
91
+ className: blockCardForbiddenViewLinkClassName
89
92
  })), (0, _core.jsx)(_Byline.Byline, null, (0, _core.jsx)(_UnresolvedText.UnresolvedText, {
90
93
  icon: (0, _core.jsx)(_lockFilled.default, {
91
94
  label: "forbidden-lock-icon",
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.NotFoundView = void 0;
8
+ exports.NotFoundView = exports.blockCardNotFoundViewClassName = void 0;
9
9
 
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
11
 
@@ -45,6 +45,9 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
45
45
 
46
46
  var textDescriptionProps = _objectSpread({}, _messages.messages.not_found_description);
47
47
 
48
+ var blockCardNotFoundViewClassName = 'block-card-not-found-view';
49
+ exports.blockCardNotFoundViewClassName = blockCardNotFoundViewClassName;
50
+
48
51
  var NotFoundView = function NotFoundView(_ref) {
49
52
  var _ref$context = _ref.context,
50
53
  context = _ref$context === void 0 ? {
@@ -66,6 +69,7 @@ var NotFoundView = function NotFoundView(_ref) {
66
69
  return (0, _core.jsx)(_Frame.Frame, {
67
70
  isSelected: isSelected,
68
71
  testId: testId,
72
+ className: blockCardNotFoundViewClassName,
69
73
  isFluidHeight: true
70
74
  }, (0, _core.jsx)(_Content.Content, {
71
75
  isCompact: true
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
- exports.ResolvedView = exports.blockCardResolvedViewClassName = void 0;
8
+ exports.ResolvedView = exports.blockCardResolvedViewByClassName = exports.blockCardResolvedViewClassName = void 0;
9
9
 
10
10
  var _core = require("@emotion/core");
11
11
 
@@ -46,6 +46,8 @@ var _handlers = require("../utils/handlers");
46
46
  /** @jsx jsx */
47
47
  var blockCardResolvedViewClassName = 'block-card-resolved-view';
48
48
  exports.blockCardResolvedViewClassName = blockCardResolvedViewClassName;
49
+ var blockCardResolvedViewByClassName = 'block-card-resolved-view-by';
50
+ exports.blockCardResolvedViewByClassName = blockCardResolvedViewByClassName;
49
51
 
50
52
  var ResolvedView = function ResolvedView(_ref) {
51
53
  var _ref$icon = _ref.icon,
@@ -87,7 +89,8 @@ var ResolvedView = function ResolvedView(_ref) {
87
89
  items: details
88
90
  }) : undefined;
89
91
  var resolvedByline = (0, _core.jsx)(_Byline.Byline, {
90
- testId: testId ? "".concat(testId, "-by") : undefined
92
+ testId: testId ? "".concat(testId, "-by") : undefined,
93
+ className: blockCardResolvedViewByClassName
91
94
  }, byline);
92
95
 
93
96
  var handleClick = function handleClick(event) {
@@ -54,7 +54,7 @@ var Frame = /*#__PURE__*/_react.default.forwardRef(function (_ref, iframeRef) {
54
54
  },
55
55
  allowFullScreen: true,
56
56
  scrolling: "yes",
57
- allow: "autoplay; encrypted-media",
57
+ allow: "autoplay; encrypted-media; clipboard-write",
58
58
  onLoad: function onLoad() {
59
59
  return setIframeLoaded(true);
60
60
  },
@@ -22,7 +22,7 @@ var _templateObject;
22
22
  var FONT_COLOR = _colors.text; // TODO: Dark mode background color to be added in the future.
23
23
 
24
24
  var BACKGROUND_COLOR_LIGHT = _colors.N30A;
25
- var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 2px ".concat(_colors.B100, ";\n outline: none;\n user-select: none;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
25
+ var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 1px ".concat(_colors.B300, ";\n outline: none;\n user-select: none;\n border-color: transparent;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
26
26
 
27
27
  var isSelected = function isSelected(_ref) {
28
28
  var isSelected = _ref.isSelected;
@@ -67,6 +67,6 @@ var IconEmptyWrapper = _styledComponents.default.span(_templateObject8 || (_temp
67
67
 
68
68
  exports.IconEmptyWrapper = IconEmptyWrapper;
69
69
 
70
- var TitleWrapper = _styledComponents.default.span(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)([""])));
70
+ var TitleWrapper = _styledComponents.default.span(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n ::selection {\n background: none;\n }\n"])));
71
71
 
72
72
  exports.TitleWrapper = TitleWrapper;
@@ -27,18 +27,60 @@ Object.defineProperty(exports, "blockCardResolvedViewClassName", {
27
27
  return _ResolvedView.blockCardResolvedViewClassName;
28
28
  }
29
29
  });
30
+ Object.defineProperty(exports, "blockCardResolvedViewByClassName", {
31
+ enumerable: true,
32
+ get: function get() {
33
+ return _ResolvedView.blockCardResolvedViewByClassName;
34
+ }
35
+ });
30
36
  Object.defineProperty(exports, "blockCardForbiddenViewClassName", {
31
37
  enumerable: true,
32
38
  get: function get() {
33
39
  return _ForbiddenView.blockCardForbiddenViewClassName;
34
40
  }
35
41
  });
42
+ Object.defineProperty(exports, "blockCardForbiddenViewLinkClassName", {
43
+ enumerable: true,
44
+ get: function get() {
45
+ return _ForbiddenView.blockCardForbiddenViewLinkClassName;
46
+ }
47
+ });
36
48
  Object.defineProperty(exports, "blockCardIconImageClassName", {
37
49
  enumerable: true,
38
50
  get: function get() {
39
51
  return _Icon.blockCardIconImageClassName;
40
52
  }
41
53
  });
54
+ Object.defineProperty(exports, "blockCardContentClassName", {
55
+ enumerable: true,
56
+ get: function get() {
57
+ return _Content.blockCardContentClassName;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "blockCardContentHeaderClassName", {
61
+ enumerable: true,
62
+ get: function get() {
63
+ return _ContentHeader.blockCardContentHeaderClassName;
64
+ }
65
+ });
66
+ Object.defineProperty(exports, "blockCardContentHeaderNameClassName", {
67
+ enumerable: true,
68
+ get: function get() {
69
+ return _Name.blockCardContentHeaderNameClassName;
70
+ }
71
+ });
72
+ Object.defineProperty(exports, "blockCardNotFoundViewClassName", {
73
+ enumerable: true,
74
+ get: function get() {
75
+ return _NotFoundView.blockCardNotFoundViewClassName;
76
+ }
77
+ });
78
+ Object.defineProperty(exports, "blockCardErroredViewClassName", {
79
+ enumerable: true,
80
+ get: function get() {
81
+ return _ErroredView.blockCardErroredViewClassName;
82
+ }
83
+ });
42
84
  exports.hideControlsClassName = void 0;
43
85
 
44
86
  var _ContentFooter = require("./BlockCard/components/ContentFooter");
@@ -53,5 +95,15 @@ var _ForbiddenView = require("./BlockCard/views/ForbiddenView");
53
95
 
54
96
  var _Icon = require("./BlockCard/components/Icon");
55
97
 
98
+ var _Content = require("./BlockCard/components/Content");
99
+
100
+ var _ContentHeader = require("./BlockCard/components/ContentHeader");
101
+
102
+ var _Name = require("./BlockCard/components/Name");
103
+
104
+ var _NotFoundView = require("./BlockCard/views/NotFoundView");
105
+
106
+ var _ErroredView = require("./BlockCard/views/ErroredView");
107
+
56
108
  var hideControlsClassName = 'mvng-hide-controls';
57
109
  exports.hideControlsClassName = hideControlsClassName;
@@ -118,6 +118,7 @@ function getLanguageType(name) {
118
118
  return 'haxe';
119
119
 
120
120
  case 'js':
121
+ case 'jsx':
121
122
  return 'javascript';
122
123
 
123
124
  case 'jl':
@@ -177,9 +178,11 @@ function getLanguageType(name) {
177
178
  case 'msg':
178
179
  case 'log':
179
180
  case 'csv':
181
+ case 'md':
180
182
  return 'text';
181
183
 
182
184
  case 'ts':
185
+ case 'tsx':
183
186
  return 'typescript';
184
187
 
185
188
  case 'v':
@@ -191,6 +194,11 @@ function getLanguageType(name) {
191
194
  case 'xqy':
192
195
  return 'xquery';
193
196
 
197
+ case 'lock':
198
+ case 'yaml':
199
+ case 'yml':
200
+ return 'yaml';
201
+
194
202
  default:
195
203
  return null;
196
204
  }
@@ -109,7 +109,8 @@ var MediaImage = /*#__PURE__*/function (_Component) {
109
109
  onImageError = _this$props.onImageError,
110
110
  _this$props$alt = _this$props.alt,
111
111
  alt = _this$props$alt === void 0 ? '' : _this$props$alt,
112
- loading = _this$props.loading;
112
+ loading = _this$props.loading,
113
+ forceSyncDisplay = _this$props.forceSyncDisplay;
113
114
  var _this$state = this.state,
114
115
  parentWidth = _this$state.parentWidth,
115
116
  parentHeight = _this$state.parentHeight,
@@ -312,7 +313,7 @@ var MediaImage = /*#__PURE__*/function (_Component) {
312
313
  and we can do that only when image is loaded (and we have image size)
313
314
  */
314
315
 
315
- var showImage = isImageLoaded || isFitStrategy && !isImageRotated;
316
+ var showImage = forceSyncDisplay || isImageLoaded || isFitStrategy && !isImageRotated;
316
317
  var style = {
317
318
  transform: 'translate(-50%, -50%)'
318
319
  };
@@ -422,5 +423,6 @@ var MediaImage = /*#__PURE__*/function (_Component) {
422
423
  exports.MediaImage = MediaImage;
423
424
  (0, _defineProperty2.default)(MediaImage, "defaultProps", {
424
425
  crop: true,
425
- stretch: false
426
+ stretch: false,
427
+ forceSyncDisplay: false
426
428
  });
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-ui",
3
- "version": "17.1.0",
3
+ "version": "17.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -5,7 +5,8 @@ import { gs, mq } from '../utils';
5
5
  export const Byline = ({
6
6
  text,
7
7
  children,
8
- testId
8
+ testId,
9
+ className
9
10
  }) => jsx("span", {
10
11
  css: mq({
11
12
  fontSize: gs(1.5),
@@ -27,5 +28,6 @@ export const Byline = ({
27
28
  // due to HTML its unwrapping behaviour on paste.
28
29
  MozUserSelect: 'none'
29
30
  }),
30
- "data-testid": testId
31
+ "data-testid": testId,
32
+ className: className
31
33
  }, text || children);
@@ -1,6 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/core';
3
3
  import { gs, mq } from '../utils';
4
+ export const blockCardContentClassName = 'block-card-content';
4
5
  export const Content = ({
5
6
  children,
6
7
  isCompact = false
@@ -12,5 +13,6 @@ export const Content = ({
12
13
  justifyContent: isCompact ? 'unset' : ['unset', 'space-between'],
13
14
  flexGrow: 1
14
15
  }),
15
- "data-trello-do-not-use-override": "block-card-content"
16
+ "data-trello-do-not-use-override": "block-card-content",
17
+ className: blockCardContentClassName
16
18
  }, children);
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/core';
3
+ export const blockCardContentHeaderClassName = 'block-card-content-header';
3
4
  export const ContentHeader = ({
4
5
  onClick,
5
6
  link,
@@ -15,5 +16,6 @@ export const ContentHeader = ({
15
16
  // due to HTML its unwrapping behaviour on paste.
16
17
  MozUserSelect: 'none'
17
18
  },
18
- "data-trello-do-not-use-override": "block-card-content-header"
19
+ "data-trello-do-not-use-override": "block-card-content-header",
20
+ className: blockCardContentHeaderClassName
19
21
  }, children);
@@ -24,8 +24,7 @@ export const Icon = ({
24
24
  width: gs(2)
25
25
  },
26
26
  src: url,
27
- "data-testid": `${testId}-image`,
28
- className: blockCardIconImageClassName
27
+ "data-testid": `${testId}-image`
29
28
  }),
30
29
  errored: placeholder
31
30
  });
@@ -37,6 +36,7 @@ export const Icon = ({
37
36
  alignItems: 'center',
38
37
  justifyContent: 'center'
39
38
  },
40
- "data-testid": testId
39
+ "data-testid": testId,
40
+ className: blockCardIconImageClassName
41
41
  }, icon || image || placeholder);
42
42
  };
@@ -3,10 +3,12 @@ import { jsx } from '@emotion/core';
3
3
  import { B400 } from '@atlaskit/theme/colors';
4
4
  export const Link = ({
5
5
  url,
6
- testId = 'block-card'
6
+ testId = 'block-card',
7
+ className
7
8
  }) => {
8
9
  return jsx("span", {
9
10
  "data-testid": `${testId}-link`,
11
+ className: className,
10
12
  css: {
11
13
  color: B400,
12
14
  wordBreak: 'break-all'
@@ -2,6 +2,7 @@
2
2
  import { jsx } from '@emotion/core';
3
3
  import { fontSize } from '@atlaskit/theme/constants';
4
4
  import { gs } from '../utils';
5
+ export const blockCardContentHeaderNameClassName = 'block-card-content-header-name';
5
6
  export const Name = ({
6
7
  name,
7
8
  isLeftPadded = true,
@@ -25,5 +26,6 @@ export const Name = ({
25
26
  maxHeight: gs(6)
26
27
  },
27
28
  "data-testid": testId,
28
- "data-trello-do-not-use-override": "block-card-content-header-name"
29
+ "data-trello-do-not-use-override": "block-card-content-header-name",
30
+ className: blockCardContentHeaderNameClassName
29
31
  }, name);
@@ -17,6 +17,7 @@ import { UnresolvedText } from '../components/UnresolvedText';
17
17
  import { RetryAction } from '../actions/RetryAction';
18
18
  const textDescriptionProps = { ...messages.could_not_load_link
19
19
  };
20
+ export const blockCardErroredViewClassName = 'block-card-errored-view';
20
21
  export const ErroredView = ({
21
22
  isSelected = false,
22
23
  testId = 'block-card-errored-view',
@@ -31,6 +32,7 @@ export const ErroredView = ({
31
32
  return jsx(Frame, {
32
33
  isSelected: isSelected,
33
34
  testId: testId,
35
+ className: blockCardErroredViewClassName,
34
36
  isFluidHeight: true,
35
37
  inheritDimensions: inheritDimensions
36
38
  }, jsx(Content, {
@@ -17,6 +17,7 @@ import { handleClickCommon } from '../utils/handlers';
17
17
  import { Link } from '../components/Link';
18
18
  import { UnresolvedText } from '../components/UnresolvedText';
19
19
  export const blockCardForbiddenViewClassName = 'block-card-forbidden-view';
20
+ export const blockCardForbiddenViewLinkClassName = 'block-card-forbidden-view-link';
20
21
  export const ForbiddenView = ({
21
22
  context = {
22
23
  text: ''
@@ -48,7 +49,8 @@ export const ForbiddenView = ({
48
49
  link: link
49
50
  }, jsx(Link, {
50
51
  url: link,
51
- testId: testId
52
+ testId: testId,
53
+ className: blockCardForbiddenViewLinkClassName
52
54
  })), jsx(Byline, null, jsx(UnresolvedText, {
53
55
  icon: jsx(LockIcon, {
54
56
  label: "forbidden-lock-icon",
@@ -16,6 +16,7 @@ import { UnresolvedText } from '../components/UnresolvedText';
16
16
  import { handleClickCommon } from '../utils/handlers';
17
17
  const textDescriptionProps = { ...messages.not_found_description
18
18
  };
19
+ export const blockCardNotFoundViewClassName = 'block-card-not-found-view';
19
20
  export const NotFoundView = ({
20
21
  context = {
21
22
  text: ''
@@ -30,6 +31,7 @@ export const NotFoundView = ({
30
31
  return jsx(Frame, {
31
32
  isSelected: isSelected,
32
33
  testId: testId,
34
+ className: blockCardNotFoundViewClassName,
33
35
  isFluidHeight: true
34
36
  }, jsx(Content, {
35
37
  isCompact: true
@@ -18,6 +18,7 @@ import { ContentFooter } from '../components/ContentFooter';
18
18
  import { gs } from '../utils';
19
19
  import { handleClickCommon } from '../utils/handlers';
20
20
  export const blockCardResolvedViewClassName = 'block-card-resolved-view';
21
+ export const blockCardResolvedViewByClassName = 'block-card-resolved-view-by';
21
22
  export const ResolvedView = ({
22
23
  icon = {},
23
24
  actions = [],
@@ -45,7 +46,8 @@ export const ResolvedView = ({
45
46
  items: details
46
47
  }) : undefined;
47
48
  const resolvedByline = jsx(Byline, {
48
- testId: testId ? `${testId}-by` : undefined
49
+ testId: testId ? `${testId}-by` : undefined,
50
+ className: blockCardResolvedViewByClassName
49
51
  }, byline);
50
52
 
51
53
  const handleClick = event => handleClickCommon(event, onClick);
@@ -30,7 +30,7 @@ export const Frame = /*#__PURE__*/React.forwardRef(({
30
30
  },
31
31
  allowFullScreen: true,
32
32
  scrolling: "yes",
33
- allow: "autoplay; encrypted-media",
33
+ allow: "autoplay; encrypted-media; clipboard-write",
34
34
  onLoad: () => setIframeLoaded(true),
35
35
  sandbox: getIframeSandboxAttribute(isTrusted)
36
36
  });
@@ -1,5 +1,5 @@
1
1
  import styled from 'styled-components';
2
- import { B100, N30A, N40A, text } from '@atlaskit/theme/colors';
2
+ import { B300, N30A, N40A, text } from '@atlaskit/theme/colors';
3
3
  import { borderRadius as akBorderRadius } from '@atlaskit/theme/constants';
4
4
  import { themed } from '@atlaskit/theme/components';
5
5
  const FONT_COLOR = text; // TODO: Dark mode background color to be added in the future.
@@ -7,9 +7,10 @@ const FONT_COLOR = text; // TODO: Dark mode background color to be added in the
7
7
  const BACKGROUND_COLOR_LIGHT = N30A;
8
8
  const selected = `
9
9
  cursor: pointer;
10
- box-shadow: 0 0 0 2px ${B100};
10
+ box-shadow: 0 0 0 1px ${B300};
11
11
  outline: none;
12
12
  user-select: none;
13
+ border-color: transparent;
13
14
  &, :hover, :focus, :active {
14
15
  text-decoration: none;
15
16
  }
@@ -96,4 +96,8 @@ export const IconEmptyWrapper = styled.span`
96
96
  display: inline-block;
97
97
  opacity: 0;
98
98
  `;
99
- export const TitleWrapper = styled.span``;
99
+ export const TitleWrapper = styled.span`
100
+ ::selection {
101
+ background: none;
102
+ }
103
+ `;
@@ -2,6 +2,11 @@ export const hideControlsClassName = 'mvng-hide-controls';
2
2
  export { contentFooterClassName } from './BlockCard/components/ContentFooter';
3
3
  export { metadataListClassName } from './BlockCard/components/MetadataList';
4
4
  export { blockCardResolvingViewClassName } from './BlockCard/views/ResolvingView';
5
- export { blockCardResolvedViewClassName } from './BlockCard/views/ResolvedView';
6
- export { blockCardForbiddenViewClassName } from './BlockCard/views/ForbiddenView';
7
- export { blockCardIconImageClassName } from './BlockCard/components/Icon';
5
+ export { blockCardResolvedViewClassName, blockCardResolvedViewByClassName } from './BlockCard/views/ResolvedView';
6
+ export { blockCardForbiddenViewClassName, blockCardForbiddenViewLinkClassName } from './BlockCard/views/ForbiddenView';
7
+ export { blockCardIconImageClassName } from './BlockCard/components/Icon';
8
+ export { blockCardContentClassName } from './BlockCard/components/Content';
9
+ export { blockCardContentHeaderClassName } from './BlockCard/components/ContentHeader';
10
+ export { blockCardContentHeaderNameClassName } from './BlockCard/components/Name';
11
+ export { blockCardNotFoundViewClassName } from './BlockCard/views/NotFoundView';
12
+ export { blockCardErroredViewClassName } from './BlockCard/views/ErroredView';
@@ -107,6 +107,7 @@ export function getLanguageType(name) {
107
107
  return 'haxe';
108
108
 
109
109
  case 'js':
110
+ case 'jsx':
110
111
  return 'javascript';
111
112
 
112
113
  case 'jl':
@@ -166,9 +167,11 @@ export function getLanguageType(name) {
166
167
  case 'msg':
167
168
  case 'log':
168
169
  case 'csv':
170
+ case 'md':
169
171
  return 'text';
170
172
 
171
173
  case 'ts':
174
+ case 'tsx':
172
175
  return 'typescript';
173
176
 
174
177
  case 'v':
@@ -180,6 +183,11 @@ export function getLanguageType(name) {
180
183
  case 'xqy':
181
184
  return 'xquery';
182
185
 
186
+ case 'lock':
187
+ case 'yaml':
188
+ case 'yml':
189
+ return 'yaml';
190
+
183
191
  default:
184
192
  return null;
185
193
  }
@@ -65,7 +65,8 @@ export class MediaImage extends Component {
65
65
  crossOrigin,
66
66
  onImageError,
67
67
  alt = '',
68
- loading
68
+ loading,
69
+ forceSyncDisplay
69
70
  } = this.props;
70
71
  const {
71
72
  parentWidth,
@@ -270,7 +271,7 @@ export class MediaImage extends Component {
270
271
  and we can do that only when image is loaded (and we have image size)
271
272
  */
272
273
 
273
- const showImage = isImageLoaded || isFitStrategy && !isImageRotated;
274
+ const showImage = forceSyncDisplay || isImageLoaded || isFitStrategy && !isImageRotated;
274
275
  const style = {
275
276
  transform: 'translate(-50%, -50%)'
276
277
  };
@@ -378,5 +379,6 @@ export class MediaImage extends Component {
378
379
 
379
380
  _defineProperty(MediaImage, "defaultProps", {
380
381
  crop: true,
381
- stretch: false
382
+ stretch: false,
383
+ forceSyncDisplay: false
382
384
  });
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-ui",
3
- "version": "17.1.0",
3
+ "version": "17.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -5,7 +5,8 @@ import { gs, mq } from '../utils';
5
5
  export var Byline = function Byline(_ref) {
6
6
  var text = _ref.text,
7
7
  children = _ref.children,
8
- testId = _ref.testId;
8
+ testId = _ref.testId,
9
+ className = _ref.className;
9
10
  return jsx("span", {
10
11
  css: mq({
11
12
  fontSize: gs(1.5),
@@ -27,6 +28,7 @@ export var Byline = function Byline(_ref) {
27
28
  // due to HTML its unwrapping behaviour on paste.
28
29
  MozUserSelect: 'none'
29
30
  }),
30
- "data-testid": testId
31
+ "data-testid": testId,
32
+ className: className
31
33
  }, text || children);
32
34
  };
@@ -1,6 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/core';
3
3
  import { gs, mq } from '../utils';
4
+ export var blockCardContentClassName = 'block-card-content';
4
5
  export var Content = function Content(_ref) {
5
6
  var children = _ref.children,
6
7
  _ref$isCompact = _ref.isCompact,
@@ -13,6 +14,7 @@ export var Content = function Content(_ref) {
13
14
  justifyContent: isCompact ? 'unset' : ['unset', 'space-between'],
14
15
  flexGrow: 1
15
16
  }),
16
- "data-trello-do-not-use-override": "block-card-content"
17
+ "data-trello-do-not-use-override": "block-card-content",
18
+ className: blockCardContentClassName
17
19
  }, children);
18
20
  };
@@ -1,5 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import { jsx } from '@emotion/core';
3
+ export var blockCardContentHeaderClassName = 'block-card-content-header';
3
4
  export var ContentHeader = function ContentHeader(_ref) {
4
5
  var onClick = _ref.onClick,
5
6
  link = _ref.link,
@@ -15,6 +16,7 @@ export var ContentHeader = function ContentHeader(_ref) {
15
16
  // due to HTML its unwrapping behaviour on paste.
16
17
  MozUserSelect: 'none'
17
18
  },
18
- "data-trello-do-not-use-override": "block-card-content-header"
19
+ "data-trello-do-not-use-override": "block-card-content-header",
20
+ className: blockCardContentHeaderClassName
19
21
  }, children);
20
22
  };
@@ -24,8 +24,7 @@ export var Icon = function Icon(_ref) {
24
24
  width: gs(2)
25
25
  },
26
26
  src: url,
27
- "data-testid": "".concat(testId, "-image"),
28
- className: blockCardIconImageClassName
27
+ "data-testid": "".concat(testId, "-image")
29
28
  }),
30
29
  errored: placeholder
31
30
  });
@@ -37,6 +36,7 @@ export var Icon = function Icon(_ref) {
37
36
  alignItems: 'center',
38
37
  justifyContent: 'center'
39
38
  },
40
- "data-testid": testId
39
+ "data-testid": testId,
40
+ className: blockCardIconImageClassName
41
41
  }, icon || image || placeholder);
42
42
  };
@@ -4,9 +4,11 @@ import { B400 } from '@atlaskit/theme/colors';
4
4
  export var Link = function Link(_ref) {
5
5
  var url = _ref.url,
6
6
  _ref$testId = _ref.testId,
7
- testId = _ref$testId === void 0 ? 'block-card' : _ref$testId;
7
+ testId = _ref$testId === void 0 ? 'block-card' : _ref$testId,
8
+ className = _ref.className;
8
9
  return jsx("span", {
9
10
  "data-testid": "".concat(testId, "-link"),
11
+ className: className,
10
12
  css: {
11
13
  color: B400,
12
14
  wordBreak: 'break-all'
@@ -2,6 +2,7 @@
2
2
  import { jsx } from '@emotion/core';
3
3
  import { fontSize } from '@atlaskit/theme/constants';
4
4
  import { gs } from '../utils';
5
+ export var blockCardContentHeaderNameClassName = 'block-card-content-header-name';
5
6
  export var Name = function Name(_ref) {
6
7
  var name = _ref.name,
7
8
  _ref$isLeftPadded = _ref.isLeftPadded,
@@ -26,6 +27,7 @@ export var Name = function Name(_ref) {
26
27
  maxHeight: gs(6)
27
28
  },
28
29
  "data-testid": testId,
29
- "data-trello-do-not-use-override": "block-card-content-header-name"
30
+ "data-trello-do-not-use-override": "block-card-content-header-name",
31
+ className: blockCardContentHeaderNameClassName
30
32
  }, name);
31
33
  };
@@ -24,6 +24,7 @@ import { RetryAction } from '../actions/RetryAction';
24
24
 
25
25
  var textDescriptionProps = _objectSpread({}, messages.could_not_load_link);
26
26
 
27
+ export var blockCardErroredViewClassName = 'block-card-errored-view';
27
28
  export var ErroredView = function ErroredView(_ref) {
28
29
  var _ref$isSelected = _ref.isSelected,
29
30
  isSelected = _ref$isSelected === void 0 ? false : _ref$isSelected,
@@ -47,6 +48,7 @@ export var ErroredView = function ErroredView(_ref) {
47
48
  return jsx(Frame, {
48
49
  isSelected: isSelected,
49
50
  testId: testId,
51
+ className: blockCardErroredViewClassName,
50
52
  isFluidHeight: true,
51
53
  inheritDimensions: inheritDimensions
52
54
  }, jsx(Content, {
@@ -18,6 +18,7 @@ import { handleClickCommon } from '../utils/handlers';
18
18
  import { Link } from '../components/Link';
19
19
  import { UnresolvedText } from '../components/UnresolvedText';
20
20
  export var blockCardForbiddenViewClassName = 'block-card-forbidden-view';
21
+ export var blockCardForbiddenViewLinkClassName = 'block-card-forbidden-view-link';
21
22
  export var ForbiddenView = function ForbiddenView(_ref) {
22
23
  var _ref$context = _ref.context,
23
24
  context = _ref$context === void 0 ? {
@@ -58,7 +59,8 @@ export var ForbiddenView = function ForbiddenView(_ref) {
58
59
  link: link
59
60
  }, jsx(Link, {
60
61
  url: link,
61
- testId: testId
62
+ testId: testId,
63
+ className: blockCardForbiddenViewLinkClassName
62
64
  })), jsx(Byline, null, jsx(UnresolvedText, {
63
65
  icon: jsx(LockIcon, {
64
66
  label: "forbidden-lock-icon",
@@ -23,6 +23,7 @@ import { handleClickCommon } from '../utils/handlers';
23
23
 
24
24
  var textDescriptionProps = _objectSpread({}, messages.not_found_description);
25
25
 
26
+ export var blockCardNotFoundViewClassName = 'block-card-not-found-view';
26
27
  export var NotFoundView = function NotFoundView(_ref) {
27
28
  var _ref$context = _ref.context,
28
29
  context = _ref$context === void 0 ? {
@@ -44,6 +45,7 @@ export var NotFoundView = function NotFoundView(_ref) {
44
45
  return jsx(Frame, {
45
46
  isSelected: isSelected,
46
47
  testId: testId,
48
+ className: blockCardNotFoundViewClassName,
47
49
  isFluidHeight: true
48
50
  }, jsx(Content, {
49
51
  isCompact: true
@@ -18,6 +18,7 @@ import { ContentFooter } from '../components/ContentFooter';
18
18
  import { gs } from '../utils';
19
19
  import { handleClickCommon } from '../utils/handlers';
20
20
  export var blockCardResolvedViewClassName = 'block-card-resolved-view';
21
+ export var blockCardResolvedViewByClassName = 'block-card-resolved-view-by';
21
22
  export var ResolvedView = function ResolvedView(_ref) {
22
23
  var _ref$icon = _ref.icon,
23
24
  icon = _ref$icon === void 0 ? {} : _ref$icon,
@@ -58,7 +59,8 @@ export var ResolvedView = function ResolvedView(_ref) {
58
59
  items: details
59
60
  }) : undefined;
60
61
  var resolvedByline = jsx(Byline, {
61
- testId: testId ? "".concat(testId, "-by") : undefined
62
+ testId: testId ? "".concat(testId, "-by") : undefined,
63
+ className: blockCardResolvedViewByClassName
62
64
  }, byline);
63
65
 
64
66
  var handleClick = function handleClick(event) {
@@ -36,7 +36,7 @@ export var Frame = /*#__PURE__*/React.forwardRef(function (_ref, iframeRef) {
36
36
  },
37
37
  allowFullScreen: true,
38
38
  scrolling: "yes",
39
- allow: "autoplay; encrypted-media",
39
+ allow: "autoplay; encrypted-media; clipboard-write",
40
40
  onLoad: function onLoad() {
41
41
  return setIframeLoaded(true);
42
42
  },
@@ -3,13 +3,13 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
3
3
  var _templateObject;
4
4
 
5
5
  import styled from 'styled-components';
6
- import { B100, N30A, N40A, text } from '@atlaskit/theme/colors';
6
+ import { B300, N30A, N40A, text } from '@atlaskit/theme/colors';
7
7
  import { borderRadius as akBorderRadius } from '@atlaskit/theme/constants';
8
8
  import { themed } from '@atlaskit/theme/components';
9
9
  var FONT_COLOR = text; // TODO: Dark mode background color to be added in the future.
10
10
 
11
11
  var BACKGROUND_COLOR_LIGHT = N30A;
12
- var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 2px ".concat(B100, ";\n outline: none;\n user-select: none;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
12
+ var selected = "\n cursor: pointer;\n box-shadow: 0 0 0 1px ".concat(B300, ";\n outline: none;\n user-select: none;\n border-color: transparent;\n &, :hover, :focus, :active {\n text-decoration: none;\n }\n");
13
13
 
14
14
  var isSelected = function isSelected(_ref) {
15
15
  var isSelected = _ref.isSelected;
@@ -30,4 +30,4 @@ export var RightIconPositionWrapper = styled.span(_templateObject6 || (_template
30
30
 
31
31
  export var IconPositionWrapper = styled.span(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n margin-right: 4px;\n position: relative;\n display: inline-block;\n"])));
32
32
  export var IconEmptyWrapper = styled.span(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n width: 14px;\n height: 100%;\n display: inline-block;\n opacity: 0;\n"])));
33
- export var TitleWrapper = styled.span(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral([""])));
33
+ export var TitleWrapper = styled.span(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n ::selection {\n background: none;\n }\n"])));
@@ -2,6 +2,11 @@ export var hideControlsClassName = 'mvng-hide-controls';
2
2
  export { contentFooterClassName } from './BlockCard/components/ContentFooter';
3
3
  export { metadataListClassName } from './BlockCard/components/MetadataList';
4
4
  export { blockCardResolvingViewClassName } from './BlockCard/views/ResolvingView';
5
- export { blockCardResolvedViewClassName } from './BlockCard/views/ResolvedView';
6
- export { blockCardForbiddenViewClassName } from './BlockCard/views/ForbiddenView';
7
- export { blockCardIconImageClassName } from './BlockCard/components/Icon';
5
+ export { blockCardResolvedViewClassName, blockCardResolvedViewByClassName } from './BlockCard/views/ResolvedView';
6
+ export { blockCardForbiddenViewClassName, blockCardForbiddenViewLinkClassName } from './BlockCard/views/ForbiddenView';
7
+ export { blockCardIconImageClassName } from './BlockCard/components/Icon';
8
+ export { blockCardContentClassName } from './BlockCard/components/Content';
9
+ export { blockCardContentHeaderClassName } from './BlockCard/components/ContentHeader';
10
+ export { blockCardContentHeaderNameClassName } from './BlockCard/components/Name';
11
+ export { blockCardNotFoundViewClassName } from './BlockCard/views/NotFoundView';
12
+ export { blockCardErroredViewClassName } from './BlockCard/views/ErroredView';
@@ -107,6 +107,7 @@ export function getLanguageType(name) {
107
107
  return 'haxe';
108
108
 
109
109
  case 'js':
110
+ case 'jsx':
110
111
  return 'javascript';
111
112
 
112
113
  case 'jl':
@@ -166,9 +167,11 @@ export function getLanguageType(name) {
166
167
  case 'msg':
167
168
  case 'log':
168
169
  case 'csv':
170
+ case 'md':
169
171
  return 'text';
170
172
 
171
173
  case 'ts':
174
+ case 'tsx':
172
175
  return 'typescript';
173
176
 
174
177
  case 'v':
@@ -180,6 +183,11 @@ export function getLanguageType(name) {
180
183
  case 'xqy':
181
184
  return 'xquery';
182
185
 
186
+ case 'lock':
187
+ case 'yaml':
188
+ case 'yml':
189
+ return 'yaml';
190
+
183
191
  default:
184
192
  return null;
185
193
  }
@@ -88,7 +88,8 @@ export var MediaImage = /*#__PURE__*/function (_Component) {
88
88
  onImageError = _this$props.onImageError,
89
89
  _this$props$alt = _this$props.alt,
90
90
  alt = _this$props$alt === void 0 ? '' : _this$props$alt,
91
- loading = _this$props.loading;
91
+ loading = _this$props.loading,
92
+ forceSyncDisplay = _this$props.forceSyncDisplay;
92
93
  var _this$state = this.state,
93
94
  parentWidth = _this$state.parentWidth,
94
95
  parentHeight = _this$state.parentHeight,
@@ -291,7 +292,7 @@ export var MediaImage = /*#__PURE__*/function (_Component) {
291
292
  and we can do that only when image is loaded (and we have image size)
292
293
  */
293
294
 
294
- var showImage = isImageLoaded || isFitStrategy && !isImageRotated;
295
+ var showImage = forceSyncDisplay || isImageLoaded || isFitStrategy && !isImageRotated;
295
296
  var style = {
296
297
  transform: 'translate(-50%, -50%)'
297
298
  };
@@ -401,5 +402,6 @@ export var MediaImage = /*#__PURE__*/function (_Component) {
401
402
 
402
403
  _defineProperty(MediaImage, "defaultProps", {
403
404
  crop: true,
404
- stretch: false
405
+ stretch: false,
406
+ forceSyncDisplay: false
405
407
  });
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-ui",
3
- "version": "17.1.0",
3
+ "version": "17.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -2,6 +2,7 @@
2
2
  export interface BylineProps {
3
3
  text?: React.ReactNode;
4
4
  testId?: string;
5
+ className?: string;
5
6
  children?: React.ReactNode;
6
7
  }
7
- export declare const Byline: ({ text, children, testId }: BylineProps) => JSX.Element;
8
+ export declare const Byline: ({ text, children, testId, className }: BylineProps) => JSX.Element;
@@ -3,4 +3,5 @@ export interface ContentProps {
3
3
  children: React.ReactNode;
4
4
  isCompact?: boolean;
5
5
  }
6
+ export declare const blockCardContentClassName = "block-card-content";
6
7
  export declare const Content: ({ children, isCompact }: ContentProps) => JSX.Element;
@@ -4,4 +4,5 @@ export interface ContentHeaderProps {
4
4
  link: string;
5
5
  children: React.ReactNode;
6
6
  }
7
+ export declare const blockCardContentHeaderClassName = "block-card-content-header";
7
8
  export declare const ContentHeader: ({ onClick, link, children, }: ContentHeaderProps) => JSX.Element;
@@ -1,5 +1,6 @@
1
1
  export interface LinkProps {
2
2
  url: string;
3
3
  testId?: string;
4
+ className?: string;
4
5
  }
5
- export declare const Link: ({ url, testId }: LinkProps) => JSX.Element;
6
+ export declare const Link: ({ url, testId, className }: LinkProps) => JSX.Element;
@@ -6,4 +6,5 @@ export interface NameProps {
6
6
  children?: React.ReactNode;
7
7
  textColor?: string;
8
8
  }
9
+ export declare const blockCardContentHeaderNameClassName = "block-card-content-header-name";
9
10
  export declare const Name: ({ name, isLeftPadded, testId, textColor, }: NameProps) => JSX.Element;
@@ -8,4 +8,5 @@ export interface ErroredViewProps {
8
8
  testId?: string;
9
9
  inheritDimensions?: boolean;
10
10
  }
11
+ export declare const blockCardErroredViewClassName = "block-card-errored-view";
11
12
  export declare const ErroredView: ({ isSelected, testId, link, onClick, onRetry, inheritDimensions, }: ErroredViewProps) => JSX.Element;
@@ -17,4 +17,5 @@ export interface PermissionDeniedProps {
17
17
  requestAccessContext?: RequestAccessContextProps;
18
18
  }
19
19
  export declare const blockCardForbiddenViewClassName = "block-card-forbidden-view";
20
+ export declare const blockCardForbiddenViewLinkClassName = "block-card-forbidden-view-link";
20
21
  export declare const ForbiddenView: ({ context, isSelected, actions, testId, showActions, link, onClick, requestAccessContext, }: PermissionDeniedProps) => JSX.Element;
@@ -11,4 +11,5 @@ export interface NotFoundProps {
11
11
  icon: IconProps;
12
12
  testId?: string;
13
13
  }
14
+ export declare const blockCardNotFoundViewClassName = "block-card-not-found-view";
14
15
  export declare const NotFoundView: ({ context, isSelected, testId, link, onClick, }: NotFoundProps) => JSX.Element;
@@ -28,4 +28,5 @@ export interface ResolvedViewProps {
28
28
  isTrusted?: boolean;
29
29
  }
30
30
  export declare const blockCardResolvedViewClassName = "block-card-resolved-view";
31
+ export declare const blockCardResolvedViewByClassName = "block-card-resolved-view-by";
31
32
  export declare const ResolvedView: ({ icon, actions, thumbnail, context, title, titleTextColor, titlePrefix, isSelected, users, handleAvatarClick, handleMoreAvatarsClick, onClick, link, byline, lozenge, details, testId, showActions, }: ResolvedViewProps) => JSX.Element;
@@ -2,6 +2,11 @@ export declare const hideControlsClassName = "mvng-hide-controls";
2
2
  export { contentFooterClassName } from './BlockCard/components/ContentFooter';
3
3
  export { metadataListClassName } from './BlockCard/components/MetadataList';
4
4
  export { blockCardResolvingViewClassName } from './BlockCard/views/ResolvingView';
5
- export { blockCardResolvedViewClassName } from './BlockCard/views/ResolvedView';
6
- export { blockCardForbiddenViewClassName } from './BlockCard/views/ForbiddenView';
5
+ export { blockCardResolvedViewClassName, blockCardResolvedViewByClassName, } from './BlockCard/views/ResolvedView';
6
+ export { blockCardForbiddenViewClassName, blockCardForbiddenViewLinkClassName, } from './BlockCard/views/ForbiddenView';
7
7
  export { blockCardIconImageClassName } from './BlockCard/components/Icon';
8
+ export { blockCardContentClassName } from './BlockCard/components/Content';
9
+ export { blockCardContentHeaderClassName } from './BlockCard/components/ContentHeader';
10
+ export { blockCardContentHeaderNameClassName } from './BlockCard/components/Name';
11
+ export { blockCardNotFoundViewClassName } from './BlockCard/views/NotFoundView';
12
+ export { blockCardErroredViewClassName } from './BlockCard/views/ErroredView';
@@ -10,6 +10,7 @@ export interface MediaImageProps {
10
10
  onImageLoad?: (loadedImage: HTMLImageElement) => void;
11
11
  onImageError?: () => void;
12
12
  loading?: 'auto' | 'lazy' | 'eager';
13
+ forceSyncDisplay?: boolean;
13
14
  }
14
15
  export interface MediaImageState {
15
16
  isImageLoaded: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-ui",
3
- "version": "17.1.0",
3
+ "version": "17.2.0",
4
4
  "description": "Includes common components and utilities used by other media packages",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -44,15 +44,15 @@
44
44
  "@atlaskit/avatar": "^20.5.0",
45
45
  "@atlaskit/avatar-group": "^8.5.0",
46
46
  "@atlaskit/button": "^16.1.0",
47
- "@atlaskit/code": "^14.1.0",
47
+ "@atlaskit/code": "^14.3.0",
48
48
  "@atlaskit/droplist": "^11.0.0",
49
49
  "@atlaskit/icon": "^21.9.0",
50
50
  "@atlaskit/icon-file-type": "^6.3.0",
51
51
  "@atlaskit/item": "^12.0.0",
52
52
  "@atlaskit/locale": "^2.3.0",
53
53
  "@atlaskit/lozenge": "^11.1.0",
54
- "@atlaskit/media-common": "^2.9.0",
55
- "@atlaskit/modal-dialog": "^12.1.0",
54
+ "@atlaskit/media-common": "^2.10.0",
55
+ "@atlaskit/modal-dialog": "^12.2.0",
56
56
  "@atlaskit/select": "^15.2.0",
57
57
  "@atlaskit/spinner": "^15.1.0",
58
58
  "@atlaskit/theme": "^12.0.0",
@@ -83,7 +83,7 @@
83
83
  "@atlaskit/docs": "*",
84
84
  "@atlaskit/field-base": "^15.0.5",
85
85
  "@atlaskit/media-integration-test-helpers": "^2.5.0",
86
- "@atlaskit/media-test-helpers": "^28.8.0",
86
+ "@atlaskit/media-test-helpers": "^28.9.0",
87
87
  "@atlaskit/page": "^12.0.6",
88
88
  "@atlaskit/ssr": "*",
89
89
  "@atlaskit/textfield": "^5.0.5",