@atlaskit/media-card 74.8.0 → 75.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/classnames/package.json +2 -2
- package/dist/cjs/card/card.js +2 -7
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/styles/index.js +1 -7
- package/dist/cjs/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
- package/dist/cjs/inline/mediaInlineCard.js +12 -21
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/card/card.js +2 -7
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/styles/index.js +0 -4
- package/dist/es2019/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
- package/dist/es2019/inline/mediaInlineCard.js +12 -21
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/card/card.js +2 -7
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/styles/index.js +1 -5
- package/dist/esm/inline/mediaInlineAnalyticsErrorBoundary.js +1 -1
- package/dist/esm/inline/mediaInlineCard.js +12 -21
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/card/actions.d.ts +1 -1
- package/dist/types/card/card.d.ts +4 -4
- package/dist/types/card/cardAnalytics.d.ts +2 -2
- package/dist/types/card/cardLoader.d.ts +1 -1
- package/dist/types/card/cardState.d.ts +1 -1
- package/dist/types/card/cardView.d.ts +1 -1
- package/dist/types/card/getCardPreview/cache.d.ts +1 -1
- package/dist/types/card/getCardPreview/filePreviewStatus.d.ts +1 -1
- package/dist/types/card/getCardPreview/helpers.d.ts +2 -2
- package/dist/types/card/getCardPreview/imageRefetchingAnalytics.d.ts +1 -1
- package/dist/types/card/getCardPreview/index.d.ts +3 -3
- package/dist/types/card/getCardStatus.d.ts +1 -1
- package/dist/types/card/inlinePlayer.d.ts +1 -1
- package/dist/types/card/media-card-analytics-error-boundary.d.ts +1 -1
- package/dist/types/card/styles/index.d.ts +0 -1
- package/dist/types/card/types.d.ts +1 -1
- package/dist/types/card/ui/actionsBar/styles.d.ts +1 -1
- package/dist/types/card/ui/actionsBar/types.d.ts +1 -1
- package/dist/types/card/ui/blanket/styles.d.ts +1 -1
- package/dist/types/card/ui/iconMessage/types.d.ts +4 -4
- package/dist/types/card/ui/iconWrapper/types.d.ts +1 -1
- package/dist/types/card/ui/imageRenderer/imageRenderer.d.ts +1 -1
- package/dist/types/card/ui/loadingRateLimited/styles.d.ts +1 -1
- package/dist/types/card/ui/progressBar/progressBar.d.ts +2 -2
- package/dist/types/card/ui/progressBar/types.d.ts +1 -1
- package/dist/types/card/ui/styles.d.ts +1 -1
- package/dist/types/card/ui/tickBox/styles.d.ts +2 -2
- package/dist/types/card/ui/tickBox/types.d.ts +1 -1
- package/dist/types/card/ui/titleBox/types.d.ts +7 -7
- package/dist/types/errors.d.ts +8 -8
- package/dist/types/inline/loader.d.ts +3 -3
- package/dist/types/inline/mediaInlineAnalyticsErrorBoundary.d.ts +1 -1
- package/dist/types/inline/mediaInlineCard.d.ts +0 -8
- package/dist/types/types.d.ts +6 -14
- package/dist/types/utils/analytics.d.ts +32 -32
- package/dist/types/utils/breakpoint.d.ts +2 -2
- package/dist/types/utils/cardActions/cardActionIconButton.d.ts +1 -1
- package/dist/types/utils/cardActions/cardActionsDropdownMenu.d.ts +1 -1
- package/dist/types/utils/cardActions/styles.d.ts +2 -2
- package/dist/types/utils/cardDimensions.d.ts +4 -4
- package/dist/types/utils/dimensionComparer.d.ts +2 -2
- package/dist/types/utils/getDataURIDimension.d.ts +1 -1
- package/dist/types/utils/getElementDimension.d.ts +1 -1
- package/dist/types/utils/getMediaCardCursor.d.ts +1 -1
- package/dist/types/utils/globalScope/globalScope.d.ts +3 -3
- package/dist/types/utils/globalScope/types.d.ts +2 -2
- package/dist/types/utils/metadata.d.ts +1 -1
- package/dist/types/utils/preventClickThrough.d.ts +2 -2
- package/dist/types/utils/shouldDisplayImageThumbnail.d.ts +1 -1
- package/dist/types/utils/videoIsPlayable.d.ts +1 -1
- package/dist/types/utils/viewportDetector.d.ts +1 -1
- package/dist/types-ts4.5/card/actions.d.ts +9 -0
- package/dist/types-ts4.5/card/card.d.ts +63 -0
- package/dist/types-ts4.5/card/cardAnalytics.d.ts +10 -0
- package/dist/types-ts4.5/card/cardConstants.d.ts +1 -0
- package/dist/types-ts4.5/card/cardImageView/cardImageViewWrapper.d.ts +6 -0
- package/dist/types-ts4.5/card/cardImageView/cardOverlay/cardOverlayComponents.d.ts +8 -0
- package/dist/types-ts4.5/card/cardImageView/cardOverlay/index.d.ts +39 -0
- package/dist/types-ts4.5/card/cardImageView/cardOverlay/styles.d.ts +26 -0
- package/dist/types-ts4.5/card/cardImageView/cardViewWrapper.d.ts +4 -0
- package/dist/types-ts4.5/card/cardImageView/classnames.d.ts +2 -0
- package/dist/types-ts4.5/card/cardImageView/fileCardImageView.d.ts +49 -0
- package/dist/types-ts4.5/card/cardImageView/index.d.ts +2 -0
- package/dist/types-ts4.5/card/cardImageView/styles.d.ts +24 -0
- package/dist/types-ts4.5/card/cardLoader.d.ts +6 -0
- package/dist/types-ts4.5/card/cardState.d.ts +10 -0
- package/dist/types-ts4.5/card/cardView.d.ts +80 -0
- package/dist/types-ts4.5/card/getCardPreview/cache.d.ts +19 -0
- package/dist/types-ts4.5/card/getCardPreview/filePreviewStatus.d.ts +5 -0
- package/dist/types-ts4.5/card/getCardPreview/helpers.d.ts +10 -0
- package/dist/types-ts4.5/card/getCardPreview/imageRefetchingAnalytics.d.ts +10 -0
- package/dist/types-ts4.5/card/getCardPreview/index.d.ts +59 -0
- package/dist/types-ts4.5/card/getCardStatus.d.ts +5 -0
- package/dist/types-ts4.5/card/index.d.ts +1 -0
- package/dist/types-ts4.5/card/inlinePlayer.d.ts +52 -0
- package/dist/types-ts4.5/card/inlinePlayerLazy.d.ts +2 -0
- package/dist/types-ts4.5/card/inlinePlayerWrapper.d.ts +4 -0
- package/dist/types-ts4.5/card/media-card-analytics-error-boundary.d.ts +14 -0
- package/dist/types-ts4.5/card/styles/animations.d.ts +1 -0
- package/dist/types-ts4.5/card/styles/config.d.ts +1 -0
- package/dist/types-ts4.5/card/styles/easing.d.ts +2 -0
- package/dist/types-ts4.5/card/styles/getSelectedBorderStyle.d.ts +3 -0
- package/dist/types-ts4.5/card/styles/index.d.ts +8 -0
- package/dist/types-ts4.5/card/styles/mixins.d.ts +21 -0
- package/dist/types-ts4.5/card/styles/styles.d.ts +10 -0
- package/dist/types-ts4.5/card/types.d.ts +24 -0
- package/dist/types-ts4.5/card/ui/actionsBar/actionsBar.d.ts +5 -0
- package/dist/types-ts4.5/card/ui/actionsBar/actionsBarWrapper.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/actionsBar/styles.d.ts +6 -0
- package/dist/types-ts4.5/card/ui/actionsBar/types.d.ts +10 -0
- package/dist/types-ts4.5/card/ui/blanket/blanket.d.ts +6 -0
- package/dist/types-ts4.5/card/ui/blanket/styles.d.ts +6 -0
- package/dist/types-ts4.5/card/ui/common.d.ts +23 -0
- package/dist/types-ts4.5/card/ui/iconMessage/iconMessageWrapper.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/iconMessage/index.d.ts +8 -0
- package/dist/types-ts4.5/card/ui/iconMessage/styles.d.ts +5 -0
- package/dist/types-ts4.5/card/ui/iconMessage/types.d.ts +19 -0
- package/dist/types-ts4.5/card/ui/iconWrapper/iconWrapper.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/iconWrapper/styles.d.ts +7 -0
- package/dist/types-ts4.5/card/ui/iconWrapper/types.d.ts +6 -0
- package/dist/types-ts4.5/card/ui/imageRenderer/imageRenderer.d.ts +15 -0
- package/dist/types-ts4.5/card/ui/loadingRateLimited/styles.d.ts +13 -0
- package/dist/types-ts4.5/card/ui/newFileExperience/newFileExperienceWrapper.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/newFileExperience/styles.d.ts +5 -0
- package/dist/types-ts4.5/card/ui/newFileExperience/types.d.ts +25 -0
- package/dist/types-ts4.5/card/ui/playButton/playButton.d.ts +2 -0
- package/dist/types-ts4.5/card/ui/playButton/playButtonBackground.d.ts +3 -0
- package/dist/types-ts4.5/card/ui/playButton/playButtonWrapper.d.ts +3 -0
- package/dist/types-ts4.5/card/ui/playButton/styles.d.ts +5 -0
- package/dist/types-ts4.5/card/ui/progressBar/progressBar.d.ts +10 -0
- package/dist/types-ts4.5/card/ui/progressBar/styledBar.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/progressBar/styles.d.ts +7 -0
- package/dist/types-ts4.5/card/ui/progressBar/types.d.ts +7 -0
- package/dist/types-ts4.5/card/ui/styles.d.ts +11 -0
- package/dist/types-ts4.5/card/ui/tickBox/styles.d.ts +7 -0
- package/dist/types-ts4.5/card/ui/tickBox/tickBox.d.ts +3 -0
- package/dist/types-ts4.5/card/ui/tickBox/tickBoxWrapper.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/tickBox/types.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/titleBox/failedTitleBox.d.ts +3 -0
- package/dist/types-ts4.5/card/ui/titleBox/styles.d.ts +15 -0
- package/dist/types-ts4.5/card/ui/titleBox/titleBox.d.ts +4 -0
- package/dist/types-ts4.5/card/ui/titleBox/titleBoxComponents.d.ts +8 -0
- package/dist/types-ts4.5/card/ui/titleBox/types.d.ts +34 -0
- package/dist/types-ts4.5/card/ui/unhandledErrorCard/index.d.ts +7 -0
- package/dist/types-ts4.5/card/ui/unhandledErrorCard/types.d.ts +6 -0
- package/dist/types-ts4.5/classnames.d.ts +5 -0
- package/dist/types-ts4.5/errors.d.ts +41 -0
- package/dist/types-ts4.5/index.d.ts +15 -0
- package/dist/types-ts4.5/inline/index.d.ts +1 -0
- package/dist/types-ts4.5/inline/loader.d.ts +26 -0
- package/dist/types-ts4.5/inline/mediaInlineAnalyticsErrorBoundary.d.ts +12 -0
- package/dist/types-ts4.5/inline/mediaInlineCard.d.ts +15 -0
- package/dist/types-ts4.5/types.d.ts +103 -0
- package/dist/types-ts4.5/utils/analytics.d.ts +95 -0
- package/dist/types-ts4.5/utils/breakpoint.d.ts +11 -0
- package/dist/types-ts4.5/utils/cardActions/cardActionButton.d.ts +3 -0
- package/dist/types-ts4.5/utils/cardActions/cardActionIconButton.d.ts +12 -0
- package/dist/types-ts4.5/utils/cardActions/cardActionsDropdownMenu.d.ts +14 -0
- package/dist/types-ts4.5/utils/cardActions/cardActionsView.d.ts +16 -0
- package/dist/types-ts4.5/utils/cardActions/index.d.ts +7 -0
- package/dist/types-ts4.5/utils/cardActions/styles.d.ts +18 -0
- package/dist/types-ts4.5/utils/cardDimensions.d.ts +49 -0
- package/dist/types-ts4.5/utils/containsPixelUnit.d.ts +1 -0
- package/dist/types-ts4.5/utils/dimensionComparer.d.ts +3 -0
- package/dist/types-ts4.5/utils/document.d.ts +2 -0
- package/dist/types-ts4.5/utils/errorIcon/index.d.ts +12 -0
- package/dist/types-ts4.5/utils/errorIcon/styles.d.ts +1 -0
- package/dist/types-ts4.5/utils/fileIcon/index.d.ts +12 -0
- package/dist/types-ts4.5/utils/fileIcon/styles.d.ts +1 -0
- package/dist/types-ts4.5/utils/generateUniqueId.d.ts +1 -0
- package/dist/types-ts4.5/utils/getCSSUnitValue.d.ts +1 -0
- package/dist/types-ts4.5/utils/getDataURIDimension.d.ts +9 -0
- package/dist/types-ts4.5/utils/getElementDimension.d.ts +2 -0
- package/dist/types-ts4.5/utils/getErrorMessage.d.ts +2 -0
- package/dist/types-ts4.5/utils/getMediaCardCursor.d.ts +6 -0
- package/dist/types-ts4.5/utils/globalScope/getSSRData.d.ts +3 -0
- package/dist/types-ts4.5/utils/globalScope/globalScope.d.ts +21 -0
- package/dist/types-ts4.5/utils/globalScope/index.d.ts +4 -0
- package/dist/types-ts4.5/utils/globalScope/types.d.ts +8 -0
- package/dist/types-ts4.5/utils/index.d.ts +14 -0
- package/dist/types-ts4.5/utils/isRetina.d.ts +1 -0
- package/dist/types-ts4.5/utils/isValidPercentageUnit.d.ts +1 -0
- package/dist/types-ts4.5/utils/lightCards/cardError.d.ts +12 -0
- package/dist/types-ts4.5/utils/lightCards/cardLoading.d.ts +5 -0
- package/dist/types-ts4.5/utils/lightCards/getDimensionsWithDefault.d.ts +2 -0
- package/dist/types-ts4.5/utils/lightCards/lightCardWrappers.d.ts +5 -0
- package/dist/types-ts4.5/utils/lightCards/styles.d.ts +4 -0
- package/dist/types-ts4.5/utils/lightCards/types.d.ts +15 -0
- package/dist/types-ts4.5/utils/metadata.d.ts +2 -0
- package/dist/types-ts4.5/utils/objectURLCache.d.ts +11 -0
- package/dist/types-ts4.5/utils/preventClickThrough.d.ts +8 -0
- package/dist/types-ts4.5/utils/printScript.d.ts +2 -0
- package/dist/types-ts4.5/utils/progressBar/index.d.ts +9 -0
- package/dist/types-ts4.5/utils/progressBar/styles.d.ts +1 -0
- package/dist/types-ts4.5/utils/resizeModeToMediaImageProps.d.ts +5 -0
- package/dist/types-ts4.5/utils/shouldDisplayImageThumbnail.d.ts +3 -0
- package/dist/types-ts4.5/utils/ufoExperiences.d.ts +7 -0
- package/dist/types-ts4.5/utils/videoIsPlayable.d.ts +2 -0
- package/dist/types-ts4.5/utils/videoSnapshot.d.ts +1 -0
- package/dist/types-ts4.5/utils/viewportDetector.d.ts +6 -0
- package/package.json +15 -7
- package/report.api.md +0 -5
- package/types/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
2
|
import { CardDimensions } from '../../types';
|
|
3
3
|
import { CardPreviewAttributes } from '../../utils/analytics';
|
|
4
|
-
|
|
4
|
+
type cardAction = 'cache-hit' | 'remote-success';
|
|
5
5
|
export declare const fireImageFetchingOperationalEvent: (createAnalyticsEvent: CreateUIAnalyticsEvent, action: cardAction, cardPreviewAttributes: CardPreviewAttributes) => void;
|
|
6
6
|
export declare const calculatePercentageDifference: (prevDimensions: CardDimensions | undefined, currentDimensions: CardDimensions | undefined) => {
|
|
7
7
|
width: string;
|
|
@@ -14,7 +14,7 @@ export declare const removeCardPreviewFromCache: (id: string, mode: ImageResizeM
|
|
|
14
14
|
* See extractFilePreviewStatus "hasLocalPreview" logic
|
|
15
15
|
*/
|
|
16
16
|
export declare const getFilePreviewFromFileState: (fileState: FileState) => FilePreview | Promise<FilePreview> | undefined;
|
|
17
|
-
export
|
|
17
|
+
export type CardPreviewParams = {
|
|
18
18
|
mediaClient: MediaClient;
|
|
19
19
|
id: string;
|
|
20
20
|
dimensions?: CardDimensions;
|
|
@@ -50,10 +50,10 @@ export declare const shouldResolvePreview: ({ status, fileState, prevDimensions,
|
|
|
50
50
|
featureFlags?: MediaFeatureFlags | undefined;
|
|
51
51
|
wasResolvedUpfrontPreview: boolean;
|
|
52
52
|
}) => boolean;
|
|
53
|
-
export declare const getSSRCardPreview: (ssr: SSR, mediaClient: MediaClient, id: string, params: MediaStoreGetFileImageParams, mediaBlobUrlAttrs?: MediaBlobUrlAttrs
|
|
53
|
+
export declare const getSSRCardPreview: (ssr: SSR, mediaClient: MediaClient, id: string, params: MediaStoreGetFileImageParams, mediaBlobUrlAttrs?: MediaBlobUrlAttrs) => CardPreview;
|
|
54
54
|
export declare const isLocalPreview: (preview: CardPreview) => boolean;
|
|
55
55
|
export declare const isSSRPreview: (preview: CardPreview) => boolean;
|
|
56
56
|
export declare const isSSRServerPreview: (preview: CardPreview) => boolean;
|
|
57
57
|
export declare const isSSRClientPreview: (preview: CardPreview) => boolean;
|
|
58
58
|
export declare const isSSRDataPreview: (preview: CardPreview) => boolean;
|
|
59
|
-
export declare const fetchAndCacheRemotePreview: (mediaClient: MediaClient, id: string, dimensions: CardDimensions, params: MediaStoreGetFileImageParams, mediaBlobUrlAttrs?: MediaBlobUrlAttrs
|
|
59
|
+
export declare const fetchAndCacheRemotePreview: (mediaClient: MediaClient, id: string, dimensions: CardDimensions, params: MediaStoreGetFileImageParams, mediaBlobUrlAttrs?: MediaBlobUrlAttrs, traceContext?: MediaTraceContext) => Promise<CardPreview>;
|
|
@@ -2,4 +2,4 @@ import { FileStatus } from '@atlaskit/media-client';
|
|
|
2
2
|
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
3
3
|
import { CardStatus, FilePreviewStatus } from '../types';
|
|
4
4
|
export declare const isFinalCardStatus: (status: CardStatus) => boolean;
|
|
5
|
-
export declare const getCardStatus: (fileStatus: FileStatus, filePreviewStatus: FilePreviewStatus, featureFlags?: MediaFeatureFlags
|
|
5
|
+
export declare const getCardStatus: (fileStatus: FileStatus, filePreviewStatus: FilePreviewStatus, featureFlags?: MediaFeatureFlags) => CardStatus;
|
|
@@ -19,7 +19,7 @@ export interface InlinePlayerOwnProps {
|
|
|
19
19
|
readonly cardPreview?: CardPreview;
|
|
20
20
|
readonly forwardRef?: React.Ref<HTMLDivElement>;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
22
|
+
export type InlinePlayerProps = InlinePlayerOwnProps & WithAnalyticsEventsProps;
|
|
23
23
|
export interface InlinePlayerState {
|
|
24
24
|
fileSrc?: string;
|
|
25
25
|
isUploading?: boolean;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
3
3
|
import { CardDimensions, CardOnClickCallback } from '../types';
|
|
4
4
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
5
|
-
export
|
|
5
|
+
export type MediaCardAnalyticsErrorBoundaryProps = {
|
|
6
6
|
dimensions?: CardDimensions;
|
|
7
7
|
data?: {
|
|
8
8
|
[k: string]: any;
|
|
@@ -5,5 +5,4 @@ export { easeOutCubic, easeOutExpo } from './easing';
|
|
|
5
5
|
export { spin } from './animations';
|
|
6
6
|
export declare const rootStyles: () => import("@emotion/react").SerializedStyles;
|
|
7
7
|
export declare const cardShadow: string;
|
|
8
|
-
export declare const fadeinImageStyles: () => import("@emotion/react").SerializedStyles;
|
|
9
8
|
export default rootStyles;
|
|
@@ -12,7 +12,7 @@ export interface WrapperProps {
|
|
|
12
12
|
innerRef?: RefObject<HTMLDivElement>;
|
|
13
13
|
children?: JSX.Element;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export type InlinePlayerWrapperProps = {
|
|
16
16
|
testId?: string;
|
|
17
17
|
dimensions?: CardDimensions;
|
|
18
18
|
selected: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const actionsBarClassName = "media-card-actions-bar";
|
|
2
2
|
export declare const fixedActionBarStyles = "opacity: 1;";
|
|
3
3
|
export declare const wrapperStyles: {
|
|
4
|
-
(isFixed?: boolean
|
|
4
|
+
(isFixed?: boolean): import("@emotion/react").SerializedStyles;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const blanketClassName = "media-card-blanket";
|
|
2
2
|
export declare const fixedBlanketStyles: string;
|
|
3
3
|
export declare const blanketStyles: {
|
|
4
|
-
(isFixed?: boolean
|
|
4
|
+
(isFixed?: boolean): import("@emotion/react").SerializedStyles;
|
|
5
5
|
displayName: string;
|
|
6
6
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { MessageDescriptor } from 'react-intl-next';
|
|
3
|
-
export
|
|
3
|
+
export type InternalIconMessageProps = {
|
|
4
4
|
messageDescriptor: MessageDescriptor;
|
|
5
5
|
animated?: boolean;
|
|
6
6
|
reducedFont?: boolean;
|
|
7
7
|
};
|
|
8
|
-
export
|
|
8
|
+
export type CreatingPreviewProps = {
|
|
9
9
|
disableAnimation?: boolean;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type StyledTextProps = {
|
|
12
12
|
animated?: boolean;
|
|
13
13
|
reducedFont?: boolean;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type IconMessageWrapperProps = {
|
|
16
16
|
animated?: boolean;
|
|
17
17
|
reducedFont?: boolean;
|
|
18
18
|
children?: ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MediaType, ImageResizeMode } from '@atlaskit/media-client';
|
|
3
3
|
import { CardPreview } from '../../../types';
|
|
4
|
-
export
|
|
4
|
+
export type ImageRendererProps = {
|
|
5
5
|
readonly cardPreview: CardPreview;
|
|
6
6
|
readonly mediaType: MediaType;
|
|
7
7
|
readonly alt?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Breakpoint } from '../common';
|
|
2
2
|
export declare const loadingRateLimitedContainerStyles: import("@emotion/react").SerializedStyles;
|
|
3
3
|
export declare const warningIconWrapperStyles: import("@emotion/react").SerializedStyles;
|
|
4
|
-
export
|
|
4
|
+
export type StyledTextProps = {
|
|
5
5
|
breakpoint: Breakpoint;
|
|
6
6
|
positionBottom: boolean;
|
|
7
7
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Breakpoint } from '../common';
|
|
3
|
-
export
|
|
3
|
+
export type ProgressBarProps = {
|
|
4
4
|
progress?: number;
|
|
5
5
|
breakpoint?: Breakpoint;
|
|
6
6
|
positionBottom?: boolean;
|
|
7
7
|
showOnTop?: boolean;
|
|
8
8
|
};
|
|
9
|
-
export declare const getNormalizedProgress: (progress?: number
|
|
9
|
+
export declare const getNormalizedProgress: (progress?: number) => number;
|
|
10
10
|
export declare const ProgressBar: ({ progress, breakpoint, positionBottom, showOnTop, }: ProgressBarProps) => JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { Breakpoint } from './common';
|
|
|
3
3
|
import { MediaCardCursor } from '../../types';
|
|
4
4
|
export declare const calcBreakpointSize: (wrapperWidth?: number) => Breakpoint;
|
|
5
5
|
export declare const generateResponsiveStyles: (breakpoint?: Breakpoint) => string;
|
|
6
|
-
export declare const getWrapperDimensions: (dimensions?: CardDimensions
|
|
6
|
+
export declare const getWrapperDimensions: (dimensions?: CardDimensions, appearance?: CardAppearance) => string;
|
|
7
7
|
export declare const getWrapperShadow: (disableOverlay: boolean, selected: boolean) => string;
|
|
8
8
|
export declare const getCursorStyle: (cursor: MediaCardCursor | undefined) => string;
|
|
9
9
|
export declare const getClickablePlayButtonStyles: (isPlayButtonClickable: boolean) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const tickBoxClassName = "media-card-tickbox";
|
|
2
2
|
export declare const tickboxFixedStyles: string;
|
|
3
|
-
export declare const getSelectedStyles: (selected?: boolean
|
|
3
|
+
export declare const getSelectedStyles: (selected?: boolean) => string;
|
|
4
4
|
export declare const wrapperStyles: {
|
|
5
|
-
(selected?: boolean
|
|
5
|
+
(selected?: boolean): import("@emotion/react").SerializedStyles;
|
|
6
6
|
displayName: string;
|
|
7
7
|
};
|
|
@@ -3,32 +3,32 @@ import { MessageDescriptor } from 'react-intl-next';
|
|
|
3
3
|
import { Breakpoint } from '../common';
|
|
4
4
|
import { TitleBoxIcon as TitleBoxIconType } from '../../../types';
|
|
5
5
|
import { GlobalThemeTokens } from '@atlaskit/theme/components';
|
|
6
|
-
export
|
|
6
|
+
export type TitleBoxProps = {
|
|
7
7
|
name: string;
|
|
8
8
|
breakpoint: Breakpoint;
|
|
9
9
|
createdAt?: number;
|
|
10
10
|
titleBoxBgColor?: string;
|
|
11
11
|
titleBoxIcon?: TitleBoxIconType;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type FormattedDateProps = {
|
|
14
14
|
timestamp: number;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
16
|
+
export type TitleBoxWrapperProps = {
|
|
17
17
|
breakpoint: Breakpoint;
|
|
18
18
|
titleBoxBgColor?: string;
|
|
19
19
|
children?: JSX.Element | JSX.Element[] | any;
|
|
20
20
|
theme?: GlobalThemeTokens;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
22
|
+
export type TitleBoxFooterProps = {
|
|
23
23
|
hasIconOverlap: boolean;
|
|
24
24
|
children?: JSX.Element;
|
|
25
25
|
};
|
|
26
|
-
export
|
|
26
|
+
export type TitleBoxHeaderProps = {
|
|
27
27
|
hasIconOverlap: boolean;
|
|
28
28
|
children?: JSX.Element;
|
|
29
29
|
};
|
|
30
|
-
export
|
|
31
|
-
export
|
|
30
|
+
export type OnRetryFunction = () => void;
|
|
31
|
+
export type FailedTitleBoxProps = {
|
|
32
32
|
breakpoint: Breakpoint;
|
|
33
33
|
customMessage?: MessageDescriptor;
|
|
34
34
|
};
|
package/dist/types/errors.d.ts
CHANGED
|
@@ -3,11 +3,11 @@ import { CardPreview } from './types';
|
|
|
3
3
|
* Primary reason is logged through Data Portal.
|
|
4
4
|
* Make sure all the values are whitelisted in Measure -> Event Regitry -> "mediaCardRender failed" event
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
6
|
+
export type MediaCardErrorPrimaryReason = 'upload' | 'metadata-fetch' | 'error-file-state' | RemotePreviewPrimaryReason | LocalPreviewPrimaryReason | ImageLoadPrimaryReason | SsrPreviewPrimaryReason | 'missing-error-data' | 'preview-fetch';
|
|
7
|
+
export type ImageLoadPrimaryReason = 'cache-remote-uri' | 'cache-local-uri' | 'local-uri' | 'remote-uri' | 'external-uri' | 'unknown-uri';
|
|
8
|
+
export type RemotePreviewPrimaryReason = 'remote-preview-fetch' | 'remote-preview-not-ready' | 'remote-preview-fetch-ssr';
|
|
9
|
+
export type LocalPreviewPrimaryReason = 'local-preview-get' | 'local-preview-unsupported' | 'local-preview-rejected' | 'local-preview-image' | 'local-preview-video';
|
|
10
|
+
export type SsrPreviewPrimaryReason = 'ssr-client-uri' | 'ssr-client-load' | 'ssr-server-uri' | 'ssr-server-load';
|
|
11
11
|
export declare class MediaCardError extends Error {
|
|
12
12
|
readonly primaryReason: MediaCardErrorPrimaryReason;
|
|
13
13
|
readonly secondaryError?: Error | undefined;
|
|
@@ -28,7 +28,7 @@ export declare class SsrPreviewError extends MediaCardError {
|
|
|
28
28
|
readonly secondaryError?: Error | undefined;
|
|
29
29
|
constructor(primaryReason: SsrPreviewPrimaryReason, secondaryError?: Error | undefined);
|
|
30
30
|
}
|
|
31
|
-
export declare const getImageLoadPrimaryReason: (source?:
|
|
31
|
+
export declare const getImageLoadPrimaryReason: (source?: CardPreview['source']) => ImageLoadPrimaryReason;
|
|
32
32
|
export declare class ImageLoadError extends MediaCardError {
|
|
33
33
|
constructor(source?: CardPreview['source']);
|
|
34
34
|
}
|
|
@@ -37,5 +37,5 @@ export declare const isLocalPreviewError: (err: Error) => err is LocalPreviewErr
|
|
|
37
37
|
export declare const isRemotePreviewError: (err: Error) => err is LocalPreviewError;
|
|
38
38
|
export declare const isUnsupportedLocalPreviewError: (err: Error) => boolean;
|
|
39
39
|
export declare function isImageLoadError(err: Error): err is ImageLoadError;
|
|
40
|
-
export declare const ensureMediaCardError: (primaryReason: MediaCardErrorPrimaryReason, error: Error, updatePrimaryReason?: boolean
|
|
41
|
-
export declare const isUploadError: (error?: MediaCardError
|
|
40
|
+
export declare const ensureMediaCardError: (primaryReason: MediaCardErrorPrimaryReason, error: Error, updatePrimaryReason?: boolean) => MediaCardError;
|
|
41
|
+
export declare const isUploadError: (error?: MediaCardError) => boolean | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { WithMediaClientConfigProps } from '@atlaskit/media-client';
|
|
3
3
|
import { MediaInlineCardProps } from './mediaInlineCard';
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
export type MediaInlineCardWithMediaClientConfigProps = WithMediaClientConfigProps<MediaInlineCardProps>;
|
|
5
|
+
type MediaInlineCardWithMediaClientConfigComponent = React.ComponentType<MediaInlineCardWithMediaClientConfigProps>;
|
|
6
|
+
type ErrorBoundaryComponent = React.ComponentType<{
|
|
7
7
|
data?: {
|
|
8
8
|
[k: string]: any;
|
|
9
9
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
3
3
|
import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
4
|
-
export
|
|
4
|
+
export type MediaInlineAnalyticsErrorBoundaryProps = {
|
|
5
5
|
isSelected?: boolean;
|
|
6
6
|
data?: {
|
|
7
7
|
[k: string]: any;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { FileIdentifier, Identifier, MediaClient } from '@atlaskit/media-client';
|
|
3
3
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
4
|
-
import { MediaViewerDataSource } from '@atlaskit/media-viewer';
|
|
5
4
|
import { InlineCardOnClickCallback } from '../types';
|
|
6
5
|
export interface MediaInlineCardProps {
|
|
7
6
|
identifier: FileIdentifier;
|
|
@@ -10,13 +9,6 @@ export interface MediaInlineCardProps {
|
|
|
10
9
|
shouldDisplayToolTip?: boolean;
|
|
11
10
|
isSelected?: boolean;
|
|
12
11
|
onClick?: InlineCardOnClickCallback;
|
|
13
|
-
/**
|
|
14
|
-
* Includes data source like collection name,
|
|
15
|
-
* media file list.
|
|
16
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-149 Internal documentation for deprecation (no external access)}}
|
|
17
|
-
* Use mediaViewerItems instead
|
|
18
|
-
*/
|
|
19
|
-
mediaViewerDataSource?: MediaViewerDataSource;
|
|
20
12
|
mediaViewerItems?: Identifier[];
|
|
21
13
|
}
|
|
22
14
|
export declare const MediaInlineCardInternal: FC<MediaInlineCardProps & WrappedComponentProps>;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -7,22 +7,21 @@ import { FileDetails, MediaClient, Identifier, ImageResizeMode, FileState } from
|
|
|
7
7
|
import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
8
8
|
import { MediaFeatureFlags, NumericalCardDimensions, SSR } from '@atlaskit/media-common';
|
|
9
9
|
import { CardAction } from './card/actions';
|
|
10
|
-
import { MediaViewerDataSource } from '@atlaskit/media-viewer';
|
|
11
10
|
import { MediaCardError } from './errors';
|
|
12
|
-
export
|
|
13
|
-
export
|
|
11
|
+
export type CardStatus = 'uploading' | 'loading' | 'processing' | 'loading-preview' | 'complete' | 'error' | 'failed-processing';
|
|
12
|
+
export type FilePreviewStatus = {
|
|
14
13
|
hasFilesize: boolean;
|
|
15
14
|
isPreviewable: boolean;
|
|
16
15
|
hasPreview: boolean;
|
|
17
16
|
isSupportedByBrowser: boolean;
|
|
18
17
|
};
|
|
19
|
-
export
|
|
18
|
+
export type FileStateFlags = {
|
|
20
19
|
wasStatusProcessing: boolean;
|
|
21
20
|
wasStatusUploading: boolean;
|
|
22
21
|
};
|
|
23
|
-
export
|
|
22
|
+
export type CardAppearance = 'auto' | 'image' | 'square' | 'horizontal';
|
|
24
23
|
export declare type CardDimensionValue = number | string;
|
|
25
|
-
export
|
|
24
|
+
export type CardPreviewSource = 'local' | 'remote' | 'ssr-server' | 'ssr-client' | 'ssr-data' | 'cache-local' | 'cache-remote' | 'cache-ssr-client' | 'cache-ssr-server' | 'external';
|
|
26
25
|
export interface CardPreview {
|
|
27
26
|
dataURI: string;
|
|
28
27
|
orientation?: number;
|
|
@@ -37,7 +36,7 @@ export interface CardDimensions {
|
|
|
37
36
|
width?: CardDimensionValue;
|
|
38
37
|
height?: CardDimensionValue;
|
|
39
38
|
}
|
|
40
|
-
export
|
|
39
|
+
export type TitleBoxIcon = 'LockFilledIcon';
|
|
41
40
|
export interface CardEvent {
|
|
42
41
|
event: MouseEvent<HTMLElement>;
|
|
43
42
|
mediaItemDetails?: FileDetails;
|
|
@@ -82,13 +81,6 @@ export interface CardProps extends SharedCardProps, CardEventProps {
|
|
|
82
81
|
readonly isLazy?: boolean;
|
|
83
82
|
readonly useInlinePlayer?: boolean;
|
|
84
83
|
readonly shouldOpenMediaViewer?: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Includes data source like collection name,
|
|
87
|
-
* media file list.
|
|
88
|
-
* @deprecated {@link https://hello.atlassian.net/browse/ENGHEALTH-149 Internal documentation for deprecation (no external access)}}
|
|
89
|
-
* Use mediaViewerItems instead
|
|
90
|
-
*/
|
|
91
|
-
readonly mediaViewerDataSource?: MediaViewerDataSource;
|
|
92
84
|
readonly mediaViewerItems?: Identifier[];
|
|
93
85
|
readonly contextId?: string;
|
|
94
86
|
readonly shouldEnableDownloadButton?: boolean;
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
import { FileDetails, MediaClientErrorReason, RequestMetadata } from '@atlaskit/media-client';
|
|
1
|
+
import { FileDetails, FileStatus, MediaClientErrorReason, RequestMetadata } from '@atlaskit/media-client';
|
|
2
2
|
import { FileAttributes, PerformanceAttributes, OperationalEventPayload, UIEventPayload, WithFileAttributes, WithPerformanceAttributes, SuccessAttributes, FailureAttributes, ScreenEventPayload, ScreenAttributes, MediaTraceContext, WithTraceContext } from '@atlaskit/media-common';
|
|
3
3
|
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
4
4
|
import { MediaCardError, MediaCardErrorPrimaryReason } from '../errors';
|
|
5
5
|
import { CardPreviewSource, CardDimensions, CardStatus } from '../types';
|
|
6
|
-
export
|
|
6
|
+
export type CardPreviewAttributes = {
|
|
7
7
|
fileId: string;
|
|
8
8
|
prevDimensions: CardDimensions | undefined;
|
|
9
9
|
currentDimensions: CardDimensions | undefined;
|
|
10
10
|
dimensionsPercentageDiff?: CardDimensions | undefined;
|
|
11
11
|
source: CardPreviewSource;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type WithCardPreviewCacheAttributes = {
|
|
14
14
|
cardPreviewAttributes: CardPreviewAttributes;
|
|
15
15
|
};
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
16
|
+
export type FileUriFailReason = 'local-uri' | 'remote-uri' | `unknown-uri`;
|
|
17
|
+
export type FailedErrorFailReason = MediaCardErrorPrimaryReason | 'nativeError';
|
|
18
|
+
export type MediaCardErrorInfo = {
|
|
19
19
|
failReason: FailedErrorFailReason;
|
|
20
20
|
error: MediaClientErrorReason | 'nativeError';
|
|
21
21
|
errorDetail: string;
|
|
22
22
|
metadataTraceContext?: MediaTraceContext;
|
|
23
23
|
};
|
|
24
|
-
export
|
|
24
|
+
export type SSRStatusFail = MediaCardErrorInfo & {
|
|
25
25
|
status: 'fail';
|
|
26
26
|
};
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
type SSRStatusSuccess = SuccessAttributes;
|
|
28
|
+
type SSRStatusUnknown = {
|
|
29
29
|
status: 'unknown';
|
|
30
30
|
};
|
|
31
|
-
|
|
32
|
-
export
|
|
31
|
+
type SSRStatusAttributes = SSRStatusSuccess | SSRStatusFail | SSRStatusUnknown;
|
|
32
|
+
export type SSRStatus = {
|
|
33
33
|
server: SSRStatusAttributes;
|
|
34
34
|
client: SSRStatusAttributes;
|
|
35
35
|
};
|
|
36
|
-
export
|
|
36
|
+
export type WithSSRReliability = {
|
|
37
37
|
ssrReliability?: SSRStatus;
|
|
38
38
|
};
|
|
39
|
-
export
|
|
39
|
+
export type RenderFailedEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithSSRReliability & WithTraceContext & FailureAttributes & {
|
|
40
40
|
failReason: FailedErrorFailReason | 'failed-processing';
|
|
41
41
|
error?: MediaClientErrorReason | 'nativeError';
|
|
42
42
|
request?: RequestMetadata;
|
|
43
43
|
}, 'failed', 'mediaCardRender'>;
|
|
44
|
-
export
|
|
44
|
+
export type ErrorEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithSSRReliability & WithTraceContext & FailureAttributes & {
|
|
45
45
|
cardStatus: CardStatus;
|
|
46
46
|
failReason: FailedErrorFailReason | 'failed-processing';
|
|
47
47
|
error?: MediaClientErrorReason | 'nativeError';
|
|
48
48
|
request?: RequestMetadata;
|
|
49
49
|
}, 'nonCriticalFail', 'mediaCardRender'>;
|
|
50
|
-
export
|
|
50
|
+
export type ErrorBoundaryErrorInfo = {
|
|
51
51
|
componentStack: string;
|
|
52
52
|
};
|
|
53
|
-
export
|
|
53
|
+
export type AnalyticsErrorBoundaryAttributes = {
|
|
54
54
|
error?: Error | string;
|
|
55
55
|
info?: ErrorBoundaryErrorInfo;
|
|
56
56
|
browserInfo: string;
|
|
57
57
|
failReason: string;
|
|
58
58
|
};
|
|
59
|
-
export
|
|
60
|
-
export
|
|
61
|
-
export
|
|
62
|
-
export
|
|
63
|
-
export
|
|
64
|
-
export
|
|
65
|
-
export
|
|
66
|
-
export
|
|
59
|
+
export type AnalyticsErrorBoundaryCardPayload = OperationalEventPayload<AnalyticsErrorBoundaryAttributes, 'failed', 'mediaCardRender'>;
|
|
60
|
+
export type AnalyticsErrorBoundaryInlinePayload = OperationalEventPayload<AnalyticsErrorBoundaryAttributes, 'failed', 'mediaInlineRender'>;
|
|
61
|
+
export type RenderSucceededEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithSSRReliability & SuccessAttributes & WithTraceContext, 'succeeded', 'mediaCardRender'>;
|
|
62
|
+
export type RenderCommencedEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithTraceContext, 'commenced', 'mediaCardRender'>;
|
|
63
|
+
export type CacheHitEventPayload = OperationalEventPayload<WithCardPreviewCacheAttributes, 'cache-hit', 'mediaCardCache'>;
|
|
64
|
+
export type RemoteSuccessEventPayload = OperationalEventPayload<WithCardPreviewCacheAttributes, 'Remote-success', 'mediaCardCache'>;
|
|
65
|
+
export type CopiedFileEventPayload = UIEventPayload<{}, 'copied', string>;
|
|
66
|
+
export type ClickedEventPayload = UIEventPayload<{
|
|
67
67
|
label?: string;
|
|
68
68
|
}, 'clicked', string>;
|
|
69
|
-
export
|
|
69
|
+
export type RenderScreenEventPayload = Omit<ScreenEventPayload<ScreenAttributes, 'mediaCardRenderScreen'>, 'attributes'> & {
|
|
70
70
|
attributes: {
|
|
71
71
|
type: string | undefined;
|
|
72
72
|
fileAttributes: FileAttributes;
|
|
73
73
|
};
|
|
74
74
|
};
|
|
75
|
-
export
|
|
76
|
-
export declare const getFileAttributes: (metadata: FileDetails, fileStatus?:
|
|
75
|
+
export type MediaCardAnalyticsEventPayload = RenderCommencedEventPayload | RenderSucceededEventPayload | RenderFailedEventPayload | CopiedFileEventPayload | ClickedEventPayload | RenderScreenEventPayload | CacheHitEventPayload | RemoteSuccessEventPayload | ErrorEventPayload | AnalyticsErrorBoundaryCardPayload | AnalyticsErrorBoundaryInlinePayload;
|
|
76
|
+
export declare const getFileAttributes: (metadata: FileDetails, fileStatus?: FileStatus) => FileAttributes;
|
|
77
77
|
export declare const getRenderPreviewableCardPayload: (fileAttributes: FileAttributes) => RenderScreenEventPayload;
|
|
78
78
|
export declare const getRenderCommencedEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, traceContext: MediaTraceContext) => RenderCommencedEventPayload;
|
|
79
|
-
export declare const getRenderSucceededEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext
|
|
79
|
+
export declare const getRenderSucceededEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext) => RenderSucceededEventPayload;
|
|
80
80
|
export declare const getCacheHitEventPayload: (cardPreviewAttributes: CardPreviewAttributes) => CacheHitEventPayload;
|
|
81
81
|
export declare const getRemoteSuccessEventPayload: (cardPreviewAttributes: CardPreviewAttributes) => RemoteSuccessEventPayload;
|
|
82
82
|
export declare const getRenderFailedExternalUriPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes) => RenderFailedEventPayload;
|
|
@@ -85,10 +85,10 @@ export declare const getRenderErrorErrorReason: (error: MediaCardError) => Media
|
|
|
85
85
|
export declare const getRenderErrorErrorDetail: (error: MediaCardError) => string;
|
|
86
86
|
export declare const getErrorTraceContext: (error: MediaCardError) => MediaTraceContext | undefined;
|
|
87
87
|
export declare const getRenderErrorRequestMetadata: (error: MediaCardError) => RequestMetadata | undefined;
|
|
88
|
-
export declare const extractErrorInfo: (error: MediaCardError, metadataTraceContext?: MediaTraceContext
|
|
89
|
-
export declare const getRenderErrorEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, error: MediaCardError, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext
|
|
90
|
-
export declare const getErrorEventPayload: (cardStatus: CardStatus, fileAttributes: FileAttributes, error: MediaCardError, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext
|
|
91
|
-
export declare const getRenderFailedFileStatusPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext
|
|
88
|
+
export declare const extractErrorInfo: (error: MediaCardError, metadataTraceContext?: MediaTraceContext) => MediaCardErrorInfo;
|
|
89
|
+
export declare const getRenderErrorEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, error: MediaCardError, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext) => RenderFailedEventPayload;
|
|
90
|
+
export declare const getErrorEventPayload: (cardStatus: CardStatus, fileAttributes: FileAttributes, error: MediaCardError, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext) => ErrorEventPayload;
|
|
91
|
+
export declare const getRenderFailedFileStatusPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext) => RenderFailedEventPayload;
|
|
92
92
|
export declare const getCopiedFilePayload: (fileId: string) => CopiedFileEventPayload;
|
|
93
93
|
export declare function fireMediaCardEvent(payload: MediaCardAnalyticsEventPayload, createAnalyticsEvent?: CreateUIAnalyticsEvent): void;
|
|
94
94
|
export declare const createAndFireMediaCardEvent: (payload: MediaCardAnalyticsEventPayload) => (createAnalyticsEvent: CreateUIAnalyticsEvent) => import("@atlaskit/analytics-next").UIAnalyticsEvent;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CardDimensionValue } from '../types';
|
|
2
|
-
export
|
|
2
|
+
export type BreakpointSizeValue = 'small' | 'medium' | 'large' | 'xlarge';
|
|
3
3
|
export declare const breakpointSize: (width: CardDimensionValue, sizes?: any) => BreakpointSizeValue;
|
|
4
4
|
export interface BreakpointProps {
|
|
5
5
|
breakpointSize: BreakpointSizeValue;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export type CardBreakpoint = {
|
|
8
8
|
[P in BreakpointSizeValue]?: number;
|
|
9
9
|
};
|
|
10
10
|
export declare const cardBreakpointSizes: CardBreakpoint;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, ReactNode, MouseEvent } from 'react';
|
|
2
2
|
import { CardActionIconButtonVariant } from './styles';
|
|
3
|
-
export
|
|
3
|
+
export type CardActionIconButtonProps = {
|
|
4
4
|
readonly icon: ReactNode;
|
|
5
5
|
readonly variant?: CardActionIconButtonVariant;
|
|
6
6
|
readonly triggerColor?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Component } from 'react';
|
|
2
2
|
import { CardAction } from '../../card/actions';
|
|
3
3
|
import { CardActionIconButtonVariant } from './styles';
|
|
4
|
-
export
|
|
4
|
+
export type CardActionsDropdownMenuProps = {
|
|
5
5
|
readonly actions: CardAction[];
|
|
6
6
|
readonly triggerColor?: string;
|
|
7
7
|
readonly triggerVariant?: CardActionIconButtonVariant;
|
|
@@ -5,7 +5,7 @@ export declare enum CardActionIconButtonVariant {
|
|
|
5
5
|
default = "default",
|
|
6
6
|
filled = "filled"
|
|
7
7
|
}
|
|
8
|
-
export
|
|
8
|
+
export type CardActionButtonOwnProps = {
|
|
9
9
|
variant?: CardActionIconButtonVariant;
|
|
10
10
|
style?: {
|
|
11
11
|
color: string | undefined;
|
|
@@ -14,5 +14,5 @@ export declare type CardActionButtonOwnProps = {
|
|
|
14
14
|
onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
15
15
|
children?: React.ReactNode;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type CardActionButtonProps = CardActionButtonOwnProps & HTMLAttributes<HTMLDivElement>;
|
|
18
18
|
export declare const cardActionButtonStyles: ({ variant, }: CardActionButtonProps) => import("@emotion/react").SerializedStyles;
|
|
@@ -43,7 +43,7 @@ export declare const maxSquareCardDimensions: {
|
|
|
43
43
|
width: number;
|
|
44
44
|
height: number;
|
|
45
45
|
};
|
|
46
|
-
export declare const getCardMaxHeight: (appearance?: CardAppearance
|
|
47
|
-
export declare const getCardMinWidth: (appearance?: CardAppearance
|
|
48
|
-
export declare const getCardMaxWidth: (appearance?: CardAppearance
|
|
49
|
-
export declare const getDefaultCardDimensions: (appearance?: CardAppearance
|
|
46
|
+
export declare const getCardMaxHeight: (appearance?: CardAppearance) => number;
|
|
47
|
+
export declare const getCardMinWidth: (appearance?: CardAppearance) => number;
|
|
48
|
+
export declare const getCardMaxWidth: (appearance?: CardAppearance) => number;
|
|
49
|
+
export declare const getDefaultCardDimensions: (appearance?: CardAppearance) => Required<CardDimensions>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CardDimensionValue, CardDimensions } from '../types';
|
|
2
|
-
export declare const canCompareDimension: (current?: CardDimensionValue
|
|
3
|
-
export declare const isBigger: (current?: CardDimensions
|
|
2
|
+
export declare const canCompareDimension: (current?: CardDimensionValue, next?: CardDimensionValue) => boolean;
|
|
3
|
+
export declare const isBigger: (current?: CardDimensions, next?: CardDimensions) => boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CardDimensions } from '../types';
|
|
2
2
|
import { ElementDimension } from './getElementDimension';
|
|
3
3
|
import { NumericalCardDimensions } from '@atlaskit/media-common';
|
|
4
|
-
export
|
|
4
|
+
export type getDataURIDimensionOptions = {
|
|
5
5
|
element?: Element | null;
|
|
6
6
|
dimensions?: CardDimensions;
|
|
7
7
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ElementDimension = 'height' | 'width';
|
|
2
2
|
export declare const getElementDimension: (element: Element, dimension: ElementDimension) => number;
|
|
@@ -3,4 +3,4 @@ import { MediaType } from '@atlaskit/media-client';
|
|
|
3
3
|
/**
|
|
4
4
|
* When the returned value is undefined, we'd expect the media card to take the parent's cursor style.
|
|
5
5
|
*/
|
|
6
|
-
export declare const getMediaCardCursor: (useInlinePlayer: boolean, useMediaViewer: boolean, isErrorStatus: boolean, hasCardPreview: boolean, mediaType?: MediaType
|
|
6
|
+
export declare const getMediaCardCursor: (useInlinePlayer: boolean, useMediaViewer: boolean, isErrorStatus: boolean, hasCardPreview: boolean, mediaType?: MediaType) => MediaCardCursor | undefined;
|