@atlaskit/media-card 80.8.13 → 80.8.14
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 +6 -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 +2 -2
- 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,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 {};
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { type CardStatus } from '../types';
|
|
2
|
-
import { type FileAttributes } from '@atlaskit/media-common';
|
|
3
|
-
import { type MediaCardErrorInfo, type SSRStatus } from './analytics';
|
|
4
|
-
import { MediaCardError } from '../errors';
|
|
5
|
-
import { type RequestMetadata } from '@atlaskit/media-client';
|
|
6
|
-
import { type FileStateFlags } from '../types';
|
|
7
|
-
/**
|
|
8
|
-
* Determines if performance events should be sampled for this instance.
|
|
9
|
-
* Approximately 5% of instances will be sampled.
|
|
10
|
-
*/
|
|
11
|
-
export declare const shouldPerformanceBeSampled: () => boolean;
|
|
12
|
-
export type SSRPreviewInfo = {
|
|
13
|
-
/** The srcset of the SSR preview (used to match performance entries) */
|
|
14
|
-
srcset?: string;
|
|
15
|
-
/** The full URI of the SSR preview (used to match performance entries) */
|
|
16
|
-
dataUri?: string;
|
|
17
|
-
/** Whether SSR was attempted (ssr prop was provided) */
|
|
18
|
-
wasSSRAttempted: boolean;
|
|
19
|
-
/** Whether SSR was successful (server or client status is 'success') */
|
|
20
|
-
wasSSRSuccessful: boolean;
|
|
21
|
-
};
|
|
22
|
-
type SucceedUfoPayload = {
|
|
23
|
-
fileAttributes: FileAttributes;
|
|
24
|
-
ssrReliability: SSRStatus;
|
|
25
|
-
fileStateFlags: FileStateFlags;
|
|
26
|
-
};
|
|
27
|
-
type FailedProcessingPayload = {
|
|
28
|
-
fileAttributes: FileAttributes;
|
|
29
|
-
ssrReliability: SSRStatus;
|
|
30
|
-
failReason: 'failed-processing';
|
|
31
|
-
fileStateFlags: FileStateFlags;
|
|
32
|
-
};
|
|
33
|
-
type ErrorUfoPayload = {
|
|
34
|
-
fileAttributes: FileAttributes;
|
|
35
|
-
ssrReliability: SSRStatus;
|
|
36
|
-
request: RequestMetadata | undefined;
|
|
37
|
-
fileStateFlags: FileStateFlags;
|
|
38
|
-
} & MediaCardErrorInfo;
|
|
39
|
-
export interface UseMediaCardUfoExperienceOptions {
|
|
40
|
-
/** Unique identifier for this experience instance */
|
|
41
|
-
instanceId: string;
|
|
42
|
-
/** Whether to enable UFO tracking for this instance */
|
|
43
|
-
enabled: boolean;
|
|
44
|
-
}
|
|
45
|
-
export interface StartOptions {
|
|
46
|
-
/**
|
|
47
|
-
* When true, uses the UFO interaction start time instead of current time.
|
|
48
|
-
* Use this for SSR non-lazy scenarios where the image loading started at interaction start.
|
|
49
|
-
*/
|
|
50
|
-
useInteractionTime?: boolean;
|
|
51
|
-
}
|
|
52
|
-
export interface MediaCardUfoExperience {
|
|
53
|
-
/**
|
|
54
|
-
* Start the UFO experience. Call when card becomes visible.
|
|
55
|
-
* @param options - Optional configuration for start behavior
|
|
56
|
-
*/
|
|
57
|
-
start: (options?: StartOptions) => void;
|
|
58
|
-
/**
|
|
59
|
-
* Complete the UFO experience with appropriate timing strategy.
|
|
60
|
-
* @param status - The final card status
|
|
61
|
-
* @param fileAttributes - File metadata
|
|
62
|
-
* @param fileStateFlags - File state flags
|
|
63
|
-
* @param ssrReliability - SSR reliability status
|
|
64
|
-
* @param error - Optional error for error status
|
|
65
|
-
* @param ssrPreviewInfo - SSR preview information for timing lookup
|
|
66
|
-
*/
|
|
67
|
-
complete: (status: CardStatus, fileAttributes: FileAttributes, fileStateFlags: FileStateFlags, ssrReliability: SSRStatus, error?: MediaCardError, ssrPreviewInfo?: SSRPreviewInfo) => void;
|
|
68
|
-
/** Abort the UFO experience. Call on unmount if not completed. */
|
|
69
|
-
abort: (properties?: Partial<SucceedUfoPayload>) => void;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Hook to create a UFO experience tied to a media card component lifecycle.
|
|
73
|
-
*
|
|
74
|
-
* This creates a unique UFOExperience instance per component, allowing:
|
|
75
|
-
* - Unique timing config per instance
|
|
76
|
-
* - Direct control over experience lifecycle
|
|
77
|
-
* - Proper cleanup on unmount
|
|
78
|
-
*
|
|
79
|
-
* @example
|
|
80
|
-
* ```tsx
|
|
81
|
-
* const ufoExperience = useMediaCardUfoExperience({
|
|
82
|
-
* instanceId: internalOccurrenceKey,
|
|
83
|
-
* enabled: shouldSendPerformanceEvent,
|
|
84
|
-
* });
|
|
85
|
-
*
|
|
86
|
-
* // On card visible
|
|
87
|
-
* ufoExperience.start();
|
|
88
|
-
*
|
|
89
|
-
* // On card complete/error
|
|
90
|
-
* ufoExperience.complete(status, fileAttributes, fileStateFlags, ssrReliability, error, ssrPreviewInfo);
|
|
91
|
-
* ```
|
|
92
|
-
*/
|
|
93
|
-
export declare const useMediaCardUfoExperience: ({ instanceId, enabled, }: UseMediaCardUfoExperienceOptions) => MediaCardUfoExperience;
|
|
94
|
-
export declare const startUfoExperience: (id: string, startTime?: number) => void;
|
|
95
|
-
export declare const completeUfoExperience: (id: string, status: CardStatus, fileAttributes: FileAttributes, fileStateFlags: FileStateFlags, ssrReliability: SSRStatus, error?: MediaCardError, ssrPreviewInfo?: SSRPreviewInfo) => void;
|
|
96
|
-
export declare const abortUfoExperience: (id: string, properties?: Partial<SucceedUfoPayload>) => void;
|
|
97
|
-
export type { FailedProcessingPayload as _FailedProcessingPayload };
|
|
98
|
-
export type { ErrorUfoPayload as _ErrorUfoPayload };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function usePrevious<T>(value: T | undefined): T | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const takeSnapshot: (blob: Blob) => Promise<string>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React, { type PropsWithChildren } from 'react';
|
|
2
|
-
export type ViewportDetectorProps = PropsWithChildren<{
|
|
3
|
-
cardEl: HTMLElement | null;
|
|
4
|
-
onVisible: () => void;
|
|
5
|
-
}>;
|
|
6
|
-
export declare const ViewportDetector: ({ cardEl, onVisible, children, }: ViewportDetectorProps) => React.JSX.Element;
|