langgraph-ui-components 0.0.13 → 0.0.14
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/index.es107.js +4 -4
- package/dist/index.es109.js +1 -1
- package/dist/index.es115.js +1 -1
- package/dist/index.es119.js +1 -1
- package/dist/index.es121.js +1 -1
- package/dist/index.es122.js +9 -9
- package/dist/index.es129.js +2 -2
- package/dist/index.es13.js +6 -6
- package/dist/index.es132.js +2 -2
- package/dist/index.es141.js +1 -1
- package/dist/index.es142.js +2 -2
- package/dist/index.es143.js +1 -1
- package/dist/index.es156.js +1 -1
- package/dist/index.es16.js +1 -1
- package/dist/index.es164.js +1 -1
- package/dist/index.es165.js +1 -1
- package/dist/index.es166.js +1 -1
- package/dist/index.es167.js +1 -1
- package/dist/index.es168.js +1 -1
- package/dist/index.es169.js +1 -1
- package/dist/index.es170.js +1 -1
- package/dist/index.es171.js +1 -1
- package/dist/index.es172.js +1 -1
- package/dist/index.es173.js +1 -1
- package/dist/index.es174.js +1 -1
- package/dist/index.es175.js +1 -1
- package/dist/index.es176.js +1 -1
- package/dist/index.es177.js +1 -1
- package/dist/index.es178.js +1 -1
- package/dist/index.es179.js +1 -1
- package/dist/index.es180.js +1 -1
- package/dist/index.es181.js +1 -1
- package/dist/index.es182.js +1 -1
- package/dist/index.es183.js +1 -1
- package/dist/index.es184.js +1 -1
- package/dist/index.es185.js +1 -1
- package/dist/index.es186.js +1 -1
- package/dist/index.es187.js +1 -1
- package/dist/index.es188.js +1 -1
- package/dist/index.es189.js +1 -1
- package/dist/index.es190.js +1 -1
- package/dist/index.es191.js +1 -1
- package/dist/index.es192.js +1 -1
- package/dist/index.es193.js +1 -1
- package/dist/index.es194.js +1 -1
- package/dist/index.es195.js +1 -1
- package/dist/index.es196.js +1 -1
- package/dist/index.es197.js +1 -1
- package/dist/index.es198.js +1 -1
- package/dist/index.es199.js +1 -1
- package/dist/index.es2.js +30 -24
- package/dist/index.es2.js.map +1 -1
- package/dist/index.es20.js +2 -2
- package/dist/index.es200.js +1 -1
- package/dist/index.es201.js +1 -1
- package/dist/index.es202.js +1 -1
- package/dist/index.es203.js +1 -1
- package/dist/index.es204.js +1 -1
- package/dist/index.es205.js +1 -1
- package/dist/index.es206.js +1 -1
- package/dist/index.es207.js +1 -1
- package/dist/index.es208.js +1 -1
- package/dist/index.es214.js +4 -2
- package/dist/index.es214.js.map +1 -1
- package/dist/index.es215.js +2 -2
- package/dist/index.es216.js +2 -2
- package/dist/index.es217.js +2 -2
- package/dist/index.es218.js +2 -2
- package/dist/index.es219.js +2 -2
- package/dist/index.es22.js +15 -119
- package/dist/index.es22.js.map +1 -1
- package/dist/index.es220.js +2 -2
- package/dist/index.es221.js +2 -2
- package/dist/index.es222.js +2 -2
- package/dist/index.es223.js +2 -2
- package/dist/index.es224.js +2 -2
- package/dist/index.es225.js +2 -2
- package/dist/index.es226.js +2 -2
- package/dist/index.es227.js +2 -2
- package/dist/index.es228.js +2 -2
- package/dist/index.es229.js +2 -2
- package/dist/index.es23.js +64 -17
- package/dist/index.es23.js.map +1 -1
- package/dist/index.es230.js +2 -2
- package/dist/index.es231.js +2 -2
- package/dist/index.es232.js +2 -2
- package/dist/index.es233.js +2 -2
- package/dist/index.es234.js +2 -2
- package/dist/index.es235.js +2 -2
- package/dist/index.es236.js +2 -2
- package/dist/index.es237.js +2 -2
- package/dist/index.es238.js +2 -2
- package/dist/index.es239.js +2 -2
- package/dist/index.es24.js +29 -60
- package/dist/index.es24.js.map +1 -1
- package/dist/index.es240.js +2 -2
- package/dist/index.es241.js +2 -2
- package/dist/index.es242.js +2 -2
- package/dist/index.es243.js +2 -2
- package/dist/index.es244.js +2 -2
- package/dist/index.es245.js +2 -2
- package/dist/index.es246.js +2 -2
- package/dist/index.es247.js +2 -2
- package/dist/index.es248.js +2 -2
- package/dist/index.es249.js +2 -2
- package/dist/index.es25.js +145 -28
- package/dist/index.es25.js.map +1 -1
- package/dist/index.es250.js +2 -2
- package/dist/index.es251.js +2 -2
- package/dist/index.es252.js +2 -2
- package/dist/index.es253.js +2 -2
- package/dist/index.es254.js +2 -2
- package/dist/index.es255.js +2 -2
- package/dist/index.es256.js +2 -2
- package/dist/index.es257.js +2 -2
- package/dist/index.es258.js +2 -2
- package/dist/index.es259.js +2 -4
- package/dist/index.es259.js.map +1 -1
- package/dist/index.es26.js +100 -144
- package/dist/index.es26.js.map +1 -1
- package/dist/index.es260.js +8 -5
- package/dist/index.es260.js.map +1 -1
- package/dist/index.es261.js +5 -13
- package/dist/index.es261.js.map +1 -1
- package/dist/index.es262.js +12 -5
- package/dist/index.es262.js.map +1 -1
- package/dist/index.es263.js +6 -8
- package/dist/index.es263.js.map +1 -1
- package/dist/index.es267.js +63 -6
- package/dist/index.es267.js.map +1 -1
- package/dist/index.es268.js +21 -102
- package/dist/index.es268.js.map +1 -1
- package/dist/index.es269.js +5 -118
- package/dist/index.es269.js.map +1 -1
- package/dist/index.es27.js +66 -101
- package/dist/index.es27.js.map +1 -1
- package/dist/index.es270.js +330 -117
- package/dist/index.es270.js.map +1 -1
- package/dist/index.es271.js +6 -114
- package/dist/index.es271.js.map +1 -1
- package/dist/index.es272.js +103 -6
- package/dist/index.es272.js.map +1 -1
- package/dist/index.es273.js +112 -57
- package/dist/index.es273.js.map +1 -1
- package/dist/index.es274.js +135 -21
- package/dist/index.es274.js.map +1 -1
- package/dist/index.es275.js +114 -5
- package/dist/index.es275.js.map +1 -1
- package/dist/index.es276.js +6 -349
- package/dist/index.es276.js.map +1 -1
- package/dist/index.es28.js +121 -68
- package/dist/index.es28.js.map +1 -1
- package/dist/index.es280.js +3726 -131
- package/dist/index.es280.js.map +1 -1
- package/dist/index.es281.js +342 -2
- package/dist/index.es281.js.map +1 -1
- package/dist/index.es282.js +76 -3704
- package/dist/index.es282.js.map +1 -1
- package/dist/index.es283.js +117 -326
- package/dist/index.es283.js.map +1 -1
- package/dist/index.es284.js +13 -107
- package/dist/index.es284.js.map +1 -1
- package/dist/index.es285.js +142 -123
- package/dist/index.es285.js.map +1 -1
- package/dist/index.es286.js +13 -13
- package/dist/index.es286.js.map +1 -1
- package/dist/index.es287.js +6 -150
- package/dist/index.es287.js.map +1 -1
- package/dist/index.es288.js +19 -13
- package/dist/index.es288.js.map +1 -1
- package/dist/index.es289.js +88 -6
- package/dist/index.es289.js.map +1 -1
- package/dist/index.es29.js +1 -1
- package/dist/index.es290.js +238 -16
- package/dist/index.es290.js.map +1 -1
- package/dist/index.es291.js +22 -88
- package/dist/index.es291.js.map +1 -1
- package/dist/index.es292.js +6 -243
- package/dist/index.es292.js.map +1 -1
- package/dist/index.es293.js +4 -24
- package/dist/index.es293.js.map +1 -1
- package/dist/index.es294.js +18 -6
- package/dist/index.es294.js.map +1 -1
- package/dist/index.es295.js +8 -4
- package/dist/index.es295.js.map +1 -1
- package/dist/index.es296.js +141 -17
- package/dist/index.es296.js.map +1 -1
- package/dist/index.es297.js +2 -8
- package/dist/index.es297.js.map +1 -1
- package/dist/index.es50.js +208 -5
- package/dist/index.es50.js.map +1 -1
- package/dist/index.es51.js +138 -202
- package/dist/index.es51.js.map +1 -1
- package/dist/index.es52.js +42 -141
- package/dist/index.es52.js.map +1 -1
- package/dist/index.es53.js +5 -45
- package/dist/index.es53.js.map +1 -1
- package/dist/index.es7.js +5 -25
- package/dist/index.es7.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es268.js
CHANGED
|
@@ -1,106 +1,25 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
break;
|
|
19
|
-
case ZodIssueCode.invalid_union:
|
|
20
|
-
message = `Invalid input`;
|
|
21
|
-
break;
|
|
22
|
-
case ZodIssueCode.invalid_union_discriminator:
|
|
23
|
-
message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;
|
|
24
|
-
break;
|
|
25
|
-
case ZodIssueCode.invalid_enum_value:
|
|
26
|
-
message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;
|
|
27
|
-
break;
|
|
28
|
-
case ZodIssueCode.invalid_arguments:
|
|
29
|
-
message = `Invalid function arguments`;
|
|
30
|
-
break;
|
|
31
|
-
case ZodIssueCode.invalid_return_type:
|
|
32
|
-
message = `Invalid function return type`;
|
|
33
|
-
break;
|
|
34
|
-
case ZodIssueCode.invalid_date:
|
|
35
|
-
message = `Invalid date`;
|
|
36
|
-
break;
|
|
37
|
-
case ZodIssueCode.invalid_string:
|
|
38
|
-
if (typeof issue.validation === "object") {
|
|
39
|
-
if ("includes" in issue.validation) {
|
|
40
|
-
message = `Invalid input: must include "${issue.validation.includes}"`;
|
|
41
|
-
if (typeof issue.validation.position === "number") {
|
|
42
|
-
message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;
|
|
43
|
-
}
|
|
44
|
-
} else if ("startsWith" in issue.validation) {
|
|
45
|
-
message = `Invalid input: must start with "${issue.validation.startsWith}"`;
|
|
46
|
-
} else if ("endsWith" in issue.validation) {
|
|
47
|
-
message = `Invalid input: must end with "${issue.validation.endsWith}"`;
|
|
48
|
-
} else {
|
|
49
|
-
util.assertNever(issue.validation);
|
|
50
|
-
}
|
|
51
|
-
} else if (issue.validation !== "regex") {
|
|
52
|
-
message = `Invalid ${issue.validation}`;
|
|
53
|
-
} else {
|
|
54
|
-
message = "Invalid";
|
|
55
|
-
}
|
|
56
|
-
break;
|
|
57
|
-
case ZodIssueCode.too_small:
|
|
58
|
-
if (issue.type === "array")
|
|
59
|
-
message = `Array must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;
|
|
60
|
-
else if (issue.type === "string")
|
|
61
|
-
message = `String must contain ${issue.exact ? "exactly" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;
|
|
62
|
-
else if (issue.type === "number")
|
|
63
|
-
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
64
|
-
else if (issue.type === "bigint")
|
|
65
|
-
message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;
|
|
66
|
-
else if (issue.type === "date")
|
|
67
|
-
message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;
|
|
68
|
-
else
|
|
69
|
-
message = "Invalid input";
|
|
70
|
-
break;
|
|
71
|
-
case ZodIssueCode.too_big:
|
|
72
|
-
if (issue.type === "array")
|
|
73
|
-
message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;
|
|
74
|
-
else if (issue.type === "string")
|
|
75
|
-
message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;
|
|
76
|
-
else if (issue.type === "number")
|
|
77
|
-
message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
|
|
78
|
-
else if (issue.type === "bigint")
|
|
79
|
-
message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;
|
|
80
|
-
else if (issue.type === "date")
|
|
81
|
-
message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;
|
|
82
|
-
else
|
|
83
|
-
message = "Invalid input";
|
|
84
|
-
break;
|
|
85
|
-
case ZodIssueCode.custom:
|
|
86
|
-
message = `Invalid input`;
|
|
87
|
-
break;
|
|
88
|
-
case ZodIssueCode.invalid_intersection_types:
|
|
89
|
-
message = `Intersection results could not be merged`;
|
|
90
|
-
break;
|
|
91
|
-
case ZodIssueCode.not_multiple_of:
|
|
92
|
-
message = `Number must be a multiple of ${issue.multipleOf}`;
|
|
93
|
-
break;
|
|
94
|
-
case ZodIssueCode.not_finite:
|
|
95
|
-
message = "Number must be finite";
|
|
96
|
-
break;
|
|
97
|
-
default:
|
|
98
|
-
message = _ctx.defaultError;
|
|
99
|
-
util.assertNever(issue);
|
|
100
|
-
}
|
|
101
|
-
return { message };
|
|
1
|
+
import { $constructor } from "./index.es267.js";
|
|
2
|
+
import { jsonStringifyReplacer } from "./index.es128.js";
|
|
3
|
+
const initializer = (inst, def) => {
|
|
4
|
+
inst.name = "$ZodError";
|
|
5
|
+
Object.defineProperty(inst, "_zod", {
|
|
6
|
+
value: inst._zod,
|
|
7
|
+
enumerable: false
|
|
8
|
+
});
|
|
9
|
+
Object.defineProperty(inst, "issues", {
|
|
10
|
+
value: def,
|
|
11
|
+
enumerable: false
|
|
12
|
+
});
|
|
13
|
+
inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
|
|
14
|
+
Object.defineProperty(inst, "toString", {
|
|
15
|
+
value: () => inst.message,
|
|
16
|
+
enumerable: false
|
|
17
|
+
});
|
|
102
18
|
};
|
|
19
|
+
const $ZodError = $constructor("$ZodError", initializer);
|
|
20
|
+
const $ZodRealError = $constructor("$ZodError", initializer, { Parent: Error });
|
|
103
21
|
export {
|
|
104
|
-
|
|
22
|
+
$ZodError,
|
|
23
|
+
$ZodRealError
|
|
105
24
|
};
|
|
106
25
|
//# sourceMappingURL=index.es268.js.map
|
package/dist/index.es268.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es268.js","sources":["../node_modules/.pnpm/zod@4.3.5/node_modules/zod/
|
|
1
|
+
{"version":3,"file":"index.es268.js","sources":["../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/errors.js"],"sourcesContent":["import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod,\n enumerable: false,\n });\n Object.defineProperty(inst, \"issues\", {\n value: def,\n enumerable: false,\n });\n inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);\n Object.defineProperty(inst, \"toString\", {\n value: () => inst.message,\n enumerable: false,\n });\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, { Parent: Error });\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues });\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues });\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a, _b;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, issue.path));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_b = curr.items)[el] ?? (_b[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`✖ ${issue.message}`);\n if (issue.path?.length)\n lines.push(` → at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n"],"names":["util.jsonStringifyReplacer"],"mappings":";;AAEA,MAAM,cAAc,CAAC,MAAM,QAAQ;AAC/B,OAAK,OAAO;AACZ,SAAO,eAAe,MAAM,QAAQ;AAAA,IAChC,OAAO,KAAK;AAAA,IACZ,YAAY;AAAA,EACpB,CAAK;AACD,SAAO,eAAe,MAAM,UAAU;AAAA,IAClC,OAAO;AAAA,IACP,YAAY;AAAA,EACpB,CAAK;AACD,OAAK,UAAU,KAAK,UAAU,KAAKA,uBAA4B,CAAC;AAChE,SAAO,eAAe,MAAM,YAAY;AAAA,IACpC,OAAO,MAAM,KAAK;AAAA,IAClB,YAAY;AAAA,EACpB,CAAK;AACL;AACY,MAAC,YAAY,aAAa,aAAa,WAAW;AAClD,MAAC,gBAAgB,aAAa,aAAa,aAAa,EAAE,QAAQ,MAAK,CAAE;","x_google_ignoreList":[0]}
|
package/dist/index.es269.js
CHANGED
|
@@ -1,122 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const fullPath = [...path, ...issueData.path || []];
|
|
6
|
-
const fullIssue = {
|
|
7
|
-
...issueData,
|
|
8
|
-
path: fullPath
|
|
9
|
-
};
|
|
10
|
-
if (issueData.message !== void 0) {
|
|
11
|
-
return {
|
|
12
|
-
...issueData,
|
|
13
|
-
path: fullPath,
|
|
14
|
-
message: issueData.message
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
let errorMessage = "";
|
|
18
|
-
const maps = errorMaps.filter((m) => !!m).slice().reverse();
|
|
19
|
-
for (const map of maps) {
|
|
20
|
-
errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;
|
|
21
|
-
}
|
|
22
|
-
return {
|
|
23
|
-
...issueData,
|
|
24
|
-
path: fullPath,
|
|
25
|
-
message: errorMessage
|
|
26
|
-
};
|
|
1
|
+
const version = {
|
|
2
|
+
major: 4,
|
|
3
|
+
minor: 3,
|
|
4
|
+
patch: 5
|
|
27
5
|
};
|
|
28
|
-
function addIssueToContext(ctx, issueData) {
|
|
29
|
-
const overrideMap = getErrorMap();
|
|
30
|
-
const issue = makeIssue({
|
|
31
|
-
issueData,
|
|
32
|
-
data: ctx.data,
|
|
33
|
-
path: ctx.path,
|
|
34
|
-
errorMaps: [
|
|
35
|
-
ctx.common.contextualErrorMap,
|
|
36
|
-
// contextual error map is first priority
|
|
37
|
-
ctx.schemaErrorMap,
|
|
38
|
-
// then schema-bound map if available
|
|
39
|
-
overrideMap,
|
|
40
|
-
// then global override map
|
|
41
|
-
overrideMap === errorMap ? void 0 : errorMap
|
|
42
|
-
// then global default map
|
|
43
|
-
].filter((x) => !!x)
|
|
44
|
-
});
|
|
45
|
-
ctx.common.issues.push(issue);
|
|
46
|
-
}
|
|
47
|
-
class ParseStatus {
|
|
48
|
-
constructor() {
|
|
49
|
-
this.value = "valid";
|
|
50
|
-
}
|
|
51
|
-
dirty() {
|
|
52
|
-
if (this.value === "valid")
|
|
53
|
-
this.value = "dirty";
|
|
54
|
-
}
|
|
55
|
-
abort() {
|
|
56
|
-
if (this.value !== "aborted")
|
|
57
|
-
this.value = "aborted";
|
|
58
|
-
}
|
|
59
|
-
static mergeArray(status, results) {
|
|
60
|
-
const arrayValue = [];
|
|
61
|
-
for (const s of results) {
|
|
62
|
-
if (s.status === "aborted")
|
|
63
|
-
return INVALID;
|
|
64
|
-
if (s.status === "dirty")
|
|
65
|
-
status.dirty();
|
|
66
|
-
arrayValue.push(s.value);
|
|
67
|
-
}
|
|
68
|
-
return { status: status.value, value: arrayValue };
|
|
69
|
-
}
|
|
70
|
-
static async mergeObjectAsync(status, pairs) {
|
|
71
|
-
const syncPairs = [];
|
|
72
|
-
for (const pair of pairs) {
|
|
73
|
-
const key = await pair.key;
|
|
74
|
-
const value = await pair.value;
|
|
75
|
-
syncPairs.push({
|
|
76
|
-
key,
|
|
77
|
-
value
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
return ParseStatus.mergeObjectSync(status, syncPairs);
|
|
81
|
-
}
|
|
82
|
-
static mergeObjectSync(status, pairs) {
|
|
83
|
-
const finalObject = {};
|
|
84
|
-
for (const pair of pairs) {
|
|
85
|
-
const { key, value } = pair;
|
|
86
|
-
if (key.status === "aborted")
|
|
87
|
-
return INVALID;
|
|
88
|
-
if (value.status === "aborted")
|
|
89
|
-
return INVALID;
|
|
90
|
-
if (key.status === "dirty")
|
|
91
|
-
status.dirty();
|
|
92
|
-
if (value.status === "dirty")
|
|
93
|
-
status.dirty();
|
|
94
|
-
if (key.value !== "__proto__" && (typeof value.value !== "undefined" || pair.alwaysSet)) {
|
|
95
|
-
finalObject[key.value] = value.value;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
return { status: status.value, value: finalObject };
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
const INVALID = Object.freeze({
|
|
102
|
-
status: "aborted"
|
|
103
|
-
});
|
|
104
|
-
const DIRTY = (value) => ({ status: "dirty", value });
|
|
105
|
-
const OK = (value) => ({ status: "valid", value });
|
|
106
|
-
const isAborted = (x) => x.status === "aborted";
|
|
107
|
-
const isDirty = (x) => x.status === "dirty";
|
|
108
|
-
const isValid = (x) => x.status === "valid";
|
|
109
|
-
const isAsync = (x) => typeof Promise !== "undefined" && x instanceof Promise;
|
|
110
6
|
export {
|
|
111
|
-
|
|
112
|
-
INVALID,
|
|
113
|
-
OK,
|
|
114
|
-
ParseStatus,
|
|
115
|
-
addIssueToContext,
|
|
116
|
-
isAborted,
|
|
117
|
-
isAsync,
|
|
118
|
-
isDirty,
|
|
119
|
-
isValid,
|
|
120
|
-
makeIssue
|
|
7
|
+
version
|
|
121
8
|
};
|
|
122
9
|
//# sourceMappingURL=index.es269.js.map
|
package/dist/index.es269.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es269.js","sources":["../node_modules/.pnpm/zod@4.3.5/node_modules/zod/
|
|
1
|
+
{"version":3,"file":"index.es269.js","sources":["../node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/versions.js"],"sourcesContent":["export const version = {\n major: 4,\n minor: 3,\n patch: 5,\n};\n"],"names":[],"mappings":"AAAY,MAAC,UAAU;AAAA,EACnB,OAAO;AAAA,EACP,OAAO;AAAA,EACP,OAAO;AACX;","x_google_ignoreList":[0]}
|
package/dist/index.es27.js
CHANGED
|
@@ -1,107 +1,72 @@
|
|
|
1
|
-
import { jsxs,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
0 4px 4px 0 #28a9ff inset;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.letter-wrapper {
|
|
51
|
-
display: flex;
|
|
52
|
-
gap: 1px;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.loader-letter {
|
|
56
|
-
display: inline-block;
|
|
57
|
-
opacity: 0.4;
|
|
58
|
-
transform: translateY(0);
|
|
59
|
-
animation: loader-letter-anim 2s infinite;
|
|
60
|
-
z-index: 1;
|
|
61
|
-
border-radius: 50ch;
|
|
62
|
-
border: none;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.loader-letter:nth-child(1) { animation-delay: 0s; }
|
|
66
|
-
.loader-letter:nth-child(2) { animation-delay: 0.1s; }
|
|
67
|
-
.loader-letter:nth-child(3) { animation-delay: 0.2s; }
|
|
68
|
-
.loader-letter:nth-child(4) { animation-delay: 0.3s; }
|
|
69
|
-
.loader-letter:nth-child(5) { animation-delay: 0.4s; }
|
|
70
|
-
.loader-letter:nth-child(6) { animation-delay: 0.5s; }
|
|
71
|
-
.loader-letter:nth-child(7) { animation-delay: 0.6s; }
|
|
72
|
-
.loader-letter:nth-child(8) { animation-delay: 0.7s; }
|
|
73
|
-
|
|
74
|
-
@keyframes loader-letter-anim {
|
|
75
|
-
0%, 100% {
|
|
76
|
-
opacity: 0.4;
|
|
77
|
-
transform: translateY(0);
|
|
78
|
-
}
|
|
79
|
-
20% {
|
|
80
|
-
opacity: 1;
|
|
81
|
-
transform: scale(1.15);
|
|
82
|
-
}
|
|
83
|
-
40% {
|
|
84
|
-
opacity: 0.7;
|
|
85
|
-
transform: translateY(0);
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { getContentString } from "./index.es22.js";
|
|
3
|
+
import React__default, { useState } from "react";
|
|
4
|
+
function ToolCallFunctions({ title, toolMessages }) {
|
|
5
|
+
const [open, setOpen] = useState(false);
|
|
6
|
+
if (!toolMessages || toolMessages.length === 0) return null;
|
|
7
|
+
return /* @__PURE__ */ jsxs(
|
|
8
|
+
"div",
|
|
9
|
+
{
|
|
10
|
+
id: "accordion-collapse",
|
|
11
|
+
"data-accordion": "collapse",
|
|
12
|
+
className: "w-full rounded-base overflow-hidden shadow-xs border rounded-xl border-zinc-800 max-w-[90%] min-w-25",
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ jsx("h2", { id: "accordion-collapse-heading-1", children: /* @__PURE__ */ jsxs(
|
|
15
|
+
"button",
|
|
16
|
+
{
|
|
17
|
+
type: "button",
|
|
18
|
+
className: "flex items-center justify-between w-full p-2 font-medium gap-3 text-body border-0 outline-none ring-0 appearance-none bg-transparent",
|
|
19
|
+
onClick: () => setOpen((v) => !v),
|
|
20
|
+
"aria-expanded": open,
|
|
21
|
+
"aria-controls": "accordion-collapse-body-1",
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
24
|
+
"🔷 ",
|
|
25
|
+
title
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
"svg",
|
|
29
|
+
{
|
|
30
|
+
"data-accordion-icon": true,
|
|
31
|
+
className: `w-5 h-5 shrink-0 transition-transform ${open ? "rotate-0" : "rotate-180"}`,
|
|
32
|
+
"aria-hidden": "true",
|
|
33
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
34
|
+
width: "24",
|
|
35
|
+
height: "24",
|
|
36
|
+
fill: "none",
|
|
37
|
+
viewBox: "0 0 24 24",
|
|
38
|
+
children: /* @__PURE__ */ jsx(
|
|
39
|
+
"path",
|
|
40
|
+
{
|
|
41
|
+
stroke: "currentColor",
|
|
42
|
+
strokeLinecap: "round",
|
|
43
|
+
strokeLinejoin: "round",
|
|
44
|
+
strokeWidth: "2",
|
|
45
|
+
d: "m5 15 7-7 7 7"
|
|
86
46
|
}
|
|
47
|
+
)
|
|
87
48
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
/* @__PURE__ */ jsx(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
49
|
+
)
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
) }),
|
|
53
|
+
/* @__PURE__ */ jsx(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
id: "accordion-collapse-body-1",
|
|
57
|
+
className: `${open ? "" : "hidden"}`,
|
|
58
|
+
"aria-labelledby": "accordion-collapse-heading-1",
|
|
59
|
+
children: /* @__PURE__ */ jsx("div", { className: "md:p-5 text-left space-y-3", children: toolMessages.map((toolMsg) => /* @__PURE__ */ jsx("div", { className: "border-zinc-700", children: /* @__PURE__ */ jsx("p", { className: "text-body text-sm", children: toolMsg.content ? getContentString(toolMsg.content) : "" }) }, toolMsg.id)) })
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
|
+
]
|
|
63
|
+
}
|
|
64
|
+
);
|
|
103
65
|
}
|
|
66
|
+
const ToolCallFunctions$1 = React__default.memo(ToolCallFunctions, (prevProps, nextProps) => {
|
|
67
|
+
return prevProps.toolMessages?.length === nextProps.toolMessages?.length;
|
|
68
|
+
});
|
|
104
69
|
export {
|
|
105
|
-
|
|
70
|
+
ToolCallFunctions$1 as default
|
|
106
71
|
};
|
|
107
72
|
//# sourceMappingURL=index.es27.js.map
|
package/dist/index.es27.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es27.js","sources":["../src/components/
|
|
1
|
+
{"version":3,"file":"index.es27.js","sources":["../src/components/ToolCallFunctions.tsx"],"sourcesContent":["import { getContentString } from \"@/utils/utils\";\nimport type { Message } from \"@langchain/langgraph-sdk\";\nimport React, { useState } from \"react\";\n\nfunction ToolCallFunctions({ title, toolMessages }: {\n title?: string;\n toolMessages: Message[];\n}) {\n const [open, setOpen] = useState(false);\n\n // Only render if there are tool messages\n if (!toolMessages || toolMessages.length === 0) return null;\n\n return (\n <div\n id=\"accordion-collapse\"\n data-accordion=\"collapse\"\n className=\"w-full rounded-base overflow-hidden shadow-xs border rounded-xl border-zinc-800 max-w-[90%] min-w-25\"\n >\n <h2 id=\"accordion-collapse-heading-1\">\n <button\n type=\"button\"\n className=\"flex items-center justify-between w-full p-2 font-medium gap-3 text-body border-0 outline-none ring-0 appearance-none bg-transparent\"\n onClick={() => setOpen((v) => !v)}\n aria-expanded={open}\n aria-controls=\"accordion-collapse-body-1\"\n >\n <span>🔷 {title}</span>\n <svg\n data-accordion-icon\n className={`w-5 h-5 shrink-0 transition-transform ${open ? \"rotate-0\" : \"rotate-180\"\n }`}\n aria-hidden=\"true\"\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"24\"\n height=\"24\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n >\n <path\n stroke=\"currentColor\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth=\"2\"\n d=\"m5 15 7-7 7 7\"\n />\n </svg>\n </button>\n </h2>\n <div\n id=\"accordion-collapse-body-1\"\n className={`${open ? \"\" : \"hidden\"}`}\n aria-labelledby=\"accordion-collapse-heading-1\"\n >\n <div className=\"md:p-5 text-left space-y-3\">\n {toolMessages.map((toolMsg) => (\n <div key={toolMsg.id} className=\"border-zinc-700\">\n <p className=\"text-body text-sm\">{toolMsg.content ? getContentString(toolMsg.content) : \"\"}</p>\n </div>\n ))}\n </div>\n </div>\n </div>\n );\n}\n\nexport default React.memo(ToolCallFunctions, (prevProps, nextProps) => {\n return prevProps.toolMessages?.length === nextProps.toolMessages?.length;\n});"],"names":["React"],"mappings":";;;AAIA,SAAS,kBAAkB,EAAE,OAAO,gBAGjC;AACD,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AAGtC,MAAI,CAAC,gBAAgB,aAAa,WAAW,EAAG,QAAO;AAEvD,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,IAAG;AAAA,MACH,kBAAe;AAAA,MACf,WAAU;AAAA,MAEV,UAAA;AAAA,QAAA,oBAAC,MAAA,EAAG,IAAG,gCACL,UAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAS,MAAM,QAAQ,CAAC,MAAM,CAAC,CAAC;AAAA,YAChC,iBAAe;AAAA,YACf,iBAAc;AAAA,YAEd,UAAA;AAAA,cAAA,qBAAC,QAAA,EAAK,UAAA;AAAA,gBAAA;AAAA,gBAAI;AAAA,cAAA,GAAM;AAAA,cAChB;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,uBAAmB;AAAA,kBACnB,WAAW,yCAAyC,OAAO,aAAa,YACtE;AAAA,kBACF,eAAY;AAAA,kBACZ,OAAM;AAAA,kBACN,OAAM;AAAA,kBACN,QAAO;AAAA,kBACP,MAAK;AAAA,kBACL,SAAQ;AAAA,kBAER,UAAA;AAAA,oBAAC;AAAA,oBAAA;AAAA,sBACC,QAAO;AAAA,sBACP,eAAc;AAAA,sBACd,gBAAe;AAAA,sBACf,aAAY;AAAA,sBACZ,GAAE;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACJ;AAAA,cAAA;AAAA,YACF;AAAA,UAAA;AAAA,QAAA,GAEJ;AAAA,QACA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,IAAG;AAAA,YACH,WAAW,GAAG,OAAO,KAAK,QAAQ;AAAA,YAClC,mBAAgB;AAAA,YAEhB,UAAA,oBAAC,OAAA,EAAI,WAAU,8BACZ,UAAA,aAAa,IAAI,CAAC,YACjB,oBAAC,OAAA,EAAqB,WAAU,mBAC9B,UAAA,oBAAC,KAAA,EAAE,WAAU,qBAAqB,UAAA,QAAQ,UAAU,iBAAiB,QAAQ,OAAO,IAAI,GAAA,CAAG,EAAA,GADnF,QAAQ,EAElB,CACD,EAAA,CACH;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,MAAA,sBAAeA,eAAM,KAAK,mBAAmB,CAAC,WAAW,cAAc;AACrE,SAAO,UAAU,cAAc,WAAW,UAAU,cAAc;AACpE,CAAC;"}
|