@atlaskit/media-card 74.1.4 → 74.1.5

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 (154) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/classnames/package.json +1 -1
  3. package/dist/cjs/root/card/getCardPreview/helpers.js +4 -4
  4. package/dist/cjs/root/card/getCardPreview/index.js +1 -1
  5. package/dist/cjs/root/card/index.js +1 -1
  6. package/dist/cjs/root/inlinePlayer.js +2 -2
  7. package/dist/cjs/utils/ufoExperiences.js +1 -1
  8. package/dist/cjs/version.json +1 -1
  9. package/dist/es2019/root/card/getCardPreview/helpers.js +4 -4
  10. package/dist/es2019/root/card/getCardPreview/index.js +1 -1
  11. package/dist/es2019/root/card/index.js +1 -1
  12. package/dist/es2019/root/inlinePlayer.js +2 -2
  13. package/dist/es2019/utils/ufoExperiences.js +1 -1
  14. package/dist/es2019/version.json +1 -1
  15. package/dist/esm/root/card/getCardPreview/helpers.js +4 -4
  16. package/dist/esm/root/card/getCardPreview/index.js +1 -1
  17. package/dist/esm/root/card/index.js +1 -1
  18. package/dist/esm/root/inlinePlayer.js +2 -2
  19. package/dist/esm/utils/ufoExperiences.js +1 -1
  20. package/dist/esm/version.json +1 -1
  21. package/dist/types-ts4.0/__tests_external__/index.d.ts +1 -0
  22. package/dist/types-ts4.0/__tests_external__/page-objects/MediaCard.d.ts +8 -0
  23. package/dist/types-ts4.0/actions.d.ts +9 -0
  24. package/dist/types-ts4.0/classnames.d.ts +1 -0
  25. package/dist/types-ts4.0/errors.d.ts +41 -0
  26. package/dist/types-ts4.0/files/cardImageView/cardImageViewWrapper.d.ts +6 -0
  27. package/dist/types-ts4.0/files/cardImageView/cardOverlay/cardOverlayComponents.d.ts +8 -0
  28. package/dist/types-ts4.0/files/cardImageView/cardOverlay/index.d.ts +39 -0
  29. package/dist/types-ts4.0/files/cardImageView/cardOverlay/styles.d.ts +26 -0
  30. package/dist/types-ts4.0/files/cardImageView/classnames.d.ts +2 -0
  31. package/dist/types-ts4.0/files/cardImageView/index.d.ts +50 -0
  32. package/dist/types-ts4.0/files/cardImageView/styles.d.ts +24 -0
  33. package/dist/types-ts4.0/files/index.d.ts +2 -0
  34. package/dist/types-ts4.0/in-product.d.ts +1 -0
  35. package/dist/types-ts4.0/index.d.ts +77 -0
  36. package/dist/types-ts4.0/root/card/cardAnalytics.d.ts +9 -0
  37. package/dist/types-ts4.0/root/card/cardConstants.d.ts +1 -0
  38. package/dist/types-ts4.0/root/card/cardLoader.d.ts +6 -0
  39. package/dist/types-ts4.0/root/card/cardState.d.ts +5 -0
  40. package/dist/types-ts4.0/root/card/getCardPreview/cache.d.ts +19 -0
  41. package/dist/types-ts4.0/root/card/getCardPreview/filePreviewStatus.d.ts +5 -0
  42. package/dist/types-ts4.0/root/card/getCardPreview/helpers.d.ts +9 -0
  43. package/dist/types-ts4.0/root/card/getCardPreview/index.d.ts +56 -0
  44. package/dist/types-ts4.0/root/card/getCardStatus.d.ts +4 -0
  45. package/dist/types-ts4.0/root/card/imageRefetchingAnalytics.d.ts +10 -0
  46. package/dist/types-ts4.0/root/card/index.d.ts +58 -0
  47. package/dist/types-ts4.0/root/cardView.d.ts +80 -0
  48. package/dist/types-ts4.0/root/cardViewWrapper.d.ts +4 -0
  49. package/dist/types-ts4.0/root/index.d.ts +2 -0
  50. package/dist/types-ts4.0/root/inline/loader.d.ts +25 -0
  51. package/dist/types-ts4.0/root/inline/mediaInlineCard.d.ts +14 -0
  52. package/dist/types-ts4.0/root/inlinePlayer.d.ts +51 -0
  53. package/dist/types-ts4.0/root/inlinePlayerLazy.d.ts +2 -0
  54. package/dist/types-ts4.0/root/inlinePlayerWrapper.d.ts +4 -0
  55. package/dist/types-ts4.0/root/media-card-analytics-error-boundary.d.ts +10 -0
  56. package/dist/types-ts4.0/root/styles.d.ts +10 -0
  57. package/dist/types-ts4.0/root/types.d.ts +24 -0
  58. package/dist/types-ts4.0/root/ui/actionsBar/actionsBar.d.ts +5 -0
  59. package/dist/types-ts4.0/root/ui/actionsBar/actionsBarWrapper.d.ts +4 -0
  60. package/dist/types-ts4.0/root/ui/actionsBar/styles.d.ts +6 -0
  61. package/dist/types-ts4.0/root/ui/actionsBar/types.d.ts +10 -0
  62. package/dist/types-ts4.0/root/ui/blanket/blanket.d.ts +6 -0
  63. package/dist/types-ts4.0/root/ui/blanket/styles.d.ts +6 -0
  64. package/dist/types-ts4.0/root/ui/common.d.ts +23 -0
  65. package/dist/types-ts4.0/root/ui/iconMessage/iconMessageWrapper.d.ts +4 -0
  66. package/dist/types-ts4.0/root/ui/iconMessage/index.d.ts +8 -0
  67. package/dist/types-ts4.0/root/ui/iconMessage/styles.d.ts +5 -0
  68. package/dist/types-ts4.0/root/ui/iconMessage/types.d.ts +19 -0
  69. package/dist/types-ts4.0/root/ui/iconWrapper/iconWrapper.d.ts +4 -0
  70. package/dist/types-ts4.0/root/ui/iconWrapper/styles.d.ts +7 -0
  71. package/dist/types-ts4.0/root/ui/iconWrapper/types.d.ts +6 -0
  72. package/dist/types-ts4.0/root/ui/imageRenderer/imageRenderer.d.ts +15 -0
  73. package/dist/types-ts4.0/root/ui/loadingRateLimited/styles.d.ts +13 -0
  74. package/dist/types-ts4.0/root/ui/newFileExperience/newFileExperienceWrapper.d.ts +4 -0
  75. package/dist/types-ts4.0/root/ui/newFileExperience/styles.d.ts +5 -0
  76. package/dist/types-ts4.0/root/ui/newFileExperience/types.d.ts +23 -0
  77. package/dist/types-ts4.0/root/ui/playButton/playButton.d.ts +2 -0
  78. package/dist/types-ts4.0/root/ui/playButton/playButtonBackground.d.ts +3 -0
  79. package/dist/types-ts4.0/root/ui/playButton/playButtonWrapper.d.ts +3 -0
  80. package/dist/types-ts4.0/root/ui/playButton/styles.d.ts +5 -0
  81. package/dist/types-ts4.0/root/ui/progressBar/progressBar.d.ts +10 -0
  82. package/dist/types-ts4.0/root/ui/progressBar/styledBar.d.ts +4 -0
  83. package/dist/types-ts4.0/root/ui/progressBar/styles.d.ts +7 -0
  84. package/dist/types-ts4.0/root/ui/progressBar/types.d.ts +7 -0
  85. package/dist/types-ts4.0/root/ui/styles.d.ts +11 -0
  86. package/dist/types-ts4.0/root/ui/tickBox/styles.d.ts +7 -0
  87. package/dist/types-ts4.0/root/ui/tickBox/tickBox.d.ts +3 -0
  88. package/dist/types-ts4.0/root/ui/tickBox/tickBoxWrapper.d.ts +4 -0
  89. package/dist/types-ts4.0/root/ui/tickBox/types.d.ts +4 -0
  90. package/dist/types-ts4.0/root/ui/titleBox/failedTitleBox.d.ts +3 -0
  91. package/dist/types-ts4.0/root/ui/titleBox/styles.d.ts +15 -0
  92. package/dist/types-ts4.0/root/ui/titleBox/titleBox.d.ts +4 -0
  93. package/dist/types-ts4.0/root/ui/titleBox/titleBoxComponents.d.ts +8 -0
  94. package/dist/types-ts4.0/root/ui/titleBox/types.d.ts +32 -0
  95. package/dist/types-ts4.0/styles/animations.d.ts +1 -0
  96. package/dist/types-ts4.0/styles/config.d.ts +1 -0
  97. package/dist/types-ts4.0/styles/easing.d.ts +2 -0
  98. package/dist/types-ts4.0/styles/getSelectedBorderStyle.d.ts +3 -0
  99. package/dist/types-ts4.0/styles/index.d.ts +9 -0
  100. package/dist/types-ts4.0/styles/mixins.d.ts +21 -0
  101. package/dist/types-ts4.0/types.d.ts +25 -0
  102. package/dist/types-ts4.0/utils/analytics.d.ts +78 -0
  103. package/dist/types-ts4.0/utils/breakpoint.d.ts +11 -0
  104. package/dist/types-ts4.0/utils/cardActions/cardActionButton.d.ts +4 -0
  105. package/dist/types-ts4.0/utils/cardActions/cardActionIconButton.d.ts +12 -0
  106. package/dist/types-ts4.0/utils/cardActions/cardActionsDropdownMenu.d.ts +14 -0
  107. package/dist/types-ts4.0/utils/cardActions/cardActionsView.d.ts +16 -0
  108. package/dist/types-ts4.0/utils/cardActions/index.d.ts +7 -0
  109. package/dist/types-ts4.0/utils/cardActions/styles.d.ts +18 -0
  110. package/dist/types-ts4.0/utils/cardDimensions.d.ts +53 -0
  111. package/dist/types-ts4.0/utils/containsPixelUnit.d.ts +1 -0
  112. package/dist/types-ts4.0/utils/dimensionComparer.d.ts +3 -0
  113. package/dist/types-ts4.0/utils/document.d.ts +2 -0
  114. package/dist/types-ts4.0/utils/errorIcon/index.d.ts +12 -0
  115. package/dist/types-ts4.0/utils/errorIcon/styles.d.ts +1 -0
  116. package/dist/types-ts4.0/utils/fileIcon/index.d.ts +12 -0
  117. package/dist/types-ts4.0/utils/fileIcon/styles.d.ts +1 -0
  118. package/dist/types-ts4.0/utils/generateUniqueId.d.ts +1 -0
  119. package/dist/types-ts4.0/utils/getCSSUnitValue.d.ts +1 -0
  120. package/dist/types-ts4.0/utils/getDataURIDimension.d.ts +9 -0
  121. package/dist/types-ts4.0/utils/getElementDimension.d.ts +2 -0
  122. package/dist/types-ts4.0/utils/getErrorMessage.d.ts +2 -0
  123. package/dist/types-ts4.0/utils/getMediaCardCursor.d.ts +6 -0
  124. package/dist/types-ts4.0/utils/globalScope/getSSRData.d.ts +3 -0
  125. package/dist/types-ts4.0/utils/globalScope/globalScope.d.ts +21 -0
  126. package/dist/types-ts4.0/utils/globalScope/index.d.ts +4 -0
  127. package/dist/types-ts4.0/utils/globalScope/types.d.ts +8 -0
  128. package/dist/types-ts4.0/utils/index.d.ts +15 -0
  129. package/dist/types-ts4.0/utils/isRetina.d.ts +1 -0
  130. package/dist/types-ts4.0/utils/isValidPercentageUnit.d.ts +1 -0
  131. package/dist/types-ts4.0/utils/lightCards/cardError.d.ts +12 -0
  132. package/dist/types-ts4.0/utils/lightCards/cardLoading.d.ts +5 -0
  133. package/dist/types-ts4.0/utils/lightCards/getDimensionsWithDefault.d.ts +2 -0
  134. package/dist/types-ts4.0/utils/lightCards/lightCardWrappers.d.ts +5 -0
  135. package/dist/types-ts4.0/utils/lightCards/styles.d.ts +4 -0
  136. package/dist/types-ts4.0/utils/lightCards/types.d.ts +15 -0
  137. package/dist/types-ts4.0/utils/mediaTypeIcon/iconWrapper.d.ts +4 -0
  138. package/dist/types-ts4.0/utils/mediaTypeIcon/index.d.ts +10 -0
  139. package/dist/types-ts4.0/utils/mediaTypeIcon/styles.d.ts +2 -0
  140. package/dist/types-ts4.0/utils/mediaTypeIcon/types.d.ts +6 -0
  141. package/dist/types-ts4.0/utils/metadata.d.ts +2 -0
  142. package/dist/types-ts4.0/utils/objectURLCache.d.ts +11 -0
  143. package/dist/types-ts4.0/utils/preventClickThrough.d.ts +8 -0
  144. package/dist/types-ts4.0/utils/printScript.d.ts +2 -0
  145. package/dist/types-ts4.0/utils/progressBar/index.d.ts +9 -0
  146. package/dist/types-ts4.0/utils/progressBar/styles.d.ts +1 -0
  147. package/dist/types-ts4.0/utils/resizeModeToMediaImageProps.d.ts +5 -0
  148. package/dist/types-ts4.0/utils/shouldDisplayImageThumbnail.d.ts +3 -0
  149. package/dist/types-ts4.0/utils/ufoExperiences.d.ts +7 -0
  150. package/dist/types-ts4.0/utils/videoSnapshot.d.ts +1 -0
  151. package/dist/types-ts4.0/utils/viewportDetector.d.ts +6 -0
  152. package/in-product/package.json +1 -1
  153. package/package.json +9 -2
  154. package/types/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const PlayButton: () => JSX.Element;
