szld-libs 0.2.61 → 0.2.63
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/es/components/AuthButton/index.d.ts +6 -6
- package/es/components/BackHeader/index.d.ts +25 -25
- package/es/components/Captcha/index.d.ts +8 -8
- package/es/components/CoralButton/index.d.ts +10 -10
- package/es/components/CreateForm/index.d.ts +56 -56
- package/es/components/CustomPagination/index.d.ts +15 -15
- package/es/components/DynamicForm/index.d.ts +102 -102
- package/es/components/DynamicForm/myCascader/index.d.ts +16 -16
- package/es/components/DynamicForm/myCheckbox/index.d.ts +18 -18
- package/es/components/DynamicForm/myRadio/index.d.ts +19 -19
- package/es/components/DynamicForm/mySelect/index.d.ts +16 -16
- package/es/components/DynamicForm/myUpload/index.d.ts +16 -16
- package/es/components/DynamicForm/radioCard/index.d.ts +12 -12
- package/es/components/DynamicForm/selectModel/index.d.ts +22 -22
- package/es/components/DynamicForm/useDynamicForm.d.ts +32 -32
- package/es/components/EditTable/index.d.ts +17 -17
- package/es/components/Loading/index.d.ts +4 -4
- package/es/components/LoopSlide/index.css +32 -32
- package/es/components/LoopSlide/index.d.ts +17 -17
- package/es/components/SearchTable/index.d.ts +30 -30
- package/es/components/Upload/index.d.ts +14 -14
- package/es/components/VirtualTable/index.d.ts +3 -3
- package/es/components/WorkFlowNode/index.d.ts +14 -14
- package/es/components/common/403.d.ts +2 -2
- package/es/components/common/404.d.ts +2 -2
- package/es/hooks/useCaptcha.d.ts +11 -11
- package/es/hooks/useChangePwd.d.ts +13 -13
- package/es/hooks/useConfig.d.ts +8 -8
- package/es/hooks/useDetailRender.d.ts +19 -19
- package/es/hooks/useRemember.d.ts +9 -9
- package/es/hooks/useRowSelection.d.ts +20 -20
- package/es/index.d.ts +1 -1
- package/es/main.d.ts +28 -28
- package/es/utils/aes.d.ts +7 -7
- package/es/utils/download.d.ts +9 -9
- package/es/utils/filetype.d.ts +35 -35
- package/es/utils/formRules.d.ts +55 -55
- package/es/utils/hmacSHA512.d.ts +6 -6
- package/es/utils/hmacSM3.d.ts +20 -20
- package/es/utils/image-compression/UPNG.d.ts +142 -142
- package/es/utils/image-compression/image.d.ts +8 -8
- package/es/utils/image-compression/index.d.ts +9 -9
- package/es/utils/index.d.ts +15 -15
- package/es/utils/method.d.ts +48 -48
- package/es/utils/verify-code.d.ts +27 -27
- package/es/vite-env.d.ts +14 -14
- package/lib/components/AuthButton/index.d.ts +6 -6
- package/lib/components/BackHeader/index.d.ts +25 -25
- package/lib/components/Captcha/index.d.ts +8 -8
- package/lib/components/CoralButton/index.d.ts +10 -10
- package/lib/components/CreateForm/index.d.ts +56 -56
- package/lib/components/CustomPagination/index.d.ts +15 -15
- package/lib/components/DynamicForm/index.d.ts +102 -102
- package/lib/components/DynamicForm/myCascader/index.d.ts +16 -16
- package/lib/components/DynamicForm/myCheckbox/index.d.ts +18 -18
- package/lib/components/DynamicForm/myRadio/index.d.ts +19 -19
- package/lib/components/DynamicForm/mySelect/index.d.ts +16 -16
- package/lib/components/DynamicForm/myUpload/index.d.ts +16 -16
- package/lib/components/DynamicForm/radioCard/index.d.ts +12 -12
- package/lib/components/DynamicForm/selectModel/index.d.ts +22 -22
- package/lib/components/DynamicForm/useDynamicForm.d.ts +32 -32
- package/lib/components/EditTable/index.d.ts +17 -17
- package/lib/components/Loading/index.d.ts +4 -4
- package/lib/components/LoopSlide/index.css +32 -32
- package/lib/components/LoopSlide/index.d.ts +17 -17
- package/lib/components/SearchTable/index.d.ts +30 -30
- package/lib/components/Upload/index.d.ts +14 -14
- package/lib/components/VirtualTable/index.d.ts +3 -3
- package/lib/components/WorkFlowNode/index.d.ts +14 -14
- package/lib/components/common/403.d.ts +2 -2
- package/lib/components/common/404.d.ts +2 -2
- package/lib/hooks/useCaptcha.d.ts +11 -11
- package/lib/hooks/useChangePwd.d.ts +13 -13
- package/lib/hooks/useConfig.d.ts +8 -8
- package/lib/hooks/useDetailRender.d.ts +19 -19
- package/lib/hooks/useRemember.d.ts +9 -9
- package/lib/hooks/useRowSelection.d.ts +20 -20
- package/lib/index.d.ts +1 -1
- package/lib/main.d.ts +28 -28
- package/lib/utils/aes.d.ts +7 -7
- package/lib/utils/download.d.ts +9 -9
- package/lib/utils/filetype.d.ts +35 -35
- package/lib/utils/formRules.d.ts +55 -55
- package/lib/utils/hmacSHA512.d.ts +6 -6
- package/lib/utils/hmacSM3.d.ts +20 -20
- package/lib/utils/image-compression/UPNG.d.ts +142 -142
- package/lib/utils/image-compression/image.d.ts +8 -8
- package/lib/utils/image-compression/index.d.ts +9 -9
- package/lib/utils/index.d.ts +15 -15
- package/lib/utils/method.d.ts +48 -48
- package/lib/utils/verify-code.d.ts +27 -27
- package/lib/vite-env.d.ts +14 -14
- package/package.json +49 -49
- package/readme.md +25 -25
package/es/main.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import BackHeader from './components/BackHeader';
|
|
2
|
-
import CreateForm from './components/CreateForm';
|
|
3
|
-
import SearchTable from './components/SearchTable';
|
|
4
|
-
import UploadFile from './components/Upload';
|
|
5
|
-
import EditTable from './components/EditTable';
|
|
6
|
-
import AuthButton from './components/AuthButton';
|
|
7
|
-
import CoralButton from './components/CoralButton';
|
|
8
|
-
import LoopSlide from './components/LoopSlide';
|
|
9
|
-
import showWorkFlow, { WorkFlowNode } from './components/WorkFlowNode';
|
|
10
|
-
import CustomPagination from './components/CustomPagination';
|
|
11
|
-
import DynamicForm from './components/DynamicForm';
|
|
12
|
-
import * as download from './utils/download';
|
|
13
|
-
import * as fileType from './utils/filetype';
|
|
14
|
-
import * as FormRules from './utils/formRules';
|
|
15
|
-
import compressionImage from './utils/image-compression';
|
|
16
|
-
import * as utils from './utils/index';
|
|
17
|
-
import * as verfyCode from './utils/verify-code';
|
|
18
|
-
import AES from './utils/aes';
|
|
19
|
-
import HmacSHA512 from './utils/hmacSHA512';
|
|
20
|
-
import HmacSM3 from './utils/hmacSM3';
|
|
21
|
-
import * as method from './utils/method';
|
|
22
|
-
import useCaptcha from './hooks/useCaptcha';
|
|
23
|
-
import useChangePwd from './hooks/useChangePwd';
|
|
24
|
-
import useConfig from './hooks/useConfig';
|
|
25
|
-
import useRemember from './hooks/useRemember';
|
|
26
|
-
import useRowSelection from './hooks/useRowSelection';
|
|
27
|
-
import useDetailRender from './hooks/useDetailRender';
|
|
28
|
-
export { AES, AuthButton, BackHeader, compressionImage, CoralButton, CreateForm, EditTable, HmacSHA512, HmacSM3, LoopSlide, SearchTable, showWorkFlow, UploadFile, DynamicForm, useCaptcha, useChangePwd, useConfig, useRemember, useRowSelection, WorkFlowNode, CustomPagination, useDetailRender, utils, download, fileType, FormRules, verfyCode, method, };
|
|
1
|
+
import BackHeader from './components/BackHeader';
|
|
2
|
+
import CreateForm from './components/CreateForm';
|
|
3
|
+
import SearchTable from './components/SearchTable';
|
|
4
|
+
import UploadFile from './components/Upload';
|
|
5
|
+
import EditTable from './components/EditTable';
|
|
6
|
+
import AuthButton from './components/AuthButton';
|
|
7
|
+
import CoralButton from './components/CoralButton';
|
|
8
|
+
import LoopSlide from './components/LoopSlide';
|
|
9
|
+
import showWorkFlow, { WorkFlowNode } from './components/WorkFlowNode';
|
|
10
|
+
import CustomPagination from './components/CustomPagination';
|
|
11
|
+
import DynamicForm from './components/DynamicForm';
|
|
12
|
+
import * as download from './utils/download';
|
|
13
|
+
import * as fileType from './utils/filetype';
|
|
14
|
+
import * as FormRules from './utils/formRules';
|
|
15
|
+
import compressionImage from './utils/image-compression';
|
|
16
|
+
import * as utils from './utils/index';
|
|
17
|
+
import * as verfyCode from './utils/verify-code';
|
|
18
|
+
import AES from './utils/aes';
|
|
19
|
+
import HmacSHA512 from './utils/hmacSHA512';
|
|
20
|
+
import HmacSM3 from './utils/hmacSM3';
|
|
21
|
+
import * as method from './utils/method';
|
|
22
|
+
import useCaptcha from './hooks/useCaptcha';
|
|
23
|
+
import useChangePwd from './hooks/useChangePwd';
|
|
24
|
+
import useConfig from './hooks/useConfig';
|
|
25
|
+
import useRemember from './hooks/useRemember';
|
|
26
|
+
import useRowSelection from './hooks/useRowSelection';
|
|
27
|
+
import useDetailRender from './hooks/useDetailRender';
|
|
28
|
+
export { AES, AuthButton, BackHeader, compressionImage, CoralButton, CreateForm, EditTable, HmacSHA512, HmacSM3, LoopSlide, SearchTable, showWorkFlow, UploadFile, DynamicForm, useCaptcha, useChangePwd, useConfig, useRemember, useRowSelection, WorkFlowNode, CustomPagination, useDetailRender, utils, download, fileType, FormRules, verfyCode, method, };
|
package/es/utils/aes.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
declare class AES {
|
|
2
|
-
salt: string;
|
|
3
|
-
constructor();
|
|
4
|
-
encrypt(value: string): string | undefined;
|
|
5
|
-
decrypt(value: string): string | undefined;
|
|
6
|
-
}
|
|
7
|
-
export default AES;
|
|
1
|
+
declare class AES {
|
|
2
|
+
salt: string;
|
|
3
|
+
constructor();
|
|
4
|
+
encrypt(value: string): string | undefined;
|
|
5
|
+
decrypt(value: string): string | undefined;
|
|
6
|
+
}
|
|
7
|
+
export default AES;
|
package/es/utils/download.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
declare const downloadUrl: (url: string, filename?: string) => void;
|
|
2
|
-
/**
|
|
3
|
-
*
|
|
4
|
-
* @param blob Blob或base64字符
|
|
5
|
-
* @param fileName
|
|
6
|
-
* @returns
|
|
7
|
-
*/
|
|
8
|
-
declare const downloadBlob: (blob: Blob | string, fileName: string) => void;
|
|
9
|
-
export { downloadUrl, downloadBlob };
|
|
1
|
+
declare const downloadUrl: (url: string, filename?: string) => void;
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param blob Blob或base64字符
|
|
5
|
+
* @param fileName
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
declare const downloadBlob: (blob: Blob | string, fileName: string) => void;
|
|
9
|
+
export { downloadUrl, downloadBlob };
|
package/es/utils/filetype.d.ts
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
export declare enum FileType {
|
|
2
|
-
zip = "application/zip",
|
|
3
|
-
png = "image/png",
|
|
4
|
-
jpg = "image/jpg",
|
|
5
|
-
jpeg = "image/jpeg",
|
|
6
|
-
pdf = "application/pdf",
|
|
7
|
-
doc = "application/msword",
|
|
8
|
-
docx = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
9
|
-
pptx = "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
10
|
-
ppt = "application/vnd.ms-powerpoint",
|
|
11
|
-
xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
12
|
-
xls = "application/vnd.ms-excel",
|
|
13
|
-
txt = "text/plain",
|
|
14
|
-
csv = "text/csv",
|
|
15
|
-
svg = "image/svg+xml"
|
|
16
|
-
}
|
|
17
|
-
declare const FileTypeMap: Map<string, FileType>;
|
|
18
|
-
declare enum FileSuffix {
|
|
19
|
-
zip = ".zip",
|
|
20
|
-
png = ".png",
|
|
21
|
-
jpg = ".jpg",
|
|
22
|
-
jpeg = ".jpeg",
|
|
23
|
-
pdf = ".pdf",
|
|
24
|
-
doc = ".doc",
|
|
25
|
-
docx = ".docx",
|
|
26
|
-
ppt = ".ppt",
|
|
27
|
-
pptx = ".pptx",
|
|
28
|
-
xls = ".xls",
|
|
29
|
-
xlsx = ".xlsx",
|
|
30
|
-
txt = ".txt",
|
|
31
|
-
csv = ".csv",
|
|
32
|
-
svg = ".svg",
|
|
33
|
-
rar = ".rar"
|
|
34
|
-
}
|
|
35
|
-
export { FileTypeMap, FileSuffix };
|
|
1
|
+
export declare enum FileType {
|
|
2
|
+
zip = "application/zip",
|
|
3
|
+
png = "image/png",
|
|
4
|
+
jpg = "image/jpg",
|
|
5
|
+
jpeg = "image/jpeg",
|
|
6
|
+
pdf = "application/pdf",
|
|
7
|
+
doc = "application/msword",
|
|
8
|
+
docx = "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
9
|
+
pptx = "application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
|
10
|
+
ppt = "application/vnd.ms-powerpoint",
|
|
11
|
+
xlsx = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
12
|
+
xls = "application/vnd.ms-excel",
|
|
13
|
+
txt = "text/plain",
|
|
14
|
+
csv = "text/csv",
|
|
15
|
+
svg = "image/svg+xml"
|
|
16
|
+
}
|
|
17
|
+
declare const FileTypeMap: Map<string, FileType>;
|
|
18
|
+
declare enum FileSuffix {
|
|
19
|
+
zip = ".zip",
|
|
20
|
+
png = ".png",
|
|
21
|
+
jpg = ".jpg",
|
|
22
|
+
jpeg = ".jpeg",
|
|
23
|
+
pdf = ".pdf",
|
|
24
|
+
doc = ".doc",
|
|
25
|
+
docx = ".docx",
|
|
26
|
+
ppt = ".ppt",
|
|
27
|
+
pptx = ".pptx",
|
|
28
|
+
xls = ".xls",
|
|
29
|
+
xlsx = ".xlsx",
|
|
30
|
+
txt = ".txt",
|
|
31
|
+
csv = ".csv",
|
|
32
|
+
svg = ".svg",
|
|
33
|
+
rar = ".rar"
|
|
34
|
+
}
|
|
35
|
+
export { FileTypeMap, FileSuffix };
|
package/es/utils/formRules.d.ts
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
declare const formRules: {
|
|
2
|
-
phone: {
|
|
3
|
-
pattern: RegExp;
|
|
4
|
-
message: string;
|
|
5
|
-
};
|
|
6
|
-
telephone: {
|
|
7
|
-
pattern: RegExp;
|
|
8
|
-
message: string;
|
|
9
|
-
};
|
|
10
|
-
email: {
|
|
11
|
-
pattern: RegExp;
|
|
12
|
-
message: string;
|
|
13
|
-
};
|
|
14
|
-
httpUrl: {
|
|
15
|
-
pattern: RegExp;
|
|
16
|
-
message: string;
|
|
17
|
-
};
|
|
18
|
-
zipCode: {
|
|
19
|
-
pattern: RegExp;
|
|
20
|
-
message: string;
|
|
21
|
-
};
|
|
22
|
-
specificKey: {
|
|
23
|
-
pattern: RegExp;
|
|
24
|
-
message: string;
|
|
25
|
-
};
|
|
26
|
-
inputTextarea: {
|
|
27
|
-
pattern: RegExp;
|
|
28
|
-
message: string;
|
|
29
|
-
};
|
|
30
|
-
backendRestrict: {
|
|
31
|
-
pattern: RegExp;
|
|
32
|
-
message: string;
|
|
33
|
-
};
|
|
34
|
-
onetoNinetyNine: {
|
|
35
|
-
pattern: RegExp;
|
|
36
|
-
message: string;
|
|
37
|
-
};
|
|
38
|
-
passwordRule: {
|
|
39
|
-
pattern: RegExp;
|
|
40
|
-
message: string;
|
|
41
|
-
};
|
|
42
|
-
passwordNewRule: {
|
|
43
|
-
pattern: RegExp;
|
|
44
|
-
message: string;
|
|
45
|
-
};
|
|
46
|
-
pureNumber: {
|
|
47
|
-
pattern: RegExp;
|
|
48
|
-
message: string;
|
|
49
|
-
};
|
|
50
|
-
onlyBlankRule: {
|
|
51
|
-
pattern: RegExp;
|
|
52
|
-
message: string;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
export default formRules;
|
|
1
|
+
declare const formRules: {
|
|
2
|
+
phone: {
|
|
3
|
+
pattern: RegExp;
|
|
4
|
+
message: string;
|
|
5
|
+
};
|
|
6
|
+
telephone: {
|
|
7
|
+
pattern: RegExp;
|
|
8
|
+
message: string;
|
|
9
|
+
};
|
|
10
|
+
email: {
|
|
11
|
+
pattern: RegExp;
|
|
12
|
+
message: string;
|
|
13
|
+
};
|
|
14
|
+
httpUrl: {
|
|
15
|
+
pattern: RegExp;
|
|
16
|
+
message: string;
|
|
17
|
+
};
|
|
18
|
+
zipCode: {
|
|
19
|
+
pattern: RegExp;
|
|
20
|
+
message: string;
|
|
21
|
+
};
|
|
22
|
+
specificKey: {
|
|
23
|
+
pattern: RegExp;
|
|
24
|
+
message: string;
|
|
25
|
+
};
|
|
26
|
+
inputTextarea: {
|
|
27
|
+
pattern: RegExp;
|
|
28
|
+
message: string;
|
|
29
|
+
};
|
|
30
|
+
backendRestrict: {
|
|
31
|
+
pattern: RegExp;
|
|
32
|
+
message: string;
|
|
33
|
+
};
|
|
34
|
+
onetoNinetyNine: {
|
|
35
|
+
pattern: RegExp;
|
|
36
|
+
message: string;
|
|
37
|
+
};
|
|
38
|
+
passwordRule: {
|
|
39
|
+
pattern: RegExp;
|
|
40
|
+
message: string;
|
|
41
|
+
};
|
|
42
|
+
passwordNewRule: {
|
|
43
|
+
pattern: RegExp;
|
|
44
|
+
message: string;
|
|
45
|
+
};
|
|
46
|
+
pureNumber: {
|
|
47
|
+
pattern: RegExp;
|
|
48
|
+
message: string;
|
|
49
|
+
};
|
|
50
|
+
onlyBlankRule: {
|
|
51
|
+
pattern: RegExp;
|
|
52
|
+
message: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export default formRules;
|
package/es/utils/hmacSHA512.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare class HmacSHA512 {
|
|
2
|
-
salt: string;
|
|
3
|
-
constructor(salt: string);
|
|
4
|
-
encrypt(value: string): string;
|
|
5
|
-
}
|
|
6
|
-
export default HmacSHA512;
|
|
1
|
+
declare class HmacSHA512 {
|
|
2
|
+
salt: string;
|
|
3
|
+
constructor(salt: string);
|
|
4
|
+
encrypt(value: string): string;
|
|
5
|
+
}
|
|
6
|
+
export default HmacSHA512;
|
package/es/utils/hmacSM3.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HMAC-SM3 实现
|
|
3
|
-
*/
|
|
4
|
-
declare class HmacSM3 {
|
|
5
|
-
private key;
|
|
6
|
-
constructor(key: string | Uint8Array);
|
|
7
|
-
/**
|
|
8
|
-
* 计算HMAC-SM3值
|
|
9
|
-
*/
|
|
10
|
-
digest(message: string | Uint8Array): Uint8Array;
|
|
11
|
-
/**
|
|
12
|
-
* 计算HMAC-SM3值并返回十六进制字符串
|
|
13
|
-
*/
|
|
14
|
-
digestHex(message: string | Uint8Array): string;
|
|
15
|
-
/**
|
|
16
|
-
* 静态方法:快速计算HMAC-SM3
|
|
17
|
-
*/
|
|
18
|
-
static hmac(key: string | Uint8Array, message: string | Uint8Array): string;
|
|
19
|
-
}
|
|
20
|
-
export default HmacSM3;
|
|
1
|
+
/**
|
|
2
|
+
* HMAC-SM3 实现
|
|
3
|
+
*/
|
|
4
|
+
declare class HmacSM3 {
|
|
5
|
+
private key;
|
|
6
|
+
constructor(key: string | Uint8Array);
|
|
7
|
+
/**
|
|
8
|
+
* 计算HMAC-SM3值
|
|
9
|
+
*/
|
|
10
|
+
digest(message: string | Uint8Array): Uint8Array;
|
|
11
|
+
/**
|
|
12
|
+
* 计算HMAC-SM3值并返回十六进制字符串
|
|
13
|
+
*/
|
|
14
|
+
digestHex(message: string | Uint8Array): string;
|
|
15
|
+
/**
|
|
16
|
+
* 静态方法:快速计算HMAC-SM3
|
|
17
|
+
*/
|
|
18
|
+
static hmac(key: string | Uint8Array, message: string | Uint8Array): string;
|
|
19
|
+
}
|
|
20
|
+
export default HmacSM3;
|
|
@@ -1,142 +1,142 @@
|
|
|
1
|
-
export default UPNG;
|
|
2
|
-
declare namespace UPNG {
|
|
3
|
-
function toRGBA8(out: any): ArrayBufferLike[];
|
|
4
|
-
namespace toRGBA8 {
|
|
5
|
-
function decodeImage(data: any, w: any, h: any, out: any): Uint8Array;
|
|
6
|
-
}
|
|
7
|
-
function decode(buff: any): {
|
|
8
|
-
tabs: {};
|
|
9
|
-
frames: never[];
|
|
10
|
-
};
|
|
11
|
-
namespace decode {
|
|
12
|
-
function _decompress(out: any, dd: any, w: any, h: any): any;
|
|
13
|
-
function _inflate(data: any, buff: any): any;
|
|
14
|
-
function _readInterlace(data: any, out: any): Uint8Array;
|
|
15
|
-
function _getBPP(out: any): number;
|
|
16
|
-
function _filterZero(data: any, out: any, off: any, w: any, h: any): any;
|
|
17
|
-
function _paeth(a: any, b: any, c: any): any;
|
|
18
|
-
function _IHDR(data: any, offset: any, out: any): void;
|
|
19
|
-
}
|
|
20
|
-
function inflateRaw(N: any, W: any): any;
|
|
21
|
-
namespace _bin {
|
|
22
|
-
function nextZero(data: any, p: any): any;
|
|
23
|
-
function readUshort(buff: any, p: any): number;
|
|
24
|
-
function writeUshort(buff: any, p: any, n: any): void;
|
|
25
|
-
function readUint(buff: any, p: any): number;
|
|
26
|
-
function writeUint(buff: any, p: any, n: any): void;
|
|
27
|
-
function readASCII(buff: any, p: any, l: any): string;
|
|
28
|
-
function writeASCII(data: any, p: any, s: any): void;
|
|
29
|
-
function readBytes(buff: any, p: any, l: any): any[];
|
|
30
|
-
function pad(n: any): any;
|
|
31
|
-
function readUTF8(buff: any, p: any, l: any): string;
|
|
32
|
-
}
|
|
33
|
-
function _copyTile(sb: any, sw: any, sh: any, tb: any, tw: any, th: any, xoff: any, yoff: any, mode: any): boolean;
|
|
34
|
-
function encode(bufs: any, w: any, h: any, ps: any, dels: any, tabs: any, forbidPlte: any): ArrayBufferLike;
|
|
35
|
-
namespace encode {
|
|
36
|
-
function _main(nimg: any, w: any, h: any, dels: any, tabs: any): ArrayBufferLike;
|
|
37
|
-
function compressPNG(out: any, filter: any, levelZero: any): void;
|
|
38
|
-
function compress(bufs: any, w: any, h: any, ps: any, prms: any): {
|
|
39
|
-
ctype: number;
|
|
40
|
-
depth: number;
|
|
41
|
-
plte: any[];
|
|
42
|
-
frames: {
|
|
43
|
-
rect: {
|
|
44
|
-
x: number;
|
|
45
|
-
y: number;
|
|
46
|
-
width: any;
|
|
47
|
-
height: any;
|
|
48
|
-
};
|
|
49
|
-
img: Uint8Array;
|
|
50
|
-
blend: number;
|
|
51
|
-
dispose: number;
|
|
52
|
-
}[];
|
|
53
|
-
};
|
|
54
|
-
function framize(bufs: any, w: any, h: any, alwaysBlend: any, evenCrd: any, forbidPrev: any): {
|
|
55
|
-
rect: {
|
|
56
|
-
x: number;
|
|
57
|
-
y: number;
|
|
58
|
-
width: any;
|
|
59
|
-
height: any;
|
|
60
|
-
};
|
|
61
|
-
img: Uint8Array;
|
|
62
|
-
blend: number;
|
|
63
|
-
dispose: number;
|
|
64
|
-
}[];
|
|
65
|
-
function _updateFrame(bufs: any, w: any, h: any, frms: any, i: any, r: any, evenCrd: any): void;
|
|
66
|
-
function _prepareDiff(cimg: any, w: any, h: any, nimg: any, rec: any): void;
|
|
67
|
-
function _filterZero(img: any, h: any, bpp: any, bpl: any, data: any, filter: any, levelZero: any): any;
|
|
68
|
-
function _filterLine(data: any, img: any, y: any, bpl: any, bpp: any, type: any): void;
|
|
69
|
-
function concatRGBA(bufs: any): ArrayBufferLike;
|
|
70
|
-
}
|
|
71
|
-
function encodeLL(bufs: any, w: any, h: any, cc: any, ac: any, depth: any, dels: any, tabs: any): ArrayBufferLike;
|
|
72
|
-
namespace crc {
|
|
73
|
-
export const table: Uint32Array;
|
|
74
|
-
export function update(c: any, buf: any, off: any, len: any): any;
|
|
75
|
-
export function crc_1(b: any, o: any, l: any): number;
|
|
76
|
-
export { crc_1 as crc };
|
|
77
|
-
}
|
|
78
|
-
function quantize(abuf: any, ps: any): {
|
|
79
|
-
abuf: ArrayBufferLike;
|
|
80
|
-
inds: Uint8Array;
|
|
81
|
-
plte: {
|
|
82
|
-
i0: number;
|
|
83
|
-
i1: any;
|
|
84
|
-
bst: null;
|
|
85
|
-
est: null;
|
|
86
|
-
tdst: number;
|
|
87
|
-
left: null;
|
|
88
|
-
right: null;
|
|
89
|
-
} | {
|
|
90
|
-
i0: number;
|
|
91
|
-
i1: any;
|
|
92
|
-
bst: null;
|
|
93
|
-
est: null;
|
|
94
|
-
tdst: number;
|
|
95
|
-
left: null;
|
|
96
|
-
right: null;
|
|
97
|
-
}[];
|
|
98
|
-
};
|
|
99
|
-
namespace quantize {
|
|
100
|
-
function getKDtree(nimg: any, ps: any, err: any): ({
|
|
101
|
-
i0: number;
|
|
102
|
-
i1: any;
|
|
103
|
-
bst: null;
|
|
104
|
-
est: null;
|
|
105
|
-
tdst: number;
|
|
106
|
-
left: null;
|
|
107
|
-
right: null;
|
|
108
|
-
} | {
|
|
109
|
-
i0: number;
|
|
110
|
-
i1: any;
|
|
111
|
-
bst: null;
|
|
112
|
-
est: null;
|
|
113
|
-
tdst: number;
|
|
114
|
-
left: null;
|
|
115
|
-
right: null;
|
|
116
|
-
}[])[];
|
|
117
|
-
function getNearest(nd: any, r: any, g: any, b: any, a: any): any;
|
|
118
|
-
function planeDst(est: any, r: any, g: any, b: any, a: any): number;
|
|
119
|
-
function dist(q: any, r: any, g: any, b: any, a: any): number;
|
|
120
|
-
function splitPixels(nimg: any, nimg32: any, i0: any, i1: any, e: any, eMq: any): any;
|
|
121
|
-
function vecDot(nimg: any, i: any, e: any): number;
|
|
122
|
-
function stats(nimg: any, i0: any, i1: any): {
|
|
123
|
-
R: number[];
|
|
124
|
-
m: number[];
|
|
125
|
-
N: number;
|
|
126
|
-
};
|
|
127
|
-
function estats(stats: any): {
|
|
128
|
-
Cov: number[];
|
|
129
|
-
q: number[];
|
|
130
|
-
e: number[];
|
|
131
|
-
L: number;
|
|
132
|
-
eMq255: number;
|
|
133
|
-
eMq: number;
|
|
134
|
-
rgba: number;
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
namespace M4 {
|
|
138
|
-
function multVec(m: any, v: any): number[];
|
|
139
|
-
function dot(x: any, y: any): number;
|
|
140
|
-
function sml(a: any, y: any): number[];
|
|
141
|
-
}
|
|
142
|
-
}
|
|
1
|
+
export default UPNG;
|
|
2
|
+
declare namespace UPNG {
|
|
3
|
+
function toRGBA8(out: any): ArrayBufferLike[];
|
|
4
|
+
namespace toRGBA8 {
|
|
5
|
+
function decodeImage(data: any, w: any, h: any, out: any): Uint8Array;
|
|
6
|
+
}
|
|
7
|
+
function decode(buff: any): {
|
|
8
|
+
tabs: {};
|
|
9
|
+
frames: never[];
|
|
10
|
+
};
|
|
11
|
+
namespace decode {
|
|
12
|
+
function _decompress(out: any, dd: any, w: any, h: any): any;
|
|
13
|
+
function _inflate(data: any, buff: any): any;
|
|
14
|
+
function _readInterlace(data: any, out: any): Uint8Array;
|
|
15
|
+
function _getBPP(out: any): number;
|
|
16
|
+
function _filterZero(data: any, out: any, off: any, w: any, h: any): any;
|
|
17
|
+
function _paeth(a: any, b: any, c: any): any;
|
|
18
|
+
function _IHDR(data: any, offset: any, out: any): void;
|
|
19
|
+
}
|
|
20
|
+
function inflateRaw(N: any, W: any): any;
|
|
21
|
+
namespace _bin {
|
|
22
|
+
function nextZero(data: any, p: any): any;
|
|
23
|
+
function readUshort(buff: any, p: any): number;
|
|
24
|
+
function writeUshort(buff: any, p: any, n: any): void;
|
|
25
|
+
function readUint(buff: any, p: any): number;
|
|
26
|
+
function writeUint(buff: any, p: any, n: any): void;
|
|
27
|
+
function readASCII(buff: any, p: any, l: any): string;
|
|
28
|
+
function writeASCII(data: any, p: any, s: any): void;
|
|
29
|
+
function readBytes(buff: any, p: any, l: any): any[];
|
|
30
|
+
function pad(n: any): any;
|
|
31
|
+
function readUTF8(buff: any, p: any, l: any): string;
|
|
32
|
+
}
|
|
33
|
+
function _copyTile(sb: any, sw: any, sh: any, tb: any, tw: any, th: any, xoff: any, yoff: any, mode: any): boolean;
|
|
34
|
+
function encode(bufs: any, w: any, h: any, ps: any, dels: any, tabs: any, forbidPlte: any): ArrayBufferLike;
|
|
35
|
+
namespace encode {
|
|
36
|
+
function _main(nimg: any, w: any, h: any, dels: any, tabs: any): ArrayBufferLike;
|
|
37
|
+
function compressPNG(out: any, filter: any, levelZero: any): void;
|
|
38
|
+
function compress(bufs: any, w: any, h: any, ps: any, prms: any): {
|
|
39
|
+
ctype: number;
|
|
40
|
+
depth: number;
|
|
41
|
+
plte: any[];
|
|
42
|
+
frames: {
|
|
43
|
+
rect: {
|
|
44
|
+
x: number;
|
|
45
|
+
y: number;
|
|
46
|
+
width: any;
|
|
47
|
+
height: any;
|
|
48
|
+
};
|
|
49
|
+
img: Uint8Array;
|
|
50
|
+
blend: number;
|
|
51
|
+
dispose: number;
|
|
52
|
+
}[];
|
|
53
|
+
};
|
|
54
|
+
function framize(bufs: any, w: any, h: any, alwaysBlend: any, evenCrd: any, forbidPrev: any): {
|
|
55
|
+
rect: {
|
|
56
|
+
x: number;
|
|
57
|
+
y: number;
|
|
58
|
+
width: any;
|
|
59
|
+
height: any;
|
|
60
|
+
};
|
|
61
|
+
img: Uint8Array;
|
|
62
|
+
blend: number;
|
|
63
|
+
dispose: number;
|
|
64
|
+
}[];
|
|
65
|
+
function _updateFrame(bufs: any, w: any, h: any, frms: any, i: any, r: any, evenCrd: any): void;
|
|
66
|
+
function _prepareDiff(cimg: any, w: any, h: any, nimg: any, rec: any): void;
|
|
67
|
+
function _filterZero(img: any, h: any, bpp: any, bpl: any, data: any, filter: any, levelZero: any): any;
|
|
68
|
+
function _filterLine(data: any, img: any, y: any, bpl: any, bpp: any, type: any): void;
|
|
69
|
+
function concatRGBA(bufs: any): ArrayBufferLike;
|
|
70
|
+
}
|
|
71
|
+
function encodeLL(bufs: any, w: any, h: any, cc: any, ac: any, depth: any, dels: any, tabs: any): ArrayBufferLike;
|
|
72
|
+
namespace crc {
|
|
73
|
+
export const table: Uint32Array;
|
|
74
|
+
export function update(c: any, buf: any, off: any, len: any): any;
|
|
75
|
+
export function crc_1(b: any, o: any, l: any): number;
|
|
76
|
+
export { crc_1 as crc };
|
|
77
|
+
}
|
|
78
|
+
function quantize(abuf: any, ps: any): {
|
|
79
|
+
abuf: ArrayBufferLike;
|
|
80
|
+
inds: Uint8Array;
|
|
81
|
+
plte: {
|
|
82
|
+
i0: number;
|
|
83
|
+
i1: any;
|
|
84
|
+
bst: null;
|
|
85
|
+
est: null;
|
|
86
|
+
tdst: number;
|
|
87
|
+
left: null;
|
|
88
|
+
right: null;
|
|
89
|
+
} | {
|
|
90
|
+
i0: number;
|
|
91
|
+
i1: any;
|
|
92
|
+
bst: null;
|
|
93
|
+
est: null;
|
|
94
|
+
tdst: number;
|
|
95
|
+
left: null;
|
|
96
|
+
right: null;
|
|
97
|
+
}[];
|
|
98
|
+
};
|
|
99
|
+
namespace quantize {
|
|
100
|
+
function getKDtree(nimg: any, ps: any, err: any): ({
|
|
101
|
+
i0: number;
|
|
102
|
+
i1: any;
|
|
103
|
+
bst: null;
|
|
104
|
+
est: null;
|
|
105
|
+
tdst: number;
|
|
106
|
+
left: null;
|
|
107
|
+
right: null;
|
|
108
|
+
} | {
|
|
109
|
+
i0: number;
|
|
110
|
+
i1: any;
|
|
111
|
+
bst: null;
|
|
112
|
+
est: null;
|
|
113
|
+
tdst: number;
|
|
114
|
+
left: null;
|
|
115
|
+
right: null;
|
|
116
|
+
}[])[];
|
|
117
|
+
function getNearest(nd: any, r: any, g: any, b: any, a: any): any;
|
|
118
|
+
function planeDst(est: any, r: any, g: any, b: any, a: any): number;
|
|
119
|
+
function dist(q: any, r: any, g: any, b: any, a: any): number;
|
|
120
|
+
function splitPixels(nimg: any, nimg32: any, i0: any, i1: any, e: any, eMq: any): any;
|
|
121
|
+
function vecDot(nimg: any, i: any, e: any): number;
|
|
122
|
+
function stats(nimg: any, i0: any, i1: any): {
|
|
123
|
+
R: number[];
|
|
124
|
+
m: number[];
|
|
125
|
+
N: number;
|
|
126
|
+
};
|
|
127
|
+
function estats(stats: any): {
|
|
128
|
+
Cov: number[];
|
|
129
|
+
q: number[];
|
|
130
|
+
e: number[];
|
|
131
|
+
L: number;
|
|
132
|
+
eMq255: number;
|
|
133
|
+
eMq: number;
|
|
134
|
+
rgba: number;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
namespace M4 {
|
|
138
|
+
function multVec(m: any, v: any): number[];
|
|
139
|
+
function dot(x: any, y: any): number;
|
|
140
|
+
function sml(a: any, y: any): number[];
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const fileToDataURL: (file: Blob | File) => Promise<any>;
|
|
2
|
-
export declare const dataURLToImage: (dataURL: string) => Promise<HTMLImageElement>;
|
|
3
|
-
export declare const canvastoFile: (canvas: HTMLCanvasElement, type: string, quality: number) => Promise<Blob | null>;
|
|
4
|
-
export declare const scaleWidthHeight: (img: HTMLImageElement) => {
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
};
|
|
8
|
-
export declare const convertQualityToBit: (quality: number) => number;
|
|
1
|
+
export declare const fileToDataURL: (file: Blob | File) => Promise<any>;
|
|
2
|
+
export declare const dataURLToImage: (dataURL: string) => Promise<HTMLImageElement>;
|
|
3
|
+
export declare const canvastoFile: (canvas: HTMLCanvasElement, type: string, quality: number) => Promise<Blob | null>;
|
|
4
|
+
export declare const scaleWidthHeight: (img: HTMLImageElement) => {
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const convertQualityToBit: (quality: number) => number;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 图片压缩方法
|
|
3
|
-
* @param {Object} file 图片文件
|
|
4
|
-
* @param {Nubmber} quality 压缩质量参数 0-1
|
|
5
|
-
* @param {limit} limit 最小限制大小,小于该值时不进行压缩, MB
|
|
6
|
-
* @returns 压缩后的新图片
|
|
7
|
-
*/
|
|
8
|
-
declare const compressionImage: (file: File, quality?: number, limit?: number) => Promise<File>;
|
|
9
|
-
export default compressionImage;
|
|
1
|
+
/**
|
|
2
|
+
* 图片压缩方法
|
|
3
|
+
* @param {Object} file 图片文件
|
|
4
|
+
* @param {Nubmber} quality 压缩质量参数 0-1
|
|
5
|
+
* @param {limit} limit 最小限制大小,小于该值时不进行压缩, MB
|
|
6
|
+
* @returns 压缩后的新图片
|
|
7
|
+
*/
|
|
8
|
+
declare const compressionImage: (file: File, quality?: number, limit?: number) => Promise<File>;
|
|
9
|
+
export default compressionImage;
|