@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/media-client
2
2
 
3
+ ## 35.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
3
9
  ## 35.3.0
4
10
 
5
11
  ### Minor Changes
@@ -6,7 +6,7 @@
6
6
  "sideEffects": false,
7
7
  "types": "../dist/types/constants.d.ts",
8
8
  "typesVersions": {
9
- ">=4.5 <5.4": {
9
+ ">=4.5 <5.9": {
10
10
  "*": [
11
11
  "../dist/types-ts4.5/constants.d.ts"
12
12
  ]
@@ -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
  });
@@ -9,6 +9,8 @@ export const convertBase64ToBlob = base64 => {
9
9
  const byteArray = new Uint8Array(byteNumbers);
10
10
  byteArrays.push(byteArray);
11
11
  }
12
+
13
+ // @ts-ignore - TS2345 TypeScript 5.9.2 upgrade
12
14
  return new Blob(byteArrays, {
13
15
  type: 'image/jpeg'
14
16
  });
@@ -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,4 +1,3 @@
1
- /// <reference types="jest" />
2
1
  export declare const collectionCache: {};
3
2
  export declare class CollectionFetcher {
4
3
  constructor();
@@ -1,4 +1,3 @@
1
- /// <reference types="jest" />
2
1
  export declare class FileFetcher {
3
2
  constructor();
4
3
  getFileState: jest.Mock<any, any, any>;
@@ -1,4 +1,3 @@
1
- /// <reference types="jest" />
2
1
  import { type MediaClientConfig } from '@atlaskit/media-core';
3
2
  import { type FileFetcher } from '../file-fetcher';
4
3
  export declare class MediaClient {
@@ -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<E_1 extends keyof UploadEventPayloadMap>(event: E_1, listener: EventPayloadListener<UploadEventPayloadMap, E_1>): void;
5
- emit<E_2 extends keyof UploadEventPayloadMap>(event: E_2, payload: UploadEventPayloadMap[E_2]): boolean | undefined;
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 (UploadingFileState | ProcessingFileState | ProcessedFileState | ProcessingFailedState) & PreviewableFileState;
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['mode'];
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 | undefined;
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 | null | undefined;
15
+ [key: string]: string | number | boolean | undefined | null;
16
16
  }) => string;
17
17
  export declare const addFileAttrsToUrl: (url: string, fileAttrs: MediaBlobUrlAttrs) => string;
@@ -1,4 +1,3 @@
1
- /// <reference types="jest" />
2
1
  export declare const collectionCache: {};
3
2
  export declare class CollectionFetcher {
4
3
  constructor();
@@ -1,4 +1,3 @@
1
- /// <reference types="jest" />
2
1
  export declare class FileFetcher {
3
2
  constructor();
4
3
  getFileState: jest.Mock<any, any, any>;
@@ -1,4 +1,3 @@
1
- /// <reference types="jest" />
2
1
  import { type MediaClientConfig } from '@atlaskit/media-core';
3
2
  import { type FileFetcher } from '../file-fetcher';
4
3
  export declare class MediaClient {
@@ -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<E_1 extends keyof UploadEventPayloadMap>(event: E_1, listener: EventPayloadListener<UploadEventPayloadMap, E_1>): void;
5
- emit<E_2 extends keyof UploadEventPayloadMap>(event: E_2, payload: UploadEventPayloadMap[E_2]): boolean | undefined;
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 (UploadingFileState | ProcessingFileState | ProcessedFileState | ProcessingFailedState) & PreviewableFileState;
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['mode'];
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 | undefined;
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 | null | undefined;
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.0",
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.4.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",