@emailmaker/filemanager 0.10.94 → 0.10.96
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/adapters/DataSourceProxyBase.clearCache.test.d.ts +1 -0
- package/adapters/TreeCache.d.ts +2 -0
- package/components/EmIcons/EmIcons.d.ts +15 -15
- package/components/FileManagerApp/FileManagerApp.d.ts +1 -1
- package/components/FolderSidebar/FolderSidebar.d.ts +1 -1
- package/components/ImageIcons/IconsSearchForm.d.ts +1 -1
- package/components/LimitsCounter/LimitsCounter.d.ts +1 -1
- package/components/PageLoader/PageLoader.d.ts +2 -1
- package/dev/index.d.ts +2 -1
- package/{file-manager-IconsTab-BOtfHzE7.js → file-manager-IconsTab-DdEH0cIx.js} +2 -2
- package/{file-manager-ImageCodeGenerator-D1ihYSGj.js → file-manager-ImageCodeGenerator-B7oNhyZs.js} +2 -2
- package/{file-manager-JsBarcode-B-rE9quR.js → file-manager-JsBarcode-BgGNBn9o.js} +2 -2
- package/{file-manager-browser-CBL2rGT5.js → file-manager-browser-DzjzMXem.js} +2 -2
- package/{file-manager-index-CkVS948A.js → file-manager-index-BOM8wOfQ.js} +3 -3
- package/file-manager.css +142 -142
- package/file-manager.d.ts +1 -1
- package/file-manager.esm.js +1 -1
- package/file-manager.js +16716 -223
- package/hooks/useCustomIcons.d.ts +29 -29
- package/hooks/useViewportMetricsSync.d.ts +1 -1
- package/package.json +3 -3
- package/types.d.ts +6 -6
- package/utils/aiImageSource.d.ts +10 -0
- package/utils/aiImageSource.test.d.ts +1 -0
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconProps } from '../types';
|
|
3
3
|
export declare const useCustomIcons: () => {
|
|
4
|
-
RootFolderIcon: (props?: IconProps) => React.ReactElement<
|
|
5
|
-
FolderIcon: (props?: IconProps) => React.ReactElement<
|
|
6
|
-
FolderOpenIcon: (props?: IconProps) => React.ReactElement<
|
|
7
|
-
AddFolderIcon: (props?: IconProps) => React.ReactElement<
|
|
8
|
-
FileIcon: (props?: IconProps) => React.ReactElement<
|
|
9
|
-
UploadIcon: (props?: IconProps) => React.ReactElement<
|
|
10
|
-
UploadByUrlIcon: (props?: IconProps) => React.ReactElement<
|
|
11
|
-
ExpandArrowIcon: (props?: IconProps) => React.ReactElement<
|
|
12
|
-
CollapseArrowIcon: (props?: IconProps) => React.ReactElement<
|
|
13
|
-
ExpandFolderIcon: (props?: IconProps) => React.ReactElement<
|
|
14
|
-
CollapseFolderIcon: (props?: IconProps) => React.ReactElement<
|
|
15
|
-
FolderPreviewIcon: (props?: IconProps) => React.ReactElement<
|
|
16
|
-
EmptyFolderIcon: (props?: IconProps) => React.ReactElement<
|
|
17
|
-
GridViewIcon: (props?: IconProps) => React.ReactElement<
|
|
18
|
-
ListViewIcon: (props?: IconProps) => React.ReactElement<
|
|
19
|
-
DropZoneFileIcon: (props?: IconProps) => React.ReactElement<
|
|
20
|
-
BigStockIcon: (props?: IconProps) => React.ReactElement<
|
|
21
|
-
BigAIIcon: (props?: IconProps) => React.ReactElement<
|
|
22
|
-
GifPlayIcon: (props?: IconProps) => React.ReactElement<
|
|
23
|
-
StockBigIcon: (props?: IconProps) => React.ReactElement<
|
|
24
|
-
MixedViewIcon: (props?: IconProps) => React.ReactElement<
|
|
25
|
-
LandscapeViewIcon: (props?: IconProps) => React.ReactElement<
|
|
26
|
-
PortraitViewIcon: (props?: IconProps) => React.ReactElement<
|
|
27
|
-
SquareViewIcon: (props?: IconProps) => React.ReactElement<
|
|
28
|
-
LightModeIcon: (props?: IconProps) => React.ReactElement<
|
|
29
|
-
DarkModeIcon: (props?: IconProps) => React.ReactElement<
|
|
30
|
-
AiIcon_2: (props?: IconProps) => React.ReactElement<
|
|
31
|
-
NoFilesIcon: (props?: IconProps) => React.ReactElement<
|
|
32
|
-
ThumbsUpIcon: (props?: IconProps) => React.ReactElement<
|
|
4
|
+
RootFolderIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
5
|
+
FolderIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
6
|
+
FolderOpenIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
7
|
+
AddFolderIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
8
|
+
FileIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
9
|
+
UploadIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
10
|
+
UploadByUrlIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
11
|
+
ExpandArrowIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
12
|
+
CollapseArrowIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
13
|
+
ExpandFolderIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
14
|
+
CollapseFolderIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
15
|
+
FolderPreviewIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
16
|
+
EmptyFolderIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
17
|
+
GridViewIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
18
|
+
ListViewIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
19
|
+
DropZoneFileIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
20
|
+
BigStockIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
21
|
+
BigAIIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
22
|
+
GifPlayIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
23
|
+
StockBigIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
24
|
+
MixedViewIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
25
|
+
LandscapeViewIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
26
|
+
PortraitViewIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
27
|
+
SquareViewIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
28
|
+
LightModeIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
29
|
+
DarkModeIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
30
|
+
AiIcon_2: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
31
|
+
NoFilesIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
32
|
+
ThumbsUpIcon: (props?: IconProps) => React.ReactElement<unknown, string | React.JSXElementConstructor<any>>;
|
|
33
33
|
getCustomIcon: (iconName: keyof NonNullable<import("../types").CustomIcons | undefined>, defaultIcon: React.ComponentType<any>, props?: IconProps) => React.ReactElement;
|
|
34
34
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { getViewportMetrics } from '../presentation/list-core/viewportMetrics';
|
|
2
|
-
export declare function useViewportMetricsSync<TElement extends HTMLElement>(onViewportChange: (metrics: ReturnType<typeof getViewportMetrics>) => void, deps: readonly unknown[]): import("react").
|
|
2
|
+
export declare function useViewportMetricsSync<TElement extends HTMLElement>(onViewportChange: (metrics: ReturnType<typeof getViewportMetrics>) => void, deps: readonly unknown[]): import("react").RefObject<TElement | null>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emailmaker/filemanager",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.96",
|
|
4
4
|
"main": "./file-manager.js",
|
|
5
5
|
"module": "./file-manager.esm.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"antd": "^6.4.3",
|
|
13
13
|
"browser-image-compression": "^2.0.2",
|
|
14
14
|
"pixie": "*",
|
|
15
|
-
"react": "^
|
|
16
|
-
"react-dom": "^
|
|
15
|
+
"react": "^19.0.0",
|
|
16
|
+
"react-dom": "^19.0.0",
|
|
17
17
|
"@untitledui/icons": "^0.0.22"
|
|
18
18
|
},
|
|
19
19
|
"browserslist": {
|
package/types.d.ts
CHANGED
|
@@ -634,7 +634,7 @@ export interface IconsTabProps {
|
|
|
634
634
|
customRequest: (data: string) => void | Promise<void>;
|
|
635
635
|
query?: string;
|
|
636
636
|
setQuery?: (query: string) => void;
|
|
637
|
-
inputRef?: React.RefObject<InputRef>;
|
|
637
|
+
inputRef?: React.RefObject<InputRef | null>;
|
|
638
638
|
}
|
|
639
639
|
export interface GifItem {
|
|
640
640
|
id: string;
|
|
@@ -665,7 +665,7 @@ export interface ImageGifProps {
|
|
|
665
665
|
imageGifList: GifItem[];
|
|
666
666
|
currentReqGif: CurrentReqGif;
|
|
667
667
|
setCurrentReqGif: React.Dispatch<React.SetStateAction<CurrentReqGif>>;
|
|
668
|
-
inputRef: React.RefObject<InputRef>;
|
|
668
|
+
inputRef: React.RefObject<InputRef | null>;
|
|
669
669
|
customRequest: (data: string, fileName?: string) => Promise<File | void> | void;
|
|
670
670
|
}
|
|
671
671
|
export interface UnsplashImage {
|
|
@@ -697,14 +697,14 @@ export interface ImageStockProps {
|
|
|
697
697
|
setImageStockList: React.Dispatch<React.SetStateAction<UnsplashImage[]>>;
|
|
698
698
|
currentReq: CurrentReqStock;
|
|
699
699
|
setCurrentReq: React.Dispatch<React.SetStateAction<CurrentReqStock>>;
|
|
700
|
-
inputRef: React.RefObject<InputRef>;
|
|
700
|
+
inputRef: React.RefObject<InputRef | null>;
|
|
701
701
|
customRequest: (data: string, fileName?: string) => Promise<File | void> | void;
|
|
702
702
|
}
|
|
703
703
|
export interface ImageAIProps {
|
|
704
704
|
customRequest: (file: {
|
|
705
705
|
file: globalThis.File;
|
|
706
706
|
}) => Promise<void | File>;
|
|
707
|
-
inputAiRef: RefObject<TextAreaRef>;
|
|
707
|
+
inputAiRef: RefObject<TextAreaRef | null>;
|
|
708
708
|
isImageUploaded: boolean;
|
|
709
709
|
setIsImageUploaded: (val: boolean) => void;
|
|
710
710
|
aiImageRequest: string;
|
|
@@ -723,7 +723,7 @@ export interface UseImageAIGenerationProps {
|
|
|
723
723
|
customRequest: (args: {
|
|
724
724
|
file: globalThis.File;
|
|
725
725
|
}) => void;
|
|
726
|
-
aiTabRef: React.RefObject<HTMLElement>;
|
|
726
|
+
aiTabRef: React.RefObject<HTMLElement | null>;
|
|
727
727
|
isImageUploaded: boolean;
|
|
728
728
|
setIsImageUploaded: (val: boolean) => void;
|
|
729
729
|
aiImageRequest: string;
|
|
@@ -749,7 +749,7 @@ export interface UseImageAIGenerationReturn {
|
|
|
749
749
|
setRequestStatus: React.Dispatch<React.SetStateAction<string>>;
|
|
750
750
|
handleGenerate: () => void;
|
|
751
751
|
handleLimitAiImgCount: () => void;
|
|
752
|
-
convertBase64ToFile: (
|
|
752
|
+
convertBase64ToFile: (source: string) => Promise<void>;
|
|
753
753
|
isShiftPressed: boolean;
|
|
754
754
|
setIsShiftPressed: React.Dispatch<React.SetStateAction<boolean>>;
|
|
755
755
|
currentReqId: string | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Картинка от ИИ может быть «голым» base64 (наш встроенный генератор) либо ссылкой/data-URI
|
|
3
|
+
* (сторонний ИИ хоста в закрытом контуре). Для отрисовки достаточно достроить data-URI только
|
|
4
|
+
* у голого base64; для получения Blob — понять, нужно ли качать значение через fetch (он умеет
|
|
5
|
+
* как http(s)-ссылки, так и data:-URI любой кодировки, включая некодированный SVG).
|
|
6
|
+
*/
|
|
7
|
+
/** Есть ли у значения схема URI (http(s)://, protocol-relative //, data:). */
|
|
8
|
+
export declare function hasUriScheme(value: string): boolean;
|
|
9
|
+
/** Значение, пригодное для `src` у `<img>`. */
|
|
10
|
+
export declare function toAiImageSrc(value: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|