@vef-framework/shared 1.0.126 → 1.0.128

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/cjs/context.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  var react = require('react');
5
5
  var useContextSelector = require('use-context-selector');
6
- require('./lib.cjs');
6
+ require('./utils.cjs');
7
7
  var radashi = require('radashi');
8
8
  var shallow = require('zustand/shallow');
9
9
 
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  'use strict';
3
3
 
4
- require('./lib.cjs');
4
+ require('./utils.cjs');
5
5
  var radashi = require('radashi');
6
6
 
7
7
  "use strict";
package/cjs/index.cjs CHANGED
@@ -12,8 +12,8 @@ var _function = require('./function.cjs');
12
12
  var icons = require('./icons.cjs');
13
13
  var id = require('./id.cjs');
14
14
  var json = require('./json.cjs');
15
- require('./lib.cjs');
16
15
  var message = require('./message.cjs');
16
+ var module$1 = require('./module.cjs');
17
17
  var path = require('./path.cjs');
18
18
  var pinyin = require('./pinyin.cjs');
19
19
  var security = require('./security.cjs');
@@ -25,10 +25,11 @@ require('./types.cjs');
25
25
  var utils = require('./utils.cjs');
26
26
  var validation = require('./validation.cjs');
27
27
  var yaml = require('./yaml.cjs');
28
+ var zod = require('./zod.cjs');
29
+ var radashi = require('radashi');
28
30
  var reactFastCompare = require('react-fast-compare');
29
31
  var shallow = require('zustand/shallow');
30
- var zod = require('zod');
31
- var radashi = require('radashi');
32
+ var zod$1 = require('zod');
32
33
 
33
34
  "use strict";
34
35
 
@@ -76,6 +77,7 @@ exports.showWarningMessage = message.showWarningMessage;
76
77
  exports.showWarningNotification = message.showWarningNotification;
77
78
  exports.successIcon = message.successIcon;
78
79
  exports.warningIcon = message.warningIcon;
80
+ exports.unwrapModule = module$1.unwrapModule;
79
81
  exports.extractBaseName = path.extractBaseName;
80
82
  exports.extractDirName = path.extractDirName;
81
83
  exports.extractExtName = path.extractExtName;
@@ -106,15 +108,7 @@ exports.isAsyncFunction = utils.isAsyncFunction;
106
108
  exports.isInternalFunction = utils.isInternalFunction;
107
109
  exports.validator = validation;
108
110
  exports.loadYaml = yaml.loadYaml;
