@atlaskit/media-client 17.1.2 → 18.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/constants/package.json +8 -1
- package/dist/cjs/client/media-store/resolveAuth.js +1 -1
- package/dist/cjs/client/mobile-upload.js +1 -1
- package/dist/cjs/file-streams-cache.js +2 -2
- package/dist/cjs/index.js +0 -9
- package/dist/cjs/utils/mobileUpload/servicesCache.js +2 -2
- package/dist/cjs/utils/request/helpers.js +4 -4
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/client/media-store/resolveAuth.js +1 -1
- package/dist/es2019/client/mobile-upload.js +1 -1
- package/dist/es2019/file-streams-cache.js +2 -2
- package/dist/es2019/index.js +0 -2
- package/dist/es2019/utils/mobileUpload/servicesCache.js +2 -2
- package/dist/es2019/utils/request/helpers.js +4 -4
- package/dist/es2019/version.json +1 -1
- package/dist/esm/client/media-store/resolveAuth.js +1 -1
- package/dist/esm/client/mobile-upload.js +1 -1
- package/dist/esm/file-streams-cache.js +2 -2
- package/dist/esm/index.js +0 -2
- package/dist/esm/utils/mobileUpload/servicesCache.js +2 -2
- package/dist/esm/utils/request/helpers.js +4 -4
- package/dist/esm/version.json +1 -1
- package/dist/types/file-streams-cache.d.ts +2 -2
- package/dist/types/index.d.ts +0 -1
- package/dist/types/utils/mobileUpload/servicesCache.d.ts +2 -2
- package/dist/types-ts4.0/client/__mocks__/collection-fetcher.d.ts +8 -0
- package/dist/types-ts4.0/client/__mocks__/file-fetcher.d.ts +10 -0
- package/dist/types-ts4.0/client/__mocks__/media-client.d.ts +13 -0
- package/dist/types-ts4.0/client/collection-fetcher.d.ts +35 -0
- package/dist/types-ts4.0/client/events.d.ts +14 -0
- package/dist/types-ts4.0/client/file-fetcher/error.d.ts +29 -0
- package/dist/types-ts4.0/client/file-fetcher/index.d.ts +56 -0
- package/dist/types-ts4.0/client/media-client.d.ts +28 -0
- package/dist/types-ts4.0/client/media-store/error.d.ts +16 -0
- package/dist/types-ts4.0/client/media-store/index.d.ts +167 -0
- package/dist/types-ts4.0/client/media-store/resolveAuth.d.ts +4 -0
- package/dist/types-ts4.0/client/mobile-upload.d.ts +11 -0
- package/dist/types-ts4.0/client/stargate-client.d.ts +15 -0
- package/dist/types-ts4.0/constants.d.ts +6 -0
- package/dist/types-ts4.0/file-streams-cache.d.ts +15 -0
- package/dist/types-ts4.0/globalMediaEventEmitter.d.ts +6 -0
- package/dist/types-ts4.0/identifier.d.ts +15 -0
- package/dist/types-ts4.0/index.d.ts +89 -0
- package/dist/types-ts4.0/models/artifacts.d.ts +12 -0
- package/dist/types-ts4.0/models/auth-headers.d.ts +11 -0
- package/dist/types-ts4.0/models/auth-query-parameters.d.ts +11 -0
- package/dist/types-ts4.0/models/errors/helpers.d.ts +6 -0
- package/dist/types-ts4.0/models/errors/index.d.ts +11 -0
- package/dist/types-ts4.0/models/errors/types.d.ts +15 -0
- package/dist/types-ts4.0/models/file-state.d.ts +91 -0
- package/dist/types-ts4.0/models/item.d.ts +25 -0
- package/dist/types-ts4.0/models/media-subscribable.d.ts +3 -0
- package/dist/types-ts4.0/models/media.d.ts +66 -0
- package/dist/types-ts4.0/models/mobile-upload.d.ts +28 -0
- package/dist/types-ts4.0/upload-controller.d.ts +7 -0
- package/dist/types-ts4.0/uploader/calculateChunkSize.d.ts +11 -0
- package/dist/types-ts4.0/uploader/error.d.ts +29 -0
- package/dist/types-ts4.0/uploader/index.d.ts +21 -0
- package/dist/types-ts4.0/utils/checkWebpSupport.d.ts +1 -0
- package/dist/types-ts4.0/utils/convertBase64ToBlob.d.ts +1 -0
- package/dist/types-ts4.0/utils/createFileDataLoader.d.ts +30 -0
- package/dist/types-ts4.0/utils/createMediaSubject.d.ts +3 -0
- package/dist/types-ts4.0/utils/detectEmptyFile.d.ts +16 -0
- package/dist/types-ts4.0/utils/getDimensionsFromBlob.d.ts +6 -0
- package/dist/types-ts4.0/utils/getImageDimensionsFromBlob.d.ts +5 -0
- package/dist/types-ts4.0/utils/getMediaTypeFromUploadableFile.d.ts +3 -0
- package/dist/types-ts4.0/utils/getVideoDimensionsFromBlob.d.ts +6 -0
- package/dist/types-ts4.0/utils/hashing/hasher.d.ts +3 -0
- package/dist/types-ts4.0/utils/hashing/hasherCreator.d.ts +3 -0
- package/dist/types-ts4.0/utils/hashing/simpleHasher.d.ts +4 -0
- package/dist/types-ts4.0/utils/hashing/workerHasher.d.ts +16 -0
- package/dist/types-ts4.0/utils/imageResizeModeToFileImageMode.d.ts +3 -0
- package/dist/types-ts4.0/utils/isImageRemote.d.ts +1 -0
- package/dist/types-ts4.0/utils/mediaSubscribable/fromObservable.d.ts +5 -0
- package/dist/types-ts4.0/utils/mediaSubscribable/index.d.ts +3 -0
- package/dist/types-ts4.0/utils/mediaSubscribable/toPromise.d.ts +10 -0
- package/dist/types-ts4.0/utils/mediaSubscribable/types.d.ts +16 -0
- package/dist/types-ts4.0/utils/mobileUpload/error.d.ts +29 -0
- package/dist/types-ts4.0/utils/mobileUpload/helpers.d.ts +8 -0
- package/dist/types-ts4.0/utils/mobileUpload/index.d.ts +5 -0
- package/dist/types-ts4.0/utils/mobileUpload/servicesCache.d.ts +4 -0
- package/dist/types-ts4.0/utils/mobileUpload/stateMachine/index.d.ts +7 -0
- package/dist/types-ts4.0/utils/mobileUpload/stateMachine/states/error.d.ts +3 -0
- package/dist/types-ts4.0/utils/mobileUpload/stateMachine/states/processed.d.ts +3 -0
- package/dist/types-ts4.0/utils/mobileUpload/stateMachine/states/processing.d.ts +3 -0
- package/dist/types-ts4.0/utils/mobileUpload/stateMachine/states/processingFailed.d.ts +3 -0
- package/dist/types-ts4.0/utils/mobileUpload/stateMachine/states/uploading.d.ts +3 -0
- package/dist/types-ts4.0/utils/mobileUpload/stateMachine/types.d.ts +69 -0
- package/dist/types-ts4.0/utils/overrideMediaTypeIfUnknown.d.ts +5 -0
- package/dist/types-ts4.0/utils/polling/errors.d.ts +12 -0
- package/dist/types-ts4.0/utils/polling/index.d.ts +33 -0
- package/dist/types-ts4.0/utils/polling/types.d.ts +7 -0
- package/dist/types-ts4.0/utils/request/errors.d.ts +20 -0
- package/dist/types-ts4.0/utils/request/helpers.d.ts +38 -0
- package/dist/types-ts4.0/utils/request/index.d.ts +5 -0
- package/dist/types-ts4.0/utils/request/types.d.ts +43 -0
- package/dist/types-ts4.0/utils/safeUnsubscribe.d.ts +2 -0
- package/dist/types-ts4.0/utils/setTimeoutPromise.d.ts +2 -0
- package/dist/types-ts4.0/utils/shouldFetchRemoteFileStates.d.ts +16 -0
- package/dist/types-ts4.0/utils/url.d.ts +17 -0
- package/dist/types-ts4.0/utils/with-media-client-hoc.d.ts +16 -0
- package/package.json +13 -8
- package/report.api.md +12 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-client",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"description": "Media API Web Client Library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -12,6 +12,13 @@
|
|
|
12
12
|
"module": "dist/esm/index.js",
|
|
13
13
|
"module:es2019": "dist/es2019/index.js",
|
|
14
14
|
"types": "dist/types/index.d.ts",
|
|
15
|
+
"typesVersions": {
|
|
16
|
+
">=4.0 <4.5": {
|
|
17
|
+
"*": [
|
|
18
|
+
"dist/types-ts4.0/*"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
15
22
|
"sideEffects": false,
|
|
16
23
|
"atlaskit:src": "src/index.ts",
|
|
17
24
|
"af:exports": {
|
|
@@ -33,7 +40,7 @@
|
|
|
33
40
|
"dataloader": "^2.0.0",
|
|
34
41
|
"deep-equal": "^1.0.1",
|
|
35
42
|
"eventemitter2": "^4.1.0",
|
|
36
|
-
"
|
|
43
|
+
"lru_map": "^0.4.1",
|
|
37
44
|
"rusha": "^0.8.13",
|
|
38
45
|
"rxjs": "^5.5.0",
|
|
39
46
|
"setimmediate": "^1.0.5",
|
|
@@ -43,7 +50,7 @@
|
|
|
43
50
|
"xstate": "^4.20.0"
|
|
44
51
|
},
|
|
45
52
|
"peerDependencies": {
|
|
46
|
-
"@atlaskit/media-core": "^
|
|
53
|
+
"@atlaskit/media-core": "^34.0.0",
|
|
47
54
|
"@emotion/react": "^11.7.1",
|
|
48
55
|
"react": "^16.8.0"
|
|
49
56
|
},
|
|
@@ -51,7 +58,7 @@
|
|
|
51
58
|
"@atlaskit/button": "^16.3.0",
|
|
52
59
|
"@atlaskit/docs": "*",
|
|
53
60
|
"@atlaskit/media-card": "^74.1.0",
|
|
54
|
-
"@atlaskit/media-core": "^
|
|
61
|
+
"@atlaskit/media-core": "^34.0.0",
|
|
55
62
|
"@atlaskit/media-test-helpers": "^30.0.0",
|
|
56
63
|
"@atlaskit/ssr": "*",
|
|
57
64
|
"@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
|
|
@@ -62,11 +69,9 @@
|
|
|
62
69
|
"fetch-mock": "^8.0.0",
|
|
63
70
|
"react": "^16.8.0",
|
|
64
71
|
"react-dom": "^16.8.0",
|
|
65
|
-
"typescript": "4.
|
|
66
|
-
},
|
|
67
|
-
"resolutions": {
|
|
68
|
-
"lru-fast": "0.2.2"
|
|
72
|
+
"typescript": "4.5.5"
|
|
69
73
|
},
|
|
74
|
+
"resolutions": {},
|
|
70
75
|
"techstack": {
|
|
71
76
|
"@atlassian/frontend": {
|
|
72
77
|
"circular-dependencies": [
|
package/report.api.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/media-client"
|
|
1
|
+
## API Report File for "@atlaskit/media-client".
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
4
6
|
|
|
5
7
|
```ts
|
|
6
8
|
import { AsapBasedAuth } from '@atlaskit/media-core';
|
|
@@ -10,7 +12,6 @@ import { AuthProvider } from '@atlaskit/media-core';
|
|
|
10
12
|
import { ChunkinatorFile } from '@atlaskit/chunkinator';
|
|
11
13
|
import { ClientAltBasedAuth } from '@atlaskit/media-core';
|
|
12
14
|
import { FileStatus as FileStatus_2 } from '@atlaskit/media-common';
|
|
13
|
-
import { LRUCache } from 'lru-fast';
|
|
14
15
|
import { MediaApiConfig } from '@atlaskit/media-core';
|
|
15
16
|
import { MediaClientConfig } from '@atlaskit/media-core';
|
|
16
17
|
import { MediaFeatureFlags } from '@atlaskit/media-common';
|
|
@@ -76,9 +77,8 @@ export declare class CollectionFetcher {
|
|
|
76
77
|
): Promise<void>;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
|
-
declare type CompletionObserver<
|
|
80
|
-
T
|
|
81
|
-
> = PartialObserver<T> & Required<Pick<PartialObserver<T>, 'complete'>>;
|
|
80
|
+
declare type CompletionObserver<T> = PartialObserver<T> &
|
|
81
|
+
Required<Pick<PartialObserver<T>, 'complete'>>;
|
|
82
82
|
|
|
83
83
|
export declare interface CopyDestination
|
|
84
84
|
extends MediaStoreCopyFileWithTokenParams {
|
|
@@ -147,9 +147,7 @@ export declare interface ErrorFileState {
|
|
|
147
147
|
message?: string;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
declare type ErrorObserver<T
|
|
151
|
-
T
|
|
152
|
-
> &
|
|
150
|
+
declare type ErrorObserver<T> = PartialObserver<T> &
|
|
153
151
|
Required<Pick<PartialObserver<T>, 'error'>>;
|
|
154
152
|
|
|
155
153
|
export declare type EventPayloadListener<
|
|
@@ -777,7 +775,7 @@ export declare type MediaFileProcessingStatus =
|
|
|
777
775
|
|
|
778
776
|
export declare type MediaItemType = 'file' | 'external-image';
|
|
779
777
|
|
|
780
|
-
export declare type MediaObserver<T
|
|
778
|
+
export declare type MediaObserver<T> =
|
|
781
779
|
| NextObserver<T>
|
|
782
780
|
| ErrorObserver<T>
|
|
783
781
|
| CompletionObserver<T>
|
|
@@ -1003,7 +1001,7 @@ export declare interface MediaStoreTouchFileParams {
|
|
|
1003
1001
|
readonly collection?: string;
|
|
1004
1002
|
}
|
|
1005
1003
|
|
|
1006
|
-
export declare type MediaSubscribable<T
|
|
1004
|
+
export declare type MediaSubscribable<T> = {
|
|
1007
1005
|
subscribe(observer?: MediaObserver<T>): MediaSubscription;
|
|
1008
1006
|
};
|
|
1009
1007
|
|
|
@@ -1027,7 +1025,7 @@ export declare interface MediaViewedEventPayload {
|
|
|
1027
1025
|
isUserCollection?: boolean;
|
|
1028
1026
|
}
|
|
1029
1027
|
|
|
1030
|
-
declare interface MobileUpload {
|
|
1028
|
+
export declare interface MobileUpload {
|
|
1031
1029
|
notifyUploadStart(event: MobileUploadStartEvent): void;
|
|
1032
1030
|
notifyUploadProgress(event: MobileUploadProgressEvent): void;
|
|
1033
1031
|
notifyUploadEnd(event: MobileUploadEndEvent): void;
|
|
@@ -1059,9 +1057,7 @@ export declare type MobileUploadStartEvent = {
|
|
|
1059
1057
|
createdAt?: number;
|
|
1060
1058
|
};
|
|
1061
1059
|
|
|
1062
|
-
declare type NextObserver<T
|
|
1063
|
-
T
|
|
1064
|
-
> &
|
|
1060
|
+
declare type NextObserver<T> = PartialObserver<T> &
|
|
1065
1061
|
Required<Pick<PartialObserver<T>, 'next'>>;
|
|
1066
1062
|
|
|
1067
1063
|
export declare type NonErrorFileState = Exclude<FileState, ErrorFileState>;
|
|
@@ -1070,7 +1066,7 @@ export declare const objectToQueryString: (json: {
|
|
|
1070
1066
|
[key: string]: string | number | boolean | null | undefined;
|
|
1071
1067
|
}) => string;
|
|
1072
1068
|
|
|
1073
|
-
declare type PartialObserver<T
|
|
1069
|
+
declare type PartialObserver<T> = {
|
|
1074
1070
|
next?: (value: T) => void;
|
|
1075
1071
|
error?: (err: any) => void;
|
|
1076
1072
|
complete?: () => void;
|
|
@@ -1287,18 +1283,6 @@ export declare class StargateClient {
|
|
|
1287
1283
|
isTokenExpired(token: EdgeData): boolean;
|
|
1288
1284
|
}
|
|
1289
1285
|
|
|
1290
|
-
export declare class StreamsCache<T> {
|
|
1291
|
-
private readonly streams;
|
|
1292
|
-
constructor(streams: LRUCache<string, ReplaySubject<T>>);
|
|
1293
|
-
has(id: string): boolean;
|
|
1294
|
-
set(id: string, stream: ReplaySubject<T>): void;
|
|
1295
|
-
get(id: string): ReplaySubject<T> | undefined;
|
|
1296
|
-
getOrInsert(id: string, callback: () => ReplaySubject<T>): ReplaySubject<T>;
|
|
1297
|
-
removeAll(): void;
|
|
1298
|
-
remove(id: string): void;
|
|
1299
|
-
get size(): number;
|
|
1300
|
-
}
|
|
1301
|
-
|
|
1302
1286
|
export declare type TouchedFiles = {
|
|
1303
1287
|
created: CreatedTouchedFile[];
|
|
1304
1288
|
};
|