@atlaskit/media-ui 16.5.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 (200) hide show
  1. package/CHANGELOG.md +80 -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/Modal.js +13 -21
  8. package/dist/cjs/BlockCard/components/ModalHeader.js +7 -2
  9. package/dist/cjs/BlockCard/components/Name.js +6 -2
  10. package/dist/cjs/BlockCard/views/ErroredView.js +5 -1
  11. package/dist/cjs/BlockCard/views/ForbiddenView.js +5 -2
  12. package/dist/cjs/BlockCard/views/NotFoundView.js +5 -1
  13. package/dist/cjs/BlockCard/views/ResolvedView.js +5 -2
  14. package/dist/cjs/EmbedCard/components/Frame.js +1 -1
  15. package/dist/cjs/MediaInlineCard/ErroredView/index.js +93 -0
  16. package/dist/cjs/MediaInlineCard/Frame/index.js +98 -0
  17. package/dist/cjs/MediaInlineCard/Frame/styled.js +54 -0
  18. package/dist/cjs/MediaInlineCard/Icon.js +30 -0
  19. package/dist/cjs/MediaInlineCard/IconAndTitleLayout/index.js +131 -0
  20. package/dist/cjs/MediaInlineCard/IconAndTitleLayout/styled.js +72 -0
  21. package/dist/cjs/MediaInlineCard/LoadedView/index.js +66 -0
  22. package/dist/cjs/MediaInlineCard/LoadingView/index.js +85 -0
  23. package/dist/cjs/MediaInlineCard/LoadingView/styled.js +19 -0
  24. package/dist/cjs/MediaInlineCard/index.js +29 -0
  25. package/dist/cjs/MediaInlineCard/styled.js +25 -0
  26. package/dist/cjs/classNames.js +52 -0
  27. package/dist/cjs/codeViewer.js +8 -0
  28. package/dist/cjs/customMediaPlayer/analytics/events/screen/customMediaPlayer.js +35 -0
  29. package/dist/cjs/customMediaPlayer/analytics/events/track/playCount.js +35 -0
  30. package/dist/cjs/customMediaPlayer/analytics/events/track/played.js +35 -0
  31. package/dist/cjs/customMediaPlayer/analytics/events/ui/mediaButtonClicked.js +33 -0
  32. package/dist/cjs/customMediaPlayer/analytics/events/ui/playPauseBlanketClicked.js +32 -0
  33. package/dist/cjs/customMediaPlayer/analytics/events/ui/playbackSpeedChanged.js +32 -0
  34. package/dist/cjs/customMediaPlayer/analytics/events/ui/shortcutPressed.js +33 -0
  35. package/dist/cjs/customMediaPlayer/analytics/events/ui/timeRangeNavigated.js +33 -0
  36. package/dist/cjs/customMediaPlayer/analytics/index.js +89 -0
  37. package/dist/cjs/customMediaPlayer/analytics/utils/analytics.js +29 -0
  38. package/dist/cjs/customMediaPlayer/analytics/utils/playbackAttributes.js +40 -0
  39. package/dist/cjs/customMediaPlayer/fullscreen.js +4 -2
  40. package/dist/cjs/customMediaPlayer/icons.js +61 -0
  41. package/dist/cjs/customMediaPlayer/index.js +345 -83
  42. package/dist/cjs/customMediaPlayer/playbackSpeedControls.js +4 -2
  43. package/dist/cjs/customMediaPlayer/timeRange.js +6 -1
  44. package/dist/cjs/customMediaPlayer/types.js +5 -0
  45. package/dist/cjs/ellipsify.js +42 -40
  46. package/dist/cjs/index.js +22 -2
  47. package/dist/cjs/locales.js +17 -0
  48. package/dist/cjs/mediaImage/index.js +8 -4
  49. package/dist/cjs/mediaImage/styled.js +32 -4
  50. package/dist/cjs/messages.js +22 -7
  51. package/dist/cjs/shortcut.js +12 -5
  52. package/dist/cjs/version.json +1 -1
  53. package/dist/es2019/BlockCard/components/Byline.js +4 -2
  54. package/dist/es2019/BlockCard/components/Content.js +3 -1
  55. package/dist/es2019/BlockCard/components/ContentHeader.js +3 -1
  56. package/dist/es2019/BlockCard/components/Icon.js +3 -3
  57. package/dist/es2019/BlockCard/components/Link.js +3 -1
  58. package/dist/es2019/BlockCard/components/Modal.js +30 -19
  59. package/dist/es2019/BlockCard/components/ModalHeader.js +60 -55
  60. package/dist/es2019/BlockCard/components/Name.js +3 -1
  61. package/dist/es2019/BlockCard/views/ErroredView.js +2 -0
  62. package/dist/es2019/BlockCard/views/ForbiddenView.js +3 -1
  63. package/dist/es2019/BlockCard/views/NotFoundView.js +2 -0
  64. package/dist/es2019/BlockCard/views/ResolvedView.js +3 -1
  65. package/dist/es2019/EmbedCard/components/Frame.js +1 -1
  66. package/dist/es2019/MediaInlineCard/ErroredView/index.js +43 -0
  67. package/dist/es2019/MediaInlineCard/Frame/index.js +60 -0
  68. package/dist/es2019/MediaInlineCard/Frame/styled.js +60 -0
  69. package/dist/es2019/MediaInlineCard/Icon.js +23 -0
  70. package/dist/es2019/MediaInlineCard/IconAndTitleLayout/index.js +90 -0
  71. package/dist/es2019/MediaInlineCard/IconAndTitleLayout/styled.js +103 -0
  72. package/dist/es2019/MediaInlineCard/LoadedView/index.js +25 -0
  73. package/dist/es2019/MediaInlineCard/LoadingView/index.js +42 -0
  74. package/dist/es2019/MediaInlineCard/LoadingView/styled.js +6 -0
  75. package/dist/es2019/MediaInlineCard/index.js +3 -0
  76. package/dist/es2019/MediaInlineCard/styled.js +9 -0
  77. package/dist/es2019/classNames.js +8 -3
  78. package/dist/es2019/codeViewer.js +8 -0
  79. package/dist/es2019/customMediaPlayer/analytics/events/screen/customMediaPlayer.js +16 -0
  80. package/dist/es2019/customMediaPlayer/analytics/events/track/playCount.js +16 -0
  81. package/dist/es2019/customMediaPlayer/analytics/events/track/played.js +16 -0
  82. package/dist/es2019/customMediaPlayer/analytics/events/ui/mediaButtonClicked.js +18 -0
  83. package/dist/es2019/customMediaPlayer/analytics/events/ui/playPauseBlanketClicked.js +17 -0
  84. package/dist/es2019/customMediaPlayer/analytics/events/ui/playbackSpeedChanged.js +17 -0
  85. package/dist/es2019/customMediaPlayer/analytics/events/ui/shortcutPressed.js +18 -0
  86. package/dist/es2019/customMediaPlayer/analytics/events/ui/timeRangeNavigated.js +18 -0
  87. package/dist/es2019/customMediaPlayer/analytics/index.js +9 -0
  88. package/dist/es2019/customMediaPlayer/analytics/utils/analytics.js +14 -0
  89. package/dist/es2019/customMediaPlayer/analytics/utils/playbackAttributes.js +31 -0
  90. package/dist/es2019/customMediaPlayer/fullscreen.js +4 -2
  91. package/dist/es2019/customMediaPlayer/icons.js +49 -0
  92. package/dist/es2019/customMediaPlayer/index.js +357 -78
  93. package/dist/es2019/customMediaPlayer/playbackSpeedControls.js +4 -2
  94. package/dist/es2019/customMediaPlayer/timeRange.js +9 -1
  95. package/dist/es2019/customMediaPlayer/types.js +1 -0
  96. package/dist/es2019/ellipsify.js +22 -16
  97. package/dist/es2019/index.js +2 -1
  98. package/dist/es2019/locales.js +3 -0
  99. package/dist/es2019/mediaImage/index.js +8 -4
  100. package/dist/es2019/mediaImage/styled.js +29 -8
  101. package/dist/es2019/messages.js +22 -7
  102. package/dist/es2019/shortcut.js +12 -5
  103. package/dist/es2019/version.json +1 -1
  104. package/dist/esm/BlockCard/components/Byline.js +4 -2
  105. package/dist/esm/BlockCard/components/Content.js +3 -1
  106. package/dist/esm/BlockCard/components/ContentHeader.js +3 -1
  107. package/dist/esm/BlockCard/components/Icon.js +3 -3
  108. package/dist/esm/BlockCard/components/Link.js +3 -1
  109. package/dist/esm/BlockCard/components/Modal.js +31 -22
  110. package/dist/esm/BlockCard/components/ModalHeader.js +6 -2
  111. package/dist/esm/BlockCard/components/Name.js +3 -1
  112. package/dist/esm/BlockCard/views/ErroredView.js +2 -0
  113. package/dist/esm/BlockCard/views/ForbiddenView.js +3 -1
  114. package/dist/esm/BlockCard/views/NotFoundView.js +2 -0
  115. package/dist/esm/BlockCard/views/ResolvedView.js +3 -1
  116. package/dist/esm/EmbedCard/components/Frame.js +1 -1
  117. package/dist/esm/MediaInlineCard/ErroredView/index.js +70 -0
  118. package/dist/esm/MediaInlineCard/Frame/index.js +84 -0
  119. package/dist/esm/MediaInlineCard/Frame/styled.js +39 -0
  120. package/dist/esm/MediaInlineCard/Icon.js +15 -0
  121. package/dist/esm/MediaInlineCard/IconAndTitleLayout/index.js +113 -0
  122. package/dist/esm/MediaInlineCard/IconAndTitleLayout/styled.js +33 -0
  123. package/dist/esm/MediaInlineCard/LoadedView/index.js +50 -0
  124. package/dist/esm/MediaInlineCard/LoadingView/index.js +66 -0
  125. package/dist/esm/MediaInlineCard/LoadingView/styled.js +7 -0
  126. package/dist/esm/MediaInlineCard/index.js +3 -0
  127. package/dist/esm/MediaInlineCard/styled.js +11 -0
  128. package/dist/esm/classNames.js +8 -3
  129. package/dist/esm/codeViewer.js +8 -0
  130. package/dist/esm/customMediaPlayer/analytics/events/screen/customMediaPlayer.js +23 -0
  131. package/dist/esm/customMediaPlayer/analytics/events/track/playCount.js +23 -0
  132. package/dist/esm/customMediaPlayer/analytics/events/track/played.js +23 -0
  133. package/dist/esm/customMediaPlayer/analytics/events/ui/mediaButtonClicked.js +23 -0
  134. package/dist/esm/customMediaPlayer/analytics/events/ui/playPauseBlanketClicked.js +22 -0
  135. package/dist/esm/customMediaPlayer/analytics/events/ui/playbackSpeedChanged.js +22 -0
  136. package/dist/esm/customMediaPlayer/analytics/events/ui/shortcutPressed.js +23 -0
  137. package/dist/esm/customMediaPlayer/analytics/events/ui/timeRangeNavigated.js +23 -0
  138. package/dist/esm/customMediaPlayer/analytics/index.js +9 -0
  139. package/dist/esm/customMediaPlayer/analytics/utils/analytics.js +14 -0
  140. package/dist/esm/customMediaPlayer/analytics/utils/playbackAttributes.js +29 -0
  141. package/dist/esm/customMediaPlayer/fullscreen.js +4 -2
  142. package/dist/esm/customMediaPlayer/icons.js +49 -0
  143. package/dist/esm/customMediaPlayer/index.js +354 -78
  144. package/dist/esm/customMediaPlayer/playbackSpeedControls.js +4 -2
  145. package/dist/esm/customMediaPlayer/timeRange.js +6 -1
  146. package/dist/esm/customMediaPlayer/types.js +1 -0
  147. package/dist/esm/ellipsify.js +38 -36
  148. package/dist/esm/index.js +2 -1
  149. package/dist/esm/locales.js +3 -0
  150. package/dist/esm/mediaImage/index.js +8 -4
  151. package/dist/esm/mediaImage/styled.js +31 -4
  152. package/dist/esm/messages.js +22 -7
  153. package/dist/esm/shortcut.js +12 -5
  154. package/dist/esm/version.json +1 -1
  155. package/dist/types/BlockCard/components/Byline.d.ts +2 -1
  156. package/dist/types/BlockCard/components/Content.d.ts +1 -0
  157. package/dist/types/BlockCard/components/ContentHeader.d.ts +1 -0
  158. package/dist/types/BlockCard/components/Link.d.ts +2 -1
  159. package/dist/types/BlockCard/components/ModalHeader.d.ts +2 -2
  160. package/dist/types/BlockCard/components/Name.d.ts +1 -0
  161. package/dist/types/BlockCard/views/ErroredView.d.ts +1 -0
  162. package/dist/types/BlockCard/views/ForbiddenView.d.ts +1 -0
  163. package/dist/types/BlockCard/views/NotFoundView.d.ts +1 -0
  164. package/dist/types/BlockCard/views/ResolvedView.d.ts +1 -0
  165. package/dist/types/MediaInlineCard/ErroredView/index.d.ts +16 -0
  166. package/dist/types/MediaInlineCard/Frame/index.d.ts +17 -0
  167. package/dist/types/MediaInlineCard/Frame/styled.d.ts +5 -0
  168. package/dist/types/MediaInlineCard/Icon.d.ts +3 -0
  169. package/dist/types/MediaInlineCard/IconAndTitleLayout/index.d.ts +18 -0
  170. package/dist/types/MediaInlineCard/IconAndTitleLayout/styled.d.ts +12 -0
  171. package/dist/types/MediaInlineCard/LoadedView/index.d.ts +18 -0
  172. package/dist/types/MediaInlineCard/LoadingView/index.d.ts +17 -0
  173. package/dist/types/MediaInlineCard/LoadingView/styled.d.ts +2 -0
  174. package/dist/types/MediaInlineCard/index.d.ts +6 -0
  175. package/dist/types/MediaInlineCard/styled.d.ts +2 -0
  176. package/dist/types/classNames.d.ts +7 -2
  177. package/dist/types/customMediaPlayer/analytics/events/screen/customMediaPlayer.d.ts +5 -0
  178. package/dist/types/customMediaPlayer/analytics/events/track/playCount.d.ts +5 -0
  179. package/dist/types/customMediaPlayer/analytics/events/track/played.d.ts +5 -0
  180. package/dist/types/customMediaPlayer/analytics/events/ui/mediaButtonClicked.d.ts +5 -0
  181. package/dist/types/customMediaPlayer/analytics/events/ui/playPauseBlanketClicked.d.ts +5 -0
  182. package/dist/types/customMediaPlayer/analytics/events/ui/playbackSpeedChanged.d.ts +5 -0
  183. package/dist/types/customMediaPlayer/analytics/events/ui/shortcutPressed.d.ts +5 -0
  184. package/dist/types/customMediaPlayer/analytics/events/ui/timeRangeNavigated.d.ts +5 -0
  185. package/dist/types/customMediaPlayer/analytics/index.d.ts +11 -0
  186. package/dist/types/customMediaPlayer/analytics/utils/analytics.d.ts +19 -0
  187. package/dist/types/customMediaPlayer/analytics/utils/playbackAttributes.d.ts +24 -0
  188. package/dist/types/customMediaPlayer/icons.d.ts +3 -0
  189. package/dist/types/customMediaPlayer/index.d.ts +44 -30
  190. package/dist/types/customMediaPlayer/playbackSpeedControls.d.ts +1 -0
  191. package/dist/types/customMediaPlayer/timeRange.d.ts +1 -0
  192. package/dist/types/customMediaPlayer/types.d.ts +4 -0
  193. package/dist/types/index.d.ts +3 -1
  194. package/dist/types/locales.d.ts +4 -0
  195. package/dist/types/mediaImage/index.d.ts +2 -0
  196. package/dist/types/mediaImage/styled.d.ts +5 -2
  197. package/dist/types/messages.d.ts +1 -1
  198. package/dist/types/shortcut.d.ts +15 -4
  199. package/locales/package.json +7 -0
  200. package/package.json +17 -14
