@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.
@@ -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<any, string | React.JSXElementConstructor<any>>;
5
- FolderIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
6
- FolderOpenIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
7
- AddFolderIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
8
- FileIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
9
- UploadIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
10
- UploadByUrlIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
11
- ExpandArrowIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
12
- CollapseArrowIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
13
- ExpandFolderIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
14
- CollapseFolderIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
15
- FolderPreviewIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
16
- EmptyFolderIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
17
- GridViewIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
18
- ListViewIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
19
- DropZoneFileIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
20
- BigStockIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
21
- BigAIIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
22
- GifPlayIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
23
- StockBigIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
24
- MixedViewIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
25
- LandscapeViewIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
26
- PortraitViewIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
27
- SquareViewIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
28
- LightModeIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
29
- DarkModeIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
30
- AiIcon_2: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
31
- NoFilesIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
32
- ThumbsUpIcon: (props?: IconProps) => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
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").MutableRefObject<TElement | null>;
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.94",
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": "^18.2.0 || ^19.0.0",
16
- "react-dom": "^18.2.0 || ^19.0.0",
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: (base64String: string) => void;
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 {};