@atlaskit/media-card 74.1.3 → 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 (157) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/classnames/package.json +8 -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/utils/viewportDetector.js +22 -4
  9. package/dist/cjs/version.json +1 -1
  10. package/dist/es2019/root/card/getCardPreview/helpers.js +4 -4
  11. package/dist/es2019/root/card/getCardPreview/index.js +1 -1
  12. package/dist/es2019/root/card/index.js +1 -1
  13. package/dist/es2019/root/inlinePlayer.js +2 -2
  14. package/dist/es2019/utils/ufoExperiences.js +1 -1
  15. package/dist/es2019/utils/viewportDetector.js +22 -4
  16. package/dist/es2019/version.json +1 -1
  17. package/dist/esm/root/card/getCardPreview/helpers.js +4 -4
  18. package/dist/esm/root/card/getCardPreview/index.js +1 -1
  19. package/dist/esm/root/card/index.js +1 -1
  20. package/dist/esm/root/inlinePlayer.js +2 -2
  21. package/dist/esm/utils/ufoExperiences.js +1 -1
  22. package/dist/esm/utils/viewportDetector.js +22 -4
  23. package/dist/esm/version.json +1 -1
  24. package/dist/types-ts4.0/__tests_external__/index.d.ts +1 -0
  25. package/dist/types-ts4.0/__tests_external__/page-objects/MediaCard.d.ts +8 -0
  26. package/dist/types-ts4.0/actions.d.ts +9 -0
  27. package/dist/types-ts4.0/classnames.d.ts +1 -0
  28. package/dist/types-ts4.0/errors.d.ts +41 -0
  29. package/dist/types-ts4.0/files/cardImageView/cardImageViewWrapper.d.ts +6 -0
  30. package/dist/types-ts4.0/files/cardImageView/cardOverlay/cardOverlayComponents.d.ts +8 -0
  31. package/dist/types-ts4.0/files/cardImageView/cardOverlay/index.d.ts +39 -0
  32. package/dist/types-ts4.0/files/cardImageView/cardOverlay/styles.d.ts +26 -0
  33. package/dist/types-ts4.0/files/cardImageView/classnames.d.ts +2 -0
  34. package/dist/types-ts4.0/files/cardImageView/index.d.ts +50 -0
  35. package/dist/types-ts4.0/files/cardImageView/styles.d.ts +24 -0
  36. package/dist/types-ts4.0/files/index.d.ts +2 -0
  37. package/dist/types-ts4.0/in-product.d.ts +1 -0
  38. package/dist/types-ts4.0/index.d.ts +77 -0
  39. package/dist/types-ts4.0/root/card/cardAnalytics.d.ts +9 -0
  40. package/dist/types-ts4.0/root/card/cardConstants.d.ts +1 -0
  41. package/dist/types-ts4.0/root/card/cardLoader.d.ts +6 -0
  42. package/dist/types-ts4.0/root/card/cardState.d.ts +5 -0
  43. package/dist/types-ts4.0/root/card/getCardPreview/cache.d.ts +19 -0
  44. package/dist/types-ts4.0/root/card/getCardPreview/filePreviewStatus.d.ts +5 -0
  45. package/dist/types-ts4.0/root/card/getCardPreview/helpers.d.ts +9 -0
  46. package/dist/types-ts4.0/root/card/getCardPreview/index.d.ts +56 -0
  47. package/dist/types-ts4.0/root/card/getCardStatus.d.ts +4 -0
  48. package/dist/types-ts4.0/root/card/imageRefetchingAnalytics.d.ts +10 -0
  49. package/dist/types-ts4.0/root/card/index.d.ts +58 -0
  50. package/dist/types-ts4.0/root/cardView.d.ts +80 -0
  51. package/dist/types-ts4.0/root/cardViewWrapper.d.ts +4 -0
  52. package/dist/types-ts4.0/root/index.d.ts +2 -0
  53. package/dist/types-ts4.0/root/inline/loader.d.ts +25 -0
  54. package/dist/types-ts4.0/root/inline/mediaInlineCard.d.ts +14 -0
  55. package/dist/types-ts4.0/root/inlinePlayer.d.ts +51 -0
  56. package/dist/types-ts4.0/root/inlinePlayerLazy.d.ts +2 -0
  57. package/dist/types-ts4.0/root/inlinePlayerWrapper.d.ts +4 -0
  58. package/dist/types-ts4.0/root/media-card-analytics-error-boundary.d.ts +10 -0
  59. package/dist/types-ts4.0/root/styles.d.ts +10 -0
  60. package/dist/types-ts4.0/root/types.d.ts +24 -0
  61. package/dist/types-ts4.0/root/ui/actionsBar/actionsBar.d.ts +5 -0
  62. package/dist/types-ts4.0/root/ui/actionsBar/actionsBarWrapper.d.ts +4 -0
  63. package/dist/types-ts4.0/root/ui/actionsBar/styles.d.ts +6 -0
  64. package/dist/types-ts4.0/root/ui/actionsBar/types.d.ts +10 -0
  65. package/dist/types-ts4.0/root/ui/blanket/blanket.d.ts +6 -0
  66. package/dist/types-ts4.0/root/ui/blanket/styles.d.ts +6 -0
  67. package/dist/types-ts4.0/root/ui/common.d.ts +23 -0
  68. package/dist/types-ts4.0/root/ui/iconMessage/iconMessageWrapper.d.ts +4 -0
  69. package/dist/types-ts4.0/root/ui/iconMessage/index.d.ts +8 -0
  70. package/dist/types-ts4.0/root/ui/iconMessage/styles.d.ts +5 -0
  71. package/dist/types-ts4.0/root/ui/iconMessage/types.d.ts +19 -0
  72. package/dist/types-ts4.0/root/ui/iconWrapper/iconWrapper.d.ts +4 -0
  73. package/dist/types-ts4.0/root/ui/iconWrapper/styles.d.ts +7 -0
  74. package/dist/types-ts4.0/root/ui/iconWrapper/types.d.ts +6 -0
  75. package/dist/types-ts4.0/root/ui/imageRenderer/imageRenderer.d.ts +15 -0
  76. package/dist/types-ts4.0/root/ui/loadingRateLimited/styles.d.ts +13 -0
  77. package/dist/types-ts4.0/root/ui/newFileExperience/newFileExperienceWrapper.d.ts +4 -0
  78. package/dist/types-ts4.0/root/ui/newFileExperience/styles.d.ts +5 -0
  79. package/dist/types-ts4.0/root/ui/newFileExperience/types.d.ts +23 -0
  80. package/dist/types-ts4.0/root/ui/playButton/playButton.d.ts +2 -0
  81. package/dist/types-ts4.0/root/ui/playButton/playButtonBackground.d.ts +3 -0
  82. package/dist/types-ts4.0/root/ui/playButton/playButtonWrapper.d.ts +3 -0
  83. package/dist/types-ts4.0/root/ui/playButton/styles.d.ts +5 -0
  84. package/dist/types-ts4.0/root/ui/progressBar/progressBar.d.ts +10 -0
  85. package/dist/types-ts4.0/root/ui/progressBar/styledBar.d.ts +4 -0
  86. package/dist/types-ts4.0/root/ui/progressBar/styles.d.ts +7 -0
  87. package/dist/types-ts4.0/root/ui/progressBar/types.d.ts +7 -0
  88. package/dist/types-ts4.0/root/ui/styles.d.ts +11 -0
  89. package/dist/types-ts4.0/root/ui/tickBox/styles.d.ts +7 -0
  90. package/dist/types-ts4.0/root/ui/tickBox/tickBox.d.ts +3 -0
  91. package/dist/types-ts4.0/root/ui/tickBox/tickBoxWrapper.d.ts +4 -0
  92. package/dist/types-ts4.0/root/ui/tickBox/types.d.ts +4 -0
  93. package/dist/types-ts4.0/root/ui/titleBox/failedTitleBox.d.ts +3 -0
  94. package/dist/types-ts4.0/root/ui/titleBox/styles.d.ts +15 -0
  95. package/dist/types-ts4.0/root/ui/titleBox/titleBox.d.ts +4 -0
  96. package/dist/types-ts4.0/root/ui/titleBox/titleBoxComponents.d.ts +8 -0
  97. package/dist/types-ts4.0/root/ui/titleBox/types.d.ts +32 -0
  98. package/dist/types-ts4.0/styles/animations.d.ts +1 -0
  99. package/dist/types-ts4.0/styles/config.d.ts +1 -0
  100. package/dist/types-ts4.0/styles/easing.d.ts +2 -0
  101. package/dist/types-ts4.0/styles/getSelectedBorderStyle.d.ts +3 -0
  102. package/dist/types-ts4.0/styles/index.d.ts +9 -0
  103. package/dist/types-ts4.0/styles/mixins.d.ts +21 -0
  104. package/dist/types-ts4.0/types.d.ts +25 -0
  105. package/dist/types-ts4.0/utils/analytics.d.ts +78 -0
  106. package/dist/types-ts4.0/utils/breakpoint.d.ts +11 -0
  107. package/dist/types-ts4.0/utils/cardActions/cardActionButton.d.ts +4 -0
  108. package/dist/types-ts4.0/utils/cardActions/cardActionIconButton.d.ts +12 -0
  109. package/dist/types-ts4.0/utils/cardActions/cardActionsDropdownMenu.d.ts +14 -0
  110. package/dist/types-ts4.0/utils/cardActions/cardActionsView.d.ts +16 -0
  111. package/dist/types-ts4.0/utils/cardActions/index.d.ts +7 -0
  112. package/dist/types-ts4.0/utils/cardActions/styles.d.ts +18 -0
  113. package/dist/types-ts4.0/utils/cardDimensions.d.ts +53 -0
  114. package/dist/types-ts4.0/utils/containsPixelUnit.d.ts +1 -0
  115. package/dist/types-ts4.0/utils/dimensionComparer.d.ts +3 -0
  116. package/dist/types-ts4.0/utils/document.d.ts +2 -0
  117. package/dist/types-ts4.0/utils/errorIcon/index.d.ts +12 -0
  118. package/dist/types-ts4.0/utils/errorIcon/styles.d.ts +1 -0
  119. package/dist/types-ts4.0/utils/fileIcon/index.d.ts +12 -0
  120. package/dist/types-ts4.0/utils/fileIcon/styles.d.ts +1 -0
  121. package/dist/types-ts4.0/utils/generateUniqueId.d.ts +1 -0
  122. package/dist/types-ts4.0/utils/getCSSUnitValue.d.ts +1 -0
  123. package/dist/types-ts4.0/utils/getDataURIDimension.d.ts +9 -0
  124. package/dist/types-ts4.0/utils/getElementDimension.d.ts +2 -0
  125. package/dist/types-ts4.0/utils/getErrorMessage.d.ts +2 -0
  126. package/dist/types-ts4.0/utils/getMediaCardCursor.d.ts +6 -0
  127. package/dist/types-ts4.0/utils/globalScope/getSSRData.d.ts +3 -0
  128. package/dist/types-ts4.0/utils/globalScope/globalScope.d.ts +21 -0
  129. package/dist/types-ts4.0/utils/globalScope/index.d.ts +4 -0
  130. package/dist/types-ts4.0/utils/globalScope/types.d.ts +8 -0
  131. package/dist/types-ts4.0/utils/index.d.ts +15 -0
  132. package/dist/types-ts4.0/utils/isRetina.d.ts +1 -0
  133. package/dist/types-ts4.0/utils/isValidPercentageUnit.d.ts +1 -0
  134. package/dist/types-ts4.0/utils/lightCards/cardError.d.ts +12 -0
  135. package/dist/types-ts4.0/utils/lightCards/cardLoading.d.ts +5 -0
  136. package/dist/types-ts4.0/utils/lightCards/getDimensionsWithDefault.d.ts +2 -0
  137. package/dist/types-ts4.0/utils/lightCards/lightCardWrappers.d.ts +5 -0
  138. package/dist/types-ts4.0/utils/lightCards/styles.d.ts +4 -0
  139. package/dist/types-ts4.0/utils/lightCards/types.d.ts +15 -0
  140. package/dist/types-ts4.0/utils/mediaTypeIcon/iconWrapper.d.ts +4 -0
  141. package/dist/types-ts4.0/utils/mediaTypeIcon/index.d.ts +10 -0
  142. package/dist/types-ts4.0/utils/mediaTypeIcon/styles.d.ts +2 -0
  143. package/dist/types-ts4.0/utils/mediaTypeIcon/types.d.ts +6 -0
  144. package/dist/types-ts4.0/utils/metadata.d.ts +2 -0
  145. package/dist/types-ts4.0/utils/objectURLCache.d.ts +11 -0
  146. package/dist/types-ts4.0/utils/preventClickThrough.d.ts +8 -0
  147. package/dist/types-ts4.0/utils/printScript.d.ts +2 -0
  148. package/dist/types-ts4.0/utils/progressBar/index.d.ts +9 -0
  149. package/dist/types-ts4.0/utils/progressBar/styles.d.ts +1 -0
  150. package/dist/types-ts4.0/utils/resizeModeToMediaImageProps.d.ts +5 -0
  151. package/dist/types-ts4.0/utils/shouldDisplayImageThumbnail.d.ts +3 -0
  152. package/dist/types-ts4.0/utils/ufoExperiences.d.ts +7 -0
  153. package/dist/types-ts4.0/utils/videoSnapshot.d.ts +1 -0
  154. package/dist/types-ts4.0/utils/viewportDetector.d.ts +6 -0
  155. package/in-product/package.json +8 -1
  156. package/package.json +10 -3
  157. package/types/package.json +8 -1
