@atlaskit/media-card 74.1.5 → 74.1.6

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 (158) hide show
  1. package/CHANGELOG.md +0 -12
  2. package/classnames/package.json +1 -8
  3. package/dist/cjs/root/card/getCardPreview/helpers.js +4 -4
  4. package/dist/cjs/root/card/getCardPreview/index.js +3 -5
  5. package/dist/cjs/root/card/index.js +4 -2
  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 +4 -22
  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 +3 -3
  12. package/dist/es2019/root/card/index.js +4 -2
  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 +4 -22
  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 +3 -3
  19. package/dist/esm/root/card/index.js +4 -2
  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 +4 -22
  23. package/dist/esm/version.json +1 -1
  24. package/dist/types/root/card/getCardPreview/index.d.ts +2 -1
  25. package/in-product/package.json +1 -8
  26. package/package.json +3 -10
  27. package/types/package.json +1 -8
  28. package/dist/types-ts4.0/__tests_external__/index.d.ts +0 -1
  29. package/dist/types-ts4.0/__tests_external__/page-objects/MediaCard.d.ts +0 -8
  30. package/dist/types-ts4.0/actions.d.ts +0 -9
  31. package/dist/types-ts4.0/classnames.d.ts +0 -1
  32. package/dist/types-ts4.0/errors.d.ts +0 -41
  33. package/dist/types-ts4.0/files/cardImageView/cardImageViewWrapper.d.ts +0 -6
  34. package/dist/types-ts4.0/files/cardImageView/cardOverlay/cardOverlayComponents.d.ts +0 -8
  35. package/dist/types-ts4.0/files/cardImageView/cardOverlay/index.d.ts +0 -39
  36. package/dist/types-ts4.0/files/cardImageView/cardOverlay/styles.d.ts +0 -26
  37. package/dist/types-ts4.0/files/cardImageView/classnames.d.ts +0 -2
  38. package/dist/types-ts4.0/files/cardImageView/index.d.ts +0 -50
  39. package/dist/types-ts4.0/files/cardImageView/styles.d.ts +0 -24
  40. package/dist/types-ts4.0/files/index.d.ts +0 -2
  41. package/dist/types-ts4.0/in-product.d.ts +0 -1
  42. package/dist/types-ts4.0/index.d.ts +0 -77
  43. package/dist/types-ts4.0/root/card/cardAnalytics.d.ts +0 -9
  44. package/dist/types-ts4.0/root/card/cardConstants.d.ts +0 -1
  45. package/dist/types-ts4.0/root/card/cardLoader.d.ts +0 -6
  46. package/dist/types-ts4.0/root/card/cardState.d.ts +0 -5
  47. package/dist/types-ts4.0/root/card/getCardPreview/cache.d.ts +0 -19
  48. package/dist/types-ts4.0/root/card/getCardPreview/filePreviewStatus.d.ts +0 -5
  49. package/dist/types-ts4.0/root/card/getCardPreview/helpers.d.ts +0 -9
  50. package/dist/types-ts4.0/root/card/getCardPreview/index.d.ts +0 -56
  51. package/dist/types-ts4.0/root/card/getCardStatus.d.ts +0 -4
  52. package/dist/types-ts4.0/root/card/imageRefetchingAnalytics.d.ts +0 -10
  53. package/dist/types-ts4.0/root/card/index.d.ts +0 -58
  54. package/dist/types-ts4.0/root/cardView.d.ts +0 -80
  55. package/dist/types-ts4.0/root/cardViewWrapper.d.ts +0 -4
  56. package/dist/types-ts4.0/root/index.d.ts +0 -2
  57. package/dist/types-ts4.0/root/inline/loader.d.ts +0 -25
  58. package/dist/types-ts4.0/root/inline/mediaInlineCard.d.ts +0 -14
  59. package/dist/types-ts4.0/root/inlinePlayer.d.ts +0 -51
  60. package/dist/types-ts4.0/root/inlinePlayerLazy.d.ts +0 -2
  61. package/dist/types-ts4.0/root/inlinePlayerWrapper.d.ts +0 -4
  62. package/dist/types-ts4.0/root/media-card-analytics-error-boundary.d.ts +0 -10
  63. package/dist/types-ts4.0/root/styles.d.ts +0 -10
  64. package/dist/types-ts4.0/root/types.d.ts +0 -24
  65. package/dist/types-ts4.0/root/ui/actionsBar/actionsBar.d.ts +0 -5
  66. package/dist/types-ts4.0/root/ui/actionsBar/actionsBarWrapper.d.ts +0 -4
  67. package/dist/types-ts4.0/root/ui/actionsBar/styles.d.ts +0 -6
  68. package/dist/types-ts4.0/root/ui/actionsBar/types.d.ts +0 -10
  69. package/dist/types-ts4.0/root/ui/blanket/blanket.d.ts +0 -6
  70. package/dist/types-ts4.0/root/ui/blanket/styles.d.ts +0 -6
  71. package/dist/types-ts4.0/root/ui/common.d.ts +0 -23
  72. package/dist/types-ts4.0/root/ui/iconMessage/iconMessageWrapper.d.ts +0 -4
  73. package/dist/types-ts4.0/root/ui/iconMessage/index.d.ts +0 -8
  74. package/dist/types-ts4.0/root/ui/iconMessage/styles.d.ts +0 -5
  75. package/dist/types-ts4.0/root/ui/iconMessage/types.d.ts +0 -19
  76. package/dist/types-ts4.0/root/ui/iconWrapper/iconWrapper.d.ts +0 -4
  77. package/dist/types-ts4.0/root/ui/iconWrapper/styles.d.ts +0 -7
  78. package/dist/types-ts4.0/root/ui/iconWrapper/types.d.ts +0 -6
  79. package/dist/types-ts4.0/root/ui/imageRenderer/imageRenderer.d.ts +0 -15
  80. package/dist/types-ts4.0/root/ui/loadingRateLimited/styles.d.ts +0 -13
  81. package/dist/types-ts4.0/root/ui/newFileExperience/newFileExperienceWrapper.d.ts +0 -4
  82. package/dist/types-ts4.0/root/ui/newFileExperience/styles.d.ts +0 -5
  83. package/dist/types-ts4.0/root/ui/newFileExperience/types.d.ts +0 -23
  84. package/dist/types-ts4.0/root/ui/playButton/playButton.d.ts +0 -2
  85. package/dist/types-ts4.0/root/ui/playButton/playButtonBackground.d.ts +0 -3
  86. package/dist/types-ts4.0/root/ui/playButton/playButtonWrapper.d.ts +0 -3
  87. package/dist/types-ts4.0/root/ui/playButton/styles.d.ts +0 -5
  88. package/dist/types-ts4.0/root/ui/progressBar/progressBar.d.ts +0 -10
  89. package/dist/types-ts4.0/root/ui/progressBar/styledBar.d.ts +0 -4
  90. package/dist/types-ts4.0/root/ui/progressBar/styles.d.ts +0 -7
  91. package/dist/types-ts4.0/root/ui/progressBar/types.d.ts +0 -7
  92. package/dist/types-ts4.0/root/ui/styles.d.ts +0 -11
  93. package/dist/types-ts4.0/root/ui/tickBox/styles.d.ts +0 -7
  94. package/dist/types-ts4.0/root/ui/tickBox/tickBox.d.ts +0 -3
  95. package/dist/types-ts4.0/root/ui/tickBox/tickBoxWrapper.d.ts +0 -4
  96. package/dist/types-ts4.0/root/ui/tickBox/types.d.ts +0 -4
  97. package/dist/types-ts4.0/root/ui/titleBox/failedTitleBox.d.ts +0 -3
  98. package/dist/types-ts4.0/root/ui/titleBox/styles.d.ts +0 -15
  99. package/dist/types-ts4.0/root/ui/titleBox/titleBox.d.ts +0 -4
  100. package/dist/types-ts4.0/root/ui/titleBox/titleBoxComponents.d.ts +0 -8
  101. package/dist/types-ts4.0/root/ui/titleBox/types.d.ts +0 -32
  102. package/dist/types-ts4.0/styles/animations.d.ts +0 -1
  103. package/dist/types-ts4.0/styles/config.d.ts +0 -1
  104. package/dist/types-ts4.0/styles/easing.d.ts +0 -2
  105. package/dist/types-ts4.0/styles/getSelectedBorderStyle.d.ts +0 -3
  106. package/dist/types-ts4.0/styles/index.d.ts +0 -9
  107. package/dist/types-ts4.0/styles/mixins.d.ts +0 -21
  108. package/dist/types-ts4.0/types.d.ts +0 -25
  109. package/dist/types-ts4.0/utils/analytics.d.ts +0 -78
  110. package/dist/types-ts4.0/utils/breakpoint.d.ts +0 -11
  111. package/dist/types-ts4.0/utils/cardActions/cardActionButton.d.ts +0 -4
  112. package/dist/types-ts4.0/utils/cardActions/cardActionIconButton.d.ts +0 -12
  113. package/dist/types-ts4.0/utils/cardActions/cardActionsDropdownMenu.d.ts +0 -14
  114. package/dist/types-ts4.0/utils/cardActions/cardActionsView.d.ts +0 -16
  115. package/dist/types-ts4.0/utils/cardActions/index.d.ts +0 -7
  116. package/dist/types-ts4.0/utils/cardActions/styles.d.ts +0 -18
  117. package/dist/types-ts4.0/utils/cardDimensions.d.ts +0 -53
  118. package/dist/types-ts4.0/utils/containsPixelUnit.d.ts +0 -1
  119. package/dist/types-ts4.0/utils/dimensionComparer.d.ts +0 -3
  120. package/dist/types-ts4.0/utils/document.d.ts +0 -2
  121. package/dist/types-ts4.0/utils/errorIcon/index.d.ts +0 -12
  122. package/dist/types-ts4.0/utils/errorIcon/styles.d.ts +0 -1
  123. package/dist/types-ts4.0/utils/fileIcon/index.d.ts +0 -12
  124. package/dist/types-ts4.0/utils/fileIcon/styles.d.ts +0 -1
  125. package/dist/types-ts4.0/utils/generateUniqueId.d.ts +0 -1
  126. package/dist/types-ts4.0/utils/getCSSUnitValue.d.ts +0 -1
  127. package/dist/types-ts4.0/utils/getDataURIDimension.d.ts +0 -9
  128. package/dist/types-ts4.0/utils/getElementDimension.d.ts +0 -2
  129. package/dist/types-ts4.0/utils/getErrorMessage.d.ts +0 -2
  130. package/dist/types-ts4.0/utils/getMediaCardCursor.d.ts +0 -6
  131. package/dist/types-ts4.0/utils/globalScope/getSSRData.d.ts +0 -3
  132. package/dist/types-ts4.0/utils/globalScope/globalScope.d.ts +0 -21
  133. package/dist/types-ts4.0/utils/globalScope/index.d.ts +0 -4
  134. package/dist/types-ts4.0/utils/globalScope/types.d.ts +0 -8
  135. package/dist/types-ts4.0/utils/index.d.ts +0 -15
  136. package/dist/types-ts4.0/utils/isRetina.d.ts +0 -1
  137. package/dist/types-ts4.0/utils/isValidPercentageUnit.d.ts +0 -1
  138. package/dist/types-ts4.0/utils/lightCards/cardError.d.ts +0 -12
  139. package/dist/types-ts4.0/utils/lightCards/cardLoading.d.ts +0 -5
  140. package/dist/types-ts4.0/utils/lightCards/getDimensionsWithDefault.d.ts +0 -2
  141. package/dist/types-ts4.0/utils/lightCards/lightCardWrappers.d.ts +0 -5
  142. package/dist/types-ts4.0/utils/lightCards/styles.d.ts +0 -4
  143. package/dist/types-ts4.0/utils/lightCards/types.d.ts +0 -15
  144. package/dist/types-ts4.0/utils/mediaTypeIcon/iconWrapper.d.ts +0 -4
  145. package/dist/types-ts4.0/utils/mediaTypeIcon/index.d.ts +0 -10
  146. package/dist/types-ts4.0/utils/mediaTypeIcon/styles.d.ts +0 -2
  147. package/dist/types-ts4.0/utils/mediaTypeIcon/types.d.ts +0 -6
  148. package/dist/types-ts4.0/utils/metadata.d.ts +0 -2
  149. package/dist/types-ts4.0/utils/objectURLCache.d.ts +0 -11
  150. package/dist/types-ts4.0/utils/preventClickThrough.d.ts +0 -8
  151. package/dist/types-ts4.0/utils/printScript.d.ts +0 -2
  152. package/dist/types-ts4.0/utils/progressBar/index.d.ts +0 -9
  153. package/dist/types-ts4.0/utils/progressBar/styles.d.ts +0 -1
  154. package/dist/types-ts4.0/utils/resizeModeToMediaImageProps.d.ts +0 -5
  155. package/dist/types-ts4.0/utils/shouldDisplayImageThumbnail.d.ts +0 -3
  156. package/dist/types-ts4.0/utils/ufoExperiences.d.ts +0 -7
  157. package/dist/types-ts4.0/utils/videoSnapshot.d.ts +0 -1
  158. package/dist/types-ts4.0/utils/viewportDetector.d.ts +0 -6
