@atlaskit/media-card 77.1.1 → 77.2.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 +14 -0
- package/dist/cjs/card/card.js +17 -13
- package/dist/cjs/card/cardState.js +1 -1
- package/dist/cjs/card/getCardPreview/index.js +2 -5
- package/dist/cjs/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/cjs/card/useBreakpoint.js +29 -0
- package/dist/cjs/card/v2/cardV2.js +22 -20
- package/dist/cjs/card/v2/cardViewV2.js +5 -22
- package/dist/cjs/card/v2/inlinePlayerLazyV2.js +35 -0
- package/dist/cjs/card/v2/inlinePlayerV2.js +222 -0
- package/dist/cjs/inline/loader.js +1 -1
- package/dist/cjs/utils/ufoExperiences.js +18 -14
- package/dist/es2019/card/card.js +18 -16
- package/dist/es2019/card/cardState.js +1 -1
- package/dist/es2019/card/getCardPreview/index.js +0 -5
- package/dist/es2019/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/es2019/card/useBreakpoint.js +22 -0
- package/dist/es2019/card/v2/cardV2.js +23 -23
- package/dist/es2019/card/v2/cardViewV2.js +4 -18
- package/dist/es2019/card/v2/inlinePlayerLazyV2.js +10 -0
- package/dist/es2019/card/v2/inlinePlayerV2.js +164 -0
- package/dist/es2019/inline/loader.js +1 -1
- package/dist/es2019/utils/ufoExperiences.js +18 -9
- package/dist/esm/card/card.js +18 -14
- package/dist/esm/card/cardState.js +1 -1
- package/dist/esm/card/getCardPreview/index.js +2 -5
- package/dist/esm/card/media-card-analytics-error-boundary.js +1 -1
- package/dist/esm/card/useBreakpoint.js +24 -0
- package/dist/esm/card/v2/cardV2.js +23 -21
- package/dist/esm/card/v2/cardViewV2.js +7 -24
- package/dist/esm/card/v2/inlinePlayerLazyV2.js +23 -0
- package/dist/esm/card/v2/inlinePlayerV2.js +212 -0
- package/dist/esm/inline/loader.js +1 -1
- package/dist/esm/utils/ufoExperiences.js +17 -13
- package/dist/types/card/card.d.ts +1 -0
- package/dist/types/card/cardState.d.ts +1 -2
- package/dist/types/card/getCardPreview/index.d.ts +4 -10
- package/dist/types/card/useBreakpoint.d.ts +3 -0
- package/dist/types/card/v2/cardV2.d.ts +3 -2
- package/dist/types/card/v2/inlinePlayerLazyV2.d.ts +2 -0
- package/dist/types/card/v2/inlinePlayerV2.d.ts +23 -0
- package/dist/types/utils/ufoExperiences.d.ts +7 -0
- package/dist/types-ts4.5/card/card.d.ts +1 -0
- package/dist/types-ts4.5/card/cardState.d.ts +1 -2
- package/dist/types-ts4.5/card/getCardPreview/index.d.ts +4 -10
- package/dist/types-ts4.5/card/useBreakpoint.d.ts +3 -0
- package/dist/types-ts4.5/card/v2/cardV2.d.ts +3 -2
- package/dist/types-ts4.5/card/v2/inlinePlayerLazyV2.d.ts +2 -0
- package/dist/types-ts4.5/card/v2/inlinePlayerV2.d.ts +23 -0
- package/dist/types-ts4.5/utils/ufoExperiences.d.ts +7 -0
- package/package.json +5 -4
|
@@ -7,7 +7,7 @@ import { extractErrorInfo, getRenderErrorRequestMetadata } from './analytics';
|
|
|
7
7
|
import { MediaCardError } from '../errors';
|
|
8
8
|
import { getMediaEnvironment, getMediaRegion } from '@atlaskit/media-client';
|
|
9
9
|
var packageName = "@atlaskit/media-card";
|
|
10
|
-
var packageVersion = "77.
|
|
10
|
+
var packageVersion = "77.2.0";
|
|
11
11
|
var concurrentExperience;
|
|
12
12
|
var getExperience = function getExperience(id) {
|
|
13
13
|
if (!concurrentExperience) {
|
|
@@ -55,23 +55,27 @@ export var completeUfoExperience = function completeUfoExperience(id, status, fi
|
|
|
55
55
|
break;
|
|
56
56
|
}
|
|
57
57
|
};
|
|
58
|
+
var getBasePayloadAttributes = function getBasePayloadAttributes() {
|
|
59
|
+
return {
|
|
60
|
+
packageName: packageName,
|
|
61
|
+
packageVersion: packageVersion,
|
|
62
|
+
mediaEnvironment: getMediaEnvironment(),
|
|
63
|
+
mediaRegion: getMediaRegion()
|
|
64
|
+
};
|
|
65
|
+
};
|
|
58
66
|
var succeedUfoExperience = function succeedUfoExperience(id, properties) {
|
|
59
67
|
getExperience(id).success({
|
|
60
|
-
metadata: _objectSpread(_objectSpread({}, properties),
|
|
61
|
-
packageName: packageName,
|
|
62
|
-
packageVersion: packageVersion,
|
|
63
|
-
mediaEnvironment: getMediaEnvironment(),
|
|
64
|
-
mediaRegion: getMediaRegion()
|
|
65
|
-
})
|
|
68
|
+
metadata: _objectSpread(_objectSpread({}, properties), getBasePayloadAttributes())
|
|
66
69
|
});
|
|
67
70
|
};
|
|
68
71
|
var failUfoExperience = function failUfoExperience(id, properties) {
|
|
69
72
|
getExperience(id).failure({
|
|
70
|
-
metadata: _objectSpread(_objectSpread({}, properties),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
metadata: _objectSpread(_objectSpread({}, properties), getBasePayloadAttributes())
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
export var abortUfoExperience = function abortUfoExperience(id, properties) {
|
|
77
|
+
// UFO won't abort if it's already in a final state (succeeded, failed, aborted, etc)
|
|
78
|
+
getExperience(id).abort({
|
|
79
|
+
metadata: _objectSpread(_objectSpread({}, properties), getBasePayloadAttributes())
|
|
76
80
|
});
|
|
77
81
|
};
|
|
@@ -39,6 +39,7 @@ export declare class CardBase extends Component<CardBaseProps, CardState> {
|
|
|
39
39
|
private onImageError;
|
|
40
40
|
private onImageLoad;
|
|
41
41
|
private fireOperationalEvent;
|
|
42
|
+
private fireAbortedEvent;
|
|
42
43
|
private fireCommencedEvent;
|
|
43
44
|
private fireCopiedEvent;
|
|
44
45
|
private fireScreenEvent;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FileState } from '@atlaskit/media-client';
|
|
2
|
-
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
3
2
|
import { CardState } from '../types';
|
|
4
3
|
import { MediaCardError } from '../errors';
|
|
5
4
|
/**
|
|
@@ -7,4 +6,4 @@ import { MediaCardError } from '../errors';
|
|
|
7
6
|
* The output of the updater is shallowly merged with state."
|
|
8
7
|
*/
|
|
9
8
|
export declare const createStateUpdater: (newState: Partial<CardState>, fireErrorEvent: (error: MediaCardError) => void) => (prevState: CardState) => Partial<CardState>;
|
|
10
|
-
export declare const getCardStateFromFileState: (fileState: FileState, isBannedLocalPreview: boolean
|
|
9
|
+
export declare const getCardStateFromFileState: (fileState: FileState, isBannedLocalPreview: boolean) => Partial<CardState>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { MediaClient, FilePreview, FileState, MediaStoreGetFileImageParams, MediaBlobUrlAttrs
|
|
2
|
-
import {
|
|
1
|
+
import { MediaClient, FilePreview, FileState, MediaStoreGetFileImageParams, MediaBlobUrlAttrs } from '@atlaskit/media-client';
|
|
2
|
+
import { SSR, MediaTraceContext } from '@atlaskit/media-common';
|
|
3
3
|
import { ImageResizeMode } from '@atlaskit/media-client';
|
|
4
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
4
|
import { CardDimensions } from '../../types';
|
|
6
5
|
import { MediaCardError } from '../../errors';
|
|
7
6
|
import { CardStatus, CardPreview } from '../../types';
|
|
@@ -23,8 +22,6 @@ export type CardPreviewParams = {
|
|
|
23
22
|
isRemotePreviewReady: boolean;
|
|
24
23
|
imageUrlParams: MediaStoreGetFileImageParams;
|
|
25
24
|
mediaBlobUrlAttrs?: MediaBlobUrlAttrs;
|
|
26
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
27
|
-
featureFlags?: MediaFeatureFlags;
|
|
28
25
|
traceContext?: MediaTraceContext;
|
|
29
26
|
};
|
|
30
27
|
/**
|
|
@@ -37,17 +34,14 @@ export type CardPreviewParams = {
|
|
|
37
34
|
* In that case, we still want to report the local preview error to the caller, for feature realiability track.
|
|
38
35
|
* hence the use of the optional callback onLocalPreviewError
|
|
39
36
|
*/
|
|
40
|
-
export declare const getCardPreview: ({ mediaClient, id, dimensions, filePreview, onLocalPreviewError, isRemotePreviewReady, imageUrlParams, mediaBlobUrlAttrs,
|
|
41
|
-
export declare const shouldResolvePreview: ({ status, fileState, prevDimensions, dimensions,
|
|
37
|
+
export declare const getCardPreview: ({ mediaClient, id, dimensions, filePreview, onLocalPreviewError, isRemotePreviewReady, imageUrlParams, mediaBlobUrlAttrs, traceContext, }: CardPreviewParams) => Promise<CardPreview>;
|
|
38
|
+
export declare const shouldResolvePreview: ({ status, fileState, prevDimensions, dimensions, hasCardPreview, isBannedLocalPreview, wasResolvedUpfrontPreview, }: {
|
|
42
39
|
status: CardStatus;
|
|
43
40
|
fileState: FileState;
|
|
44
41
|
prevDimensions?: CardDimensions | undefined;
|
|
45
42
|
dimensions?: CardDimensions | undefined;
|
|
46
|
-
identifier: FileIdentifier;
|
|
47
|
-
fileImageMode?: ImageResizeMode | undefined;
|
|
48
43
|
hasCardPreview: boolean;
|
|
49
44
|
isBannedLocalPreview: boolean;
|
|
50
|
-
featureFlags?: MediaFeatureFlags | undefined;
|
|
51
45
|
wasResolvedUpfrontPreview: boolean;
|
|
52
46
|
}) => boolean;
|
|
53
47
|
export declare const getSSRCardPreview: (ssr: SSR, mediaClient: MediaClient, id: string, params: MediaStoreGetFileImageParams, mediaBlobUrlAttrs?: MediaBlobUrlAttrs) => CardPreview;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent, WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
-
import {
|
|
3
|
+
import { FileState, MediaSubscription } from '@atlaskit/media-client';
|
|
4
4
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
5
5
|
import { CardAction } from '../actions';
|
|
6
6
|
import { CardProps, CardState, CardStatus } from '../../types';
|
|
@@ -20,7 +20,7 @@ export declare class CardV2Base extends Component<CardV2BaseProps, CardState> {
|
|
|
20
20
|
componentDidMount(): void;
|
|
21
21
|
componentDidUpdate(prevProps: CardProps, prevState: CardState): void;
|
|
22
22
|
componentWillUnmount(): void;
|
|
23
|
-
updateStateForIdentifier(
|
|
23
|
+
updateStateForIdentifier(): void;
|
|
24
24
|
private getImageURLParams;
|
|
25
25
|
private getMediaBlobUrlAttrs;
|
|
26
26
|
private getCardPreviewParams;
|
|
@@ -40,6 +40,7 @@ export declare class CardV2Base extends Component<CardV2BaseProps, CardState> {
|
|
|
40
40
|
private onImageLoad;
|
|
41
41
|
private fireOperationalEvent;
|
|
42
42
|
private fireCommencedEvent;
|
|
43
|
+
private fireAbortedEvent;
|
|
43
44
|
private fireCopiedEvent;
|
|
44
45
|
private fireScreenEvent;
|
|
45
46
|
private fireNonCriticalErrorEvent;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const InlinePlayerLazyV2: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Pick<import("./inlinePlayerV2").InlinePlayerProps, "createAnalyticsEvent" | keyof import("./inlinePlayerV2").InlinePlayerOwnProps> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FileIdentifier, FileState, MediaFileArtifacts } from '@atlaskit/media-client';
|
|
3
|
+
import { NumericalCardDimensions } from '@atlaskit/media-common';
|
|
4
|
+
import { CardDimensions } from '../../types';
|
|
5
|
+
import { WithAnalyticsEventsProps, UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
|
+
import type { CardPreview } from '../../types';
|
|
7
|
+
export interface InlinePlayerOwnProps {
|
|
8
|
+
identifier: FileIdentifier;
|
|
9
|
+
dimensions?: CardDimensions;
|
|
10
|
+
originalDimensions?: NumericalCardDimensions;
|
|
11
|
+
autoplay: boolean;
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
onFullscreenChange?: (fullscreen: boolean) => void;
|
|
14
|
+
onError?: (error: Error) => void;
|
|
15
|
+
readonly onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
16
|
+
testId?: string;
|
|
17
|
+
readonly cardPreview?: CardPreview;
|
|
18
|
+
readonly forwardRef?: React.Ref<HTMLDivElement>;
|
|
19
|
+
}
|
|
20
|
+
export type InlinePlayerProps = InlinePlayerOwnProps & WithAnalyticsEventsProps;
|
|
21
|
+
export declare const getPreferredVideoArtifact: (fileState: FileState) => keyof MediaFileArtifacts | undefined;
|
|
22
|
+
export declare const InlinePlayerBaseV2: ({ identifier, onError, onClick, dimensions, originalDimensions, selected, testId, forwardRef, autoplay, cardPreview, onFullscreenChange, }: InlinePlayerProps) => JSX.Element;
|
|
23
|
+
export declare const InlinePlayerV2: React.ForwardRefExoticComponent<Pick<InlinePlayerProps, "createAnalyticsEvent" | keyof InlinePlayerOwnProps> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -3,5 +3,12 @@ import { FileAttributes } from '@atlaskit/media-common';
|
|
|
3
3
|
import { SSRStatus } from './analytics';
|
|
4
4
|
import { MediaCardError } from '../errors';
|
|
5
5
|
import { FileStateFlags } from '../types';
|
|
6
|
+
type SucceedUfoPayload = {
|
|
7
|
+
fileAttributes: FileAttributes;
|
|
8
|
+
ssrReliability: SSRStatus;
|
|
9
|
+
fileStateFlags: FileStateFlags;
|
|
10
|
+
};
|
|
6
11
|
export declare const startUfoExperience: (id: string) => void;
|
|
7
12
|
export declare const completeUfoExperience: (id: string, status: CardStatus, fileAttributes: FileAttributes, fileStateFlags: FileStateFlags, ssrReliability: SSRStatus, error?: MediaCardError) => void;
|
|
13
|
+
export declare const abortUfoExperience: (id: string, properties?: Partial<SucceedUfoPayload>) => void;
|
|
14
|
+
export {};
|
|
@@ -39,6 +39,7 @@ export declare class CardBase extends Component<CardBaseProps, CardState> {
|
|
|
39
39
|
private onImageError;
|
|
40
40
|
private onImageLoad;
|
|
41
41
|
private fireOperationalEvent;
|
|
42
|
+
private fireAbortedEvent;
|
|
42
43
|
private fireCommencedEvent;
|
|
43
44
|
private fireCopiedEvent;
|
|
44
45
|
private fireScreenEvent;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FileState } from '@atlaskit/media-client';
|
|
2
|
-
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
3
2
|
import { CardState } from '../types';
|
|
4
3
|
import { MediaCardError } from '../errors';
|
|
5
4
|
/**
|
|
@@ -7,4 +6,4 @@ import { MediaCardError } from '../errors';
|
|
|
7
6
|
* The output of the updater is shallowly merged with state."
|
|
8
7
|
*/
|
|
9
8
|
export declare const createStateUpdater: (newState: Partial<CardState>, fireErrorEvent: (error: MediaCardError) => void) => (prevState: CardState) => Partial<CardState>;
|
|
10
|
-
export declare const getCardStateFromFileState: (fileState: FileState, isBannedLocalPreview: boolean
|
|
9
|
+
export declare const getCardStateFromFileState: (fileState: FileState, isBannedLocalPreview: boolean) => Partial<CardState>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { MediaClient, FilePreview, FileState, MediaStoreGetFileImageParams, MediaBlobUrlAttrs
|
|
2
|
-
import {
|
|
1
|
+
import { MediaClient, FilePreview, FileState, MediaStoreGetFileImageParams, MediaBlobUrlAttrs } from '@atlaskit/media-client';
|
|
2
|
+
import { SSR, MediaTraceContext } from '@atlaskit/media-common';
|
|
3
3
|
import { ImageResizeMode } from '@atlaskit/media-client';
|
|
4
|
-
import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
5
4
|
import { CardDimensions } from '../../types';
|
|
6
5
|
import { MediaCardError } from '../../errors';
|
|
7
6
|
import { CardStatus, CardPreview } from '../../types';
|
|
@@ -23,8 +22,6 @@ export type CardPreviewParams = {
|
|
|
23
22
|
isRemotePreviewReady: boolean;
|
|
24
23
|
imageUrlParams: MediaStoreGetFileImageParams;
|
|
25
24
|
mediaBlobUrlAttrs?: MediaBlobUrlAttrs;
|
|
26
|
-
createAnalyticsEvent?: CreateUIAnalyticsEvent;
|
|
27
|
-
featureFlags?: MediaFeatureFlags;
|
|
28
25
|
traceContext?: MediaTraceContext;
|
|
29
26
|
};
|
|
30
27
|
/**
|
|
@@ -37,17 +34,14 @@ export type CardPreviewParams = {
|
|
|
37
34
|
* In that case, we still want to report the local preview error to the caller, for feature realiability track.
|
|
38
35
|
* hence the use of the optional callback onLocalPreviewError
|
|
39
36
|
*/
|
|
40
|
-
export declare const getCardPreview: ({ mediaClient, id, dimensions, filePreview, onLocalPreviewError, isRemotePreviewReady, imageUrlParams, mediaBlobUrlAttrs,
|
|
41
|
-
export declare const shouldResolvePreview: ({ status, fileState, prevDimensions, dimensions,
|
|
37
|
+
export declare const getCardPreview: ({ mediaClient, id, dimensions, filePreview, onLocalPreviewError, isRemotePreviewReady, imageUrlParams, mediaBlobUrlAttrs, traceContext, }: CardPreviewParams) => Promise<CardPreview>;
|
|
38
|
+
export declare const shouldResolvePreview: ({ status, fileState, prevDimensions, dimensions, hasCardPreview, isBannedLocalPreview, wasResolvedUpfrontPreview, }: {
|
|
42
39
|
status: CardStatus;
|
|
43
40
|
fileState: FileState;
|
|
44
41
|
prevDimensions?: CardDimensions | undefined;
|
|
45
42
|
dimensions?: CardDimensions | undefined;
|
|
46
|
-
identifier: FileIdentifier;
|
|
47
|
-
fileImageMode?: ImageResizeMode | undefined;
|
|
48
43
|
hasCardPreview: boolean;
|
|
49
44
|
isBannedLocalPreview: boolean;
|
|
50
|
-
featureFlags?: MediaFeatureFlags | undefined;
|
|
51
45
|
wasResolvedUpfrontPreview: boolean;
|
|
52
46
|
}) => boolean;
|
|
53
47
|
export declare const getSSRCardPreview: (ssr: SSR, mediaClient: MediaClient, id: string, params: MediaStoreGetFileImageParams, mediaBlobUrlAttrs?: MediaBlobUrlAttrs) => CardPreview;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
2
|
import { UIAnalyticsEvent, WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
|
|
3
|
-
import {
|
|
3
|
+
import { FileState, MediaSubscription } from '@atlaskit/media-client';
|
|
4
4
|
import { WrappedComponentProps } from 'react-intl-next';
|
|
5
5
|
import { CardAction } from '../actions';
|
|
6
6
|
import { CardProps, CardState, CardStatus } from '../../types';
|
|
@@ -20,7 +20,7 @@ export declare class CardV2Base extends Component<CardV2BaseProps, CardState> {
|
|
|
20
20
|
componentDidMount(): void;
|
|
21
21
|
componentDidUpdate(prevProps: CardProps, prevState: CardState): void;
|
|
22
22
|
componentWillUnmount(): void;
|
|
23
|
-
updateStateForIdentifier(
|
|
23
|
+
updateStateForIdentifier(): void;
|
|
24
24
|
private getImageURLParams;
|
|
25
25
|
private getMediaBlobUrlAttrs;
|
|
26
26
|
private getCardPreviewParams;
|
|
@@ -40,6 +40,7 @@ export declare class CardV2Base extends Component<CardV2BaseProps, CardState> {
|
|
|
40
40
|
private onImageLoad;
|
|
41
41
|
private fireOperationalEvent;
|
|
42
42
|
private fireCommencedEvent;
|
|
43
|
+
private fireAbortedEvent;
|
|
43
44
|
private fireCopiedEvent;
|
|
44
45
|
private fireScreenEvent;
|
|
45
46
|
private fireNonCriticalErrorEvent;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const InlinePlayerLazyV2: import("react").LazyExoticComponent<import("react").ForwardRefExoticComponent<Pick<import("./inlinePlayerV2").InlinePlayerProps, "createAnalyticsEvent" | keyof import("./inlinePlayerV2").InlinePlayerOwnProps> & import("react").RefAttributes<HTMLDivElement>>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FileIdentifier, FileState, MediaFileArtifacts } from '@atlaskit/media-client';
|
|
3
|
+
import { NumericalCardDimensions } from '@atlaskit/media-common';
|
|
4
|
+
import { CardDimensions } from '../../types';
|
|
5
|
+
import { WithAnalyticsEventsProps, UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
6
|
+
import type { CardPreview } from '../../types';
|
|
7
|
+
export interface InlinePlayerOwnProps {
|
|
8
|
+
identifier: FileIdentifier;
|
|
9
|
+
dimensions?: CardDimensions;
|
|
10
|
+
originalDimensions?: NumericalCardDimensions;
|
|
11
|
+
autoplay: boolean;
|
|
12
|
+
selected?: boolean;
|
|
13
|
+
onFullscreenChange?: (fullscreen: boolean) => void;
|
|
14
|
+
onError?: (error: Error) => void;
|
|
15
|
+
readonly onClick?: (event: React.MouseEvent<HTMLDivElement>, analyticsEvent?: UIAnalyticsEvent) => void;
|
|
16
|
+
testId?: string;
|
|
17
|
+
readonly cardPreview?: CardPreview;
|
|
18
|
+
readonly forwardRef?: React.Ref<HTMLDivElement>;
|
|
19
|
+
}
|
|
20
|
+
export type InlinePlayerProps = InlinePlayerOwnProps & WithAnalyticsEventsProps;
|
|
21
|
+
export declare const getPreferredVideoArtifact: (fileState: FileState) => keyof MediaFileArtifacts | undefined;
|
|
22
|
+
export declare const InlinePlayerBaseV2: ({ identifier, onError, onClick, dimensions, originalDimensions, selected, testId, forwardRef, autoplay, cardPreview, onFullscreenChange, }: InlinePlayerProps) => JSX.Element;
|
|
23
|
+
export declare const InlinePlayerV2: React.ForwardRefExoticComponent<Pick<InlinePlayerProps, "createAnalyticsEvent" | keyof InlinePlayerOwnProps> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -3,5 +3,12 @@ import { FileAttributes } from '@atlaskit/media-common';
|
|
|
3
3
|
import { SSRStatus } from './analytics';
|
|
4
4
|
import { MediaCardError } from '../errors';
|
|
5
5
|
import { FileStateFlags } from '../types';
|
|
6
|
+
type SucceedUfoPayload = {
|
|
7
|
+
fileAttributes: FileAttributes;
|
|
8
|
+
ssrReliability: SSRStatus;
|
|
9
|
+
fileStateFlags: FileStateFlags;
|
|
10
|
+
};
|
|
6
11
|
export declare const startUfoExperience: (id: string) => void;
|
|
7
12
|
export declare const completeUfoExperience: (id: string, status: CardStatus, fileAttributes: FileAttributes, fileStateFlags: FileStateFlags, ssrReliability: SSRStatus, error?: MediaCardError) => void;
|
|
13
|
+
export declare const abortUfoExperience: (id: string, properties?: Partial<SucceedUfoPayload>) => void;
|
|
14
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-card",
|
|
3
|
-
"version": "77.
|
|
3
|
+
"version": "77.2.0",
|
|
4
4
|
"description": "Includes all media card related components, CardView, CardViewSmall, Card...",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -37,18 +37,18 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@atlaskit/analytics-next": "^9.1.0",
|
|
40
|
-
"@atlaskit/dropdown-menu": "^
|
|
40
|
+
"@atlaskit/dropdown-menu": "^12.1.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^2.8.0",
|
|
42
42
|
"@atlaskit/icon": "^21.12.0",
|
|
43
43
|
"@atlaskit/media-client": "^24.0.0",
|
|
44
|
-
"@atlaskit/media-client-react": "^1.
|
|
44
|
+
"@atlaskit/media-client-react": "^1.2.0",
|
|
45
45
|
"@atlaskit/media-common": "^9.0.0",
|
|
46
46
|
"@atlaskit/media-ui": "^25.0.0",
|
|
47
47
|
"@atlaskit/media-viewer": "^48.1.0",
|
|
48
48
|
"@atlaskit/platform-feature-flags": "^0.2.2",
|
|
49
49
|
"@atlaskit/spinner": "^15.6.0",
|
|
50
50
|
"@atlaskit/theme": "^12.6.0",
|
|
51
|
-
"@atlaskit/tokens": "^1.
|
|
51
|
+
"@atlaskit/tokens": "^1.28.0",
|
|
52
52
|
"@atlaskit/tooltip": "^17.8.0",
|
|
53
53
|
"@atlaskit/ufo": "^0.2.0",
|
|
54
54
|
"@babel/runtime": "^7.0.0",
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"@atlassian/ufo": "^0.2.0",
|
|
79
79
|
"@testing-library/dom": "^8.17.1",
|
|
80
80
|
"@testing-library/react": "^12.1.5",
|
|
81
|
+
"@testing-library/react-hooks": "^8.0.1",
|
|
81
82
|
"@testing-library/user-event": "^14.4.3",
|
|
82
83
|
"@types/classnames": "^2.2.6",
|
|
83
84
|
"@types/react-loadable": "^5.4.1",
|