@@ -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;
@@ -0,0 +1,12 @@
1
+ import { Component } from 'react';
2
+ import { StaticCardProps } from './types';
3
+ export interface ErrorCardProps extends StaticCardProps {
4
+ readonly size: 'small' | 'medium' | 'large' | 'xlarge';
5
+ }
6
+ export declare class CardError extends Component<ErrorCardProps, {}> {
7
+ static defaultProps: {
8
+ size: string;
9
+ };
10
+ render(): JSX.Element;
11
+ get icon(): JSX.Element;
12
+ }
@@ -0,0 +1,5 @@
1
+ import { Component } from 'react';
2
+ import { StaticCardProps } from './types';
3
+ export declare class CardLoading extends Component<StaticCardProps, {}> {
4
+ render(): JSX.Element;
5
+ }
@@ -0,0 +1,2 @@
1
+ import { CardDimensions } from '../..';
2
+ export declare const getDimensionsWithDefault: (dimensions?: CardDimensions) => CardDimensions;
@@ -0,0 +1,5 @@
1
+ /**@jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import { WrapperProps } from './types';
4
+ export declare const Wrapper: (props: WrapperProps) => jsx.JSX.Element;
5
+ export declare const AnimatedWrapper: (props: WrapperProps) => jsx.JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { WrapperProps } from './types';
2
+ export declare const blinkLoadingAnimation: import("@emotion/react").Keyframes;
3
+ export declare const wrapperStyles: ({ dimensions, theme }: WrapperProps) => import("@emotion/react").SerializedStyles;
4
+ export declare const animatedWrapperStyles: (props: WrapperProps) => import("@emotion/react").SerializedStyles;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import { CardDimensions } from '../../utils/cardDimensions';
3
+ import { MediaFeatureFlags } from '@atlaskit/media-common';
4
+ import { GlobalThemeTokens } from '@atlaskit/theme/components';
5
+ export interface StaticCardProps {
6
+ dimensions?: CardDimensions;
7
+ testId?: string;
8
+ featureFlags?: MediaFeatureFlags;
9
+ }
10
+ export interface WrapperProps {
11
+ dimensions: CardDimensions;
12
+ testId?: string;
13
+ children?: JSX.Element;
14
+ theme?: GlobalThemeTokens;
15
+ }
@@ -0,0 +1,4 @@
1
+ /**@jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import { IconWrapperProps } from './types';
4
+ export declare const IconWrapper: (props: IconWrapperProps) => jsx.JSX.Element;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { MediaType } from '@atlaskit/media-client';
3
+ export interface FileIconProps {
4
+ type?: MediaType;
5
+ size?: string;
6
+ className?: string;
7
+ }
8
+ export declare class MediaTypeIcon extends React.Component<FileIconProps, {}> {
9
+ render(): JSX.Element;
10
+ }
@@ -0,0 +1,2 @@
1
+ import { IconWrapperProps } from './types';
2
+ export declare const iconWrapperStyles: (props: IconWrapperProps) => import("@emotion/react").SerializedStyles;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { MediaType } from '@atlaskit/media-client';
3
+ export interface IconWrapperProps {
4
+ type: MediaType;
5
+ children?: JSX.Element;
6
+ }
@@ -0,0 +1,2 @@
1
+ import { FileState, FileDetails, Identifier } from '@atlaskit/media-client';
2
+ export declare const getFileDetails: (identifier: Identifier, fileState?: FileState | undefined) => FileDetails;
@@ -0,0 +1,11 @@
1
+ import { CardPreview } from '../';
2
+ export declare const PREVIEW_CACHE_LRU_SIZE = 50;
3
+ export declare class ObjectURLCache {
4
+ private readonly cache;
5
+ constructor(size: number);
6
+ has(key: string): boolean;
7
+ get(key: string): CardPreview | undefined;
8
+ set(key: string, value: CardPreview): void;
9
+ remove(key: string): void;
10
+ }
11
+ export declare const createObjectURLCache: () => ObjectURLCache;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ReactNode } from 'react';
3
+ export declare type PreventClickThroughProps = {
4
+ readonly children?: ReactNode;
5
+ };
6
+ export declare function PreventClickThrough({ children, }: PreventClickThroughProps): JSX.Element;
7
+ export declare type CreatePreventClickThrough = <T>(onClick: () => void) => (event: React.MouseEvent<T, MouseEvent>) => void;
8
+ export declare const createPreventClickThrough: CreatePreventClickThrough;
@@ -0,0 +1,2 @@
1
+ export declare const printFunctionCall: <T extends any[]>(fn: (...args: T) => void, ...args: T) => string;
2
+ export declare const printScript: (statements: string[]) => string;
@@ -0,0 +1,9 @@
1
+ /**@jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import { Component } from 'react';
4
+ export interface ProgressBarProps {
5
+ progress?: number;
6
+ }
7
+ export declare class ProgressBar extends Component<ProgressBarProps, {}> {
8
+ render(): jsx.JSX.Element | null;
9
+ }
@@ -0,0 +1 @@
1
+ export declare const progressWrapperStyles: import("@emotion/react").SerializedStyles;
@@ -0,0 +1,5 @@
1
+ import { ImageResizeMode } from '@atlaskit/media-client';
2
+ export declare function resizeModeToMediaImageProps(resizeMode?: ImageResizeMode): {
3
+ crop: boolean;
4
+ stretch: boolean;
5
+ };
@@ -0,0 +1,3 @@
1
+ import { MediaItemType, MediaType } from '@atlaskit/media-client';
2
+ import { CardStatus } from '..';
3
+ export declare const shouldDisplayImageThumbnail: (cardStatus: CardStatus, mediaItemType: MediaItemType, dataURI?: string | undefined, mediaType?: MediaType | undefined, mimeType?: string | undefined) => boolean;
@@ -0,0 +1,7 @@
1
+ import { CardStatus } from '../../src';
2
+ import { FileAttributes } from '@atlaskit/media-common';
3
+ import { SSRStatus } from './analytics';
4
+ import { MediaCardError } from '../errors';
5
+ import { FileStateFlags } from '../types';
6
+ export declare const startUfoExperience: (id: string) => void;
7
+ export declare const completeUfoExperience: (id: string, status: CardStatus, fileAttributes: FileAttributes, fileStateFlags: FileStateFlags, ssrReliability: SSRStatus, error?: MediaCardError) => void;
@@ -0,0 +1 @@
1
+ export declare const takeSnapshot: (blob: Blob) => Promise<string>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare type ViewportDetectorProps = {
3
+ cardEl: HTMLElement | null;
4
+ onVisible: () => void;
5
+ };
6
+ export declare const ViewportDetector: React.FC<ViewportDetectorProps>;
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/in-product.js",
5
5
  "module:es2019": "../dist/es2019/in-product.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/in-product.d.ts"
7
+ "types": "../dist/types/in-product.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/in-product.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/media-card",
3
- "version": "74.1.3",
3
+ "version": "74.1.5",
4
4
  "description": "Includes all media card related components, CardView, CardViewSmall, Card...",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,6 +12,13 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.0 <4.5": {
17
+ "*": [
18
+ "dist/types-ts4.0/*"
19
+ ]
20
+ }
21
+ },
15
22
  "sideEffects": false,
16
23
  "atlaskit:src": "src/index.ts",
17
24
  "af:exports": {
@@ -31,7 +38,7 @@
31
38
  "dependencies": {
32
39
  "@atlaskit/analytics-next": "^8.2.0",
33
40
  "@atlaskit/dropdown-menu": "^11.5.0",
34
- "@atlaskit/editor-shared-styles": "^2.1.0",
41
+ "@atlaskit/editor-shared-styles": "^2.2.0",
35
42
  "@atlaskit/icon": "^21.10.0",
36
43
  "@atlaskit/in-product-testing": "^0.1.0",
37
44
  "@atlaskit/media-client": "^17.1.0",
@@ -83,7 +90,7 @@
83
90
  "react": "^16.8.0",
84
91
  "react-dom": "^16.8.0",
85
92
  "react-intl-next": "npm:react-intl@^5.18.1",
86
- "typescript": "4.3.5",
93
+ "typescript": "4.5.5",
87
94
  "uuid": "^3.1.0",
88
95
  "wait-for-expect": "^1.2.0"
89
96
  },
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/types.js",
5
5
  "module:es2019": "../dist/es2019/types.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/types.d.ts"
7
+ "types": "../dist/types/types.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/types.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }