@atlaskit/media-client 35.3.0 → 35.3.1
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/constants/package.json +1 -1
- package/dist/cjs/utils/convertBase64ToBlob.js +2 -0
- package/dist/es2019/utils/convertBase64ToBlob.js +2 -0
- package/dist/esm/utils/convertBase64ToBlob.js +2 -0
- package/dist/types/client/__mocks__/collection-fetcher.d.ts +0 -1
- package/dist/types/client/__mocks__/file-fetcher.d.ts +0 -1
- package/dist/types/client/__mocks__/media-client.d.ts +0 -1
- package/dist/types/globalMediaEventEmitter.d.ts +2 -2
- 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 +1 -1
- package/dist/types/utils/url.d.ts +1 -1
- package/dist/types-ts4.5/client/__mocks__/collection-fetcher.d.ts +0 -1
- package/dist/types-ts4.5/client/__mocks__/file-fetcher.d.ts +0 -1
- package/dist/types-ts4.5/client/__mocks__/media-client.d.ts +0 -1
- package/dist/types-ts4.5/globalMediaEventEmitter.d.ts +2 -2
- package/dist/types-ts4.5/models/file-state.d.ts +1 -1
- package/dist/types-ts4.5/utils/imageResizeModeToFileImageMode.d.ts +1 -1
- package/dist/types-ts4.5/utils/overrideMediaTypeIfUnknown.d.ts +1 -1
- package/dist/types-ts4.5/utils/url.d.ts +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/constants/package.json
CHANGED
|
@@ -20,6 +20,8 @@ var convertBase64ToBlob = exports.convertBase64ToBlob = function convertBase64To
|
|
|
20
20
|
for (var offset = 0; offset < byteCharacters.length; offset += sliceSize) {
|
|
21
21
|
_loop();
|
|
22
22
|
}
|
|
23
|
+
|
|
24
|
+
// @ts-ignore - TS2345 TypeScript 5.9.2 upgrade
|
|
23
25
|
return new Blob(byteArrays, {
|
|
24
26
|
type: 'image/jpeg'
|
|
25
27
|
});
|
|
@@ -14,6 +14,8 @@ export var convertBase64ToBlob = function convertBase64ToBlob(base64) {
|
|
|
14
14
|
for (var offset = 0; offset < byteCharacters.length; offset += sliceSize) {
|
|
15
15
|
_loop();
|
|
16
16
|
}
|
|
17
|
+
|
|
18
|
+
// @ts-ignore - TS2345 TypeScript 5.9.2 upgrade
|
|
17
19
|
return new Blob(byteArrays, {
|
|
18
20
|
type: 'image/jpeg'
|
|
19
21
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type UploadEventPayloadMap, type EventPayloadListener } from './client/events';
|
|
2
2
|
export declare const globalMediaEventEmitter: {
|
|
3
3
|
on<E extends keyof UploadEventPayloadMap>(event: E, listener: EventPayloadListener<UploadEventPayloadMap, E>): void;
|
|
4
|
-
off<
|
|
5
|
-
emit<
|
|
4
|
+
off<E extends keyof UploadEventPayloadMap>(event: E, listener: EventPayloadListener<UploadEventPayloadMap, E>): void;
|
|
5
|
+
emit<E extends keyof UploadEventPayloadMap>(event: E, payload: UploadEventPayloadMap[E]): boolean | undefined;
|
|
6
6
|
};
|
|
@@ -20,7 +20,7 @@ export declare const isUploadingFileState: (fileState: FileState) => fileState i
|
|
|
20
20
|
export declare const isProcessingFileState: (fileState: FileState) => fileState is ProcessingFileState;
|
|
21
21
|
export declare const isProcessedFileState: (fileState: FileState) => fileState is ProcessedFileState;
|
|
22
22
|
export declare const isErrorFileState: (fileState: FileState) => fileState is ErrorFileState;
|
|
23
|
-
export declare const isPreviewableFileState: (fileState: FileState) => fileState is
|
|
23
|
+
export declare const isPreviewableFileState: (fileState: FileState) => fileState is Exclude<FileState, ErrorFileState> & PreviewableFileState;
|
|
24
24
|
export declare const isFinalFileState: (fileState: FileState) => fileState is ProcessedFileState | ErrorFileState | ProcessingFailedState;
|
|
25
25
|
export declare const isNonErrorFinalFileState: (fileState: FileState) => fileState is ProcessedFileState | ProcessingFailedState;
|
|
26
26
|
export declare const hasArtifacts: (fileState: FileState) => fileState is FileState & {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type MediaStoreGetFileImageParams } from '../client/media-store';
|
|
2
2
|
export type ImageResizeMode = 'crop' | 'fit' | 'full-fit' | 'stretchy-fit';
|
|
3
|
-
export declare const imageResizeModeToFileImageMode: (resizeMode?: ImageResizeMode) => MediaStoreGetFileImageParams[
|
|
3
|
+
export declare const imageResizeModeToFileImageMode: (resizeMode?: ImageResizeMode) => MediaStoreGetFileImageParams["mode"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FileState } from '@atlaskit/media-state';
|
|
2
2
|
import { type MediaType } from '../models/media';
|
|
3
3
|
export declare const overrideMediaTypeIfUnknown: (fileState: FileState, mediaType?: MediaType) => {
|
|
4
|
-
mediaType?: MediaType
|
|
4
|
+
mediaType?: MediaType;
|
|
5
5
|
};
|
|
@@ -12,6 +12,6 @@ export interface MediaBlobUrlAttrs {
|
|
|
12
12
|
}
|
|
13
13
|
export declare const getAttrsFromUrl: (blobUrl: string) => MediaBlobUrlAttrs | undefined;
|
|
14
14
|
export declare const objectToQueryString: (json: {
|
|
15
|
-
[key: string]: string | number | boolean |
|
|
15
|
+
[key: string]: string | number | boolean | undefined | null;
|
|
16
16
|
}) => string;
|
|
17
17
|
export declare const addFileAttrsToUrl: (url: string, fileAttrs: MediaBlobUrlAttrs) => string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type UploadEventPayloadMap, type EventPayloadListener } from './client/events';
|
|
2
2
|
export declare const globalMediaEventEmitter: {
|
|
3
3
|
on<E extends keyof UploadEventPayloadMap>(event: E, listener: EventPayloadListener<UploadEventPayloadMap, E>): void;
|
|
4
|
-
off<
|
|
5
|
-
emit<
|
|
4
|
+
off<E extends keyof UploadEventPayloadMap>(event: E, listener: EventPayloadListener<UploadEventPayloadMap, E>): void;
|
|
5
|
+
emit<E extends keyof UploadEventPayloadMap>(event: E, payload: UploadEventPayloadMap[E]): boolean | undefined;
|
|
6
6
|
};
|
|
@@ -20,7 +20,7 @@ export declare const isUploadingFileState: (fileState: FileState) => fileState i
|
|
|
20
20
|
export declare const isProcessingFileState: (fileState: FileState) => fileState is ProcessingFileState;
|
|
21
21
|
export declare const isProcessedFileState: (fileState: FileState) => fileState is ProcessedFileState;
|
|
22
22
|
export declare const isErrorFileState: (fileState: FileState) => fileState is ErrorFileState;
|
|
23
|
-
export declare const isPreviewableFileState: (fileState: FileState) => fileState is
|
|
23
|
+
export declare const isPreviewableFileState: (fileState: FileState) => fileState is Exclude<FileState, ErrorFileState> & PreviewableFileState;
|
|
24
24
|
export declare const isFinalFileState: (fileState: FileState) => fileState is ProcessedFileState | ErrorFileState | ProcessingFailedState;
|
|
25
25
|
export declare const isNonErrorFinalFileState: (fileState: FileState) => fileState is ProcessedFileState | ProcessingFailedState;
|
|
26
26
|
export declare const hasArtifacts: (fileState: FileState) => fileState is FileState & {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type MediaStoreGetFileImageParams } from '../client/media-store';
|
|
2
2
|
export type ImageResizeMode = 'crop' | 'fit' | 'full-fit' | 'stretchy-fit';
|
|
3
|
-
export declare const imageResizeModeToFileImageMode: (resizeMode?: ImageResizeMode) => MediaStoreGetFileImageParams[
|
|
3
|
+
export declare const imageResizeModeToFileImageMode: (resizeMode?: ImageResizeMode) => MediaStoreGetFileImageParams["mode"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type FileState } from '@atlaskit/media-state';
|
|
2
2
|
import { type MediaType } from '../models/media';
|
|
3
3
|
export declare const overrideMediaTypeIfUnknown: (fileState: FileState, mediaType?: MediaType) => {
|
|
4
|
-
mediaType?: MediaType
|
|
4
|
+
mediaType?: MediaType;
|
|
5
5
|
};
|
|
@@ -12,6 +12,6 @@ export interface MediaBlobUrlAttrs {
|
|
|
12
12
|
}
|
|
13
13
|
export declare const getAttrsFromUrl: (blobUrl: string) => MediaBlobUrlAttrs | undefined;
|
|
14
14
|
export declare const objectToQueryString: (json: {
|
|
15
|
-
[key: string]: string | number | boolean |
|
|
15
|
+
[key: string]: string | number | boolean | undefined | null;
|
|
16
16
|
}) => string;
|
|
17
17
|
export declare const addFileAttrsToUrl: (url: string, fileAttrs: MediaBlobUrlAttrs) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/media-client",
|
|
3
|
-
"version": "35.3.
|
|
3
|
+
"version": "35.3.1",
|
|
4
4
|
"description": "Media API Web Client Library",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@atlaskit/atlassian-context": "^0.
|
|
37
|
+
"@atlaskit/atlassian-context": "^0.5.0",
|
|
38
38
|
"@atlaskit/chunkinator": "^7.0.0",
|
|
39
39
|
"@atlaskit/media-common": "^12.3.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|