@blocklet/pages-kit 0.6.18 → 0.6.20
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/lib/cjs/builtin/color-picker.js +135 -87
- package/lib/cjs/builtin/zod.js +83 -0
- package/lib/cjs/tsconfig.tsbuildinfo +1 -1
- package/lib/cjs/utils/builtin.js +2 -0
- package/lib/cjs/utils/inject-global-components.js +2 -0
- package/lib/cjs/utils/style.js +7 -1
- package/lib/esm/builtin/color-picker.js +135 -87
- package/lib/esm/builtin/zod.js +54 -0
- package/lib/esm/tsconfig.tsbuildinfo +1 -1
- package/lib/esm/utils/builtin.js +2 -0
- package/lib/esm/utils/inject-global-components.js +2 -0
- package/lib/esm/utils/style.js +7 -1
- package/lib/types/builtin/color-picker.d.ts +14 -3
- package/lib/types/builtin/zod.d.ts +269 -0
- package/lib/types/tsconfig.tsbuildinfo +1 -1
- package/lib/types/types/style.d.ts +12 -1
- package/lib/types/utils/builtin.d.ts +2 -0
- package/package.json +6 -5
package/lib/esm/utils/builtin.js
CHANGED
|
@@ -2,6 +2,7 @@ import * as component from '@blocklet/sdk/lib/component';
|
|
|
2
2
|
import * as dayjs from '../builtin/dayjs';
|
|
3
3
|
import * as stream from '../builtin/stream';
|
|
4
4
|
import * as utils from '../builtin/utils';
|
|
5
|
+
import * as zod from '../builtin/zod';
|
|
5
6
|
export const BuiltinModules = {
|
|
6
7
|
React: {},
|
|
7
8
|
ReactDOM: {},
|
|
@@ -42,4 +43,5 @@ export const BuiltinModules = {
|
|
|
42
43
|
'@blocklet/pages-kit/builtin/dayjs': dayjs,
|
|
43
44
|
'@blocklet/pages-kit/builtin/utils': utils,
|
|
44
45
|
'@blocklet/pages-kit/builtin/stream': stream,
|
|
46
|
+
'@blocklet/pages-kit/builtin/zod': zod,
|
|
45
47
|
};
|
|
@@ -26,6 +26,7 @@ import * as session from '../builtin/session';
|
|
|
26
26
|
import * as stream from '../builtin/stream';
|
|
27
27
|
import * as uploader from '../builtin/uploader';
|
|
28
28
|
import * as utils from '../builtin/utils';
|
|
29
|
+
import * as zod from '../builtin/zod';
|
|
29
30
|
import * as zustand from '../builtin/zustand';
|
|
30
31
|
import * as zustandMiddlewareImmer from '../builtin/zustand/middleware/immer';
|
|
31
32
|
import CustomComponentRenderer from '../components/CustomComponentRenderer';
|
|
@@ -83,6 +84,7 @@ export function injectGlobalComponents() {
|
|
|
83
84
|
'@blocklet/pages-kit/builtin/async/image-preview': imagePreview,
|
|
84
85
|
'@blocklet/pages-kit/builtin/async/ai-runtime': import('../builtin/async/ai-runtime'),
|
|
85
86
|
'@blocklet/pages-kit/builtin/event-bus': eventBus,
|
|
87
|
+
'@blocklet/pages-kit/builtin/zod': zod,
|
|
86
88
|
};
|
|
87
89
|
// set global variable
|
|
88
90
|
win[BuiltinModulesGlobalVariableName] = {
|
package/lib/esm/utils/style.js
CHANGED
|
@@ -20,7 +20,10 @@ const blockletTheme = createTheme({
|
|
|
20
20
|
},
|
|
21
21
|
});
|
|
22
22
|
export function isGradient(color) {
|
|
23
|
-
if (color
|
|
23
|
+
if (typeof color !== 'string') {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
if (color?.trim?.()) {
|
|
24
27
|
try {
|
|
25
28
|
gradient.parse(color);
|
|
26
29
|
return true;
|
|
@@ -48,6 +51,9 @@ export function isColorString(color) {
|
|
|
48
51
|
* 处理渐变的解析,并转换为rgba格式
|
|
49
52
|
*/
|
|
50
53
|
export function getSafeGradient(color) {
|
|
54
|
+
if (typeof color !== 'string') {
|
|
55
|
+
return '';
|
|
56
|
+
}
|
|
51
57
|
try {
|
|
52
58
|
const colorAst = gradient.parse(color);
|
|
53
59
|
const safeAst = colorAst.map((astItem) => {
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
export interface TabItem {
|
|
2
|
+
key: string;
|
|
3
|
+
label: string;
|
|
4
|
+
component: React.ComponentType<{
|
|
5
|
+
value?: any;
|
|
6
|
+
onChange: (value: any, extra?: any) => void;
|
|
7
|
+
}>;
|
|
8
|
+
showPreview?: boolean;
|
|
9
|
+
}
|
|
1
10
|
export interface ColorPickerProps {
|
|
2
11
|
value: string;
|
|
3
|
-
onChange: (value: string) => void;
|
|
12
|
+
onChange: (value: string, extra?: any) => void;
|
|
4
13
|
style?: React.CSSProperties;
|
|
5
14
|
sx?: object;
|
|
15
|
+
renderTabs?: (defaultTabs: TabItem[]) => TabItem[];
|
|
6
16
|
}
|
|
7
17
|
export interface ColorItemProps {
|
|
8
18
|
color: string;
|
|
@@ -20,6 +30,7 @@ export interface ConfigColorDialogProps {
|
|
|
20
30
|
value: string;
|
|
21
31
|
}, close: () => void) => void;
|
|
22
32
|
enableMuiPalette?: boolean;
|
|
33
|
+
renderTabs?: (defaultTabs: TabItem[]) => TabItem[];
|
|
23
34
|
}
|
|
24
35
|
interface AlternateColorIndicatorProps {
|
|
25
36
|
value?: string;
|
|
@@ -40,8 +51,8 @@ interface CornerBorderProps {
|
|
|
40
51
|
}
|
|
41
52
|
export declare function CornerBorder({ border, cornerSize, borderRadius, sx }: CornerBorderProps): import("react/jsx-runtime").JSX.Element;
|
|
42
53
|
export declare function ColorItem({ color, sx, ...props }: ColorItemProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
-
export declare const ConfigColorDialog: ({ ref, onSave, enableMuiPalette, }: ConfigColorDialogProps & {
|
|
54
|
+
export declare const ConfigColorDialog: ({ ref, onSave, enableMuiPalette, renderTabs, }: ConfigColorDialogProps & {
|
|
44
55
|
ref: React.RefObject<ConfigColorDialogRef | null>;
|
|
45
56
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
-
export declare function ColorPicker({ value, onChange, style, sx }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
export declare function ColorPicker({ value, onChange, style, sx, renderTabs }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
47
58
|
export default ColorPicker;
|
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
import * as z4 from 'zod/v4';
|
|
2
|
+
export * from 'zod/v4';
|
|
3
|
+
type PagesKitComponentMeta = {
|
|
4
|
+
id?: string;
|
|
5
|
+
type: string;
|
|
6
|
+
locales: {
|
|
7
|
+
[locale: string]: {
|
|
8
|
+
name?: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
defaultValue?: any;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
examples?: z4.$output[];
|
|
16
|
+
};
|
|
17
|
+
export declare const pagesKitRegistry: z4.z.core.$ZodRegistry<PagesKitComponentMeta, z4.z.core.$ZodType<unknown, unknown, z4.z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
18
|
+
export declare const uploadSchema: z4.ZodObject<{
|
|
19
|
+
url: z4.ZodNullable<z4.ZodString>;
|
|
20
|
+
mediaKitUrl: z4.ZodNullable<z4.ZodString>;
|
|
21
|
+
width: z4.ZodNullable<z4.ZodNumber>;
|
|
22
|
+
height: z4.ZodNullable<z4.ZodNumber>;
|
|
23
|
+
}, z4.z.core.$strip>;
|
|
24
|
+
export declare const z: {
|
|
25
|
+
upload: () => z4.ZodObject<{
|
|
26
|
+
url: z4.ZodNullable<z4.ZodString>;
|
|
27
|
+
mediaKitUrl: z4.ZodNullable<z4.ZodString>;
|
|
28
|
+
width: z4.ZodNullable<z4.ZodNumber>;
|
|
29
|
+
height: z4.ZodNullable<z4.ZodNumber>;
|
|
30
|
+
}, z4.z.core.$strip>;
|
|
31
|
+
default: typeof z4.z;
|
|
32
|
+
z: typeof z4.z;
|
|
33
|
+
core: typeof z4.core;
|
|
34
|
+
globalRegistry: z4.z.core.$ZodRegistry<z4.z.core.GlobalMeta, z4.z.core.$ZodType<unknown, unknown, z4.z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
35
|
+
registry: typeof z4.core.registry;
|
|
36
|
+
config: typeof z4.core.config;
|
|
37
|
+
function: typeof z4.core.function;
|
|
38
|
+
$output: typeof z4.core.$output;
|
|
39
|
+
$input: typeof z4.core.$input;
|
|
40
|
+
$brand: typeof z4.core.$brand;
|
|
41
|
+
clone: typeof z4.core.util.clone;
|
|
42
|
+
regexes: typeof z4.core.regexes;
|
|
43
|
+
treeifyError: typeof z4.core.treeifyError;
|
|
44
|
+
prettifyError: typeof z4.core.prettifyError;
|
|
45
|
+
formatError: typeof z4.core.formatError;
|
|
46
|
+
flattenError: typeof z4.core.flattenError;
|
|
47
|
+
toJSONSchema: typeof z4.core.toJSONSchema;
|
|
48
|
+
TimePrecision: {
|
|
49
|
+
readonly Any: null;
|
|
50
|
+
readonly Minute: -1;
|
|
51
|
+
readonly Second: 0;
|
|
52
|
+
readonly Millisecond: 3;
|
|
53
|
+
readonly Microsecond: 6;
|
|
54
|
+
};
|
|
55
|
+
NEVER: never;
|
|
56
|
+
locales: typeof z4.core.locales;
|
|
57
|
+
ZodISODateTime: z4.z.core.$constructor<z4.z.ZodISODateTime, z4.z.core.$ZodISODateTimeDef>;
|
|
58
|
+
ZodISODate: z4.z.core.$constructor<z4.z.ZodISODate, z4.z.core.$ZodStringFormatDef<"date">>;
|
|
59
|
+
ZodISOTime: z4.z.core.$constructor<z4.z.ZodISOTime, z4.z.core.$ZodISOTimeDef>;
|
|
60
|
+
ZodISODuration: z4.z.core.$constructor<z4.z.ZodISODuration, z4.z.core.$ZodStringFormatDef<"duration">>;
|
|
61
|
+
iso: typeof z4.iso;
|
|
62
|
+
coerce: typeof z4.coerce;
|
|
63
|
+
string(params?: string | z4.z.core.$ZodStringParams): z4.ZodString;
|
|
64
|
+
string<T extends string>(params?: string | z4.z.core.$ZodStringParams): z4.z.core.$ZodType<T, T>;
|
|
65
|
+
email(params?: string | z4.z.core.$ZodEmailParams): z4.ZodEmail;
|
|
66
|
+
guid(params?: string | z4.z.core.$ZodGUIDParams): z4.ZodGUID;
|
|
67
|
+
uuid(params?: string | z4.z.core.$ZodUUIDParams): z4.ZodUUID;
|
|
68
|
+
uuidv4(params?: string | z4.z.core.$ZodUUIDv4Params): z4.ZodUUID;
|
|
69
|
+
uuidv6(params?: string | z4.z.core.$ZodUUIDv6Params): z4.ZodUUID;
|
|
70
|
+
uuidv7(params?: string | z4.z.core.$ZodUUIDv7Params): z4.ZodUUID;
|
|
71
|
+
url(params?: string | z4.z.core.$ZodURLParams): z4.ZodURL;
|
|
72
|
+
emoji(params?: string | z4.z.core.$ZodEmojiParams): z4.ZodEmoji;
|
|
73
|
+
nanoid(params?: string | z4.z.core.$ZodNanoIDParams): z4.ZodNanoID;
|
|
74
|
+
cuid(params?: string | z4.z.core.$ZodCUIDParams): z4.ZodCUID;
|
|
75
|
+
cuid2(params?: string | z4.z.core.$ZodCUID2Params): z4.ZodCUID2;
|
|
76
|
+
ulid(params?: string | z4.z.core.$ZodULIDParams): z4.ZodULID;
|
|
77
|
+
xid(params?: string | z4.z.core.$ZodXIDParams): z4.ZodXID;
|
|
78
|
+
ksuid(params?: string | z4.z.core.$ZodKSUIDParams): z4.ZodKSUID;
|
|
79
|
+
ipv4(params?: string | z4.z.core.$ZodIPv4Params): z4.ZodIPv4;
|
|
80
|
+
ipv6(params?: string | z4.z.core.$ZodIPv6Params): z4.ZodIPv6;
|
|
81
|
+
cidrv4(params?: string | z4.z.core.$ZodCIDRv4Params): z4.ZodCIDRv4;
|
|
82
|
+
cidrv6(params?: string | z4.z.core.$ZodCIDRv6Params): z4.ZodCIDRv6;
|
|
83
|
+
base64(params?: string | z4.z.core.$ZodBase64Params): z4.ZodBase64;
|
|
84
|
+
base64url(params?: string | z4.z.core.$ZodBase64URLParams): z4.ZodBase64URL;
|
|
85
|
+
e164(params?: string | z4.z.core.$ZodE164Params): z4.ZodE164;
|
|
86
|
+
jwt(params?: string | z4.z.core.$ZodJWTParams): z4.ZodJWT;
|
|
87
|
+
stringFormat<Format extends string>(format: Format, fnOrRegex: ((arg: string) => z4.z.core.util.MaybeAsync<unknown>) | RegExp, _params?: string | z4.z.core.$ZodStringFormatParams): z4.ZodCustomStringFormat<Format>;
|
|
88
|
+
number(params?: string | z4.z.core.$ZodNumberParams): z4.ZodNumber;
|
|
89
|
+
int(params?: string | z4.z.core.$ZodCheckNumberFormatParams): z4.ZodInt;
|
|
90
|
+
float32(params?: string | z4.z.core.$ZodCheckNumberFormatParams): z4.ZodFloat32;
|
|
91
|
+
float64(params?: string | z4.z.core.$ZodCheckNumberFormatParams): z4.ZodFloat64;
|
|
92
|
+
int32(params?: string | z4.z.core.$ZodCheckNumberFormatParams): z4.ZodInt32;
|
|
93
|
+
uint32(params?: string | z4.z.core.$ZodCheckNumberFormatParams): z4.ZodUInt32;
|
|
94
|
+
boolean(params?: string | z4.z.core.$ZodBooleanParams): z4.ZodBoolean;
|
|
95
|
+
bigint(params?: string | z4.z.core.$ZodBigIntParams): z4.ZodBigInt;
|
|
96
|
+
int64(params?: string | z4.z.core.$ZodBigIntFormatParams): z4.ZodBigIntFormat;
|
|
97
|
+
uint64(params?: string | z4.z.core.$ZodBigIntFormatParams): z4.ZodBigIntFormat;
|
|
98
|
+
symbol(params?: string | z4.z.core.$ZodSymbolParams): z4.ZodSymbol;
|
|
99
|
+
any(): z4.ZodAny;
|
|
100
|
+
unknown(): z4.ZodUnknown;
|
|
101
|
+
never(params?: string | z4.z.core.$ZodNeverParams): z4.ZodNever;
|
|
102
|
+
date(params?: string | z4.z.core.$ZodDateParams): z4.ZodDate;
|
|
103
|
+
array<T extends z4.z.core.SomeType>(element: T, params?: string | z4.z.core.$ZodArrayParams): z4.ZodArray<T>;
|
|
104
|
+
keyof<T extends z4.ZodObject>(schema: T): z4.ZodLiteral<Exclude<keyof T["_zod"]["output"], symbol>>;
|
|
105
|
+
object<T extends z4.z.core.$ZodLooseShape = Partial<Record<never, z4.z.core.SomeType>>>(shape?: T, params?: string | z4.z.core.$ZodObjectParams): z4.ZodObject<z4.z.core.util.Writeable<T>, z4.z.core.$strip>;
|
|
106
|
+
strictObject<T extends z4.z.core.$ZodLooseShape>(shape: T, params?: string | z4.z.core.$ZodObjectParams): z4.ZodObject<T, z4.z.core.$strict>;
|
|
107
|
+
looseObject<T extends z4.z.core.$ZodLooseShape>(shape: T, params?: string | z4.z.core.$ZodObjectParams): z4.ZodObject<T, z4.z.core.$loose>;
|
|
108
|
+
union<const T extends readonly z4.z.core.SomeType[]>(options: T, params?: string | z4.z.core.$ZodUnionParams): z4.ZodUnion<T>;
|
|
109
|
+
discriminatedUnion<Types extends readonly [z4.z.core.$ZodTypeDiscriminable, ...z4.z.core.$ZodTypeDiscriminable[]]>(discriminator: string, options: Types, params?: string | z4.z.core.$ZodDiscriminatedUnionParams): z4.ZodDiscriminatedUnion<Types>;
|
|
110
|
+
intersection<T extends z4.z.core.SomeType, U extends z4.z.core.SomeType>(left: T, right: U): z4.ZodIntersection<T, U>;
|
|
111
|
+
tuple<T extends readonly [z4.z.core.SomeType, ...z4.z.core.SomeType[]]>(items: T, params?: string | z4.z.core.$ZodTupleParams): z4.ZodTuple<T, null>;
|
|
112
|
+
tuple<T extends readonly [z4.z.core.SomeType, ...z4.z.core.SomeType[]], Rest extends z4.z.core.SomeType>(items: T, rest: Rest, params?: string | z4.z.core.$ZodTupleParams): z4.ZodTuple<T, Rest>;
|
|
113
|
+
tuple(items: [], params?: string | z4.z.core.$ZodTupleParams): z4.ZodTuple<[], null>;
|
|
114
|
+
record<Key extends z4.z.core.$ZodRecordKey, Value extends z4.z.core.SomeType>(keyType: Key, valueType: Value, params?: string | z4.z.core.$ZodRecordParams): z4.ZodRecord<Key, Value>;
|
|
115
|
+
partialRecord<Key extends z4.z.core.$ZodRecordKey, Value extends z4.z.core.SomeType>(keyType: Key, valueType: Value, params?: string | z4.z.core.$ZodRecordParams): z4.ZodRecord<Key & z4.z.core.$partial, Value>;
|
|
116
|
+
map<Key extends z4.z.core.SomeType, Value extends z4.z.core.SomeType>(keyType: Key, valueType: Value, params?: string | z4.z.core.$ZodMapParams): z4.ZodMap<Key, Value>;
|
|
117
|
+
set<Value extends z4.z.core.SomeType>(valueType: Value, params?: string | z4.z.core.$ZodSetParams): z4.ZodSet<Value>;
|
|
118
|
+
nativeEnum<T extends z4.z.core.util.EnumLike>(entries: T, params?: string | z4.z.core.$ZodEnumParams): z4.ZodEnum<T>;
|
|
119
|
+
literal<const T extends ReadonlyArray<z4.z.core.util.Literal>>(value: T, params?: string | z4.z.core.$ZodLiteralParams): z4.ZodLiteral<T[number]>;
|
|
120
|
+
literal<const T extends z4.z.core.util.Literal>(value: T, params?: string | z4.z.core.$ZodLiteralParams): z4.ZodLiteral<T>;
|
|
121
|
+
file(params?: string | z4.z.core.$ZodFileParams): z4.ZodFile;
|
|
122
|
+
transform<I = unknown, O = I>(fn: (input: I, ctx: z4.z.core.ParsePayload) => O): z4.ZodTransform<Awaited<O>, I>;
|
|
123
|
+
optional<T extends z4.z.core.SomeType>(innerType: T): z4.ZodOptional<T>;
|
|
124
|
+
nullable<T extends z4.z.core.SomeType>(innerType: T): z4.ZodNullable<T>;
|
|
125
|
+
nullish<T extends z4.z.core.SomeType>(innerType: T): z4.ZodOptional<z4.ZodNullable<T>>;
|
|
126
|
+
_default<T extends z4.z.core.SomeType>(innerType: T, defaultValue: z4.z.core.util.NoUndefined<z4.z.core.output<T>> | (() => z4.z.core.util.NoUndefined<z4.z.core.output<T>>)): z4.ZodDefault<T>;
|
|
127
|
+
prefault<T extends z4.z.core.SomeType>(innerType: T, defaultValue: z4.z.core.input<T> | (() => z4.z.core.input<T>)): z4.ZodPrefault<T>;
|
|
128
|
+
nonoptional<T extends z4.z.core.SomeType>(innerType: T, params?: string | z4.z.core.$ZodNonOptionalParams): z4.ZodNonOptional<T>;
|
|
129
|
+
success<T extends z4.z.core.SomeType>(innerType: T): z4.ZodSuccess<T>;
|
|
130
|
+
nan(params?: string | z4.z.core.$ZodNaNParams): z4.ZodNaN;
|
|
131
|
+
pipe<const A extends z4.z.core.SomeType, B extends z4.z.core.$ZodType<unknown, z4.z.core.output<A>> = z4.z.core.$ZodType<unknown, z4.z.core.output<A>, z4.z.core.$ZodTypeInternals<unknown, z4.z.core.output<A>>>>(in_: A, out: B | z4.z.core.$ZodType<unknown, z4.z.core.output<A>>): z4.ZodPipe<A, B>;
|
|
132
|
+
readonly<T extends z4.z.core.SomeType>(innerType: T): z4.ZodReadonly<T>;
|
|
133
|
+
templateLiteral<const Parts extends z4.z.core.$ZodTemplateLiteralPart[]>(parts: Parts, params?: string | z4.z.core.$ZodTemplateLiteralParams): z4.ZodTemplateLiteral<z4.z.core.$PartsToTemplateLiteral<Parts>>;
|
|
134
|
+
lazy<T extends z4.z.core.SomeType>(getter: () => T): z4.ZodLazy<T>;
|
|
135
|
+
promise<T extends z4.z.core.SomeType>(innerType: T): z4.ZodPromise<T>;
|
|
136
|
+
check<O = unknown>(fn: z4.z.core.CheckFn<O>): z4.z.core.$ZodCheck<O>;
|
|
137
|
+
custom<O>(fn?: (data: unknown) => unknown, _params?: string | z4.z.core.$ZodCustomParams | undefined): z4.ZodCustom<O, O>;
|
|
138
|
+
refine<T>(fn: (arg: NoInfer<T>) => z4.z.core.util.MaybeAsync<unknown>, _params?: string | z4.z.core.$ZodCustomParams): z4.z.core.$ZodCheck<T>;
|
|
139
|
+
superRefine<T>(fn: (arg: T, payload: z4.RefinementCtx<T>) => void | Promise<void>): z4.z.core.$ZodCheck<T>;
|
|
140
|
+
json(params?: string | z4.z.core.$ZodCustomParams): z4.ZodJSONSchema;
|
|
141
|
+
preprocess<A, U extends z4.z.core.SomeType, B = unknown>(fn: (arg: B, ctx: z4.RefinementCtx) => A, schema: U): z4.ZodPipe<z4.ZodTransform<A, B>, U>;
|
|
142
|
+
ZodType: z4.z.core.$constructor<z4.ZodType>;
|
|
143
|
+
_ZodString: z4.z.core.$constructor<z4._ZodString>;
|
|
144
|
+
ZodString: z4.z.core.$constructor<z4.ZodString>;
|
|
145
|
+
ZodStringFormat: z4.z.core.$constructor<z4.ZodStringFormat>;
|
|
146
|
+
ZodEmail: z4.z.core.$constructor<z4.ZodEmail>;
|
|
147
|
+
ZodGUID: z4.z.core.$constructor<z4.ZodGUID>;
|
|
148
|
+
ZodUUID: z4.z.core.$constructor<z4.ZodUUID>;
|
|
149
|
+
ZodURL: z4.z.core.$constructor<z4.ZodURL>;
|
|
150
|
+
ZodEmoji: z4.z.core.$constructor<z4.ZodEmoji>;
|
|
151
|
+
ZodNanoID: z4.z.core.$constructor<z4.ZodNanoID>;
|
|
152
|
+
ZodCUID: z4.z.core.$constructor<z4.ZodCUID>;
|
|
153
|
+
ZodCUID2: z4.z.core.$constructor<z4.ZodCUID2>;
|
|
154
|
+
ZodULID: z4.z.core.$constructor<z4.ZodULID>;
|
|
155
|
+
ZodXID: z4.z.core.$constructor<z4.ZodXID>;
|
|
156
|
+
ZodKSUID: z4.z.core.$constructor<z4.ZodKSUID>;
|
|
157
|
+
ZodIPv4: z4.z.core.$constructor<z4.ZodIPv4>;
|
|
158
|
+
ZodIPv6: z4.z.core.$constructor<z4.ZodIPv6>;
|
|
159
|
+
ZodCIDRv4: z4.z.core.$constructor<z4.ZodCIDRv4>;
|
|
160
|
+
ZodCIDRv6: z4.z.core.$constructor<z4.ZodCIDRv6>;
|
|
161
|
+
ZodBase64: z4.z.core.$constructor<z4.ZodBase64>;
|
|
162
|
+
ZodBase64URL: z4.z.core.$constructor<z4.ZodBase64URL>;
|
|
163
|
+
ZodE164: z4.z.core.$constructor<z4.ZodE164>;
|
|
164
|
+
ZodJWT: z4.z.core.$constructor<z4.ZodJWT>;
|
|
165
|
+
ZodCustomStringFormat: z4.z.core.$constructor<z4.ZodCustomStringFormat>;
|
|
166
|
+
ZodNumber: z4.z.core.$constructor<z4.ZodNumber>;
|
|
167
|
+
ZodNumberFormat: z4.z.core.$constructor<z4.ZodNumberFormat>;
|
|
168
|
+
ZodBoolean: z4.z.core.$constructor<z4.ZodBoolean>;
|
|
169
|
+
ZodBigInt: z4.z.core.$constructor<z4.ZodBigInt>;
|
|
170
|
+
ZodBigIntFormat: z4.z.core.$constructor<z4.ZodBigIntFormat>;
|
|
171
|
+
ZodSymbol: z4.z.core.$constructor<z4.ZodSymbol>;
|
|
172
|
+
ZodUndefined: z4.z.core.$constructor<z4.ZodUndefined>;
|
|
173
|
+
undefined: typeof z4.undefined;
|
|
174
|
+
ZodNull: z4.z.core.$constructor<z4.ZodNull>;
|
|
175
|
+
null: typeof z4.null;
|
|
176
|
+
ZodAny: z4.z.core.$constructor<z4.ZodAny>;
|
|
177
|
+
ZodUnknown: z4.z.core.$constructor<z4.ZodUnknown>;
|
|
178
|
+
ZodNever: z4.z.core.$constructor<z4.ZodNever>;
|
|
179
|
+
ZodVoid: z4.z.core.$constructor<z4.ZodVoid>;
|
|
180
|
+
void: typeof z4.void;
|
|
181
|
+
ZodDate: z4.z.core.$constructor<z4.ZodDate>;
|
|
182
|
+
ZodArray: z4.z.core.$constructor<z4.ZodArray>;
|
|
183
|
+
ZodObject: z4.z.core.$constructor<z4.ZodObject>;
|
|
184
|
+
ZodUnion: z4.z.core.$constructor<z4.ZodUnion>;
|
|
185
|
+
ZodDiscriminatedUnion: z4.z.core.$constructor<z4.ZodDiscriminatedUnion>;
|
|
186
|
+
ZodIntersection: z4.z.core.$constructor<z4.ZodIntersection>;
|
|
187
|
+
ZodTuple: z4.z.core.$constructor<z4.ZodTuple>;
|
|
188
|
+
ZodRecord: z4.z.core.$constructor<z4.ZodRecord>;
|
|
189
|
+
ZodMap: z4.z.core.$constructor<z4.ZodMap>;
|
|
190
|
+
ZodSet: z4.z.core.$constructor<z4.ZodSet>;
|
|
191
|
+
ZodEnum: z4.z.core.$constructor<z4.ZodEnum>;
|
|
192
|
+
enum: typeof z4.enum;
|
|
193
|
+
ZodLiteral: z4.z.core.$constructor<z4.ZodLiteral>;
|
|
194
|
+
ZodFile: z4.z.core.$constructor<z4.ZodFile>;
|
|
195
|
+
ZodTransform: z4.z.core.$constructor<z4.ZodTransform>;
|
|
196
|
+
ZodOptional: z4.z.core.$constructor<z4.ZodOptional>;
|
|
197
|
+
ZodNullable: z4.z.core.$constructor<z4.ZodNullable>;
|
|
198
|
+
ZodDefault: z4.z.core.$constructor<z4.ZodDefault>;
|
|
199
|
+
ZodPrefault: z4.z.core.$constructor<z4.ZodPrefault>;
|
|
200
|
+
ZodNonOptional: z4.z.core.$constructor<z4.ZodNonOptional>;
|
|
201
|
+
ZodSuccess: z4.z.core.$constructor<z4.ZodSuccess>;
|
|
202
|
+
ZodCatch: z4.z.core.$constructor<z4.ZodCatch>;
|
|
203
|
+
catch: typeof z4.catch;
|
|
204
|
+
ZodNaN: z4.z.core.$constructor<z4.ZodNaN>;
|
|
205
|
+
ZodPipe: z4.z.core.$constructor<z4.ZodPipe>;
|
|
206
|
+
ZodReadonly: z4.z.core.$constructor<z4.ZodReadonly>;
|
|
207
|
+
ZodTemplateLiteral: z4.z.core.$constructor<z4.ZodTemplateLiteral>;
|
|
208
|
+
ZodLazy: z4.z.core.$constructor<z4.ZodLazy>;
|
|
209
|
+
ZodPromise: z4.z.core.$constructor<z4.ZodPromise>;
|
|
210
|
+
ZodCustom: z4.z.core.$constructor<z4.ZodCustom>;
|
|
211
|
+
instanceof: typeof z4.instanceof;
|
|
212
|
+
stringbool: (_params?: string | z4.z.core.$ZodStringBoolParams) => z4.ZodPipe<z4.ZodPipe<z4.ZodString, z4.ZodTransform<boolean, string>>, z4.ZodBoolean>;
|
|
213
|
+
lt: typeof z4.core._lt;
|
|
214
|
+
lte: typeof z4.core._lte;
|
|
215
|
+
gt: typeof z4.core._gt;
|
|
216
|
+
gte: typeof z4.core._gte;
|
|
217
|
+
positive: typeof z4.core._positive;
|
|
218
|
+
negative: typeof z4.core._negative;
|
|
219
|
+
nonpositive: typeof z4.core._nonpositive;
|
|
220
|
+
nonnegative: typeof z4.core._nonnegative;
|
|
221
|
+
multipleOf: typeof z4.core._multipleOf;
|
|
222
|
+
maxSize: typeof z4.core._maxSize;
|
|
223
|
+
minSize: typeof z4.core._minSize;
|
|
224
|
+
size: typeof z4.core._size;
|
|
225
|
+
maxLength: typeof z4.core._maxLength;
|
|
226
|
+
minLength: typeof z4.core._minLength;
|
|
227
|
+
length: typeof z4.core._length;
|
|
228
|
+
regex: typeof z4.core._regex;
|
|
229
|
+
lowercase: typeof z4.core._lowercase;
|
|
230
|
+
uppercase: typeof z4.core._uppercase;
|
|
231
|
+
includes: typeof z4.core._includes;
|
|
232
|
+
startsWith: typeof z4.core._startsWith;
|
|
233
|
+
endsWith: typeof z4.core._endsWith;
|
|
234
|
+
property: typeof z4.core._property;
|
|
235
|
+
mime: typeof z4.core._mime;
|
|
236
|
+
overwrite: typeof z4.core._overwrite;
|
|
237
|
+
normalize: typeof z4.core._normalize;
|
|
238
|
+
trim: typeof z4.core._trim;
|
|
239
|
+
toLowerCase: typeof z4.core._toLowerCase;
|
|
240
|
+
toUpperCase: typeof z4.core._toUpperCase;
|
|
241
|
+
ZodError: z4.z.core.$constructor<z4.ZodError>;
|
|
242
|
+
ZodRealError: z4.z.core.$constructor<z4.ZodError>;
|
|
243
|
+
parse: <T extends z4.z.core.$ZodType>(schema: T, value: unknown, _ctx?: z4.z.core.ParseContext<z4.z.core.$ZodIssue>, _params?: {
|
|
244
|
+
callee?: z4.z.core.util.AnyFunc;
|
|
245
|
+
Err?: z4.z.core.$ZodErrorClass;
|
|
246
|
+
}) => z4.z.core.output<T>;
|
|
247
|
+
parseAsync: <T extends z4.z.core.$ZodType>(schema: T, value: unknown, _ctx?: z4.z.core.ParseContext<z4.z.core.$ZodIssue>, _params?: {
|
|
248
|
+
callee?: z4.z.core.util.AnyFunc;
|
|
249
|
+
Err?: z4.z.core.$ZodErrorClass;
|
|
250
|
+
}) => Promise<z4.z.core.output<T>>;
|
|
251
|
+
safeParse: <T extends z4.z.core.$ZodType>(schema: T, value: unknown, _ctx?: z4.z.core.ParseContext<z4.z.core.$ZodIssue>) => z4.ZodSafeParseResult<z4.z.core.output<T>>;
|
|
252
|
+
safeParseAsync: <T extends z4.z.core.$ZodType>(schema: T, value: unknown, _ctx?: z4.z.core.ParseContext<z4.z.core.$ZodIssue>) => Promise<z4.ZodSafeParseResult<z4.z.core.output<T>>>;
|
|
253
|
+
setErrorMap(map: z4.z.core.$ZodErrorMap): void;
|
|
254
|
+
getErrorMap(): z4.z.core.$ZodErrorMap<z4.z.core.$ZodIssue> | undefined;
|
|
255
|
+
ZodIssueCode: {
|
|
256
|
+
readonly invalid_type: "invalid_type";
|
|
257
|
+
readonly too_big: "too_big";
|
|
258
|
+
readonly too_small: "too_small";
|
|
259
|
+
readonly invalid_format: "invalid_format";
|
|
260
|
+
readonly not_multiple_of: "not_multiple_of";
|
|
261
|
+
readonly unrecognized_keys: "unrecognized_keys";
|
|
262
|
+
readonly invalid_union: "invalid_union";
|
|
263
|
+
readonly invalid_key: "invalid_key";
|
|
264
|
+
readonly invalid_element: "invalid_element";
|
|
265
|
+
readonly invalid_value: "invalid_value";
|
|
266
|
+
readonly custom: "custom";
|
|
267
|
+
};
|
|
268
|
+
};
|
|
269
|
+
export default z;
|