@@ -1,78 +0,0 @@
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 {};
@@ -1,11 +0,0 @@
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;
@@ -1,4 +0,0 @@
1
- /**@jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import { CardActionButtonOwnProps } from './styles';
4
- export declare const CardActionButton: (props: CardActionButtonOwnProps) => jsx.JSX.Element;
@@ -1,12 +0,0 @@
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
- }
@@ -1,14 +0,0 @@
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
- }
@@ -1,16 +0,0 @@
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
- }
@@ -1,7 +0,0 @@
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';
@@ -1,18 +0,0 @@
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;
@@ -1,53 +0,0 @@
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>;
@@ -1 +0,0 @@
1
- export declare const containsPixelUnit: (value: string) => boolean;
@@ -1,3 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- declare const _default: () => Document | undefined;
2
- export default _default;
@@ -1,12 +0,0 @@
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
- }
@@ -1 +0,0 @@
1
- export declare const errorIconWrapperStyles: import("@emotion/react").SerializedStyles;
@@ -1,12 +0,0 @@
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
- }
@@ -1 +0,0 @@
1
- export declare const fileTypeIconStyles: import("@emotion/react").SerializedStyles;
@@ -1 +0,0 @@
1
- export declare const generateUniqueId: () => string;
@@ -1 +0,0 @@
1
- export declare function getCSSUnitValue(value: number | string): string;
@@ -1,9 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- export declare type ElementDimension = 'height' | 'width';
2
- export declare const getElementDimension: (element: Element, dimension: ElementDimension) => number;
@@ -1,2 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const getErrorMessage: (status: string) => false | JSX.Element;
@@ -1,6 +0,0 @@
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;
@@ -1,3 +0,0 @@
1
- import type { MediaCardSsrData } from './types';
2
- import { FileIdentifier } from '@atlaskit/media-client';
3
- export declare const getSSRData: (identifier: FileIdentifier) => MediaCardSsrData | undefined;
@@ -1,21 +0,0 @@
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>;
@@ -1,4 +0,0 @@
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';
@@ -1,8 +0,0 @@
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>;
@@ -1,15 +0,0 @@
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';
@@ -1 +0,0 @@
1
- export declare function isRetina(): boolean;
@@ -1 +0,0 @@
1
- export declare const isValidPercentageUnit: (value: string | number) => boolean;
@@ -1,12 +0,0 @@
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
- }
@@ -1,5 +0,0 @@
1
- import { Component } from 'react';
2
- import { StaticCardProps } from './types';
3
- export declare class CardLoading extends Component<StaticCardProps, {}> {
4
- render(): JSX.Element;
5
- }
@@ -1,2 +0,0 @@
1
- import { CardDimensions } from '../..';
2
- export declare const getDimensionsWithDefault: (dimensions?: CardDimensions) => CardDimensions;
@@ -1,5 +0,0 @@
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;
@@ -1,4 +0,0 @@
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;
@@ -1,15 +0,0 @@
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
- }
@@ -1,4 +0,0 @@
1
- /**@jsx jsx */
2
- import { jsx } from '@emotion/react';
3
- import { IconWrapperProps } from './types';
4
- export declare const IconWrapper: (props: IconWrapperProps) => jsx.JSX.Element;
@@ -1,10 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
1
- import { IconWrapperProps } from './types';
2
- export declare const iconWrapperStyles: (props: IconWrapperProps) => import("@emotion/react").SerializedStyles;
@@ -1,6 +0,0 @@
1
- /// <reference types="react" />
2
- import { MediaType } from '@atlaskit/media-client';
3
- export interface IconWrapperProps {
4
- type: MediaType;
5
- children?: JSX.Element;
6
- }
@@ -1,2 +0,0 @@
1
- import { FileState, FileDetails, Identifier } from '@atlaskit/media-client';
2
- export declare const getFileDetails: (identifier: Identifier, fileState?: FileState | undefined) => FileDetails;
@@ -1,11 +0,0 @@
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;
@@ -1,8 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- export declare const printFunctionCall: <T extends any[]>(fn: (...args: T) => void, ...args: T) => string;
2
- export declare const printScript: (statements: string[]) => string;
@@ -1,9 +0,0 @@
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
- }
@@ -1 +0,0 @@
1
- export declare const progressWrapperStyles: import("@emotion/react").SerializedStyles;
@@ -1,5 +0,0 @@
1
- import { ImageResizeMode } from '@atlaskit/media-client';
2
- export declare function resizeModeToMediaImageProps(resizeMode?: ImageResizeMode): {
3
- crop: boolean;
4
- stretch: boolean;
5
- };
@@ -1,3 +0,0 @@
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;
@@ -1,7 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export declare const takeSnapshot: (blob: Blob) => Promise<string>;
@@ -1,6 +0,0 @@
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>;