@feathery/react 2.4.89 → 2.4.90
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/dist/utils/image.d.ts
CHANGED
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { FeatheryFieldTypes } from './init';
|
|
3
2
|
export declare const THUMBNAIL_TYPE: {
|
|
4
3
|
PDF: string;
|
|
5
4
|
IMAGE: string;
|
|
6
5
|
UNKNOWN: string;
|
|
7
6
|
};
|
|
8
7
|
export declare const BASE64_REGEX: RegExp;
|
|
9
|
-
export declare function getThumbnailType(file:
|
|
8
|
+
export declare function getThumbnailType(file: any): string;
|
|
10
9
|
/**
|
|
11
10
|
* Utility hook for handling file values in file upload fields.
|
|
12
11
|
* This custom hook maintains a referentially-stable list of files,
|
|
13
12
|
* and will execute a callback every time that list changes.
|
|
14
13
|
*/
|
|
15
|
-
export declare function useFileData(initialFiles
|
|
14
|
+
export declare function useFileData(initialFiles: any, onSetFiles?: () => void): (any[] | import("react").Dispatch<import("react").SetStateAction<any[]>>)[];
|
|
16
15
|
/**
|
|
17
16
|
* Given a File (or a Promise<File>), convert the file to a filename and thumbnail.
|
|
18
17
|
* Filename will be a plaintext string and thumbnail will be a base64 encoded image.
|
|
19
18
|
*/
|
|
20
|
-
export declare function getThumbnailData(
|
|
19
|
+
export declare function getThumbnailData(filePromise: any): Promise<{
|
|
21
20
|
filename: string;
|
|
21
|
+
thumbnail: unknown;
|
|
22
|
+
} | {
|
|
23
|
+
filename: any;
|
|
22
24
|
thumbnail: string;
|
|
23
25
|
}>;
|
|
24
26
|
/**
|
|
@@ -31,11 +33,8 @@ export declare function getRenderData(filePromise: any): Promise<{
|
|
|
31
33
|
/**
|
|
32
34
|
* Utility hook for converting a list of files into a list of thumbnail information.
|
|
33
35
|
*/
|
|
34
|
-
export declare function useThumbnailData(files:
|
|
35
|
-
|
|
36
|
-
thumbnail: string;
|
|
37
|
-
}[];
|
|
38
|
-
export declare const dataURLToFile: (dataURL: FeatheryFieldTypes, name: string) => File;
|
|
36
|
+
export declare function useThumbnailData(files: any): any;
|
|
37
|
+
export declare const dataURLToFile: (dataURL: any, name: any) => File;
|
|
39
38
|
export declare const toBase64: (file: any) => Promise<string>;
|
|
40
39
|
export declare const isBase64Image: (string: any) => boolean;
|
|
41
40
|
//# sourceMappingURL=image.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/utils/image.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../src/utils/image.tsx"],"names":[],"mappings":";AAIA,eAAO,MAAM,cAAc;;;;CAI1B,CAAC;AAEF,eAAO,MAAM,YAAY,QACgF,CAAC;AAE1G,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,GAAG,UAYzC;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,YAAY,EAAE,GAAG,EAAE,UAAU,aAAW,+EAWnE;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,GAAG;;;;;;GAmBtD;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,WAAW,EAAE,GAAG;;;GAQnD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,GAAG,OAa1C;AAED,eAAO,MAAM,aAAa,YAAa,GAAG,QAAQ,GAAG,SAYpD,CAAC;AAEF,eAAO,MAAM,QAAQ,SAAU,GAAG,KAAG,QAAQ,MAAM,CAM/C,CAAC;AAEL,eAAO,MAAM,aAAa,WAAY,GAAG,YAExC,CAAC"}
|