reykit 1.0.255 → 1.0.257
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/index.js +18756 -18040
- package/dist/src/component/Badge.d.ts +2 -1
- package/dist/src/component/Base.d.ts +6 -5
- package/dist/src/component/Breadcrumb.d.ts +3 -2
- package/dist/src/component/Button.d.ts +3 -2
- package/dist/src/component/Form.d.ts +2 -1
- package/dist/src/component/Media.d.ts +14 -3
- package/dist/src/component/Notice.d.ts +2 -1
- package/dist/src/component/Table.d.ts +11 -10
- package/dist/src/component/Text.d.ts +3 -2
- package/dist/src/component/Toggle.d.ts +2 -1
- package/dist/src/component/index.d.ts +1 -1
- package/dist/src/component/ui/index.d.ts +2 -1
- package/dist/src/component/ui/video-player.d.ts +82 -0
- package/dist/src/lib/base.d.ts +6 -5
- package/dist/src/lib/captcha/index.d.ts +25 -5
- package/dist/src/lib/data.d.ts +9 -8
- package/dist/src/lib/image.d.ts +5 -4
- package/dist/src/lib/net.d.ts +2 -1
- package/dist/src/lib/rand.d.ts +2 -1
- package/dist/src/lib/re.d.ts +6 -5
- package/dist/src/lib/react.d.ts +13 -10
- package/dist/src/lib/text.d.ts +10 -9
- package/dist/src/lib/time.d.ts +2 -1
- package/dist/src/lib/twc.d.ts +2 -1
- package/dist/src/lib/window.d.ts +4 -3
- package/package.json +1 -1
- package/dist/src/lib/captcha/captcha.d.ts +0 -23
package/dist/src/lib/react.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { ReactNode, DependencyList } from 'react';
|
|
2
|
+
export { Listener, Listeners, renderReact, isReactNode, useOpen, useCount, useIndex, useRender, useIsMobile, useValueByMobile, useExec, createExternalState };
|
|
3
|
+
type Listener = () => void;
|
|
4
|
+
type Listeners = Set<Listener>;
|
|
2
5
|
/**
|
|
3
6
|
* Render react note.
|
|
4
7
|
* Note: `react` and `react-dom` packages version must be `19.2.4`.
|
|
@@ -6,14 +9,14 @@ import { ReactNode, DependencyList } from 'react';
|
|
|
6
9
|
* @param app - React note.
|
|
7
10
|
* @param elementId - Render HTML element ID.
|
|
8
11
|
*/
|
|
9
|
-
|
|
12
|
+
declare function renderReact(app: ReactNode, elementId?: string): void;
|
|
10
13
|
/**
|
|
11
14
|
* Is it a valid react node.
|
|
12
15
|
*
|
|
13
16
|
* @param value - Judgement value.
|
|
14
17
|
* @returns Judgement result.
|
|
15
18
|
*/
|
|
16
|
-
|
|
19
|
+
declare function isReactNode(value: unknown): value is ReactNode;
|
|
17
20
|
/**
|
|
18
21
|
* Hook of toggle.
|
|
19
22
|
*
|
|
@@ -21,7 +24,7 @@ export declare function isReactNode(value: unknown): value is ReactNode;
|
|
|
21
24
|
* @param loop - Whether to loop count.
|
|
22
25
|
* @returns Returns a stateful open value, and a function to automatic count it.
|
|
23
26
|
*/
|
|
24
|
-
|
|
27
|
+
declare function useOpen(defaultOpen?: boolean): [boolean, (open?: boolean) => void];
|
|
25
28
|
/**
|
|
26
29
|
* Hook of count number.
|
|
27
30
|
*
|
|
@@ -31,7 +34,7 @@ export declare function useOpen(defaultOpen?: boolean): [boolean, (open?: boolea
|
|
|
31
34
|
* @param loop - Whether to loop count.
|
|
32
35
|
* @returns Returns a stateful count value, and a function to automatic count it.
|
|
33
36
|
*/
|
|
34
|
-
|
|
37
|
+
declare function useCount(start?: number, step?: number, stop?: number, loop?: boolean): [number, () => void];
|
|
35
38
|
/**
|
|
36
39
|
* Hook of count array index.
|
|
37
40
|
*
|
|
@@ -39,17 +42,17 @@ export declare function useCount(start?: number, step?: number, stop?: number, l
|
|
|
39
42
|
* @param loop - Whether to loop count.
|
|
40
43
|
* @returns Returns a stateful index value, and a function to automatic count it.
|
|
41
44
|
*/
|
|
42
|
-
|
|
45
|
+
declare function useIndex(array: any[], loop?: boolean): [number, () => void];
|
|
43
46
|
/**
|
|
44
47
|
* Hook of force update render.
|
|
45
48
|
*/
|
|
46
|
-
|
|
49
|
+
declare function useRender(): () => void;
|
|
47
50
|
/**
|
|
48
51
|
* Hook of whether is mobile client.
|
|
49
52
|
*
|
|
50
53
|
* @returns Judgement.
|
|
51
54
|
*/
|
|
52
|
-
|
|
55
|
+
declare function useIsMobile(): boolean;
|
|
53
56
|
/**
|
|
54
57
|
* Hook of get value by client type.
|
|
55
58
|
*
|
|
@@ -57,7 +60,7 @@ export declare function useIsMobile(): boolean;
|
|
|
57
60
|
* @param value - Value of non mobile client.
|
|
58
61
|
* @returns Value.
|
|
59
62
|
*/
|
|
60
|
-
|
|
63
|
+
declare function useValueByMobile<Value, MobileValue>(mobileValue: MobileValue, value: Value): Value | MobileValue;
|
|
61
64
|
/**
|
|
62
65
|
* Hook of execute after rendering or effecting.
|
|
63
66
|
*
|
|
@@ -65,11 +68,11 @@ export declare function useValueByMobile<Value, MobileValue>(mobileValue: Mobile
|
|
|
65
68
|
* @param deps - Effect dependency list.
|
|
66
69
|
* @param args - Execute arguments.
|
|
67
70
|
*/
|
|
68
|
-
|
|
71
|
+
declare function useExec<T extends any[]>(func: (...args: T) => any | Promise<any>, deps?: DependencyList, args?: T): void;
|
|
69
72
|
/**
|
|
70
73
|
* Get state value that can be updated externally.
|
|
71
74
|
*
|
|
72
75
|
* @param initialValue - Initial state value.
|
|
73
76
|
* @returns Get state value hook function and set state value general function.
|
|
74
77
|
*/
|
|
75
|
-
|
|
78
|
+
declare function createExternalState<State>(initialValue: State): [() => State, (newValue: State) => void];
|
package/dist/src/lib/text.d.ts
CHANGED
|
@@ -4,12 +4,13 @@
|
|
|
4
4
|
* @Contact : reyxbo@163.com
|
|
5
5
|
* @Explain : Text processing module.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
export { whitespace, asciiLowercase, asciiUppercase, asciiLetters, digits, hexdigits, octdigits, punctuation, printable };
|
|
8
|
+
declare const whitespace = " \t\n\r\v\f";
|
|
9
|
+
declare const asciiLowercase = "abcdefghijklmnopqrstuvwxyz";
|
|
10
|
+
declare const asciiUppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
|
11
|
+
declare const asciiLetters: string;
|
|
12
|
+
declare const digits = "0123456789";
|
|
13
|
+
declare const hexdigits: string;
|
|
14
|
+
declare const octdigits = "01234567";
|
|
15
|
+
declare const punctuation = "!\"#$%&'()*+,-./:;<=>?@[]^_`{|}~";
|
|
16
|
+
declare const printable: string;
|
package/dist/src/lib/time.d.ts
CHANGED
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
* @Contact : reyxbo@163.com
|
|
5
5
|
* @Explain : Time processing module.
|
|
6
6
|
*/
|
|
7
|
+
export { datetimeLocal };
|
|
7
8
|
/**
|
|
8
9
|
* Return local date time string.
|
|
9
10
|
*
|
|
10
11
|
* @returns Local date time string.
|
|
11
12
|
*/
|
|
12
|
-
|
|
13
|
+
declare function datetimeLocal(): string;
|
package/dist/src/lib/twc.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ClassValue } from 'clsx';
|
|
2
|
+
export { cn };
|
|
2
3
|
/**
|
|
3
4
|
* Merge TailwindCSS class style string array.
|
|
4
5
|
*
|
|
5
6
|
* @param inputs - TailwindCSS class style string array.
|
|
6
7
|
* @returns Merged string.
|
|
7
8
|
*/
|
|
8
|
-
|
|
9
|
+
declare function cn(...inputs: ClassValue[]): string;
|
package/dist/src/lib/window.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Key, Value, KeyByValue } from '../lib/base';
|
|
2
|
+
export { Storager, openFile, downloadFile };
|
|
2
3
|
/**
|
|
3
4
|
* Manage local storage data.
|
|
4
5
|
*/
|
|
5
|
-
|
|
6
|
+
declare class Storager<Data extends Record<string, any>> {
|
|
6
7
|
name: string;
|
|
7
8
|
/**
|
|
8
9
|
* Build instance.
|
|
@@ -70,11 +71,11 @@ export declare class Storager<Data extends Record<string, any>> {
|
|
|
70
71
|
*
|
|
71
72
|
* @param obj - Data or URL of with data.
|
|
72
73
|
*/
|
|
73
|
-
|
|
74
|
+
declare function openFile(obj: Blob | string): void;
|
|
74
75
|
/**
|
|
75
76
|
* Browser download file from blob data.
|
|
76
77
|
*
|
|
77
78
|
* @param obj - Data or URL of with data.
|
|
78
79
|
* @param fileName - File name.
|
|
79
80
|
*/
|
|
80
|
-
|
|
81
|
+
declare function downloadFile(obj: Blob | string, fileName: string): void;
|
package/package.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
type AliGraphCaptchaOnErrorArg = {
|
|
2
|
-
code: string;
|
|
3
|
-
msg: string;
|
|
4
|
-
desc: {
|
|
5
|
-
detail: string;
|
|
6
|
-
};
|
|
7
|
-
};
|
|
8
|
-
type AliGraphCaptchaOnError = (error: AliGraphCaptchaOnErrorArg) => void;
|
|
9
|
-
/**
|
|
10
|
-
* Initialize Ali graph captcha.
|
|
11
|
-
*
|
|
12
|
-
* @param appId: Account APP ID.
|
|
13
|
-
* @param onError: Callback function of error.
|
|
14
|
-
*/
|
|
15
|
-
export declare function initAliGraphCaptcha(appId: string, onError?: AliGraphCaptchaOnError | null): void;
|
|
16
|
-
/**
|
|
17
|
-
* Use Ali graph captcha.
|
|
18
|
-
*
|
|
19
|
-
* @param fn - Execution function after verification.
|
|
20
|
-
* @param args - Execution function arguments.
|
|
21
|
-
*/
|
|
22
|
-
export declare function verifyAliGraphCaptcha<T, Args extends any[]>(fn: (...args: Args) => T | Promise<T>, ...args: Args): void;
|
|
23
|
-
export {};
|