reykit 1.0.48 → 1.0.49
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/{type.d.ts → base.d.ts} +6 -0
- package/dist/components/Form.d.ts +1 -1
- package/dist/components/index.d.ts +9 -0
- package/dist/index.d.ts +20 -21
- package/dist/index.js +785 -759
- package/dist/{request.d.ts → net.d.ts} +7 -1
- package/dist/re.d.ts +11 -0
- package/dist/react.d.ts +32 -0
- package/dist/{storage.d.ts → window.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/hook.d.ts +0 -32
- package/dist/index.css +0 -1
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @Time : 2026-03-11
|
|
3
|
+
* @Author : Rey
|
|
4
|
+
* @Contact : reyxbo@163.com
|
|
5
|
+
* @Explain : Network methods.
|
|
6
|
+
*/
|
|
1
7
|
/**
|
|
2
8
|
* Send request.
|
|
3
9
|
*
|
|
@@ -14,7 +20,7 @@
|
|
|
14
20
|
* @param option.method - Request method.
|
|
15
21
|
* - `undefined` : Automatic judge. When parameter `data` not has value, then is `get`, otherwise is `post`.
|
|
16
22
|
*/
|
|
17
|
-
export
|
|
23
|
+
export declare function request(url: string, { params, body, headers, method }: {
|
|
18
24
|
params?: Record<string, string | number | boolean>;
|
|
19
25
|
body?: URLSearchParams | File | FormData | Blob | Record<string, any> | string;
|
|
20
26
|
headers?: Record<string, string | number | boolean>;
|
package/dist/re.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @Time : 2026-03-11
|
|
3
|
+
* @Author : Rey
|
|
4
|
+
* @Contact : reyxbo@163.com
|
|
5
|
+
* @Explain : Regular expression methods.
|
|
6
|
+
*/
|
|
7
|
+
export declare const PATTERN_IP = "^((25[0-5]|2[0-4]d|1dd|[1-9]?d).){3}(25[0-5]|2[0-4]d|1dd|[1-9]?d)$";
|
|
8
|
+
export declare const PATTERN_URL = "^https?://[^s/$.?#].[^s]*$";
|
|
9
|
+
export declare const PATTERN_EMAIL = "^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+.[A-Za-z]{2,}$";
|
|
10
|
+
export declare const PATTERN_PHONE = "^1[3-9]d{9}$";
|
|
11
|
+
export declare const PATTERN_CN = "^[\u4E00-\u9FA5]+$";
|
package/dist/react.d.ts
CHANGED
|
@@ -6,3 +6,35 @@ import { ReactNode } from 'react';
|
|
|
6
6
|
* @param elementId - Render HTML element ID.
|
|
7
7
|
*/
|
|
8
8
|
export declare function renderReact(app: ReactNode, elementId?: string): void;
|
|
9
|
+
/**
|
|
10
|
+
* Hook of toggle.
|
|
11
|
+
*
|
|
12
|
+
* @param array - Array.
|
|
13
|
+
* @param loop - Whether to loop count.
|
|
14
|
+
* @returns Returns a stateful open value, and a function to automatic count it.
|
|
15
|
+
*/
|
|
16
|
+
export declare function useOpen(defaultOpen?: boolean): [boolean, () => void];
|
|
17
|
+
/**
|
|
18
|
+
* Hook of count number.
|
|
19
|
+
*
|
|
20
|
+
* @param start - Start number.
|
|
21
|
+
* @param step - Count step.
|
|
22
|
+
* @param stop - Stop number.
|
|
23
|
+
* @param loop - Whether to loop count.
|
|
24
|
+
* @returns Returns a stateful count value, and a function to automatic count it.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useCount(start?: number, step?: number, stop?: number, loop?: boolean): [number, () => void];
|
|
27
|
+
/**
|
|
28
|
+
* Hook of count array index.
|
|
29
|
+
*
|
|
30
|
+
* @param array - Array.
|
|
31
|
+
* @param loop - Whether to loop count.
|
|
32
|
+
* @returns Returns a stateful index value, and a function to automatic count it.
|
|
33
|
+
*/
|
|
34
|
+
export declare function useIndex(array: any[], loop?: boolean): [number, () => void];
|
|
35
|
+
/**
|
|
36
|
+
* Whether is mobile.
|
|
37
|
+
*
|
|
38
|
+
* @returns Judgement.
|
|
39
|
+
*/
|
|
40
|
+
export declare function useIsMobile(): boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Key, Value, KeyByValue } from './
|
|
1
|
+
import { Key, Value, KeyByValue } from './base';
|
|
2
2
|
/**
|
|
3
3
|
* Manage local storage data.
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export declare class Storager<Data extends Record<string, any>> {
|
|
6
6
|
name: string;
|
|
7
7
|
/**
|
|
8
8
|
* Build instance.
|
package/package.json
CHANGED
package/dist/hook.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hook of toggle.
|
|
3
|
-
*
|
|
4
|
-
* @param array - Array.
|
|
5
|
-
* @param loop - Whether to loop count.
|
|
6
|
-
* @returns Returns a stateful open value, and a function to automatic count it.
|
|
7
|
-
*/
|
|
8
|
-
export declare function useOpen(defaultOpen?: boolean): [boolean, () => void];
|
|
9
|
-
/**
|
|
10
|
-
* Hook of count number.
|
|
11
|
-
*
|
|
12
|
-
* @param start - Start number.
|
|
13
|
-
* @param step - Count step.
|
|
14
|
-
* @param stop - Stop number.
|
|
15
|
-
* @param loop - Whether to loop count.
|
|
16
|
-
* @returns Returns a stateful count value, and a function to automatic count it.
|
|
17
|
-
*/
|
|
18
|
-
export declare function useCount(start?: number, step?: number, stop?: number, loop?: boolean): [number, () => void];
|
|
19
|
-
/**
|
|
20
|
-
* Hook of count array index.
|
|
21
|
-
*
|
|
22
|
-
* @param array - Array.
|
|
23
|
-
* @param loop - Whether to loop count.
|
|
24
|
-
* @returns Returns a stateful index value, and a function to automatic count it.
|
|
25
|
-
*/
|
|
26
|
-
export declare function useIndex(array: any[], loop?: boolean): [number, () => void];
|
|
27
|
-
/**
|
|
28
|
-
* Whether is mobile.
|
|
29
|
-
*
|
|
30
|
-
* @returns Judgement.
|
|
31
|
-
*/
|
|
32
|
-
export declare function useIsMobile(): boolean;
|