dune-react 0.0.32 → 0.0.34

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.
Files changed (51) hide show
  1. package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.d.ts +11 -0
  2. package/dist/components/puck-block/footer-sections/centered-minimal-footer/index.js +1 -0
  3. package/dist/components/puck-block/footer-sections/compact-newsletter-footer/index.d.ts +11 -0
  4. package/dist/components/puck-block/footer-sections/contact-links-footer/index.d.ts +11 -0
  5. package/dist/components/puck-block/footer-sections/contact-links-footer/index.js +1 -1
  6. package/dist/components/puck-block/footer-sections/cta-links-footer/index.d.ts +11 -0
  7. package/dist/components/puck-block/footer-sections/cta-links-footer/index.js +1 -1
  8. package/dist/components/puck-block/footer-sections/links-newsletter-footer/index.d.ts +11 -0
  9. package/dist/components/puck-block/footer-sections/newsletter-links-footer/index.d.ts +11 -0
  10. package/dist/components/puck-block/footer-sections/newsletter-top-links-footer/index.d.ts +11 -0
  11. package/dist/components/puck-block/header-sections/centered-navbar/index.d.ts +11 -0
  12. package/dist/components/puck-block/header-sections/centered-navbar/index.js +1 -0
  13. package/dist/components/puck-block/header-sections/drawer-navbar/index.d.ts +11 -0
  14. package/dist/components/puck-block/header-sections/drawer-navbar/index.js +1 -1
  15. package/dist/components/puck-block/header-sections/floating-bordered-navbar/index.d.ts +11 -0
  16. package/dist/components/puck-block/header-sections/floating-bordered-navbar/index.js +1 -1
  17. package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/index.d.ts +11 -0
  18. package/dist/components/puck-block/header-sections/fullscreen-overlay-navbar/index.js +1 -1
  19. package/dist/components/puck-block/header-sections/mega-menu-navbar/index.d.ts +11 -0
  20. package/dist/components/puck-block/header-sections/mega-menu-navbar/index.js +1 -1
  21. package/dist/components/puck-block/header-sections/standard-navbar/index.d.ts +11 -0
  22. package/dist/components/puck-block/header-sections/standard-navbar/index.js +1 -0
  23. package/dist/components/puck-block/hero-sections/tab-hero/component.js +1 -0
  24. package/dist/components/puck-block/hero-sections/tab-hero/index.d.ts +3 -6
  25. package/dist/components/puck-block/hero-sections/tab-hero/index.js +2 -7
  26. package/dist/components/puck-block/pricing-sections/pricing-comparison-table/component.js +13 -0
  27. package/dist/components/puck-block/pricing-sections/split-pricing/component.js +2 -1
  28. package/dist/components/puck-block/registry.generated.d.ts +102 -6
  29. package/dist/components/puck-core/core/props/index.js +0 -7
  30. package/dist/components/puck-core/core/puck-fields-to-zod.d.ts +40 -0
  31. package/dist/components/puck-core/core/puck-fields-to-zod.js +113 -0
  32. package/dist/components/puck-core/index.d.ts +1 -0
  33. package/dist/index.js +3 -0
  34. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/errors.js +44 -0
  35. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/iso.js +43 -0
  36. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/parse.js +29 -0
  37. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/classic/schemas.js +665 -0
  38. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/api.js +569 -0
  39. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/checks.js +410 -0
  40. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/core.js +74 -0
  41. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/doc.js +37 -0
  42. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/errors.js +72 -0
  43. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/json-schema-processors.js +314 -0
  44. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/parse.js +95 -0
  45. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/regexes.js +81 -0
  46. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/registries.js +51 -0
  47. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/schemas.js +1345 -0
  48. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/to-json-schema.js +362 -0
  49. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/util.js +430 -0
  50. package/dist/node_modules/.pnpm/zod@4.3.6/node_modules/zod/v4/core/versions.js +8 -0
  51. package/package.json +11 -6
