@lssm/lib.ui-kit 1.41.0 → 1.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/ui/organisms/ListPage/ListPage.js +1 -1
- package/package.json +4 -3
- package/dist/node_modules/@hookform/resolvers/dist/resolvers.js +0 -34
- package/dist/node_modules/@hookform/resolvers/zod/dist/zod.js +0 -118
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_default.js +0 -14
- package/dist/node_modules/@swc/helpers/cjs/_interop_require_wildcard.js +0 -35
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +0 -25
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +0 -24
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +0 -21
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +0 -17
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js +0 -17
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +0 -17
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +0 -17
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-left.js +0 -20
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-right.js +0 -20
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis.js +0 -33
- package/dist/node_modules/lucide-react/dist/esm/icons/funnel.js +0 -17
- package/dist/node_modules/lucide-react/dist/esm/icons/house.js +0 -20
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.js +0 -17
- package/dist/node_modules/lucide-react/dist/esm/icons/plus.js +0 -20
- package/dist/node_modules/lucide-react/dist/esm/icons/refresh-ccw.js +0 -31
- package/dist/node_modules/lucide-react/dist/esm/icons/refresh-cw.js +0 -31
- package/dist/node_modules/lucide-react/dist/esm/icons/search.js +0 -22
- package/dist/node_modules/lucide-react/dist/esm/icons/triangle-alert.js +0 -27
- package/dist/node_modules/lucide-react/dist/esm/icons/x.js +0 -20
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +0 -22
- package/dist/node_modules/next/dist/client/add-base-path.js +0 -30
- package/dist/node_modules/next/dist/client/add-locale.js +0 -29
- package/dist/node_modules/next/dist/client/detect-domain-locale.js +0 -26
- package/dist/node_modules/next/dist/client/get-domain-locale.js +0 -41
- package/dist/node_modules/next/dist/client/has-base-path.js +0 -28
- package/dist/node_modules/next/dist/client/link.js +0 -311
- package/dist/node_modules/next/dist/client/normalize-locale-path.js +0 -30
- package/dist/node_modules/next/dist/client/normalize-trailing-slash.js +0 -34
- package/dist/node_modules/next/dist/client/request-idle-callback.js +0 -44
- package/dist/node_modules/next/dist/client/resolve-href.js +0 -86
- package/dist/node_modules/next/dist/client/use-intersection.js +0 -104
- package/dist/node_modules/next/dist/client/use-merged-ref.js +0 -56
- package/dist/node_modules/next/dist/compiled/path-to-regexp/index.js +0 -372
- package/dist/node_modules/next/dist/lib/constants.js +0 -316
- package/dist/node_modules/next/dist/lib/route-pattern-normalizer.js +0 -69
- package/dist/node_modules/next/dist/shared/lib/escape-regexp.js +0 -23
- package/dist/node_modules/next/dist/shared/lib/i18n/detect-domain-locale.js +0 -22
- package/dist/node_modules/next/dist/shared/lib/i18n/normalize-locale-path.js +0 -42
- package/dist/node_modules/next/dist/shared/lib/invariant-error.js +0 -23
- package/dist/node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js +0 -23
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-locale.js +0 -30
- package/dist/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js +0 -24
- package/dist/node_modules/next/dist/shared/lib/router/utils/app-paths.js +0 -41
- package/dist/node_modules/next/dist/shared/lib/router/utils/format-url.js +0 -78
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +0 -151
- package/dist/node_modules/next/dist/shared/lib/router/utils/get-segment-param.js +0 -77
- package/dist/node_modules/next/dist/shared/lib/router/utils/index.js +0 -32
- package/dist/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +0 -92
- package/dist/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js +0 -41
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js +0 -26
- package/dist/node_modules/next/dist/shared/lib/router/utils/is-local-url.js +0 -31
- package/dist/node_modules/next/dist/shared/lib/router/utils/omit.js +0 -24
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-loader-tree.js +0 -33
- package/dist/node_modules/next/dist/shared/lib/router/utils/parse-path.js +0 -36
- package/dist/node_modules/next/dist/shared/lib/router/utils/path-has-prefix.js +0 -24
- package/dist/node_modules/next/dist/shared/lib/router/utils/querystring.js +0 -56
- package/dist/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js +0 -26
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-match-utils.js +0 -94
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +0 -46
- package/dist/node_modules/next/dist/shared/lib/router/utils/route-regex.js +0 -203
- package/dist/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +0 -167
- package/dist/node_modules/next/dist/shared/lib/router-context.shared-runtime.js +0 -20
- package/dist/node_modules/next/dist/shared/lib/segment.js +0 -80
- package/dist/node_modules/next/dist/shared/lib/utils/error-once.js +0 -25
- package/dist/node_modules/next/dist/shared/lib/utils.js +0 -172
- package/dist/node_modules/next/link.js +0 -12
- package/dist/node_modules/react-hook-form/dist/index.esm.js +0 -2074
- package/dist/node_modules/zod/v4/classic/errors.js +0 -29
- package/dist/node_modules/zod/v4/classic/iso.js +0 -37
- package/dist/node_modules/zod/v4/classic/parse.js +0 -19
- package/dist/node_modules/zod/v4/classic/schemas.js +0 -418
- package/dist/node_modules/zod/v4/core/api.js +0 -404
- package/dist/node_modules/zod/v4/core/checks.js +0 -225
- package/dist/node_modules/zod/v4/core/core.js +0 -61
- package/dist/node_modules/zod/v4/core/errors.js +0 -62
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +0 -148
- package/dist/node_modules/zod/v4/core/parse.js +0 -109
- package/dist/node_modules/zod/v4/core/regexes.js +0 -57
- package/dist/node_modules/zod/v4/core/registries.js +0 -52
- package/dist/node_modules/zod/v4/core/schemas.js +0 -744
- package/dist/node_modules/zod/v4/core/to-json-schema.js +0 -260
- package/dist/node_modules/zod/v4/core/util.js +0 -155
- package/dist/node_modules/zod/v4/core/versions.js +0 -9
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { $constructor } from "./core.js";
|
|
2
|
-
import { jsonStringifyReplacer } from "./util.js";
|
|
3
|
-
|
|
4
|
-
//#region ../../../node_modules/zod/v4/core/errors.js
|
|
5
|
-
const initializer = (inst, def) => {
|
|
6
|
-
inst.name = "$ZodError";
|
|
7
|
-
Object.defineProperty(inst, "_zod", {
|
|
8
|
-
value: inst._zod,
|
|
9
|
-
enumerable: false
|
|
10
|
-
});
|
|
11
|
-
Object.defineProperty(inst, "issues", {
|
|
12
|
-
value: def,
|
|
13
|
-
enumerable: false
|
|
14
|
-
});
|
|
15
|
-
inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
|
|
16
|
-
Object.defineProperty(inst, "toString", {
|
|
17
|
-
value: () => inst.message,
|
|
18
|
-
enumerable: false
|
|
19
|
-
});
|
|
20
|
-
};
|
|
21
|
-
const $ZodError = $constructor("$ZodError", initializer);
|
|
22
|
-
const $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
23
|
-
function flattenError(error, mapper = (issue) => issue.message) {
|
|
24
|
-
const fieldErrors = {};
|
|
25
|
-
const formErrors = [];
|
|
26
|
-
for (const sub of error.issues) if (sub.path.length > 0) {
|
|
27
|
-
fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
|
|
28
|
-
fieldErrors[sub.path[0]].push(mapper(sub));
|
|
29
|
-
} else formErrors.push(mapper(sub));
|
|
30
|
-
return {
|
|
31
|
-
formErrors,
|
|
32
|
-
fieldErrors
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
function formatError(error, mapper = (issue) => issue.message) {
|
|
36
|
-
const fieldErrors = { _errors: [] };
|
|
37
|
-
const processError = (error$1) => {
|
|
38
|
-
for (const issue of error$1.issues) if (issue.code === "invalid_union" && issue.errors.length) issue.errors.map((issues) => processError({ issues }));
|
|
39
|
-
else if (issue.code === "invalid_key") processError({ issues: issue.issues });
|
|
40
|
-
else if (issue.code === "invalid_element") processError({ issues: issue.issues });
|
|
41
|
-
else if (issue.path.length === 0) fieldErrors._errors.push(mapper(issue));
|
|
42
|
-
else {
|
|
43
|
-
let curr = fieldErrors;
|
|
44
|
-
let i = 0;
|
|
45
|
-
while (i < issue.path.length) {
|
|
46
|
-
const el = issue.path[i];
|
|
47
|
-
if (!(i === issue.path.length - 1)) curr[el] = curr[el] || { _errors: [] };
|
|
48
|
-
else {
|
|
49
|
-
curr[el] = curr[el] || { _errors: [] };
|
|
50
|
-
curr[el]._errors.push(mapper(issue));
|
|
51
|
-
}
|
|
52
|
-
curr = curr[el];
|
|
53
|
-
i++;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
processError(error);
|
|
58
|
-
return fieldErrors;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
//#endregion
|
|
62
|
-
export { $ZodError, $ZodRealError, flattenError, formatError };
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { process } from "./to-json-schema.js";
|
|
2
|
-
|
|
3
|
-
//#region ../../../node_modules/zod/v4/core/json-schema-processors.js
|
|
4
|
-
const formatMap = {
|
|
5
|
-
guid: "uuid",
|
|
6
|
-
url: "uri",
|
|
7
|
-
datetime: "date-time",
|
|
8
|
-
json_string: "json-string",
|
|
9
|
-
regex: ""
|
|
10
|
-
};
|
|
11
|
-
const stringProcessor = (schema, ctx, _json, _params) => {
|
|
12
|
-
const json = _json;
|
|
13
|
-
json.type = "string";
|
|
14
|
-
const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
|
|
15
|
-
if (typeof minimum === "number") json.minLength = minimum;
|
|
16
|
-
if (typeof maximum === "number") json.maxLength = maximum;
|
|
17
|
-
if (format) {
|
|
18
|
-
json.format = formatMap[format] ?? format;
|
|
19
|
-
if (json.format === "") delete json.format;
|
|
20
|
-
}
|
|
21
|
-
if (contentEncoding) json.contentEncoding = contentEncoding;
|
|
22
|
-
if (patterns && patterns.size > 0) {
|
|
23
|
-
const regexes = [...patterns];
|
|
24
|
-
if (regexes.length === 1) json.pattern = regexes[0].source;
|
|
25
|
-
else if (regexes.length > 1) json.allOf = [...regexes.map((regex) => ({
|
|
26
|
-
...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
|
|
27
|
-
pattern: regex.source
|
|
28
|
-
}))];
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
const customProcessor = (_schema, ctx, _json, _params) => {
|
|
32
|
-
if (ctx.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
|
|
33
|
-
};
|
|
34
|
-
const transformProcessor = (_schema, ctx, _json, _params) => {
|
|
35
|
-
if (ctx.unrepresentable === "throw") throw new Error("Transforms cannot be represented in JSON Schema");
|
|
36
|
-
};
|
|
37
|
-
const arrayProcessor = (schema, ctx, _json, params) => {
|
|
38
|
-
const json = _json;
|
|
39
|
-
const def = schema._zod.def;
|
|
40
|
-
const { minimum, maximum } = schema._zod.bag;
|
|
41
|
-
if (typeof minimum === "number") json.minItems = minimum;
|
|
42
|
-
if (typeof maximum === "number") json.maxItems = maximum;
|
|
43
|
-
json.type = "array";
|
|
44
|
-
json.items = process(def.element, ctx, {
|
|
45
|
-
...params,
|
|
46
|
-
path: [...params.path, "items"]
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
const unionProcessor = (schema, ctx, json, params) => {
|
|
50
|
-
const def = schema._zod.def;
|
|
51
|
-
const isExclusive = def.inclusive === false;
|
|
52
|
-
const options = def.options.map((x, i) => process(x, ctx, {
|
|
53
|
-
...params,
|
|
54
|
-
path: [
|
|
55
|
-
...params.path,
|
|
56
|
-
isExclusive ? "oneOf" : "anyOf",
|
|
57
|
-
i
|
|
58
|
-
]
|
|
59
|
-
}));
|
|
60
|
-
if (isExclusive) json.oneOf = options;
|
|
61
|
-
else json.anyOf = options;
|
|
62
|
-
};
|
|
63
|
-
const intersectionProcessor = (schema, ctx, json, params) => {
|
|
64
|
-
const def = schema._zod.def;
|
|
65
|
-
const a = process(def.left, ctx, {
|
|
66
|
-
...params,
|
|
67
|
-
path: [
|
|
68
|
-
...params.path,
|
|
69
|
-
"allOf",
|
|
70
|
-
0
|
|
71
|
-
]
|
|
72
|
-
});
|
|
73
|
-
const b = process(def.right, ctx, {
|
|
74
|
-
...params,
|
|
75
|
-
path: [
|
|
76
|
-
...params.path,
|
|
77
|
-
"allOf",
|
|
78
|
-
1
|
|
79
|
-
]
|
|
80
|
-
});
|
|
81
|
-
const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
|
|
82
|
-
json.allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
|
|
83
|
-
};
|
|
84
|
-
const nullableProcessor = (schema, ctx, json, params) => {
|
|
85
|
-
const def = schema._zod.def;
|
|
86
|
-
const inner = process(def.innerType, ctx, params);
|
|
87
|
-
const seen = ctx.seen.get(schema);
|
|
88
|
-
if (ctx.target === "openapi-3.0") {
|
|
89
|
-
seen.ref = def.innerType;
|
|
90
|
-
json.nullable = true;
|
|
91
|
-
} else json.anyOf = [inner, { type: "null" }];
|
|
92
|
-
};
|
|
93
|
-
const nonoptionalProcessor = (schema, ctx, _json, params) => {
|
|
94
|
-
const def = schema._zod.def;
|
|
95
|
-
process(def.innerType, ctx, params);
|
|
96
|
-
const seen = ctx.seen.get(schema);
|
|
97
|
-
seen.ref = def.innerType;
|
|
98
|
-
};
|
|
99
|
-
const defaultProcessor = (schema, ctx, json, params) => {
|
|
100
|
-
const def = schema._zod.def;
|
|
101
|
-
process(def.innerType, ctx, params);
|
|
102
|
-
const seen = ctx.seen.get(schema);
|
|
103
|
-
seen.ref = def.innerType;
|
|
104
|
-
json.default = JSON.parse(JSON.stringify(def.defaultValue));
|
|
105
|
-
};
|
|
106
|
-
const prefaultProcessor = (schema, ctx, json, params) => {
|
|
107
|
-
const def = schema._zod.def;
|
|
108
|
-
process(def.innerType, ctx, params);
|
|
109
|
-
const seen = ctx.seen.get(schema);
|
|
110
|
-
seen.ref = def.innerType;
|
|
111
|
-
if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
|
|
112
|
-
};
|
|
113
|
-
const catchProcessor = (schema, ctx, json, params) => {
|
|
114
|
-
const def = schema._zod.def;
|
|
115
|
-
process(def.innerType, ctx, params);
|
|
116
|
-
const seen = ctx.seen.get(schema);
|
|
117
|
-
seen.ref = def.innerType;
|
|
118
|
-
let catchValue;
|
|
119
|
-
try {
|
|
120
|
-
catchValue = def.catchValue(void 0);
|
|
121
|
-
} catch {
|
|
122
|
-
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
123
|
-
}
|
|
124
|
-
json.default = catchValue;
|
|
125
|
-
};
|
|
126
|
-
const pipeProcessor = (schema, ctx, _json, params) => {
|
|
127
|
-
const def = schema._zod.def;
|
|
128
|
-
const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
|
|
129
|
-
process(innerType, ctx, params);
|
|
130
|
-
const seen = ctx.seen.get(schema);
|
|
131
|
-
seen.ref = innerType;
|
|
132
|
-
};
|
|
133
|
-
const readonlyProcessor = (schema, ctx, json, params) => {
|
|
134
|
-
const def = schema._zod.def;
|
|
135
|
-
process(def.innerType, ctx, params);
|
|
136
|
-
const seen = ctx.seen.get(schema);
|
|
137
|
-
seen.ref = def.innerType;
|
|
138
|
-
json.readOnly = true;
|
|
139
|
-
};
|
|
140
|
-
const optionalProcessor = (schema, ctx, _json, params) => {
|
|
141
|
-
const def = schema._zod.def;
|
|
142
|
-
process(def.innerType, ctx, params);
|
|
143
|
-
const seen = ctx.seen.get(schema);
|
|
144
|
-
seen.ref = def.innerType;
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
//#endregion
|
|
148
|
-
export { arrayProcessor, catchProcessor, customProcessor, defaultProcessor, intersectionProcessor, nonoptionalProcessor, nullableProcessor, optionalProcessor, pipeProcessor, prefaultProcessor, readonlyProcessor, stringProcessor, transformProcessor, unionProcessor };
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
import { $ZodAsyncError, config } from "./core.js";
|
|
2
|
-
import { captureStackTrace, finalizeIssue } from "./util.js";
|
|
3
|
-
import { $ZodError, $ZodRealError } from "./errors.js";
|
|
4
|
-
|
|
5
|
-
//#region ../../../node_modules/zod/v4/core/parse.js
|
|
6
|
-
const _parse = (_Err) => (schema, value, _ctx, _params) => {
|
|
7
|
-
const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
|
|
8
|
-
const result = schema._zod.run({
|
|
9
|
-
value,
|
|
10
|
-
issues: []
|
|
11
|
-
}, ctx);
|
|
12
|
-
if (result instanceof Promise) throw new $ZodAsyncError();
|
|
13
|
-
if (result.issues.length) {
|
|
14
|
-
const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
15
|
-
captureStackTrace(e, _params?.callee);
|
|
16
|
-
throw e;
|
|
17
|
-
}
|
|
18
|
-
return result.value;
|
|
19
|
-
};
|
|
20
|
-
const parse = /* @__PURE__ */ _parse($ZodRealError);
|
|
21
|
-
const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
|
|
22
|
-
const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
|
|
23
|
-
let result = schema._zod.run({
|
|
24
|
-
value,
|
|
25
|
-
issues: []
|
|
26
|
-
}, ctx);
|
|
27
|
-
if (result instanceof Promise) result = await result;
|
|
28
|
-
if (result.issues.length) {
|
|
29
|
-
const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
30
|
-
captureStackTrace(e, params?.callee);
|
|
31
|
-
throw e;
|
|
32
|
-
}
|
|
33
|
-
return result.value;
|
|
34
|
-
};
|
|
35
|
-
const parseAsync = /* @__PURE__ */ _parseAsync($ZodRealError);
|
|
36
|
-
const _safeParse = (_Err) => (schema, value, _ctx) => {
|
|
37
|
-
const ctx = _ctx ? {
|
|
38
|
-
..._ctx,
|
|
39
|
-
async: false
|
|
40
|
-
} : { async: false };
|
|
41
|
-
const result = schema._zod.run({
|
|
42
|
-
value,
|
|
43
|
-
issues: []
|
|
44
|
-
}, ctx);
|
|
45
|
-
if (result instanceof Promise) throw new $ZodAsyncError();
|
|
46
|
-
return result.issues.length ? {
|
|
47
|
-
success: false,
|
|
48
|
-
error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
|
|
49
|
-
} : {
|
|
50
|
-
success: true,
|
|
51
|
-
data: result.value
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
const safeParse = /* @__PURE__ */ _safeParse($ZodRealError);
|
|
55
|
-
const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
|
|
56
|
-
const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
|
|
57
|
-
let result = schema._zod.run({
|
|
58
|
-
value,
|
|
59
|
-
issues: []
|
|
60
|
-
}, ctx);
|
|
61
|
-
if (result instanceof Promise) result = await result;
|
|
62
|
-
return result.issues.length ? {
|
|
63
|
-
success: false,
|
|
64
|
-
error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
|
|
65
|
-
} : {
|
|
66
|
-
success: true,
|
|
67
|
-
data: result.value
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
const safeParseAsync = /* @__PURE__ */ _safeParseAsync($ZodRealError);
|
|
71
|
-
const _encode = (_Err) => (schema, value, _ctx) => {
|
|
72
|
-
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
73
|
-
return _parse(_Err)(schema, value, ctx);
|
|
74
|
-
};
|
|
75
|
-
const encode = /* @__PURE__ */ _encode($ZodRealError);
|
|
76
|
-
const _decode = (_Err) => (schema, value, _ctx) => {
|
|
77
|
-
return _parse(_Err)(schema, value, _ctx);
|
|
78
|
-
};
|
|
79
|
-
const decode = /* @__PURE__ */ _decode($ZodRealError);
|
|
80
|
-
const _encodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
81
|
-
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
82
|
-
return _parseAsync(_Err)(schema, value, ctx);
|
|
83
|
-
};
|
|
84
|
-
const encodeAsync = /* @__PURE__ */ _encodeAsync($ZodRealError);
|
|
85
|
-
const _decodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
86
|
-
return _parseAsync(_Err)(schema, value, _ctx);
|
|
87
|
-
};
|
|
88
|
-
const decodeAsync = /* @__PURE__ */ _decodeAsync($ZodRealError);
|
|
89
|
-
const _safeEncode = (_Err) => (schema, value, _ctx) => {
|
|
90
|
-
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
91
|
-
return _safeParse(_Err)(schema, value, ctx);
|
|
92
|
-
};
|
|
93
|
-
const safeEncode = /* @__PURE__ */ _safeEncode($ZodRealError);
|
|
94
|
-
const _safeDecode = (_Err) => (schema, value, _ctx) => {
|
|
95
|
-
return _safeParse(_Err)(schema, value, _ctx);
|
|
96
|
-
};
|
|
97
|
-
const safeDecode = /* @__PURE__ */ _safeDecode($ZodRealError);
|
|
98
|
-
const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
99
|
-
const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
|
|
100
|
-
return _safeParseAsync(_Err)(schema, value, ctx);
|
|
101
|
-
};
|
|
102
|
-
const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
|
|
103
|
-
const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
|
|
104
|
-
return _safeParseAsync(_Err)(schema, value, _ctx);
|
|
105
|
-
};
|
|
106
|
-
const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
|
|
107
|
-
|
|
108
|
-
//#endregion
|
|
109
|
-
export { _decode, _decodeAsync, _encode, _encodeAsync, _parse, _parseAsync, _safeDecode, _safeDecodeAsync, _safeEncode, _safeEncodeAsync, _safeParse, _safeParseAsync, parse, parseAsync, safeParse, safeParseAsync };
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
//#region ../../../node_modules/zod/v4/core/regexes.js
|
|
2
|
-
const cuid = /^[cC][^\s-]{8,}$/;
|
|
3
|
-
const cuid2 = /^[0-9a-z]+$/;
|
|
4
|
-
const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
|
|
5
|
-
const xid = /^[0-9a-vA-V]{20}$/;
|
|
6
|
-
const ksuid = /^[A-Za-z0-9]{27}$/;
|
|
7
|
-
const nanoid = /^[a-zA-Z0-9_-]{21}$/;
|
|
8
|
-
/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */
|
|
9
|
-
const duration = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
|
|
10
|
-
/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */
|
|
11
|
-
const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
|
|
12
|
-
/** Returns a regex for validating an RFC 9562/4122 UUID.
|
|
13
|
-
*
|
|
14
|
-
* @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
|
|
15
|
-
const uuid = (version) => {
|
|
16
|
-
if (!version) return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;
|
|
17
|
-
return /* @__PURE__ */ new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
|
|
18
|
-
};
|
|
19
|
-
/** Practical email validation */
|
|
20
|
-
const email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
|
|
21
|
-
const _emoji = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
|
|
22
|
-
function emoji() {
|
|
23
|
-
return new RegExp(_emoji, "u");
|
|
24
|
-
}
|
|
25
|
-
const ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
|
26
|
-
const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
|
|
27
|
-
const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
|
|
28
|
-
const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
29
|
-
const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
|
|
30
|
-
const base64url = /^[A-Za-z0-9_-]*$/;
|
|
31
|
-
const e164 = /^\+(?:[0-9]){6,14}[0-9]$/;
|
|
32
|
-
const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
|
|
33
|
-
const date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
34
|
-
function timeSource(args) {
|
|
35
|
-
const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
|
|
36
|
-
return typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
37
|
-
}
|
|
38
|
-
function time(args) {
|
|
39
|
-
return /* @__PURE__ */ new RegExp(`^${timeSource(args)}$`);
|
|
40
|
-
}
|
|
41
|
-
function datetime(args) {
|
|
42
|
-
const time$1 = timeSource({ precision: args.precision });
|
|
43
|
-
const opts = ["Z"];
|
|
44
|
-
if (args.local) opts.push("");
|
|
45
|
-
if (args.offset) opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);
|
|
46
|
-
const timeRegex = `${time$1}(?:${opts.join("|")})`;
|
|
47
|
-
return /* @__PURE__ */ new RegExp(`^${dateSource}T(?:${timeRegex})$`);
|
|
48
|
-
}
|
|
49
|
-
const string = (params) => {
|
|
50
|
-
const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
|
|
51
|
-
return /* @__PURE__ */ new RegExp(`^${regex}$`);
|
|
52
|
-
};
|
|
53
|
-
const lowercase = /^[^A-Z]*$/;
|
|
54
|
-
const uppercase = /^[^a-z]*$/;
|
|
55
|
-
|
|
56
|
-
//#endregion
|
|
57
|
-
export { base64, base64url, cidrv4, cidrv6, cuid, cuid2, date, datetime, duration, e164, email, emoji, guid, ipv4, ipv6, ksuid, lowercase, nanoid, string, time, ulid, uppercase, uuid, xid };
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
//#region ../../../node_modules/zod/v4/core/registries.js
|
|
2
|
-
var _a;
|
|
3
|
-
var $ZodRegistry = class {
|
|
4
|
-
constructor() {
|
|
5
|
-
this._map = /* @__PURE__ */ new WeakMap();
|
|
6
|
-
this._idmap = /* @__PURE__ */ new Map();
|
|
7
|
-
}
|
|
8
|
-
add(schema, ..._meta) {
|
|
9
|
-
const meta = _meta[0];
|
|
10
|
-
this._map.set(schema, meta);
|
|
11
|
-
if (meta && typeof meta === "object" && "id" in meta) {
|
|
12
|
-
if (this._idmap.has(meta.id)) throw new Error(`ID ${meta.id} already exists in the registry`);
|
|
13
|
-
this._idmap.set(meta.id, schema);
|
|
14
|
-
}
|
|
15
|
-
return this;
|
|
16
|
-
}
|
|
17
|
-
clear() {
|
|
18
|
-
this._map = /* @__PURE__ */ new WeakMap();
|
|
19
|
-
this._idmap = /* @__PURE__ */ new Map();
|
|
20
|
-
return this;
|
|
21
|
-
}
|
|
22
|
-
remove(schema) {
|
|
23
|
-
const meta = this._map.get(schema);
|
|
24
|
-
if (meta && typeof meta === "object" && "id" in meta) this._idmap.delete(meta.id);
|
|
25
|
-
this._map.delete(schema);
|
|
26
|
-
return this;
|
|
27
|
-
}
|
|
28
|
-
get(schema) {
|
|
29
|
-
const p = schema._zod.parent;
|
|
30
|
-
if (p) {
|
|
31
|
-
const pm = { ...this.get(p) ?? {} };
|
|
32
|
-
delete pm.id;
|
|
33
|
-
const f = {
|
|
34
|
-
...pm,
|
|
35
|
-
...this._map.get(schema)
|
|
36
|
-
};
|
|
37
|
-
return Object.keys(f).length ? f : void 0;
|
|
38
|
-
}
|
|
39
|
-
return this._map.get(schema);
|
|
40
|
-
}
|
|
41
|
-
has(schema) {
|
|
42
|
-
return this._map.has(schema);
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
function registry() {
|
|
46
|
-
return new $ZodRegistry();
|
|
47
|
-
}
|
|
48
|
-
(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
|
|
49
|
-
const globalRegistry = globalThis.__zod_globalRegistry;
|
|
50
|
-
|
|
51
|
-
//#endregion
|
|
52
|
-
export { globalRegistry };
|