109
- exports.isDeepEqual = reactFastCompare;
110
- Object.defineProperty(exports, "isShallowEqual", {
111
- enumerable: true,
112
- get: function () { return shallow.shallow; }
113
- });
114
- Object.defineProperty(exports, "z", {
115
- enumerable: true,
116
- get: function () { return zod.z; }
117
- });
111
+ exports.initZod = zod.initZod;
118
112
  Object.defineProperty(exports, "assign", {
119
113
  enumerable: true,
120
114
  get: function () { return radashi.assign; }
@@ -315,3 +309,12 @@ Object.defineProperty(exports, "unique", {
315
309
  enumerable: true,
316
310
  get: function () { return radashi.unique; }
317
311
  });
312
+ exports.isDeepEqual = reactFastCompare;
313
+ Object.defineProperty(exports, "isShallowEqual", {
314
+ enumerable: true,
315
+ get: function () { return shallow.shallow; }
316
+ });
317
+ Object.defineProperty(exports, "z", {
318
+ enumerable: true,
319
+ get: function () { return zod$1.z; }
320
+ });
package/cjs/message.cjs CHANGED
@@ -5,7 +5,7 @@ var Icon = require('@ant-design/icons');
5
5
  var antd = require('antd');
6
6
  var react = require('react');
7
7
  var icons = require('./icons.cjs');
8
- require('./lib.cjs');
8
+ require('./utils.cjs');
9
9
  var radashi = require('radashi');
10
10
 
11
11
  "use strict";
package/cjs/module.cjs ADDED
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ "use strict";
5
+ const MODULE_FLAG = "__esModule";
6
+ const DEFAULT_KEY = "default";
7
+ function unwrapModule(module) {
8
+ if (Reflect.has(module, MODULE_FLAG)) {
9
+ return unwrapModule(Reflect.get(module, DEFAULT_KEY));
10
+ }
11
+ return module;
12
+ }
13
+
14
+ exports.unwrapModule = unwrapModule;
package/cjs/store.cjs CHANGED
@@ -5,7 +5,6 @@ var react = require('react');
5
5
  var middleware = require('zustand/middleware');
6
6
  var traditional = require('zustand/traditional');
7
7
  var vanilla = require('zustand/vanilla');
8
- require('./lib.cjs');
9
8
  var utils = require('./utils.cjs');
10
9
  var radashi = require('radashi');
11
10
  var shallow = require('zustand/shallow');
package/cjs/utils.cjs CHANGED
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  'use strict';
3
3
 
4
- require('./lib.cjs');
5
4
  var radashi = require('radashi');
5
+ var reactFastCompare = require('react-fast-compare');
6
+ var shallow = require('zustand/shallow');
6
7
 
7
8
  "use strict";
8
9
  function isAsyncFunction(fn) {
@@ -108,6 +109,211 @@ function doBuildRouteParentMenusMappings(menus, parents = []) {
108
109
  });
109
110
  }
110
111
 
112
+ Object.defineProperty(exports, "assign", {
113
+ enumerable: true,
114
+ get: function () { return radashi.assign; }
115
+ });
116
+ Object.defineProperty(exports, "camelCase", {
117
+ enumerable: true,
118
+ get: function () { return radashi.camel; }
119
+ });
120
+ Object.defineProperty(exports, "capitalize", {
121
+ enumerable: true,
122
+ get: function () { return radashi.capitalize; }
123
+ });
124
+ Object.defineProperty(exports, "clone", {
125
+ enumerable: true,
126
+ get: function () { return radashi.clone; }
127
+ });
128
+ Object.defineProperty(exports, "cloneDeep", {
129
+ enumerable: true,
130
+ get: function () { return radashi.cloneDeep; }
131
+ });
132
+ Object.defineProperty(exports, "cluster", {
133
+ enumerable: true,
134
+ get: function () { return radashi.cluster; }
135
+ });
136
+ Object.defineProperty(exports, "dashCase", {
137
+ enumerable: true,
138
+ get: function () { return radashi.dash; }
139
+ });
140
+ Object.defineProperty(exports, "debounce", {
141
+ enumerable: true,
142
+ get: function () { return radashi.debounce; }
143
+ });
144
+ Object.defineProperty(exports, "get", {
145
+ enumerable: true,
146
+ get: function () { return radashi.get; }
147
+ });
148
+ Object.defineProperty(exports, "isArray", {
149
+ enumerable: true,
150
+ get: function () { return radashi.isArray; }
151
+ });
152
+ Object.defineProperty(exports, "isBoolean", {
153
+ enumerable: true,
154
+ get: function () { return radashi.isBoolean; }
155
+ });
156
+ Object.defineProperty(exports, "isDate", {
157
+ enumerable: true,
158
+ get: function () { return radashi.isDate; }
159
+ });
160
+ Object.defineProperty(exports, "isEmpty", {
161
+ enumerable: true,
162
+ get: function () { return radashi.isEmpty; }
163
+ });
164
+ Object.defineProperty(exports, "isError", {
165
+ enumerable: true,
166
+ get: function () { return radashi.isError; }
167
+ });
168
+ Object.defineProperty(exports, "isFloat", {
169
+ enumerable: true,
170
+ get: function () { return radashi.isFloat; }
171
+ });
172
+ Object.defineProperty(exports, "isFunction", {
173
+ enumerable: true,
174
+ get: function () { return radashi.isFunction; }
175
+ });
176
+ Object.defineProperty(exports, "isInt", {
177
+ enumerable: true,
178
+ get: function () { return radashi.isInt; }
179
+ });
180
+ Object.defineProperty(exports, "isIntString", {
181
+ enumerable: true,
182
+ get: function () { return radashi.isIntString; }
183
+ });
184
+ Object.defineProperty(exports, "isMap", {
185
+ enumerable: true,
186
+ get: function () { return radashi.isMap; }
187
+ });
188
+ Object.defineProperty(exports, "isNullish", {
189
+ enumerable: true,
190
+ get: function () { return radashi.isNullish; }
191
+ });
192
+ Object.defineProperty(exports, "isNumber", {
193
+ enumerable: true,
194
+ get: function () { return radashi.isNumber; }
195
+ });
196
+ Object.defineProperty(exports, "isObject", {
197
+ enumerable: true,
198
+ get: function () { return radashi.isObject; }
199
+ });
200
+ Object.defineProperty(exports, "isPlainObject", {
201
+ enumerable: true,
202
+ get: function () { return radashi.isPlainObject; }
203
+ });
204
+ Object.defineProperty(exports, "isPrimitive", {
205
+ enumerable: true,
206
+ get: function () { return radashi.isPrimitive; }
207
+ });
208
+ Object.defineProperty(exports, "isPromise", {
209
+ enumerable: true,
210
+ get: function () { return radashi.isPromise; }
211
+ });
212
+ Object.defineProperty(exports, "isRegExp", {
213
+ enumerable: true,
214
+ get: function () { return radashi.isRegExp; }
215
+ });
216
+ Object.defineProperty(exports, "isSet", {
217
+ enumerable: true,
218
+ get: function () { return radashi.isSet; }
219
+ });
220
+ Object.defineProperty(exports, "isString", {
221
+ enumerable: true,
222
+ get: function () { return radashi.isString; }
223
+ });
224
+ Object.defineProperty(exports, "isSymbol", {
225
+ enumerable: true,
226
+ get: function () { return radashi.isSymbol; }
227
+ });
228
+ Object.defineProperty(exports, "isUndefined", {
229
+ enumerable: true,
230
+ get: function () { return radashi.isUndefined; }
231
+ });
232
+ Object.defineProperty(exports, "isWeakMap", {
233
+ enumerable: true,
234
+ get: function () { return radashi.isWeakMap; }
235
+ });
236
+ Object.defineProperty(exports, "isWeakSet", {
237
+ enumerable: true,
238
+ get: function () { return radashi.isWeakSet; }
239
+ });
240
+ Object.defineProperty(exports, "max", {
241
+ enumerable: true,
242
+ get: function () { return radashi.max; }
243
+ });
244
+ Object.defineProperty(exports, "memoize", {
245
+ enumerable: true,
246
+ get: function () { return radashi.memo; }
247
+ });
248
+ Object.defineProperty(exports, "min", {
249
+ enumerable: true,
250
+ get: function () { return radashi.min; }
251
+ });
252
+ Object.defineProperty(exports, "noop", {
253
+ enumerable: true,
254
+ get: function () { return radashi.noop; }
255
+ });
256
+ Object.defineProperty(exports, "omit", {
257
+ enumerable: true,
258
+ get: function () { return radashi.omit; }
259
+ });
260
+ Object.defineProperty(exports, "once", {
261
+ enumerable: true,
262
+ get: function () { return radashi.once; }
263
+ });
264
+ Object.defineProperty(exports, "pascalCase", {
265
+ enumerable: true,
266
+ get: function () { return radashi.pascal; }
267
+ });
268
+ Object.defineProperty(exports, "pick", {
269
+ enumerable: true,
270
+ get: function () { return radashi.pick; }
271
+ });
272
+ Object.defineProperty(exports, "set", {
273
+ enumerable: true,
274
+ get: function () { return radashi.set; }
275
+ });
276
+ Object.defineProperty(exports, "similarity", {
277
+ enumerable: true,
278
+ get: function () { return radashi.similarity; }
279
+ });
280
+ Object.defineProperty(exports, "snakeCase", {
281
+ enumerable: true,
282
+ get: function () { return radashi.snake; }
283
+ });
284
+ Object.defineProperty(exports, "sum", {
285
+ enumerable: true,
286
+ get: function () { return radashi.sum; }
287
+ });
288
+ Object.defineProperty(exports, "template", {
289
+ enumerable: true,
290
+ get: function () { return radashi.template; }
291
+ });
292
+ Object.defineProperty(exports, "throttle", {
293
+ enumerable: true,
294
+ get: function () { return radashi.throttle; }
295
+ });
296
+ Object.defineProperty(exports, "toFloat", {
297
+ enumerable: true,
298
+ get: function () { return radashi.toFloat; }
299
+ });
300
+ Object.defineProperty(exports, "toInt", {
301
+ enumerable: true,
302
+ get: function () { return radashi.toInt; }
303
+ });
304
+ Object.defineProperty(exports, "trim", {
305
+ enumerable: true,
306
+ get: function () { return radashi.trim; }
307
+ });
308
+ Object.defineProperty(exports, "unique", {
309
+ enumerable: true,
310
+ get: function () { return radashi.unique; }
311
+ });
312
+ exports.isDeepEqual = reactFastCompare;
313
+ Object.defineProperty(exports, "isShallowEqual", {
314
+ enumerable: true,
315
+ get: function () { return shallow.shallow; }
316
+ });
111
317
  exports.buildRouteParentMenusMappings = buildRouteParentMenusMappings;
112
318
  exports.constantCase = constantCase;
113
319
  exports.difference = difference;
package/cjs/zod.cjs ADDED
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ 'use strict';
3
+
4
+ var i18next = require('i18next');
5
+ var zod = require('zod');
6
+ var zodI18nMap = require('zod-i18n-map');
7
+ var translation = require('zod-i18n-map/locales/zh-CN/zod.json');
8
+
9
+ "use strict";
10
+ function initZod() {
11
+ i18next.init({
12
+ lng: "zh-CN",
13
+ fallbackLng: false,
14
+ resources: {
15
+ "zh-CN": {
16
+ zod: translation
17
+ }
18
+ }
19
+ });
20
+ zod.z.setErrorMap(zodI18nMap.zodI18nMap);
21
+ }
22
+
23
+ Object.defineProperty(exports, "z", {
24
+ enumerable: true,
25
+ get: function () { return zod.z; }
26
+ });
27
+ exports.initZod = initZod;
package/esm/context.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  import { useRef } from 'react';
3
3
  import { createContext, useContextSelector, useContext } from 'use-context-selector';
4
- import './lib.js';
4
+ import './utils.js';
5
5
  import { isNullish } from 'radashi';
6
6
  import { shallow } from 'zustand/shallow';
7
7
 
package/esm/expression.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- import './lib.js';
2
+ import './utils.js';
3
3
  import { isObject, isString, isFunction } from 'radashi';
4
4
 
5
5
  "use strict";
package/esm/index.js CHANGED
@@ -10,8 +10,8 @@ export { mergeFns } from './function.js';
10
10
  export { IconAlertCircle, IconAlertTriangle, IconCheck, IconInfoCircle, IconTick, IconTickCircle } from './icons.js';
11
11
  export { generateId } from './id.js';
12
12
  export { isJsonSchemaValid } from './json.js';
13
- import './lib.js';
14
13
  export { checkIcon, defaultMessageTitle, errorIcon, infoIcon, showConfirmation, showErrorAlert, showErrorMessage, showErrorNotification, showInfoAlert, showInfoMessage, showInfoNotification, showLoadingMessage, showSuccessAlert, showSuccessMessage, showSuccessNotification, showWarningAlert, showWarningMessage, showWarningNotification, successIcon, warningIcon } from './message.js';
14
+ export { unwrapModule } from './module.js';
15
15
  export { extractBaseName, extractDirName, extractExtName, isAbsolutePath, joinPaths, normalizePath } from './path.js';
16
16
  export { parsePinyin, parsePinyinFirstLetter } from './pinyin.js';
17
17
  export { decryptRsa, encryptRsa } from './security.js';
@@ -24,9 +24,10 @@ export { buildRouteParentMenusMappings, constantCase, difference, getStringLengt
24
24
  import * as validation from './validation.js';
25
25
  export { validation as validator };
26
26
  export { loadYaml } from './yaml.js';
27
+ export { initZod } from './zod.js';
28
+ export { assign, camel as camelCase, capitalize, clone, cloneDeep, cluster, dash as dashCase, debounce, get, isArray, isBoolean, isDate, isEmpty, isError, isFloat, isFunction, isInt, isIntString, isMap, isNullish, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isUndefined, isWeakMap, isWeakSet, max, memo as memoize, min, noop, omit, once, pascal as pascalCase, pick, set, similarity, snake as snakeCase, sum, template, throttle, toFloat, toInt, trim, unique } from 'radashi';
27
29
  export { default as isDeepEqual } from 'react-fast-compare';
28
30
  export { shallow as isShallowEqual } from 'zustand/shallow';
29
31
  export { z } from 'zod';
30
- export { assign, camel as camelCase, capitalize, clone, cloneDeep, cluster, dash as dashCase, debounce, get, isArray, isBoolean, isDate, isEmpty, isError, isFloat, isFunction, isInt, isIntString, isMap, isNullish, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isUndefined, isWeakMap, isWeakSet, max, memo as memoize, min, noop, omit, once, pascal as pascalCase, pick, set, similarity, snake as snakeCase, sum, template, throttle, toFloat, toInt, trim, unique } from 'radashi';
31
32
 
32
33
  "use strict";
package/esm/message.js CHANGED
@@ -3,7 +3,7 @@ import Icon from '@ant-design/icons';
3
3
  import { Modal, message, notification } from 'antd';
4
4
  import { createElement } from 'react';
5
5
  import { IconCheck, IconTickCircle, IconInfoCircle, IconAlertTriangle, IconAlertCircle } from './icons.js';
6
- import './lib.js';
6
+ import './utils.js';
7
7
  import { isFunction } from 'radashi';
8
8
 
9
9
  "use strict";
package/esm/module.js ADDED
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ "use strict";
3
+ const MODULE_FLAG = "__esModule";
4
+ const DEFAULT_KEY = "default";
5
+ function unwrapModule(module) {
6
+ if (Reflect.has(module, MODULE_FLAG)) {
7
+ return unwrapModule(Reflect.get(module, DEFAULT_KEY));
8
+ }
9
+ return module;
10
+ }
11
+
12
+ export { unwrapModule };
package/esm/store.js CHANGED
@@ -3,7 +3,6 @@ import { createContext, useState, useRef, useEffect, createElement, useContext }
3
3
  import { createJSONStorage, persist, subscribeWithSelector } from 'zustand/middleware';
4
4
  import { createWithEqualityFn, useStoreWithEqualityFn } from 'zustand/traditional';
5
5
  import { createStore as createStore$1 } from 'zustand/vanilla';
6
- import './lib.js';
7
6
  import { constantCase } from './utils.js';
8
7
  import { isNullish } from 'radashi';
9
8
  import { shallow } from 'zustand/shallow';
package/esm/types.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ "use strict";
package/esm/utils.js CHANGED
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
- import './lib.js';
3
2
  import { isFunction, snake, isNumber } from 'radashi';
3
+ export { assign, camel as camelCase, capitalize, clone, cloneDeep, cluster, dash as dashCase, debounce, get, isArray, isBoolean, isDate, isEmpty, isError, isFloat, isFunction, isInt, isIntString, isMap, isNullish, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isUndefined, isWeakMap, isWeakSet, max, memo as memoize, min, noop, omit, once, pascal as pascalCase, pick, set, similarity, snake as snakeCase, sum, template, throttle, toFloat, toInt, trim, unique } from 'radashi';
4
+ export { default as isDeepEqual } from 'react-fast-compare';
5
+ export { shallow as isShallowEqual } from 'zustand/shallow';
4
6
 
5
7
  "use strict";
6
8
  function isAsyncFunction(fn) {
package/esm/zod.js ADDED
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ import i18next from 'i18next';
3
+ import { z } from 'zod';
4
+ export { z } from 'zod';
5
+ import { zodI18nMap } from 'zod-i18n-map';
6
+ import translation from 'zod-i18n-map/locales/zh-CN/zod.json';
7
+
8
+ "use strict";
9
+ function initZod() {
10
+ i18next.init({
11
+ lng: "zh-CN",
12
+ fallbackLng: false,
13
+ resources: {
14
+ "zh-CN": {
15
+ zod: translation
16
+ }
17
+ }
18
+ });
19
+ z.setErrorMap(zodI18nMap);
20
+ }
21
+
22
+ export { initZod };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vef-framework/shared",
3
3
  "type": "module",
4
- "version": "1.0.126",
4
+ "version": "1.0.128",
5
5
  "private": false,
6
6
  "description": "Shared fundamental to the VEF framework",
7
7
  "author": "Venus",
package/types/index.d.ts CHANGED
@@ -9,8 +9,8 @@ export * from "./function";
9
9
  export * from "./icons";
10
10
  export * from "./id";
11
11
  export * from "./json";
12
- export * from "./lib";
13
12
  export * from "./message";
13
+ export * from "./module";
14
14
  export * from "./path";
15
15
  export * from "./pinyin";
16
16
  export * from "./security";
@@ -22,3 +22,4 @@ export * from "./types";
22
22
  export * from "./utils";
23
23
  export * as validator from "./validation";
24
24
  export * from "./yaml";
25
+ export * from "./zod";
@@ -1,6 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
- import type { Except } from "./lib";
3
- import type { Handler, MaybePromise, Provider } from "./types";
2
+ import type { Except, Handler, MaybePromise, Provider } from "./types";
4
3
  export declare const checkIcon: import("react").FunctionComponentElement<Omit<import("@ant-design/icons/lib/components/Icon").IconComponentProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
5
4
  export declare const successIcon: import("react").FunctionComponentElement<Omit<import("@ant-design/icons/lib/components/Icon").IconComponentProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
6
5
  export declare const infoIcon: import("react").FunctionComponentElement<Omit<import("@ant-design/icons/lib/components/Icon").IconComponentProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Unwrap the module.
3
+ *
4
+ * @param module - The module to unwrap.
5
+ * @returns The unwrapped module.
6
+ */
7
+ export declare function unwrapModule(module: object): object;
package/types/types.d.ts CHANGED
@@ -1,10 +1,13 @@
1
1
  import type { Variant } from "antd/es/config-provider";
2
2
  import type { RuleObject } from "antd/es/form";
3
+ import type { JSONSchema7, JSONSchema7Array, JSONSchema7Definition, JSONSchema7Object, JSONSchema7Type, JSONSchema7TypeName, JSONSchema7Version } from "json-schema";
3
4
  import type { ComponentType, CSSProperties, ReactNode } from "react";
5
+ import type { EmptyObject, Except, IfAny, IfEmptyObject, IfNever, IfNull, IfUnknown, JsonArray, JsonObject, JsonPrimitive, JsonValue, LiteralUnion, NonEmptyObject, NonEmptyTuple, PartialDeep, SetOptional, SetRequired, UnionToIntersection, UnionToTuple } from "type-fest";
4
6
  import type { RefetchOptions, UseQueryOptions } from "../../core/src/api/api-client";
5
7
  import type { defaultColorTypes, semanticColorTypes } from "./constants";
6
8
  import type { VefError } from "./error";
7
- import type { EmptyObject, Except, IfNever, JsonPrimitive, LiteralUnion, PartialDeep } from "./lib";
9
+ export type { JSONSchema7, JSONSchema7Array, JSONSchema7Definition, JSONSchema7Object, JSONSchema7Type, JSONSchema7TypeName, JSONSchema7Version, };
10
+ export type { EmptyObject, Except, IfAny, IfEmptyObject, IfNever, IfNull, IfUnknown, JsonArray, JsonObject, JsonPrimitive, JsonValue, LiteralUnion, NonEmptyObject, NonEmptyTuple, PartialDeep, SetOptional, SetRequired, UnionToIntersection, UnionToTuple, };
8
11
  /**
9
12
  * The style props of the component
10
13
  */
@@ -900,4 +903,3 @@ export type ChartConfig<K extends string = string> = {
900
903
  color?: string;
901
904
  };
902
905
  };
903
- export {};
package/types/utils.d.ts CHANGED
@@ -1,4 +1,8 @@
1
+ import { assign, camel as camelCase, capitalize, clone, cloneDeep, cluster, dash as dashCase, debounce, get, isArray, isBoolean, isDate, isEmpty, isError, isFloat, isFunction, isInt, isIntString, isMap, isNullish, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isUndefined, isWeakMap, isWeakSet, max, memo as memoize, min, noop, omit, once, pascal as pascalCase, pick, set, similarity, snake as snakeCase, sum, template, throttle, toFloat, toInt, trim, unique } from "radashi";
2
+ import { default as isDeepEqual } from "react-fast-compare";
3
+ import { shallow as isShallowEqual } from "zustand/shallow";
1
4
  import type { AnyFunction, BasicMenuItem, Consumer, GenericFunction, GroupMenuItem, Handler, LengthValue, MaybePromise, MenuItem, ReturnAnyFunction, SubmenuItem } from "./types";
5
+ export { assign, camelCase, capitalize, clone, cloneDeep, cluster, dashCase, debounce, get, isArray, isBoolean, isDate, isDeepEqual, isEmpty, isError, isFloat, isFunction, isInt, isIntString, isMap, isNullish, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isShallowEqual, isString, isSymbol, isUndefined, isWeakMap, isWeakSet, max, memoize, min, noop, omit, once, pascalCase, pick, set, similarity, snakeCase, sum, template, throttle, toFloat, toInt, trim, unique, };
2
6
  /**
3
7
  * Check if the function is an async function
4
8
  *
package/types/zod.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Initialize the zod library.
4
+ */
5
+ export declare function initZod(): void;
6
+ export { z };
package/cjs/lib.cjs DELETED
@@ -1,232 +0,0 @@
1
- "use strict";
2
- 'use strict';
3
-
4
- var i18next = require('i18next');
5
- var radashi = require('radashi');
6
- var zod = require('zod');
7
- var zodI18nMap = require('zod-i18n-map');
8
- var translation = require('zod-i18n-map/locales/zh-CN/zod.json');
9
- var reactFastCompare = require('react-fast-compare');
10
- var shallow = require('zustand/shallow');
11
-
12
- "use strict";
13
- i18next.init({
14
- lng: "zh-CN",
15
- fallbackLng: false,
16
- resources: {
17
- "zh-CN": {
18
- zod: translation
19
- }
20
- }
21
- });
22
- zod.z.setErrorMap(zodI18nMap.zodI18nMap);
23
-
24
- Object.defineProperty(exports, "assign", {
25
- enumerable: true,
26
- get: function () { return radashi.assign; }
27
- });
28
- Object.defineProperty(exports, "camelCase", {
29
- enumerable: true,
30
- get: function () { return radashi.camel; }
31
- });
32
- Object.defineProperty(exports, "capitalize", {
33
- enumerable: true,
34
- get: function () { return radashi.capitalize; }
35
- });
36
- Object.defineProperty(exports, "clone", {
37
- enumerable: true,
38
- get: function () { return radashi.clone; }
39
- });
40
- Object.defineProperty(exports, "cloneDeep", {
41
- enumerable: true,
42
- get: function () { return radashi.cloneDeep; }
43
- });
44
- Object.defineProperty(exports, "cluster", {
45
- enumerable: true,
46
- get: function () { return radashi.cluster; }
47
- });
48
- Object.defineProperty(exports, "dashCase", {
49
- enumerable: true,
50
- get: function () { return radashi.dash; }
51
- });
52
- Object.defineProperty(exports, "debounce", {
53
- enumerable: true,
54
- get: function () { return radashi.debounce; }
55
- });
56
- Object.defineProperty(exports, "get", {
57
- enumerable: true,
58
- get: function () { return radashi.get; }
59
- });
60
- Object.defineProperty(exports, "isArray", {
61
- enumerable: true,
62
- get: function () { return radashi.isArray; }
63
- });
64
- Object.defineProperty(exports, "isBoolean", {
65
- enumerable: true,
66
- get: function () { return radashi.isBoolean; }
67
- });
68
- Object.defineProperty(exports, "isDate", {
69
- enumerable: true,
70
- get: function () { return radashi.isDate; }
71
- });
72
- Object.defineProperty(exports, "isEmpty", {
73
- enumerable: true,
74
- get: function () { return radashi.isEmpty; }
75
- });
76
- Object.defineProperty(exports, "isError", {
77
- enumerable: true,
78
- get: function () { return radashi.isError; }
79
- });
80
- Object.defineProperty(exports, "isFloat", {
81
- enumerable: true,
82
- get: function () { return radashi.isFloat; }
83
- });
84
- Object.defineProperty(exports, "isFunction", {
85
- enumerable: true,
86
- get: function () { return radashi.isFunction; }
87
- });
88
- Object.defineProperty(exports, "isInt", {
89
- enumerable: true,
90
- get: function () { return radashi.isInt; }
91
- });
92
- Object.defineProperty(exports, "isIntString", {
93
- enumerable: true,
94
- get: function () { return radashi.isIntString; }
95
- });
96
- Object.defineProperty(exports, "isMap", {
97
- enumerable: true,
98
- get: function () { return radashi.isMap; }
99
- });
100
- Object.defineProperty(exports, "isNullish", {
101
- enumerable: true,
102
- get: function () { return radashi.isNullish; }
103
- });
104
- Object.defineProperty(exports, "isNumber", {
105
- enumerable: true,
106
- get: function () { return radashi.isNumber; }
107
- });
108
- Object.defineProperty(exports, "isObject", {
109
- enumerable: true,
110
- get: function () { return radashi.isObject; }
111
- });
112
- Object.defineProperty(exports, "isPlainObject", {
113
- enumerable: true,
114
- get: function () { return radashi.isPlainObject; }
115
- });
116
- Object.defineProperty(exports, "isPrimitive", {
117
- enumerable: true,
118
- get: function () { return radashi.isPrimitive; }
119
- });
120
- Object.defineProperty(exports, "isPromise", {
121
- enumerable: true,
122
- get: function () { return radashi.isPromise; }
123
- });
124
- Object.defineProperty(exports, "isRegExp", {
125
- enumerable: true,
126
- get: function () { return radashi.isRegExp; }
127
- });
128
- Object.defineProperty(exports, "isSet", {
129
- enumerable: true,
130
- get: function () { return radashi.isSet; }
131
- });
132
- Object.defineProperty(exports, "isString", {
133
- enumerable: true,
134
- get: function () { return radashi.isString; }
135
- });
136
- Object.defineProperty(exports, "isSymbol", {
137
- enumerable: true,
138
- get: function () { return radashi.isSymbol; }
139
- });
140
- Object.defineProperty(exports, "isUndefined", {
141
- enumerable: true,
142
- get: function () { return radashi.isUndefined; }
143
- });
144
- Object.defineProperty(exports, "isWeakMap", {
145
- enumerable: true,
146
- get: function () { return radashi.isWeakMap; }
147
- });
148
- Object.defineProperty(exports, "isWeakSet", {
149
- enumerable: true,
150
- get: function () { return radashi.isWeakSet; }
151
- });
152
- Object.defineProperty(exports, "max", {
153
- enumerable: true,
154
- get: function () { return radashi.max; }
155
- });
156
- Object.defineProperty(exports, "memoize", {
157
- enumerable: true,
158
- get: function () { return radashi.memo; }
159
- });
160
- Object.defineProperty(exports, "min", {
161
- enumerable: true,
162
- get: function () { return radashi.min; }
163
- });
164
- Object.defineProperty(exports, "noop", {
165
- enumerable: true,
166
- get: function () { return radashi.noop; }
167
- });
168
- Object.defineProperty(exports, "omit", {
169
- enumerable: true,
170
- get: function () { return radashi.omit; }
171
- });
172
- Object.defineProperty(exports, "once", {
173
- enumerable: true,
174
- get: function () { return radashi.once; }
175
- });
176
- Object.defineProperty(exports, "pascalCase", {
177
- enumerable: true,
178
- get: function () { return radashi.pascal; }
179
- });
180
- Object.defineProperty(exports, "pick", {
181
- enumerable: true,
182
- get: function () { return radashi.pick; }
183
- });
184
- Object.defineProperty(exports, "set", {
185
- enumerable: true,
186
- get: function () { return radashi.set; }
187
- });
188
- Object.defineProperty(exports, "similarity", {
189
- enumerable: true,
190
- get: function () { return radashi.similarity; }
191
- });
192
- Object.defineProperty(exports, "snakeCase", {
193
- enumerable: true,
194
- get: function () { return radashi.snake; }
195
- });
196
- Object.defineProperty(exports, "sum", {
197
- enumerable: true,
198
- get: function () { return radashi.sum; }
199
- });
200
- Object.defineProperty(exports, "template", {
201
- enumerable: true,
202
- get: function () { return radashi.template; }
203
- });
204
- Object.defineProperty(exports, "throttle", {
205
- enumerable: true,
206
- get: function () { return radashi.throttle; }
207
- });
208
- Object.defineProperty(exports, "toFloat", {
209
- enumerable: true,
210
- get: function () { return radashi.toFloat; }
211
- });
212
- Object.defineProperty(exports, "toInt", {
213
- enumerable: true,
214
- get: function () { return radashi.toInt; }
215
- });
216
- Object.defineProperty(exports, "trim", {
217
- enumerable: true,
218
- get: function () { return radashi.trim; }
219
- });
220
- Object.defineProperty(exports, "unique", {
221
- enumerable: true,
222
- get: function () { return radashi.unique; }
223
- });
224
- Object.defineProperty(exports, "z", {
225
- enumerable: true,
226
- get: function () { return zod.z; }
227
- });
228
- exports.isDeepEqual = reactFastCompare;
229
- Object.defineProperty(exports, "isShallowEqual", {
230
- enumerable: true,
231
- get: function () { return shallow.shallow; }
232
- });
package/esm/lib.js DELETED
@@ -1,21 +0,0 @@
1
- "use strict";
2
- import i18next from 'i18next';
3
- export { assign, camel as camelCase, capitalize, clone, cloneDeep, cluster, dash as dashCase, debounce, get, isArray, isBoolean, isDate, isEmpty, isError, isFloat, isFunction, isInt, isIntString, isMap, isNullish, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isUndefined, isWeakMap, isWeakSet, max, memo as memoize, min, noop, omit, once, pascal as pascalCase, pick, set, similarity, snake as snakeCase, sum, template, throttle, toFloat, toInt, trim, unique } from 'radashi';
4
- import { z } from 'zod';
5
- export { z } from 'zod';
6
- import { zodI18nMap } from 'zod-i18n-map';
7
- import translation from 'zod-i18n-map/locales/zh-CN/zod.json';
8
- export { default as isDeepEqual } from 'react-fast-compare';
9
- export { shallow as isShallowEqual } from 'zustand/shallow';
10
-
11
- "use strict";
12
- i18next.init({
13
- lng: "zh-CN",
14
- fallbackLng: false,
15
- resources: {
16
- "zh-CN": {
17
- zod: translation
18
- }
19
- }
20
- });
21
- z.setErrorMap(zodI18nMap);
package/types/lib.d.ts DELETED
@@ -1,9 +0,0 @@
1
- import type { JSONSchema7, JSONSchema7Array, JSONSchema7Definition, JSONSchema7Object, JSONSchema7Type, JSONSchema7TypeName, JSONSchema7Version } from "json-schema";
2
- import type { EmptyObject, Except, IfAny, IfEmptyObject, IfNever, IfNull, IfUnknown, JsonArray, JsonObject, JsonPrimitive, JsonValue, LiteralUnion, NonEmptyObject, NonEmptyTuple, PartialDeep, SetOptional, SetRequired, UnionToIntersection, UnionToTuple } from "type-fest";
3
- import { assign, camel as camelCase, capitalize, clone, cloneDeep, cluster, dash as dashCase, debounce, get, isArray, isBoolean, isDate, isEmpty, isError, isFloat, isFunction, isInt, isIntString, isMap, isNullish, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isUndefined, isWeakMap, isWeakSet, max, memo as memoize, min, noop, omit, once, pascal as pascalCase, pick, set, similarity, snake as snakeCase, sum, template, throttle, toFloat, toInt, trim, unique } from "radashi";
4
- import { z } from "zod";
5
- export { z };
6
- export { default as isDeepEqual } from "react-fast-compare";
7
- export { shallow as isShallowEqual } from "zustand/shallow";
8
- export type { EmptyObject, Except, IfAny, IfEmptyObject, IfNever, IfNull, IfUnknown, JsonArray, JsonObject, JsonPrimitive, JSONSchema7, JSONSchema7Array, JSONSchema7Definition, JSONSchema7Object, JSONSchema7Type, JSONSchema7TypeName, JSONSchema7Version, JsonValue, LiteralUnion, NonEmptyObject, NonEmptyTuple, PartialDeep, SetOptional, SetRequired, UnionToIntersection, UnionToTuple, };
9
- export { assign, camelCase, capitalize, clone, cloneDeep, cluster, dashCase, debounce, get, isArray, isBoolean, isDate, isEmpty, isError, isFloat, isFunction, isInt, isIntString, isMap, isNullish, isNumber, isObject, isPlainObject, isPrimitive, isPromise, isRegExp, isSet, isString, isSymbol, isUndefined, isWeakMap, isWeakSet, max, memoize, min, noop, omit, once, pascalCase, pick, set, similarity, snakeCase, sum, template, throttle, toFloat, toInt, trim, unique, };