@emailmaker/filemanager 0.10.65 → 0.10.66

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.
@@ -1,3 +1,4 @@
1
+ import type { PixieSavePayload } from '../types';
1
2
  import { File as AppFile, FilesQueryParams, ThumbnailFile } from '../types';
2
3
  interface UsePixieEditorProps {
3
4
  files: AppFile[];
@@ -9,8 +10,8 @@ export declare const usePixieEditor: ({ files, selectedFiles, fetchFiles, select
9
10
  isPixieEditorVisible: boolean;
10
11
  editingFile: ThumbnailFile | AppFile | null;
11
12
  handleEdit: (fileForEdit?: ThumbnailFile | AppFile) => void;
12
- handlePixieEditorSave: (updatedFile: AppFile) => Promise<AppFile | undefined>;
13
- handlePixieEditorSaveCopy: (updatedFile: AppFile) => Promise<AppFile | undefined>;
13
+ handlePixieEditorSave: (updatedFile: AppFile, payload: PixieSavePayload) => Promise<AppFile | undefined>;
14
+ handlePixieEditorSaveCopy: (updatedFile: AppFile, payload: PixieSavePayload) => Promise<AppFile | undefined>;
14
15
  handlePixieEditorClose: () => void;
15
16
  };
16
17
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emailmaker/filemanager",
3
- "version": "0.10.65",
3
+ "version": "0.10.66",
4
4
  "main": "./file-manager.js",
5
5
  "module": "./file-manager.esm.js",
6
6
  "types": "./index.d.ts",
package/types.d.ts CHANGED
@@ -40,6 +40,12 @@ export interface File {
40
40
  sourceUrl?: string;
41
41
  saveWithoutFolder?: boolean;
42
42
  }
43
+ export interface PixieSavePayload {
44
+ blob: UploadBinary;
45
+ mimeType: string;
46
+ thumbnail: string;
47
+ mode: 'save' | 'saveCopy';
48
+ }
43
49
  export interface PathItem {
44
50
  id: string;
45
51
  name: string;
@@ -443,6 +449,10 @@ export interface Config {
443
449
  rememberLastFolder?: boolean;
444
450
  compressMaxSize?: number;
445
451
  compressMaxWidthOrHeight?: number;
452
+ /** URL локальной копии browser-image-compression для web worker. */
453
+ compessorUrl?: string;
454
+ /** Alias для compessorUrl с корректным написанием. */
455
+ compressorUrl?: string;
446
456
  multiSelect?: boolean;
447
457
  defaultFolderName?: string;
448
458
  availableImageExtensions?: Array<(typeof IMAGE_EXTENSIONS)[number]>;
@@ -21,7 +21,7 @@ export declare function detectFileFormat(file: {
21
21
  * Константы для сжатия изображений
22
22
  */
23
23
  export declare const IMAGE_COMPRESSION_DEFAULTS: {
24
- readonly MAX_SIZE_MB: 0.5;
24
+ readonly MAX_SIZE_MB: 0.48;
25
25
  readonly MAX_WIDTH_OR_HEIGHT: 2000;
26
26
  readonly QUALITY: 0.8;
27
27
  };
@@ -3,5 +3,6 @@ export interface CompressImageOptions {
3
3
  maxWidthOrHeight?: number;
4
4
  mimeType?: string;
5
5
  fileName?: string;
6
+ libURL?: string;
6
7
  }
7
8
  export declare function compressImageWithLimits(file: File, options?: CompressImageOptions): Promise<File>;