@@ -0,0 +1,3 @@
1
+ /**@jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ export declare const PlayButtonBackground: () => jsx.JSX.Element;
@@ -0,0 +1,3 @@
1
+ /**@jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ export declare const PlayButtonWrapper: (props: any) => jsx.JSX.Element;
@@ -0,0 +1,5 @@
1
+ export declare const playButtonClassName = "media-card-play-button";
2
+ export declare const bkgClassName = "play-icon-background";
3
+ export declare const fixedPlayButtonStyles: string;
4
+ export declare const playButtonWrapperStyles: import("@emotion/react").SerializedStyles;
5
+ export declare const backgroundStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Breakpoint } from '../common';
3
+ export declare type ProgressBarProps = {
4
+ progress?: number;
5
+ breakpoint?: Breakpoint;
6
+ positionBottom?: boolean;
7
+ showOnTop?: boolean;
8
+ };
9
+ export declare const getNormalizedProgress: (progress?: number | undefined) => number;
10
+ export declare const ProgressBar: ({ progress, breakpoint, positionBottom, showOnTop, }: ProgressBarProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ /**@jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import { StyledBarProps } from './types';
4
+ export declare const StyledBar: (props: StyledBarProps) => jsx.JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { Breakpoint } from '../common';
2
+ import { StyledBarProps } from './types';
3
+ export declare function generateResponsiveStyles(breakpoint: Breakpoint, positionBottom: boolean, showOnTop: boolean, multiplier?: number): string;
4
+ export declare const styledBarStyles: {
5
+ (props: StyledBarProps): import("@emotion/react").SerializedStyles;
6
+ displayName: string;
7
+ };
@@ -0,0 +1,7 @@
1
+ import { Breakpoint } from '../common';
2
+ export declare type StyledBarProps = {
3
+ progress?: number;
4
+ breakpoint: Breakpoint;
5
+ positionBottom: boolean;
6
+ showOnTop: boolean;
7
+ };
@@ -0,0 +1,11 @@
1
+ import { CardDimensions, CardAppearance } from '../..';
2
+ import { Breakpoint } from './common';
3
+ import { MediaCardCursor } from '../../types';
4
+ export declare const calcBreakpointSize: (wrapperWidth?: number) => Breakpoint;
5
+ export declare const generateResponsiveStyles: (breakpoint?: Breakpoint) => string;
6
+ export declare const getWrapperDimensions: (dimensions?: CardDimensions | undefined, appearance?: CardAppearance | undefined) => string;
7
+ export declare const getWrapperShadow: (disableOverlay: boolean, selected: boolean) => string;
8
+ export declare const getCursorStyle: (cursor: MediaCardCursor | undefined) => string;
9
+ export declare const getClickablePlayButtonStyles: (isPlayButtonClickable: boolean) => string;
10
+ export declare const getSelectableTickBoxStyles: (isTickBoxSelectable: boolean) => string;
11
+ export declare const cardImageContainerStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,7 @@
1
+ export declare const tickBoxClassName = "media-card-tickbox";
2
+ export declare const tickboxFixedStyles: string;
3
+ export declare const getSelectedStyles: (selected?: boolean | undefined) => string;
4
+ export declare const wrapperStyles: {
5
+ (selected?: boolean | undefined): import("@emotion/react").SerializedStyles;
6
+ displayName: string;
7
+ };
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { TickBoxProps } from './types';
3
+ export declare const TickBox: ({ selected }: TickBoxProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ /**@jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import { TickBoxProps } from './types';
4
+ export declare const TickBoxWrapper: (props: TickBoxProps) => jsx.JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare type TickBoxProps = {
2
+ selected?: boolean;
3
+ children?: any;
4
+ };
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { FailedTitleBoxProps } from './types';
3
+ export declare const FailedTitleBox: React.FC<FailedTitleBoxProps>;
@@ -0,0 +1,15 @@
1
+ import { TitleBoxFooterProps, TitleBoxHeaderProps, TitleBoxWrapperProps } from './types';
2
+ export declare const titleBoxWrapperStyles: {
3
+ ({ breakpoint, titleBoxBgColor, }: TitleBoxWrapperProps): import("@emotion/react").SerializedStyles;
4
+ displayName: string;
5
+ };
6
+ export declare const titleBoxHeaderStyles: {
7
+ ({ hasIconOverlap, }: TitleBoxHeaderProps): import("@emotion/react").SerializedStyles;
8
+ displayName: string;
9
+ };
10
+ export declare const titleBoxFooterStyles: {
11
+ ({ hasIconOverlap, }: TitleBoxFooterProps): import("@emotion/react").SerializedStyles;
12
+ displayName: string;
13
+ };
14
+ export declare const titleBoxIconStyles: import("@emotion/react").SerializedStyles;
15
+ export declare const errorMessageWrapperStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { FormattedDateProps, TitleBoxProps } from './types';
3
+ export declare const FormattedDate: React.ComponentType<FormattedDateProps>;
4
+ export declare const TitleBox: ({ name, createdAt, breakpoint, titleBoxBgColor, titleBoxIcon, }: TitleBoxProps) => JSX.Element;
@@ -0,0 +1,8 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import { TitleBoxFooterProps, TitleBoxHeaderProps, TitleBoxWrapperProps } from './types';
4
+ export declare const TitleBoxWrapper: (props: TitleBoxWrapperProps) => jsx.JSX.Element;
5
+ export declare const TitleBoxHeader: (props: TitleBoxHeaderProps) => jsx.JSX.Element;
6
+ export declare const TitleBoxFooter: (props: TitleBoxFooterProps) => jsx.JSX.Element;
7
+ export declare const TitleBoxIcon: (props: any) => jsx.JSX.Element;
8
+ export declare const ErrorMessageWrapper: (props: any) => jsx.JSX.Element;
@@ -0,0 +1,32 @@
1
+ /// <reference types="react" />
2
+ import { MessageDescriptor } from 'react-intl-next';
3
+ import { Breakpoint } from '../common';
4
+ import { TitleBoxIcon as TitleBoxIconType } from '../../../index';
5
+ export declare type TitleBoxProps = {
6
+ name: string;
7
+ breakpoint: Breakpoint;
8
+ createdAt?: number;
9
+ titleBoxBgColor?: string;
10
+ titleBoxIcon?: TitleBoxIconType;
11
+ };
12
+ export declare type FormattedDateProps = {
13
+ timestamp: number;
14
+ };
15
+ export declare type TitleBoxWrapperProps = {
16
+ breakpoint: Breakpoint;
17
+ titleBoxBgColor?: string;
18
+ children?: JSX.Element | JSX.Element[] | any;
19
+ };
20
+ export declare type TitleBoxFooterProps = {
21
+ hasIconOverlap: boolean;
22
+ children?: JSX.Element;
23
+ };
24
+ export declare type TitleBoxHeaderProps = {
25
+ hasIconOverlap: boolean;
26
+ children?: JSX.Element;
27
+ };
28
+ export declare type OnRetryFunction = () => void;
29
+ export declare type FailedTitleBoxProps = {
30
+ breakpoint: Breakpoint;
31
+ customMessage?: MessageDescriptor;
32
+ };
@@ -0,0 +1 @@
1
+ export declare const spin: import("@emotion/react").Keyframes;
@@ -0,0 +1 @@
1
+ export declare const defaultTransitionDuration = ".3s";
@@ -0,0 +1,2 @@
1
+ export declare const easeOutCubic = "cubic-bezier(0.215, 0.61, 0.355, 1)";
2
+ export declare const easeOutExpo = "cubic-bezier(0.19, 1, 0.22, 1)";
@@ -0,0 +1,3 @@
1
+ export declare const getSelectedBorderStyle: ({ selected, }: {
2
+ selected?: boolean | undefined;
3
+ }) => string;
@@ -0,0 +1,9 @@
1
+ export { defaultTransitionDuration } from './config';
2
+ export { antialiased, borderRadiusLeft, capitalize, centerSelf, centerSelfX, centerSelfY, centerX, hexToRgb, rgba, spaceAround, transition, withAppearance, } from './mixins';
3
+ export type { WithAppearanceProps } from './mixins';
4
+ export { easeOutCubic, easeOutExpo } from './easing';
5
+ export { spin } from './animations';
6
+ export declare const rootStyles: () => import("@emotion/react").SerializedStyles;
7
+ export declare const cardShadow = "\n box-shadow: 0 1px 1px rgba(9, 30, 66, 0.2), 0 0 1px 0 rgba(9, 30, 66, 0.24);\n";
8
+ export declare const fadeinImageStyles: () => import("@emotion/react").SerializedStyles;
9
+ export default rootStyles;
@@ -0,0 +1,21 @@
1
+ import { CardAppearance } from '../index';
2
+ export declare const centerX = "\n display: flex;\n justify-content: center;\n";
3
+ export declare const antialiased = "\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n";
4
+ export declare const centerSelfY = "\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n";
5
+ export declare const centerSelfX = "\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n";
6
+ export declare const centerSelf = "\n position: absolute;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n";
7
+ export declare const borderRadiusLeft: string;
8
+ export declare const spaceAround = "\n display: flex;\n flex-direction: column;\n justify-content: space-around;\n";
9
+ export declare const transition: (propertyName?: string) => string;
10
+ export declare const hexToRgb: (hex: any) => string | null;
11
+ export declare const rgba: (hex: any, opacity: any) => string;
12
+ export declare const capitalize = "\n &::first-letter {\n text-transform: uppercase;\n }\n";
13
+ export interface WithAppearanceProps {
14
+ appearance?: CardAppearance;
15
+ }
16
+ export declare const withAppearance: (styleMap: {
17
+ image?: string | undefined;
18
+ auto?: string | undefined;
19
+ horizontal?: string | undefined;
20
+ square?: string | undefined;
21
+ }) => ({ appearance }: WithAppearanceProps) => string;
@@ -0,0 +1,25 @@
1
+ import { CardDimensions } from './utils';
2
+ export declare type CardStatus = 'uploading' | 'loading' | 'processing' | 'loading-preview' | 'complete' | 'error' | 'failed-processing';
3
+ export declare type FilePreviewStatus = {
4
+ hasFilesize: boolean;
5
+ isPreviewable: boolean;
6
+ hasPreview: boolean;
7
+ isSupportedByBrowser: boolean;
8
+ };
9
+ export declare type FileStateFlags = {
10
+ wasStatusProcessing: boolean;
11
+ wasStatusUploading: boolean;
12
+ };
13
+ export declare type CardAppearance = 'auto' | 'image' | 'square' | 'horizontal';
14
+ export declare type CardDimensionValue = number | string;
15
+ export declare type CardPreviewSource = 'local' | 'remote' | 'ssr-server' | 'ssr-client' | 'ssr-data' | 'cache-local' | 'cache-remote' | 'cache-ssr-client' | 'cache-ssr-server' | 'external';
16
+ export interface CardPreview {
17
+ dataURI: string;
18
+ orientation?: number;
19
+ dimensions?: CardDimensions;
20
+ source: CardPreviewSource;
21
+ }
22
+ export declare enum MediaCardCursor {
23
+ Action = "pointer",
24
+ NotReady = "wait"
25
+ }
@@ -0,0 +1,78 @@
1
+ import { FileDetails, MediaClientErrorReason, RequestMetadata } from '@atlaskit/media-client';
2
+ import { FileAttributes, PerformanceAttributes, OperationalEventPayload, UIEventPayload, WithFileAttributes, WithPerformanceAttributes, SuccessAttributes, FailureAttributes, ScreenEventPayload, ScreenAttributes } from '@atlaskit/media-common';
3
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
4
+ import { MediaCardError, MediaCardErrorPrimaryReason } from '../errors';
5
+ import { CardDimensions } from './cardDimensions';
6
+ import { CardPreviewSource } from '../types';
7
+ export declare type CardPreviewAttributes = {
8
+ fileId: string;
9
+ prevDimensions: CardDimensions | undefined;
10
+ currentDimensions: CardDimensions | undefined;
11
+ dimensionsPercentageDiff?: CardDimensions | undefined;
12
+ source: CardPreviewSource;
13
+ };
14
+ declare type WithCardPreviewCacheAttributes = {
15
+ cardPreviewAttributes: CardPreviewAttributes;
16
+ };
17
+ export declare const LOGGED_FEATURE_FLAGS: (keyof import("@atlaskit/media-common").MediaFeatureFlags)[];
18
+ export declare const LOGGED_FEATURE_FLAG_KEYS: string[];
19
+ export declare type FileUriFailReason = 'local-uri' | 'remote-uri' | `unknown-uri`;
20
+ export declare type FailedErrorFailReason = MediaCardErrorPrimaryReason | 'nativeError';
21
+ export declare type MediaCardErrorInfo = {
22
+ failReason: FailedErrorFailReason;
23
+ error: MediaClientErrorReason | 'nativeError';
24
+ errorDetail: string;
25
+ };
26
+ export declare type SSRStatusFail = MediaCardErrorInfo & {
27
+ status: 'fail';
28
+ };
29
+ declare type SSRStatusSuccess = SuccessAttributes;
30
+ declare type SSRStatusUnknown = {
31
+ status: 'unknown';
32
+ };
33
+ declare type SSRStatusAttributes = SSRStatusSuccess | SSRStatusFail | SSRStatusUnknown;
34
+ export declare type SSRStatus = {
35
+ server: SSRStatusAttributes;
36
+ client: SSRStatusAttributes;
37
+ };
38
+ export declare type WithSSRReliability = {
39
+ ssrReliability?: SSRStatus;
40
+ };
41
+ export declare type RenderFailedEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithSSRReliability & FailureAttributes & {
42
+ failReason: FailedErrorFailReason | 'failed-processing';
43
+ error?: MediaClientErrorReason | 'nativeError';
44
+ request?: RequestMetadata;
45
+ }, 'failed', 'mediaCardRender'>;
46
+ export declare type RenderSucceededEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithSSRReliability & SuccessAttributes, 'succeeded', 'mediaCardRender'>;
47
+ export declare type RenderCommencedEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes, 'commenced', 'mediaCardRender'>;
48
+ export declare type CacheHitEventPayload = OperationalEventPayload<WithCardPreviewCacheAttributes, 'cache-hit', 'mediaCardCache'>;
49
+ export declare type RemoteSuccessEventPayload = OperationalEventPayload<WithCardPreviewCacheAttributes, 'Remote-success', 'mediaCardCache'>;
50
+ export declare type CopiedFileEventPayload = UIEventPayload<{}, 'copied', string>;
51
+ export declare type ClickedEventPayload = UIEventPayload<{
52
+ label?: string;
53
+ }, 'clicked', string>;
54
+ export declare type RenderScreenEventPayload = Omit<ScreenEventPayload<ScreenAttributes, 'mediaCardRenderScreen'>, 'attributes'> & {
55
+ attributes: {
56
+ type: string | undefined;
57
+ fileAttributes: FileAttributes;
58
+ };
59
+ };
60
+ export declare type MediaCardAnalyticsEventPayload = RenderCommencedEventPayload | RenderSucceededEventPayload | RenderFailedEventPayload | CopiedFileEventPayload | ClickedEventPayload | RenderScreenEventPayload | CacheHitEventPayload | RemoteSuccessEventPayload;
61
+ export declare const getFileAttributes: (metadata: FileDetails, fileStatus?: import("@atlaskit/media-common").FileStatus | undefined) => FileAttributes;
62
+ export declare const getRenderPreviewableCardPayload: (fileAttributes: FileAttributes) => RenderScreenEventPayload;
63
+ export declare const getRenderCommencedEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes) => RenderCommencedEventPayload;
64
+ export declare const getRenderSucceededEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus) => RenderSucceededEventPayload;
65
+ export declare const getCacheHitEventPayload: (cardPreviewAttributes: CardPreviewAttributes) => CacheHitEventPayload;
66
+ export declare const getRemoteSuccessEventPayload: (cardPreviewAttributes: CardPreviewAttributes) => RemoteSuccessEventPayload;
67
+ export declare const getRenderFailedExternalUriPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes) => RenderFailedEventPayload;
68
+ export declare const getRenderErrorFailReason: (error: MediaCardError) => FailedErrorFailReason;
69
+ export declare const getRenderErrorErrorReason: (error: MediaCardError) => MediaClientErrorReason | 'nativeError';
70
+ export declare const getRenderErrorErrorDetail: (error: MediaCardError) => string;
71
+ export declare const getRenderErrorRequestMetadata: (error: MediaCardError) => RequestMetadata | undefined;
72
+ export declare const extractErrorInfo: (error: MediaCardError) => MediaCardErrorInfo;
73
+ export declare const getRenderErrorEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, error: MediaCardError, ssrReliability: SSRStatus) => RenderFailedEventPayload;
74
+ export declare const getRenderFailedFileStatusPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus) => RenderFailedEventPayload;
75
+ export declare const getCopiedFilePayload: (fileId: string) => CopiedFileEventPayload;
76
+ export declare function fireMediaCardEvent(payload: MediaCardAnalyticsEventPayload, createAnalyticsEvent?: CreateUIAnalyticsEvent): void;
77
+ export declare const createAndFireMediaCardEvent: (payload: MediaCardAnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
78
+ export {};
@@ -0,0 +1,11 @@
1
+ import { CardDimensionValue } from '../';
2
+ export declare type BreakpointSizeValue = 'small' | 'medium' | 'large' | 'xlarge';
3
+ export declare const breakpointSize: (width: CardDimensionValue, sizes?: any) => BreakpointSizeValue;
4
+ export interface BreakpointProps {
5
+ breakpointSize: BreakpointSizeValue;
6
+ }
7
+ export declare type CardBreakpoint = {
8
+ [P in BreakpointSizeValue]?: number;
9
+ };
10
+ export declare const cardBreakpointSizes: CardBreakpoint;
11
+ export declare const breakpointStyles: ({ breakpointSize }: BreakpointProps) => string;
@@ -0,0 +1,4 @@
1
+ /**@jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import { CardActionButtonOwnProps } from './styles';
4
+ export declare const CardActionButton: (props: CardActionButtonOwnProps) => jsx.JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { Component, ReactNode, MouseEvent } from 'react';
2
+ import { CardActionIconButtonVariant } from './styles';
3
+ export declare type CardActionIconButtonProps = {
4
+ readonly icon: ReactNode;
5
+ readonly variant?: CardActionIconButtonVariant;
6
+ readonly triggerColor?: string;
7
+ readonly onClick?: (event: MouseEvent<HTMLDivElement>) => void;
8
+ };
9
+ export declare class CardActionIconButton extends Component<CardActionIconButtonProps> {
10
+ render(): JSX.Element;
11
+ private onMouseDown;
12
+ }
@@ -0,0 +1,14 @@
1
+ import { Component } from 'react';
2
+ import { CardAction } from '../../actions';
3
+ import { CardActionIconButtonVariant } from './styles';
4
+ export declare type CardActionsDropdownMenuProps = {
5
+ readonly actions: CardAction[];
6
+ readonly triggerColor?: string;
7
+ readonly triggerVariant?: CardActionIconButtonVariant;
8
+ readonly onOpenChange?: (attrs: {
9
+ isOpen: boolean;
10
+ }) => void;
11
+ };
12
+ export declare class CardActionsDropdownMenu extends Component<CardActionsDropdownMenuProps> {
13
+ render(): JSX.Element | null;
14
+ }
@@ -0,0 +1,16 @@
1
+ import { Component } from 'react';
2
+ import { CardAction } from '../../actions';
3
+ import { CardActionIconButtonVariant } from './styles';
4
+ export interface CardActionsViewProps {
5
+ readonly actions: CardAction[];
6
+ readonly onToggle?: (attrs: {
7
+ isOpen: boolean;
8
+ }) => void;
9
+ readonly triggerColor?: string;
10
+ readonly variant?: CardActionIconButtonVariant;
11
+ }
12
+ export declare class CardActionsView extends Component<CardActionsViewProps> {
13
+ render(): JSX.Element | null;
14
+ private renderActionIconButton;
15
+ private renderOtherActionButtons;
16
+ }
@@ -0,0 +1,7 @@
1
+ export { CardActionsView as default, CardActionsView } from './cardActionsView';
2
+ export type { CardActionsViewProps } from './cardActionsView';
3
+ export { CardActionIconButton } from './cardActionIconButton';
4
+ export type { CardActionIconButtonProps } from './cardActionIconButton';
5
+ export { CardActionsDropdownMenu } from './cardActionsDropdownMenu';
6
+ export type { CardActionsDropdownMenuProps } from './cardActionsDropdownMenu';
7
+ export { CardActionIconButtonVariant } from './styles';
@@ -0,0 +1,18 @@
1
+ import React, { MouseEvent, HTMLAttributes } from 'react';
2
+ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
+ export declare const wrapperStyles: import("@emotion/react").SerializedStyles;
4
+ export declare enum CardActionIconButtonVariant {
5
+ default = "default",
6
+ filled = "filled"
7
+ }
8
+ export declare type CardActionButtonOwnProps = {
9
+ variant?: CardActionIconButtonVariant;
10
+ style?: {
11
+ color: string | undefined;
12
+ };
13
+ onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
14
+ onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
15
+ children?: React.ReactNode;
16
+ };
17
+ export declare type CardActionButtonProps = CardActionButtonOwnProps & HTMLAttributes<HTMLDivElement>;
18
+ export declare const cardActionButtonStyles: ({ variant, }: CardActionButtonProps) => import("@emotion/react").SerializedStyles;
@@ -0,0 +1,53 @@
1
+ import { CardAppearance, CardDimensionValue } from '../types';
2
+ export interface CardDimensions {
3
+ width?: CardDimensionValue;
4
+ height?: CardDimensionValue;
5
+ }
6
+ export declare const defaultSmallCardDimensions: {
7
+ width: string;
8
+ height: number;
9
+ };
10
+ export declare const defaultImageCardDimensions: {
11
+ width: number;
12
+ height: number;
13
+ };
14
+ export declare const defaultHorizontalCardDimensions: {
15
+ width: number;
16
+ height: number;
17
+ };
18
+ export declare const defaultSquareCardDimensions: {
19
+ width: number;
20
+ height: number;
21
+ };
22
+ export declare const minSmallCardDimensions: {
23
+ width: number;
24
+ height: number;
25
+ };
26
+ export declare const minImageCardDimensions: {
27
+ width: number;
28
+ height: number;
29
+ };
30
+ export declare const minSquareCardDimensions: {
31
+ width: number;
32
+ height: number;
33
+ };
34
+ export declare const minHorizontalCardDimensions: {
35
+ width: number;
36
+ height: number;
37
+ };
38
+ export declare const maxImageCardDimensions: {
39
+ width: number;
40
+ height: number;
41
+ };
42
+ export declare const maxHorizontalCardDimensions: {
43
+ width: number;
44
+ height: number;
45
+ };
46
+ export declare const maxSquareCardDimensions: {
47
+ width: number;
48
+ height: number;
49
+ };
50
+ export declare const getCardMaxHeight: (appearance?: CardAppearance | undefined) => number;
51
+ export declare const getCardMinWidth: (appearance?: CardAppearance | undefined) => number;
52
+ export declare const getCardMaxWidth: (appearance?: CardAppearance | undefined) => number;
53
+ export declare const getDefaultCardDimensions: (appearance?: CardAppearance | undefined) => Required<CardDimensions>;
@@ -0,0 +1 @@
1
+ export declare const containsPixelUnit: (value: string) => boolean;
@@ -0,0 +1,3 @@
1
+ import { CardDimensionValue, CardDimensions } from '../';
2
+ export declare const canCompareDimension: (current?: CardDimensionValue | undefined, next?: CardDimensionValue | undefined) => boolean;
3
+ export declare const isBigger: (current?: CardDimensions | undefined, next?: CardDimensions | undefined) => boolean;
@@ -0,0 +1,2 @@
1
+ declare const _default: () => Document | undefined;
2
+ export default _default;
@@ -0,0 +1,12 @@
1
+ /**@jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import { Component } from 'react';
4
+ export interface ErrorIconProps {
5
+ readonly size: 'small' | 'medium' | 'large' | 'xlarge';
6
+ }
7
+ export declare class ErrorIcon extends Component<ErrorIconProps, {}> {
8
+ static defaultProps: {
9
+ size: string;
10
+ };
11
+ render(): jsx.JSX.Element;
12
+ }
@@ -0,0 +1 @@
1
+ export declare const errorIconWrapperStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,12 @@
1
+ /**@jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import { Component } from 'react';
4
+ import { MediaType } from '@atlaskit/media-client';
5
+ export interface FileIconProps {
6
+ mediaType?: MediaType;
7
+ style?: any;
8
+ iconUrl?: string;
9
+ }
10
+ export declare class FileIcon extends Component<FileIconProps, {}> {
11
+ render(): jsx.JSX.Element;
12
+ }
@@ -0,0 +1 @@
1
+ export declare const fileTypeIconStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1 @@
1
+ export declare const generateUniqueId: () => string;
@@ -0,0 +1 @@
1
+ export declare function getCSSUnitValue(value: number | string): string;
@@ -0,0 +1,9 @@
1
+ import { CardDimensions } from './cardDimensions';
2
+ import { ElementDimension } from './getElementDimension';
3
+ import { NumericalCardDimensions } from '@atlaskit/media-common';
4
+ export declare type getDataURIDimensionOptions = {
5
+ element?: Element | null;
6
+ dimensions?: CardDimensions;
7
+ };
8
+ export declare const getDataURIDimension: (dimension: ElementDimension, options: getDataURIDimensionOptions) => number;
9
+ export declare const getRequestedDimensions: (options: getDataURIDimensionOptions) => NumericalCardDimensions;
@@ -0,0 +1,2 @@
1
+ export declare type ElementDimension = 'height' | 'width';
2
+ export declare const getElementDimension: (element: Element, dimension: ElementDimension) => number;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const getErrorMessage: (status: string) => false | JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { MediaCardCursor } from '../types';
2
+ import { MediaType } from '@atlaskit/media-client';
3
+ /**
4
+ * When the returned value is undefined, we'd expect the media card to take the parent's cursor style.
5
+ */
6
+ export declare const getMediaCardCursor: (useInlinePlayer: boolean, useMediaViewer: boolean, isErrorStatus: boolean, hasCardPreview: boolean, mediaType?: MediaType | undefined) => MediaCardCursor | undefined;
@@ -0,0 +1,3 @@
1
+ import type { MediaCardSsrData } from './types';
2
+ import { FileIdentifier } from '@atlaskit/media-client';
3
+ export declare const getSSRData: (identifier: FileIdentifier) => MediaCardSsrData | undefined;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { FileIdentifier } from '@atlaskit/media-client';
3
+ import { NumericalCardDimensions } from '@atlaskit/media-common';
4
+ import { MediaCardErrorInfo } from '../../utils/analytics';
5
+ import { MediaCardSsr } from './types';
6
+ export declare const GLOBAL_MEDIA_CARD_SSR = "mediaCardSsr";
7
+ export declare const GLOBAL_MEDIA_NAMESPACE = "__MEDIA_INTERNAL";
8
+ export declare type MediaGlobalScope = {
9
+ [GLOBAL_MEDIA_CARD_SSR]?: MediaCardSsr;
10
+ };
11
+ export declare function getMediaGlobalScope(globalScope?: any): MediaGlobalScope;
12
+ export declare function getMediaCardSSR(globalScope?: any): MediaCardSsr;
13
+ export declare const getKey: ({ id, collectionName, occurrenceKey }: FileIdentifier) => string;
14
+ export declare const storeDataURI: (key: string, dataURI?: string | undefined, dimensions?: NumericalCardDimensions | undefined, error?: MediaCardErrorInfo | undefined, globalScope?: any) => void;
15
+ export declare type StoreSSRDataScriptProps = {
16
+ identifier: FileIdentifier;
17
+ dataURI?: string;
18
+ dimensions?: NumericalCardDimensions;
19
+ error?: MediaCardErrorInfo;
20
+ };
21
+ export declare const StoreSSRDataScript: React.FC<StoreSSRDataScriptProps>;
@@ -0,0 +1,4 @@
1
+ export { StoreSSRDataScript, GLOBAL_MEDIA_NAMESPACE, GLOBAL_MEDIA_CARD_SSR, getKey, } from './globalScope';
2
+ export { getSSRData } from './getSSRData';
3
+ export type { MediaCardSsrData, MediaCardSsr } from './types';
4
+ export type { MediaGlobalScope } from './globalScope';
@@ -0,0 +1,8 @@
1
+ import { NumericalCardDimensions } from '@atlaskit/media-common';
2
+ import { MediaCardErrorInfo } from '../../utils/analytics';
3
+ export declare type MediaCardSsrData = {
4
+ dataURI?: string;
5
+ dimensions?: NumericalCardDimensions;
6
+ error?: MediaCardErrorInfo;
7
+ };
8
+ export declare type MediaCardSsr = Record<string, MediaCardSsrData>;
@@ -0,0 +1,15 @@
1
+ export { ErrorIcon } from './errorIcon';
2
+ export type { ErrorIconProps } from './errorIcon';
3
+ export { FileIcon } from './fileIcon';
4
+ export type { FileIconProps } from './fileIcon';
5
+ export { CardActionIconButton, CardActionsDropdownMenu, CardActionsView, default, } from './cardActions';
6
+ export type { CardActionIconButtonProps, CardActionsDropdownMenuProps, CardActionsViewProps, } from './cardActions';
7
+ export { isRetina } from './isRetina';
8
+ export { defaultHorizontalCardDimensions, defaultImageCardDimensions, defaultSmallCardDimensions, defaultSquareCardDimensions, getCardMaxHeight, getCardMaxWidth, getCardMinWidth, getDefaultCardDimensions, maxHorizontalCardDimensions, maxImageCardDimensions, maxSquareCardDimensions, minHorizontalCardDimensions, minImageCardDimensions, minSmallCardDimensions, minSquareCardDimensions, } from './cardDimensions';
9
+ export { breakpointSize, breakpointStyles, cardBreakpointSizes, } from './breakpoint';
10
+ export type { BreakpointProps, BreakpointSizeValue, CardBreakpoint, } from './breakpoint';
11
+ export { isValidPercentageUnit } from './isValidPercentageUnit';
12
+ export { getElementDimension } from './getElementDimension';
13
+ export type { ElementDimension } from './getElementDimension';
14
+ export { containsPixelUnit } from './containsPixelUnit';
15
+ export type { CardDimensions } from './cardDimensions';
@@ -0,0 +1 @@
1
+ export declare function isRetina(): boolean;
@@ -0,0 +1 @@
1
+ export declare const isValidPercentageUnit: (value: string | number) => boolean;