@@ -2,7 +2,7 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
 
3
3
  var _templateObject;
4
4
 
5
- import React from 'react';
5
+ import React, { useRef, useEffect } from 'react';
6
6
  import styled from 'styled-components';
7
7
  import * as exenv from 'exenv';
8
8
  var Wrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", ";\n"])), function (_ref) {
@@ -16,53 +16,55 @@ export var Ellipsify = function Ellipsify(_ref2) {
16
16
  endLength = _ref2.endLength,
17
17
  inline = _ref2.inline,
18
18
  testId = _ref2.testId;
19
- return /*#__PURE__*/React.createElement(Wrapper, {
20
- className: "ellipsed-text",
21
- innerRef: setEllipsis({
19
+ var element = useRef(null);
20
+ useEffect(function () {
21
+ if (!element.current) {
22
+ return;
23
+ }
24
+
25
+ setEllipsis(element.current, {
22
26
  lines: lines,
23
27
  endLength: endLength
24
- }),
28
+ });
29
+ }, [element, lines, endLength]);
30
+ return /*#__PURE__*/React.createElement(Wrapper, {
31
+ className: "ellipsed-text",
32
+ innerRef: element,
25
33
  "aria-label": text,
26
34
  inline: inline,
27
35
  "data-testid": testId
28
36
  }, text);
29
37
  };
30
38
 
31
- var setEllipsis = function setEllipsis(props) {
32
- return function (element) {
33
- if (!element) {
34
- return;
35
- }
39
+ var setEllipsis = function setEllipsis(element, props) {
40
+ var maximumLines = props.lines;
41
+ var height = element.getBoundingClientRect().height;
42
+ var text = element.textContent;
43
+ element.textContent = 'a';
44
+ var lineHeight = element.getBoundingClientRect().height;
45
+ var lineCount = height / lineHeight;
46
+ var maximumHeight = lineHeight * maximumLines;
36
47
 
37
- var maximumLines = props.lines;
38
- var height = element.getBoundingClientRect().height;
39
- var text = element.textContent;
40
- element.textContent = 'a';
41
- var lineHeight = element.getBoundingClientRect().height;
42
- var lineCount = height / lineHeight;
43
- var maximumHeight = lineHeight * maximumLines;
48
+ if (lineCount <= maximumLines) {
49
+ element.textContent = text;
50
+ return;
51
+ }
44
52
 
45
- if (lineCount <= maximumLines) {
46
- element.textContent = text;
47
- return;
48
- }
53
+ var textContent = text;
54
+ var endLength = typeof props.endLength === 'number' && props.endLength >= 0 ? props.endLength : 8;
55
+ var beginningText = text.substr(0, text.length * maximumLines / lineCount - endLength);
56
+ var endText = text.substr(text.length - endLength, endLength);
57
+ element.textContent = textContent = "".concat(beginningText, "...").concat(endText);
58
+ var finalHeight = element.getBoundingClientRect().height;
49
59
 
50
- var textContent = text;
51
- var endLength = typeof props.endLength === 'number' && props.endLength >= 0 ? props.endLength : 8;
52
- var beginningText = text.substr(0, text.length * maximumLines / lineCount - endLength);
53
- var endText = text.substr(text.length - endLength, endLength);
54
- element.textContent = textContent = "".concat(beginningText, "...").concat(endText);
55
- var finalHeight = element.getBoundingClientRect().height;
60
+ if (finalHeight > maximumHeight) {
61
+ var adjustedBeginningText = beginningText.substr(0, beginningText.length - beginningText.length / maximumLines * 0.25);
62
+ textContent = "".concat(adjustedBeginningText, "...").concat(endText);
63
+ }
56
64
 
57
- if (finalHeight > maximumHeight) {
58
- var adjustedBeginningText = beginningText.substr(0, beginningText.length - beginningText.length / maximumLines * 0.25);
59
- textContent = "".concat(adjustedBeginningText, "...").concat(endText);
60
- }
61
-
62
- delayRun(function () {
63
- return element.textContent = textContent;
64
- });
65
- };
65
+ delayRun(function () {
66
+ return element.textContent = textContent;
67
+ });
66
68
  };
67
69
 
68
70
  var timeout = function timeout(fn) {
package/dist/esm/index.js CHANGED
@@ -4,6 +4,7 @@ export { DownloadAction } from './BlockCard/actions/DownloadAction';
4
4
  export { ViewAction } from './BlockCard/actions/ViewAction';
5
5
  export { AuthorizeAction, BlockCardErroredView, BlockCardNotFoundView, BlockCardForbiddenView, BlockCardResolvedView, BlockCardResolvingView, BlockCardUnauthorisedView, ForbiddenAction, PreviewAction } from './BlockCard';
6
6
  export { InlineCardErroredView, InlineCardForbiddenView, InlineCardResolvedView, InlineCardResolvingView, InlineCardUnauthorizedView } from './InlineCard';
7
+ export { MediaInlineCardErroredView, MediaInlineCardLoadedView, MediaInlineCardLoadingView } from './MediaInlineCard';
7
8
  export { CardLinkView } from './LinkView';
8
9
  export { Ellipsify } from './ellipsify';
9
10
  export { toHumanReadableMediaSize } from './humanReadableSize';
@@ -16,7 +17,7 @@ export { InfiniteScroll } from './infiniteScroll';
16
17
  export { ExifOrientation, getCssFromImageOrientation, getImageInfo, getMetaTagNumericValue, getOrientation, getScaleFactor, getScaleFactorFromFile, isRotated, readImageMetaData } from './imageMetaData';
17
18
  export { dataURItoFile, fileToArrayBuffer, fileToDataURI, getFileInfo, getFileInfoFromSrc, loadImage, findParentByClassname, getMimeIcon } from './util';
18
19
  export { MimeTypeIcon } from './mime-type-icon';
19
- export { default as CustomMediaPlayer } from './customMediaPlayer/index';
20
+ export { CustomMediaPlayer } from './customMediaPlayer/index';
20
21
  export { TimeRange } from './customMediaPlayer/timeRange';
21
22
  export { hideControlsClassName } from './classNames';
22
23
  export { Shortcut, keyCodes } from './shortcut';
@@ -0,0 +1,3 @@
1
+ import * as untypedLocales from './i18n/index';
2
+ var locales = untypedLocales;
3
+ export { locales };
@@ -87,7 +87,9 @@ export var MediaImage = /*#__PURE__*/function (_Component) {
87
87
  crossOrigin = _this$props.crossOrigin,
88
88
  onImageError = _this$props.onImageError,
89
89
  _this$props$alt = _this$props.alt,
90
- alt = _this$props$alt === void 0 ? '' : _this$props$alt;
90
+ alt = _this$props$alt === void 0 ? '' : _this$props$alt,
91
+ loading = _this$props.loading,
92
+ forceSyncDisplay = _this$props.forceSyncDisplay;
91
93
  var _this$state = this.state,
92
94
  parentWidth = _this$state.parentWidth,
93
95
  parentHeight = _this$state.parentHeight,
@@ -290,7 +292,7 @@ export var MediaImage = /*#__PURE__*/function (_Component) {
290
292
  and we can do that only when image is loaded (and we have image size)
291
293
  */
292
294
 
293
- var showImage = isImageLoaded || isFitStrategy && !isImageRotated;
295
+ var showImage = forceSyncDisplay || isImageLoaded || isFitStrategy && !isImageRotated;
294
296
  var style = {
295
297
  transform: 'translate(-50%, -50%)'
296
298
  };
@@ -381,13 +383,14 @@ export var MediaImage = /*#__PURE__*/function (_Component) {
381
383
  }
382
384
 
383
385
  return /*#__PURE__*/React.createElement(ImageComponent, {
386
+ loading: loading,
384
387
  "data-testid": "media-image",
385
388
  draggable: false,
386
389
  alt: alt,
387
390
  style: style,
388
391
  onLoad: this.onImageLoad,
389
392
  onError: onImageError,
390
- innerRef: this.imageRef,
393
+ imageRef: this.imageRef,
391
394
  src: dataURI,
392
395
  crossOrigin: crossOrigin
393
396
  });
@@ -399,5 +402,6 @@ export var MediaImage = /*#__PURE__*/function (_Component) {
399
402
 
400
403
  _defineProperty(MediaImage, "defaultProps", {
401
404
  crop: true,
402
- stretch: false
405
+ stretch: false,
406
+ forceSyncDisplay: false
403
407
  });
@@ -1,6 +1,33 @@
1
- import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
2
4
 
3
- var _templateObject;
5
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
4
6
 
5
- import styled from 'styled-components';
6
- export var ImageComponent = styled.img(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n position: absolute;\n left: 50%;\n top: 50%;\n object-fit: contain;\n image-orientation: none;\n"])));
7
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
8
+
9
+ import React from 'react';
10
+ var imgStyle = {
11
+ position: 'absolute',
12
+ left: '50%',
13
+ top: '50%',
14
+ objectFit: 'contain',
15
+ imageOrientation: 'none'
16
+ };
17
+ /*
18
+ This image component falls back to using the native React CSS in JS styling because
19
+ in Styled Components 3.6.2 the additinoal loading property is stripped from the final html.
20
+ This is not the case when using the JSX <img> tag, it is also fixed in the latest versionm of
21
+ styled-components.
22
+ */
23
+
24
+ export var ImageComponent = function ImageComponent(props) {
25
+ var style = props.style,
26
+ imageRef = props.imageRef,
27
+ otherProps = _objectWithoutProperties(props, ["style", "imageRef"]);
28
+
29
+ return /*#__PURE__*/React.createElement("img", _extends({}, otherProps, {
30
+ ref: imageRef,
31
+ style: _objectSpread(_objectSpread({}, imgStyle), style)
32
+ }));
33
+ };
@@ -50,6 +50,11 @@ export var messages = defineMessages({
50
50
  defaultMessage: 'Failed to load',
51
51
  description: 'We show this message when we have an error loading a file'
52
52
  },
53
+ failed_to_upload: {
54
+ id: 'fabric.media.failed_to_upload',
55
+ defaultMessage: 'Failed to upload',
56
+ description: 'We show this message when we have an error uploading a file'
57
+ },
53
58
  recent_uploads: {
54
59
  id: 'fabric.media.recent_uploads',
55
60
  defaultMessage: 'Recent uploads',
@@ -442,12 +447,12 @@ export var messages = defineMessages({
442
447
  },
443
448
  play: {
444
449
  id: 'fabric.media.play',
445
- defaultMessage: 'play',
450
+ defaultMessage: 'Play',
446
451
  description: ''
447
452
  },
448
453
  pause: {
449
454
  id: 'fabric.media.pause',
450
- defaultMessage: 'pause',
455
+ defaultMessage: 'Pause',
451
456
  description: ''
452
457
  },
453
458
  disable_fullscreen: {
@@ -515,6 +520,11 @@ export var messages = defineMessages({
515
520
  defaultMessage: 'text',
516
521
  description: ''
517
522
  },
523
+ displayThumbnail: {
524
+ id: 'fabric.media.display_thumbnail',
525
+ defaultMessage: 'Display thumbnail',
526
+ description: 'Display file with as a thumbnail.'
527
+ },
518
528
  search: {
519
529
  id: 'fabric.media.search',
520
530
  defaultMessage: 'search',
@@ -540,6 +550,16 @@ export var messages = defineMessages({
540
550
  defaultMessage: 'Playback speed',
541
551
  description: 'In the context of a video player, it allows user to switch the speed of the video'
542
552
  },
553
+ skipBackward: {
554
+ id: 'fabric.media.skip_backward',
555
+ defaultMessage: 'Back 10 seconds',
556
+ description: 'In the context of a video player, it allows user to skip 10 seconds of play time backward.'
557
+ },
558
+ skipForward: {
559
+ id: 'fabric.media.skip_forward',
560
+ defaultMessage: 'Forward 10 seconds',
561
+ description: 'In the context of a video player, it allows user to skip 10 seconds of play time forward.'
562
+ },
543
563
  playbackDefaultSpeed: {
544
564
  id: 'fabric.media.playback_default_speed',
545
565
  defaultMessage: 'Default',
@@ -575,11 +595,6 @@ export var messages = defineMessages({
575
595
  defaultMessage: 'Error 429',
576
596
  description: 'Error 429 is thrown'
577
597
  },
578
- preview_rateLimited: {
579
- id: 'fabric.media.preview_rateLimited',
580
- defaultMessage: 'We had difficulties creating a preview',
581
- description: 'The preview is rate limited'
582
- },
583
598
  close_and_reopen: {
584
599
  id: 'fabric.media.close_and_reopen',
585
600
  defaultMessage: 'Try closing this file and reopening.',
@@ -12,8 +12,10 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
12
12
 
13
13
  import { Component } from 'react';
14
14
  export var keyCodes = {
15
- space: 32,
16
- m: 77
15
+ space: 'Space',
16
+ m: 'KeyM',
17
+ rightArrow: 'ArrowRight',
18
+ leftArrow: 'ArrowLeft'
17
19
  };
18
20
  export var Shortcut = /*#__PURE__*/function (_Component) {
19
21
  _inherits(Shortcut, _Component);
@@ -33,10 +35,15 @@ export var Shortcut = /*#__PURE__*/function (_Component) {
33
35
 
34
36
  _defineProperty(_assertThisInitialized(_this), "keyHandler", function (e) {
35
37
  var _this$props = _this.props,
36
- keyCode = _this$props.keyCode,
37
- handler = _this$props.handler;
38
+ handler = _this$props.handler,
39
+ code = _this$props.code,
40
+ keyCode = _this$props.keyCode;
38
41
 
39
- if (e.keyCode === keyCode) {
42
+ if (keyCode !== undefined && e.keyCode === keyCode) {
43
+ handler();
44
+ }
45
+
46
+ if (code !== undefined && e.code === code) {
40
47
  handler();
41
48
  }
42
49
  });
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/media-ui",
3
- "version": "16.5.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;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { HeaderComponentProps } from '@atlaskit/modal-dialog';
2
+ import { ModalHeaderProps as HeaderComponentProps } from '@atlaskit/modal-dialog';
3
3
  import { IconProps } from './Icon';
4
4
  import { MetadataListProps } from './MetadataList';
5
5
  export interface HeaderProps extends HeaderComponentProps {
@@ -14,4 +14,4 @@ export interface HeaderProps extends HeaderComponentProps {
14
14
  onViewActionClick?: () => void;
15
15
  onDownloadActionClick?: () => void;
16
16
  }
17
- export declare const Header: ({ onClose, title, label, metadata, icon, providerName, url, download, byline, onViewActionClick, onDownloadActionClick, }: HeaderProps) => JSX.Element;
17
+ export declare const Header: ({ title, label, metadata, icon, providerName, url, download, byline, onViewActionClick, onDownloadActionClick, }: HeaderProps) => 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;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ export interface MediaInlineCardErroredViewProps {
3
+ /** The error message to display */
4
+ message: string;
5
+ /** The optional click handler */
6
+ onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
7
+ /** A flag that determines whether the card is selected in edit mode. */
8
+ isSelected?: boolean;
9
+ /** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
10
+ testId?: string;
11
+ icon?: React.ReactNode;
12
+ }
13
+ export declare class MediaInlineCardErroredView extends React.Component<MediaInlineCardErroredViewProps> {
14
+ renderMessage: () => JSX.Element;
15
+ render(): JSX.Element;
16
+ }
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export interface FrameViewProps {
3
+ /** A flag that determines whether the card is selected in edit mode. */
4
+ isSelected?: boolean;
5
+ isInteractive?: boolean;
6
+ children?: React.ReactNode;
7
+ /** The optional click handler */
8
+ onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
9
+ /** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
10
+ testId?: string;
11
+ }
12
+ export declare class Frame extends React.Component<FrameViewProps> {
13
+ handleClick: (event: React.MouseEvent<HTMLDivElement>) => void;
14
+ handleKeyPress: (event: React.KeyboardEvent<HTMLDivElement>) => void;
15
+ handleMouseDown: (e: React.MouseEvent) => void;
16
+ render(): JSX.Element;
17
+ }
@@ -0,0 +1,5 @@
1
+ import { HTMLAttributes, ComponentClass } from 'react';
2
+ export interface WrapperProps {
3
+ isSelected?: boolean;
4
+ }
5
+ export declare const Wrapper: ComponentClass<HTMLAttributes<{}> & WrapperProps>;
@@ -0,0 +1,3 @@
1
+ import { ComponentClass, HTMLAttributes, ImgHTMLAttributes } from 'react';
2
+ export declare const Icon: ComponentClass<ImgHTMLAttributes<{}>>;
3
+ export declare const AKIconWrapper: ComponentClass<HTMLAttributes<{}>>;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ export interface IconAndTitleLayoutProps {
3
+ emoji?: React.ReactNode;
4
+ icon?: React.ReactNode;
5
+ title: React.ReactNode;
6
+ right?: React.ReactNode;
7
+ titleColor?: string;
8
+ children?: React.ReactNode;
9
+ defaultIcon?: React.ReactNode;
10
+ testId?: string;
11
+ }
12
+ export declare class IconAndTitleLayout extends React.Component<IconAndTitleLayoutProps> {
13
+ private renderAtlaskitIcon;
14
+ private renderImageIcon;
15
+ private renderIconPlaceholder;
16
+ renderIcon(testId: string): JSX.Element;
17
+ render(): JSX.Element;
18
+ }
@@ -0,0 +1,12 @@
1
+ /// <reference types="react" />
2
+ export declare const IconObjectOverrides = "\n & > span {\n height: 16px;\n width: 14px;\n position: absolute;\n top: 0;\n left: 0;\n line-height: 14px;\n & > svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n";
3
+ export declare const IconOverrides = "\n & > * > span {\n height: 16px;\n width: 14px;\n position: absolute;\n top: 0;\n left: 0;\n & > svg {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n";
4
+ export declare const IconWrapper: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
5
+ export declare const EmojiWrapper: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
6
+ export declare const IconTitleWrapper: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
7
+ export declare const LozengeWrapper: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
8
+ export declare const LozengeBlockWrapper: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
9
+ export declare const RightIconPositionWrapper: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
10
+ export declare const IconPositionWrapper: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
11
+ export declare const IconEmptyWrapper: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
12
+ export declare const TitleWrapper: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ export interface MediaInlineCardLoadedViewProps {
3
+ /** The optional con of the service (e.g. Dropbox/Asana/Google/etc) to display */
4
+ icon?: React.ReactNode;
5
+ /** The name of the resource */
6
+ title?: string;
7
+ /** A flag that determines whether the card is selected in edit mode. */
8
+ isSelected?: boolean;
9
+ /** The optional click handler */
10
+ onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
11
+ /** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
12
+ testId?: string;
13
+ /** The Emoji icon prefix that was added to the title text via Add emoji button */
14
+ titlePrefix?: React.ReactNode;
15
+ }
16
+ export declare class MediaInlineCardLoadedView extends React.Component<MediaInlineCardLoadedViewProps> {
17
+ render(): JSX.Element;
18
+ }
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { InlinePreloaderStyle } from '../../types';
3
+ export interface MediaInlineCardLoadingViewProps {
4
+ /** The file name to display */
5
+ message: string;
6
+ inlinePreloaderStyle?: InlinePreloaderStyle;
7
+ /** The optional click handler */
8
+ onClick?: React.EventHandler<React.MouseEvent | React.KeyboardEvent>;
9
+ /** A flag that determines whether the card is selected in edit mode. */
10
+ isSelected?: boolean;
11
+ /** A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests */
12
+ testId?: string;
13
+ withoutHover?: boolean;
14
+ }
15
+ export declare class MediaInlineCardLoadingView extends React.Component<MediaInlineCardLoadingViewProps> {
16
+ render(): JSX.Element;
17
+ }
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const SpinnerWrapper: import("styled-components").StyledComponentClass<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, any, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;
@@ -0,0 +1,6 @@
1
+ export { MediaInlineCardLoadingView } from './LoadingView';
2
+ export type { MediaInlineCardLoadingViewProps } from './LoadingView';
3
+ export { MediaInlineCardLoadedView } from './LoadedView';
4
+ export type { MediaInlineCardLoadedViewProps } from './LoadedView';
5
+ export { MediaInlineCardErroredView } from './ErroredView';
6
+ export type { MediaInlineCardErroredViewProps } from './ErroredView';
@@ -0,0 +1,2 @@
1
+ import { ComponentClass, HTMLAttributes } from 'react';
2
+ export declare const NoLinkAppearance: ComponentClass<HTMLAttributes<{}>>;
@@ -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';
@@ -0,0 +1,5 @@
1
+ import { ScreenAttributes, ScreenEventPayload } from '@atlaskit/media-common';
2
+ import { PlaybackState, WithPlaybackAttributes } from '../../utils/playbackAttributes';
3
+ import { CustomMediaPlayerType, WithCustomMediaPlayerType } from '../../../types';
4
+ export declare type CustomMediaPlayerScreenEventPayload = ScreenEventPayload<ScreenAttributes & WithPlaybackAttributes & WithCustomMediaPlayerType, 'customMediaPlayerScreen'>;
5
+ export declare const createCustomMediaPlayerScreenEvent: (type: CustomMediaPlayerType, playbackState: PlaybackState, fileId?: string | undefined) => CustomMediaPlayerScreenEventPayload;
@@ -0,0 +1,5 @@
1
+ import { TrackAttributes, TrackEventPayload } from '@atlaskit/media-common';
2
+ import { PlaybackState, WithPlaybackAttributes } from '../../utils/playbackAttributes';
3
+ import { CustomMediaPlayerType, WithCustomMediaPlayerType } from '../../../types';
4
+ export declare type FirstPlayedTrackEventPayload = TrackEventPayload<TrackAttributes & WithPlaybackAttributes & WithCustomMediaPlayerType, 'firstPlayed', 'customMediaPlayer'>;
5
+ export declare const createFirstPlayedTrackEvent: (type: CustomMediaPlayerType, playbackState: PlaybackState, fileId?: string | undefined) => FirstPlayedTrackEventPayload;
@@ -0,0 +1,5 @@
1
+ import { TrackAttributes, TrackEventPayload } from '@atlaskit/media-common';
2
+ import { PlaybackState, WithPlaybackAttributes } from '../../utils/playbackAttributes';
3
+ import { CustomMediaPlayerType, WithCustomMediaPlayerType } from '../../../types';
4
+ export declare type PlayedTrackEventPayload = TrackEventPayload<TrackAttributes & WithPlaybackAttributes & WithCustomMediaPlayerType, 'played', 'customMediaPlayer'>;
5
+ export declare const createPlayedTrackEvent: (type: CustomMediaPlayerType, playbackState: PlaybackState, fileId?: string | undefined) => PlayedTrackEventPayload;
@@ -0,0 +1,5 @@
1
+ import { UIAttributes, UIEventPayload } from '@atlaskit/media-common';
2
+ import { PlaybackState, WithPlaybackAttributes } from '../../utils/playbackAttributes';
3
+ import { CustomMediaPlayerType, WithCustomMediaPlayerType } from '../../../types';
4
+ export declare type MediaButtonClickEventPayload = UIEventPayload<UIAttributes & WithPlaybackAttributes & WithCustomMediaPlayerType, 'clicked', 'button'>;
5
+ export declare function createMediaButtonClickedEvent(type: CustomMediaPlayerType, playbackState: PlaybackState, buttonType?: string, fileId?: string): MediaButtonClickEventPayload;
@@ -0,0 +1,5 @@
1
+ import { UIAttributes, UIEventPayload } from '@atlaskit/media-common';
2
+ import { PlaybackState, WithPlaybackAttributes } from '../../utils/playbackAttributes';
3
+ import { CustomMediaPlayerType, WithCustomMediaPlayerType } from '../../../types';
4
+ export declare type PlayPauseBlanketClickEventPayload = UIEventPayload<UIAttributes & WithPlaybackAttributes & WithCustomMediaPlayerType, 'clicked', 'playPauseBlanket'>;
5
+ export declare function createPlayPauseBlanketClickedEvent(type: CustomMediaPlayerType, playbackState: PlaybackState, fileId?: string): PlayPauseBlanketClickEventPayload;
@@ -0,0 +1,5 @@
1
+ import { UIAttributes, UIEventPayload } from '@atlaskit/media-common';
2
+ import { PlaybackState, WithPlaybackAttributes } from '../../utils/playbackAttributes';
3
+ import { CustomMediaPlayerType, WithCustomMediaPlayerType } from '../../../types';
4
+ export declare type PlaybackSpeedChangeEventPayload = UIEventPayload<UIAttributes & WithPlaybackAttributes & WithCustomMediaPlayerType, 'changed', 'playbackSpeed'>;
5
+ export declare function createPlaybackSpeedChangedEvent(type: CustomMediaPlayerType, playbackState: PlaybackState, fileId?: string): PlaybackSpeedChangeEventPayload;
@@ -0,0 +1,5 @@
1
+ import { UIAttributes, UIEventPayload } from '@atlaskit/media-common';
2
+ import { PlaybackState, WithPlaybackAttributes } from '../../utils/playbackAttributes';
3
+ import { CustomMediaPlayerType, WithCustomMediaPlayerType } from '../../../types';
4
+ export declare type ShortcutPressEventPayload = UIEventPayload<UIAttributes & WithPlaybackAttributes & WithCustomMediaPlayerType, 'pressed', 'shortcut'>;
5
+ export declare function createMediaShortcutPressedEvent(type: CustomMediaPlayerType, playbackState: PlaybackState, shortcutType?: string, fileId?: string): ShortcutPressEventPayload;
@@ -0,0 +1,5 @@
1
+ import { UIAttributes, UIEventPayload } from '@atlaskit/media-common';
2
+ import { PlaybackState, WithPlaybackAttributes } from '../../utils/playbackAttributes';
3
+ import { CustomMediaPlayerType, WithCustomMediaPlayerType } from '../../../types';
4
+ export declare type TimeRangeNavigateEventPayload = UIEventPayload<UIAttributes & WithPlaybackAttributes & WithCustomMediaPlayerType, 'navigated', 'timeRange'>;
5
+ export declare function createTimeRangeNavigatedEvent(type: CustomMediaPlayerType, playbackState: PlaybackState, actionSubjectId?: string, fileId?: string): TimeRangeNavigateEventPayload;