@atlaskit/media-client 15.0.0 → 15.1.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 +11 -0
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/version.json +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/client/media-store/resolveAuth.d.ts +1 -1
- package/dist/types/globalMediaEventEmitter.d.ts +3 -3
- package/dist/types/index.d.ts +1 -1
- package/dist/types/models/file-state.d.ts +1 -1
- package/dist/types/utils/imageResizeModeToFileImageMode.d.ts +1 -1
- package/dist/types/utils/overrideMediaTypeIfUnknown.d.ts +2 -2
- package/dist/types/utils/request/errors.d.ts +1 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/media-client
|
|
2
2
|
|
|
3
|
+
## 15.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Export `WithMediaClient` type to resolve a deep import path d.ts reference
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [`cb2392f6d33`](https://bitbucket.org/atlassian/atlassian-frontend/commits/cb2392f6d33) - Upgrade to TypeScript 4.2.4
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 15.0.0
|
|
4
15
|
|
|
5
16
|
### Major Changes
|
package/dist/cjs/version.json
CHANGED
package/dist/es2019/version.json
CHANGED
package/dist/esm/version.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Auth, AuthContext, AuthProvider } from '@atlaskit/media-core';
|
|
2
2
|
export declare const DEFAULT_AUTH_PROVIDER_TIMEOUT = 10000;
|
|
3
3
|
export declare const resolveAuth: (authProvider: AuthProvider, authContext?: AuthContext | undefined, authProviderTimeout?: number) => Promise<Auth>;
|
|
4
|
-
export declare const resolveInitialAuth: (auth?:
|
|
4
|
+
export declare const resolveInitialAuth: (auth?: Auth | undefined) => Auth;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UploadEventPayloadMap, EventPayloadListener } from './client/events';
|
|
2
2
|
export declare const globalMediaEventEmitter: {
|
|
3
|
-
on<E extends
|
|
4
|
-
off<E_1 extends
|
|
5
|
-
emit<E_2 extends
|
|
3
|
+
on<E extends keyof UploadEventPayloadMap>(event: E, listener: EventPayloadListener<UploadEventPayloadMap, E, any>): void;
|
|
4
|
+
off<E_1 extends keyof UploadEventPayloadMap>(event: E_1, listener: EventPayloadListener<UploadEventPayloadMap, E_1, any>): void;
|
|
5
|
+
emit<E_2 extends keyof UploadEventPayloadMap>(event: E_2, payload: UploadEventPayloadMap[E_2]): boolean | undefined;
|
|
6
6
|
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export { isFileIdentifier, isExternalImageIdentifier, isDifferentIdentifier, } f
|
|
|
41
41
|
export type { Identifier, FileIdentifier, ExternalImageIdentifier, } from './identifier';
|
|
42
42
|
export type { EventPayloadListener, UploadEventPayloadMap, MediaViewedEventPayload, } from './client/events';
|
|
43
43
|
export { withMediaClient, getMediaClient } from './utils/with-media-client-hoc';
|
|
44
|
-
export type { WithMediaClientConfig, WithMediaClientConfigProps, WithMediaClientFunction, } from './utils/with-media-client-hoc';
|
|
44
|
+
export type { WithMediaClientConfig, WithMediaClientConfigProps, WithMediaClientFunction, WithMediaClient, } from './utils/with-media-client-hoc';
|
|
45
45
|
export { globalMediaEventEmitter } from './globalMediaEventEmitter';
|
|
46
46
|
export { isMediaBlobUrl, getAttrsFromUrl, addFileAttrsToUrl, objectToQueryString, } from './utils/url';
|
|
47
47
|
export type { MediaBlobUrlAttrs } from './utils/url';
|
|
@@ -84,7 +84,7 @@ export declare const isUploadingFileState: (fileState: FileState) => fileState i
|
|
|
84
84
|
export declare const isProcessingFileState: (fileState: FileState) => fileState is ProcessingFileState;
|
|
85
85
|
export declare const isProcessedFileState: (fileState: FileState) => fileState is ProcessedFileState;
|
|
86
86
|
export declare const isErrorFileState: (fileState: FileState) => fileState is ErrorFileState;
|
|
87
|
-
export declare const isPreviewableFileState: (fileState: FileState) => fileState is (UploadingFileState
|
|
87
|
+
export declare const isPreviewableFileState: (fileState: FileState) => fileState is (UploadingFileState | ProcessingFileState | ProcessedFileState | ProcessingFailedState) & PreviewableFileState;
|
|
88
88
|
export declare const isFinalFileState: (fileState: FileState) => fileState is ProcessedFileState | ProcessingFailedState | ErrorFileState;
|
|
89
89
|
export declare const isImageRepresentationReady: (fileState: FileState) => boolean;
|
|
90
90
|
export declare const mapMediaFileToFileState: (mediaFile: MediaStoreResponse<MediaFile>) => FileState;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { MediaStoreGetFileImageParams } from '../client/media-store';
|
|
2
2
|
export declare type ImageResizeMode = 'crop' | 'fit' | 'full-fit' | 'stretchy-fit';
|
|
3
|
-
export declare const imageResizeModeToFileImageMode: (resizeMode?:
|
|
3
|
+
export declare const imageResizeModeToFileImageMode: (resizeMode?: ImageResizeMode | undefined) => MediaStoreGetFileImageParams['mode'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FileState } from '../models/file-state';
|
|
2
2
|
import { MediaType } from '../models/media';
|
|
3
|
-
export declare const overrideMediaTypeIfUnknown: (fileState: FileState, mediaType?:
|
|
4
|
-
mediaType?:
|
|
3
|
+
export declare const overrideMediaTypeIfUnknown: (fileState: FileState, mediaType?: MediaType | undefined) => {
|
|
4
|
+
mediaType?: MediaType | undefined;
|
|
5
5
|
};
|
|
@@ -7,7 +7,7 @@ export declare class RequestError extends BaseMediaClientError<RequestErrorAttri
|
|
|
7
7
|
constructor(reason: RequestErrorReason, metadata?: RequestErrorMetadata | undefined, innerError?: Error | undefined);
|
|
8
8
|
get attributes(): {
|
|
9
9
|
reason: RequestErrorReason;
|
|
10
|
-
method: "
|
|
10
|
+
method: import("./types").RequestMethod | undefined;
|
|
11
11
|
endpoint: string | undefined;
|
|
12
12
|
attempts: number | undefined;
|
|
13
13
|
clientExhaustedRetries: boolean | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-client",
|
|
3
|
-
"version": "15.
|
|
3
|
+
"version": "15.1.0",
|
|
4
4
|
"description": "Media API Web Client Library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@atlaskit/chunkinator": "^3.1.0",
|
|
31
|
-
"@atlaskit/media-common": "^2.
|
|
31
|
+
"@atlaskit/media-common": "^2.12.0",
|
|
32
32
|
"@babel/runtime": "^7.0.0",
|
|
33
33
|
"dataloader": "^2.0.0",
|
|
34
34
|
"deep-equal": "^1.0.1",
|
|
@@ -44,15 +44,15 @@
|
|
|
44
44
|
"xstate": "^4.20.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@atlaskit/media-core": "^32.3.
|
|
47
|
+
"@atlaskit/media-core": "^32.3.1",
|
|
48
48
|
"react": "^16.8.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@atlaskit/button": "^16.
|
|
51
|
+
"@atlaskit/button": "^16.3.0",
|
|
52
52
|
"@atlaskit/docs": "*",
|
|
53
|
-
"@atlaskit/media-card": "^73.
|
|
53
|
+
"@atlaskit/media-card": "^73.5.0",
|
|
54
54
|
"@atlaskit/media-core": "^32.3.0",
|
|
55
|
-
"@atlaskit/media-test-helpers": "^29.
|
|
55
|
+
"@atlaskit/media-test-helpers": "^29.4.0",
|
|
56
56
|
"@atlaskit/ssr": "*",
|
|
57
57
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
58
58
|
"@types/deep-equal": "^1.0.1",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"react": "^16.8.0",
|
|
65
65
|
"react-dom": "^16.8.0",
|
|
66
66
|
"styled-components": "^3.2.6",
|
|
67
|
-
"typescript": "
|
|
67
|
+
"typescript": "4.2.4"
|
|
68
68
|
},
|
|
69
69
|
"resolutions": {
|
|
70
70
|
"lru-fast": "0.2.2"
|