@@ -0,0 +1,665 @@
1
+ import { $constructor, $ZodEncodeError } from "../core/core.js";
2
+ import { normalizeParams, defineLazy, extend, safeExtend, merge, pick, omit, partial, required, mergeDefs, clone, shallowClone, issue } from "../core/util.js";
3
+ import { $ZodObjectJIT, $ZodRecord, $ZodEnum, $ZodOptional, $ZodNonOptional, $ZodString, $ZodNumber, $ZodAny, $ZodArray, $ZodType, $ZodExactOptional, $ZodNullable, $ZodUnion, $ZodIntersection, $ZodPipe, $ZodTransform, $ZodDefault, $ZodPrefault, $ZodCatch, $ZodReadonly, $ZodStringFormat, $ZodEmail, $ZodGUID, $ZodUUID, $ZodURL, $ZodEmoji, $ZodNanoID, $ZodCUID, $ZodCUID2, $ZodULID, $ZodXID, $ZodKSUID, $ZodIPv4, $ZodIPv6, $ZodCIDRv4, $ZodCIDRv6, $ZodBase64, $ZodBase64URL, $ZodE164, $ZodJWT, $ZodNumberFormat, $ZodUnknown, $ZodNever, $ZodCustom } from "../core/schemas.js";
4
+ import { globalRegistry } from "../core/registries.js";
5
+ import { _string, _number, _array, _any, _email, _url, _jwt, _emoji, _guid, _uuid, _uuidv4, _uuidv6, _uuidv7, _nanoid, _cuid, _cuid2, _ulid, _base64, _base64url, _xid, _ksuid, _ipv4, _ipv6, _cidrv4, _cidrv6, _e164, _gt, _gte, _lt, _lte, _multipleOf, _minLength, _maxLength, _length, _overwrite, _unknown, _never, _regex, _includes, _startsWith, _endsWith, _lowercase, _uppercase, _trim, _normalize, _toLowerCase, _toUpperCase, _slugify, _int, _refine, _superRefine } from "../core/api.js";
6
+ import { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from "../core/to-json-schema.js";
7
+ import { objectProcessor, recordProcessor, enumProcessor, optionalProcessor, nonoptionalProcessor, numberProcessor, anyProcessor, arrayProcessor, stringProcessor, nullableProcessor, unionProcessor, intersectionProcessor, pipeProcessor, transformProcessor, defaultProcessor, prefaultProcessor, catchProcessor, readonlyProcessor, unknownProcessor, neverProcessor, customProcessor } from "../core/json-schema-processors.js";
8
+ import { datetime, date, time, duration } from "./iso.js";
9
+ import { parse, safeParse, parseAsync, safeParseAsync, encode, decode, encodeAsync, decodeAsync, safeEncode, safeDecode, safeEncodeAsync, safeDecodeAsync } from "./parse.js";
10
+ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
11
+ $ZodType.init(inst, def);
12
+ Object.assign(inst["~standard"], {
13
+ jsonSchema: {
14
+ input: createStandardJSONSchemaMethod(inst, "input"),
15
+ output: createStandardJSONSchemaMethod(inst, "output")
16
+ }
17
+ });
18
+ inst.toJSONSchema = createToJSONSchemaMethod(inst, {});
19
+ inst.def = def;
20
+ inst.type = def.type;
21
+ Object.defineProperty(inst, "_def", { value: def });
22
+ inst.check = (...checks) => {
23
+ return inst.clone(mergeDefs(def, {
24
+ checks: [
25
+ ...def.checks ?? [],
26
+ ...checks.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
27
+ ]
28
+ }), {
29
+ parent: true
30
+ });
31
+ };
32
+ inst.with = inst.check;
33
+ inst.clone = (def2, params) => clone(inst, def2, params);
34
+ inst.brand = () => inst;
35
+ inst.register = (reg, meta) => {
36
+ reg.add(inst, meta);
37
+ return inst;
38
+ };
39
+ inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
40
+ inst.safeParse = (data, params) => safeParse(inst, data, params);
41
+ inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
42
+ inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
43
+ inst.spa = inst.safeParseAsync;
44
+ inst.encode = (data, params) => encode(inst, data, params);
45
+ inst.decode = (data, params) => decode(inst, data, params);
46
+ inst.encodeAsync = async (data, params) => encodeAsync(inst, data, params);
47
+ inst.decodeAsync = async (data, params) => decodeAsync(inst, data, params);
48
+ inst.safeEncode = (data, params) => safeEncode(inst, data, params);
49
+ inst.safeDecode = (data, params) => safeDecode(inst, data, params);
50
+ inst.safeEncodeAsync = async (data, params) => safeEncodeAsync(inst, data, params);
51
+ inst.safeDecodeAsync = async (data, params) => safeDecodeAsync(inst, data, params);
52
+ inst.refine = (check, params) => inst.check(refine(check, params));
53
+ inst.superRefine = (refinement) => inst.check(superRefine(refinement));
54
+ inst.overwrite = (fn) => inst.check(_overwrite(fn));
55
+ inst.optional = () => optional(inst);
56
+ inst.exactOptional = () => exactOptional(inst);
57
+ inst.nullable = () => nullable(inst);
58
+ inst.nullish = () => optional(nullable(inst));
59
+ inst.nonoptional = (params) => nonoptional(inst, params);
60
+ inst.array = () => array(inst);
61
+ inst.or = (arg) => union([inst, arg]);
62
+ inst.and = (arg) => intersection(inst, arg);
63
+ inst.transform = (tx) => pipe(inst, transform(tx));
64
+ inst.default = (def2) => _default(inst, def2);
65
+ inst.prefault = (def2) => prefault(inst, def2);
66
+ inst.catch = (params) => _catch(inst, params);
67
+ inst.pipe = (target) => pipe(inst, target);
68
+ inst.readonly = () => readonly(inst);
69
+ inst.describe = (description) => {
70
+ const cl = inst.clone();
71
+ globalRegistry.add(cl, { description });
72
+ return cl;
73
+ };
74
+ Object.defineProperty(inst, "description", {
75
+ get() {
76
+ var _a;
77
+ return (_a = globalRegistry.get(inst)) == null ? void 0 : _a.description;
78
+ },
79
+ configurable: true
80
+ });
81
+ inst.meta = (...args) => {
82
+ if (args.length === 0) {
83
+ return globalRegistry.get(inst);
84
+ }
85
+ const cl = inst.clone();
86
+ globalRegistry.add(cl, args[0]);
87
+ return cl;
88
+ };
89
+ inst.isOptional = () => inst.safeParse(void 0).success;
90
+ inst.isNullable = () => inst.safeParse(null).success;
91
+ inst.apply = (fn) => fn(inst);
92
+ return inst;
93
+ });
94
+ const _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
95
+ $ZodString.init(inst, def);
96
+ ZodType.init(inst, def);
97
+ inst._zod.processJSONSchema = (ctx, json, params) => stringProcessor(inst, ctx, json);
98
+ const bag = inst._zod.bag;
99
+ inst.format = bag.format ?? null;
100
+ inst.minLength = bag.minimum ?? null;
101
+ inst.maxLength = bag.maximum ?? null;
102
+ inst.regex = (...args) => inst.check(_regex(...args));
103
+ inst.includes = (...args) => inst.check(_includes(...args));
104
+ inst.startsWith = (...args) => inst.check(_startsWith(...args));
105
+ inst.endsWith = (...args) => inst.check(_endsWith(...args));
106
+ inst.min = (...args) => inst.check(_minLength(...args));
107
+ inst.max = (...args) => inst.check(_maxLength(...args));
108
+ inst.length = (...args) => inst.check(_length(...args));
109
+ inst.nonempty = (...args) => inst.check(_minLength(1, ...args));
110
+ inst.lowercase = (params) => inst.check(_lowercase(params));
111
+ inst.uppercase = (params) => inst.check(_uppercase(params));
112
+ inst.trim = () => inst.check(_trim());
113
+ inst.normalize = (...args) => inst.check(_normalize(...args));
114
+ inst.toLowerCase = () => inst.check(_toLowerCase());
115
+ inst.toUpperCase = () => inst.check(_toUpperCase());
116
+ inst.slugify = () => inst.check(_slugify());
117
+ });
118
+ const ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
119
+ $ZodString.init(inst, def);
120
+ _ZodString.init(inst, def);
121
+ inst.email = (params) => inst.check(_email(ZodEmail, params));
122
+ inst.url = (params) => inst.check(_url(ZodURL, params));
123
+ inst.jwt = (params) => inst.check(_jwt(ZodJWT, params));
124
+ inst.emoji = (params) => inst.check(_emoji(ZodEmoji, params));
125
+ inst.guid = (params) => inst.check(_guid(ZodGUID, params));
126
+ inst.uuid = (params) => inst.check(_uuid(ZodUUID, params));
127
+ inst.uuidv4 = (params) => inst.check(_uuidv4(ZodUUID, params));
128
+ inst.uuidv6 = (params) => inst.check(_uuidv6(ZodUUID, params));
129
+ inst.uuidv7 = (params) => inst.check(_uuidv7(ZodUUID, params));
130
+ inst.nanoid = (params) => inst.check(_nanoid(ZodNanoID, params));
131
+ inst.guid = (params) => inst.check(_guid(ZodGUID, params));
132
+ inst.cuid = (params) => inst.check(_cuid(ZodCUID, params));
133
+ inst.cuid2 = (params) => inst.check(_cuid2(ZodCUID2, params));
134
+ inst.ulid = (params) => inst.check(_ulid(ZodULID, params));
135
+ inst.base64 = (params) => inst.check(_base64(ZodBase64, params));
136
+ inst.base64url = (params) => inst.check(_base64url(ZodBase64URL, params));
137
+ inst.xid = (params) => inst.check(_xid(ZodXID, params));
138
+ inst.ksuid = (params) => inst.check(_ksuid(ZodKSUID, params));
139
+ inst.ipv4 = (params) => inst.check(_ipv4(ZodIPv4, params));
140
+ inst.ipv6 = (params) => inst.check(_ipv6(ZodIPv6, params));
141
+ inst.cidrv4 = (params) => inst.check(_cidrv4(ZodCIDRv4, params));
142
+ inst.cidrv6 = (params) => inst.check(_cidrv6(ZodCIDRv6, params));
143
+ inst.e164 = (params) => inst.check(_e164(ZodE164, params));
144
+ inst.datetime = (params) => inst.check(datetime(params));
145
+ inst.date = (params) => inst.check(date(params));
146
+ inst.time = (params) => inst.check(time(params));
147
+ inst.duration = (params) => inst.check(duration(params));
148
+ });
149
+ function string(params) {
150
+ return _string(ZodString, params);
151
+ }
152
+ const ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => {
153
+ $ZodStringFormat.init(inst, def);
154
+ _ZodString.init(inst, def);
155
+ });
156
+ const ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => {
157
+ $ZodEmail.init(inst, def);
158
+ ZodStringFormat.init(inst, def);
159
+ });
160
+ const ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => {
161
+ $ZodGUID.init(inst, def);
162
+ ZodStringFormat.init(inst, def);
163
+ });
164
+ const ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => {
165
+ $ZodUUID.init(inst, def);
166
+ ZodStringFormat.init(inst, def);
167
+ });
168
+ const ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => {
169
+ $ZodURL.init(inst, def);
170
+ ZodStringFormat.init(inst, def);
171
+ });
172
+ const ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
173
+ $ZodEmoji.init(inst, def);
174
+ ZodStringFormat.init(inst, def);
175
+ });
176
+ const ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
177
+ $ZodNanoID.init(inst, def);
178
+ ZodStringFormat.init(inst, def);
179
+ });
180
+ const ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => {
181
+ $ZodCUID.init(inst, def);
182
+ ZodStringFormat.init(inst, def);
183
+ });
184
+ const ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => {
185
+ $ZodCUID2.init(inst, def);
186
+ ZodStringFormat.init(inst, def);
187
+ });
188
+ const ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => {
189
+ $ZodULID.init(inst, def);
190
+ ZodStringFormat.init(inst, def);
191
+ });
192
+ const ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => {
193
+ $ZodXID.init(inst, def);
194
+ ZodStringFormat.init(inst, def);
195
+ });
196
+ const ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => {
197
+ $ZodKSUID.init(inst, def);
198
+ ZodStringFormat.init(inst, def);
199
+ });
200
+ const ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => {
201
+ $ZodIPv4.init(inst, def);
202
+ ZodStringFormat.init(inst, def);
203
+ });
204
+ const ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
205
+ $ZodIPv6.init(inst, def);
206
+ ZodStringFormat.init(inst, def);
207
+ });
208
+ const ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => {
209
+ $ZodCIDRv4.init(inst, def);
210
+ ZodStringFormat.init(inst, def);
211
+ });
212
+ const ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => {
213
+ $ZodCIDRv6.init(inst, def);
214
+ ZodStringFormat.init(inst, def);
215
+ });
216
+ const ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => {
217
+ $ZodBase64.init(inst, def);
218
+ ZodStringFormat.init(inst, def);
219
+ });
220
+ const ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => {
221
+ $ZodBase64URL.init(inst, def);
222
+ ZodStringFormat.init(inst, def);
223
+ });
224
+ const ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => {
225
+ $ZodE164.init(inst, def);
226
+ ZodStringFormat.init(inst, def);
227
+ });
228
+ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
229
+ $ZodJWT.init(inst, def);
230
+ ZodStringFormat.init(inst, def);
231
+ });
232
+ const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
233
+ $ZodNumber.init(inst, def);
234
+ ZodType.init(inst, def);
235
+ inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json);
236
+ inst.gt = (value, params) => inst.check(_gt(value, params));
237
+ inst.gte = (value, params) => inst.check(_gte(value, params));
238
+ inst.min = (value, params) => inst.check(_gte(value, params));
239
+ inst.lt = (value, params) => inst.check(_lt(value, params));
240
+ inst.lte = (value, params) => inst.check(_lte(value, params));
241
+ inst.max = (value, params) => inst.check(_lte(value, params));
242
+ inst.int = (params) => inst.check(int(params));
243
+ inst.safe = (params) => inst.check(int(params));
244
+ inst.positive = (params) => inst.check(_gt(0, params));
245
+ inst.nonnegative = (params) => inst.check(_gte(0, params));
246
+ inst.negative = (params) => inst.check(_lt(0, params));
247
+ inst.nonpositive = (params) => inst.check(_lte(0, params));
248
+ inst.multipleOf = (value, params) => inst.check(_multipleOf(value, params));
249
+ inst.step = (value, params) => inst.check(_multipleOf(value, params));
250
+ inst.finite = () => inst;
251
+ const bag = inst._zod.bag;
252
+ inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
253
+ inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
254
+ inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? 0.5);
255
+ inst.isFinite = true;
256
+ inst.format = bag.format ?? null;
257
+ });
258
+ function number(params) {
259
+ return _number(ZodNumber, params);
260
+ }
261
+ const ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => {
262
+ $ZodNumberFormat.init(inst, def);
263
+ ZodNumber.init(inst, def);
264
+ });
265
+ function int(params) {
266
+ return _int(ZodNumberFormat, params);
267
+ }
268
+ const ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
269
+ $ZodAny.init(inst, def);
270
+ ZodType.init(inst, def);
271
+ inst._zod.processJSONSchema = (ctx, json, params) => anyProcessor();
272
+ });
273
+ function any() {
274
+ return _any(ZodAny);
275
+ }
276
+ const ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
277
+ $ZodUnknown.init(inst, def);
278
+ ZodType.init(inst, def);
279
+ inst._zod.processJSONSchema = (ctx, json, params) => unknownProcessor();
280
+ });
281
+ function unknown() {
282
+ return _unknown(ZodUnknown);
283
+ }
284
+ const ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
285
+ $ZodNever.init(inst, def);
286
+ ZodType.init(inst, def);
287
+ inst._zod.processJSONSchema = (ctx, json, params) => neverProcessor(inst, ctx, json);
288
+ });
289
+ function never(params) {
290
+ return _never(ZodNever, params);
291
+ }
292
+ const ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
293
+ $ZodArray.init(inst, def);
294
+ ZodType.init(inst, def);
295
+ inst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);
296
+ inst.element = def.element;
297
+ inst.min = (minLength, params) => inst.check(_minLength(minLength, params));
298
+ inst.nonempty = (params) => inst.check(_minLength(1, params));
299
+ inst.max = (maxLength, params) => inst.check(_maxLength(maxLength, params));
300
+ inst.length = (len, params) => inst.check(_length(len, params));
301
+ inst.unwrap = () => inst.element;
302
+ });
303
+ function array(element, params) {
304
+ return _array(ZodArray, element, params);
305
+ }
306
+ const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
307
+ $ZodObjectJIT.init(inst, def);
308
+ ZodType.init(inst, def);
309
+ inst._zod.processJSONSchema = (ctx, json, params) => objectProcessor(inst, ctx, json, params);
310
+ defineLazy(inst, "shape", () => {
311
+ return def.shape;
312
+ });
313
+ inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
314
+ inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
315
+ inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
316
+ inst.loose = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
317
+ inst.strict = () => inst.clone({ ...inst._zod.def, catchall: never() });
318
+ inst.strip = () => inst.clone({ ...inst._zod.def, catchall: void 0 });
319
+ inst.extend = (incoming) => {
320
+ return extend(inst, incoming);
321
+ };
322
+ inst.safeExtend = (incoming) => {
323
+ return safeExtend(inst, incoming);
324
+ };
325
+ inst.merge = (other) => merge(inst, other);
326
+ inst.pick = (mask) => pick(inst, mask);
327
+ inst.omit = (mask) => omit(inst, mask);
328
+ inst.partial = (...args) => partial(ZodOptional, inst, args[0]);
329
+ inst.required = (...args) => required(ZodNonOptional, inst, args[0]);
330
+ });
331
+ function object(shape, params) {
332
+ const def = {
333
+ type: "object",
334
+ shape: shape ?? {},
335
+ ...normalizeParams(params)
336
+ };
337
+ return new ZodObject(def);
338
+ }
339
+ const ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
340
+ $ZodUnion.init(inst, def);
341
+ ZodType.init(inst, def);
342
+ inst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);
343
+ inst.options = def.options;
344
+ });
345
+ function union(options, params) {
346
+ return new ZodUnion({
347
+ type: "union",
348
+ options,
349
+ ...normalizeParams(params)
350
+ });
351
+ }
352
+ const ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
353
+ $ZodIntersection.init(inst, def);
354
+ ZodType.init(inst, def);
355
+ inst._zod.processJSONSchema = (ctx, json, params) => intersectionProcessor(inst, ctx, json, params);
356
+ });
357
+ function intersection(left, right) {
358
+ return new ZodIntersection({
359
+ type: "intersection",
360
+ left,
361
+ right
362
+ });
363
+ }
364
+ const ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
365
+ $ZodRecord.init(inst, def);
366
+ ZodType.init(inst, def);
367
+ inst._zod.processJSONSchema = (ctx, json, params) => recordProcessor(inst, ctx, json, params);
368
+ inst.keyType = def.keyType;
369
+ inst.valueType = def.valueType;
370
+ });
371
+ function record(keyType, valueType, params) {
372
+ return new ZodRecord({
373
+ type: "record",
374
+ keyType,
375
+ valueType,
376
+ ...normalizeParams(params)
377
+ });
378
+ }
379
+ const ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
380
+ $ZodEnum.init(inst, def);
381
+ ZodType.init(inst, def);
382
+ inst._zod.processJSONSchema = (ctx, json, params) => enumProcessor(inst, ctx, json);
383
+ inst.enum = def.entries;
384
+ inst.options = Object.values(def.entries);
385
+ const keys = new Set(Object.keys(def.entries));
386
+ inst.extract = (values, params) => {
387
+ const newEntries = {};
388
+ for (const value of values) {
389
+ if (keys.has(value)) {
390
+ newEntries[value] = def.entries[value];
391
+ } else
392
+ throw new Error(`Key ${value} not found in enum`);
393
+ }
394
+ return new ZodEnum({
395
+ ...def,
396
+ checks: [],
397
+ ...normalizeParams(params),
398
+ entries: newEntries
399
+ });
400
+ };
401
+ inst.exclude = (values, params) => {
402
+ const newEntries = { ...def.entries };
403
+ for (const value of values) {
404
+ if (keys.has(value)) {
405
+ delete newEntries[value];
406
+ } else
407
+ throw new Error(`Key ${value} not found in enum`);
408
+ }
409
+ return new ZodEnum({
410
+ ...def,
411
+ checks: [],
412
+ ...normalizeParams(params),
413
+ entries: newEntries
414
+ });
415
+ };
416
+ });
417
+ function _enum(values, params) {
418
+ const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;
419
+ return new ZodEnum({
420
+ type: "enum",
421
+ entries,
422
+ ...normalizeParams(params)
423
+ });
424
+ }
425
+ const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
426
+ $ZodTransform.init(inst, def);
427
+ ZodType.init(inst, def);
428
+ inst._zod.processJSONSchema = (ctx, json, params) => transformProcessor(inst, ctx);
429
+ inst._zod.parse = (payload, _ctx) => {
430
+ if (_ctx.direction === "backward") {
431
+ throw new $ZodEncodeError(inst.constructor.name);
432
+ }
433
+ payload.addIssue = (issue$1) => {
434
+ if (typeof issue$1 === "string") {
435
+ payload.issues.push(issue(issue$1, payload.value, def));
436
+ } else {
437
+ const _issue = issue$1;
438
+ if (_issue.fatal)
439
+ _issue.continue = false;
440
+ _issue.code ?? (_issue.code = "custom");
441
+ _issue.input ?? (_issue.input = payload.value);
442
+ _issue.inst ?? (_issue.inst = inst);
443
+ payload.issues.push(issue(_issue));
444
+ }
445
+ };
446
+ const output = def.transform(payload.value, payload);
447
+ if (output instanceof Promise) {
448
+ return output.then((output2) => {
449
+ payload.value = output2;
450
+ return payload;
451
+ });
452
+ }
453
+ payload.value = output;
454
+ return payload;
455
+ };
456
+ });
457
+ function transform(fn) {
458
+ return new ZodTransform({
459
+ type: "transform",
460
+ transform: fn
461
+ });
462
+ }
463
+ const ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
464
+ $ZodOptional.init(inst, def);
465
+ ZodType.init(inst, def);
466
+ inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
467
+ inst.unwrap = () => inst._zod.def.innerType;
468
+ });
469
+ function optional(innerType) {
470
+ return new ZodOptional({
471
+ type: "optional",
472
+ innerType
473
+ });
474
+ }
475
+ const ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => {
476
+ $ZodExactOptional.init(inst, def);
477
+ ZodType.init(inst, def);
478
+ inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
479
+ inst.unwrap = () => inst._zod.def.innerType;
480
+ });
481
+ function exactOptional(innerType) {
482
+ return new ZodExactOptional({
483
+ type: "optional",
484
+ innerType
485
+ });
486
+ }
487
+ const ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
488
+ $ZodNullable.init(inst, def);
489
+ ZodType.init(inst, def);
490
+ inst._zod.processJSONSchema = (ctx, json, params) => nullableProcessor(inst, ctx, json, params);
491
+ inst.unwrap = () => inst._zod.def.innerType;
492
+ });
493
+ function nullable(innerType) {
494
+ return new ZodNullable({
495
+ type: "nullable",
496
+ innerType
497
+ });
498
+ }
499
+ const ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
500
+ $ZodDefault.init(inst, def);
501
+ ZodType.init(inst, def);
502
+ inst._zod.processJSONSchema = (ctx, json, params) => defaultProcessor(inst, ctx, json, params);
503
+ inst.unwrap = () => inst._zod.def.innerType;
504
+ inst.removeDefault = inst.unwrap;
505
+ });
506
+ function _default(innerType, defaultValue) {
507
+ return new ZodDefault({
508
+ type: "default",
509
+ innerType,
510
+ get defaultValue() {
511
+ return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue);
512
+ }
513
+ });
514
+ }
515
+ const ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
516
+ $ZodPrefault.init(inst, def);
517
+ ZodType.init(inst, def);
518
+ inst._zod.processJSONSchema = (ctx, json, params) => prefaultProcessor(inst, ctx, json, params);
519
+ inst.unwrap = () => inst._zod.def.innerType;
520
+ });
521
+ function prefault(innerType, defaultValue) {
522
+ return new ZodPrefault({
523
+ type: "prefault",
524
+ innerType,
525
+ get defaultValue() {
526
+ return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue);
527
+ }
528
+ });
529
+ }
530
+ const ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
531
+ $ZodNonOptional.init(inst, def);
532
+ ZodType.init(inst, def);
533
+ inst._zod.processJSONSchema = (ctx, json, params) => nonoptionalProcessor(inst, ctx, json, params);
534
+ inst.unwrap = () => inst._zod.def.innerType;
535
+ });
536
+ function nonoptional(innerType, params) {
537
+ return new ZodNonOptional({
538
+ type: "nonoptional",
539
+ innerType,
540
+ ...normalizeParams(params)
541
+ });
542
+ }
543
+ const ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
544
+ $ZodCatch.init(inst, def);
545
+ ZodType.init(inst, def);
546
+ inst._zod.processJSONSchema = (ctx, json, params) => catchProcessor(inst, ctx, json, params);
547
+ inst.unwrap = () => inst._zod.def.innerType;
548
+ inst.removeCatch = inst.unwrap;
549
+ });
550
+ function _catch(innerType, catchValue) {
551
+ return new ZodCatch({
552
+ type: "catch",
553
+ innerType,
554
+ catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
555
+ });
556
+ }
557
+ const ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
558
+ $ZodPipe.init(inst, def);
559
+ ZodType.init(inst, def);
560
+ inst._zod.processJSONSchema = (ctx, json, params) => pipeProcessor(inst, ctx, json, params);
561
+ inst.in = def.in;
562
+ inst.out = def.out;
563
+ });
564
+ function pipe(in_, out) {
565
+ return new ZodPipe({
566
+ type: "pipe",
567
+ in: in_,
568
+ out
569
+ // ...util.normalizeParams(params),
570
+ });
571
+ }
572
+ const ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
573
+ $ZodReadonly.init(inst, def);
574
+ ZodType.init(inst, def);
575
+ inst._zod.processJSONSchema = (ctx, json, params) => readonlyProcessor(inst, ctx, json, params);
576
+ inst.unwrap = () => inst._zod.def.innerType;
577
+ });
578
+ function readonly(innerType) {
579
+ return new ZodReadonly({
580
+ type: "readonly",
581
+ innerType
582
+ });
583
+ }
584
+ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
585
+ $ZodCustom.init(inst, def);
586
+ ZodType.init(inst, def);
587
+ inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx);
588
+ });
589
+ function refine(fn, _params = {}) {
590
+ return _refine(ZodCustom, fn, _params);
591
+ }
592
+ function superRefine(fn) {
593
+ return _superRefine(fn);
594
+ }
595
+ export {
596
+ ZodAny,
597
+ ZodArray,
598
+ ZodBase64,
599
+ ZodBase64URL,
600
+ ZodCIDRv4,
601
+ ZodCIDRv6,
602
+ ZodCUID,
603
+ ZodCUID2,
604
+ ZodCatch,
605
+ ZodCustom,
606
+ ZodDefault,
607
+ ZodE164,
608
+ ZodEmail,
609
+ ZodEmoji,
610
+ ZodEnum,
611
+ ZodExactOptional,
612
+ ZodGUID,
613
+ ZodIPv4,
614
+ ZodIPv6,
615
+ ZodIntersection,
616
+ ZodJWT,
617
+ ZodKSUID,
618
+ ZodNanoID,
619
+ ZodNever,
620
+ ZodNonOptional,
621
+ ZodNullable,
622
+ ZodNumber,
623
+ ZodNumberFormat,
624
+ ZodObject,
625
+ ZodOptional,
626
+ ZodPipe,
627
+ ZodPrefault,
628
+ ZodReadonly,
629
+ ZodRecord,
630
+ ZodString,
631
+ ZodStringFormat,
632
+ ZodTransform,
633
+ ZodType,
634
+ ZodULID,
635
+ ZodURL,
636
+ ZodUUID,
637
+ ZodUnion,
638
+ ZodUnknown,
639
+ ZodXID,
640
+ _ZodString,
641
+ _default,
642
+ any,
643
+ array,
644
+ _catch as catch,
645
+ _enum as enum,
646
+ exactOptional,
647
+ int,
648
+ intersection,
649
+ never,
650
+ nonoptional,
651
+ nullable,
652
+ number,
653
+ object,
654
+ optional,
655
+ pipe,
656
+ prefault,
657
+ readonly,
658
+ record,
659
+ refine,
660
+ string,
661
+ superRefine,
662
+ transform,
663
+ union,
664
+ unknown
665
+ };