@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.
- package/components/PixieEditor/PixieEditor.d.ts +3 -2
- package/file-manager.d.ts +6 -2
- package/file-manager.esm.js +8 -8
- package/file-manager.esm.js.map +1 -1
- package/file-manager.js +1 -1
- package/hooks/usePixieEditor.d.ts +3 -2
- package/package.json +1 -1
- package/types.d.ts +10 -0
- package/utils/fileFormatUtils.d.ts +1 -1
- package/utils/imageCompression.d.ts +1 -0
|
@@ -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
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.
|
|
24
|
+
readonly MAX_SIZE_MB: 0.48;
|
|
25
25
|
readonly MAX_WIDTH_OR_HEIGHT: 2000;
|
|
26
26
|
readonly QUALITY: 0.8;
|
|
27
27
|
};
|