@emailmaker/filemanager 1.1.85-dev.10 → 1.1.85-dev.11
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/.build-meta.json +1 -1
- package/components/ImageIcons/iconSets.d.ts +2 -0
- package/components/ImageIcons/packagedIconSets.d.ts +9 -0
- package/file-manager-FilerobotEditor.js +4 -3
- package/file-manager-IconsTab.js +493 -456
- package/file-manager-ImageCodeGenerator.js +1 -1
- package/{file-manager-hooks-fhltHD9p.js → file-manager-hooks-C6CQk0K1.js} +9 -7
- package/{file-manager-imageEditorTranslations-rRWZAwnp.js → file-manager-imageEditorTranslations-xNXgW8en.js} +2 -2
- package/{file-manager-urls-BpPtVuK4.js → file-manager-urls-Cc0AE1sg.js} +2 -2
- package/file-manager.esm.js +5 -3
- package/file-manager.js +7 -7
- package/package.json +1 -1
- package/types.d.ts +11 -0
- package/utils/filerobotEditorConfig.d.ts +1 -0
- package/utils/imageCompression.d.ts +7 -2
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode, RefObject } from 'react';
|
|
2
2
|
import type { FormInstance } from 'antd';
|
|
3
|
+
import type { IconifyJSON } from '@iconify/types';
|
|
3
4
|
import { MY_FILES, GIF, STOCK_IMAGES, ICONS, AI, IMAGE_CODES, EDITOR, IMAGE_EXTENSIONS } from './constants';
|
|
4
5
|
import type { InputRef } from 'antd';
|
|
5
6
|
import type { TextAreaRef } from 'antd/es/input/TextArea';
|
|
@@ -563,6 +564,11 @@ export interface Config {
|
|
|
563
564
|
* neither split nor shake. Defaults to `static/media/icon-sets`.
|
|
564
565
|
*/
|
|
565
566
|
iconSetsUrl?: string;
|
|
567
|
+
/**
|
|
568
|
+
* Host loader of an icon set (`lucide`, `tabler`). When given, `iconSetsUrl` and the packaged files are not used:
|
|
569
|
+
* the host delivers the sets as its own modules and nothing is fetched.
|
|
570
|
+
*/
|
|
571
|
+
loadIconSet?: (prefix: 'lucide' | 'tabler') => Promise<IconifyJSON>;
|
|
566
572
|
/** Counters and limits */
|
|
567
573
|
counters?: Counters;
|
|
568
574
|
limits?: Limits;
|
|
@@ -586,6 +592,11 @@ export interface Config {
|
|
|
586
592
|
rememberLastFolder?: boolean;
|
|
587
593
|
compressMaxSize?: number;
|
|
588
594
|
compressMaxWidthOrHeight?: number;
|
|
595
|
+
/**
|
|
596
|
+
* Squeeze image editor results to `compressMaxSize` too. Off by default: the result is only downscaled
|
|
597
|
+
* beyond `compressMaxWidthOrHeight`, otherwise every save would shrink the image again.
|
|
598
|
+
*/
|
|
599
|
+
compressEditedImages?: boolean;
|
|
589
600
|
/** URL локальной копии browser-image-compression для web worker. */
|
|
590
601
|
compessorUrl?: string;
|
|
591
602
|
/** Alias для compessorUrl с корректным написанием. */
|
|
@@ -10,6 +10,7 @@ export interface FilerobotEditorConfigOptions {
|
|
|
10
10
|
assetsUrl?: string;
|
|
11
11
|
compressMaxSize?: Config['compressMaxSize'];
|
|
12
12
|
compressMaxWidthOrHeight?: Config['compressMaxWidthOrHeight'];
|
|
13
|
+
compressEditedImages?: Config['compressEditedImages'];
|
|
13
14
|
compessorUrl?: string;
|
|
14
15
|
compressorUrl?: string;
|
|
15
16
|
showNotifications?: boolean;
|
|
@@ -10,8 +10,13 @@ export interface PrepareImageForUploadOptions {
|
|
|
10
10
|
}
|
|
11
11
|
export declare function prepareImageForUpload(file: File, options?: PrepareImageForUploadOptions): Promise<File>;
|
|
12
12
|
export declare const compressImageWithLimits: typeof prepareImageForUpload;
|
|
13
|
+
/** Options of `prepareEditedImageForUpload`. */
|
|
14
|
+
export interface PrepareEditedImageOptions extends PrepareImageForUploadOptions {
|
|
15
|
+
/** Squeeze the result to `maxSizeMB` like a new upload; set when the host configured the limit explicitly. */
|
|
16
|
+
compressBySize?: boolean;
|
|
17
|
+
}
|
|
13
18
|
/**
|
|
14
|
-
* Prepares an image editor result for upload: downscales only beyond maxWidthOrHeight and ignores the size limit,
|
|
19
|
+
* Prepares an image editor result for upload: by default downscales only beyond maxWidthOrHeight and ignores the size limit,
|
|
15
20
|
* because re-running the upload compression on every save shrank the resolution and coarsened PNGs each time.
|
|
16
21
|
*/
|
|
17
|
-
export declare function prepareEditedImageForUpload(file: File, options?:
|
|
22
|
+
export declare function prepareEditedImageForUpload(file: File, options?: PrepareEditedImageOptions): Promise<File>;
|