@vef-framework/shared 1.0.135 → 2.0.1
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/README +15 -0
- package/dist/cjs/color/color-ops.cjs +76 -0
- package/dist/cjs/color/index.cjs +24 -0
- package/dist/cjs/color/name.cjs +49 -0
- package/dist/cjs/color/palette.cjs +126 -0
- package/dist/cjs/constants/color-names.cjs +1580 -0
- package/dist/cjs/constants/color-palettes.cjs +372 -0
- package/dist/cjs/constants/index.cjs +14 -0
- package/dist/cjs/index.cjs +339 -0
- package/dist/cjs/types/color.cjs +3 -0
- package/dist/cjs/types/common.cjs +3 -0
- package/dist/cjs/types/deep-keys.cjs +3 -0
- package/dist/cjs/types/index.cjs +7 -0
- package/dist/cjs/utils/chrono.cjs +139 -0
- package/dist/cjs/utils/equal.cjs +175 -0
- package/dist/cjs/utils/error.cjs +60 -0
- package/dist/cjs/utils/event.cjs +62 -0
- package/dist/cjs/utils/format.cjs +31 -0
- package/dist/cjs/utils/function.cjs +49 -0
- package/dist/cjs/utils/id.cjs +38 -0
- package/dist/cjs/utils/index.cjs +86 -0
- package/dist/cjs/utils/key.cjs +34 -0
- package/dist/cjs/utils/lib.cjs +234 -0
- package/dist/cjs/utils/object.cjs +20 -0
- package/dist/cjs/utils/path.cjs +63 -0
- package/dist/cjs/utils/pinyin.cjs +53 -0
- package/dist/cjs/utils/security.cjs +44 -0
- package/dist/cjs/utils/string.cjs +13 -0
- package/dist/cjs/utils/task.cjs +17 -0
- package/dist/cjs/utils/tree.cjs +262 -0
- package/dist/cjs/utils/zod.cjs +14 -0
- package/dist/es/color/color-ops.js +62 -0
- package/dist/es/color/index.js +4 -0
- package/dist/es/color/name.js +45 -0
- package/dist/es/color/palette.js +122 -0
- package/dist/es/constants/color-names.js +1575 -0
- package/dist/es/constants/color-palettes.js +367 -0
- package/dist/es/constants/index.js +3 -0
- package/dist/es/index.js +30 -0
- package/dist/es/types/color.js +1 -0
- package/dist/es/types/common.js +1 -0
- package/dist/es/types/deep-keys.js +1 -0
- package/dist/es/types/index.js +4 -0
- package/dist/es/utils/chrono.js +121 -0
- package/dist/es/utils/equal.js +170 -0
- package/dist/es/utils/error.js +33 -0
- package/dist/es/utils/event.js +57 -0
- package/dist/es/utils/format.js +26 -0
- package/dist/es/utils/function.js +41 -0
- package/dist/es/utils/id.js +34 -0
- package/dist/es/utils/index.js +18 -0
- package/dist/es/utils/key.js +30 -0
- package/dist/es/utils/lib.js +10 -0
- package/dist/es/utils/object.js +16 -0
- package/dist/es/utils/path.js +49 -0
- package/dist/es/utils/pinyin.js +47 -0
- package/dist/es/utils/security.js +39 -0
- package/dist/es/utils/string.js +9 -0
- package/dist/es/utils/task.js +13 -0
- package/dist/es/utils/tree.js +252 -0
- package/dist/es/utils/zod.js +6 -0
- package/dist/types/color/color-ops.d.ts +84 -0
- package/dist/types/color/index.d.ts +3 -0
- package/dist/types/color/name.d.ts +7 -0
- package/dist/types/color/palette.d.ts +8 -0
- package/dist/types/constants/color-names.d.ts +11 -0
- package/dist/types/constants/color-palettes.d.ts +823 -0
- package/dist/types/constants/index.d.ts +2 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/types/color.d.ts +73 -0
- package/dist/types/types/common.d.ts +25 -0
- package/dist/types/types/deep-keys.d.ts +9 -0
- package/dist/types/types/index.d.ts +3 -0
- package/dist/types/utils/chrono.d.ts +162 -0
- package/dist/types/utils/equal.d.ts +16 -0
- package/dist/types/utils/error.d.ts +38 -0
- package/dist/types/utils/event.d.ts +68 -0
- package/dist/types/utils/format.d.ts +33 -0
- package/dist/types/utils/function.d.ts +59 -0
- package/{types → dist/types/utils}/id.d.ts +2 -2
- package/dist/types/utils/index.d.ts +17 -0
- package/dist/types/utils/key.d.ts +7 -0
- package/dist/types/utils/lib.d.ts +5 -0
- package/dist/types/utils/object.d.ts +9 -0
- package/dist/types/utils/path.d.ts +76 -0
- package/dist/types/utils/pinyin.d.ts +41 -0
- package/dist/types/utils/security.d.ts +18 -0
- package/dist/types/utils/string.d.ts +7 -0
- package/dist/types/utils/task.d.ts +6 -0
- package/dist/types/utils/tree.d.ts +208 -0
- package/dist/types/utils/zod.d.ts +1 -0
- package/package.json +58 -57
- package/README.md +0 -25
- package/cjs/color.cjs +0 -2
- package/cjs/constants.cjs +0 -2
- package/cjs/context.cjs +0 -2
- package/cjs/dom.cjs +0 -2
- package/cjs/error.cjs +0 -2
- package/cjs/event.cjs +0 -2
- package/cjs/expression.cjs +0 -2
- package/cjs/function.cjs +0 -2
- package/cjs/id.cjs +0 -2
- package/cjs/index.cjs +0 -2
- package/cjs/json.cjs +0 -2
- package/cjs/module.cjs +0 -2
- package/cjs/path.cjs +0 -2
- package/cjs/pinyin.cjs +0 -2
- package/cjs/security.cjs +0 -2
- package/cjs/store.cjs +0 -2
- package/cjs/styles.cjs +0 -2
- package/cjs/temporal.cjs +0 -2
- package/cjs/theme-variables.cjs +0 -2
- package/cjs/types.cjs +0 -2
- package/cjs/utils.cjs +0 -2
- package/cjs/validation.cjs +0 -2
- package/cjs/yaml.cjs +0 -2
- package/cjs/zod.cjs +0 -2
- package/esm/color.js +0 -2
- package/esm/constants.js +0 -2
- package/esm/context.js +0 -2
- package/esm/dom.js +0 -2
- package/esm/error.js +0 -2
- package/esm/event.js +0 -2
- package/esm/expression.js +0 -2
- package/esm/function.js +0 -2
- package/esm/id.js +0 -2
- package/esm/index.js +0 -2
- package/esm/json.js +0 -2
- package/esm/module.js +0 -2
- package/esm/path.js +0 -2
- package/esm/pinyin.js +0 -2
- package/esm/security.js +0 -2
- package/esm/store.js +0 -2
- package/esm/styles.js +0 -2
- package/esm/temporal.js +0 -2
- package/esm/theme-variables.js +0 -2
- package/esm/types.js +0 -2
- package/esm/utils.js +0 -2
- package/esm/validation.js +0 -2
- package/esm/yaml.js +0 -2
- package/esm/zod.js +0 -2
- package/types/color.d.ts +0 -7
- package/types/constants.d.ts +0 -28
- package/types/context.d.ts +0 -21
- package/types/dom.d.ts +0 -9
- package/types/error.d.ts +0 -16
- package/types/event.d.ts +0 -6
- package/types/expression.d.ts +0 -23
- package/types/function.d.ts +0 -8
- package/types/index.d.ts +0 -23
- package/types/json.d.ts +0 -7
- package/types/module.d.ts +0 -7
- package/types/path.d.ts +0 -43
- package/types/pinyin.d.ts +0 -14
- package/types/security.d.ts +0 -16
- package/types/store.d.ts +0 -78
- package/types/styles.d.ts +0 -21
- package/types/temporal.d.ts +0 -18
- package/types/theme-variables.d.ts +0 -348
- package/types/types.d.ts +0 -905
- package/types/utils.d.ts +0 -77
- package/types/validation.d.ts +0 -38
- package/types/yaml.d.ts +0 -7
- package/types/zod.d.ts +0 -6
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AnyObject, If, IsOptionalKeyOf, IsRequiredKeyOf, IsString, Prettify } from '../types';
|
|
2
|
+
export type WithPinyin<T extends AnyObject, K extends keyof T & string> = Prettify<WithPinyinInternal<T, K>>;
|
|
3
|
+
type WithPinyinInternal<T extends AnyObject, K extends keyof T & string> = T & {
|
|
4
|
+
[Key in K as If<IsRequiredKeyOf<T, Key>, If<IsString<T[Key]>, `${Key}Pinyin`, never>, never>]: string;
|
|
5
|
+
} & {
|
|
6
|
+
[Key in K as If<IsRequiredKeyOf<T, Key>, If<IsString<T[Key]>, `${Key}PinyinInitials`, never>, never>]: string;
|
|
7
|
+
} & {
|
|
8
|
+
[Key in K as If<IsOptionalKeyOf<T, Key>, If<IsString<T[Key]>, `${Key}Pinyin`, never>, never>]?: string;
|
|
9
|
+
} & {
|
|
10
|
+
[Key in K as If<IsOptionalKeyOf<T, Key>, If<IsString<T[Key]>, `${Key}PinyinInitials`, never>, never>]?: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Get the pinyin representation of Chinese text
|
|
14
|
+
*
|
|
15
|
+
* @param text - The Chinese text to convert
|
|
16
|
+
* @returns Array of pinyin strings for each character
|
|
17
|
+
*/
|
|
18
|
+
export declare function getPinyin(text: string): string[];
|
|
19
|
+
/**
|
|
20
|
+
* Get the initial letters (first letters) of pinyin for Chinese text
|
|
21
|
+
*
|
|
22
|
+
* @param text - The Chinese text to convert
|
|
23
|
+
* @returns Array of initial letters for each character
|
|
24
|
+
*/
|
|
25
|
+
export declare function getPinyinInitials(text: string): string[];
|
|
26
|
+
/**
|
|
27
|
+
* Add pinyin fields to an object for specified string keys
|
|
28
|
+
*
|
|
29
|
+
* @param obj - The source object
|
|
30
|
+
* @param keys - The keys to add pinyin fields for
|
|
31
|
+
* @returns A new object with additional pinyin and pinyin initials fields
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const user = { name: "张三", age: 25 };
|
|
36
|
+
* const result = withPinyin(user, "name");
|
|
37
|
+
* // result: { name: "张三", age: 25, namePinyin: "zhangsan", namePinyinInitials: "zs" }
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare function withPinyin<T extends AnyObject, K extends keyof T & string>(obj: T, ...keys: K[]): WithPinyin<T, K>;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encrypts a given value using RSA encryption with the given public key.
|
|
3
|
+
*
|
|
4
|
+
* @param value The value to encrypt
|
|
5
|
+
* @param publicKey The public key to use for encryption
|
|
6
|
+
* @returns The encrypted value
|
|
7
|
+
* @throws If the encryption fails
|
|
8
|
+
*/
|
|
9
|
+
export declare function encryptUsingRSA(value: string, publicKey: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Decrypts a given value using RSA encryption with the given private key.
|
|
12
|
+
*
|
|
13
|
+
* @param value The value to decrypt
|
|
14
|
+
* @param privateKey The private key to use for decryption
|
|
15
|
+
* @returns The decrypted value
|
|
16
|
+
* @throws If the decryption fails
|
|
17
|
+
*/
|
|
18
|
+
export declare function decryptUsingRSA(value: string, privateKey: string): string;
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { AnyObject, Except, MaybeUndefined, SetRequired } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Options for flattening tree data
|
|
4
|
+
*/
|
|
5
|
+
export interface FlattenTreeOptions<TNode extends AnyObject = AnyObject, TTransformedNode = FlattenedNode<TNode>> {
|
|
6
|
+
/**
|
|
7
|
+
* The key name for children property
|
|
8
|
+
* @default 'children'
|
|
9
|
+
*/
|
|
10
|
+
childrenKey?: keyof TNode;
|
|
11
|
+
/**
|
|
12
|
+
* Whether to include parent node reference
|
|
13
|
+
* @default false
|
|
14
|
+
*/
|
|
15
|
+
includeParent?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Whether to include level information
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
includeLevel?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Transform function to convert or filter nodes during flattening
|
|
23
|
+
*/
|
|
24
|
+
transform?: (node: TNode, context: {
|
|
25
|
+
parent?: TNode;
|
|
26
|
+
level: number;
|
|
27
|
+
}) => TTransformedNode;
|
|
28
|
+
/**
|
|
29
|
+
* Filter function to skip nodes (will still traverse children)
|
|
30
|
+
*/
|
|
31
|
+
filter?: (node: TNode, context: {
|
|
32
|
+
parent?: TNode;
|
|
33
|
+
level: number;
|
|
34
|
+
}) => boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Flattened node data (used when transform is not provided)
|
|
38
|
+
*/
|
|
39
|
+
export interface FlattenedNode<TNode extends AnyObject = AnyObject> {
|
|
40
|
+
/**
|
|
41
|
+
* Original node data
|
|
42
|
+
*/
|
|
43
|
+
data: TNode;
|
|
44
|
+
/**
|
|
45
|
+
* Parent node (only exists when includeParent is true)
|
|
46
|
+
*/
|
|
47
|
+
parent?: TNode;
|
|
48
|
+
/**
|
|
49
|
+
* Level depth, starting from 0 (only exists when includeLevel is true)
|
|
50
|
+
*/
|
|
51
|
+
level?: number;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Flatten tree data into a one-dimensional array
|
|
55
|
+
*
|
|
56
|
+
* @param tree - Tree data array
|
|
57
|
+
* @param options - Configuration options
|
|
58
|
+
* @returns Flattened array
|
|
59
|
+
*/
|
|
60
|
+
export declare function flattenTree<TNode extends AnyObject = AnyObject, TTransformedNode = FlattenedNode<NoInfer<TNode>>>(tree: TNode[], options: SetRequired<FlattenTreeOptions<NoInfer<TNode>, TTransformedNode>, "includeParent"> | SetRequired<FlattenTreeOptions<NoInfer<TNode>, TTransformedNode>, "includeLevel">): Array<NoInfer<TTransformedNode>>;
|
|
61
|
+
/**
|
|
62
|
+
* Flatten tree data into a one-dimensional array
|
|
63
|
+
*
|
|
64
|
+
* @param tree - Tree data array
|
|
65
|
+
* @param options - Configuration options
|
|
66
|
+
* @returns Flattened array
|
|
67
|
+
*/
|
|
68
|
+
export declare function flattenTree<TNode extends AnyObject = AnyObject, TTransformedNode = NoInfer<TNode>>(tree: TNode[], options?: Except<FlattenTreeOptions<NoInfer<TNode>, TTransformedNode>, "includeParent" | "includeLevel">): Array<NoInfer<TTransformedNode>>;
|
|
69
|
+
/**
|
|
70
|
+
* Key accessor - can be a property name or a getter function
|
|
71
|
+
*/
|
|
72
|
+
export type KeyAccessor<T extends AnyObject> = keyof T | ((node: T) => unknown);
|
|
73
|
+
/**
|
|
74
|
+
* Options for building tree from flat array
|
|
75
|
+
*/
|
|
76
|
+
export interface BuildTreeOptions<TNode extends AnyObject = AnyObject, TTransformedNode extends AnyObject = TNode, TChildrenKey extends string = "children"> {
|
|
77
|
+
/**
|
|
78
|
+
* Accessor for node id
|
|
79
|
+
* Can be a property name or a getter function
|
|
80
|
+
* @default 'id'
|
|
81
|
+
*/
|
|
82
|
+
idKey?: KeyAccessor<TNode>;
|
|
83
|
+
/**
|
|
84
|
+
* Accessor for parent id
|
|
85
|
+
* Can be a property name or a getter function
|
|
86
|
+
* @default 'parentId'
|
|
87
|
+
*/
|
|
88
|
+
parentIdKey?: KeyAccessor<TNode>;
|
|
89
|
+
/**
|
|
90
|
+
* The key name for children property
|
|
91
|
+
* @default 'children'
|
|
92
|
+
*/
|
|
93
|
+
childrenKey?: TChildrenKey;
|
|
94
|
+
/**
|
|
95
|
+
* Root node condition
|
|
96
|
+
* Can be a value to match against parentId, or a function to determine if a node is root
|
|
97
|
+
*/
|
|
98
|
+
rootValue?: TNode[keyof TNode] | ((node: TNode) => boolean);
|
|
99
|
+
/**
|
|
100
|
+
* Transform function to convert nodes during building
|
|
101
|
+
*/
|
|
102
|
+
transform?: (node: TNode, context: {
|
|
103
|
+
children?: TNode[];
|
|
104
|
+
level: number;
|
|
105
|
+
}) => TTransformedNode;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Result node type for buildTree
|
|
109
|
+
*/
|
|
110
|
+
export type BuildTreeResultNode<TNode extends AnyObject, TChildrenKey extends string> = TNode & {
|
|
111
|
+
[Key in TChildrenKey]?: Array<BuildTreeResultNode<TNode, TChildrenKey>>;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Build tree structure from flat array
|
|
115
|
+
*
|
|
116
|
+
* @param nodes - Flat array of items
|
|
117
|
+
* @param options - Configuration options
|
|
118
|
+
* @returns Tree structure array
|
|
119
|
+
*/
|
|
120
|
+
export declare function buildTree<TNode extends AnyObject = AnyObject, TTransformedNode extends AnyObject = NoInfer<TNode>, const TChildrenKey extends string = "children">(nodes: TNode[], options?: BuildTreeOptions<NoInfer<TNode>, TTransformedNode, TChildrenKey>): Array<BuildTreeResultNode<TTransformedNode, TChildrenKey>>;
|
|
121
|
+
/**
|
|
122
|
+
* Find a node in tree data
|
|
123
|
+
*
|
|
124
|
+
* @param tree - Tree data array
|
|
125
|
+
* @param predicate - Predicate function to find the node
|
|
126
|
+
* @param childrenKey - The key name for children property
|
|
127
|
+
* @returns Found node, or undefined if not found
|
|
128
|
+
*/
|
|
129
|
+
export declare function findNodeInTree<TNode extends AnyObject = AnyObject>(tree: TNode[], predicate: (node: NoInfer<TNode>, context: {
|
|
130
|
+
parent?: NoInfer<TNode>;
|
|
131
|
+
level: number;
|
|
132
|
+
}) => boolean, childrenKey?: keyof NoInfer<TNode>): MaybeUndefined<NoInfer<TNode>>;
|
|
133
|
+
/**
|
|
134
|
+
* Options for traversing tree data
|
|
135
|
+
*/
|
|
136
|
+
export interface TraverseTreeOptions<TNode extends AnyObject> {
|
|
137
|
+
/**
|
|
138
|
+
* Traversal strategy
|
|
139
|
+
* - 'dfs': Depth-First Search - visit nodes depth-wise (parent -> children -> siblings)
|
|
140
|
+
* - 'bfs': Breadth-First Search - visit nodes level-wise (all nodes at level N before level N+1)
|
|
141
|
+
* @default 'dfs'
|
|
142
|
+
*/
|
|
143
|
+
strategy?: "dfs" | "bfs";
|
|
144
|
+
/**
|
|
145
|
+
* The key name for children property
|
|
146
|
+
* @default 'children'
|
|
147
|
+
*/
|
|
148
|
+
childrenKey?: keyof TNode;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Traverse tree data with depth-first or breadth-first strategy
|
|
152
|
+
*
|
|
153
|
+
* @param tree - Tree data array
|
|
154
|
+
* @param callback - Callback function for each node
|
|
155
|
+
* @param options - Traversal options or children key string (for backward compatibility)
|
|
156
|
+
*/
|
|
157
|
+
export declare function traverseTree<TNode extends AnyObject = AnyObject>(tree: TNode[], callback: (node: NoInfer<TNode>, context: {
|
|
158
|
+
parent?: NoInfer<TNode>;
|
|
159
|
+
level: number;
|
|
160
|
+
index: number;
|
|
161
|
+
}) => void, options?: TraverseTreeOptions<NoInfer<TNode>>): void;
|
|
162
|
+
/**
|
|
163
|
+
* Map tree data
|
|
164
|
+
*
|
|
165
|
+
* @param tree - Tree data array
|
|
166
|
+
* @param callback - Mapping callback function
|
|
167
|
+
* @param childrenKey - The key name for children property
|
|
168
|
+
* @returns Mapped tree data
|
|
169
|
+
*/
|
|
170
|
+
export declare function mapTree<TNode extends AnyObject = AnyObject, TMappedNode extends AnyObject = AnyObject>(tree: TNode[], callback: (node: NoInfer<TNode>, context: {
|
|
171
|
+
parent?: NoInfer<TNode>;
|
|
172
|
+
level: number;
|
|
173
|
+
index: number;
|
|
174
|
+
}) => TMappedNode, childrenKey?: keyof NoInfer<TNode>): Array<NoInfer<TMappedNode>>;
|
|
175
|
+
/**
|
|
176
|
+
* Filter tree data
|
|
177
|
+
*
|
|
178
|
+
* @param tree - Tree data array
|
|
179
|
+
* @param predicate - Filter predicate function
|
|
180
|
+
* @param childrenKey - The key name for children property
|
|
181
|
+
* @returns Filtered tree data
|
|
182
|
+
*/
|
|
183
|
+
export declare function filterTree<TNode extends AnyObject = AnyObject>(tree: TNode[], predicate: (node: NoInfer<TNode>, context: {
|
|
184
|
+
parent?: NoInfer<TNode>;
|
|
185
|
+
level: number;
|
|
186
|
+
index: number;
|
|
187
|
+
}) => boolean, childrenKey?: keyof NoInfer<TNode>): Array<NoInfer<TNode>>;
|
|
188
|
+
/**
|
|
189
|
+
* Filter tree data while preserving ancestor nodes
|
|
190
|
+
*
|
|
191
|
+
* Unlike filterTree, this function keeps all ancestor nodes of matching nodes,
|
|
192
|
+
* even if the ancestors themselves don't match the predicate.
|
|
193
|
+
* This is useful for search/filter scenarios where you want to show the full path to matching nodes.
|
|
194
|
+
*
|
|
195
|
+
* Key behavior:
|
|
196
|
+
* - Non-matching nodes are kept only if they have matching descendants
|
|
197
|
+
* - If a matching node has no matching children, its children are removed
|
|
198
|
+
*
|
|
199
|
+
* @param tree - Tree data array
|
|
200
|
+
* @param predicate - Filter predicate function
|
|
201
|
+
* @param childrenKey - The key name for children property
|
|
202
|
+
* @returns Filtered tree data with preserved ancestor paths
|
|
203
|
+
*/
|
|
204
|
+
export declare function filterTreeWithAncestors<TNode extends AnyObject = AnyObject>(tree: TNode[], predicate: (node: NoInfer<TNode>, context: {
|
|
205
|
+
parent?: NoInfer<TNode>;
|
|
206
|
+
level: number;
|
|
207
|
+
index: number;
|
|
208
|
+
}) => boolean, childrenKey?: keyof NoInfer<TNode>): Array<NoInfer<TNode>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { z } from 'zod';
|
package/package.json
CHANGED
|
@@ -1,74 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vef-framework/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"private": false,
|
|
6
|
-
"description": "Shared
|
|
7
|
-
"author":
|
|
6
|
+
"description": "Shared utilities for VEF framework",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Venus",
|
|
9
|
+
"email": "iweixiaopeng@163.com",
|
|
10
|
+
"url": "https://github.com/ilxqx"
|
|
11
|
+
},
|
|
12
|
+
"license": "Apache-2.0",
|
|
13
|
+
"homepage": "https://vef.ilxqx.com",
|
|
8
14
|
"keywords": [
|
|
9
15
|
"vef",
|
|
10
|
-
"
|
|
11
|
-
"
|
|
16
|
+
"framework",
|
|
17
|
+
"react",
|
|
18
|
+
"shared"
|
|
12
19
|
],
|
|
13
20
|
"sideEffects": false,
|
|
14
|
-
"main": "cjs/index.cjs",
|
|
15
|
-
"types": "types/index.d.ts",
|
|
16
|
-
"files": [
|
|
17
|
-
"*"
|
|
18
|
-
],
|
|
19
|
-
"engines": {
|
|
20
|
-
"node": ">=20"
|
|
21
|
-
},
|
|
22
|
-
"peerDependencies": {
|
|
23
|
-
"react": "18.3.1",
|
|
24
|
-
"react-dom": "18.3.1",
|
|
25
|
-
"zod": "~3.24.1"
|
|
26
|
-
},
|
|
27
|
-
"dependencies": {
|
|
28
|
-
"@emotion/cache": "11.14.0",
|
|
29
|
-
"@emotion/react": "11.14.0",
|
|
30
|
-
"@emotion/styled": "11.14.0",
|
|
31
|
-
"antd": "5.24.7",
|
|
32
|
-
"use-sync-external-store": "^1.5.0",
|
|
33
|
-
"@ant-design/icons": "6.0.0",
|
|
34
|
-
"@date-fns/tz": "1.2.0",
|
|
35
|
-
"ajv": "^8.17.1",
|
|
36
|
-
"ajv-formats": "^3.0.1",
|
|
37
|
-
"colord": "2.9.3",
|
|
38
|
-
"date-fns": "4.1.0",
|
|
39
|
-
"i18next": "^25.0.0",
|
|
40
|
-
"js-yaml": "^4.1.0",
|
|
41
|
-
"jsencrypt": "3.3.2",
|
|
42
|
-
"json-schema": "^0.4.0",
|
|
43
|
-
"mitt": "3.0.1",
|
|
44
|
-
"nanoid": "5.1.5",
|
|
45
|
-
"path-browserify": "1.0.1",
|
|
46
|
-
"pinyin-pro": "3.26.0",
|
|
47
|
-
"radashi": "12.4.0",
|
|
48
|
-
"react-fast-compare": "3.2.2",
|
|
49
|
-
"scheduler": "0.26.0",
|
|
50
|
-
"type-fest": "4.40.0",
|
|
51
|
-
"use-context-selector": "2.0.0",
|
|
52
|
-
"validator": "13.15.0",
|
|
53
|
-
"zod-i18n-map": "^2.27.0",
|
|
54
|
-
"zustand": "5.0.3"
|
|
55
|
-
},
|
|
56
|
-
"publishConfig": {
|
|
57
|
-
"access": "public"
|
|
58
|
-
},
|
|
59
21
|
"exports": {
|
|
60
22
|
".": {
|
|
23
|
+
"source": "./src/index.ts",
|
|
61
24
|
"import": {
|
|
62
|
-
"types": "./types/index.d.ts",
|
|
63
|
-
"default": "./
|
|
25
|
+
"types": "./dist/types/index.d.ts",
|
|
26
|
+
"default": "./dist/es/index.js"
|
|
64
27
|
},
|
|
65
28
|
"require": {
|
|
66
|
-
"types": "./types/index.d.ts",
|
|
67
|
-
"default": "./cjs/index.cjs"
|
|
29
|
+
"types": "./dist/types/index.d.ts",
|
|
30
|
+
"default": "./dist/cjs/index.cjs"
|
|
68
31
|
}
|
|
69
32
|
},
|
|
70
33
|
"./package.json": "./package.json"
|
|
71
34
|
},
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
|
|
35
|
+
"main": "dist/cjs/index.cjs",
|
|
36
|
+
"module": "dist/es/index.js",
|
|
37
|
+
"types": "dist/types/index.d.ts",
|
|
38
|
+
"files": [
|
|
39
|
+
"dist"
|
|
40
|
+
],
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=22.x"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@fingerprintjs/fingerprintjs": "^5.0.1",
|
|
49
|
+
"@paralleldrive/cuid2": "^3.1.0",
|
|
50
|
+
"@pinyin-pro/data": "^1.2.0",
|
|
51
|
+
"colord": "^2.9.3",
|
|
52
|
+
"dayjs": "^1.11.19",
|
|
53
|
+
"jsencrypt": "^3.5.4",
|
|
54
|
+
"klona": "^2.0.6",
|
|
55
|
+
"mitt": "^3.0.1",
|
|
56
|
+
"path-browserify": "^1.0.1",
|
|
57
|
+
"pinyin-pro": "^3.27.0",
|
|
58
|
+
"qs": "^6.14.0",
|
|
59
|
+
"radashi": "^12.7.1",
|
|
60
|
+
"stacktrace-js": "^2.0.2",
|
|
61
|
+
"tiny-lru": "^11.4.5",
|
|
62
|
+
"type-fest": "^5.2.0",
|
|
63
|
+
"zod": "^4.1.13"
|
|
64
|
+
},
|
|
65
|
+
"devDependencies": {
|
|
66
|
+
"@types/path-browserify": "^1.0.3",
|
|
67
|
+
"@types/qs": "^6.14.0"
|
|
68
|
+
},
|
|
69
|
+
"scripts": {
|
|
70
|
+
"clean": "rimraf dist",
|
|
71
|
+
"typecheck": "tsc --noEmit",
|
|
72
|
+
"build": "vite build",
|
|
73
|
+
"pub": "tsx ../../scripts/publish.ts"
|
|
74
|
+
}
|
|
75
|
+
}
|
package/README.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# The Shared foundations of VEF Framework
|
|
2
|
-
|
|
3
|
-
VEF framework made by Venus is built on top of React, and it provides a set of components that are essential for building a modern web application. These components are designed to be highly customizable and reusable, allowing developers to build complex and dynamic user interfaces with ease.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
To install the VEF framework shared foundations, you can use pnpm or any other package manager you like:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
pnpm add @vef-framework/shared
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
To use the VEF framework shared foundations in your project, you can import them from the package, for example:
|
|
16
|
-
|
|
17
|
-
```ts
|
|
18
|
-
import { generateId } from "@vef-framework/shared";
|
|
19
|
-
|
|
20
|
-
const uniqueId = generateId();
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
## Documentation
|
|
24
|
-
|
|
25
|
-
For more details on how to use the VEF framework shared foundations, please refer to the [official documentation](https://vef.ilxqx.com/docs).
|
package/cjs/color.cjs
DELETED
package/cjs/constants.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";const e=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","gold","lime"],o=["primary","info","success","warning","error"],t=[...e,...o],r="creation",n="update",c="audit",a=[r,n,c];exports.auditFormScene=c,exports.colorTypes=t,exports.creationFormScene=r,exports.defaultColorTypes=e,exports.presetFormScenes=a,exports.semanticColorTypes=o,exports.updateFormScene=n;
|
package/cjs/context.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";var s=require("react"),u=require("use-context-selector");require("./utils.cjs");var a=require("radashi"),i=require("zustand/shallow");function l(c){const r=u.createContext(c);return{ContextProvider:r.Provider,useContextSelector:o=>{const e=s.useRef();return u.useContextSelector(r,n=>{if(a.isNullish(n))return;const t=o(n);return e.current&&i.shallow(t,e.current)?e.current:(e.current=t,t)})},useContext:()=>u.useContext(r)}}exports.createSelectableContext=l;
|
package/cjs/dom.cjs
DELETED
package/cjs/error.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";var s=Object.defineProperty,a=(r,e,t)=>e in r?s(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,o=(r,e,t)=>a(r,typeof e!="symbol"?e+"":e,t);class c extends Error{constructor(e,t){super(t),o(this,"code"),Object.defineProperty(this,"code",{value:e,writable:!1,configurable:!1,enumerable:!0})}}exports.VefError=c;
|
package/cjs/event.cjs
DELETED
package/cjs/expression.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";require("./utils.cjs");var n=require("radashi");const r=new WeakMap;function t(i){return n.isObject(i)&&"expression"in i&&n.isString(i.expression)}function c(i){return n.isFunction(i)||t(i)}function u(i,...o){const s=r.get(i);if(s)return s;const e=new Function(...o);return r.set(i,e),e}exports.compileDynamicFn=u,exports.isExpression=t,exports.isFunctionOrExpression=c;
|
package/cjs/function.cjs
DELETED
package/cjs/id.cjs
DELETED
package/cjs/index.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";var l=require("./color.cjs"),r=require("./constants.cjs"),b=require("./context.cjs"),m=require("./dom.cjs"),f=require("./error.cjs"),p=require("./event.cjs"),u=require("./expression.cjs"),d=require("./function.cjs"),y=require("./id.cjs"),g=require("./json.cjs"),P=require("./module.cjs"),n=require("./path.cjs"),c=require("./pinyin.cjs"),s=require("./security.cjs"),i=require("./store.cjs"),o=require("./styles.cjs"),a=require("./temporal.cjs"),j=require("./theme-variables.cjs");require("./types.cjs");var t=require("./utils.cjs"),O=require("./validation.cjs"),S=require("./yaml.cjs"),v=require("./zod.cjs"),e=require("radashi"),q=require("react-fast-compare"),F=require("zustand/shallow"),h=require("zod");exports.isValidColor=l.isValidColor,exports.auditFormScene=r.auditFormScene,exports.colorTypes=r.colorTypes,exports.creationFormScene=r.creationFormScene,exports.defaultColorTypes=r.defaultColorTypes,exports.presetFormScenes=r.presetFormScenes,exports.semanticColorTypes=r.semanticColorTypes,exports.updateFormScene=r.updateFormScene,exports.createSelectableContext=b.createSelectableContext,exports.getElementHeight=m.getElementHeight,exports.VefError=f.VefError,exports.createEventEmitter=p.createEventEmitter,exports.compileDynamicFn=u.compileDynamicFn,exports.isExpression=u.isExpression,exports.isFunctionOrExpression=u.isFunctionOrExpression,exports.mergeFns=d.mergeFns,exports.generateId=y.generateId,exports.isJsonSchemaValid=g.isJsonSchemaValid,exports.unwrapModule=P.unwrapModule,exports.extractBaseName=n.extractBaseName,exports.extractDirName=n.extractDirName,exports.extractExtName=n.extractExtName,exports.isAbsolutePath=n.isAbsolutePath,exports.joinPaths=n.joinPaths,exports.normalizePath=n.normalizePath,exports.parsePinyin=c.parsePinyin,exports.parsePinyinFirstLetter=c.parsePinyinFirstLetter,exports.decryptRsa=s.decryptRsa,exports.encryptRsa=s.encryptRsa,exports.createComponentStore=i.createComponentStore,exports.createStore=i.createStore,exports.createUnboundStore=i.createUnboundStore,exports.useUnboundStore=i.useUnboundStore,exports.bmq=o.bmq,exports.breakpoints=o.breakpoints,exports.styles=o.styles,exports.getNowDate=a.getNowDate,exports.getNowDateString=a.getNowDateString,exports.getTodayString=a.getTodayString,exports.themeVariables=j.themeVariables,exports.buildRouteParentMenusMappings=t.buildRouteParentMenusMappings,exports.constantCase=t.constantCase,exports.difference=t.difference,exports.getStringLength=t.getStringLength,exports.invokeMaybeAsyncFn=t.invokeMaybeAsyncFn,exports.isAsyncFunction=t.isAsyncFunction,exports.isInternalFunction=t.isInternalFunction,exports.validator=O,exports.loadYaml=S.loadYaml,exports.initZod=v.initZod,Object.defineProperty(exports,"assign",{enumerable:!0,get:function(){return e.assign}}),Object.defineProperty(exports,"camelCase",{enumerable:!0,get:function(){return e.camel}}),Object.defineProperty(exports,"capitalize",{enumerable:!0,get:function(){return e.capitalize}}),Object.defineProperty(exports,"clone",{enumerable:!0,get:function(){return e.clone}}),Object.defineProperty(exports,"cloneDeep",{enumerable:!0,get:function(){return e.cloneDeep}}),Object.defineProperty(exports,"cluster",{enumerable:!0,get:function(){return e.cluster}}),Object.defineProperty(exports,"dashCase",{enumerable:!0,get:function(){return e.dash}}),Object.defineProperty(exports,"debounce",{enumerable:!0,get:function(){return e.debounce}}),Object.defineProperty(exports,"get",{enumerable:!0,get:function(){return e.get}}),Object.defineProperty(exports,"isArray",{enumerable:!0,get:function(){return e.isArray}}),Object.defineProperty(exports,"isBoolean",{enumerable:!0,get:function(){return e.isBoolean}}),Object.defineProperty(exports,"isDate",{enumerable:!0,get:function(){return e.isDate}}),Object.defineProperty(exports,"isEmpty",{enumerable:!0,get:function(){return e.isEmpty}}),Object.defineProperty(exports,"isError",{enumerable:!0,get:function(){return e.isError}}),Object.defineProperty(exports,"isFloat",{enumerable:!0,get:function(){return e.isFloat}}),Object.defineProperty(exports,"isFunction",{enumerable:!0,get:function(){return e.isFunction}}),Object.defineProperty(exports,"isInt",{enumerable:!0,get:function(){return e.isInt}}),Object.defineProperty(exports,"isIntString",{enumerable:!0,get:function(){return e.isIntString}}),Object.defineProperty(exports,"isMap",{enumerable:!0,get:function(){return e.isMap}}),Object.defineProperty(exports,"isNullish",{enumerable:!0,get:function(){return e.isNullish}}),Object.defineProperty(exports,"isNumber",{enumerable:!0,get:function(){return e.isNumber}}),Object.defineProperty(exports,"isObject",{enumerable:!0,get:function(){return e.isObject}}),Object.defineProperty(exports,"isPlainObject",{enumerable:!0,get:function(){return e.isPlainObject}}),Object.defineProperty(exports,"isPrimitive",{enumerable:!0,get:function(){return e.isPrimitive}}),Object.defineProperty(exports,"isPromise",{enumerable:!0,get:function(){return e.isPromise}}),Object.defineProperty(exports,"isRegExp",{enumerable:!0,get:function(){return e.isRegExp}}),Object.defineProperty(exports,"isSet",{enumerable:!0,get:function(){return e.isSet}}),Object.defineProperty(exports,"isString",{enumerable:!0,get:function(){return e.isString}}),Object.defineProperty(exports,"isSymbol",{enumerable:!0,get:function(){return e.isSymbol}}),Object.defineProperty(exports,"isUndefined",{enumerable:!0,get:function(){return e.isUndefined}}),Object.defineProperty(exports,"isWeakMap",{enumerable:!0,get:function(){return e.isWeakMap}}),Object.defineProperty(exports,"isWeakSet",{enumerable:!0,get:function(){return e.isWeakSet}}),Object.defineProperty(exports,"max",{enumerable:!0,get:function(){return e.max}}),Object.defineProperty(exports,"memoize",{enumerable:!0,get:function(){return e.memo}}),Object.defineProperty(exports,"min",{enumerable:!0,get:function(){return e.min}}),Object.defineProperty(exports,"noop",{enumerable:!0,get:function(){return e.noop}}),Object.defineProperty(exports,"omit",{enumerable:!0,get:function(){return e.omit}}),Object.defineProperty(exports,"once",{enumerable:!0,get:function(){return e.once}}),Object.defineProperty(exports,"pascalCase",{enumerable:!0,get:function(){return e.pascal}}),Object.defineProperty(exports,"pick",{enumerable:!0,get:function(){return e.pick}}),Object.defineProperty(exports,"set",{enumerable:!0,get:function(){return e.set}}),Object.defineProperty(exports,"similarity",{enumerable:!0,get:function(){return e.similarity}}),Object.defineProperty(exports,"snakeCase",{enumerable:!0,get:function(){return e.snake}}),Object.defineProperty(exports,"sum",{enumerable:!0,get:function(){return e.sum}}),Object.defineProperty(exports,"template",{enumerable:!0,get:function(){return e.template}}),Object.defineProperty(exports,"throttle",{enumerable:!0,get:function(){return e.throttle}}),Object.defineProperty(exports,"toFloat",{enumerable:!0,get:function(){return e.toFloat}}),Object.defineProperty(exports,"toInt",{enumerable:!0,get:function(){return e.toInt}}),Object.defineProperty(exports,"trim",{enumerable:!0,get:function(){return e.trim}}),Object.defineProperty(exports,"unique",{enumerable:!0,get:function(){return e.unique}}),exports.isDeepEqual=q,Object.defineProperty(exports,"isShallowEqual",{enumerable:!0,get:function(){return F.shallow}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return h.z}});
|
package/cjs/json.cjs
DELETED
package/cjs/module.cjs
DELETED
package/cjs/path.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";var r=require("path-browserify");const{basename:i,dirname:o,extname:e,isAbsolute:u,join:s,normalize:c}=r;function m(t,n=!0){const a=n?void 0:e(t);return i(t,a)}function x(t){return e(t)}function f(t){return o(t)}function h(...t){return s(...t)}function l(t){return u(t)}function N(t){return c(t)}exports.extractBaseName=m,exports.extractDirName=f,exports.extractExtName=x,exports.isAbsolutePath=l,exports.joinPaths=h,exports.normalizePath=N;
|
package/cjs/pinyin.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";var e=require("pinyin-pro");function r(n){return e.pinyin(n,{pattern:"pinyin",toneType:"none",type:"array",mode:"normal",nonZh:"consecutive",surname:"head"})}function i(n){return e.pinyin(n,{pattern:"first",toneType:"none",type:"array",mode:"normal",nonZh:"consecutive"})}exports.parsePinyin=r,exports.parsePinyinFirstLetter=i;
|
package/cjs/security.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";var c=require("jsencrypt");function s(e,n){const t=new c;t.setPublicKey(n);const r=t.encrypt(e);if(!r)throw new Error(`Failed to encrypt value [${e}] using RSA`);return r}function i(e,n){const t=new c;t.setPrivateKey(n);const r=t.decrypt(e);if(!r)throw new Error(`Failed to decrypt value [${e}] using RSA`);return r}exports.decryptRsa=i,exports.encryptRsa=s;
|
package/cjs/store.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";var n=require("react"),u=require("zustand/middleware"),l=require("zustand/traditional"),h=require("zustand/vanilla"),b=require("./utils.cjs"),q=require("radashi"),S=require("zustand/shallow");function E(r){const e=u.createJSONStorage(()=>r==="local"?localStorage:sessionStorage);return{getItem:e.getItem,setItem(o,a){q.isNullish(a.state)||e.setItem(o,a)},removeItem:e.removeItem}}function g(r,e){const o=e?.name??"UNKNOWN",a=e?.storage??"local",s=e?e.selector:()=>null,t=E(a);return l.createWithEqualityFn(u.persist(u.subscribeWithSelector(r),{name:`__VEF_STORE__${b.constantCase(o)}__`,storage:t,version:1,partialize:s}),S.shallow)}function v(r){return h.createStore(u.subscribeWithSelector(r))}function d(r,e,o){return l.useStoreWithEqualityFn(r,e,o??S.shallow)}function _(r,e){const o=n.createContext(null),a=({initialState:t,children:m})=>{const[i]=n.useState(()=>{const f=e(t);return v(f)}),c=n.useRef(!1);return n.useEffect(()=>()=>{c.current=!1},[]),n.useEffect(()=>{c.current||(c.current=!0),t&&i.setState({...t})},[t,i]),n.createElement(o.Provider,{value:i},m)},s=()=>{const t=n.useContext(o);if(!t)throw new Error(`${r}Store can be used only inside ${r}StoreProvider`);return t};return{StoreProvider:a,useStore:t=>d(s(),t),useStoreApi:s}}exports.createComponentStore=_,exports.createStore=g,exports.createUnboundStore=v,exports.useUnboundStore=d;
|
package/cjs/styles.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";var s=require("@emotion/react");const l={xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400},r=["xs","sm","md","lg","xl","xxl"],c=Object.keys(l).reduce((t,e)=>(t[e]=`@media (min-width: ${l[e]}px)`,t),{}),i={flexCenter:s.css({display:"flex",justifyContent:"center",alignItems:"center"}),fullHeight:s.css({height:"100%"}),fullWidth:s.css({width:"100%"}),scrollbar:s.css({scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.3) transparent",scrollbarGutter:"stable"})};exports.bmq=c,exports.breakpoints=r,exports.styles=i;
|
package/cjs/temporal.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";var e=require("@date-fns/tz"),r=require("date-fns"),a=require("date-fns/locale");function t(){return new Date}function n(){return r.format(t(),"yyyy-MM-dd",{locale:a.zhCN,in:e.tz("Asia/Shanghai")})}function i(){return r.format(t(),"PPPPpp",{locale:a.zhCN,in:e.tz("Asia/Shanghai")})}exports.getNowDate=t,exports.getNowDateString=n,exports.getTodayString=i;
|
package/cjs/theme-variables.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";const e={colorChart1:"hsl(221.2 83.2% 53.3%)",colorChart2:"hsl(216 92% 60%)",colorChart3:"hsl(212 95% 68%)",colorChart4:"hsl(210 98% 78%)",colorChart5:"hsl(212 97% 87%)",blue:"var(--vef-blue)",purple:"var(--vef-purple)",cyan:"var(--vef-cyan)",green:"var(--vef-green)",magenta:"var(--vef-magenta)",pink:"var(--vef-pink)",red:"var(--vef-red)",orange:"var(--vef-orange)",yellow:"var(--vef-yellow)",volcano:"var(--vef-volcano)",geekblue:"var(--vef-geekblue)",gold:"var(--vef-gold)",lime:"var(--vef-lime)",colorPrimary:"var(--vef-color-primary)",colorSuccess:"var(--vef-color-success)",colorWarning:"var(--vef-color-warning)",colorError:"var(--vef-color-error)",colorInfo:"var(--vef-color-info)",colorLink:"var(--vef-color-link)",colorTextBase:"var(--vef-color-text-base)",colorBgBase:"var(--vef-color-bg-base)",fontFamily:"var(--vef-font-family)",fontFamilyCode:"var(--vef-font-family-code)",fontSize:"var(--vef-font-size)",lineWidth:"var(--vef-line-width)",lineType:"var(--vef-line-type)",motionEaseOutCirc:"var(--vef-motion-ease-out-circ)",motionEaseInOutCirc:"var(--vef-motion-ease-in-out-circ)",motionEaseOut:"var(--vef-motion-ease-out)",motionEaseInOut:"var(--vef-motion-ease-in-out)",motionEaseOutBack:"var(--vef-motion-ease-out-back)",motionEaseInBack:"var(--vef-motion-ease-in-back)",motionEaseInQuint:"var(--vef-motion-ease-in-quint)",motionEaseOutQuint:"var(--vef-motion-ease-out-quint)",borderRadius:"var(--vef-border-radius)",sizePopupArrow:"var(--vef-size-popup-arrow)",controlHeight:"var(--vef-control-height)",zIndexBase:"var(--vef-z-index-base)",zIndexPopupBase:"var(--vef-z-index-popup-base)",opacityImage:"var(--vef-opacity-image)",colorBgLayout:"var(--vef-color-bg-layout)",colorBgSpotlight:"var(--vef-color-bg-spotlight)",blue1:"var(--vef-blue-1)",blue2:"var(--vef-blue-2)",blue3:"var(--vef-blue-3)",blue4:"var(--vef-blue-4)",blue5:"var(--vef-blue-5)",blue6:"var(--vef-blue-6)",blue7:"var(--vef-blue-7)",blue8:"var(--vef-blue-8)",blue9:"var(--vef-blue-9)",blue10:"var(--vef-blue-10)",purple1:"var(--vef-purple-1)",purple2:"var(--vef-purple-2)",purple3:"var(--vef-purple-3)",purple4:"var(--vef-purple-4)",purple5:"var(--vef-purple-5)",purple6:"var(--vef-purple-6)",purple7:"var(--vef-purple-7)",purple8:"var(--vef-purple-8)",purple9:"var(--vef-purple-9)",purple10:"var(--vef-purple-10)",cyan1:"var(--vef-cyan-1)",cyan2:"var(--vef-cyan-2)",cyan3:"var(--vef-cyan-3)",cyan4:"var(--vef-cyan-4)",cyan5:"var(--vef-cyan-5)",cyan6:"var(--vef-cyan-6)",cyan7:"var(--vef-cyan-7)",cyan8:"var(--vef-cyan-8)",cyan9:"var(--vef-cyan-9)",cyan10:"var(--vef-cyan-10)",green1:"var(--vef-green-1)",green2:"var(--vef-green-2)",green3:"var(--vef-green-3)",green4:"var(--vef-green-4)",green5:"var(--vef-green-5)",green6:"var(--vef-green-6)",green7:"var(--vef-green-7)",green8:"var(--vef-green-8)",green9:"var(--vef-green-9)",green10:"var(--vef-green-10)",magenta1:"var(--vef-magenta-1)",magenta2:"var(--vef-magenta-2)",magenta3:"var(--vef-magenta-3)",magenta4:"var(--vef-magenta-4)",magenta5:"var(--vef-magenta-5)",magenta6:"var(--vef-magenta-6)",magenta7:"var(--vef-magenta-7)",magenta8:"var(--vef-magenta-8)",magenta9:"var(--vef-magenta-9)",magenta10:"var(--vef-magenta-10)",pink1:"var(--vef-pink-1)",pink2:"var(--vef-pink-2)",pink3:"var(--vef-pink-3)",pink4:"var(--vef-pink-4)",pink5:"var(--vef-pink-5)",pink6:"var(--vef-pink-6)",pink7:"var(--vef-pink-7)",pink8:"var(--vef-pink-8)",pink9:"var(--vef-pink-9)",pink10:"var(--vef-pink-10)",red1:"var(--vef-red-1)",red2:"var(--vef-red-2)",red3:"var(--vef-red-3)",red4:"var(--vef-red-4)",red5:"var(--vef-red-5)",red6:"var(--vef-red-6)",red7:"var(--vef-red-7)",red8:"var(--vef-red-8)",red9:"var(--vef-red-9)",red10:"var(--vef-red-10)",orange1:"var(--vef-orange-1)",orange2:"var(--vef-orange-2)",orange3:"var(--vef-orange-3)",orange4:"var(--vef-orange-4)",orange5:"var(--vef-orange-5)",orange6:"var(--vef-orange-6)",orange7:"var(--vef-orange-7)",orange8:"var(--vef-orange-8)",orange9:"var(--vef-orange-9)",orange10:"var(--vef-orange-10)",yellow1:"var(--vef-yellow-1)",yellow2:"var(--vef-yellow-2)",yellow3:"var(--vef-yellow-3)",yellow4:"var(--vef-yellow-4)",yellow5:"var(--vef-yellow-5)",yellow6:"var(--vef-yellow-6)",yellow7:"var(--vef-yellow-7)",yellow8:"var(--vef-yellow-8)",yellow9:"var(--vef-yellow-9)",yellow10:"var(--vef-yellow-10)",volcano1:"var(--vef-volcano-1)",volcano2:"var(--vef-volcano-2)",volcano3:"var(--vef-volcano-3)",volcano4:"var(--vef-volcano-4)",volcano5:"var(--vef-volcano-5)",volcano6:"var(--vef-volcano-6)",volcano7:"var(--vef-volcano-7)",volcano8:"var(--vef-volcano-8)",volcano9:"var(--vef-volcano-9)",volcano10:"var(--vef-volcano-10)",geekblue1:"var(--vef-geekblue-1)",geekblue2:"var(--vef-geekblue-2)",geekblue3:"var(--vef-geekblue-3)",geekblue4:"var(--vef-geekblue-4)",geekblue5:"var(--vef-geekblue-5)",geekblue6:"var(--vef-geekblue-6)",geekblue7:"var(--vef-geekblue-7)",geekblue8:"var(--vef-geekblue-8)",geekblue9:"var(--vef-geekblue-9)",geekblue10:"var(--vef-geekblue-10)",gold1:"var(--vef-gold-1)",gold2:"var(--vef-gold-2)",gold3:"var(--vef-gold-3)",gold4:"var(--vef-gold-4)",gold5:"var(--vef-gold-5)",gold6:"var(--vef-gold-6)",gold7:"var(--vef-gold-7)",gold8:"var(--vef-gold-8)",gold9:"var(--vef-gold-9)",gold10:"var(--vef-gold-10)",lime1:"var(--vef-lime-1)",lime2:"var(--vef-lime-2)",lime3:"var(--vef-lime-3)",lime4:"var(--vef-lime-4)",lime5:"var(--vef-lime-5)",lime6:"var(--vef-lime-6)",lime7:"var(--vef-lime-7)",lime8:"var(--vef-lime-8)",lime9:"var(--vef-lime-9)",lime10:"var(--vef-lime-10)",colorText:"var(--vef-color-text)",colorTextSecondary:"var(--vef-color-text-secondary)",colorTextTertiary:"var(--vef-color-text-tertiary)",colorTextQuaternary:"var(--vef-color-text-quaternary)",colorTextSlate:"#64748b",colorFill:"var(--vef-color-fill)",colorFillSecondary:"var(--vef-color-fill-secondary)",colorFillTertiary:"var(--vef-color-fill-tertiary)",colorFillQuaternary:"var(--vef-color-fill-quaternary)",colorBgSolid:"var(--vef-color-bg-solid)",colorBgSolidHover:"var(--vef-color-bg-solid-hover)",colorBgSolidActive:"var(--vef-color-bg-solid-active)",colorBgContainer:"var(--vef-color-bg-container)",colorBgElevated:"var(--vef-color-bg-elevated)",colorBgBlur:"var(--vef-color-bg-blur)",colorBorder:"var(--vef-color-border)",colorBorderSecondary:"var(--vef-color-border-secondary)",colorPrimaryBg:"var(--vef-color-primary-bg)",colorPrimaryBgHover:"var(--vef-color-primary-bg-hover)",colorPrimaryBorder:"var(--vef-color-primary-border)",colorPrimaryBorderHover:"var(--vef-color-primary-border-hover)",colorPrimaryHover:"var(--vef-color-primary-hover)",colorPrimaryActive:"var(--vef-color-primary-active)",colorPrimaryTextHover:"var(--vef-color-primary-text-hover)",colorPrimaryText:"var(--vef-color-primary-text)",colorPrimaryTextActive:"var(--vef-color-primary-text-active)",colorSuccessBg:"var(--vef-color-success-bg)",colorSuccessBgHover:"var(--vef-color-success-bg-hover)",colorSuccessBorder:"var(--vef-color-success-border)",colorSuccessBorderHover:"var(--vef-color-success-border-hover)",colorSuccessHover:"var(--vef-color-success-hover)",colorSuccessActive:"var(--vef-color-success-active)",colorSuccessTextHover:"var(--vef-color-success-text-hover)",colorSuccessText:"var(--vef-color-success-text)",colorSuccessTextActive:"var(--vef-color-success-text-active)",colorErrorBg:"var(--vef-color-error-bg)",colorErrorBgHover:"var(--vef-color-error-bg-hover)",colorErrorBgFilledHover:"var(--vef-color-error-bg-filled-hover)",colorErrorBgActive:"var(--vef-color-error-bg-active)",colorErrorBorder:"var(--vef-color-error-border)",colorErrorBorderHover:"var(--vef-color-error-border-hover)",colorErrorHover:"var(--vef-color-error-hover)",colorErrorActive:"var(--vef-color-error-active)",colorErrorTextHover:"var(--vef-color-error-text-hover)",colorErrorText:"var(--vef-color-error-text)",colorErrorTextActive:"var(--vef-color-error-text-active)",colorWarningBg:"var(--vef-color-warning-bg)",colorWarningBgHover:"var(--vef-color-warning-bg-hover)",colorWarningBorder:"var(--vef-color-warning-border)",colorWarningBorderHover:"var(--vef-color-warning-border-hover)",colorWarningHover:"var(--vef-color-warning-hover)",colorWarningActive:"var(--vef-color-warning-active)",colorWarningTextHover:"var(--vef-color-warning-text-hover)",colorWarningText:"var(--vef-color-warning-text)",colorWarningTextActive:"var(--vef-color-warning-text-active)",colorInfoBg:"var(--vef-color-info-bg)",colorInfoBgHover:"var(--vef-color-info-bg-hover)",colorInfoBorder:"var(--vef-color-info-border)",colorInfoBorderHover:"var(--vef-color-info-border-hover)",colorInfoHover:"var(--vef-color-info-hover)",colorInfoActive:"var(--vef-color-info-active)",colorInfoTextHover:"var(--vef-color-info-text-hover)",colorInfoText:"var(--vef-color-info-text)",colorInfoTextActive:"var(--vef-color-info-text-active)",colorLinkHover:"var(--vef-color-link-hover)",colorLinkActive:"var(--vef-color-link-active)",colorBgMask:"var(--vef-color-bg-mask)",colorWhite:"var(--vef-color-white)",fontSizeSm:"var(--vef-font-size-sm)",fontSizeLg:"var(--vef-font-size-lg)",fontSizeXl:"var(--vef-font-size-xl)",fontSizeHeading1:"var(--vef-font-size-heading-1)",fontSizeHeading2:"var(--vef-font-size-heading-2)",fontSizeHeading3:"var(--vef-font-size-heading-3)",fontSizeHeading4:"var(--vef-font-size-heading-4)",fontSizeHeading5:"var(--vef-font-size-heading-5)",lineHeight:"var(--vef-line-height)",lineHeightLg:"var(--vef-line-height-lg)",lineHeightSm:"var(--vef-line-height-sm)",fontHeight:"var(--vef-font-height)",fontHeightLg:"var(--vef-font-height-lg)",fontHeightSm:"var(--vef-font-height-sm)",lineHeightHeading1:"var(--vef-line-height-heading-1)",lineHeightHeading2:"var(--vef-line-height-heading-2)",lineHeightHeading3:"var(--vef-line-height-heading-3)",lineHeightHeading4:"var(--vef-line-height-heading-4)",lineHeightHeading5:"var(--vef-line-height-heading-5)",controlHeightSm:"var(--vef-control-height-sm)",controlHeightXs:"var(--vef-control-height-xs)",controlHeightLg:"var(--vef-control-height-lg)",motionDurationFast:"var(--vef-motion-duration-fast)",motionDurationMid:"var(--vef-motion-duration-mid)",motionDurationSlow:"var(--vef-motion-duration-slow)",lineWidthBold:"var(--vef-line-width-bold)",borderRadiusXs:"var(--vef-border-radius-xs)",borderRadiusSm:"var(--vef-border-radius-sm)",borderRadiusLg:"var(--vef-border-radius-lg)",borderRadiusOuter:"var(--vef-border-radius-outer)",colorFillContent:"var(--vef-color-fill-content)",colorFillContentHover:"var(--vef-color-fill-content-hover)",colorFillAlt:"var(--vef-color-fill-alter)",colorBgContainerDisabled:"var(--vef-color-bg-container-disabled)",colorBorderBg:"var(--vef-color-border-bg)",colorSplit:"var(--vef-color-split)",colorTextPlaceholder:"var(--vef-color-text-placeholder)",colorTextDisabled:"var(--vef-color-text-disabled)",colorTextHeading:"var(--vef-color-text-heading)",colorTextLabel:"var(--vef-color-text-label)",colorTextDescription:"var(--vef-color-text-description)",colorTextLightSolid:"var(--vef-color-text-light-solid)",colorHighlight:"var(--vef-color-highlight)",colorBgTextHover:"var(--vef-color-bg-text-hover)",colorBgTextActive:"var(--vef-color-bg-text-active)",colorIcon:"var(--vef-color-icon)",colorIconHover:"var(--vef-color-icon-hover)",colorErrorOutline:"var(--vef-color-error-outline)",colorWarningOutline:"var(--vef-color-warning-outline)",fontSizeIcon:"var(--vef-font-size-icon)",lineWidthFocus:"var(--vef-line-width-focus)",controlOutlineWidth:"var(--vef-control-outline-width)",controlInteractiveSize:"var(--vef-control-interactive-size)",controlItemBgHover:"var(--vef-control-item-bg-hover)",controlItemBgActive:"var(--vef-control-item-bg-active)",controlItemBgActiveHover:"var(--vef-control-item-bg-active-hover)",controlItemBgActiveDisabled:"var(--vef-control-item-bg-active-disabled)",controlTmpOutline:"var(--vef-control-tmp-outline)",controlOutline:"var(--vef-control-outline)",fontWeightStrong:"var(--vef-font-weight-strong)",opacityLoading:"var(--vef-opacity-loading)",linkDecoration:"var(--vef-link-decoration)",linkHoverDecoration:"var(--vef-link-hover-decoration)",linkFocusDecoration:"var(--vef-link-focus-decoration)",controlPaddingHorizontal:"var(--vef-control-padding-horizontal)",controlPaddingHorizontalSm:"var(--vef-control-padding-horizontal-sm)",paddingXxs:"var(--vef-padding-xxs)",paddingXs:"var(--vef-padding-xs)",paddingSm:"var(--vef-padding-sm)",padding:"var(--vef-padding)",paddingMd:"var(--vef-padding-md)",paddingLg:"var(--vef-padding-lg)",paddingXl:"var(--vef-padding-xl)",paddingContentHorizontalLg:"var(--vef-padding-content-horizontal-lg)",paddingContentVerticalLg:"var(--vef-padding-content-vertical-lg)",paddingContentHorizontal:"var(--vef-padding-content-horizontal)",paddingContentVertical:"var(--vef-padding-content-vertical)",paddingContentHorizontalSm:"var(--vef-padding-content-horizontal-sm)",paddingContentVerticalSm:"var(--vef-padding-content-vertical-sm)",marginXxs:"var(--vef-margin-xxs)",marginXs:"var(--vef-margin-xs)",marginSm:"var(--vef-margin-sm)",margin:"var(--vef-margin)",marginMd:"var(--vef-margin-md)",marginLg:"var(--vef-margin-lg)",marginXl:"var(--vef-margin-xl)",marginXxl:"var(--vef-margin-xxl)",boxShadow:"var(--vef-box-shadow)",boxShadowSecondary:"var(--vef-box-shadow-secondary)",boxShadowTertiary:"var(--vef-box-shadow-tertiary)",boxShadowPopoverArrow:"var(--vef-box-shadow-popover-arrow)",boxShadowCard:"var(--vef-box-shadow-card)",boxShadowDrawerRight:"var(--vef-box-shadow-drawer-right)",boxShadowDrawerLeft:"var(--vef-box-shadow-drawer-left)",boxShadowDrawerUp:"var(--vef-box-shadow-drawer-up)",boxShadowDrawerDown:"var(--vef-box-shadow-drawer-down)",boxShadowTabsOverflowLeft:"var(--vef-box-shadow-tabs-overflow-left)",boxShadowTabsOverflowRight:"var(--vef-box-shadow-tabs-overflow-right)",boxShadowTabsOverflowTop:"var(--vef-box-shadow-tabs-overflow-top)",boxShadowTabsOverflowBottom:"var(--vef-box-shadow-tabs-overflow-bottom)",boxShadowElevated:"0 0 1px rgb(0 0 0 / 30%), 0 4px 14px rgb(0 0 0 / 10%)"};exports.themeVariables=e;
|
package/cjs/types.cjs
DELETED
package/cjs/utils.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";var e=require("radashi"),s=require("react-fast-compare"),b=require("zustand/shallow");function c(t){return e.isFunction(t)?t.constructor.name==="AsyncFunction"||Object.prototype.toString.call(t)==="[object AsyncFunction]"||t.toString().startsWith("async "):!1}async function l(t,{beforeInvoke:u,onSuccess:r,onFinally:i},...o){if(c(t))try{u?.();const n=await t(...o);return r?.(n),n}finally{i?.()}else{const n=t(...o);if(n instanceof Promise)try{u?.();const a=await n;return r?.(a),a}finally{i?.()}else return n}}function m(t,u){return Object.keys(u).filter(r=>t[r]!==u[r]).reduce((r,i)=>(r[i]=u[i],r),{})}function p(t){return e.snake(t).toUpperCase()}function y(t){return!!(c(t)&&Reflect.has(t,"name")&&Reflect.has(t,"key")&&Reflect.get(t,"name")==="apiFn")}function g(t){return e.isNumber(t)?`${t}px`:t}function d(t){return new Map(f(t))}function f(t,u=[]){return t.flatMap(r=>{if(r.type==="item")return[[r.key,[r,u]]];if(r.type==="submenu"||r.type==="group"){const{children:i,...o}=r;return[[o.key,[{...o,children:[]},u]],...f(i,[...u,{...o,children:i.filter(n=>n.type!=="divider").map(n=>n.type==="item"?{...n}:{...n,children:[]})}])]}return[]})}Object.defineProperty(exports,"assign",{enumerable:!0,get:function(){return e.assign}}),Object.defineProperty(exports,"camelCase",{enumerable:!0,get:function(){return e.camel}}),Object.defineProperty(exports,"capitalize",{enumerable:!0,get:function(){return e.capitalize}}),Object.defineProperty(exports,"clone",{enumerable:!0,get:function(){return e.clone}}),Object.defineProperty(exports,"cloneDeep",{enumerable:!0,get:function(){return e.cloneDeep}}),Object.defineProperty(exports,"cluster",{enumerable:!0,get:function(){return e.cluster}}),Object.defineProperty(exports,"dashCase",{enumerable:!0,get:function(){return e.dash}}),Object.defineProperty(exports,"debounce",{enumerable:!0,get:function(){return e.debounce}}),Object.defineProperty(exports,"get",{enumerable:!0,get:function(){return e.get}}),Object.defineProperty(exports,"isArray",{enumerable:!0,get:function(){return e.isArray}}),Object.defineProperty(exports,"isBoolean",{enumerable:!0,get:function(){return e.isBoolean}}),Object.defineProperty(exports,"isDate",{enumerable:!0,get:function(){return e.isDate}}),Object.defineProperty(exports,"isEmpty",{enumerable:!0,get:function(){return e.isEmpty}}),Object.defineProperty(exports,"isError",{enumerable:!0,get:function(){return e.isError}}),Object.defineProperty(exports,"isFloat",{enumerable:!0,get:function(){return e.isFloat}}),Object.defineProperty(exports,"isFunction",{enumerable:!0,get:function(){return e.isFunction}}),Object.defineProperty(exports,"isInt",{enumerable:!0,get:function(){return e.isInt}}),Object.defineProperty(exports,"isIntString",{enumerable:!0,get:function(){return e.isIntString}}),Object.defineProperty(exports,"isMap",{enumerable:!0,get:function(){return e.isMap}}),Object.defineProperty(exports,"isNullish",{enumerable:!0,get:function(){return e.isNullish}}),Object.defineProperty(exports,"isNumber",{enumerable:!0,get:function(){return e.isNumber}}),Object.defineProperty(exports,"isObject",{enumerable:!0,get:function(){return e.isObject}}),Object.defineProperty(exports,"isPlainObject",{enumerable:!0,get:function(){return e.isPlainObject}}),Object.defineProperty(exports,"isPrimitive",{enumerable:!0,get:function(){return e.isPrimitive}}),Object.defineProperty(exports,"isPromise",{enumerable:!0,get:function(){return e.isPromise}}),Object.defineProperty(exports,"isRegExp",{enumerable:!0,get:function(){return e.isRegExp}}),Object.defineProperty(exports,"isSet",{enumerable:!0,get:function(){return e.isSet}}),Object.defineProperty(exports,"isString",{enumerable:!0,get:function(){return e.isString}}),Object.defineProperty(exports,"isSymbol",{enumerable:!0,get:function(){return e.isSymbol}}),Object.defineProperty(exports,"isUndefined",{enumerable:!0,get:function(){return e.isUndefined}}),Object.defineProperty(exports,"isWeakMap",{enumerable:!0,get:function(){return e.isWeakMap}}),Object.defineProperty(exports,"isWeakSet",{enumerable:!0,get:function(){return e.isWeakSet}}),Object.defineProperty(exports,"max",{enumerable:!0,get:function(){return e.max}}),Object.defineProperty(exports,"memoize",{enumerable:!0,get:function(){return e.memo}}),Object.defineProperty(exports,"min",{enumerable:!0,get:function(){return e.min}}),Object.defineProperty(exports,"noop",{enumerable:!0,get:function(){return e.noop}}),Object.defineProperty(exports,"omit",{enumerable:!0,get:function(){return e.omit}}),Object.defineProperty(exports,"once",{enumerable:!0,get:function(){return e.once}}),Object.defineProperty(exports,"pascalCase",{enumerable:!0,get:function(){return e.pascal}}),Object.defineProperty(exports,"pick",{enumerable:!0,get:function(){return e.pick}}),Object.defineProperty(exports,"set",{enumerable:!0,get:function(){return e.set}}),Object.defineProperty(exports,"similarity",{enumerable:!0,get:function(){return e.similarity}}),Object.defineProperty(exports,"snakeCase",{enumerable:!0,get:function(){return e.snake}}),Object.defineProperty(exports,"sum",{enumerable:!0,get:function(){return e.sum}}),Object.defineProperty(exports,"template",{enumerable:!0,get:function(){return e.template}}),Object.defineProperty(exports,"throttle",{enumerable:!0,get:function(){return e.throttle}}),Object.defineProperty(exports,"toFloat",{enumerable:!0,get:function(){return e.toFloat}}),Object.defineProperty(exports,"toInt",{enumerable:!0,get:function(){return e.toInt}}),Object.defineProperty(exports,"trim",{enumerable:!0,get:function(){return e.trim}}),Object.defineProperty(exports,"unique",{enumerable:!0,get:function(){return e.unique}}),exports.isDeepEqual=s,Object.defineProperty(exports,"isShallowEqual",{enumerable:!0,get:function(){return b.shallow}}),exports.buildRouteParentMenusMappings=d,exports.constantCase=p,exports.difference=m,exports.getStringLength=g,exports.invokeMaybeAsyncFn=l,exports.isAsyncFunction=c,exports.isInternalFunction=y;
|
package/cjs/validation.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";var n=require("validator");function o(i){return n.isAlpha(i)}function u(i){return n.isAlphanumeric(i)}function c(i){return n.isAscii(i)}function l(i){return n.isNumeric(i)}function a(i){return n.isDecimal(i)}function f(i,r){return n.isFloat(i,r)}function m(i){return n.isBoolean(i,{loose:!1})}function s(i){return n.isDate(i,{format:"YYYY-MM-DD",strictMode:!0})}function p(i){return n.isEmpty(i)}function h(i){return n.isEmpty(i,{ignore_whitespace:!0})}function d(i){return n.isIdentityCard(i,"zh-CN")}function _(i,r){return n.isAfter(i,r)}function g(i,r){return n.isBefore(i,r)}function I(i){return n.isEmail(i)}function C(i){return n.isHexColor(i)}function P(i,r){return n.isIn(i,r)}function A(i,r){return n.isInt(i,r)}function L(i,r){return n.isIP(i,r)}function q(i,r){return n.isIPRange(i,r)}function w(i){return n.isJSON(i)}function y(i){return n.isJWT(i)}function D(i){return n.isLatLong(i)}function S(i,r){return n.isLength(i,r)}function U(i){return n.isMimeType(i)}function N(i){return n.isMobilePhone(i,"zh-CN")}function M(i){return n.isPort(i)}function T(i){return n.isPostalCode(i,"CN")}function B(i){return n.isSemVer(i)}function E(i){return n.isSlug(i)}function J(i){return n.isStrongPassword(i,{minLength:8,minLowercase:1,minUppercase:1,minNumbers:1,minSymbols:1})}function t(i,r){return n.isTime(i,r)}function b(i){return n.isURL(i,{protocols:["http","https"],require_tld:!0,require_protocol:!0,require_host:!0,require_port:!1,require_valid_protocol:!0,allow_underscores:!0})}function R(i){return n.isURL(i,{protocols:[],require_tld:!1,require_protocol:!1,require_host:!1,require_port:!1,require_valid_protocol:!1,allow_underscores:!0,allow_fragments:!1,allow_query_components:!1,allow_protocol_relative_urls:!1})}function v(i,r){return n.isUUID(i,r)}function F(i){const[r,e]=i.split(" ",2);return s(r)&&t(e)}function Y(i,r,e){return n.matches(i,r,e)}const x=/^[\u4E00-\u9FA5]+\d*$/;function H(i){return x.test(i)}exports.isAfter=_,exports.isAlpha=o,exports.isAlphanumeric=u,exports.isAscii=c,exports.isBefore=g,exports.isBlank=h,exports.isBoolean=m,exports.isChineseName=H,exports.isDate=s,exports.isDateTime=F,exports.isDecimal=a,exports.isEmail=I,exports.isEmpty=p,exports.isFloat=f,exports.isHexColor=C,exports.isIdentityCard=d,exports.isIn=P,exports.isInt=A,exports.isIp=L,exports.isIpRange=q,exports.isJson=w,exports.isJwt=y,exports.isLatLong=D,exports.isLength=S,exports.isMimeType=U,exports.isMobilePhone=N,exports.isNumeric=l,exports.isPort=M,exports.isPostalCode=T,exports.isSemVer=B,exports.isSlug=E,exports.isStrongPassword=J,exports.isTime=t,exports.isUri=R,exports.isUrl=b,exports.isUuid=v,exports.matches=Y;
|
package/cjs/yaml.cjs
DELETED
package/cjs/zod.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use strict";var e=require("i18next"),r=require("zod"),i=require("zod-i18n-map"),t=require("zod-i18n-map/locales/zh-CN/zod.json");function n(){e.init({lng:"zh-CN",fallbackLng:!1,resources:{"zh-CN":{zod:t}}}),r.z.setErrorMap(i.zodI18nMap)}Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return r.z}}),exports.initZod=n;
|
package/esm/color.js
DELETED