@atlaskit/media-card 80.8.13 → 81.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 +32 -0
- package/actions/package.json +1 -8
- package/card/classnames/package.json +1 -8
- package/cardConstants/package.json +1 -8
- package/cardDimensions/package.json +1 -8
- package/cardError/package.json +1 -8
- package/cardLoader/package.json +1 -8
- package/cardLoading/package.json +1 -8
- package/cardPlaceholder/package.json +1 -8
- package/cardSync/package.json +1 -8
- package/classnames/package.json +1 -8
- package/dateOverrideContext/package.json +1 -8
- package/dist/cjs/card/card.js +1 -1
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +1 -1
- package/dist/es2019/card/card.js +1 -1
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +1 -1
- package/dist/esm/card/card.js +1 -1
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +1 -1
- package/errors/package.json +1 -8
- package/inlinePlayerWrapperStyles/package.json +1 -8
- package/loader/package.json +1 -8
- package/mediaInlineCardAnalytics/package.json +1 -8
- package/package.json +37 -45
- package/types/package.json +1 -8
- package/dist/types-ts4.5/card/actions.d.ts +0 -15
- package/dist/types-ts4.5/card/ai-generating-overlay/AIGeneratingOverlay.d.ts +0 -12
- package/dist/types-ts4.5/card/ai-generating-overlay/index.d.ts +0 -2
- package/dist/types-ts4.5/card/card.d.ts +0 -7
- package/dist/types-ts4.5/card/cardAnalytics.d.ts +0 -10
- package/dist/types-ts4.5/card/cardConstants.d.ts +0 -1
- package/dist/types-ts4.5/card/cardLoader.d.ts +0 -7
- package/dist/types-ts4.5/card/cardSync.d.ts +0 -5
- package/dist/types-ts4.5/card/cardView.d.ts +0 -68
- package/dist/types-ts4.5/card/cardWithMediaClient.d.ts +0 -3
- package/dist/types-ts4.5/card/classnames.d.ts +0 -2
- package/dist/types-ts4.5/card/externalImageCard.d.ts +0 -12
- package/dist/types-ts4.5/card/fileCard.d.ts +0 -81
- package/dist/types-ts4.5/card/getCardStatus.d.ts +0 -4
- package/dist/types-ts4.5/card/index.d.ts +0 -2
- package/dist/types-ts4.5/card/inlinePlayer.d.ts +0 -24
- package/dist/types-ts4.5/card/inlinePlayerLazy.d.ts +0 -3
- package/dist/types-ts4.5/card/inlinePlayerWrapper-compiled.d.ts +0 -5
- package/dist/types-ts4.5/card/inlinePlayerWrapper.d.ts +0 -3
- package/dist/types-ts4.5/card/inlinePlayerWrapperStyles.d.ts +0 -7
- package/dist/types-ts4.5/card/media-card-analytics-error-boundary.d.ts +0 -14
- package/dist/types-ts4.5/card/performance.d.ts +0 -1
- package/dist/types-ts4.5/card/svgView/helpers.d.ts +0 -2
- package/dist/types-ts4.5/card/svgView/index.d.ts +0 -1
- package/dist/types-ts4.5/card/svgView/svgImage-compiled.d.ts +0 -2
- package/dist/types-ts4.5/card/svgView/svgView.d.ts +0 -3
- package/dist/types-ts4.5/card/svgView/svgViewV2.d.ts +0 -7
- package/dist/types-ts4.5/card/svgView/types.d.ts +0 -12
- package/dist/types-ts4.5/card/types.d.ts +0 -20
- package/dist/types-ts4.5/card/ui/actionsBar/actionsBar.d.ts +0 -5
- package/dist/types-ts4.5/card/ui/actionsBar/actionsBarWrapper-compiled.d.ts +0 -5
- package/dist/types-ts4.5/card/ui/actionsBar/actionsBarWrapper.d.ts +0 -3
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/cardActionButton-compiled.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/cardActionButton.d.ts +0 -3
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/cardActionIconButton.d.ts +0 -15
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/cardActionsDropdownMenu.d.ts +0 -12
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/cardActionsView.d.ts +0 -17
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/index.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/actionsBar/cardActions/styles.d.ts +0 -21
- package/dist/types-ts4.5/card/ui/actionsBar/styles.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/actionsBar/types.d.ts +0 -11
- package/dist/types-ts4.5/card/ui/aiBorder/aiBorder.d.ts +0 -3
- package/dist/types-ts4.5/card/ui/blanket/blanket-compiled.d.ts +0 -9
- package/dist/types-ts4.5/card/ui/blanket/blanket.d.ts +0 -5
- package/dist/types-ts4.5/card/ui/blanket/styles.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/common.d.ts +0 -23
- package/dist/types-ts4.5/card/ui/iconMessage/iconMessageWrapper-compiled.d.ts +0 -2
- package/dist/types-ts4.5/card/ui/iconMessage/iconMessageWrapper.d.ts +0 -3
- package/dist/types-ts4.5/card/ui/iconMessage/index.d.ts +0 -8
- package/dist/types-ts4.5/card/ui/iconMessage/types.d.ts +0 -18
- package/dist/types-ts4.5/card/ui/iconWrapper/iconWrapper-compiled.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/iconWrapper/iconWrapper.d.ts +0 -3
- package/dist/types-ts4.5/card/ui/iconWrapper/styles.d.ts +0 -8
- package/dist/types-ts4.5/card/ui/iconWrapper/types.d.ts +0 -6
- package/dist/types-ts4.5/card/ui/imageRenderer/helpers.d.ts +0 -3
- package/dist/types-ts4.5/card/ui/imageRenderer/imageRenderer.d.ts +0 -3
- package/dist/types-ts4.5/card/ui/imageRenderer/imageRendererV2.d.ts +0 -2
- package/dist/types-ts4.5/card/ui/imageRenderer/index.d.ts +0 -3
- package/dist/types-ts4.5/card/ui/imageRenderer/resizeModeToMediaImageProps.d.ts +0 -5
- package/dist/types-ts4.5/card/ui/imageRenderer/types.d.ts +0 -18
- package/dist/types-ts4.5/card/ui/imageRenderer/wrapper.d.ts +0 -4
- package/dist/types-ts4.5/card/ui/loadingBar/loadingBar.d.ts +0 -11
- package/dist/types-ts4.5/card/ui/openMediaViewerButton/openMediaViewerButton.d.ts +0 -12
- package/dist/types-ts4.5/card/ui/playButton/playButton.d.ts +0 -2
- package/dist/types-ts4.5/card/ui/playButton/playButtonBackground-compiled.d.ts +0 -1
- package/dist/types-ts4.5/card/ui/playButton/playButtonBackground.d.ts +0 -6
- package/dist/types-ts4.5/card/ui/playButton/playButtonWrapper-compiled.d.ts +0 -1
- package/dist/types-ts4.5/card/ui/playButton/playButtonWrapper.d.ts +0 -2
- package/dist/types-ts4.5/card/ui/playButton/styles.d.ts +0 -6
- package/dist/types-ts4.5/card/ui/progressBar/progressBar.d.ts +0 -11
- package/dist/types-ts4.5/card/ui/progressBar/styledBar-compiled.d.ts +0 -13
- package/dist/types-ts4.5/card/ui/progressBar/styledBar.d.ts +0 -3
- package/dist/types-ts4.5/card/ui/progressBar/styles.d.ts +0 -8
- package/dist/types-ts4.5/card/ui/progressBar/types.d.ts +0 -8
- package/dist/types-ts4.5/card/ui/styles.d.ts +0 -12
- package/dist/types-ts4.5/card/ui/tickBox/styles.d.ts +0 -2
- package/dist/types-ts4.5/card/ui/tickBox/tickBox.d.ts +0 -3
- package/dist/types-ts4.5/card/ui/tickBox/tickBoxWrapper-compiled.d.ts +0 -5
- package/dist/types-ts4.5/card/ui/tickBox/tickBoxWrapper.d.ts +0 -6
- package/dist/types-ts4.5/card/ui/tickBox/types.d.ts +0 -4
- package/dist/types-ts4.5/card/ui/titleBox/failedTitleBox.d.ts +0 -3
- package/dist/types-ts4.5/card/ui/titleBox/styles.d.ts +0 -24
- package/dist/types-ts4.5/card/ui/titleBox/titleBox.d.ts +0 -6
- package/dist/types-ts4.5/card/ui/titleBox/titleBoxComponents-compiled.d.ts +0 -15
- package/dist/types-ts4.5/card/ui/titleBox/titleBoxComponents.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/titleBox/types.d.ts +0 -34
- package/dist/types-ts4.5/card/ui/unhandledErrorCard/contentLoadingErrorMessage.d.ts +0 -6
- package/dist/types-ts4.5/card/ui/unhandledErrorCard/index.d.ts +0 -3
- package/dist/types-ts4.5/card/ui/unhandledErrorCard/types.d.ts +0 -5
- package/dist/types-ts4.5/card/ui/unhandledErrorCard/unhandledErrorCard-compiled.d.ts +0 -9
- package/dist/types-ts4.5/card/ui/wrapper/imageContainer-compiled.d.ts +0 -14
- package/dist/types-ts4.5/card/ui/wrapper/imageContainer.d.ts +0 -15
- package/dist/types-ts4.5/card/ui/wrapper/index.d.ts +0 -2
- package/dist/types-ts4.5/card/ui/wrapper/styles.d.ts +0 -6
- package/dist/types-ts4.5/card/ui/wrapper/types.d.ts +0 -25
- package/dist/types-ts4.5/card/ui/wrapper/wrapper-compiled.d.ts +0 -7
- package/dist/types-ts4.5/card/ui/wrapper/wrapper.d.ts +0 -3
- package/dist/types-ts4.5/card/useBreakpoint.d.ts +0 -3
- package/dist/types-ts4.5/classnames.d.ts +0 -4
- package/dist/types-ts4.5/dateOverrideContext.d.ts +0 -7
- package/dist/types-ts4.5/errors.d.ts +0 -42
- package/dist/types-ts4.5/index.d.ts +0 -17
- package/dist/types-ts4.5/inline/index.d.ts +0 -2
- package/dist/types-ts4.5/inline/loader.d.ts +0 -26
- package/dist/types-ts4.5/inline/mediaInlineAnalyticsErrorBoundary.d.ts +0 -12
- package/dist/types-ts4.5/inline/mediaInlineCard.d.ts +0 -31
- package/dist/types-ts4.5/inline/mediaInlineCardAnalytics.d.ts +0 -10
- package/dist/types-ts4.5/types.d.ts +0 -143
- package/dist/types-ts4.5/utils/analytics/analytics.d.ts +0 -159
- package/dist/types-ts4.5/utils/analytics/index.d.ts +0 -2
- package/dist/types-ts4.5/utils/cardDimensions.d.ts +0 -14
- package/dist/types-ts4.5/utils/containsPixelUnit.d.ts +0 -1
- package/dist/types-ts4.5/utils/dimensionComparer.d.ts +0 -3
- package/dist/types-ts4.5/utils/document.d.ts +0 -2
- package/dist/types-ts4.5/utils/generateUniqueId.d.ts +0 -1
- package/dist/types-ts4.5/utils/getCSSUnitValue.d.ts +0 -1
- package/dist/types-ts4.5/utils/getDataURIDimension.d.ts +0 -26
- package/dist/types-ts4.5/utils/getElementDimension.d.ts +0 -2
- package/dist/types-ts4.5/utils/getMediaCardCursor.d.ts +0 -6
- package/dist/types-ts4.5/utils/globalScope/getSSRData.d.ts +0 -3
- package/dist/types-ts4.5/utils/globalScope/globalScope.d.ts +0 -17
- package/dist/types-ts4.5/utils/globalScope/index.d.ts +0 -4
- package/dist/types-ts4.5/utils/globalScope/types.d.ts +0 -8
- package/dist/types-ts4.5/utils/index.d.ts +0 -6
- package/dist/types-ts4.5/utils/isNetworkError.d.ts +0 -2
- package/dist/types-ts4.5/utils/isRetina.d.ts +0 -1
- package/dist/types-ts4.5/utils/isValidPercentageUnit.d.ts +0 -1
- package/dist/types-ts4.5/utils/lightCards/cardError.d.ts +0 -7
- package/dist/types-ts4.5/utils/lightCards/cardLoading.d.ts +0 -3
- package/dist/types-ts4.5/utils/lightCards/cardPlaceholder.d.ts +0 -6
- package/dist/types-ts4.5/utils/lightCards/errorIcon/index.d.ts +0 -9
- package/dist/types-ts4.5/utils/lightCards/errorIcon/styles.d.ts +0 -2
- package/dist/types-ts4.5/utils/lightCards/getDimensionsWithDefault.d.ts +0 -2
- package/dist/types-ts4.5/utils/lightCards/lightCardWrappers.d.ts +0 -7
- package/dist/types-ts4.5/utils/lightCards/styles.d.ts +0 -3
- package/dist/types-ts4.5/utils/lightCards/types.d.ts +0 -13
- package/dist/types-ts4.5/utils/mediaPerformanceObserver/durationMetrics.d.ts +0 -44
- package/dist/types-ts4.5/utils/mediaPerformanceObserver/mediaPerformanceObserver.d.ts +0 -13
- package/dist/types-ts4.5/utils/mediaPerformanceObserver/types.d.ts +0 -8
- package/dist/types-ts4.5/utils/mediaPerformanceObserver/ufo.d.ts +0 -2
- package/dist/types-ts4.5/utils/metadata.d.ts +0 -2
- package/dist/types-ts4.5/utils/mockIntersectionObserver.d.ts +0 -20
- package/dist/types-ts4.5/utils/printScript.d.ts +0 -2
- package/dist/types-ts4.5/utils/ufoExperiences.d.ts +0 -98
- package/dist/types-ts4.5/utils/useCurrentValueRef.d.ts +0 -2
- package/dist/types-ts4.5/utils/usePrevious.d.ts +0 -1
- package/dist/types-ts4.5/utils/videoIsPlayable.d.ts +0 -2
- package/dist/types-ts4.5/utils/videoSnapshot.d.ts +0 -1
- package/dist/types-ts4.5/utils/viewportDetector.d.ts +0 -6
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Entry Point: @atlaskit/media-card/types
|
|
3
|
-
*/
|
|
4
|
-
import { type MouseEvent } from 'react';
|
|
5
|
-
import { type FileDetails, type MediaClient, type Identifier, type ImageResizeMode, type FileState } from '@atlaskit/media-client';
|
|
6
|
-
import { type MediaSettings } from '@atlaskit/media-client-react';
|
|
7
|
-
import { type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
8
|
-
import { type MediaFeatureFlags, type NumericalCardDimensions, type SSR } from '@atlaskit/media-common';
|
|
9
|
-
import { type CardAction } from './card/actions';
|
|
10
|
-
import { type MediaCardError, type MediaCardErrorPrimaryReason } from './errors';
|
|
11
|
-
import { type ViewerOptionsProps, type MediaViewerExtensions } from '@atlaskit/media-viewer';
|
|
12
|
-
import type { MediaFilePreviewErrorPrimaryReason } from '@atlaskit/media-file-preview';
|
|
13
|
-
export type CardStatus = 'uploading' | 'loading' | 'processing' | 'loading-preview' | 'complete' | 'error' | 'failed-processing';
|
|
14
|
-
export type FilePreviewStatus = {
|
|
15
|
-
hasFilesize: boolean;
|
|
16
|
-
isPreviewable: boolean;
|
|
17
|
-
hasPreview: boolean;
|
|
18
|
-
isSupportedByBrowser: boolean;
|
|
19
|
-
};
|
|
20
|
-
export type FileStateFlags = {
|
|
21
|
-
wasStatusProcessing: boolean;
|
|
22
|
-
wasStatusUploading: boolean;
|
|
23
|
-
};
|
|
24
|
-
export type CardAppearance = 'auto' | 'image' | 'square' | 'horizontal';
|
|
25
|
-
export declare type CardDimensionValue = number | string;
|
|
26
|
-
export type CardPreviewSource = 'local' | 'remote' | 'ssr-server' | 'ssr-client' | 'ssr-data' | 'cache-local' | 'cache-remote' | 'cache-ssr-client' | 'cache-ssr-server' | 'external';
|
|
27
|
-
export interface CardPreview {
|
|
28
|
-
dataURI: string;
|
|
29
|
-
orientation?: number;
|
|
30
|
-
dimensions?: CardDimensions;
|
|
31
|
-
source: CardPreviewSource;
|
|
32
|
-
srcSet?: string;
|
|
33
|
-
}
|
|
34
|
-
export declare const isSSRPreview: (preview: CardPreview) => boolean;
|
|
35
|
-
export declare const isSSRServerPreview: (preview: CardPreview) => boolean;
|
|
36
|
-
export declare const isSSRClientPreview: (preview: CardPreview) => boolean;
|
|
37
|
-
export declare const isSSRDataPreview: (preview: CardPreview) => boolean;
|
|
38
|
-
export declare enum MediaCardCursor {
|
|
39
|
-
Action = "pointer",
|
|
40
|
-
NotReady = "wait"
|
|
41
|
-
}
|
|
42
|
-
export interface CardDimensions {
|
|
43
|
-
width?: CardDimensionValue;
|
|
44
|
-
height?: CardDimensionValue;
|
|
45
|
-
}
|
|
46
|
-
export type TitleBoxIcon = 'LockFilledIcon';
|
|
47
|
-
export interface CardEvent {
|
|
48
|
-
event: MouseEvent<HTMLElement>;
|
|
49
|
-
mediaItemDetails?: FileDetails;
|
|
50
|
-
}
|
|
51
|
-
export interface InlineCardEvent {
|
|
52
|
-
event: MouseEvent<HTMLElement> | React.KeyboardEvent;
|
|
53
|
-
mediaItemDetails?: FileDetails;
|
|
54
|
-
}
|
|
55
|
-
export interface SharedCardProps {
|
|
56
|
-
readonly disableOverlay?: boolean;
|
|
57
|
-
readonly resizeMode?: ImageResizeMode;
|
|
58
|
-
readonly featureFlags?: MediaFeatureFlags;
|
|
59
|
-
readonly appearance?: CardAppearance;
|
|
60
|
-
readonly dimensions?: CardDimensions;
|
|
61
|
-
readonly originalDimensions?: NumericalCardDimensions;
|
|
62
|
-
readonly actions?: Array<CardAction>;
|
|
63
|
-
readonly selectable?: boolean;
|
|
64
|
-
readonly selected?: boolean;
|
|
65
|
-
readonly alt?: string;
|
|
66
|
-
readonly testId?: string;
|
|
67
|
-
readonly titleBoxBgColor?: string;
|
|
68
|
-
readonly backgroundColor?: React.CSSProperties['backgroundColor'];
|
|
69
|
-
readonly titleBoxIcon?: TitleBoxIcon;
|
|
70
|
-
readonly isAIGenerating?: boolean;
|
|
71
|
-
readonly onPreviewRender?: (fileId: string) => void;
|
|
72
|
-
readonly viewerOptions?: ViewerOptionsProps;
|
|
73
|
-
/** Sets options for viewer **/
|
|
74
|
-
readonly includeHashForDuplicateFiles?: boolean;
|
|
75
|
-
}
|
|
76
|
-
export interface CardOnClickCallback {
|
|
77
|
-
(result: CardEvent, analyticsEvent?: UIAnalyticsEvent): void;
|
|
78
|
-
}
|
|
79
|
-
export interface InlineCardOnClickCallback {
|
|
80
|
-
(result: InlineCardEvent, analyticsEvent?: UIAnalyticsEvent): void;
|
|
81
|
-
}
|
|
82
|
-
export interface CardEventProps {
|
|
83
|
-
readonly onClick?: CardOnClickCallback;
|
|
84
|
-
readonly onMouseEnter?: (result: CardEvent) => void;
|
|
85
|
-
/** Callback function to be called when video enters and exit fullscreen.
|
|
86
|
-
* `fullscreen = true` indicates video enters fullscreen
|
|
87
|
-
* `fullscreen = false` indicates video exits fullscreen
|
|
88
|
-
*/
|
|
89
|
-
readonly onFullscreenChange?: (fullscreen: boolean) => void;
|
|
90
|
-
readonly videoControlsWrapperRef?: React.Ref<HTMLDivElement>;
|
|
91
|
-
}
|
|
92
|
-
export interface CardProps extends SharedCardProps, CardEventProps {
|
|
93
|
-
/** Instance of MediaClient. */
|
|
94
|
-
readonly mediaClient: MediaClient;
|
|
95
|
-
/** Instance of file identifier. */
|
|
96
|
-
readonly identifier: Identifier;
|
|
97
|
-
/** Lazy loads the media file. */
|
|
98
|
-
readonly isLazy?: boolean;
|
|
99
|
-
/** Uses the inline player for media file. */
|
|
100
|
-
readonly useInlinePlayer?: boolean;
|
|
101
|
-
/** Uses media MediaViewer to preview the media file. */
|
|
102
|
-
readonly shouldOpenMediaViewer?: boolean;
|
|
103
|
-
/** Media file list to display in Media Viewer. */
|
|
104
|
-
readonly mediaViewerItems?: Identifier[];
|
|
105
|
-
/** Retrieve auth based on a given context. */
|
|
106
|
-
readonly contextId?: string;
|
|
107
|
-
/** Enables the download button for media file. */
|
|
108
|
-
readonly shouldEnableDownloadButton?: boolean;
|
|
109
|
-
/** Server-Side-Rendering modes are "server" and "client" */
|
|
110
|
-
readonly ssr?: SSR;
|
|
111
|
-
/** Disable tooltip for the card */
|
|
112
|
-
readonly shouldHideTooltip?: boolean;
|
|
113
|
-
/** General Media Settings */
|
|
114
|
-
readonly mediaSettings?: MediaSettings;
|
|
115
|
-
/**
|
|
116
|
-
* Pre-hydrated SSR metadata from a Relay fragment.
|
|
117
|
-
* When provided and `fg('platform_media_ssr_data_seed')` is on, the card seeds
|
|
118
|
-
* `useFileState` with this data and skips the `items()` API call for files
|
|
119
|
-
* whose `processingStatus` is `succeeded`.
|
|
120
|
-
* @see https://product-fabric.atlassian.net/browse/BMPT-7914
|
|
121
|
-
*/
|
|
122
|
-
readonly ssrFileState?: FileState;
|
|
123
|
-
/** General Error handling include status errors and display errors*/
|
|
124
|
-
readonly onError?: (reason: MediaFilePreviewErrorPrimaryReason | MediaCardErrorPrimaryReason) => void;
|
|
125
|
-
/** Extensions for the media viewer (e.g. comment button in header). */
|
|
126
|
-
readonly mediaViewerExtensions?: MediaViewerExtensions;
|
|
127
|
-
}
|
|
128
|
-
export interface CardState {
|
|
129
|
-
status: CardStatus;
|
|
130
|
-
isCardVisible: boolean;
|
|
131
|
-
shouldAutoplay?: boolean;
|
|
132
|
-
isPlayingFile: boolean;
|
|
133
|
-
mediaViewerSelectedItem?: Identifier;
|
|
134
|
-
fileState?: FileState;
|
|
135
|
-
progress?: number;
|
|
136
|
-
cardPreview?: CardPreview;
|
|
137
|
-
error?: MediaCardError;
|
|
138
|
-
cardRef: HTMLDivElement | null;
|
|
139
|
-
isBannedLocalPreview: boolean;
|
|
140
|
-
previewDidRender: boolean;
|
|
141
|
-
wasResolvedUpfrontPreview: boolean;
|
|
142
|
-
shouldUpdateStateForIdentifier?: boolean;
|
|
143
|
-
}
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { type ErrorInfo } from 'react';
|
|
2
|
-
import { type FileDetails, type FileStatus, type MediaClientErrorReason, type RequestErrorMetadata, type RequestMetadata } from '@atlaskit/media-client';
|
|
3
|
-
import { type FileAttributes, type PerformanceAttributes, type OperationalEventPayload, type UIEventPayload, type WithFileAttributes, type WithPerformanceAttributes, type SuccessAttributes, type FailureAttributes, type MediaTraceContext, type WithTraceContext } from '@atlaskit/media-common/analytics';
|
|
4
|
-
import { type CreateUIAnalyticsEvent, type UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
|
-
import { type MediaCardError, type MediaCardErrorPrimaryReason } from '../../errors';
|
|
6
|
-
import { type CardPreviewSource, type CardDimensions, type CardStatus } from '../../types';
|
|
7
|
-
import { type SSR } from '@atlaskit/media-common';
|
|
8
|
-
import { type ProcessingFailReason } from '@atlaskit/media-state';
|
|
9
|
-
export type CardPreviewAttributes = {
|
|
10
|
-
fileId: string;
|
|
11
|
-
prevDimensions: CardDimensions | undefined;
|
|
12
|
-
currentDimensions: CardDimensions | undefined;
|
|
13
|
-
dimensionsPercentageDiff?: CardDimensions | undefined;
|
|
14
|
-
source: CardPreviewSource;
|
|
15
|
-
};
|
|
16
|
-
type WithCardPreviewCacheAttributes = {
|
|
17
|
-
cardPreviewAttributes: CardPreviewAttributes;
|
|
18
|
-
};
|
|
19
|
-
type WithCardPerfAttributes = {
|
|
20
|
-
ssr?: SSR;
|
|
21
|
-
fileId: string;
|
|
22
|
-
mediaClientId?: string;
|
|
23
|
-
transferSize: number;
|
|
24
|
-
decodedBodySize: number;
|
|
25
|
-
totalDuration: number;
|
|
26
|
-
tcpHandshakeTime: number;
|
|
27
|
-
dnsLookupTime: number;
|
|
28
|
-
redirectTimeTaken: number;
|
|
29
|
-
tlsConnectNegotiationTime: number;
|
|
30
|
-
timeTakenToFetchWithoutRedirect: number;
|
|
31
|
-
browserCacheHit: boolean;
|
|
32
|
-
nextHopProtocol: string;
|
|
33
|
-
interimRequestTime: number;
|
|
34
|
-
requestInvocationTime?: number;
|
|
35
|
-
contentDownloadTime: number;
|
|
36
|
-
userAgent: string;
|
|
37
|
-
cdnCacheHit: boolean;
|
|
38
|
-
cdnDownstreamFBL?: number;
|
|
39
|
-
cdnUpstreamFBL?: number;
|
|
40
|
-
};
|
|
41
|
-
export type FileUriFailReason = 'local-uri' | 'remote-uri' | `unknown-uri`;
|
|
42
|
-
export type FailedErrorFailReason = MediaCardErrorPrimaryReason | 'nativeError';
|
|
43
|
-
export type MediaCardErrorInfo = {
|
|
44
|
-
failReason: FailedErrorFailReason;
|
|
45
|
-
error: MediaClientErrorReason | 'nativeError';
|
|
46
|
-
errorDetail: string;
|
|
47
|
-
metadataTraceContext?: MediaTraceContext;
|
|
48
|
-
};
|
|
49
|
-
export type SSRStatusFail = MediaCardErrorInfo & {
|
|
50
|
-
status: 'fail';
|
|
51
|
-
};
|
|
52
|
-
type SSRStatusSuccess = SuccessAttributes;
|
|
53
|
-
type SSRStatusUnknown = {
|
|
54
|
-
status: 'unknown';
|
|
55
|
-
};
|
|
56
|
-
type SSRStatusAttributes = SSRStatusSuccess | SSRStatusFail | SSRStatusUnknown;
|
|
57
|
-
export type SSRStatus = {
|
|
58
|
-
server: SSRStatusAttributes;
|
|
59
|
-
client: SSRStatusAttributes;
|
|
60
|
-
};
|
|
61
|
-
export type WithSSRReliability = {
|
|
62
|
-
ssrReliability?: SSRStatus;
|
|
63
|
-
};
|
|
64
|
-
export type RenderFailedEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithSSRReliability & WithTraceContext & FailureAttributes & {
|
|
65
|
-
failReason: FailedErrorFailReason | 'failed-processing';
|
|
66
|
-
error?: MediaClientErrorReason | 'nativeError';
|
|
67
|
-
statusCode?: number;
|
|
68
|
-
request?: RequestMetadata;
|
|
69
|
-
processingFailReason?: ProcessingFailReason | 'not-available';
|
|
70
|
-
}, 'failed', 'mediaCardRender'>;
|
|
71
|
-
export type DownloadFailedEventPayload = OperationalEventPayload<WithFileAttributes & WithTraceContext & FailureAttributes & {
|
|
72
|
-
failReason: FailedErrorFailReason;
|
|
73
|
-
error?: MediaClientErrorReason | 'nativeError';
|
|
74
|
-
statusCode?: number;
|
|
75
|
-
request?: RequestMetadata;
|
|
76
|
-
}, 'failed', 'mediaCardDownload'>;
|
|
77
|
-
export type ErrorEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithSSRReliability & WithTraceContext & FailureAttributes & {
|
|
78
|
-
cardStatus: CardStatus;
|
|
79
|
-
failReason: FailedErrorFailReason | 'failed-processing';
|
|
80
|
-
error?: MediaClientErrorReason | 'nativeError';
|
|
81
|
-
statusCode?: number;
|
|
82
|
-
request?: RequestMetadata;
|
|
83
|
-
}, 'nonCriticalFail', 'mediaCardRender'>;
|
|
84
|
-
export type ErrorBoundaryErrorInfo = {
|
|
85
|
-
componentStack: string;
|
|
86
|
-
};
|
|
87
|
-
export type AnalyticsErrorBoundaryAttributes = {
|
|
88
|
-
error?: Error | string;
|
|
89
|
-
info?: ErrorInfo;
|
|
90
|
-
browserInfo: string;
|
|
91
|
-
failReason: string;
|
|
92
|
-
};
|
|
93
|
-
export type AnalyticsErrorBoundaryCardPayload = OperationalEventPayload<AnalyticsErrorBoundaryAttributes, 'failed', 'mediaCardRender'>;
|
|
94
|
-
export type AnalyticsErrorBoundaryInlinePayload = OperationalEventPayload<AnalyticsErrorBoundaryAttributes, 'failed', 'mediaInlineRender'>;
|
|
95
|
-
export type RenderInlineCardSucceededEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & SuccessAttributes, 'succeeded', 'mediaInlineRender'>;
|
|
96
|
-
export type RenderInlineCardFailedEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & FailureAttributes & {
|
|
97
|
-
failReason: FailedErrorFailReason | 'failed-processing';
|
|
98
|
-
error?: MediaClientErrorReason | 'nativeError';
|
|
99
|
-
request?: RequestMetadata;
|
|
100
|
-
processingFailReason?: ProcessingFailReason | 'not-available';
|
|
101
|
-
}, 'failed', 'mediaInlineRender'>;
|
|
102
|
-
export type DownloadSucceededEventPayload = OperationalEventPayload<WithFileAttributes & SuccessAttributes & WithTraceContext, 'succeeded', 'mediaCardDownload'>;
|
|
103
|
-
export type RenderSucceededEventPayload = OperationalEventPayload<WithFileAttributes & WithPerformanceAttributes & WithSSRReliability & SuccessAttributes & WithTraceContext, 'succeeded', 'mediaCardRender'>;
|
|
104
|
-
export type CacheHitEventPayload = OperationalEventPayload<WithCardPreviewCacheAttributes, 'cache-hit', 'mediaCardCache'>;
|
|
105
|
-
export type RemoteSuccessEventPayload = OperationalEventPayload<WithCardPreviewCacheAttributes, 'Remote-success', 'mediaCardCache'>;
|
|
106
|
-
export type MediaCardPerfObserverPayload = OperationalEventPayload<WithCardPerfAttributes, 'succeeded', 'mediaCardPerfObserver'>;
|
|
107
|
-
export type CopiedFileEventPayload = UIEventPayload<{}, 'copied', string>;
|
|
108
|
-
export type ClickedEventPayload = UIEventPayload<{
|
|
109
|
-
label?: string;
|
|
110
|
-
}, 'clicked', string>;
|
|
111
|
-
export type AuthProviderSucceededAnalyticsPayload = OperationalEventPayload<{
|
|
112
|
-
status: 'succeeded';
|
|
113
|
-
durationMs: number;
|
|
114
|
-
timeoutMs: number;
|
|
115
|
-
collectionName?: string;
|
|
116
|
-
}, 'succeeded', 'mediaAuthProvider'>;
|
|
117
|
-
export type AuthProviderFailedAnalyticsPayload = OperationalEventPayload<{
|
|
118
|
-
status: 'failed';
|
|
119
|
-
durationMs: number;
|
|
120
|
-
timeoutMs: number;
|
|
121
|
-
collectionName?: string;
|
|
122
|
-
failReason: string;
|
|
123
|
-
error?: string;
|
|
124
|
-
errorDetail?: string;
|
|
125
|
-
}, 'failed', 'mediaAuthProvider'>;
|
|
126
|
-
export type MediaCardAnalyticsEventPayload = RenderSucceededEventPayload | RenderFailedEventPayload | CopiedFileEventPayload | ClickedEventPayload | CacheHitEventPayload | RemoteSuccessEventPayload | ErrorEventPayload | AnalyticsErrorBoundaryCardPayload | AnalyticsErrorBoundaryInlinePayload | RenderInlineCardFailedEventPayload | RenderInlineCardSucceededEventPayload | DownloadSucceededEventPayload | DownloadFailedEventPayload | AuthProviderSucceededAnalyticsPayload | AuthProviderFailedAnalyticsPayload;
|
|
127
|
-
export declare const getFileAttributes: (metadata: FileDetails, fileStatus?: FileStatus) => FileAttributes;
|
|
128
|
-
export declare const getRenderSucceededEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext, samplingRate?: number) => RenderSucceededEventPayload;
|
|
129
|
-
export declare const getDownloadSucceededEventPayload: (fileAttributes: FileAttributes, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext) => DownloadSucceededEventPayload;
|
|
130
|
-
export declare const getCacheHitEventPayload: (cardPreviewAttributes: CardPreviewAttributes) => CacheHitEventPayload;
|
|
131
|
-
export declare const getRemoteSuccessEventPayload: (cardPreviewAttributes: CardPreviewAttributes) => RemoteSuccessEventPayload;
|
|
132
|
-
export declare const getRenderFailedExternalUriPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes) => RenderFailedEventPayload;
|
|
133
|
-
export declare const getRenderErrorFailReason: (error: MediaCardError) => FailedErrorFailReason;
|
|
134
|
-
export declare const getRenderErrorErrorReason: (error: MediaCardError) => MediaClientErrorReason | "nativeError";
|
|
135
|
-
export declare const getRenderErrorErrorDetail: (error: MediaCardError) => string;
|
|
136
|
-
export declare const getErrorTraceContext: (error: MediaCardError) => MediaTraceContext | undefined;
|
|
137
|
-
export declare const getRenderErrorRequestMetadata: (error: MediaCardError) => RequestErrorMetadata | undefined;
|
|
138
|
-
export declare const extractErrorInfo: (error: MediaCardError, metadataTraceContext?: MediaTraceContext) => MediaCardErrorInfo;
|
|
139
|
-
export declare const getRenderErrorEventPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, error: MediaCardError, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext) => RenderFailedEventPayload;
|
|
140
|
-
export declare const getDownloadFailedEventPayload: (fileAttributes: FileAttributes, error: MediaCardError, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext) => DownloadFailedEventPayload;
|
|
141
|
-
export declare const getErrorEventPayload: (cardStatus: CardStatus, fileAttributes: FileAttributes, error: MediaCardError, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext) => ErrorEventPayload;
|
|
142
|
-
export declare const getRenderFailedFileStatusPayload: (fileAttributes: FileAttributes, performanceAttributes: PerformanceAttributes, ssrReliability: SSRStatus, traceContext: MediaTraceContext, metadataTraceContext?: MediaTraceContext, processingFailReason?: ProcessingFailReason) => RenderFailedEventPayload;
|
|
143
|
-
export declare const getAuthProviderSucceededPayload: (durationMs: number, timeoutMs: number, authContext?: {
|
|
144
|
-
access?: Array<{
|
|
145
|
-
type: string;
|
|
146
|
-
name?: string;
|
|
147
|
-
}>;
|
|
148
|
-
collectionName?: string;
|
|
149
|
-
}) => AuthProviderSucceededAnalyticsPayload;
|
|
150
|
-
export declare const getAuthProviderFailedPayload: (durationMs: number, timeoutMs: number, error: Error, authContext?: {
|
|
151
|
-
access?: Array<{
|
|
152
|
-
type: string;
|
|
153
|
-
name?: string;
|
|
154
|
-
}>;
|
|
155
|
-
collectionName?: string;
|
|
156
|
-
}) => AuthProviderFailedAnalyticsPayload;
|
|
157
|
-
export declare function fireMediaCardEvent(payload: MediaCardAnalyticsEventPayload, createAnalyticsEvent?: CreateUIAnalyticsEvent): void;
|
|
158
|
-
export declare const createAndFireMediaCardEvent: (payload: MediaCardAnalyticsEventPayload) => ((createAnalyticsEvent: CreateUIAnalyticsEvent) => UIAnalyticsEvent);
|
|
159
|
-
export {};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export type { CardPreviewAttributes, FileUriFailReason, FailedErrorFailReason, MediaCardErrorInfo, SSRStatusFail, SSRStatus, WithSSRReliability, RenderFailedEventPayload, ErrorEventPayload, ErrorBoundaryErrorInfo, AnalyticsErrorBoundaryAttributes, AnalyticsErrorBoundaryCardPayload, AnalyticsErrorBoundaryInlinePayload, RenderInlineCardSucceededEventPayload, RenderInlineCardFailedEventPayload, RenderSucceededEventPayload, CacheHitEventPayload, RemoteSuccessEventPayload, CopiedFileEventPayload, ClickedEventPayload, MediaCardAnalyticsEventPayload, AuthProviderSucceededAnalyticsPayload, AuthProviderFailedAnalyticsPayload, } from './analytics';
|
|
2
|
-
export { getFileAttributes, getRenderSucceededEventPayload, getCacheHitEventPayload, getRemoteSuccessEventPayload, getRenderFailedExternalUriPayload, getRenderErrorFailReason, getRenderErrorErrorReason, getRenderErrorErrorDetail, getErrorTraceContext, getRenderErrorRequestMetadata, extractErrorInfo, getRenderErrorEventPayload, getErrorEventPayload, getRenderFailedFileStatusPayload, fireMediaCardEvent, createAndFireMediaCardEvent, getDownloadSucceededEventPayload, getDownloadFailedEventPayload, getAuthProviderSucceededPayload, getAuthProviderFailedPayload, } from './analytics';
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type CardAppearance, type CardDimensions } from '../types';
|
|
2
|
-
export declare const defaultImageCardDimensions: {
|
|
3
|
-
width: number;
|
|
4
|
-
height: number;
|
|
5
|
-
};
|
|
6
|
-
export declare const defaultHorizontalCardDimensions: {
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
};
|
|
10
|
-
export declare const defaultSquareCardDimensions: {
|
|
11
|
-
width: number;
|
|
12
|
-
height: number;
|
|
13
|
-
};
|
|
14
|
-
export declare const getDefaultCardDimensions: (appearance?: CardAppearance) => Required<CardDimensions>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const containsPixelUnit: (value: string) => boolean;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { type CardDimensionValue, type CardDimensions } from '../types';
|
|
2
|
-
export declare const canCompareDimension: (current?: CardDimensionValue, next?: CardDimensionValue) => boolean;
|
|
3
|
-
export declare const isBigger: (current?: CardDimensions, next?: CardDimensions) => boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const generateUniqueId: () => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getCSSUnitValue(value: number | string): string;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type CardDimensions } from '../types';
|
|
2
|
-
import { type ElementDimension } from './getElementDimension';
|
|
3
|
-
import { type NumericalCardDimensions } from '@atlaskit/media-common';
|
|
4
|
-
/**
|
|
5
|
-
* ************************************************
|
|
6
|
-
* For Card v1
|
|
7
|
-
* ************************************************
|
|
8
|
-
*/
|
|
9
|
-
export type getDataURIDimensionOptions = {
|
|
10
|
-
element?: Element | null;
|
|
11
|
-
dimensions?: CardDimensions;
|
|
12
|
-
};
|
|
13
|
-
export declare const getDataURIDimension: (dimension: ElementDimension, options: getDataURIDimensionOptions) => number;
|
|
14
|
-
export declare const getRequestedDimensions: (options: getDataURIDimensionOptions) => NumericalCardDimensions;
|
|
15
|
-
/**
|
|
16
|
-
* ************************************************
|
|
17
|
-
* For Card v2
|
|
18
|
-
* ************************************************
|
|
19
|
-
*/
|
|
20
|
-
type ResolveCardDimensionOptions = {
|
|
21
|
-
element?: Element | null;
|
|
22
|
-
dimensions?: CardDimensions;
|
|
23
|
-
};
|
|
24
|
-
export declare const resolveCardPreviewDimension: (dimensionName: ElementDimension, { dimensions, element }: ResolveCardDimensionOptions) => number;
|
|
25
|
-
export declare const resolveCardPreviewDimensions: (options: ResolveCardDimensionOptions) => NumericalCardDimensions;
|
|
26
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { MediaCardCursor } from '../types';
|
|
2
|
-
import { type 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) => MediaCardCursor | undefined;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type React from 'react';
|
|
2
|
-
import { type FileIdentifier } from '@atlaskit/media-client';
|
|
3
|
-
import { type NumericalCardDimensions } from '@atlaskit/media-common';
|
|
4
|
-
import { type MediaCardErrorInfo } from '../../utils/analytics';
|
|
5
|
-
import { type MediaCardSsr } from './types';
|
|
6
|
-
export declare const GLOBAL_MEDIA_CARD_SSR = "mediaCardSsr";
|
|
7
|
-
export declare const GLOBAL_MEDIA_NAMESPACE = "__MEDIA_INTERNAL";
|
|
8
|
-
export declare const GLOBAL_MEDIA_PERFORMANCE_ENTRIES = "performanceEntries";
|
|
9
|
-
export type MediaGlobalScope = {
|
|
10
|
-
[GLOBAL_MEDIA_CARD_SSR]?: MediaCardSsr;
|
|
11
|
-
[GLOBAL_MEDIA_PERFORMANCE_ENTRIES]?: PerformanceEntry[];
|
|
12
|
-
};
|
|
13
|
-
export declare function getMediaGlobalScope(globalScope?: any): MediaGlobalScope;
|
|
14
|
-
export declare function getMediaCardSSR(globalScope?: any): MediaCardSsr;
|
|
15
|
-
export declare const getKey: ({ id, collectionName, occurrenceKey }: FileIdentifier) => string;
|
|
16
|
-
export declare const storeDataURI: (key: string, dataURI?: string, dimensions?: Partial<NumericalCardDimensions>, error?: MediaCardErrorInfo, globalScope?: any) => void;
|
|
17
|
-
export declare const generateScriptProps: (identifier: FileIdentifier, dataURI?: string, dimensions?: Partial<NumericalCardDimensions>, error?: MediaCardErrorInfo) => React.ScriptHTMLAttributes<HTMLScriptElement>;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { GLOBAL_MEDIA_NAMESPACE, GLOBAL_MEDIA_CARD_SSR, generateScriptProps, 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 { type NumericalCardDimensions } from '@atlaskit/media-common';
|
|
2
|
-
import { type MediaCardErrorInfo } from '../../utils/analytics';
|
|
3
|
-
export type MediaCardSsrData = {
|
|
4
|
-
dataURI?: string;
|
|
5
|
-
dimensions?: Partial<NumericalCardDimensions>;
|
|
6
|
-
error?: MediaCardErrorInfo;
|
|
7
|
-
};
|
|
8
|
-
export type MediaCardSsr = Record<string, MediaCardSsrData>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { isRetina } from './isRetina';
|
|
2
|
-
export { defaultHorizontalCardDimensions, defaultImageCardDimensions, defaultSquareCardDimensions, getDefaultCardDimensions, } from './cardDimensions';
|
|
3
|
-
export { isValidPercentageUnit } from './isValidPercentageUnit';
|
|
4
|
-
export { getElementDimension } from './getElementDimension';
|
|
5
|
-
export type { ElementDimension } from './getElementDimension';
|
|
6
|
-
export { containsPixelUnit } from './containsPixelUnit';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isRetina(): boolean;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isValidPercentageUnit: (value: string | number) => boolean;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type CardDimensions } from '../../types';
|
|
2
|
-
import { type MediaFeatureFlags } from '@atlaskit/media-common';
|
|
3
|
-
export interface StaticCardProps {
|
|
4
|
-
dimensions?: CardDimensions;
|
|
5
|
-
testId?: string;
|
|
6
|
-
featureFlags?: MediaFeatureFlags;
|
|
7
|
-
interactionName?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface WrapperProps {
|
|
10
|
-
dimensions: CardDimensions;
|
|
11
|
-
testId?: string;
|
|
12
|
-
children?: JSX.Element;
|
|
13
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { type ExperimentalPerformanceResourceTiming } from './types';
|
|
2
|
-
export type MediaDurationMetrics = ReturnType<typeof createMediaDurationMetrics>;
|
|
3
|
-
export type UfoDurationMetrics = Record<string, {
|
|
4
|
-
start: number;
|
|
5
|
-
end?: number;
|
|
6
|
-
size?: number;
|
|
7
|
-
}>;
|
|
8
|
-
export declare const createMediaDurationMetrics: (entry: ExperimentalPerformanceResourceTiming, interactionStartTime: number) => {
|
|
9
|
-
/**
|
|
10
|
-
* The user agent string for the current browser
|
|
11
|
-
* Read more: https://developer.mozilla.org/en-US/docs/Web/API/Navigator/userAgent
|
|
12
|
-
*/
|
|
13
|
-
userAgent: string;
|
|
14
|
-
/**
|
|
15
|
-
* Performance resource timing data sent by the server. This includes:
|
|
16
|
-
*
|
|
17
|
-
* `cdnCacheHit` is a boolean determining whether the CDN cache was hit or missed.
|
|
18
|
-
*
|
|
19
|
-
* `cdnDownstreamFBL` is the 'CDN Downstream First Byte Latency'. It represents
|
|
20
|
-
* how long the it took the CDN to respond to the frontend.
|
|
21
|
-
*
|
|
22
|
-
* `cdnUpstreamFBL` is the 'CDN Upstream First Byte Latency'. It represents the
|
|
23
|
-
* time the Media backend took to respond to the CDN, in the case that the CDN
|
|
24
|
-
* cache was a miss. Notably, this timing is a subset of the `cdnDownstreamFBL` timing.
|
|
25
|
-
*/
|
|
26
|
-
cdnCacheHit: boolean;
|
|
27
|
-
cdnDownstreamFBL: number | undefined;
|
|
28
|
-
cdnUpstreamFBL: number | undefined;
|
|
29
|
-
startedAt: number;
|
|
30
|
-
/**
|
|
31
|
-
* Performance resource timing data regarding the loading of an
|
|
32
|
-
* application's resources as described in
|
|
33
|
-
* https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming
|
|
34
|
-
*/
|
|
35
|
-
transferSize: number;
|
|
36
|
-
decodedBodySize: number;
|
|
37
|
-
totalDuration: number;
|
|
38
|
-
initiatorType: string;
|
|
39
|
-
endedAt: number;
|
|
40
|
-
responseEnd: number;
|
|
41
|
-
browserCacheHit: boolean;
|
|
42
|
-
nextHopProtocol: string;
|
|
43
|
-
};
|
|
44
|
-
export declare const createUfoDurationMetrics: (entry: ExperimentalPerformanceResourceTiming, interactionStartTime: number) => UfoDurationMetrics;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { type CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
|
|
2
|
-
declare const MEDIA_CARD_PERF_STATE_KEY = "__mediaCardPerfState_asflkajsdflja";
|
|
3
|
-
declare global {
|
|
4
|
-
interface Window {
|
|
5
|
-
[MEDIA_CARD_PERF_STATE_KEY]?: {
|
|
6
|
-
mediaCardPerfObserver?: PerformanceObserver;
|
|
7
|
-
mediaCardCreateAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
export declare const setAnalyticsContext: (newAnalyticsContext: CreateUIAnalyticsEvent) => void;
|
|
12
|
-
export declare const startResourceObserver: () => void;
|
|
13
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `ExperimentalPerformanceResourceTiming` type accounts for the experimental value `firstInterimResponseStart`
|
|
3
|
-
* which is present in Chrome, but not present in FireFox or Safari.
|
|
4
|
-
* Read more: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/firstInterimResponseStart
|
|
5
|
-
*/
|
|
6
|
-
export interface ExperimentalPerformanceResourceTiming extends PerformanceResourceTiming {
|
|
7
|
-
firstInterimResponseStart?: number;
|
|
8
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
type NestedPartial<T> = {
|
|
2
|
-
[K in keyof T]?: Partial<T[K]>;
|
|
3
|
-
};
|
|
4
|
-
type SetupOptions = {
|
|
5
|
-
observe?: () => void;
|
|
6
|
-
disconnect?: () => void;
|
|
7
|
-
};
|
|
8
|
-
export declare class MockIntersectionObserver {
|
|
9
|
-
private callback;
|
|
10
|
-
private originalObserver?;
|
|
11
|
-
private mockObserver?;
|
|
12
|
-
private mockObserverInstance?;
|
|
13
|
-
private storeMockObserver;
|
|
14
|
-
private addMockObserverToWindow;
|
|
15
|
-
private removeMockObserverFromWindow;
|
|
16
|
-
setup(options?: SetupOptions): void;
|
|
17
|
-
cleanup(): void;
|
|
18
|
-
triggerIntersect(entry: NestedPartial<IntersectionObserverEntry>): void;
|
|
19
|
-
}
|
|
20
|
-
export {};
|