@atlaskit/media-client 24.0.1 → 24.0.3
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 +12 -0
- package/dist/cjs/utils/with-media-client-hoc.js +24 -0
- package/dist/es2019/utils/with-media-client-hoc.js +25 -0
- package/dist/esm/utils/with-media-client-hoc.js +25 -0
- package/dist/types/utils/with-media-client-hoc.d.ts +18 -0
- package/dist/types-ts4.5/client/__mocks__/collection-fetcher.d.ts +8 -0
- package/dist/types-ts4.5/client/__mocks__/file-fetcher.d.ts +10 -0
- package/dist/types-ts4.5/client/__mocks__/media-client.d.ts +11 -0
- package/dist/types-ts4.5/client/events.d.ts +14 -0
- package/dist/types-ts4.5/client/file-fetcher/error.d.ts +29 -0
- package/dist/types-ts4.5/client/file-fetcher/index.d.ts +62 -0
- package/dist/types-ts4.5/client/media-client.d.ts +32 -0
- package/dist/types-ts4.5/client/media-store/error.d.ts +16 -0
- package/dist/types-ts4.5/client/media-store/index.d.ts +168 -0
- package/dist/types-ts4.5/client/media-store/resolveAuth.d.ts +4 -0
- package/dist/types-ts4.5/client/mobile-upload.d.ts +15 -0
- package/dist/types-ts4.5/client/stargate-client.d.ts +15 -0
- package/dist/types-ts4.5/constants.d.ts +6 -0
- package/dist/types-ts4.5/file-streams-cache.d.ts +15 -0
- package/dist/types-ts4.5/globalMediaEventEmitter.d.ts +6 -0
- package/dist/types-ts4.5/identifier.d.ts +15 -0
- package/dist/types-ts4.5/index.d.ts +89 -0
- package/dist/types-ts4.5/models/artifacts.d.ts +2 -0
- package/dist/types-ts4.5/models/auth-headers.d.ts +11 -0
- package/dist/types-ts4.5/models/auth-query-parameters.d.ts +11 -0
- package/dist/types-ts4.5/models/errors/helpers.d.ts +6 -0
- package/dist/types-ts4.5/models/errors/index.d.ts +11 -0
- package/dist/types-ts4.5/models/errors/types.d.ts +15 -0
- package/dist/types-ts4.5/models/file-state.d.ts +25 -0
- package/dist/types-ts4.5/models/item.d.ts +25 -0
- package/dist/types-ts4.5/models/media.d.ts +48 -0
- package/dist/types-ts4.5/models/mobile-upload.d.ts +28 -0
- package/dist/types-ts4.5/test-helpers/_numbers.d.ts +1 -0
- package/dist/types-ts4.5/test-helpers/authProvider.d.ts +6 -0
- package/dist/types-ts4.5/test-helpers/collectionNames.d.ts +5 -0
- package/dist/types-ts4.5/test-helpers/exampleMediaItems.d.ts +53 -0
- package/dist/types-ts4.5/test-helpers/fakeMediaClient.d.ts +4 -0
- package/dist/types-ts4.5/test-helpers/index.d.ts +7 -0
- package/dist/types-ts4.5/test-helpers/mediaClientProvider.d.ts +23 -0
- package/dist/types-ts4.5/test-helpers/mediaPickerAuthProvider.d.ts +5 -0
- package/dist/types-ts4.5/upload-controller.d.ts +7 -0
- package/dist/types-ts4.5/uploader/calculateChunkSize.d.ts +11 -0
- package/dist/types-ts4.5/uploader/error.d.ts +29 -0
- package/dist/types-ts4.5/uploader/index.d.ts +23 -0
- package/dist/types-ts4.5/utils/checkWebpSupport.d.ts +1 -0
- package/dist/types-ts4.5/utils/convertBase64ToBlob.d.ts +1 -0
- package/dist/types-ts4.5/utils/createFileDataLoader.d.ts +30 -0
- package/dist/types-ts4.5/utils/createMediaSubject.d.ts +3 -0
- package/dist/types-ts4.5/utils/detectEmptyFile.d.ts +16 -0
- package/dist/types-ts4.5/utils/getDimensionsFromBlob.d.ts +6 -0
- package/dist/types-ts4.5/utils/getImageDimensionsFromBlob.d.ts +5 -0
- package/dist/types-ts4.5/utils/getMediaTypeFromUploadableFile.d.ts +3 -0
- package/dist/types-ts4.5/utils/getVideoDimensionsFromBlob.d.ts +5 -0
- package/dist/types-ts4.5/utils/hashing/hasher.d.ts +3 -0
- package/dist/types-ts4.5/utils/hashing/hasherCreator.d.ts +3 -0
- package/dist/types-ts4.5/utils/hashing/simpleHasher.d.ts +4 -0
- package/dist/types-ts4.5/utils/hashing/workerHasher.d.ts +16 -0
- package/dist/types-ts4.5/utils/imageResizeModeToFileImageMode.d.ts +3 -0
- package/dist/types-ts4.5/utils/isImageRemote.d.ts +1 -0
- package/dist/types-ts4.5/utils/mediaSubscribable/fromObservable.d.ts +5 -0
- package/dist/types-ts4.5/utils/mediaSubscribable/index.d.ts +3 -0
- package/dist/types-ts4.5/utils/mediaSubscribable/toPromise.d.ts +10 -0
- package/dist/types-ts4.5/utils/mediaSubscribable/types.d.ts +17 -0
- package/dist/types-ts4.5/utils/mobileUpload/error.d.ts +29 -0
- package/dist/types-ts4.5/utils/mobileUpload/helpers.d.ts +8 -0
- package/dist/types-ts4.5/utils/mobileUpload/index.d.ts +5 -0
- package/dist/types-ts4.5/utils/mobileUpload/servicesCache.d.ts +4 -0
- package/dist/types-ts4.5/utils/mobileUpload/stateMachine/index.d.ts +7 -0
- package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/error.d.ts +3 -0
- package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/processed.d.ts +3 -0
- package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/processing.d.ts +3 -0
- package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/processingFailed.d.ts +3 -0
- package/dist/types-ts4.5/utils/mobileUpload/stateMachine/states/uploading.d.ts +3 -0
- package/dist/types-ts4.5/utils/mobileUpload/stateMachine/types.d.ts +69 -0
- package/dist/types-ts4.5/utils/overrideMediaTypeIfUnknown.d.ts +5 -0
- package/dist/types-ts4.5/utils/polling/errors.d.ts +12 -0
- package/dist/types-ts4.5/utils/polling/index.d.ts +33 -0
- package/dist/types-ts4.5/utils/polling/types.d.ts +7 -0
- package/dist/types-ts4.5/utils/request/errors.d.ts +20 -0
- package/dist/types-ts4.5/utils/request/helpers.d.ts +46 -0
- package/dist/types-ts4.5/utils/request/index.d.ts +5 -0
- package/dist/types-ts4.5/utils/request/types.d.ts +46 -0
- package/dist/types-ts4.5/utils/safeUnsubscribe.d.ts +2 -0
- package/dist/types-ts4.5/utils/setTimeoutPromise.d.ts +2 -0
- package/dist/types-ts4.5/utils/shouldFetchRemoteFileStates.d.ts +14 -0
- package/dist/types-ts4.5/utils/url.d.ts +17 -0
- package/dist/types-ts4.5/utils/with-media-client-hoc.d.ts +33 -0
- package/package.json +2 -2
- package/report.api.md +6 -6
- package/tmp/api-report-tmp.d.ts +1225 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
export { MediaStore, MediaStoreError, isMediaStoreError, getMediaEnvironment, getMediaRegion, } from './client/media-store';
|
|
2
|
+
export type { ResponseFileItem, ItemsPayload, ImageMetadataArtifact, ImageMetadata, MediaStoreResponse, MediaStoreRequestOptions, MediaStoreCreateFileFromUploadParams, MediaStoreCreateFileParams, MediaStoreTouchFileParams, TouchFileDescriptor, MediaStoreTouchFileBody, MediaStoreCreateFileFromBinaryParams, MediaStoreCreateFileFromUploadConditions, MediaStoreCreateFileFromUploadBody, MediaStoreGetFileParams, MediaStoreGetFileImageParams, SourceFile, MediaStoreCopyFileWithTokenBody, MediaStoreCopyFileWithTokenParams, AppendChunksToUploadRequestBody, CreatedTouchedFile, TouchedFiles, EmptyFile, MediaStoreErrorReason, MediaStoreErrorAttributes, } from './client/media-store';
|
|
3
|
+
export { UploadController } from './upload-controller';
|
|
4
|
+
export type { AbortFunction } from './upload-controller';
|
|
5
|
+
export type { MediaItemType, FileItem, FileProcessingStatus, MediaArtifact, Artifacts, FileDetails, } from './models/item';
|
|
6
|
+
export { isPreviewableType } from './models/media';
|
|
7
|
+
export type { MediaFileProcessingStatus, MediaType, MediaFile, MediaRepresentations, MediaItemDetails, MediaUpload, MediaChunksProbe, } from './models/media';
|
|
8
|
+
export { getArtifactUrl } from './models/artifacts';
|
|
9
|
+
export { isMediaClientError, getMediaClientErrorReason } from './models/errors';
|
|
10
|
+
export type { MediaClientError, MediaClientErrorReason, MediaClientErrorAttributes, } from './models/errors';
|
|
11
|
+
export { isUploadingFileState, isProcessingFileState, isProcessedFileState, isErrorFileState, isPreviewableFileState, isFinalFileState, isImageRepresentationReady, mapMediaFileToFileState, mapMediaItemToFileState, } from './models/file-state';
|
|
12
|
+
export type { FileStatus, PreviewOptions, GetFileOptions, NonErrorFileState, PreviewableFileState, } from './models/file-state';
|
|
13
|
+
export type { FileState, FilePreview, ErrorFileState, UploadingFileState, ProcessingFileState, ProcessedFileState, ProcessingFailedState, MediaFileArtifact, MediaFileArtifacts, } from '@atlaskit/media-state';
|
|
14
|
+
export type { MobileUpload, MobileUploadStartEvent, MobileUploadProgressEvent, MobileUploadEndEvent, MobileUploadErrorEvent, } from './models/mobile-upload';
|
|
15
|
+
export { uploadFile } from './uploader';
|
|
16
|
+
export type { UploadableFile, UploadableFileUpfrontIds, UploadFileCallbacks, UploadFileResult, } from './uploader';
|
|
17
|
+
export { request, RequestError, isRequestError, isRateLimitedError, createRequestErrorReason, } from './utils/request';
|
|
18
|
+
export type { RequestErrorReason, RequestErrorMetadata, RequestErrorAttributes, } from './utils/request';
|
|
19
|
+
export { isAbortedRequestError, mapResponseToJson, mapResponseToBlob, mapResponseToVoid, createUrl, } from './utils/request/helpers';
|
|
20
|
+
export { PollingFunction } from './utils/polling';
|
|
21
|
+
export { isPollingError, PollingError } from './utils/polling/errors';
|
|
22
|
+
export type { Executor, PollingErrorAttributes, PollingErrorReason, } from './utils/polling/types';
|
|
23
|
+
export type { RequestMethod, RequestParams, RequestHeaders, RetryOptions, ClientOptions, RequestMetadata, RequestOptions, CreateUrlOptions, } from './utils/request/types';
|
|
24
|
+
export type { ImageResizeMode } from './utils/imageResizeModeToFileImageMode';
|
|
25
|
+
export { imageResizeModeToFileImageMode } from './utils/imageResizeModeToFileImageMode';
|
|
26
|
+
export { FileFetcherImpl, FileFetcherError, isFileFetcherError, } from './client/file-fetcher';
|
|
27
|
+
export type { CopySourceFile, CopyDestination, CopyFileOptions, FileFetcher, FileFetcherErrorAttributes, FileFetcherErrorReason, } from './client/file-fetcher';
|
|
28
|
+
export { MediaClient } from './client/media-client';
|
|
29
|
+
export { StargateClient } from './client/stargate-client';
|
|
30
|
+
export type { EdgeData } from './client/stargate-client';
|
|
31
|
+
export { isImageRemote } from './utils/isImageRemote';
|
|
32
|
+
export { checkWebpSupport } from './utils/checkWebpSupport';
|
|
33
|
+
export { getDimensionsFromBlob } from './utils/getDimensionsFromBlob';
|
|
34
|
+
export type { Dimensions } from './utils/getDimensionsFromBlob';
|
|
35
|
+
export { createMediaSubject } from './utils/createMediaSubject';
|
|
36
|
+
export { safeUnsubscribe } from './utils/safeUnsubscribe';
|
|
37
|
+
export { isFileIdentifier, isExternalImageIdentifier, isDifferentIdentifier, } from './identifier';
|
|
38
|
+
export type { Identifier, FileIdentifier, ExternalImageIdentifier, } from './identifier';
|
|
39
|
+
export type { EventPayloadListener, UploadEventPayloadMap, MediaViewedEventPayload, } from './client/events';
|
|
40
|
+
export { withMediaClient, getMediaClient } from './utils/with-media-client-hoc';
|
|
41
|
+
export type { WithMediaClientConfig, WithMediaClientConfigProps, WithMediaClientFunction, WithMediaClient, } from './utils/with-media-client-hoc';
|
|
42
|
+
export type { MediaClientConfig } from '@atlaskit/media-core';
|
|
43
|
+
export { globalMediaEventEmitter } from './globalMediaEventEmitter';
|
|
44
|
+
export { isMediaBlobUrl, getAttrsFromUrl, addFileAttrsToUrl, objectToQueryString, } from './utils/url';
|
|
45
|
+
export type { MediaBlobUrlAttrs } from './utils/url';
|
|
46
|
+
export { createMediaSubscribable, fromObservable, } from './utils/mediaSubscribable';
|
|
47
|
+
export type { MediaSubscribable, MediaSubscription, MediaObserver, } from './utils/mediaSubscribable';
|
|
48
|
+
export { RECENTS_COLLECTION, MAX_RESOLUTION } from './constants';
|
|
49
|
+
export { getFileStreamsCache } from './file-streams-cache';
|
|
50
|
+
/**
|
|
51
|
+
* @deprecated This export will be removed. Please use one from @atlaskit/media-common or @atlaskit/media-common/mediaTypeUtils
|
|
52
|
+
*/
|
|
53
|
+
export declare const getMediaTypeFromMimeType: (mimeType: string) => import("@atlaskit/media-common").MediaType;
|
|
54
|
+
/**
|
|
55
|
+
* @deprecated This export will be removed. Please use one from @atlaskit/media-common or @atlaskit/media-common/mediaTypeUtils
|
|
56
|
+
*/
|
|
57
|
+
export declare const isImageMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
|
|
58
|
+
/**
|
|
59
|
+
* @deprecated This export will be removed. Please use one from @atlaskit/media-common or @atlaskit/media-common/mediaTypeUtils
|
|
60
|
+
*/
|
|
61
|
+
export declare const isDocumentMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
|
|
62
|
+
/**
|
|
63
|
+
* @deprecated This export will be removed. Please use one from @atlaskit/media-common or @atlaskit/media-common/mediaTypeUtils
|
|
64
|
+
*/
|
|
65
|
+
export declare const isMimeTypeSupportedByBrowser: (mimeType: string) => boolean;
|
|
66
|
+
/**
|
|
67
|
+
* @deprecated This export will be removed. Please use one from @atlaskit/media-common or @atlaskit/media-common/mediaTypeUtils
|
|
68
|
+
*/
|
|
69
|
+
export declare const isImageMimeTypeSupportedByServer: (mimeType: string) => boolean;
|
|
70
|
+
/**
|
|
71
|
+
* @deprecated This export will be removed. Please use one from @atlaskit/media-common or @atlaskit/media-common/mediaTypeUtils
|
|
72
|
+
*/
|
|
73
|
+
export declare const isDocumentMimeTypeSupportedByServer: (mimeType: string) => boolean;
|
|
74
|
+
/**
|
|
75
|
+
* @deprecated This export will be removed. Please use one from @atlaskit/media-common or @atlaskit/media-common/mediaTypeUtils
|
|
76
|
+
*/
|
|
77
|
+
export declare const isAudioMimeTypeSupportedByServer: (mimeType: string) => boolean;
|
|
78
|
+
/**
|
|
79
|
+
* @deprecated This export will be removed. Please use one from @atlaskit/media-common or @atlaskit/media-common/mediaTypeUtils
|
|
80
|
+
*/
|
|
81
|
+
export declare const isVideoMimeTypeSupportedByServer: (mimeType: string) => boolean;
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated This export will be removed. Please use one from @atlaskit/media-common or @atlaskit/media-common/mediaTypeUtils
|
|
84
|
+
*/
|
|
85
|
+
export declare const isUnknownMimeTypeSupportedByServer: (mimeType: string) => boolean;
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated This export will be removed. Please use one from @atlaskit/media-common or @atlaskit/media-common/mediaTypeUtils
|
|
88
|
+
*/
|
|
89
|
+
export declare const isMimeTypeSupportedByServer: (mimeType: string) => boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Auth } from '@atlaskit/media-core';
|
|
2
|
+
export interface ClientBasedAuthHeaders {
|
|
3
|
+
readonly 'X-Client-Id': string;
|
|
4
|
+
readonly Authorization: string;
|
|
5
|
+
}
|
|
6
|
+
export interface AsapBasedAuthHeaders {
|
|
7
|
+
readonly 'X-Issuer': string;
|
|
8
|
+
readonly Authorization: string;
|
|
9
|
+
}
|
|
10
|
+
export type AuthHeaders = ClientBasedAuthHeaders | AsapBasedAuthHeaders;
|
|
11
|
+
export declare function mapAuthToAuthHeaders(auth: Auth): AuthHeaders;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Auth } from '@atlaskit/media-core';
|
|
2
|
+
export interface ClientBasedQueryParameters {
|
|
3
|
+
readonly client: string;
|
|
4
|
+
readonly token: string;
|
|
5
|
+
}
|
|
6
|
+
export interface AsapBasedQueryParameters {
|
|
7
|
+
readonly issuer: string;
|
|
8
|
+
readonly token: string;
|
|
9
|
+
}
|
|
10
|
+
export type AuthQueryParameters = ClientBasedQueryParameters | AsapBasedQueryParameters;
|
|
11
|
+
export declare function mapAuthToQueryParameters(auth: Auth): AuthQueryParameters;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export type { MediaClientError, MediaClientErrorReason } from './types';
|
|
2
|
+
import { MediaClientError, MediaClientErrorReason } from './types';
|
|
3
|
+
export declare function isMediaClientError(error: any): error is MediaClientError<{
|
|
4
|
+
reason: MediaClientErrorReason;
|
|
5
|
+
}>;
|
|
6
|
+
export declare function getMediaClientErrorReason(err: Error): MediaClientErrorReason | 'unknown';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { MediaClientError, MediaClientErrorAttributes } from './types';
|
|
2
|
+
export type { MediaClientError, MediaClientErrorReason, MediaClientErrorAttributes, } from './types';
|
|
3
|
+
export { isMediaClientError, getMediaClientErrorReason } from './helpers';
|
|
4
|
+
/**
|
|
5
|
+
* Base class for media errors
|
|
6
|
+
*/
|
|
7
|
+
export declare abstract class BaseMediaClientError<Attributes extends MediaClientErrorAttributes> extends Error implements MediaClientError<Attributes> {
|
|
8
|
+
readonly message: string;
|
|
9
|
+
constructor(message: string);
|
|
10
|
+
abstract get attributes(): Attributes;
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type MediaClientErrorReason = 'clientOffline' | 'clientAbortedRequest' | 'clientTimeoutRequest' | 'serverInvalidBody' | 'serverBadRequest' | 'serverUnauthorized' | 'serverForbidden' | 'serverNotFound' | 'serverRateLimited' | 'serverInternalError' | 'serverBadGateway' | 'serverUnexpectedError' | 'failedAuthProvider' | 'tokenExpired' | 'missingInitialAuth' | 'emptyAuth' | 'authProviderTimedOut' | 'invalidFileId' | 'emptyItems' | 'zeroVersionFile' | 'emptyFileName' | 'pollingMaxAttemptsExceeded' | 'fileSizeExceedsLimit' | 'deprecatedEndpoint';
|
|
2
|
+
export interface MediaClientErrorAttributes {
|
|
3
|
+
reason: MediaClientErrorReason;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* MediaClientError is the main interface which all the errors
|
|
7
|
+
* in Media Client must implement.
|
|
8
|
+
* MediaClientErrorReason is a dictionary that restricts all the possible
|
|
9
|
+
* reasons that the erros can define. Its values are private to this file.
|
|
10
|
+
* Any new error has to define its own Error Reasons locally, and also declare them
|
|
11
|
+
* here to comply with the interface restrictions
|
|
12
|
+
*/
|
|
13
|
+
export interface MediaClientError<Attributes extends MediaClientErrorAttributes> extends Error {
|
|
14
|
+
readonly attributes: Attributes;
|
|
15
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FileStatus as CommonFileStatus } from '@atlaskit/media-common';
|
|
2
|
+
import { MediaStoreResponse } from '../client/media-store';
|
|
3
|
+
import { MediaItemDetails, MediaFile } from './media';
|
|
4
|
+
import { FilePreview, FileState, ErrorFileState, UploadingFileState, ProcessingFileState, ProcessedFileState, ProcessingFailedState } from '@atlaskit/media-state';
|
|
5
|
+
export type FileStatus = CommonFileStatus;
|
|
6
|
+
export interface PreviewOptions {
|
|
7
|
+
}
|
|
8
|
+
export interface GetFileOptions {
|
|
9
|
+
preview?: PreviewOptions;
|
|
10
|
+
collectionName?: string;
|
|
11
|
+
occurrenceKey?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface PreviewableFileState {
|
|
14
|
+
preview: FilePreview | Promise<FilePreview>;
|
|
15
|
+
}
|
|
16
|
+
export type NonErrorFileState = Exclude<FileState, ErrorFileState>;
|
|
17
|
+
export declare const isUploadingFileState: (fileState: FileState) => fileState is UploadingFileState;
|
|
18
|
+
export declare const isProcessingFileState: (fileState: FileState) => fileState is ProcessingFileState;
|
|
19
|
+
export declare const isProcessedFileState: (fileState: FileState) => fileState is ProcessedFileState;
|
|
20
|
+
export declare const isErrorFileState: (fileState: FileState) => fileState is ErrorFileState;
|
|
21
|
+
export declare const isPreviewableFileState: (fileState: FileState) => fileState is (UploadingFileState | ProcessingFileState | ProcessedFileState | ProcessingFailedState) & PreviewableFileState;
|
|
22
|
+
export declare const isFinalFileState: (fileState: FileState) => fileState is ProcessedFileState | ErrorFileState | ProcessingFailedState;
|
|
23
|
+
export declare const isImageRepresentationReady: (fileState: FileState) => boolean;
|
|
24
|
+
export declare const mapMediaFileToFileState: (mediaFile: MediaStoreResponse<MediaFile>) => FileState;
|
|
25
|
+
export declare const mapMediaItemToFileState: (id: string, item: MediaItemDetails) => FileState;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MediaType } from './media';
|
|
2
|
+
export type MediaItemType = 'file' | 'external-image';
|
|
3
|
+
export interface FileItem {
|
|
4
|
+
type: 'file';
|
|
5
|
+
details: FileDetails;
|
|
6
|
+
}
|
|
7
|
+
export type FileProcessingStatus = 'pending' | 'running' | 'succeeded' | 'failed';
|
|
8
|
+
export interface MediaArtifact {
|
|
9
|
+
processingStatus?: FileProcessingStatus;
|
|
10
|
+
url?: string;
|
|
11
|
+
}
|
|
12
|
+
export type Artifacts = {
|
|
13
|
+
[name: string]: MediaArtifact;
|
|
14
|
+
};
|
|
15
|
+
export interface FileDetails {
|
|
16
|
+
id: string;
|
|
17
|
+
name?: string;
|
|
18
|
+
size?: number;
|
|
19
|
+
mimeType?: string;
|
|
20
|
+
mediaType?: MediaType;
|
|
21
|
+
creationDate?: number;
|
|
22
|
+
processingStatus?: FileProcessingStatus;
|
|
23
|
+
artifacts?: Artifacts;
|
|
24
|
+
createdAt?: number;
|
|
25
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { MediaTraceContext, MediaType } from '@atlaskit/media-common';
|
|
2
|
+
import { MediaFileArtifacts } from '@atlaskit/media-state';
|
|
3
|
+
export type MediaFileProcessingStatus = 'pending' | 'succeeded' | 'failed';
|
|
4
|
+
export type { MediaType } from '@atlaskit/media-common';
|
|
5
|
+
export declare const isPreviewableType: (type: MediaType) => boolean;
|
|
6
|
+
export type MediaFile = {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly mediaType: MediaType;
|
|
9
|
+
readonly mimeType: string;
|
|
10
|
+
readonly name: string;
|
|
11
|
+
readonly processingStatus?: MediaFileProcessingStatus;
|
|
12
|
+
readonly size: number;
|
|
13
|
+
readonly artifacts: MediaFileArtifacts;
|
|
14
|
+
readonly representations: MediaRepresentations;
|
|
15
|
+
readonly createdAt?: number;
|
|
16
|
+
readonly metadataTraceContext?: MediaTraceContext;
|
|
17
|
+
};
|
|
18
|
+
export type MediaItemDetails = {
|
|
19
|
+
readonly mediaType: MediaType;
|
|
20
|
+
readonly mimeType: string;
|
|
21
|
+
readonly name: string;
|
|
22
|
+
readonly processingStatus: MediaFileProcessingStatus;
|
|
23
|
+
readonly size: number;
|
|
24
|
+
readonly artifacts: MediaFileArtifacts;
|
|
25
|
+
readonly representations: MediaRepresentations;
|
|
26
|
+
readonly createdAt?: number;
|
|
27
|
+
readonly metadataTraceContext?: MediaTraceContext;
|
|
28
|
+
};
|
|
29
|
+
export type MediaRepresentations = {
|
|
30
|
+
image?: Object;
|
|
31
|
+
};
|
|
32
|
+
export type MediaUpload = {
|
|
33
|
+
readonly id: string;
|
|
34
|
+
readonly created: number;
|
|
35
|
+
readonly expires: number;
|
|
36
|
+
};
|
|
37
|
+
export type MediaChunksProbe = {
|
|
38
|
+
readonly results: {
|
|
39
|
+
readonly [etag: string]: {
|
|
40
|
+
readonly exists: boolean;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
export declare enum DATA_UNIT {
|
|
45
|
+
MB = 1048576,
|
|
46
|
+
GB = 1073741824,
|
|
47
|
+
TB = 1099511627776
|
|
48
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FilePreview } from '@atlaskit/media-state';
|
|
2
|
+
export type MobileUploadStartEvent = {
|
|
3
|
+
fileId: string;
|
|
4
|
+
collectionName?: string;
|
|
5
|
+
occurrenceKey?: string;
|
|
6
|
+
fileName: string;
|
|
7
|
+
fileSize: number;
|
|
8
|
+
fileMimetype: string;
|
|
9
|
+
preview?: FilePreview;
|
|
10
|
+
createdAt?: number;
|
|
11
|
+
};
|
|
12
|
+
export type MobileUploadProgressEvent = {
|
|
13
|
+
fileId: string;
|
|
14
|
+
progress: number;
|
|
15
|
+
};
|
|
16
|
+
export type MobileUploadEndEvent = {
|
|
17
|
+
fileId: string;
|
|
18
|
+
};
|
|
19
|
+
export type MobileUploadErrorEvent = {
|
|
20
|
+
fileId: string;
|
|
21
|
+
message: string;
|
|
22
|
+
};
|
|
23
|
+
export interface MobileUpload {
|
|
24
|
+
notifyUploadStart(event: MobileUploadStartEvent): void;
|
|
25
|
+
notifyUploadProgress(event: MobileUploadProgressEvent): void;
|
|
26
|
+
notifyUploadEnd(event: MobileUploadEndEvent): void;
|
|
27
|
+
notifyUploadError(event: MobileUploadErrorEvent): void;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function numbers(count: number): Array<number>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare const defaultCollectionName = "MediaServicesSample";
|
|
2
|
+
export declare const onlyAnimatedGifsCollectionName = "only-animated-gifs";
|
|
3
|
+
export declare const fileCollectionName: string;
|
|
4
|
+
export declare const defaultMediaPickerCollectionName = "mediapicker-test";
|
|
5
|
+
export declare const collectionNames: string[];
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { FileIdentifier, FileDetails, ExternalImageIdentifier, MediaType } from '../';
|
|
2
|
+
export declare const genericFileId: FileIdentifier;
|
|
3
|
+
export declare const audioFileId: FileIdentifier;
|
|
4
|
+
export declare const audioNoCoverFileId: FileIdentifier;
|
|
5
|
+
export declare const videoFileId: FileIdentifier;
|
|
6
|
+
export declare const videoHorizontalFileId: FileIdentifier;
|
|
7
|
+
export declare const videoLargeFileId: FileIdentifier;
|
|
8
|
+
export declare const videoSquareFileId: FileIdentifier;
|
|
9
|
+
export declare const videoProcessingFailedId: FileIdentifier;
|
|
10
|
+
export declare const imageFileId: FileIdentifier;
|
|
11
|
+
export declare const emptyImageFileId: FileIdentifier;
|
|
12
|
+
export declare const smallImageFileId: FileIdentifier;
|
|
13
|
+
export declare const wideImageFileId: FileIdentifier;
|
|
14
|
+
export declare const largeImageFileId: FileIdentifier;
|
|
15
|
+
export declare const verticalImageFileId: FileIdentifier;
|
|
16
|
+
export declare const docFileId: FileIdentifier;
|
|
17
|
+
export declare const bigDocFileId: FileIdentifier;
|
|
18
|
+
export declare const largePdfFileId: FileIdentifier;
|
|
19
|
+
export declare const passwordProtectedPdfFileId: FileIdentifier;
|
|
20
|
+
export declare const codeFileId: FileIdentifier;
|
|
21
|
+
export declare const emailFileId: FileIdentifier;
|
|
22
|
+
export declare const emailUnsupportedFileId: FileIdentifier;
|
|
23
|
+
export declare const archiveFileId: FileIdentifier;
|
|
24
|
+
export declare const zipJiraArchiveFileId: FileIdentifier;
|
|
25
|
+
export declare const zipFileWithNestedFolderId: FileIdentifier;
|
|
26
|
+
export declare const zipFileId: FileIdentifier;
|
|
27
|
+
export declare const zipItemMultipleFoldersAtRootId: FileIdentifier;
|
|
28
|
+
export declare const zipItemLargeInnerFileId: FileIdentifier;
|
|
29
|
+
export declare const zipEncryptedFileId: FileIdentifier;
|
|
30
|
+
export declare const unknownFileId: FileIdentifier;
|
|
31
|
+
export declare const errorFileId: FileIdentifier;
|
|
32
|
+
export declare const gifFileId: FileIdentifier;
|
|
33
|
+
export declare const noMetadataFileId: FileIdentifier;
|
|
34
|
+
export declare const animatedFileId: FileIdentifier;
|
|
35
|
+
export declare const atlassianLogoUrl = "https://wac-cdn.atlassian.com/assets/img/favicons/atlassian/apple-touch-icon-152x152.png";
|
|
36
|
+
export declare const externalImageIdentifier: ExternalImageIdentifier;
|
|
37
|
+
export declare const externalSmallImageIdentifier: ExternalImageIdentifier;
|
|
38
|
+
export declare const externaBrokenlIdentifier: ExternalImageIdentifier;
|
|
39
|
+
export declare const genericFileDetails: FileDetails;
|
|
40
|
+
export declare const imageFileDetails: FileDetails;
|
|
41
|
+
export declare const videoFileDetails: FileDetails;
|
|
42
|
+
export declare const audioFileDetails: FileDetails;
|
|
43
|
+
export declare const docFileDetails: FileDetails;
|
|
44
|
+
export declare const unknownFileDetails: FileDetails;
|
|
45
|
+
export declare const genericDataURI = "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAZABkAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABkAAAAAQAAAGQAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAAKgAwAEAAAAAQAAAAIAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAAIAAgMBEQACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQICAQECAQEBAgICAgICAgICAQICAgICAgICAgL/2wBDAQEBAQEBAQEBAQECAQEBAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgL/3QAEAAH/2gAMAwEAAhEDEQA/AP0U8M2NmPDfh8C0tgBomkgAW8OAPsFvwK/lh7s+5u+/4n//2Q==";
|
|
46
|
+
export declare const vrVideoDetails: {
|
|
47
|
+
id: string;
|
|
48
|
+
name: string;
|
|
49
|
+
dataUri: string;
|
|
50
|
+
previewDataUri: string;
|
|
51
|
+
mediaType: MediaType;
|
|
52
|
+
mimeType: string;
|
|
53
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { StoryBookAuthProvider } from './authProvider';
|
|
2
|
+
export { createStorybookMediaClient, createStorybookMediaClientConfig, createUploadMediaClient, createUploadMediaClientConfig, defaultBaseUrl, defaultParams, } from './mediaClientProvider';
|
|
3
|
+
export { collectionNames, defaultCollectionName, defaultMediaPickerCollectionName, fileCollectionName, onlyAnimatedGifsCollectionName, } from './collectionNames';
|
|
4
|
+
export { animatedFileId, archiveFileId, atlassianLogoUrl, audioFileDetails, audioFileId, audioNoCoverFileId, bigDocFileId, docFileDetails, docFileId, emptyImageFileId, errorFileId, externalImageIdentifier, externalSmallImageIdentifier, externaBrokenlIdentifier, genericDataURI, genericFileDetails, genericFileId, gifFileId, imageFileDetails, imageFileId, largeImageFileId, largePdfFileId, noMetadataFileId, passwordProtectedPdfFileId, smallImageFileId, unknownFileDetails, unknownFileId, verticalImageFileId, videoFileDetails, videoFileId, videoHorizontalFileId, videoLargeFileId, videoProcessingFailedId, videoSquareFileId, wideImageFileId, zipFileId, zipFileWithNestedFolderId, zipItemLargeInnerFileId, zipItemMultipleFoldersAtRootId, zipJiraArchiveFileId, zipEncryptedFileId, codeFileId, emailFileId, emailUnsupportedFileId, vrVideoDetails, } from './exampleMediaItems';
|
|
5
|
+
export declare const authProviderBaseURL = "https://media.dev.atl-paas.net";
|
|
6
|
+
export { mediaPickerAuthProvider, defaultMediaPickerAuthProvider, } from './mediaPickerAuthProvider';
|
|
7
|
+
export { fakeMediaClient } from './fakeMediaClient';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { MediaClient } from '../';
|
|
2
|
+
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
3
|
+
import { MediaEnv } from './mediaPickerAuthProvider';
|
|
4
|
+
export declare const defaultBaseUrl = "https://media.dev.atl-paas.net";
|
|
5
|
+
export declare const defaultParams: {
|
|
6
|
+
clientId: string;
|
|
7
|
+
asapIssuer: string;
|
|
8
|
+
baseUrl: string;
|
|
9
|
+
};
|
|
10
|
+
interface AuthParameter {
|
|
11
|
+
authType: 'client' | 'asap';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Creates and returns `MediaClient` (from `media-client`) based on the data provided in parameter object.
|
|
15
|
+
*
|
|
16
|
+
* @param {AuthParameter} authParameter specifies serviceName and whatever auth should be done with clientId or asapIssuer
|
|
17
|
+
* @returns {Context}
|
|
18
|
+
*/
|
|
19
|
+
export declare const createStorybookMediaClient: (authParameter?: AuthParameter) => MediaClient;
|
|
20
|
+
export declare const createStorybookMediaClientConfig: (authParameter?: AuthParameter) => MediaClientConfig;
|
|
21
|
+
export declare const createUploadMediaClient: () => MediaClient;
|
|
22
|
+
export declare const createUploadMediaClientConfig: (stargateBaseUrl?: string, env?: MediaEnv) => MediaClientConfig;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Auth, AuthContext } from '@atlaskit/media-core';
|
|
2
|
+
export declare const authProviderBaseURL = "https://media.dev.atl-paas.net";
|
|
3
|
+
export type MediaEnv = 'dev' | 'staging';
|
|
4
|
+
export declare const mediaPickerAuthProvider: (authEnvironment?: string, env?: MediaEnv) => (context?: AuthContext) => Promise<Auth>;
|
|
5
|
+
export declare const defaultMediaPickerAuthProvider: () => () => Promise<Auth>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const fileSizeError = "fileSizeExceedsLimit";
|
|
2
|
+
/**
|
|
3
|
+
* This is a helper to dynamically calculate the chunk size for a given file size.
|
|
4
|
+
*
|
|
5
|
+
* @param fileSize The size of a file to calculate the chunk size for.
|
|
6
|
+
* @returns A number of bytes per chunk or Throws an Error if the file size exceeds 2TB
|
|
7
|
+
*
|
|
8
|
+
* @see {@link https://product-fabric.atlassian.net/wiki/spaces/FIL/pages/3221881143/Rule+of+thumb+for+chunk+sizes#Given-the-following-conditions}
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
11
|
+
export declare const calculateChunkSize: (fileSize: number) => number;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseMediaClientError } from '../models/errors';
|
|
2
|
+
export type UploaderErrorReason = 'fileSizeExceedsLimit';
|
|
3
|
+
export type UploaderErrorAttributes = {
|
|
4
|
+
readonly reason: UploaderErrorReason;
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly metadata?: {
|
|
7
|
+
readonly collectionName?: string;
|
|
8
|
+
readonly occurrenceKey?: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export declare class UploaderError extends BaseMediaClientError<UploaderErrorAttributes> {
|
|
12
|
+
readonly reason: UploaderErrorReason;
|
|
13
|
+
readonly id: string;
|
|
14
|
+
readonly metadata?: {
|
|
15
|
+
readonly collectionName?: string | undefined;
|
|
16
|
+
readonly occurrenceKey?: string | undefined;
|
|
17
|
+
} | undefined;
|
|
18
|
+
constructor(reason: UploaderErrorReason, id: string, metadata?: {
|
|
19
|
+
readonly collectionName?: string | undefined;
|
|
20
|
+
readonly occurrenceKey?: string | undefined;
|
|
21
|
+
} | undefined);
|
|
22
|
+
get attributes(): {
|
|
23
|
+
reason: "fileSizeExceedsLimit";
|
|
24
|
+
id: string;
|
|
25
|
+
collectionName: string | undefined;
|
|
26
|
+
occurrenceKey: string | undefined;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export declare function isUploaderError(err: Error): err is UploaderError;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ChunkinatorFile } from '@atlaskit/chunkinator';
|
|
2
|
+
import { MediaStore } from '../client/media-store';
|
|
3
|
+
import { MediaTraceContext } from '@atlaskit/media-common';
|
|
4
|
+
export type UploadableFile = {
|
|
5
|
+
content: ChunkinatorFile;
|
|
6
|
+
name?: string;
|
|
7
|
+
mimeType?: string;
|
|
8
|
+
collection?: string;
|
|
9
|
+
size?: number;
|
|
10
|
+
};
|
|
11
|
+
export type UploadableFileUpfrontIds = {
|
|
12
|
+
id: string;
|
|
13
|
+
deferredUploadId: Promise<string>;
|
|
14
|
+
occurrenceKey?: string;
|
|
15
|
+
};
|
|
16
|
+
export type UploadFileCallbacks = {
|
|
17
|
+
onProgress: (progress: number) => void;
|
|
18
|
+
onUploadFinish: (error?: any) => void;
|
|
19
|
+
};
|
|
20
|
+
export interface UploadFileResult {
|
|
21
|
+
cancel: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const uploadFile: (file: UploadableFile, store: MediaStore, uploadableFileUpfrontIds: UploadableFileUpfrontIds, callbacks?: UploadFileCallbacks, traceContext?: MediaTraceContext) => UploadFileResult;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const checkWebpSupport: () => Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const convertBase64ToBlob: (base64: string) => Blob;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import 'setimmediate';
|
|
2
|
+
import Dataloader from 'dataloader';
|
|
3
|
+
import { MediaStore, ResponseFileItem } from '../client/media-store';
|
|
4
|
+
import { MediaItemDetails } from '../models/media';
|
|
5
|
+
export declare const MAX_BATCH_SIZE = 100;
|
|
6
|
+
export type DataloaderKey = {
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly collectionName?: string;
|
|
9
|
+
};
|
|
10
|
+
export type DataloaderResult = MediaItemDetails | null;
|
|
11
|
+
export type BatchLoadingErrorResult = {
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly collection?: string;
|
|
14
|
+
readonly error: Error;
|
|
15
|
+
};
|
|
16
|
+
export declare const getItemsFromKeys: (dataloaderKeys: ReadonlyArray<DataloaderKey>, fileItems: Array<ResponseFileItem | BatchLoadingErrorResult>) => Array<DataloaderResult | Error>;
|
|
17
|
+
export type FileIdsByCollection = {
|
|
18
|
+
[collectionName: string]: string[];
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Returns a function that, given Array<DataloaderKey>, resolves to an array of same length containing either DataloaderResult or Error.
|
|
22
|
+
* Such contract is formalised by Dataloader 1.0, @see https://github.com/graphql/dataloader
|
|
23
|
+
*
|
|
24
|
+
* If an Error is resolved in the results, it must be at same position then their corresponding key:
|
|
25
|
+
* - Dataloader will re-throw that Error when accessing/loading that particular key
|
|
26
|
+
*
|
|
27
|
+
* @param mediaStore instance of MediaStore
|
|
28
|
+
*/
|
|
29
|
+
export declare function createBatchLoadingFunc(mediaStore: MediaStore): (keys: ReadonlyArray<DataloaderKey>) => Promise<Array<DataloaderResult | Error>>;
|
|
30
|
+
export declare function createFileDataloader(mediaStore: MediaStore): Dataloader<DataloaderKey, DataloaderResult, DataloaderKey>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MediaItemDetails } from '../models/media';
|
|
2
|
+
/**
|
|
3
|
+
* EMPTY_FILE_HOURS_ELAPSED_TOLERANCE - how many hours since this file was
|
|
4
|
+
* created until we give up on expecting metadata?
|
|
5
|
+
*
|
|
6
|
+
* Yes, this is not an exact science. Any value under this tolerance will
|
|
7
|
+
* go undetected, however this is still suitable to catch the majority of
|
|
8
|
+
* cases where empty (files which never finished upload) are being reloaded.
|
|
9
|
+
*
|
|
10
|
+
* Continuous bad renders of empty files will eat our card render SLIs, so until
|
|
11
|
+
* there is a better response from backend we use this technique.
|
|
12
|
+
*
|
|
13
|
+
* Being encapsulated in this function, we can always improve the detection transparently.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EMPTY_FILE_HOURS_ELAPSED_TOLERANCE_MS: number;
|
|
16
|
+
export declare function isEmptyFile(fileDetails: MediaItemDetails, now?: number): Boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Hasher } from './hasher';
|
|
2
|
+
export interface Deferred {
|
|
3
|
+
resolve: (hash: string) => void;
|
|
4
|
+
reject: (error: any) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare class WorkerHasher implements Hasher {
|
|
7
|
+
private workers;
|
|
8
|
+
private jobs;
|
|
9
|
+
constructor(numOfWorkers: number);
|
|
10
|
+
hash(chunk: Blob): Promise<string>;
|
|
11
|
+
private createWorker;
|
|
12
|
+
private handleWorkerMessage;
|
|
13
|
+
private calculateHashInWorker;
|
|
14
|
+
private dispatch;
|
|
15
|
+
private getMostRelaxedWorker;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isImageRemote: (imageUrl: string, windowOrigin?: string) => boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReplaySubject } from 'rxjs/ReplaySubject';
|
|
2
|
+
import { FileState } from '@atlaskit/media-state';
|
|
3
|
+
import { MediaSubscribable } from './types';
|
|
4
|
+
export declare function fromObservable(observable: ReplaySubject<FileState>): MediaSubscribable;
|
|
5
|
+
export declare function createMediaSubscribable(item?: FileState | Error): MediaSubscribable;
|